@eox/layercontrol 0.14.0 → 0.15.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 +9848 -16239
- package/dist/eox-layercontrol.umd.cjs +159 -158
- package/package.json +1 -1
- package/test/_mockMap.js +1 -1
- package/test/cases/general/check-pre-open-section.js +5 -2
- package/test/cases/general/empty-groups.js +41 -0
- package/test/cases/general/index.js +1 -0
- package/test/cases/layer-update/check-if-layer-pushed-to-group.js +1 -1
- package/test/cases/layer-update/check-layer-removed-from-group.js +1 -1
- package/test/cases/layer-update/check-layer-removed-from-root.js +1 -1
- package/test/general.cy.js +4 -0
|
@@ -1,91 +1,78 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(rt,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(rt=typeof globalThis<"u"?globalThis:rt||self,X(rt["eox-layercontrol"]={}))})(this,function(rt){"use strict";var kp=Object.defineProperty;var Sp=(rt,X,ht)=>X in rt?kp(rt,X,{enumerable:!0,configurable:!0,writable:!0,value:ht}):rt[X]=ht;var wt=(rt,X,ht)=>(Sp(rt,typeof X!="symbol"?X+"":X,ht),ht),sn=(rt,X,ht)=>{if(!X.has(rt))throw TypeError("Cannot "+ht)};var nt=(rt,X,ht)=>(sn(rt,X,"read from private field"),ht?ht.call(rt):X.get(rt)),q=(rt,X,ht)=>{if(X.has(rt))throw TypeError("Cannot add the same private member more than once");X instanceof WeakSet?X.add(rt):X.set(rt,ht)},Me=(rt,X,ht,ri)=>(sn(rt,X,"write to private field"),ri?ri.call(rt,ht):X.set(rt,ht),ht);var Lt=(rt,X,ht)=>(sn(rt,X,"access private method"),ht);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var Go,Ye,Be,ss,va,rs,wa,Ai,ki,Si,ns,xa,os,as,Ti,ls,ds,hs,cs,Xe,Vs,us,Ca,ps,fs,ms,gs,bs,ys,_s,Ea,vs,La,ws,Aa,ji,rn,xs,ka,Cs,Sa,Je,Fs,Es,Ls,Qe,As,Ta,ks;const X=globalThis,ht=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ri=Symbol(),nn=new WeakMap;let ja=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ri)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(ht&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=nn.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&nn.set(e,t))}return t}toString(){return this.cssText}};const $a=n=>new ja(typeof n=="string"?n:n+"",void 0,ri),Pa=(n,t)=>{if(ht)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=X.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)}},on=ht?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return $a(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:Oa,defineProperty:Ia,getOwnPropertyDescriptor:Ba,getOwnPropertyNames:Ra,getOwnPropertySymbols:Da,getPrototypeOf:Na}=Object,_e=globalThis,an=_e.trustedTypes,Ma=an?an.emptyScript:"",zs=_e.reactiveElementPolyfillSupport,ni=(n,t)=>n,Us={toAttribute(n,t){switch(t){case Boolean:n=n?Ma:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},ln=(n,t)=>!Oa(n,t),dn={attribute:!0,type:String,converter:Us,reflect:!1,hasChanged:ln};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_e.litPropertyMetadata??(_e.litPropertyMetadata=new WeakMap);class He extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=dn){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Ia(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=Ba(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return s==null?void 0:s.call(this)},set(o){const a=s==null?void 0:s.call(this);r.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??dn}static _$Ei(){if(this.hasOwnProperty(ni("elementProperties")))return;const t=Na(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ni("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ni("properties"))){const e=this.properties,i=[...Ra(e),...Da(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(on(s))}else t!==void 0&&e.push(on(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pa(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var r;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const o=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Us).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){var r;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const o=i.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)==null?void 0:r.fromAttribute)!==void 0?o.converter:Us;this._$Em=s,this[s]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??ln)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,o]of s)o.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var r;return(r=s.hostUpdate)==null?void 0:r.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}He.elementStyles=[],He.shadowRootOptions={mode:"open"},He[ni("elementProperties")]=new Map,He[ni("finalized")]=new Map,zs==null||zs({ReactiveElement:He}),(_e.reactiveElementVersions??(_e.reactiveElementVersions=[])).push("2.0.4");/**
|
|
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 oi=globalThis,Ii=oi.trustedTypes,hn=Ii?Ii.createPolicy("lit-html",{createHTML:n=>n}):void 0,qs="$lit$",he=`lit$${(Math.random()+"").slice(9)}$`,Gs="?"+he,Ha=`<${Gs}>`,Le=document,ai=()=>Le.createComment(""),li=n=>n===null||typeof n!="object"&&typeof n!="function",cn=Array.isArray,un=n=>cn(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",Zs=`[
|
|
14
|
+
\f\r]`,di=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pn=/-->/g,fn=/>/g,Ae=RegExp(`>|${Zs}(?:([^\\s"'>=/]+)(${Zs}*=${Zs}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mn=/'/g,gn=/"/g,bn=/^(?:script|style|textarea|title)$/i,Va=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),z=Va(1),Qt=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),yn=new WeakMap,ke=Le.createTreeWalker(Le,129);function _n(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return hn!==void 0?hn.createHTML(t):t}const vn=(n,t)=>{const e=n.length-1,i=[];let s,r=t===2?"<svg>":"",o=di;for(let a=0;a<e;a++){const l=n[a];let d,h,u=-1,g=0;for(;g<l.length&&(o.lastIndex=g,h=o.exec(l),h!==null);)g=o.lastIndex,o===di?h[1]==="!--"?o=pn:h[1]!==void 0?o=fn:h[2]!==void 0?(bn.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=Ae):h[3]!==void 0&&(o=Ae):o===Ae?h[0]===">"?(o=s??di,u=-1):h[1]===void 0?u=-2:(u=o.lastIndex-h[2].length,d=h[1],o=h[3]===void 0?Ae:h[3]==='"'?gn:mn):o===gn||o===mn?o=Ae:o===pn||o===fn?o=di:(o=Ae,s=void 0);const m=o===Ae&&n[a+1].startsWith("/>")?" ":"";r+=o===di?l+Ha:u>=0?(i.push(d),l.slice(0,u)+qs+l.slice(u)+he+m):l+he+(u===-2?a:m)}return[_n(n,r+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class hi{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const a=t.length-1,l=this.parts,[d,h]=vn(t,e);if(this.el=hi.createElement(d,i),ke.currentNode=this.el.content,e===2){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(s=ke.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const u of s.getAttributeNames())if(u.endsWith(qs)){const g=h[o++],m=s.getAttribute(u).split(he),y=/([.?@])?(.*)/.exec(g);l.push({type:1,index:r,name:y[2],strings:m,ctor:y[1]==="."?xn:y[1]==="?"?Cn:y[1]==="@"?En:ci}),s.removeAttribute(u)}else u.startsWith(he)&&(l.push({type:6,index:r}),s.removeAttribute(u));if(bn.test(s.tagName)){const u=s.textContent.split(he),g=u.length-1;if(g>0){s.textContent=Ii?Ii.emptyScript:"";for(let m=0;m<g;m++)s.append(u[m],ai()),ke.nextNode(),l.push({type:2,index:++r});s.append(u[g],ai())}}}else if(s.nodeType===8)if(s.data===Gs)l.push({type:2,index:r});else{let u=-1;for(;(u=s.data.indexOf(he,u+1))!==-1;)l.push({type:7,index:r}),u+=he.length-1}r++}}static createElement(t,e){const i=Le.createElement("template");return i.innerHTML=t,i}}function Se(n,t,e=n,i){var o,a;if(t===Qt)return t;let s=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const r=li(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==r&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),r===void 0?s=void 0:(s=new r(n),s._$AT(n,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=Se(n,s._$AS(n,t.values),s,i)),t}class wn{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??Le).importNode(e,!0);ke.currentNode=s;let r=ke.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let d;l.type===2?d=new Ve(r,r.nextSibling,this,t):l.type===1?d=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(d=new Ln(r,this,t)),this._$AV.push(d),l=i[++a]}o!==(l==null?void 0:l.index)&&(r=ke.nextNode(),o++)}return ke.currentNode=Le,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ve{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Se(this,t,e),li(t)?t===K||t==null||t===""?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==Qt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):un(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==K&&li(this._$AH)?this._$AA.nextSibling.data=t:this.T(Le.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=hi.createElement(_n(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===s)this._$AH.p(e);else{const o=new wn(s,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=yn.get(t.strings);return e===void 0&&yn.set(t.strings,e=new hi(t)),e}k(t){cn(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new Ve(this.S(ai()),this.S(ai()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class ci{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(r===void 0)t=Se(this,t,e,0),o=!li(t)||t!==this._$AH&&t!==Qt,o&&(this._$AH=t);else{const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Se(this,a[i+l],e,l),d===Qt&&(d=this._$AH[l]),o||(o=!li(d)||d!==this._$AH[l]),d===K?t=K:t!==K&&(t+=(d??"")+r[l+1]),this._$AH[l]=d}o&&!s&&this.j(t)}j(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class xn extends ci{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===K?void 0:t}}class Cn extends ci{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==K)}}class En extends ci{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=Se(this,t,e,0)??K)===Qt)return;const i=this._$AH,s=t===K&&i!==K||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==K&&(i===K||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ln{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Se(this,t)}}const Fa={P:qs,A:he,C:Gs,M:1,L:vn,R:wn,D:un,V:Se,I:Ve,H:ci,N:Cn,U:En,B:xn,F:Ln},Ws=oi.litHtmlPolyfillSupport;Ws==null||Ws(hi,Ve),(oi.litHtmlVersions??(oi.litHtmlVersions=[])).push("3.1.2");const za=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const r=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new Ve(t.insertBefore(ai(),r),r,void 0,e??{})}return s._$AI(n),s};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let
|
|
19
|
+
*/let Mt=class extends He{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=za(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Qt}};Mt._$litElement$=!0,Mt.finalized=!0,(Go=globalThis.litElementHydrateSupport)==null||Go.call(globalThis,{LitElement:Mt});const Ys=globalThis.litElementPolyfillSupport;Ys==null||Ys({LitElement:Mt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function ee(n,t,e){return n?t(n):e==null?void 0:e(n)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const ve={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Xs=n=>(...t)=>({_$litDirective$:n,values:t});class Js{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{
|
|
31
|
+
*/const{I:Ua}=Fa,qa=n=>n.strings===void 0,An=()=>document.createComment(""),ui=(n,t,e)=>{var r;const i=n._$AA.parentNode,s=t===void 0?n._$AB:t._$AA;if(e===void 0){const o=i.insertBefore(An(),s),a=i.insertBefore(An(),s);e=new Ua(o,a,n,n.options)}else{const o=e._$AB.nextSibling,a=e._$AM,l=a!==n;if(l){let d;(r=e._$AQ)==null||r.call(e,n),e._$AM=n,e._$AP!==void 0&&(d=n._$AU)!==a._$AU&&e._$AP(d)}if(o!==s||l){let d=e._$AA;for(;d!==o;){const h=d.nextSibling;i.insertBefore(d,s),d=h}}}return e},Te=(n,t,e=n)=>(n._$AI(t,e),n),Ga={},kn=(n,t=Ga)=>n._$AH=t,Za=n=>n._$AH,Qs=n=>{var i;(i=n._$AP)==null||i.call(n,!1,!0);let t=n._$AA;const e=n._$AB.nextSibling;for(;t!==e;){const s=t.nextSibling;t.remove(),t=s}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const Sn=(n,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(n[s],s);return i},Wa=Xs(class extends Js{constructor(n){if(super(n),n.type!==ve.CHILD)throw Error("repeat() can only be used in text expressions")}dt(n,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const s=[],r=[];let o=0;for(const a of n)s[o]=i?i(a,o):o,r[o]=e(a,o),o++;return{values:r,keys:s}}render(n,t,e){return this.dt(n,t,e).values}update(n,[t,e,i]){const s=Za(n),{values:r,keys:o}=this.dt(t,e,i);if(!Array.isArray(s))return this.ut=o,r;const a=this.ut??(this.ut=[]),l=[];let d,h,u=0,g=s.length-1,m=0,y=r.length-1;for(;u<=g&&m<=y;)if(s[u]===null)u++;else if(s[g]===null)g--;else if(a[u]===o[m])l[m]=Te(s[u],r[m]),u++,m++;else if(a[g]===o[y])l[y]=Te(s[g],r[y]),g--,y--;else if(a[u]===o[y])l[y]=Te(s[u],r[y]),ui(n,l[y+1],s[u]),u++,y--;else if(a[g]===o[m])l[m]=Te(s[g],r[m]),ui(n,s[u],s[g]),g--,m++;else if(d===void 0&&(d=Sn(o,m,y),h=Sn(a,u,g)),d.has(a[u]))if(d.has(a[g])){const w=h.get(o[m]),A=w!==void 0?s[w]:null;if(A===null){const et=ui(n,s[u]);Te(et,r[m]),l[m]=et}else l[m]=Te(A,r[m]),ui(n,s[u],A),s[w]=null;m++}else Qs(s[g]),g--;else Qs(s[u]),u++;for(;m<=y;){const w=ui(n,l[y+1]);Te(w,r[m]),l[m++]=w}for(;u<=g;){const w=s[u++];w!==null&&Qs(w)}return this.ut=o,kn(n,l),Qt}});/**
|
|
36
36
|
* wms-capabilities @0.6.0
|
|
37
37
|
* @description WMS service Capabilities > JSON, based on openlayers
|
|
38
38
|
* @license BSD-2-Clause
|
|
39
39
|
* @preserve
|
|
40
|
-
*/var
|
|
40
|
+
*/var V=n=>n!==void 0,Tn=(n,t,e)=>t in n?n[t]:n[t]=e;const pi={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class Ya{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,e){return Bi(t,e).join("")}}function Bi(n,t){return jn(n,t,[]).join("")}function jn(n,t,e){if(n.nodeType===pi.CDATA_SECTION||n.nodeType===pi.TEXT)t?e.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(n.nodeValue);else{var i;for(i=n.firstChild;i;i=i.nextSibling)jn(i,t,e)}return e}function Xa(n,t,e,i){for(var s=Ja(t);s;s=Qa(s)){var r=s.namespaceURI||null,o=n[r];if(V(o)){var a=o[s.localName];V(a)&&a.call(i,s,e)}}}function Ja(n){let t=n.firstElementChild||n.firstChild;for(;t&&t.nodeType!==pi.ELEMENT;)t=t.nextSibling;return t}function Qa(n){let t=n.nextElementSibling||n.nextSibling;for(;t&&t.nodeType!==pi.ELEMENT;)t=t.nextSibling;return t}function jt(n,t,e){return Ka(n,t,e)}function Ka(n,t,e){var i=V(e)?e:{},s,r;for(s=0,r=n.length;s<r;++s)i[n[s]]=t;return i}function $n(n,t){return function(e,i){var s=n.call(V(t)?t:this,e,i);if(V(s)){var r=i[i.length-1];r.push(s)}}}function At(n,t,e,i,s){return i.push(n),Xa(t,e,i,s),i.pop()}function k(n,t,e){return function(i,s){let r=n.call(V(e)?e:this,i,s);if(V(r)){var o=s[s.length-1],a=V(t)?t:i.localName;o[a]=r}}}function Ht(n,t,e){return function(i,s){var r=n.call(V(e)?e:this,i,s);if(V(r)){var o=s[s.length-1],a=V(t)?t:i.localName,l=Tn(o,a,[]);l.push(r)}}}const tl=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function el(n){return n.replace(tl,"")}function je(n){const t=/^\s*(true|1)|(false|0)\s*$/.exec(n);if(t)return V(t[1])||!1}function Fe(n){return ce(Bi(n,!1))}function ce(n){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);if(t)return parseFloat(t[1])}function Ks(n){return Ri(Bi(n,!1))}function Ri(n){const t=/^\s*(\d+)\s*$/.exec(n);if(t)return parseInt(t[1],10)}function Y(n){return el(Bi(n,!1))}const il="http://www.w3.org/1999/xlink";function tr(n){return n.getAttributeNS(il,"href")}function sl(n,t){return At({},jl,n,t)}function Pn(n){return[ce(n.getAttribute("minx")),ce(n.getAttribute("miny")),ce(n.getAttribute("maxx")),ce(n.getAttribute("maxy"))]}function rl(n,t){const e=Pn(n),i=[ce(n.getAttribute("resx")),ce(n.getAttribute("resy"))];return{crs:n.getAttribute("CRS")||n.getAttribute("SRS"),extent:e,res:i}}function nl(n,t){const e=Pn(n);if(!(!V(e[0])||!V(e[1])||!V(e[2])||!V(e[3])))return e}function ol(n,t){const e=parseFloat(n.getAttribute("min")),i=parseFloat(n.getAttribute("max"));return{min:e,max:i}}function al(n,t){const e=At({},$l,n,t);if(!V(e))return;const i=e.westBoundLongitude,s=e.southBoundLatitude,r=e.eastBoundLongitude,o=e.northBoundLatitude;if(!(!V(i)||!V(s)||!V(r)||!V(o)))return[i,s,r,o]}function ll(n,t){return At({},El,n,t)}function dl(n,t){return At({},Ll,n,t)}function hl(n,t){return At({},Al,n,t)}function cl(n,t){return At({},kl,n,t)}function ul(n,t){return At({},Sl,n,t)}function pl(n,t){return At([],Tl,n,t)}function fl(n,t){const e=je(n.getAttribute("queryable"));return At({queryable:V(e)?e:!1},Bn,n,t)}function ml(n,t){var e=t[t.length-1];const i=At({},Bn,n,t);if(!V(i))return;let s=je(n.getAttribute("queryable"));V(s)||(s=e.queryable),i.queryable=V(s)?s:!1;let r=Ri(n.getAttribute("cascaded"));V(r)||(r=e.cascaded),i.cascaded=r;let o=je(n.getAttribute("opaque"));V(o)||(o=e.opaque),i.opaque=V(o)?o:!1;let a=je(n.getAttribute("noSubsets"));V(a)||(a=e.noSubsets),i.noSubsets=V(a)?a:!1;let l=ce(n.getAttribute("fixedWidth"));V(l)||(l=e.fixedWidth),i.fixedWidth=l;let d=ce(n.getAttribute("fixedHeight"));V(d)||(d=e.fixedHeight),i.fixedHeight=d;const h=["Style","CRS","AuthorityURL"];for(let g=0,m=h.length;g<m;g++){const y=h[g],w=e[y];if(V(w)){let A=Tn(i,y,[]);A=A.concat(w),i[y]=A}}const u=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let g=0,m=u.length;g<m;g++){const y=u[g],w=i[y];if(!V(w)){const A=e[y];i[y]=A}}return i}function gl(n,t){return{name:n.getAttribute("name"),units:n.getAttribute("units"),unitSymbol:n.getAttribute("unitSymbol"),default:n.getAttribute("default"),multipleValues:je(n.getAttribute("multipleValues")),nearestValue:je(n.getAttribute("nearestValue")),current:je(n.getAttribute("current")),values:Y(n)}}function ue(n,t){return At({},Dl,n,t)}function bl(n,t){return At({},Pl,n,t)}function yl(n,t){return At({},Il,n,t)}function _l(n,t){return At({},Bl,n,t)}function er(n,t){return At({},Ol,n,t)}function On(n,t){var e=ue(n,t);if(V(e)){const i=[Ri(n.getAttribute("width")),Ri(n.getAttribute("height"))];return e.size=i,e}}function vl(n,t){var e=ue(n,t);if(V(e))return e.name=n.getAttribute("name"),e}function wl(n,t){var e=ue(n,t);if(V(e))return e.type=n.getAttribute("type"),e}function xl(n,t){return At({},Rl,n,t)}function In(n,t){return At([],Nl,n,t)}const $t=[null,"http://www.opengis.net/wms"],Cl=jt($t,{Service:k(dl),Capability:k(ll)}),El=jt($t,{Request:k(bl),Exception:k(pl),Layer:k(fl)}),Ll=jt($t,{Name:k(Y),Title:k(Y),Abstract:k(Y),KeywordList:k(In),OnlineResource:k(tr),ContactInformation:k(hl),Fees:k(Y),AccessConstraints:k(Y),LayerLimit:k(Ks),MaxWidth:k(Ks),MaxHeight:k(Ks)}),Al=jt($t,{ContactPersonPrimary:k(cl),ContactPosition:k(Y),ContactAddress:k(ul),ContactVoiceTelephone:k(Y),ContactFacsimileTelephone:k(Y),ContactElectronicMailAddress:k(Y)}),kl=jt($t,{ContactPerson:k(Y),ContactOrganization:k(Y)}),Sl=jt($t,{AddressType:k(Y),Address:k(Y),City:k(Y),StateOrProvince:k(Y),PostCode:k(Y),Country:k(Y)}),Tl=jt($t,{Format:$n(Y)}),Bn=jt($t,{Name:k(Y),Title:k(Y),Abstract:k(Y),KeywordList:k(In),CRS:Ht(Y),SRS:Ht(Y),EX_GeographicBoundingBox:k(al),LatLonBoundingBox:k(nl),BoundingBox:Ht(rl),Dimension:Ht(gl),Attribution:k(sl),AuthorityURL:Ht(vl),Identifier:Ht(Y),MetadataURL:Ht(wl),DataURL:Ht(ue),FeatureListURL:Ht(ue),Style:Ht(xl),MinScaleDenominator:k(Fe),MaxScaleDenominator:k(Fe),ScaleHint:k(ol),Layer:Ht(ml)}),jl=jt($t,{Title:k(Y),OnlineResource:k(tr),LogoURL:k(On)}),$l=jt($t,{westBoundLongitude:k(Fe),eastBoundLongitude:k(Fe),southBoundLatitude:k(Fe),northBoundLatitude:k(Fe)}),Pl=jt($t,{GetCapabilities:k(er),GetMap:k(er),GetFeatureInfo:k(er)}),Ol=jt($t,{Format:Ht(Y),DCPType:Ht(yl)}),Il=jt($t,{HTTP:k(_l)}),Bl=jt($t,{Get:k(ue),Post:k(ue)}),Rl=jt($t,{Name:k(Y),Title:k(Y),Abstract:k(Y),LegendURL:Ht(On),StyleSheetURL:k(ue),StyleURL:k(ue)}),Dl=jt($t,{Format:k(Y),OnlineResource:k(tr)}),Nl=jt($t,{Keyword:$n(Y)});class Ml{constructor(t,e){!e&&typeof window<"u"&&(e=window.DOMParser),this.version=void 0,this._parser=new Ya(e),this._data=t}data(t){return this._data=t,this}toJSON(t){return t=t||this._data,this.parse(t)}parse(t){return this.readFromDocument(this._parser.toDocument(t))}readFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==pi.ELEMENT)return this.readFromNode(e);return null}readFromNode(t){return this.version=t.getAttribute("version"),At({version:this.version},Cl,t,[])||null}}async function Hl(n){let t=new URL(n),e=t.searchParams;e.set("SERVICE","WMS"),e.set("REQUEST","GetCapabilities");let i=t.toString();const s=await fetch(i);if(s.ok){const r=await s.text();return new Ml(r).toJSON()}else throw new Error(`Error: ${s.status}`)}function ir(n){const t=/\b(?:wms|ows)\b/i,e=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(n)?"TileWMS":e.test(n)?"XYZ":!1}function Vl(n){const e=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(n),i=ir(n);return!!(n&&e&&i)}function Rn(n){return n.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function Fl(n){try{return JSON.parse(Rn(n)),!!n}catch{return!1}}function zl(n,t){const e=new URL(n).searchParams;Object.entries(t).forEach(([o,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{e.set(l,a[l])}):e.set(o,a)});const i=n.split("?")[0],s=e.toString();return`${i}?${s}`}/**!
|
|
41
41
|
* Sortable 1.15.2
|
|
42
42
|
* @author RubaXa <trash@rubaxa.org>
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/function $c(m,s){var p=Object.keys(m);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(m);s&&(b=b.filter(function(_){return Object.getOwnPropertyDescriptor(m,_).enumerable})),p.push.apply(p,b)}return p}function rn(m){for(var s=1;s<arguments.length;s++){var p=arguments[s]!=null?arguments[s]:{};s%2?$c(Object(p),!0).forEach(function(b){fd(m,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(p)):$c(Object(p)).forEach(function(b){Object.defineProperty(m,b,Object.getOwnPropertyDescriptor(p,b))})}return m}function wa(m){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wa=function(s){return typeof s}:wa=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},wa(m)}function fd(m,s,p){return s in m?Object.defineProperty(m,s,{value:p,enumerable:!0,configurable:!0,writable:!0}):m[s]=p,m}function wn(){return wn=Object.assign||function(m){for(var s=1;s<arguments.length;s++){var p=arguments[s];for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(m[b]=p[b])}return m},wn.apply(this,arguments)}function md(m,s){if(m==null)return{};var p={},b=Object.keys(m),_,E;for(E=0;E<b.length;E++)_=b[E],!(s.indexOf(_)>=0)&&(p[_]=m[_]);return p}function yd(m,s){if(m==null)return{};var p=md(m,s),b,_;if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(m);for(_=0;_<E.length;_++)b=E[_],!(s.indexOf(b)>=0)&&Object.prototype.propertyIsEnumerable.call(m,b)&&(p[b]=m[b])}return p}var bd="1.15.2";function _n(m){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(m)}var xn=_n(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Mo=_n(/Edge/i),Mc=_n(/firefox/i),Ho=_n(/safari/i)&&!_n(/chrome/i)&&!_n(/android/i),Hc=_n(/iP(ad|od|hone)/i),Fc=_n(/chrome/i)&&_n(/android/i),Vc={capture:!1,passive:!1};function be(m,s,p){m.addEventListener(s,p,!xn&&Vc)}function he(m,s,p){m.removeEventListener(s,p,!xn&&Vc)}function _a(m,s){if(s){if(s[0]===">"&&(s=s.substring(1)),m)try{if(m.matches)return m.matches(s);if(m.msMatchesSelector)return m.msMatchesSelector(s);if(m.webkitMatchesSelector)return m.webkitMatchesSelector(s)}catch{return!1}return!1}}function vd(m){return m.host&&m!==document&&m.host.nodeType?m.host:m.parentNode}function Gr(m,s,p,b){if(m){p=p||document;do{if(s!=null&&(s[0]===">"?m.parentNode===p&&_a(m,s):_a(m,s))||b&&m===p)return m;if(m===p)break}while(m=vd(m))}return null}var zc=/\s+/g;function Lr(m,s,p){if(m&&s)if(m.classList)m.classList[p?"add":"remove"](s);else{var b=(" "+m.className+" ").replace(zc," ").replace(" "+s+" "," ");m.className=(b+(p?" "+s:"")).replace(zc," ")}}function Ht(m,s,p){var b=m&&m.style;if(b){if(p===void 0)return document.defaultView&&document.defaultView.getComputedStyle?p=document.defaultView.getComputedStyle(m,""):m.currentStyle&&(p=m.currentStyle),s===void 0?p:p[s];!(s in b)&&s.indexOf("webkit")===-1&&(s="-webkit-"+s),b[s]=p+(typeof p=="string"?"":"px")}}function Li(m,s){var p="";if(typeof m=="string")p=m;else do{var b=Ht(m,"transform");b&&b!=="none"&&(p=b+" "+p)}while(!s&&(m=m.parentNode));var _=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return _&&new _(p)}function Uc(m,s,p){if(m){var b=m.getElementsByTagName(s),_=0,E=b.length;if(p)for(;_<E;_++)p(b[_],_);return b}return[]}function nn(){var m=document.scrollingElement;return m||document.documentElement}function Je(m,s,p,b,_){if(!(!m.getBoundingClientRect&&m!==window)){var E,y,j,r,v,g,w;if(m!==window&&m.parentNode&&m!==nn()?(E=m.getBoundingClientRect(),y=E.top,j=E.left,r=E.bottom,v=E.right,g=E.height,w=E.width):(y=0,j=0,r=window.innerHeight,v=window.innerWidth,g=window.innerHeight,w=window.innerWidth),(s||p)&&m!==window&&(_=_||m.parentNode,!xn))do if(_&&_.getBoundingClientRect&&(Ht(_,"transform")!=="none"||p&&Ht(_,"position")!=="static")){var k=_.getBoundingClientRect();y-=k.top+parseInt(Ht(_,"border-top-width")),j-=k.left+parseInt(Ht(_,"border-left-width")),r=y+E.height,v=j+E.width;break}while(_=_.parentNode);if(b&&m!==window){var O=Li(_||m),C=O&&O.a,S=O&&O.d;O&&(y/=S,j/=C,w/=C,g/=S,r=y+g,v=j+w)}return{top:y,left:j,bottom:r,right:v,width:w,height:g}}}function qc(m,s,p){for(var b=Rn(m,!0),_=Je(m)[s];b;){var E=Je(b)[p],y=void 0;if(p==="top"||p==="left"?y=_>=E:y=_<=E,!y)return b;if(b===nn())break;b=Rn(b,!1)}return!1}function Ri(m,s,p,b){for(var _=0,E=0,y=m.children;E<y.length;){if(y[E].style.display!=="none"&&y[E]!==Ft.ghost&&(b||y[E]!==Ft.dragged)&&Gr(y[E],p.draggable,m,!1)){if(_===s)return y[E];_++}E++}return null}function Ws(m,s){for(var p=m.lastElementChild;p&&(p===Ft.ghost||Ht(p,"display")==="none"||s&&!_a(p,s));)p=p.previousElementSibling;return p||null}function $r(m,s){var p=0;if(!m||!m.parentNode)return-1;for(;m=m.previousElementSibling;)m.nodeName.toUpperCase()!=="TEMPLATE"&&m!==Ft.clone&&(!s||_a(m,s))&&p++;return p}function Gc(m){var s=0,p=0,b=nn();if(m)do{var _=Li(m),E=_.a,y=_.d;s+=m.scrollLeft*E,p+=m.scrollTop*y}while(m!==b&&(m=m.parentNode));return[s,p]}function gd(m,s){for(var p in m)if(m.hasOwnProperty(p)){for(var b in s)if(s.hasOwnProperty(b)&&s[b]===m[p][b])return Number(p)}return-1}function Rn(m,s){if(!m||!m.getBoundingClientRect)return nn();var p=m,b=!1;do if(p.clientWidth<p.scrollWidth||p.clientHeight<p.scrollHeight){var _=Ht(p);if(p.clientWidth<p.scrollWidth&&(_.overflowX=="auto"||_.overflowX=="scroll")||p.clientHeight<p.scrollHeight&&(_.overflowY=="auto"||_.overflowY=="scroll")){if(!p.getBoundingClientRect||p===document.body)return nn();if(b||s)return p;b=!0}}while(p=p.parentNode);return nn()}function wd(m,s){if(m&&s)for(var p in s)s.hasOwnProperty(p)&&(m[p]=s[p]);return m}function Zs(m,s){return Math.round(m.top)===Math.round(s.top)&&Math.round(m.left)===Math.round(s.left)&&Math.round(m.height)===Math.round(s.height)&&Math.round(m.width)===Math.round(s.width)}var Fo;function Wc(m,s){return function(){if(!Fo){var p=arguments,b=this;p.length===1?m.call(b,p[0]):m.apply(b,p),Fo=setTimeout(function(){Fo=void 0},s)}}}function _d(){clearTimeout(Fo),Fo=void 0}function Zc(m,s,p){m.scrollLeft+=s,m.scrollTop+=p}function Jc(m){var s=window.Polymer,p=window.jQuery||window.Zepto;return s&&s.dom?s.dom(m).cloneNode(!0):p?p(m).clone(!0)[0]:m.cloneNode(!0)}function Yc(m,s,p){var b={};return Array.from(m.children).forEach(function(_){var E,y,j,r;if(!(!Gr(_,s.draggable,m,!1)||_.animated||_===p)){var v=Je(_);b.left=Math.min((E=b.left)!==null&&E!==void 0?E:1/0,v.left),b.top=Math.min((y=b.top)!==null&&y!==void 0?y:1/0,v.top),b.right=Math.max((j=b.right)!==null&&j!==void 0?j:-1/0,v.right),b.bottom=Math.max((r=b.bottom)!==null&&r!==void 0?r:-1/0,v.bottom)}}),b.width=b.right-b.left,b.height=b.bottom-b.top,b.x=b.left,b.y=b.top,b}var Rr="Sortable"+new Date().getTime();function xd(){var m=[],s;return{captureAnimationState:function(){if(m=[],!!this.options.animation){var b=[].slice.call(this.el.children);b.forEach(function(_){if(!(Ht(_,"display")==="none"||_===Ft.ghost)){m.push({target:_,rect:Je(_)});var E=rn({},m[m.length-1].rect);if(_.thisAnimationDuration){var y=Li(_,!0);y&&(E.top-=y.f,E.left-=y.e)}_.fromRect=E}})}},addAnimationState:function(b){m.push(b)},removeAnimationState:function(b){m.splice(gd(m,{target:b}),1)},animateAll:function(b){var _=this;if(!this.options.animation){clearTimeout(s),typeof b=="function"&&b();return}var E=!1,y=0;m.forEach(function(j){var r=0,v=j.target,g=v.fromRect,w=Je(v),k=v.prevFromRect,O=v.prevToRect,C=j.rect,S=Li(v,!0);S&&(w.top-=S.f,w.left-=S.e),v.toRect=w,v.thisAnimationDuration&&Zs(k,w)&&!Zs(g,w)&&(C.top-w.top)/(C.left-w.left)===(g.top-w.top)/(g.left-w.left)&&(r=jd(C,k,O,_.options)),Zs(w,g)||(v.prevFromRect=g,v.prevToRect=w,r||(r=_.options.animation),_.animate(v,C,w,r)),r&&(E=!0,y=Math.max(y,r),clearTimeout(v.animationResetTimer),v.animationResetTimer=setTimeout(function(){v.animationTime=0,v.prevFromRect=null,v.fromRect=null,v.prevToRect=null,v.thisAnimationDuration=null},r),v.thisAnimationDuration=r)}),clearTimeout(s),E?s=setTimeout(function(){typeof b=="function"&&b()},y):typeof b=="function"&&b(),m=[]},animate:function(b,_,E,y){if(y){Ht(b,"transition",""),Ht(b,"transform","");var j=Li(this.el),r=j&&j.a,v=j&&j.d,g=(_.left-E.left)/(r||1),w=(_.top-E.top)/(v||1);b.animatingX=!!g,b.animatingY=!!w,Ht(b,"transform","translate3d("+g+"px,"+w+"px,0)"),this.forRepaintDummy=kd(b),Ht(b,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),Ht(b,"transform","translate3d(0,0,0)"),typeof b.animated=="number"&&clearTimeout(b.animated),b.animated=setTimeout(function(){Ht(b,"transition",""),Ht(b,"transform",""),b.animated=!1,b.animatingX=!1,b.animatingY=!1},y)}}}}function kd(m){return m.offsetWidth}function jd(m,s,p,b){return Math.sqrt(Math.pow(s.top-m.top,2)+Math.pow(s.left-m.left,2))/Math.sqrt(Math.pow(s.top-p.top,2)+Math.pow(s.left-p.left,2))*b.animation}var Ii=[],Js={initializeByDefault:!0},Vo={mount:function(s){for(var p in Js)Js.hasOwnProperty(p)&&!(p in s)&&(s[p]=Js[p]);Ii.forEach(function(b){if(b.pluginName===s.pluginName)throw"Sortable: Cannot mount plugin ".concat(s.pluginName," more than once")}),Ii.push(s)},pluginEvent:function(s,p,b){var _=this;this.eventCanceled=!1,b.cancel=function(){_.eventCanceled=!0};var E=s+"Global";Ii.forEach(function(y){p[y.pluginName]&&(p[y.pluginName][E]&&p[y.pluginName][E](rn({sortable:p},b)),p.options[y.pluginName]&&p[y.pluginName][s]&&p[y.pluginName][s](rn({sortable:p},b)))})},initializePlugins:function(s,p,b,_){Ii.forEach(function(j){var r=j.pluginName;if(!(!s.options[r]&&!j.initializeByDefault)){var v=new j(s,p,s.options);v.sortable=s,v.options=s.options,s[r]=v,wn(b,v.defaults)}});for(var E in s.options)if(s.options.hasOwnProperty(E)){var y=this.modifyOption(s,E,s.options[E]);typeof y<"u"&&(s.options[E]=y)}},getEventProperties:function(s,p){var b={};return Ii.forEach(function(_){typeof _.eventProperties=="function"&&wn(b,_.eventProperties.call(p[_.pluginName],s))}),b},modifyOption:function(s,p,b){var _;return Ii.forEach(function(E){s[E.pluginName]&&E.optionListeners&&typeof E.optionListeners[p]=="function"&&(_=E.optionListeners[p].call(s[E.pluginName],b))}),_}};function Od(m){var s=m.sortable,p=m.rootEl,b=m.name,_=m.targetEl,E=m.cloneEl,y=m.toEl,j=m.fromEl,r=m.oldIndex,v=m.newIndex,g=m.oldDraggableIndex,w=m.newDraggableIndex,k=m.originalEvent,O=m.putSortable,C=m.extraEventProperties;if(s=s||p&&p[Rr],!!s){var S,T=s.options,A="on"+b.charAt(0).toUpperCase()+b.substr(1);window.CustomEvent&&!xn&&!Mo?S=new CustomEvent(b,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(b,!0,!0)),S.to=y||p,S.from=j||p,S.item=_||p,S.clone=E,S.oldIndex=r,S.newIndex=v,S.oldDraggableIndex=g,S.newDraggableIndex=w,S.originalEvent=k,S.pullMode=O?O.lastPutMode:void 0;var R=rn(rn({},C),Vo.getEventProperties(b,s));for(var I in R)S[I]=R[I];p&&p.dispatchEvent(S),T[A]&&T[A].call(s,S)}}var Ed=["evt"],Er=function(s,p){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=b.evt,E=yd(b,Ed);Vo.pluginEvent.bind(Ft)(s,p,rn({dragEl:ht,parentEl:Ve,ghostEl:Wt,rootEl:Ie,nextEl:ai,lastDownEl:xa,cloneEl:De,cloneHidden:In,dragStarted:Uo,putSortable:sr,activeSortable:Ft.active,originalEvent:_,oldIndex:Bi,oldDraggableIndex:zo,newIndex:Ir,newDraggableIndex:Bn,hideGhostForTarget:nu,unhideGhostForTarget:iu,cloneNowHidden:function(){In=!0},cloneNowShown:function(){In=!1},dispatchSortableEvent:function(j){_r({sortable:p,name:j,originalEvent:_})}},E))};function _r(m){Od(rn({putSortable:sr,cloneEl:De,targetEl:ht,rootEl:Ie,oldIndex:Bi,oldDraggableIndex:zo,newIndex:Ir,newDraggableIndex:Bn},m))}var ht,Ve,Wt,Ie,ai,xa,De,In,Bi,Ir,zo,Bn,ka,sr,Di=!1,ja=!1,Oa=[],si,Wr,Ys,Xs,Xc,Kc,Uo,Ni,qo,Go=!1,Ea=!1,Ca,hr,Ks=[],Qs=!1,Sa=[],Pa=typeof document<"u",Ta=Hc,Qc=Mo||xn?"cssFloat":"float",Cd=Pa&&!Fc&&!Hc&&"draggable"in document.createElement("div"),tu=function(){if(Pa){if(xn)return!1;var m=document.createElement("x");return m.style.cssText="pointer-events:auto",m.style.pointerEvents==="auto"}}(),eu=function(s,p){var b=Ht(s),_=parseInt(b.width)-parseInt(b.paddingLeft)-parseInt(b.paddingRight)-parseInt(b.borderLeftWidth)-parseInt(b.borderRightWidth),E=Ri(s,0,p),y=Ri(s,1,p),j=E&&Ht(E),r=y&&Ht(y),v=j&&parseInt(j.marginLeft)+parseInt(j.marginRight)+Je(E).width,g=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Je(y).width;if(b.display==="flex")return b.flexDirection==="column"||b.flexDirection==="column-reverse"?"vertical":"horizontal";if(b.display==="grid")return b.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(E&&j.float&&j.float!=="none"){var w=j.float==="left"?"left":"right";return y&&(r.clear==="both"||r.clear===w)?"vertical":"horizontal"}return E&&(j.display==="block"||j.display==="flex"||j.display==="table"||j.display==="grid"||v>=_&&b[Qc]==="none"||y&&b[Qc]==="none"&&v+g>_)?"vertical":"horizontal"},Sd=function(s,p,b){var _=b?s.left:s.top,E=b?s.right:s.bottom,y=b?s.width:s.height,j=b?p.left:p.top,r=b?p.right:p.bottom,v=b?p.width:p.height;return _===j||E===r||_+y/2===j+v/2},Pd=function(s,p){var b;return Oa.some(function(_){var E=_[Rr].options.emptyInsertThreshold;if(!(!E||Ws(_))){var y=Je(_),j=s>=y.left-E&&s<=y.right+E,r=p>=y.top-E&&p<=y.bottom+E;if(j&&r)return b=_}}),b},ru=function(s){function p(E,y){return function(j,r,v,g){var w=j.options.group.name&&r.options.group.name&&j.options.group.name===r.options.group.name;if(E==null&&(y||w))return!0;if(E==null||E===!1)return!1;if(y&&E==="clone")return E;if(typeof E=="function")return p(E(j,r,v,g),y)(j,r,v,g);var k=(y?j:r).options.group.name;return E===!0||typeof E=="string"&&E===k||E.join&&E.indexOf(k)>-1}}var b={},_=s.group;(!_||wa(_)!="object")&&(_={name:_}),b.name=_.name,b.checkPull=p(_.pull,!0),b.checkPut=p(_.put),b.revertClone=_.revertClone,s.group=b},nu=function(){!tu&&Wt&&Ht(Wt,"display","none")},iu=function(){!tu&&Wt&&Ht(Wt,"display","")};Pa&&!Fc&&document.addEventListener("click",function(m){if(ja)return m.preventDefault(),m.stopPropagation&&m.stopPropagation(),m.stopImmediatePropagation&&m.stopImmediatePropagation(),ja=!1,!1},!0);var li=function(s){if(ht){s=s.touches?s.touches[0]:s;var p=Pd(s.clientX,s.clientY);if(p){var b={};for(var _ in s)s.hasOwnProperty(_)&&(b[_]=s[_]);b.target=b.rootEl=p,b.preventDefault=void 0,b.stopPropagation=void 0,p[Rr]._onDragOver(b)}}},Td=function(s){ht&&ht.parentNode[Rr]._isOutsideThisEl(s.target)};function Ft(m,s){if(!(m&&m.nodeType&&m.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(m));this.el=m,this.options=s=wn({},s),m[Rr]=this;var p={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(m.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return eu(m,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(y,j){y.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&&!Ho,emptyInsertThreshold:5};Vo.initializePlugins(this,m,p);for(var b in p)!(b in s)&&(s[b]=p[b]);ru(s);for(var _ in this)_.charAt(0)==="_"&&typeof this[_]=="function"&&(this[_]=this[_].bind(this));this.nativeDraggable=s.forceFallback?!1:Cd,this.nativeDraggable&&(this.options.touchStartThreshold=1),s.supportPointer?be(m,"pointerdown",this._onTapStart):(be(m,"mousedown",this._onTapStart),be(m,"touchstart",this._onTapStart)),this.nativeDraggable&&(be(m,"dragover",this),be(m,"dragenter",this)),Oa.push(this.el),s.store&&s.store.get&&this.sort(s.store.get(this)||[]),wn(this,xd())}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(s){!this.el.contains(s)&&s!==this.el&&(Ni=null)},_getDirection:function(s,p){return typeof this.options.direction=="function"?this.options.direction.call(this,s,p,ht):this.options.direction},_onTapStart:function(s){if(s.cancelable){var p=this,b=this.el,_=this.options,E=_.preventOnFilter,y=s.type,j=s.touches&&s.touches[0]||s.pointerType&&s.pointerType==="touch"&&s,r=(j||s).target,v=s.target.shadowRoot&&(s.path&&s.path[0]||s.composedPath&&s.composedPath()[0])||r,g=_.filter;if($d(b),!ht&&!(/mousedown|pointerdown/.test(y)&&s.button!==0||_.disabled)&&!v.isContentEditable&&!(!this.nativeDraggable&&Ho&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=Gr(r,_.draggable,b,!1),!(r&&r.animated)&&xa!==r)){if(Bi=$r(r),zo=$r(r,_.draggable),typeof g=="function"){if(g.call(this,s,r,this)){_r({sortable:p,rootEl:v,name:"filter",targetEl:r,toEl:b,fromEl:b}),Er("filter",p,{evt:s}),E&&s.cancelable&&s.preventDefault();return}}else if(g&&(g=g.split(",").some(function(w){if(w=Gr(v,w.trim(),b,!1),w)return _r({sortable:p,rootEl:w,name:"filter",targetEl:r,fromEl:b,toEl:b}),Er("filter",p,{evt:s}),!0}),g)){E&&s.cancelable&&s.preventDefault();return}_.handle&&!Gr(v,_.handle,b,!1)||this._prepareDragStart(s,j,r)}}},_prepareDragStart:function(s,p,b){var _=this,E=_.el,y=_.options,j=E.ownerDocument,r;if(b&&!ht&&b.parentNode===E){var v=Je(b);if(Ie=E,ht=b,Ve=ht.parentNode,ai=ht.nextSibling,xa=b,ka=y.group,Ft.dragged=ht,si={target:ht,clientX:(p||s).clientX,clientY:(p||s).clientY},Xc=si.clientX-v.left,Kc=si.clientY-v.top,this._lastX=(p||s).clientX,this._lastY=(p||s).clientY,ht.style["will-change"]="all",r=function(){if(Er("delayEnded",_,{evt:s}),Ft.eventCanceled){_._onDrop();return}_._disableDelayedDragEvents(),!Mc&&_.nativeDraggable&&(ht.draggable=!0),_._triggerDragStart(s,p),_r({sortable:_,name:"choose",originalEvent:s}),Lr(ht,y.chosenClass,!0)},y.ignore.split(",").forEach(function(g){Uc(ht,g.trim(),tl)}),be(j,"dragover",li),be(j,"mousemove",li),be(j,"touchmove",li),be(j,"mouseup",_._onDrop),be(j,"touchend",_._onDrop),be(j,"touchcancel",_._onDrop),Mc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),Er("delayStart",this,{evt:s}),y.delay&&(!y.delayOnTouchOnly||p)&&(!this.nativeDraggable||!(Mo||xn))){if(Ft.eventCanceled){this._onDrop();return}be(j,"mouseup",_._disableDelayedDrag),be(j,"touchend",_._disableDelayedDrag),be(j,"touchcancel",_._disableDelayedDrag),be(j,"mousemove",_._delayedDragTouchMoveHandler),be(j,"touchmove",_._delayedDragTouchMoveHandler),y.supportPointer&&be(j,"pointermove",_._delayedDragTouchMoveHandler),_._dragStartTimer=setTimeout(r,y.delay)}else r()}},_delayedDragTouchMoveHandler:function(s){var p=s.touches?s.touches[0]:s;Math.max(Math.abs(p.clientX-this._lastX),Math.abs(p.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ht&&tl(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var s=this.el.ownerDocument;he(s,"mouseup",this._disableDelayedDrag),he(s,"touchend",this._disableDelayedDrag),he(s,"touchcancel",this._disableDelayedDrag),he(s,"mousemove",this._delayedDragTouchMoveHandler),he(s,"touchmove",this._delayedDragTouchMoveHandler),he(s,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(s,p){p=p||s.pointerType=="touch"&&s,!this.nativeDraggable||p?this.options.supportPointer?be(document,"pointermove",this._onTouchMove):p?be(document,"touchmove",this._onTouchMove):be(document,"mousemove",this._onTouchMove):(be(ht,"dragend",this),be(Ie,"dragstart",this._onDragStart));try{document.selection?La(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(s,p){if(Di=!1,Ie&&ht){Er("dragStarted",this,{evt:p}),this.nativeDraggable&&be(document,"dragover",Td);var b=this.options;!s&&Lr(ht,b.dragClass,!1),Lr(ht,b.ghostClass,!0),Ft.active=this,s&&this._appendGhost(),_r({sortable:this,name:"start",originalEvent:p})}else this._nulling()},_emulateDragOver:function(){if(Wr){this._lastX=Wr.clientX,this._lastY=Wr.clientY,nu();for(var s=document.elementFromPoint(Wr.clientX,Wr.clientY),p=s;s&&s.shadowRoot&&(s=s.shadowRoot.elementFromPoint(Wr.clientX,Wr.clientY),s!==p);)p=s;if(ht.parentNode[Rr]._isOutsideThisEl(s),p)do{if(p[Rr]){var b=void 0;if(b=p[Rr]._onDragOver({clientX:Wr.clientX,clientY:Wr.clientY,target:s,rootEl:p}),b&&!this.options.dragoverBubble)break}s=p}while(p=p.parentNode);iu()}},_onTouchMove:function(s){if(si){var p=this.options,b=p.fallbackTolerance,_=p.fallbackOffset,E=s.touches?s.touches[0]:s,y=Wt&&Li(Wt,!0),j=Wt&&y&&y.a,r=Wt&&y&&y.d,v=Ta&&hr&&Gc(hr),g=(E.clientX-si.clientX+_.x)/(j||1)+(v?v[0]-Ks[0]:0)/(j||1),w=(E.clientY-si.clientY+_.y)/(r||1)+(v?v[1]-Ks[1]:0)/(r||1);if(!Ft.active&&!Di){if(b&&Math.max(Math.abs(E.clientX-this._lastX),Math.abs(E.clientY-this._lastY))<b)return;this._onDragStart(s,!0)}if(Wt){y?(y.e+=g-(Ys||0),y.f+=w-(Xs||0)):y={a:1,b:0,c:0,d:1,e:g,f:w};var k="matrix(".concat(y.a,",").concat(y.b,",").concat(y.c,",").concat(y.d,",").concat(y.e,",").concat(y.f,")");Ht(Wt,"webkitTransform",k),Ht(Wt,"mozTransform",k),Ht(Wt,"msTransform",k),Ht(Wt,"transform",k),Ys=g,Xs=w,Wr=E}s.cancelable&&s.preventDefault()}},_appendGhost:function(){if(!Wt){var s=this.options.fallbackOnBody?document.body:Ie,p=Je(ht,!0,Ta,!0,s),b=this.options;if(Ta){for(hr=s;Ht(hr,"position")==="static"&&Ht(hr,"transform")==="none"&&hr!==document;)hr=hr.parentNode;hr!==document.body&&hr!==document.documentElement?(hr===document&&(hr=nn()),p.top+=hr.scrollTop,p.left+=hr.scrollLeft):hr=nn(),Ks=Gc(hr)}Wt=ht.cloneNode(!0),Lr(Wt,b.ghostClass,!1),Lr(Wt,b.fallbackClass,!0),Lr(Wt,b.dragClass,!0),Ht(Wt,"transition",""),Ht(Wt,"transform",""),Ht(Wt,"box-sizing","border-box"),Ht(Wt,"margin",0),Ht(Wt,"top",p.top),Ht(Wt,"left",p.left),Ht(Wt,"width",p.width),Ht(Wt,"height",p.height),Ht(Wt,"opacity","0.8"),Ht(Wt,"position",Ta?"absolute":"fixed"),Ht(Wt,"zIndex","100000"),Ht(Wt,"pointerEvents","none"),Ft.ghost=Wt,s.appendChild(Wt),Ht(Wt,"transform-origin",Xc/parseInt(Wt.style.width)*100+"% "+Kc/parseInt(Wt.style.height)*100+"%")}},_onDragStart:function(s,p){var b=this,_=s.dataTransfer,E=b.options;if(Er("dragStart",this,{evt:s}),Ft.eventCanceled){this._onDrop();return}Er("setupClone",this),Ft.eventCanceled||(De=Jc(ht),De.removeAttribute("id"),De.draggable=!1,De.style["will-change"]="",this._hideClone(),Lr(De,this.options.chosenClass,!1),Ft.clone=De),b.cloneId=La(function(){Er("clone",b),!Ft.eventCanceled&&(b.options.removeCloneOnHide||Ie.insertBefore(De,ht),b._hideClone(),_r({sortable:b,name:"clone"}))}),!p&&Lr(ht,E.dragClass,!0),p?(ja=!0,b._loopId=setInterval(b._emulateDragOver,50)):(he(document,"mouseup",b._onDrop),he(document,"touchend",b._onDrop),he(document,"touchcancel",b._onDrop),_&&(_.effectAllowed="move",E.setData&&E.setData.call(b,_,ht)),be(document,"drop",b),Ht(ht,"transform","translateZ(0)")),Di=!0,b._dragStartId=La(b._dragStarted.bind(b,p,s)),be(document,"selectstart",b),Uo=!0,Ho&&Ht(document.body,"user-select","none")},_onDragOver:function(s){var p=this.el,b=s.target,_,E,y,j=this.options,r=j.group,v=Ft.active,g=ka===r,w=j.sort,k=sr||v,O,C=this,S=!1;if(Qs)return;function T(yt,ct){Er(yt,C,rn({evt:s,isOwner:g,axis:O?"vertical":"horizontal",revert:y,dragRect:_,targetRect:E,canSort:w,fromSortable:k,target:b,completed:R,onMove:function(At,Vt){return Aa(Ie,p,ht,_,At,Je(At),s,Vt)},changed:I},ct))}function A(){T("dragOverAnimationCapture"),C.captureAnimationState(),C!==k&&k.captureAnimationState()}function R(yt){return T("dragOverCompleted",{insertion:yt}),yt&&(g?v._hideClone():v._showClone(C),C!==k&&(Lr(ht,sr?sr.options.ghostClass:v.options.ghostClass,!1),Lr(ht,j.ghostClass,!0)),sr!==C&&C!==Ft.active?sr=C:C===Ft.active&&sr&&(sr=null),k===C&&(C._ignoreWhileAnimating=b),C.animateAll(function(){T("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==k&&(k.animateAll(),k._ignoreWhileAnimating=null)),(b===ht&&!ht.animated||b===p&&!b.animated)&&(Ni=null),!j.dragoverBubble&&!s.rootEl&&b!==document&&(ht.parentNode[Rr]._isOutsideThisEl(s.target),!yt&&li(s)),!j.dragoverBubble&&s.stopPropagation&&s.stopPropagation(),S=!0}function I(){Ir=$r(ht),Bn=$r(ht,j.draggable),_r({sortable:C,name:"change",toEl:p,newIndex:Ir,newDraggableIndex:Bn,originalEvent:s})}if(s.preventDefault!==void 0&&s.cancelable&&s.preventDefault(),b=Gr(b,j.draggable,p,!0),T("dragOver"),Ft.eventCanceled)return S;if(ht.contains(s.target)||b.animated&&b.animatingX&&b.animatingY||C._ignoreWhileAnimating===b)return R(!1);if(ja=!1,v&&!j.disabled&&(g?w||(y=Ve!==Ie):sr===this||(this.lastPutMode=ka.checkPull(this,v,ht,s))&&r.checkPut(this,v,ht,s))){if(O=this._getDirection(s,b)==="vertical",_=Je(ht),T("dragOverValid"),Ft.eventCanceled)return S;if(y)return Ve=Ie,A(),this._hideClone(),T("revert"),Ft.eventCanceled||(ai?Ie.insertBefore(ht,ai):Ie.appendChild(ht)),R(!0);var $=Ws(p,j.draggable);if(!$||Id(s,O,this)&&!$.animated){if($===ht)return R(!1);if($&&p===s.target&&(b=$),b&&(E=Je(b)),Aa(Ie,p,ht,_,b,E,s,!!b)!==!1)return A(),$&&$.nextSibling?p.insertBefore(ht,$.nextSibling):p.appendChild(ht),Ve=p,I(),R(!0)}else if($&&Rd(s,O,this)){var M=Ri(p,0,j,!0);if(M===ht)return R(!1);if(b=M,E=Je(b),Aa(Ie,p,ht,_,b,E,s,!1)!==!1)return A(),p.insertBefore(ht,M),Ve=p,I(),R(!0)}else if(b.parentNode===p){E=Je(b);var B=0,q,F=ht.parentNode!==p,N=!Sd(ht.animated&&ht.toRect||_,b.animated&&b.toRect||E,O),U=O?"top":"left",H=qc(b,"top","top")||qc(ht,"top","top"),X=H?H.scrollTop:void 0;Ni!==b&&(q=E[U],Go=!1,Ea=!N&&j.invertSwap||F),B=Bd(s,b,E,O,N?1:j.swapThreshold,j.invertedSwapThreshold==null?j.swapThreshold:j.invertedSwapThreshold,Ea,Ni===b);var Y;if(B!==0){var K=$r(ht);do K-=B,Y=Ve.children[K];while(Y&&(Ht(Y,"display")==="none"||Y===Wt))}if(B===0||Y===b)return R(!1);Ni=b,qo=B;var tt=b.nextElementSibling,it=!1;it=B===1;var st=Aa(Ie,p,ht,_,b,E,s,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),Qs=!0,setTimeout(Ld,30),A(),it&&!tt?p.appendChild(ht):b.parentNode.insertBefore(ht,it?tt:b),H&&Zc(H,0,X-H.scrollTop),Ve=ht.parentNode,q!==void 0&&!Ea&&(Ca=Math.abs(q-Je(b)[U])),I(),R(!0)}if(p.contains(ht))return R(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){he(document,"mousemove",this._onTouchMove),he(document,"touchmove",this._onTouchMove),he(document,"pointermove",this._onTouchMove),he(document,"dragover",li),he(document,"mousemove",li),he(document,"touchmove",li)},_offUpEvents:function(){var s=this.el.ownerDocument;he(s,"mouseup",this._onDrop),he(s,"touchend",this._onDrop),he(s,"pointerup",this._onDrop),he(s,"touchcancel",this._onDrop),he(document,"selectstart",this)},_onDrop:function(s){var p=this.el,b=this.options;if(Ir=$r(ht),Bn=$r(ht,b.draggable),Er("drop",this,{evt:s}),Ve=ht&&ht.parentNode,Ir=$r(ht),Bn=$r(ht,b.draggable),Ft.eventCanceled){this._nulling();return}Di=!1,Ea=!1,Go=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),el(this.cloneId),el(this._dragStartId),this.nativeDraggable&&(he(document,"drop",this),he(p,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ho&&Ht(document.body,"user-select",""),Ht(ht,"transform",""),s&&(Uo&&(s.cancelable&&s.preventDefault(),!b.dropBubble&&s.stopPropagation()),Wt&&Wt.parentNode&&Wt.parentNode.removeChild(Wt),(Ie===Ve||sr&&sr.lastPutMode!=="clone")&&De&&De.parentNode&&De.parentNode.removeChild(De),ht&&(this.nativeDraggable&&he(ht,"dragend",this),tl(ht),ht.style["will-change"]="",Uo&&!Di&&Lr(ht,sr?sr.options.ghostClass:this.options.ghostClass,!1),Lr(ht,this.options.chosenClass,!1),_r({sortable:this,name:"unchoose",toEl:Ve,newIndex:null,newDraggableIndex:null,originalEvent:s}),Ie!==Ve?(Ir>=0&&(_r({rootEl:Ve,name:"add",toEl:Ve,fromEl:Ie,originalEvent:s}),_r({sortable:this,name:"remove",toEl:Ve,originalEvent:s}),_r({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Ie,originalEvent:s}),_r({sortable:this,name:"sort",toEl:Ve,originalEvent:s})),sr&&sr.save()):Ir!==Bi&&Ir>=0&&(_r({sortable:this,name:"update",toEl:Ve,originalEvent:s}),_r({sortable:this,name:"sort",toEl:Ve,originalEvent:s})),Ft.active&&((Ir==null||Ir===-1)&&(Ir=Bi,Bn=zo),_r({sortable:this,name:"end",toEl:Ve,originalEvent:s}),this.save()))),this._nulling()},_nulling:function(){Er("nulling",this),Ie=ht=Ve=Wt=ai=De=xa=In=si=Wr=Uo=Ir=Bn=Bi=zo=Ni=qo=sr=ka=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,Sa.forEach(function(s){s.checked=!0}),Sa.length=Ys=Xs=0},handleEvent:function(s){switch(s.type){case"drop":case"dragend":this._onDrop(s);break;case"dragenter":case"dragover":ht&&(this._onDragOver(s),Ad(s));break;case"selectstart":s.preventDefault();break}},toArray:function(){for(var s=[],p,b=this.el.children,_=0,E=b.length,y=this.options;_<E;_++)p=b[_],Gr(p,y.draggable,this.el,!1)&&s.push(p.getAttribute(y.dataIdAttr)||Nd(p));return s},sort:function(s,p){var b={},_=this.el;this.toArray().forEach(function(E,y){var j=_.children[y];Gr(j,this.options.draggable,_,!1)&&(b[E]=j)},this),p&&this.captureAnimationState(),s.forEach(function(E){b[E]&&(_.removeChild(b[E]),_.appendChild(b[E]))}),p&&this.animateAll()},save:function(){var s=this.options.store;s&&s.set&&s.set(this)},closest:function(s,p){return Gr(s,p||this.options.draggable,this.el,!1)},option:function(s,p){var b=this.options;if(p===void 0)return b[s];var _=Vo.modifyOption(this,s,p);typeof _<"u"?b[s]=_:b[s]=p,s==="group"&&ru(b)},destroy:function(){Er("destroy",this);var s=this.el;s[Rr]=null,he(s,"mousedown",this._onTapStart),he(s,"touchstart",this._onTapStart),he(s,"pointerdown",this._onTapStart),this.nativeDraggable&&(he(s,"dragover",this),he(s,"dragenter",this)),Array.prototype.forEach.call(s.querySelectorAll("[draggable]"),function(p){p.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Oa.splice(Oa.indexOf(this.el),1),this.el=s=null},_hideClone:function(){if(!In){if(Er("hideClone",this),Ft.eventCanceled)return;Ht(De,"display","none"),this.options.removeCloneOnHide&&De.parentNode&&De.parentNode.removeChild(De),In=!0}},_showClone:function(s){if(s.lastPutMode!=="clone"){this._hideClone();return}if(In){if(Er("showClone",this),Ft.eventCanceled)return;ht.parentNode==Ie&&!this.options.group.revertClone?Ie.insertBefore(De,ht):ai?Ie.insertBefore(De,ai):Ie.appendChild(De),this.options.group.revertClone&&this.animate(ht,De),Ht(De,"display",""),In=!1}}};function Ad(m){m.dataTransfer&&(m.dataTransfer.dropEffect="move"),m.cancelable&&m.preventDefault()}function Aa(m,s,p,b,_,E,y,j){var r,v=m[Rr],g=v.options.onMove,w;return window.CustomEvent&&!xn&&!Mo?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=s,r.from=m,r.dragged=p,r.draggedRect=b,r.related=_||s,r.relatedRect=E||Je(s),r.willInsertAfter=j,r.originalEvent=y,m.dispatchEvent(r),g&&(w=g.call(v,r,y)),w}function tl(m){m.draggable=!1}function Ld(){Qs=!1}function Rd(m,s,p){var b=Je(Ri(p.el,0,p.options,!0)),_=Yc(p.el,p.options,Wt),E=10;return s?m.clientX<_.left-E||m.clientY<b.top&&m.clientX<b.right:m.clientY<_.top-E||m.clientY<b.bottom&&m.clientX<b.left}function Id(m,s,p){var b=Je(Ws(p.el,p.options.draggable)),_=Yc(p.el,p.options,Wt),E=10;return s?m.clientX>_.right+E||m.clientY>b.bottom&&m.clientX>b.left:m.clientY>_.bottom+E||m.clientX>b.right&&m.clientY>b.top}function Bd(m,s,p,b,_,E,y,j){var r=b?m.clientY:m.clientX,v=b?p.height:p.width,g=b?p.top:p.left,w=b?p.bottom:p.right,k=!1;if(!y){if(j&&Ca<v*_){if(!Go&&(qo===1?r>g+v*E/2:r<w-v*E/2)&&(Go=!0),Go)k=!0;else if(qo===1?r<g+Ca:r>w-Ca)return-qo}else if(r>g+v*(1-_)/2&&r<w-v*(1-_)/2)return Dd(s)}return k=k||y,k&&(r<g+v*E/2||r>w-v*E/2)?r>g+v/2?1:-1:0}function Dd(m){return $r(ht)<$r(m)?1:-1}function Nd(m){for(var s=m.tagName+m.className+m.src+m.href+m.textContent,p=s.length,b=0;p--;)b+=s.charCodeAt(p);return b.toString(36)}function $d(m){Sa.length=0;for(var s=m.getElementsByTagName("input"),p=s.length;p--;){var b=s[p];b.checked&&Sa.push(b)}}function La(m){return setTimeout(m,0)}function el(m){return clearTimeout(m)}Pa&&be(document,"touchmove",function(m){(Ft.active||Di)&&m.cancelable&&m.preventDefault()}),Ft.utils={on:be,off:he,css:Ht,find:Uc,is:function(s,p){return!!Gr(s,p,s,!1)},extend:wd,throttle:Wc,closest:Gr,toggleClass:Lr,clone:Jc,index:$r,nextTick:La,cancelNextTick:el,detectDirection:eu,getChild:Ri},Ft.get=function(m){return m[Rr]},Ft.mount=function(){for(var m=arguments.length,s=new Array(m),p=0;p<m;p++)s[p]=arguments[p];s[0].constructor===Array&&(s=s[0]),s.forEach(function(b){if(!b.prototype||!b.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(b));b.utils&&(Ft.utils=rn(rn({},Ft.utils),b.utils)),Vo.mount(b)})},Ft.create=function(m,s){return new Ft(m,s)},Ft.version=bd;var Ye=[],Wo,rl,nl=!1,il,ol,Ra,Zo;function Md(){function m(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this))}return m.prototype={dragStarted:function(p){var b=p.originalEvent;this.sortable.nativeDraggable?be(document,"dragover",this._handleAutoScroll):this.options.supportPointer?be(document,"pointermove",this._handleFallbackAutoScroll):b.touches?be(document,"touchmove",this._handleFallbackAutoScroll):be(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(p){var b=p.originalEvent;!this.options.dragOverBubble&&!b.rootEl&&this._handleAutoScroll(b)},drop:function(){this.sortable.nativeDraggable?he(document,"dragover",this._handleAutoScroll):(he(document,"pointermove",this._handleFallbackAutoScroll),he(document,"touchmove",this._handleFallbackAutoScroll),he(document,"mousemove",this._handleFallbackAutoScroll)),ou(),Ia(),_d()},nulling:function(){Ra=rl=Wo=nl=Zo=il=ol=null,Ye.length=0},_handleFallbackAutoScroll:function(p){this._handleAutoScroll(p,!0)},_handleAutoScroll:function(p,b){var _=this,E=(p.touches?p.touches[0]:p).clientX,y=(p.touches?p.touches[0]:p).clientY,j=document.elementFromPoint(E,y);if(Ra=p,b||this.options.forceAutoScrollFallback||Mo||xn||Ho){al(p,this.options,j,b);var r=Rn(j,!0);nl&&(!Zo||E!==il||y!==ol)&&(Zo&&ou(),Zo=setInterval(function(){var v=Rn(document.elementFromPoint(E,y),!0);v!==r&&(r=v,Ia()),al(p,_.options,v,b)},10),il=E,ol=y)}else{if(!this.options.bubbleScroll||Rn(j,!0)===nn()){Ia();return}al(p,this.options,Rn(j,!1),!1)}}},wn(m,{pluginName:"scroll",initializeByDefault:!0})}function Ia(){Ye.forEach(function(m){clearInterval(m.pid)}),Ye=[]}function ou(){clearInterval(Zo)}var al=Wc(function(m,s,p,b){if(s.scroll){var _=(m.touches?m.touches[0]:m).clientX,E=(m.touches?m.touches[0]:m).clientY,y=s.scrollSensitivity,j=s.scrollSpeed,r=nn(),v=!1,g;rl!==p&&(rl=p,Ia(),Wo=s.scroll,g=s.scrollFn,Wo===!0&&(Wo=Rn(p,!0)));var w=0,k=Wo;do{var O=k,C=Je(O),S=C.top,T=C.bottom,A=C.left,R=C.right,I=C.width,$=C.height,M=void 0,B=void 0,q=O.scrollWidth,F=O.scrollHeight,N=Ht(O),U=O.scrollLeft,H=O.scrollTop;O===r?(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"));var X=M&&(Math.abs(R-_)<=y&&U+I<q)-(Math.abs(A-_)<=y&&!!U),Y=B&&(Math.abs(T-E)<=y&&H+$<F)-(Math.abs(S-E)<=y&&!!H);if(!Ye[w])for(var K=0;K<=w;K++)Ye[K]||(Ye[K]={});(Ye[w].vx!=X||Ye[w].vy!=Y||Ye[w].el!==O)&&(Ye[w].el=O,Ye[w].vx=X,Ye[w].vy=Y,clearInterval(Ye[w].pid),(X!=0||Y!=0)&&(v=!0,Ye[w].pid=setInterval((function(){b&&this.layer===0&&Ft.active._onTouchMove(Ra);var tt=Ye[this.layer].vy?Ye[this.layer].vy*j:0,it=Ye[this.layer].vx?Ye[this.layer].vx*j:0;typeof g=="function"&&g.call(Ft.dragged.parentNode[Rr],it,tt,m,Ra,Ye[this.layer].el)!=="continue"||Zc(Ye[this.layer].el,it,tt)}).bind({layer:w}),24))),w++}while(s.bubbleScroll&&k!==r&&(k=Rn(k,!1)));nl=v}},30),au=function(s){var p=s.originalEvent,b=s.putSortable,_=s.dragEl,E=s.activeSortable,y=s.dispatchSortableEvent,j=s.hideGhostForTarget,r=s.unhideGhostForTarget;if(p){var v=b||E;j();var g=p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p,w=document.elementFromPoint(g.clientX,g.clientY);r(),v&&!v.el.contains(w)&&(y("spill"),this.onSpill({dragEl:_,putSortable:b}))}};function sl(){}sl.prototype={startIndex:null,dragStart:function(s){var p=s.oldDraggableIndex;this.startIndex=p},onSpill:function(s){var p=s.dragEl,b=s.putSortable;this.sortable.captureAnimationState(),b&&b.captureAnimationState();var _=Ri(this.sortable.el,this.startIndex,this.options);_?this.sortable.el.insertBefore(p,_):this.sortable.el.appendChild(p),this.sortable.animateAll(),b&&b.animateAll()},drop:au},wn(sl,{pluginName:"revertOnSpill"});function ll(){}ll.prototype={onSpill:function(s){var p=s.dragEl,b=s.putSortable,_=b||this.sortable;_.captureAnimationState(),p.parentNode&&p.parentNode.removeChild(p),_.animateAll()},drop:au},wn(ll,{pluginName:"removeOnSpill"}),Ft.mount(new Md),Ft.mount(ll,sl);const Hd=m=>{const s=m.item;let p=Array.prototype.slice.call(s.parentNode.childNodes);return p=p.filter(b=>b.nodeType!=Node.ELEMENT_NODE||!b.classList.contains("sortable-fallback")),p},Fd=(m,s,p,b,_,E)=>{const j=m.item.parentNode;for(const S of p)j.appendChild(S);if(m.oldIndex==m.newIndex)return;const r=b.getArray(),v=m.item.querySelector("eox-layercontrol-layer").layer.get(_),g=r.find(S=>S.get(_)===v),w=E.dataset.layer,k=r.find(S=>S.get(_)==w);let O,C;for(O=0;O<r.length;O++)if(r[O]==g){b.removeAt(O);break}for(C=0;C<r.length;C++)if(r[C]===k){O>C?b.insertAt(C,g):b.insertAt(C+1,g);break}s.requestUpdate()};function Vd(m,s,p,b){let _=[],E=null;m._sortable=Ft.create(m,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:y=>_=Hd(y),onMove:y=>{E=y.related},onEnd:y=>Fd(y,b,_,s,p,E)})}function zd(m,s,p,b){const _=m.getArray();let E=!1;_.forEach(y=>{const j=y.ol_uid;y.get(s)||(y.set(s,j),E=!0),y.get(p)||(y.set(p,`layer ${j}`),E=!0),E&&b.requestUpdate()})}function cl(m,s,p){let b=[];const _=(E,y,j)=>{b=[...b,...E.filter(v=>v.get(y)===j)];const r=E.filter(v=>v.getLayers);return r.length>0&&r.forEach(v=>_(v.getLayers().getArray(),y,j)),b};return _(m,s,p),b}function Ud(m,s,p){if(!m||!s)return!1;if(!su(m,p))return!0;const b=m.get("minZoom"),_=m.get("maxZoom"),E=s.getView().getZoom();return E>b&&E<_}function su(m,s){const p=m.get("minZoom"),b=m.get("maxZoom");return!!(s&&(p!==-1/0||b!==1/0))}function qd(m,s){var _,E,y;return!m||!s?void 0:m.getLayers?"group":((y=(_=s.getInteractions().getArray().filter(j=>j.freehand_!==void 0).map(j=>j.source_))==null?void 0:_.ol_uid)==null?void 0:y.includes(m.getSource?(E=m.getSource())==null?void 0:E.ol_uid:void 0))?"draw":m.declutter_!==void 0?"vector":"raster"}function lu(m,s){var b;let p={};for(const _ in m){const E=m[_].type;if(E&&E!=="object")p[_]=E==="number"?Number(s[_]):s[_];else if(typeof m[_]=="object"&&((b=m[_])!=null&&b.properties)){const y=lu(m[_].properties,s);Object.keys(y).length>0&&(p[_]=y)}}return p}function Gd(m,s){var E;if(!s||!m.getSource().getTileUrlFunction())return null;const p=new URL(m.getSource().getTileUrlFunction()([0,0,0])),b=Object.fromEntries(p.searchParams.entries()),_=lu(((E=s.schema)==null?void 0:E.properties)||s.schema,b);return Object.keys(_).length?_:null}const Wd=(m,s)=>m==null?void 0:m.filter(p=>["remove","sort"].filter(b=>s!=null&&s.get("layerControlDisable")?b!=="sort":!0).includes(p)),Zd=(m,s)=>m==null?void 0:m.filter(p=>{let b=!0;return["remove","sort"].includes(p)&&(b=!1),p==="info"&&(b=s.get("description")),p==="config"&&(b=s.get("layerConfig")),b}),Jd=(m,s)=>ae`
|
|
46
|
-
<button slot="${
|
|
47
|
-
`,
|
|
45
|
+
*/function Dn(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,i)}return e}function ae(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Dn(Object(e),!0).forEach(function(i){Ul(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Dn(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Di(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Di=function(t){return typeof t}:Di=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(n)}function Ul(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function pe(){return pe=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},pe.apply(this,arguments)}function ql(n,t){if(n==null)return{};var e={},i=Object.keys(n),s,r;for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&(e[s]=n[s]);return e}function Gl(n,t){if(n==null)return{};var e=ql(n,t),i,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var Zl="1.15.2";function fe(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var me=fe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),fi=fe(/Edge/i),Nn=fe(/firefox/i),mi=fe(/safari/i)&&!fe(/chrome/i)&&!fe(/android/i),Mn=fe(/iP(ad|od|hone)/i),Hn=fe(/chrome/i)&&fe(/android/i),Vn={capture:!1,passive:!1};function J(n,t,e){n.addEventListener(t,e,!me&&Vn)}function Z(n,t,e){n.removeEventListener(t,e,!me&&Vn)}function Ni(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function Wl(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function ie(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Ni(n,t):Ni(n,t))||i&&n===e)return n;if(n===e)break}while(n=Wl(n))}return null}var Fn=/\s+/g;function qt(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Fn," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Fn," ")}}function P(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function ze(n,t){var e="";if(typeof n=="string")e=n;else do{var i=P(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(e)}function zn(n,t,e){if(n){var i=n.getElementsByTagName(t),s=0,r=i.length;if(e)for(;s<r;s++)e(i[s],s);return i}return[]}function le(){var n=document.scrollingElement;return n||document.documentElement}function bt(n,t,e,i,s){if(!(!n.getBoundingClientRect&&n!==window)){var r,o,a,l,d,h,u;if(n!==window&&n.parentNode&&n!==le()?(r=n.getBoundingClientRect(),o=r.top,a=r.left,l=r.bottom,d=r.right,h=r.height,u=r.width):(o=0,a=0,l=window.innerHeight,d=window.innerWidth,h=window.innerHeight,u=window.innerWidth),(t||e)&&n!==window&&(s=s||n.parentNode,!me))do if(s&&s.getBoundingClientRect&&(P(s,"transform")!=="none"||e&&P(s,"position")!=="static")){var g=s.getBoundingClientRect();o-=g.top+parseInt(P(s,"border-top-width")),a-=g.left+parseInt(P(s,"border-left-width")),l=o+r.height,d=a+r.width;break}while(s=s.parentNode);if(i&&n!==window){var m=ze(s||n),y=m&&m.a,w=m&&m.d;m&&(o/=w,a/=y,u/=y,h/=w,l=o+h,d=a+u)}return{top:o,left:a,bottom:l,right:d,width:u,height:h}}}function Un(n,t,e){for(var i=we(n,!0),s=bt(n)[t];i;){var r=bt(i)[e],o=void 0;if(e==="top"||e==="left"?o=s>=r:o=s<=r,!o)return i;if(i===le())break;i=we(i,!1)}return!1}function Ue(n,t,e,i){for(var s=0,r=0,o=n.children;r<o.length;){if(o[r].style.display!=="none"&&o[r]!==O.ghost&&(i||o[r]!==O.dragged)&&ie(o[r],e.draggable,n,!1)){if(s===t)return o[r];s++}r++}return null}function sr(n,t){for(var e=n.lastElementChild;e&&(e===O.ghost||P(e,"display")==="none"||t&&!Ni(e,t));)e=e.previousElementSibling;return e||null}function Kt(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==O.clone&&(!t||Ni(n,t))&&e++;return e}function qn(n){var t=0,e=0,i=le();if(n)do{var s=ze(n),r=s.a,o=s.d;t+=n.scrollLeft*r,e+=n.scrollTop*o}while(n!==i&&(n=n.parentNode));return[t,e]}function Yl(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n[e][i])return Number(e)}return-1}function we(n,t){if(!n||!n.getBoundingClientRect)return le();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var s=P(e);if(e.clientWidth<e.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return le();if(i||t)return e;i=!0}}while(e=e.parentNode);return le()}function Xl(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function rr(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var gi;function Gn(n,t){return function(){if(!gi){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),gi=setTimeout(function(){gi=void 0},t)}}}function Jl(){clearTimeout(gi),gi=void 0}function Zn(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function Wn(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function Yn(n,t,e){var i={};return Array.from(n.children).forEach(function(s){var r,o,a,l;if(!(!ie(s,t.draggable,n,!1)||s.animated||s===e)){var d=bt(s);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,d.left),i.top=Math.min((o=i.top)!==null&&o!==void 0?o:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var Gt="Sortable"+new Date().getTime();function Ql(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(s){if(!(P(s,"display")==="none"||s===O.ghost)){n.push({target:s,rect:bt(s)});var r=ae({},n[n.length-1].rect);if(s.thisAnimationDuration){var o=ze(s,!0);o&&(r.top-=o.f,r.left-=o.e)}s.fromRect=r}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(Yl(n,{target:i}),1)},animateAll:function(i){var s=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,o=0;n.forEach(function(a){var l=0,d=a.target,h=d.fromRect,u=bt(d),g=d.prevFromRect,m=d.prevToRect,y=a.rect,w=ze(d,!0);w&&(u.top-=w.f,u.left-=w.e),d.toRect=u,d.thisAnimationDuration&&rr(g,u)&&!rr(h,u)&&(y.top-u.top)/(y.left-u.left)===(h.top-u.top)/(h.left-u.left)&&(l=td(y,g,m,s.options)),rr(u,h)||(d.prevFromRect=h,d.prevToRect=u,l||(l=s.options.animation),s.animate(d,y,u,l)),l&&(r=!0,o=Math.max(o,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},o):typeof i=="function"&&i(),n=[]},animate:function(i,s,r,o){if(o){P(i,"transition",""),P(i,"transform","");var a=ze(this.el),l=a&&a.a,d=a&&a.d,h=(s.left-r.left)/(l||1),u=(s.top-r.top)/(d||1);i.animatingX=!!h,i.animatingY=!!u,P(i,"transform","translate3d("+h+"px,"+u+"px,0)"),this.forRepaintDummy=Kl(i),P(i,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),P(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){P(i,"transition",""),P(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},o)}}}}function Kl(n){return n.offsetWidth}function td(n,t,e,i){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var qe=[],nr={initializeByDefault:!0},bi={mount:function(t){for(var e in nr)nr.hasOwnProperty(e)&&!(e in t)&&(t[e]=nr[e]);qe.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),qe.push(t)},pluginEvent:function(t,e,i){var s=this;this.eventCanceled=!1,i.cancel=function(){s.eventCanceled=!0};var r=t+"Global";qe.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][r]&&e[o.pluginName][r](ae({sortable:e},i)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](ae({sortable:e},i)))})},initializePlugins:function(t,e,i,s){qe.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,e,t.options);d.sortable=t,d.options=t.options,t[l]=d,pe(i,d.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var o=this.modifyOption(t,r,t.options[r]);typeof o<"u"&&(t.options[r]=o)}},getEventProperties:function(t,e){var i={};return qe.forEach(function(s){typeof s.eventProperties=="function"&&pe(i,s.eventProperties.call(e[s.pluginName],t))}),i},modifyOption:function(t,e,i){var s;return qe.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(s=r.optionListeners[e].call(t[r.pluginName],i))}),s}};function ed(n){var t=n.sortable,e=n.rootEl,i=n.name,s=n.targetEl,r=n.cloneEl,o=n.toEl,a=n.fromEl,l=n.oldIndex,d=n.newIndex,h=n.oldDraggableIndex,u=n.newDraggableIndex,g=n.originalEvent,m=n.putSortable,y=n.extraEventProperties;if(t=t||e&&e[Gt],!!t){var w,A=t.options,et="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!me&&!fi?w=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(w=document.createEvent("Event"),w.initEvent(i,!0,!0)),w.to=o||e,w.from=a||e,w.item=s||e,w.clone=r,w.oldIndex=l,w.newIndex=d,w.oldDraggableIndex=h,w.newDraggableIndex=u,w.originalEvent=g,w.pullMode=m?m.lastPutMode:void 0;var W=ae(ae({},y),bi.getEventProperties(i,t));for(var _t in W)w[_t]=W[_t];e&&e.dispatchEvent(w),A[et]&&A[et].call(t,w)}}var id=["evt"],Vt=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.evt,r=Gl(i,id);bi.pluginEvent.bind(O)(t,e,ae({dragEl:x,parentEl:ct,ghostEl:D,rootEl:lt,nextEl:$e,lastDownEl:Mi,cloneEl:dt,cloneHidden:xe,dragStarted:_i,putSortable:Pt,activeSortable:O.active,originalEvent:s,oldIndex:Ge,oldDraggableIndex:yi,newIndex:Zt,newDraggableIndex:Ce,hideGhostForTarget:io,unhideGhostForTarget:so,cloneNowHidden:function(){xe=!0},cloneNowShown:function(){xe=!1},dispatchSortableEvent:function(a){Nt({sortable:e,name:a,originalEvent:s})}},r))};function Nt(n){ed(ae({putSortable:Pt,cloneEl:dt,targetEl:x,rootEl:lt,oldIndex:Ge,oldDraggableIndex:yi,newIndex:Zt,newDraggableIndex:Ce},n))}var x,ct,D,lt,$e,Mi,dt,xe,Ge,Zt,yi,Ce,Hi,Pt,Ze=!1,Vi=!1,Fi=[],Pe,se,or,ar,Xn,Jn,_i,We,vi,wi=!1,zi=!1,Ui,It,lr=[],dr=!1,qi=[],Gi=typeof document<"u",Zi=Mn,Qn=fi||me?"cssFloat":"float",sd=Gi&&!Hn&&!Mn&&"draggable"in document.createElement("div"),Kn=function(){if(Gi){if(me)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),to=function(t,e){var i=P(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=Ue(t,0,e),o=Ue(t,1,e),a=r&&P(r),l=o&&P(o),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+bt(r).width,h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+bt(o).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=s&&i[Qn]==="none"||o&&i[Qn]==="none"&&d+h>s)?"vertical":"horizontal"},rd=function(t,e,i){var s=i?t.left:t.top,r=i?t.right:t.bottom,o=i?t.width:t.height,a=i?e.left:e.top,l=i?e.right:e.bottom,d=i?e.width:e.height;return s===a||r===l||s+o/2===a+d/2},nd=function(t,e){var i;return Fi.some(function(s){var r=s[Gt].options.emptyInsertThreshold;if(!(!r||sr(s))){var o=bt(s),a=t>=o.left-r&&t<=o.right+r,l=e>=o.top-r&&e<=o.bottom+r;if(a&&l)return i=s}}),i},eo=function(t){function e(r,o){return function(a,l,d,h){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(o||u))return!0;if(r==null||r===!1)return!1;if(o&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,d,h),o)(a,l,d,h);var g=(o?a:l).options.group.name;return r===!0||typeof r=="string"&&r===g||r.join&&r.indexOf(g)>-1}}var i={},s=t.group;(!s||Di(s)!="object")&&(s={name:s}),i.name=s.name,i.checkPull=e(s.pull,!0),i.checkPut=e(s.put),i.revertClone=s.revertClone,t.group=i},io=function(){!Kn&&D&&P(D,"display","none")},so=function(){!Kn&&D&&P(D,"display","")};Gi&&!Hn&&document.addEventListener("click",function(n){if(Vi)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Vi=!1,!1},!0);var Oe=function(t){if(x){t=t.touches?t.touches[0]:t;var e=nd(t.clientX,t.clientY);if(e){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Gt]._onDragOver(i)}}},od=function(t){x&&x.parentNode[Gt]._isOutsideThisEl(t.target)};function O(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=pe({},t),n[Gt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return to(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.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:O.supportPointer!==!1&&"PointerEvent"in window&&!mi,emptyInsertThreshold:5};bi.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);eo(t);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=t.forceFallback?!1:sd,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?J(n,"pointerdown",this._onTapStart):(J(n,"mousedown",this._onTapStart),J(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(J(n,"dragover",this),J(n,"dragenter",this)),Fi.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),pe(this,Ql())}O.prototype={constructor:O,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(We=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,x):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,s=this.options,r=s.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,h=s.filter;if(fd(i),!x&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||s.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&mi&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ie(l,s.draggable,i,!1),!(l&&l.animated)&&Mi!==l)){if(Ge=Kt(l),yi=Kt(l,s.draggable),typeof h=="function"){if(h.call(this,t,l,this)){Nt({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),Vt("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(u){if(u=ie(d,u.trim(),i,!1),u)return Nt({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:i,toEl:i}),Vt("filter",e,{evt:t}),!0}),h)){r&&t.cancelable&&t.preventDefault();return}s.handle&&!ie(d,s.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var s=this,r=s.el,o=s.options,a=r.ownerDocument,l;if(i&&!x&&i.parentNode===r){var d=bt(i);if(lt=r,x=i,ct=x.parentNode,$e=x.nextSibling,Mi=i,Hi=o.group,O.dragged=x,Pe={target:x,clientX:(e||t).clientX,clientY:(e||t).clientY},Xn=Pe.clientX-d.left,Jn=Pe.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,x.style["will-change"]="all",l=function(){if(Vt("delayEnded",s,{evt:t}),O.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!Nn&&s.nativeDraggable&&(x.draggable=!0),s._triggerDragStart(t,e),Nt({sortable:s,name:"choose",originalEvent:t}),qt(x,o.chosenClass,!0)},o.ignore.split(",").forEach(function(h){zn(x,h.trim(),hr)}),J(a,"dragover",Oe),J(a,"mousemove",Oe),J(a,"touchmove",Oe),J(a,"mouseup",s._onDrop),J(a,"touchend",s._onDrop),J(a,"touchcancel",s._onDrop),Nn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,x.draggable=!0),Vt("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(fi||me))){if(O.eventCanceled){this._onDrop();return}J(a,"mouseup",s._disableDelayedDrag),J(a,"touchend",s._disableDelayedDrag),J(a,"touchcancel",s._disableDelayedDrag),J(a,"mousemove",s._delayedDragTouchMoveHandler),J(a,"touchmove",s._delayedDragTouchMoveHandler),o.supportPointer&&J(a,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){x&&hr(x),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._disableDelayedDrag),Z(t,"touchend",this._disableDelayedDrag),Z(t,"touchcancel",this._disableDelayedDrag),Z(t,"mousemove",this._delayedDragTouchMoveHandler),Z(t,"touchmove",this._delayedDragTouchMoveHandler),Z(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?J(document,"pointermove",this._onTouchMove):e?J(document,"touchmove",this._onTouchMove):J(document,"mousemove",this._onTouchMove):(J(x,"dragend",this),J(lt,"dragstart",this._onDragStart));try{document.selection?Yi(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Ze=!1,lt&&x){Vt("dragStarted",this,{evt:e}),this.nativeDraggable&&J(document,"dragover",od);var i=this.options;!t&&qt(x,i.dragClass,!1),qt(x,i.ghostClass,!0),O.active=this,t&&this._appendGhost(),Nt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(se){this._lastX=se.clientX,this._lastY=se.clientY,io();for(var t=document.elementFromPoint(se.clientX,se.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(se.clientX,se.clientY),t!==e);)e=t;if(x.parentNode[Gt]._isOutsideThisEl(t),e)do{if(e[Gt]){var i=void 0;if(i=e[Gt]._onDragOver({clientX:se.clientX,clientY:se.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);so()}},_onTouchMove:function(t){if(Pe){var e=this.options,i=e.fallbackTolerance,s=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=D&&ze(D,!0),a=D&&o&&o.a,l=D&&o&&o.d,d=Zi&&It&&qn(It),h=(r.clientX-Pe.clientX+s.x)/(a||1)+(d?d[0]-lr[0]:0)/(a||1),u=(r.clientY-Pe.clientY+s.y)/(l||1)+(d?d[1]-lr[1]:0)/(l||1);if(!O.active&&!Ze){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(D){o?(o.e+=h-(or||0),o.f+=u-(ar||0)):o={a:1,b:0,c:0,d:1,e:h,f:u};var g="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");P(D,"webkitTransform",g),P(D,"mozTransform",g),P(D,"msTransform",g),P(D,"transform",g),or=h,ar=u,se=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!D){var t=this.options.fallbackOnBody?document.body:lt,e=bt(x,!0,Zi,!0,t),i=this.options;if(Zi){for(It=t;P(It,"position")==="static"&&P(It,"transform")==="none"&&It!==document;)It=It.parentNode;It!==document.body&&It!==document.documentElement?(It===document&&(It=le()),e.top+=It.scrollTop,e.left+=It.scrollLeft):It=le(),lr=qn(It)}D=x.cloneNode(!0),qt(D,i.ghostClass,!1),qt(D,i.fallbackClass,!0),qt(D,i.dragClass,!0),P(D,"transition",""),P(D,"transform",""),P(D,"box-sizing","border-box"),P(D,"margin",0),P(D,"top",e.top),P(D,"left",e.left),P(D,"width",e.width),P(D,"height",e.height),P(D,"opacity","0.8"),P(D,"position",Zi?"absolute":"fixed"),P(D,"zIndex","100000"),P(D,"pointerEvents","none"),O.ghost=D,t.appendChild(D),P(D,"transform-origin",Xn/parseInt(D.style.width)*100+"% "+Jn/parseInt(D.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,s=t.dataTransfer,r=i.options;if(Vt("dragStart",this,{evt:t}),O.eventCanceled){this._onDrop();return}Vt("setupClone",this),O.eventCanceled||(dt=Wn(x),dt.removeAttribute("id"),dt.draggable=!1,dt.style["will-change"]="",this._hideClone(),qt(dt,this.options.chosenClass,!1),O.clone=dt),i.cloneId=Yi(function(){Vt("clone",i),!O.eventCanceled&&(i.options.removeCloneOnHide||lt.insertBefore(dt,x),i._hideClone(),Nt({sortable:i,name:"clone"}))}),!e&&qt(x,r.dragClass,!0),e?(Vi=!0,i._loopId=setInterval(i._emulateDragOver,50)):(Z(document,"mouseup",i._onDrop),Z(document,"touchend",i._onDrop),Z(document,"touchcancel",i._onDrop),s&&(s.effectAllowed="move",r.setData&&r.setData.call(i,s,x)),J(document,"drop",i),P(x,"transform","translateZ(0)")),Ze=!0,i._dragStartId=Yi(i._dragStarted.bind(i,e,t)),J(document,"selectstart",i),_i=!0,mi&&P(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,s,r,o,a=this.options,l=a.group,d=O.active,h=Hi===l,u=a.sort,g=Pt||d,m,y=this,w=!1;if(dr)return;function A(Re,Sr){Vt(Re,y,ae({evt:t,isOwner:h,axis:m?"vertical":"horizontal",revert:o,dragRect:s,targetRect:r,canSort:u,fromSortable:g,target:i,completed:W,onMove:function(Ss,Tr){return Wi(lt,e,x,s,Ss,bt(Ss),t,Tr)},changed:_t},Sr))}function et(){A("dragOverAnimationCapture"),y.captureAnimationState(),y!==g&&g.captureAnimationState()}function W(Re){return A("dragOverCompleted",{insertion:Re}),Re&&(h?d._hideClone():d._showClone(y),y!==g&&(qt(x,Pt?Pt.options.ghostClass:d.options.ghostClass,!1),qt(x,a.ghostClass,!0)),Pt!==y&&y!==O.active?Pt=y:y===O.active&&Pt&&(Pt=null),g===y&&(y._ignoreWhileAnimating=i),y.animateAll(function(){A("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(i===x&&!x.animated||i===e&&!i.animated)&&(We=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(x.parentNode[Gt]._isOutsideThisEl(t.target),!Re&&Oe(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),w=!0}function _t(){Zt=Kt(x),Ce=Kt(x,a.draggable),Nt({sortable:y,name:"change",toEl:e,newIndex:Zt,newDraggableIndex:Ce,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ie(i,a.draggable,e,!0),A("dragOver"),O.eventCanceled)return w;if(x.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||y._ignoreWhileAnimating===i)return W(!1);if(Vi=!1,d&&!a.disabled&&(h?u||(o=ct!==lt):Pt===this||(this.lastPutMode=Hi.checkPull(this,d,x,t))&&l.checkPut(this,d,x,t))){if(m=this._getDirection(t,i)==="vertical",s=bt(x),A("dragOverValid"),O.eventCanceled)return w;if(o)return ct=lt,et(),this._hideClone(),A("revert"),O.eventCanceled||($e?lt.insertBefore(x,$e):lt.appendChild(x)),W(!0);var pt=sr(e,a.draggable);if(!pt||hd(t,m,this)&&!pt.animated){if(pt===x)return W(!1);if(pt&&e===t.target&&(i=pt),i&&(r=bt(i)),Wi(lt,e,x,s,i,r,t,!!i)!==!1)return et(),pt&&pt.nextSibling?e.insertBefore(x,pt.nextSibling):e.appendChild(x),ct=e,_t(),W(!0)}else if(pt&&dd(t,m,this)){var kt=Ue(e,0,a,!0);if(kt===x)return W(!1);if(i=kt,r=bt(i),Wi(lt,e,x,s,i,r,t,!1)!==!1)return et(),e.insertBefore(x,kt),ct=e,_t(),W(!0)}else if(i.parentNode===e){r=bt(i);var H=0,ut,Rt=x.parentNode!==e,ot=!rd(x.animated&&x.toRect||s,i.animated&&i.toRect||r,m),T=m?"top":"left",N=Un(i,"top","top")||Un(x,"top","top"),xt=N?N.scrollTop:void 0;We!==i&&(ut=r[T],wi=!1,zi=!ot&&a.invertSwap||Rt),H=cd(t,i,r,m,ot?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,zi,We===i);var Ct;if(H!==0){var St=Kt(x);do St-=H,Ct=ct.children[St];while(Ct&&(P(Ct,"display")==="none"||Ct===D))}if(H===0||Ct===i)return W(!1);We=i,vi=H;var Xt=i.nextElementSibling,Jt=!1;Jt=H===1;var Ke=Wi(lt,e,x,s,i,r,t,Jt);if(Ke!==!1)return(Ke===1||Ke===-1)&&(Jt=Ke===1),dr=!0,setTimeout(ld,30),et(),Jt&&!Xt?e.appendChild(x):i.parentNode.insertBefore(x,Jt?Xt:i),N&&Zn(N,0,xt-N.scrollTop),ct=x.parentNode,ut!==void 0&&!zi&&(Ui=Math.abs(ut-bt(i)[T])),_t(),W(!0)}if(e.contains(x))return W(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Z(document,"mousemove",this._onTouchMove),Z(document,"touchmove",this._onTouchMove),Z(document,"pointermove",this._onTouchMove),Z(document,"dragover",Oe),Z(document,"mousemove",Oe),Z(document,"touchmove",Oe)},_offUpEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._onDrop),Z(t,"touchend",this._onDrop),Z(t,"pointerup",this._onDrop),Z(t,"touchcancel",this._onDrop),Z(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(Zt=Kt(x),Ce=Kt(x,i.draggable),Vt("drop",this,{evt:t}),ct=x&&x.parentNode,Zt=Kt(x),Ce=Kt(x,i.draggable),O.eventCanceled){this._nulling();return}Ze=!1,zi=!1,wi=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),cr(this.cloneId),cr(this._dragStartId),this.nativeDraggable&&(Z(document,"drop",this),Z(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),mi&&P(document.body,"user-select",""),P(x,"transform",""),t&&(_i&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),D&&D.parentNode&&D.parentNode.removeChild(D),(lt===ct||Pt&&Pt.lastPutMode!=="clone")&&dt&&dt.parentNode&&dt.parentNode.removeChild(dt),x&&(this.nativeDraggable&&Z(x,"dragend",this),hr(x),x.style["will-change"]="",_i&&!Ze&&qt(x,Pt?Pt.options.ghostClass:this.options.ghostClass,!1),qt(x,this.options.chosenClass,!1),Nt({sortable:this,name:"unchoose",toEl:ct,newIndex:null,newDraggableIndex:null,originalEvent:t}),lt!==ct?(Zt>=0&&(Nt({rootEl:ct,name:"add",toEl:ct,fromEl:lt,originalEvent:t}),Nt({sortable:this,name:"remove",toEl:ct,originalEvent:t}),Nt({rootEl:ct,name:"sort",toEl:ct,fromEl:lt,originalEvent:t}),Nt({sortable:this,name:"sort",toEl:ct,originalEvent:t})),Pt&&Pt.save()):Zt!==Ge&&Zt>=0&&(Nt({sortable:this,name:"update",toEl:ct,originalEvent:t}),Nt({sortable:this,name:"sort",toEl:ct,originalEvent:t})),O.active&&((Zt==null||Zt===-1)&&(Zt=Ge,Ce=yi),Nt({sortable:this,name:"end",toEl:ct,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Vt("nulling",this),lt=x=ct=D=$e=dt=Mi=xe=Pe=se=_i=Zt=Ce=Ge=yi=We=vi=Pt=Hi=O.dragged=O.ghost=O.clone=O.active=null,qi.forEach(function(t){t.checked=!0}),qi.length=or=ar=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":x&&(this._onDragOver(t),ad(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,s=0,r=i.length,o=this.options;s<r;s++)e=i[s],ie(e,o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||pd(e));return t},sort:function(t,e){var i={},s=this.el;this.toArray().forEach(function(r,o){var a=s.children[o];ie(a,this.options.draggable,s,!1)&&(i[r]=a)},this),e&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(s.removeChild(i[r]),s.appendChild(i[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ie(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var s=bi.modifyOption(this,t,e);typeof s<"u"?i[t]=s:i[t]=e,t==="group"&&eo(i)},destroy:function(){Vt("destroy",this);var t=this.el;t[Gt]=null,Z(t,"mousedown",this._onTapStart),Z(t,"touchstart",this._onTapStart),Z(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Z(t,"dragover",this),Z(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Fi.splice(Fi.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!xe){if(Vt("hideClone",this),O.eventCanceled)return;P(dt,"display","none"),this.options.removeCloneOnHide&&dt.parentNode&&dt.parentNode.removeChild(dt),xe=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(xe){if(Vt("showClone",this),O.eventCanceled)return;x.parentNode==lt&&!this.options.group.revertClone?lt.insertBefore(dt,x):$e?lt.insertBefore(dt,$e):lt.appendChild(dt),this.options.group.revertClone&&this.animate(x,dt),P(dt,"display",""),xe=!1}}};function ad(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Wi(n,t,e,i,s,r,o,a){var l,d=n[Gt],h=d.options.onMove,u;return window.CustomEvent&&!me&&!fi?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=n,l.dragged=e,l.draggedRect=i,l.related=s||t,l.relatedRect=r||bt(t),l.willInsertAfter=a,l.originalEvent=o,n.dispatchEvent(l),h&&(u=h.call(d,l,o)),u}function hr(n){n.draggable=!1}function ld(){dr=!1}function dd(n,t,e){var i=bt(Ue(e.el,0,e.options,!0)),s=Yn(e.el,e.options,D),r=10;return t?n.clientX<s.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<s.top-r||n.clientY<i.bottom&&n.clientX<i.left}function hd(n,t,e){var i=bt(sr(e.el,e.options.draggable)),s=Yn(e.el,e.options,D),r=10;return t?n.clientX>s.right+r||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>s.bottom+r||n.clientX>i.right&&n.clientY>i.top}function cd(n,t,e,i,s,r,o,a){var l=i?n.clientY:n.clientX,d=i?e.height:e.width,h=i?e.top:e.left,u=i?e.bottom:e.right,g=!1;if(!o){if(a&&Ui<d*s){if(!wi&&(vi===1?l>h+d*r/2:l<u-d*r/2)&&(wi=!0),wi)g=!0;else if(vi===1?l<h+Ui:l>u-Ui)return-vi}else if(l>h+d*(1-s)/2&&l<u-d*(1-s)/2)return ud(t)}return g=g||o,g&&(l<h+d*r/2||l>u-d*r/2)?l>h+d/2?1:-1:0}function ud(n){return Kt(x)<Kt(n)?1:-1}function pd(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function fd(n){qi.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&qi.push(i)}}function Yi(n){return setTimeout(n,0)}function cr(n){return clearTimeout(n)}Gi&&J(document,"touchmove",function(n){(O.active||Ze)&&n.cancelable&&n.preventDefault()}),O.utils={on:J,off:Z,css:P,find:zn,is:function(t,e){return!!ie(t,e,t,!1)},extend:Xl,throttle:Gn,closest:ie,toggleClass:qt,clone:Wn,index:Kt,nextTick:Yi,cancelNextTick:cr,detectDirection:to,getChild:Ue},O.get=function(n){return n[Gt]},O.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(O.utils=ae(ae({},O.utils),i.utils)),bi.mount(i)})},O.create=function(n,t){return new O(n,t)},O.version=Zl;var yt=[],xi,ur,pr=!1,fr,mr,Xi,Ci;function md(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?J(document,"dragover",this._handleAutoScroll):this.options.supportPointer?J(document,"pointermove",this._handleFallbackAutoScroll):i.touches?J(document,"touchmove",this._handleFallbackAutoScroll):J(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?Z(document,"dragover",this._handleAutoScroll):(Z(document,"pointermove",this._handleFallbackAutoScroll),Z(document,"touchmove",this._handleFallbackAutoScroll),Z(document,"mousemove",this._handleFallbackAutoScroll)),ro(),Ji(),Jl()},nulling:function(){Xi=ur=xi=pr=Ci=fr=mr=null,yt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var s=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,o);if(Xi=e,i||this.options.forceAutoScrollFallback||fi||me||mi){gr(e,this.options,a,i);var l=we(a,!0);pr&&(!Ci||r!==fr||o!==mr)&&(Ci&&ro(),Ci=setInterval(function(){var d=we(document.elementFromPoint(r,o),!0);d!==l&&(l=d,Ji()),gr(e,s.options,d,i)},10),fr=r,mr=o)}else{if(!this.options.bubbleScroll||we(a,!0)===le()){Ji();return}gr(e,this.options,we(a,!1),!1)}}},pe(n,{pluginName:"scroll",initializeByDefault:!0})}function Ji(){yt.forEach(function(n){clearInterval(n.pid)}),yt=[]}function ro(){clearInterval(Ci)}var gr=Gn(function(n,t,e,i){if(t.scroll){var s=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,o=t.scrollSensitivity,a=t.scrollSpeed,l=le(),d=!1,h;ur!==e&&(ur=e,Ji(),xi=t.scroll,h=t.scrollFn,xi===!0&&(xi=we(e,!0)));var u=0,g=xi;do{var m=g,y=bt(m),w=y.top,A=y.bottom,et=y.left,W=y.right,_t=y.width,pt=y.height,kt=void 0,H=void 0,ut=m.scrollWidth,Rt=m.scrollHeight,ot=P(m),T=m.scrollLeft,N=m.scrollTop;m===l?(kt=_t<ut&&(ot.overflowX==="auto"||ot.overflowX==="scroll"||ot.overflowX==="visible"),H=pt<Rt&&(ot.overflowY==="auto"||ot.overflowY==="scroll"||ot.overflowY==="visible")):(kt=_t<ut&&(ot.overflowX==="auto"||ot.overflowX==="scroll"),H=pt<Rt&&(ot.overflowY==="auto"||ot.overflowY==="scroll"));var xt=kt&&(Math.abs(W-s)<=o&&T+_t<ut)-(Math.abs(et-s)<=o&&!!T),Ct=H&&(Math.abs(A-r)<=o&&N+pt<Rt)-(Math.abs(w-r)<=o&&!!N);if(!yt[u])for(var St=0;St<=u;St++)yt[St]||(yt[St]={});(yt[u].vx!=xt||yt[u].vy!=Ct||yt[u].el!==m)&&(yt[u].el=m,yt[u].vx=xt,yt[u].vy=Ct,clearInterval(yt[u].pid),(xt!=0||Ct!=0)&&(d=!0,yt[u].pid=setInterval((function(){i&&this.layer===0&&O.active._onTouchMove(Xi);var Xt=yt[this.layer].vy?yt[this.layer].vy*a:0,Jt=yt[this.layer].vx?yt[this.layer].vx*a:0;typeof h=="function"&&h.call(O.dragged.parentNode[Gt],Jt,Xt,n,Xi,yt[this.layer].el)!=="continue"||Zn(yt[this.layer].el,Jt,Xt)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&g!==l&&(g=we(g,!1)));pr=d}},30),no=function(t){var e=t.originalEvent,i=t.putSortable,s=t.dragEl,r=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var d=i||r;a();var h=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(h.clientX,h.clientY);l(),d&&!d.el.contains(u)&&(o("spill"),this.onSpill({dragEl:s,putSortable:i}))}};function br(){}br.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var s=Ue(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(e,s):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:no},pe(br,{pluginName:"revertOnSpill"});function yr(){}yr.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,s=i||this.sortable;s.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),s.animateAll()},drop:no},pe(yr,{pluginName:"removeOnSpill"}),O.mount(new md),O.mount(yr,br);const gd=n=>{const t=n.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),e},bd=(n,t,e,i,s,r)=>{const a=n.item.parentNode;for(const w of e)a.appendChild(w);if(n.oldIndex==n.newIndex)return;const l=i.getArray(),d=n.item.querySelector("eox-layercontrol-layer").layer.get(s),h=l.find(w=>w.get(s)===d),u=r.dataset.layer,g=l.find(w=>w.get(s)==u);let m,y;for(m=0;m<l.length;m++)if(l[m]==h){i.removeAt(m);break}for(y=0;y<l.length;y++)if(l[y]===g){m>y?i.insertAt(y,h):i.insertAt(y+1,h);break}t.requestUpdate()};function yd(n,t,e,i){let s=[],r=null;n._sortable=O.create(n,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:o=>s=gd(o),onMove:o=>{r=o.related},onEnd:o=>bd(o,i,s,t,e,r)})}function _d(n,t,e,i){const s=n.getArray();let r=!1;s.forEach(o=>{const a=o.ol_uid;o.get(t)||(o.set(t,a),r=!0),o.get(e)||(o.set(e,`layer ${a}`),r=!0),r&&i.requestUpdate()})}function _r(n,t,e){let i=[];const s=(r,o,a)=>{i=[...i,...r.filter(d=>d.get(o)===a)];const l=r.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>s(d.getLayers().getArray(),o,a)),i};return s(n,t,e),i}function vd(n,t,e){if(!n||!t)return!1;if(!oo(n,e))return!0;const i=n.get("minZoom"),s=n.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<s}function oo(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function wd(n,t){var s,r,o;return!n||!t?void 0:n.getLayers?"group":((o=(s=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:s.ol_uid)==null?void 0:o.includes(n.getSource?(r=n.getSource())==null?void 0:r.ol_uid:void 0))?"draw":n.declutter_!==void 0?"vector":"raster"}function ao(n,t){var i;let e={};for(const s in n){const r=n[s].type;if(r&&r!=="object")e[s]=r==="number"?Number(t[s]):t[s];else if(typeof n[s]=="object"&&((i=n[s])!=null&&i.properties)){const o=ao(n[s].properties,t);Object.keys(o).length>0&&(e[s]=o)}}return e}function xd(n,t){var r;if(!t||!n.getSource().getTileUrlFunction())return null;const e=new URL(n.getSource().getTileUrlFunction()([0,0,0])),i=Object.fromEntries(e.searchParams.entries()),s=ao(((r=t.schema)==null?void 0:r.properties)||t.schema,i);return Object.keys(s).length?s:null}const Cd=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),Ed=(n,t)=>n==null?void 0:n.filter(e=>{let i=!0;return["remove","sort"].includes(e)&&(i=!1),e==="info"&&(i=t.get("description")),e==="config"&&(i=t.get("layerConfig")),i}),Ld=(n,t)=>z`
|
|
46
|
+
<button slot="${n}-icon" class="icon">${t?n:K}</button>
|
|
47
|
+
`,Ad=n=>z`
|
|
48
48
|
<button
|
|
49
49
|
class="remove-icon icon"
|
|
50
|
-
@click=${()=>{const{layer:
|
|
50
|
+
@click=${()=>{const{layer:t}=n;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),n.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
|
|
51
51
|
>
|
|
52
|
-
${
|
|
52
|
+
${n.unstyled?"x":K}
|
|
53
53
|
</button>
|
|
54
|
-
`,
|
|
54
|
+
`,kd=n=>z`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
|
-
${
|
|
56
|
+
${n?"═":K}
|
|
57
57
|
</span>
|
|
58
|
-
|
|
58
|
+
`,lo=n=>{var e;const t=["layerControlHide","layerControlOptional"];return(e=n==null?void 0:n.getArray())==null?void 0:e.filter(i=>t.every(s=>!i.get(s)))};/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const
|
|
62
|
+
*/const ho=Xs(class extends Js{constructor(n){if(super(n),n.type!==ve.PROPERTY&&n.type!==ve.ATTRIBUTE&&n.type!==ve.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!qa(n))throw Error("`live` bindings can only contain a single expression")}render(n){return n}update(n,[t]){if(t===Qt||t===K)return t;const e=n.element,i=n.name;if(n.type===ve.PROPERTY){if(t===e[i])return Qt}else if(n.type===ve.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return Qt}else if(n.type===ve.ATTRIBUTE&&e.getAttribute(i)===t+"")return Qt;return kn(n),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class
|
|
66
|
+
*/class vr extends Js{constructor(t){if(super(t),this.it=K,t.type!==ve.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===K||t==null)return this._t=void 0,this.it=t;if(t===Qt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}vr.directiveName="unsafeHTML",vr.resultType=1;const Sd=Xs(vr);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/function*Ba(m,s){if(m!==void 0){let p=0;for(const b of m)yield s(b,p++)}}var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qd(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var uu={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(m,s){(function(p,b){m.exports=b()})(self,()=>(()=>{var p={9662:(y,j,r)=>{var v=r(614),g=r(6330),w=TypeError;y.exports=function(k){if(v(k))return k;throw w(g(k)+" is not a function")}},9483:(y,j,r)=>{var v=r(4411),g=r(6330),w=TypeError;y.exports=function(k){if(v(k))return k;throw w(g(k)+" is not a constructor")}},6077:(y,j,r)=>{var v=r(614),g=String,w=TypeError;y.exports=function(k){if(typeof k=="object"||v(k))return k;throw w("Can't set "+g(k)+" as a prototype")}},1223:(y,j,r)=>{var v=r(5112),g=r(30),w=r(3070).f,k=v("unscopables"),O=Array.prototype;O[k]==null&&w(O,k,{configurable:!0,value:g(null)}),y.exports=function(C){O[k][C]=!0}},1530:(y,j,r)=>{var v=r(8710).charAt;y.exports=function(g,w,k){return w+(k?v(g,w).length:1)}},5787:(y,j,r)=>{var v=r(7976),g=TypeError;y.exports=function(w,k){if(v(k,w))return w;throw g("Incorrect invocation")}},9670:(y,j,r)=>{var v=r(111),g=String,w=TypeError;y.exports=function(k){if(v(k))return k;throw w(g(k)+" is not an object")}},8533:(y,j,r)=>{var v=r(2092).forEach,g=r(9341)("forEach");y.exports=g?[].forEach:function(w){return v(this,w,arguments.length>1?arguments[1]:void 0)}},8457:(y,j,r)=>{var v=r(9974),g=r(6916),w=r(7908),k=r(3411),O=r(7659),C=r(4411),S=r(6244),T=r(6135),A=r(4121),R=r(1246),I=Array;y.exports=function($){var M=w($),B=C(this),q=arguments.length,F=q>1?arguments[1]:void 0,N=F!==void 0;N&&(F=v(F,q>2?arguments[2]:void 0));var U,H,X,Y,K,tt,it=R(M),st=0;if(!it||this===I&&O(it))for(U=S(M),H=B?new this(U):I(U);U>st;st++)tt=N?F(M[st],st):M[st],T(H,st,tt);else for(K=(Y=A(M,it)).next,H=B?new this:[];!(X=g(K,Y)).done;st++)tt=N?k(Y,F,[X.value,st],!0):X.value,T(H,st,tt);return H.length=st,H}},1318:(y,j,r)=>{var v=r(5656),g=r(1400),w=r(6244),k=function(O){return function(C,S,T){var A,R=v(C),I=w(R),$=g(T,I);if(O&&S!=S){for(;I>$;)if((A=R[$++])!=A)return!0}else for(;I>$;$++)if((O||$ in R)&&R[$]===S)return O||$||0;return!O&&-1}};y.exports={includes:k(!0),indexOf:k(!1)}},2092:(y,j,r)=>{var v=r(9974),g=r(1702),w=r(8361),k=r(7908),O=r(6244),C=r(5417),S=g([].push),T=function(A){var R=A==1,I=A==2,$=A==3,M=A==4,B=A==6,q=A==7,F=A==5||B;return function(N,U,H,X){for(var Y,K,tt=k(N),it=w(tt),st=v(U,H),yt=O(it),ct=0,Et=X||C,At=R?Et(N,yt):I||q?Et(N,0):void 0;yt>ct;ct++)if((F||ct in it)&&(K=st(Y=it[ct],ct,tt),A))if(R)At[ct]=K;else if(K)switch(A){case 3:return!0;case 5:return Y;case 6:return ct;case 2:S(At,Y)}else switch(A){case 4:return!1;case 7:S(At,Y)}return B?-1:$||M?M:At}};y.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:(y,j,r)=>{var v=r(7293),g=r(5112),w=r(7392),k=g("species");y.exports=function(O){return w>=51||!v(function(){var C=[];return(C.constructor={})[k]=function(){return{foo:1}},C[O](Boolean).foo!==1})}},9341:(y,j,r)=>{var v=r(7293);y.exports=function(g,w){var k=[][g];return!!k&&v(function(){k.call(null,w||function(){return 1},1)})}},3671:(y,j,r)=>{var v=r(9662),g=r(7908),w=r(8361),k=r(6244),O=TypeError,C=function(S){return function(T,A,R,I){v(A);var $=g(T),M=w($),B=k($),q=S?B-1:0,F=S?-1:1;if(R<2)for(;;){if(q in M){I=M[q],q+=F;break}if(q+=F,S?q<0:B<=q)throw O("Reduce of empty array with no initial value")}for(;S?q>=0:B>q;q+=F)q in M&&(I=A(I,M[q],q,$));return I}};y.exports={left:C(!1),right:C(!0)}},3658:(y,j,r)=>{var v=r(9781),g=r(3157),w=TypeError,k=Object.getOwnPropertyDescriptor,O=v&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}}();y.exports=O?function(C,S){if(g(C)&&!k(C,"length").writable)throw w("Cannot set read only .length");return C.length=S}:function(C,S){return C.length=S}},1589:(y,j,r)=>{var v=r(1400),g=r(6244),w=r(6135),k=Array,O=Math.max;y.exports=function(C,S,T){for(var A=g(C),R=v(S,A),I=v(T===void 0?A:T,A),$=k(O(I-R,0)),M=0;R<I;R++,M++)w($,M,C[R]);return $.length=M,$}},206:(y,j,r)=>{var v=r(1702);y.exports=v([].slice)},4362:(y,j,r)=>{var v=r(1589),g=Math.floor,w=function(C,S){var T=C.length,A=g(T/2);return T<8?k(C,S):O(C,w(v(C,0,A),S),w(v(C,A),S),S)},k=function(C,S){for(var T,A,R=C.length,I=1;I<R;){for(A=I,T=C[I];A&&S(C[A-1],T)>0;)C[A]=C[--A];A!==I++&&(C[A]=T)}return C},O=function(C,S,T,A){for(var R=S.length,I=T.length,$=0,M=0;$<R||M<I;)C[$+M]=$<R&&M<I?A(S[$],T[M])<=0?S[$++]:T[M++]:$<R?S[$++]:T[M++];return C};y.exports=w},7475:(y,j,r)=>{var v=r(3157),g=r(4411),w=r(111),k=r(5112)("species"),O=Array;y.exports=function(C){var S;return v(C)&&(S=C.constructor,(g(S)&&(S===O||v(S.prototype))||w(S)&&(S=S[k])===null)&&(S=void 0)),S===void 0?O:S}},5417:(y,j,r)=>{var v=r(7475);y.exports=function(g,w){return new(v(g))(w===0?0:w)}},3411:(y,j,r)=>{var v=r(9670),g=r(9212);y.exports=function(w,k,O,C){try{return C?k(v(O)[0],O[1]):k(O)}catch(S){g(w,"throw",S)}}},7072:(y,j,r)=>{var v=r(5112)("iterator"),g=!1;try{var w=0,k={next:function(){return{done:!!w++}},return:function(){g=!0}};k[v]=function(){return this},Array.from(k,function(){throw 2})}catch{}y.exports=function(O,C){if(!C&&!g)return!1;var S=!1;try{var T={};T[v]=function(){return{next:function(){return{done:S=!0}}}},O(T)}catch{}return S}},4326:(y,j,r)=>{var v=r(1702),g=v({}.toString),w=v("".slice);y.exports=function(k){return w(g(k),8,-1)}},648:(y,j,r)=>{var v=r(1694),g=r(614),w=r(4326),k=r(5112)("toStringTag"),O=Object,C=w(function(){return arguments}())=="Arguments";y.exports=v?w:function(S){var T,A,R;return S===void 0?"Undefined":S===null?"Null":typeof(A=function(I,$){try{return I[$]}catch{}}(T=O(S),k))=="string"?A:C?w(T):(R=w(T))=="Object"&&g(T.callee)?"Arguments":R}},9920:(y,j,r)=>{var v=r(2597),g=r(3887),w=r(1236),k=r(3070);y.exports=function(O,C,S){for(var T=g(C),A=k.f,R=w.f,I=0;I<T.length;I++){var $=T[I];v(O,$)||S&&v(S,$)||A(O,$,R(C,$))}}},4964:(y,j,r)=>{var v=r(5112)("match");y.exports=function(g){var w=/./;try{"/./"[g](w)}catch{try{return w[v]=!1,"/./"[g](w)}catch{}}return!1}},8544:(y,j,r)=>{var v=r(7293);y.exports=!v(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})},6178:y=>{y.exports=function(j,r){return{value:j,done:r}}},8880:(y,j,r)=>{var v=r(9781),g=r(3070),w=r(9114);y.exports=v?function(k,O,C){return g.f(k,O,w(1,C))}:function(k,O,C){return k[O]=C,k}},9114:y=>{y.exports=function(j,r){return{enumerable:!(1&j),configurable:!(2&j),writable:!(4&j),value:r}}},6135:(y,j,r)=>{var v=r(4948),g=r(3070),w=r(9114);y.exports=function(k,O,C){var S=v(O);S in k?g.f(k,S,w(0,C)):k[S]=C}},5573:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(6650).start,k=RangeError,O=isFinite,C=Math.abs,S=Date.prototype,T=S.toISOString,A=v(S.getTime),R=v(S.getUTCDate),I=v(S.getUTCFullYear),$=v(S.getUTCHours),M=v(S.getUTCMilliseconds),B=v(S.getUTCMinutes),q=v(S.getUTCMonth),F=v(S.getUTCSeconds);y.exports=g(function(){return T.call(new Date(-50000000000001))!="0385-07-25T07:06:39.999Z"})||!g(function(){T.call(new Date(NaN))})?function(){if(!O(A(this)))throw k("Invalid time value");var N=this,U=I(N),H=M(N),X=U<0?"-":U>9999?"+":"";return X+w(C(U),X?6:4,0)+"-"+w(q(N)+1,2,0)+"-"+w(R(N),2,0)+"T"+w($(N),2,0)+":"+w(B(N),2,0)+":"+w(F(N),2,0)+"."+w(H,3,0)+"Z"}:T},8709:(y,j,r)=>{var v=r(9670),g=r(2140),w=TypeError;y.exports=function(k){if(v(this),k==="string"||k==="default")k="string";else if(k!=="number")throw w("Incorrect hint");return g(this,k)}},7045:(y,j,r)=>{var v=r(6339),g=r(3070);y.exports=function(w,k,O){return O.get&&v(O.get,k,{getter:!0}),O.set&&v(O.set,k,{setter:!0}),g.f(w,k,O)}},8052:(y,j,r)=>{var v=r(614),g=r(3070),w=r(6339),k=r(3072);y.exports=function(O,C,S,T){T||(T={});var A=T.enumerable,R=T.name!==void 0?T.name:C;if(v(S)&&w(S,R,T),T.global)A?O[C]=S:k(C,S);else{try{T.unsafe?O[C]&&(A=!0):delete O[C]}catch{}A?O[C]=S:g.f(O,C,{value:S,enumerable:!1,configurable:!T.nonConfigurable,writable:!T.nonWritable})}return O}},3072:(y,j,r)=>{var v=r(7854),g=Object.defineProperty;y.exports=function(w,k){try{g(v,w,{value:k,configurable:!0,writable:!0})}catch{v[w]=k}return k}},5117:(y,j,r)=>{var v=r(6330),g=TypeError;y.exports=function(w,k){if(!delete w[k])throw g("Cannot delete property "+v(k)+" of "+v(w))}},9781:(y,j,r)=>{var v=r(7293);y.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},4154:y=>{var j=typeof document=="object"&&document.all,r=j===void 0&&j!==void 0;y.exports={all:j,IS_HTMLDDA:r}},317:(y,j,r)=>{var v=r(7854),g=r(111),w=v.document,k=g(w)&&g(w.createElement);y.exports=function(O){return k?w.createElement(O):{}}},7207:y=>{var j=TypeError;y.exports=function(r){if(r>9007199254740991)throw j("Maximum allowed index exceeded");return r}},8324:y=>{y.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:(y,j,r)=>{var v=r(317)("span").classList,g=v&&v.constructor&&v.constructor.prototype;y.exports=g===Object.prototype?void 0:g},8886:(y,j,r)=>{var v=r(8113).match(/firefox\/(\d+)/i);y.exports=!!v&&+v[1]},7871:(y,j,r)=>{var v=r(3823),g=r(5268);y.exports=!v&&!g&&typeof window=="object"&&typeof document=="object"},9363:y=>{y.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},3823:y=>{y.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},256:(y,j,r)=>{var v=r(8113);y.exports=/MSIE|Trident/.test(v)},1528:(y,j,r)=>{var v=r(8113);y.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble<"u"},8334:(y,j,r)=>{var v=r(8113);y.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(v)},5268:(y,j,r)=>{var v=r(4326);y.exports=typeof process<"u"&&v(process)=="process"},1036:(y,j,r)=>{var v=r(8113);y.exports=/web0s(?!.*chrome)/i.test(v)},8113:y=>{y.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7392:(y,j,r)=>{var v,g,w=r(7854),k=r(8113),O=w.process,C=w.Deno,S=O&&O.versions||C&&C.version,T=S&&S.v8;T&&(g=(v=T.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!g&&k&&(!(v=k.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=k.match(/Chrome\/(\d+)/))&&(g=+v[1]),y.exports=g},8008:(y,j,r)=>{var v=r(8113).match(/AppleWebKit\/(\d+)\./);y.exports=!!v&&+v[1]},748:y=>{y.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(y,j,r)=>{var v=r(7854),g=r(1236).f,w=r(8880),k=r(8052),O=r(3072),C=r(9920),S=r(4705);y.exports=function(T,A){var R,I,$,M,B,q=T.target,F=T.global,N=T.stat;if(R=F?v:N?v[q]||O(q,{}):(v[q]||{}).prototype)for(I in A){if(M=A[I],$=T.dontCallGetSet?(B=g(R,I))&&B.value:R[I],!S(F?I:q+(N?".":"#")+I,T.forced)&&$!==void 0){if(typeof M==typeof $)continue;C(M,$)}(T.sham||$&&$.sham)&&w(M,"sham",!0),k(R,I,M,T)}}},7293:y=>{y.exports=function(j){try{return!!j()}catch{return!0}}},7007:(y,j,r)=>{r(4916);var v=r(1470),g=r(8052),w=r(2261),k=r(7293),O=r(5112),C=r(8880),S=O("species"),T=RegExp.prototype;y.exports=function(A,R,I,$){var M=O(A),B=!k(function(){var U={};return U[M]=function(){return 7},""[A](U)!=7}),q=B&&!k(function(){var U=!1,H=/a/;return A==="split"&&((H={}).constructor={},H.constructor[S]=function(){return H},H.flags="",H[M]=/./[M]),H.exec=function(){return U=!0,null},H[M](""),!U});if(!B||!q||I){var F=v(/./[M]),N=R(M,""[A],function(U,H,X,Y,K){var tt=v(U),it=H.exec;return it===w||it===T.exec?B&&!K?{done:!0,value:F(H,X,Y)}:{done:!0,value:tt(X,H,Y)}:{done:!1}});g(String.prototype,A,N[0]),g(T,M,N[1])}$&&C(T[M],"sham",!0)}},2104:(y,j,r)=>{var v=r(4374),g=Function.prototype,w=g.apply,k=g.call;y.exports=typeof Reflect=="object"&&Reflect.apply||(v?k.bind(w):function(){return k.apply(w,arguments)})},9974:(y,j,r)=>{var v=r(1470),g=r(9662),w=r(4374),k=v(v.bind);y.exports=function(O,C){return g(O),C===void 0?O:w?k(O,C):function(){return O.apply(C,arguments)}}},4374:(y,j,r)=>{var v=r(7293);y.exports=!v(function(){var g=(function(){}).bind();return typeof g!="function"||g.hasOwnProperty("prototype")})},7065:(y,j,r)=>{var v=r(1702),g=r(9662),w=r(111),k=r(2597),O=r(206),C=r(4374),S=Function,T=v([].concat),A=v([].join),R={},I=function($,M,B){if(!k(R,M)){for(var q=[],F=0;F<M;F++)q[F]="a["+F+"]";R[M]=S("C,a","return new C("+A(q,",")+")")}return R[M]($,B)};y.exports=C?S.bind:function($){var M=g(this),B=M.prototype,q=O(arguments,1),F=function(){var N=T(q,O(arguments));return this instanceof F?I(M,N.length,N):M.apply($,N)};return w(B)&&(F.prototype=B),F}},6916:(y,j,r)=>{var v=r(4374),g=Function.prototype.call;y.exports=v?g.bind(g):function(){return g.apply(g,arguments)}},6530:(y,j,r)=>{var v=r(9781),g=r(2597),w=Function.prototype,k=v&&Object.getOwnPropertyDescriptor,O=g(w,"name"),C=O&&(function(){}).name==="something",S=O&&(!v||v&&k(w,"name").configurable);y.exports={EXISTS:O,PROPER:C,CONFIGURABLE:S}},5668:(y,j,r)=>{var v=r(1702),g=r(9662);y.exports=function(w,k,O){try{return v(g(Object.getOwnPropertyDescriptor(w,k)[O]))}catch{}}},1470:(y,j,r)=>{var v=r(4326),g=r(1702);y.exports=function(w){if(v(w)==="Function")return g(w)}},1702:(y,j,r)=>{var v=r(4374),g=Function.prototype,w=g.call,k=v&&g.bind.bind(w,w);y.exports=v?k:function(O){return function(){return w.apply(O,arguments)}}},5005:(y,j,r)=>{var v=r(7854),g=r(614),w=function(k){return g(k)?k:void 0};y.exports=function(k,O){return arguments.length<2?w(v[k]):v[k]&&v[k][O]}},1246:(y,j,r)=>{var v=r(648),g=r(8173),w=r(8554),k=r(7497),O=r(5112)("iterator");y.exports=function(C){if(!w(C))return g(C,O)||g(C,"@@iterator")||k[v(C)]}},4121:(y,j,r)=>{var v=r(6916),g=r(9662),w=r(9670),k=r(6330),O=r(1246),C=TypeError;y.exports=function(S,T){var A=arguments.length<2?O(S):T;if(g(A))return w(v(A,S));throw C(k(S)+" is not iterable")}},8044:(y,j,r)=>{var v=r(1702),g=r(3157),w=r(614),k=r(4326),O=r(1340),C=v([].push);y.exports=function(S){if(w(S))return S;if(g(S)){for(var T=S.length,A=[],R=0;R<T;R++){var I=S[R];typeof I=="string"?C(A,I):typeof I!="number"&&k(I)!="Number"&&k(I)!="String"||C(A,O(I))}var $=A.length,M=!0;return function(B,q){if(M)return M=!1,q;if(g(this))return q;for(var F=0;F<$;F++)if(A[F]===B)return q}}}},8173:(y,j,r)=>{var v=r(9662),g=r(8554);y.exports=function(w,k){var O=w[k];return g(O)?void 0:v(O)}},647:(y,j,r)=>{var v=r(1702),g=r(7908),w=Math.floor,k=v("".charAt),O=v("".replace),C=v("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;y.exports=function(A,R,I,$,M,B){var q=I+A.length,F=$.length,N=T;return M!==void 0&&(M=g(M),N=S),O(B,N,function(U,H){var X;switch(k(H,0)){case"$":return"$";case"&":return A;case"`":return C(R,0,I);case"'":return C(R,q);case"<":X=M[C(H,1,-1)];break;default:var Y=+H;if(Y===0)return U;if(Y>F){var K=w(Y/10);return K===0?U:K<=F?$[K-1]===void 0?k(H,1):$[K-1]+k(H,1):U}X=$[Y-1]}return X===void 0?"":X})}},7854:(y,j,r)=>{var v=function(g){return g&&g.Math==Math&&g};y.exports=v(typeof globalThis=="object"&&globalThis)||v(typeof window=="object"&&window)||v(typeof self=="object"&&self)||v(typeof r.g=="object"&&r.g)||function(){return this}()||Function("return this")()},2597:(y,j,r)=>{var v=r(1702),g=r(7908),w=v({}.hasOwnProperty);y.exports=Object.hasOwn||function(k,O){return w(g(k),O)}},3501:y=>{y.exports={}},842:y=>{y.exports=function(j,r){try{arguments.length==1?console.error(j):console.error(j,r)}catch{}}},490:(y,j,r)=>{var v=r(5005);y.exports=v("document","documentElement")},4664:(y,j,r)=>{var v=r(9781),g=r(7293),w=r(317);y.exports=!v&&!g(function(){return Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a!=7})},8361:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(4326),k=Object,O=v("".split);y.exports=g(function(){return!k("z").propertyIsEnumerable(0)})?function(C){return w(C)=="String"?O(C,""):k(C)}:k},9587:(y,j,r)=>{var v=r(614),g=r(111),w=r(7674);y.exports=function(k,O,C){var S,T;return w&&v(S=O.constructor)&&S!==C&&g(T=S.prototype)&&T!==C.prototype&&w(k,T),k}},2788:(y,j,r)=>{var v=r(1702),g=r(614),w=r(5465),k=v(Function.toString);g(w.inspectSource)||(w.inspectSource=function(O){return k(O)}),y.exports=w.inspectSource},9909:(y,j,r)=>{var v,g,w,k=r(4811),O=r(7854),C=r(111),S=r(8880),T=r(2597),A=r(5465),R=r(6200),I=r(3501),$="Object already initialized",M=O.TypeError,B=O.WeakMap;if(k||A.state){var q=A.state||(A.state=new B);q.get=q.get,q.has=q.has,q.set=q.set,v=function(N,U){if(q.has(N))throw M($);return U.facade=N,q.set(N,U),U},g=function(N){return q.get(N)||{}},w=function(N){return q.has(N)}}else{var F=R("state");I[F]=!0,v=function(N,U){if(T(N,F))throw M($);return U.facade=N,S(N,F,U),U},g=function(N){return T(N,F)?N[F]:{}},w=function(N){return T(N,F)}}y.exports={set:v,get:g,has:w,enforce:function(N){return w(N)?g(N):v(N,{})},getterFor:function(N){return function(U){var H;if(!C(U)||(H=g(U)).type!==N)throw M("Incompatible receiver, "+N+" required");return H}}}},7659:(y,j,r)=>{var v=r(5112),g=r(7497),w=v("iterator"),k=Array.prototype;y.exports=function(O){return O!==void 0&&(g.Array===O||k[w]===O)}},3157:(y,j,r)=>{var v=r(4326);y.exports=Array.isArray||function(g){return v(g)=="Array"}},614:(y,j,r)=>{var v=r(4154),g=v.all;y.exports=v.IS_HTMLDDA?function(w){return typeof w=="function"||w===g}:function(w){return typeof w=="function"}},4411:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(614),k=r(648),O=r(5005),C=r(2788),S=function(){},T=[],A=O("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=v(R.exec),$=!R.exec(S),M=function(q){if(!w(q))return!1;try{return A(S,T,q),!0}catch{return!1}},B=function(q){if(!w(q))return!1;switch(k(q)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!I(R,C(q))}catch{return!0}};B.sham=!0,y.exports=!A||g(function(){var q;return M(M.call)||!M(Object)||!M(function(){q=!0})||q})?B:M},5032:(y,j,r)=>{var v=r(2597);y.exports=function(g){return g!==void 0&&(v(g,"value")||v(g,"writable"))}},4705:(y,j,r)=>{var v=r(7293),g=r(614),w=/#|\.prototype\./,k=function(A,R){var I=C[O(A)];return I==T||I!=S&&(g(R)?v(R):!!R)},O=k.normalize=function(A){return String(A).replace(w,".").toLowerCase()},C=k.data={},S=k.NATIVE="N",T=k.POLYFILL="P";y.exports=k},8554:y=>{y.exports=function(j){return j==null}},111:(y,j,r)=>{var v=r(614),g=r(4154),w=g.all;y.exports=g.IS_HTMLDDA?function(k){return typeof k=="object"?k!==null:v(k)||k===w}:function(k){return typeof k=="object"?k!==null:v(k)}},1913:y=>{y.exports=!1},7850:(y,j,r)=>{var v=r(111),g=r(4326),w=r(5112)("match");y.exports=function(k){var O;return v(k)&&((O=k[w])!==void 0?!!O:g(k)=="RegExp")}},2190:(y,j,r)=>{var v=r(5005),g=r(614),w=r(7976),k=r(3307),O=Object;y.exports=k?function(C){return typeof C=="symbol"}:function(C){var S=v("Symbol");return g(S)&&w(S.prototype,O(C))}},408:(y,j,r)=>{var v=r(9974),g=r(6916),w=r(9670),k=r(6330),O=r(7659),C=r(6244),S=r(7976),T=r(4121),A=r(1246),R=r(9212),I=TypeError,$=function(B,q){this.stopped=B,this.result=q},M=$.prototype;y.exports=function(B,q,F){var N,U,H,X,Y,K,tt,it=F&&F.that,st=!(!F||!F.AS_ENTRIES),yt=!(!F||!F.IS_RECORD),ct=!(!F||!F.IS_ITERATOR),Et=!(!F||!F.INTERRUPTED),At=v(q,it),Vt=function(wt){return N&&R(N,"normal",wt),new $(!0,wt)},lt=function(wt){return st?(w(wt),Et?At(wt[0],wt[1],Vt):At(wt[0],wt[1])):Et?At(wt,Vt):At(wt)};if(yt)N=B.iterator;else if(ct)N=B;else{if(!(U=A(B)))throw I(k(B)+" is not iterable");if(O(U)){for(H=0,X=C(B);X>H;H++)if((Y=lt(B[H]))&&S(M,Y))return Y;return new $(!1)}N=T(B,U)}for(K=yt?B.next:N.next;!(tt=g(K,N)).done;){try{Y=lt(tt.value)}catch(wt){R(N,"throw",wt)}if(typeof Y=="object"&&Y&&S(M,Y))return Y}return new $(!1)}},9212:(y,j,r)=>{var v=r(6916),g=r(9670),w=r(8173);y.exports=function(k,O,C){var S,T;g(k);try{if(!(S=w(k,"return"))){if(O==="throw")throw C;return C}S=v(S,k)}catch(A){T=!0,S=A}if(O==="throw")throw C;if(T)throw S;return g(S),C}},3061:(y,j,r)=>{var v=r(3383).IteratorPrototype,g=r(30),w=r(9114),k=r(8003),O=r(7497),C=function(){return this};y.exports=function(S,T,A,R){var I=T+" Iterator";return S.prototype=g(v,{next:w(+!R,A)}),k(S,I,!1,!0),O[I]=C,S}},1656:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(1913),k=r(6530),O=r(614),C=r(3061),S=r(9518),T=r(7674),A=r(8003),R=r(8880),I=r(8052),$=r(5112),M=r(7497),B=r(3383),q=k.PROPER,F=k.CONFIGURABLE,N=B.IteratorPrototype,U=B.BUGGY_SAFARI_ITERATORS,H=$("iterator"),X="keys",Y="values",K="entries",tt=function(){return this};y.exports=function(it,st,yt,ct,Et,At,Vt){C(yt,st,ct);var lt,wt,_t,Ut=function(xt){if(xt===Et&&It)return It;if(!U&&xt in St)return St[xt];switch(xt){case X:case Y:case K:return function(){return new yt(this,xt)}}return function(){return new yt(this)}},Kt=st+" Iterator",fe=!1,St=it.prototype,jt=St[H]||St["@@iterator"]||Et&&St[Et],It=!U&&jt||Ut(Et),qt=st=="Array"&&St.entries||jt;if(qt&&(lt=S(qt.call(new it)))!==Object.prototype&<.next&&(w||S(lt)===N||(T?T(lt,N):O(lt[H])||I(lt,H,tt)),A(lt,Kt,!0,!0),w&&(M[Kt]=tt)),q&&Et==Y&&jt&&jt.name!==Y&&(!w&&F?R(St,"name",Y):(fe=!0,It=function(){return g(jt,this)})),Et)if(wt={values:Ut(Y),keys:At?It:Ut(X),entries:Ut(K)},Vt)for(_t in wt)(U||fe||!(_t in St))&&I(St,_t,wt[_t]);else v({target:st,proto:!0,forced:U||fe},wt);return w&&!Vt||St[H]===It||I(St,H,It,{name:Et}),M[st]=It,wt}},3383:(y,j,r)=>{var v,g,w,k=r(7293),O=r(614),C=r(111),S=r(30),T=r(9518),A=r(8052),R=r(5112),I=r(1913),$=R("iterator"),M=!1;[].keys&&("next"in(w=[].keys())?(g=T(T(w)))!==Object.prototype&&(v=g):M=!0),!C(v)||k(function(){var B={};return v[$].call(B)!==B})?v={}:I&&(v=S(v)),O(v[$])||A(v,$,function(){return this}),y.exports={IteratorPrototype:v,BUGGY_SAFARI_ITERATORS:M}},7497:y=>{y.exports={}},6244:(y,j,r)=>{var v=r(7466);y.exports=function(g){return v(g.length)}},6339:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(614),k=r(2597),O=r(9781),C=r(6530).CONFIGURABLE,S=r(2788),T=r(9909),A=T.enforce,R=T.get,I=String,$=Object.defineProperty,M=v("".slice),B=v("".replace),q=v([].join),F=O&&!g(function(){return $(function(){},"length",{value:8}).length!==8}),N=String(String).split("String"),U=y.exports=function(H,X,Y){M(I(X),0,7)==="Symbol("&&(X="["+B(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!k(H,"name")||C&&H.name!==X)&&(O?$(H,"name",{value:X,configurable:!0}):H.name=X),F&&Y&&k(Y,"arity")&&H.length!==Y.arity&&$(H,"length",{value:Y.arity});try{Y&&k(Y,"constructor")&&Y.constructor?O&&$(H,"prototype",{writable:!1}):H.prototype&&(H.prototype=void 0)}catch{}var K=A(H);return k(K,"source")||(K.source=q(N,typeof X=="string"?X:"")),H};Function.prototype.toString=U(function(){return w(this)&&R(this).source||S(this)},"toString")},4758:y=>{var j=Math.ceil,r=Math.floor;y.exports=Math.trunc||function(v){var g=+v;return(g>0?r:j)(g)}},5948:(y,j,r)=>{var v,g,w,k,O,C=r(7854),S=r(9974),T=r(1236).f,A=r(261).set,R=r(8572),I=r(8334),$=r(1528),M=r(1036),B=r(5268),q=C.MutationObserver||C.WebKitMutationObserver,F=C.document,N=C.process,U=C.Promise,H=T(C,"queueMicrotask"),X=H&&H.value;if(!X){var Y=new R,K=function(){var tt,it;for(B&&(tt=N.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&v(),st}tt&&tt.enter()};I||B||M||!q||!F?!$&&U&&U.resolve?((k=U.resolve(void 0)).constructor=U,O=S(k.then,k),v=function(){O(K)}):B?v=function(){N.nextTick(K)}:(A=S(A,C),v=function(){A(K)}):(g=!0,w=F.createTextNode(""),new q(K).observe(w,{characterData:!0}),v=function(){w.data=g=!g}),X=function(tt){Y.head||v(),Y.add(tt)}}y.exports=X},8523:(y,j,r)=>{var v=r(9662),g=TypeError,w=function(k){var O,C;this.promise=new k(function(S,T){if(O!==void 0||C!==void 0)throw g("Bad Promise constructor");O=S,C=T}),this.resolve=v(O),this.reject=v(C)};y.exports.f=function(k){return new w(k)}},3929:(y,j,r)=>{var v=r(7850),g=TypeError;y.exports=function(w){if(v(w))throw g("The method doesn't accept regular expressions");return w}},2814:(y,j,r)=>{var v=r(7854),g=r(7293),w=r(1702),k=r(1340),O=r(3111).trim,C=r(1361),S=w("".charAt),T=v.parseFloat,A=v.Symbol,R=A&&A.iterator,I=1/T(C+"-0")!=-1/0||R&&!g(function(){T(Object(R))});y.exports=I?function($){var M=O(k($)),B=T(M);return B===0&&S(M,0)=="-"?-0:B}:T},3009:(y,j,r)=>{var v=r(7854),g=r(7293),w=r(1702),k=r(1340),O=r(3111).trim,C=r(1361),S=v.parseInt,T=v.Symbol,A=T&&T.iterator,R=/^[+-]?0x/i,I=w(R.exec),$=S(C+"08")!==8||S(C+"0x16")!==22||A&&!g(function(){S(Object(A))});y.exports=$?function(M,B){var q=O(k(M));return S(q,B>>>0||(I(R,q)?16:10))}:S},1574:(y,j,r)=>{var v=r(9781),g=r(1702),w=r(6916),k=r(7293),O=r(1956),C=r(5181),S=r(5296),T=r(7908),A=r(8361),R=Object.assign,I=Object.defineProperty,$=g([].concat);y.exports=!R||k(function(){if(v&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},B={},q=Symbol(),F="abcdefghijklmnopqrst";return M[q]=7,F.split("").forEach(function(N){B[N]=N}),R({},M)[q]!=7||O(R({},B)).join("")!=F})?function(M,B){for(var q=T(M),F=arguments.length,N=1,U=C.f,H=S.f;F>N;)for(var X,Y=A(arguments[N++]),K=U?$(O(Y),U(Y)):O(Y),tt=K.length,it=0;tt>it;)X=K[it++],v&&!w(H,Y,X)||(q[X]=Y[X]);return q}:R},30:(y,j,r)=>{var v,g=r(9670),w=r(6048),k=r(748),O=r(3501),C=r(490),S=r(317),T=r(6200),A="prototype",R="script",I=T("IE_PROTO"),$=function(){},M=function(F){return"<"+R+">"+F+"</"+R+">"},B=function(F){F.write(M("")),F.close();var N=F.parentWindow.Object;return F=null,N},q=function(){try{v=new ActiveXObject("htmlfile")}catch{}var F,N,U;q=typeof document<"u"?document.domain&&v?B(v):(N=S("iframe"),U="java"+R+":",N.style.display="none",C.appendChild(N),N.src=String(U),(F=N.contentWindow.document).open(),F.write(M("document.F=Object")),F.close(),F.F):B(v);for(var H=k.length;H--;)delete q[A][k[H]];return q()};O[I]=!0,y.exports=Object.create||function(F,N){var U;return F!==null?($[A]=g(F),U=new $,$[A]=null,U[I]=F):U=q(),N===void 0?U:w.f(U,N)}},6048:(y,j,r)=>{var v=r(9781),g=r(3353),w=r(3070),k=r(9670),O=r(5656),C=r(1956);j.f=v&&!g?Object.defineProperties:function(S,T){k(S);for(var A,R=O(T),I=C(T),$=I.length,M=0;$>M;)w.f(S,A=I[M++],R[A]);return S}},3070:(y,j,r)=>{var v=r(9781),g=r(4664),w=r(3353),k=r(9670),O=r(4948),C=TypeError,S=Object.defineProperty,T=Object.getOwnPropertyDescriptor,A="enumerable",R="configurable",I="writable";j.f=v?w?function($,M,B){if(k($),M=O(M),k(B),typeof $=="function"&&M==="prototype"&&"value"in B&&I in B&&!B[I]){var q=T($,M);q&&q[I]&&($[M]=B.value,B={configurable:R in B?B[R]:q[R],enumerable:A in B?B[A]:q[A],writable:!1})}return S($,M,B)}:S:function($,M,B){if(k($),M=O(M),k(B),g)try{return S($,M,B)}catch{}if("get"in B||"set"in B)throw C("Accessors not supported");return"value"in B&&($[M]=B.value),$}},1236:(y,j,r)=>{var v=r(9781),g=r(6916),w=r(5296),k=r(9114),O=r(5656),C=r(4948),S=r(2597),T=r(4664),A=Object.getOwnPropertyDescriptor;j.f=v?A:function(R,I){if(R=O(R),I=C(I),T)try{return A(R,I)}catch{}if(S(R,I))return k(!g(w.f,R,I),R[I])}},1156:(y,j,r)=>{var v=r(4326),g=r(5656),w=r(8006).f,k=r(1589),O=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];y.exports.f=function(C){return O&&v(C)=="Window"?function(S){try{return w(S)}catch{return k(O)}}(C):w(g(C))}},8006:(y,j,r)=>{var v=r(6324),g=r(748).concat("length","prototype");j.f=Object.getOwnPropertyNames||function(w){return v(w,g)}},5181:(y,j)=>{j.f=Object.getOwnPropertySymbols},9518:(y,j,r)=>{var v=r(2597),g=r(614),w=r(7908),k=r(6200),O=r(8544),C=k("IE_PROTO"),S=Object,T=S.prototype;y.exports=O?S.getPrototypeOf:function(A){var R=w(A);if(v(R,C))return R[C];var I=R.constructor;return g(I)&&R instanceof I?I.prototype:R instanceof S?T:null}},7976:(y,j,r)=>{var v=r(1702);y.exports=v({}.isPrototypeOf)},6324:(y,j,r)=>{var v=r(1702),g=r(2597),w=r(5656),k=r(1318).indexOf,O=r(3501),C=v([].push);y.exports=function(S,T){var A,R=w(S),I=0,$=[];for(A in R)!g(O,A)&&g(R,A)&&C($,A);for(;T.length>I;)g(R,A=T[I++])&&(~k($,A)||C($,A));return $}},1956:(y,j,r)=>{var v=r(6324),g=r(748);y.exports=Object.keys||function(w){return v(w,g)}},5296:(y,j)=>{var r={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,g=v&&!r.call({1:2},1);j.f=g?function(w){var k=v(this,w);return!!k&&k.enumerable}:r},7674:(y,j,r)=>{var v=r(5668),g=r(9670),w=r(6077);y.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var k,O=!1,C={};try{(k=v(Object.prototype,"__proto__","set"))(C,[]),O=C instanceof Array}catch{}return function(S,T){return g(S),w(T),O?k(S,T):S.__proto__=T,S}}():void 0)},4699:(y,j,r)=>{var v=r(9781),g=r(1702),w=r(1956),k=r(5656),O=g(r(5296).f),C=g([].push),S=function(T){return function(A){for(var R,I=k(A),$=w(I),M=$.length,B=0,q=[];M>B;)R=$[B++],v&&!O(I,R)||C(q,T?[R,I[R]]:I[R]);return q}};y.exports={entries:S(!0),values:S(!1)}},288:(y,j,r)=>{var v=r(1694),g=r(648);y.exports=v?{}.toString:function(){return"[object "+g(this)+"]"}},2140:(y,j,r)=>{var v=r(6916),g=r(614),w=r(111),k=TypeError;y.exports=function(O,C){var S,T;if(C==="string"&&g(S=O.toString)&&!w(T=v(S,O))||g(S=O.valueOf)&&!w(T=v(S,O))||C!=="string"&&g(S=O.toString)&&!w(T=v(S,O)))return T;throw k("Can't convert object to primitive value")}},3887:(y,j,r)=>{var v=r(5005),g=r(1702),w=r(8006),k=r(5181),O=r(9670),C=g([].concat);y.exports=v("Reflect","ownKeys")||function(S){var T=w.f(O(S)),A=k.f;return A?C(T,A(S)):T}},857:(y,j,r)=>{var v=r(7854);y.exports=v},2534:y=>{y.exports=function(j){try{return{error:!1,value:j()}}catch(r){return{error:!0,value:r}}}},3702:(y,j,r)=>{var v=r(7854),g=r(2492),w=r(614),k=r(4705),O=r(2788),C=r(5112),S=r(7871),T=r(3823),A=r(1913),R=r(7392),I=g&&g.prototype,$=C("species"),M=!1,B=w(v.PromiseRejectionEvent),q=k("Promise",function(){var F=O(g),N=F!==String(g);if(!N&&R===66||A&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(F)){var U=new g(function(X){X(1)}),H=function(X){X(function(){},function(){})};if((U.constructor={})[$]=H,!(M=U.then(function(){})instanceof H))return!0}return!N&&(S||T)&&!B});y.exports={CONSTRUCTOR:q,REJECTION_EVENT:B,SUBCLASSING:M}},2492:(y,j,r)=>{var v=r(7854);y.exports=v.Promise},9478:(y,j,r)=>{var v=r(9670),g=r(111),w=r(8523);y.exports=function(k,O){if(v(k),g(O)&&O.constructor===k)return O;var C=w.f(k);return(0,C.resolve)(O),C.promise}},612:(y,j,r)=>{var v=r(2492),g=r(7072),w=r(3702).CONSTRUCTOR;y.exports=w||!g(function(k){v.all(k).then(void 0,function(){})})},2626:(y,j,r)=>{var v=r(3070).f;y.exports=function(g,w,k){k in g||v(g,k,{configurable:!0,get:function(){return w[k]},set:function(O){w[k]=O}})}},8572:y=>{var j=function(){this.head=null,this.tail=null};j.prototype={add:function(r){var v={item:r,next:null},g=this.tail;g?g.next=v:this.head=v,this.tail=v},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}},y.exports=j},7651:(y,j,r)=>{var v=r(6916),g=r(9670),w=r(614),k=r(4326),O=r(2261),C=TypeError;y.exports=function(S,T){var A=S.exec;if(w(A)){var R=v(A,S,T);return R!==null&&g(R),R}if(k(S)==="RegExp")return v(O,S,T);throw C("RegExp#exec called on incompatible receiver")}},2261:(y,j,r)=>{var v,g,w=r(6916),k=r(1702),O=r(1340),C=r(7066),S=r(2999),T=r(2309),A=r(30),R=r(9909).get,I=r(9441),$=r(7168),M=T("native-string-replace",String.prototype.replace),B=RegExp.prototype.exec,q=B,F=k("".charAt),N=k("".indexOf),U=k("".replace),H=k("".slice),X=(g=/b*/g,w(B,v=/a/,"a"),w(B,g,"a"),v.lastIndex!==0||g.lastIndex!==0),Y=S.BROKEN_CARET,K=/()??/.exec("")[1]!==void 0;(X||K||Y||I||$)&&(q=function(tt){var it,st,yt,ct,Et,At,Vt,lt=this,wt=R(lt),_t=O(tt),Ut=wt.raw;if(Ut)return Ut.lastIndex=lt.lastIndex,it=w(q,Ut,_t),lt.lastIndex=Ut.lastIndex,it;var Kt=wt.groups,fe=Y&<.sticky,St=w(C,lt),jt=lt.source,It=0,qt=_t;if(fe&&(St=U(St,"y",""),N(St,"g")===-1&&(St+="g"),qt=H(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&F(_t,lt.lastIndex-1)!==`
|
|
71
|
-
`)
|
|
72
|
-
`)&&w.flags==="s")})},7168:(y,j,r)=>{var v=r(7293),g=r(7854).RegExp;y.exports=v(function(){var w=g("(?<a>b)","g");return w.exec("b").groups.a!=="b"||"b".replace(w,"$<a>c")!=="bc"})},4488:(y,j,r)=>{var v=r(8554),g=TypeError;y.exports=function(w){if(v(w))throw g("Can't call method on "+w);return w}},7152:(y,j,r)=>{var v,g=r(7854),w=r(2104),k=r(614),O=r(9363),C=r(8113),S=r(206),T=r(8053),A=g.Function,R=/MSIE .\./.test(C)||O&&((v=g.Bun.version.split(".")).length<3||v[0]==0&&(v[1]<3||v[1]==3&&v[2]==0));y.exports=function(I,$){var M=$?2:1;return R?function(B,q){var F=T(arguments.length,1)>M,N=k(B)?B:A(B),U=F?S(arguments,M):[],H=F?function(){w(N,this,U)}:N;return $?I(H,q):I(H)}:I}},6340:(y,j,r)=>{var v=r(5005),g=r(7045),w=r(5112),k=r(9781),O=w("species");y.exports=function(C){var S=v(C);k&&S&&!S[O]&&g(S,O,{configurable:!0,get:function(){return this}})}},8003:(y,j,r)=>{var v=r(3070).f,g=r(2597),w=r(5112)("toStringTag");y.exports=function(k,O,C){k&&!C&&(k=k.prototype),k&&!g(k,w)&&v(k,w,{configurable:!0,value:O})}},6200:(y,j,r)=>{var v=r(2309),g=r(9711),w=v("keys");y.exports=function(k){return w[k]||(w[k]=g(k))}},5465:(y,j,r)=>{var v=r(7854),g=r(3072),w="__core-js_shared__",k=v[w]||g(w,{});y.exports=k},2309:(y,j,r)=>{var v=r(1913),g=r(5465);(y.exports=function(w,k){return g[w]||(g[w]=k!==void 0?k:{})})("versions",[]).push({version:"3.29.0",mode:v?"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:(y,j,r)=>{var v=r(9670),g=r(9483),w=r(8554),k=r(5112)("species");y.exports=function(O,C){var S,T=v(O).constructor;return T===void 0||w(S=v(T)[k])?C:g(S)}},8710:(y,j,r)=>{var v=r(1702),g=r(9303),w=r(1340),k=r(4488),O=v("".charAt),C=v("".charCodeAt),S=v("".slice),T=function(A){return function(R,I){var $,M,B=w(k(R)),q=g(I),F=B.length;return q<0||q>=F?A?"":void 0:($=C(B,q))<55296||$>56319||q+1===F||(M=C(B,q+1))<56320||M>57343?A?O(B,q):$:A?S(B,q,q+2):M-56320+($-55296<<10)+65536}};y.exports={codeAt:T(!1),charAt:T(!0)}},6650:(y,j,r)=>{var v=r(1702),g=r(7466),w=r(1340),k=r(8415),O=r(4488),C=v(k),S=v("".slice),T=Math.ceil,A=function(R){return function(I,$,M){var B,q,F=w(O(I)),N=g($),U=F.length,H=M===void 0?" ":w(M);return N<=U||H==""?F:((q=C(H,T((B=N-U)/H.length))).length>B&&(q=S(q,0,B)),R?F+q:q+F)}};y.exports={start:A(!1),end:A(!0)}},8415:(y,j,r)=>{var v=r(9303),g=r(1340),w=r(4488),k=RangeError;y.exports=function(O){var C=g(w(this)),S="",T=v(O);if(T<0||T==1/0)throw k("Wrong number of repetitions");for(;T>0;(T>>>=1)&&(C+=C))1&T&&(S+=C);return S}},6091:(y,j,r)=>{var v=r(6530).PROPER,g=r(7293),w=r(1361);y.exports=function(k){return g(function(){return!!w[k]()||"
"[k]()!=="
"||v&&w[k].name!==k})}},3111:(y,j,r)=>{var v=r(1702),g=r(4488),w=r(1340),k=r(1361),O=v("".replace),C=RegExp("^["+k+"]+"),S=RegExp("(^|[^"+k+"])["+k+"]+$"),T=function(A){return function(R){var I=w(g(R));return 1&A&&(I=O(I,C,"")),2&A&&(I=O(I,S,"$1")),I}};y.exports={start:T(1),end:T(2),trim:T(3)}},6293:(y,j,r)=>{var v=r(7392),g=r(7293);y.exports=!!Object.getOwnPropertySymbols&&!g(function(){var w=Symbol();return!String(w)||!(Object(w)instanceof Symbol)||!Symbol.sham&&v&&v<41})},6532:(y,j,r)=>{var v=r(6916),g=r(5005),w=r(5112),k=r(8052);y.exports=function(){var O=g("Symbol"),C=O&&O.prototype,S=C&&C.valueOf,T=w("toPrimitive");C&&!C[T]&&k(C,T,function(A){return v(S,this)},{arity:1})}},2015:(y,j,r)=>{var v=r(6293);y.exports=v&&!!Symbol.for&&!!Symbol.keyFor},261:(y,j,r)=>{var v,g,w,k,O=r(7854),C=r(2104),S=r(9974),T=r(614),A=r(2597),R=r(7293),I=r(490),$=r(206),M=r(317),B=r(8053),q=r(8334),F=r(5268),N=O.setImmediate,U=O.clearImmediate,H=O.process,X=O.Dispatch,Y=O.Function,K=O.MessageChannel,tt=O.String,it=0,st={},yt="onreadystatechange";R(function(){v=O.location});var ct=function(lt){if(A(st,lt)){var wt=st[lt];delete st[lt],wt()}},Et=function(lt){return function(){ct(lt)}},At=function(lt){ct(lt.data)},Vt=function(lt){O.postMessage(tt(lt),v.protocol+"//"+v.host)};N&&U||(N=function(lt){B(arguments.length,1);var wt=T(lt)?lt:Y(lt),_t=$(arguments,1);return st[++it]=function(){C(wt,void 0,_t)},g(it),it},U=function(lt){delete st[lt]},F?g=function(lt){H.nextTick(Et(lt))}:X&&X.now?g=function(lt){X.now(Et(lt))}:K&&!q?(k=(w=new K).port2,w.port1.onmessage=At,g=S(k.postMessage,k)):O.addEventListener&&T(O.postMessage)&&!O.importScripts&&v&&v.protocol!=="file:"&&!R(Vt)?(g=Vt,O.addEventListener("message",At,!1)):g=yt in M("script")?function(lt){I.appendChild(M("script"))[yt]=function(){I.removeChild(this),ct(lt)}}:function(lt){setTimeout(Et(lt),0)}),y.exports={set:N,clear:U}},863:(y,j,r)=>{var v=r(1702);y.exports=v(1 .valueOf)},1400:(y,j,r)=>{var v=r(9303),g=Math.max,w=Math.min;y.exports=function(k,O){var C=v(k);return C<0?g(C+O,0):w(C,O)}},5656:(y,j,r)=>{var v=r(8361),g=r(4488);y.exports=function(w){return v(g(w))}},9303:(y,j,r)=>{var v=r(4758);y.exports=function(g){var w=+g;return w!=w||w===0?0:v(w)}},7466:(y,j,r)=>{var v=r(9303),g=Math.min;y.exports=function(w){return w>0?g(v(w),9007199254740991):0}},7908:(y,j,r)=>{var v=r(4488),g=Object;y.exports=function(w){return g(v(w))}},7593:(y,j,r)=>{var v=r(6916),g=r(111),w=r(2190),k=r(8173),O=r(2140),C=r(5112),S=TypeError,T=C("toPrimitive");y.exports=function(A,R){if(!g(A)||w(A))return A;var I,$=k(A,T);if($){if(R===void 0&&(R="default"),I=v($,A,R),!g(I)||w(I))return I;throw S("Can't convert object to primitive value")}return R===void 0&&(R="number"),O(A,R)}},4948:(y,j,r)=>{var v=r(7593),g=r(2190);y.exports=function(w){var k=v(w,"string");return g(k)?k:k+""}},1694:(y,j,r)=>{var v={};v[r(5112)("toStringTag")]="z",y.exports=String(v)==="[object z]"},1340:(y,j,r)=>{var v=r(648),g=String;y.exports=function(w){if(v(w)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return g(w)}},6330:y=>{var j=String;y.exports=function(r){try{return j(r)}catch{return"Object"}}},9711:(y,j,r)=>{var v=r(1702),g=0,w=Math.random(),k=v(1 .toString);y.exports=function(O){return"Symbol("+(O===void 0?"":O)+")_"+k(++g+w,36)}},3307:(y,j,r)=>{var v=r(6293);y.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3353:(y,j,r)=>{var v=r(9781),g=r(7293);y.exports=v&&g(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},8053:y=>{var j=TypeError;y.exports=function(r,v){if(r<v)throw j("Not enough arguments");return r}},4811:(y,j,r)=>{var v=r(7854),g=r(614),w=v.WeakMap;y.exports=g(w)&&/native code/.test(String(w))},6800:(y,j,r)=>{var v=r(857),g=r(2597),w=r(6061),k=r(3070).f;y.exports=function(O){var C=v.Symbol||(v.Symbol={});g(C,O)||k(C,O,{value:w.f(O)})}},6061:(y,j,r)=>{var v=r(5112);j.f=v},5112:(y,j,r)=>{var v=r(7854),g=r(2309),w=r(2597),k=r(9711),O=r(6293),C=r(3307),S=v.Symbol,T=g("wks"),A=C?S.for||S:S&&S.withoutSetter||k;y.exports=function(R){return w(T,R)||(T[R]=O&&w(S,R)?S[R]:A("Symbol."+R)),T[R]}},1361:y=>{y.exports=`
|
|
73
|
-
\v\f\r \u2028\u2029\uFEFF`},2222:(y,j,r)=>{var v=r(2109),g=r(7293),w=r(3157),k=r(111),O=r(7908),C=r(6244),S=r(7207),T=r(6135),A=r(5417),R=r(1194),I=r(5112),$=r(7392),M=I("isConcatSpreadable"),B=$>=51||!g(function(){var F=[];return F[M]=!1,F.concat()[0]!==F}),q=function(F){if(!k(F))return!1;var N=F[M];return N!==void 0?!!N:w(F)};v({target:"Array",proto:!0,arity:1,forced:!B||!R("concat")},{concat:function(F){var N,U,H,X,Y,K=O(this),tt=A(K,0),it=0;for(N=-1,H=arguments.length;N<H;N++)if(q(Y=N===-1?K:arguments[N]))for(X=C(Y),S(it+X),U=0;U<X;U++,it++)U in Y&&T(tt,it,Y[U]);else S(it+1),T(tt,it++,Y);return tt.length=it,tt}})},6541:(y,j,r)=>{var v=r(2109),g=r(2092).every;v({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},7327:(y,j,r)=>{var v=r(2109),g=r(2092).filter;v({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},9826:(y,j,r)=>{var v=r(2109),g=r(2092).find,w=r(1223),k="find",O=!0;k in[]&&Array(1)[k](function(){O=!1}),v({target:"Array",proto:!0,forced:O},{find:function(C){return g(this,C,arguments.length>1?arguments[1]:void 0)}}),w(k)},9554:(y,j,r)=>{var v=r(2109),g=r(8533);v({target:"Array",proto:!0,forced:[].forEach!=g},{forEach:g})},1038:(y,j,r)=>{var v=r(2109),g=r(8457);v({target:"Array",stat:!0,forced:!r(7072)(function(w){Array.from(w)})},{from:g})},6699:(y,j,r)=>{var v=r(2109),g=r(1318).includes,w=r(7293),k=r(1223);v({target:"Array",proto:!0,forced:w(function(){return!Array(1).includes()})},{includes:function(O){return g(this,O,arguments.length>1?arguments[1]:void 0)}}),k("includes")},2772:(y,j,r)=>{var v=r(2109),g=r(1470),w=r(1318).indexOf,k=r(9341),O=g([].indexOf),C=!!O&&1/O([1],1,-0)<0;v({target:"Array",proto:!0,forced:C||!k("indexOf")},{indexOf:function(S){var T=arguments.length>1?arguments[1]:void 0;return C?O(this,S,T)||0:w(this,S,T)}})},9753:(y,j,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(y,j,r)=>{var v=r(5656),g=r(1223),w=r(7497),k=r(9909),O=r(3070).f,C=r(1656),S=r(6178),T=r(1913),A=r(9781),R="Array Iterator",I=k.set,$=k.getterFor(R);y.exports=C(Array,"Array",function(B,q){I(this,{type:R,target:v(B),index:0,kind:q})},function(){var B=$(this),q=B.target,F=B.kind,N=B.index++;return!q||N>=q.length?(B.target=void 0,S(void 0,!0)):S(F=="keys"?N:F=="values"?q[N]:[N,q[N]],!1)},"values");var M=w.Arguments=w.Array;if(g("keys"),g("values"),g("entries"),!T&&A&&M.name!=="values")try{O(M,"name",{value:"values"})}catch{}},9600:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(8361),k=r(5656),O=r(9341),C=g([].join);v({target:"Array",proto:!0,forced:w!=Object||!O("join",",")},{join:function(S){return C(k(this),S===void 0?",":S)}})},1249:(y,j,r)=>{var v=r(2109),g=r(2092).map;v({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},5827:(y,j,r)=>{var v=r(2109),g=r(3671).left,w=r(9341),k=r(7392);v({target:"Array",proto:!0,forced:!r(5268)&&k>79&&k<83||!w("reduce")},{reduce:function(O){var C=arguments.length;return g(this,O,C,C>1?arguments[1]:void 0)}})},5069:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(3157),k=g([].reverse),O=[1,2];v({target:"Array",proto:!0,forced:String(O)===String(O.reverse())},{reverse:function(){return w(this)&&(this.length=this.length),k(this)}})},7042:(y,j,r)=>{var v=r(2109),g=r(3157),w=r(4411),k=r(111),O=r(1400),C=r(6244),S=r(5656),T=r(6135),A=r(5112),R=r(1194),I=r(206),$=R("slice"),M=A("species"),B=Array,q=Math.max;v({target:"Array",proto:!0,forced:!$},{slice:function(F,N){var U,H,X,Y=S(this),K=C(Y),tt=O(F,K),it=O(N===void 0?K:N,K);if(g(Y)&&(U=Y.constructor,(w(U)&&(U===B||g(U.prototype))||k(U)&&(U=U[M])===null)&&(U=void 0),U===B||U===void 0))return I(Y,tt,it);for(H=new(U===void 0?B:U)(q(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(H,X,Y[tt]);return H.length=X,H}})},5212:(y,j,r)=>{var v=r(2109),g=r(2092).some;v({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},2707:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(9662),k=r(7908),O=r(6244),C=r(5117),S=r(1340),T=r(7293),A=r(4362),R=r(9341),I=r(8886),$=r(256),M=r(7392),B=r(8008),q=[],F=g(q.sort),N=g(q.push),U=T(function(){q.sort(void 0)}),H=T(function(){q.sort(null)}),X=R("sort"),Y=!T(function(){if(M)return M<70;if(!(I&&I>3)){if($)return!0;if(B)return B<603;var K,tt,it,st,yt="";for(K=65;K<76;K++){switch(tt=String.fromCharCode(K),K){case 66:case 69:case 70:case 72:it=3;break;case 68:case 71:it=4;break;default:it=2}for(st=0;st<47;st++)q.push({k:tt+st,v:it})}for(q.sort(function(ct,Et){return Et.v-ct.v}),st=0;st<q.length;st++)tt=q[st].k.charAt(0),yt.charAt(yt.length-1)!==tt&&(yt+=tt);return yt!=="DGBEFHACIJK"}});v({target:"Array",proto:!0,forced:U||!H||!X||!Y},{sort:function(K){K!==void 0&&w(K);var tt=k(this);if(Y)return K===void 0?F(tt):F(tt,K);var it,st,yt=[],ct=O(tt);for(st=0;st<ct;st++)st in tt&&N(yt,tt[st]);for(A(yt,function(Et){return function(At,Vt){return Vt===void 0?-1:At===void 0?1:Et!==void 0?+Et(At,Vt)||0:S(At)>S(Vt)?1:-1}}(K)),it=O(yt),st=0;st<it;)tt[st]=yt[st++];for(;st<ct;)C(tt,st++);return tt}})},561:(y,j,r)=>{var v=r(2109),g=r(7908),w=r(1400),k=r(9303),O=r(6244),C=r(3658),S=r(7207),T=r(5417),A=r(6135),R=r(5117),I=r(1194)("splice"),$=Math.max,M=Math.min;v({target:"Array",proto:!0,forced:!I},{splice:function(B,q){var F,N,U,H,X,Y,K=g(this),tt=O(K),it=w(B,tt),st=arguments.length;for(st===0?F=N=0:st===1?(F=0,N=tt-it):(F=st-2,N=M($(k(q),0),tt-it)),S(tt+F-N),U=T(K,N),H=0;H<N;H++)(X=it+H)in K&&A(U,H,K[X]);if(U.length=N,F<N){for(H=it;H<tt-N;H++)Y=H+F,(X=H+N)in K?K[Y]=K[X]:R(K,Y);for(H=tt;H>tt-N+F;H--)R(K,H-1)}else if(F>N)for(H=tt-N;H>it;H--)Y=H+F-1,(X=H+N-1)in K?K[Y]=K[X]:R(K,Y);for(H=0;H<F;H++)K[H+it]=arguments[H+2];return C(K,tt-N+F),U}})},3843:(y,j,r)=>{var v=r(2109),g=r(1702),w=Date,k=g(w.prototype.getTime);v({target:"Date",stat:!0},{now:function(){return k(new w)}})},8733:(y,j,r)=>{var v=r(2109),g=r(5573);v({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})},6078:(y,j,r)=>{var v=r(2597),g=r(8052),w=r(8709),k=r(5112)("toPrimitive"),O=Date.prototype;v(O,k)||g(O,k,w)},3710:(y,j,r)=>{var v=r(1702),g=r(8052),w=Date.prototype,k="Invalid Date",O="toString",C=v(w[O]),S=v(w.getTime);String(new Date(NaN))!=k&&g(w,O,function(){var T=S(this);return T==T?C(this):k})},4812:(y,j,r)=>{var v=r(2109),g=r(7065);v({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})},8309:(y,j,r)=>{var v=r(9781),g=r(6530).EXISTS,w=r(1702),k=r(7045),O=Function.prototype,C=w(O.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=w(S.exec);v&&!g&&k(O,"name",{configurable:!0,get:function(){try{return T(S,C(this))[1]}catch{return""}}})},8862:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(2104),k=r(6916),O=r(1702),C=r(7293),S=r(614),T=r(2190),A=r(206),R=r(8044),I=r(6293),$=String,M=g("JSON","stringify"),B=O(/./.exec),q=O("".charAt),F=O("".charCodeAt),N=O("".replace),U=O(1 .toString),H=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,K=!I||C(function(){var yt=g("Symbol")();return M([yt])!="[null]"||M({a:yt})!="{}"||M(Object(yt))!="{}"}),tt=C(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),it=function(yt,ct){var Et=A(arguments),At=R(ct);if(S(At)||yt!==void 0&&!T(yt))return Et[1]=function(Vt,lt){if(S(At)&&(lt=k(At,this,$(Vt),lt)),!T(lt))return lt},w(M,null,Et)},st=function(yt,ct,Et){var At=q(Et,ct-1),Vt=q(Et,ct+1);return B(X,yt)&&!B(Y,Vt)||B(Y,yt)&&!B(X,At)?"\\u"+U(F(yt,0),16):yt};M&&v({target:"JSON",stat:!0,arity:3,forced:K||tt},{stringify:function(yt,ct,Et){var At=A(arguments),Vt=w(K?it:M,null,At);return tt&&typeof Vt=="string"?N(Vt,H,st):Vt}})},3706:(y,j,r)=>{var v=r(7854);r(8003)(v.JSON,"JSON",!0)},2703:(y,j,r)=>{r(8003)(Math,"Math",!0)},9653:(y,j,r)=>{var v=r(2109),g=r(1913),w=r(9781),k=r(7854),O=r(857),C=r(1702),S=r(4705),T=r(2597),A=r(9587),R=r(7976),I=r(2190),$=r(7593),M=r(7293),B=r(8006).f,q=r(1236).f,F=r(3070).f,N=r(863),U=r(3111).trim,H="Number",X=k[H],Y=O[H],K=X.prototype,tt=k.TypeError,it=C("".slice),st=C("".charCodeAt),yt=function(wt){var _t=$(wt,"number");return typeof _t=="bigint"?_t:ct(_t)},ct=function(wt){var _t,Ut,Kt,fe,St,jt,It,qt,xt=$(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=U(xt),(_t=st(xt,0))===43||_t===45){if((Ut=st(xt,2))===88||Ut===120)return NaN}else if(_t===48){switch(st(xt,1)){case 66:case 98:Kt=2,fe=49;break;case 79:case 111:Kt=8,fe=55;break;default:return+xt}for(jt=(St=it(xt,2)).length,It=0;It<jt;It++)if((qt=st(St,It))<48||qt>fe)return NaN;return parseInt(St,Kt)}}return+xt},Et=S(H,!X(" 0o1")||!X("0b1")||X("+0x1")),At=function(wt){return R(K,wt)&&M(function(){N(wt)})},Vt=function(wt){var _t=arguments.length<1?0:X(yt(wt));return At(this)?A(Object(_t),this,Vt):_t};Vt.prototype=K,Et&&!g&&(K.constructor=Vt),v({global:!0,constructor:!0,wrap:!0,forced:Et},{Number:Vt});var lt=function(wt,_t){for(var Ut,Kt=w?B(_t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),fe=0;Kt.length>fe;fe++)T(_t,Ut=Kt[fe])&&!T(wt,Ut)&&F(wt,Ut,q(_t,Ut))};g&&Y&<(O[H],Y),(Et||g)&<(O[H],X)},6977:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(9303),k=r(863),O=r(8415),C=r(7293),S=RangeError,T=String,A=Math.floor,R=g(O),I=g("".slice),$=g(1 .toFixed),M=function(N,U,H){return U===0?H:U%2==1?M(N,U-1,H*N):M(N*N,U/2,H)},B=function(N,U,H){for(var X=-1,Y=H;++X<6;)Y+=U*N[X],N[X]=Y%1e7,Y=A(Y/1e7)},q=function(N,U){for(var H=6,X=0;--H>=0;)X+=N[H],N[H]=A(X/U),X=X%U*1e7},F=function(N){for(var U=6,H="";--U>=0;)if(H!==""||U===0||N[U]!==0){var X=T(N[U]);H=H===""?X:H+R("0",7-X.length)+X}return H};v({target:"Number",proto:!0,forced:C(function(){return $(8e-5,3)!=="0.000"||$(.9,0)!=="1"||$(1.255,2)!=="1.25"||$(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!C(function(){$({})})},{toFixed:function(N){var U,H,X,Y,K=k(this),tt=w(N),it=[0,0,0,0,0,0],st="",yt="0";if(tt<0||tt>20)throw S("Incorrect fraction digits");if(K!=K)return"NaN";if(K<=-1e21||K>=1e21)return T(K);if(K<0&&(st="-",K=-K),K>1e-21)if(H=(U=function(ct){for(var Et=0,At=ct;At>=4096;)Et+=12,At/=4096;for(;At>=2;)Et+=1,At/=2;return Et}(K*M(2,69,1))-69)<0?K*M(2,-U,1):K/M(2,U,1),H*=4503599627370496,(U=52-U)>0){for(B(it,0,H),X=tt;X>=7;)B(it,1e7,0),X-=7;for(B(it,M(10,X,1),0),X=U-1;X>=23;)q(it,8388608),X-=23;q(it,1<<X),B(it,1,1),q(it,2),yt=F(it)}else B(it,0,H),B(it,1<<-U,0),yt=F(it)+R("0",tt);return tt>0?st+((Y=yt.length)<=tt?"0."+R("0",tt-Y)+yt:I(yt,0,Y-tt)+"."+I(yt,Y-tt)):st+yt}})},9601:(y,j,r)=>{var v=r(2109),g=r(1574);v({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})},8011:(y,j,r)=>{r(2109)({target:"Object",stat:!0,sham:!r(9781)},{create:r(30)})},3321:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(6048).f;v({target:"Object",stat:!0,forced:Object.defineProperties!==w,sham:!g},{defineProperties:w})},9070:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(3070).f;v({target:"Object",stat:!0,forced:Object.defineProperty!==w,sham:!g},{defineProperty:w})},9720:(y,j,r)=>{var v=r(2109),g=r(4699).entries;v({target:"Object",stat:!0},{entries:function(w){return g(w)}})},5003:(y,j,r)=>{var v=r(2109),g=r(7293),w=r(5656),k=r(1236).f,O=r(9781);v({target:"Object",stat:!0,forced:!O||g(function(){k(1)}),sham:!O},{getOwnPropertyDescriptor:function(C,S){return k(w(C),S)}})},9337:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(3887),k=r(5656),O=r(1236),C=r(6135);v({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(S){for(var T,A,R=k(S),I=O.f,$=w(R),M={},B=0;$.length>B;)(A=I(R,T=$[B++]))!==void 0&&C(M,T,A);return M}})},9660:(y,j,r)=>{var v=r(2109),g=r(6293),w=r(7293),k=r(5181),O=r(7908);v({target:"Object",stat:!0,forced:!g||w(function(){k.f(1)})},{getOwnPropertySymbols:function(C){var S=k.f;return S?S(O(C)):[]}})},489:(y,j,r)=>{var v=r(2109),g=r(7293),w=r(7908),k=r(9518),O=r(8544);v({target:"Object",stat:!0,forced:g(function(){k(1)}),sham:!O},{getPrototypeOf:function(C){return k(w(C))}})},7941:(y,j,r)=>{var v=r(2109),g=r(7908),w=r(1956);v({target:"Object",stat:!0,forced:r(7293)(function(){w(1)})},{keys:function(k){return w(g(k))}})},8304:(y,j,r)=>{r(2109)({target:"Object",stat:!0},{setPrototypeOf:r(7674)})},1539:(y,j,r)=>{var v=r(1694),g=r(8052),w=r(288);v||g(Object.prototype,"toString",w,{unsafe:!0})},6833:(y,j,r)=>{var v=r(2109),g=r(4699).values;v({target:"Object",stat:!0},{values:function(w){return g(w)}})},4678:(y,j,r)=>{var v=r(2109),g=r(2814);v({global:!0,forced:parseFloat!=g},{parseFloat:g})},1058:(y,j,r)=>{var v=r(2109),g=r(3009);v({global:!0,forced:parseInt!=g},{parseInt:g})},821:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(9662),k=r(8523),O=r(2534),C=r(408);v({target:"Promise",stat:!0,forced:r(612)},{all:function(S){var T=this,A=k.f(T),R=A.resolve,I=A.reject,$=O(function(){var M=w(T.resolve),B=[],q=0,F=1;C(S,function(N){var U=q++,H=!1;F++,g(M,T,N).then(function(X){H||(H=!0,B[U]=X,--F||R(B))},I)}),--F||R(B)});return $.error&&I($.value),A.promise}})},4164:(y,j,r)=>{var v=r(2109),g=r(1913),w=r(3702).CONSTRUCTOR,k=r(2492),O=r(5005),C=r(614),S=r(8052),T=k&&k.prototype;if(v({target:"Promise",proto:!0,forced:w,real:!0},{catch:function(R){return this.then(void 0,R)}}),!g&&C(k)){var A=O("Promise").prototype.catch;T.catch!==A&&S(T,"catch",A,{unsafe:!0})}},3401:(y,j,r)=>{var v,g,w,k=r(2109),O=r(1913),C=r(5268),S=r(7854),T=r(6916),A=r(8052),R=r(7674),I=r(8003),$=r(6340),M=r(9662),B=r(614),q=r(111),F=r(5787),N=r(6707),U=r(261).set,H=r(5948),X=r(842),Y=r(2534),K=r(8572),tt=r(9909),it=r(2492),st=r(3702),yt=r(8523),ct="Promise",Et=st.CONSTRUCTOR,At=st.REJECTION_EVENT,Vt=st.SUBCLASSING,lt=tt.getterFor(ct),wt=tt.set,_t=it&&it.prototype,Ut=it,Kt=_t,fe=S.TypeError,St=S.document,jt=S.process,It=yt.f,qt=It,xt=!!(St&&St.createEvent&&S.dispatchEvent),lr="unhandledrejection",de=function(ot){var bt;return!(!q(ot)||!B(bt=ot.then))&&bt},Ne=function(ot,bt){var Mt,$t,Qt,Ze=bt.value,Ke=bt.state==1,xr=Ke?ot.ok:ot.fail,Qe=ot.resolve,fr=ot.reject,Se=ot.domain;try{xr?(Ke||(bt.rejection===2&&Le(bt),bt.rejection=1),xr===!0?Mt=Ze:(Se&&Se.enter(),Mt=xr(Ze),Se&&(Se.exit(),Qt=!0)),Mt===ot.promise?fr(fe("Promise-chain cycle")):($t=de(Mt))?T($t,Mt,Qe,fr):Qe(Mt)):fr(Ze)}catch(Dn){Se&&!Qt&&Se.exit(),fr(Dn)}},ge=function(ot,bt){ot.notified||(ot.notified=!0,H(function(){for(var Mt,$t=ot.reactions;Mt=$t.get();)Ne(Mt,ot);ot.notified=!1,bt&&!ot.rejection&&Ae(ot)}))},cr=function(ot,bt,Mt){var $t,Qt;xt?(($t=St.createEvent("Event")).promise=bt,$t.reason=Mt,$t.initEvent(ot,!1,!0),S.dispatchEvent($t)):$t={promise:bt,reason:Mt},!At&&(Qt=S["on"+ot])?Qt($t):ot===lr&&X("Unhandled promise rejection",Mt)},Ae=function(ot){T(U,S,function(){var bt,Mt=ot.facade,$t=ot.value;if(dr(ot)&&(bt=Y(function(){C?jt.emit("unhandledRejection",$t,Mt):cr(lr,Mt,$t)}),ot.rejection=C||dr(ot)?2:1,bt.error))throw bt.value})},dr=function(ot){return ot.rejection!==1&&!ot.parent},Le=function(ot){T(U,S,function(){var bt=ot.facade;C?jt.emit("rejectionHandled",bt):cr("rejectionhandled",bt,ot.value)})},We=function(ot,bt,Mt){return function($t){ot(bt,$t,Mt)}},Ce=function(ot,bt,Mt){ot.done||(ot.done=!0,Mt&&(ot=Mt),ot.value=bt,ot.state=2,ge(ot,!0))},pr=function(ot,bt,Mt){if(!ot.done){ot.done=!0,Mt&&(ot=Mt);try{if(ot.facade===bt)throw fe("Promise can't be resolved itself");var $t=de(bt);$t?H(function(){var Qt={done:!1};try{T($t,bt,We(pr,Qt,ot),We(Ce,Qt,ot))}catch(Ze){Ce(Qt,Ze,ot)}}):(ot.value=bt,ot.state=1,ge(ot,!1))}catch(Qt){Ce({done:!1},Qt,ot)}}};if(Et&&(Kt=(Ut=function(ot){F(this,Kt),M(ot),T(v,this);var bt=lt(this);try{ot(We(pr,bt),We(Ce,bt))}catch(Mt){Ce(bt,Mt)}}).prototype,(v=function(ot){wt(this,{type:ct,done:!1,notified:!1,parent:!1,reactions:new K,rejection:!1,state:0,value:void 0})}).prototype=A(Kt,"then",function(ot,bt){var Mt=lt(this),$t=It(N(this,Ut));return Mt.parent=!0,$t.ok=!B(ot)||ot,$t.fail=B(bt)&&bt,$t.domain=C?jt.domain:void 0,Mt.state==0?Mt.reactions.add($t):H(function(){Ne($t,Mt)}),$t.promise}),g=function(){var ot=new v,bt=lt(ot);this.promise=ot,this.resolve=We(pr,bt),this.reject=We(Ce,bt)},yt.f=It=function(ot){return ot===Ut||ot===void 0?new g(ot):qt(ot)},!O&&B(it)&&_t!==Object.prototype)){w=_t.then,Vt||A(_t,"then",function(ot,bt){var Mt=this;return new Ut(function($t,Qt){T(w,Mt,$t,Qt)}).then(ot,bt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Kt)}k({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:Ut}),I(Ut,ct,!1,!0),$(ct)},8674:(y,j,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(9662),k=r(8523),O=r(2534),C=r(408);v({target:"Promise",stat:!0,forced:r(612)},{race:function(S){var T=this,A=k.f(T),R=A.reject,I=O(function(){var $=w(T.resolve);C(S,function(M){g($,T,M).then(A.resolve,R)})});return I.error&&R(I.value),A.promise}})},683:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(8523);v({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(k){var O=w.f(this);return g(O.reject,void 0,k),O.promise}})},6294:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(1913),k=r(2492),O=r(3702).CONSTRUCTOR,C=r(9478),S=g("Promise"),T=w&&!O;v({target:"Promise",stat:!0,forced:w||O},{resolve:function(A){return C(T&&this===S?k:this,A)}})},2419:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(2104),k=r(7065),O=r(9483),C=r(9670),S=r(111),T=r(30),A=r(7293),R=g("Reflect","construct"),I=Object.prototype,$=[].push,M=A(function(){function F(){}return!(R(function(){},[],F)instanceof F)}),B=!A(function(){R(function(){})}),q=M||B;v({target:"Reflect",stat:!0,forced:q,sham:q},{construct:function(F,N){O(F),C(N);var U=arguments.length<3?F:O(arguments[2]);if(B&&!M)return R(F,N,U);if(F==U){switch(N.length){case 0:return new F;case 1:return new F(N[0]);case 2:return new F(N[0],N[1]);case 3:return new F(N[0],N[1],N[2]);case 4:return new F(N[0],N[1],N[2],N[3])}var H=[null];return w($,H,N),new(w(k,F,H))}var X=U.prototype,Y=T(S(X)?X:I),K=w(F,Y,N);return S(K)?K:Y}})},4819:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(111),k=r(9670),O=r(5032),C=r(1236),S=r(9518);v({target:"Reflect",stat:!0},{get:function T(A,R){var I,$,M=arguments.length<3?A:arguments[2];return k(A)===M?A[R]:(I=C.f(A,R))?O(I)?I.value:I.get===void 0?void 0:g(I.get,M):w($=S(A))?T($,R,M):void 0}})},4603:(y,j,r)=>{var v=r(9781),g=r(7854),w=r(1702),k=r(4705),O=r(9587),C=r(8880),S=r(8006).f,T=r(7976),A=r(7850),R=r(1340),I=r(4706),$=r(2999),M=r(2626),B=r(8052),q=r(7293),F=r(2597),N=r(9909).enforce,U=r(6340),H=r(5112),X=r(9441),Y=r(7168),K=H("match"),tt=g.RegExp,it=tt.prototype,st=g.SyntaxError,yt=w(it.exec),ct=w("".charAt),Et=w("".replace),At=w("".indexOf),Vt=w("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,wt=/a/g,_t=/a/g,Ut=new tt(wt)!==wt,Kt=$.MISSED_STICKY,fe=$.UNSUPPORTED_Y;if(k("RegExp",v&&(!Ut||Kt||X||Y||q(function(){return _t[K]=!1,tt(wt)!=wt||tt(_t)==_t||tt(wt,"i")!="/a/i"})))){for(var St=function(qt,xt){var lr,de,Ne,ge,cr,Ae,dr=T(it,this),Le=A(qt),We=xt===void 0,Ce=[],pr=qt;if(!dr&&Le&&We&&qt.constructor===St)return qt;if((Le||T(it,qt))&&(qt=qt.source,We&&(xt=I(pr))),qt=qt===void 0?"":R(qt),xt=xt===void 0?"":R(xt),pr=qt,X&&"dotAll"in wt&&(de=!!xt&&At(xt,"s")>-1)&&(xt=Et(xt,/s/g,"")),lr=xt,Kt&&"sticky"in wt&&(Ne=!!xt&&At(xt,"y")>-1)&&fe&&(xt=Et(xt,/y/g,"")),Y&&(ge=function(ot){for(var bt,Mt=ot.length,$t=0,Qt="",Ze=[],Ke={},xr=!1,Qe=!1,fr=0,Se="";$t<=Mt;$t++){if((bt=ct(ot,$t))==="\\")bt+=ct(ot,++$t);else if(bt==="]")xr=!1;else if(!xr)switch(!0){case bt==="[":xr=!0;break;case bt==="(":yt(lt,Vt(ot,$t+1))&&($t+=2,Qe=!0),Qt+=bt,fr++;continue;case(bt===">"&&Qe):if(Se===""||F(Ke,Se))throw new st("Invalid capture group name");Ke[Se]=!0,Ze[Ze.length]=[Se,fr],Qe=!1,Se="";continue}Qe?Se+=bt:Qt+=bt}return[Qt,Ze]}(qt),qt=ge[0],Ce=ge[1]),cr=O(tt(qt,xt),dr?this:it,St),(de||Ne||Ce.length)&&(Ae=N(cr),de&&(Ae.dotAll=!0,Ae.raw=St(function(ot){for(var bt,Mt=ot.length,$t=0,Qt="",Ze=!1;$t<=Mt;$t++)(bt=ct(ot,$t))!=="\\"?Ze||bt!=="."?(bt==="["?Ze=!0:bt==="]"&&(Ze=!1),Qt+=bt):Qt+="[\\s\\S]":Qt+=bt+ct(ot,++$t);return Qt}(qt),lr)),Ne&&(Ae.sticky=!0),Ce.length&&(Ae.groups=Ce)),qt!==pr)try{C(cr,"source",pr===""?"(?:)":pr)}catch{}return cr},jt=S(tt),It=0;jt.length>It;)M(St,tt,jt[It++]);it.constructor=St,St.prototype=it,B(g,"RegExp",St,{constructor:!0})}U("RegExp")},4916:(y,j,r)=>{var v=r(2109),g=r(2261);v({target:"RegExp",proto:!0,forced:/./.exec!==g},{exec:g})},9714:(y,j,r)=>{var v=r(6530).PROPER,g=r(8052),w=r(9670),k=r(1340),O=r(7293),C=r(4706),S="toString",T=RegExp.prototype[S],A=O(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=v&&T.name!=S;(A||R)&&g(RegExp.prototype,S,function(){var I=w(this);return"/"+k(I.source)+"/"+k(C(I))},{unsafe:!0})},2023:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(3929),k=r(4488),O=r(1340),C=r(4964),S=g("".indexOf);v({target:"String",proto:!0,forced:!C("includes")},{includes:function(T){return!!~S(O(k(this)),O(w(T)),arguments.length>1?arguments[1]:void 0)}})},8783:(y,j,r)=>{var v=r(8710).charAt,g=r(1340),w=r(9909),k=r(1656),O=r(6178),C="String Iterator",S=w.set,T=w.getterFor(C);k(String,"String",function(A){S(this,{type:C,string:g(A),index:0})},function(){var A,R=T(this),I=R.string,$=R.index;return $>=I.length?O(void 0,!0):(A=v(I,$),R.index+=A.length,O(A,!1))})},4723:(y,j,r)=>{var v=r(6916),g=r(7007),w=r(9670),k=r(8554),O=r(7466),C=r(1340),S=r(4488),T=r(8173),A=r(1530),R=r(7651);g("match",function(I,$,M){return[function(B){var q=S(this),F=k(B)?void 0:T(B,I);return F?v(F,B,q):new RegExp(B)[I](C(q))},function(B){var q=w(this),F=C(B),N=M($,q,F);if(N.done)return N.value;if(!q.global)return R(q,F);var U=q.unicode;q.lastIndex=0;for(var H,X=[],Y=0;(H=R(q,F))!==null;){var K=C(H[0]);X[Y]=K,K===""&&(q.lastIndex=A(F,O(q.lastIndex),U)),Y++}return Y===0?null:X}]})},5306:(y,j,r)=>{var v=r(2104),g=r(6916),w=r(1702),k=r(7007),O=r(7293),C=r(9670),S=r(614),T=r(8554),A=r(9303),R=r(7466),I=r(1340),$=r(4488),M=r(1530),B=r(8173),q=r(647),F=r(7651),N=r(5112)("replace"),U=Math.max,H=Math.min,X=w([].concat),Y=w([].push),K=w("".indexOf),tt=w("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[N]&&/./[N]("a","$0")==="";k("replace",function(yt,ct,Et){var At=st?"$":"$0";return[function(Vt,lt){var wt=$(this),_t=T(Vt)?void 0:B(Vt,N);return _t?g(_t,Vt,wt,lt):g(ct,I(wt),Vt,lt)},function(Vt,lt){var wt=C(this),_t=I(Vt);if(typeof lt=="string"&&K(lt,At)===-1&&K(lt,"$<")===-1){var Ut=Et(ct,wt,_t,lt);if(Ut.done)return Ut.value}var Kt=S(lt);Kt||(lt=I(lt));var fe=wt.global;if(fe){var St=wt.unicode;wt.lastIndex=0}for(var jt=[];;){var It=F(wt,_t);if(It===null||(Y(jt,It),!fe))break;I(It[0])===""&&(wt.lastIndex=M(_t,R(wt.lastIndex),St))}for(var qt,xt="",lr=0,de=0;de<jt.length;de++){for(var Ne=I((It=jt[de])[0]),ge=U(H(A(It.index),_t.length),0),cr=[],Ae=1;Ae<It.length;Ae++)Y(cr,(qt=It[Ae])===void 0?qt:String(qt));var dr=It.groups;if(Kt){var Le=X([Ne],cr,ge,_t);dr!==void 0&&Y(Le,dr);var We=I(v(lt,void 0,Le))}else We=q(Ne,_t,ge,cr,dr,lt);ge>=lr&&(xt+=tt(_t,lr,ge)+We,lr=ge+Ne.length)}return xt+tt(_t,lr)}]},!!O(function(){var yt=/./;return yt.exec=function(){var ct=[];return ct.groups={a:"7"},ct},"".replace(yt,"$<a>")!=="7"})||!it||st)},6755:(y,j,r)=>{var v,g=r(2109),w=r(1470),k=r(1236).f,O=r(7466),C=r(1340),S=r(3929),T=r(4488),A=r(4964),R=r(1913),I=w("".startsWith),$=w("".slice),M=Math.min,B=A("startsWith");g({target:"String",proto:!0,forced:!(!R&&!B&&(v=k(String.prototype,"startsWith"),v&&!v.writable)||B)},{startsWith:function(q){var F=C(T(this));S(q);var N=O(M(arguments.length>1?arguments[1]:void 0,F.length)),U=C(q);return I?I(F,U,N):$(F,N,N+U.length)===U}})},3210:(y,j,r)=>{var v=r(2109),g=r(3111).trim;v({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return g(this)}})},2443:(y,j,r)=>{r(6800)("asyncIterator")},4032:(y,j,r)=>{var v=r(2109),g=r(7854),w=r(6916),k=r(1702),O=r(1913),C=r(9781),S=r(6293),T=r(7293),A=r(2597),R=r(7976),I=r(9670),$=r(5656),M=r(4948),B=r(1340),q=r(9114),F=r(30),N=r(1956),U=r(8006),H=r(1156),X=r(5181),Y=r(1236),K=r(3070),tt=r(6048),it=r(5296),st=r(8052),yt=r(7045),ct=r(2309),Et=r(6200),At=r(3501),Vt=r(9711),lt=r(5112),wt=r(6061),_t=r(6800),Ut=r(6532),Kt=r(8003),fe=r(9909),St=r(2092).forEach,jt=Et("hidden"),It="Symbol",qt="prototype",xt=fe.set,lr=fe.getterFor(It),de=Object[qt],Ne=g.Symbol,ge=Ne&&Ne[qt],cr=g.TypeError,Ae=g.QObject,dr=Y.f,Le=K.f,We=H.f,Ce=it.f,pr=k([].push),ot=ct("symbols"),bt=ct("op-symbols"),Mt=ct("wks"),$t=!Ae||!Ae[qt]||!Ae[qt].findChild,Qt=C&&T(function(){return F(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(Dt,te,Xt){var ce=dr(de,te);ce&&delete de[te],Le(Dt,te,Xt),ce&&Dt!==de&&Le(de,te,ce)}:Le,Ze=function(Dt,te){var Xt=ot[Dt]=F(ge);return xt(Xt,{type:It,tag:Dt,description:te}),C||(Xt.description=te),Xt},Ke=function(Dt,te,Xt){Dt===de&&Ke(bt,te,Xt),I(Dt);var ce=M(te);return I(Xt),A(ot,ce)?(Xt.enumerable?(A(Dt,jt)&&Dt[jt][ce]&&(Dt[jt][ce]=!1),Xt=F(Xt,{enumerable:q(0,!1)})):(A(Dt,jt)||Le(Dt,jt,q(1,{})),Dt[jt][ce]=!0),Qt(Dt,ce,Xt)):Le(Dt,ce,Xt)},xr=function(Dt,te){I(Dt);var Xt=$(te),ce=N(Xt).concat(Dn(Xt));return St(ce,function(ze){C&&!w(Qe,Xt,ze)||Ke(Dt,ze,Xt[ze])}),Dt},Qe=function(Dt){var te=M(Dt),Xt=w(Ce,this,te);return!(this===de&&A(ot,te)&&!A(bt,te))&&(!(Xt||!A(this,te)||!A(ot,te)||A(this,jt)&&this[jt][te])||Xt)},fr=function(Dt,te){var Xt=$(Dt),ce=M(te);if(Xt!==de||!A(ot,ce)||A(bt,ce)){var ze=dr(Xt,ce);return!ze||!A(ot,ce)||A(Xt,jt)&&Xt[jt][ce]||(ze.enumerable=!0),ze}},Se=function(Dt){var te=We($(Dt)),Xt=[];return St(te,function(ce){A(ot,ce)||A(At,ce)||pr(Xt,ce)}),Xt},Dn=function(Dt){var te=Dt===de,Xt=We(te?bt:$(Dt)),ce=[];return St(Xt,function(ze){!A(ot,ze)||te&&!A(de,ze)||pr(ce,ot[ze])}),ce};S||(st(ge=(Ne=function(){if(R(ge,this))throw cr("Symbol is not a constructor");var Dt=arguments.length&&arguments[0]!==void 0?B(arguments[0]):void 0,te=Vt(Dt),Xt=function(ce){this===de&&w(Xt,bt,ce),A(this,jt)&&A(this[jt],te)&&(this[jt][te]=!1),Qt(this,te,q(1,ce))};return C&&$t&&Qt(de,te,{configurable:!0,set:Xt}),Ze(te,Dt)})[qt],"toString",function(){return lr(this).tag}),st(Ne,"withoutSetter",function(Dt){return Ze(Vt(Dt),Dt)}),it.f=Qe,K.f=Ke,tt.f=xr,Y.f=fr,U.f=H.f=Se,X.f=Dn,wt.f=function(Dt){return Ze(lt(Dt),Dt)},C&&(yt(ge,"description",{configurable:!0,get:function(){return lr(this).description}}),O||st(de,"propertyIsEnumerable",Qe,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:Ne}),St(N(Mt),function(Dt){_t(Dt)}),v({target:It,stat:!0,forced:!S},{useSetter:function(){$t=!0},useSimple:function(){$t=!1}}),v({target:"Object",stat:!0,forced:!S,sham:!C},{create:function(Dt,te){return te===void 0?F(Dt):xr(F(Dt),te)},defineProperty:Ke,defineProperties:xr,getOwnPropertyDescriptor:fr}),v({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:Se}),Ut(),Kt(Ne,It),At[jt]=!0},1817:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(7854),k=r(1702),O=r(2597),C=r(614),S=r(7976),T=r(1340),A=r(7045),R=r(9920),I=w.Symbol,$=I&&I.prototype;if(g&&C(I)&&(!("description"in $)||I().description!==void 0)){var M={},B=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),K=S($,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(M[K]=!0),K};R(B,I),B.prototype=$,$.constructor=B;var q=String(I("test"))=="Symbol(test)",F=k($.valueOf),N=k($.toString),U=/^Symbol\((.*)\)[^)]+$/,H=k("".replace),X=k("".slice);A($,"description",{configurable:!0,get:function(){var Y=F(this);if(O(M,Y))return"";var K=N(Y),tt=q?X(K,7,-1):H(K,U,"$1");return tt===""?void 0:tt}}),v({global:!0,constructor:!0,forced:!0},{Symbol:B})}},763:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(2597),k=r(1340),O=r(2309),C=r(2015),S=O("string-to-symbol-registry"),T=O("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!C},{for:function(A){var R=k(A);if(w(S,R))return S[R];var I=g("Symbol")(R);return S[R]=I,T[I]=R,I}})},2165:(y,j,r)=>{r(6800)("iterator")},2526:(y,j,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(y,j,r)=>{var v=r(2109),g=r(2597),w=r(2190),k=r(6330),O=r(2309),C=r(2015),S=O("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!C},{keyFor:function(T){if(!w(T))throw TypeError(k(T)+" is not a symbol");if(g(S,T))return S[T]}})},6649:(y,j,r)=>{var v=r(6800),g=r(6532);v("toPrimitive"),g()},3680:(y,j,r)=>{var v=r(5005),g=r(6800),w=r(8003);g("toStringTag"),w(v("Symbol"),"Symbol")},4747:(y,j,r)=>{var v=r(7854),g=r(8324),w=r(8509),k=r(8533),O=r(8880),C=function(T){if(T&&T.forEach!==k)try{O(T,"forEach",k)}catch{T.forEach=k}};for(var S in g)g[S]&&C(v[S]&&v[S].prototype);C(w)},3948:(y,j,r)=>{var v=r(7854),g=r(8324),w=r(8509),k=r(6992),O=r(8880),C=r(5112),S=C("iterator"),T=C("toStringTag"),A=k.values,R=function($,M){if($){if($[S]!==A)try{O($,S,A)}catch{$[S]=A}if($[T]||O($,T,M),g[M]){for(var B in k)if($[B]!==k[B])try{O($,B,k[B])}catch{$[B]=k[B]}}}};for(var I in g)R(v[I]&&v[I].prototype,I);R(w,"DOMTokenList")},6815:(y,j,r)=>{var v=r(2109),g=r(7854),w=r(7152)(g.setInterval,!0);v({global:!0,bind:!0,forced:g.setInterval!==w},{setInterval:w})},8417:(y,j,r)=>{var v=r(2109),g=r(7854),w=r(7152)(g.setTimeout,!0);v({global:!0,bind:!0,forced:g.setTimeout!==w},{setTimeout:w})},2564:(y,j,r)=>{r(6815),r(8417)}},b={};function _(y){var j=b[y];if(j!==void 0)return j.exports;var r=b[y]={exports:{}};return p[y](r,r.exports,_),r.exports}_.d=(y,j)=>{for(var r in j)_.o(j,r)&&!_.o(y,r)&&Object.defineProperty(y,r,{enumerable:!0,get:j[r]})},_.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),_.o=(y,j)=>Object.prototype.hasOwnProperty.call(y,j),_.r=y=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})};var E={};return(()=>{_.r(E),_.d(E,{JSONEditor:()=>Tn}),_(3710),_(1539),_(9714),_(5827),_(6833),_(9826),_(9554),_(4747),_(7941),_(2222),_(9601),_(6649),_(6078),_(2526),_(1817),_(9653),_(9070),_(8674),_(2165),_(6992),_(8783),_(3948),_(2443),_(3680),_(3706),_(2703),_(8011),_(489),_(8309),_(8304),_(5069),_(7042),_(9753),_(1038),_(4916),_(9720),_(5306),_(4603),_(6699);var y=["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(c){return c.type==="string"&&c.format==="color"&&"colorpicker"},function(c){return c.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(c.format)&&"ip"},function(c){return c.type==="string"&&y.includes(c.format)&&"ace"},function(c){return c.type==="string"&&["xhtml","bbcode"].includes(c.format)&&"sceditor"},function(c){return c.type==="string"&&c.format==="markdown"&&"simplemde"},function(c){return c.type==="string"&&c.format==="jodit"&&"jodit"},function(c){return c.type==="string"&&c.format==="autocomplete"&&"autocomplete"},function(c){return c.type==="string"&&c.format==="uuid"&&"uuid"},function(c){return c.format==="info"&&"info"},function(c){return c.format==="button"&&"button"},function(c){if((c.type==="integer"||c.type==="number")&&c.format==="stepper")return"stepper"},function(c){if(c.links){for(var n=0;n<c.links.length;n++)if(c.links[n].rel&&c.links[n].rel.toLowerCase()==="describedby")return"describedBy"}},function(c){return["string","integer"].includes(c.type)&&["starrating","rating"].includes(c.format)&&"starrating"},function(c){return["string","integer"].includes(c.type)&&["date","time","datetime-local"].includes(c.format)&&"datetime"},function(c){return(c.oneOf||c.anyOf)&&"multiple"},function(c){return c.if&&"multiple"},function(c,n){if(c.items&&(c.items=n.expandSchema(c.items)),c.type==="array"&&c.items&&!Array.isArray(c.items)&&["string","number","integer"].includes(c.items.type)){if(c.format==="choices")return"arrayChoices";if(c.uniqueItems){if(c.format==="selectize")return"arraySelectize";if(c.format==="select2")return"arraySelect2";if(c.items.enum)return"multiselect"}}},function(c){if(c.enum){if(c.type==="array"||c.type==="object")return"enum";if(c.type==="number"||c.type==="integer"||c.type==="string")return c.format==="radio"?"radio":c.format==="select2"?"select2":c.format==="selectize"?"selectize":c.format==="choices"?"choices":"select"}},function(c){if(c.enumSource)return c.format==="radio"?"radio":c.format==="select2"?"select2":c.format==="selectize"?"selectize":c.format==="choices"?"choices":"select"},function(c){return c.type==="array"&&c.format==="table"&&"table"},function(c){return c.type==="string"&&c.format==="url"&&window.FileReader&&c.options&&c.options.upload===Object(c.options.upload)&&"upload"},function(c){return c.type==="string"&&c.media&&c.media.binaryEncoding==="base64"&&"base64"},function(c){return c.type==="any"&&"multiple"},function(c){if(c.type==="boolean")return c.format==="checkbox"||c.options&&c.options.checkbox?"checkbox":c.format==="select2"?"select2":c.format==="selectize"?"selectize":c.format==="choices"?"choices":"select"},function(c){return c.type==="string"&&c.format==="signature"&&"signature"},function(c){return typeof c.type=="string"&&["string","number","integer","boolean","null","array","object"].includes(c.type)&&c.type},function(c){return!c.type&&c.properties&&"object"},function(c){return typeof c.type!="string"&&"multiple"},function(c){return typeof c.type=="string"&&"string"}];function r(c,n,f){return(n=function(i){var h=function(a,l){if(v(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(v(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i);return v(h)==="symbol"?h:String(h)}(n))in c?Object.defineProperty(c,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[n]=f,c}function v(c){return v=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},v(c)}function g(c){return!(c===null||v(c)!=="object"||c.nodeType||c===c.window||c.constructor&&!S(c.constructor.prototype,"isPrototypeOf"))}function w(c){return g(c)?k({},c):Array.isArray(c)?c.map(w):c}function k(c){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];return f.forEach(function(h){h&&Object.keys(h).forEach(function(a){h[a]&&g(h[a])?(S(c,a)||(c[a]={}),k(c[a],h[a])):Array.isArray(h[a])?c[a]=w(h[a]):c[a]=h[a]})}),c}function O(c,n){var f=document.createEvent("HTMLEvents");f.initEvent(n,!0,!0),c.dispatchEvent(f)}function C(c){return c&&(c.toString()==="[object ShadowRoot]"?c:C(c.parentNode))}function S(c,n){return c&&Object.prototype.hasOwnProperty.call(c,n)}_(4812),_(2419),_(4819),_(5003),_(4723),_(2023),_(9600),_(6755),_(5212),_(2772),_(1249),_(4678),_(1058);var T=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,A=/^\s*(-|\+)?(\d+)\s*$/;function R(){var c=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(c+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var f=(c+16*Math.random())%16|0;return c=Math.floor(c/16),(n==="x"?f:3&f|8).toString(16)})}function I(c){return c&&v(c)==="object"&&!Array.isArray(c)}function $(c){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];if(!f.length)return c;var h=f.shift();if(I(c)&&I(h))for(var a in h)I(h[a])?(c[a]||Object.assign(c,r({},a,{})),$(c[a],h[a])):Object.assign(c,r({},a,h[a]));return $.apply(void 0,[c].concat(f))}function M(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function B(c){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(c)}function q(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(B(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(B(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),B(h)==="symbol"?h:String(h)),i)}var h}var F=function(){function c(i,h){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.defaults=h,this.jsoneditor=i.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=i.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=k({},this.options||{},this.schema.options||{},i.schema.options||{},i),this.formname=this.jsoneditor.options.form_name_root||"root",i.path||this.schema.id||(this.schema.id=this.formname),this.path=i.path||this.formname,this.formname=i.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=i.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,i.container&&this.setContainer(i.container),this.registerDependencies()}var n,f;return n=c,f=[{key:"onChildEditorChange",value:function(i){this.onChange(!0)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}},{key:"onChange",value:function(i){this.notify(),this.watch_listener&&this.watch_listener(),i&&this.change()}},{key:"register",value:function(){this.jsoneditor.registerEditor(this),this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var i=this;this.dependenciesFulfilled=!0;var h=this.options.dependencies;h&&Object.keys(h).forEach(function(a){var l;a.startsWith(i.jsoneditor.root.path)?l=a:((l=i.path.split("."))[l.length-1]=a,l=l.join(".")),i.jsoneditor.watch(l,function(){i.evaluateDependencies()})})}},{key:"evaluateDependencies",value:function(){var i=this,h=this.container||this.control;if(h&&this.jsoneditor!==null){var a=this.options.dependencies;if(a){var l=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 u=a[e];i.checkDependency(o,u)}),this.dependenciesFulfilled!==l&&this.notify();var t=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(t="none"),h.tagName==="TD"?Object.keys(h.childNodes).forEach(function(e){return h.childNodes[e].style.display=t}):h.style.display=t}}}},{key:"checkDependency",value:function(i,h){var a=this;if(this.path!==i&&this.jsoneditor!==null){var l=this.jsoneditor.getEditor(i),t=l?l.getValue():void 0;l&&l.dependenciesFulfilled?Array.isArray(h)?this.dependenciesFulfilled=h.some(function(e){if(JSON.stringify(t)===JSON.stringify(e))return!0}):B(h)==="object"?B(t)!=="object"?this.dependenciesFulfilled=h===t:Object.keys(h).some(function(e){return!!S(h,e)&&(S(t,e)&&h[e]===t[e]?void 0:(a.dependenciesFulfilled=!1,!0))}):typeof h=="string"||typeof h=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&t===h:typeof h=="boolean"&&(this.dependenciesFulfilled=h?this.dependenciesFulfilled&&(t||t.length>0):this.dependenciesFulfilled&&(!t||t.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(i){this.container=i,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(i){var h=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",function(){h.isActive()?h.deactivate():h.activate()});var a=this.jsoneditor.options.show_opt_in,l=this.parent.options.show_opt_in!==void 0,t=l&&this.parent.options.show_opt_in===!0,e=l&&this.parent.options.show_opt_in===!1;(t||!e&&a||!l&&a)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}},{key:"setupWatchListeners",value:function(){var i=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){i.refreshWatchedFieldValues()&&i.onWatchedFieldChange()},S(this.schema,"watch")){var h,a,l,t,e,o=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(function(u){if(h=i.schema.watch[u],Array.isArray(h)){if(h.length<2)return;a=[h[0]].concat(h[1].split("."))}else a=h.split("."),i.theme.closest(i.container,'[data-schemaid="'.concat(a[0],'"]'))||a.unshift("#");if((l=a.shift())==="#"&&(l=i.jsoneditor.schema.id||i.jsoneditor.root.formname),!(t=i.theme.closest(i.container,'[data-schemaid="'.concat(l,'"]'))))throw new Error("Could not find ancestor node with id ".concat(l));e="".concat(t.getAttribute("data-schemapath"),".").concat(a.join(".")),o.startsWith(e)&&(i.watchLoop=!0),i.jsoneditor.watch(e,i.watch_listener),i.watched[u]=e})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.description!==void 0?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var i=0;i<this.schema.links.length;i++)this.addLink(this.getLink(this.schema.links[i]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(i,h,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],t="json-editor-btn-".concat(h);h=this.iconlib?this.iconlib.getIcon(h):null,i=this.translate(i,l),a=this.translate(a,l),!h&&a&&(i=a,a=null);var e=this.theme.getButton(i,h,a);return e.classList.add(t),e}},{key:"setButtonText",value:function(i,h,a,l){var t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return a=this.iconlib?this.iconlib.getIcon(a):null,h=this.translate(h,t),l=this.translate(l,t),!a&&l&&(h=l,l=null),this.theme.setButtonText(i,h,a,l)}},{key:"addLink",value:function(i){this.link_holder&&this.link_holder.appendChild(i)}},{key:"getLink",value:function(i){var h,a,l=(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)),l==="image"){h=this.theme.getBlockLinkHolder(),(a=document.createElement("a")).setAttribute("target","_blank");var u=document.createElement("img");this.theme.createImageLink(h,a,u),this.link_watchers.push(function(x){var P=t(x),D=e(x);a.setAttribute("href",P),a.setAttribute("title",D||P),u.setAttribute("src",P)})}else if(["audio","video"].includes(l)){h=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var d=document.createElement(l);d.setAttribute("controls","controls"),this.theme.createMediaLink(h,a,d),this.link_watchers.push(function(x){var P=t(x),D=e(x);a.setAttribute("href",P),a.textContent=D||P,d.setAttribute("src",P)})}else a=h=this.theme.getBlockLink(),h.setAttribute("target","_blank"),h.textContent=i.rel,h.style.display="none",this.link_watchers.push(function(x){var P=t(x),D=e(x);P&&(h.style.display=""),h.setAttribute("href",P),h.textContent=D||P});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(x){a.setAttribute("download",o(x))})),i.class&&a.classList.add(i.class),h}},{key:"refreshWatchedFieldValues",value:function(){var i=this;if(this.watched_values){var h={},a=!1;return this.watched&&Object.keys(this.watched).forEach(function(l){var t=i.jsoneditor.getEditor(i.watched[l]),e=t?t.getValue():null;i.watched_values[l]!==e&&(a=!0),h[l]=e}),h.self=this.getValue(),this.watched_values.self!==h.self&&(a=!0),this.watched_values=h,a}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var i=this.getHeaderText();if(this.header.children.length){for(var h=0;h<this.header.childNodes.length;h++)if(this.header.childNodes[h].nodeType===3){this.header.childNodes[h].nodeValue=this.cleanText(i);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(i):this.header.textContent=this.cleanText(i)}}},{key:"getHeaderText",value:function(i){return this.header_text?this.header_text:i?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"onWatchedFieldChange",value:function(){var i,h=this;if(this.header_template){i=k(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()}),Object.keys(this.editors).length&&(i.properties={},Object.keys(this.editors).forEach(function(t){var e=h.editors[t];if(e.schema&&e.schema.enum&&e.schema.options&&e.schema.options.enum_titles){var o=e.schema.enum.indexOf(e.value),u=e.options.enum_titles[o];i.properties[t]={enumTitle:u}}}));var a=this.header_template(i);a!==this.header_text&&(this.header_text=a,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){i=this.getWatchedFieldValues();for(var l=0;l<this.link_watchers.length;l++)this.link_watchers[l](i)}}},{key:"setValue",value:function(i){this.value=i}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var i=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach(function(h){return i.jsoneditor.unwatch(h,i.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var i=this.schema.type||this.schema.oneOf;if(i&&Array.isArray(i)&&(i=i[0]),i&&B(i)==="object"&&(i=i.type),i&&Array.isArray(i)&&(i=i[0]),typeof i=="string"){if(i==="number")return this.isDefaultRequired()?0:void 0;if(i==="boolean")return!this.isDefaultRequired()&&void 0;if(i==="integer")return this.isDefaultRequired()?0:void 0;if(i==="string")return this.isDefaultRequired()?"":void 0;if(i==="null")return null;if(i==="object")return{};if(i==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(i){var h=[],a={};i.forEach(function(t){t.title&&(a[t.title]=a[t.title]||0,a[t.title]++),t.description&&(a[t.description]=a[t.description]||0,a[t.description]++),t.format&&(a[t.format]=a[t.format]||0,a[t.format]++),t.type&&(a[t.type]=a[t.type]||0,a[t.type]++)}),i.forEach(function(t){var e;e=typeof t=="string"?t:t.title&&a[t.title]<=1?t.title:t.format&&a[t.format]<=1?t.format:t.type&&a[t.type]<=1?t.type:t.description&&a[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",h.push(e)});var l={};return h.forEach(function(t,e){l[t]=l[t]||0,l[t]++,a[t]>1&&(h[e]="".concat(t," ").concat(l[t]))}),h}},{key:"getValidId",value:function(i){return(i=i===void 0?"":i.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(i){var h=this;if(this.schema.options&&this.schema.options.inputAttributes){var a=this.schema.options.inputAttributes,l=["name","type"].concat(i);Object.keys(a).forEach(function(t){l.includes(t.toLowerCase())||h.input.setAttribute(t,a[t])})}}},{key:"setContainerAttributes",value:function(){var i=this;if(this.schema.options&&this.schema.options.containerAttributes){var h=this.schema.options.containerAttributes,a=["data-schemapath","data-schematype","data-schemaid"];Object.keys(h).forEach(function(l){a.includes(l.toLowerCase())||i.container.setAttribute(l,h[l])})}}},{key:"expandCallbacks",value:function(i,h){var a=this,l=this.defaults.callbacks[i];return Object.entries(h).forEach(function(t){var e,o,u=(o=2,function(P){if(Array.isArray(P))return P}(e=t)||function(P,D){var J=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(J!=null){var nt,ut,dt,kt,Ct=[],Nt=!0,ne=!1;try{if(dt=(J=J.call(P)).next,D===0){if(Object(J)!==J)return;Nt=!1}else for(;!(Nt=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);Nt=!0);}catch(Re){ne=!0,ut=Re}finally{try{if(!Nt&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(ne)throw ut}}return Ct}}(e,o)||function(P,D){if(P){if(typeof P=="string")return M(P,D);var J=Object.prototype.toString.call(P).slice(8,-1);return J==="Object"&&P.constructor&&(J=P.constructor.name),J==="Map"||J==="Set"?Array.from(P):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?M(P,D):void 0}}(e,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),d=u[0],x=u[1];x===Object(x)?h[d]=a.expandCallbacks(i,x):typeof x=="string"&&B(l)==="object"&&typeof l[x]=="function"&&(h[d]=l[x].bind(null,a))}),h}},{key:"showValidationErrors",value:function(i){}}],f&&q(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function N(c){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},N(c)}function U(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(N(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(N(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),N(h)==="symbol"?h:String(h)),i)}var h}function H(){return H=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Y(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},H.apply(this,arguments)}function X(c,n){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},X(c,n)}function Y(c){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Y(c)}var K=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Y(i);if(h){var o=Y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(N(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){H(Y(l.prototype),"register",this).call(this),this.input&&(this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname),this.input.setAttribute("aria-label",this.formname))}},{key:"unregister",value:function(){H(Y(l.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(this.shouldBeUnset()||t!=null?N(t)==="object"?t=JSON.stringify(t):this.shouldBeUnset()||typeof t=="string"||(t="".concat(t)):t="",t!==this.serialized)){var u=this.sanitize(t);if(this.input.value!==u){if(this.setValueToInputField(u),this.format==="range"){var d=this.control.querySelector("output");d&&(d.value=u)}var x=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(x),{changed:x,value:u}}}}},{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),u=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),u=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,o,u)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);this.schema.maxLength!==void 0&&this.input.setAttribute("maxlength",this.schema.maxLength),this.schema.pattern!==void 0?this.input.setAttribute("pattern",this.schema.pattern):this.schema.minLength!==void 0&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",function(P){if(P.preventDefault(),P.stopPropagation(),t.schema.template)P.currentTarget.value=t.value;else{var D=P.currentTarget.value,J=t.sanitize(D);D!==J&&(P.currentTarget.value=J),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(P){if(P){var D,J=P.offsetHeight;if(P.offsetHeight<P.scrollHeight)for(D=0;P.offsetHeight<P.scrollHeight+3&&!(D>100);)D++,J++,P.style.height="".concat(J,"px");else{for(D=0;P.offsetHeight>=P.scrollHeight+3&&!(D>100);)D++,J--,P.style.height="".concat(J,"px");P.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(P){t.adjust_height(P.currentTarget)}),this.input.addEventListener("change",function(P){t.adjust_height(P.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var d=this.input;if(this.format==="range"&&(d=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,d,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),t.format==="range"&&(t.control.querySelector("output").value=t.input.value)}),this.schema.template){var x=this.expandCallbacks("template",{template:this.schema.template});typeof x.template=="function"?this.template=x.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",k({},this.defaults.options.cleave||{},this.options.cleave||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",k({},this.defaults.options.imask||{},this.options.imask||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach(function(o){if(t[o]===Object(t[o]))t[o]=e.ajustIMaskOptions(t[o]);else if(o==="mask")if(t[o].substr(0,6)==="regex:"){var u=t[o].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(u!==null)try{t[o]=new RegExp(u[1],u[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],u=e[1];if(window[o]!==void 0&&window[o][u]!==void 0)return window[o][u]}else if(window[t]!==void 0)return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:H(Y(l.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,H(Y(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,H(Y(l.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.input&&(this.value=this.input.value,typeof this.value=="string"||this.shouldBeUnset()||(this.value=""),this.serialized=this.value)}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),H(Y(l.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),H(Y(l.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(u,d){return d.path===e.path&&u.push(d.message),u},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&U(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function tt(c){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(c)}function it(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(tt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(tt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),tt(h)==="symbol"?h:String(h)),i)}var h}function st(){return st=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ct(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},st.apply(this,arguments)}function yt(c,n){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},yt(c,n)}function ct(c){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ct(c)}var Et=function(c){(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&&yt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ct(i);if(h){var o=ct(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(tt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=st(ct(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(u.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",st(ct(l.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",k({},{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(l.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(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),st(ct(l.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(l.prototype),"destroy",this).call(this)}}])&&it(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function At(c){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(c)}function Vt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(At(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(At(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),At(h)==="symbol"?h:String(h)),i)}var h}function lt(){return lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=_t(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},lt.apply(this,arguments)}function wt(c,n){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},wt(c,n)}function _t(c){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_t(c)}_(7327);var Ut=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_t(i);if(h){var o=_t(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(At(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,f=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"getDefault",value:function(){return this.schema.default||[]}},{key:"register",value:function(){lt(_t(l.prototype),"register",this).call(this),this.rows&&this.rows.forEach(function(t){return t.register()})}},{key:"unregister",value:function(){lt(_t(l.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(l.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(l.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(l.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(l.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?k({},this.schema.additionalItems):void 0:k({},this.schema.items[t]):this.schema.items?k({},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 u,d=this.jsoneditor.getEditorClass(o);this.tabs_holder?(u=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):u=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(u);var x=this.jsoneditor.createEditor(d,{jsoneditor:this.jsoneditor,schema:o,container:u,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return x.preBuild(),x.build(),x.postBuild(),x.title_controls||(x.array_controls=this.theme.getButtonHolder(),u.appendChild(x.array_controls)),x}},{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(l.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach(function(o,u){t&&(e.checkParent(o.tab)&&o.tab.parentNode.removeChild(o.tab),e.destroyRow(o,!0),e.row_cache[u]=null),e.rows[u]=null}),this.rows=[],t&&(this.row_cache=[]))}},{key:"destroyRow",value:function(t,e){var o=t.container;e?(t.destroy(),o.parentNode&&o.parentNode.removeChild(o),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),o.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach(function(o){o.tab&&(t?o.tab_text.textContent=o.getHeaderText():o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))})}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach(function(P,D){if(t.rows[D])t.rows[D].setValue(P,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(P,o),t.rows[D].container.style.display="",t.rows[D].tab&&(t.rows[D].tab.style.display=""),t.rows[D].register(),t.jsoneditor.trigger("addRow",t.rows[D]);else{var J=t.addRow(P,o);t.jsoneditor.trigger("addRow",J)}});for(var u=e.length;u<this.rows.length;u++)this.destroyRow(this.rows[u]),this.rows[u]=null;this.rows=this.rows.slice(0,e.length);var d=this.rows.find(function(P){return P.tab===t.active_tab}),x=d!==void 0?d.tab:null;!x&&this.rows.length&&(x=this.rows[0].tab),this.active_tab=x,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 u=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,u),e.push(u);var d=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,d),e.push(d)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var x=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,x),e.push(x),e.some(function(P){return P})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(d){return d.getValue()}),o!==this.value.length||t){var u=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(d,x){if(d.movedown_button){var P=x!==e.rows.length-1;e.setButtonState(d.movedown_button,P)}d.delete_button&&e.setButtonState(d.delete_button,!u),e.value[x]=d.getValue()}),!this.collapsed&&this.setupButtons(u)?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,u=this.rows.length;this.rows[u]=this.getElementEditor(u),this.row_cache[u]=this.rows[u],this.tabs_holder&&(this.rows[u].tab_text=document.createElement("span"),this.rows[u].tab_text.textContent=this.rows[u].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[u].tab=this.theme.getTopTab(this.rows[u].tab_text,this.getValidId(this.rows[u].path)),this.theme.addTopTab(this.tabs_holder,this.rows[u].tab)):(this.rows[u].tab=this.theme.getTab(this.rows[u].tab_text,this.getValidId(this.rows[u].path)),this.theme.addTab(this.tabs_holder,this.rows[u].tab)),this.rows[u].tab.addEventListener("click",function(x){o.active_tab=o.rows[u].tab,o.refreshTabs(),x.preventDefault(),x.stopPropagation()}));var d=this.rows[u].title_controls||this.rows[u].array_controls;return this.hide_delete_buttons||(this.rows[u].delete_button=this._createDeleteButton(u,d)),this.show_copy_button&&(this.rows[u].copy_button=this._createCopyButton(u,d)),u&&!this.hide_move_buttons&&(this.rows[u].moveup_button=this._createMoveUpButton(u,d)),this.hide_move_buttons||(this.rows[u].movedown_button=this._createMoveDownButton(u,d)),t!==void 0&&this.rows[u].setValue(t,e),this.refreshTabs(),this.rows[u]}},{key:"_createDeleteButton",value:function(t,e){var o=this,u=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return u.classList.add("delete","json-editor-btntype-delete"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue().filter(function(nt,ut){return ut!==x}),D=null,J=o.rows[x].getValue();o.setValue(P),o.rows[x]?D=o.rows[x].tab:o.rows[x-1]&&(D=o.rows[x-1].tab),D&&(o.active_tab=D,o.refreshTabs()),o.onChange(!0),o.jsoneditor.trigger("deleteRow",J)}),e&&e.appendChild(u),u}},{key:"_createCopyButton",value:function(t,e){var o=this,u=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),d=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",t),u.addEventListener("click",function(x){var P=o.getValue();x.preventDefault(),x.stopPropagation();var D=1*x.currentTarget.getAttribute("data-i");P.forEach(function(J,nt){if(nt===D){if(d.items.type==="string"&&d.items.format==="uuid")J=R();else if(d.items.type==="object"&&d.items.properties)for(var ut=0,dt=Object.keys(J);ut<dt.length;ut++){var kt=dt[ut];d.items.properties&&d.items.properties[kt]&&d.items.properties[kt].format==="uuid"&&(J[kt]=R())}P.push(J)}}),o.setValue(P),o.refreshValue(!0),o.onChange(!0)}),e.appendChild(u),u}},{key:"_createMoveUpButton",value:function(t,e){var o=this,u=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return u.classList.add("moveup","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i");if(!(x<=0)){var P=o.getValue(),D=P[x-1];P[x-1]=P[x],P[x]=D,o.setValue(P),o.active_tab=o.rows[x-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x-1])}}),e&&e.appendChild(u),u}},{key:"_createMoveDownButton",value:function(t,e){var o=this,u=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return u.classList.add("movedown","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();if(!(x>=P.length-1)){var D=P[x+1];P[x+1]=P[x],P[x]=D,o.setValue(P),o.active_tab=o.rows[x+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x+1])}}),e&&e.appendChild(u),u}},{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,u=this.controls.style.display;return e.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=o,t.controls.style.display=u,t.setButtonText(d.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(d.currentTarget,"","expand","button_expand"))}),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var u,d=t.rows.length;t.row_cache[d]?(u=t.rows[d]=t.row_cache[d],t.rows[d].setValue(t.rows[d].getDefault(),!0),t.rows[d].container.style.display="",t.rows[d].tab&&(t.rows[d].tab.style.display=""),t.rows[d].register()):u=t.addRow(),t.active_tab=t.rows[d].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",u)}),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 u=t.getValue(),d=null,x=u.pop();t.setValue(u),t.rows[t.rows.length-1]&&(d=t.rows[t.rows.length-1].tab),d&&(t.active_tab=d,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",x)}),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 u=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",u)}),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,o=[],u=[];t.forEach(function(d){d.path===e.path?o.push(d):u.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(d){return d.showValidationErrors(u)})}}],f&&Vt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Kt(c){return Kt=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},Kt(c)}function fe(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Kt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Kt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Kt(h)==="symbol"?h:String(h)),i)}var h}function St(){return St=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=It(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},St.apply(this,arguments)}function jt(c,n){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},jt(c,n)}function It(c){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},It(c)}Ut.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var qt=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=It(i);if(h){var o=It(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Kt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){St(It(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){St(It(l.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach(function(o){return e=Math.max(e,"".concat(t.select_values[o]).length+4)}),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;St(It(l.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||[],u=e.options&&e.options.enum||[],d=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var x=u[t]||{};"title"in x||(x.title="".concat(d[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(x),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 u=this.theme.getCheckboxLabel(this.option_enum[t].title);if(u.htmlFor=o,this.option_enum[t].infoText){var d=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));u.appendChild(d)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(u,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(x){return x.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(x){var P=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&P.push(e.select_values[e.option_keys[t]]);e.updateValue(P),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(It(l.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(u){return"".concat(u)}),Object.keys(this.select_options).forEach(function(u){o.select_options[u][o.input_type==="select"?"selected":"checked"]=t.includes(u)}),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=[],u=0;u<t.length;u++)if(this.select_options["".concat(t[u])]){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}else e=!0;return this.value=o,e}},{key:"sanitize",value:function(t){return this.schema.items.type==="boolean"?!!t:this.schema.items.type==="number"?1*t||0:this.schema.items.type==="integer"?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach(function(e){return t.inputs[e].disabled=!1}),St(It(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach(function(o){return e.inputs[o].disabled=!0}),St(It(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(It(l.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(u,d){return d.path.match(e)&&u.push(d.message),u},[]);o.length?this.theme.addInputError(this.input||this.inputs,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&fe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function xt(c){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(c)}function lr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(xt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xt(h)==="symbol"?h:String(h)),i)}var h}function de(){return de=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ge(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},de.apply(this,arguments)}function Ne(c,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ne(c,n)}function ge(c){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ge(c)}var cr=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ne(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ge(i);if(h){var o=ge(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(xt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){this.choices_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):de(ge(l.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",k({},{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 u=t.choices_instance.getValue(!0);t.updateValue(u),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}de(ge(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],u=0;u<t.length;u++)if(!(!this.select_values["".concat(t[u])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[u])))){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),de(ge(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),de(ge(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),de(ge(l.prototype),"destroy",this).call(this)}}])&&lr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(qt);function Ae(c){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ae(c)}function dr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Ae(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ae(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ae(h)==="symbol"?h:String(h)),i)}var h}function Le(){return Le=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Ce(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Le.apply(this,arguments)}function We(c,n){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},We(c,n)}function Ce(c){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ce(c)}var pr=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&We(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ce(i);if(h){var o=Ce(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Ae(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){this.select2_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Le(Ce(l.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",k({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(o),e.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Le(Ce(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],u=0;u<t.length;u++)if(!(!this.select_values["".concat(t[u])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[u])))){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Le(Ce(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Le(Ce(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Le(Ce(l.prototype),"destroy",this).call(this)}}])&&dr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(qt);function ot(c){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(c)}function bt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ot(h)==="symbol"?h:String(h)),i)}var h}function Mt(){return Mt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Qt(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Mt.apply(this,arguments)}function $t(c,n){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},$t(c,n)}function Qt(c){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qt(c)}var Ze=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$t(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qt(i);if(h){var o=Qt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){this.selectize_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):Mt(Qt(l.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",k({},{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 u=e.selectize_instance.getValue();e.updateValue(u),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)),Mt(Qt(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],u=0;u<t.length;u++)if(!(!this.select_values["".concat(t[u])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[u])))){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Mt(Qt(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Mt(Qt(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Mt(Qt(l.prototype),"destroy",this).call(this)}}])&&bt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(qt);function Ke(c){return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ke(c)}function xr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Ke(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ke(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ke(h)==="symbol"?h:String(h)),i)}var h}function Qe(){return Qe=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Se(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Qe.apply(this,arguments)}function fr(c,n){return fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},fr(c,n)}function Se(c){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(c)}var Dn=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Se(i);if(h){var o=Se(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Ke(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),Qe(Se(l.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",k({},{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)),Qe(Se(l.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),Qe(Se(l.prototype),"destroy",this).call(this)}}])&&xr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function Dt(c){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(c)}function te(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){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(h)==="symbol"?h:String(h)),i)}var h}function Xt(){return Xt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ze(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Xt.apply(this,arguments)}function ce(c,n){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ce(c,n)}function ze(c){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ze(c)}_(561);var Vi=function(c){(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&&ce(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ze(i);if(h){var o=ze(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Dt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",function(o){if(e.count===e.current_item_index)e.value[e.count][e.key]=o.target.result;else{var u={};for(var d in e.parent.schema.properties)u[d]="";u[e.key]=o.target.result,e.value.splice(e.count,0,u)}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 u=0;u<t.total;u++){var d=new FileReader;t.setFileReaderListener(d),d.readAsDataURL(o.currentTarget.files[u])}}else{var x=new FileReader;x.onload=function(P){t.value=P.target.result,t.refreshPreview(),t.onChange(!0),x=null},x.readAsDataURL(o.currentTarget.files[0])}})}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control);var e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",function(){t.uploader.click()}),this.control.appendChild(e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),t.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Xt(ze(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Xt(ze(l.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),Xt(ze(l.prototype),"destroy",this).call(this)}}])&&te(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Nn(c){return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nn(c)}function us(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Nn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nn(h)==="symbol"?h:String(h)),i)}var h}function ui(){return ui=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Zr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},ui.apply(this,arguments)}function on(c,n){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},on(c,n)}function Zr(c){return Zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zr(c)}var hs=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&on(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Zr(i);if(h){var o=Zr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Nn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t,e){var o;return function(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}(this,l),(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=l,(f=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.expandCallbacks("button",k({},{icon:"",validated:!1,align:"left",action:function(u,d){window.alert('No button action defined for "'.concat(u.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),o=this.translateProperty(e.text||this.schema.title)||this.key;this.input=this.getButton(o,e.icon,o),typeof e.action!="function"?window.alert('No button action defined for "'.concat(this.path,'"')):this.input.addEventListener("click",e.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(e.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()},e.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,ui(Zr(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,ui(Zr(l.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,ui(Zr(l.prototype),"destroy",this).call(this)}}])&&us(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function $n(c){return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$n(c)}function ds(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if($n(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if($n(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),$n(h)==="symbol"?h:String(h)),i)}var h}function kn(){return kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Mr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},kn.apply(this,arguments)}function zi(c,n){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zi(c,n)}function Mr(c){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mr(c)}var ps=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Mr(i);if(h){var o=Mr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&($n(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){t=!!t;var o=this.getValue()!==t;this.value=t,this.input.checked=this.value,this.onChange(o)}},{key:"register",value:function(){kn(Mr(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){kn(Mr(l.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"build",value:function(){var t=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.onChange(!0)}),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,kn(Mr(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,kn(Mr(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),kn(Mr(l.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(u,d){return d.path===e.path&&u.push(d.message),u},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&ds(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Mn(c){return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mn(c)}function ea(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Mn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Mn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Mn(h)==="symbol"?h:String(h)),i)}var h}function Cr(){return Cr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Sr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Cr.apply(this,arguments)}function an(c,n){return an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},an(c,n)}function Sr(c){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sr(c)}_(2707);var hi=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Sr(i);if(h){var o=Sr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Mn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){var o=this.typecast(t),u=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;(this.enum_options.length>0&&!this.enum_values.includes(o)||e&&!this.isRequired()&&!u)&&(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(){Cr(Sr(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Cr(Sr(l.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 u=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach(function(d,x){o.enum_options[x]="".concat(d),o.enum_display[x]="".concat(o.translateProperty(u[x])||d),o.enum_values[x]=o.typecast(d)})}else if(this.schema.type==="boolean")this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(t=0;t<this.schema.enumSource.length;t++)typeof this.schema.enumSource[t]=="string"?this.enumSource[t]={source:this.schema.enumSource[t]}:Array.isArray(this.schema.enumSource[t])?this.enumSource[t]=this.schema.enumSource[t]:this.enumSource[t]=k({},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=[],u=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var d=0;d<this.enumSource.length;d++)if(Array.isArray(this.enumSource[d]))o=o.concat(this.enumSource[d]),u=u.concat(this.enumSource[d]);else{var x=[];if(x=Array.isArray(this.enumSource[d].source)?this.enumSource[d].source:t[this.enumSource[d].source]){if(this.enumSource[d].slice&&(x=Array.prototype.slice.apply(x,this.enumSource[d].slice)),this.enumSource[d].filter){var P=[];for(e=0;e<x.length;e++)this.enumSource[d].filter({i:e,item:x[e],watched:t})&&P.push(x[e]);x=P}var D=[],J=[];for(e=0;e<x.length;e++){var nt=x[e];this.enumSource[d].value?J[e]=this.typecast(this.enumSource[d].value({i:e,item:nt})):J[e]=x[e],this.enumSource[d].title?D[e]=this.enumSource[d].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[d].sort&&(function(dt,kt,Ct){dt.map(function(Nt,ne){return{v:Nt,t:kt[ne]}}).sort(function(Nt,ne){return Nt.v<ne.v?-Ct:Nt.v===ne.v?0:Ct}).forEach(function(Nt,ne){dt[ne]=Nt.v,kt[ne]=Nt.t})}).bind(null,J,D,this.enumSource[d].sort==="desc"?1:-1)(),o=o.concat(J),u=u.concat(D)}}var ut=this.value;this.theme.setSelectOptions(this.input,o,u),this.enum_options=o,this.enum_display=u,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))}Cr(Sr(l.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Cr(Sr(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Cr(Sr(l.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),Cr(Sr(l.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(u,d){return d.path===e.path&&u.push(d.message),u},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&ea(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Hn(c){return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(c)}function ml(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Hn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Hn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Hn(h)==="symbol"?h:String(h)),i)}var h}function Hr(){return Hr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=z(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Hr.apply(this,arguments)}function L(c,n){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},L(c,n)}function z(c){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(c)}var rt=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=z(i);if(h){var o=z(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Hn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){if(this.choices_instance){var o=this.typecast(t||"");if(this.enum_values.includes(o)||(o=this.enum_values[0]),this.value===o)return;e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.choices_instance.setChoiceByValue(this.input.value),this.value=o,this.onChange()}else Hr(z(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",k({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Hr(z(l.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Hr(z(l.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var e=this.enum_options.map(function(o,u){return{value:o,label:t.enum_display[u]}});this.choices_instance.setChoices(e,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Hr(z(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Hr(z(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Hr(z(l.prototype),"destroy",this).call(this)}}])&&ml(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function Q(c){return Q=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},Q(c)}function mt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Q(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Q(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Q(h)==="symbol"?h:String(h)),i)}var h}function Bt(){return Bt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ft(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Bt.apply(this,arguments)}function Yt(c,n){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yt(c,n)}function ft(c){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ft(c)}rt.rules={".choices > *":"box-sizing:border-box"};var vt=function(c){(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&&Yt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ft(i);if(h){var o=ft(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Q(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){if(Bt(ft(l.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&&Q(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 u=this.getButton("","clear","flatpickr_clear_button");u.setAttribute("data-clear",""),e.push(u)}var d=this.input.parentNode,x=this.input.nextSibling,P=this.theme.getInputGroup(this.input,e);P!==void 0?(this.options.flatpickr.inline=!1,d.insertBefore(P,x),t=P):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),this.options.flatpickr.inline===!0&&this.options.flatpickr.inlineHideInput===!0&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if(this.schema.type==="string")return this.value;if(this.value!==""&&this.value!==void 0){var t=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,e,o){if(this.schema.type==="string")Bt(ft(l.prototype),"setValue",this).call(this,t,e,o),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var u=new Date(1e3*t),d=u.getFullYear(),x=this.zeroPad(u.getMonth()+1),P=this.zeroPad(u.getDate()),D=this.zeroPad(u.getHours()),J=this.zeroPad(u.getMinutes()),nt=this.zeroPad(u.getSeconds()),ut=[d,x,P].join("-"),dt=[D,J,nt].join(":"),kt="".concat(ut,"T").concat(dt);this.schema.format==="date"?kt=ut:this.schema.format==="time"&&(kt=dt),this.input.value=kt,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(kt)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Bt(ft(l.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&mt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function Zt(c){return Zt=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},Zt(c)}function oe(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Zt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Zt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Zt(h)==="symbol"?h:String(h)),i)}var h}function Tt(){return Tt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Be(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Tt.apply(this,arguments)}function ue(c,n){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ue(c,n)}function Be(c){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(c)}var ir=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Be(i);if(h){var o=Be(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Zt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Tt(Be(l.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Tt(Be(l.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Tt(Be(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Tt(Be(l.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(u,d){u&&(t.currentEditor===d?u.container.style.display="":u.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=k({},this.schema,this.jsoneditor.refs[t]),u=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(d),d.preBuild(),d.build(),d.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if(this.schema.links[t].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=k({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(t){this.editors[this.currentEditor]&&this.refreshValue(),Tt(Be(l.prototype),"onChildEditorChange",this).call(this,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Tt(Be(l.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach(function(e){e&&e.showValidationErrors(t)})}}])&&oe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Rt(c){return Rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rt(c)}function ee(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function zt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Rt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Rt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Rt(h)==="symbol"?h:String(h)),i)}var h}function me(){return me=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Oe(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},me.apply(this,arguments)}function Ue(c,n){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ue(c,n)}function Oe(c){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Oe(c)}var $e=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Oe(i);if(h){var o=Oe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Rt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(o){t.selected=t.select_options.indexOf(o.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)}),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach(function(o,u){if(e===JSON.stringify(o))return t.selected=u,!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,me(Oe(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,me(Oe(l.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,o,u=this;if(t===null)return"<em>null</em>";if(Rt(t)==="object"){var d="";return e=t,o=function(x,P){var D=u.getHTML(P);Array.isArray(t)||(D="<div><em>".concat(x,"</em>: ").concat(D,"</div>")),d+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(x,P){return o(P,x)}):Object.entries(e).forEach(function(x){var P,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(P=x)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var Nt,ne,Re,Gt,gt=[],Jt=!0,Ge=!1;try{if(Re=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Jt=!1}else for(;!(Jt=(Nt=Re.call(Ct)).done)&&(gt.push(Nt.value),gt.length!==kt);Jt=!0);}catch(W){Ge=!0,ne=W}finally{try{if(!Jt&&Ct.return!=null&&(Gt=Ct.return(),Object(Gt)!==Gt))return}finally{if(Ge)throw ne}}return gt}}(P,D)||function(dt,kt){if(dt){if(typeof dt=="string")return ee(dt,kt);var Ct=Object.prototype.toString.call(dt).slice(8,-1);return Ct==="Object"&&dt.constructor&&(Ct=dt.constructor.name),Ct==="Map"||Ct==="Set"?Array.from(dt):Ct==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ct)?ee(dt,kt):void 0}}(P,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
75
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),nt=J[0],ut=J[1];return o(nt,ut)}),d=Array.isArray(t)?"<ol>".concat(d,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(d,"</ul>")}return typeof t=="boolean"?t?"true":"false":typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):t}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),me(Oe(l.prototype),"destroy",this).call(this)}}])&&zt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function xe(c){return xe=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},xe(c)}function mr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(xe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xe(h)==="symbol"?h:String(h)),i)}var h}function Me(){return Me=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Pr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Me.apply(this,arguments)}function Fr(c,n){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Fr(c,n)}function Pr(c){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pr(c)}var fs=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pr(i);if(h){var o=Pr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(xe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){Me(Pr(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Me(Pr(l.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="":xe(t)==="object"?t=JSON.stringify(t):typeof t!="string"&&(t="".concat(t)),t!==this.serialized)){var u=this.sanitize(t);if(this.input.value!==u){this.input.value=u;var d=o||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(d)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Me(Pr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Me(Pr(l.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Me(Pr(l.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),Me(Pr(l.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()}}])&&mr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Jr(c){return Jr=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},Jr(c)}function yl(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Jr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Jr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Jr(h)==="symbol"?h:String(h)),i)}var h}function Ui(c,n){return Ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ui(c,n)}function Vr(c){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vr(c)}var qi=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Vr(i);if(h){var o=Vr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Jr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}}])&&yl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hs);function jn(c){return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jn(c)}function ms(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(jn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jn(h)==="symbol"?h:String(h)),i)}var h}function Gi(){return Gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Fn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Gi.apply(this,arguments)}function Wi(c,n){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wi(c,n)}function Fn(c){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fn(c)}var ys=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wi(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Fn(i);if(h){var o=Fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(jn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){if(Gi(Fn(l.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=""))}}])&&ms(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function zr(c){return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(c)}function di(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(zr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(zr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),zr(h)==="symbol"?h:String(h)),i)}var h}function Yr(c,n){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yr(c,n)}function Zi(c){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zi(c)}var bs=function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Zi(i);if(h){var o=Zi(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(zr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(A),o=parseInt(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&di(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(ys);function Vn(c){return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vn(c)}function Ji(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Vn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Vn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Vn(h)==="symbol"?h:String(h)),i)}var h}function sn(){return sn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Xr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},sn.apply(this,arguments)}function zn(c,n){return zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zn(c,n)}function Xr(c){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xr(c)}var ra=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xr(i);if(h){var o=Xr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Vn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"preBuild",value:function(){if(sn(Xr(l.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=k(this.options,this.schema.options||{})}}])&&Ji(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function Un(c){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Un(c)}function bl(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Un(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Un(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Un(h)==="symbol"?h:String(h)),i)}var h}function Kr(){return Kr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Tr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Kr.apply(this,arguments)}function Yi(c,n){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yi(c,n)}function Tr(c){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tr(c)}var vs=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yi(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Tr(i);if(h){var o=Tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Un(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=Kr(Tr(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(u.value)}},{key:"build",value:function(){this.options.format="textarea",Kr(Tr(l.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",k({},{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)):Kr(Tr(l.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),Kr(Tr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Kr(Tr(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Kr(Tr(l.prototype),"destroy",this).call(this)}}])&&bl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K),gs=(_(6541),_(9337),_(3321),function(c){var n=c.split(".");if(n.length!==4)throw new Error("error_ipv4");n.forEach(function(f){if(isNaN(+f)||+f<0||+f>255)throw new Error("error_ipv4")})}),na=function(c){if(!c.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")},ia=function(c){if(!c.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function oa(c,n,f,i){try{switch(c.format){case"ipv4":gs(n);break;case"ipv6":na(n);break;case"hostname":ia(n)}return[]}catch(h){return[{path:f,property:"format",message:i(h.message)}]}}function Xi(c,n){var f=Object.keys(c);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(c);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(c,h).enumerable})),f.push.apply(f,i)}return f}function aa(c,n,f){return(n=Ki(n))in c?Object.defineProperty(c,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[n]=f,c}function pi(c,n){return function(f){if(Array.isArray(f))return f}(c)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,l,t,e,o=[],u=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;u=!1}else for(;!(u=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);u=!0);}catch(x){d=!0,l=x}finally{try{if(!u&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw l}}return o}}(c,n)||fi(c,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
76
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yr(c){return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yr(c)}function ke(c){return function(n){if(Array.isArray(n))return mi(n)}(c)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(c)||fi(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
77
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fi(c,n){if(c){if(typeof c=="string")return mi(c,n);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?mi(c,n):void 0}}function mi(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function sa(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,Ki(i.key),i)}}function Ki(c){var n=function(f,i){if(yr(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(yr(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(c);return yr(n)==="symbol"?n:String(n)}var Qi=function(){function c(i,h,a,l){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,c),this.jsoneditor=i,this.schema=h||this.jsoneditor.schema,this.options=a||{},this.translate=this.jsoneditor.translate||l.translate,this.translateProperty=this.jsoneditor.translateProperty||l.translateProperty,this.defaults=l,this._validateSubSchema={dependentRequired:function(t,e,o){var u=[];if(t.dependentRequired!==void 0){var d=[];Object.keys(t.dependentRequired).forEach(function(x){if(e[x]!==void 0){var P=t.dependentRequired[x];d=P.filter(function(D){return!S(e,D)})}}),d.length>0&&u.push({message:"Must have the required properties: "+d.join(", "),path:o})}return u},dependentSchemas:function(t,e,o){var u=this,d=[];return Object.keys(t.dependentSchemas).forEach(function(x){if(e[x]!==void 0){var P=t.dependentSchemas[x],D=u._validateSchema(P,e,o);d=[].concat(ke(d),ke(D))}}),d},contains:function(t,e,o){var u=this,d=[],x=0;e.forEach(function(D){u._validateSchema(t.contains,D,o).length===0&&x++});var P=x===0;return t.minContains!==void 0?x<t.minContains&&d.push({message:this.translate("error_minContains",[x,t.minContains],t),path:o}):P&&d.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&x>t.maxContains&&d.push({message:this.translate("error_maxContains",[x,t.maxContains],t),path:o}),d},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var u=this._validateSchema(t.if,e,o),d=[],x=[];return t.then!==void 0&&(d=this._validateSchema(t.then,e,o)),t.else!==void 0&&(x=this._validateSchema(t.else,e,o)),t.if===!0?d:t.if===!1?x:u.length===0?d:u.length>0?x:[]},const:function(t,e,o){return JSON.stringify(t.const)!==JSON.stringify(e)||Array.isArray(e)||yr(e)==="object"?[{path:o,property:"const",message:this.translate("error_const",null,t)}]:[]},enum:function(t,e,o){var u=JSON.stringify(e);return t.enum.some(function(d){return u===JSON.stringify(d)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var u=this;return t.extends.reduce(function(d,x){return d.push.apply(d,ke(u._validateSchema(x,e,o))),d},[])},allOf:function(t,e,o){var u=this;return t.allOf.reduce(function(d,x){return d.push.apply(d,ke(u._validateSchema(x,e,o))),d},[])},anyOf:function(t,e,o){var u=this;return t.anyOf.some(function(d){return!u._validateSchema(d,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var u=this,d=0,x=[];t.oneOf.forEach(function(D,J){var nt=u._validateSchema(D,e,o);nt.length||d++,nt.forEach(function(ut){ut.path="".concat(o,".oneOf[").concat(J,"]").concat(ut.path.substr(o.length))}),x.push.apply(x,ke(nt))});var P=[];return d!==1&&(P.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[d],t)}),P.push.apply(P,x)),P},not:function(t,e,o){return this._validateSchema(t.not,e,o).length?[]:[{path:o,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,o){var u=this;if(Array.isArray(t.type)){if(!t.type.some(function(d){return u._checkType(d,e)}))return[{path:o,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&t.type==="integer"){if(!this._checkType("string","".concat(e)))return[{path:o,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:o,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,o){var u=this;if(Array.isArray(t.disallow)){if(t.disallow.some(function(d){return u._checkType(d,e)}))return[{path:o,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:o,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},divisibleBy:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},maximum:function(t,e,o){var u=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?u=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(u=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),u?[]:[{path:o,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,o){var u=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?u=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(u=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),u?[]:[{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 u=[];return"".concat(e).length>t.maxLength&&u.push({path:o,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),u},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 u=this,d=[];if(Array.isArray(t.items))for(var x=0;x<e.length;x++)if(t.items[x])d.push.apply(d,ke(this._validateSchema(t.items[x],e[x],"".concat(o,".").concat(x))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){d.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}d.push.apply(d,ke(this._validateSchema(t.additionalItems,e[x],"".concat(o,".").concat(x))))}else e.forEach(function(P,D){d.push.apply(d,ke(u._validateSchema(t.items,P,"".concat(o,".").concat(D))))});return d},maxItems:function(t,e,o){return e.length>t.maxItems?[{path:o,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,o){return e.length<t.minItems?[{path:o,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,o){for(var u={},d=0;d<e.length;d++){var x=JSON.stringify(e[d]);if(u[x])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];u[x]=!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 u=this,d=[];return Array.isArray(t.required)&&t.required.forEach(function(x){if(e[x]===void 0){var P=u.jsoneditor.getEditor("".concat(o,".").concat(x));P&&P.dependenciesFulfilled===!1||P&&["button","info"].includes(P.schema.format||P.schema.type)||d.push({path:o,property:"required",message:u.translate("error_required",[t&&t.properties&&t.properties[x]&&t.properties[x].title?t.properties[x].title:x],t)})}}),d},properties:function(t,e,o,u){var d=this,x=[];return Object.entries(t.properties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1];u[J]=!0,x.push.apply(x,ke(d._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),x},patternProperties:function(t,e,o,u){var d=this,x=[];return Object.entries(t.patternProperties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1],ut=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=pi(dt,2),Ct=kt[0],Nt=kt[1];ut.test(Ct)&&(u[Ct]=!0,x.push.apply(x,ke(d._validateSchema(nt,Nt,"".concat(o,".").concat(Ct)))))})}),x}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,u){for(var d=this,x=[],P=Object.keys(e),D=null,J=function(){var dt="";return D=P[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(x.push({path:o,property:"propertyNames",message:d.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=pi(kt,2),Nt=Ct[0],ne=Ct[1],Re=!1;switch(Nt){case"maxLength":if(typeof ne!="number"){dt="error_property_names_maxlength";break}if(D.length>ne){dt="error_property_names_exceeds_maxlength";break}return!0;case"const":if(ne!==D){dt="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(ne)){dt="error_property_names_enum";break}if(ne.forEach(function(Gt){Gt===D&&(Re=!0)}),!Re){dt="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof ne!="string"){dt="error_property_names_pattern";break}if(!new RegExp(ne).test(D)){dt="error_property_names_pattern_mismatch";break}return!0;default:return x.push({path:o,property:"propertyNames",message:d.translate("error_property_names_unsupported",[Nt],t)}),!1}return x.push({path:o,property:"propertyNames",message:d.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<P.length;nt++){var ut=J();if(ut!=="continue"&&ut==="break")break}return x},additionalProperties:function(t,e,o,u){for(var d=[],x=Object.keys(e),P=0;P<x.length;P++){var D=x[P];if(!u[D]){if(!t.additionalProperties){d.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;d.push.apply(d,ke(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return d},dependencies:function(t,e,o){var u=this,d=[];return Object.entries(t.dependencies).forEach(function(x){var P=pi(x,2),D=P[0],J=P[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&d.push({path:o,property:"dependencies",message:u.translate("error_dependency",[nt],t)})}):d.push.apply(d,ke(u._validateSchema(J,e,o))))}),d}}}var n,f;return n=c,f=[{key:"fitTest",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,l={match:0,extra:0};if(yr(i)==="object"&&i!==null){var t=this._getSchema(h);if(t.anyOf){var e,o=function(nt){for(var ut=1;ut<arguments.length;ut++){var dt=arguments[ut]!=null?arguments[ut]:{};ut%2?Xi(Object(dt),!0).forEach(function(kt){aa(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Xi(Object(dt)).forEach(function(kt){Object.defineProperty(nt,kt,Object.getOwnPropertyDescriptor(dt,kt))})}return nt}({},l),u=function(nt,ut){var dt=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(!dt){if(Array.isArray(nt)||(dt=fi(nt))){dt&&(nt=dt);var kt=0,Ct=function(){};return{s:Ct,n:function(){return kt>=nt.length?{done:!0}:{done:!1,value:nt[kt++]}},e:function(Gt){throw Gt},f:Ct}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
78
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Nt,ne=!0,Re=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Gt=dt.next();return ne=Gt.done,Gt},e:function(Gt){Re=!0,Nt=Gt},f:function(){try{ne||dt.return==null||dt.return()}finally{if(Re)throw Nt}}}}(t.anyOf);try{for(u.s();!(e=u.n()).done;){var d=e.value,x=this.fitTest(i,d,a);(x.match>o.match||x.match===o.match&&x.extra<o.extra)&&(o=x)}}catch(nt){u.e(nt)}finally{u.f()}return o}var P=this._getSchema(h).properties;for(var D in P)if(S(P,D)){if(yr(i[D])==="object"&&yr(P[D])==="object"&&yr(P[D].properties)==="object"){var J=this.fitTest(i[D],P[D],a/100);l.match+=J.match,l.extra+=J.extra}i[D]!==void 0&&(l.match+=a)}else l.extra+=a}return l}},{key:"_getSchema",value:function(i){return i===void 0?k({},this.jsoneditor.expandRefs(this.schema)):i}},{key:"validate",value:function(i){return this._validateSchema(this.schema,i)}},{key:"_validateSchema",value:function(i,h,a){var l=this,t=[];return a=a||this.jsoneditor.root.formname,i=k({},this.jsoneditor.expandRefs(i)),h===void 0?this._validateV3Required(i,h,a):(Object.keys(i).forEach(function(e){l._validateSubSchema[e]&&t.push.apply(t,ke(l._validateSubSchema[e].call(l,i,h,a)))}),t.push.apply(t,ke(this._validateByValueType(i,h,a))),i.links&&i.links.forEach(function(e,o){e.rel&&e.rel.toLowerCase()==="describedby"&&(i=l._expandSchemaLink(i,o),t.push.apply(t,ke(l._validateSchema(i,h,a,l.translate))))}),["date","time","datetime-local"].includes(i.format)&&t.push.apply(t,ke(this._validateDateTimeSubSchema(i,h,a))),["uuid"].includes(i.format)&&t.push.apply(t,ke(this._validateUUIDSchema(i,h,a))),t.push.apply(t,ke(this._validateCustomValidator(i,h,a))),this._removeDuplicateErrors(t))}},{key:"_expandSchemaLink",value:function(i,h){var a=i.links[h].href,l=this.jsoneditor.root.getValue(),t=this.jsoneditor.compileTemplate(a,this.jsoneditor.template),e=document.location.origin+document.location.pathname+t(l);return i.links=i.links.slice(0,h).concat(i.links.slice(h+1)),k({},i,this.jsoneditor.refs[e])}},{key:"_validateV3Required",value:function(i,h,a){return(i.required!==void 0&&i.required===!0||i.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&i.type!=="info"?[{path:a,property:"required",message:this.translate("error_notset",null,i)}]:[]}},{key:"_validateByValueType",value:function(i,h,a){var l=this,t=[];if(h===null)return t;if(typeof h=="number")Object.keys(i).forEach(function(o){l._validateNumberSubSchema[o]&&t.push.apply(t,ke(l._validateNumberSubSchema[o].call(l,i,h,a)))});else if(typeof h=="string")Object.keys(i).forEach(function(o){l._validateStringSubSchema[o]&&t.push.apply(t,ke(l._validateStringSubSchema[o].call(l,i,h,a)))});else if(Array.isArray(h))Object.keys(i).forEach(function(o){l._validateArraySubSchema[o]&&t.push.apply(t,ke(l._validateArraySubSchema[o].call(l,i,h,a)))});else if(yr(h)==="object"){var e={};Object.keys(i).forEach(function(o){l._validateObjectSubSchema[o]&&t.push.apply(t,ke(l._validateObjectSubSchema[o].call(l,i,h,a,e)))}),i.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||i.oneOf||i.anyOf||i.allOf||(i.additionalProperties=!1),Object.keys(i).forEach(function(o){l._validateObjectSubSchema2[o]!==void 0&&t.push.apply(t,ke(l._validateObjectSubSchema2[o].call(l,i,h,a,e)))})}return t}},{key:"_validateUUIDSchema",value:function(i,h,a){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(h)?[]:[{path:a,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],i)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(i,h,a){var l=i.multipleOf||i.divisibleBy,t=h/l===Math.floor(h/l);return window.math?t=window.math.mod(window.math.bignumber(h),window.math.bignumber(l)).equals(0):window.Decimal&&(t=new window.Decimal(h).mod(new window.Decimal(l)).equals(0)),t?[]:[{path:a,property:i.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[l],i)}]}},{key:"_validateDateTimeSubSchema",value:function(i,h,a){var l=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,u,d){return 1*u<1?[{path:d,property:"format",message:l.translate("error_invalid_epoch",null,o)}]:u!==Math.abs(parseInt(u))?[{path:d,property:"format",message:l.translate("error_".concat(o.format.replace(/-/g,"_")),[e],o)}]:[]}(i,h,a);if(t&&t.flatpickr){if(t)return function(o,u,d,x){if(u!==""){var P;if(x.flatpickr.config.mode!=="single"){var D=x.flatpickr.config.mode==="range"?x.flatpickr.l10n.rangeSeparator:", ";P=x.flatpickr.selectedDates.map(function(nt){return x.flatpickr.formatDate(nt,x.flatpickr.config.dateFormat)}).join(D)}try{if(P){if(P!==u)throw new Error("".concat(x.flatpickr.config.mode," mismatch"))}else if(x.flatpickr.formatDate(x.flatpickr.parseDate(u,x.flatpickr.config.dateFormat),x.flatpickr.config.dateFormat)!==u)throw new Error("mismatch")}catch{var J=x.flatpickr.config.errorDateFormat!==void 0?x.flatpickr.config.errorDateFormat:x.flatpickr.config.dateFormat;return[{path:d,property:"format",message:l.translate("error_".concat(x.format.replace(/-/g,"_")),[J],o)}]}}return[]}(i,h,a,t)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})?$/,time:/^(\d{2}:\d{2}(?::\d{2})?)?$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/}[i.format].test(h))return[{path:a,property:"format",message:this.translate("error_".concat(i.format.replace(/-/g,"_")),[e],i)}];return[]}},{key:"_validateCustomValidator",value:function(i,h,a){var l=this,t=[];t.push.apply(t,ke(oa.call(this,i,h,a,this.translate)));var e=function(o){t.push.apply(t,ke(o.call(l,i,h,a)))};return this.defaults.custom_validators.forEach(e),this.options.custom_validators&&this.options.custom_validators.forEach(e),t}},{key:"_removeDuplicateErrors",value:function(i){return i.reduce(function(h,a){var l=!0;return h||(h=[]),h.forEach(function(t){t.message===a.message&&t.path===a.path&&t.property===a.property&&(t.errorcount++,l=!1)}),l&&(a.errorcount=1,h.push(a)),h},[])}},{key:"_checkType",value:function(i,h){var a={string:function(l){return typeof l=="string"},number:function(l){return typeof l=="number"},integer:function(l){return typeof l=="number"&&l===Math.floor(l)},boolean:function(l){return typeof l=="boolean"},array:function(l){return Array.isArray(l)},object:function(l){return l!==null&&!Array.isArray(l)&&yr(l)==="object"},null:function(l){return l===null}};return typeof i=="string"?!a[i]||a[i](h):!this._validateSchema(i,h).length}}],f&&sa(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function qe(c){return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qe(c)}function Ur(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(qe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(qe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),qe(h)==="symbol"?h:String(h)),i)}var h}function ln(){return ln=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=br(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},ln.apply(this,arguments)}function la(c,n){return la=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},la(c,n)}function br(c){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},br(c)}var to=function(c){(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&&la(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=br(i);if(h){var o=br(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(qe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}ln(br(l.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(ln(br(l.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,ln(br(l.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,ln(br(l.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(u,d){var x,P;u&&(e.type===d?(e.keep_only_existing_values&&(x=u.getValue(),P=o,Object.keys(P).forEach(function(D){D in x&&(x[D]=P[D])}),o=x),(e.keep_values||e.if)&&u.setValue(o,!0),u.container.style.display=""):u.container.style.display="none")}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,o=this,u=this.types[t],d=this.theme.getChildEditorHolder();this.editor_holder.appendChild(d),typeof u=="string"?(e=k({},this.schema)).type=u:(e=k({},this.schema,u),e=this.jsoneditor.expandRefs(e),u&&u.required&&Array.isArray(u.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(e.required=this.schema.required.concat(u.required)));var x=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(x,{jsoneditor:this.jsoneditor,schema:e,container:d,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&(this.editors[t].header.style.display="none"),this.editors[t].option=this.switcher_options[t],d.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(d.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,this.jsoneditor.options.keep_oneof_values!==void 0&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),this.options.keep_oneof_values!==void 0&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,this.jsoneditor.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),this.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.options.keep_only_existing_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else if(this.schema.if)this.if=!0,this.ifSchema=JSON.parse(JSON.stringify(this.schema.if)),this.thenSchema={title:"then"},this.elseSchema={title:"else"},this.types=[],this.schema.then&&$(this.thenSchema,this.schema,this.schema.then),this.schema.else&&$(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach(function(o){delete o.if,delete o.then,delete o.else}),delete this.schema.if;else{if(this.schema.type&&this.schema.type!=="any")Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;qe(t)==="object"&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach(function(o){t.includes(o)||e.push(o)}),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.if||(this.container.appendChild(this.header),e.appendChild(this.switcher)),this.switcher.addEventListener("change",function(u){u.preventDefault(),u.stopPropagation(),t.switchEditor(t.display_text.indexOf(u.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(u,d){var x;t.editors[d]=!1,typeof u=="string"?(x=k({},t.schema)).type=u:(x=k({},t.schema,u),u.required&&Array.isArray(u.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(x.required=t.schema.required.concat(u.required))),t.validators[d]=new Qi(t.jsoneditor,x,o,t.defaults)}),this.jsoneditor.on("change",function(){t.switchIf()}),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),ln(br(l.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,u=this.type,d={match:0,extra:0,i:this.type},x={match:0,i:null};this.validators.forEach(function(J,nt){var ut=null;o.anyOf!==void 0&&o.anyOf&&(ut=J.fitTest(t),(d.match<ut.match||d.match===ut.match&&d.extra>ut.extra)&&((d=ut).i=nt)),J.validate(t).length||x.i!==null?d=x:(x.i=nt,ut!==null&&(x.match=ut.match))});var P=x.i;this.anyOf!==void 0&&this.anyOf&&x.match<d.match&&(P=d.i),this.if&&(P=this.getIfType(t)),P===null&&(P=this.type),this.type=P,this.switcher.value=this.display_text[P];var D=this.type!==u;D&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),t!==void 0&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(D)}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ln(br(l.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(u,d){if(u){var x="".concat(e.path,".").concat(o,"[").concat(d,"]");u.showValidationErrors(t.reduce(function(P,D){if(D.path.startsWith(x)||D.path===x.substr(0,D.path.length)){var J=k({},D);D.path.startsWith(x)&&(J.path=e.path+J.path.substr(x.length)),P.push(J)}return P},[]))}})}else this.editors.forEach(function(u){u&&u.showValidationErrors(t)})}},{key:"addLinks",value:function(){}}])&&Ur(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function On(c){return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},On(c)}function eo(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(On(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(On(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),On(h)==="symbol"?h:String(h)),i)}var h}function qn(c,n){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},qn(c,n)}function Gn(c){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gn(c)}var ca=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Gn(i);if(h){var o=Gn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(On(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&eo(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function ro(c,n){var f=Object.keys(c);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(c);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(c,h).enumerable})),f.push.apply(f,i)}return f}function cn(c){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?ro(Object(f),!0).forEach(function(i){yi(c,i,f[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(f)):ro(Object(f)).forEach(function(i){Object.defineProperty(c,i,Object.getOwnPropertyDescriptor(f,i))})}return c}function yi(c,n,f){return(n=io(n))in c?Object.defineProperty(c,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[n]=f,c}function En(c,n){return function(f){if(Array.isArray(f))return f}(c)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,l,t,e,o=[],u=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;u=!1}else for(;!(u=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);u=!0);}catch(x){d=!0,l=x}finally{try{if(!u&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw l}}return o}}(c,n)||function(f,i){if(f){if(typeof f=="string")return no(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?no(f,i):void 0}}(c,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function no(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function Br(c){return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Br(c)}function ua(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,io(i.key),i)}}function io(c){var n=function(f,i){if(Br(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(Br(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(c);return Br(n)==="symbol"?n:String(n)}function Ar(){return Ar=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=vr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ar.apply(this,arguments)}function oo(c,n){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},oo(c,n)}function vr(c){return vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vr(c)}var bi=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oo(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=vr(i);if(h){var o=vr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Br(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t,e,o){var u;return function(d,x){if(!(d instanceof x))throw new TypeError("Cannot call a class as a function")}(this,l),(u=a.call(this,t,e)).currentDepth=o,u}return n=l,(f=[{key:"getDefault",value:function(){return k({},this.schema.default||{})}},{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Ar(vr(l.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.register()})}},{key:"unregister",value:function(){Ar(vr(l.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),Ar(vr(l.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(),Ar(vr(l.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 u;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(Gt,gt){var Jt=o.editors[Gt].schema.propertyOrder,Ge=o.editors[gt].schema.propertyOrder;return typeof Jt!="number"&&(Jt=1e3),typeof Ge!="number"&&(Ge=1e3),Jt-Ge});var d,x=this.format==="categories",P=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(d=[],this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Jt=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),Ge=gt.options.hidden?0:gt.options.grid_offset||0,W=!gt.options.hidden&&(gt.options.grid_break||!1),G={key:Gt,width:Jt,offset:Ge,height:gt.options.hidden?0:gt.container.offsetHeight};d.push(G),P[nt]=d,W&&(nt++,d=[])}}),this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),u=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),u.appendChild(d),e=0;e<P[t].length;e++)D=P[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t][e].width,P[t][e].offset),d.appendChild(J.container)}else if(this.format==="grid"){for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){for(var Jt=!1,Ge=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),W=gt.options.hidden?0:gt.container.offsetHeight,G=0;G<P.length;G++)P[G].width+Ge<=12&&(!W||.5*P[G].minh<W&&2*P[G].maxh>W)&&(Jt=G);Jt===!1&&(P.push({width:0,minh:999999,maxh:0,editors:[]}),Jt=P.length-1),P[Jt].editors.push({key:Gt,width:Ge,height:W}),P[Jt].width+=Ge,P[Jt].minh=Math.min(P[Jt].minh,W),P[Jt].maxh=Math.max(P[Jt].maxh,W)}}),t=0;t<P.length;t++)if(P[t].width<12){var ut=!1,dt=0;for(e=0;e<P[t].editors.length;e++)(ut===!1||P[t].editors[e].width>P[t].editors[ut].width)&&(ut=e),P[t].editors[e].width*=12/P[t].width,P[t].editors[e].width=Math.floor(P[t].editors[e].width),dt+=P[t].editors[e].width;dt<12&&(P[t].editors[ut].width+=12-dt),P[t].width=12}if(this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),u=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),u.appendChild(d),e=0;e<P[t].editors.length;e++)D=P[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t].editors[e].width),d.appendChild(J.container)}else{if(u=document.createElement("div"),x){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Nt=this.theme.getTopTabContentHolder(Ct);for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Jt=o.theme.getTabContent(),Ge=gt.schema&&(gt.schema.type==="object"||gt.schema.type==="array");Jt.isObjOrArray=Ge;var W=o.theme.getGridRow();gt.tab||(o.basicPane===void 0?o.addRow(gt,Ct,Jt):o.addRow(gt,Ct,o.basicPane)),Jt.id=o.getValidId(gt.tab_text.textContent),Ge?(Jt.appendChild(W),Nt.appendChild(Jt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),Nt.childElementCount>0?Nt.firstChild.isObjOrArray&&(Jt.appendChild(kt),Nt.insertBefore(Jt,Nt.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Jt):(Jt.appendChild(kt),Nt.appendChild(Jt),o.theme.addTopTab(Ct,gt.tab),gt.basicPane=Jt)),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),W.appendChild(gt.container),gt.rowPane=Jt}});this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var ne=this.tabs_holder.parentNode;ne.removeChild(ne.firstChild),ne.appendChild(Ct),this.tabPanesContainer=Nt,this.tabs_holder=Ct;var Re=this.theme.getFirstTab(this.tabs_holder);return void(Re&&O(Re,"click"))}this.property_order.forEach(function(Gt){var gt=o.editors[Gt];gt.property_removed||(d=o.theme.getGridRow(),u.appendChild(d),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),d.appendChild(gt.container))})}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(u)}}},{key:"getPropertySchema",value:function(t){var e=this,o=this.schema.properties[t]||{};o=k({},o);var u=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(d){new RegExp(d).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[d]),u=!0)}),!u&&this.schema.additionalProperties&&Br(this.schema.additionalProperties)==="object"&&(o=k({},this.schema.additionalProperties)),o}},{key:"preBuild",value:function(){var t=this;if(Ar(vr(l.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach(function(e){var o=En(e,2),u=o[0],d=o[1],x=t.jsoneditor.getEditorClass(d);t.editors[u]=t.jsoneditor.createEditor(x,{jsoneditor:t.jsoneditor,schema:d,path:"".concat(t.path,".").concat(u),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[u].preBuild();var P=t.editors[u].options.hidden?0:t.editors[u].options.grid_columns||t.editors[u].getNumColumns();t.minwidth+=P,t.maxwidth+=P}),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter(function(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})}):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach(function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(e,o){var u=t.editors[e].schema.propertyOrder,d=t.editors[o].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof d!="number"&&(d=1e3),u-d})}},{key:"addTab",value:function(t){var e=this,o=this.rows[t].schema&&(this.rows[t].schema.type==="object"||this.rows[t].schema.type==="array");this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=o?this.rows[t].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",function(u){e.active_tab=e.rows[t].tab,e.refreshTabs(),u.preventDefault(),u.stopPropagation()}))}},{key:"addRow",value:function(t,e,o){var u=this.rows.length,d=t.schema.type==="object"||t.schema.type==="array";this.rows[u]=t,this.rows[u].rowPane=o,d?(this.addTab(u),this.theme.addTopTab(e,this.rows[u].tab)):this.basicTab===void 0?(this.addTab(u),this.basicTab=u,this.basicPane=o,this.theme.addTopTab(e,this.rows[u].tab)):(this.rows[u].tab=this.rows[this.basicTab].tab,this.rows[u].tab_text=this.rows[this.basicTab].tab_text,this.rows[u].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,o=this.basicTab!==void 0,u=!1;this.rows.forEach(function(d){d.tab&&d.rowPane&&d.rowPane.parentNode&&(o&&d.tab===e.rows[e.basicTab].tab&&u||(t?d.tab_text.textContent=d.getHeaderText():(o&&d.tab===e.rows[e.basicTab].tab&&(u=!0),d.tab===e.active_tab?e.theme.markTabActive(d):e.theme.markTabInactive(d))))})}},{key:"build",value:function(){var t=this,e=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach(function(u){var d=En(u,2),x=d[0],P=d[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),P.setContainer(D),P.build(),P.postBuild(),P.setOptInCheckbox(P.header),P.setValue(P.getDefault(),!0),t.editors[x].options.hidden&&(D.style.display="none"),t.editors[x].options.input_width&&(D.style.width=t.editors[x].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(u){u.preventDefault(),u.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(u){u.preventDefault(),u.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(u){u.preventDefault(),u.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(u){if(u.preventDefault(),u.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(u){u.target.previousSibling.childNodes.forEach(function(d){var x=d.innerText,P=u.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(x=x.toLowerCase(),P=P.toLowerCase()),x.includes(P)?d.style.display="":d.style.display="none"})}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var o=document.createElement("div");o.style.clear="both",this.addproperty_holder.appendChild(o),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),e?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach(function(u){var d=t.theme.getTabContent(),x=t.theme.getGridColumn(),P=!(!u.schema||u.schema.type!=="object"&&u.schema.type!=="array");if(d.isObjOrArray=P,e){if(P){var D=t.theme.getGridContainer();D.appendChild(x),d.appendChild(D),t.tabPanesContainer.appendChild(d),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),d.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(d):t.tabPanesContainer.insertBefore(d,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(x);t.addRow(u,t.tabs_holder,d),d.id=t.getValidId(u.schema.title)}else t.row_container.appendChild(x);u.setContainer(x),u.build(),u.postBuild(),u.setOptInCheckbox(u.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(u){u.preventDefault(),u.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(u){u.preventDefault(),u.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(u){u.preventDefault(),u.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(u){t.editor_holder.appendChild(t.editors[u].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,u=o&&this.options.show_opt_in===!0,d=o&&this.options.show_opt_in===!1;(u||!d&&e||!o&&e)&&Object.entries(this.editors).forEach(function(x){var P=En(x,2),D=P[0],J=P[1];t.isRequiredObject(J)||t.editors[D].deactivate()})}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(e){throw window.alert("invalid JSON"),e}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,o){var u;this.schema.properties[t]&&(u=this.schema.properties[t].propertyOrder),typeof u!="number"&&(u=1e3),e.propertyOrder=u;for(var d=0;d<o.childNodes.length;d++){var x=o.childNodes[d];if(e.propertyOrder<x.propertyOrder){this.addproperty_list.insertBefore(e,x),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,o=this,u=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var d=this.theme.getCheckboxLabel(e),x=this.theme.getFormControl(d,u);return x.style.paddingBottom=x.style.marginBottom=x.style.paddingTop=x.style.marginTop=0,x.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,x,this.addproperty_list),u.checked=t in this.editors,u.addEventListener("change",function(){u.checked?o.addObjectProperty(t):o.removeObjectProperty(t),o.onChange(!0)}),this.addproperty_checkboxes[t]=u,u}},{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 cn(cn({},e),{},yi({},o,{}));case"additionalProperties":case"propertyNames":return cn(cn({},e),{},yi({},o,!0));default:return cn(cn({},e),{},yi({},o,t[o]))}},{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find(function(P){return new RegExp(P).test(t)})))return;var o=this.getPropertySchema(t);typeof o.propertyOrder!="number"&&(o.propertyOrder=Object.keys(this.editors).length+1e3);var u=this.jsoneditor.getEditorClass(o),d=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:d&&this.currentDepth>=d?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var x=this.theme.getChildEditorHolder();this.editor_holder.appendChild(x),this.editors[t].setContainer(x),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(u.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(),Ar(vr(l.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:Br(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),Ar(vr(l.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=Ar(vr(l.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 u;Object.entries(e.cached_editors).forEach(function(d){var x=En(d,2),P=(x[0],x[1]);P.key===o&&(u=P)}),u&&!u.isActive()&&u.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&S(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,o=0,u=!1;Object.keys(this.editors).forEach(function(d){return o++}),e=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&o>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach(function(d){t.addPropertyCheckbox(d),t.isRequiredObject(t.cached_editors[d])&&d in t.editors&&(t.addproperty_checkboxes[d].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[d].disabled=t.addproperty_checkboxes[d].checked,t.addproperty_checkboxes[d].checked||(u=!0)):d in t.editors?u=!0:e||S(t.schema.properties,d)?(t.addproperty_checkboxes[d].disabled=!1,u=!0):t.addproperty_checkboxes[d].disabled=!0}),this.canHaveAdditionalProperties()&&(u=!0),Object.keys(this.schema.properties).forEach(function(d){t.cached_editors[d]||(u=!0,t.addPropertyCheckbox(d))}),u?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;(Br(t=t||{})!=="object"||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach(function(u){var d=En(u,2),x=d[0],P=d[1];t[x]!==void 0?(o.addObjectProperty(x),P.setValue(t[x],e),P.activate()):e||o.isRequiredObject(P)?P.setValue(P.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?P.deactivate():o.removeObjectProperty(x)}),Object.entries(t).forEach(function(u){var d=En(u,2),x=d[0],P=d[1];o.cached_editors[x]||(o.addObjectProperty(x),o.editors[x]&&o.editors[x].setValue(P,e,!!o.editors[x].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],u=[];t.forEach(function(d){d.path===e.path?o.push(d):u.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){d.errorcount&&d.errorcount>1&&(d.message+=" (".concat(d.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.options.table_row&&(o.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach(function(d){d.showValidationErrors(u)})}}])&&ua(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Wn(c){return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wn(c)}function vl(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Wn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wn(h)==="symbol"?h:String(h)),i)}var h}function Zn(){return Zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=V(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Zn.apply(this,arguments)}function ha(c,n){return ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ha(c,n)}function V(c){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(c)}bi.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var at=function(c){(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&&ha(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=V(i);if(h){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Wn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"preBuild",value:function(){Zn(V(l.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 u={id:"".concat(this.formname,"[").concat(o,"]"),value:this.enum_values[o]};this.jsoneditor.options.use_name_attributes&&(u.name=this.formname),this.input=this.theme.getFormRadio(u),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var d=this.theme.getFormRadioLabel(this.enum_display[o]);d.htmlFor=this.input.id;var x=this.theme.getFormRadioControl(d,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(x)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var P=0;P<this.radioGroup.length;P++)this.radioGroup[P].disabled=!0;this.radioContainer.classList.add("readonly")}var D=this.theme.getContainer();D.appendChild(this.radioContainer),D.dataset.containerFor="radio",this.input=D,this.control=this.theme.getFormControl(this.label,D,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Zn(V(l.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),Zn(V(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Zn(V(l.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}}}])&&vl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function Ot(c){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(c)}function ve(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ot(h)==="symbol"?h:String(h)),i)}var h}function we(){return we=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=He(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},we.apply(this,arguments)}function le(c,n){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},le(c,n)}function He(c){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},He(c)}var ao=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=He(i);if(h){var o=He(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=we(He(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.sceditor_instance&&this.sceditor_instance.val(u.value)}},{key:"build",value:function(){this.options.format="textarea",we(He(l.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",k({},{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 we(He(l.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),we(He(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),we(He(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),we(He(l.prototype),"destroy",this).call(this)}}])&&ve(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function so(c){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(c)}function Fp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(so(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(so(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),so(h)==="symbol"?h:String(h)),i)}var h}function vi(){return vi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=un(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},vi.apply(this,arguments)}function gl(c,n){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},gl(c,n)}function un(c){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},un(c)}var Vp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=un(i);if(h){var o=un(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(so(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){if(this.select2_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.select2v4?this.select2_instance.val(o).trigger("change"):this.select2_instance.select2("val",o),this.onChange(!0)}else vi(un(l.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",k({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=e.tags=!!e.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(o),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}vi(un(l.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),u=!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"),u=!0),u}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),vi(un(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),vi(un(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),vi(un(l.prototype),"destroy",this).call(this)}}])&&Fp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function lo(c){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(c)}function zp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(lo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(lo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),lo(h)==="symbol"?h:String(h)),i)}var h}function Jn(){return Jn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Qr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Jn.apply(this,arguments)}function wl(c,n){return wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},wl(c,n)}function Qr(c){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qr(c)}var Up=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qr(i);if(h){var o=Qr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(lo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){if(this.selectize_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.selectize_instance.clear(!0),this.selectize_instance.setValue(o),this.onChange(!0)}else Jn(Qr(l.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",k({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=e.create=!!e.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){t.updateValue(o),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Jn(Qr(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),o=!1;return this.enum_values.includes(e)||e===""||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),o=!0),o}},{key:"onWatchedFieldChange",value:function(){var t=this;Jn(Qr(l.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach(function(e,o){t.selectize_instance.addOption({value:e,text:t.enum_display[o]})}),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Jn(Qr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Jn(Qr(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Jn(Qr(l.prototype),"destroy",this).call(this)}}])&&zp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function co(c){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(c)}function qp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),co(h)==="symbol"?h:String(h)),i)}var h}function _l(c,n){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},_l(c,n)}function ws(c){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ws(c)}var Gp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_l(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ws(i);if(h){var o=ws(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var e=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var o=document.createElement("div");o.classList.add("signature-container");var u=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&u.setAttribute("name",e),u.classList.add("signature"),o.appendChild(u),this.signaturePad=new window.SignaturePad(u),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var d=document.createElement("div"),x=document.createElement("button");x.classList.add("tiny","button"),x.innerHTML="Clear signature",d.appendChild(x),o.appendChild(d),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach(function(D){u.setAttribute("readOnly","readOnly"),D.disabled=!0})),x.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(),u.width=o.offsetWidth,this.options&&this.options.canvas_height?u.height=this.options.canvas_height:u.height="300"}else{var P=document.createElement("p");P.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(P)}}},{key:"setValue",value:function(t){if(typeof SignaturePad=="function"){var e=this.sanitize(t);return this.value===e?void 0:(this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&t!==""&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&qp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function uo(c){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(c)}function Wp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(uo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(uo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),uo(h)==="symbol"?h:String(h)),i)}var h}function Yn(){return Yn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=tn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Yn.apply(this,arguments)}function xl(c,n){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},xl(c,n)}function tn(c){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tn(c)}_(2564);var Zp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=tn(i);if(h){var o=tn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(uo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=Yn(tn(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.simplemde_instance&&this.simplemde_instance.value(u.value)}},{key:"build",value:function(){this.options.format="textarea",Yn(tn(l.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",k({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",function(){e.value=e.simplemde_instance.value(),e.is_dirty=!0,e.onChange(!0)}),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Yn(tn(l.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),Yn(tn(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Yn(tn(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Yn(tn(l.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)}}])&&Wp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function ho(c){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ho(c)}function Jp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ho(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ho(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ho(h)==="symbol"?h:String(h)),i)}var h}function kl(){return kl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=po(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},kl.apply(this,arguments)}function jl(c,n){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},jl(c,n)}function po(c){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},po(c)}var Su=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=po(i);if(h){var o=po(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(ho(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),this.schema.enum===void 0){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var o=0;o<e;o++)this.enum_values.push(o+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var u=function(ut){ut.preventDefault(),ut.stopPropagation(),t.setValue(ut.currentTarget.value),t.onChange(!0)},d=this.enum_values.length-1;d>-1;d--){var x=this.formname+(d+1),P=this.theme.getFormInputField("radio");P.name="".concat(this.formname,"[starrating]"),P.value=this.enum_values[d],P.id=x,P.addEventListener("change",u,!1),this.radioGroup.push(P);var D=document.createElement("label");D.htmlFor=x,D.title=this.enum_values[d],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(P),this.ratingContainer.appendChild(D)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var J=0;J<this.radioGroup.length;J++)this.radioGroup[J].disabled=!0;this.ratingContainer.classList.add("readonly")}var nt=this.theme.getContainer();nt.appendChild(this.ratingContainer),this.input=nt,this.control=this.theme.getFormControl(this.label,nt,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),kl(po(l.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}}}])&&Jp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function fo(c){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fo(c)}function Yp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(fo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fo(h)==="symbol"?h:String(h)),i)}var h}function da(){return da=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Xn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},da.apply(this,arguments)}function Ol(c,n){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ol(c,n)}function Xn(c){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xn(c)}Su.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 Xp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ol(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xn(i);if(h){var o=Xn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(fo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){da(Xn(l.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(){da(Xn(l.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){da(Xn(l.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&Yp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(bs);function mo(c){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mo(c)}function Kp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(mo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(mo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),mo(h)==="symbol"?h:String(h)),i)}var h}function gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=hn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},gi.apply(this,arguments)}function El(c,n){return El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},El(c,n)}function hn(c){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hn(c)}var Qp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&El(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=hn(i);if(h){var o=hn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(mo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,f=[{key:"register",value:function(){if(gi(hn(l.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(gi(hn(l.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,gi(hn(l.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),u=0;u<o.length;u++){var d=this.theme.getTableHeaderCell(e[o[u]].getTitle());e[o[u]].options.hidden&&(d.style.display="none"),this.header_row.appendChild(d)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(" "),this.controls_header_cell.setAttribute("aria-hidden","true"),this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),gi(hn(l.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return k({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=k({},this.schema.items),u=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.row_holder.appendChild(this.theme.getTableRow()),x=d;this.item_has_child_editors||(x=this.theme.getTableCell(),d.appendChild(x));var P=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:o,container:x,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return P.preBuild(),e||(P.build(),P.postBuild(),P.controls_cell=d.appendChild(this.theme.getTableCell()),P.row=d,P.table_controls=this.theme.getButtonHolder(),P.controls_cell.appendChild(P.table_controls),P.table_controls.style.margin=0,P.table_controls.style.padding=0),P}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,gi(hn(l.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 u=!1;e.forEach(function(P,D){t.rows[D]?t.rows[D].setValue(P):(t.addRow(P),u=!0)});for(var d=e.length;d<this.rows.length;d++){var x=this.rows[d].container;this.item_has_child_editors||this.rows[d].row.parentNode.removeChild(this.rows[d].row),this.rows[d].destroy(),x.parentNode&&x.parentNode.removeChild(x),this.rows[d]=null,u=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(u||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,u=[];this.rows.forEach(function(nt,ut){if(nt.delete_button){var dt=!e;t.setButtonState(nt.delete_button,dt),u.push(dt)}if(nt.copy_button){var kt=!o;t.setButtonState(nt.copy_button,kt),u.push(kt)}if(nt.moveup_button){var Ct=ut!==0;t.setButtonState(nt.moveup_button,Ct),u.push(Ct)}if(nt.movedown_button){var Nt=ut!==t.rows.length-1;t.setButtonState(nt.movedown_button,Nt),u.push(Nt)}});var d=u.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,d)}),this.setButtonState(this.controls_header_cell,d),this.setButtonState(this.table,this.value.length);var x=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,x);var P=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,P);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=x||P||D;this.setButtonState(this.controls,J)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach(function(e,o){t.value[o]=e.getValue()}),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var o=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,o)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,o)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,o)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,o)),t!==void 0&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var o=this,u=this.getButton("","delete","button_delete_row_title_short");return u.classList.add("delete","json-editor-btntype-delete"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue(),D=o.getValue()[x];P.splice(x,1),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("deleteRow",D)}),e.appendChild(u),u}},{key:"_createCopyButton",value:function(t,e){var o=this,u=this.getButton("","copy","button_copy_row_title_short"),d=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",t),u.addEventListener("click",function(x){x.preventDefault(),x.stopPropagation();var P=1*x.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[P];d.items.type==="string"&&d.items.format==="uuid"?J=R():d.items.type==="object"&&d.items.properties&&D.forEach(function(nt,ut){if(P===ut)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];d.items.properties&&d.items.properties[Ct]&&d.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[P]))[Ct]=R())}}),D.splice(P+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[P+1])}),e.appendChild(u),u}},{key:"_createMoveUpButton",value:function(t,e){var o=this,u=this.getButton("","moveup","button_move_up_title");return u.classList.add("moveup","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(x-1,0,P.splice(x,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x-1])}),e.appendChild(u),u}},{key:"_createMoveDownButton",value:function(t,e){var o=this,u=this.getButton("","movedown","button_move_down_title");return u.classList.add("movedown","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(x+1,0,P.splice(x,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x+1])}),e.appendChild(u),u}},{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 u=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",u)}),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 u=t.getValue(),d=u.pop();t.setValue(u),t.onChange(!0),t.jsoneditor.trigger("deleteRow",d)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var u=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",u)}),this.controls.appendChild(e),e}}],f&&Kp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Ut);function yo(c){return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yo(c)}function tf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(yo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(yo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),yo(h)==="symbol"?h:String(h)),i)}var h}function pa(){return pa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Kn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},pa.apply(this,arguments)}function Cl(c,n){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Cl(c,n)}function Kn(c){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kn(c)}function bo(c){return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bo(c)}function ef(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(bo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(bo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),bo(h)==="symbol"?h:String(h)),i)}var h}function fa(){return fa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Qn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},fa.apply(this,arguments)}function Sl(c,n){return Sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Sl(c,n)}function Qn(c){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qn(c)}function vo(c){return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vo(c)}function rf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(vo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(vo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),vo(h)==="symbol"?h:String(h)),i)}var h}function wi(){return wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=dn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},wi.apply(this,arguments)}function Pl(c,n){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Pl(c,n)}function dn(c){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(c)}_(6977);var _s={ace:Et,array:Ut,arrayChoices:cr,arraySelect2:pr,arraySelectize:Ze,autocomplete:Dn,base64:Vi,button:hs,checkbox:ps,choices:rt,datetime:vt,describedBy:ir,enum:$e,hidden:fs,info:qi,integer:bs,ip:ra,jodit:vs,multiple:to,multiselect:qt,null:ca,number:ys,object:bi,radio:at,sceditor:ao,select:hi,select2:Vp,selectize:Up,signature:Gp,simplemde:Zp,starrating:Su,stepper:Xp,string:K,table:Qp,upload:function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kn(i);if(h){var o=Kn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(yo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",k({},{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(u,d,x,P){window.alert('No upload_handler defined for "'.concat(u.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(u){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(u){u.preventDefault(),u.stopPropagation();var d=u.target.files||u.dataTransfer.files;if(d&&d.length)if(t.options.max_upload_size!==0&&d[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=d[0].name);var x=new window.FileReader;x.onload=function(P){t.preview_value=P.target.result,t.refreshPreview(d),t.onChange(!0),x=null},x.readAsDataURL(d[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(u){var d=u.dataTransfer.items||u.dataTransfer.files,x=d&&d.length&&(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)),P=u.currentTarget.classList&&u.currentTarget.classList.contains("upload-dropzone")&&x;switch((u.currentTarget===window?"w_":"e_")+u.type){case"w_drop":case"w_dragover":P||(u.dataTransfer.dropEffect="none");break;case"e_dragenter":P?(t.dropZone.classList.add("valid-dropzone"),u.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":P&&(u.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),P&&t.uploadHandler(u)}P||u.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(u){window.addEventListener(u,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(u){t.dropZone.addEventListener(u,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],u=this.preview_value.match(/^data:([^;,]+)[;,]/);if(o.mimeType=u?u[1]:"unknown",o.size>0){var d=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,d)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d])}else o.formattedSize="0 Bytes";var x=this.getButton("button_upload","upload","button_upload");x.addEventListener("click",function(P){P.preventDefault(),x.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),x.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),x.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,x,this.preview_value)),this.options.auto_upload&&(x.dispatchEvent(new window.MouseEvent("click")),x.parentNode.removeChild(x))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),pa(Kn(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),pa(Kn(l.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),pa(Kn(l.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce(function(o,u){return o||new RegExp(u.replace(/\*/g,".*"),"gi").test(t)},!1)}}])&&tf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F),uuid:function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qn(i);if(h){var o=Qn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(bo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"preBuild",value:function(){fa(Qn(l.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(){fa(Qn(l.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,fa(Qn(l.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)}}])&&ef(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K),colorpicker:function(c){(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)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=dn(i);if(h){var o=dn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(vo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,o){var u=wi(dn(l.prototype),"setValue",this).call(this,t,e,o);return this.picker_instance&&this.picker_instance.domElement&&u&&u.changed&&this.picker_instance.setColor(u.value,!0),u}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){wi(dn(l.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(wi(dn(l.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!0}}},{key:"enable",value:function(){if(wi(dn(l.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),wi(dn(l.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",k({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),u=function(d){var x=e.picker_instance.settings.editorFormat,P=e.picker_instance.settings.alpha;e.setValue(x==="hex"?P?d.hex:d.hex.slice(0,7):d["".concat(x+(P?"a":""),"String")])};o.popup||typeof o.onChange=="function"?o.popup&&typeof o.onDone!="function"&&(o.onDone=u):o.onChange=u,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="")}}])&&rf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K)};function Pu(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}var Tu={},Tl="en",nf=Tl;Tu.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(_s).forEach(function(c){var n=function(h,a){return function(l){if(Array.isArray(l))return l}(h)||function(l,t){var e=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(e!=null){var o,u,d,x,P=[],D=!0,J=!1;try{if(d=(e=e.call(l)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=d.call(e)).done)&&(P.push(o.value),P.length!==t);D=!0);}catch(nt){J=!0,u=nt}finally{try{if(!D&&e.return!=null&&(x=e.return(),Object(x)!==x))return}finally{if(J)throw u}}return P}}(h,a)||function(l,t){if(l){if(typeof l=="string")return Pu(l,t);var e=Object.prototype.toString.call(l).slice(8,-1);return e==="Object"&&l.constructor&&(e=l.constructor.name),e==="Map"||e==="Set"?Array.from(l):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Pu(l,t):void 0}}(h,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(c,2),f=n[0],i=n[1];_s[f].options=i.options||{}});var _i={options:{upload:function(c,n,f){console.log("Upload handler required for upload editor")},use_name_attributes:!0,prompt_before_delete:!0,use_default_values:!0,max_depth:0,button_state_mode:1,case_sensitive_property_search:!0},theme:"html",template:"default",themes:{},callbacks:{},templates:{},iconlibs:{},editors:_s,languages:Tu,resolvers:j,custom_validators:[],default_language:Tl,language:nf,translate:function(c,n,f){var i={};f&&f.options&&f.options.error_messages&&f.options.error_messages[_i.language]&&(i=f.options.error_messages[_i.language]);var h=_i.languages[_i.language];if(!h)throw new Error("Unknown language ".concat(_i.language));var a=i[c]||h[c]||_i.languages[Tl][c]||c;if(n)for(var l=0;l<n.length;l++)a=a.replace(new RegExp("\\{\\{".concat(l,"}}"),"g"),n[l]);return a},translateProperty:function(c,n){return c}};function xi(){xi=function(){return c};var c={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",l=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof x?G:x,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:Nt(W,Z,re)}),Lt}function u(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}c.wrap=o;var d={};function x(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ut=nt&&nt(nt(Jt([])));ut&&ut!==n&&f.call(ut,a)&&(J=ut);var dt=D.prototype=x.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=u(W[et],W,Lt);if(Te.type!=="throw"){var Dr=Te.arg,en=Dr.value;return en&&ur(en)=="object"&&f.call(en,"__await")?G.resolve(en.__await).then(function(kr){Z("next",kr,re,Pe)},function(kr){Z("throw",kr,re,Pe)}):G.resolve(en).then(function(kr){Dr.value=kr,re(Dr)},function(kr){return Z("throw",kr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function Nt(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=u(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=u(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Jt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),c.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},c.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},c.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,l,function(){return this}),c.AsyncIterator=Ct,c.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return c.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),c.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}},c.values=Jt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Dr){return Lt.type="throw",Lt.arg=W,G.next=Te,Dr&&(G.method="next",G.arg=void 0),!!Dr}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Jt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},c}function Au(c,n,f,i,h,a,l){try{var t=c[a](l),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Lu(c){return function(){var n=this,f=arguments;return new Promise(function(i,h){var a=c.apply(n,f);function l(e){Au(a,i,h,l,t,"next",e)}function t(e){Au(a,i,h,l,t,"throw",e)}l(void 0)})}}function ki(c,n){return function(f){if(Array.isArray(f))return f}(c)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,l,t,e,o=[],u=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;u=!1}else for(;!(u=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);u=!0);}catch(x){d=!0,l=x}finally{try{if(!u&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw l}}return o}}(c,n)||function(f,i){if(f){if(typeof f=="string")return Ru(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?Ru(f,i):void 0}}(c,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ru(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function ur(c){return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ur(c)}function of(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ur(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ur(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ur(h)==="symbol"?h:String(h)),i)}var h}_(8733);var af=function(){function c(a){(function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,c),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(l){ur(l.type)==="object"&&(l.type=this._expandSubSchema(l.type))},disallow:function(l){ur(l.disallow)==="object"&&(l.disallow=this._expandSubSchema(l.disallow))},anyOf:function(l){var t=this;Object.entries(l.anyOf).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];l.anyOf[u]=t.expandSchema(d)})},dependencies:function(l){var t=this;Object.entries(l.dependencies).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];ur(d)!=="object"||Array.isArray(d)||(l.dependencies[u]=t.expandSchema(d))})},not:function(l){l.not=this.expandSchema(l.not)}},this._subSchema2={allOf:function(l,t){var e=this,o=k({},t);return Object.entries(l.allOf).forEach(function(u){var d=ki(u,2),x=d[0],P=d[1];l.allOf[x]=e.expandRefs(P,!0),o=e.extendSchemas(o,e.expandSchema(P))}),delete o.allOf,o},extends:function(l,t){var e,o=this;return delete(e=Array.isArray(l.extends)?l.extends.reduce(function(u,d,x){return o.extendSchemas(u,o.expandSchema(d))},t):this.extendSchemas(t,this.expandSchema(l.extends))).extends,e},oneOf:function(l,t){var e=this,o=k({},t);return delete o.oneOf,l.oneOf.reduce(function(u,d,x){return u.oneOf[x]=e.extendSchemas(e.expandSchema(d),o),u},t),t}}}var n,f,i,h;return n=c,f=[{key:"load",value:(h=Lu(xi().mark(function a(l,t,e){return xi().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.schema=l,o.next=3,this._asyncloadExternalRefs(l,t,this._getFileBase(e),!0);case 3:return o.abrupt("return",this.expandRefs(l));case 4:case"end":return o.stop()}},a,this)})),function(a,l,t){return h.apply(this,arguments)})},{key:"expandRefs",value:function(a,l){var t=this,e=k({},a);if(!e.$ref)return e;var o=e.$ref.split("#");if(o.length===2&&!this.refs_with_info[e.$ref]){var u=this.expandRecursivePointer(this.schema,o[1]),d=this.extendSchemas(e,this.expandSchema(u));return delete d.$ref,d}var x=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var P=x.$ref.startsWith("#")?x.fetchUrl:"",D=this._getRef(P,x);if(this.refs[D]){if(l&&S(this.refs[D],"allOf")){var J=this.refs[D].allOf;Object.keys(J).forEach(function(nt){J[nt]=t.expandRefs(J[nt],!0)})}}else console.warn("reference:'".concat(D,"' not found!"));return o.length>2?this.extendSchemas(e,this.expandSchema(this.expandRecursivePointer(this.refs[D],o[2]))):this.extendSchemas(e,this.expandSchema(this.refs[D]))}},{key:"expandRecursivePointer",value:function(a,l){var t=a;return l.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 l=this;Object.entries(this._subSchema1).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];a[u]&&d.call(l,a)});var t=k({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];a[u]&&(t=d.call(l,a,t))}),this.expandRefs(t)}},{key:"_getRef",value:function(a,l){var t=a+l;return this.refs[t]?t:a+decodeURIComponent(l.$ref)}},{key:"_expandSubSchema",value:function(a){var l=this;return Array.isArray(a)?a.map(function(t){return ur(t)==="object"?l.expandSchema(t):t}):this.expandSchema(a)}},{key:"_manageRecursivePointer",value:function(a,l){Object.keys(a).forEach(function(t){a[t].$ref&&a[t].$ref.indexOf("#")===0&&(a[t].$ref=l+a[t].$ref)})}},{key:"_getExternalRefs",value:function(a,l){var t=this,e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];e||this._manageRecursivePointer(a,l);var o={},u=function(J){return Object.keys(J).forEach(function(nt){o[nt]=!0})};if(a.$ref&&ur(a.$ref)!=="object"&&(a.$ref.indexOf("#")!==0||!e)){var d=a.$ref,x="";d.indexOf("#")>0&&(d=d.substr(0,d.indexOf("#"))),d!==a.$ref&&(x=a.$ref.substr(a.$ref.indexOf("#")));var P=this.refs_prefix+this.refs_counter++,D=P+x;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[d]=!0),this.refs_with_info[P]={fetchUrl:l,$ref:d},a.$ref=D}return Object.values(a).forEach(function(J){J&&ur(J)==="object"&&(Array.isArray(J)?Object.values(J).forEach(function(nt){nt&&ur(nt)==="object"&&u(t._getExternalRefs(nt,l,e))}):J.$ref&&typeof J.$ref=="string"&&J.$ref.startsWith("#")||u(t._getExternalRefs(J,l,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 l=this.options.ajaxBase;return l===void 0?this._getFileBaseFromFileLocation(a):l}},{key:"_getFileBaseFromFileLocation",value:function(a){var l=a.split("/");return l.pop(),"".concat(l.join("/"),"/")}},{key:"_joinUrl",value:function(a,l){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=l+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=Lu(xi().mark(function a(l,t,e){var o,u,d,x,P,D,J=this,nt=arguments;return xi().wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:o=nt.length>3&&nt[3]!==void 0&&nt[3],u=this._getExternalRefs(l,t,o),d=0,x=xi().mark(function dt(){var kt,Ct,Nt,ne,Re,Gt,gt,Jt,Ge,W,G;return xi().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[P])!==void 0){Z.next=3;break}return Z.abrupt("return","continue");case 3:if(!J.refs[kt]){Z.next=5;break}return Z.abrupt("return","continue");case 5:if(!J._isUniformResourceName(kt)){Z.next=40;break}if(J.refs[kt]="loading",d++,Ct=J.options.urn_resolver,Nt=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Nt,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Nt));case 13:return Nt.indexOf("#")>0&&(Nt=Nt.substr(0,Nt.indexOf("#"))),Z.prev=14,Z.next=17,Ct(Nt);case 17:ne=Z.sent,Z.prev=18,Re=JSON.parse(ne),Z.next=26;break;case 22:throw Z.prev=22,Z.t0=Z.catch(18),console.log(Z.t0),new Error("Failed to parse external ref ".concat(Nt));case 26:if(!(typeof Re!="boolean"&&ur(Re)!=="object"||Re===null||Array.isArray(Re))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Nt));case 28:return J.refs[kt]=Re,Z.next=31,J._asyncloadExternalRefs(Re,kt,e);case 31:Z.next=37;break;case 33:throw Z.prev=33,Z.t1=Z.catch(14),console.log(Z.t1),new Error("Failed to parse external ref ".concat(Nt));case 37:if(typeof ne!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Nt));case 39:return Z.abrupt("return","continue");case 40:if(J.options.ajax){Z.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(kt));case 42:if(d++,Gt=J._joinUrl(kt,e),J.options.ajax_cache_responses&&(Jt=J.cacheGet(Gt))&&(gt=Jt),gt){Z.next=61;break}return Z.next=48,new Promise(function(pt){var et=new XMLHttpRequest;J.options.ajaxCredentials&&(et.withCredentials=J.options.ajaxCredentials),et.overrideMimeType("application/json"),et.open("GET",Gt,!0),et.onload=function(){pt(et)},et.onerror=function(Lt){pt(void 0)},et.send()});case 48:if((Ge=Z.sent)!==void 0){Z.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(kt));case 51:Z.prev=51,gt=JSON.parse(Ge.responseText),J.onSchemaLoaded({schema:gt,schemaUrl:Gt}),J.options.ajax_cache_responses&&J.cacheSet(Gt,gt),Z.next=61;break;case 57:throw Z.prev=57,Z.t2=Z.catch(51),console.log(Z.t2),new Error("Failed to parse external ref ".concat(Gt));case 61:if(!(typeof gt!="boolean"&&ur(gt)!=="object"||gt===null||Array.isArray(gt))){Z.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Gt));case 63:return J.refs[kt]=gt,W=J._getFileBaseFromFileLocation(Gt),Gt!==kt&&(G=Gt.split("/"),Gt=(kt.substr(0,1)==="/"?"/":"")+G.pop()),Z.next=68,J._asyncloadExternalRefs(gt,Gt,W);case 68:case"end":return Z.stop()}},dt,null,[[14,33],[18,22],[51,57]])}),P=0,D=Object.keys(u);case 5:if(!(P<D.length)){ut.next=13;break}return ut.delegateYield(x(),"t0",7);case 7:if(ut.t0!=="continue"){ut.next=10;break}return ut.abrupt("continue",10);case 10:P++,ut.next=5;break;case 13:if(d){ut.next=15;break}return ut.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ut.stop()}},a,this)})),function(a,l,t){return i.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(a){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(a,l){var t=this;a=k({},a),l=k({},l);var e={},o=function(u){typeof u=="string"&&(u=[u]),typeof l.type=="string"&&(l.type=[l.type]),l.type&&l.type.length?e.type=u.filter(function(d){return l.type.includes(d)}):e.type=u,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(u){var d=ki(u,2),x=d[0],P=d[1];l[x]!==void 0?function(D,J){(function(nt,ut){return(nt==="required"||nt==="defaultProperties")&&ur(ut)==="object"&&Array.isArray(ut)})(D,J)?e[D]=J.concat(l[D]).reduce(function(nt,ut){return nt.includes(ut)||nt.push(ut),nt},[]):D!=="type"||typeof J!="string"&&!Array.isArray(J)?ur(J)!=="object"||Array.isArray(J)||J===null?e[D]=J:e[D]=t.extendSchemas(J,l[D]):o(J)}(x,P):e[x]=P}),Object.entries(l).forEach(function(u){var d=ki(u,2),x=d[0],P=d[1];a[x]===void 0&&(e[x]=P)}),e}},{key:"getCacheKey",value:function(a){return["je-cache",a].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(a,l){try{window.localStorage.setItem(this.getCacheKey(a),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:l}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(a){try{var l=window.localStorage.getItem(this.getCacheKey(a));if(l){var t=JSON.parse(l);if(t.cacheBuster&&t.schema&&t.cacheBuster===this.getCacheBuster())return t.schema;this.cacheDelete(a)}}catch(e){console.error(e)}}},{key:"cacheDelete",value:function(a){window.localStorage.removeItem(this.getCacheKey(a))}}],f&&of(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}(),sf=(_(3210),{default:function(){return{compile:function(c){var n=c.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),f=n&&n.length;if(!f)return function(){return c};for(var i=[],h=function(l){var t,e,o=n[l].replace(/[{}]+/g,"").trim().split("."),u=o.length;u>1?t=function(d){for(e=d,l=0;l<u&&(e=e[o[l]]);l++);return e}:(o=o[0],t=function(d){return d[o]}),i.push({s:n[l],r:t})},a=0;a<f;a++)h(a);return function(l){var t,e="".concat(c);for(a=0;a<f;a++)t=i[a],e=e.replace(t.s,t.r(l));return e}}}},ejs:function(){return!!window.EJS&&{compile:function(c){var n=new window.EJS({text:c});return function(f){return n.render(f)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(c){var n=window.Hogan.compile(c);return function(f){return n.render(f)}}}},lodash:function(){return!!window._&&{compile:function(c){return function(n){return window._.template(c)(n)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(c){return function(n){return window.Mark.up(c,n)}}}},mustache:function(){return!!window.Mustache&&{compile:function(c){return function(n){return window.Mustache.render(c,n)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(c){return function(n){return window._.template(c)(n)}}}}});function ma(c){return ma=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},ma(c)}function Al(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function lf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ma(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ma(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ma(h)==="symbol"?h:String(h)),i)}var h}var cf={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Cn=function(){function c(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cf;(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.mapping=h,this.icon_prefix=i}var n,f;return n=c,(f=[{key:"getIconClass",value:function(i){return this.mapping[i]?this.icon_prefix+this.mapping[i]:this.icon_prefix+i}},{key:"getIcon",value:function(i){var h,a=this.getIconClass(i);if(!a)return null;var l,t=document.createElement("i");return(h=t.classList).add.apply(h,function(e){if(Array.isArray(e))return Al(e)}(l=a.split(" "))||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(l)||function(e,o){if(e){if(typeof e=="string")return Al(e,o);var u=Object.prototype.toString.call(e).slice(8,-1);return u==="Object"&&e.constructor&&(u=e.constructor.name),u==="Map"||u==="Set"?Array.from(e):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?Al(e,o):void 0}}(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
82
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),t}}])&&lf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function Ll(c){return Ll=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},Ll(c)}function Rl(c,n){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Rl(c,n)}function xs(c){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xs(c)}var uf="glyphicon glyphicon-",hf={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"},df=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Rl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=xs(f);if(i){var e=xs(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Ll(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,uf,hf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Il(c){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(c)}function Bl(c,n){return Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Bl(c,n)}function ks(c){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ks(c)}var pf="icon-",ff={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"},mf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Bl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=ks(f);if(i){var e=ks(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Il(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,pf,ff)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Dl(c){return Dl=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},Dl(c)}function Nl(c,n){return Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Nl(c,n)}function js(c){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},js(c)}var yf="fa fa-",bf={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"},vf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Nl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=js(f);if(i){var e=js(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Dl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,yf,bf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function $l(c){return $l=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(c)}function Ml(c,n){return Ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ml(c,n)}function Os(c){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Os(c)}var gf="fas fa-",wf={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"},_f=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Ml(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Os(f);if(i){var e=Os(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&($l(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,gf,wf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Hl(c){return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hl(c)}function Fl(c,n){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Fl(c,n)}function Es(c){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Es(c)}var xf="ui-icon ui-icon-",kf={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"},jf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Fl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Es(f);if(i){var e=Es(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Hl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,xf,kf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Vl(c){return Vl=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},Vl(c)}function zl(c,n){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zl(c,n)}function Cs(c){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cs(c)}var Of="oi oi-",Ef={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"},Cf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&zl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Cs(f);if(i){var e=Cs(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Vl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Of,Ef)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Ul(c){return Ul=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},Ul(c)}function ql(c,n){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ql(c,n)}function Ss(c){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ss(c)}var Sf="icon icon-",Pf={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"},Tf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&ql(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Ss(f);if(i){var e=Ss(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Ul(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Sf,Pf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Gl(c){return Gl=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},Gl(c)}function Wl(c,n){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wl(c,n)}function Ps(c){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ps(c)}var Af="bi bi-",Lf={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"},Rf={bootstrap:function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Wl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Ps(f);if(i){var e=Ps(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Gl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Af,Lf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn),bootstrap3:df,fontawesome3:mf,fontawesome4:vf,fontawesome5:_f,jqueryui:jf,openiconic:Cf,spectre:Tf};function ya(c){return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ya(c)}function If(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ya(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ya(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ya(h)==="symbol"?h:String(h)),i)}var h}var Iu=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(c){return c in document.documentElement}),Sn=function(){function c(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.jsoneditor=i,Object.keys(h).forEach(function(a){i.options[a]!==void 0&&(h[a]=i.options[a])}),this.options=h}var n,f;return n=c,f=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var i=document.createElement("div");return i.classList.add("je-float-right-linkholder"),i}},{key:"getModal",value:function(){var i=document.createElement("div");return i.style.display="none",i.classList.add("je-modal"),i}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var i=document.createElement("div");return i.classList.add("row"),i}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(i,h){}},{key:"getLink",value:function(i){var h=document.createElement("a");return h.setAttribute("href","#"),h.appendChild(document.createTextNode(i)),h}},{key:"disableHeader",value:function(i){i.style.color="#ccc"}},{key:"disableLabel",value:function(i){i.style.color="#ccc"}},{key:"enableHeader",value:function(i){i.style.color=""}},{key:"enableLabel",value:function(i){i.style.color=""}},{key:"getInfoButton",value:function(i){var h=document.createElement("span");h.innerText="ⓘ",h.classList.add("je-infobutton-icon");var a=document.createElement("span");return a.classList.add("je-infobutton-tooltip"),a.innerText=i,h.onmouseover=function(){a.style.visibility="visible"},h.onmouseleave=function(){a.style.visibility="hidden"},h.appendChild(a),h}},{key:"getFormInputLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(i)),h&&a.classList.add("required"),a}},{key:"getHeader",value:function(i,h){var a=document.createElement("h3");return typeof i=="string"?a.textContent=i:a.appendChild(i),a.classList.add("je-header"),a}},{key:"getCheckbox",value:function(){var i=this.getFormInputField("checkbox");return i.classList.add("je-checkbox"),i}},{key:"getCheckboxLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getMultiCheckboxHolder",value:function(i,h,a,l){var t=document.createElement("div");return t.classList.add("control-group"),h&&(h.style.display="block",t.appendChild(h),l&&h.appendChild(l)),Object.values(i).forEach(function(e){e.style.display="inline-block",e.style.marginRight="20px",t.appendChild(e)}),a&&t.appendChild(a),t}},{key:"getFormCheckboxControl",value:function(i,h,a){var l=document.createElement("div");return l.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&l.classList.add("je-checkbox-control--compact"),l}},{key:"getFormRadio",value:function(i){var h=this.getFormInputField("radio");return Object.keys(i).forEach(function(a){return h.setAttribute(a,i[a])}),h.classList.add("je-radio"),h}},{key:"getFormRadioLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getFormRadioControl",value:function(i,h,a){var l=document.createElement("div");return l.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&l.classList.add("je-radio-control--compact"),l}},{key:"getSelectInput",value:function(i,h){var a=document.createElement("select");return i&&this.setSelectOptions(a,i),a}},{key:"getSwitcher",value:function(i){var h=this.getSelectInput(i,!1);return h.classList.add("je-switcher"),h}},{key:"getSwitcherOptions",value:function(i){return i.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(i,h,a){this.setSelectOptions(i,h,a)}},{key:"setSelectOptions",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];i.innerHTML="";for(var l=0;l<h.length;l++){var t=document.createElement("option");t.setAttribute("value",h[l]),t.textContent=a[l]||h[l],i.appendChild(t)}}},{key:"getTextareaInput",value:function(){var i=document.createElement("textarea");return i.classList.add("je-textarea"),i}},{key:"getRangeInput",value:function(i,h,a){var l=this.getFormInputField("range");return l.setAttribute("min",i),l.setAttribute("max",h),l.setAttribute("step",a),l}},{key:"getStepperButtons",value:function(i){var h=document.createElement("div"),a=document.createElement("button");a.setAttribute("type","button"),a.classList.add("stepper-down");var l=document.createElement("button");l.setAttribute("type","button"),l.classList.add("stepper-up"),i.getAttribute("readonly")&&(a.setAttribute("disabled",!0),l.setAttribute("disabled",!0)),a.textContent="-",l.textContent="+";var t=function(u,d){u.value=Number(d||u.value),u.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")}),l.addEventListener("click",function(){i.getAttribute("initialized")?o?Number(i.value)<Number(o)&&i.stepUp():i.stepUp():t(i,e),O(i,"change")}),h.appendChild(a),h.appendChild(l),h}},{key:"getRangeOutput",value:function(i,h){var a=document.createElement("output"),l=function(t){a.value=t.currentTarget.value};return i.addEventListener("change",l,!1),i.addEventListener("input",l,!1),a}},{key:"getRangeControl",value:function(i,h){var a=document.createElement("div");return a.classList.add("je-range-control"),h&&a.appendChild(h),a.appendChild(i),a}},{key:"getFormInputField",value:function(i){var h=document.createElement("input");return h.setAttribute("type",i),h}},{key:"afterInputReady",value:function(i){}},{key:"getFormControl",value:function(i,h,a,l,t){var e=document.createElement("div");return e.classList.add("form-control"),i&&(e.appendChild(i),t&&i.setAttribute("for",t)),h.type!=="checkbox"&&h.type!=="radio"||!i?(l&&i&&i.appendChild(l),e.appendChild(h)):(h.style.width="auto",i.insertBefore(h,i.firstChild),l&&i.appendChild(l)),a&&e.appendChild(a),e}},{key:"getIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel"),i}},{key:"getTopIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel--top"),i}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(i){var h=document.createElement("p");return window.DOMPurify?h.innerHTML=window.DOMPurify.sanitize(i):h.textContent=this.cleanText(i),h}},{key:"getCheckboxDescription",value:function(i){return this.getDescription(i)}},{key:"getFormInputDescription",value:function(i){return this.getDescription(i)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(i){return this.getButtonHolder()}},{key:"getButton",value:function(i,h,a){var l=document.createElement("button");return l.type="button",this.setButtonText(l,i,h,a),l}},{key:"getFormButton",value:function(i,h,a){return this.getButton(i,h,a)}},{key:"setButtonText",value:function(i,h,a,l){for(;i.firstChild;)i.removeChild(i.firstChild);if(a&&(i.appendChild(a),h=" ".concat(h)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!a){var t=document.createElement("span");t.appendChild(document.createTextNode(h)),i.appendChild(t)}l&&i.setAttribute("title",l)}},{key:"getTableContainer",value:function(){return document.createElement("div")}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(i){var h=document.createElement("th");return h.textContent=i,h}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(i){var h=document.createElement("p");return h.style=h.style||{},h.style.color="red",h.appendChild(document.createTextNode(i)),h}},{key:"addInputError",value:function(i,h){}},{key:"removeInputError",value:function(i){}},{key:"addTableRowError",value:function(i){}},{key:"removeTableRowError",value:function(i){}},{key:"getTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(h,"'></div><div class='je-tabholder--clear'></div>"),a}},{key:"getTopTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(h,"'></div>"),a}},{key:"applyStyles",value:function(i,h){Object.keys(h).forEach(function(a){return i.style[a]=h[a]})}},{key:"closest",value:function(i,h){for(;i&&i!==document;){if(!i[Iu])return!1;if(i[Iu](h))return i;i=i.parentNode}return!1}},{key:"insertBasicTopTab",value:function(i,h){h.firstChild.insertBefore(i,h.firstChild.firstChild)}},{key:"getTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab"),a}},{key:"getTopTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab--top"),a}},{key:"getTabContentHolder",value:function(i){return i.children[1]}},{key:"getTopTabContentHolder",value:function(i){return i.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(i){this.applyStyles(i.tab,{opacity:1,background:"white"}),i.rowPane!==void 0?i.rowPane.style.display="":i.container.style.display=""}},{key:"markTabInactive",value:function(i){this.applyStyles(i.tab,{opacity:.5,background:""}),i.rowPane!==void 0?i.rowPane.style.display="none":i.container.style.display="none"}},{key:"addTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"addTopTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"getBlockLink",value:function(){var i=document.createElement("a");return i.classList.add("je-block-link"),i}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(i,h,a){i.appendChild(h),a.classList.add("je-media"),i.appendChild(a)}},{key:"createImageLink",value:function(i,h,a){i.appendChild(h),h.appendChild(a)}},{key:"getFirstTab",value:function(i){return i.firstChild.firstChild}},{key:"getInputGroup",value:function(i,h){}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"getDropZone",value:function(i){var h=document.createElement("div");return h.setAttribute("data-text",i),h.classList.add("je-dropzone"),h}},{key:"getUploadPreview",value:function(i,h,a){var l=document.createElement("div");if(l.classList.add("je-upload-preview"),i.mimeType.substr(0,5)==="image"){var t=document.createElement("img");t.src=a,l.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),l.appendChild(e),l.appendChild(h);var o=document.createElement("div");return o.style.clear="left",l.appendChild(o),l}},{key:"getProgressBar",value:function(){var i=document.createElement("progress");return i.setAttribute("max",100),i.setAttribute("value",0),i}},{key:"updateProgressBar",value:function(i,h){i&&i.setAttribute("value",h)}},{key:"updateProgressBarUnknown",value:function(i){i&&i.removeAttribute("value")}}],f&&If(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function go(c){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(c)}function Bf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(go(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(go(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),go(h)==="symbol"?h:String(h)),i)}var h}function ji(){return ji=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=pn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},ji.apply(this,arguments)}function Zl(c,n){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Zl(c,n)}function pn(c){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(c)}var Bu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=pn(i);if(h){var o=pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(go(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getFormInputLabel",value:function(t,e){var o=ji(pn(l.prototype),"getFormInputLabel",this).call(this,t,e);return o.classList.add("je-form-input-label"),o}},{key:"getFormInputDescription",value:function(t){var e=ji(pn(l.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=ji(pn(l.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=ji(pn(l.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=ji(pn(l.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")}}])&&Bf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function wo(c){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(c)}function Df(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(wo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(wo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),wo(h)==="symbol"?h:String(h)),i)}var h}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=fn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Oi.apply(this,arguments)}function Jl(c,n){return Jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jl(c,n)}function fn(c){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(c)}Bu.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 Du=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=fn(i);if(h){var o=fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(wo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getSelectInput",value:function(t,e){var o=Oi(fn(l.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 Oi(fn(l.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=Oi(fn(l.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&e.classList.add("form-control"),e}},{key:"getFormControl",value:function(t,e,o,u){var d=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(d.classList.add("form-group"),t&&(t.classList.add("control-label"),d.appendChild(t),u&&t.appendChild(u)),d.appendChild(e)):(d.classList.add(e.type),u&&t.appendChild(u),t.insertBefore(e,t.firstChild),d.appendChild(t)),o&&d.appendChild(o),d}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var o=document.createElement("span");return o.style["font-family"]="sans-serif",o.style.visibility="hidden",o.style["background-color"]="rgba(50, 50, 50, .75)",o.style.margin="0 .25rem",o.style.color="#FAFAFA",o.style.padding=".5rem 1rem",o.style["border-radius"]=".25rem",o.style.width="25rem",o.style.position="absolute",o.innerText=t,e.onmouseover=function(){o.style.visibility="visible"},e.onmouseleave=function(){o.style.visibility="hidden"},e.appendChild(o),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,e,o){var u=Oi(fn(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-default"),u}},{key:"getTableContainer",value:function(){var t=Oi(fn(l.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 u=document.createElement("a");return u.setAttribute("href","#".concat(e)),u.appendChild(t),u.setAttribute("aria-controls",e),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(e)),u.appendChild(t),u.setAttribute("aria-controls",e),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),o.appendChild(u),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,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{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 u=document.createElement("div");u.classList.add("input-group-btn"),o.appendChild(u);for(var d=0;d<e.length;d++)u.appendChild(e[d]);return o}}}])&&Df(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function _o(c){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_o(c)}function Nf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(_o(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(_o(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),_o(h)==="symbol"?h:String(h)),i)}var h}function Ei(){return Ei=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=mn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ei.apply(this,arguments)}function Yl(c,n){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yl(c,n)}function mn(c){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(c)}Du.rules={},_(3843);var $f={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"},Nu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=mn(i);if(h){var o=mn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(_o(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,$f)}return n=l,(f=[{key:"getSelectInput",value:function(t,e){var o=Ei(mn(l.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 u=Ei(mn(l.prototype),"getRangeInput",this).call(this,t,e,o);return this.options.custom_forms===!0&&(u.classList.remove("form-control"),u.classList.add("custom-range")),u}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("div"),u=document.createElement("div"),d=document.createElement("button");d.setAttribute("type","button");var x=document.createElement("button");x.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(u),o.appendChild(d),u.appendChild(x),e.classList.add("input-group"),o.classList.add("input-group-prepend"),u.classList.add("input-group-append"),d.classList.add("btn"),d.classList.add("btn-secondary"),d.classList.add("stepper-down"),x.classList.add("btn"),x.classList.add("btn-secondary"),x.classList.add("stepper-up"),t.getAttribute("readonly")&&(d.setAttribute("disabled",!0),x.setAttribute("disabled",!0)),d.textContent="-",x.textContent="+";var P=function(nt,ut){nt.value=Number(ut||nt.value),nt.setAttribute("initialized","1")},D=t.getAttribute("min"),J=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),d.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():P(t,D),O(t,"change")}),x.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():P(t,D),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ei(mn(l.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,u){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(d.appendChild(t),u&&d.appendChild(u)),d.appendChild(e);else{var x=document.createElement("div");this.options.custom_forms===!1?(x.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(x.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?x.classList.add("custom-checkbox"):x.classList.add("custom-radio"));var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),x.appendChild(e),x.appendChild(t),u&&x.appendChild(u),d.appendChild(x)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,u){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),u&&e.appendChild(u));var x=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;x.appendChild(D)}),d.appendChild(x),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return this.options.custom_forms===!1?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return this.options.custom_forms===!1?o.classList.add("form-check-label"):o.classList.add("custom-control-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var u=document.createElement("div");return this.options.custom_forms===!1?u.classList.add("form-check"):u.classList.add("custom-control","custom-radio"),u.appendChild(e),u.appendChild(t),o&&(this.options.custom_forms===!1?u.classList.add("form-check-inline"):u.classList.add("custom-control-inline")),u}},{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 u=Ei(mn(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var t=Ei(mn(l.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 u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),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,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{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 u=document.createElement("div");u.classList.add("input-group-append"),o.appendChild(u);for(var d=0;d<e.length;d++)e[d].classList.remove("mr-2","btn-secondary"),e[d].classList.add("btn-outline-secondary"),u.appendChild(e[d]);return o}}}])&&Nf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function xo(c){return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xo(c)}function Mf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(xo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xo(h)==="symbol"?h:String(h)),i)}var h}function Ci(){return Ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=yn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ci.apply(this,arguments)}function Xl(c,n){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Xl(c,n)}function yn(c){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yn(c)}Nu.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 Hf={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},$u=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=yn(i);if(h){var o=yn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(xo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,Hf)}return n=l,(f=[{key:"getSelectInput",value:function(t,e){var o=Ci(yn(l.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 u=Ci(yn(l.prototype),"getRangeInput",this).call(this,t,e,o);return u.classList.remove("form-control"),u.classList.add("form-range"),u}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var u=document.createElement("button");u.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(u),e.classList.add("input-group"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),u.classList.add("btn"),u.classList.add("btn-secondary"),u.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),u.setAttribute("disabled",!0)),o.textContent="-",u.textContent="+";var d=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},x=t.getAttribute("min"),P=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?x?Number(t.value)>Number(x)&&t.stepDown():t.stepDown():d(t,x),O(t,"change")}),u.addEventListener("click",function(){t.getAttribute("initialized")?P?Number(t.value)<Number(P)&&t.stepUp():t.stepUp():d(t,x),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ci(yn(l.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,u){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),d.appendChild(t),u&&d.appendChild(u)),d.appendChild(e);else{var x=document.createElement("div");x.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),x.appendChild(e),x.appendChild(t),u&&x.appendChild(u),d.appendChild(x)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,u){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),u&&e.appendChild(u));var x=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;x.appendChild(D)}),d.appendChild(x),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return o.classList.add("form-check-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var u=document.createElement("div");return u.classList.add("form-check"),u.appendChild(e),u.appendChild(t),o&&u.classList.add("form-check-inline"),u}},{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 u=Ci(yn(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var t=Ci(yn(l.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 u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),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,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{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 u=0;u<e.length;u++)e[u].classList.remove("me-2","btn-secondary"),e[u].classList.add("btn-outline-secondary"),o.appendChild(e[u]);return o}}}])&&Mf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function ko(c){return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ko(c)}function Ff(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ko(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ko(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ko(h)==="symbol"?h:String(h)),i)}var h}function jo(){return jo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Pn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},jo.apply(this,arguments)}function Kl(c,n){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Kl(c,n)}function Pn(c){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(c)}$u.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 Mu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pn(i);if(h){var o=Pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(ko(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getTable",value:function(){var t=jo(Pn(l.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=jo(Pn(l.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=jo(Pn(l.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,u){var d=jo(Pn(l.prototype),"getFormControl",this).call(this,t,e,o,u);return e.type==="checkbox"?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var o=document.createElement("label");return o.style.fontWeight="bold",o.style.display="block",o.textContent=t,e&&o.classList.add("required"),o}},{key:"getButton",value:function(t,e,o){var u=document.createElement("button");u.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(u.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(e)):e?(u.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(e)):u.classList.add("ui-button-text-only");var d=document.createElement("span");return d.classList.add("ui-button-text"),d.textContent=t||o||".",u.appendChild(d),u.setAttribute("title",o),u}},{key:"setButtonText",value:function(t,e,o,u){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),o&&!e?(t.classList.add("ui-button-icon-only"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):o?(t.classList.add("ui-button-text-icon-primary"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):t.classList.add("ui-button-text-only");var d=document.createElement("span");d.classList.add("ui-button-text"),d.textContent=e||u||".",t.appendChild(d),t.setAttribute("title",u)}},{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"}}])&&Ff(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function Oo(c){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(c)}function Vf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){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(h)==="symbol"?h:String(h)),i)}var h}function Ql(c,n){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ql(c,n)}function Ts(c){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ts(c)}Mu.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 Hu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ql(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ts(i);if(h){var o=Ts(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Oo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var o=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),o.nodeName&&o.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&Vf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function Eo(c){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(c)}function zf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Eo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Eo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Eo(h)==="symbol"?h:String(h)),i)}var h}function gr(){return gr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=tr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},gr.apply(this,arguments)}function tc(c,n){return tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},tc(c,n)}function tr(c){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tr(c)}Hu.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 Uf={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"},Fu=function(c){(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&&tc(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=tr(i);if(h){var o=tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Eo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,Uf)}return n=l,(f=[{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-".concat(e)),o&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=gr(tr(l.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=gr(tr(l.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 u=gr(tr(l.prototype),"getFormButton",this).call(this,t,e,o);return u.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&u.classList.remove("btn-sm"),this.options.input_size==="large"&&u.classList.add("btn-lg"),u}},{key:"getButton",value:function(t,e,o){var u=gr(tr(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),u}},{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=gr(tr(l.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-desc","hide-sm"),e}},{key:"getFormInputLabel",value:function(t,e){var o=gr(tr(l.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=gr(tr(l.prototype),"getCheckboxLabel",this).call(this,t,e),u=document.createElement("i");return u.classList.add("form-icon"),o.classList.add("form-checkbox","pr-0"),o.insertBefore(u,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,u){return gr(tr(l.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,u)}},{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=gr(tr(l.prototype),"getFormRadioLabel",this).call(this,t,e),u=document.createElement("i");return u.classList.add("form-icon"),o.classList.add("form-radio"),o.insertBefore(u,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=gr(tr(l.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 u=this.getFormInputField("range");return u.classList.add("slider"),u.classList.remove("form-input"),u.setAttribute("oninput",'this.setAttribute("value", this.value)'),u.setAttribute("min",t),u.setAttribute("max",e),u.setAttribute("step",o),u}},{key:"getRangeControl",value:function(t,e){var o=gr(tr(l.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center"),o}},{key:"getSelectInput",value:function(t,e){var o=gr(tr(l.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,u){var d=document.createElement("div");return d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),d.appendChild(t),u&&t.appendChild(u)),d.appendChild(e)):(d.classList.add(e.type),u&&t.appendChild(u),t.insertBefore(e,t.firstChild),d.appendChild(t)),this.options.input_size==="small"?e.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&e.classList.add("input-lg","select-lg"),e.type!=="checkbox"&&d.appendChild(e),o&&d.appendChild(o),d}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var u=0;u<e.length;u++)e[u].classList.add("input-group-btn"),e[u].classList.remove("btn-sm","mr-2","my-1"),o.appendChild(e[u]);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 u=document.createTextNode("I");o.appendChild(u);var d=document.createElement("div");d.classList.add("popover-container"),e.appendChild(d);var x=document.createElement("div");x.classList.add("card"),d.appendChild(x);var P=document.createElement("div");return P.classList.add("card-body"),P.innerHTML=t,x.appendChild(P),e}},{key:"getTable",value:function(){var t=gr(tr(l.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=gr(tr(l.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 u=document.createElement("a");return u.setAttribute("href","#".concat(e)),u.appendChild(t),o.appendChild(u),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(u){u.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"))}}])&&zf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function Co(c){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(c)}function qf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Co(h)==="symbol"?h:String(h)),i)}var h}function wr(){return wr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=er(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},wr.apply(this,arguments)}function ec(c,n){return ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ec(c,n)}function er(c){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},er(c)}Fu.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 Gf={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},Vu=function(c){(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&&ec(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=er(i);if(h){var o=er(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,Gf)}return n=l,(f=[{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,o){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),o&&(t.style.marginLeft="".concat(100/12*o,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,e){var o=wr(er(l.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=wr(er(l.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 u=this.getFormInputField("range");return u.classList.add("slider"),this.options.enable_compact&&u.classList.add("compact"),u.setAttribute("oninput",'this.setAttribute("value", this.value)'),u.setAttribute("min",t),u.setAttribute("max",e),u.setAttribute("step",o),u}},{key:"getRangeControl",value:function(t,e){var o=wr(er(l.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=wr(er(l.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,u){var d=wr(er(l.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,u);return d.classList.add("inline-flex","flex-col"),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=wr(er(l.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,u,d){var x=wr(er(l.prototype),"getRadioHolder",this).call(this,e,o,u,d);return t.options.layout==="h"?x.classList.add("inline-flex","flex-row"):x.classList.add("inline-flex","flex-col"),x}},{key:"getFormInputLabel",value:function(t,e){var o=wr(er(l.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=wr(er(l.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,u){var d=document.createElement("div");return d.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),e.type==="checkbox"&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,u)),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,u)),d.appendChild(t),!["checkbox","radio"].includes(e.type)&&u&&d.appendChild(u)),["checkbox","radio"].includes(e.type)||(this.options.input_size==="small"?e.classList.add("text-xs"):this.options.input_size==="normal"?e.classList.add("text-base"):this.options.input_size==="large"&&e.classList.add("text-xl"),d.appendChild(e)),o&&d.appendChild(o),d}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,e,o){var u=wr(er(l.prototype),"getButton",this).call(this,t,e,o);return u.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"),u}},{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=wr(er(l.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=wr(er(l.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=wr(er(l.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=wr(er(l.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 u=document.createElement("a");return u.classList.add("nav-link","text-center"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),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 u=document.createElement("a");return u.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),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,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{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 u=document.createElement("div");u.classList.add("-mr-1"),o.appendChild(u);for(var d=0;d<e.length;d++)u.appendChild(e[d]);return o}}}])&&qf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);Vu.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 Wf={html:Bu,bootstrap3:Du,bootstrap4:Nu,bootstrap5:$u,jqueryui:Mu,barebones:Hu,spectre:Fu,tailwind:Vu};const Zf={".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function So(c){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(c)}function rc(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function nc(){nc=function(){return c};var c={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",l=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof x?G:x,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:Nt(W,Z,re)}),Lt}function u(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}c.wrap=o;var d={};function x(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ut=nt&&nt(nt(Jt([])));ut&&ut!==n&&f.call(ut,a)&&(J=ut);var dt=D.prototype=x.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=u(W[et],W,Lt);if(Te.type!=="throw"){var Dr=Te.arg,en=Dr.value;return en&&So(en)=="object"&&f.call(en,"__await")?G.resolve(en.__await).then(function(kr){Z("next",kr,re,Pe)},function(kr){Z("throw",kr,re,Pe)}):G.resolve(en).then(function(kr){Dr.value=kr,re(Dr)},function(kr){return Z("throw",kr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function Nt(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=u(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=u(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Jt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),c.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},c.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},c.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,l,function(){return this}),c.AsyncIterator=Ct,c.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return c.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),c.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}},c.values=Jt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Dr){return Lt.type="throw",Lt.arg=W,G.next=Te,Dr&&(G.method="next",G.arg=void 0),!!Dr}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Jt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},c}function zu(c,n,f,i,h,a,l){try{var t=c[a](l),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Jf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(So(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(So(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),So(h)==="symbol"?h:String(h)),i)}var h}var Tn=function(){function c(a){var l=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,c),!(a instanceof Element))throw new Error("element should be an instance of Element");this.element=a,this.options=k({},c.defaults.options,t),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||c.defaults.translate,this.translateProperty=this.options.translateProperty||c.defaults.translateProperty,this.uuid=0,this.__data={};var e=this.options.theme||c.defaults.theme,o=c.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 u=k(Zf,this.getEditorsRules()),d=function(D,J,nt){return nt?l.addNewStyleRulesToShadowRoot(D,J,nt):l.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var x=C(this.element);d("default",u,x),o.rules!==void 0&&d(e,o.rules,x)}var P=c.defaults.iconlibs[this.options.iconlib||c.defaults.iconlib];P&&(this.iconlib=new P),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}var n,f,i,h;return n=c,f=[{key:"load",value:(i=nc().mark(function a(){var l,t,e,o,u,d,x=this;return nc().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return l=document.location.origin+document.location.pathname.toString(),(t=new af(this.options)).onSchemaLoaded=function(D){x.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){x.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),P.next=9,t.load(this.schema,l,e);case 9:o=P.sent,u=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Qi(this,null,u,c.defaults),d=this.getEditorClass(o),this.root=this.createEditor(d,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),S(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame(function(){x.ready&&(x.validation_results=x.validator.validate(x.root.getValue()),x.root.showValidationErrors(x.validation_results),x.trigger("ready"),x.trigger("change"))});case 24:case"end":return P.stop()}},a,this)}),h=function(){var a=this,l=arguments;return new Promise(function(t,e){var o=i.apply(a,l);function u(x){zu(o,t,e,u,d,"next",x)}function d(x){zu(o,t,e,u,d,"throw",x)}u(void 0)})},function(){return h.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(a),this}},{key:"validate",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return arguments.length===1?this.validator.validate(a):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(a,l){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(l),this}},{key:"off",value:function(a,l){if(a&&l){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]!==l&&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,l){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,[l]);return this}},{key:"setOption",value:function(a,l){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=l,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(c.defaults.editors).reduce(function(a,l){return l.rules?k(a,l.rules):a},{})}},{key:"getEditorClass",value:function(a){var l,t=this;if(a=this.expandSchema(a),c.defaults.resolvers.find(function(e){return(l=e(a,t))&&c.defaults.editors[l]}),!l)throw new Error("Unknown editor for schema ".concat(JSON.stringify(a)));if(!c.defaults.editors[l])throw new Error("Unknown editor ".concat(l));return c.defaults.editors[l]}},{key:"createEditor",value:function(a,l){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new a(l=k({},a.options||{},l),c.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 l,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.defaults.template;if(typeof t=="string"){if(!c.defaults.templates[t])throw new Error("Unknown template engine ".concat(t));if(!(l=c.defaults.templates[t]()))throw new Error("Template engine ".concat(t," missing required library."))}else l=t;if(!l)throw new Error("No template engine set");if(!l.compile)throw new Error("Invalid template engine set");return l.compile(a)}},{key:"_data",value:function(a,l,t){if(arguments.length!==3)return a.hasAttribute("data-jsoneditor-".concat(l))?this.__data[a.getAttribute("data-jsoneditor-".concat(l))]:null;var e;a.hasAttribute("data-jsoneditor-".concat(l))?e=a.getAttribute("data-jsoneditor-".concat(l)):(e=this.uuid++,a.setAttribute("data-jsoneditor-".concat(l),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,l){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(l),this}},{key:"unwatch",value:function(a,l){if(!this.watchlist||!this.watchlist[a])return this;if(!l)return this.watchlist[a]=null,this;for(var t=[],e=0;e<this.watchlist[a].length;e++)this.watchlist[a][e]!==l&&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 l=0;l<this.watchlist[a].length;l++)this.watchlist[a][l]()}},{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,l){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(l).forEach(function(u){var d=a==="default"?u:"".concat(o,'[data-theme="').concat(a,'"] ').concat(u);e.insertRule?e.insertRule(d+" {"+decodeURIComponent(l[u])+"}",0):e.addRule&&e.addRule(d,decodeURIComponent(l[u]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,l,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(l).forEach(function(x){var P=a==="default"?x:"".concat(e,'[data-theme="').concat(a,'"] ').concat(x);o+=P+" {"+decodeURIComponent(l[x])+`}
|
|
83
|
-
`});var u,d=new CSSStyleSheet;d.replaceSync(o),t.adoptedStyleSheets=[].concat(function(x){if(Array.isArray(x))return rc(x)}(u=t.adoptedStyleSheets)||function(x){if(typeof Symbol<"u"&&x[Symbol.iterator]!=null||x["@@iterator"]!=null)return Array.from(x)}(u)||function(x,P){if(x){if(typeof x=="string")return rc(x,P);var D=Object.prototype.toString.call(x).slice(8,-1);return D==="Object"&&x.constructor&&(D=x.constructor.name),D==="Map"||D==="Set"?Array.from(x):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?rc(x,P):void 0}}(u)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
84
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[d])}}],f&&Jf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();Tn.defaults=_i,Tn.AbstractEditor=F,Tn.AbstractTheme=Sn,Tn.AbstractIconLib=Cn,Object.assign(Tn.defaults.themes,Wf),Object.assign(Tn.defaults.editors,_s),Object.assign(Tn.defaults.templates,sf),Object.assign(Tn.defaults.iconlibs,Rf)})(),E})())})(uu);var Na=uu.exports;const tp=`
|
|
70
|
+
*/function*Qi(n,t){if(n!==void 0){let e=0;for(const i of n)yield t(i,e++)}}const Td=n=>typeof n.type!="string"&&"multiple",jd=n=>typeof n.type=="string"&&"string",$d=n=>!n.type&&n.properties&&"object",Pd=n=>typeof n.type=="string"&&["string","number","integer","boolean","null","array","object"].includes(n.type)&&n.type,Od=n=>n.type==="string"&&n.format==="signature"&&"signature",Id=n=>{if(n.type==="boolean")return n.format==="checkbox"||n.options&&n.options.checkbox?"checkbox":n.format==="select2"?"select2":n.format==="selectize"?"selectize":n.format==="choices"?"choices":"select"},Bd=n=>n.type==="any"&&"multiple",Rd=n=>n.type==="string"&&n.media&&n.media.binaryEncoding==="base64"&&"base64",Dd=n=>n.type==="string"&&n.format==="url"&&window.FileReader&&n.options&&n.options.upload===Object(n.options.upload)&&"upload",Nd=n=>n.type==="array"&&n.format==="table"&&"table",Md=n=>{if(n.enumSource)return n.format==="radio"?"radio":n.format==="select2"?"select2":n.format==="selectize"?"selectize":n.format==="choices"?"choices":"select"},Hd=n=>{if(n.enum){if(n.type==="array"||n.type==="object")return"enum";if(n.type==="number"||n.type==="integer"||n.type==="string")return n.format==="radio"?"radio":n.format==="select2"?"select2":n.format==="selectize"?"selectize":n.format==="choices"?"choices":"select"}},Vd=(n,t)=>{if(n.items&&(n.items=t.expandSchema(n.items)),n.type==="array"&&n.items&&!Array.isArray(n.items)&&["string","number","integer"].includes(n.items.type)){if(n.format==="choices")return"arrayChoices";if(n.uniqueItems){if(n.format==="selectize")return"arraySelectize";if(n.format==="select2")return"arraySelect2";if(n.items.enum)return"multiselect"}}},Fd=n=>(n.oneOf||n.anyOf)&&"multiple",zd=n=>n.if&&"multiple",Ud=n=>["string","integer"].includes(n.type)&&["date","time","datetime-local"].includes(n.format)&&"datetime",qd=n=>["string","integer"].includes(n.type)&&["starrating","rating"].includes(n.format)&&"starrating",Gd=n=>{if(n.links){for(let t=0;t<n.links.length;t++)if(n.links[t].rel&&n.links[t].rel.toLowerCase()==="describedby")return"describedBy"}},Zd=n=>{if((n.type==="integer"||n.type==="number")&&n.format==="stepper")return"stepper"},Wd=n=>n.format==="button"&&"button",Yd=n=>n.format==="info"&&"info",Xd=n=>n.type==="string"&&n.format==="uuid"&&"uuid",Jd=n=>n.type==="string"&&n.format==="autocomplete"&&"autocomplete",Qd=n=>n.type==="string"&&n.format==="jodit"&&"jodit",Kd=n=>n.type==="string"&&n.format==="markdown"&&"simplemde",th=n=>n.type==="string"&&["xhtml","bbcode"].includes(n.format)&&"sceditor",eh=["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"],ih=[n=>n.type==="string"&&n.format==="color"&&"colorpicker",n=>n.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(n.format)&&"ip",n=>n.type==="string"&&eh.includes(n.format)&&"ace",th,Kd,Qd,Jd,Xd,Yd,Wd,Zd,Gd,qd,Ud,Fd,zd,Vd,Hd,Md,Nd,Dd,Rd,Bd,Id,Od,Pd,$d,Td,jd];function co(n){return!(n===null||typeof n!="object"||n.nodeType||n===n.window||n.constructor&&!Wt(n.constructor.prototype,"isPrototypeOf"))}function uo(n){return co(n)?$({},n):Array.isArray(n)?n.map(uo):n}function $(n,...t){return t.forEach(e=>{e&&Object.keys(e).forEach(i=>{e[i]&&co(e[i])?(Wt(n,i)||(n[i]={}),$(n[i],e[i])):Array.isArray(e[i])?n[i]=uo(e[i]):n[i]=e[i]})}),n}function re(n,t){const e=document.createEvent("HTMLEvents");e.initEvent(t,!0,!0),n.dispatchEvent(e)}function po(n){return n&&(n.toString()==="[object ShadowRoot]"?n:po(n.parentNode))}function Wt(n,t){return n&&Object.prototype.hasOwnProperty.call(n,t)}const sh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;function rh(n){if(typeof n>"u"||n===null)return!1;const t=n.match(sh),e=parseFloat(n);return t!==null&&!isNaN(e)&&isFinite(e)}const nh=/^\s*(-|\+)?(\d+)\s*$/;function oh(n){if(typeof n>"u"||n===null)return!1;const t=n.match(nh),e=parseInt(n);return t!==null&&!isNaN(e)&&isFinite(e)}function Ei(){let n=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(n+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t==="x"?e:e&3|8).toString(16)})}function wr(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ki(n,...t){if(!t.length)return n;const e=t.shift();if(wr(n)&&wr(e))for(const i in e)wr(e[i])?(n[i]||Object.assign(n,{[i]:{}}),Ki(n[i],e[i])):Object.assign(n,{[i]:e[i]});return Ki(n,...t)}function ah(n,t){return Object.keys(t).forEach(function(e){e in n&&(n[e]=t[e])}),n}class Bt{constructor(t,e){this.defaults=e,this.jsoneditor=t.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=t.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.isUiOnly=!1,this.options=$({},this.options||{},this.schema.options||{},t.schema.options||{},t),this.formname=this.jsoneditor.options.form_name_root||"root",!t.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=t.path||this.formname,this.formname=t.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=t.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,t.container&&this.setContainer(t.container),this.registerDependencies()}onChildEditorChange(t){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(t){this.notify(),this.watch_listener&&this.watch_listener(),t&&this.change()}register(){if(this.jsoneditor.registerEditor(this),this.input&&!this.label){const t=this.getTitle()||this.formname;this.input.setAttribute("aria-label",t)}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 t=this.options.dependencies;t&&Object.keys(t).forEach(e=>{let i;e.startsWith(this.jsoneditor.root.path)?i=e:(i=this.path.split("."),i[i.length-1]=e,i=i.join(".")),this.jsoneditor.watch(i,()=>{this.evaluateDependencies()})})}evaluateDependencies(){const t=this.container||this.control;if(!t||this.jsoneditor===null)return;const e=this.options.dependencies;if(!e)return;const i=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(e).forEach(r=>{let o;r.startsWith(this.jsoneditor.root.path)?o=r:(o=this.path.split("."),o[o.length-1]=r,o=o.join("."));const l=e[r];this.checkDependency(o,l)}),this.dependenciesFulfilled!==i&&this.notify();let s=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(s="none"),t.tagName==="TD"?Object.keys(t.childNodes).forEach(r=>t.childNodes[r].style.display=s):t.style.display=s}checkDependency(t,e){if(this.path===t||this.jsoneditor===null)return;const i=this.jsoneditor.getEditor(t),s=i?i.getValue():void 0;!i||!i.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(e)?this.dependenciesFulfilled=e.some(r=>{if(JSON.stringify(s)===JSON.stringify(r))return!0}):typeof e=="object"?typeof s!="object"?this.dependenciesFulfilled=e===s:Object.keys(e).some(r=>{if(!Wt(e,r))return!1;if(!Wt(s,r)||e[r]!==s[r])return this.dependenciesFulfilled=!1,!0}):typeof e=="string"||typeof e=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&s===e:typeof e=="boolean"&&(e?this.dependenciesFulfilled=this.dependenciesFulfilled&&(s||s.length>0):this.dependenciesFulfilled=this.dependenciesFulfilled&&(!s||s.length===0))}setContainer(t){this.container=t,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(t){this.optInLabel=this.theme.getHiddenLabel(this.formname+" opt-in"),this.optInLabel.setAttribute("for",this.formname+"-opt-in"),this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.setAttribute("id",this.formname+"-opt-in"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",()=>{this.isActive()?this.deactivate():this.activate()});const e=this.jsoneditor.options.show_opt_in,i=typeof this.parent.options.show_opt_in<"u",s=i&&this.parent.options.show_opt_in===!0,r=i&&this.parent.options.show_opt_in===!1;(s||!r&&e||!i&&e)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInLabel),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(),this.options.titleHidden&&(this.theme.visuallyHidden(this.label),this.theme.visuallyHidden(this.header))}setupWatchListeners(){if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=()=>{this.refreshWatchedFieldValues()&&this.onWatchedFieldChange()},Wt(this.schema,"watch")){let t,e,i,s,r;const o=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(a=>{if(t=this.schema.watch[a],Array.isArray(t)){if(t.length<2)return;e=[t[0]].concat(t[1].split("."))}else e=t.split("."),this.theme.closest(this.container,`[data-schemaid="${e[0]}"]`)||e.unshift("#");if(i=e.shift(),i==="#"&&(i=this.jsoneditor.schema.id||this.jsoneditor.root.formname),s=this.theme.closest(this.container,`[data-schemaid="${i}"]`),!s)throw new Error(`Could not find ancestor node with id ${i}`);r=`${s.getAttribute("data-schemapath")}.${e.join(".")}`,o.startsWith(r)&&(this.watchLoop=!0),this.jsoneditor.watch(r,this.watch_listener),this.watched[a]=r})}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 t=0;t<this.schema.links.length;t++)this.addLink(this.getLink(this.schema.links[t]))}onMove(){}getButton(t,e,i,s=[]){const r=`json-editor-btn-${e}`;this.iconlib?e=this.iconlib.getIcon(e):e=null,t=this.translate(t,s),i=this.translate(i,s),!e&&i&&(t=i,i=null);const o=this.theme.getButton(t,e,i);return o.classList.add(r),o}setButtonText(t,e,i,s,r=[]){return this.iconlib?i=this.iconlib.getIcon(i):i=null,e=this.translate(e,r),s=this.translate(s,r),!i&&s&&(e=s,s=null),this.theme.setButtonText(t,e,i,s)}addLink(t){this.link_holder&&this.link_holder.appendChild(t)}getLink(t){let e,i;const r=(t.mediaType||"application/javascript").split("/")[0],o=this.jsoneditor.compileTemplate(t.href,this.template_engine),a=this.jsoneditor.compileTemplate(t.rel?t.rel:t.href,this.template_engine);let l=null;if(t.download&&(l=t.download),l&&l!==!0&&(l=this.jsoneditor.compileTemplate(l,this.template_engine)),r==="image"){e=this.theme.getBlockLinkHolder(),i=document.createElement("a"),i.setAttribute("target","_blank");const d=document.createElement("img");this.theme.createImageLink(e,i,d),this.link_watchers.push(h=>{const u=o(h),g=a(h);i.setAttribute("href",u),i.setAttribute("title",g||u),d.setAttribute("src",u)})}else if(["audio","video"].includes(r)){e=this.theme.getBlockLinkHolder(),i=this.theme.getBlockLink(),i.setAttribute("target","_blank");const d=document.createElement(r);d.setAttribute("controls","controls"),this.theme.createMediaLink(e,i,d),this.link_watchers.push(h=>{const u=o(h),g=a(h);i.setAttribute("href",u),i.textContent=g||u,d.setAttribute("src",u)})}else i=e=this.theme.getBlockLink(),e.setAttribute("target","_blank"),e.textContent=t.rel,e.style.display="none",this.link_watchers.push(d=>{const h=o(d),u=a(d);h&&(e.style.display=""),e.setAttribute("href",h),e.textContent=u||h});return l&&i&&(l===!0?i.setAttribute("download",""):this.link_watchers.push(d=>{i.setAttribute("download",l(d))})),t.class&&i.classList.add(t.class),e}refreshWatchedFieldValues(){if(!this.watched_values)return;const t={};let e=!1;return this.watched&&Object.keys(this.watched).forEach(i=>{const s=this.jsoneditor.getEditor(this.watched[i]),r=s?s.getValue():null;this.watched_values[i]!==r&&(e=!0),t[i]=r}),t.self=this.getValue(),this.watched_values.self!==t.self&&(e=!0),this.watched_values=t,e}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const t=this.getHeaderText();if(this.header.children.length){for(let e=0;e<this.header.childNodes.length;e++)if(this.header.childNodes[e].nodeType===3){this.header.childNodes[e].nodeValue=this.cleanText(t);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(t):this.header.textContent=this.cleanText(t)}}getHeaderText(t){return this.header_text?this.header_text:t?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}onWatchedFieldChange(){let t;if(this.header_template){t=$(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:this.key*1,i1:this.key*1+1,title:this.getTitle()}),this.editors&&Object.keys(this.editors).length&&(t.properties={},Object.keys(this.editors).forEach(i=>{const s=this.editors[i];if(s.schema&&s.schema.enum&&s.schema.options&&s.schema.options.enum_titles){const r=s.schema.enum.indexOf(s.value),o=s.options.enum_titles[r];t.properties[i]={enumTitle:o}}}));const e=this.header_template(t);e!==this.header_text&&(this.header_text=e,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){t=this.getWatchedFieldValues();for(let e=0;e<this.link_watchers.length;e++)this.link_watchers[e](t)}}setValue(t){this.value=t}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(t=>this.jsoneditor.unwatch(t,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 t=this.schema.type||this.schema.oneOf;if(t&&Array.isArray(t)&&(t=t[0]),t&&typeof t=="object"&&(t=t.type),t&&Array.isArray(t)&&(t=t[0]),typeof t=="string"){if(t==="number")return this.isDefaultRequired()?0:void 0;if(t==="boolean")return this.isDefaultRequired()?!1:void 0;if(t==="integer")return this.isDefaultRequired()?0:void 0;if(t==="string")return this.isDefaultRequired()?"":void 0;if(t==="null")return null;if(t==="object")return{};if(t==="array")return[]}}getTitle(){return this.translateProperty(this.schema.title||this.key||this.formname)}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(t){const e=[],i={};t.forEach(r=>{r.title&&(i[r.title]=i[r.title]||0,i[r.title]++),r.description&&(i[r.description]=i[r.description]||0,i[r.description]++),r.format&&(i[r.format]=i[r.format]||0,i[r.format]++),r.type&&(i[r.type]=i[r.type]||0,i[r.type]++)}),t.forEach(r=>{let o;typeof r=="string"?o=r:r.title&&i[r.title]<=1?o=r.title:r.format&&i[r.format]<=1?o=r.format:r.type&&i[r.type]<=1?o=r.type:r.description&&i[r.description]<=1?o=r.description:r.title?o=r.title:r.format?o=r.format:r.type?o=r.type:r.description?o=r.description:JSON.stringify(r).length<500?o=JSON.stringify(r):o="type",e.push(o)});const s={};return e.forEach((r,o)=>{s[r]=s[r]||0,s[r]++,i[r]>1&&(e[o]=`${r} ${s[r]}`)}),e}getValidId(t){return t=t===void 0?"":t.toString(),t.replace(/\s+/g,"-")}setInputAttributes(t){if(this.schema.options&&this.schema.options.inputAttributes){const e=this.schema.options.inputAttributes,i=["name","type"].concat(t);Object.keys(e).forEach(s=>{i.includes(s.toLowerCase())||this.input.setAttribute(s,e[s])})}}setContainerAttributes(){if(this.schema.options&&this.schema.options.containerAttributes){const t=this.schema.options.containerAttributes,e=["data-schemapath","data-schematype","data-schemaid"];Object.keys(t).forEach(i=>{e.includes(i.toLowerCase())||this.container.setAttribute(i,t[i])})}}expandCallbacks(t,e){const i=this.defaults.callbacks[t];return Object.entries(e).forEach(([s,r])=>{r===Object(r)?e[s]=this.expandCallbacks(t,r):typeof r=="string"&&typeof i=="object"&&typeof i[r]=="function"&&(e[s]=i[r].bind(null,this))}),e}showValidationErrors(t){}}class Yt extends Bt{register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}setValue(t,e,i){if(this.template&&!i||(!this.shouldBeUnset()&&(t===null||typeof t>"u")?t="":typeof t=="object"?t=JSON.stringify(t):!this.shouldBeUnset()&&typeof t!="string"&&(t=`${t}`),t===this.serialized))return;const s=this.sanitize(t);if(this.input.value===s)return;if(this.setValueToInputField(s),this.format==="range"){const o=this.control.querySelector("output");o&&(o.value=s)}const r=i||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),i||this.onChange(r),{changed:r,value:s}}setValueToInputField(t){this.input.value=t===void 0?"":t}getNumColumns(){const t=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);let e;return this.input_type==="textarea"?e=6:["text","email"].includes(this.input_type)?e=4:e=2,Math.min(12,Math.max(t,e))}build(){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";let e=this.schema.minimum||0,i=this.schema.maximum||Math.max(100,e+1),s=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),i%this.schema.multipleOf&&(i=Math.floor(i/this.schema.multipleOf)*this.schema.multipleOf),s=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,i,s,this.description,this.formname),this.input.setAttribute("id",this.formname)}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);typeof this.schema.maxLength<"u"&&this.input.setAttribute("maxlength",this.schema.maxLength),typeof this.schema.pattern<"u"?this.input.setAttribute("pattern",this.schema.pattern):typeof this.schema.minLength<"u"&&this.input.setAttribute("pattern",`.{${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",e=>{if(e.preventDefault(),e.stopPropagation(),this.schema.template){e.currentTarget.value=this.value;return}const i=e.currentTarget.value,s=this.sanitize(i);i!==s&&(e.currentTarget.value=s),this.is_dirty=!0,this.refreshValue(),this.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=e=>{if(!e)return;let i,s=e.offsetHeight;if(e.offsetHeight<e.scrollHeight)for(i=0;e.offsetHeight<e.scrollHeight+3&&!(i>100);)i++,s++,e.style.height=`${s}px`;else{for(i=0;e.offsetHeight>=e.scrollHeight+3&&!(i>100);)i++,s--,e.style.height=`${s}px`;e.style.height=`${s+1}px`}},this.input.addEventListener("keyup",e=>{this.adjust_height(e.currentTarget)}),this.input.addEventListener("change",e=>{this.adjust_height(e.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);let{input:t}=this;if(this.format==="range"&&(t=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,t,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame(()=>{if(this.input.parentNode&&this.afterInputReady(),this.adjust_height&&this.adjust_height(this.input),this.format==="range"){const e=this.control.querySelector("output");e.value=this.input.value}}),this.schema.template){const e=this.expandCallbacks("template",{template:this.schema.template});typeof e.template=="function"?this.template=e.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}setupCleave(t){const e=this.expandCallbacks("cleave",$({},this.defaults.options.cleave||{},this.options.cleave||{}));typeof e=="object"&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}setupImask(t){const e=this.expandCallbacks("imask",$({},this.defaults.options.imask||{},this.options.imask||{}));typeof e=="object"&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}ajustIMaskOptions(t){return Object.keys(t).forEach(e=>{if(t[e]===Object(t[e]))t[e]=this.ajustIMaskOptions(t[e]);else if(e==="mask")if(t[e].substr(0,6)==="regex:"){const i=t[e].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(i!==null)try{t[e]=new RegExp(i[1],i[2])}catch{}}else t[e]=this.getGlobalPropertyFromString(t[e])}),t}getGlobalPropertyFromString(t){if(t.includes(".")){const e=t.split("."),i=e[0],s=e[1];if(typeof window[i]<"u"&&typeof window[i][s]<"u")return window[i][s]}else if(typeof window[t]<"u")return window[t];return t}shouldBeUnset(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}getValue(){const t=!!(this.input&&this.input.value);if(!(this.shouldBeUnset()&&!t))return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:super.getValue()}enable(){this.always_disabled||(this.input.disabled=!1,super.enable())}disable(t){t&&(this.always_disabled=!0),this.input.disabled=!0,super.disable()}afterInputReady(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}refreshValue(){this.input&&(this.value=this.input.value,typeof this.value!="string"&&!this.shouldBeUnset()&&(this.value=""),this.serialized=this.value)}destroy(){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),super.destroy()}sanitize(t){return t}onWatchedFieldChange(){let t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),super.onWatchedFieldChange()}showValidationErrors(t){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;const e=(s,r)=>(r.path===this.path&&s.push(r.message),s),i=t.reduce(e,[]);i.length?this.theme.addInputError(this.input,`${i.join(". ")}.`):this.theme.removeInputError(this.input)}}class lh extends Yt{setValue(t,e,i){const s=super.setValue(t,e,i);s!==void 0&&s.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(s.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}build(){this.options.format="textarea",super.build(),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}afterInputReady(){let t;if(window.ace){let e=this.input_type;(e==="cpp"||e==="c++"||e==="c")&&(e="c_cpp"),t=this.expandCallbacks("ace",$({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:`ace/mode/${e}`})),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",()=>{this.input.value=this.ace_editor_instance.getValue(),this.refreshValue(),this.is_dirty=!0,this.onChange(!0)}),this.theme.afterInputReady(this.input)}else super.afterInputReady()}getNumColumns(){return 6}enable(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),super.enable()}disable(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),super.disable(t)}destroy(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),super.destroy()}}const dh={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};class xr extends Bt{askConfirmation(){return!(this.jsoneditor.options.prompt_before_delete===!0&&window.confirm(this.translate("button_delete_node_warning"))===!1)}getDefault(){return this.schema.default||[]}register(){super.register(),this.rows&&this.rows.forEach(t=>t.register())}unregister(){super.unregister(),this.rows&&this.rows.forEach(t=>t.unregister())}getNumColumns(){const t=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,t.width+2),4):t.width}enable(){this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach(t=>{t.enable(),this.setAvailability(t,!1)}),super.enable())}disable(t){t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach(e=>{e.disable(t),this.setAvailability(e,!0)}),super.disable()}setAvailability(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)}preBuild(){super.preBuild(),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}build(){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("span"),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()}postBuild(){super.postBuild(),(this.schema.readOnly||this.schema.readonly)&&this.disable()}onChildEditorChange(t){this.refreshValue(),this.refreshTabs(!0),super.onChildEditorChange(t)}getItemTitle(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){const 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)}getItemSchema(t){if(Array.isArray(this.schema.items))if(t>=this.schema.items.length){if(this.schema.additionalItems===!0)return{};if(this.schema.additionalItems)return $({},this.schema.additionalItems)}else return $({},this.schema.items[t]);else return this.schema.items?$({},this.schema.items):{}}getItemInfo(t){let e=this.getItemSchema(t);this.item_info=this.item_info||{};const i=JSON.stringify(e);return typeof this.item_info[i]<"u"?this.item_info[i]:(e=this.jsoneditor.expandRefs(e),this.item_info[i]={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[i])}getElementEditor(t){const e=this.getItemInfo(t);let i=this.getItemSchema(t);i=this.jsoneditor.expandRefs(i),i.title=`${e.title} ${t+1}`;const s=this.jsoneditor.getEditorClass(i);let r;this.tabs_holder?(this.schema.format==="tabs-top"?r=this.theme.getTopTabContent():r=this.theme.getTabContent(),r.id=`${this.path}.${t}`):e.child_editors?r=this.theme.getChildEditorHolder():r=this.theme.getIndentedPanel(),this.row_holder.appendChild(r);const o=this.jsoneditor.createEditor(s,{jsoneditor:this.jsoneditor,schema:i,container:r,path:`${this.path}.${t}`,parent:this,required:!0});return o.preBuild(),o.build(),o.postBuild(),o.title_controls||(o.array_controls=this.theme.getButtonHolder(),r.appendChild(o.array_controls)),o}checkParent(t){return t&&t.parentNode}destroy(){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,super.destroy()}empty(t){if(this.rows!==null){if(this.rows.forEach((e,i)=>{t&&(this.checkParent(e.tab)&&e.tab.parentNode.removeChild(e.tab),this.destroyRow(e,!0),this.row_cache[i]=null),this.rows[i]=null}),t)for(let e=this.rows.length;e<this.row_cache.length;e++)this.destroyRow(this.row_cache[e],!0),this.row_cache[e]=null;this.rows=[],t&&(this.row_cache=[])}}destroyRow(t,e){const i=t.container;e?(t.destroy(),i.parentNode&&i.parentNode.removeChild(i),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),i.style.display="none",t.unregister())}getMax(){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}refreshTabs(t){this.rows.forEach(e=>{e.tab&&(t?e.tab_text.textContent=e.getHeaderText():e.tab===this.active_tab?this.theme.markTabActive(e):this.theme.markTabInactive(e))})}ensureArraySize(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}setValue(t=[],e){if(t=this.ensureArraySize(t),JSON.stringify(t)===this.serialized){e&&this.refreshValue(e);return}t.forEach((o,a)=>{if(this.rows[a])this.rows[a].setValue(o,e);else if(this.row_cache[a])this.rows[a]=this.row_cache[a],this.rows[a].setValue(o,e),this.rows[a].container.style.display="",this.rows[a].tab&&(this.rows[a].tab.style.display=""),this.rows[a].register(),this.jsoneditor.trigger("addRow",this.rows[a]);else{const l=this.addRow(o,e);this.jsoneditor.trigger("addRow",l)}});for(let o=t.length;o<this.rows.length;o++)this.destroyRow(this.rows[o]),this.rows[o]=null;this.rows=this.rows.slice(0,t.length);const s=this.rows.find(o=>o.tab===this.active_tab);let r=typeof s<"u"?s.tab:null;!r&&this.rows.length&&(r=this.rows[0].tab),this.active_tab=r,this.refreshValue(e),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}setButtonState(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:t.style.display=e?"":"none";break;case 2:t.disabled=!e;break;default:t.style.display=e?"":"none"}}setupButtons(t){const e=[];if(!this.value.length)this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);else if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);const s=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,s),e.push(s)}else{const s=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,s),e.push(s);const r=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,r),e.push(r)}const i=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,i),e.push(i),e.some(s=>s)}refreshValue(t){const e=this.value?this.value.length:0;if(this.value=this.rows.map(i=>i.getValue()),e!==this.value.length||t){const i=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((s,r)=>{if(s.movedown_button){const o=r!==this.rows.length-1;this.setButtonState(s.movedown_button,o)}s.delete_button&&this.setButtonState(s.delete_button,!i),this.value[r]=s.getValue()}),this.setupButtons(i)&&!this.collapsed?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}addRow(t,e){const i=this.rows.length;this.rows[i]=this.getElementEditor(i),this.row_cache[i]=this.rows[i],this.tabs_holder&&(this.rows[i].tab_text=document.createElement("span"),this.rows[i].tab_text.textContent=this.rows[i].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[i].tab=this.theme.getTopTab(this.rows[i].tab_text,this.getValidId(this.rows[i].path)),this.theme.addTopTab(this.tabs_holder,this.rows[i].tab)):(this.rows[i].tab=this.theme.getTab(this.rows[i].tab_text,this.getValidId(this.rows[i].path)),this.theme.addTab(this.tabs_holder,this.rows[i].tab)),this.rows[i].tab.addEventListener("click",r=>{this.active_tab=this.rows[i].tab,this.refreshTabs(),r.preventDefault(),r.stopPropagation()}));const s=this.rows[i].title_controls||this.rows[i].array_controls;return this.hide_delete_buttons||(this.rows[i].delete_button=this._createDeleteButton(i,s)),this.show_copy_button&&(this.rows[i].copy_button=this._createCopyButton(i,s)),i&&!this.hide_move_buttons&&(this.rows[i].moveup_button=this._createMoveUpButton(i,s)),this.hide_move_buttons||(this.rows[i].movedown_button=this._createMoveDownButton(i,s)),typeof t<"u"&&this.rows[i].setValue(t,e),this.refreshTabs(),this.rows[i]}_createDeleteButton(t,e){const i=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return i.classList.add("delete","json-editor-btntype-delete"),i.setAttribute("data-i",t),i.addEventListener("click",s=>{if(s.preventDefault(),s.stopPropagation(),!this.askConfirmation())return!1;const r=s.currentTarget.getAttribute("data-i")*1,o=this.getValue().filter((h,u)=>u!==r);let a=null;const d=this.rows[r].getValue();this.setValue(o),this.rows[r]?a=this.rows[r].tab:this.rows[r-1]&&(a=this.rows[r-1].tab),a&&(this.active_tab=a,this.refreshTabs()),this.onChange(!0),this.jsoneditor.trigger("deleteRow",d)}),e&&e.appendChild(i),i}_createCopyButton(t,e){const i=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),s=this.schema;return i.classList.add("copy","json-editor-btntype-copy"),i.setAttribute("data-i",t),i.addEventListener("click",r=>{const o=this.getValue();r.preventDefault(),r.stopPropagation();const a=r.currentTarget.getAttribute("data-i")*1;o.forEach((l,d)=>{if(d===a){if(s.items.type==="string"&&s.items.format==="uuid")l=Ei();else if(s.items.type==="object"&&s.items.properties)for(const h of Object.keys(l))s.items.properties&&s.items.properties[h]&&s.items.properties[h].format==="uuid"&&(l[h]=Ei());o.push(l)}}),this.setValue(o),this.refreshValue(!0),this.onChange(!0)}),e.appendChild(i),i}_createMoveUpButton(t,e){const i=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return i.classList.add("moveup","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();const r=s.currentTarget.getAttribute("data-i")*1;if(r<=0)return;const o=this.getValue(),a=o[r-1];o[r-1]=o[r],o[r]=a,this.setValue(o),this.active_tab=this.rows[r-1].tab,this.refreshTabs(),this.onChange(!0),this.jsoneditor.trigger("moveRow",this.rows[r-1])}),e&&e.appendChild(i),i}_createMoveDownButton(t,e){const i=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return i.classList.add("movedown","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();const r=s.currentTarget.getAttribute("data-i")*1,o=this.getValue();if(r>=o.length-1)return;const a=o[r+1];o[r+1]=o[r],o[r]=a,this.setValue(o),this.active_tab=this.rows[r+1].tab,this.refreshTabs(),this.onChange(!0),this.jsoneditor.trigger("moveRow",this.rows[r+1])}),e&&e.appendChild(i),i}addControls(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&re(this.toggle_button,"click"),this.schema.options&&typeof this.schema.options.disable_collapse<"u"?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"))}_createToggleButton(){const t=this.getButton("","collapse","button_collapse");t.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(t,this.title.childNodes[0]);const e=this.row_holder.style.display,i=this.controls.style.display;return t.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),this.panel&&this.setButtonState(this.panel,this.collapsed),this.tabs_holder&&this.setButtonState(this.tabs_holder,this.collapsed),this.collapsed?(this.collapsed=!1,this.row_holder.style.display=e,this.controls.style.display=i,this.setButtonText(s.currentTarget,"","collapse","button_collapse")):(this.collapsed=!0,this.row_holder.style.display="none",this.controls.style.display="none",this.setButtonText(s.currentTarget,"","expand","button_expand"))}),t}_createAddRowButton(){const t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const i=this.rows.length;let s;this.row_cache[i]?(s=this.rows[i]=this.row_cache[i],this.rows[i].setValue(this.rows[i].getDefault(),!0),this.rows[i].container.style.display="",this.rows[i].tab&&(this.rows[i].tab.style.display=""),this.rows[i].register()):s=this.addRow(),this.active_tab=this.rows[i].tab,this.refreshTabs(),this.refreshValue(),this.onChange(!0),this.jsoneditor.trigger("addRow",s)}),this.controls.appendChild(t),t}_createDeleteLastRowButton(){const t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",e=>{if(e.preventDefault(),e.stopPropagation(),!this.askConfirmation())return!1;const i=this.getValue();let s=null;const r=i.pop();this.setValue(i),this.rows[this.rows.length-1]&&(s=this.rows[this.rows.length-1].tab),s&&(this.active_tab=s,this.refreshTabs()),this.onChange(!0),this.jsoneditor.trigger("deleteRow",r)}),this.controls.appendChild(t),t}_createRemoveAllRowsButton(){const t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",e=>{if(e.preventDefault(),e.stopPropagation(),!this.askConfirmation())return!1;const i=this.getValue();this.empty(!0),this.setValue([]),this.onChange(!0),this.jsoneditor.trigger("deleteAllRows",i)}),this.controls.appendChild(t),t}showValidationErrors(t){const e=[],i=[];t.forEach(s=>{s.path===this.path?e.push(s):i.push(s)}),this.error_holder&&(e.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",e.forEach(s=>{this.error_holder.appendChild(this.theme.getErrorMessage(s.message))})):this.error_holder.style.display="none"),this.rows.forEach(s=>s.showValidationErrors(i))}}xr.rules=dh;class ts extends Bt{onInputChange(){this.value=this.input.value,this.onChange(!0)}register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}getNumColumns(){let t=this.getTitle().length;return Object.keys(this.select_values).forEach(e=>t=Math.max(t,`${this.select_values[e]}`.length+4)),Math.min(12,Math.max(t/7,2))}preBuild(){super.preBuild(),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];let t;const e=this.jsoneditor.expandRefs(this.schema.items||{}),i=e.enum||[],s=e.options?e.options.enum||[]:[],r=e.options?e.options.enum_titles||[]:[];for(t=0;t<i.length;t++){if(this.sanitize(i[t])!==i[t])continue;const o=s[t]||{};"title"in o||(o.title=`${r[t]||i[t]}`),this.option_keys.push(`${i[t]}`),this.option_enum.push(o),this.select_values[`${i[t]}`]=i[t]}}build(){let t;if(this.options.compact||(this.header=this.label=this.theme.getLabelLike(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++){const e=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=e,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];const i=this.theme.getCheckboxLabel(this.option_enum[t].title);if(i.htmlFor=e,this.option_enum[t].infoText){const s=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));i.appendChild(s)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(i,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.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),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(e=>e.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.formname)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=e=>{const i=[];for(t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]&&(this.select_options[this.option_keys[t]].selected||this.select_options[this.option_keys[t]].checked)&&i.push(this.select_values[this.option_keys[t]]);this.updateValue(i),this.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(()=>{this.afterInputReady()})}postBuild(){super.postBuild()}afterInputReady(){this.theme.afterInputReady(this.input||this.inputs)}setValue(t,e){t=t||[],Array.isArray(t)||(t=[t]),t=t.map(i=>`${i}`),Object.keys(this.select_options).forEach(i=>{this.select_options[i][this.input_type==="select"?"selected":"checked"]=t.includes(i)}),this.updateValue(t),this.onChange(!0)}removeValue(t){t=[].concat(t),this.setValue(this.getValue().filter(e=>!t.includes(e)))}addValue(t){this.setValue(this.getValue().concat(t))}updateValue(t){let e=!1;const i=[];for(let s=0;s<t.length;s++){if(!this.select_options[`${t[s]}`]){e=!0;continue}const r=this.sanitize(this.select_values[t[s]]);i.push(r),r!==t[s]&&(e=!0)}return this.value=i,e}sanitize(t){return this.schema.items.type==="boolean"?!!t:this.schema.items.type==="number"?1*t||0:this.schema.items.type==="integer"?Math.floor(t*1||0):`${t}`}enable(){this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach(t=>this.inputs[t].disabled=!1),super.enable())}disable(t){t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach(e=>this.inputs[e].disabled=!0),super.disable()}destroy(){super.destroy()}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}showValidationErrors(t){const e=new RegExp(`^${this.escapeRegExp(this.path)}(\\.\\d+)?$`),i=(r,o)=>(o.path.match(e)&&r.push(o.message),r),s=t.reduce(i,[]);s.length?this.theme.addInputError(this.input||this.inputs,`${s.join(". ")}.`):this.theme.removeInputError(this.input||this.inputs)}}class hh extends ts{setValue(t,e){this.choices_instance?(t=[].concat(t).map(i=>`${i}`),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):super.setValue(t,e)}afterInputReady(){if(window.Choices&&!this.choices_instance){const t=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,t),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=e=>{const i=this.choices_instance.getValue(!0);this.updateValue(i),this.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}super.afterInputReady()}updateValue(t){t=[].concat(t);let e=!1;const i=[];for(let s=0;s<t.length;s++){if(!this.select_values[`${t[s]}`])if(e=!0,this.newEnumAllowed){if(!this.addNewOption(t[s]))continue}else continue;const r=this.sanitize(this.select_values[t[s]]);i.push(r),r!==t[s]&&(e=!0)}return this.value=i,e}addNewOption(t){return this.option_keys.push(`${t}`),this.option_titles.push(`${t}`),this.select_values[`${t}`]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:`${t}`,label:`${t}`}],"value","label",!1),!0}enable(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),super.enable()}disable(t){this.choices_instance&&this.choices_instance.disable(),super.disable(t)}destroy(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),super.destroy()}}class ch extends ts{setValue(t,e){this.select2_instance?(t=[].concat(t).map(i=>`${i}`),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):super.setValue(t,e)}afterInputReady(){let t;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=Wt(this.select2_instance.select2,"amd"),this.selectChangeHandler=()=>{const e=this.select2v4?this.select2_instance.val():this.select2_instance.select2("val");this.updateValue(e),this.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),super.afterInputReady()}updateValue(t){t=[].concat(t);let e=!1;const i=[];for(let s=0;s<t.length;s++){if(!this.select_values[`${t[s]}`])if(e=!0,this.newEnumAllowed){if(!this.addNewOption(t[s]))continue}else continue;const r=this.sanitize(this.select_values[t[s]]);i.push(r),r!==t[s]&&(e=!0)}return this.value=i,e}addNewOption(t){this.option_keys.push(`${t}`),this.option_titles.push(`${t}`),this.select_values[`${t}`]=t,this.schema.items.enum.push(t);const e=this.input.querySelector(`option[value="${t}"]`);return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}enable(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),super.enable()}disable(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),super.disable()}destroy(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),super.destroy()}}class uh extends ts{setValue(t,e){this.selectize_instance?(t=[].concat(t).map(i=>`${i}`),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):super.setValue(t,e)}afterInputReady(){let t;if(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=s=>{const r=this.selectize_instance.getValue();this.updateValue(r),this.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);const e=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),e.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(e,this.input);const i=this.selectize_instance.$control[0];if(i){const s=this.theme.getHiddenLabel(this.formname);s.setAttribute("for",this.formname+"-selectized"),i.appendChild(s)}}super.afterInputReady()}updateValue(t){t=[].concat(t);let e=!1;const i=[];for(let s=0;s<t.length;s++){if(!this.select_values[`${t[s]}`])if(e=!0,this.newEnumAllowed){if(!this.addNewOption(t[s]))continue}else continue;const r=this.sanitize(this.select_values[t[s]]);i.push(r),r!==t[s]&&(e=!0)}return this.value=i,e}addNewOption(t){return this.option_keys.push(`${t}`),this.option_titles.push(`${t}`),this.select_values[`${t}`]=t,this.selectize_instance.addOption({text:t,value:t}),!0}enable(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),super.enable()}disable(t){this.selectize_instance&&this.selectize_instance.lock(),super.disable(t)}destroy(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),super.destroy()}}class ph extends Yt{postBuild(){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)),super.postBuild()}afterInputReady(){let t;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",$({},{search:e=>(console.log(`No "search" callback defined for autocomplete in property "${e.key}"`),[]),onSubmit:()=>{this.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add(`${t.baseClass}-result-list`),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),super.afterInputReady()}destroy(){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),super.destroy()}}class fh extends Bt{getNumColumns(){return 4}setFileReaderListener(t){t.addEventListener("load",e=>{if(this.count===this.current_item_index)this.value[this.count][this.key]=e.target.result;else{const i={};for(const s in this.parent.schema.properties)i[s]="";i[this.key]=e.target.result,this.value.splice(this.count,0,i)}this.count+=1,this.count===this.total+this.current_item_index&&this.arrayEditor.setValue(this.value)})}build(){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",e=>{if(e.preventDefault(),e.stopPropagation(),e.currentTarget.files&&e.currentTarget.files.length)if(e.currentTarget.files.length>1&&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.arrayEditor=this.jsoneditor.getEditor(this.parent.parent.path),this.value=this.arrayEditor.getValue(),this.total=e.currentTarget.files.length,this.current_item_index=parseInt(this.parent.key),this.count=this.current_item_index;for(let i=0;i<this.total;i++){const s=new FileReader;this.setFileReaderListener(s),s.readAsDataURL(e.currentTarget.files[i])}}else{let i=new FileReader;i.onload=s=>{this.value=s.target.result,this.refreshPreview(),this.onChange(!0),i=null},i.readAsDataURL(e.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);const t=this.getButton("button_upload","upload","button_upload");t.addEventListener("click",()=>{this.uploader.click()}),this.control.appendChild(t)}refreshPreview(){if(this.last_preview===this.value||(this.last_preview=this.value,this.preview.innerHTML="",!this.value))return;let t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),!t)this.preview.innerHTML="<em>Invalid data URI</em>";else if(this.preview.innerHTML=`<strong>Type:</strong> ${t}, <strong>Size:</strong> ${Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)} bytes`,t.substr(0,5)==="image"){this.preview.innerHTML+="<br>";const e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}enable(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),super.enable())}disable(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),super.disable()}setValue(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())}destroy(){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),super.destroy()}}class fo extends Bt{constructor(t,e){super(t,e),this.active=!1,this.isUiOnly=!0,this.parent&&this.parent.schema&&(Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key)||this.parent.schema.required.push(this.key):this.parent.schema.required=[this.key])}build(){this.options.compact=!0;const t=this.expandCallbacks("button",$({},{icon:"",validated:!1,align:"left",action:(i,s)=>{window.alert(`No button action defined for "${i.path}"`)}},this.defaults.options.button||{},this.options.button||{})),e=this.translateProperty(t.text||this.schema.title)||this.key;this.input=this.getButton(e,t.icon,e),typeof t.action!="function"?window.alert(`No button action defined for "${this.path}"`):this.input.addEventListener("click",t.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(t.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=()=>{this.jsoneditor.validate(this.jsoneditor.getValue()).length>0?this.disable():this.enable()},t.validated&&this.jsoneditor.on("change",this.changeHandler)}enable(){this.always_disabled||(this.input.disabled=!1,super.enable())}disable(t){t&&(this.always_disabled=!0),this.input.disabled=!0,super.disable()}getNumColumns(){return 2}activate(){this.active=!1,this.enable()}deactivate(){this.isRequired()||(this.active=!1,this.disable())}destroy(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,super.destroy()}}class mh extends Bt{setValue(t,e){t=!!t;const i=this.getValue()!==t;this.value=t,this.input.checked=this.value,e||(this.is_dirty=!0),this.onChange(i)}register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}getNumColumns(){return Math.min(12,Math.max(this.getTitle().length/7,2))}build(){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",t=>{t.preventDefault(),t.stopPropagation(),this.value=t.currentTarget.checked,this.is_dirty=!0,this.onChange(!0)}),this.container.appendChild(this.control)}enable(){this.always_disabled||(this.input.disabled=!1,super.enable())}disable(t){t&&(this.always_disabled=!0),this.input.disabled=!0,super.disable()}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()}showValidationErrors(t){const e=this.jsoneditor.options.show_errors,i=e==="change"||e==="interaction";if(e==="never"||i&&!this.is_dirty)return;const r=(a,l)=>(l.path===this.path&&a.push(l.message),a),o=t.reduce(r,[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,`${o.join(". ")}.`):this.theme.removeInputError(this.input)}}class Li extends Bt{setValue(t,e){let i=this.typecast(t);const s=!!this.jsoneditor.options.use_default_values||typeof this.schema.default<"u";(this.enum_options.length>0&&!this.enum_values.includes(i)||e&&!this.isRequired()&&!s)&&(i=this.enum_values[0]),this.value!==i&&(this.input.value=this.enum_options[this.enum_values.indexOf(i)],this.value=i,e||(this.is_dirty=!0),this.onChange(),this.change())}register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}getNumColumns(){if(!this.enum_options)return 3;let t=this.getTitle().length;for(let 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))}typecast(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(t*1||0):this.schema.enum&&t===void 0?void 0:`${t}`}getValue(){if(this.dependenciesFulfilled)return this.typecast(this.value)}preBuild(){this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[];let t,e;if(this.schema.enum){const i=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((s,r)=>{this.enum_options[r]=`${s}`,this.enum_display[r]=`${this.translateProperty(i[r])||s}`,this.enum_values[r]=this.typecast(s)})}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){if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],!Array.isArray(this.schema.enumSource))this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];else 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]);for(t=0;t<this.enumSource.length;t++)this.enumSource[t].value&&(e=this.expandCallbacks("template",{template:this.enumSource[t].value}),typeof e.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&&(e=this.expandCallbacks("template",{template:this.enumSource[t].title}),typeof e.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&&(e=this.expandCallbacks("template",{template:this.enumSource[t].filter}),typeof e.template=="function"?this.enumSource[t].filter=e.template:this.enumSource[t].filter=this.jsoneditor.compileTemplate(this.enumSource[t].filter,this.template_engine))}else throw new Error("'select' editor requires the enum property to be set.")}build(){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",t=>{t.preventDefault(),t.stopPropagation(),this.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame(()=>{this.input.parentNode&&this.afterInputReady()})}afterInputReady(){this.theme.afterInputReady(this.input)}onInputChange(){const t=this.typecast(this.input.value);let e;this.enum_values.includes(t)?e=this.enum_values[this.enum_values.indexOf(t)]:e=this.enum_values[0],e!==this.value&&(this.is_dirty=!0,this.value=e,this.onChange(!0))}onWatchedFieldChange(){let t,e,i=[],s=[];if(this.enumSource){t=this.getWatchedFieldValues();for(let o=0;o<this.enumSource.length;o++)if(Array.isArray(this.enumSource[o]))i=i.concat(this.enumSource[o]),s=s.concat(this.enumSource[o]);else{let a=[];if(Array.isArray(this.enumSource[o].source)?a=this.enumSource[o].source:a=t[this.enumSource[o].source],a){if(this.enumSource[o].slice&&(a=Array.prototype.slice.apply(a,this.enumSource[o].slice)),this.enumSource[o].filter){const h=[];for(e=0;e<a.length;e++)this.enumSource[o].filter({i:e,item:a[e],watched:t})&&h.push(a[e]);a=h}const l=[],d=[];for(e=0;e<a.length;e++){const h=a[e];this.enumSource[o].value?d[e]=this.typecast(this.enumSource[o].value({i:e,item:h})):d[e]=a[e],this.enumSource[o].title?l[e]=this.enumSource[o].title({i:e,item:h}):l[e]=d[e]}this.enumSource[o].sort&&((h,u,g)=>{h.map((m,y)=>({v:m,t:u[y]})).sort((m,y)=>m.v<y.v?-g:m.v===y.v?0:g).forEach((m,y)=>{h[y]=m.v,u[y]=m.t})}).bind(null,d,l,this.enumSource[o].sort==="desc"?1:-1)(),i=i.concat(d),s=s.concat(l)}}const r=this.value;this.theme.setSelectOptions(this.input,i,s),this.enum_options=i,this.enum_display=s,this.enum_values=i,i.includes(r)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=r,this.value=r):(this.input.value=i[0],this.value=this.typecast(i[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}super.onWatchedFieldChange()}enable(){this.always_disabled||(this.input.disabled=!1,super.enable())}disable(t){t&&(this.always_disabled=!0),this.input.disabled=!0,super.disable(t)}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()}showValidationErrors(t){const e=this.jsoneditor.options.show_errors,i=e==="change"||e==="interaction";if(e==="never"||i&&!this.is_dirty)return;const r=(a,l)=>(l.path===this.path&&a.push(l.message),a),o=t.reduce(r,[]);o.length?this.theme.addInputError(this.input,`${o.join(". ")}.`):this.theme.removeInputError(this.input)}}const gh={".choices > *":"box-sizing:border-box"};class mo extends Li{setValue(t,e){if(this.choices_instance){let i=this.typecast(t||"");if(this.enum_values.includes(i)||(i=this.enum_values[0]),this.value===i)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(i)],this.choices_instance.setChoiceByValue(this.input.value),this.value=i,this.onChange()}else super.setValue(t,e)}afterInputReady(){if(window.Choices&&!this.choices_instance){const t=this.expandCallbacks("choices",$({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}super.afterInputReady()}onWatchedFieldChange(){if(super.onWatchedFieldChange(),this.choices_instance){const t=this.enum_options.map((e,i)=>({value:e,label:this.enum_display[i]}));this.choices_instance.setChoices(t,"value","label",!0),this.choices_instance.setChoiceByValue(`${this.value}`)}}enable(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),super.enable()}disable(t){this.choices_instance&&this.choices_instance.disable(),super.disable(t)}destroy(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),super.destroy()}}mo.rules=gh;class bh extends Yt{build(){if(super.build(),!!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&&typeof 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","");let{input:t}=this;if(this.options.flatpickr.wrap===!0){const e=[];if(this.options.flatpickr.showToggleButton!==!1){const 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){const o=this.getButton("","clear","flatpickr_clear_button");o.setAttribute("data-clear",""),e.push(o)}const{parentNode:i}=this.input,{nextSibling:s}=this.input,r=this.theme.getInputGroup(this.input,e);r!==void 0?(this.options.flatpickr.inline=!1,i.insertBefore(r,s),t=r):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")}}getValue(){if(!this.dependenciesFulfilled)return;if(this.schema.type==="string")return this.value;if(this.value===""||this.value===void 0)return;const t=this.schema.format==="time"?`1970-01-01 ${this.value}`:this.value;return parseInt(new Date(t).getTime()/1e3)}setValue(t,e,i){if(this.schema.type==="string")super.setValue(t,e,i),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){const s=new Date(t*1e3),r=s.getFullYear(),o=this.zeroPad(s.getMonth()+1),a=this.zeroPad(s.getDate()),l=this.zeroPad(s.getHours()),d=this.zeroPad(s.getMinutes()),h=this.zeroPad(s.getSeconds()),u=[r,o,a].join("-"),g=[l,d,h].join(":");let m=`${u}T${g}`;this.schema.format==="date"?m=u:this.schema.format==="time"&&(m=g),this.input.value=m,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(m)}}destroy(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,super.destroy()}zeroPad(t){return`0${t}`.slice(-2)}}class yh extends Bt{register(){if(this.editors){for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}super.register()}unregister(){if(super.unregister(),this.editors)for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}getNumColumns(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}enable(){if(this.editors)for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();super.enable()}disable(){if(this.editors)for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();super.disable()}switchEditor(){const t=this.getWatchedFieldValues();if(!t)return;const e=document.location.origin+document.location.pathname+this.template(t);this.editors[this.refs[e]]||this.buildChildEditor(e),this.currentEditor=this.refs[e],this.register(),this.editors.forEach((i,s)=>{i&&(this.currentEditor===s?i.container.style.display="":i.container.style.display="none")}),this.refreshValue(),this.onChange(!0)}buildChildEditor(t){this.refs[t]=this.editors.length;const e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);const i=$({},this.schema,this.jsoneditor.refs[t]),s=this.jsoneditor.getEditorClass(i,this.jsoneditor),r=this.jsoneditor.createEditor(s,{jsoneditor:this.jsoneditor,schema:i,container:e,path:this.path,parent:this,required:!0});this.editors.push(r),r.preBuild(),r.build(),r.postBuild()}preBuild(){this.refs={},this.editors=[],this.currentEditor="";let t;for(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)}build(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}onWatchedFieldChange(){this.switchEditor()}onChildEditorChange(t){this.editors[this.currentEditor]&&this.refreshValue(),super.onChildEditorChange(t)}refreshValue(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}setValue(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}destroy(){this.editors.forEach(t=>{t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),super.destroy()}showValidationErrors(t){this.editors.forEach(e=>{e&&e.showValidationErrors(t)})}}class _h extends Bt{getNumColumns(){return 4}build(){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(let t=0;t<this.enum.length;t++)this.select_options[t]=this.options.enum_titles[t]||`Value ${t+1}`,this.html_values[t]=this.getHTML(this.enum[t]);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",t=>{this.selected=this.select_options.indexOf(t.currentTarget.value),this.value=this.enum[this.selected],this.refreshValue(),this.onChange(!0)}),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}refreshValue(){this.selected=-1;const t=JSON.stringify(this.value);if(this.enum.forEach((e,i)=>{if(t===JSON.stringify(e))return this.selected=i,!1}),this.selected<0){this.setValue(this.enum[0]);return}this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected]}enable(){this.always_disabled||(this.switcher.disabled=!1,super.enable())}disable(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,super.disable()}getHTML(t){const e=(i,s)=>{Array.isArray(i)||typeof i.length=="number"&&i.length>0&&i.length-1 in i?Array.from(i).forEach((r,o)=>s(o,r)):Object.entries(i).forEach(([r,o])=>s(r,o))};if(t===null)return"<em>null</em>";if(typeof t=="object"){let i="";return e(t,(r,o)=>{let a=this.getHTML(o);Array.isArray(t)||(a=`<div><em>${r}</em>: ${a}</div>`),i+=`<li>${a}</li>`}),Array.isArray(t)?i=`<ol>${i}</ol>`:i=`<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>${i}</ul>`,i}else{if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}return t}setValue(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}destroy(){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),super.destroy()}}class vh extends Bt{register(){super.register(),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}unregister(){super.unregister(),this.input&&this.input.removeAttribute("name")}setValue(t,e,i){if(this.template&&!i||(t===null||typeof t>"u"?t="":typeof t=="object"?t=JSON.stringify(t):typeof t!="string"&&(t=`${t}`),t===this.serialized))return;const s=this.sanitize(t);if(this.input.value===s)return;this.input.value=s;const r=i||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(r)}getNumColumns(){return 2}enable(){super.enable()}disable(){super.disable()}refreshValue(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}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),super.destroy()}sanitize(t){return t}onWatchedFieldChange(){let t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),super.onWatchedFieldChange()}build(){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){const 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()}}class wh extends fo{build(){this.options.compact=!1,this.header=this.label=this.theme.getLabelLike(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)}getTitle(){return this.translateProperty(this.schema.title)}getNumColumns(){return 12}}class go extends Yt{build(){if(super.build(),typeof this.schema.minimum<"u"){let{minimum:t}=this.schema;typeof this.schema.exclusiveMinimum<"u"&&(t+=1),this.input.setAttribute("min",t)}if(typeof this.schema.maximum<"u"){let{maximum:t}=this.schema;typeof this.schema.exclusiveMaximum<"u"&&(t-=1),this.input.setAttribute("max",t)}if(typeof this.schema.step<"u"){const t=this.schema.step||1;this.input.setAttribute("step",t)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}getNumColumns(){return 2}getValue(){if(this.dependenciesFulfilled)if(!this.schema.default&&!this.jsoneditor.options.use_default_values&&this.value===""){if(this.shouldBeUnset()){this.input.value="";return}}else return rh(this.value)?parseFloat(this.value):this.value}}class bo extends go{getNumColumns(){return 2}getValue(){if(this.dependenciesFulfilled)if(!this.schema.default&&!this.jsoneditor.options.use_default_values&&this.value===""){if(this.shouldBeUnset())return}else return oh(this.value)?parseInt(this.value):this.value}}class xh extends Yt{preBuild(){if(super.preBuild(),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};break}this.options=$(this.options,this.schema.options||{})}}class Ch extends Yt{setValue(t,e,i){const s=super.setValue(t,e,i);s!==void 0&&s.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(s.value)}build(){this.options.format="textarea",super.build(),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}afterInputReady(){let t;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",()=>{this.value=this.jodit_instance.getEditorValue(),this.is_dirty=!0,this.onChange(!0)}),this.theme.afterInputReady(this.input)):super.afterInputReady()}getNumColumns(){return 6}enable(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),super.enable()}disable(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),super.disable(t)}destroy(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),super.destroy()}}const Eh=n=>{const t=n.split(".");if(t.length!==4)throw new Error("error_ipv4");t.forEach(e=>{if(isNaN(+e)||+e<0||+e>255)throw new Error("error_ipv4")})},Lh=n=>{if(!n.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")},Ah=n=>{if(!n.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function kh(n,t,e,i){try{switch(n.format){case"ipv4":Eh(t);break;case"ipv6":Lh(t);break;case"hostname":Ah(t);break}return[]}catch(s){return[{path:e,property:"format",message:i(s.message)}]}}class yo{constructor(t,e,i,s){this.jsoneditor=t,this.schema=e||this.jsoneditor.schema,this.options=i||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired(r,o,a){const l=[];if(typeof r.dependentRequired<"u"){let d=[];Object.keys(r.dependentRequired).forEach(u=>{typeof o[u]<"u"&&(d=r.dependentRequired[u].filter(m=>!Wt(o,m)))}),d.length>0&&l.push({message:"Must have the required properties: "+d.join(", "),path:a})}return l},dependentSchemas(r,o,a){let l=[];return Object.keys(r.dependentSchemas).forEach(d=>{if(typeof o[d]<"u"){const h=r.dependentSchemas[d],u=this._validateSchema(h,o,a);l=[...l,...u]}}),l},contains(r,o,a){const l=[];let d=0;o.forEach(u=>{this._validateSchema(r.contains,u,a).length===0&&d++});const h=d===0;return typeof r.minContains<"u"?d<r.minContains&&l.push({message:this.translate("error_minContains",[d,r.minContains],r),path:a}):h&&l.push({message:this.translate("error_contains",null,r),path:a}),typeof r.maxContains<"u"&&d>r.maxContains&&l.push({message:this.translate("error_maxContains",[d,r.maxContains],r),path:a}),l},if(r,o,a){if(typeof r.then>"u"&&typeof r.else>"u")return[];const l=this._validateSchema(r.if,o,a);let d=[],h=[];return typeof r.then<"u"&&(d=this._validateSchema(r.then,o,a)),typeof r.else<"u"&&(h=this._validateSchema(r.else,o,a)),r.if===!0?d:r.if===!1?h:l.length===0?d:l.length>0?h:[]},const(r,o,a){return JSON.stringify(r.const)===JSON.stringify(o)?[]:[{path:a,property:"const",message:this.translate("error_const",null,r)}]},enum(r,o,a){const l=JSON.stringify(o);return r.enum.some(h=>l===JSON.stringify(h))?[]:[{path:a,property:"enum",message:this.translate("error_enum",null,r)}]},extends(r,o,a){const l=(d,h)=>(d.push(...this._validateSchema(h,o,a)),d);return r.extends.reduce(l,[])},allOf(r,o,a){const l=(d,h)=>(d.push(...this._validateSchema(h,o,a)),d);return r.allOf.reduce(l,[])},anyOf(r,o,a){return r.anyOf.some(d=>!this._validateSchema(d,o,a).length)?[]:[{path:a,property:"anyOf",message:this.translate("error_anyOf",null,r)}]},oneOf(r,o,a){let l=0;const d=[];r.oneOf.forEach((u,g)=>{const m=this._validateSchema(u,o,a);m.length||l++,m.forEach(y=>{y.path=`${a}.oneOf[${g}]${y.path.substr(a.length)}`}),d.push(...m)});const h=[];return l!==1&&(h.push({path:a,property:"oneOf",message:this.translate("error_oneOf",[l],r)}),h.push(...d)),h},not(r,o,a){return this._validateSchema(r.not,o,a).length?[]:[{path:a,property:"not",message:this.translate("error_not",null,r)}]},type(r,o,a){if(Array.isArray(r.type)){if(!r.type.some(d=>this._checkType(d,o)))return[{path:a,property:"type",message:this.translate("error_type_union",null,r)}]}else if(["date","time","datetime-local"].includes(r.format)&&r.type==="integer"){if(!this._checkType("string",`${o}`))return[{path:a,property:"type",message:this.translate("error_type",[r.format],r)}]}else if(!this._checkType(r.type,o))return[{path:a,property:"type",message:this.translate("error_type",[r.type],r)}];return[]},disallow(r,o,a){if(Array.isArray(r.disallow)){if(r.disallow.some(d=>this._checkType(d,o)))return[{path:a,property:"disallow",message:this.translate("error_disallow_union",null,r)}]}else if(this._checkType(r.disallow,o))return[{path:a,property:"disallow",message:this.translate("error_disallow",[r.disallow],r)}];return[]}},this._validateNumberSubSchema={multipleOf(r,o,a){return this._validateNumberSubSchemaMultipleDivisible(r,o,a)},divisibleBy(r,o,a){return this._validateNumberSubSchemaMultipleDivisible(r,o,a)},maximum(r,o,a){let l=r.exclusiveMaximum?o<r.maximum:o<=r.maximum;return window.math?l=window.math[r.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(o),window.math.bignumber(r.maximum)):window.Decimal&&(l=new window.Decimal(o)[r.exclusiveMaximum?"lt":"lte"](new window.Decimal(r.maximum))),l?[]:[{path:a,property:"maximum",message:this.translate(r.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[r.maximum],r)}]},minimum(r,o,a){let l=r.exclusiveMinimum?o>r.minimum:o>=r.minimum;return window.math?l=window.math[r.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(o),window.math.bignumber(r.minimum)):window.Decimal&&(l=new window.Decimal(o)[r.exclusiveMinimum?"gt":"gte"](new window.Decimal(r.minimum))),l?[]:[{path:a,property:"minimum",message:this.translate(r.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[r.minimum],r)}]}},this._validateStringSubSchema={maxLength(r,o,a){const l=[];return`${o}`.length>r.maxLength&&l.push({path:a,property:"maxLength",message:this.translate("error_maxLength",[r.maxLength],r)}),l},minLength(r,o,a){return`${o}`.length<r.minLength?[{path:a,property:"minLength",message:this.translate(r.minLength===1?"error_notempty":"error_minLength",[r.minLength],r)}]:[]},pattern(r,o,a){return new RegExp(r.pattern).test(o)?[]:[{path:a,property:"pattern",message:r.options&&r.options.patternmessage?r.options.patternmessage:this.translate("error_pattern",[r.pattern],r)}]}},this._validateArraySubSchema={items(r,o,a){const l=[];if(Array.isArray(r.items))for(let d=0;d<o.length;d++)if(r.items[d])l.push(...this._validateSchema(r.items[d],o[d],`${a}.${d}`));else{if(r.additionalItems===!0)break;if(r.additionalItems)l.push(...this._validateSchema(r.additionalItems,o[d],`${a}.${d}`));else if(r.additionalItems===!1){l.push({path:a,property:"additionalItems",message:this.translate("error_additionalItems",null,r)});break}else break}else o.forEach((d,h)=>{l.push(...this._validateSchema(r.items,d,`${a}.${h}`))});return l},maxItems(r,o,a){return o.length>r.maxItems?[{path:a,property:"maxItems",message:this.translate("error_maxItems",[r.maxItems],r)}]:[]},minItems(r,o,a){return o.length<r.minItems?[{path:a,property:"minItems",message:this.translate("error_minItems",[r.minItems],r)}]:[]},uniqueItems(r,o,a){const l={};for(let d=0;d<o.length;d++){const h=JSON.stringify(o[d]);if(l[h])return[{path:a,property:"uniqueItems",message:this.translate("error_uniqueItems",null,r)}];l[h]=!0}return[]}},this._validateObjectSubSchema={maxProperties(r,o,a){return Object.keys(o).length>r.maxProperties?[{path:a,property:"maxProperties",message:this.translate("error_maxProperties",[r.maxProperties],r)}]:[]},minProperties(r,o,a){return Object.keys(o).length<r.minProperties?[{path:a,property:"minProperties",message:this.translate("error_minProperties",[r.minProperties],r)}]:[]},required(r,o,a){const l=[];return Array.isArray(r.required)&&r.required.forEach(d=>{if(typeof o[d]<"u")return;const h=this.jsoneditor.getEditor(`${a}.${d}`);h&&h.dependenciesFulfilled===!1||h&&["button","info"].includes(h.schema.format||h.schema.type)||l.push({path:a,property:"required",message:this.translate("error_required",[r&&r.properties&&r.properties[d]&&r.properties[d].title?r.properties[d].title:d],r)})}),l},properties(r,o,a,l){const d=[];return Object.entries(r.properties).forEach(([h,u])=>{l[h]=!0,d.push(...this._validateSchema(u,o[h],`${a}.${h}`))}),d},patternProperties(r,o,a,l){const d=[];return Object.entries(r.patternProperties).forEach(([h,u])=>{const g=new RegExp(h);Object.entries(o).forEach(([m,y])=>{g.test(m)&&(l[m]=!0,d.push(...this._validateSchema(u,y,`${a}.${m}`)))})}),d}},this._validateObjectSubSchema2={propertyNames(r,o,a,l){const d=[],h=Object.keys(o);let u=null;for(let g=0;g<h.length;g++){let m="",y=!1;if(u=h[g],typeof r.propertyNames=="boolean"){if(r.propertyNames===!0)continue;d.push({path:a,property:"propertyNames",message:this.translate("error_property_names_false",[u],r)});break}if(y=Object.entries(r.propertyNames).every(([w,A])=>{let et=!1,W=null;switch(w){case"maxLength":if(typeof A!="number"){m="error_property_names_maxlength";break}if(u.length>A){m="error_property_names_exceeds_maxlength";break}return!0;case"const":if(A!==u){m="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(A)){m="error_property_names_enum";break}if(A.forEach(_t=>{_t===u&&(et=!0)}),!et){m="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof A!="string"){m="error_property_names_pattern";break}if(W=new RegExp(A),!W.test(u)){m="error_property_names_pattern_mismatch";break}return!0;default:return d.push({path:a,property:"propertyNames",message:this.translate("error_property_names_unsupported",[w],r)}),!1}return d.push({path:a,property:"propertyNames",message:this.translate(m,[u],r)}),!1}),!y)break}return d},additionalProperties(r,o,a,l){const d=[],h=Object.keys(o);for(let u=0;u<h.length;u++){const g=h[u];if(!l[g])if(r.additionalProperties){if(r.additionalProperties===!0)break;d.push(...this._validateSchema(r.additionalProperties,o[g],`${a}.${g}`))}else{d.push({path:a,property:"additionalProperties",message:this.translate("error_additional_properties",[g],r)});break}}return d},dependencies(r,o,a){const l=[];return Object.entries(r.dependencies).forEach(([d,h])=>{typeof o[d]>"u"||(Array.isArray(h)?h.forEach(u=>{typeof o[u]>"u"&&l.push({path:a,property:"dependencies",message:this.translate("error_dependency",[u],r)})}):l.push(...this._validateSchema(h,o,a)))}),l}}}fitTest(t,e,i=1e7){const s={match:0,extra:0};if(typeof t=="object"&&t!==null){const r=this._getSchema(e);if(r.anyOf){let o={...s};for(const a of r.anyOf){const l=this.fitTest(t,a,i);(l.match>o.match||l.match===o.match&&l.extra<o.extra)&&(o=l)}return o}else{const o=this._getSchema(e).properties;for(const a in o){if(!Wt(o,a)){s.extra+=i;continue}if(typeof t[a]=="object"&&typeof o[a]=="object"&&typeof o[a].properties=="object"){const l=this.fitTest(t[a],o[a],i/100);s.match+=l.match,s.extra+=l.extra}typeof t[a]<"u"&&(s.match+=i)}}}return s}_getSchema(t){return typeof t>"u"?$({},this.jsoneditor.expandRefs(this.schema)):t}validate(t){return this._validateSchema(this.schema,t)}_validateSchema(t,e,i){const s=[];return i=i||this.jsoneditor.root.formname,t=$({},this.jsoneditor.expandRefs(t)),typeof e>"u"?this._validateV3Required(t,e,i):(Object.keys(t).forEach(r=>{this._validateSubSchema[r]&&s.push(...this._validateSubSchema[r].call(this,t,e,i))}),s.push(...this._validateByValueType(t,e,i)),t.links&&t.links.forEach((r,o)=>{r.rel&&r.rel.toLowerCase()==="describedby"&&(t=this._expandSchemaLink(t,o),s.push(...this._validateSchema(t,e,i,this.translate)))}),["date","time","datetime-local"].includes(t.format)&&s.push(...this._validateDateTimeSubSchema(t,e,i)),["uuid"].includes(t.format)&&s.push(...this._validateUUIDSchema(t,e,i)),s.push(...this._validateCustomValidator(t,e,i)),this._removeDuplicateErrors(s))}_expandSchemaLink(t,e){const i=t.links[e].href,s=this.jsoneditor.root.getValue(),r=this.jsoneditor.compileTemplate(i,this.jsoneditor.template),o=document.location.origin+document.location.pathname+r(s);return t.links=t.links.slice(0,e).concat(t.links.slice(e+1)),$({},t,this.jsoneditor.refs[o])}_validateV3Required(t,e,i){return(typeof t.required<"u"&&t.required===!0||typeof t.required>"u"&&this.jsoneditor.options.required_by_default===!0)&&t.type!=="info"?[{path:i,property:"required",message:this.translate("error_notset",null,t)}]:[]}_validateByValueType(t,e,i){const s=[];if(e===null)return s;if(typeof e=="number")Object.keys(t).forEach(r=>{this._validateNumberSubSchema[r]&&s.push(...this._validateNumberSubSchema[r].call(this,t,e,i))});else if(typeof e=="string")Object.keys(t).forEach(r=>{this._validateStringSubSchema[r]&&s.push(...this._validateStringSubSchema[r].call(this,t,e,i))});else if(Array.isArray(e))Object.keys(t).forEach(r=>{this._validateArraySubSchema[r]&&s.push(...this._validateArraySubSchema[r].call(this,t,e,i))});else if(typeof e=="object"){const r={};Object.keys(t).forEach(o=>{this._validateObjectSubSchema[o]&&s.push(...this._validateObjectSubSchema[o].call(this,t,e,i,r))}),typeof t.additionalProperties>"u"&&this.jsoneditor.options.no_additional_properties&&!t.oneOf&&!t.anyOf&&!t.allOf&&(t.additionalProperties=!1),Object.keys(t).forEach(o=>{typeof this._validateObjectSubSchema2[o]<"u"&&s.push(...this._validateObjectSubSchema2[o].call(this,t,e,i,r))})}return s}_validateUUIDSchema(t,e,i){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(e)?[]:[{path:i,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}$"],t)}]}_validateNumberSubSchemaMultipleDivisible(t,e,i){const s=t.multipleOf||t.divisibleBy;let r=e/s===Math.floor(e/s);return window.math?r=window.math.mod(window.math.bignumber(e),window.math.bignumber(s)).equals(0):window.Decimal&&(r=new window.Decimal(e).mod(new window.Decimal(s)).equals(0)),r?[]:[{path:i,property:t.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[s],t)}]}_validateDateTimeSubSchema(t,e,i){const s=(h,u,g)=>u*1<1?[{path:g,property:"format",message:this.translate("error_invalid_epoch",null,h)}]:u!==Math.abs(parseInt(u))?[{path:g,property:"format",message:this.translate(`error_${h.format.replace(/-/g,"_")}`,[d],h)}]:[],r=(h,u,g,m)=>{if(u!==""){let y;if(m.flatpickr.config.mode!=="single"){const w=m.flatpickr.config.mode==="range"?m.flatpickr.l10n.rangeSeparator:", ";y=m.flatpickr.selectedDates.map(et=>m.flatpickr.formatDate(et,m.flatpickr.config.dateFormat)).join(w)}try{if(y){if(y!==u)throw new Error(`${m.flatpickr.config.mode} mismatch`)}else if(m.flatpickr.formatDate(m.flatpickr.parseDate(u,m.flatpickr.config.dateFormat),m.flatpickr.config.dateFormat)!==u)throw new Error("mismatch")}catch{const A=m.flatpickr.config.errorDateFormat!==void 0?m.flatpickr.config.errorDateFormat:m.flatpickr.config.dateFormat;return[{path:g,property:"format",message:this.translate(`error_${m.format.replace(/-/g,"_")}`,[A],h)}]}}return[]},o={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})?)$/},a={date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'},l=this.jsoneditor.getEditor(i),d=l&&l.flatpickr?l.flatpickr.config.dateFormat:a[t.format];if(t.type==="integer")return s(t,e,i);if(!l||!l.flatpickr){if(!o[t.format].test(e))return[{path:i,property:"format",message:this.translate(`error_${t.format.replace(/-/g,"_")}`,[d],t)}]}else if(l)return r(t,e,i,l);return[]}_validateCustomValidator(t,e,i){const s=[];s.push(...kh.call(this,t,e,i,this.translate));const r=o=>{s.push(...o.call(this,t,e,i))};return this.defaults.custom_validators.forEach(r),this.options.custom_validators&&this.options.custom_validators.forEach(r),s}_removeDuplicateErrors(t){return t.reduce((e,i)=>{let s=!0;return e||(e=[]),e.forEach(r=>{r.message===i.message&&r.path===i.path&&r.property===i.property&&(r.errorcount++,s=!1)}),s&&(i.errorcount=1,e.push(i)),e},[])}_checkType(t,e){const i={string:s=>typeof s=="string",number:s=>typeof s=="number",integer:s=>typeof s=="number"&&s===Math.floor(s),boolean:s=>typeof s=="boolean",array:s=>Array.isArray(s),object:s=>s!==null&&!Array.isArray(s)&&typeof s=="object",null:s=>s===null};return typeof t=="string"?i[t]?i[t](e):!0:!this._validateSchema(t,e).length}}class Sh extends Bt{register(){if(this.editors){for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}super.register()}unregister(){if(super.unregister(),this.editors)for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}getNumColumns(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}enable(){if(!this.always_disabled){if(this.editors)for(let t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,super.enable()}}disable(t){if(t&&(this.always_disabled=!0),this.editors)for(let e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,super.disable()}switchEditor(t){this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);let e=this.getValue();this.type=t,this.register(),this.editors.forEach((i,s)=>{i&&(this.type===s?(this.keep_only_existing_values&&(e=ah(i.getValue(),e)),(this.keep_values||this.if)&&i.setValue(e,!0),i.container.style.display=""):i.container.style.display="none")}),this.refreshValue(),this.refreshHeaderText()}buildChildEditor(t){var o;const e=this.types[t],i=this.theme.getChildEditorHolder();this.editor_holder.appendChild(i);let s;typeof e=="string"?(s=$({},this.schema),s.type=e):(s=$({},this.schema,e),s=this.jsoneditor.expandRefs(s),e&&e.required&&Array.isArray(e.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(s.required=this.schema.required.concat(e.required))),(o=s==null?void 0:s.options)!=null&&o.dependencies&&delete s.options.dependencies;const r=this.jsoneditor.getEditorClass(s);this.editors[t]=this.jsoneditor.createEditor(r,{jsoneditor:this.jsoneditor,schema:s,container:i,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&this.theme.visuallyHidden(this.editors[t].header),this.editors[t].option=this.switcher_options[t],i.addEventListener("change_header_text",()=>{this.refreshHeaderText()}),t!==this.type&&(i.style.display="none")}preBuild(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,typeof this.jsoneditor.options.keep_oneof_values<"u"&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),typeof this.options.keep_oneof_values<"u"&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,typeof this.jsoneditor.options.keep_only_existing_values<"u"&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),typeof this.options.keep_only_existing_values<"u"&&(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&&Ki(this.thenSchema,this.schema,this.schema.then),this.schema.else&&Ki(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach(t=>{delete t.if,delete t.then,delete t.else}),delete this.schema.if;else{if(!this.schema.type||this.schema.type==="any"){if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){let{disallow:t}=this.schema;(typeof t!="object"||!Array.isArray(t))&&(t=[t]);const e=[];this.types.forEach(i=>{t.includes(i)||e.push(i)}),this.types=e}}else Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];delete this.schema.type}this.display_text=this.getDisplayText(this.types)}build(){const{container:t}=this;this.header=this.label=this.theme.getLabelLike(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.switcher.setAttribute("id",this.formname+"switcher"),this.switcherLabel=this.theme.getHiddenLabel(this.formname+" switcher"),this.switcherLabel.setAttribute("for",this.formname+"switcher"),this.if||(this.container.appendChild(this.header),t.appendChild(this.switcherLabel),t.appendChild(this.switcher)),this.switcher.addEventListener("change",i=>{i.preventDefault(),i.stopPropagation(),this.switchEditor(this.display_text.indexOf(i.currentTarget.value)),this.onChange(!0)}),this.editor_holder=document.createElement("div"),t.appendChild(this.editor_holder);const e={};this.jsoneditor.options.custom_validators&&(e.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((i,s)=>{this.editors[s]=!1;let r;typeof i=="string"?(r=$({},this.schema),r.type=i):(r=$({},this.schema,i),i.required&&Array.isArray(i.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(r.required=this.schema.required.concat(i.required))),this.validators[s]=new yo(this.jsoneditor,r,e,this.defaults)}),this.jsoneditor.on("change",()=>{this.switchIf()}),this.switchEditor(0)}onChildEditorChange(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),super.onChildEditorChange()}refreshHeaderText(){const t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach((e,i)=>{e.textContent=t[i]})}refreshValue(){this.editors[this.type]&&(this.value=this.editors[this.type].getValue())}switchIf(){if(this.ifSchema&&this.value){const 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]}}getIfType(t){return this.jsoneditor.validator._validateSchema(this.ifSchema,t).length===0?0:1}setValue(t,e){const i=this.type;let s={match:0,extra:0,i:this.type};const r={match:0,i:null};this.validators.forEach((l,d)=>{let h=null;typeof this.anyOf<"u"&&this.anyOf&&(h=l.fitTest(t),(s.match<h.match||s.match===h.match&&s.extra>h.extra)&&(s=h,s.i=d)),!l.validate(t).length&&r.i===null?(r.i=d,h!==null&&(r.match=h.match)):s=r});let o=r.i;typeof this.anyOf<"u"&&this.anyOf&&r.match<s.match&&(o=s.i),this.if&&(o=this.getIfType(t)),o===null&&(o=this.type),this.type=o,this.switcher.value=this.display_text[o];const a=this.type!==i;a&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),typeof t<"u"&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(a)}destroy(){this.editors.forEach(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),super.destroy()}showValidationErrors(t){if(this.oneOf||this.anyOf){const e=this.oneOf?"oneOf":"anyOf";this.editors.forEach((i,s)=>{if(!i)return;const r=`${this.path}.${e}[${s}]`,o=(a,l)=>{if(l.path.startsWith(r)||l.path===r.substr(0,l.path.length)){const d=$({},l);l.path.startsWith(r)&&(d.path=this.path+d.path.substr(r.length)),a.push(d)}return a};i.showValidationErrors(t.reduce(o,[]))})}else this.editors.forEach(e=>{e&&e.showValidationErrors(t)})}addLinks(){}}class Th extends Bt{getValue(){if(this.dependenciesFulfilled)return null}setValue(){this.onChange()}getNumColumns(){return 2}}const jh={".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"};class _o extends Bt{constructor(t,e,i){super(t,e),this.currentDepth=i}getDefault(){return $({},this.schema.default||{})}getChildEditors(){return this.editors}register(){super.register(),this.editors&&Object.values(this.editors).forEach(t=>t.register())}unregister(){super.unregister(),this.editors&&Object.values(this.editors).forEach(t=>t.unregister())}getNumColumns(){return Math.max(Math.min(12,this.maxwidth),3)}enable(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),super.enable(),this.editors&&Object.values(this.editors).forEach(t=>{(t.isActive()||t.isUiOnly)&&t.enable(),t.optInCheckbox.disabled=!1}))}disable(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),super.disable(),this.editors&&Object.values(this.editors).forEach(e=>{(e.isActive()||e.isUiOnly)&&e.disable(t),e.optInCheckbox.disabled=!0})}layoutEditors(){let t,e;if(!this.row_container)return;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((d,h)=>{let u=this.editors[d].schema.propertyOrder,g=this.editors[h].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof g!="number"&&(g=1e3),u-g});let i;const s=this.format==="categories",r=[];let o=null,a=null,l;if(this.format==="grid-strict"){let d=0;if(l=[],this.property_order.forEach(h=>{const u=this.editors[h];if(u.property_removed)return;const g=u.options.hidden?0:u.options.grid_columns||u.getNumColumns(),m=u.options.hidden?0:u.options.grid_offset||0,y=u.options.hidden?!1:u.options.grid_break||!1,w=u.options.hidden?0:u.container.offsetHeight,A={key:h,width:g,offset:m,height:w};l.push(A),r[d]=l,y&&(d++,l=[])}),this.layout===JSON.stringify(r))return!1;for(this.layout=JSON.stringify(r),i=document.createElement("div"),t=0;t<r.length;t++)for(l=this.theme.getGridRow(),i.appendChild(l),e=0;e<r[t].length;e++)o=r[t][e].key,a=this.editors[o],a.options.hidden?a.container.style.display="none":this.theme.setGridColumnSize(a.container,r[t][e].width,r[t][e].offset),l.appendChild(a.container)}else if(this.format==="grid"){for(this.property_order.forEach(d=>{const h=this.editors[d];if(h.property_removed)return;let u=!1;const g=h.options.hidden?0:h.options.grid_columns||h.getNumColumns(),m=h.options.hidden?0:h.container.offsetHeight;for(let y=0;y<r.length;y++)r[y].width+g<=12&&(!m||r[y].minh*.5<m&&r[y].maxh*2>m)&&(u=y);u===!1&&(r.push({width:0,minh:999999,maxh:0,editors:[]}),u=r.length-1),r[u].editors.push({key:d,width:g,height:m}),r[u].width+=g,r[u].minh=Math.min(r[u].minh,m),r[u].maxh=Math.max(r[u].maxh,m)}),t=0;t<r.length;t++)if(r[t].width<12){let d=!1,h=0;for(e=0;e<r[t].editors.length;e++)(d===!1||r[t].editors[e].width>r[t].editors[d].width)&&(d=e),r[t].editors[e].width*=12/r[t].width,r[t].editors[e].width=Math.floor(r[t].editors[e].width),h+=r[t].editors[e].width;h<12&&(r[t].editors[d].width+=12-h),r[t].width=12}if(this.layout===JSON.stringify(r))return!1;for(this.layout=JSON.stringify(r),i=document.createElement("div"),t=0;t<r.length;t++)for(l=this.theme.getGridRow(),i.appendChild(l),e=0;e<r[t].editors.length;e++)o=r[t].editors[e].key,a=this.editors[o],a.options.hidden?a.container.style.display="none":this.theme.setGridColumnSize(a.container,r[t].editors[e].width),l.appendChild(a.container)}else{if(i=document.createElement("div"),s){const d=document.createElement("div"),h=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),u=this.theme.getTopTabContentHolder(h);for(this.property_order.forEach(y=>{const w=this.editors[y];if(w.property_removed)return;const A=this.theme.getTabContent(),et=w.schema&&(w.schema.type==="object"||w.schema.type==="array");A.isObjOrArray=et;const W=this.theme.getGridRow();w.tab||(typeof this.basicPane>"u"?this.addRow(w,h,A):this.addRow(w,h,this.basicPane)),A.id=this.getValidId(w.tab_text.textContent),et?(A.appendChild(W),u.appendChild(A),this.theme.addTopTab(h,w.tab)):(d.appendChild(W),u.childElementCount>0?u.firstChild.isObjOrArray&&(A.appendChild(d),u.insertBefore(A,u.firstChild),this.theme.insertBasicTopTab(w.tab,h),w.basicPane=A):(A.appendChild(d),u.appendChild(A),this.theme.addTopTab(h,w.tab),w.basicPane=A)),w.options.hidden?w.container.style.display="none":this.theme.setGridColumnSize(w.container,12),W.appendChild(w.container),w.rowPane=A});this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);const g=this.tabs_holder.parentNode;g.removeChild(g.firstChild),g.appendChild(h),this.tabPanesContainer=u,this.tabs_holder=h;const m=this.theme.getFirstTab(this.tabs_holder);m&&re(m,"click");return}this.property_order.forEach(d=>{const h=this.editors[d];h.property_removed||(l=this.theme.getGridRow(),i.appendChild(l),h.options.hidden?h.container.style.display="none":this.theme.setGridColumnSize(h.container,12),l.appendChild(h.container))})}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(i)}getPropertySchema(t){let e=this.schema.properties[t]||{};e=$({},e);let i=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(s=>{new RegExp(s).test(t)&&(e.allOf=e.allOf||[],e.allOf.push(this.schema.patternProperties[s]),i=!0)}),!i&&this.schema.additionalProperties&&typeof this.schema.additionalProperties=="object"&&(e=$({},this.schema.additionalProperties)),e}preBuild(){if(super.preBuild(),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(([t,e])=>{const i=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:e,path:`${this.path}.${t}`,parent:this,compact:!0,required:!0},this.currentDepth+1),this.editors[t].preBuild();const s=this.editors[t].options.hidden?0:this.editors[t].options.grid_columns||this.editors[t].getNumColumns();this.minwidth+=s,this.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(t=>this.isRequiredObject({key:t,schema:this.schema.properties[t]})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach(t=>{this.addObjectProperty(t,!0),this.editors[t]&&(this.minwidth=Math.max(this.minwidth,this.editors[t].options.grid_columns||this.editors[t].getNumColumns()),this.maxwidth+=this.editors[t].options.grid_columns||this.editors[t].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((t,e)=>{let i=this.editors[t].schema.propertyOrder,s=this.editors[e].schema.propertyOrder;return typeof i!="number"&&(i=1e3),typeof s!="number"&&(s=1e3),i-s})}addTab(t){const e=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"),e?this.rows[t].tab_text.textContent=this.rows[t].getHeaderText():this.rows[t].tab_text.textContent=typeof this.schema.basicCategoryTitle>"u"?"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",i=>{this.active_tab=this.rows[t].tab,this.refreshTabs(),i.preventDefault(),i.stopPropagation()}))}addRow(t,e,i){const s=this.rows.length,r=t.schema.type==="object"||t.schema.type==="array";this.rows[s]=t,this.rows[s].rowPane=i,r?(this.addTab(s),this.theme.addTopTab(e,this.rows[s].tab)):typeof this.basicTab>"u"?(this.addTab(s),this.basicTab=s,this.basicPane=i,this.theme.addTopTab(e,this.rows[s].tab)):(this.rows[s].tab=this.rows[this.basicTab].tab,this.rows[s].tab_text=this.rows[this.basicTab].tab_text,this.rows[s].rowPane=this.rows[this.basicTab].rowPane)}refreshTabs(t){const e=typeof this.basicTab<"u";let i=!1;this.rows.forEach(s=>{!s.tab||!s.rowPane||!s.rowPane.parentNode||e&&s.tab===this.rows[this.basicTab].tab&&i||(t?s.tab_text.textContent=s.getHeaderText():(e&&s.tab===this.rows[this.basicTab].tab&&(i=!0),s.tab===this.active_tab?this.theme.markTabActive(s):this.theme.markTabInactive(s)))})}build(){const t=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach(([e,i])=>{const s=this.theme.getTableCell();this.editor_holder.appendChild(s),i.setContainer(s),i.build(),i.postBuild(),i.setOptInCheckbox(i.header),i.setValue(i.getDefault(),!0),this.editors[e].options.hidden&&(s.style.display="none"),this.editors[e].options.input_width&&(s.style.width=this.editors[e].options.input_width)});else{if(this.options.table)throw new Error("Not supported yet");{this.header="",this.options.compact||(this.header=document.createElement("span"),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_label=this.theme.getHiddenLabel(this.translate("button_edit_json")),this.editjson_textarea_label.setAttribute("for",this.path+"-edit-json-textarea"),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.setAttribute("id",this.path+"-edit-json-textarea"),this.editjson_textarea.setAttribute("aria-labelledby",this.path+"-edit-json-textarea"),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",i=>{i.preventDefault(),i.stopPropagation(),this.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",i=>{i.preventDefault(),i.stopPropagation(),this.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",i=>{i.preventDefault(),i.stopPropagation(),this.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea_label),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_label=this.theme.getHiddenLabel(this.translate("button_properties")),this.addproperty_input_label.setAttribute("for",this.path+"-property-selector"),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_input.setAttribute("id",this.path+"-property-selector"),this.addproperty_input.setAttribute("aria-labelledby",this.path+"-property-selector"),this.addproperty_add.addEventListener("click",i=>{if(i.preventDefault(),i.stopPropagation(),this.addproperty_input.value){if(this.editors[this.addproperty_input.value]){window.alert("there is already a property with that name");return}this.addObjectProperty(this.addproperty_input.value),this.editors[this.addproperty_input.value]&&this.editors[this.addproperty_input.value].disable(),this.onChange(!0)}}),this.addproperty_input.addEventListener("input",i=>{i.target.previousSibling.previousSibling.childNodes.forEach(s=>{let r=s.innerText,o=i.target.value;this.options.case_sensitive_property_search||this.jsoneditor.options.case_sensitive_property_search||(r=r.toLowerCase(),o=o.toLowerCase()),r.includes(o)?s.style.display="":s.style.display="none"})}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input_label),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);const e=document.createElement("div");e.style.clear="both",this.addproperty_holder.appendChild(e),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(),t?(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(i=>{const s=this.theme.getTabContent(),r=this.theme.getGridColumn(),o=!!(i.schema&&(i.schema.type==="object"||i.schema.type==="array"));if(s.isObjOrArray=o,t){if(o){const a=this.theme.getGridContainer();a.appendChild(r),s.appendChild(a),this.tabPanesContainer.appendChild(s),this.row_container=a}else typeof this.row_container_basic>"u"&&(this.row_container_basic=this.theme.getGridContainer(),s.appendChild(this.row_container_basic),this.tabPanesContainer.childElementCount===0?this.tabPanesContainer.appendChild(s):this.tabPanesContainer.insertBefore(s,this.tabPanesContainer.childNodes[1])),this.row_container_basic.appendChild(r);this.addRow(i,this.tabs_holder,s),s.id=this.getValidId(i.schema.title)}else this.row_container.appendChild(r);i.setContainer(r),i.build(),i.postBuild(),i.setOptInCheckbox(i.header)}),this.rows[0]&&re(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",i=>{i.preventDefault(),i.stopPropagation(),this.collapsed?(this.editor_holder.style.display="",this.collapsed=!1,this.setButtonText(this.collapse_control,"","collapse","button_collapse")):(this.editor_holder.style.display="none",this.collapsed=!0,this.setButtonText(this.collapse_control,"","expand","button_expand"))}),this.options.collapsed&&re(this.collapse_control,"click"),this.schema.options&&typeof this.schema.options.disable_collapse<"u"?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",i=>{i.preventDefault(),i.stopPropagation(),this.toggleEditJSON()}),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&typeof this.schema.options.disable_edit_json<"u"?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",i=>{i.preventDefault(),i.stopPropagation(),this.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(e=>{this.editor_holder.appendChild(this.editors[e].container)})):(this.layoutEditors(),this.layoutEditors()),(this.schema.readOnly||this.schema.readonly)&&this.disable()}deactivateNonRequiredProperties(){const t=this.jsoneditor.options.show_opt_in,e=typeof this.options.show_opt_in<"u",i=e&&this.options.show_opt_in===!0,s=e&&this.options.show_opt_in===!1;(i||!s&&t||!e&&t)&&Object.entries(this.editors).forEach(([r,o])=>{this.isRequiredObject(o)||this.editors[r].deactivate()})}showEditJSON(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left=`${this.editjson_control.offsetLeft}px`,this.editjson_holder.style.top=`${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)}hideEditJSON(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}copyJSON(){this.editjson_holder&&navigator.clipboard.writeText(this.editjson_textarea.value).catch(t=>window.alert(t))}saveJSON(){if(this.editjson_holder)try{const t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(t){throw window.alert("invalid JSON"),t}}toggleEditJSON(){this.editing_json?this.hideEditJSON():this.showEditJSON()}insertPropertyControlUsingPropertyOrder(t,e,i){let s;this.schema.properties[t]&&(s=this.schema.properties[t].propertyOrder),typeof s!="number"&&(s=1e3),e.propertyOrder=s;for(let r=0;r<i.childNodes.length;r++){const o=i.childNodes[r];if(e.propertyOrder<o.propertyOrder){this.addproperty_list.insertBefore(e,o),e=null;break}}e&&this.addproperty_list.appendChild(e)}addPropertyCheckbox(t){let e;const i=this.theme.getCheckbox();this.schema.properties[t]&&this.schema.properties[t].title?e=this.schema.properties[t].title:e=t;const s=this.theme.getCheckboxLabel(e),r=this.theme.getFormControl(s,i,null,null,this.path+"-"+t);return r.style.paddingBottom=r.style.marginBottom=r.style.paddingTop=r.style.marginTop=0,r.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,r,this.addproperty_list),i.checked=t in this.editors,i.addEventListener("change",()=>{i.checked?this.addObjectProperty(t):this.removeObjectProperty(t),this.onChange(!0)}),this.addproperty_checkboxes[t]=i,i}showAddProperty(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left=`${this.addproperty_button.offsetLeft}px`,this.addproperty_holder.style.top=`${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())}hideAddProperty(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}toggleAddProperty(){this.adding_property?this.hideAddProperty():this.showAddProperty()}removeObjectProperty(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())}getSchemaOnMaxDepth(t){return Object.keys(t).reduce((e,i)=>{switch(i){case"$ref":return e;case"properties":case"items":return{...e,[i]:{}};case"additionalProperties":case"propertyNames":return{...e,[i]:!0};default:return{...e,[i]:t[i]}}},{})}addObjectProperty(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(o=>new RegExp(o).test(t))))return;const i=this.getPropertySchema(t);typeof i.propertyOrder!="number"&&(i.propertyOrder=Object.keys(this.editors).length+1e3);const s=this.jsoneditor.getEditorClass(i),{max_depth:r}=this.jsoneditor.options;if(this.editors[t]=this.jsoneditor.createEditor(s,{jsoneditor:this.jsoneditor,schema:r&&this.currentDepth>=r?this.getSchemaOnMaxDepth(i):i,path:`${this.path}.${t}`,parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){const o=this.theme.getChildEditorHolder();this.editor_holder.appendChild(o),this.editors[t].setContainer(o),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(s.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}onOutsideModalClick(t){const 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())}onChildEditorChange(t){this.refreshValue(),super.onChildEditorChange(t)}canHaveAdditionalProperties(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:typeof this.schema.additionalProperties=="object"&&this.schema.additionalProperties!==null?!0: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:!0}destroy(){Object.values(this.cached_editors).forEach(t=>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),super.destroy()}getValue(){if(!this.dependenciesFulfilled)return;const t=super.getValue(),e=i=>typeof i>"u"||i===""||i===Object(i)&&Object.keys(i).length===0&&i.constructor===Object;return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach(i=>{e(t[i])&&delete t[i]}),t}refreshValue(){this.value={},this.editors&&(Object.keys(this.editors).forEach(t=>{this.editors[t].isActive()&&(this.editors[t].refreshValue(),this.value[t]=this.editors[t].getValue())}),Object.keys(this.editors).forEach(t=>{this.editors[t].isActive()&&this.activateDependentRequired(this.editors[t].key)}),this.adding_property&&this.refreshAddProperties())}activateDependentRequired(t){this.getDependentRequired(t).forEach(i=>{let s;Object.entries(this.cached_editors).forEach(([r,o])=>{o.key===i&&(s=o)}),s&&!s.isActive()&&s.activate()})}getDependentRequired(t){return this.schema.dependentRequired&&Wt(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}refreshAddProperties(){if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties){this.addproperty_button.style.display="none";return}let t=!1,e=0,i=!1;Object.keys(this.editors).forEach(s=>e++),t=this.canHaveAdditionalProperties()&&!(typeof this.schema.maxProperties<"u"&&e>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach(s=>{this.addPropertyCheckbox(s),this.isRequiredObject(this.cached_editors[s])&&s in this.editors&&(this.addproperty_checkboxes[s].disabled=!0),typeof this.schema.minProperties<"u"&&e<=this.schema.minProperties?(this.addproperty_checkboxes[s].disabled=this.addproperty_checkboxes[s].checked,this.addproperty_checkboxes[s].checked||(i=!0)):s in this.editors?i=!0:!t&&!Wt(this.schema.properties,s)?this.addproperty_checkboxes[s].disabled=!0:(this.addproperty_checkboxes[s].disabled=!1,i=!0)}),this.canHaveAdditionalProperties()&&(i=!0),Object.keys(this.schema.properties).forEach(s=>{this.cached_editors[s]||(i=!0,this.addPropertyCheckbox(s))}),i?this.canHaveAdditionalProperties()?t?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}isRequiredObject(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}setValue(t,e){t=t||{},(typeof t!="object"||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach(([i,s])=>{typeof t[i]<"u"?(this.addObjectProperty(i),s.setValue(t[i],e),s.activate()):!e&&!this.isRequiredObject(s)?this.jsoneditor.options.show_opt_in||this.options.show_opt_in?s.deactivate():this.removeObjectProperty(i):s.setValue(s.getDefault(),e)}),Object.entries(t).forEach(([i,s])=>{this.cached_editors[i]||(this.addObjectProperty(i),this.editors[i]&&this.editors[i].setValue(s,e,!!this.editors[i].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}showValidationErrors(t){const e=[],i=[];t.forEach(s=>{s.path===this.path?e.push(s):i.push(s)}),this.error_holder&&(e.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",e.forEach(s=>{s.errorcount&&s.errorcount>1&&(s.message+=` (${s.errorcount} errors)`),this.error_holder.appendChild(this.theme.getErrorMessage(s.message))})):this.error_holder.style.display="none"),this.options.table_row&&(e.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach(s=>{s.showValidationErrors(i)})}}_o.rules=jh;class $h extends Li{preBuild(){super.preBuild()}build(){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=[];const t=i=>{this.setValue(i.currentTarget.value),this.onChange(!0),this.radioGroup.forEach(s=>{s.checked=s.value===this.getValue()})};for(let i=0;i<this.enum_values.length;i++){const s={id:`${this.formname}[${i}]`,value:this.enum_values[i]};this.jsoneditor.options.use_name_attributes&&(s.name=this.formname),this.input=this.theme.getFormRadio(s),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",t,!1),this.radioGroup.push(this.input);const r=this.theme.getFormRadioLabel(this.enum_display[i]);r.htmlFor=this.input.id;const o=this.theme.getFormRadioControl(r,this.input,!!(this.options.layout==="horizontal"||this.options.compact));this.radioContainer.appendChild(o)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(let i=0;i<this.radioGroup.length;i++)this.radioGroup[i].disabled=!0;this.radioContainer.classList.add("readonly")}const e=this.theme.getContainer();e.appendChild(this.radioContainer),e.dataset.containerFor="radio",this.input=e,this.control=this.theme.getFormControl(this.label,e,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame(()=>{this.input.parentNode&&this.afterInputReady()})}enable(){if(!this.always_disabled){for(let t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),super.enable()}}disable(t){t&&(this.always_disabled=!0);for(let e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),super.disable()}destroy(){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),super.destroy()}getNumColumns(){return 2}setValue(t){typeof t!="string"&&(t=String(t));for(let e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0,this.value=t,this.onChange();break}}}class Ph extends Yt{setValue(t,e,i){const s=super.setValue(t,e,i);s!==void 0&&s.changed&&this.sceditor_instance&&this.sceditor_instance.val(s.value)}build(){this.options.format="textarea",super.build(),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}afterInputReady(){if(window.sceditor){const t=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})),e=window.sceditor.instance(this.input);e===void 0&&window.sceditor.create(this.input,t),this.sceditor_instance=e||window.sceditor.instance(this.input),this.sceditor_instance.blur(()=>{this.value=this.sceditor_instance.val(),this.sceditor_instance.updateOriginal(),this.is_dirty=!0,this.onChange(!0)}),this.theme.afterInputReady(this.input)}else super.afterInputReady()}getNumColumns(){return 6}enable(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),super.enable()}disable(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),super.disable(t)}destroy(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),super.destroy()}}class Oh extends Li{setValue(t,e){if(this.select2_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);const i=this.updateValue(t);this.input.value=i,this.select2v4?this.select2_instance.val(i).trigger("change"):this.select2_instance.select2("val",i),this.onChange(!0)}else super.setValue(t,e)}afterInputReady(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){const t=this.expandCallbacks("select2",$({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=t.tags=!!t.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=Wt(this.select2_instance.select2,"amd"),this.selectChangeHandler=()=>{const e=this.select2v4?this.select2_instance.val():this.select2_instance.select2("val");this.updateValue(e),this.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}super.afterInputReady()}updateValue(t){let 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}addNewOption(t){const e=this.typecast(t);let i=!1,s;return!this.enum_values.includes(e)&&e!==""&&(this.enum_options.push(`${e}`),this.enum_display.push(`${e}`),this.enum_values.push(e),this.schema.enum.push(e),s=this.input.querySelector(`option[value="${e}"]`),s?s.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(e,e,!1,!1)).trigger("change"),i=!0),i}enable(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),super.enable()}disable(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),super.disable(t)}destroy(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),super.destroy()}}class Ih extends Li{setValue(t,e){if(this.selectize_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);const i=this.updateValue(t);this.input.value=i,this.selectize_instance.clear(!0),this.selectize_instance.setValue(i),this.onChange(!0)}else super.setValue(t,e)}afterInputReady(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){const t=this.expandCallbacks("selectize",$({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=t.create=!!t.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=e=>{this.updateValue(e),this.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}super.afterInputReady()}updateValue(t){let 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}addNewOption(t){const e=this.typecast(t);let i=!1;return!this.enum_values.includes(e)&&e!==""&&(this.enum_options.push(`${e}`),this.enum_display.push(`${e}`),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),i=!0),i}onWatchedFieldChange(){super.onWatchedFieldChange(),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((t,e)=>{this.selectize_instance.addOption({value:t,text:this.enum_display[e]})}),this.selectize_instance.addItem(`${this.value}`,!0))}enable(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),super.enable()}disable(t){this.selectize_instance&&this.selectize_instance.lock(),super.disable(t)}destroy(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),super.destroy()}}class Bh extends Yt{build(){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)));const t=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);const e=document.createElement("div");e.classList.add("signature-container");const i=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&i.setAttribute("name",t),i.classList.add("signature"),e.appendChild(i),this.signaturePad=new window.SignaturePad(i),this.signaturePad.onEnd=()=>{this.signaturePad.isEmpty()?this.input.value="":this.input.value=this.signaturePad.toDataURL(),this.is_dirty=!0,this.refreshValue(),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange()};const s=document.createElement("div"),r=document.createElement("button");r.classList.add("tiny","button"),r.innerHTML="Clear signature",s.appendChild(r),e.appendChild(s),this.options.compact&&this.container.setAttribute("class",`${this.container.getAttribute("class")} compact`),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach(o=>{i.setAttribute("readOnly","readOnly"),o.disabled=!0})),r.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),this.signaturePad.clear(),this.signaturePad.strokeEnd()}),this.control=this.theme.getFormControl(this.label,e,this.description),this.container.appendChild(this.control),this.refreshValue(),i.width=e.offsetWidth,this.options&&this.options.canvas_height?i.height=this.options.canvas_height:i.height="300"}else{const e=document.createElement("p");e.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(e)}}setValue(t){if(typeof SignaturePad=="function"){const 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)}}destroy(){this.signaturePad.off(),delete this.signaturePad}}class Rh extends Yt{setValue(t,e,i){const s=super.setValue(t,e,i);s!==void 0&&s.changed&&this.simplemde_instance&&this.simplemde_instance.value(s.value)}build(){this.options.format="textarea",super.build(),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}afterInputReady(){let t;window.SimpleMDE?(t=this.expandCallbacks("simplemde",$({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),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",()=>{this.value=this.simplemde_instance.value(),this.is_dirty=!0,this.onChange(!0)}),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):super.afterInputReady()}getNumColumns(){return 6}enable(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),super.enable()}disable(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),super.disable(t)}destroy(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),super.destroy()}startListening(t,e){function i(){t.display.wrapper.offsetHeight?(this.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(i,e.delay)}e.timeout=window.setTimeout(i,e.delay),e.hurry=()=>{window.clearTimeout(e.timeout),e.timeout=window.setTimeout(i,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}stopListening(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}const Dh={".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"};class vo extends Yt{build(){if(this.options.compact||(this.header=this.label=this.theme.getLabelLike(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){let i=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&i--,this.enum_values=[];for(let s=0;s<i;s++)this.enum_values.push(s+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];const t=i=>{i.preventDefault(),i.stopPropagation(),this.setValue(i.currentTarget.value),this.onChange(!0)};for(let i=this.enum_values.length-1;i>-1;i--){const s=this.formname+(i+1),r=this.theme.getFormInputField("radio");r.name=`${this.formname}[starrating]`,r.value=this.enum_values[i],r.id=s,r.addEventListener("change",t,!1),this.radioGroup.push(r);const o=document.createElement("label");o.htmlFor=s,o.title=this.enum_values[i],this.options.displayValue&&o.classList.add("starrating-display-enabled");const a=this.theme.getHiddenText("label");a.textContent=i,o.appendChild(a),this.ratingContainer.appendChild(r),this.ratingContainer.appendChild(o)}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(let i=0;i<this.radioGroup.length;i++)this.radioGroup[i].disabled=!0;this.ratingContainer.classList.add("readonly")}const e=this.theme.getContainer();e.appendChild(this.ratingContainer),this.input=e,this.control=this.theme.getFormControl(this.label,e,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}enable(){if(!this.always_disabled){for(let t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}disable(t){t&&(this.always_disabled=!0);for(let e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}destroy(){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),super.destroy()}getNumColumns(){return 2}getValue(){if(this.dependenciesFulfilled)return this.schema.type==="integer"?this.value===""?void 0:this.value*1:this.value}setValue(t){for(let e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===`${t}`){this.radioGroup[e].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value),this.onChange(!0);break}}}vo.rules=Dh;class Nh extends bo{build(){super.build(),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");const t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}enable(){super.enable(),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}disable(){super.disable(),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}class Mh extends xr{register(){if(super.register(),this.rows)for(let t=0;t<this.rows.length;t++)this.rows[t].register()}unregister(){if(super.unregister(),this.rows)for(let t=0;t<this.rows.length;t++)this.rows[t].unregister()}getNumColumns(){return Math.max(Math.min(12,this.width),3)}preBuild(){const 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,super.preBuild()}build(){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);const 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("span"),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){const e=t.getChildEditors(),i=t.property_order||Object.keys(e);for(let s=0;s<i.length;s++){const r=this.theme.getTableHeaderCell(e[i[s]].getTitle());e[i[s]].options.hidden&&(r.style.display="none"),this.header_row.appendChild(r)}}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.translate("table_controls")),this.controls_header_cell.setAttribute("aria-hidden","true"),this.controls_header_cell.style.visibility="hidden",this.header_row.appendChild(this.controls_header_cell),this.addControls()}onChildEditorChange(t){this.refreshValue(),super.onChildEditorChange()}getItemDefault(){return $({},{default:this.item_default}).default}getItemTitle(){return this.item_title}getElementEditor(t,e){const i=$({},this.schema.items),s=this.jsoneditor.getEditorClass(i,this.jsoneditor),r=this.row_holder.appendChild(this.theme.getTableRow());let o=r;this.item_has_child_editors||(o=this.theme.getTableCell(),r.appendChild(o));const a=this.jsoneditor.createEditor(s,{jsoneditor:this.jsoneditor,schema:i,container:o,path:`${this.path}.${t}`,parent:this,compact:!0,table_row:!0});return a.preBuild(),e||(a.build(),a.postBuild(),a.controls_cell=r.appendChild(this.theme.getTableCell()),a.row=r,a.table_controls=this.theme.getButtonHolder(),a.controls_cell.appendChild(a.table_controls),a.table_controls.style.margin=0,a.table_controls.style.padding=0),a}destroy(){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,super.destroy()}ensureArraySize(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}setValue(t=[],e){if(t=this.ensureArraySize(t),JSON.stringify(t)===this.serialized)return;let s=!1;t.forEach((r,o)=>{this.rows[o]?this.rows[o].setValue(r):(this.addRow(r),s=!0)});for(let r=t.length;r<this.rows.length;r++){const o=this.rows[r].container;this.item_has_child_editors||this.rows[r].row.parentNode.removeChild(this.rows[r].row),this.rows[r].destroy(),o.parentNode&&o.parentNode.removeChild(o),this.rows[r]=null,s=!0}this.rows=this.rows.slice(0,t.length),this.refreshValue(),(s||e)&&this.refreshRowButtons(),this.onChange()}refreshRowButtons(){const t=this.schema.minItems&&this.schema.minItems>=this.rows.length,e=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,i=[];this.rows.forEach((d,h)=>{if(d.delete_button){const u=!t;this.setButtonState(d.delete_button,u),i.push(u)}if(d.copy_button){const u=!e;this.setButtonState(d.copy_button,u),i.push(u)}if(d.moveup_button){const u=h!==0;this.setButtonState(d.moveup_button,u),i.push(u)}if(d.movedown_button){const u=h!==this.rows.length-1;this.setButtonState(d.movedown_button,u),i.push(u)}});const s=i.some(d=>d);this.rows.forEach(d=>this.setButtonState(d.controls_cell,s)),this.setButtonState(this.controls_header_cell,s),this.setButtonState(this.table,this.value.length);const r=!(e||this.hide_add_button);this.setButtonState(this.add_row_button,r);const o=!(!this.value.length||t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,o);const a=!(this.value.length<=1||t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,a);const l=r||o||a;this.setButtonState(this.controls,l)}refreshValue(){this.value=[],this.rows.forEach((t,e)=>{this.value[e]=t.getValue()}),this.serialized=JSON.stringify(this.value)}addRow(t){const e=this.rows.length;this.rows[e]=this.getElementEditor(e);const i=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,i)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,i)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,i)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,i)),typeof t<"u"&&this.rows[e].setValue(t),this.rows[e]}_createDeleteButton(t,e){const i=this.getButton("","delete","button_delete_row_title_short");return i.classList.add("delete","json-editor-btntype-delete"),i.setAttribute("data-i",t),i.addEventListener("click",s=>{if(s.preventDefault(),s.stopPropagation(),!this.askConfirmation())return!1;const r=s.currentTarget.getAttribute("data-i")*1,o=this.getValue(),l=this.getValue()[r];o.splice(r,1),this.setValue(o),this.onChange(!0),this.jsoneditor.trigger("deleteRow",l)}),e.appendChild(i),i}_createCopyButton(t,e){const i=this.getButton("","copy","button_copy_row_title_short"),s=this.schema;return i.classList.add("copy","json-editor-btntype-copy"),i.setAttribute("data-i",t),i.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();const o=r.currentTarget.getAttribute("data-i")*1,a=this.getValue();let l=a[o];s.items.type==="string"&&s.items.format==="uuid"?l=Ei():s.items.type==="object"&&s.items.properties&&a.forEach((d,h)=>{if(o===h)for(const u of Object.keys(d))s.items.properties&&s.items.properties[u]&&s.items.properties[u].format==="uuid"&&(l=Object.assign({},a[o]),l[u]=Ei())}),a.splice(o+1,0,l),this.setValue(a),this.onChange(!0),this.jsoneditor.trigger("copyRow",this.rows[o+1])}),e.appendChild(i),i}_createMoveUpButton(t,e){const i=this.getButton("","moveup","button_move_up_title");return i.classList.add("moveup","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();const r=s.currentTarget.getAttribute("data-i")*1,o=this.getValue();o.splice(r-1,0,o.splice(r,1)[0]),this.setValue(o),this.onChange(!0),this.jsoneditor.trigger("moveRow",this.rows[r-1])}),e.appendChild(i),i}_createMoveDownButton(t,e){const i=this.getButton("","movedown","button_move_down_title");return i.classList.add("movedown","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();const r=s.currentTarget.getAttribute("data-i")*1,o=this.getValue();o.splice(r+1,0,o.splice(r,1)[0]),this.setValue(o),this.onChange(!0),this.jsoneditor.trigger("moveRow",this.rows[r+1])}),e.appendChild(i),i}addControls(){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",t=>{t.preventDefault(),t.stopPropagation(),this.setButtonState(this.panel,this.collapsed),this.collapsed?(this.collapsed=!1,this.setButtonText(t.currentTarget,"","collapse","button_collapse")):(this.collapsed=!0,this.setButtonText(t.currentTarget,"","expand","button_expand"))}),this.options.collapsed&&re(this.toggle_button,"click"),this.schema.options&&typeof this.schema.options.disable_collapse<"u"?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()}_createToggleButton(){const t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}_createAddRowButton(){const t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const i=this.addRow();this.refreshValue(),this.refreshRowButtons(),this.onChange(!0),this.jsoneditor.trigger("addRow",i)}),this.controls.appendChild(t),t}_createDeleteLastRowButton(){const t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",e=>{if(e.preventDefault(),e.stopPropagation(),!this.askConfirmation())return!1;const i=this.getValue(),s=i.pop();this.setValue(i),this.onChange(!0),this.jsoneditor.trigger("deleteRow",s)}),this.controls.appendChild(t),t}_createRemoveAllRowsButton(){const t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",e=>{if(e.preventDefault(),e.stopPropagation(),!this.askConfirmation())return!1;const i=this.getValue();this.setValue([]),this.onChange(!0),this.jsoneditor.trigger("deleteAllRows",i)}),this.controls.appendChild(t),t}}class Hh extends Bt{getNumColumns(){return 4}build(){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:(i,s,r,o)=>{window.alert(`No upload_handler defined for "${i.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=i=>{this.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)this.dropZone=this.altDropZone;else throw new Error(`Error: alt_drop_zone selector "${this.options.alt_drop_zone}" not found!`);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=i=>{i.preventDefault(),i.stopPropagation();const s=i.target.files||i.dataTransfer.files;if(s&&s.length)if(this.options.max_upload_size!==0&&s[0].size>this.options.max_upload_size)this.theme.addInputError(this.uploader,`${this.translate("upload_max_size")} ${this.options.max_upload_size}`);else if(this.options.mime_type.length!==0&&!this.isValidMimeType(s[0].type,this.options.mime_type))this.theme.addInputError(this.uploader,`${this.translate("upload_wrong_file_format")} ${this.options.mime_type.toString()}`);else{this.fileDisplay&&(this.fileDisplay.value=s[0].name);let r=new window.FileReader;r.onload=o=>{this.preview_value=o.target.result,this.refreshPreview(s),this.onChange(!0),r=null},r.readAsDataURL(s[0])}},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=i=>{const s=i.dataTransfer.items||i.dataTransfer.files,r=s&&s.length&&(this.options.mime_type.length===0||this.isValidMimeType(s[0].type,this.options.mime_type)),o=i.currentTarget.classList&&i.currentTarget.classList.contains("upload-dropzone")&&r;switch((i.currentTarget===window?"w_":"e_")+i.type){case"w_drop":case"w_dragover":o||(i.dataTransfer.dropEffect="none");break;case"e_dragenter":{o?(this.dropZone.classList.add("valid-dropzone"),i.dataTransfer.dropEffect="copy"):this.dropZone.classList.add("invalid-dropzone");break}case"e_dragover":{o&&(i.dataTransfer.dropEffect="copy");break}case"e_dragleave":this.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":{this.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),o&&this.uploadHandler(i);break}}o||i.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(i=>{window.addEventListener(i,this.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(i=>{this.dropZone.addEventListener(i,this.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);const t=this.uploader||this.input,e=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&e.appendChild(this.dropZone),this.fileUploadGroup&&e.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&e.appendChild(this.dropZone),e.appendChild(this.preview),t.parentNode.insertBefore(e,t.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame(()=>{this.afterInputReady()})}afterInputReady(){if(this.value){const t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.onload=e=>{this.preview.appendChild(t)},t.onerror=e=>{console.error("upload error",e,e.currentTarget)},t.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}refreshPreview(t){if(this.last_preview===this.preview_value||(this.last_preview=this.preview_value,this.preview.innerHTML="",!this.preview_value))return;const e=t[0],i=this.preview_value.match(/^data:([^;,]+)[;,]/);if(e.mimeType=i?i[1]:"unknown",e.size>0){const r=Math.floor(Math.log(e.size)/Math.log(1024));e.formattedSize=`${parseFloat((e.size/1024**r).toFixed(2))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`}else e.formattedSize="0 Bytes";const s=this.getButton("button_upload","upload","button_upload");s.addEventListener("click",r=>{r.preventDefault(),s.setAttribute("disabled","disabled"),this.theme.removeInputError(this.uploader),this.theme.getProgressBar&&(this.progressBar=this.theme.getProgressBar(),this.preview.appendChild(this.progressBar)),this.options.upload_handler(this.path,e,{success:o=>{this.setValue(o),this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.progressBar&&this.preview.removeChild(this.progressBar),s.removeAttribute("disabled")},failure:o=>{this.theme.addInputError(this.uploader,o),this.progressBar&&this.preview.removeChild(this.progressBar),s.removeAttribute("disabled")},updateProgress:o=>{this.progressBar&&(o?this.theme.updateProgressBar(this.progressBar,o):this.theme.updateProgressBarUnknown(this.progressBar))}})}),this.preview.appendChild(this.theme.getUploadPreview(e,s,this.preview_value)),this.options.auto_upload&&(s.dispatchEvent(new window.MouseEvent("click")),s.parentNode.removeChild(s))}enable(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),super.enable())}disable(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),super.disable()}setValue(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}destroy(){this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(t=>{window.removeEventListener(t,this.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(t=>{this.dropZone.removeEventListener(t,this.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),super.destroy()}isValidMimeType(t,e){return e.reduce((i,s)=>i||new RegExp(s.replace(/\*/g,".*"),"gi").test(t),!1)}}class Vh extends Yt{preBuild(){super.preBuild(),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]})}build(){super.build(),this.disable(!0),this.input.setAttribute("readonly","true")}sanitize(t){return this.testUuid(t)||(t=this.uuid),t}setValue(t,e,i){this.testUuid(t)||(t=this.uuid),this.uuid=t,super.setValue(t,e,i)}getUuid(){return Ei()}testUuid(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)}}class Fh extends Yt{postBuild(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}setValue(t,e,i){const s=super.setValue(t,e,i);return this.picker_instance&&this.picker_instance.domElement&&s&&s.changed&&this.picker_instance.setColor(s.value,!0),s}getNumColumns(){return 2}afterInputReady(){super.afterInputReady(),this.createPicker(!0)}disable(){if(super.disable(),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";const t=this.picker_instance.domElement.querySelectorAll("button");for(let e=0;e<t.length;e++)t[e].disabled=!0}}enable(){if(super.enable(),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";const t=this.picker_instance.domElement.querySelectorAll("button");for(let e=0;e<t.length;e++)t[e].disabled=!1}}destroy(){this.createPicker(!1),super.destroy()}createPicker(t){if(t){if(window.Picker&&!this.picker_instance){const e=this.expandCallbacks("colorpicker",$({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),i=s=>{const r=this.picker_instance.settings.editorFormat,o=this.picker_instance.settings.alpha;this.setValue(r==="hex"?o?s.hex:s.hex.slice(0,7):s[`${r+(o?"a":"")}String`])};!e.popup&&typeof e.onChange!="function"?e.onChange=i:e.popup&&typeof e.onDone!="function"&&(e.onDone=i),this.picker_instance=new window.Picker(e),e.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="")}}const es={ace:lh,array:xr,arrayChoices:hh,arraySelect2:ch,arraySelectize:uh,autocomplete:ph,base64:fh,button:fo,checkbox:mh,choices:mo,datetime:bh,describedBy:yh,enum:_h,hidden:vh,info:wh,integer:bo,ip:xh,jodit:Ch,multiple:Sh,multiselect:ts,null:Th,number:go,object:_o,radio:$h,sceditor:Ph,select:Li,select2:Oh,selectize:Ih,signature:Bh,simplemde:Rh,starrating:vo,stepper:Nh,string:Yt,table:Mh,upload:Hh,uuid:Vh,colorpicker:Fh},zh="html",Uh="default",qh={},Gh={},Zh={},Wh={},wo={},Yh=[],Cr="en",Xh=Cr;wo.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?",table_controls:"Controls"},Object.entries(es).forEach(([n,t])=>{es[n].options=t.options||{}});function Jh(n,t,e){console.log("Upload handler required for upload editor")}function Qh(n,t,e){let i={};e&&e.options&&e.options.error_messages&&e.options.error_messages[Ie.language]&&(i=e.options.error_messages[Ie.language]);const s=Ie.languages[Ie.language];if(!s)throw new Error(`Unknown language ${Ie.language}`);let r=i[n]||s[n]||Ie.languages[Cr][n]||n;if(t)for(let o=0;o<t.length;o++)r=r.replace(new RegExp(`\\{\\{${o}}}`,"g"),t[o]);return r}function Kh(n,t){return n}const Ie={options:{upload:Jh,use_name_attributes:!0,prompt_before_delete:!0,use_default_values:!0,max_depth:0,button_state_mode:1,case_sensitive_property_search:!0,show_errors:"interaction"},theme:zh,template:Uh,themes:Gh,callbacks:qh,templates:Zh,iconlibs:Wh,editors:es,languages:wo,resolvers:ih,custom_validators:Yh,default_language:Cr,language:Xh,translate:Qh,translateProperty:Kh};class tc{constructor(t){this.options=t||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type(e){typeof e.type=="object"&&(e.type=this._expandSubSchema(e.type))},disallow(e){typeof e.disallow=="object"&&(e.disallow=this._expandSubSchema(e.disallow))},anyOf(e){Object.entries(e.anyOf).forEach(([i,s])=>{e.anyOf[i]=this.expandSchema(s)})},dependencies(e){Object.entries(e.dependencies).forEach(([i,s])=>{typeof s=="object"&&!Array.isArray(s)&&(e.dependencies[i]=this.expandSchema(s))})},not(e){e.not=this.expandSchema(e.not)}},this._subSchema2={allOf(e,i){let s=$({},i);return Object.entries(e.allOf).forEach(([r,o])=>{e.allOf[r]=this.expandRefs(o,!0),s=this.extendSchemas(s,this.expandSchema(o))}),delete s.allOf,s},extends(e,i){let s;return Array.isArray(e.extends)?s=e.extends.reduce((r,o,a)=>this.extendSchemas(r,this.expandSchema(o)),i):s=this.extendSchemas(i,this.expandSchema(e.extends)),delete s.extends,s},oneOf(e,i){const s=$({},i);return delete s.oneOf,e.oneOf.reduce((r,o,a)=>(r.oneOf[a]=this.extendSchemas(this.expandSchema(o),s),r),i),i}}}async load(t,e,i){return this.schema=t,await this._asyncloadExternalRefs(t,e,this._getFileBase(i),!0),this.expandRefs(t)}expandRefs(t,e){const i=$({},t);if(!i.$ref)return i;const s=i.$ref.split("#");if(s.length===2&&!this.refs_with_info[i.$ref]){const l=this.expandRecursivePointer(this.schema,s[1]),d=this.extendSchemas(i,this.expandSchema(l));return delete d.$ref,d}const r=s.length>2?this.refs_with_info["#"+s[1]]:this.refs_with_info[i.$ref];delete i.$ref;const o=r.$ref.startsWith("#")?r.fetchUrl:"",a=this._getRef(o,r);if(!this.refs[a])console.warn(`reference:'${a}' not found!`);else if(e&&Wt(this.refs[a],"allOf")){const l=this.refs[a].allOf;Object.keys(l).forEach(d=>{l[d]=this.expandRefs(l[d],!0)})}return s.length>2?this.extendSchemas(i,this.expandSchema(this.expandRecursivePointer(this.refs[a],s[2]))):this.extendSchemas(i,this.expandSchema(this.refs[a]))}expandRecursivePointer(t,e){let i=t;return e.split("/").slice(1).forEach(s=>{i[s]&&(i=i[s])}),i.$refs&&i.$refs.startsWith("#")?this.expandRecursivePointer(t,i.$refs):i}expandSchema(t){Object.entries(this._subSchema1).forEach(([i,s])=>{t[i]&&s.call(this,t)});let e=$({},t);return Object.entries(this._subSchema2).forEach(([i,s])=>{t[i]&&(e=s.call(this,t,e))}),this.expandRefs(e)}_getRef(t,e){const i=t+e;return this.refs[i]?i:t+decodeURIComponent(e.$ref)}_expandSubSchema(t){return Array.isArray(t)?t.map(e=>typeof e=="object"?this.expandSchema(e):e):this.expandSchema(t)}_manageRecursivePointer(t,e){Object.keys(t).forEach(i=>{t[i].$ref&&t[i].$ref.indexOf("#")===0&&(t[i].$ref=e+t[i].$ref)})}_getExternalRefs(t,e,i=!1){i||this._manageRecursivePointer(t,e);const s={},r=o=>Object.keys(o).forEach(a=>{s[a]=!0});if(t.$ref&&typeof t.$ref!="object"&&!(t.$ref.indexOf("#")===0&&i)){let o=t.$ref,a="";o.indexOf("#")>0&&(o=o.substr(0,o.indexOf("#"))),o!==t.$ref&&(a=t.$ref.substr(t.$ref.indexOf("#")));const l=this.refs_prefix+this.refs_counter++,d=l+a;t.$ref.substr(0,1)!=="#"&&!this.refs[t.$ref]&&(s[o]=!0),this.refs_with_info[l]={fetchUrl:e,$ref:o},t.$ref=d}return Object.values(t).forEach(o=>{!o||typeof o!="object"||(Array.isArray(o)?Object.values(o).forEach(a=>{a&&typeof a=="object"&&r(this._getExternalRefs(a,e,i))}):(!o.$ref||!(typeof o.$ref=="string"&&o.$ref.startsWith("#")))&&r(this._getExternalRefs(o,e,i)))}),t.id&&typeof t.id=="string"&&t.id.substr(0,4)==="urn:"?this.refs[t.id]=t:t.$id&&typeof t.$id=="string"&&t.$id.substr(0,4)==="urn:"&&(this.refs[t.$id]=t),s}_getFileBase(t){if(!t)return"/";const{ajaxBase:e}=this.options;return typeof e>"u"?this._getFileBaseFromFileLocation(t):e}_getFileBaseFromFileLocation(t){const e=t.split("/");return e.pop(),`${e.join("/")}/`}_joinUrl(t,e){var i=t;return t.substr(0,7)!=="http://"&&t.substr(0,8)!=="https://"&&t.substr(0,5)!=="blob:"&&t.substr(0,5)!=="data:"&&t.substr(0,1)!=="#"&&t.substr(0,1)!=="/"&&(i=e+t),i.indexOf("#")>0&&(i=i.substr(0,i.indexOf("#"))),i}_isUniformResourceName(t){return t.substr(0,4)==="urn:"}async _asyncloadExternalRefs(t,e,i,s=!1){const r=this._getExternalRefs(t,e,s);let o=0;for(const a of Object.keys(r)){if(typeof a>"u"||this.refs[a])continue;if(this._isUniformResourceName(a)){this.refs[a]="loading",o++;const u=this.options.urn_resolver;let g=a;if(typeof u!="function")throw console.log(`No "urn_resolver" callback defined to resolve "${g}"`),new Error(`Must set urn_resolver option to a callback to resolve ${g}`);g.indexOf("#")>0&&(g=g.substr(0,g.indexOf("#")));let m;try{let y;m=await u(g);try{y=JSON.parse(m)}catch(w){throw console.log(w),new Error(`Failed to parse external ref ${g}`)}if(!(typeof y=="boolean"||typeof y=="object")||y===null||Array.isArray(y))throw new Error(`External ref does not contain a valid schema - ${g}`);this.refs[a]=y,await this._asyncloadExternalRefs(y,a,i)}catch(y){throw console.log(y),new Error(`Failed to parse external ref ${g}`)}if(typeof m=="boolean")throw new Error(`External ref does not contain a valid schema - ${g}`);continue}if(!this.options.ajax)throw new Error(`Must set ajax option to true to load external ref ${a}`);o++;let l=this._joinUrl(a,i),d;if(this.options.ajax_cache_responses){const u=this.cacheGet(l);u&&(d=u)}if(!d){const u=await new Promise(g=>{const m=new XMLHttpRequest;this.options.ajaxCredentials&&(m.withCredentials=this.options.ajaxCredentials),m.overrideMimeType("application/json"),m.open("GET",l,!0),m.onload=()=>{g(m)},m.onerror=y=>{g(void 0)},m.send()});if(typeof u>"u")throw new Error(`Failed to fetch ref via ajax - ${a}`);try{d=JSON.parse(u.responseText),this.onSchemaLoaded({schema:d,schemaUrl:l}),this.options.ajax_cache_responses&&this.cacheSet(l,d)}catch(g){throw console.log(g),new Error(`Failed to parse external ref ${l}`)}}if(!(typeof d=="boolean"||typeof d=="object")||d===null||Array.isArray(d))throw new Error(`External ref does not contain a valid schema - ${l}`);this.refs[a]=d;const h=this._getFileBaseFromFileLocation(l);if(l!==a){const u=l.split("/");l=(a.substr(0,1)==="/"?"/":"")+u.pop()}await this._asyncloadExternalRefs(d,l,h)}if(!o)return!0;this.onAllSchemasLoaded()}onSchemaLoaded(t){}onAllSchemasLoaded(){}extendSchemas(t,e){t=$({},t),e=$({},e);const i={},s=(a,l)=>(a==="required"||a==="defaultProperties")&&typeof l=="object"&&Array.isArray(l),r=(a,l)=>{s(a,l)?i[a]=l.concat(e[a]).reduce((d,h)=>(d.includes(h)||d.push(h),d),[]):a==="type"&&(typeof l=="string"||Array.isArray(l))?o(l):typeof l=="object"&&!Array.isArray(l)&&l!==null?i[a]=this.extendSchemas(l,e[a]):i[a]=l},o=a=>{typeof a=="string"&&(a=[a]),typeof e.type=="string"&&(e.type=[e.type]),!e.type||!e.type.length?i.type=a:i.type=a.filter(l=>e.type.includes(l)),i.type.length===1&&typeof i.type[0]=="string"?i.type=i.type[0]:i.type.length===0&&delete i.type};return Object.entries(t).forEach(([a,l])=>{typeof e[a]<"u"?r(a,l):i[a]=l}),Object.entries(e).forEach(([a,l])=>{typeof t[a]>"u"&&(i[a]=l)}),i}getCacheKey(t){return["je-cache",t].join("::")}getCacheBuster(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}cacheSet(t,e){try{window.localStorage.setItem(this.getCacheKey(t),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:e}))}catch(i){console.error(i)}}cacheGet(t){try{const e=window.localStorage.getItem(this.getCacheKey(t));if(e){const i=JSON.parse(e);if(i.cacheBuster&&i.schema&&i.cacheBuster===this.getCacheBuster())return i.schema;this.cacheDelete(t)}}catch(e){console.error(e)}}cacheDelete(t){window.localStorage.removeItem(this.getCacheKey(t))}}const ec={default:()=>({compile(n){const t=n.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),e=t&&t.length;if(!e)return()=>n;const i=[],s=o=>{let a=t[o].replace(/[{}]+/g,"").trim().split(".");const l=a.length;let d;if(l>1){let h;d=u=>{for(h=u,o=0;o<l&&(h=h[a[o]],!!h);o++);return h}}else a=a[0],d=h=>h[a];i.push({s:t[o],r:d})};for(var r=0;r<e;r++)s(r);return o=>{let a=`${n}`,l;for(r=0;r<e;r++)l=i[r],a=a.replace(l.s,l.r(o));return a}}}),ejs:()=>window.EJS?{compile(n){const t=new window.EJS({text:n});return e=>t.render(e)}}:!1,handlebars:()=>window.Handlebars,hogan:()=>window.Hogan?{compile(n){const t=window.Hogan.compile(n);return e=>t.render(e)}}:!1,lodash:()=>window._?{compile(n){return t=>window._.template(n)(t)}}:!1,markup:()=>!window.Mark||!window.Mark.up?!1:{compile(n){return t=>window.Mark.up(n,t)}},mustache:()=>window.Mustache?{compile(n){return t=>window.Mustache.render(n,t)}}:!1,swig:()=>window.swig,underscore:()=>window._?{compile(n){return t=>window._.template(n)(t)}}:!1},ic={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""};class ge{constructor(t="",e=ic){this.mapping=e,this.icon_prefix=t}getIconClass(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:this.icon_prefix+t}getIcon(t){const e=this.getIconClass(t);if(!e)return null;const i=document.createElement("i");return i.classList.add(...e.split(" ")),i}}const sc="glyphicon glyphicon-",rc={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"};class nc extends ge{constructor(){super(sc,rc)}}const oc="icon-",ac={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"};class lc extends ge{constructor(){super(oc,ac)}}const dc="fa fa-",hc={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"};class cc extends ge{constructor(){super(dc,hc)}}const uc="fas fa-",pc={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"};class fc extends ge{constructor(){super(uc,pc)}}const mc="ui-icon ui-icon-",gc={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"};class bc extends ge{constructor(){super(mc,gc)}}const yc="oi oi-",_c={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"};class vc extends ge{constructor(){super(yc,_c)}}const wc="icon icon-",xc={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"};class Cc extends ge{constructor(){super(wc,xc)}}const Ec="bi bi-",Lc={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"};class Ac extends ge{constructor(){super(Ec,Lc)}}const kc={bootstrap:Ac,bootstrap3:nc,fontawesome3:lc,fontawesome4:cc,fontawesome5:fc,jqueryui:bc,openiconic:vc,spectre:Cc},xo=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(n=>n in document.documentElement);class be{constructor(t,e={disable_theme_rules:!1}){this.jsoneditor=t,Object.keys(e).forEach(i=>{typeof t.options[i]<"u"&&(e[i]=t.options[i])}),this.options=e}getContainer(){return document.createElement("div")}getFloatRightLinkHolder(){const t=document.createElement("div");return t.classList.add("je-float-right-linkholder"),t}getModal(){const t=document.createElement("div");return t.style.display="none",t.classList.add("je-modal"),t}getGridContainer(){return document.createElement("div")}getGridRow(){const t=document.createElement("div");return t.classList.add("row"),t}getGridColumn(){return document.createElement("div")}setGridColumnSize(t,e){}getLink(t){const e=document.createElement("a");return e.setAttribute("href","#"),e.appendChild(document.createTextNode(t)),e}disableHeader(t){t.style.color="#ccc"}disableLabel(t){t.style.color="#ccc"}enableHeader(t){t.style.color=""}enableLabel(t){t.style.color=""}getInfoButton(t){const e=document.createElement("span");e.innerText="ⓘ",e.classList.add("je-infobutton-icon");const i=document.createElement("span");return i.classList.add("je-infobutton-tooltip"),i.innerText=t,e.onmouseover=()=>{i.style.visibility="visible"},e.onmouseleave=()=>{i.style.visibility="hidden"},e.appendChild(i),e}getFormInputLabel(t,e){const i=document.createElement("label");return i.appendChild(document.createTextNode(t)),e&&i.classList.add("required"),i}getLabelLike(t,e){const i=document.createElement("b");return i.appendChild(document.createTextNode(t)),e&&i.classList.add("required"),i}getHeader(t,e){const i=document.createElement("span");return typeof t=="string"?i.textContent=t:i.appendChild(t),i.classList.add("je-header"),i}getCheckbox(){const t=this.getFormInputField("checkbox");return t.classList.add("je-checkbox"),t}getCheckboxLabel(t,e){const i=document.createElement("label");return i.appendChild(document.createTextNode(` ${t}`)),e&&i.classList.add("required"),i}getMultiCheckboxHolder(t,e,i,s){const r=document.createElement("div");return r.classList.add("control-group"),e&&(e.style.display="block",r.appendChild(e),s&&e.appendChild(s)),Object.values(t).forEach(o=>{o.style.display="inline-block",o.style.marginRight="20px",r.appendChild(o)}),i&&r.appendChild(i),r}getFormCheckboxControl(t,e,i){const s=document.createElement("div");return s.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),i&&s.classList.add("je-checkbox-control--compact"),s}getFormRadio(t){const e=this.getFormInputField("radio");return Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),e.classList.add("je-radio"),e}getFormRadioLabel(t,e){const i=document.createElement("label");return i.appendChild(document.createTextNode(` ${t}`)),e&&i.classList.add("required"),i}getFormRadioControl(t,e,i,s){const r=document.createElement("div");return r.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),i&&r.classList.add("je-radio-control--compact"),e.tagName.toLowerCase()!=="div"&&s&&t&&e&&(e.setAttribute("id",s),e.setAttribute("aria-labelledby",s),t.setAttribute("for",s)),r}getSelectInput(t,e){const i=document.createElement("select");return t&&this.setSelectOptions(i,t),i}getSwitcher(t){const e=this.getSelectInput(t,!1);return e.classList.add("je-switcher"),e}getSwitcherOptions(t){return t.getElementsByTagName("option")}setSwitcherOptions(t,e,i){this.setSelectOptions(t,e,i)}setSelectOptions(t,e,i=[]){t.innerHTML="";for(let s=0;s<e.length;s++){const r=document.createElement("option");r.setAttribute("value",e[s]),r.textContent=i[s]||e[s],t.appendChild(r)}}getTextareaInput(){const t=document.createElement("textarea");return t.classList.add("je-textarea"),t}getHiddenLabel(t){const e=document.createElement("label");return e.textContent=t,e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),e}visuallyHidden(t){t&&t.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}getHiddenText(t){const e=document.createElement("span");return e.textContent=t,e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),e}getRangeInput(t,e,i,s,r){const o=this.getFormInputField("range");return o.setAttribute("min",t),o.setAttribute("max",e),o.setAttribute("step",i),s&&(s.setAttribute("id",r+"-description"),o.setAttribute("aria-describedby",r+"-description")),o}getStepperButtons(t){const e=document.createElement("div"),i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("stepper-down");const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add("stepper-up"),t.getAttribute("readonly")&&(i.setAttribute("disabled",!0),s.setAttribute("disabled",!0)),i.textContent="-",s.textContent="+";const o=(d,h)=>{h?d.value=Number(h):d.value=Number(d.value),d.setAttribute("initialized","1")},a=t.getAttribute("min"),l=t.getAttribute("max");return i.addEventListener("click",()=>{t.getAttribute("initialized")?a?Number(t.value)>Number(a)&&t.stepDown():t.stepDown():o(t,a),re(t,"change")}),s.addEventListener("click",()=>{t.getAttribute("initialized")?l?Number(t.value)<Number(l)&&t.stepUp():t.stepUp():o(t,a),re(t,"change")}),e.appendChild(i),e.appendChild(s),e}getRangeOutput(t){const e=document.createElement("output"),i=s=>{e.value=s.currentTarget.value};return t.addEventListener("change",i,!1),t.addEventListener("input",i,!1),e}getRangeControl(t,e){const i=document.createElement("div");return i.classList.add("je-range-control"),e&&i.appendChild(e),i.appendChild(t),i}getFormInputField(t){const e=document.createElement("input");return e.setAttribute("type",t),e}afterInputReady(t){}getFormControl(t,e,i,s,r){const o=document.createElement("div");return o.classList.add("form-control"),t&&(o.appendChild(t),r&&t.setAttribute("for",r)),(e.type==="checkbox"||e.type==="radio")&&t?(e.style.width="auto",t.insertBefore(e,t.firstChild),s&&t.appendChild(s)):(s&&t&&t.appendChild(s),o.appendChild(e)),e.tagName.toLowerCase()!=="div"&&e&&t&&r&&(t.setAttribute("for",r),e.setAttribute("id",r)),e.tagName.toLowerCase()!=="div"&&e&&i&&(i.setAttribute("id",r+"-description"),e.setAttribute("aria-describedby",r+"-description")),i&&o.appendChild(i),o}getIndentedPanel(){const t=document.createElement("div");return t.classList.add("je-indented-panel"),t}getTopIndentedPanel(){const t=document.createElement("div");return t.classList.add("je-indented-panel--top"),t}getChildEditorHolder(){return document.createElement("div")}getDescription(t){const e=document.createElement("p");return window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}getCheckboxDescription(t){return this.getDescription(t)}getFormInputDescription(t){return this.getDescription(t)}getButtonHolder(){return document.createElement("span")}getHeaderButtonHolder(){return this.getButtonHolder()}getFormButtonHolder(t){return this.getButtonHolder()}getButton(t,e,i){const s=document.createElement("button");return s.type="button",this.setButtonText(s,t,e,i),s}getFormButton(t,e,i){return this.getButton(t,e,i)}setButtonText(t,e,i,s){for(;t.firstChild;)t.removeChild(t.firstChild);if(i&&(t.appendChild(i),e=` ${e}`),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!i){const r=document.createElement("span");r.appendChild(document.createTextNode(e)),t.appendChild(r)}s&&t.setAttribute("title",s)}getTableContainer(){return document.createElement("div")}getTable(){return document.createElement("table")}getTableRow(){return document.createElement("tr")}getTableHead(){return document.createElement("thead")}getTableBody(){return document.createElement("tbody")}getTableHeaderCell(t){const e=document.createElement("th");return e.textContent=t,e}getTableCell(){return document.createElement("td")}getErrorMessage(t){const e=document.createElement("p");return e.style=e.style||{},e.style.color="red",e.appendChild(document.createTextNode(t)),e}addInputError(t,e){t.errmsg.setAttribute("role","alert")}removeInputError(t){}addTableRowError(t){}removeTableRowError(t){}getTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.innerHTML=`<div class='je-tabholder tabs'></div><div class='content' id='${e}'></div><div class='je-tabholder--clear'></div>`,i}getTopTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.innerHTML=`<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='${e}'></div>`,i}applyStyles(t,e){Object.keys(e).forEach(i=>t.style[i]=e[i])}closest(t,e){for(;t&&t!==document;)if(t[xo]){if(t[xo](e))return t;t=t.parentNode}else return!1;return!1}insertBasicTopTab(t,e){e.firstChild.insertBefore(t,e.firstChild.firstChild)}getTab(t,e){const i=document.createElement("div");return i.appendChild(t),i.id=e,i.classList.add("je-tab"),i}getTopTab(t,e){const i=document.createElement("div");return i.appendChild(t),i.id=e,i.classList.add("je-tab--top"),i}getTabContentHolder(t){return t.children[1]}getTopTabContentHolder(t){return t.children[1]}getTabContent(){return this.getIndentedPanel()}getTopTabContent(){return this.getTopIndentedPanel()}markTabActive(t){this.applyStyles(t.tab,{opacity:1,background:"white"}),typeof t.rowPane<"u"?t.rowPane.style.display="":t.container.style.display=""}markTabInactive(t){this.applyStyles(t.tab,{opacity:.5,background:""}),typeof t.rowPane<"u"?t.rowPane.style.display="none":t.container.style.display="none"}addTab(t,e){t.children[0].appendChild(e)}addTopTab(t,e){t.children[0].appendChild(e)}getBlockLink(){const t=document.createElement("a");return t.classList.add("je-block-link"),t}getBlockLinkHolder(){return document.createElement("div")}getLinksHolder(){return document.createElement("div")}createMediaLink(t,e,i){t.appendChild(e),i.classList.add("je-media"),t.appendChild(i)}createImageLink(t,e,i){t.appendChild(e),e.appendChild(i)}getFirstTab(t){return t.firstChild.firstChild}getInputGroup(t,e){}cleanText(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}getDropZone(t){const e=document.createElement("div");return e.setAttribute("data-text",t),e.classList.add("je-dropzone"),e}getUploadPreview(t,e,i){const s=document.createElement("div");if(s.classList.add("je-upload-preview"),t.mimeType.substr(0,5)==="image"){const a=document.createElement("img");a.src=i,s.appendChild(a)}const r=document.createElement("div");r.innerHTML+=`<strong>Name:</strong> ${t.name}<br><strong>Type:</strong> ${t.type}<br><strong>Size:</strong> ${t.formattedSize}`,s.appendChild(r),s.appendChild(e);const o=document.createElement("div");return o.style.clear="left",s.appendChild(o),s}getProgressBar(){const i=document.createElement("progress");return i.setAttribute("max",100),i.setAttribute("value",0),i}updateProgressBar(t,e){t&&t.setAttribute("value",e)}updateProgressBarUnknown(t){t&&t.removeAttribute("value")}}const Sc={".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"};class Co extends be{getFormInputLabel(t,e){const i=super.getFormInputLabel(t,e);return i.classList.add("je-form-input-label"),i}getFormInputDescription(t){const e=super.getFormInputDescription(t);return e.classList.add("je-form-input-label"),e}getIndentedPanel(){const t=super.getIndentedPanel();return t.classList.add("je-indented-panel"),t}getTopIndentedPanel(){return this.getIndentedPanel()}getChildEditorHolder(){const t=super.getChildEditorHolder();return t.classList.add("je-child-editor-holder"),t}getHeaderButtonHolder(){const t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}getTable(){const t=super.getTable();return t.classList.add("je-table"),t}addInputError(t,e){const i=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",i.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e)),t.errmsg.setAttribute("role","alert")}removeInputError(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}Co.rules=Sc;const Tc={};class Eo extends be{getSelectInput(t,e){const i=super.getSelectInput(t);return i.classList.add("form-control"),i}setGridColumnSize(t,e,i){t.classList.add(`col-md-${e}`),i&&t.classList.add(`col-md-offset-${i}`)}afterInputReady(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}getTextareaInput(){const t=document.createElement("textarea");return t.classList.add("form-control"),t}getRangeInput(t,e,i,s,r){return super.getRangeInput(t,e,i,s,r)}getFormInputField(t){const e=super.getFormInputField(t);return t!=="checkbox"&&t!=="radio"&&e.classList.add("form-control"),e}getHiddenLabel(t){const e=document.createElement("label");return e.textContent=t,e.classList.add("sr-only"),e}visuallyHidden(t){t&&t.classList.add("sr-only")}getHiddenText(t){const e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}getFormControl(t,e,i,s,r){const o=document.createElement("div");return t&&(e.type==="checkbox"||e.type==="radio")?(o.classList.add(e.type),s&&t.appendChild(s),t.insertBefore(e,t.firstChild),o.appendChild(t)):(o.classList.add("form-group"),t&&(t.classList.add("control-label"),o.appendChild(t),s&&t.appendChild(s)),o.appendChild(e)),i&&o.appendChild(i),e.tagName.toLowerCase()!=="div"&&e&&t&&r&&(t.setAttribute("for",r),e.setAttribute("id",r)),e.tagName.toLowerCase()!=="div"&&e&&i&&(i.setAttribute("id",r+"-description"),e.setAttribute("aria-describedby",r+"-description")),o}getIndentedPanel(){const t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}getInfoButton(t){const 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";const i=document.createElement("span");return i.style["font-family"]="sans-serif",i.style.visibility="hidden",i.style["background-color"]="rgba(50, 50, 50, .75)",i.style.margin="0 .25rem",i.style.color="#FAFAFA",i.style.padding=".5rem 1rem",i.style["border-radius"]=".25rem",i.style.width="25rem",i.style.position="absolute",i.innerText=t,e.onmouseover=()=>{i.style.visibility="visible"},e.onmouseleave=()=>{i.style.visibility="hidden"},e.appendChild(i),e}getFormInputDescription(t){const e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}getHeader(t,e){const i=document.createElement("span");return i.classList.add("h3"),typeof t=="string"?i.textContent=t:i.appendChild(t),i}getHeaderButtonHolder(){const t=this.getButtonHolder();return t.style.marginLeft="10px",t}getButtonHolder(){const t=document.createElement("span");return t.classList.add("btn-group"),t}getButton(t,e,i){const s=super.getButton(t,e,i);return s.classList.add("btn","btn-default"),s}getTableContainer(){const t=super.getTableContainer();return t.classList.add("table-responsive"),t}getTable(){const t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}addInputError(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,t.errmsg.setAttribute("role","alert"))}removeInputError(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}getTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.innerHTML=`<ul class='col-md-2 nav nav-pills nav-stacked' id='${e}' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='${e}'></div>`,i}getTopTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.innerHTML=`<ul class='nav nav-tabs' id='${e}' role='tablist'></ul><div class='tab-content active well well-small' id='${e}'></div>`,i}getTab(t,e){const i=document.createElement("li");i.setAttribute("role","presentation");const s=document.createElement("a");return s.setAttribute("href",`#${e}`),s.appendChild(t),s.setAttribute("aria-controls",e),s.setAttribute("role","tab"),s.setAttribute("data-toggle","tab"),i.appendChild(s),i}getTopTab(t,e){const i=document.createElement("li");i.setAttribute("role","presentation");const s=document.createElement("a");return s.setAttribute("href",`#${e}`),s.appendChild(t),s.setAttribute("aria-controls",e),s.setAttribute("role","tab"),s.setAttribute("data-toggle","tab"),i.appendChild(s),i}getTabContent(){const t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}getTopTabContent(){const t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}markTabActive(t){t.tab.classList.add("active"),typeof t.rowPane<"u"?t.rowPane.classList.add("active"):t.container.classList.add("active")}markTabInactive(t){t.tab.classList.remove("active"),typeof t.rowPane<"u"?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}getProgressBar(){const s=document.createElement("div");s.classList.add("progress");const r=document.createElement("div");return r.classList.add("progress-bar"),r.setAttribute("role","progressbar"),r.setAttribute("aria-valuenow",0),r.setAttribute("aria-valuemin",0),r.setAttribute("aria-valuenax",100),r.innerHTML="0%",s.appendChild(r),s}updateProgressBar(t,e){if(!t)return;const i=t.firstChild,s=`${e}%`;i.setAttribute("aria-valuenow",e),i.style.width=s,i.innerHTML=s}updateProgressBarUnknown(t){if(!t)return;const e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}getInputGroup(t,e){if(!t)return;const i=document.createElement("div");i.classList.add("input-group"),i.appendChild(t);const s=document.createElement("div");s.classList.add("input-group-btn"),i.appendChild(s);for(let r=0;r<e.length;r++)s.appendChild(e[r]);return i}}Eo.rules=Tc;const jc={".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"},$c={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"};class Lo extends be{constructor(t){super(t,$c)}getSelectInput(t,e){const i=super.getSelectInput(t);return i.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&i.classList.add("form-control-sm"),this.options.input_size==="large"&&i.classList.add("form-control-lg")):(i.classList.remove("form-control"),i.classList.add("custom-select"),this.options.input_size==="small"&&i.classList.add("custom-select-sm"),this.options.input_size==="large"&&i.classList.add("custom-select-lg")),i}getContainer(){const t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}setGridColumnSize(t,e,i){t.classList.add(`col-md-${e}`),i&&t.classList.add(`offset-md-${i}`)}afterInputReady(t){if(t.controlgroup)return;const e=t.name;t.id=e;const i=t.parentNode.parentNode.getElementsByTagName("label")[0];i&&(i.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}getTextareaInput(){const 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}getRangeInput(t,e,i,s,r){const o=super.getRangeInput(t,e,i,s,r);return this.options.custom_forms===!0&&(o.classList.remove("form-control"),o.classList.add("custom-range")),o}getStepperButtons(t){const e=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),r=document.createElement("button");r.setAttribute("type","button");const o=document.createElement("button");o.setAttribute("type","button"),e.appendChild(i),e.appendChild(t),e.appendChild(s),i.appendChild(r),s.appendChild(o),e.classList.add("input-group"),i.classList.add("input-group-prepend"),s.classList.add("input-group-append"),r.classList.add("btn"),r.classList.add("btn-secondary"),r.classList.add("stepper-down"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-up"),t.getAttribute("readonly")&&(r.setAttribute("disabled",!0),o.setAttribute("disabled",!0)),r.textContent="-",o.textContent="+";const l=(u,g)=>{g?u.value=Number(g):u.value=Number(u.value),u.setAttribute("initialized","1")},d=t.getAttribute("min"),h=t.getAttribute("max");return t.addEventListener("change",()=>{t.getAttribute("initialized")||t.setAttribute("initialized","1")}),r.addEventListener("click",()=>{t.getAttribute("initialized")?d?Number(t.value)>Number(d)&&t.stepDown():t.stepDown():l(t,d),re(t,"change")}),o.addEventListener("click",()=>{t.getAttribute("initialized")?h?Number(t.value)<Number(h)&&t.stepUp():t.stepUp():l(t,d),re(t,"change")}),e}getFormInputField(t){const e=super.getFormInputField(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}getHiddenLabel(t){const e=document.createElement("label");return e.textContent=t,e.classList.add("sr-only"),e}visuallyHidden(t){t&&t.classList.add("sr-only")}getHiddenText(t){const e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}getFormControl(t,e,i,s,r){const o=document.createElement("div");if(o.classList.add("form-group"),t&&(e.type==="checkbox"||e.type==="radio")){const a=document.createElement("div");this.options.custom_forms===!1?(a.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(a.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?a.classList.add("custom-checkbox"):a.classList.add("custom-radio")),a.appendChild(e),a.appendChild(t),s&&a.appendChild(s),o.appendChild(a)}else t&&(o.appendChild(t),s&&o.appendChild(s)),o.appendChild(e);return i&&o.appendChild(i),e.tagName.toLowerCase()!=="div"&&e&&t&&r&&(t.setAttribute("for",r),e.setAttribute("id",r)),e.tagName.toLowerCase()!=="div"&&e&&i&&(i.setAttribute("id",r+"-description"),e.setAttribute("aria-describedby",r+"-description")),o}getInfoButton(t){const 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;const i=document.createTextNode("ⓘ");return e.appendChild(i),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}getCheckbox(){return this.getFormInputField("checkbox")}getMultiCheckboxHolder(t,e,i,s){const r=document.createElement("div");r.classList.add("form-group"),e&&(r.appendChild(e),s&&e.appendChild(s));const o=document.createElement("div");return Object.values(t).forEach(a=>{const l=a.firstChild;o.appendChild(l)}),r.appendChild(o),i&&r.appendChild(i),r}getFormRadio(t){const e=this.getFormInputField("radio");for(const i in t)e.setAttribute(i,t[i]);return this.options.custom_forms===!1?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}getFormRadioLabel(t,e){const i=document.createElement("label");return this.options.custom_forms===!1?i.classList.add("form-check-label"):i.classList.add("custom-control-label"),i.appendChild(document.createTextNode(t)),i}getFormRadioControl(t,e,i){const s=document.createElement("div");return this.options.custom_forms===!1?s.classList.add("form-check"):s.classList.add("custom-control","custom-radio"),s.appendChild(e),s.appendChild(t),i&&(this.options.custom_forms===!1?s.classList.add("form-check-inline"):s.classList.add("custom-control-inline")),s}getIndentedPanel(){const 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}getFormInputDescription(t){const e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}getHeader(t,e){const i=document.createElement("span");return i.classList.add("h3"),i.classList.add("card-title"),i.classList.add("level-"+e),typeof t=="string"?i.textContent=t:i.appendChild(t),i.style.display="inline-block",i}getHeaderButtonHolder(){return this.getButtonHolder()}getButtonHolder(){const t=document.createElement("span");return t.classList.add("btn-group"),t}getFormButtonHolder(t){const e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-right"),e}getButton(t,e,i){const s=super.getButton(t,e,i);return s.classList.add("btn","btn-secondary","btn-sm"),s}getTableContainer(){const t=super.getTableContainer();return t.classList.add("table-responsive"),t}getTable(){const 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}getErrorMessage(t){const e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}addInputError(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,t.errmsg.setAttribute("role","alert"))}removeInputError(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}getTabHolder(t){const e=document.createElement("div"),i=typeof t>"u"?"":t;return e.innerHTML=`<div class='col-md-2' id='${i}'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='${i}'></div></div>`,e.classList.add("row"),e}addTab(t,e){t.children[0].children[0].appendChild(e)}getTabContentHolder(t){return t.children[1].children[0]}getTopTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.classList.add("card"),i.innerHTML=`<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='${e}'></ul></div><div class='card-body'><div class='tab-content' id='${e}'></div></div>`,i}getTab(t,e){const i=document.createElement("li");i.classList.add("nav-item");const s=document.createElement("a");return s.classList.add("nav-link"),s.setAttribute("href",`#${e}`),s.setAttribute("data-toggle","tab"),s.appendChild(t),i.appendChild(s),i}getTopTab(t,e){const i=document.createElement("li");i.classList.add("nav-item");const s=document.createElement("a");return s.classList.add("nav-link"),s.setAttribute("href",`#${e}`),s.setAttribute("data-toggle","tab"),s.appendChild(t),i.appendChild(s),i}getTabContent(){const t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}getTopTabContent(){const t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}markTabActive(t){t.tab.firstChild.classList.add("active"),typeof t.rowPane<"u"?t.rowPane.classList.add("active"):t.container.classList.add("active")}markTabInactive(t){t.tab.firstChild.classList.remove("active"),typeof t.rowPane<"u"?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}insertBasicTopTab(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}addTopTab(t,e){t.children[0].children[0].appendChild(e)}getTopTabContentHolder(t){return t.children[1].children[0]}getFirstTab(t){return t.firstChild.firstChild.firstChild}getProgressBar(){const s=document.createElement("div");s.classList.add("progress");const r=document.createElement("div");return r.classList.add("progress-bar"),r.setAttribute("role","progressbar"),r.setAttribute("aria-valuenow",0),r.setAttribute("aria-valuemin",0),r.setAttribute("aria-valuenax",100),r.innerHTML="0%",s.appendChild(r),s}updateProgressBar(t,e){if(!t)return;const i=t.firstChild,s=`${e}%`;i.setAttribute("aria-valuenow",e),i.style.width=s,i.innerHTML=s}updateProgressBarUnknown(t){if(!t)return;const e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}getBlockLink(){const t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}getLinksHolder(){return document.createElement("div")}getInputGroup(t,e){if(!t)return;const i=document.createElement("div");i.classList.add("input-group"),i.appendChild(t);const s=document.createElement("div");s.classList.add("input-group-append"),i.appendChild(s);for(let r=0;r<e.length;r++)e[r].classList.remove("mr-2","btn-secondary"),e[r].classList.add("btn-outline-secondary"),s.appendChild(e[r]);return i}}Lo.rules=jc;const Pc={".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"},Oc={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"};class Ao extends be{constructor(t){super(t,Oc)}getSelectInput(t,e){const i=super.getSelectInput(t);return i.classList.add("form-control"),i.classList.add("form-select"),this.options.input_size==="small"&&i.classList.add("form-control-sm"),this.options.input_size==="large"&&i.classList.add("form-control-lg"),i}getContainer(){const t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}setGridColumnSize(t,e,i){t.classList.add(`col-md-${e}`),i&&t.classList.add(`offset-md-${i}`)}afterInputReady(t){if(t.controlgroup)return;const e=t.name;t.id=e;const i=t.parentNode.parentNode.getElementsByTagName("label")[0];i&&(i.classList.add("form-label"),i.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}getTextareaInput(){const 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}getRangeInput(t,e,i,s,r){const o=super.getRangeInput(t,e,i,s,r);return o.classList.remove("form-control"),o.classList.add("form-range"),o}getStepperButtons(t){const e=document.createElement("div"),i=document.createElement("button");i.setAttribute("type","button");const s=document.createElement("button");s.setAttribute("type","button"),e.appendChild(i),e.appendChild(t),e.appendChild(s),e.classList.add("input-group"),i.classList.add("btn"),i.classList.add("btn-secondary"),i.classList.add("stepper-down"),s.classList.add("btn"),s.classList.add("btn-secondary"),s.classList.add("stepper-up"),t.getAttribute("readonly")&&(i.setAttribute("disabled",!0),s.setAttribute("disabled",!0)),i.textContent="-",s.textContent="+";const o=(d,h)=>{h?d.value=Number(h):d.value=Number(d.value),d.setAttribute("initialized","1")},a=t.getAttribute("min"),l=t.getAttribute("max");return t.addEventListener("change",()=>{t.getAttribute("initialized")||t.setAttribute("initialized","1")}),i.addEventListener("click",()=>{t.getAttribute("initialized")?a?Number(t.value)>Number(a)&&t.stepDown():t.stepDown():o(t,a),re(t,"change")}),s.addEventListener("click",()=>{t.getAttribute("initialized")?l?Number(t.value)<Number(l)&&t.stepUp():t.stepUp():o(t,a),re(t,"change")}),e}getFormInputField(t){const e=super.getFormInputField(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}getFormControl(t,e,i,s,r){const o=document.createElement("div");if(o.classList.add("form-group"),t&&(e.type==="checkbox"||e.type==="radio")){const a=document.createElement("div");a.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label"),e.tagName.toLowerCase()!=="div"&&e&&t&&r&&(t.setAttribute("for",r),e.setAttribute("id",r)),e.tagName.toLowerCase()!=="div"&&e&&i&&(i.setAttribute("id",r+"-description"),e.setAttribute("aria-describedby",r+"-description")),a.appendChild(e),a.appendChild(t),s&&a.appendChild(s),o.appendChild(a)}else t&&(t.classList.add("form-label"),o.appendChild(t),s&&o.appendChild(s)),o.appendChild(e);return i&&o.appendChild(i),o}getHiddenLabel(t){const e=document.createElement("label");return e.textContent=t,e.classList.add("visually-hidden"),e}visuallyHidden(t){t&&t.classList.add("visually-hidden")}getHiddenText(t){const e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}getInfoButton(t){const 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;const i=document.createTextNode("ⓘ");return e.appendChild(i),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}getCheckbox(){return this.getFormInputField("checkbox")}getMultiCheckboxHolder(t,e,i,s){const r=document.createElement("div");r.classList.add("form-group"),e&&(r.appendChild(e),s&&e.appendChild(s));const o=document.createElement("div");return Object.values(t).forEach(a=>{const l=a.firstChild;o.appendChild(l)}),r.appendChild(o),i&&r.appendChild(i),r}getFormRadio(t){const e=this.getFormInputField("radio");for(const i in t)e.setAttribute(i,t[i]);return e.classList.add("form-check-input"),e}getFormRadioLabel(t,e){const i=document.createElement("label");return i.classList.add("form-check-label"),i.appendChild(document.createTextNode(t)),i}getFormRadioControl(t,e,i){const s=document.createElement("div");return s.classList.add("form-check"),s.appendChild(e),s.appendChild(t),i&&s.classList.add("form-check-inline"),s}getIndentedPanel(){const 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}getFormInputDescription(t){const 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}getHeader(t,e){const i=document.createElement("span");return i.classList.add("h3"),i.classList.add("card-title"),i.classList.add("level-"+e),typeof t=="string"?i.textContent=t:i.appendChild(t),i.style.display="inline-block",i}getHeaderButtonHolder(){return this.getButtonHolder()}getButtonHolder(){const t=document.createElement("span");return t.classList.add("btn-group"),t}getFormButtonHolder(t){const e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-end"),e}getButton(t,e,i){const s=super.getButton(t,e,i);return s.classList.add("btn","btn-secondary","btn-sm"),s}getTableContainer(){const t=super.getTableContainer();return t.classList.add("table-responsive"),t}getTable(){const 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}getErrorMessage(t){const e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}addInputError(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,t.errmsg.setAttribute("role","alert"))}removeInputError(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}getTabHolder(t){const e=document.createElement("div"),i=typeof t>"u"?"":t;return e.innerHTML=`<div class='col-md-2' id='${i}'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='${i}'></div></div>`,e.classList.add("row"),e}addTab(t,e){t.children[0].children[0].appendChild(e)}getTabContentHolder(t){return t.children[1].children[0]}getTopTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.classList.add("card"),i.innerHTML=`<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='${e}'></ul></div><div class='card-body'><div class='tab-content' id='${e}'></div></div>`,i}getTab(t,e){const i=document.createElement("li");i.classList.add("nav-item");const s=document.createElement("a");return s.classList.add("nav-link"),s.setAttribute("href",`#${e}`),s.setAttribute("data-toggle","tab"),s.appendChild(t),i.appendChild(s),i}getTopTab(t,e){const i=document.createElement("li");i.classList.add("nav-item");const s=document.createElement("a");return s.classList.add("nav-link"),s.setAttribute("href",`#${e}`),s.setAttribute("data-toggle","tab"),s.appendChild(t),i.appendChild(s),i}getTabContent(){const t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}getTopTabContent(){const t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}markTabActive(t){t.tab.firstChild.classList.add("active"),typeof t.rowPane<"u"?t.rowPane.classList.add("active"):t.container.classList.add("active")}markTabInactive(t){t.tab.firstChild.classList.remove("active"),typeof t.rowPane<"u"?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}insertBasicTopTab(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}addTopTab(t,e){t.children[0].children[0].appendChild(e)}getTopTabContentHolder(t){return t.children[1].children[0]}getFirstTab(t){return t.firstChild.firstChild.firstChild}getProgressBar(){const s=document.createElement("div");s.classList.add("progress");const r=document.createElement("div");return r.classList.add("progress-bar"),r.setAttribute("role","progressbar"),r.setAttribute("aria-valuenow",0),r.setAttribute("aria-valuemin",0),r.setAttribute("aria-valuenax",100),r.innerHTML="0%",s.appendChild(r),s}updateProgressBar(t,e){if(!t)return;const i=t.firstChild,s=`${e}%`;i.setAttribute("aria-valuenow",e),i.style.width=s,i.innerHTML=s}updateProgressBarUnknown(t){if(!t)return;const e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}getBlockLink(){const t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}getLinksHolder(){return document.createElement("div")}getInputGroup(t,e){if(!t)return;const i=document.createElement("div");i.classList.add("input-group"),i.appendChild(t);for(let s=0;s<e.length;s++)e[s].classList.remove("me-2","btn-secondary"),e[s].classList.add("btn-outline-secondary"),i.appendChild(e[s]);return i}}Ao.rules=Pc;class ko extends be{getTable(){const t=super.getTable();return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}getTableHeaderCell(t){const e=super.getTableHeaderCell(t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}getTableCell(){const t=super.getTableCell();return t.classList.add("ui-widget-content"),t}getHeaderButtonHolder(){const t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}getFormInputDescription(t){const e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}getFormControl(t,e,i,s){const r=super.getFormControl(t,e,i,s);return e.type==="checkbox"?(r.style.lineHeight="25px",r.style.padding="3px 0"):r.style.padding="4px 0 8px 0",r}getDescription(t){const 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}getButtonHolder(){const t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}getFormInputLabel(t,e){const i=document.createElement("label");return i.style.fontWeight="bold",i.style.display="block",i.textContent=t,e&&i.classList.add("required"),i}getButton(t,e,i){const s=document.createElement("button");s.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(s.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),s.appendChild(e)):e?(s.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),s.appendChild(e)):s.classList.add("ui-button-text-only");const r=document.createElement("span");return r.classList.add("ui-button-text"),r.textContent=t||i||".",s.appendChild(r),s.setAttribute("title",i),s}setButtonText(t,e,i,s){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),i&&!e?(t.classList.add("ui-button-icon-only"),i.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(i)):i?(t.classList.add("ui-button-text-icon-primary"),i.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(i)):t.classList.add("ui-button-text-only");const r=document.createElement("span");r.classList.add("ui-button-text"),r.textContent=e||s||".",t.appendChild(r),t.setAttribute("title",s)}getIndentedPanel(){const 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}afterInputReady(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){const e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}addInputError(t,e){if(!t.controls){this.queuedInputErrorText=e;return}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}removeInputError(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}markTabActive(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),typeof t.rowPane<"u"?t.rowPane.style.display="":t.container.style.display=""}markTabInactive(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),typeof t.rowPane<"u"?t.rowPane.style.display="none":t.container.style.display="none"}}ko.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"'};const Ic={".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"};class So extends be{addInputError(t,e){if(t.errmsg)t.errmsg.style.display="block";else{const i=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),i.nodeName&&i.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e)),t.errmsg.setAttribute("role","alert")}removeInputError(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}So.rules=Ic;const Bc={"*":"--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"},Rc={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"};class To extends be{constructor(t){super(t,Rc)}setGridColumnSize(t,e,i){t.classList.add(`col-${e}`),i&&t.classList.add("col-mx-auto")}getGridContainer(){const t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}getGridRow(){const t=document.createElement("div");return t.classList.add("columns"),t}getGridColumn(){const t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}getIndentedPanel(){const t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}getTopIndentedPanel(){const t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}getHeaderButtonHolder(){return this.getButtonHolder()}getButtonHolder(){const t=super.getButtonHolder();return t.classList.add("btn-group"),t}getFormButtonHolder(t){const e=super.getFormButtonHolder();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}getFormButton(t,e,i){const s=super.getFormButton(t,e,i);return s.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&s.classList.remove("btn-sm"),this.options.input_size==="large"&&s.classList.add("btn-lg"),s}getButton(t,e,i){const s=super.getButton(t,e,i);return s.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),s}getHeader(t,e){const i=document.createElement("span");return typeof t=="string"?i.textContent=t:i.appendChild(t),i.style.display="inline-block",i}getFormInputDescription(t){const e=super.getFormInputDescription(t);return e.classList.add("je-desc","hide-sm"),e}getFormInputLabel(t,e){const i=super.getFormInputLabel(t,e);return this.options.label_bold&&i.classList.add("je-label"),i}getCheckbox(){return this.getFormInputField("checkbox")}getCheckboxLabel(t,e){const i=super.getCheckboxLabel(t,e),s=document.createElement("i");return s.classList.add("form-icon"),i.classList.add("form-checkbox","pr-0"),i.insertBefore(s,i.firstChild),i}getFormCheckboxControl(t,e,i){return t.insertBefore(e,t.firstChild),i&&t.classList.add("form-inline"),t}getMultiCheckboxHolder(t,e,i,s){return super.getMultiCheckboxHolder(t,e,i,s)}getFormRadio(t){const e=this.getFormInputField("radio");for(const i in t)e.setAttribute(i,t[i]);return e}getFormRadioLabel(t,e){const i=super.getFormRadioLabel(t,e),s=document.createElement("i");return s.classList.add("form-icon"),i.classList.add("form-radio"),i.insertBefore(s,i.firstChild),i}getFormRadioControl(t,e,i){return t.insertBefore(e,t.firstChild),i&&t.classList.add("form-inline"),t}getFormInputField(t){const e=super.getFormInputField(t);return["checkbox","radio"].includes(t)||e.classList.add("form-input"),e}getRangeInput(t,e,i,s,r){const o=super.getRangeInput(t,e,i,s,r);return o.classList.add("slider"),o.classList.remove("form-input"),o.setAttribute("oninput",'this.setAttribute("value", this.value)'),o}getRangeControl(t,e){const i=super.getRangeControl(t,e);return i.classList.add("text-center"),i}getSelectInput(t,e){const i=super.getSelectInput(t);return i.classList.add("form-select"),i}getTextareaInput(){const t=document.createElement("textarea");return t.classList.add("form-input"),t}getFormControl(t,e,i,s,r){const o=document.createElement("div");return o.classList.add("form-group"),t&&(e.type==="checkbox"||e.type==="radio")?(o.classList.add(e.type),s&&t.appendChild(s),t.insertBefore(e,t.firstChild),o.appendChild(t)):(t&&(t.classList.add("form-label"),o.appendChild(t),s&&t.appendChild(s)),o.appendChild(e)),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"&&o.appendChild(e),i&&o.appendChild(i),e.tagName.toLowerCase()!=="div"&&e&&t&&r&&(t.setAttribute("for",r),e.setAttribute("id",r)),e.tagName.toLowerCase()!=="div"&&e&&i&&(i.setAttribute("id",r+"-description"),e.setAttribute("aria-describedby",r+"-description")),o}getInputGroup(t,e){if(!t)return;const i=document.createElement("div");i.classList.add("input-group"),i.appendChild(t);for(let s=0;s<e.length;s++)e[s].classList.add("input-group-btn"),e[s].classList.remove("btn-sm","mr-2","my-1"),i.appendChild(e[s]);return i}getInfoButton(t){const e=document.createElement("div");e.classList.add("popover","popover-left","float-right");const i=document.createElement("button");i.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),i.setAttribute("tabindex","-1"),e.appendChild(i);const s=document.createTextNode("I");i.appendChild(s);const r=document.createElement("div");r.classList.add("popover-container"),e.appendChild(r);const o=document.createElement("div");o.classList.add("card"),r.appendChild(o);const a=document.createElement("div");return a.classList.add("card-body"),a.innerHTML=t,o.appendChild(a),e}getTable(){const t=super.getTable();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}getProgressBar(){const t=super.getProgressBar();return t.classList.add("progress"),t}getTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.classList.add("columns"),i.innerHTML=`<div class="column col-2"></div><div class="column col-10 content" id="${e}"></div>`,i}getTopTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.innerHTML=`<ul class="tab"></ul><div class="content" id="${e}"></div>`,i}getTab(t,e){const i=document.createElement("a");return i.classList.add("btn","btn-secondary","btn-block"),i.setAttribute("href",`#${e}`),i.appendChild(t),i}getTopTab(t,e){const i=document.createElement("li");i.id=e,i.classList.add("tab-item");const s=document.createElement("a");return s.setAttribute("href",`#${e}`),s.appendChild(t),i.appendChild(s),i}markTabActive(t){t.tab.classList.add("active"),typeof t.rowPane<"u"?t.rowPane.style.display="":t.container.style.display=""}markTabInactive(t){t.tab.classList.remove("active"),typeof t.rowPane<"u"?t.rowPane.style.display="none":t.container.style.display="none"}afterInputReady(t){if(t.localName==="select"){if(t.classList.contains("selectized")){const e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach(i=>{i.classList.remove("form-select")}))}else if(t.classList.contains("select2-hidden-accessible")){const e=t.nextSibling;e&&e.querySelector(".select2-selection--single")&&e.classList.add("form-select")}}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}addInputError(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,t.errmsg.setAttribute("role","alert"))}removeInputError(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}To.rules=Bc;const Dc={".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"},Nc={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};class jo extends be{constructor(t){super(t,Nc)}getGridContainer(){const t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}getGridRow(){const t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}getGridColumn(){const t=document.createElement("div");return t.classList.add("flex","flex-col"),t}setGridColumnSize(t,e,i){e>0&&e<12?t.classList.add(`w-${e}/12`,"px-1"):t.classList.add("w-full","px-1"),i&&(t.style.marginLeft=`${100/12*i}%`)}getIndentedPanel(){const 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}getTopIndentedPanel(){const 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}getTitle(){return this.translateProperty(this.schema.title)}getSelectInput(t,e){const i=super.getSelectInput(t);return e?i.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"):i.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&&i.classList.add("compact"),i}afterInputReady(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}getTextareaInput(){const t=super.getTextareaInput();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}getRangeInput(t,e,i){const s=this.getFormInputField("range");return s.classList.add("slider"),this.options.enable_compact&&s.classList.add("compact"),s.setAttribute("oninput",'this.setAttribute("value", this.value)'),s.setAttribute("min",t),s.setAttribute("max",e),s.setAttribute("step",i),s}getRangeControl(t,e){const i=super.getRangeControl(t,e);return i.classList.add("text-center","text-black"),i}getCheckbox(){const t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}getCheckboxLabel(t,e){const i=super.getCheckboxLabel(t,e);return i.classList.add("inline-flex","items-center"),i}getFormCheckboxControl(t,e,i){return t.insertBefore(e,t.firstChild),i&&t.classList.add("inline-flex flex-row"),t}getMultiCheckboxHolder(t,e,i,s){const r=super.getMultiCheckboxHolder(t,e,i,s);return r.classList.add("inline-flex","flex-col"),r}getFormRadio(t){const e=this.getFormInputField("radio");e.classList.add("form-radio","text-red-600");for(const i in t)e.setAttribute(i,t[i]);return e}getFormRadioLabel(t,e){const i=super.getFormRadioLabel(t,e);return i.classList.add("inline-flex","items-center","mr-2"),i}getFormRadioControl(t,e,i){return t.insertBefore(e,t.firstChild),i&&t.classList.add("form-radio"),t}getRadioHolder(t,e,i,s,r){const o=super.getRadioHolder(e,i,s,r);return t.options.layout==="h"?o.classList.add("inline-flex","flex-row"):o.classList.add("inline-flex","flex-col"),o}getFormInputLabel(t,e){const i=super.getFormInputLabel(t,e);return this.options.label_bold?i.classList.add("font-bold"):i.classList.add("required"),i}getFormInputField(t){const e=super.getFormInputField(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}getFormInputDescription(t){const 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}getFormControl(t,e,i,s){const r=document.createElement("div");return r.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,s)),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,s)),r.appendChild(t),!["checkbox","radio"].includes(e.type)&&s&&r.appendChild(s)),["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"),r.appendChild(e)),i&&r.appendChild(i),r}getHeaderButtonHolder(){const t=this.getButtonHolder();return t.classList.add("text-sm"),t}getButtonHolder(){const t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}getButton(t,e,i){const s=super.getButton(t,e,i);return s.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"),s}getInfoButton(t){const e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";const i=document.createElement("span");return i.innerHTML=t,e.appendChild(i),e}getTable(){const t=super.getTable();return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}getTableRow(){const t=super.getTableRow();return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}getTableHeaderCell(t){const e=super.getTableHeaderCell(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}getTableCell(){const t=super.getTableCell();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}addInputError(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)}removeInputError(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}getTabHolder(t){const e=document.createElement("div"),i=typeof t>"u"?"":t;return e.innerHTML=`<div class='w-2/12' id='${i}'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='${i}'></div>`,e.classList.add("flex"),e}addTab(t,e){t.children[0].children[0].appendChild(e)}getTopTabHolder(t){const e=typeof t>"u"?"":t,i=document.createElement("div");return i.innerHTML=`<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='${e}'></ul><div class='p-6 block' id='${e}'></div>`,i}getTab(t,e){const i=document.createElement("li");i.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");const s=document.createElement("a");return s.classList.add("nav-link","text-center"),s.setAttribute("href",`#${e}`),s.setAttribute("data-toggle","tab"),s.appendChild(t),i.appendChild(s),i}getTopTab(t,e){const i=document.createElement("li");i.classList.add("nav-item","flex","border-l","border-t","border-r");const s=document.createElement("a");return s.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),s.setAttribute("href",`#${e}`),s.setAttribute("data-toggle","tab"),s.appendChild(t),i.appendChild(s),i}getTabContent(){const t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}getTopTabContent(){const t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}markTabActive(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")}markTabInactive(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"))}getProgressBar(){const s=document.createElement("div");s.classList.add("progress");const r=document.createElement("div");return r.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),r.setAttribute("role","progressbar"),r.setAttribute("aria-valuenow",0),r.setAttribute("aria-valuemin",0),r.setAttribute("aria-valuenax",100),r.innerHTML="0%",s.appendChild(r),s}updateProgressBar(t,e){if(!t)return;const i=t.firstChild,s=`${e}%`;i.setAttribute("aria-valuenow",e),i.style.width=s,i.innerHTML=s}updateProgressBarUnknown(t){if(!t)return;const 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=""}getInputGroup(t,e){if(!t)return;const i=document.createElement("div");i.classList.add("relative","items-stretch","w-full"),i.appendChild(t);const s=document.createElement("div");s.classList.add("-mr-1"),i.appendChild(s);for(let r=0;r<e.length;r++)s.appendChild(e[r]);return i}}jo.rules=Dc;const Mc={html:Co,bootstrap3:Eo,bootstrap4:Lo,bootstrap5:Ao,jqueryui:ko,barebones:So,spectre:To,tailwind:jo},Hc={".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"};class tt{constructor(t,e={}){if(!(t instanceof Element))throw new Error("element should be an instance of Element");this.element=t,this.options=$({},tt.defaults.options,e),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||tt.defaults.translate,this.translateProperty=this.options.translateProperty||tt.defaults.translateProperty,this.uuid=0,this.__data={};const i=this.options.theme||tt.defaults.theme,s=tt.defaults.themes[i];if(!s)throw new Error(`Unknown theme ${i}`);this.element.setAttribute("data-theme",i),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new s(this);const r=$(Hc,this.getEditorsRules()),o=(l,d,h)=>h?this.addNewStyleRulesToShadowRoot(l,d,h):this.addNewStyleRules(l,d);if(!this.theme.options.disable_theme_rules){const l=po(this.element);o("default",r,l),typeof s.rules<"u"&&o(i,s.rules,l)}const a=tt.defaults.iconlibs[this.options.iconlib||tt.defaults.iconlib];a&&(this.iconlib=new a),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}async load(){const t=document.location.origin+document.location.pathname.toString(),e=new tc(this.options);e.onSchemaLoaded=a=>{this.trigger("schemaLoaded",a)},e.onAllSchemasLoaded=()=>{this.trigger("allSchemasLoaded")},this.expandSchema=a=>e.expandSchema(a),this.expandRefs=(a,l)=>e.expandRefs(a,l);const i=document.location.toString(),s=await e.load(this.schema,t,i),r=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{};this.validator=new yo(this,null,r,tt.defaults);const o=this.getEditorClass(s);this.root=this.createEditor(o,{jsoneditor:this,schema:s,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),Wt(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(()=>{this.ready&&(this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.trigger("ready"),this.trigger("change"))})}getValue(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}setValue(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(t),this}validate(t){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(t):this.validation_results}destroy(){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)}on(t,e){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(e),this}off(t,e){if(t&&e){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];const i=[];for(let s=0;s<this.callbacks[t].length;s++)this.callbacks[t][s]!==e&&i.push(this.callbacks[t][s]);this.callbacks[t]=i}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}trigger(t,e){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(let i=0;i<this.callbacks[t].length;i++)this.callbacks[t][i].apply(this,[e]);return this}setOption(t,e){if(t==="show_errors")this.options.show_errors=e,this.onChange();else throw new Error(`Option ${t} must be set during instantiation and cannot be changed later`);return this}getEditorsRules(){const t=(e,i)=>i.rules?$(e,i.rules):e;return Object.values(tt.defaults.editors).reduce(t,{})}getEditorClass(t){let e;if(t=this.expandSchema(t),tt.defaults.resolvers.find(i=>(e=i(t,this),e&&tt.defaults.editors[e])),!e)throw new Error(`Unknown editor for schema ${JSON.stringify(t)}`);if(!tt.defaults.editors[e])throw new Error(`Unknown editor ${e}`);return tt.defaults.editors[e]}createEditor(t,e,i=1){return e=$({},t.options||{},e),new t(e,tt.defaults,i)}onChange(){if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame(()=>{this.firing_change=!1,this.ready&&(this.validation_results=this.validator.validate(this.root.getValue()),this.options.show_errors!=="never"?this.root.showValidationErrors(this.validation_results):this.root.showValidationErrors([]),this.trigger("change"))}),this}compileTemplate(t,e=tt.defaults.template){let i;if(typeof e=="string"){if(!tt.defaults.templates[e])throw new Error(`Unknown template engine ${e}`);if(i=tt.defaults.templates[e](),!i)throw new Error(`Template engine ${e} missing required library.`)}else i=e;if(!i)throw new Error("No template engine set");if(!i.compile)throw new Error("Invalid template engine set");return i.compile(t)}_data(t,e,i){if(arguments.length===3){let s;t.hasAttribute(`data-jsoneditor-${e}`)?s=t.getAttribute(`data-jsoneditor-${e}`):(s=this.uuid++,t.setAttribute(`data-jsoneditor-${e}`,s)),this.__data[s]=i}else return t.hasAttribute(`data-jsoneditor-${e}`)?this.__data[t.getAttribute(`data-jsoneditor-${e}`)]:null}registerEditor(t){return this.editors=this.editors||{},this.editors[t.path]=t,this}unregisterEditor(t){return this.editors=this.editors||{},this.editors[t.path]=null,this}getEditor(t){if(this.editors)return this.editors[t]}watch(t,e){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(e),this}unwatch(t,e){if(!this.watchlist||!this.watchlist[t])return this;if(!e)return this.watchlist[t]=null,this;const i=[];for(let s=0;s<this.watchlist[t].length;s++)this.watchlist[t][s]!==e&&i.push(this.watchlist[t][s]);return this.watchlist[t]=i.length?i:null,this}notifyWatchers(t){if(!this.watchlist||!this.watchlist[t])return this;for(let e=0;e<this.watchlist[t].length;e++)this.watchlist[t][e]()}isEnabled(){return!this.root||this.root.isEnabled()}enable(){this.root.enable()}disable(){this.root.disable()}setCopyClipboardContents(t){this.copyClipboard=t}getCopyClipboardContents(){return this.copyClipboard}addNewStyleRules(t,e){let i=document.querySelector(`#theme-${t}`);i||(i=document.createElement("style"),i.setAttribute("id",`theme-${t}`),i.appendChild(document.createTextNode("")),document.head.appendChild(i));const s=i.sheet?i.sheet:i.styleSheet,r=this.element.nodeName.toLowerCase();for(;s.cssRules.length>0;)s.deleteRule(0);Object.keys(e).forEach(o=>{const a=t==="default"?o:`${r}[data-theme="${t}"] ${o}`;s.insertRule?s.insertRule(a+" {"+decodeURIComponent(e[o])+"}",0):s.addRule&&s.addRule(a,decodeURIComponent(e[o]),0)})}addNewStyleRulesToShadowRoot(t,e,i){const s=this.element.nodeName.toLowerCase();let r="";Object.keys(e).forEach(a=>{const l=t==="default"?a:`${s}[data-theme="${t}"] ${a}`;r+=l+" {"+decodeURIComponent(e[a])+`}
|
|
71
|
+
`});const o=new CSSStyleSheet;o.replaceSync(r),i.adoptedStyleSheets=[...i.adoptedStyleSheets,o]}}tt.defaults=Ie,tt.AbstractEditor=Bt,tt.AbstractTheme=be,tt.AbstractIconLib=ge,Object.assign(tt.defaults.themes,Mc),Object.assign(tt.defaults.editors,es),Object.assign(tt.defaults.templates,ec),Object.assign(tt.defaults.iconlibs,kc);const Vc=`
|
|
85
72
|
* {
|
|
86
73
|
font-family: Roboto, sans-serif;
|
|
87
74
|
}
|
|
88
|
-
`,
|
|
75
|
+
`,Er=`
|
|
89
76
|
input[type=checkbox] {
|
|
90
77
|
appearance: none;
|
|
91
78
|
-webkit-appearance: none;
|
|
@@ -108,7 +95,7 @@ input[type=checkbox]:checked:after {
|
|
|
108
95
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
109
96
|
|
|
110
97
|
}
|
|
111
|
-
|
|
98
|
+
`,$o=`
|
|
112
99
|
input[type=radio] {
|
|
113
100
|
appearance: none;
|
|
114
101
|
-webkit-appearance: none;
|
|
@@ -136,7 +123,7 @@ input[type=radio]:checked:after {
|
|
|
136
123
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
137
124
|
|
|
138
125
|
}
|
|
139
|
-
`,
|
|
126
|
+
`,Po=`
|
|
140
127
|
input[type="range"] {
|
|
141
128
|
-webkit-appearance: none;
|
|
142
129
|
width: 90%;
|
|
@@ -213,10 +200,10 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
213
200
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
214
201
|
border: 0;
|
|
215
202
|
}
|
|
216
|
-
`,
|
|
217
|
-
${
|
|
218
|
-
${
|
|
219
|
-
${
|
|
203
|
+
`,Fc=`
|
|
204
|
+
${Er}
|
|
205
|
+
${$o}
|
|
206
|
+
${Po}
|
|
220
207
|
|
|
221
208
|
[data-schemaid=root] > .je-header {
|
|
222
209
|
display: none;
|
|
@@ -239,7 +226,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
239
226
|
display: block;
|
|
240
227
|
margin: 0.5rem 0;
|
|
241
228
|
}
|
|
242
|
-
`;function pu(m){return!(m===null||typeof m!="object"||m.nodeType||m===m.window||m.constructor&&!Jo(m.constructor.prototype,"isPrototypeOf"))}function fu(m){return pu(m)?$a({},m):Array.isArray(m)?m.map(fu):m}function $a(m,...s){return s.forEach(p=>{p&&Object.keys(p).forEach(b=>{p[b]&&pu(p[b])?(Jo(m,b)||(m[b]={}),$a(m[b],p[b])):Array.isArray(p[b])?m[b]=fu(p[b]):m[b]=p[b]})}),m}function Jo(m,s){return m&&Object.prototype.hasOwnProperty.call(m,s)}class rp{constructor(s,p){this.defaults=p,this.jsoneditor=s.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=s.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=$a({},this.options||{},this.schema.options||{},s.schema.options||{},s),this.formname=this.jsoneditor.options.form_name_root||"root",!s.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=s.path||this.formname,this.formname=s.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=s.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,s.container&&this.setContainer(s.container),this.registerDependencies()}onChildEditorChange(s){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(s){this.notify(),this.watch_listener&&this.watch_listener(),s&&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 s=this.options.dependencies;s&&Object.keys(s).forEach(p=>{let b;p.startsWith(this.jsoneditor.root.path)?b=p:(b=this.path.split("."),b[b.length-1]=p,b=b.join(".")),this.jsoneditor.watch(b,()=>{this.evaluateDependencies()})})}evaluateDependencies(){const s=this.container||this.control;if(!s||this.jsoneditor===null)return;const p=this.options.dependencies;if(!p)return;const b=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(p).forEach(E=>{let y;E.startsWith(this.jsoneditor.root.path)?y=E:(y=this.path.split("."),y[y.length-1]=E,y=y.join("."));const r=p[E];this.checkDependency(y,r)}),this.dependenciesFulfilled!==b&&this.notify();let _=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(_="none"),s.tagName==="TD"?Object.keys(s.childNodes).forEach(E=>s.childNodes[E].style.display=_):s.style.display=_}checkDependency(s,p){if(this.path===s||this.jsoneditor===null)return;const b=this.jsoneditor.getEditor(s),_=b?b.getValue():void 0;!b||!b.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(p)?this.dependenciesFulfilled=p.some(E=>{if(JSON.stringify(_)===JSON.stringify(E))return!0}):typeof p=="object"?typeof _!="object"?this.dependenciesFulfilled=p===_:Object.keys(p).some(E=>{if(!Jo(p,E))return!1;if(!Jo(_,E)||p[E]!==_[E])return this.dependenciesFulfilled=!1,!0}):typeof p=="string"||typeof p=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&_===p:typeof p=="boolean"&&(p?this.dependenciesFulfilled=this.dependenciesFulfilled&&(_||_.length>0):this.dependenciesFulfilled=this.dependenciesFulfilled&&(!_||_.length===0))}setContainer(s){this.container=s,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(s){this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",()=>{this.isActive()?this.deactivate():this.activate()});const p=this.jsoneditor.options.show_opt_in,b=typeof this.parent.options.show_opt_in<"u",_=b&&this.parent.options.show_opt_in===!0,E=b&&this.parent.options.show_opt_in===!1;(_||!E&&p||!b&&p)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}preBuild(){}build(){}postBuild(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}setupWatchListeners(){if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=()=>{this.refreshWatchedFieldValues()&&this.onWatchedFieldChange()},Jo(this.schema,"watch")){let s,p,b,_,E;const y=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(j=>{if(s=this.schema.watch[j],Array.isArray(s)){if(s.length<2)return;p=[s[0]].concat(s[1].split("."))}else p=s.split("."),this.theme.closest(this.container,`[data-schemaid="${p[0]}"]`)||p.unshift("#");if(b=p.shift(),b==="#"&&(b=this.jsoneditor.schema.id||this.jsoneditor.root.formname),_=this.theme.closest(this.container,`[data-schemaid="${b}"]`),!_)throw new Error(`Could not find ancestor node with id ${b}`);E=`${_.getAttribute("data-schemapath")}.${p.join(".")}`,y.startsWith(E)&&(this.watchLoop=!0),this.jsoneditor.watch(E,this.watch_listener),this.watched[j]=E})}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 s=0;s<this.schema.links.length;s++)this.addLink(this.getLink(this.schema.links[s]))}onMove(){}getButton(s,p,b,_=[]){const E=`json-editor-btn-${p}`;this.iconlib?p=this.iconlib.getIcon(p):p=null,s=this.translate(s,_),b=this.translate(b,_),!p&&b&&(s=b,b=null);const y=this.theme.getButton(s,p,b);return y.classList.add(E),y}setButtonText(s,p,b,_,E=[]){return this.iconlib?b=this.iconlib.getIcon(b):b=null,p=this.translate(p,E),_=this.translate(_,E),!b&&_&&(p=_,_=null),this.theme.setButtonText(s,p,b,_)}addLink(s){this.link_holder&&this.link_holder.appendChild(s)}getLink(s){let p,b;const E=(s.mediaType||"application/javascript").split("/")[0],y=this.jsoneditor.compileTemplate(s.href,this.template_engine),j=this.jsoneditor.compileTemplate(s.rel?s.rel:s.href,this.template_engine);let r=null;if(s.download&&(r=s.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),E==="image"){p=this.theme.getBlockLinkHolder(),b=document.createElement("a"),b.setAttribute("target","_blank");const v=document.createElement("img");this.theme.createImageLink(p,b,v),this.link_watchers.push(g=>{const w=y(g),k=j(g);b.setAttribute("href",w),b.setAttribute("title",k||w),v.setAttribute("src",w)})}else if(["audio","video"].includes(E)){p=this.theme.getBlockLinkHolder(),b=this.theme.getBlockLink(),b.setAttribute("target","_blank");const v=document.createElement(E);v.setAttribute("controls","controls"),this.theme.createMediaLink(p,b,v),this.link_watchers.push(g=>{const w=y(g),k=j(g);b.setAttribute("href",w),b.textContent=k||w,v.setAttribute("src",w)})}else b=p=this.theme.getBlockLink(),p.setAttribute("target","_blank"),p.textContent=s.rel,p.style.display="none",this.link_watchers.push(v=>{const g=y(v),w=j(v);g&&(p.style.display=""),p.setAttribute("href",g),p.textContent=w||g});return r&&b&&(r===!0?b.setAttribute("download",""):this.link_watchers.push(v=>{b.setAttribute("download",r(v))})),s.class&&b.classList.add(s.class),p}refreshWatchedFieldValues(){if(!this.watched_values)return;const s={};let p=!1;return this.watched&&Object.keys(this.watched).forEach(b=>{const _=this.jsoneditor.getEditor(this.watched[b]),E=_?_.getValue():null;this.watched_values[b]!==E&&(p=!0),s[b]=E}),s.self=this.getValue(),this.watched_values.self!==s.self&&(p=!0),this.watched_values=s,p}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const s=this.getHeaderText();if(this.header.children.length){for(let p=0;p<this.header.childNodes.length;p++)if(this.header.childNodes[p].nodeType===3){this.header.childNodes[p].nodeValue=this.cleanText(s);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(s):this.header.textContent=this.cleanText(s)}}getHeaderText(s){return this.header_text?this.header_text:s?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(s){const p=document.createElement("div");return p.innerHTML=s,p.textContent||p.innerText}onWatchedFieldChange(){let s;if(this.header_template){s=$a(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:this.key*1,i1:this.key*1+1,title:this.getTitle()}),Object.keys(this.editors).length&&(s.properties={},Object.keys(this.editors).forEach(b=>{const _=this.editors[b];if(_.schema&&_.schema.enum&&_.schema.options&&_.schema.options.enum_titles){const E=_.schema.enum.indexOf(_.value),y=_.options.enum_titles[E];s.properties[b]={enumTitle:y}}}));const p=this.header_template(s);p!==this.header_text&&(this.header_text=p,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){s=this.getWatchedFieldValues();for(let p=0;p<this.link_watchers.length;p++)this.link_watchers[p](s)}}setValue(s){this.value=s}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(s=>this.jsoneditor.unwatch(s,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 s=this.schema.type||this.schema.oneOf;if(s&&Array.isArray(s)&&(s=s[0]),s&&typeof s=="object"&&(s=s.type),s&&Array.isArray(s)&&(s=s[0]),typeof s=="string"){if(s==="number")return this.isDefaultRequired()?0:void 0;if(s==="boolean")return this.isDefaultRequired()?!1:void 0;if(s==="integer")return this.isDefaultRequired()?0:void 0;if(s==="string")return this.isDefaultRequired()?"":void 0;if(s==="null")return null;if(s==="object")return{};if(s==="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(s){const p=[],b={};s.forEach(E=>{E.title&&(b[E.title]=b[E.title]||0,b[E.title]++),E.description&&(b[E.description]=b[E.description]||0,b[E.description]++),E.format&&(b[E.format]=b[E.format]||0,b[E.format]++),E.type&&(b[E.type]=b[E.type]||0,b[E.type]++)}),s.forEach(E=>{let y;typeof E=="string"?y=E:E.title&&b[E.title]<=1?y=E.title:E.format&&b[E.format]<=1?y=E.format:E.type&&b[E.type]<=1?y=E.type:E.description&&b[E.description]<=1?y=E.description:E.title?y=E.title:E.format?y=E.format:E.type?y=E.type:E.description?y=E.description:JSON.stringify(E).length<500?y=JSON.stringify(E):y="type",p.push(y)});const _={};return p.forEach((E,y)=>{_[E]=_[E]||0,_[E]++,b[E]>1&&(p[y]=`${E} ${_[E]}`)}),p}getValidId(s){return s=s===void 0?"":s.toString(),s.replace(/\s+/g,"-")}setInputAttributes(s){if(this.schema.options&&this.schema.options.inputAttributes){const p=this.schema.options.inputAttributes,b=["name","type"].concat(s);Object.keys(p).forEach(_=>{b.includes(_.toLowerCase())||this.input.setAttribute(_,p[_])})}}setContainerAttributes(){if(this.schema.options&&this.schema.options.containerAttributes){const s=this.schema.options.containerAttributes,p=["data-schemapath","data-schematype","data-schemaid"];Object.keys(s).forEach(b=>{p.includes(b.toLowerCase())||this.container.setAttribute(b,s[b])})}}expandCallbacks(s,p){const b=this.defaults.callbacks[s];return Object.entries(p).forEach(([_,E])=>{E===Object(E)?p[_]=this.expandCallbacks(s,E):typeof E=="string"&&typeof b=="object"&&typeof b[E]=="function"&&(p[_]=b[E].bind(null,this))}),p}showValidationErrors(s){}}(()=>{var m=E=>E==null?!1:typeof E=="boolean"?E:E.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var s="min-label",p="max-label",b="#1E293B",_=()=>{let E=null,y=null,j=null,r,v=!1,g=b,w="",k,O=null,C=null,S=null,T=[],A=()=>{var U;let H=(U=E==null?void 0:E.shadowRoot)==null?void 0:U.querySelector(".range-slider-box");O=document.createElement("div"),O.classList.add("labels-row"),H.prepend(O)},R=U=>{let H=document.createElement("label");return H.className=U,H.setAttribute("for","range-slider"),H},I=()=>{C=R(s),C.textContent=N(j==null?void 0:j.getTextMin(),w),S=R(p),S.textContent=N(j==null?void 0:j.getTextMax(),w),y==null||y.before(C),y==null||y.after(S);let U=j==null?void 0:j.getValues();if(U)for(let H=0;H<U.length;H++){let X=R(`value${H+1}-label generated-label`);X.textContent=N(U[H],w),T.push(X),O==null||O.append(X)}},$=()=>{for(let U of T)!U||U.remove();C==null||C.remove(),S==null||S.remove(),O==null||O.remove(),T=[]},M=U=>{v=U,v?(A(),I()):$()},B=U=>{g=U;for(let H of T)!H||(H.style.color=g??b);C&&(C.style.color=g??b),S&&(S.style.color=g??b)},q=U=>{w=U,r&&r()},F=()=>{!j||!O||O.classList.toggle("is-reversed",j.isRightToLeft()||j.isBottomToTop())},N=(U,H)=>{let X=`${(U??"").toString()}${H}`;return k&&typeof k=="function"?k(U):X};return{get name(){return"Generated Labels"},init:(U,H,X,Y)=>{var K,tt,it;E=U,j=Y,y=(K=U.shadowRoot)==null?void 0:K.getElementById("range-slider"),r=H,g=(tt=E.getAttribute("generate-labels-text-color"))!=null?tt:b,w=(it=E.getAttribute("generate-labels-units"))!=null?it:"",M(m(E.getAttribute("generate-labels"))),F(),B(g)},update:U=>{if(!(!v||!U.values)){F();for(let H=0;H<U.values.length;H++){let X=U.values[H],Y=T[H];if(X===void 0&&Y){Y.remove(),T[H]=void 0;continue}if(X!==void 0&&!Y){let K=R(`value${H+1}-label generated-label`);if(K.textContent=N(X,w),T[H]=K,U.values.length<=0)O==null||O.append(K);else if(H===0)O==null||O.append(K);else{let tt=T[H-1];tt==null||tt.after(K)}continue}!Y||(Y.textContent=N(X,w))}C&&(C.textContent=N(U.textMin,w)),S&&(S.textContent=N(U.textMax,w)),B(g)}},onAttrChange:(U,H)=>{U==="generate-labels"&&M(m(H)),U==="generate-labels-text-color"&&B(H),U==="generate-labels-units"&&q(H)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return v??!1},set:U=>{M(m(U))}}},{name:"textColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"generateLabelsTextColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"units",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsUnits",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsFormat",attributes:{get(){return k},set:U=>{k=U,r&&r()}}}],css:`
|
|
229
|
+
`;(()=>{var n=r=>r==null?!1:typeof r=="boolean"?r:r.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var t="min-label",e="max-label",i="#1E293B",s=()=>{let r=null,o=null,a=null,l,d=!1,h=i,u="",g,m=null,y=null,w=null,A=[],et=()=>{var T;let N=(T=r==null?void 0:r.shadowRoot)==null?void 0:T.querySelector(".range-slider-box");m=document.createElement("div"),m.classList.add("labels-row"),N.prepend(m)},W=T=>{let N=document.createElement("label");return N.className=T,N.setAttribute("for","range-slider"),N},_t=()=>{y=W(t),y.textContent=ot(a==null?void 0:a.getTextMin(),u),w=W(e),w.textContent=ot(a==null?void 0:a.getTextMax(),u),o==null||o.before(y),o==null||o.after(w);let T=a==null?void 0:a.getValues();if(T)for(let N=0;N<T.length;N++){let xt=W(`value${N+1}-label generated-label`);xt.textContent=ot(T[N],u),A.push(xt),m==null||m.append(xt)}},pt=()=>{for(let T of A)!T||T.remove();y==null||y.remove(),w==null||w.remove(),m==null||m.remove(),A=[]},kt=T=>{d=T,d?(et(),_t()):pt()},H=T=>{h=T;for(let N of A)!N||(N.style.color=h??i);y&&(y.style.color=h??i),w&&(w.style.color=h??i)},ut=T=>{u=T,l&&l()},Rt=()=>{!a||!m||m.classList.toggle("is-reversed",a.isRightToLeft()||a.isBottomToTop())},ot=(T,N)=>{let xt=`${(T??"").toString()}${N}`;return g&&typeof g=="function"?g(T):xt};return{get name(){return"Generated Labels"},init:(T,N,xt,Ct)=>{var St,Xt,Jt;r=T,a=Ct,o=(St=T.shadowRoot)==null?void 0:St.getElementById("range-slider"),l=N,h=(Xt=r.getAttribute("generate-labels-text-color"))!=null?Xt:i,u=(Jt=r.getAttribute("generate-labels-units"))!=null?Jt:"",kt(n(r.getAttribute("generate-labels"))),Rt(),H(h)},update:T=>{if(!(!d||!T.values)){Rt();for(let N=0;N<T.values.length;N++){let xt=T.values[N],Ct=A[N];if(xt===void 0&&Ct){Ct.remove(),A[N]=void 0;continue}if(xt!==void 0&&!Ct){let St=W(`value${N+1}-label generated-label`);if(St.textContent=ot(xt,u),A[N]=St,T.values.length<=0)m==null||m.append(St);else if(N===0)m==null||m.append(St);else{let Xt=A[N-1];Xt==null||Xt.after(St)}continue}!Ct||(Ct.textContent=ot(xt,u))}y&&(y.textContent=ot(T.textMin,u)),w&&(w.textContent=ot(T.textMax,u)),H(h)}},onAttrChange:(T,N)=>{T==="generate-labels"&&kt(n(N)),T==="generate-labels-text-color"&&H(N),T==="generate-labels-units"&&ut(N)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return d??!1},set:T=>{kt(n(T))}}},{name:"textColor",attributes:{get(){return h??""},set:T=>{H(T)}}},{name:"generateLabelsTextColor",attributes:{get(){return h??""},set:T=>{H(T)}}},{name:"units",attributes:{get(){return u??""},set:T=>{ut(T)}}},{name:"generateLabelsUnits",attributes:{get(){return u??""},set:T=>{ut(T)}}},{name:"generateLabelsFormat",attributes:{get(){return g},set:T=>{g=T,l&&l()}}}],css:`
|
|
243
230
|
.labels-row{
|
|
244
231
|
text-align: center;
|
|
245
232
|
display: flex;
|
|
@@ -281,27 +268,27 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
281
268
|
margin: 0 0.5rem;
|
|
282
269
|
white-space: nowrap;
|
|
283
270
|
}
|
|
284
|
-
`,destroy:$}};window.tcRangeSliderPlugins.push(_)})(),(()=>{var m=Object.defineProperty,s=Math.pow,p=(L,z,rt)=>z in L?m(L,z,{enumerable:!0,configurable:!0,writable:!0,value:rt}):L[z]=rt,b=(L,z,rt)=>(p(L,typeof z!="symbol"?z+"":z,rt),rt),_=(L,z)=>` ${z&&z.length>0?z.map(rt=>`<link rel="stylesheet" href="${rt}" />`).join(""):""} <style> ${L} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,E=":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}",y="pointers-overlap",j="pointers-min-distance",r="pointers-max-distance",v="range-dragging",g="data",w="min",k="max",O="step",C="round",S="type",T="theme",A="rtl",R="btt",I="disabled",$="keyboard-disabled",M="mousewheel-disabled",B="slider-width",q="slider-height",F="slider-radius",N="slider-bg",U="slider-bg-hover",H="slider-bg-fill",X="pointer-width",Y="pointer-height",K="pointer-radius",tt="pointer-bg",it="pointer-bg-hover",st="pointer-bg-focus",yt="pointer-shadow",ct="pointer-shadow-hover",Et="pointer-shadow-focus",At="pointer-border",Vt="pointer-border-hover",lt="pointer-border-focus",wt="animate-onclick",_t="css-links",Ut="vertical",Kt="horizontal",fe=(L,z,rt,Q,mt)=>{let Bt=z-L;return Bt===0?rt:(Q-rt)*(mt-L)/Bt+rt},St=L=>!isNaN(parseFloat(L))&&isFinite(L),jt=(L,z)=>St(L)?Number(L):z,It=(L,z)=>z===0?0:Math.round(L/z)*z,qt=(L,z=1/0)=>{if(z===1/0)return L;let rt=s(10,z);return Math.round(L*rt)/rt},xt=L=>L==null?!1:typeof L=="boolean"?L:L.trim().toLowerCase()==="true",lr=(L,z)=>{L.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:z}}))},de=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:z}}))},Ne=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:z}}))},ge=(L,z)=>{L.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:z}}))},cr=(L,z)=>{if(!z||z.length<=0)return;let rt=z.map(mt=>St(mt)?jt(mt,mt):mt),Q={values:rt||[]};Q.value=rt[0],Q.value0=rt[0],Q.value1=rt[0];for(let mt=1;mt<rt.length;mt++)Q[`value${mt+1}`]=rt[mt];L.dispatchEvent(new CustomEvent("change",{detail:Q}))},Ae=(L,z,rt)=>{let Q=0,mt,Bt,Yt,ft,vt=!1,Zt=(zt,me,Ue,Oe,$e,xe)=>{let mr=Q;Ue!==void 0&&zt>Ue&&(zt=Ue),me!==void 0&&zt<me&&(zt=me),Q=zt;let Me=Q;return(Oe===Ut&&xe||Oe===Kt&&$e)&&(Me=100-Me),Oe===Ut?z.style.top=`${Me}%`:z.style.left=`${Me}%`,mr!==Q},oe=zt=>zt===z||z.contains(zt),Tt=(zt,me,Ue,Oe)=>{mt=zt,Bt=me,Yt=Ue,ft=Oe},ue=zt=>{vt=zt,z.classList.toggle("disabled",vt),vt?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},Be=(zt,me)=>{me==null?z.removeAttribute(zt):z.setAttribute(zt,me)},ir=zt=>z.getAttribute(zt),Rt=zt=>{if(!vt){switch(zt.key){case"ArrowLeft":{zt.preventDefault(),typeof mt=="function"&&mt(rt);break}case"ArrowRight":{zt.preventDefault(),typeof Bt=="function"&&Bt(rt);break}case"ArrowUp":{zt.preventDefault(),typeof Yt=="function"&&Yt(rt);break}case"ArrowDown":{zt.preventDefault(),typeof ft=="function"&&ft(rt);break}}ge(L,zt)}},ee=()=>{vt||lr(L,z)};return z.className=`pointer pointer-${rt}`,z.addEventListener("keydown",Rt),z.addEventListener("click",ee),{$pointer:z,get percent(){return Q},get disabled(){return vt},set disabled(zt){ue(zt)},updatePosition:Zt,isClicked:oe,setCallbacks:Tt,setAttr:Be,getAttr:ir,destroy:()=>{z.removeEventListener("keydown",Rt),z.removeEventListener("click",ee),z.remove()}}},dr=L=>{if(L==null)return;if(Array.isArray(L))return L;if(L.trim()==="")return;let z=L.split(","),rt=[],Q=!0;for(let mt=0;mt<z.length;mt++){let Bt=z[mt].trim();Bt!==""&&(rt.push(Bt),St(Bt)||(Q=!1))}return Q?rt.map(mt=>Number(mt)):rt},Le=(L,z)=>z?z.findIndex(rt=>rt===L||rt.toString().trim()===L.toString().trim()):-1,We=L=>({updatePosition:(z,rt,Q,mt)=>{if(rt.length<=0)return;let Bt=rt.length===1,Yt=rt[0],ft=rt[rt.length-1];z===Ut?(L.style.removeProperty("width"),L.style.removeProperty("right"),L.style.removeProperty("left"),Bt?L.style.height=`${Yt}%`:L.style.height=`${Math.abs(Yt-ft)}%`,mt?(L.style.bottom="0%",Bt?L.style.top="auto":L.style.top=`${Math.min(100-ft,100-Yt)}%`):(L.style.bottom="auto",Bt?L.style.top="0%":L.style.top=`${Math.min(Yt,ft)}%`)):(L.style.removeProperty("height"),L.style.removeProperty("top"),L.style.removeProperty("bottom"),Bt?L.style.width=`${Yt}%`:L.style.width=`${Math.abs(Yt-ft)}%`,Q?(L.style.right="0%",Bt?L.style.left="auto":L.style.left=`${Math.min(100-ft,100-Yt)}%`):(L.style.right="auto",Bt?L.style.left="0%":L.style.left=`${Math.min(Yt,ft)}%`))}}),Ce="--animate-onclick",pr="--width",ot="--height",bt="--panel-bg-border-radius",Mt="--panel-bg",$t="--panel-bg-hover",Qt="--panel-bg-fill",Ze="--pointer-width",Ke="--pointer-height",xr="--pointer-border-radius",Qe="--pointer-bg",fr="--pointer-bg-hover",Se="--pointer-bg-focus",Dn="--pointer-shadow",Dt="--pointer-shadow-hover",te="--pointer-shadow-focus",Xt="--pointer-border",ce="--pointer-border-hover",ze="--pointer-border-focus",Vi=(L,z,rt)=>{let Q=new Map;for(let mt of L.attributes){let Bt=mt.nodeName.trim().toLowerCase();if(!z.test(Bt))continue;let Yt=Bt.replace(/\D/g,"").trim(),ft=Yt===""||Yt==="0"||Yt==="1"?0:jt(Yt,0)-1,vt=rt&&typeof rt=="function"?rt(mt.value):mt.value;Q.set(ft,vt)}return Q},Nn=L=>{if(!L)return null;let z=L.getAttribute(_t);if(!z)return null;let rt=z.split(";"),Q=[];for(let mt of rt)mt.trim()!==""&&Q.push(mt.trim());return Q},us=[[pr,B,"sliderWidth",null],[ot,q,"sliderHeight",null],[bt,F,"sliderRadius",null],[Mt,N,"sliderBg",null],[$t,U,"sliderBgHover",null],[Qt,H,"sliderBgFill",null],[Ze,X,"pointer#Width",/^pointer([0-9]*)-width$/],[Ke,Y,"pointer#Height",/^pointer([0-9]*)-height$/],[xr,K,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Qe,tt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[fr,it,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Se,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Dn,yt,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Dt,ct,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[te,Et,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Xt,At,"pointer#Border",/^pointer([0-9]*)-border$/],[ce,Vt,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[ze,lt,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],ui=(L,z,rt)=>{let Q=null,mt=[],Bt=new Map,Yt=(Rt,ee=z)=>{let zt=[...ee.classList];for(let me of zt)me.startsWith(Rt)&&z.classList.remove(me)},ft=()=>{Yt("shape");let Rt=z.querySelectorAll(".pointer");for(let ee of Rt)Yt("shape",ee)},vt=Rt=>{Q=Rt,Yt("theme-"),typeof Rt=="string"&&z.classList.add(`theme-${Rt}`)},Zt=()=>{if(ft(),!(mt.length<=0)){z.classList.add("shape",`shape-${mt[0]}`);for(let Rt=1;Rt<mt.length;Rt++){let ee=mt[Rt];if(!ee)continue;let zt=z.querySelector(`.pointer-${Rt}`);!zt||zt.classList.add("shape",`shape-${ee}`)}}},oe=(Rt,ee)=>{mt[Rt]=ee,Zt()},Tt=()=>{ft();let Rt=Vi(L,/^pointer([0-9]*)-shape$/);if(!(Rt.size<=0)){for(let ee of Rt){let zt=ee[0];mt[zt]=ee[1]}Zt()}},ue=(Rt,ee)=>`${Rt}-${ee}`,Be=(Rt,ee,zt)=>{let me=rt[zt];if(!me)return;let Ue=zt===0?z:me.$pointer;if(ee==null){Bt.has(ue(Rt,zt))&&Bt.delete(ue(Rt,zt)),Ue.style.removeProperty(Rt);return}Bt.set(ue(Rt,zt),ee),Ue.style.setProperty(Rt,ee)},ir=(Rt,ee)=>Bt.get(ue(Rt,ee));return(()=>{for(let Rt of us){let[ee,zt,me,Ue]=Rt;if(Ue){let $e=Vi(L,Ue);for(let xe of $e){let mr=xe[0],Me=xe[1];Be(ee,Me,mr)}}else{let $e=L.getAttribute(zt);Be(ee,$e,0)}let Oe=[];if(me.indexOf("#")===-1)Oe.push([me,0]);else{Oe.push([me.replace("#",""),0]),Oe.push([me.replace("#","0"),0]),Oe.push([me.replace("#","1"),0]);for(let $e=1;$e<rt.length;$e++)Oe.push([me.replace("#",($e+1).toString()),$e])}for(let $e of Oe)try{let xe=$e[0],mr=$e[1];Object.prototype.hasOwnProperty.call(L,xe)||Object.defineProperty(L,xe,{get(){return ir(ee,mr)},set:Me=>{Be(ee,Me,mr)}})}catch(xe){console.error(xe)}}vt(L.getAttribute(T)),Tt()})(),{setStyle:Be,getStyle:ir,get theme(){return Q},set theme(Rt){vt(Rt)},get pointerShapes(){return mt},setPointerShape:oe}},on="animate-on-click",Zr="range-dragging",hs=(L,z,rt,Q)=>{let mt=[],Bt=oe=>{for(let Tt of mt)Tt.update&&typeof Tt.update=="function"&&Tt.update(oe)},Yt=()=>{for(let oe of mt)oe.destroy&&typeof oe.destroy=="function"&&oe.destroy()},ft=(oe,Tt)=>{for(let ue of mt)ue.onAttrChange&&typeof ue.onAttrChange=="function"&&ue.onAttrChange(oe,Tt)},vt=oe=>{if(oe.gettersAndSetters){for(let Tt of oe.gettersAndSetters)if(!(!Tt.name||!Tt.attributes))try{Object.prototype.hasOwnProperty.call(L,Tt.name)||Object.defineProperty(L,Tt.name,Tt.attributes)}catch(ue){console.error("defineSettersGetters error:",ue)}}},Zt=oe=>{var Tt;if(!oe.css)return;let ue=(Tt=L.shadowRoot)==null?void 0:Tt.querySelector("style");!ue||(ue.innerHTML+=oe.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let oe of window.tcRangeSliderPlugins){let Tt=oe();mt.push(Tt),Tt.init&&typeof Tt.init=="function"&&(Tt.init(L,z,rt,Q),vt(Tt),Zt(Tt))}},update:Bt,onAttrChange:ft,destroy:Yt}},$n=10,ds=20,kn=(L,z)=>{let rt=new Map,Q=/^value([0-9]*)$/;for(let ft of L.attributes){let vt=ft.nodeName.trim().toLowerCase();if(!Q.test(vt))continue;let Zt=vt.replace("value","").trim(),oe=Zt===""||Zt==="0"||Zt==="1"?0:jt(Zt,0)-1,Tt=St(ft.value)?jt(ft.value,0):ft.value;rt.set(oe,Tt)}let mt=Math.max(...Array.from(rt.keys())),Bt=[];Bt.push([Ae(L,z,0),rt.get(0)]);let Yt=z;for(let ft=1;ft<=mt;ft++){let vt=z.cloneNode(!0);Yt.after(vt),Yt=vt,Bt.push([Ae(L,vt,ft),rt.get(ft)])}return Bt},zi=(L,z,rt,Q,mt,Bt,Yt)=>{try{Object.defineProperty(L,Q,{configurable:!0,get(){if(!z)return;let ft=z.pointers[rt];if(!ft)return;let vt=z.getTextValue(ft.percent);return St(vt)?jt(vt,vt):vt},set:ft=>{z.pointers[rt]?z==null||z.setValue(ft,rt):z==null||z.addPointer(ft)}}),Object.defineProperty(L,mt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?vt:void 0},set:ft=>{!z||z.setAriaLabel(rt,ft)}}),Object.defineProperty(L,Bt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.styles)==null?void 0:ft.pointerShapes[rt])!=null?vt:null},set:ft=>{!z||!z.styles||z.styles.setPointerShape(rt,ft)}}),Object.defineProperty(L,Yt,{configurable:!0,get(){var ft;return(ft=z==null?void 0:z.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!z)return;let vt=z==null?void 0:z.pointers[rt];!vt||(vt.disabled=ft)}})}catch(ft){console.error(ft)}},Mr=(L,z)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let Q=2;Q<$n;Q++)rt.push([`value${Q}`,`ariaLabel${Q}`,`pointer${Q}Shape`,`pointer${Q}Disabled`,Q-1]);for(let Q of rt)zi(L,z,Q[4],Q[0],Q[1],Q[2],Q[3])},ps=(L,z,rt)=>{var Q;let mt=(Q=rt.shadowRoot)==null?void 0:Q.querySelector(".container");if(mt)for(let Bt of L)z?mt.prepend(Bt.$pointer):mt.append(Bt.$pointer)},Mn=(L,z)=>{if(!(!z||L.length<=1)){for(let rt of L)rt.$pointer.style.zIndex=ds.toString();z.$pointer.style.zIndex=(ds*2).toString()}},ea=0,Cr=100,an=2,Sr="0.3s",hi=(L,z,rt)=>{let Q=rt.map(V=>V[0]),mt=null,Bt=null,Yt=null,ft=null,vt=ea,Zt=Cr,oe,Tt,ue=Kt,Be=an,ir=!1,Rt=!1,ee=!1,zt=0,me=1/0,Ue=!1,Oe,$e,xe=!1,mr=!1,Me=!1,Fr=Sr,Pr=[],fs=V=>{xe||(V.preventDefault&&V.preventDefault(),Vr(V),window.addEventListener("mousemove",Vr),window.addEventListener("mouseup",Jr),de(L,V))},Jr=V=>{xe||(Oe=void 0,$e=void 0,window.removeEventListener("mousemove",Vr),window.removeEventListener("mouseup",Jr),Fr&&z.classList.add(on),Ne(L,V))},yl=(V,at)=>{if(Q.length<=0)return;if(Q.length===1)return Q[0].isClicked(V)&&Fr&&z.classList.remove(on),Q[0];let Ot=ys(V);if(Ue){let le=at,He=Ji(le);He!==void 0&&(le=It(le,He)),Ot?(Oe=le,$e=0,Fr&&z.classList.remove(on)):Oe!==void 0&&($e=le-Oe,Oe=le)}if(!Fn(V)&&!Ot){for(let le of Q)if(!(!le.isClicked(V)||le.disabled))return Fr&&z.classList.remove(on),le;for(let le of Q)if(mt===le)return le}let ve=1/0,we=null;for(let le of Q){if(le.disabled)continue;let He=Math.abs(at-le.percent);He<ve&&(ve=He,we=le)}return we},Ui=()=>Q.findIndex(V=>mt===V&&!V.disabled),Vr=V=>{let at;if(ue===Ut){let{height:ve,top:we}=z.getBoundingClientRect(),le=V.type.indexOf("mouse")!==-1?V.clientY:V.touches[0].clientY;at=Math.min(Math.max(0,le-we),ve)*100/ve}else{let{width:ve,left:we}=z.getBoundingClientRect(),le=V.type.indexOf("mouse")!==-1?V.clientX:V.touches[0].clientX;at=Math.min(Math.max(0,le-we),ve)*100/ve}if((ir||Rt)&&(at=100-at),mt=yl(V.target,at),mt&&Mn(Q,mt),Ue&&Q.length>1&&$e!==void 0){let ve=Q[0],we=Q[Q.length-1],le=ve.percent+$e<0,He=we.percent+$e>100;if(le||He)return;for(let ao=0;ao<Q.length;ao++)qe(ao,Q[ao].percent+$e);return}let Ot=Ui();Ot!==-1&&(qe(Ot,at),mt==null||mt.$pointer.focus())},qi=V=>{if(xe||document.activeElement!==L||mt!=null&&mt.disabled)return;V.stopPropagation(),V.preventDefault();let at=V.deltaY<0,Ot=ir||Rt,ve=at?!Ot:Ot,we=Ui();we!==-1&&(ve?zr(we,Q[we].percent):di(we,Q[we].percent))},jn=V=>{xe||mr||(ue===Ut?Rt?qe(V,100):qe(V,0):ir?di(V,Q[V].percent):zr(V,Q[V].percent))},ms=V=>{xe||mr||(ue===Ut?Rt?qe(V,0):qe(V,100):ir?zr(V,Q[V].percent):di(V,Q[V].percent))},Gi=V=>{xe||mr||(ue===Ut?Rt?di(V,Q[V].percent):zr(V,Q[V].percent):ir?qe(V,100):qe(V,0))},Wi=V=>{xe||mr||(ue===Ut?Rt?zr(V,Q[V].percent):di(V,Q[V].percent):ir?qe(V,0):qe(V,100))},Fn=V=>V.classList.contains("panel"),ys=V=>V.classList.contains("panel-fill"),zr=(V,at)=>{if(at===void 0)return;let Ot=Ji(at);Ot==null&&(Ot=1),at-=Ot,at<0&&(at=0),qe(V,at)},di=(V,at)=>{if(at===void 0)return;let Ot=Ji(at);Ot==null&&(Ot=1),at+=Ot,at>100&&(at=100),qe(V,at)},Yr=()=>{!ft||ft.update({percents:Kr(),values:Yi(),$pointers:Tr(),min:vs(),max:gs(),data:na(),step:ra(),round:oa(),type:ia(),textMin:zn(),textMax:Xr(),rightToLeft:yr(),bottomToTop:ke(),pointersOverlap:Ki(),pointersMinDistance:Xi(),pointersMaxDistance:aa(),rangeDragging:Qi(),disabled:fi(),keyboardDisabled:mi(),mousewheelDisabled:sa()})},Zi=()=>{Yr()},bs=V=>{if(!(ee||Q.length<=1||Zt===vt))if(V===0){let at=me*100/(Zt-vt);return Math.max(0,Q[V+1].percent-at)}else{let at=zt*100/(Zt-vt);return Math.min(Q[V-1].percent+at,100)}},Vn=V=>{if(!(ee||Q.length<=1||Zt===vt))if(V===Q.length-1){let at=me*100/(Zt-vt);return Math.min(Q[V-1].percent+at,100)}else{let at=zt*100/(Zt-vt);return Math.max(0,Q[V+1].percent-at)}},Ji=V=>{let at;if(typeof oe=="function"){let Ot=fe(0,100,vt,Zt,V);at=oe(Ot,V)}else at=oe;if(St(at)){let Ot=Zt-vt;return at=Ot===0?0:at*100/Ot,at}},sn=V=>{if(V===void 0)return;let at=fe(0,100,vt,Zt,V);return Tt!==void 0?Tt[Math.round(at)]:qt(at,Be)},zn=()=>Tt!==void 0?Tt[vt]:vt,Xr=()=>Tt!==void 0?Tt[Zt]:Zt,ra=()=>oe,Un=V=>{var at;return V<=0||ee?zn():(at=sn(Q[V-1].percent))!=null?at:""},bl=V=>{var at;return Q.length<=1||V>=Q.length-1||ee?Xr():(at=sn(Q[V+1].percent))!=null?at:""},Kr=()=>Q.map(V=>V.percent),Yi=()=>Q.map(V=>sn(V.percent)),Tr=()=>Q.map(V=>V.$pointer),vs=()=>vt,gs=()=>Zt,na=()=>Tt,ia=()=>ue,oa=()=>Be,Xi=()=>zt,aa=()=>me,pi=V=>Pr[V],yr=()=>ir,ke=()=>Rt,fi=()=>xe,mi=()=>mr,sa=()=>Me,Ki=()=>ee,Qi=()=>Ue,qe=(V,at)=>{if(at===void 0)return;let Ot=Ji(at);Ot!==void 0&&(at=It(at,Ot));let ve=Q[V];if(!ve)return;let we=ve.updatePosition(at,bs(V),Vn(V),ue,ir,Rt);Bt==null||Bt.updatePosition(ue,Q.map(le=>le.percent),ir,Rt),Yr();for(let le of Q){let He=sn(le.percent);He!==void 0&&(le.setAttr("aria-valuenow",He.toString()),le.setAttr("aria-valuetext",He.toString()))}la(),we&&cr(L,Q.map(le=>sn(le.percent)))},Ur=()=>{for(let V=0;V<Q.length;V++)qe(V,Q[V].percent)},ln=(V,at)=>{vt=Tt!==void 0?0:jt(V,ea),Zt=Tt!==void 0?Tt.length-1:jt(at,Cr),br(vt),to(Zt)},la=()=>{var V,at;for(let Ot=0;Ot<Q.length;Ot++){let ve=Q[Ot];ve.setAttr("aria-valuemin",((V=Un(Ot))!=null?V:"").toString()),ve.setAttr("aria-valuemax",((at=bl(Ot))!=null?at:"").toString())}},br=V=>{vt=jt(V,ea),vt>Zt&&(Zt=vt+Cr),Ur()},to=V=>{Zt=jt(V,Cr),Zt<vt&&(Zt=vt+Cr),Ur()},On=V=>{ee=!0;for(let at=0;at<V.length;at++)eo(V[at],at);ee=!1;for(let at=0;at<V.length;at++)eo(V[at],at)},eo=(V,at)=>{let Ot;Tt!==void 0?(Ot=V==null?0:Le(V,Tt),Ot===-1&&(Ot=0)):(Ot=jt(V,vt),Ot<vt&&(Ot=vt),Ot>Zt&&(Ot=Zt));let ve=fe(vt,Zt,0,100,Ot);qe(at,ve)},qn=V=>{if(V==null){oe=void 0;return}if(typeof V=="function"){oe=V,Ur();return}if(St(V)){oe=jt(V,1);let at=Math.abs(Zt-vt);oe>at&&(oe=void 0),Ur();return}oe=void 0},Gn=V=>{ee=V,Ur()},ca=V=>{(!St(V)||V<0)&&(V=0),zt=V},ro=V=>{(!St(V)||V<0)&&(V=1/0),me=V},cn=V=>{xe=V,z.classList.toggle("disabled",xe),xe?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},yi=V=>{mr=V},En=V=>{Me=V,Me?document.removeEventListener("wheel",qi):document.addEventListener("wheel",qi,{passive:!1})},no=V=>{if(V==null){Tt=void 0;return}if(Tt=dr(V),Tt===void 0||Tt.length<=0){Tt=void 0;return}br(0),to(Tt.length-1),oe===void 0&&qn(1)},Br=V=>{var at;typeof V=="string"?ue=V.trim().toLowerCase()===Ut?Ut:Kt:ue=Kt;let Ot=(at=L.shadowRoot)==null?void 0:at.querySelector(".range-slider-box");if(!Ot)return;Ot.className=`range-slider-box type-${ue}`,Ur();let ve=ue===Ut?"vertical":"horizontal";for(let we of Q)we.setAttr("aria-orientation",ve)},ua=V=>{ir=V,Q.length>1&&ps(Q,ir,L),Ur(),Yr()},io=V=>{Rt=V,Q.length>1&&ps(Q,Rt,L),Ur(),Yr()},Ar=V=>{Be=jt(V,an),Be<0&&(Be=an),Yr()},oo=V=>{V==null||V.toString().trim().toLowerCase()==="false"?(Fr=void 0,z.style.removeProperty(Ce),z.classList.remove(on)):(Fr=V.toString(),z.style.setProperty(Ce,Fr),z.classList.add(on))},vr=(V,at)=>{let Ot=Q[V];!Ot||(Ot.setAttr("aria-label",at),Pr[V]=at)},bi=V=>{if(Oe=void 0,Q.length<=1){Ue=!1,z.classList.remove(Zr);return}Ue=V,z.classList.toggle(Zr,Ue)},Wn=()=>{cn(xt(L.getAttribute(I))),mr=xt(L.getAttribute($)),Me=xt(L.getAttribute(M));let V=Vi(L,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of V){let Ot=at[0];!Q[Ot]||(Q[Ot].disabled=at[1])}},vl=()=>{let V=Vi(L,/^aria-label([0-9]*)$/);for(let at of V){let Ot=at[0];vr(Ot,at[1])}},Zn=V=>{let at=Q.length,Ot=Q[at-1].$pointer,ve=Ot.cloneNode(!0);Ot.after(ve);let we=Ae(L,ve,at);return we.setCallbacks(jn,ms,Gi,Wi),Q.push(we),eo(V,at),Ur(),Yr(),at},ha=()=>{let V=Q.length,at=Q[V-1];return at?(at.destroy(),Q.pop(),Q.length<=1&&bi(!1),Ur(),Yr(),V-1):-1};return(()=>{var V,at;for(let ve of Q)ve.setCallbacks(jn,ms,Gi,Wi);let Ot=(V=L.shadowRoot)==null?void 0:V.querySelector(".panel-fill");Ot&&(Bt=We(Ot)),Br(L.getAttribute(S)),ua(xt(L.getAttribute(A))),io(xt(L.getAttribute(R))),ln(L.getAttribute(w),L.getAttribute(k)),qn(L.getAttribute(O)),no(L.getAttribute(g)),On(rt.map(ve=>ve[1])),Gn(xt(L.getAttribute(y))),ca(jt(L.getAttribute(j),0)),ro(jt(L.getAttribute(r),1/0)),bi(xt(L.getAttribute(v))),Ar(jt(L.getAttribute(C),an)),Wn(),vl(),Yt=ui(L,z,Q),oo((at=L.getAttribute(wt))!=null?at:Sr),z.addEventListener("mousedown",fs),z.addEventListener("mouseup",Jr),z.addEventListener("touchmove",Vr),z.addEventListener("touchstart",Vr),Me||document.addEventListener("wheel",qi,{passive:!1}),ft=hs(L,Zi,{setValues:On,setMin:br,setMax:to,setStep:qn,setPointersOverlap:Gn,setPointersMinDistance:ca,setPointersMaxDistance:ro,setDisabled:cn,setType:Br,setRightToLeft:ua,setBottomToTop:io,setRound:Ar,setKeyboardDisabled:yi,setMousewheelDisabled:En,setRangeDragging:bi,setData:no},{getPercents:Kr,getValues:Yi,getPointerElements:Tr,getMin:vs,getMax:gs,getStep:ra,getData:na,getType:ia,getRound:oa,getTextMin:zn,getTextMax:Xr,isRightToLeft:yr,isBottomToTop:ke,isDisabled:fi,isKeyboardDisabled:mi,isMousewheelDisabled:sa,isPointersOverlap:Ki,isRangeDraggingEnabled:Qi,getPointersMinDistance:Xi,getPointersMaxDistance:aa}),ft.init()})(),{get pointers(){return Q},get styles(){return Yt},get pluginsManager(){return ft},get min(){return zn()},get max(){return Xr()},get step(){return ra()},get pointersOverlap(){return Ki()},set pointersOverlap(V){Gn(V)},get pointersMinDistance(){return Xi()},set pointersMinDistance(V){ca(V)},get pointersMaxDistance(){return aa()},set pointersMaxDistance(V){ro(V)},get disabled(){return fi()},set disabled(V){cn(V)},get data(){return na()},get type(){return ia()},set type(V){Br(V)},get rightToLeft(){return yr()},set rightToLeft(V){ua(V)},get bottomToTop(){return ke()},set bottomToTop(V){io(V)},get round(){return oa()},set round(V){Ar(V)},get animateOnClick(){return Fr},set animateOnClick(V){oo(V)},get keyboardDisabled(){return mi()},set keyboardDisabled(V){yi(V)},get mousewheelDisabled(){return sa()},set mousewheelDisabled(V){En(V)},get rangeDragging(){return Qi()},set rangeDragging(V){bi(V)},setMin:br,setMax:to,setValue:eo,setStep:qn,setData:no,getTextValue:sn,setAriaLabel:vr,getAriaLabel:pi,addPointer:Zn,removePointer:ha,destroy:()=>{z.removeEventListener("mousedown",fs),z.removeEventListener("mouseup",Jr),z.removeEventListener("touchmove",Vr),z.removeEventListener("touchstart",Vr),document.removeEventListener("wheel",qi);for(let V of Q)V.destroy();ft==null||ft.destroy()}}},Hn=(L,z,rt)=>{let Q=us.find(([ft,vt,Zt,oe])=>vt.replace("#","")===z.replace(/\d+/g,""));if(Q&&L.styles){let[ft,vt,Zt,oe]=Q,Tt=z.replace(/\D/g,"").trim(),ue=Tt===""||Tt==="0"||Tt==="1"?0:jt(Tt,0)-1;L.styles.setStyle(ft,rt,ue);return}switch(L&&L.pluginsManager&&L.pluginsManager.onAttrChange(z,rt),z){case w:{L.setMin(rt);break}case k:{L.setMax(rt);break}case O:{L.setStep(rt);break}case y:{L.pointersOverlap=xt(rt);break}case j:{L.pointersMinDistance=jt(rt,0);break}case v:{L.rangeDragging=xt(rt);break}case r:{L.pointersMaxDistance=jt(rt,1/0);break}case I:{L.disabled=xt(rt);break}case $:{L.keyboardDisabled=xt(rt);break}case M:{L.mousewheelDisabled=xt(rt);break}case g:{L.setData(rt);break}case S:{L.type=rt;break}case A:{L.rightToLeft=xt(rt);break}case R:{L.bottomToTop=xt(rt);break}case C:{L.round=jt(rt,an);break}case T:{L.styles&&(L.styles.theme=rt);break}case wt:{L.animateOnClick=rt;break}}let mt=null;if(/^value([0-9]*)$/.test(z)&&(mt="value"),/^pointer([0-9]*)-disabled$/.test(z)&&(mt="pointer-disabled"),/^aria-label([0-9]*)$/.test(z)&&(mt="aria-label"),/^pointer([0-9]*)-shape$/.test(z)&&(mt="pointer-shape"),!mt)return;let Bt=z.replace(/\D/g,"").trim(),Yt=Bt===""||Bt==="0"||Bt==="1"?0:jt(Bt,0)-1;switch(mt){case"value":{L.setValue(rt,Yt);break}case"pointer-disabled":{let ft=L==null?void 0:L.pointers[Yt];if(!ft)return;ft.disabled=xt(rt);break}case"aria-label":{L.setAriaLabel(Yt,rt);break}case"pointer-shape":{L.styles&&L.styles.setPointerShape(Yt,rt);break}}},ml=class extends HTMLElement{constructor(){super(),b(this,"slider"),b(this,"_externalCSSList",[]),b(this,"_observer",null),this.attachShadow({mode:"open"})}set step(L){this.slider&&this.slider.setStep(L)}get step(){var L;return(L=this.slider)==null?void 0:L.step}set disabled(L){this.slider&&(this.slider.disabled=L)}get disabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.disabled)!=null?z:!1}set data(L){var z;(z=this.slider)==null||z.setData(L)}get data(){var L;return(L=this.slider)==null?void 0:L.data}set min(L){var z;(z=this.slider)==null||z.setMin(L)}get min(){var L;return(L=this.slider)==null?void 0:L.min}set max(L){var z;(z=this.slider)==null||z.setMax(L)}get max(){var L;return(L=this.slider)==null?void 0:L.max}set round(L){!this.slider||(this.slider.round=L)}get round(){var L,z;return(z=(L=this.slider)==null?void 0:L.round)!=null?z:an}set type(L){!this.slider||(this.slider.type=L??Kt)}get type(){var L;return((L=this.slider)==null?void 0:L.type)||Kt}set pointersOverlap(L){!this.slider||(this.slider.pointersOverlap=L)}get pointersOverlap(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersOverlap)!=null?z:!1}set pointersMinDistance(L){!this.slider||(this.slider.pointersMinDistance=L)}get pointersMinDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMinDistance)!=null?z:0}set pointersMaxDistance(L){!this.slider||(this.slider.pointersMaxDistance=L)}get pointersMaxDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMaxDistance)!=null?z:1/0}set theme(L){!this.slider||!this.slider.styles||(this.slider.styles.theme=L)}get theme(){var L,z,rt;return(rt=(z=(L=this.slider)==null?void 0:L.styles)==null?void 0:z.theme)!=null?rt:null}set rtl(L){!this.slider||(this.slider.rightToLeft=L)}get rtl(){var L,z;return(z=(L=this.slider)==null?void 0:L.rightToLeft)!=null?z:!1}set btt(L){!this.slider||(this.slider.bottomToTop=L)}get btt(){var L,z;return(z=(L=this.slider)==null?void 0:L.bottomToTop)!=null?z:!1}set keyboardDisabled(L){!this.slider||(this.slider.keyboardDisabled=L)}get keyboardDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.keyboardDisabled)!=null?z:!1}set mousewheelDisabled(L){!this.slider||(this.slider.mousewheelDisabled=L)}get mousewheelDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.mousewheelDisabled)!=null?z:!1}set animateOnClick(L){!this.slider||(this.slider.animateOnClick=L)}get animateOnClick(){var L;return(L=this.slider)==null?void 0:L.animateOnClick}get rangeDragging(){var L,z;return(z=(L=this.slider)==null?void 0:L.rangeDragging)!=null?z:!1}set rangeDragging(L){this.slider&&(this.slider.rangeDragging=xt(L))}get externalCSSList(){return this._externalCSSList}addPointer(L){var z,rt;if(!this.slider)return;let Q=(rt=(z=this.slider)==null?void 0:z.addPointer(L))!=null?rt:0;zi(this,this.slider,Q,`value${Q+1}`,`ariaLabel${Q+1}`,`pointerShape${Q+1}`,`pointer${Q+1}Disabled`)}removePointer(){var L;!this.slider||(L=this.slider)==null||L.removePointer()}addCSS(L){if(!this.shadowRoot)return;let z=document.createElement("style");z.textContent=L,this.shadowRoot.appendChild(z)}connectedCallback(){var L,z;if(!this.shadowRoot)return;this._externalCSSList=Nn(this),this.shadowRoot.innerHTML=_(E,this._externalCSSList);let rt=(L=this.shadowRoot)==null?void 0:L.querySelector(".pointer");if(!rt)return;let Q=(z=this.shadowRoot)==null?void 0:z.getElementById("range-slider");if(!Q)return;let mt=kn(this,rt);this.slider=hi(this,Q,mt),Mr(this,this.slider),this._observer=new MutationObserver(Bt=>{Bt.forEach(Yt=>{var ft;if(!this.slider||Yt.type!=="attributes")return;let vt=Yt.attributeName;!vt||Hn(this.slider,vt,(ft=this.getAttribute(vt))!=null?ft:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Hr=ml;window.tcRangeSlider=Hr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Hr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Hr{})})();function np(m,s){Object.keys(s).forEach(p=>{m.setAttribute(p,s[p])})}class ip extends rp{register(){super.register()}unregister(){super.unregister()}build(){const s=this.schema.properties,p=this.options,b=this.schema.description,_=this.theme,E=this.defaults.startVals[this.key];p.compact||(this.header=this.label=_.getFormInputLabel(this.getTitle(),this.isRequired())),b&&(this.description=_.getFormInputDescription(this.translateProperty(b))),p.infoText&&(this.infoButton=_.getInfoButton(this.translateProperty(p.infoText)));const y=document.createElement("tc-range-slider"),j=Object.keys(s).find(g=>g.includes("min")),r=Object.keys(s).find(g=>g.includes("max")),v={min:s[j].minimum,max:s[r].maximum,value1:(E==null?void 0:E[j])||s[j].default,value2:(E==null?void 0:E[r])||s[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};np(y,v),this.input=y,this.input.id=this.formname,this.control=_.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",g=>{g.preventDefault(),g.stopPropagation(),this.value={[j]:g.detail.value1,[r]:g.detail.value2},this.onChange(!0)}),this.container.appendChild(this.control)}destroy(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),super.destroy()}}const op=[{type:"object",format:"minmax",func:ip}],ap=m=>{op.map(({type:s,format:p,func:b})=>{Na.JSONEditor.defaults.startVals=m,Na.JSONEditor.defaults.editors[p]=b,Na.JSONEditor.defaults.resolvers.unshift(_=>{if(_.type===s&&_.format===p)return p})})};class mu extends jr{constructor(){super();se(this,Ma);se(this,Ha);se(this,$i,{});se(this,ci,null);this.schema,this.startVals,this.options={show_opt_in:!1,disable_collapse:!0,disable_edit_json:!0,disable_properties:!0,disable_array_delete_all_rows:!0,disable_array_delete_last_row:!0,array_controls_top:!0},this.unstyled=!1}getSchema(){return this.schema}setSchema(p){this.schema=p}getDefaultValues(){return this.startVals}setDefaultValues(p){this.startVals=p}getValues(){return Ee(this,$i)}firstUpdated(){if(!Ee(this,ci)){ap(this.startVals||{});const p=this.renderRoot.querySelector("form");Si(this,ci,new Na.JSONEditor(p,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),rr(this,Ha,qu).call(this)}}render(){return ae`
|
|
271
|
+
`,destroy:pt}};window.tcRangeSliderPlugins.push(s)})(),(()=>{var n=Object.defineProperty,t=Math.pow,e=(c,f,_)=>f in c?n(c,f,{enumerable:!0,configurable:!0,writable:!0,value:_}):c[f]=_,i=(c,f,_)=>(e(c,typeof f!="symbol"?f+"":f,_),_),s=(c,f)=>` ${f&&f.length>0?f.map(_=>`<link rel="stylesheet" href="${_}" />`).join(""):""} <style> ${c} </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>`,r=":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}",o="pointers-overlap",a="pointers-min-distance",l="pointers-max-distance",d="range-dragging",h="data",u="min",g="max",m="step",y="round",w="type",A="theme",et="rtl",W="btt",_t="disabled",pt="keyboard-disabled",kt="mousewheel-disabled",H="slider-width",ut="slider-height",Rt="slider-radius",ot="slider-bg",T="slider-bg-hover",N="slider-bg-fill",xt="pointer-width",Ct="pointer-height",St="pointer-radius",Xt="pointer-bg",Jt="pointer-bg-hover",Ke="pointer-bg-focus",Re="pointer-shadow",Sr="pointer-shadow-hover",Zo="pointer-shadow-focus",Ss="pointer-border",Tr="pointer-border-hover",ku="pointer-border-focus",Wo="animate-onclick",Su="css-links",ne="vertical",ti="horizontal",jr=(c,f,_,b,C)=>{let I=f-c;return I===0?_:(b-_)*(C-c)/I+_},ye=c=>!isNaN(parseFloat(c))&&isFinite(c),vt=(c,f)=>ye(c)?Number(c):f,Yo=(c,f)=>f===0?0:Math.round(c/f)*f,Tu=(c,f=1/0)=>{if(f===1/0)return c;let _=t(10,f);return Math.round(c*_)/_},Ot=c=>c==null?!1:typeof c=="boolean"?c:c.trim().toLowerCase()==="true",ju=(c,f)=>{c.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:f}}))},$u=(c,f)=>{c.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:f}}))},Pu=(c,f)=>{c.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:f}}))},Ou=(c,f)=>{c.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:f}}))},Iu=(c,f)=>{if(!f||f.length<=0)return;let _=f.map(C=>ye(C)?vt(C,C):C),b={values:_||[]};b.value=_[0],b.value0=_[0],b.value1=_[0];for(let C=1;C<_.length;C++)b[`value${C+1}`]=_[C];c.dispatchEvent(new CustomEvent("change",{detail:b}))},$r=(c,f,_)=>{let b=0,C,I,M,E,L=!1,F=(R,at,Tt,Et,ft,mt)=>{let Ft=b;Tt!==void 0&&R>Tt&&(R=Tt),at!==void 0&&R<at&&(R=at),b=R;let zt=b;return(Et===ne&&mt||Et===ti&&ft)&&(zt=100-zt),Et===ne?f.style.top=`${zt}%`:f.style.left=`${zt}%`,Ft!==b},G=R=>R===f||f.contains(R),j=(R,at,Tt,Et)=>{C=R,I=at,M=Tt,E=Et},it=R=>{L=R,f.classList.toggle("disabled",L),L?f.setAttribute("aria-disabled","true"):f.hasAttribute("aria-disabled")&&f.removeAttribute("aria-disabled")},te=(R,at)=>{at==null?f.removeAttribute(R):f.setAttribute(R,at)},Dt=R=>f.getAttribute(R),B=R=>{if(!L){switch(R.key){case"ArrowLeft":{R.preventDefault(),typeof C=="function"&&C(_);break}case"ArrowRight":{R.preventDefault(),typeof I=="function"&&I(_);break}case"ArrowUp":{R.preventDefault(),typeof M=="function"&&M(_);break}case"ArrowDown":{R.preventDefault(),typeof E=="function"&&E(_);break}}Ou(c,R)}},U=()=>{L||ju(c,f)};return f.className=`pointer pointer-${_}`,f.addEventListener("keydown",B),f.addEventListener("click",U),{$pointer:f,get percent(){return b},get disabled(){return L},set disabled(R){it(R)},updatePosition:F,isClicked:G,setCallbacks:j,setAttr:te,getAttr:Dt,destroy:()=>{f.removeEventListener("keydown",B),f.removeEventListener("click",U),f.remove()}}},Bu=c=>{if(c==null)return;if(Array.isArray(c))return c;if(c.trim()==="")return;let f=c.split(","),_=[],b=!0;for(let C=0;C<f.length;C++){let I=f[C].trim();I!==""&&(_.push(I),ye(I)||(b=!1))}return b?_.map(C=>Number(C)):_},Ru=(c,f)=>f?f.findIndex(_=>_===c||_.toString().trim()===c.toString().trim()):-1,Du=c=>({updatePosition:(f,_,b,C)=>{if(_.length<=0)return;let I=_.length===1,M=_[0],E=_[_.length-1];f===ne?(c.style.removeProperty("width"),c.style.removeProperty("right"),c.style.removeProperty("left"),I?c.style.height=`${M}%`:c.style.height=`${Math.abs(M-E)}%`,C?(c.style.bottom="0%",I?c.style.top="auto":c.style.top=`${Math.min(100-E,100-M)}%`):(c.style.bottom="auto",I?c.style.top="0%":c.style.top=`${Math.min(M,E)}%`)):(c.style.removeProperty("height"),c.style.removeProperty("top"),c.style.removeProperty("bottom"),I?c.style.width=`${M}%`:c.style.width=`${Math.abs(M-E)}%`,b?(c.style.right="0%",I?c.style.left="auto":c.style.left=`${Math.min(100-E,100-M)}%`):(c.style.right="auto",I?c.style.left="0%":c.style.left=`${Math.min(M,E)}%`))}}),Xo="--animate-onclick",Nu="--width",Mu="--height",Hu="--panel-bg-border-radius",Vu="--panel-bg",Fu="--panel-bg-hover",zu="--panel-bg-fill",Uu="--pointer-width",qu="--pointer-height",Gu="--pointer-border-radius",Zu="--pointer-bg",Wu="--pointer-bg-hover",Yu="--pointer-bg-focus",Xu="--pointer-shadow",Ju="--pointer-shadow-hover",Qu="--pointer-shadow-focus",Ku="--pointer-border",tp="--pointer-border-hover",ep="--pointer-border-focus",Ts=(c,f,_)=>{let b=new Map;for(let C of c.attributes){let I=C.nodeName.trim().toLowerCase();if(!f.test(I))continue;let M=I.replace(/\D/g,"").trim(),E=M===""||M==="0"||M==="1"?0:vt(M,0)-1,L=_&&typeof _=="function"?_(C.value):C.value;b.set(E,L)}return b},ip=c=>{if(!c)return null;let f=c.getAttribute(Su);if(!f)return null;let _=f.split(";"),b=[];for(let C of _)C.trim()!==""&&b.push(C.trim());return b},Jo=[[Nu,H,"sliderWidth",null],[Mu,ut,"sliderHeight",null],[Hu,Rt,"sliderRadius",null],[Vu,ot,"sliderBg",null],[Fu,T,"sliderBgHover",null],[zu,N,"sliderBgFill",null],[Uu,xt,"pointer#Width",/^pointer([0-9]*)-width$/],[qu,Ct,"pointer#Height",/^pointer([0-9]*)-height$/],[Gu,St,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Zu,Xt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Wu,Jt,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Yu,Ke,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Xu,Re,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Ju,Sr,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Qu,Zo,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Ku,Ss,"pointer#Border",/^pointer([0-9]*)-border$/],[tp,Tr,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[ep,ku,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],sp=(c,f,_)=>{let b=null,C=[],I=new Map,M=(B,U=f)=>{let R=[...U.classList];for(let at of R)at.startsWith(B)&&f.classList.remove(at)},E=()=>{M("shape");let B=f.querySelectorAll(".pointer");for(let U of B)M("shape",U)},L=B=>{b=B,M("theme-"),typeof B=="string"&&f.classList.add(`theme-${B}`)},F=()=>{if(E(),!(C.length<=0)){f.classList.add("shape",`shape-${C[0]}`);for(let B=1;B<C.length;B++){let U=C[B];if(!U)continue;let R=f.querySelector(`.pointer-${B}`);!R||R.classList.add("shape",`shape-${U}`)}}},G=(B,U)=>{C[B]=U,F()},j=()=>{E();let B=Ts(c,/^pointer([0-9]*)-shape$/);if(!(B.size<=0)){for(let U of B){let R=U[0];C[R]=U[1]}F()}},it=(B,U)=>`${B}-${U}`,te=(B,U,R)=>{let at=_[R];if(!at)return;let Tt=R===0?f:at.$pointer;if(U==null){I.has(it(B,R))&&I.delete(it(B,R)),Tt.style.removeProperty(B);return}I.set(it(B,R),U),Tt.style.setProperty(B,U)},Dt=(B,U)=>I.get(it(B,U));return(()=>{for(let B of Jo){let[U,R,at,Tt]=B;if(Tt){let ft=Ts(c,Tt);for(let mt of ft){let Ft=mt[0],zt=mt[1];te(U,zt,Ft)}}else{let ft=c.getAttribute(R);te(U,ft,0)}let Et=[];if(at.indexOf("#")===-1)Et.push([at,0]);else{Et.push([at.replace("#",""),0]),Et.push([at.replace("#","0"),0]),Et.push([at.replace("#","1"),0]);for(let ft=1;ft<_.length;ft++)Et.push([at.replace("#",(ft+1).toString()),ft])}for(let ft of Et)try{let mt=ft[0],Ft=ft[1];Object.prototype.hasOwnProperty.call(c,mt)||Object.defineProperty(c,mt,{get(){return Dt(U,Ft)},set:zt=>{te(U,zt,Ft)}})}catch(mt){console.error(mt)}}L(c.getAttribute(A)),j()})(),{setStyle:te,getStyle:Dt,get theme(){return b},set theme(B){L(B)},get pointerShapes(){return C},setPointerShape:G}},ei="animate-on-click",Qo="range-dragging",rp=(c,f,_,b)=>{let C=[],I=G=>{for(let j of C)j.update&&typeof j.update=="function"&&j.update(G)},M=()=>{for(let G of C)G.destroy&&typeof G.destroy=="function"&&G.destroy()},E=(G,j)=>{for(let it of C)it.onAttrChange&&typeof it.onAttrChange=="function"&&it.onAttrChange(G,j)},L=G=>{if(G.gettersAndSetters){for(let j of G.gettersAndSetters)if(!(!j.name||!j.attributes))try{Object.prototype.hasOwnProperty.call(c,j.name)||Object.defineProperty(c,j.name,j.attributes)}catch(it){console.error("defineSettersGetters error:",it)}}},F=G=>{var j;if(!G.css)return;let it=(j=c.shadowRoot)==null?void 0:j.querySelector("style");!it||(it.innerHTML+=G.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let G of window.tcRangeSliderPlugins){let j=G();C.push(j),j.init&&typeof j.init=="function"&&(j.init(c,f,_,b),L(j),F(j))}},update:I,onAttrChange:E,destroy:M}},np=10,Ko=20,op=(c,f)=>{let _=new Map,b=/^value([0-9]*)$/;for(let E of c.attributes){let L=E.nodeName.trim().toLowerCase();if(!b.test(L))continue;let F=L.replace("value","").trim(),G=F===""||F==="0"||F==="1"?0:vt(F,0)-1,j=ye(E.value)?vt(E.value,0):E.value;_.set(G,j)}let C=Math.max(...Array.from(_.keys())),I=[];I.push([$r(c,f,0),_.get(0)]);let M=f;for(let E=1;E<=C;E++){let L=f.cloneNode(!0);M.after(L),M=L,I.push([$r(c,L,E),_.get(E)])}return I},ta=(c,f,_,b,C,I,M)=>{try{Object.defineProperty(c,b,{configurable:!0,get(){if(!f)return;let E=f.pointers[_];if(!E)return;let L=f.getTextValue(E.percent);return ye(L)?vt(L,L):L},set:E=>{f.pointers[_]?f==null||f.setValue(E,_):f==null||f.addPointer(E)}}),Object.defineProperty(c,C,{configurable:!0,get(){var E,L;return(L=(E=f==null?void 0:f.pointers[_])==null?void 0:E.getAttr("aria-label"))!=null?L:void 0},set:E=>{!f||f.setAriaLabel(_,E)}}),Object.defineProperty(c,I,{configurable:!0,get(){var E,L;return(L=(E=f==null?void 0:f.styles)==null?void 0:E.pointerShapes[_])!=null?L:null},set:E=>{!f||!f.styles||f.styles.setPointerShape(_,E)}}),Object.defineProperty(c,M,{configurable:!0,get(){var E;return(E=f==null?void 0:f.pointers[_].disabled)!=null?E:!1},set:E=>{if(!f)return;let L=f==null?void 0:f.pointers[_];!L||(L.disabled=E)}})}catch(E){console.error(E)}},ap=(c,f)=>{let _=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let b=2;b<np;b++)_.push([`value${b}`,`ariaLabel${b}`,`pointer${b}Shape`,`pointer${b}Disabled`,b-1]);for(let b of _)ta(c,f,b[4],b[0],b[1],b[2],b[3])},ea=(c,f,_)=>{var b;let C=(b=_.shadowRoot)==null?void 0:b.querySelector(".container");if(C)for(let I of c)f?C.prepend(I.$pointer):C.append(I.$pointer)},lp=(c,f)=>{if(!(!f||c.length<=1)){for(let _ of c)_.$pointer.style.zIndex=Ko.toString();f.$pointer.style.zIndex=(Ko*2).toString()}},Pr=0,$i=100,ii=2,ia="0.3s",dp=(c,f,_)=>{let b=_.map(p=>p[0]),C=null,I=null,M=null,E=null,L=Pr,F=$i,G,j,it=ti,te=ii,Dt=!1,B=!1,U=!1,R=0,at=1/0,Tt=!1,Et,ft,mt=!1,Ft=!1,zt=!1,Ee=ia,sa=[],ra=p=>{mt||(p.preventDefault&&p.preventDefault(),De(p),window.addEventListener("mousemove",De),window.addEventListener("mouseup",js),$u(c,p))},js=p=>{mt||(Et=void 0,ft=void 0,window.removeEventListener("mousemove",De),window.removeEventListener("mouseup",js),Ee&&f.classList.add(ei),Pu(c,p))},up=(p,v)=>{if(b.length<=0)return;if(b.length===1)return b[0].isClicked(p)&&Ee&&f.classList.remove(ei),b[0];let S=fp(p);if(Tt){let Q=v,oe=Ps(Q);oe!==void 0&&(Q=Yo(Q,oe)),S?(Et=Q,ft=0,Ee&&f.classList.remove(ei)):Et!==void 0&&(ft=Q-Et,Et=Q)}if(!pp(p)&&!S){for(let Q of b)if(!(!Q.isClicked(p)||Q.disabled))return Ee&&f.classList.remove(ei),Q;for(let Q of b)if(C===Q)return Q}let st=1/0,gt=null;for(let Q of b){if(Q.disabled)continue;let oe=Math.abs(v-Q.percent);oe<st&&(st=oe,gt=Q)}return gt},na=()=>b.findIndex(p=>C===p&&!p.disabled),De=p=>{let v;if(it===ne){let{height:st,top:gt}=f.getBoundingClientRect(),Q=p.type.indexOf("mouse")!==-1?p.clientY:p.touches[0].clientY;v=Math.min(Math.max(0,Q-gt),st)*100/st}else{let{width:st,left:gt}=f.getBoundingClientRect(),Q=p.type.indexOf("mouse")!==-1?p.clientX:p.touches[0].clientX;v=Math.min(Math.max(0,Q-gt),st)*100/st}if((Dt||B)&&(v=100-v),C=up(p.target,v),C&&lp(b,C),Tt&&b.length>1&&ft!==void 0){let st=b[0],gt=b[b.length-1],Q=st.percent+ft<0,oe=gt.percent+ft>100;if(Q||oe)return;for(let Hs=0;Hs<b.length;Hs++)Ut(Hs,b[Hs].percent+ft);return}let S=na();S!==-1&&(Ut(S,v),C==null||C.$pointer.focus())},$s=p=>{if(mt||document.activeElement!==c||C!=null&&C.disabled)return;p.stopPropagation(),p.preventDefault();let v=p.deltaY<0,S=Dt||B,st=v?!S:S,gt=na();gt!==-1&&(st?Pi(gt,b[gt].percent):Oi(gt,b[gt].percent))},oa=p=>{mt||Ft||(it===ne?B?Ut(p,100):Ut(p,0):Dt?Oi(p,b[p].percent):Pi(p,b[p].percent))},aa=p=>{mt||Ft||(it===ne?B?Ut(p,0):Ut(p,100):Dt?Pi(p,b[p].percent):Oi(p,b[p].percent))},la=p=>{mt||Ft||(it===ne?B?Oi(p,b[p].percent):Pi(p,b[p].percent):Dt?Ut(p,100):Ut(p,0))},da=p=>{mt||Ft||(it===ne?B?Pi(p,b[p].percent):Oi(p,b[p].percent):Dt?Ut(p,0):Ut(p,100))},pp=p=>p.classList.contains("panel"),fp=p=>p.classList.contains("panel-fill"),Pi=(p,v)=>{if(v===void 0)return;let S=Ps(v);S==null&&(S=1),v-=S,v<0&&(v=0),Ut(p,v)},Oi=(p,v)=>{if(v===void 0)return;let S=Ps(v);S==null&&(S=1),v+=S,v>100&&(v=100),Ut(p,v)},Ne=()=>{!E||E.update({percents:ha(),values:ca(),$pointers:ua(),min:pa(),max:fa(),data:Br(),step:Ir(),round:Dr(),type:Rr(),textMin:Os(),textMax:Is(),rightToLeft:Hr(),bottomToTop:Vr(),pointersOverlap:qr(),pointersMinDistance:Nr(),pointersMaxDistance:Mr(),rangeDragging:Gr(),disabled:Fr(),keyboardDisabled:zr(),mousewheelDisabled:Ur()})},mp=()=>{Ne()},gp=p=>{if(!(U||b.length<=1||F===L))if(p===0){let v=at*100/(F-L);return Math.max(0,b[p+1].percent-v)}else{let v=R*100/(F-L);return Math.min(b[p-1].percent+v,100)}},bp=p=>{if(!(U||b.length<=1||F===L))if(p===b.length-1){let v=at*100/(F-L);return Math.min(b[p-1].percent+v,100)}else{let v=R*100/(F-L);return Math.max(0,b[p+1].percent-v)}},Ps=p=>{let v;if(typeof G=="function"){let S=jr(0,100,L,F,p);v=G(S,p)}else v=G;if(ye(v)){let S=F-L;return v=S===0?0:v*100/S,v}},si=p=>{if(p===void 0)return;let v=jr(0,100,L,F,p);return j!==void 0?j[Math.round(v)]:Tu(v,te)},Os=()=>j!==void 0?j[L]:L,Is=()=>j!==void 0?j[F]:F,Ir=()=>G,yp=p=>{var v;return p<=0||U?Os():(v=si(b[p-1].percent))!=null?v:""},_p=p=>{var v;return b.length<=1||p>=b.length-1||U?Is():(v=si(b[p+1].percent))!=null?v:""},ha=()=>b.map(p=>p.percent),ca=()=>b.map(p=>si(p.percent)),ua=()=>b.map(p=>p.$pointer),pa=()=>L,fa=()=>F,Br=()=>j,Rr=()=>it,Dr=()=>te,Nr=()=>R,Mr=()=>at,vp=p=>sa[p],Hr=()=>Dt,Vr=()=>B,Fr=()=>mt,zr=()=>Ft,Ur=()=>zt,qr=()=>U,Gr=()=>Tt,Ut=(p,v)=>{if(v===void 0)return;let S=Ps(v);S!==void 0&&(v=Yo(v,S));let st=b[p];if(!st)return;let gt=st.updatePosition(v,gp(p),bp(p),it,Dt,B);I==null||I.updatePosition(it,b.map(Q=>Q.percent),Dt,B),Ne();for(let Q of b){let oe=si(Q.percent);oe!==void 0&&(Q.setAttr("aria-valuenow",oe.toString()),Q.setAttr("aria-valuetext",oe.toString()))}xp(),gt&&Iu(c,b.map(Q=>si(Q.percent)))},de=()=>{for(let p=0;p<b.length;p++)Ut(p,b[p].percent)},wp=(p,v)=>{L=j!==void 0?0:vt(p,Pr),F=j!==void 0?j.length-1:vt(v,$i),Bs(L),Rs(F)},xp=()=>{var p,v;for(let S=0;S<b.length;S++){let st=b[S];st.setAttr("aria-valuemin",((p=yp(S))!=null?p:"").toString()),st.setAttr("aria-valuemax",((v=_p(S))!=null?v:"").toString())}},Bs=p=>{L=vt(p,Pr),L>F&&(F=L+$i),de()},Rs=p=>{F=vt(p,$i),F<L&&(F=L+$i),de()},ma=p=>{U=!0;for(let v=0;v<p.length;v++)Ds(p[v],v);U=!1;for(let v=0;v<p.length;v++)Ds(p[v],v)},Ds=(p,v)=>{let S;j!==void 0?(S=p==null?0:Ru(p,j),S===-1&&(S=0)):(S=vt(p,L),S<L&&(S=L),S>F&&(S=F));let st=jr(L,F,0,100,S);Ut(v,st)},Ns=p=>{if(p==null){G=void 0;return}if(typeof p=="function"){G=p,de();return}if(ye(p)){G=vt(p,1);let v=Math.abs(F-L);G>v&&(G=void 0),de();return}G=void 0},Zr=p=>{U=p,de()},Wr=p=>{(!ye(p)||p<0)&&(p=0),R=p},Yr=p=>{(!ye(p)||p<0)&&(p=1/0),at=p},Xr=p=>{mt=p,f.classList.toggle("disabled",mt),mt?f.setAttribute("aria-disabled","true"):f.hasAttribute("aria-disabled")&&f.removeAttribute("aria-disabled")},ga=p=>{Ft=p},ba=p=>{zt=p,zt?document.removeEventListener("wheel",$s):document.addEventListener("wheel",$s,{passive:!1})},Jr=p=>{if(p==null){j=void 0;return}if(j=Bu(p),j===void 0||j.length<=0){j=void 0;return}Bs(0),Rs(j.length-1),G===void 0&&Ns(1)},Qr=p=>{var v;typeof p=="string"?it=p.trim().toLowerCase()===ne?ne:ti:it=ti;let S=(v=c.shadowRoot)==null?void 0:v.querySelector(".range-slider-box");if(!S)return;S.className=`range-slider-box type-${it}`,de();let st=it===ne?"vertical":"horizontal";for(let gt of b)gt.setAttr("aria-orientation",st)},Kr=p=>{Dt=p,b.length>1&&ea(b,Dt,c),de(),Ne()},tn=p=>{B=p,b.length>1&&ea(b,B,c),de(),Ne()},en=p=>{te=vt(p,ii),te<0&&(te=ii),Ne()},ya=p=>{p==null||p.toString().trim().toLowerCase()==="false"?(Ee=void 0,f.style.removeProperty(Xo),f.classList.remove(ei)):(Ee=p.toString(),f.style.setProperty(Xo,Ee),f.classList.add(ei))},_a=(p,v)=>{let S=b[p];!S||(S.setAttr("aria-label",v),sa[p]=v)},Ms=p=>{if(Et=void 0,b.length<=1){Tt=!1,f.classList.remove(Qo);return}Tt=p,f.classList.toggle(Qo,Tt)},Cp=()=>{Xr(Ot(c.getAttribute(_t))),Ft=Ot(c.getAttribute(pt)),zt=Ot(c.getAttribute(kt));let p=Ts(c,/^pointer([0-9]*)-disabled$/,v=>Ot(v));for(let v of p){let S=v[0];!b[S]||(b[S].disabled=v[1])}},Ep=()=>{let p=Ts(c,/^aria-label([0-9]*)$/);for(let v of p){let S=v[0];_a(S,v[1])}},Lp=p=>{let v=b.length,S=b[v-1].$pointer,st=S.cloneNode(!0);S.after(st);let gt=$r(c,st,v);return gt.setCallbacks(oa,aa,la,da),b.push(gt),Ds(p,v),de(),Ne(),v},Ap=()=>{let p=b.length,v=b[p-1];return v?(v.destroy(),b.pop(),b.length<=1&&Ms(!1),de(),Ne(),p-1):-1};return(()=>{var p,v;for(let st of b)st.setCallbacks(oa,aa,la,da);let S=(p=c.shadowRoot)==null?void 0:p.querySelector(".panel-fill");S&&(I=Du(S)),Qr(c.getAttribute(w)),Kr(Ot(c.getAttribute(et))),tn(Ot(c.getAttribute(W))),wp(c.getAttribute(u),c.getAttribute(g)),Ns(c.getAttribute(m)),Jr(c.getAttribute(h)),ma(_.map(st=>st[1])),Zr(Ot(c.getAttribute(o))),Wr(vt(c.getAttribute(a),0)),Yr(vt(c.getAttribute(l),1/0)),Ms(Ot(c.getAttribute(d))),en(vt(c.getAttribute(y),ii)),Cp(),Ep(),M=sp(c,f,b),ya((v=c.getAttribute(Wo))!=null?v:ia),f.addEventListener("mousedown",ra),f.addEventListener("mouseup",js),f.addEventListener("touchmove",De),f.addEventListener("touchstart",De),zt||document.addEventListener("wheel",$s,{passive:!1}),E=rp(c,mp,{setValues:ma,setMin:Bs,setMax:Rs,setStep:Ns,setPointersOverlap:Zr,setPointersMinDistance:Wr,setPointersMaxDistance:Yr,setDisabled:Xr,setType:Qr,setRightToLeft:Kr,setBottomToTop:tn,setRound:en,setKeyboardDisabled:ga,setMousewheelDisabled:ba,setRangeDragging:Ms,setData:Jr},{getPercents:ha,getValues:ca,getPointerElements:ua,getMin:pa,getMax:fa,getStep:Ir,getData:Br,getType:Rr,getRound:Dr,getTextMin:Os,getTextMax:Is,isRightToLeft:Hr,isBottomToTop:Vr,isDisabled:Fr,isKeyboardDisabled:zr,isMousewheelDisabled:Ur,isPointersOverlap:qr,isRangeDraggingEnabled:Gr,getPointersMinDistance:Nr,getPointersMaxDistance:Mr}),E.init()})(),{get pointers(){return b},get styles(){return M},get pluginsManager(){return E},get min(){return Os()},get max(){return Is()},get step(){return Ir()},get pointersOverlap(){return qr()},set pointersOverlap(p){Zr(p)},get pointersMinDistance(){return Nr()},set pointersMinDistance(p){Wr(p)},get pointersMaxDistance(){return Mr()},set pointersMaxDistance(p){Yr(p)},get disabled(){return Fr()},set disabled(p){Xr(p)},get data(){return Br()},get type(){return Rr()},set type(p){Qr(p)},get rightToLeft(){return Hr()},set rightToLeft(p){Kr(p)},get bottomToTop(){return Vr()},set bottomToTop(p){tn(p)},get round(){return Dr()},set round(p){en(p)},get animateOnClick(){return Ee},set animateOnClick(p){ya(p)},get keyboardDisabled(){return zr()},set keyboardDisabled(p){ga(p)},get mousewheelDisabled(){return Ur()},set mousewheelDisabled(p){ba(p)},get rangeDragging(){return Gr()},set rangeDragging(p){Ms(p)},setMin:Bs,setMax:Rs,setValue:Ds,setStep:Ns,setData:Jr,getTextValue:si,setAriaLabel:_a,getAriaLabel:vp,addPointer:Lp,removePointer:Ap,destroy:()=>{f.removeEventListener("mousedown",ra),f.removeEventListener("mouseup",js),f.removeEventListener("touchmove",De),f.removeEventListener("touchstart",De),document.removeEventListener("wheel",$s);for(let p of b)p.destroy();E==null||E.destroy()}}},hp=(c,f,_)=>{let b=Jo.find(([E,L,F,G])=>L.replace("#","")===f.replace(/\d+/g,""));if(b&&c.styles){let[E,L,F,G]=b,j=f.replace(/\D/g,"").trim(),it=j===""||j==="0"||j==="1"?0:vt(j,0)-1;c.styles.setStyle(E,_,it);return}switch(c&&c.pluginsManager&&c.pluginsManager.onAttrChange(f,_),f){case u:{c.setMin(_);break}case g:{c.setMax(_);break}case m:{c.setStep(_);break}case o:{c.pointersOverlap=Ot(_);break}case a:{c.pointersMinDistance=vt(_,0);break}case d:{c.rangeDragging=Ot(_);break}case l:{c.pointersMaxDistance=vt(_,1/0);break}case _t:{c.disabled=Ot(_);break}case pt:{c.keyboardDisabled=Ot(_);break}case kt:{c.mousewheelDisabled=Ot(_);break}case h:{c.setData(_);break}case w:{c.type=_;break}case et:{c.rightToLeft=Ot(_);break}case W:{c.bottomToTop=Ot(_);break}case y:{c.round=vt(_,ii);break}case A:{c.styles&&(c.styles.theme=_);break}case Wo:{c.animateOnClick=_;break}}let C=null;if(/^value([0-9]*)$/.test(f)&&(C="value"),/^pointer([0-9]*)-disabled$/.test(f)&&(C="pointer-disabled"),/^aria-label([0-9]*)$/.test(f)&&(C="aria-label"),/^pointer([0-9]*)-shape$/.test(f)&&(C="pointer-shape"),!C)return;let I=f.replace(/\D/g,"").trim(),M=I===""||I==="0"||I==="1"?0:vt(I,0)-1;switch(C){case"value":{c.setValue(_,M);break}case"pointer-disabled":{let E=c==null?void 0:c.pointers[M];if(!E)return;E.disabled=Ot(_);break}case"aria-label":{c.setAriaLabel(M,_);break}case"pointer-shape":{c.styles&&c.styles.setPointerShape(M,_);break}}},cp=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(c){this.slider&&this.slider.setStep(c)}get step(){var c;return(c=this.slider)==null?void 0:c.step}set disabled(c){this.slider&&(this.slider.disabled=c)}get disabled(){var c,f;return(f=(c=this.slider)==null?void 0:c.disabled)!=null?f:!1}set data(c){var f;(f=this.slider)==null||f.setData(c)}get data(){var c;return(c=this.slider)==null?void 0:c.data}set min(c){var f;(f=this.slider)==null||f.setMin(c)}get min(){var c;return(c=this.slider)==null?void 0:c.min}set max(c){var f;(f=this.slider)==null||f.setMax(c)}get max(){var c;return(c=this.slider)==null?void 0:c.max}set round(c){!this.slider||(this.slider.round=c)}get round(){var c,f;return(f=(c=this.slider)==null?void 0:c.round)!=null?f:ii}set type(c){!this.slider||(this.slider.type=c??ti)}get type(){var c;return((c=this.slider)==null?void 0:c.type)||ti}set pointersOverlap(c){!this.slider||(this.slider.pointersOverlap=c)}get pointersOverlap(){var c,f;return(f=(c=this.slider)==null?void 0:c.pointersOverlap)!=null?f:!1}set pointersMinDistance(c){!this.slider||(this.slider.pointersMinDistance=c)}get pointersMinDistance(){var c,f;return(f=(c=this.slider)==null?void 0:c.pointersMinDistance)!=null?f:0}set pointersMaxDistance(c){!this.slider||(this.slider.pointersMaxDistance=c)}get pointersMaxDistance(){var c,f;return(f=(c=this.slider)==null?void 0:c.pointersMaxDistance)!=null?f:1/0}set theme(c){!this.slider||!this.slider.styles||(this.slider.styles.theme=c)}get theme(){var c,f,_;return(_=(f=(c=this.slider)==null?void 0:c.styles)==null?void 0:f.theme)!=null?_:null}set rtl(c){!this.slider||(this.slider.rightToLeft=c)}get rtl(){var c,f;return(f=(c=this.slider)==null?void 0:c.rightToLeft)!=null?f:!1}set btt(c){!this.slider||(this.slider.bottomToTop=c)}get btt(){var c,f;return(f=(c=this.slider)==null?void 0:c.bottomToTop)!=null?f:!1}set keyboardDisabled(c){!this.slider||(this.slider.keyboardDisabled=c)}get keyboardDisabled(){var c,f;return(f=(c=this.slider)==null?void 0:c.keyboardDisabled)!=null?f:!1}set mousewheelDisabled(c){!this.slider||(this.slider.mousewheelDisabled=c)}get mousewheelDisabled(){var c,f;return(f=(c=this.slider)==null?void 0:c.mousewheelDisabled)!=null?f:!1}set animateOnClick(c){!this.slider||(this.slider.animateOnClick=c)}get animateOnClick(){var c;return(c=this.slider)==null?void 0:c.animateOnClick}get rangeDragging(){var c,f;return(f=(c=this.slider)==null?void 0:c.rangeDragging)!=null?f:!1}set rangeDragging(c){this.slider&&(this.slider.rangeDragging=Ot(c))}get externalCSSList(){return this._externalCSSList}addPointer(c){var f,_;if(!this.slider)return;let b=(_=(f=this.slider)==null?void 0:f.addPointer(c))!=null?_:0;ta(this,this.slider,b,`value${b+1}`,`ariaLabel${b+1}`,`pointerShape${b+1}`,`pointer${b+1}Disabled`)}removePointer(){var c;!this.slider||(c=this.slider)==null||c.removePointer()}addCSS(c){if(!this.shadowRoot)return;let f=document.createElement("style");f.textContent=c,this.shadowRoot.appendChild(f)}connectedCallback(){var c,f;if(!this.shadowRoot)return;this._externalCSSList=ip(this),this.shadowRoot.innerHTML=s(r,this._externalCSSList);let _=(c=this.shadowRoot)==null?void 0:c.querySelector(".pointer");if(!_)return;let b=(f=this.shadowRoot)==null?void 0:f.getElementById("range-slider");if(!b)return;let C=op(this,_);this.slider=dp(this,b,C),ap(this,this.slider),this._observer=new MutationObserver(I=>{I.forEach(M=>{var E;if(!this.slider||M.type!=="attributes")return;let L=M.attributeName;!L||hp(this.slider,L,(E=this.getAttribute(L))!=null?E:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Or=cp;window.tcRangeSlider=Or,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Or),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Or{})})();function zc(n,t){Object.keys(t).forEach(e=>{n.setAttribute(e,t[e])})}class Uc extends Bt{register(){super.register()}unregister(){super.unregister()}build(){const t=this.schema.properties,e=this.options,i=this.schema.description,s=this.theme,r=this.defaults.startVals[this.key];e.compact||(this.header=this.label=s.getFormInputLabel(this.getTitle(),this.isRequired())),i&&(this.description=s.getFormInputDescription(this.translateProperty(i))),e.infoText&&(this.infoButton=s.getInfoButton(this.translateProperty(e.infoText)));const o=document.createElement("tc-range-slider"),a=Object.keys(t).find(h=>h.includes("min")),l=Object.keys(t).find(h=>h.includes("max")),d={min:t[a].minimum,max:t[l].maximum,value1:(r==null?void 0:r[a])||t[a].default,value2:(r==null?void 0:r[l])||t[l].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};zc(o,d),this.input=o,this.input.id=this.formname,this.control=s.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",h=>{h.preventDefault(),h.stopPropagation(),this.value={[a]:h.detail.value1,[l]:h.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 qc=[{type:"object",format:"minmax",func:Uc}],Gc=n=>{qc.map(({type:t,format:e,func:i})=>{tt.defaults.startVals=n,tt.defaults.editors[e]=i,tt.defaults.resolvers.unshift(s=>{if(s.type===t&&s.format===e)return e})})};class Oo extends Mt{constructor(){super();q(this,ss);q(this,rs);q(this,Ye,{});q(this,Be,null);this.schema,this.startVals,this.options={show_opt_in:!1,disable_collapse:!0,disable_edit_json:!0,disable_properties:!0,disable_array_delete_all_rows:!0,disable_array_delete_last_row:!0,array_controls_top:!0},this.unstyled=!1}getSchema(){return this.schema}setSchema(e){this.schema=e}getDefaultValues(){return this.startVals}setDefaultValues(e){this.startVals=e}getValues(){return nt(this,Ye)}firstUpdated(){if(!nt(this,Be)){Gc(this.startVals||{});const e=this.renderRoot.querySelector("form");Me(this,Be,new tt(e,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),Lt(this,rs,wa).call(this)}}render(){return z`
|
|
285
272
|
<style>
|
|
286
|
-
${
|
|
287
|
-
${!this.unstyled&&
|
|
273
|
+
${Vc}
|
|
274
|
+
${!this.unstyled&&Fc}
|
|
288
275
|
</style>
|
|
289
276
|
<form></form>
|
|
290
|
-
`}}
|
|
277
|
+
`}}Ye=new WeakMap,Be=new WeakMap,ss=new WeakSet,va=function(){this.dispatchEvent(new CustomEvent("change",{detail:nt(this,Ye),bubbles:!0,composed:!0})),this.requestUpdate()},rs=new WeakSet,wa=function(){["ready","change"].map(i=>{nt(this,Be).on(i,()=>{Me(this,Ye,nt(this,Be).getValue()),Lt(this,ss,va).call(this)})})},wt(Oo,"properties",{schema:{attribute:!1,type:Object},startVals:{attribute:!1,type:Object},options:{attribute:!1,type:Object},unstyled:{type:Boolean}}),customElements.define("eox-jsonform",Oo);const Zc=(n,t,e)=>{let i=t;return e.layer.getSource().getTileUrlFunction()&&(i||(i=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...s)=>zl(i(...s),n)),e.layer.getSource().setKey(new Date)),i};var is=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yc="Expected a function",Io=NaN,Xc="[object Symbol]",Jc=/^\s+|\s+$/g,Qc=/^[-+]0x[0-9a-f]+$/i,Kc=/^0b[01]+$/i,tu=/^0o[0-7]+$/i,eu=parseInt,iu=typeof is=="object"&&is&&is.Object===Object&&is,su=typeof self=="object"&&self&&self.Object===Object&&self,ru=iu||su||Function("return this")(),nu=Object.prototype,ou=nu.toString,au=Math.max,lu=Math.min,Lr=function(){return ru.Date.now()};function du(n,t,e){var i,s,r,o,a,l,d=0,h=!1,u=!1,g=!0;if(typeof n!="function")throw new TypeError(Yc);t=Bo(t)||0,Ar(e)&&(h=!!e.leading,u="maxWait"in e,r=u?au(Bo(e.maxWait)||0,t):r,g="trailing"in e?!!e.trailing:g);function m(H){var ut=i,Rt=s;return i=s=void 0,d=H,o=n.apply(Rt,ut),o}function y(H){return d=H,a=setTimeout(et,t),h?m(H):o}function w(H){var ut=H-l,Rt=H-d,ot=t-ut;return u?lu(ot,r-Rt):ot}function A(H){var ut=H-l,Rt=H-d;return l===void 0||ut>=t||ut<0||u&&Rt>=r}function et(){var H=Lr();if(A(H))return W(H);a=setTimeout(et,w(H))}function W(H){return a=void 0,g&&i?m(H):(i=s=void 0,o)}function _t(){a!==void 0&&clearTimeout(a),d=0,i=l=s=a=void 0}function pt(){return a===void 0?o:W(Lr())}function kt(){var H=Lr(),ut=A(H);if(i=arguments,s=this,l=H,ut){if(a===void 0)return y(l);if(u)return a=setTimeout(et,t),m(l)}return a===void 0&&(a=setTimeout(et,t)),o}return kt.cancel=_t,kt.flush=pt,kt}function Ar(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function hu(n){return!!n&&typeof n=="object"}function cu(n){return typeof n=="symbol"||hu(n)&&ou.call(n)==Xc}function Bo(n){if(typeof n=="number")return n;if(cu(n))return Io;if(Ar(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Ar(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(Jc,"");var e=Kc.test(n);return e||tu.test(n)?eu(n.slice(2),e?2:8):Qc.test(n)?Io:+n}var uu=du;const Ro=Wc(uu);class Do extends Mt{constructor(){super();q(this,ns);q(this,Ai,{});q(this,ki,null);q(this,Si,void 0);q(this,os,"");q(this,as,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.debouncedDataChange=Ro(Lt(this,ns,xa),1e3,{leading:!0})}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){Me(this,ki,xd(this.layer,this.layerConfig));const e={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return z`
|
|
291
278
|
<style>
|
|
292
|
-
${
|
|
293
|
-
${!this.unstyled&&
|
|
279
|
+
${nt(this,os)}
|
|
280
|
+
${!this.unstyled&&nt(this,as)}
|
|
294
281
|
</style>
|
|
295
|
-
${
|
|
282
|
+
${ee(this.layerConfig,()=>z`
|
|
296
283
|
<!-- Render a JSON form for layer configuration -->
|
|
297
284
|
<eox-jsonform
|
|
298
285
|
.schema=${this.layerConfig.schema}
|
|
299
|
-
.startVals=${
|
|
300
|
-
.options=${
|
|
301
|
-
@change=${
|
|
286
|
+
.startVals=${nt(this,ki)}
|
|
287
|
+
.options=${e}
|
|
288
|
+
@change=${this.debouncedDataChange}
|
|
302
289
|
></eox-jsonform>
|
|
303
290
|
`)}
|
|
304
|
-
`}}
|
|
291
|
+
`}}Ai=new WeakMap,ki=new WeakMap,Si=new WeakMap,ns=new WeakSet,xa=function(e){Me(this,Ai,e.detail),Me(this,Si,Zc(nt(this,Ai),nt(this,Si),this)),this.requestUpdate()},os=new WeakMap,as=new WeakMap,wt(Do,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",Do);class No extends Mt{constructor(){super();q(this,Ti,e=>this.selectedTab===e&&"highlighted");q(this,ls,`
|
|
305
292
|
.tabbed figure {
|
|
306
293
|
margin: 0;
|
|
307
294
|
}
|
|
@@ -321,7 +308,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
321
308
|
.tabbed label.highlighted {
|
|
322
309
|
background: lightgrey;
|
|
323
310
|
}
|
|
324
|
-
`);
|
|
311
|
+
`);q(this,ds,`
|
|
325
312
|
.tabbed {
|
|
326
313
|
font-size: small;
|
|
327
314
|
}
|
|
@@ -342,33 +329,33 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
342
329
|
background: #00417011;
|
|
343
330
|
border-top: 1px solid #0041701a;
|
|
344
331
|
}
|
|
345
|
-
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const
|
|
332
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.tabs,i=this.actions,s=i.length+e.length>1;return z`
|
|
346
333
|
<style>
|
|
347
|
-
${
|
|
348
|
-
${!this.unstyled&&
|
|
334
|
+
${nt(this,ls)}
|
|
335
|
+
${!this.unstyled&&nt(this,ds)}
|
|
349
336
|
</style>
|
|
350
337
|
<div class="tabbed">
|
|
351
338
|
<!-- Navigation for tabs and actions -->
|
|
352
|
-
${
|
|
339
|
+
${ee(s,()=>z`
|
|
353
340
|
<nav>
|
|
354
341
|
<div>
|
|
355
342
|
<!-- Labels for tabs -->
|
|
356
|
-
${
|
|
343
|
+
${Qi(e,(r,o)=>z`
|
|
357
344
|
<label
|
|
358
|
-
class=${
|
|
359
|
-
@click=${()=>this.selectedTab=
|
|
345
|
+
class=${nt(this,Ti).call(this,o)}
|
|
346
|
+
@click=${()=>this.selectedTab=o}
|
|
360
347
|
>
|
|
361
348
|
<!-- Customizable icon for each tab -->
|
|
362
|
-
<slot name=${`${
|
|
349
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
363
350
|
</label>
|
|
364
351
|
`)}
|
|
365
352
|
</div>
|
|
366
353
|
<div>
|
|
367
354
|
<!-- Icons for actions -->
|
|
368
|
-
${
|
|
355
|
+
${Qi(i,r=>z`
|
|
369
356
|
<span>
|
|
370
357
|
<!-- Customizable icon for each action -->
|
|
371
|
-
<slot name=${`${
|
|
358
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
372
359
|
</span>
|
|
373
360
|
`)}
|
|
374
361
|
</div>
|
|
@@ -376,15 +363,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
376
363
|
`)}
|
|
377
364
|
<figure>
|
|
378
365
|
<!-- Content for each tab -->
|
|
379
|
-
${
|
|
380
|
-
<div class="tab ${
|
|
366
|
+
${Qi(e,(r,o)=>z`
|
|
367
|
+
<div class="tab ${nt(this,Ti).call(this,o)}">
|
|
381
368
|
<!-- Content slot for each tab -->
|
|
382
|
-
<slot name=${`${
|
|
369
|
+
<slot name=${`${r}-content`}>${r}</slot>
|
|
383
370
|
</div>
|
|
384
371
|
`)}
|
|
385
372
|
</figure>
|
|
386
373
|
</div>
|
|
387
|
-
`}}
|
|
374
|
+
`}}Ti=new WeakMap,ls=new WeakMap,ds=new WeakMap,wt(No,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",No);const pu=`
|
|
388
375
|
button,
|
|
389
376
|
.button {
|
|
390
377
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -427,6 +414,7 @@ button, button:active,
|
|
|
427
414
|
button[disabled],
|
|
428
415
|
.button[disabled] {
|
|
429
416
|
opacity: 0.5;
|
|
417
|
+
cursor: not-allowed;
|
|
430
418
|
}
|
|
431
419
|
|
|
432
420
|
button.outline,
|
|
@@ -485,11 +473,18 @@ button.small,
|
|
|
485
473
|
padding: 12.4px;
|
|
486
474
|
font-size: .75rem;
|
|
487
475
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
476
|
+
|
|
477
|
+
button.smallest.icon,
|
|
478
|
+
button.smallest.icon::before {
|
|
479
|
+
height: 16px;
|
|
480
|
+
width: 16px;
|
|
481
|
+
padding: 0px;
|
|
482
|
+
}
|
|
483
|
+
`;class Mo extends Mt{constructor(){super();wt(this,"_removeButton",()=>Ad(this));wt(this,"_sortButton",()=>kd(this.unstyled));wt(this,"_button",e=>Ld(e,this.unstyled));q(this,hs,"");q(this,cs,`
|
|
484
|
+
${pu}
|
|
485
|
+
${$o}
|
|
486
|
+
${Er}
|
|
487
|
+
${Po}
|
|
493
488
|
.drag-handle {
|
|
494
489
|
cursor: n-resize;
|
|
495
490
|
}
|
|
@@ -581,35 +576,35 @@ button.small,
|
|
|
581
576
|
[slot=opacity-content] {
|
|
582
577
|
padding: 12px 6px;
|
|
583
578
|
}
|
|
584
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var
|
|
579
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=Cd(this.tools,this.layer),i=Ed(this.tools,this.layer),s=this[`_${e==null?void 0:e[0]}Button`]?this[`_${e==null?void 0:e[0]}Button`]():K,r=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",o=e==null?void 0:e.length,a=i==null?void 0:i.length;return z`
|
|
585
580
|
<style>
|
|
586
|
-
${
|
|
587
|
-
${!this.unstyled&&
|
|
581
|
+
${nt(this,hs)}
|
|
582
|
+
${!this.unstyled&&nt(this,cs)}
|
|
588
583
|
</style>
|
|
589
|
-
${
|
|
590
|
-
${
|
|
584
|
+
${ee(o+a>0,()=>z`
|
|
585
|
+
${ee(o===1&&a===0,()=>z`
|
|
591
586
|
<div class="single-action-container">
|
|
592
|
-
<div class="single-action">${
|
|
587
|
+
<div class="single-action">${s}</div>
|
|
593
588
|
</div>
|
|
594
|
-
`,()=>{var
|
|
589
|
+
`,()=>{var d;return z`
|
|
595
590
|
<details
|
|
596
591
|
class="tools"
|
|
597
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
592
|
+
open=${this.layer.get("layerControlToolsExpand")||K}
|
|
598
593
|
>
|
|
599
594
|
<summary>
|
|
600
|
-
<button class="icon ${
|
|
595
|
+
<button class="icon ${r}">Tools</button>
|
|
601
596
|
</summary>
|
|
602
597
|
<eox-layercontrol-tabs
|
|
603
598
|
.noShadow=${!1}
|
|
604
|
-
.actions=${
|
|
605
|
-
.tabs=${
|
|
599
|
+
.actions=${e}
|
|
600
|
+
.tabs=${i}
|
|
606
601
|
.unstyled=${this.unstyled}
|
|
607
602
|
>
|
|
608
603
|
<!-- Rendering tabs and content -->
|
|
609
|
-
${
|
|
604
|
+
${Qi(i,h=>this._button(h))}
|
|
610
605
|
|
|
611
606
|
<div slot="info-content">
|
|
612
|
-
${
|
|
607
|
+
${Sd(this.layer.get("description"))}
|
|
613
608
|
</div>
|
|
614
609
|
<div slot="opacity-content">
|
|
615
610
|
<!-- Input for opacity -->
|
|
@@ -618,8 +613,8 @@ button.small,
|
|
|
618
613
|
min="0"
|
|
619
614
|
max="1"
|
|
620
615
|
step="0.01"
|
|
621
|
-
value=${
|
|
622
|
-
@input=${
|
|
616
|
+
value=${ho((d=this.layer)==null?void 0:d.getOpacity())}
|
|
617
|
+
@input=${h=>this.layer.setOpacity(parseFloat(h.target.value))}
|
|
623
618
|
/>
|
|
624
619
|
</div>
|
|
625
620
|
<div slot="config-content">
|
|
@@ -639,8 +634,8 @@ button.small,
|
|
|
639
634
|
</details>
|
|
640
635
|
`})}
|
|
641
636
|
`)}
|
|
642
|
-
`}}
|
|
643
|
-
${
|
|
637
|
+
`}}hs=new WeakMap,cs=new WeakMap,wt(Mo,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Mo);const fu=n=>{const t=()=>{const e=vd(n.layer,n.map,n.showLayerZoomState);let i=!1;!e&&n.currLayerVisibilityBasedOnZoom?(n.currLayerVisibilityBasedOnZoom=!1,i=!0):e&&!n.currLayerVisibilityBasedOnZoom&&(n.currLayerVisibilityBasedOnZoom=!0,i=!0),i&&(n.requestUpdate(),n.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};oo(n.layer,n.showLayerZoomState)&&(t(),n.map.getView().on("change:resolution",()=>t()))},mu=(n,t)=>{const e=t.layer;e.setVisible(n.target.checked),n.target.checked&&e.get("layerControlExclusive")&&t.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(s=>{var r;s.layer!==e&&((r=s.layer)!=null&&r.get("layerControlExclusive"))&&(s.layer.setVisible(!1),s.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),t.requestUpdate()};class Ho extends Mt{constructor(){super();q(this,Xe);q(this,us);wt(this,"currLayerVisibilityBasedOnZoom",!0);q(this,ps,"");q(this,fs,`
|
|
638
|
+
${Er}
|
|
644
639
|
eox-layercontrol-layer {
|
|
645
640
|
width: 100%;
|
|
646
641
|
}
|
|
@@ -680,25 +675,25 @@ button.small,
|
|
|
680
675
|
[data-type=draw] .title::before {
|
|
681
676
|
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");
|
|
682
677
|
}
|
|
683
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){
|
|
678
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){fu(this)}render(){var l;const e=this.layer.getVisible(),i=e?"visible":"",s=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=Lt(this,Xe,Vs).call(this,"layerControlDisable")?"disabled":"",o=Lt(this,Xe,Vs).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return z`
|
|
684
679
|
<style>
|
|
685
|
-
${
|
|
686
|
-
${!this.unstyled&&
|
|
680
|
+
${nt(this,ps)}
|
|
681
|
+
${!this.unstyled&&nt(this,fs)}
|
|
687
682
|
</style>
|
|
688
|
-
${
|
|
683
|
+
${ee(this.layer,()=>z`
|
|
689
684
|
<!-- Render the layer -->
|
|
690
|
-
<div class="layer ${
|
|
691
|
-
<label class="drag-handle ${
|
|
685
|
+
<div class="layer ${i} ${s}">
|
|
686
|
+
<label class="drag-handle ${r}">
|
|
692
687
|
<!-- Input element for layer visibility -->
|
|
693
688
|
<input
|
|
694
|
-
type=${
|
|
695
|
-
.checked=${
|
|
696
|
-
@click=${
|
|
689
|
+
type=${o}
|
|
690
|
+
.checked=${ho(e)}
|
|
691
|
+
@click=${Lt(this,us,Ca)}
|
|
697
692
|
/>
|
|
698
693
|
|
|
699
694
|
<!-- Layer title -->
|
|
700
|
-
<span class="title">${
|
|
701
|
-
${
|
|
695
|
+
<span class="title">${Lt(this,Xe,Vs).call(this,this.titleProperty)}</span>
|
|
696
|
+
${ee(a,()=>z`<span class="tools-placeholder"></span>`)}
|
|
702
697
|
</label>
|
|
703
698
|
</div>
|
|
704
699
|
|
|
@@ -710,7 +705,7 @@ button.small,
|
|
|
710
705
|
.unstyled=${this.unstyled}
|
|
711
706
|
></eox-layercontrol-layer-tools>
|
|
712
707
|
`)}
|
|
713
|
-
`}}
|
|
708
|
+
`}}Xe=new WeakSet,Vs=function(e){var i;return(i=this.layer)==null?void 0:i.get(e)},us=new WeakSet,Ca=function(e){mu(e,this)},ps=new WeakMap,fs=new WeakMap,wt(Ho,"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",Ho);class Vo extends Mt{constructor(){super();q(this,ms,"");q(this,gs,`
|
|
714
709
|
details summary {
|
|
715
710
|
cursor: pointer;
|
|
716
711
|
display: flex;
|
|
@@ -731,14 +726,20 @@ button.small,
|
|
|
731
726
|
details[open] > summary:before {
|
|
732
727
|
transform: rotate(90deg);
|
|
733
728
|
}
|
|
734
|
-
|
|
729
|
+
details[data-children-length="0"] summary::before {
|
|
730
|
+
display: none;
|
|
731
|
+
}
|
|
732
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var s,r;const e=!!((s=this.group)!=null&&s.get("layerControlExpand")),i=(r=lo(this.group.getLayers()))==null?void 0:r.length;return z`
|
|
735
733
|
<style>
|
|
736
|
-
${
|
|
737
|
-
${!this.unstyled&&
|
|
734
|
+
${nt(this,ms)}
|
|
735
|
+
${!this.unstyled&&nt(this,gs)}
|
|
738
736
|
</style>
|
|
739
|
-
${
|
|
737
|
+
${ee(this.group,()=>z`
|
|
740
738
|
<!-- Render the details element with the layer control -->
|
|
741
|
-
<details
|
|
739
|
+
<details
|
|
740
|
+
open=${e||K}
|
|
741
|
+
data-children-length=${i}
|
|
742
|
+
>
|
|
742
743
|
<summary>
|
|
743
744
|
<!-- Render the layer control within the summary -->
|
|
744
745
|
<eox-layercontrol-layer
|
|
@@ -767,7 +768,7 @@ button.small,
|
|
|
767
768
|
></eox-layercontrol-layer-list>
|
|
768
769
|
</details>
|
|
769
770
|
`)}
|
|
770
|
-
`}}
|
|
771
|
+
`}}ms=new WeakMap,gs=new WeakMap,wt(Vo,"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",Vo);const gu=n=>{const{layers:t,idProperty:e,titleProperty:i,renderRoot:s}=n;if(t){const r=s.querySelector("ul");_d(t,e,i,n),yd(r,t,e,n)}},bu=n=>{const{layers:t}=n,e=Ro(()=>{n.requestUpdate(),n.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),i=()=>e();t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",i)),t.on("change:length",i))};class Fo extends Mt{constructor(){super();q(this,bs,"");q(this,ys,`
|
|
771
772
|
ul {
|
|
772
773
|
padding: 0;
|
|
773
774
|
margin: 0;
|
|
@@ -795,22 +796,22 @@ button.small,
|
|
|
795
796
|
}
|
|
796
797
|
li.sortable-ghost {
|
|
797
798
|
}
|
|
798
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){
|
|
799
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){gu(this)}updated(){bu(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=lo(this.layers).reverse();return z`
|
|
799
800
|
<style>
|
|
800
|
-
${
|
|
801
|
-
${!this.unstyled&&
|
|
801
|
+
${nt(this,bs)}
|
|
802
|
+
${!this.unstyled&&nt(this,ys)}
|
|
802
803
|
</style>
|
|
803
804
|
<ul>
|
|
804
|
-
${
|
|
805
|
-
${
|
|
805
|
+
${ee(this.layers,()=>z`
|
|
806
|
+
${Wa(e,i=>i,i=>z`
|
|
806
807
|
<li
|
|
807
|
-
data-layer="${
|
|
808
|
-
data-type="${
|
|
808
|
+
data-layer="${i.get(this.idProperty)}"
|
|
809
|
+
data-type="${wd(i,this.map)}"
|
|
809
810
|
>
|
|
810
|
-
${
|
|
811
|
+
${i.getLayers?z`
|
|
811
812
|
<eox-layercontrol-layer-group
|
|
812
813
|
.noShadow=${!0}
|
|
813
|
-
.group=${
|
|
814
|
+
.group=${i}
|
|
814
815
|
.idProperty=${this.idProperty}
|
|
815
816
|
.map=${this.map}
|
|
816
817
|
.titleProperty=${this.titleProperty}
|
|
@@ -820,10 +821,10 @@ button.small,
|
|
|
820
821
|
@changed=${()=>this.requestUpdate()}
|
|
821
822
|
>
|
|
822
823
|
</eox-layercontrol-layer-group>
|
|
823
|
-
`:
|
|
824
|
+
`:z`
|
|
824
825
|
<eox-layercontrol-layer
|
|
825
826
|
.noShadow=${!0}
|
|
826
|
-
.layer=${
|
|
827
|
+
.layer=${i}
|
|
827
828
|
.map=${this.map}
|
|
828
829
|
.titleProperty=${this.titleProperty}
|
|
829
830
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
@@ -836,7 +837,7 @@ button.small,
|
|
|
836
837
|
`)}
|
|
837
838
|
`)}
|
|
838
839
|
</ul>
|
|
839
|
-
`}}
|
|
840
|
+
`}}bs=new WeakMap,ys=new WeakMap,wt(Fo,"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",Fo);const yu=n=>{const t=n.querySelector("select[name=optional]"),e=t?t.value:null,i=_r(n.layers.getArray(),"layerControlOptional",!0).find(s=>(s.get(n.idProperty)||s.ol_uid)===e);i==null||i.set("layerControlOptional",!1),i==null||i.setVisible(!0),n.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),n.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(s=>s.requestUpdate()),n.requestUpdate()};class zo extends Mt{constructor(){super();q(this,_s);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=_r(this.layers.getArray(),"layerControlOptional",!0);return z`
|
|
840
841
|
<!-- Label for the dropdown -->
|
|
841
842
|
<label for="optional">Optional layers</label>
|
|
842
843
|
|
|
@@ -848,19 +849,19 @@ button.small,
|
|
|
848
849
|
</option>
|
|
849
850
|
|
|
850
851
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
851
|
-
${
|
|
852
|
+
${e.map(i=>{const s=i.get(this.idProperty)||i.ol_uid,r=i.get(this.titleProperty),o=`layer ${i.get(this.idProperty)}`;return z` <option value="${s}">${r||o}</option> `})}
|
|
852
853
|
</select>
|
|
853
854
|
|
|
854
855
|
<!-- Button to handle adding layers -->
|
|
855
|
-
<button @click="${
|
|
856
|
-
`}}
|
|
856
|
+
<button @click="${Lt(this,_s,Ea)}">add</button>
|
|
857
|
+
`}}_s=new WeakSet,Ea=function(){yu(this)},wt(zo,"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",zo);const _u=(n,t)=>{t.jsonInput=n.target.value,t.requestUpdate()},Uo=n=>{const t=JSON.parse(`{"data":${Rn(n.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(e=>{n.eoxMap.addOrUpdateLayer(e)}):n.eoxMap.addOrUpdateLayer(t.data),n.jsonInput=null,n.requestUpdate()},vu=(n,t)=>{t.urlInput=n.target.value,t.requestUpdate()};async function wu(n){const t=n.urlInput;if(n.wmsCapabilities=null,n.searchLoad=!0,n.requestUpdate(),!t)return!1;if(ir(t)==="XYZ")return{Name:t};try{const e=await Hl(t);n.wmsCapabilities=e}catch{}finally{n.searchLoad=!1,n.requestUpdate()}return!1}const xu=(n,t)=>{const{Name:e}=n,i=ir(t.urlInput)||"XYZ",s={type:"Tile",properties:{id:e,title:e},source:{type:i,url:t.urlInput,params:{LAYERS:e}}};t.jsonInput=JSON.stringify(s)},Cu=(n,t)=>{t.open=n||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class qo extends Mt{constructor(){super();q(this,vs);q(this,ws);q(this,ji);q(this,xs);q(this,Cs);q(this,Je);wt(this,"urlInput",null);wt(this,"jsonInput",null);wt(this,"open",null);wt(this,"searchLoad",!1);wt(this,"wmsCapabilities",null);q(this,Es,`
|
|
857
858
|
.eox-add-layer-main .open {
|
|
858
859
|
position: relative;
|
|
859
860
|
}
|
|
860
861
|
.eox-add-layer-main .close {
|
|
861
862
|
display: none;
|
|
862
863
|
}
|
|
863
|
-
`);
|
|
864
|
+
`);q(this,Ls,`
|
|
864
865
|
.eox-add {
|
|
865
866
|
background: #f0f2f5;
|
|
866
867
|
border-top: 1px solid #0041701a;
|
|
@@ -993,24 +994,24 @@ button.small,
|
|
|
993
994
|
font-weight: bold;
|
|
994
995
|
display: inline-block;
|
|
995
996
|
}
|
|
996
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const
|
|
997
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",i=this.open==="url",s=this.open==="json",r=!Vl(this.urlInput)||this.searchLoad?!0:K;return z`
|
|
997
998
|
<style>
|
|
998
|
-
${
|
|
999
|
-
${!this.unstyled&&
|
|
999
|
+
${nt(this,Es)}
|
|
1000
|
+
${!this.unstyled&&nt(this,Ls)}
|
|
1000
1001
|
</style>
|
|
1001
1002
|
<div class="eox-add-layer-main">
|
|
1002
1003
|
<div class="eox-add-layer-col">
|
|
1003
1004
|
<!-- Tabbed interface for URL and JSON -->
|
|
1004
|
-
<ul class="eox-add-layer-tab ${
|
|
1005
|
+
<ul class="eox-add-layer-tab ${e}">
|
|
1005
1006
|
<li
|
|
1006
|
-
@click=${()=>
|
|
1007
|
-
class="${
|
|
1007
|
+
@click=${()=>Lt(this,Je,Fs).call(this,"url")}
|
|
1008
|
+
class="${i?"active":""}"
|
|
1008
1009
|
>
|
|
1009
1010
|
URL
|
|
1010
1011
|
</li>
|
|
1011
1012
|
<li
|
|
1012
|
-
@click=${()=>
|
|
1013
|
-
class="${
|
|
1013
|
+
@click=${()=>Lt(this,Je,Fs).call(this,"json")}
|
|
1014
|
+
class="${s?"active":""}"
|
|
1014
1015
|
>
|
|
1015
1016
|
JSON
|
|
1016
1017
|
</li>
|
|
@@ -1019,13 +1020,13 @@ button.small,
|
|
|
1019
1020
|
<!-- Button to toggle tabs -->
|
|
1020
1021
|
<button
|
|
1021
1022
|
class="add-icon icon"
|
|
1022
|
-
@click=${()=>
|
|
1023
|
+
@click=${()=>Lt(this,Je,Fs).call(this,this.open?null:"url")}
|
|
1023
1024
|
>
|
|
1024
1025
|
${this.unstyled?"Add Layer":""}
|
|
1025
1026
|
</button>
|
|
1026
1027
|
</div>
|
|
1027
|
-
<div class="eox-add ${
|
|
1028
|
-
${
|
|
1028
|
+
<div class="eox-add ${e}">
|
|
1029
|
+
${i?z`
|
|
1029
1030
|
<!-- Input field for URL -->
|
|
1030
1031
|
<div class="eox-add-layer-col">
|
|
1031
1032
|
<input
|
|
@@ -1033,71 +1034,71 @@ button.small,
|
|
|
1033
1034
|
class="add-url"
|
|
1034
1035
|
placeholder="Add URL (WMS/XYZ)"
|
|
1035
1036
|
.value="${this.urlInput}"
|
|
1036
|
-
@input=${
|
|
1037
|
+
@input=${Lt(this,vs,La)}
|
|
1037
1038
|
>
|
|
1038
1039
|
</input>
|
|
1039
1040
|
<!-- Search button for URL -->
|
|
1040
1041
|
<button
|
|
1041
1042
|
class="search-icon"
|
|
1042
|
-
disabled=${
|
|
1043
|
-
@click=${
|
|
1043
|
+
disabled=${r}
|
|
1044
|
+
@click=${Lt(this,ws,Aa)}
|
|
1044
1045
|
>
|
|
1045
1046
|
${this.unstyled?"Search":""}
|
|
1046
1047
|
</button>
|
|
1047
1048
|
</div>
|
|
1048
1049
|
|
|
1049
1050
|
<!-- Display layers for WMS capabilities -->
|
|
1050
|
-
${this.wmsCapabilities?
|
|
1051
|
-
${this.wmsCapabilities.Capability.Layer.Layer.map(
|
|
1051
|
+
${this.wmsCapabilities?z`<ul class="search-lists">
|
|
1052
|
+
${this.wmsCapabilities.Capability.Layer.Layer.map(o=>{const a=o.Name;return z`
|
|
1052
1053
|
<li class="search-list">
|
|
1053
|
-
${
|
|
1054
|
+
${a}
|
|
1054
1055
|
<!-- Button to add layer -->
|
|
1055
1056
|
<button
|
|
1056
1057
|
class="add-layer-icon icon"
|
|
1057
|
-
@click=${()=>
|
|
1058
|
+
@click=${()=>Lt(this,ji,rn).call(this,o)}
|
|
1058
1059
|
>
|
|
1059
1060
|
${this.unstyled?"+":""}
|
|
1060
1061
|
</button>
|
|
1061
1062
|
</li>
|
|
1062
1063
|
`})}
|
|
1063
|
-
</ul>`:
|
|
1064
|
-
`:
|
|
1064
|
+
</ul>`:K}
|
|
1065
|
+
`:z`
|
|
1065
1066
|
<!-- Textarea for JSON input -->
|
|
1066
1067
|
<textarea
|
|
1067
1068
|
class="add-layer-input"
|
|
1068
1069
|
placeholder="Please put a valid eox-map layer JSON."
|
|
1069
|
-
@input=${
|
|
1070
|
+
@input=${Lt(this,Cs,Sa)}
|
|
1070
1071
|
.value=${this.jsonInput}
|
|
1071
1072
|
></textarea>
|
|
1072
1073
|
|
|
1073
1074
|
<!-- Button to add JSON layer -->
|
|
1074
1075
|
<button
|
|
1075
1076
|
class="add-layer-icon json-add-layer"
|
|
1076
|
-
disabled=${
|
|
1077
|
-
@click=${
|
|
1077
|
+
disabled=${Fl(this.jsonInput)?K:!0}
|
|
1078
|
+
@click=${Lt(this,xs,ka)}
|
|
1078
1079
|
>
|
|
1079
1080
|
${this.unstyled?"Add JSON":""}
|
|
1080
1081
|
</button>
|
|
1081
1082
|
`}
|
|
1082
1083
|
</div>
|
|
1083
1084
|
</div>
|
|
1084
|
-
`}}
|
|
1085
|
+
`}}vs=new WeakSet,La=function(e){vu(e,this)},ws=new WeakSet,Aa=async function(){const e=await wu(this);e&&Lt(this,ji,rn).call(this,e)},ji=new WeakSet,rn=function(e){xu(e,this),Uo(this)},xs=new WeakSet,ka=function(){Uo(this)},Cs=new WeakSet,Sa=function(e){_u(e,this)},Je=new WeakSet,Fs=function(e){Cu(e,this)},Es=new WeakMap,Ls=new WeakMap,wt(qo,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",qo);const Eu=(n,t)=>{if(t.requestUpdate(),n.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const e=t.renderRoot.querySelector("eox-layercontrol-optional-list");e==null||e.requestUpdate()}},Lu=n=>{const t=n.for;return document.querySelector(t)},Au=n=>{const t=document.querySelector(n.for);t&&t.map!==n.map&&(n.map=t.map)};class kr extends Mt{constructor(){super();q(this,As);q(this,Qe,void 0);q(this,ks,"* { font-family: Roboto, sans-serif; }");this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}updated(){Au(this)}firstUpdated(){Me(this,Qe,Lu(this))}render(){var s,r,o;const e=(s=this.map)==null?void 0:s.getLayers().getArray(),i=e&&((r=_r(e,"layerControlOptional",!0))==null?void 0:r.length)>0;return z`
|
|
1085
1086
|
<style>
|
|
1086
|
-
${!this.unstyled&&
|
|
1087
|
+
${!this.unstyled&&nt(this,ks)}
|
|
1087
1088
|
${this.styleOverride}
|
|
1088
1089
|
</style>
|
|
1089
1090
|
|
|
1090
1091
|
<!-- Conditional rendering of add layers component -->
|
|
1091
|
-
${
|
|
1092
|
+
${ee(this.addExternalLayers&&((o=nt(this,Qe))==null?void 0:o.addOrUpdateLayer),()=>z`
|
|
1092
1093
|
<eox-layercontrol-add-layers
|
|
1093
1094
|
.noShadow=${!0}
|
|
1094
|
-
.eoxMap=${
|
|
1095
|
+
.eoxMap=${nt(this,Qe)}
|
|
1095
1096
|
.unstyled=${this.unstyled}
|
|
1096
1097
|
></eox-layercontrol-add-layers>
|
|
1097
1098
|
`)}
|
|
1098
1099
|
|
|
1099
1100
|
<!-- Conditional rendering of layer list component -->
|
|
1100
|
-
${
|
|
1101
|
+
${ee(this.map,()=>z`
|
|
1101
1102
|
<eox-layercontrol-layer-list
|
|
1102
1103
|
.noShadow=${!0}
|
|
1103
1104
|
class="layers"
|
|
@@ -1108,12 +1109,12 @@ button.small,
|
|
|
1108
1109
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
1109
1110
|
.tools=${this.tools}
|
|
1110
1111
|
.unstyled=${this.unstyled}
|
|
1111
|
-
@changed=${
|
|
1112
|
+
@changed=${Lt(this,As,Ta)}
|
|
1112
1113
|
></eox-layercontrol-layer-list>
|
|
1113
1114
|
`)}
|
|
1114
1115
|
|
|
1115
1116
|
<!-- Conditional rendering of optional list component -->
|
|
1116
|
-
${
|
|
1117
|
+
${ee(i,()=>z`
|
|
1117
1118
|
<eox-layercontrol-optional-list
|
|
1118
1119
|
.noShadow=${!0}
|
|
1119
1120
|
.idProperty=${this.idProperty}
|
|
@@ -1122,4 +1123,4 @@ button.small,
|
|
|
1122
1123
|
@changed=${()=>this.requestUpdate()}
|
|
1123
1124
|
></eox-layercontrol-optional-list>
|
|
1124
1125
|
`)}
|
|
1125
|
-
`}}
|
|
1126
|
+
`}}Qe=new WeakMap,As=new WeakSet,Ta=function(e){Eu(e,this)},ks=new WeakMap,wt(kr,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",kr),rt.EOxLayerControl=kr,Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"})});
|