beanbagdb-components 0.2.8 → 0.2.9

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/main.umd.cjs CHANGED
@@ -1,43 +1,43 @@
1
- (function(Cn,zi){typeof exports=="object"&&typeof module<"u"?zi(exports):typeof define=="function"&&define.amd?define(["exports"],zi):(Cn=typeof globalThis<"u"?globalThis:Cn||self,zi(Cn.BBDBComponents={}))})(this,(function(Cn){"use strict";function zi(o,a){return function(){return o.apply(a,arguments)}}const{toString:hm}=Object.prototype,{getPrototypeOf:pl}=Object,{iterator:Ta,toStringTag:Eu}=Symbol,Ra=(o=>a=>{const h=hm.call(a);return o[h]||(o[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),Or=o=>(o=o.toLowerCase(),a=>Ra(a)===o),La=o=>a=>typeof a===o,{isArray:qi}=Array,Hi=La("undefined");function Jo(o){return o!==null&&!Hi(o)&&o.constructor!==null&&!Hi(o.constructor)&&cr(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Ou=Or("ArrayBuffer");function fm(o){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(o):a=o&&o.buffer&&Ou(o.buffer),a}const pm=La("string"),cr=La("function"),xu=La("number"),Ko=o=>o!==null&&typeof o=="object",mm=o=>o===!0||o===!1,Aa=o=>{if(Ra(o)!=="object")return!1;const a=pl(o);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Eu in o)&&!(Ta in o)},ym=o=>{if(!Ko(o)||Jo(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},vm=Or("Date"),bm=Or("File"),gm=Or("Blob"),_m=Or("FileList"),wm=o=>Ko(o)&&cr(o.pipe),km=o=>{let a;return o&&(typeof FormData=="function"&&o instanceof FormData||cr(o.append)&&((a=Ra(o))==="formdata"||a==="object"&&cr(o.toString)&&o.toString()==="[object FormData]"))},jm=Or("URLSearchParams"),[Em,Om,xm,Sm]=["ReadableStream","Request","Response","Headers"].map(Or),Cm=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wo(o,a,{allOwnKeys:h=!1}={}){if(o===null||typeof o>"u")return;let p,y;if(typeof o!="object"&&(o=[o]),qi(o))for(p=0,y=o.length;p<y;p++)a.call(null,o[p],p,o);else{if(Jo(o))return;const _=h?Object.getOwnPropertyNames(o):Object.keys(o),d=_.length;let v;for(p=0;p<d;p++)v=_[p],a.call(null,o[v],v,o)}}function Su(o,a){if(Jo(o))return null;a=a.toLowerCase();const h=Object.keys(o);let p=h.length,y;for(;p-- >0;)if(y=h[p],a===y.toLowerCase())return y;return null}const ii=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cu=o=>!Hi(o)&&o!==ii;function ml(){const{caseless:o,skipUndefined:a}=Cu(this)&&this||{},h={},p=(y,_)=>{const d=o&&Su(h,_)||_;Aa(h[d])&&Aa(y)?h[d]=ml(h[d],y):Aa(y)?h[d]=ml({},y):qi(y)?h[d]=y.slice():(!a||!Hi(y))&&(h[d]=y)};for(let y=0,_=arguments.length;y<_;y++)arguments[y]&&Wo(arguments[y],p);return h}const Pm=(o,a,h,{allOwnKeys:p}={})=>(Wo(a,(y,_)=>{h&&cr(y)?o[_]=zi(y,h):o[_]=y},{allOwnKeys:p}),o),Tm=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),Rm=(o,a,h,p)=>{o.prototype=Object.create(a.prototype,p),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:a.prototype}),h&&Object.assign(o.prototype,h)},Lm=(o,a,h,p)=>{let y,_,d;const v={};if(a=a||{},o==null)return a;do{for(y=Object.getOwnPropertyNames(o),_=y.length;_-- >0;)d=y[_],(!p||p(d,o,a))&&!v[d]&&(a[d]=o[d],v[d]=!0);o=h!==!1&&pl(o)}while(o&&(!h||h(o,a))&&o!==Object.prototype);return a},Am=(o,a,h)=>{o=String(o),(h===void 0||h>o.length)&&(h=o.length),h-=a.length;const p=o.indexOf(a,h);return p!==-1&&p===h},$m=o=>{if(!o)return null;if(qi(o))return o;let a=o.length;if(!xu(a))return null;const h=new Array(a);for(;a-- >0;)h[a]=o[a];return h},Nm=(o=>a=>o&&a instanceof o)(typeof Uint8Array<"u"&&pl(Uint8Array)),Im=(o,a)=>{const p=(o&&o[Ta]).call(o);let y;for(;(y=p.next())&&!y.done;){const _=y.value;a.call(o,_[0],_[1])}},Dm=(o,a)=>{let h;const p=[];for(;(h=o.exec(a))!==null;)p.push(h);return p},Bm=Or("HTMLFormElement"),Fm=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,p,y){return p.toUpperCase()+y}),Pu=(({hasOwnProperty:o})=>(a,h)=>o.call(a,h))(Object.prototype),Mm=Or("RegExp"),Tu=(o,a)=>{const h=Object.getOwnPropertyDescriptors(o),p={};Wo(h,(y,_)=>{let d;(d=a(y,_,o))!==!1&&(p[_]=d||y)}),Object.defineProperties(o,p)},Vm=o=>{Tu(o,(a,h)=>{if(cr(o)&&["arguments","caller","callee"].indexOf(h)!==-1)return!1;const p=o[h];if(cr(p)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+h+"'")})}})},zm=(o,a)=>{const h={},p=y=>{y.forEach(_=>{h[_]=!0})};return qi(o)?p(o):p(String(o).split(a)),h},qm=()=>{},Hm=(o,a)=>o!=null&&Number.isFinite(o=+o)?o:a;function Um(o){return!!(o&&cr(o.append)&&o[Eu]==="FormData"&&o[Ta])}const Gm=o=>{const a=new Array(10),h=(p,y)=>{if(Ko(p)){if(a.indexOf(p)>=0)return;if(Jo(p))return p;if(!("toJSON"in p)){a[y]=p;const _=qi(p)?[]:{};return Wo(p,(d,v)=>{const i=h(d,y+1);!Hi(i)&&(_[v]=i)}),a[y]=void 0,_}}return p};return h(o,0)},Jm=Or("AsyncFunction"),Km=o=>o&&(Ko(o)||cr(o))&&cr(o.then)&&cr(o.catch),Ru=((o,a)=>o?setImmediate:a?((h,p)=>(ii.addEventListener("message",({source:y,data:_})=>{y===ii&&_===h&&p.length&&p.shift()()},!1),y=>{p.push(y),ii.postMessage(h,"*")}))(`axios@${Math.random()}`,[]):h=>setTimeout(h))(typeof setImmediate=="function",cr(ii.postMessage)),Wm=typeof queueMicrotask<"u"?queueMicrotask.bind(ii):typeof process<"u"&&process.nextTick||Ru,ae={isArray:qi,isArrayBuffer:Ou,isBuffer:Jo,isFormData:km,isArrayBufferView:fm,isString:pm,isNumber:xu,isBoolean:mm,isObject:Ko,isPlainObject:Aa,isEmptyObject:ym,isReadableStream:Em,isRequest:Om,isResponse:xm,isHeaders:Sm,isUndefined:Hi,isDate:vm,isFile:bm,isBlob:gm,isRegExp:Mm,isFunction:cr,isStream:wm,isURLSearchParams:jm,isTypedArray:Nm,isFileList:_m,forEach:Wo,merge:ml,extend:Pm,trim:Cm,stripBOM:Tm,inherits:Rm,toFlatObject:Lm,kindOf:Ra,kindOfTest:Or,endsWith:Am,toArray:$m,forEachEntry:Im,matchAll:Dm,isHTMLForm:Bm,hasOwnProperty:Pu,hasOwnProp:Pu,reduceDescriptors:Tu,freezeMethods:Vm,toObjectSet:zm,toCamelCase:Fm,noop:qm,toFiniteNumber:Hm,findKey:Su,global:ii,isContextDefined:Cu,isSpecCompliantForm:Um,toJSONObject:Gm,isAsyncFn:Jm,isThenable:Km,setImmediate:Ru,asap:Wm,isIterable:o=>o!=null&&cr(o[Ta])};function ze(o,a,h,p,y){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",a&&(this.code=a),h&&(this.config=h),p&&(this.request=p),y&&(this.response=y,this.status=y.status?y.status:null)}ae.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Lu=ze.prototype,Au={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(o=>{Au[o]={value:o}}),Object.defineProperties(ze,Au),Object.defineProperty(Lu,"isAxiosError",{value:!0}),ze.from=(o,a,h,p,y,_)=>{const d=Object.create(Lu);ae.toFlatObject(o,d,function(m){return m!==Error.prototype},f=>f!=="isAxiosError");const v=o&&o.message?o.message:"Error",i=a==null&&o?o.code:a;return ze.call(d,v,i,h,p,y),o&&d.cause==null&&Object.defineProperty(d,"cause",{value:o,configurable:!0}),d.name=o&&o.name||"Error",_&&Object.assign(d,_),d};const Zm=null;function yl(o){return ae.isPlainObject(o)||ae.isArray(o)}function $u(o){return ae.endsWith(o,"[]")?o.slice(0,-2):o}function Nu(o,a,h){return o?o.concat(a).map(function(y,_){return y=$u(y),!h&&_?"["+y+"]":y}).join(h?".":""):a}function Ym(o){return ae.isArray(o)&&!o.some(yl)}const Qm=ae.toFlatObject(ae,{},null,function(a){return/^is[A-Z]/.test(a)});function $a(o,a,h){if(!ae.isObject(o))throw new TypeError("target must be an object");a=a||new FormData,h=ae.toFlatObject(h,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,j){return!ae.isUndefined(j[O])});const p=h.metaTokens,y=h.visitor||m,_=h.dots,d=h.indexes,i=(h.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(a);if(!ae.isFunction(y))throw new TypeError("visitor must be a function");function f(E){if(E===null)return"";if(ae.isDate(E))return E.toISOString();if(ae.isBoolean(E))return E.toString();if(!i&&ae.isBlob(E))throw new ze("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(E)||ae.isTypedArray(E)?i&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function m(E,O,j){let x=E;if(E&&!j&&typeof E=="object"){if(ae.endsWith(O,"{}"))O=p?O:O.slice(0,-2),E=JSON.stringify(E);else if(ae.isArray(E)&&Ym(E)||(ae.isFileList(E)||ae.endsWith(O,"[]"))&&(x=ae.toArray(E)))return O=$u(O),x.forEach(function(P,L){!(ae.isUndefined(P)||P===null)&&a.append(d===!0?Nu([O],L,_):d===null?O:O+"[]",f(P))}),!1}return yl(E)?!0:(a.append(Nu(j,O,_),f(E)),!1)}const g=[],b=Object.assign(Qm,{defaultVisitor:m,convertValue:f,isVisitable:yl});function w(E,O){if(!ae.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+O.join("."));g.push(E),ae.forEach(E,function(x,S){(!(ae.isUndefined(x)||x===null)&&y.call(a,x,ae.isString(S)?S.trim():S,O,b))===!0&&w(x,O?O.concat(S):[S])}),g.pop()}}if(!ae.isObject(o))throw new TypeError("data must be an object");return w(o),a}function Iu(o){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(p){return a[p]})}function vl(o,a){this._pairs=[],o&&$a(o,this,a)}const Du=vl.prototype;Du.append=function(a,h){this._pairs.push([a,h])},Du.toString=function(a){const h=a?function(p){return a.call(this,p,Iu)}:Iu;return this._pairs.map(function(y){return h(y[0])+"="+h(y[1])},"").join("&")};function Xm(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bu(o,a,h){if(!a)return o;const p=h&&h.encode||Xm;ae.isFunction(h)&&(h={serialize:h});const y=h&&h.serialize;let _;if(y?_=y(a,h):_=ae.isURLSearchParams(a)?a.toString():new vl(a,h).toString(p),_){const d=o.indexOf("#");d!==-1&&(o=o.slice(0,d)),o+=(o.indexOf("?")===-1?"?":"&")+_}return o}class Fu{constructor(){this.handlers=[]}use(a,h,p){return this.handlers.push({fulfilled:a,rejected:h,synchronous:p?p.synchronous:!1,runWhen:p?p.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){ae.forEach(this.handlers,function(p){p!==null&&a(p)})}}const Mu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ey={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:vl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},bl=typeof window<"u"&&typeof document<"u",gl=typeof navigator=="object"&&navigator||void 0,ty=bl&&(!gl||["ReactNative","NativeScript","NS"].indexOf(gl.product)<0),ry=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ny=bl&&window.location.href||"http://localhost",Yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bl,hasStandardBrowserEnv:ty,hasStandardBrowserWebWorkerEnv:ry,navigator:gl,origin:ny},Symbol.toStringTag,{value:"Module"})),...ey};function iy(o,a){return $a(o,new Yt.classes.URLSearchParams,{visitor:function(h,p,y,_){return Yt.isNode&&ae.isBuffer(h)?(this.append(p,h.toString("base64")),!1):_.defaultVisitor.apply(this,arguments)},...a})}function oy(o){return ae.matchAll(/\w+|\[(\w*)]/g,o).map(a=>a[0]==="[]"?"":a[1]||a[0])}function ay(o){const a={},h=Object.keys(o);let p;const y=h.length;let _;for(p=0;p<y;p++)_=h[p],a[_]=o[_];return a}function Vu(o){function a(h,p,y,_){let d=h[_++];if(d==="__proto__")return!0;const v=Number.isFinite(+d),i=_>=h.length;return d=!d&&ae.isArray(y)?y.length:d,i?(ae.hasOwnProp(y,d)?y[d]=[y[d],p]:y[d]=p,!v):((!y[d]||!ae.isObject(y[d]))&&(y[d]=[]),a(h,p,y[d],_)&&ae.isArray(y[d])&&(y[d]=ay(y[d])),!v)}if(ae.isFormData(o)&&ae.isFunction(o.entries)){const h={};return ae.forEachEntry(o,(p,y)=>{a(oy(p),y,h,0)}),h}return null}function sy(o,a,h){if(ae.isString(o))try{return(a||JSON.parse)(o),ae.trim(o)}catch(p){if(p.name!=="SyntaxError")throw p}return(h||JSON.stringify)(o)}const Zo={transitional:Mu,adapter:["xhr","http","fetch"],transformRequest:[function(a,h){const p=h.getContentType()||"",y=p.indexOf("application/json")>-1,_=ae.isObject(a);if(_&&ae.isHTMLForm(a)&&(a=new FormData(a)),ae.isFormData(a))return y?JSON.stringify(Vu(a)):a;if(ae.isArrayBuffer(a)||ae.isBuffer(a)||ae.isStream(a)||ae.isFile(a)||ae.isBlob(a)||ae.isReadableStream(a))return a;if(ae.isArrayBufferView(a))return a.buffer;if(ae.isURLSearchParams(a))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let v;if(_){if(p.indexOf("application/x-www-form-urlencoded")>-1)return iy(a,this.formSerializer).toString();if((v=ae.isFileList(a))||p.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return $a(v?{"files[]":a}:a,i&&new i,this.formSerializer)}}return _||y?(h.setContentType("application/json",!1),sy(a)):a}],transformResponse:[function(a){const h=this.transitional||Zo.transitional,p=h&&h.forcedJSONParsing,y=this.responseType==="json";if(ae.isResponse(a)||ae.isReadableStream(a))return a;if(a&&ae.isString(a)&&(p&&!this.responseType||y)){const d=!(h&&h.silentJSONParsing)&&y;try{return JSON.parse(a,this.parseReviver)}catch(v){if(d)throw v.name==="SyntaxError"?ze.from(v,ze.ERR_BAD_RESPONSE,this,null,this.response):v}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],o=>{Zo.headers[o]={}});const ly=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cy=o=>{const a={};let h,p,y;return o&&o.split(`
2
- `).forEach(function(d){y=d.indexOf(":"),h=d.substring(0,y).trim().toLowerCase(),p=d.substring(y+1).trim(),!(!h||a[h]&&ly[h])&&(h==="set-cookie"?a[h]?a[h].push(p):a[h]=[p]:a[h]=a[h]?a[h]+", "+p:p)}),a},zu=Symbol("internals");function Yo(o){return o&&String(o).trim().toLowerCase()}function Na(o){return o===!1||o==null?o:ae.isArray(o)?o.map(Na):String(o)}function uy(o){const a=Object.create(null),h=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let p;for(;p=h.exec(o);)a[p[1]]=p[2];return a}const dy=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function _l(o,a,h,p,y){if(ae.isFunction(p))return p.call(this,a,h);if(y&&(a=h),!!ae.isString(a)){if(ae.isString(p))return a.indexOf(p)!==-1;if(ae.isRegExp(p))return p.test(a)}}function hy(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,h,p)=>h.toUpperCase()+p)}function fy(o,a){const h=ae.toCamelCase(" "+a);["get","set","has"].forEach(p=>{Object.defineProperty(o,p+h,{value:function(y,_,d){return this[p].call(this,a,y,_,d)},configurable:!0})})}let ur=class{constructor(a){a&&this.set(a)}set(a,h,p){const y=this;function _(v,i,f){const m=Yo(i);if(!m)throw new Error("header name must be a non-empty string");const g=ae.findKey(y,m);(!g||y[g]===void 0||f===!0||f===void 0&&y[g]!==!1)&&(y[g||i]=Na(v))}const d=(v,i)=>ae.forEach(v,(f,m)=>_(f,m,i));if(ae.isPlainObject(a)||a instanceof this.constructor)d(a,h);else if(ae.isString(a)&&(a=a.trim())&&!dy(a))d(cy(a),h);else if(ae.isObject(a)&&ae.isIterable(a)){let v={},i,f;for(const m of a){if(!ae.isArray(m))throw TypeError("Object iterator must return a key-value pair");v[f=m[0]]=(i=v[f])?ae.isArray(i)?[...i,m[1]]:[i,m[1]]:m[1]}d(v,h)}else a!=null&&_(h,a,p);return this}get(a,h){if(a=Yo(a),a){const p=ae.findKey(this,a);if(p){const y=this[p];if(!h)return y;if(h===!0)return uy(y);if(ae.isFunction(h))return h.call(this,y,p);if(ae.isRegExp(h))return h.exec(y);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,h){if(a=Yo(a),a){const p=ae.findKey(this,a);return!!(p&&this[p]!==void 0&&(!h||_l(this,this[p],p,h)))}return!1}delete(a,h){const p=this;let y=!1;function _(d){if(d=Yo(d),d){const v=ae.findKey(p,d);v&&(!h||_l(p,p[v],v,h))&&(delete p[v],y=!0)}}return ae.isArray(a)?a.forEach(_):_(a),y}clear(a){const h=Object.keys(this);let p=h.length,y=!1;for(;p--;){const _=h[p];(!a||_l(this,this[_],_,a,!0))&&(delete this[_],y=!0)}return y}normalize(a){const h=this,p={};return ae.forEach(this,(y,_)=>{const d=ae.findKey(p,_);if(d){h[d]=Na(y),delete h[_];return}const v=a?hy(_):String(_).trim();v!==_&&delete h[_],h[v]=Na(y),p[v]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const h=Object.create(null);return ae.forEach(this,(p,y)=>{p!=null&&p!==!1&&(h[y]=a&&ae.isArray(p)?p.join(", "):p)}),h}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,h])=>a+": "+h).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...h){const p=new this(a);return h.forEach(y=>p.set(y)),p}static accessor(a){const p=(this[zu]=this[zu]={accessors:{}}).accessors,y=this.prototype;function _(d){const v=Yo(d);p[v]||(fy(y,d),p[v]=!0)}return ae.isArray(a)?a.forEach(_):_(a),this}};ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ae.reduceDescriptors(ur.prototype,({value:o},a)=>{let h=a[0].toUpperCase()+a.slice(1);return{get:()=>o,set(p){this[h]=p}}}),ae.freezeMethods(ur);function wl(o,a){const h=this||Zo,p=a||h,y=ur.from(p.headers);let _=p.data;return ae.forEach(o,function(v){_=v.call(h,_,y.normalize(),a?a.status:void 0)}),y.normalize(),_}function qu(o){return!!(o&&o.__CANCEL__)}function Ui(o,a,h){ze.call(this,o??"canceled",ze.ERR_CANCELED,a,h),this.name="CanceledError"}ae.inherits(Ui,ze,{__CANCEL__:!0});function Hu(o,a,h){const p=h.config.validateStatus;!h.status||!p||p(h.status)?o(h):a(new ze("Request failed with status code "+h.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(h.status/100)-4],h.config,h.request,h))}function py(o){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return a&&a[1]||""}function my(o,a){o=o||10;const h=new Array(o),p=new Array(o);let y=0,_=0,d;return a=a!==void 0?a:1e3,function(i){const f=Date.now(),m=p[_];d||(d=f),h[y]=i,p[y]=f;let g=_,b=0;for(;g!==y;)b+=h[g++],g=g%o;if(y=(y+1)%o,y===_&&(_=(_+1)%o),f-d<a)return;const w=m&&f-m;return w?Math.round(b*1e3/w):void 0}}function yy(o,a){let h=0,p=1e3/a,y,_;const d=(f,m=Date.now())=>{h=m,y=null,_&&(clearTimeout(_),_=null),o(...f)};return[(...f)=>{const m=Date.now(),g=m-h;g>=p?d(f,m):(y=f,_||(_=setTimeout(()=>{_=null,d(y)},p-g)))},()=>y&&d(y)]}const Ia=(o,a,h=3)=>{let p=0;const y=my(50,250);return yy(_=>{const d=_.loaded,v=_.lengthComputable?_.total:void 0,i=d-p,f=y(i),m=d<=v;p=d;const g={loaded:d,total:v,progress:v?d/v:void 0,bytes:i,rate:f||void 0,estimated:f&&v&&m?(v-d)/f:void 0,event:_,lengthComputable:v!=null,[a?"download":"upload"]:!0};o(g)},h)},Uu=(o,a)=>{const h=o!=null;return[p=>a[0]({lengthComputable:h,total:o,loaded:p}),a[1]]},Gu=o=>(...a)=>ae.asap(()=>o(...a)),vy=Yt.hasStandardBrowserEnv?((o,a)=>h=>(h=new URL(h,Yt.origin),o.protocol===h.protocol&&o.host===h.host&&(a||o.port===h.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,by=Yt.hasStandardBrowserEnv?{write(o,a,h,p,y,_,d){if(typeof document>"u")return;const v=[`${o}=${encodeURIComponent(a)}`];ae.isNumber(h)&&v.push(`expires=${new Date(h).toUTCString()}`),ae.isString(p)&&v.push(`path=${p}`),ae.isString(y)&&v.push(`domain=${y}`),_===!0&&v.push("secure"),ae.isString(d)&&v.push(`SameSite=${d}`),document.cookie=v.join("; ")},read(o){if(typeof document>"u")return null;const a=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return a?decodeURIComponent(a[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gy(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function _y(o,a){return a?o.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):o}function Ju(o,a,h){let p=!gy(a);return o&&(p||h==!1)?_y(o,a):a}const Ku=o=>o instanceof ur?{...o}:o;function oi(o,a){a=a||{};const h={};function p(f,m,g,b){return ae.isPlainObject(f)&&ae.isPlainObject(m)?ae.merge.call({caseless:b},f,m):ae.isPlainObject(m)?ae.merge({},m):ae.isArray(m)?m.slice():m}function y(f,m,g,b){if(ae.isUndefined(m)){if(!ae.isUndefined(f))return p(void 0,f,g,b)}else return p(f,m,g,b)}function _(f,m){if(!ae.isUndefined(m))return p(void 0,m)}function d(f,m){if(ae.isUndefined(m)){if(!ae.isUndefined(f))return p(void 0,f)}else return p(void 0,m)}function v(f,m,g){if(g in a)return p(f,m);if(g in o)return p(void 0,f)}const i={url:_,method:_,data:_,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:v,headers:(f,m,g)=>y(Ku(f),Ku(m),g,!0)};return ae.forEach(Object.keys({...o,...a}),function(m){const g=i[m]||y,b=g(o[m],a[m],m);ae.isUndefined(b)&&g!==v||(h[m]=b)}),h}const Wu=o=>{const a=oi({},o);let{data:h,withXSRFToken:p,xsrfHeaderName:y,xsrfCookieName:_,headers:d,auth:v}=a;if(a.headers=d=ur.from(d),a.url=Bu(Ju(a.baseURL,a.url,a.allowAbsoluteUrls),o.params,o.paramsSerializer),v&&d.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):""))),ae.isFormData(h)){if(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(ae.isFunction(h.getHeaders)){const i=h.getHeaders(),f=["content-type","content-length"];Object.entries(i).forEach(([m,g])=>{f.includes(m.toLowerCase())&&d.set(m,g)})}}if(Yt.hasStandardBrowserEnv&&(p&&ae.isFunction(p)&&(p=p(a)),p||p!==!1&&vy(a.url))){const i=y&&_&&by.read(_);i&&d.set(y,i)}return a},wy=typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(h,p){const y=Wu(o);let _=y.data;const d=ur.from(y.headers).normalize();let{responseType:v,onUploadProgress:i,onDownloadProgress:f}=y,m,g,b,w,E;function O(){w&&w(),E&&E(),y.cancelToken&&y.cancelToken.unsubscribe(m),y.signal&&y.signal.removeEventListener("abort",m)}let j=new XMLHttpRequest;j.open(y.method.toUpperCase(),y.url,!0),j.timeout=y.timeout;function x(){if(!j)return;const P=ur.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),C={data:!v||v==="text"||v==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:P,config:o,request:j};Hu(function(A){h(A),O()},function(A){p(A),O()},C),j=null}"onloadend"in j?j.onloadend=x:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(x)},j.onabort=function(){j&&(p(new ze("Request aborted",ze.ECONNABORTED,o,j)),j=null)},j.onerror=function(L){const C=L&&L.message?L.message:"Network Error",R=new ze(C,ze.ERR_NETWORK,o,j);R.event=L||null,p(R),j=null},j.ontimeout=function(){let L=y.timeout?"timeout of "+y.timeout+"ms exceeded":"timeout exceeded";const C=y.transitional||Mu;y.timeoutErrorMessage&&(L=y.timeoutErrorMessage),p(new ze(L,C.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,o,j)),j=null},_===void 0&&d.setContentType(null),"setRequestHeader"in j&&ae.forEach(d.toJSON(),function(L,C){j.setRequestHeader(C,L)}),ae.isUndefined(y.withCredentials)||(j.withCredentials=!!y.withCredentials),v&&v!=="json"&&(j.responseType=y.responseType),f&&([b,E]=Ia(f,!0),j.addEventListener("progress",b)),i&&j.upload&&([g,w]=Ia(i),j.upload.addEventListener("progress",g),j.upload.addEventListener("loadend",w)),(y.cancelToken||y.signal)&&(m=P=>{j&&(p(!P||P.type?new Ui(null,o,j):P),j.abort(),j=null)},y.cancelToken&&y.cancelToken.subscribe(m),y.signal&&(y.signal.aborted?m():y.signal.addEventListener("abort",m)));const S=py(y.url);if(S&&Yt.protocols.indexOf(S)===-1){p(new ze("Unsupported protocol "+S+":",ze.ERR_BAD_REQUEST,o));return}j.send(_||null)})},ky=(o,a)=>{const{length:h}=o=o?o.filter(Boolean):[];if(a||h){let p=new AbortController,y;const _=function(f){if(!y){y=!0,v();const m=f instanceof Error?f:this.reason;p.abort(m instanceof ze?m:new Ui(m instanceof Error?m.message:m))}};let d=a&&setTimeout(()=>{d=null,_(new ze(`timeout ${a} of ms exceeded`,ze.ETIMEDOUT))},a);const v=()=>{o&&(d&&clearTimeout(d),d=null,o.forEach(f=>{f.unsubscribe?f.unsubscribe(_):f.removeEventListener("abort",_)}),o=null)};o.forEach(f=>f.addEventListener("abort",_));const{signal:i}=p;return i.unsubscribe=()=>ae.asap(v),i}},jy=function*(o,a){let h=o.byteLength;if(h<a){yield o;return}let p=0,y;for(;p<h;)y=p+a,yield o.slice(p,y),p=y},Ey=async function*(o,a){for await(const h of Oy(o))yield*jy(h,a)},Oy=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const a=o.getReader();try{for(;;){const{done:h,value:p}=await a.read();if(h)break;yield p}}finally{await a.cancel()}},Zu=(o,a,h,p)=>{const y=Ey(o,a);let _=0,d,v=i=>{d||(d=!0,p&&p(i))};return new ReadableStream({async pull(i){try{const{done:f,value:m}=await y.next();if(f){v(),i.close();return}let g=m.byteLength;if(h){let b=_+=g;h(b)}i.enqueue(new Uint8Array(m))}catch(f){throw v(f),f}},cancel(i){return v(i),y.return()}},{highWaterMark:2})},Yu=64*1024,{isFunction:Da}=ae,xy=(({Request:o,Response:a})=>({Request:o,Response:a}))(ae.global),{ReadableStream:Qu,TextEncoder:Xu}=ae.global,ed=(o,...a)=>{try{return!!o(...a)}catch{return!1}},Sy=o=>{o=ae.merge.call({skipUndefined:!0},xy,o);const{fetch:a,Request:h,Response:p}=o,y=a?Da(a):typeof fetch=="function",_=Da(h),d=Da(p);if(!y)return!1;const v=y&&Da(Qu),i=y&&(typeof Xu=="function"?(E=>O=>E.encode(O))(new Xu):async E=>new Uint8Array(await new h(E).arrayBuffer())),f=_&&v&&ed(()=>{let E=!1;const O=new h(Yt.origin,{body:new Qu,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!O}),m=d&&v&&ed(()=>ae.isReadableStream(new p("").body)),g={stream:m&&(E=>E.body)};y&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!g[E]&&(g[E]=(O,j)=>{let x=O&&O[E];if(x)return x.call(O);throw new ze(`Response type '${E}' is not supported`,ze.ERR_NOT_SUPPORT,j)})});const b=async E=>{if(E==null)return 0;if(ae.isBlob(E))return E.size;if(ae.isSpecCompliantForm(E))return(await new h(Yt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(ae.isArrayBufferView(E)||ae.isArrayBuffer(E))return E.byteLength;if(ae.isURLSearchParams(E)&&(E=E+""),ae.isString(E))return(await i(E)).byteLength},w=async(E,O)=>{const j=ae.toFiniteNumber(E.getContentLength());return j??b(O)};return async E=>{let{url:O,method:j,data:x,signal:S,cancelToken:P,timeout:L,onDownloadProgress:C,onUploadProgress:R,responseType:A,headers:I,withCredentials:D="same-origin",fetchOptions:M}=Wu(E),V=a||fetch;A=A?(A+"").toLowerCase():"text";let G=ky([S,P&&P.toAbortSignal()],L),J=null;const Y=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let se;try{if(R&&f&&j!=="get"&&j!=="head"&&(se=await w(I,x))!==0){let H=new h(O,{method:"POST",body:x,duplex:"half"}),te;if(ae.isFormData(x)&&(te=H.headers.get("content-type"))&&I.setContentType(te),H.body){const[z,$]=Uu(se,Ia(Gu(R)));x=Zu(H.body,Yu,z,$)}}ae.isString(D)||(D=D?"include":"omit");const ue=_&&"credentials"in h.prototype,he={...M,signal:G,method:j.toUpperCase(),headers:I.normalize().toJSON(),body:x,duplex:"half",credentials:ue?D:void 0};J=_&&new h(O,he);let de=await(_?V(J,M):V(O,he));const be=m&&(A==="stream"||A==="response");if(m&&(C||be&&Y)){const H={};["status","statusText","headers"].forEach(F=>{H[F]=de[F]});const te=ae.toFiniteNumber(de.headers.get("content-length")),[z,$]=C&&Uu(te,Ia(Gu(C),!0))||[];de=new p(Zu(de.body,Yu,z,()=>{$&&$(),Y&&Y()}),H)}A=A||"text";let ie=await g[ae.findKey(g,A)||"text"](de,E);return!be&&Y&&Y(),await new Promise((H,te)=>{Hu(H,te,{data:ie,headers:ur.from(de.headers),status:de.status,statusText:de.statusText,config:E,request:J})})}catch(ue){throw Y&&Y(),ue&&ue.name==="TypeError"&&/Load failed|fetch/i.test(ue.message)?Object.assign(new ze("Network Error",ze.ERR_NETWORK,E,J),{cause:ue.cause||ue}):ze.from(ue,ue&&ue.code,E,J)}}},Cy=new Map,td=o=>{let a=o&&o.env||{};const{fetch:h,Request:p,Response:y}=a,_=[p,y,h];let d=_.length,v=d,i,f,m=Cy;for(;v--;)i=_[v],f=m.get(i),f===void 0&&m.set(i,f=v?new Map:Sy(a)),m=f;return f};td();const kl={http:Zm,xhr:wy,fetch:{get:td}};ae.forEach(kl,(o,a)=>{if(o){try{Object.defineProperty(o,"name",{value:a})}catch{}Object.defineProperty(o,"adapterName",{value:a})}});const rd=o=>`- ${o}`,Py=o=>ae.isFunction(o)||o===null||o===!1;function Ty(o,a){o=ae.isArray(o)?o:[o];const{length:h}=o;let p,y;const _={};for(let d=0;d<h;d++){p=o[d];let v;if(y=p,!Py(p)&&(y=kl[(v=String(p)).toLowerCase()],y===void 0))throw new ze(`Unknown adapter '${v}'`);if(y&&(ae.isFunction(y)||(y=y.get(a))))break;_[v||"#"+d]=y}if(!y){const d=Object.entries(_).map(([i,f])=>`adapter ${i} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=h?d.length>1?`since :
1
+ (function(ln,zi){typeof exports=="object"&&typeof module<"u"?zi(exports):typeof define=="function"&&define.amd?define(["exports"],zi):(ln=typeof globalThis<"u"?globalThis:ln||self,zi(ln.BBDBComponents={}))})(this,(function(ln){"use strict";function zi(o,a){return function(){return o.apply(a,arguments)}}const{toString:hm}=Object.prototype,{getPrototypeOf:pl}=Object,{iterator:Ra,toStringTag:Eu}=Symbol,La=(o=>a=>{const h=hm.call(a);return o[h]||(o[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),Or=o=>(o=o.toLowerCase(),a=>La(a)===o),Aa=o=>a=>typeof a===o,{isArray:qi}=Array,Hi=Aa("undefined");function Jo(o){return o!==null&&!Hi(o)&&o.constructor!==null&&!Hi(o.constructor)&&cr(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Ou=Or("ArrayBuffer");function fm(o){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(o):a=o&&o.buffer&&Ou(o.buffer),a}const pm=Aa("string"),cr=Aa("function"),xu=Aa("number"),Ko=o=>o!==null&&typeof o=="object",mm=o=>o===!0||o===!1,$a=o=>{if(La(o)!=="object")return!1;const a=pl(o);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Eu in o)&&!(Ra in o)},ym=o=>{if(!Ko(o)||Jo(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},vm=Or("Date"),bm=Or("File"),gm=Or("Blob"),_m=Or("FileList"),wm=o=>Ko(o)&&cr(o.pipe),km=o=>{let a;return o&&(typeof FormData=="function"&&o instanceof FormData||cr(o.append)&&((a=La(o))==="formdata"||a==="object"&&cr(o.toString)&&o.toString()==="[object FormData]"))},jm=Or("URLSearchParams"),[Em,Om,xm,Sm]=["ReadableStream","Request","Response","Headers"].map(Or),Cm=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wo(o,a,{allOwnKeys:h=!1}={}){if(o===null||typeof o>"u")return;let p,y;if(typeof o!="object"&&(o=[o]),qi(o))for(p=0,y=o.length;p<y;p++)a.call(null,o[p],p,o);else{if(Jo(o))return;const _=h?Object.getOwnPropertyNames(o):Object.keys(o),d=_.length;let v;for(p=0;p<d;p++)v=_[p],a.call(null,o[v],v,o)}}function Su(o,a){if(Jo(o))return null;a=a.toLowerCase();const h=Object.keys(o);let p=h.length,y;for(;p-- >0;)if(y=h[p],a===y.toLowerCase())return y;return null}const ii=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cu=o=>!Hi(o)&&o!==ii;function ml(){const{caseless:o,skipUndefined:a}=Cu(this)&&this||{},h={},p=(y,_)=>{const d=o&&Su(h,_)||_;$a(h[d])&&$a(y)?h[d]=ml(h[d],y):$a(y)?h[d]=ml({},y):qi(y)?h[d]=y.slice():(!a||!Hi(y))&&(h[d]=y)};for(let y=0,_=arguments.length;y<_;y++)arguments[y]&&Wo(arguments[y],p);return h}const Pm=(o,a,h,{allOwnKeys:p}={})=>(Wo(a,(y,_)=>{h&&cr(y)?o[_]=zi(y,h):o[_]=y},{allOwnKeys:p}),o),Tm=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),Rm=(o,a,h,p)=>{o.prototype=Object.create(a.prototype,p),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:a.prototype}),h&&Object.assign(o.prototype,h)},Lm=(o,a,h,p)=>{let y,_,d;const v={};if(a=a||{},o==null)return a;do{for(y=Object.getOwnPropertyNames(o),_=y.length;_-- >0;)d=y[_],(!p||p(d,o,a))&&!v[d]&&(a[d]=o[d],v[d]=!0);o=h!==!1&&pl(o)}while(o&&(!h||h(o,a))&&o!==Object.prototype);return a},Am=(o,a,h)=>{o=String(o),(h===void 0||h>o.length)&&(h=o.length),h-=a.length;const p=o.indexOf(a,h);return p!==-1&&p===h},$m=o=>{if(!o)return null;if(qi(o))return o;let a=o.length;if(!xu(a))return null;const h=new Array(a);for(;a-- >0;)h[a]=o[a];return h},Nm=(o=>a=>o&&a instanceof o)(typeof Uint8Array<"u"&&pl(Uint8Array)),Im=(o,a)=>{const p=(o&&o[Ra]).call(o);let y;for(;(y=p.next())&&!y.done;){const _=y.value;a.call(o,_[0],_[1])}},Dm=(o,a)=>{let h;const p=[];for(;(h=o.exec(a))!==null;)p.push(h);return p},Bm=Or("HTMLFormElement"),Fm=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,p,y){return p.toUpperCase()+y}),Pu=(({hasOwnProperty:o})=>(a,h)=>o.call(a,h))(Object.prototype),Mm=Or("RegExp"),Tu=(o,a)=>{const h=Object.getOwnPropertyDescriptors(o),p={};Wo(h,(y,_)=>{let d;(d=a(y,_,o))!==!1&&(p[_]=d||y)}),Object.defineProperties(o,p)},Vm=o=>{Tu(o,(a,h)=>{if(cr(o)&&["arguments","caller","callee"].indexOf(h)!==-1)return!1;const p=o[h];if(cr(p)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+h+"'")})}})},zm=(o,a)=>{const h={},p=y=>{y.forEach(_=>{h[_]=!0})};return qi(o)?p(o):p(String(o).split(a)),h},qm=()=>{},Hm=(o,a)=>o!=null&&Number.isFinite(o=+o)?o:a;function Um(o){return!!(o&&cr(o.append)&&o[Eu]==="FormData"&&o[Ra])}const Gm=o=>{const a=new Array(10),h=(p,y)=>{if(Ko(p)){if(a.indexOf(p)>=0)return;if(Jo(p))return p;if(!("toJSON"in p)){a[y]=p;const _=qi(p)?[]:{};return Wo(p,(d,v)=>{const i=h(d,y+1);!Hi(i)&&(_[v]=i)}),a[y]=void 0,_}}return p};return h(o,0)},Jm=Or("AsyncFunction"),Km=o=>o&&(Ko(o)||cr(o))&&cr(o.then)&&cr(o.catch),Ru=((o,a)=>o?setImmediate:a?((h,p)=>(ii.addEventListener("message",({source:y,data:_})=>{y===ii&&_===h&&p.length&&p.shift()()},!1),y=>{p.push(y),ii.postMessage(h,"*")}))(`axios@${Math.random()}`,[]):h=>setTimeout(h))(typeof setImmediate=="function",cr(ii.postMessage)),Wm=typeof queueMicrotask<"u"?queueMicrotask.bind(ii):typeof process<"u"&&process.nextTick||Ru,ae={isArray:qi,isArrayBuffer:Ou,isBuffer:Jo,isFormData:km,isArrayBufferView:fm,isString:pm,isNumber:xu,isBoolean:mm,isObject:Ko,isPlainObject:$a,isEmptyObject:ym,isReadableStream:Em,isRequest:Om,isResponse:xm,isHeaders:Sm,isUndefined:Hi,isDate:vm,isFile:bm,isBlob:gm,isRegExp:Mm,isFunction:cr,isStream:wm,isURLSearchParams:jm,isTypedArray:Nm,isFileList:_m,forEach:Wo,merge:ml,extend:Pm,trim:Cm,stripBOM:Tm,inherits:Rm,toFlatObject:Lm,kindOf:La,kindOfTest:Or,endsWith:Am,toArray:$m,forEachEntry:Im,matchAll:Dm,isHTMLForm:Bm,hasOwnProperty:Pu,hasOwnProp:Pu,reduceDescriptors:Tu,freezeMethods:Vm,toObjectSet:zm,toCamelCase:Fm,noop:qm,toFiniteNumber:Hm,findKey:Su,global:ii,isContextDefined:Cu,isSpecCompliantForm:Um,toJSONObject:Gm,isAsyncFn:Jm,isThenable:Km,setImmediate:Ru,asap:Wm,isIterable:o=>o!=null&&cr(o[Ra])};function ze(o,a,h,p,y){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",a&&(this.code=a),h&&(this.config=h),p&&(this.request=p),y&&(this.response=y,this.status=y.status?y.status:null)}ae.inherits(ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Lu=ze.prototype,Au={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(o=>{Au[o]={value:o}}),Object.defineProperties(ze,Au),Object.defineProperty(Lu,"isAxiosError",{value:!0}),ze.from=(o,a,h,p,y,_)=>{const d=Object.create(Lu);ae.toFlatObject(o,d,function(m){return m!==Error.prototype},f=>f!=="isAxiosError");const v=o&&o.message?o.message:"Error",i=a==null&&o?o.code:a;return ze.call(d,v,i,h,p,y),o&&d.cause==null&&Object.defineProperty(d,"cause",{value:o,configurable:!0}),d.name=o&&o.name||"Error",_&&Object.assign(d,_),d};const Zm=null;function yl(o){return ae.isPlainObject(o)||ae.isArray(o)}function $u(o){return ae.endsWith(o,"[]")?o.slice(0,-2):o}function Nu(o,a,h){return o?o.concat(a).map(function(y,_){return y=$u(y),!h&&_?"["+y+"]":y}).join(h?".":""):a}function Ym(o){return ae.isArray(o)&&!o.some(yl)}const Qm=ae.toFlatObject(ae,{},null,function(a){return/^is[A-Z]/.test(a)});function Na(o,a,h){if(!ae.isObject(o))throw new TypeError("target must be an object");a=a||new FormData,h=ae.toFlatObject(h,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,j){return!ae.isUndefined(j[O])});const p=h.metaTokens,y=h.visitor||m,_=h.dots,d=h.indexes,i=(h.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(a);if(!ae.isFunction(y))throw new TypeError("visitor must be a function");function f(E){if(E===null)return"";if(ae.isDate(E))return E.toISOString();if(ae.isBoolean(E))return E.toString();if(!i&&ae.isBlob(E))throw new ze("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(E)||ae.isTypedArray(E)?i&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function m(E,O,j){let x=E;if(E&&!j&&typeof E=="object"){if(ae.endsWith(O,"{}"))O=p?O:O.slice(0,-2),E=JSON.stringify(E);else if(ae.isArray(E)&&Ym(E)||(ae.isFileList(E)||ae.endsWith(O,"[]"))&&(x=ae.toArray(E)))return O=$u(O),x.forEach(function(P,L){!(ae.isUndefined(P)||P===null)&&a.append(d===!0?Nu([O],L,_):d===null?O:O+"[]",f(P))}),!1}return yl(E)?!0:(a.append(Nu(j,O,_),f(E)),!1)}const g=[],b=Object.assign(Qm,{defaultVisitor:m,convertValue:f,isVisitable:yl});function w(E,O){if(!ae.isUndefined(E)){if(g.indexOf(E)!==-1)throw Error("Circular reference detected in "+O.join("."));g.push(E),ae.forEach(E,function(x,S){(!(ae.isUndefined(x)||x===null)&&y.call(a,x,ae.isString(S)?S.trim():S,O,b))===!0&&w(x,O?O.concat(S):[S])}),g.pop()}}if(!ae.isObject(o))throw new TypeError("data must be an object");return w(o),a}function Iu(o){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(p){return a[p]})}function vl(o,a){this._pairs=[],o&&Na(o,this,a)}const Du=vl.prototype;Du.append=function(a,h){this._pairs.push([a,h])},Du.toString=function(a){const h=a?function(p){return a.call(this,p,Iu)}:Iu;return this._pairs.map(function(y){return h(y[0])+"="+h(y[1])},"").join("&")};function Xm(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bu(o,a,h){if(!a)return o;const p=h&&h.encode||Xm;ae.isFunction(h)&&(h={serialize:h});const y=h&&h.serialize;let _;if(y?_=y(a,h):_=ae.isURLSearchParams(a)?a.toString():new vl(a,h).toString(p),_){const d=o.indexOf("#");d!==-1&&(o=o.slice(0,d)),o+=(o.indexOf("?")===-1?"?":"&")+_}return o}class Fu{constructor(){this.handlers=[]}use(a,h,p){return this.handlers.push({fulfilled:a,rejected:h,synchronous:p?p.synchronous:!1,runWhen:p?p.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){ae.forEach(this.handlers,function(p){p!==null&&a(p)})}}const Mu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ey={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:vl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},bl=typeof window<"u"&&typeof document<"u",gl=typeof navigator=="object"&&navigator||void 0,ty=bl&&(!gl||["ReactNative","NativeScript","NS"].indexOf(gl.product)<0),ry=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ny=bl&&window.location.href||"http://localhost",Yt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bl,hasStandardBrowserEnv:ty,hasStandardBrowserWebWorkerEnv:ry,navigator:gl,origin:ny},Symbol.toStringTag,{value:"Module"})),...ey};function iy(o,a){return Na(o,new Yt.classes.URLSearchParams,{visitor:function(h,p,y,_){return Yt.isNode&&ae.isBuffer(h)?(this.append(p,h.toString("base64")),!1):_.defaultVisitor.apply(this,arguments)},...a})}function oy(o){return ae.matchAll(/\w+|\[(\w*)]/g,o).map(a=>a[0]==="[]"?"":a[1]||a[0])}function ay(o){const a={},h=Object.keys(o);let p;const y=h.length;let _;for(p=0;p<y;p++)_=h[p],a[_]=o[_];return a}function Vu(o){function a(h,p,y,_){let d=h[_++];if(d==="__proto__")return!0;const v=Number.isFinite(+d),i=_>=h.length;return d=!d&&ae.isArray(y)?y.length:d,i?(ae.hasOwnProp(y,d)?y[d]=[y[d],p]:y[d]=p,!v):((!y[d]||!ae.isObject(y[d]))&&(y[d]=[]),a(h,p,y[d],_)&&ae.isArray(y[d])&&(y[d]=ay(y[d])),!v)}if(ae.isFormData(o)&&ae.isFunction(o.entries)){const h={};return ae.forEachEntry(o,(p,y)=>{a(oy(p),y,h,0)}),h}return null}function sy(o,a,h){if(ae.isString(o))try{return(a||JSON.parse)(o),ae.trim(o)}catch(p){if(p.name!=="SyntaxError")throw p}return(h||JSON.stringify)(o)}const Zo={transitional:Mu,adapter:["xhr","http","fetch"],transformRequest:[function(a,h){const p=h.getContentType()||"",y=p.indexOf("application/json")>-1,_=ae.isObject(a);if(_&&ae.isHTMLForm(a)&&(a=new FormData(a)),ae.isFormData(a))return y?JSON.stringify(Vu(a)):a;if(ae.isArrayBuffer(a)||ae.isBuffer(a)||ae.isStream(a)||ae.isFile(a)||ae.isBlob(a)||ae.isReadableStream(a))return a;if(ae.isArrayBufferView(a))return a.buffer;if(ae.isURLSearchParams(a))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let v;if(_){if(p.indexOf("application/x-www-form-urlencoded")>-1)return iy(a,this.formSerializer).toString();if((v=ae.isFileList(a))||p.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Na(v?{"files[]":a}:a,i&&new i,this.formSerializer)}}return _||y?(h.setContentType("application/json",!1),sy(a)):a}],transformResponse:[function(a){const h=this.transitional||Zo.transitional,p=h&&h.forcedJSONParsing,y=this.responseType==="json";if(ae.isResponse(a)||ae.isReadableStream(a))return a;if(a&&ae.isString(a)&&(p&&!this.responseType||y)){const d=!(h&&h.silentJSONParsing)&&y;try{return JSON.parse(a,this.parseReviver)}catch(v){if(d)throw v.name==="SyntaxError"?ze.from(v,ze.ERR_BAD_RESPONSE,this,null,this.response):v}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],o=>{Zo.headers[o]={}});const ly=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cy=o=>{const a={};let h,p,y;return o&&o.split(`
2
+ `).forEach(function(d){y=d.indexOf(":"),h=d.substring(0,y).trim().toLowerCase(),p=d.substring(y+1).trim(),!(!h||a[h]&&ly[h])&&(h==="set-cookie"?a[h]?a[h].push(p):a[h]=[p]:a[h]=a[h]?a[h]+", "+p:p)}),a},zu=Symbol("internals");function Yo(o){return o&&String(o).trim().toLowerCase()}function Ia(o){return o===!1||o==null?o:ae.isArray(o)?o.map(Ia):String(o)}function uy(o){const a=Object.create(null),h=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let p;for(;p=h.exec(o);)a[p[1]]=p[2];return a}const dy=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function _l(o,a,h,p,y){if(ae.isFunction(p))return p.call(this,a,h);if(y&&(a=h),!!ae.isString(a)){if(ae.isString(p))return a.indexOf(p)!==-1;if(ae.isRegExp(p))return p.test(a)}}function hy(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,h,p)=>h.toUpperCase()+p)}function fy(o,a){const h=ae.toCamelCase(" "+a);["get","set","has"].forEach(p=>{Object.defineProperty(o,p+h,{value:function(y,_,d){return this[p].call(this,a,y,_,d)},configurable:!0})})}let ur=class{constructor(a){a&&this.set(a)}set(a,h,p){const y=this;function _(v,i,f){const m=Yo(i);if(!m)throw new Error("header name must be a non-empty string");const g=ae.findKey(y,m);(!g||y[g]===void 0||f===!0||f===void 0&&y[g]!==!1)&&(y[g||i]=Ia(v))}const d=(v,i)=>ae.forEach(v,(f,m)=>_(f,m,i));if(ae.isPlainObject(a)||a instanceof this.constructor)d(a,h);else if(ae.isString(a)&&(a=a.trim())&&!dy(a))d(cy(a),h);else if(ae.isObject(a)&&ae.isIterable(a)){let v={},i,f;for(const m of a){if(!ae.isArray(m))throw TypeError("Object iterator must return a key-value pair");v[f=m[0]]=(i=v[f])?ae.isArray(i)?[...i,m[1]]:[i,m[1]]:m[1]}d(v,h)}else a!=null&&_(h,a,p);return this}get(a,h){if(a=Yo(a),a){const p=ae.findKey(this,a);if(p){const y=this[p];if(!h)return y;if(h===!0)return uy(y);if(ae.isFunction(h))return h.call(this,y,p);if(ae.isRegExp(h))return h.exec(y);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,h){if(a=Yo(a),a){const p=ae.findKey(this,a);return!!(p&&this[p]!==void 0&&(!h||_l(this,this[p],p,h)))}return!1}delete(a,h){const p=this;let y=!1;function _(d){if(d=Yo(d),d){const v=ae.findKey(p,d);v&&(!h||_l(p,p[v],v,h))&&(delete p[v],y=!0)}}return ae.isArray(a)?a.forEach(_):_(a),y}clear(a){const h=Object.keys(this);let p=h.length,y=!1;for(;p--;){const _=h[p];(!a||_l(this,this[_],_,a,!0))&&(delete this[_],y=!0)}return y}normalize(a){const h=this,p={};return ae.forEach(this,(y,_)=>{const d=ae.findKey(p,_);if(d){h[d]=Ia(y),delete h[_];return}const v=a?hy(_):String(_).trim();v!==_&&delete h[_],h[v]=Ia(y),p[v]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const h=Object.create(null);return ae.forEach(this,(p,y)=>{p!=null&&p!==!1&&(h[y]=a&&ae.isArray(p)?p.join(", "):p)}),h}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,h])=>a+": "+h).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...h){const p=new this(a);return h.forEach(y=>p.set(y)),p}static accessor(a){const p=(this[zu]=this[zu]={accessors:{}}).accessors,y=this.prototype;function _(d){const v=Yo(d);p[v]||(fy(y,d),p[v]=!0)}return ae.isArray(a)?a.forEach(_):_(a),this}};ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ae.reduceDescriptors(ur.prototype,({value:o},a)=>{let h=a[0].toUpperCase()+a.slice(1);return{get:()=>o,set(p){this[h]=p}}}),ae.freezeMethods(ur);function wl(o,a){const h=this||Zo,p=a||h,y=ur.from(p.headers);let _=p.data;return ae.forEach(o,function(v){_=v.call(h,_,y.normalize(),a?a.status:void 0)}),y.normalize(),_}function qu(o){return!!(o&&o.__CANCEL__)}function Ui(o,a,h){ze.call(this,o??"canceled",ze.ERR_CANCELED,a,h),this.name="CanceledError"}ae.inherits(Ui,ze,{__CANCEL__:!0});function Hu(o,a,h){const p=h.config.validateStatus;!h.status||!p||p(h.status)?o(h):a(new ze("Request failed with status code "+h.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(h.status/100)-4],h.config,h.request,h))}function py(o){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return a&&a[1]||""}function my(o,a){o=o||10;const h=new Array(o),p=new Array(o);let y=0,_=0,d;return a=a!==void 0?a:1e3,function(i){const f=Date.now(),m=p[_];d||(d=f),h[y]=i,p[y]=f;let g=_,b=0;for(;g!==y;)b+=h[g++],g=g%o;if(y=(y+1)%o,y===_&&(_=(_+1)%o),f-d<a)return;const w=m&&f-m;return w?Math.round(b*1e3/w):void 0}}function yy(o,a){let h=0,p=1e3/a,y,_;const d=(f,m=Date.now())=>{h=m,y=null,_&&(clearTimeout(_),_=null),o(...f)};return[(...f)=>{const m=Date.now(),g=m-h;g>=p?d(f,m):(y=f,_||(_=setTimeout(()=>{_=null,d(y)},p-g)))},()=>y&&d(y)]}const Da=(o,a,h=3)=>{let p=0;const y=my(50,250);return yy(_=>{const d=_.loaded,v=_.lengthComputable?_.total:void 0,i=d-p,f=y(i),m=d<=v;p=d;const g={loaded:d,total:v,progress:v?d/v:void 0,bytes:i,rate:f||void 0,estimated:f&&v&&m?(v-d)/f:void 0,event:_,lengthComputable:v!=null,[a?"download":"upload"]:!0};o(g)},h)},Uu=(o,a)=>{const h=o!=null;return[p=>a[0]({lengthComputable:h,total:o,loaded:p}),a[1]]},Gu=o=>(...a)=>ae.asap(()=>o(...a)),vy=Yt.hasStandardBrowserEnv?((o,a)=>h=>(h=new URL(h,Yt.origin),o.protocol===h.protocol&&o.host===h.host&&(a||o.port===h.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,by=Yt.hasStandardBrowserEnv?{write(o,a,h,p,y,_,d){if(typeof document>"u")return;const v=[`${o}=${encodeURIComponent(a)}`];ae.isNumber(h)&&v.push(`expires=${new Date(h).toUTCString()}`),ae.isString(p)&&v.push(`path=${p}`),ae.isString(y)&&v.push(`domain=${y}`),_===!0&&v.push("secure"),ae.isString(d)&&v.push(`SameSite=${d}`),document.cookie=v.join("; ")},read(o){if(typeof document>"u")return null;const a=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return a?decodeURIComponent(a[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gy(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function _y(o,a){return a?o.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):o}function Ju(o,a,h){let p=!gy(a);return o&&(p||h==!1)?_y(o,a):a}const Ku=o=>o instanceof ur?{...o}:o;function oi(o,a){a=a||{};const h={};function p(f,m,g,b){return ae.isPlainObject(f)&&ae.isPlainObject(m)?ae.merge.call({caseless:b},f,m):ae.isPlainObject(m)?ae.merge({},m):ae.isArray(m)?m.slice():m}function y(f,m,g,b){if(ae.isUndefined(m)){if(!ae.isUndefined(f))return p(void 0,f,g,b)}else return p(f,m,g,b)}function _(f,m){if(!ae.isUndefined(m))return p(void 0,m)}function d(f,m){if(ae.isUndefined(m)){if(!ae.isUndefined(f))return p(void 0,f)}else return p(void 0,m)}function v(f,m,g){if(g in a)return p(f,m);if(g in o)return p(void 0,f)}const i={url:_,method:_,data:_,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:v,headers:(f,m,g)=>y(Ku(f),Ku(m),g,!0)};return ae.forEach(Object.keys({...o,...a}),function(m){const g=i[m]||y,b=g(o[m],a[m],m);ae.isUndefined(b)&&g!==v||(h[m]=b)}),h}const Wu=o=>{const a=oi({},o);let{data:h,withXSRFToken:p,xsrfHeaderName:y,xsrfCookieName:_,headers:d,auth:v}=a;if(a.headers=d=ur.from(d),a.url=Bu(Ju(a.baseURL,a.url,a.allowAbsoluteUrls),o.params,o.paramsSerializer),v&&d.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):""))),ae.isFormData(h)){if(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(ae.isFunction(h.getHeaders)){const i=h.getHeaders(),f=["content-type","content-length"];Object.entries(i).forEach(([m,g])=>{f.includes(m.toLowerCase())&&d.set(m,g)})}}if(Yt.hasStandardBrowserEnv&&(p&&ae.isFunction(p)&&(p=p(a)),p||p!==!1&&vy(a.url))){const i=y&&_&&by.read(_);i&&d.set(y,i)}return a},wy=typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(h,p){const y=Wu(o);let _=y.data;const d=ur.from(y.headers).normalize();let{responseType:v,onUploadProgress:i,onDownloadProgress:f}=y,m,g,b,w,E;function O(){w&&w(),E&&E(),y.cancelToken&&y.cancelToken.unsubscribe(m),y.signal&&y.signal.removeEventListener("abort",m)}let j=new XMLHttpRequest;j.open(y.method.toUpperCase(),y.url,!0),j.timeout=y.timeout;function x(){if(!j)return;const P=ur.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),C={data:!v||v==="text"||v==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:P,config:o,request:j};Hu(function(A){h(A),O()},function(A){p(A),O()},C),j=null}"onloadend"in j?j.onloadend=x:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(x)},j.onabort=function(){j&&(p(new ze("Request aborted",ze.ECONNABORTED,o,j)),j=null)},j.onerror=function(L){const C=L&&L.message?L.message:"Network Error",R=new ze(C,ze.ERR_NETWORK,o,j);R.event=L||null,p(R),j=null},j.ontimeout=function(){let L=y.timeout?"timeout of "+y.timeout+"ms exceeded":"timeout exceeded";const C=y.transitional||Mu;y.timeoutErrorMessage&&(L=y.timeoutErrorMessage),p(new ze(L,C.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,o,j)),j=null},_===void 0&&d.setContentType(null),"setRequestHeader"in j&&ae.forEach(d.toJSON(),function(L,C){j.setRequestHeader(C,L)}),ae.isUndefined(y.withCredentials)||(j.withCredentials=!!y.withCredentials),v&&v!=="json"&&(j.responseType=y.responseType),f&&([b,E]=Da(f,!0),j.addEventListener("progress",b)),i&&j.upload&&([g,w]=Da(i),j.upload.addEventListener("progress",g),j.upload.addEventListener("loadend",w)),(y.cancelToken||y.signal)&&(m=P=>{j&&(p(!P||P.type?new Ui(null,o,j):P),j.abort(),j=null)},y.cancelToken&&y.cancelToken.subscribe(m),y.signal&&(y.signal.aborted?m():y.signal.addEventListener("abort",m)));const S=py(y.url);if(S&&Yt.protocols.indexOf(S)===-1){p(new ze("Unsupported protocol "+S+":",ze.ERR_BAD_REQUEST,o));return}j.send(_||null)})},ky=(o,a)=>{const{length:h}=o=o?o.filter(Boolean):[];if(a||h){let p=new AbortController,y;const _=function(f){if(!y){y=!0,v();const m=f instanceof Error?f:this.reason;p.abort(m instanceof ze?m:new Ui(m instanceof Error?m.message:m))}};let d=a&&setTimeout(()=>{d=null,_(new ze(`timeout ${a} of ms exceeded`,ze.ETIMEDOUT))},a);const v=()=>{o&&(d&&clearTimeout(d),d=null,o.forEach(f=>{f.unsubscribe?f.unsubscribe(_):f.removeEventListener("abort",_)}),o=null)};o.forEach(f=>f.addEventListener("abort",_));const{signal:i}=p;return i.unsubscribe=()=>ae.asap(v),i}},jy=function*(o,a){let h=o.byteLength;if(h<a){yield o;return}let p=0,y;for(;p<h;)y=p+a,yield o.slice(p,y),p=y},Ey=async function*(o,a){for await(const h of Oy(o))yield*jy(h,a)},Oy=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const a=o.getReader();try{for(;;){const{done:h,value:p}=await a.read();if(h)break;yield p}}finally{await a.cancel()}},Zu=(o,a,h,p)=>{const y=Ey(o,a);let _=0,d,v=i=>{d||(d=!0,p&&p(i))};return new ReadableStream({async pull(i){try{const{done:f,value:m}=await y.next();if(f){v(),i.close();return}let g=m.byteLength;if(h){let b=_+=g;h(b)}i.enqueue(new Uint8Array(m))}catch(f){throw v(f),f}},cancel(i){return v(i),y.return()}},{highWaterMark:2})},Yu=64*1024,{isFunction:Ba}=ae,xy=(({Request:o,Response:a})=>({Request:o,Response:a}))(ae.global),{ReadableStream:Qu,TextEncoder:Xu}=ae.global,ed=(o,...a)=>{try{return!!o(...a)}catch{return!1}},Sy=o=>{o=ae.merge.call({skipUndefined:!0},xy,o);const{fetch:a,Request:h,Response:p}=o,y=a?Ba(a):typeof fetch=="function",_=Ba(h),d=Ba(p);if(!y)return!1;const v=y&&Ba(Qu),i=y&&(typeof Xu=="function"?(E=>O=>E.encode(O))(new Xu):async E=>new Uint8Array(await new h(E).arrayBuffer())),f=_&&v&&ed(()=>{let E=!1;const O=new h(Yt.origin,{body:new Qu,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!O}),m=d&&v&&ed(()=>ae.isReadableStream(new p("").body)),g={stream:m&&(E=>E.body)};y&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!g[E]&&(g[E]=(O,j)=>{let x=O&&O[E];if(x)return x.call(O);throw new ze(`Response type '${E}' is not supported`,ze.ERR_NOT_SUPPORT,j)})});const b=async E=>{if(E==null)return 0;if(ae.isBlob(E))return E.size;if(ae.isSpecCompliantForm(E))return(await new h(Yt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(ae.isArrayBufferView(E)||ae.isArrayBuffer(E))return E.byteLength;if(ae.isURLSearchParams(E)&&(E=E+""),ae.isString(E))return(await i(E)).byteLength},w=async(E,O)=>{const j=ae.toFiniteNumber(E.getContentLength());return j??b(O)};return async E=>{let{url:O,method:j,data:x,signal:S,cancelToken:P,timeout:L,onDownloadProgress:C,onUploadProgress:R,responseType:A,headers:I,withCredentials:D="same-origin",fetchOptions:M}=Wu(E),V=a||fetch;A=A?(A+"").toLowerCase():"text";let G=ky([S,P&&P.toAbortSignal()],L),J=null;const Y=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let se;try{if(R&&f&&j!=="get"&&j!=="head"&&(se=await w(I,x))!==0){let H=new h(O,{method:"POST",body:x,duplex:"half"}),te;if(ae.isFormData(x)&&(te=H.headers.get("content-type"))&&I.setContentType(te),H.body){const[z,$]=Uu(se,Da(Gu(R)));x=Zu(H.body,Yu,z,$)}}ae.isString(D)||(D=D?"include":"omit");const ue=_&&"credentials"in h.prototype,he={...M,signal:G,method:j.toUpperCase(),headers:I.normalize().toJSON(),body:x,duplex:"half",credentials:ue?D:void 0};J=_&&new h(O,he);let de=await(_?V(J,M):V(O,he));const be=m&&(A==="stream"||A==="response");if(m&&(C||be&&Y)){const H={};["status","statusText","headers"].forEach(F=>{H[F]=de[F]});const te=ae.toFiniteNumber(de.headers.get("content-length")),[z,$]=C&&Uu(te,Da(Gu(C),!0))||[];de=new p(Zu(de.body,Yu,z,()=>{$&&$(),Y&&Y()}),H)}A=A||"text";let ie=await g[ae.findKey(g,A)||"text"](de,E);return!be&&Y&&Y(),await new Promise((H,te)=>{Hu(H,te,{data:ie,headers:ur.from(de.headers),status:de.status,statusText:de.statusText,config:E,request:J})})}catch(ue){throw Y&&Y(),ue&&ue.name==="TypeError"&&/Load failed|fetch/i.test(ue.message)?Object.assign(new ze("Network Error",ze.ERR_NETWORK,E,J),{cause:ue.cause||ue}):ze.from(ue,ue&&ue.code,E,J)}}},Cy=new Map,td=o=>{let a=o&&o.env||{};const{fetch:h,Request:p,Response:y}=a,_=[p,y,h];let d=_.length,v=d,i,f,m=Cy;for(;v--;)i=_[v],f=m.get(i),f===void 0&&m.set(i,f=v?new Map:Sy(a)),m=f;return f};td();const kl={http:Zm,xhr:wy,fetch:{get:td}};ae.forEach(kl,(o,a)=>{if(o){try{Object.defineProperty(o,"name",{value:a})}catch{}Object.defineProperty(o,"adapterName",{value:a})}});const rd=o=>`- ${o}`,Py=o=>ae.isFunction(o)||o===null||o===!1;function Ty(o,a){o=ae.isArray(o)?o:[o];const{length:h}=o;let p,y;const _={};for(let d=0;d<h;d++){p=o[d];let v;if(y=p,!Py(p)&&(y=kl[(v=String(p)).toLowerCase()],y===void 0))throw new ze(`Unknown adapter '${v}'`);if(y&&(ae.isFunction(y)||(y=y.get(a))))break;_[v||"#"+d]=y}if(!y){const d=Object.entries(_).map(([i,f])=>`adapter ${i} `+(f===!1?"is not supported by the environment":"is not available in the build"));let v=h?d.length>1?`since :
4
4
  `+d.map(rd).join(`
5
- `):" "+rd(d[0]):"as no adapter specified";throw new ze("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return y}const nd={getAdapter:Ty,adapters:kl};function jl(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new Ui(null,o)}function id(o){return jl(o),o.headers=ur.from(o.headers),o.data=wl.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),nd.getAdapter(o.adapter||Zo.adapter,o)(o).then(function(p){return jl(o),p.data=wl.call(o,o.transformResponse,p),p.headers=ur.from(p.headers),p},function(p){return qu(p)||(jl(o),p&&p.response&&(p.response.data=wl.call(o,o.transformResponse,p.response),p.response.headers=ur.from(p.response.headers))),Promise.reject(p)})}const od="1.13.2",Ba={};["object","boolean","number","function","string","symbol"].forEach((o,a)=>{Ba[o]=function(p){return typeof p===o||"a"+(a<1?"n ":" ")+o}});const ad={};Ba.transitional=function(a,h,p){function y(_,d){return"[Axios v"+od+"] Transitional option '"+_+"'"+d+(p?". "+p:"")}return(_,d,v)=>{if(a===!1)throw new ze(y(d," has been removed"+(h?" in "+h:"")),ze.ERR_DEPRECATED);return h&&!ad[d]&&(ad[d]=!0,console.warn(y(d," has been deprecated since v"+h+" and will be removed in the near future"))),a?a(_,d,v):!0}},Ba.spelling=function(a){return(h,p)=>(console.warn(`${p} is likely a misspelling of ${a}`),!0)};function Ry(o,a,h){if(typeof o!="object")throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);const p=Object.keys(o);let y=p.length;for(;y-- >0;){const _=p[y],d=a[_];if(d){const v=o[_],i=v===void 0||d(v,_,o);if(i!==!0)throw new ze("option "+_+" must be "+i,ze.ERR_BAD_OPTION_VALUE);continue}if(h!==!0)throw new ze("Unknown option "+_,ze.ERR_BAD_OPTION)}}const Fa={assertOptions:Ry,validators:Ba},Ur=Fa.validators;let ai=class{constructor(a){this.defaults=a||{},this.interceptors={request:new Fu,response:new Fu}}async request(a,h){try{return await this._request(a,h)}catch(p){if(p instanceof Error){let y={};Error.captureStackTrace?Error.captureStackTrace(y):y=new Error;const _=y.stack?y.stack.replace(/^.+\n/,""):"";try{p.stack?_&&!String(p.stack).endsWith(_.replace(/^.+\n.+\n/,""))&&(p.stack+=`
6
- `+_):p.stack=_}catch{}}throw p}}_request(a,h){typeof a=="string"?(h=h||{},h.url=a):h=a||{},h=oi(this.defaults,h);const{transitional:p,paramsSerializer:y,headers:_}=h;p!==void 0&&Fa.assertOptions(p,{silentJSONParsing:Ur.transitional(Ur.boolean),forcedJSONParsing:Ur.transitional(Ur.boolean),clarifyTimeoutError:Ur.transitional(Ur.boolean)},!1),y!=null&&(ae.isFunction(y)?h.paramsSerializer={serialize:y}:Fa.assertOptions(y,{encode:Ur.function,serialize:Ur.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),Fa.assertOptions(h,{baseUrl:Ur.spelling("baseURL"),withXsrfToken:Ur.spelling("withXSRFToken")},!0),h.method=(h.method||this.defaults.method||"get").toLowerCase();let d=_&&ae.merge(_.common,_[h.method]);_&&ae.forEach(["delete","get","head","post","put","patch","common"],E=>{delete _[E]}),h.headers=ur.concat(d,_);const v=[];let i=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(h)===!1||(i=i&&O.synchronous,v.unshift(O.fulfilled,O.rejected))});const f=[];this.interceptors.response.forEach(function(O){f.push(O.fulfilled,O.rejected)});let m,g=0,b;if(!i){const E=[id.bind(this),void 0];for(E.unshift(...v),E.push(...f),b=E.length,m=Promise.resolve(h);g<b;)m=m.then(E[g++],E[g++]);return m}b=v.length;let w=h;for(;g<b;){const E=v[g++],O=v[g++];try{w=E(w)}catch(j){O.call(this,j);break}}try{m=id.call(this,w)}catch(E){return Promise.reject(E)}for(g=0,b=f.length;g<b;)m=m.then(f[g++],f[g++]);return m}getUri(a){a=oi(this.defaults,a);const h=Ju(a.baseURL,a.url,a.allowAbsoluteUrls);return Bu(h,a.params,a.paramsSerializer)}};ae.forEach(["delete","get","head","options"],function(a){ai.prototype[a]=function(h,p){return this.request(oi(p||{},{method:a,url:h,data:(p||{}).data}))}}),ae.forEach(["post","put","patch"],function(a){function h(p){return function(_,d,v){return this.request(oi(v||{},{method:a,headers:p?{"Content-Type":"multipart/form-data"}:{},url:_,data:d}))}}ai.prototype[a]=h(),ai.prototype[a+"Form"]=h(!0)});let Ly=class dm{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let h;this.promise=new Promise(function(_){h=_});const p=this;this.promise.then(y=>{if(!p._listeners)return;let _=p._listeners.length;for(;_-- >0;)p._listeners[_](y);p._listeners=null}),this.promise.then=y=>{let _;const d=new Promise(v=>{p.subscribe(v),_=v}).then(y);return d.cancel=function(){p.unsubscribe(_)},d},a(function(_,d,v){p.reason||(p.reason=new Ui(_,d,v),h(p.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const h=this._listeners.indexOf(a);h!==-1&&this._listeners.splice(h,1)}toAbortSignal(){const a=new AbortController,h=p=>{a.abort(p)};return this.subscribe(h),a.signal.unsubscribe=()=>this.unsubscribe(h),a.signal}static source(){let a;return{token:new dm(function(y){a=y}),cancel:a}}};function Ay(o){return function(h){return o.apply(null,h)}}function $y(o){return ae.isObject(o)&&o.isAxiosError===!0}const El={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(El).forEach(([o,a])=>{El[a]=o});function sd(o){const a=new ai(o),h=zi(ai.prototype.request,a);return ae.extend(h,ai.prototype,a,{allOwnKeys:!0}),ae.extend(h,a,null,{allOwnKeys:!0}),h.create=function(y){return sd(oi(o,y))},h}const xt=sd(Zo);xt.Axios=ai,xt.CanceledError=Ui,xt.CancelToken=Ly,xt.isCancel=qu,xt.VERSION=od,xt.toFormData=$a,xt.AxiosError=ze,xt.Cancel=xt.CanceledError,xt.all=function(a){return Promise.all(a)},xt.spread=Ay,xt.isAxiosError=$y,xt.mergeConfig=oi,xt.AxiosHeaders=ur,xt.formToJSON=o=>Vu(ae.isHTMLForm(o)?new FormData(o):o),xt.getAdapter=nd.getAdapter,xt.HttpStatusCode=El,xt.default=xt;const{Axios:S1,AxiosError:C1,CanceledError:P1,isCancel:T1,CancelToken:R1,VERSION:L1,all:A1,Cancel:$1,isAxiosError:N1,spread:I1,toFormData:D1,AxiosHeaders:B1,HttpStatusCode:F1,formToJSON:M1,getAdapter:V1,mergeConfig:z1}=xt;function Ny(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ma={exports:{}},Ol={},ln={},si={},xl={},Sl={},Cl={},ld;function Va(){return ld||(ld=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.regexpCode=o.getEsmExportName=o.getProperty=o.safeStringify=o.stringify=o.strConcat=o.addCodeArg=o.str=o._=o.nil=o._Code=o.Name=o.IDENTIFIER=o._CodeOrName=void 0;class a{}o._CodeOrName=a,o.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class h extends a{constructor(S){if(super(),!o.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}o.Name=h;class p extends a{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((P,L)=>`${P}${L}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((P,L)=>(L instanceof h&&(P[L.str]=(P[L.str]||0)+1),P),{})}}o._Code=p,o.nil=new p("");function y(x,...S){const P=[x[0]];let L=0;for(;L<S.length;)v(P,S[L]),P.push(x[++L]);return new p(P)}o._=y;const _=new p("+");function d(x,...S){const P=[w(x[0])];let L=0;for(;L<S.length;)P.push(_),v(P,S[L]),P.push(_,w(x[++L]));return i(P),new p(P)}o.str=d;function v(x,S){S instanceof p?x.push(...S._items):S instanceof h?x.push(S):x.push(g(S))}o.addCodeArg=v;function i(x){let S=1;for(;S<x.length-1;){if(x[S]===_){const P=f(x[S-1],x[S+1]);if(P!==void 0){x.splice(S-1,3,P);continue}x[S++]="+"}S++}}function f(x,S){if(S==='""')return x;if(x==='""')return S;if(typeof x=="string")return S instanceof h||x[x.length-1]!=='"'?void 0:typeof S!="string"?`${x.slice(0,-1)}${S}"`:S[0]==='"'?x.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(x instanceof h))return`"${x}${S.slice(1)}`}function m(x,S){return S.emptyStr()?x:x.emptyStr()?S:d`${x}${S}`}o.strConcat=m;function g(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:w(Array.isArray(x)?x.join(","):x)}function b(x){return new p(w(x))}o.stringify=b;function w(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o.safeStringify=w;function E(x){return typeof x=="string"&&o.IDENTIFIER.test(x)?new p(`.${x}`):y`[${x}]`}o.getProperty=E;function O(x){if(typeof x=="string"&&o.IDENTIFIER.test(x))return new p(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}o.getEsmExportName=O;function j(x){return new p(x.toString())}o.regexpCode=j})(Cl)),Cl}var Pl={},cd;function ud(){return cd||(cd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ValueScope=o.ValueScopeName=o.Scope=o.varKinds=o.UsedValueState=void 0;const a=Va();class h extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var p;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(p||(o.UsedValueState=p={})),o.varKinds={const:new a.Name("const"),let:new a.Name("let"),var:new a.Name("var")};class y{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof a.Name?f:this.name(f)}name(f){return new a.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,g;if(!((g=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||g===void 0)&&g.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}o.Scope=y;class _ extends a.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:g}){this.value=f,this.scopePath=(0,a._)`.${new a.Name(m)}[${g}]`}}o.ValueScopeName=_;const d=(0,a._)`\n`;class v extends y{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?d:a.nil}}get(){return this._scope}name(f){return new _(f,this._newName(f))}value(f,m){var g;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const b=this.toName(f),{prefix:w}=b,E=(g=m.key)!==null&&g!==void 0?g:m.ref;let O=this._values[w];if(O){const S=O.get(E);if(S)return S}else O=this._values[w]=new Map;O.set(E,b);const j=this._scope[w]||(this._scope[w]=[]),x=j.length;return j[x]=m.ref,b.setValue(m,{property:w,itemIndex:x}),b}getValue(f,m){const g=this._values[f];if(g)return g.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,a._)`${f}${g.scopePath}`})}scopeCode(f=this._values,m,g){return this._reduceValues(f,b=>{if(b.value===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return b.value.code},m,g)}_reduceValues(f,m,g={},b){let w=a.nil;for(const E in f){const O=f[E];if(!O)continue;const j=g[E]=g[E]||new Map;O.forEach(x=>{if(j.has(x))return;j.set(x,p.Started);let S=m(x);if(S){const P=this.opts.es5?o.varKinds.var:o.varKinds.const;w=(0,a._)`${w}${P} ${x} = ${S};${this.opts._n}`}else if(S=b?.(x))w=(0,a._)`${w}${S}${this.opts._n}`;else throw new h(x);j.set(x,p.Completed)})}return w}}o.ValueScope=v})(Pl)),Pl}var dd;function rt(){return dd||(dd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.or=o.and=o.not=o.CodeGen=o.operators=o.varKinds=o.ValueScopeName=o.ValueScope=o.Scope=o.Name=o.regexpCode=o.stringify=o.getProperty=o.nil=o.strConcat=o.str=o._=void 0;const a=Va(),h=ud();var p=Va();Object.defineProperty(o,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(o,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(o,"strConcat",{enumerable:!0,get:function(){return p.strConcat}}),Object.defineProperty(o,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(o,"getProperty",{enumerable:!0,get:function(){return p.getProperty}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(o,"regexpCode",{enumerable:!0,get:function(){return p.regexpCode}}),Object.defineProperty(o,"Name",{enumerable:!0,get:function(){return p.Name}});var y=ud();Object.defineProperty(o,"Scope",{enumerable:!0,get:function(){return y.Scope}}),Object.defineProperty(o,"ValueScope",{enumerable:!0,get:function(){return y.ValueScope}}),Object.defineProperty(o,"ValueScopeName",{enumerable:!0,get:function(){return y.ValueScopeName}}),Object.defineProperty(o,"varKinds",{enumerable:!0,get:function(){return y.varKinds}}),o.operators={GT:new a._Code(">"),GTE:new a._Code(">="),LT:new a._Code("<"),LTE:new a._Code("<="),EQ:new a._Code("==="),NEQ:new a._Code("!=="),NOT:new a._Code("!"),OR:new a._Code("||"),AND:new a._Code("&&"),ADD:new a._Code("+")};class _{optimizeNodes(){return this}optimizeNames($,F){return this}}class d extends _{constructor($,F,ee){super(),this.varKind=$,this.name=F,this.rhs=ee}render({es5:$,_n:F}){const ee=$?h.varKinds.var:this.varKind,ge=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${ge};`+F}optimizeNames($,F){if($[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,$,F)),this}get names(){return this.rhs instanceof a._CodeOrName?this.rhs.names:{}}}class v extends _{constructor($,F,ee){super(),this.lhs=$,this.rhs=F,this.sideEffects=ee}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,F){if(!(this.lhs instanceof a.Name&&!$[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,$,F),this}get names(){const $=this.lhs instanceof a.Name?{}:{...this.lhs.names};return J($,this.rhs)}}class i extends v{constructor($,F,ee,ge){super($,ee,ge),this.op=F}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class f extends _{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class m extends _{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class g extends _{constructor($){super(),this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class b extends _{constructor($){super(),this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,F){return this.code=Y(this.code,$,F),this}get names(){return this.code instanceof a._CodeOrName?this.code.names:{}}}class w extends _{constructor($=[]){super(),this.nodes=$}render($){return this.nodes.reduce((F,ee)=>F+ee.render($),"")}optimizeNodes(){const{nodes:$}=this;let F=$.length;for(;F--;){const ee=$[F].optimizeNodes();Array.isArray(ee)?$.splice(F,1,...ee):ee?$[F]=ee:$.splice(F,1)}return $.length>0?this:void 0}optimizeNames($,F){const{nodes:ee}=this;let ge=ee.length;for(;ge--;){const _e=ee[ge];_e.optimizeNames($,F)||(se($,_e.names),ee.splice(ge,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce(($,F)=>G($,F.names),{})}}class E extends w{render($){return"{"+$._n+super.render($)+"}"+$._n}}class O extends w{}class j extends E{}j.kind="else";class x extends E{constructor($,F){super(F),this.condition=$}render($){let F=`if(${this.condition})`+super.render($);return this.else&&(F+="else "+this.else.render($)),F}optimizeNodes(){super.optimizeNodes();const $=this.condition;if($===!0)return this.nodes;let F=this.else;if(F){const ee=F.optimizeNodes();F=this.else=Array.isArray(ee)?new j(ee):ee}if(F)return $===!1?F instanceof x?F:F.nodes:this.nodes.length?this:new x(ue($),F instanceof x?[F]:F.nodes);if(!($===!1||!this.nodes.length))return this}optimizeNames($,F){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames($,F),!!(super.optimizeNames($,F)||this.else))return this.condition=Y(this.condition,$,F),this}get names(){const $=super.names;return J($,this.condition),this.else&&G($,this.else.names),$}}x.kind="if";class S extends E{}S.kind="for";class P extends S{constructor($){super(),this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,F){if(super.optimizeNames($,F))return this.iteration=Y(this.iteration,$,F),this}get names(){return G(super.names,this.iteration.names)}}class L extends S{constructor($,F,ee,ge){super(),this.varKind=$,this.name=F,this.from=ee,this.to=ge}render($){const F=$.es5?h.varKinds.var:this.varKind,{name:ee,from:ge,to:_e}=this;return`for(${F} ${ee}=${ge}; ${ee}<${_e}; ${ee}++)`+super.render($)}get names(){const $=J(super.names,this.from);return J($,this.to)}}class C extends S{constructor($,F,ee,ge){super(),this.loop=$,this.varKind=F,this.name=ee,this.iterable=ge}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,F){if(super.optimizeNames($,F))return this.iterable=Y(this.iterable,$,F),this}get names(){return G(super.names,this.iterable.names)}}class R extends E{constructor($,F,ee){super(),this.name=$,this.args=F,this.async=ee}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}R.kind="func";class A extends w{render($){return"return "+super.render($)}}A.kind="return";class I extends E{render($){let F="try"+super.render($);return this.catch&&(F+=this.catch.render($)),this.finally&&(F+=this.finally.render($)),F}optimizeNodes(){var $,F;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames($,F){var ee,ge;return super.optimizeNames($,F),(ee=this.catch)===null||ee===void 0||ee.optimizeNames($,F),(ge=this.finally)===null||ge===void 0||ge.optimizeNames($,F),this}get names(){const $=super.names;return this.catch&&G($,this.catch.names),this.finally&&G($,this.finally.names),$}}class D extends E{constructor($){super(),this.error=$}render($){return`catch(${this.error})`+super.render($)}}D.kind="catch";class M extends E{render($){return"finally"+super.render($)}}M.kind="finally";class V{constructor($,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
7
- `:""},this._extScope=$,this._scope=new h.Scope({parent:$}),this._nodes=[new O]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,F){const ee=this._extScope.value($,F);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue($,F){return this._extScope.getValue($,F)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,F,ee,ge){const _e=this._scope.toName(F);return ee!==void 0&&ge&&(this._constants[_e.str]=ee),this._leafNode(new d($,_e,ee)),_e}const($,F,ee){return this._def(h.varKinds.const,$,F,ee)}let($,F,ee){return this._def(h.varKinds.let,$,F,ee)}var($,F,ee){return this._def(h.varKinds.var,$,F,ee)}assign($,F,ee){return this._leafNode(new v($,F,ee))}add($,F){return this._leafNode(new i($,o.operators.ADD,F))}code($){return typeof $=="function"?$():$!==a.nil&&this._leafNode(new b($)),this}object(...$){const F=["{"];for(const[ee,ge]of $)F.length>1&&F.push(","),F.push(ee),(ee!==ge||this.opts.es5)&&(F.push(":"),(0,a.addCodeArg)(F,ge));return F.push("}"),new a._Code(F)}if($,F,ee){if(this._blockNode(new x($)),F&&ee)this.code(F).else().code(ee).endIf();else if(F)this.code(F).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new x($))}else(){return this._elseNode(new j)}endIf(){return this._endBlockNode(x,j)}_for($,F){return this._blockNode($),F&&this.code(F).endFor(),this}for($,F){return this._for(new P($),F)}forRange($,F,ee,ge,_e=this.opts.es5?h.varKinds.var:h.varKinds.let){const je=this._scope.toName($);return this._for(new L(_e,je,F,ee),()=>ge(je))}forOf($,F,ee,ge=h.varKinds.const){const _e=this._scope.toName($);if(this.opts.es5){const je=F instanceof a.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,a._)`${je}.length`,ve=>{this.var(_e,(0,a._)`${je}[${ve}]`),ee(_e)})}return this._for(new C("of",ge,_e,F),()=>ee(_e))}forIn($,F,ee,ge=this.opts.es5?h.varKinds.var:h.varKinds.const){if(this.opts.ownProperties)return this.forOf($,(0,a._)`Object.keys(${F})`,ee);const _e=this._scope.toName($);return this._for(new C("in",ge,_e,F),()=>ee(_e))}endFor(){return this._endBlockNode(S)}label($){return this._leafNode(new f($))}break($){return this._leafNode(new m($))}return($){const F=new A;if(this._blockNode(F),this.code($),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try($,F,ee){if(!F&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const ge=new I;if(this._blockNode(ge),this.code($),F){const _e=this.name("e");this._currNode=ge.catch=new D(_e),F(_e)}return ee&&(this._currNode=ge.finally=new M,this.code(ee)),this._endBlockNode(D,M)}throw($){return this._leafNode(new g($))}block($,F){return this._blockStarts.push(this._nodes.length),$&&this.code($).endBlock(F),this}endBlock($){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-F;if(ee<0||$!==void 0&&ee!==$)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${$} expected`);return this._nodes.length=F,this}func($,F=a.nil,ee,ge){return this._blockNode(new R($,F,ee)),ge&&this.code(ge).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize($=1){for(;$-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,F){const ee=this._currNode;if(ee instanceof $||F&&ee instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${$.kind}/${F.kind}`:$.kind}"`)}_elseNode($){const F=this._currNode;if(!(F instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=$,this}get _root(){return this._nodes[0]}get _currNode(){const $=this._nodes;return $[$.length-1]}set _currNode($){const F=this._nodes;F[F.length-1]=$}}o.CodeGen=V;function G(z,$){for(const F in $)z[F]=(z[F]||0)+($[F]||0);return z}function J(z,$){return $ instanceof a._CodeOrName?G(z,$.names):z}function Y(z,$,F){if(z instanceof a.Name)return ee(z);if(!ge(z))return z;return new a._Code(z._items.reduce((_e,je)=>(je instanceof a.Name&&(je=ee(je)),je instanceof a._Code?_e.push(...je._items):_e.push(je),_e),[]));function ee(_e){const je=F[_e.str];return je===void 0||$[_e.str]!==1?_e:(delete $[_e.str],je)}function ge(_e){return _e instanceof a._Code&&_e._items.some(je=>je instanceof a.Name&&$[je.str]===1&&F[je.str]!==void 0)}}function se(z,$){for(const F in $)z[F]=(z[F]||0)-($[F]||0)}function ue(z){return typeof z=="boolean"||typeof z=="number"||z===null?!z:(0,a._)`!${te(z)}`}o.not=ue;const he=H(o.operators.AND);function de(...z){return z.reduce(he)}o.and=de;const be=H(o.operators.OR);function ie(...z){return z.reduce(be)}o.or=ie;function H(z){return($,F)=>$===a.nil?F:F===a.nil?$:(0,a._)`${te($)} ${z} ${te(F)}`}function te(z){return z instanceof a.Name?z:(0,a._)`(${z})`}})(Sl)),Sl}var We={},hd;function ut(){if(hd)return We;hd=1,Object.defineProperty(We,"__esModule",{value:!0}),We.checkStrictMode=We.getErrorPath=We.Type=We.useFunc=We.setEvaluated=We.evaluatedPropsToName=We.mergeEvaluated=We.eachItem=We.unescapeJsonPointer=We.escapeJsonPointer=We.escapeFragment=We.unescapeFragment=We.schemaRefOrVal=We.schemaHasRulesButRef=We.schemaHasRules=We.checkUnknownRules=We.alwaysValidSchema=We.toHash=void 0;const o=rt(),a=Va();function h(C){const R={};for(const A of C)R[A]=!0;return R}We.toHash=h;function p(C,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(y(C,R),!_(R,C.self.RULES.all))}We.alwaysValidSchema=p;function y(C,R=C.schema){const{opts:A,self:I}=C;if(!A.strictSchema||typeof R=="boolean")return;const D=I.RULES.keywords;for(const M in R)D[M]||L(C,`unknown keyword: "${M}"`)}We.checkUnknownRules=y;function _(C,R){if(typeof C=="boolean")return!C;for(const A in C)if(R[A])return!0;return!1}We.schemaHasRules=_;function d(C,R){if(typeof C=="boolean")return!C;for(const A in C)if(A!=="$ref"&&R.all[A])return!0;return!1}We.schemaHasRulesButRef=d;function v({topSchemaRef:C,schemaPath:R},A,I,D){if(!D){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,o._)`${A}`}return(0,o._)`${C}${R}${(0,o.getProperty)(I)}`}We.schemaRefOrVal=v;function i(C){return g(decodeURIComponent(C))}We.unescapeFragment=i;function f(C){return encodeURIComponent(m(C))}We.escapeFragment=f;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}We.escapeJsonPointer=m;function g(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}We.unescapeJsonPointer=g;function b(C,R){if(Array.isArray(C))for(const A of C)R(A);else R(C)}We.eachItem=b;function w({mergeNames:C,mergeToName:R,mergeValues:A,resultToName:I}){return(D,M,V,G)=>{const J=V===void 0?M:V instanceof o.Name?(M instanceof o.Name?C(D,M,V):R(D,M,V),V):M instanceof o.Name?(R(D,V,M),M):A(M,V);return G===o.Name&&!(J instanceof o.Name)?I(D,J):J}}We.mergeEvaluated={props:w({mergeNames:(C,R,A)=>C.if((0,o._)`${A} !== true && ${R} !== undefined`,()=>{C.if((0,o._)`${R} === true`,()=>C.assign(A,!0),()=>C.assign(A,(0,o._)`${A} || {}`).code((0,o._)`Object.assign(${A}, ${R})`))}),mergeToName:(C,R,A)=>C.if((0,o._)`${A} !== true`,()=>{R===!0?C.assign(A,!0):(C.assign(A,(0,o._)`${A} || {}`),O(C,A,R))}),mergeValues:(C,R)=>C===!0?!0:{...C,...R},resultToName:E}),items:w({mergeNames:(C,R,A)=>C.if((0,o._)`${A} !== true && ${R} !== undefined`,()=>C.assign(A,(0,o._)`${R} === true ? true : ${A} > ${R} ? ${A} : ${R}`)),mergeToName:(C,R,A)=>C.if((0,o._)`${A} !== true`,()=>C.assign(A,R===!0?!0:(0,o._)`${A} > ${R} ? ${A} : ${R}`)),mergeValues:(C,R)=>C===!0?!0:Math.max(C,R),resultToName:(C,R)=>C.var("items",R)})};function E(C,R){if(R===!0)return C.var("props",!0);const A=C.var("props",(0,o._)`{}`);return R!==void 0&&O(C,A,R),A}We.evaluatedPropsToName=E;function O(C,R,A){Object.keys(A).forEach(I=>C.assign((0,o._)`${R}${(0,o.getProperty)(I)}`,!0))}We.setEvaluated=O;const j={};function x(C,R){return C.scopeValue("func",{ref:R,code:j[R.code]||(j[R.code]=new a._Code(R.code))})}We.useFunc=x;var S;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(S||(We.Type=S={}));function P(C,R,A){if(C instanceof o.Name){const I=R===S.Num;return A?I?(0,o._)`"[" + ${C} + "]"`:(0,o._)`"['" + ${C} + "']"`:I?(0,o._)`"/" + ${C}`:(0,o._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,o.getProperty)(C).toString():"/"+m(C)}We.getErrorPath=P;function L(C,R,A=C.opts.strictSchema){if(A){if(R=`strict mode: ${R}`,A===!0)throw new Error(R);C.self.logger.warn(R)}}return We.checkStrictMode=L,We}var za={},fd;function Pn(){if(fd)return za;fd=1,Object.defineProperty(za,"__esModule",{value:!0});const o=rt(),a={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};return za.default=a,za}var pd;function qa(){return pd||(pd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.extendErrors=o.resetErrorsCount=o.reportExtraError=o.reportError=o.keyword$DataError=o.keywordError=void 0;const a=rt(),h=ut(),p=Pn();o.keywordError={message:({keyword:j})=>(0,a.str)`must pass "${j}" keyword validation`},o.keyword$DataError={message:({keyword:j,schemaType:x})=>x?(0,a.str)`"${j}" keyword must be ${x} ($data)`:(0,a.str)`"${j}" keyword is invalid ($data)`};function y(j,x=o.keywordError,S,P){const{it:L}=j,{gen:C,compositeRule:R,allErrors:A}=L,I=g(j,x,S);P??(R||A)?i(C,I):f(L,(0,a._)`[${I}]`)}o.reportError=y;function _(j,x=o.keywordError,S){const{it:P}=j,{gen:L,compositeRule:C,allErrors:R}=P,A=g(j,x,S);i(L,A),C||R||f(P,p.default.vErrors)}o.reportExtraError=_;function d(j,x){j.assign(p.default.errors,x),j.if((0,a._)`${p.default.vErrors} !== null`,()=>j.if(x,()=>j.assign((0,a._)`${p.default.vErrors}.length`,x),()=>j.assign(p.default.vErrors,null)))}o.resetErrorsCount=d;function v({gen:j,keyword:x,schemaValue:S,data:P,errsCount:L,it:C}){if(L===void 0)throw new Error("ajv implementation error");const R=j.name("err");j.forRange("i",L,p.default.errors,A=>{j.const(R,(0,a._)`${p.default.vErrors}[${A}]`),j.if((0,a._)`${R}.instancePath === undefined`,()=>j.assign((0,a._)`${R}.instancePath`,(0,a.strConcat)(p.default.instancePath,C.errorPath))),j.assign((0,a._)`${R}.schemaPath`,(0,a.str)`${C.errSchemaPath}/${x}`),C.opts.verbose&&(j.assign((0,a._)`${R}.schema`,S),j.assign((0,a._)`${R}.data`,P))})}o.extendErrors=v;function i(j,x){const S=j.const("err",x);j.if((0,a._)`${p.default.vErrors} === null`,()=>j.assign(p.default.vErrors,(0,a._)`[${S}]`),(0,a._)`${p.default.vErrors}.push(${S})`),j.code((0,a._)`${p.default.errors}++`)}function f(j,x){const{gen:S,validateName:P,schemaEnv:L}=j;L.$async?S.throw((0,a._)`new ${j.ValidationError}(${x})`):(S.assign((0,a._)`${P}.errors`,x),S.return(!1))}const m={keyword:new a.Name("keyword"),schemaPath:new a.Name("schemaPath"),params:new a.Name("params"),propertyName:new a.Name("propertyName"),message:new a.Name("message"),schema:new a.Name("schema"),parentSchema:new a.Name("parentSchema")};function g(j,x,S){const{createErrors:P}=j.it;return P===!1?(0,a._)`{}`:b(j,x,S)}function b(j,x,S={}){const{gen:P,it:L}=j,C=[w(L,S),E(j,S)];return O(j,x,C),P.object(...C)}function w({errorPath:j},{instancePath:x}){const S=x?(0,a.str)`${j}${(0,h.getErrorPath)(x,h.Type.Str)}`:j;return[p.default.instancePath,(0,a.strConcat)(p.default.instancePath,S)]}function E({keyword:j,it:{errSchemaPath:x}},{schemaPath:S,parentSchema:P}){let L=P?x:(0,a.str)`${x}/${j}`;return S&&(L=(0,a.str)`${L}${(0,h.getErrorPath)(S,h.Type.Str)}`),[m.schemaPath,L]}function O(j,{params:x,message:S},P){const{keyword:L,data:C,schemaValue:R,it:A}=j,{opts:I,propertyName:D,topSchemaRef:M,schemaPath:V}=A;P.push([m.keyword,L],[m.params,typeof x=="function"?x(j):x||(0,a._)`{}`]),I.messages&&P.push([m.message,typeof S=="function"?S(j):S]),I.verbose&&P.push([m.schema,R],[m.parentSchema,(0,a._)`${M}${V}`],[p.default.data,C]),D&&P.push([m.propertyName,D])}})(xl)),xl}var md;function Iy(){if(md)return si;md=1,Object.defineProperty(si,"__esModule",{value:!0}),si.boolOrEmptySchema=si.topBoolOrEmptySchema=void 0;const o=qa(),a=rt(),h=Pn(),p={message:"boolean schema is false"};function y(v){const{gen:i,schema:f,validateName:m}=v;f===!1?d(v,!1):typeof f=="object"&&f.$async===!0?i.return(h.default.data):(i.assign((0,a._)`${m}.errors`,null),i.return(!0))}si.topBoolOrEmptySchema=y;function _(v,i){const{gen:f,schema:m}=v;m===!1?(f.var(i,!1),d(v)):f.var(i,!0)}si.boolOrEmptySchema=_;function d(v,i){const{gen:f,data:m}=v,g={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:v};(0,o.reportError)(g,p,void 0,i)}return si}var Ut={},li={},yd;function vd(){if(yd)return li;yd=1,Object.defineProperty(li,"__esModule",{value:!0}),li.getRules=li.isJSONType=void 0;const o=["string","number","integer","boolean","null","object","array"],a=new Set(o);function h(y){return typeof y=="string"&&a.has(y)}li.isJSONType=h;function p(){const y={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...y,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},y.number,y.string,y.array,y.object],post:{rules:[]},all:{},keywords:{}}}return li.getRules=p,li}var cn={},bd;function gd(){if(bd)return cn;bd=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.shouldUseRule=cn.shouldUseGroup=cn.schemaHasRulesForType=void 0;function o({schema:p,self:y},_){const d=y.RULES.types[_];return d&&d!==!0&&a(p,d)}cn.schemaHasRulesForType=o;function a(p,y){return y.rules.some(_=>h(p,_))}cn.shouldUseGroup=a;function h(p,y){var _;return p[y.keyword]!==void 0||((_=y.definition.implements)===null||_===void 0?void 0:_.some(d=>p[d]!==void 0))}return cn.shouldUseRule=h,cn}var _d;function Ha(){if(_d)return Ut;_d=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.reportTypeError=Ut.checkDataTypes=Ut.checkDataType=Ut.coerceAndCheckDataType=Ut.getJSONTypes=Ut.getSchemaTypes=Ut.DataType=void 0;const o=vd(),a=gd(),h=qa(),p=rt(),y=ut();var _;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(_||(Ut.DataType=_={}));function d(S){const P=v(S.type);if(P.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!P.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&P.push("null")}return P}Ut.getSchemaTypes=d;function v(S){const P=Array.isArray(S)?S:S?[S]:[];if(P.every(o.isJSONType))return P;throw new Error("type must be JSONType or JSONType[]: "+P.join(","))}Ut.getJSONTypes=v;function i(S,P){const{gen:L,data:C,opts:R}=S,A=m(P,R.coerceTypes),I=P.length>0&&!(A.length===0&&P.length===1&&(0,a.schemaHasRulesForType)(S,P[0]));if(I){const D=E(P,C,R.strictNumbers,_.Wrong);L.if(D,()=>{A.length?g(S,P,A):j(S)})}return I}Ut.coerceAndCheckDataType=i;const f=new Set(["string","number","integer","boolean","null"]);function m(S,P){return P?S.filter(L=>f.has(L)||P==="array"&&L==="array"):[]}function g(S,P,L){const{gen:C,data:R,opts:A}=S,I=C.let("dataType",(0,p._)`typeof ${R}`),D=C.let("coerced",(0,p._)`undefined`);A.coerceTypes==="array"&&C.if((0,p._)`${I} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>C.assign(R,(0,p._)`${R}[0]`).assign(I,(0,p._)`typeof ${R}`).if(E(P,R,A.strictNumbers),()=>C.assign(D,R))),C.if((0,p._)`${D} !== undefined`);for(const V of L)(f.has(V)||V==="array"&&A.coerceTypes==="array")&&M(V);C.else(),j(S),C.endIf(),C.if((0,p._)`${D} !== undefined`,()=>{C.assign(R,D),b(S,D)});function M(V){switch(V){case"string":C.elseIf((0,p._)`${I} == "number" || ${I} == "boolean"`).assign(D,(0,p._)`"" + ${R}`).elseIf((0,p._)`${R} === null`).assign(D,(0,p._)`""`);return;case"number":C.elseIf((0,p._)`${I} == "boolean" || ${R} === null
5
+ `):" "+rd(d[0]):"as no adapter specified";throw new ze("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return y}const nd={getAdapter:Ty,adapters:kl};function jl(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new Ui(null,o)}function id(o){return jl(o),o.headers=ur.from(o.headers),o.data=wl.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),nd.getAdapter(o.adapter||Zo.adapter,o)(o).then(function(p){return jl(o),p.data=wl.call(o,o.transformResponse,p),p.headers=ur.from(p.headers),p},function(p){return qu(p)||(jl(o),p&&p.response&&(p.response.data=wl.call(o,o.transformResponse,p.response),p.response.headers=ur.from(p.response.headers))),Promise.reject(p)})}const od="1.13.2",Fa={};["object","boolean","number","function","string","symbol"].forEach((o,a)=>{Fa[o]=function(p){return typeof p===o||"a"+(a<1?"n ":" ")+o}});const ad={};Fa.transitional=function(a,h,p){function y(_,d){return"[Axios v"+od+"] Transitional option '"+_+"'"+d+(p?". "+p:"")}return(_,d,v)=>{if(a===!1)throw new ze(y(d," has been removed"+(h?" in "+h:"")),ze.ERR_DEPRECATED);return h&&!ad[d]&&(ad[d]=!0,console.warn(y(d," has been deprecated since v"+h+" and will be removed in the near future"))),a?a(_,d,v):!0}},Fa.spelling=function(a){return(h,p)=>(console.warn(`${p} is likely a misspelling of ${a}`),!0)};function Ry(o,a,h){if(typeof o!="object")throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);const p=Object.keys(o);let y=p.length;for(;y-- >0;){const _=p[y],d=a[_];if(d){const v=o[_],i=v===void 0||d(v,_,o);if(i!==!0)throw new ze("option "+_+" must be "+i,ze.ERR_BAD_OPTION_VALUE);continue}if(h!==!0)throw new ze("Unknown option "+_,ze.ERR_BAD_OPTION)}}const Ma={assertOptions:Ry,validators:Fa},Ur=Ma.validators;let ai=class{constructor(a){this.defaults=a||{},this.interceptors={request:new Fu,response:new Fu}}async request(a,h){try{return await this._request(a,h)}catch(p){if(p instanceof Error){let y={};Error.captureStackTrace?Error.captureStackTrace(y):y=new Error;const _=y.stack?y.stack.replace(/^.+\n/,""):"";try{p.stack?_&&!String(p.stack).endsWith(_.replace(/^.+\n.+\n/,""))&&(p.stack+=`
6
+ `+_):p.stack=_}catch{}}throw p}}_request(a,h){typeof a=="string"?(h=h||{},h.url=a):h=a||{},h=oi(this.defaults,h);const{transitional:p,paramsSerializer:y,headers:_}=h;p!==void 0&&Ma.assertOptions(p,{silentJSONParsing:Ur.transitional(Ur.boolean),forcedJSONParsing:Ur.transitional(Ur.boolean),clarifyTimeoutError:Ur.transitional(Ur.boolean)},!1),y!=null&&(ae.isFunction(y)?h.paramsSerializer={serialize:y}:Ma.assertOptions(y,{encode:Ur.function,serialize:Ur.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),Ma.assertOptions(h,{baseUrl:Ur.spelling("baseURL"),withXsrfToken:Ur.spelling("withXSRFToken")},!0),h.method=(h.method||this.defaults.method||"get").toLowerCase();let d=_&&ae.merge(_.common,_[h.method]);_&&ae.forEach(["delete","get","head","post","put","patch","common"],E=>{delete _[E]}),h.headers=ur.concat(d,_);const v=[];let i=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(h)===!1||(i=i&&O.synchronous,v.unshift(O.fulfilled,O.rejected))});const f=[];this.interceptors.response.forEach(function(O){f.push(O.fulfilled,O.rejected)});let m,g=0,b;if(!i){const E=[id.bind(this),void 0];for(E.unshift(...v),E.push(...f),b=E.length,m=Promise.resolve(h);g<b;)m=m.then(E[g++],E[g++]);return m}b=v.length;let w=h;for(;g<b;){const E=v[g++],O=v[g++];try{w=E(w)}catch(j){O.call(this,j);break}}try{m=id.call(this,w)}catch(E){return Promise.reject(E)}for(g=0,b=f.length;g<b;)m=m.then(f[g++],f[g++]);return m}getUri(a){a=oi(this.defaults,a);const h=Ju(a.baseURL,a.url,a.allowAbsoluteUrls);return Bu(h,a.params,a.paramsSerializer)}};ae.forEach(["delete","get","head","options"],function(a){ai.prototype[a]=function(h,p){return this.request(oi(p||{},{method:a,url:h,data:(p||{}).data}))}}),ae.forEach(["post","put","patch"],function(a){function h(p){return function(_,d,v){return this.request(oi(v||{},{method:a,headers:p?{"Content-Type":"multipart/form-data"}:{},url:_,data:d}))}}ai.prototype[a]=h(),ai.prototype[a+"Form"]=h(!0)});let Ly=class dm{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let h;this.promise=new Promise(function(_){h=_});const p=this;this.promise.then(y=>{if(!p._listeners)return;let _=p._listeners.length;for(;_-- >0;)p._listeners[_](y);p._listeners=null}),this.promise.then=y=>{let _;const d=new Promise(v=>{p.subscribe(v),_=v}).then(y);return d.cancel=function(){p.unsubscribe(_)},d},a(function(_,d,v){p.reason||(p.reason=new Ui(_,d,v),h(p.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const h=this._listeners.indexOf(a);h!==-1&&this._listeners.splice(h,1)}toAbortSignal(){const a=new AbortController,h=p=>{a.abort(p)};return this.subscribe(h),a.signal.unsubscribe=()=>this.unsubscribe(h),a.signal}static source(){let a;return{token:new dm(function(y){a=y}),cancel:a}}};function Ay(o){return function(h){return o.apply(null,h)}}function $y(o){return ae.isObject(o)&&o.isAxiosError===!0}const El={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(El).forEach(([o,a])=>{El[a]=o});function sd(o){const a=new ai(o),h=zi(ai.prototype.request,a);return ae.extend(h,ai.prototype,a,{allOwnKeys:!0}),ae.extend(h,a,null,{allOwnKeys:!0}),h.create=function(y){return sd(oi(o,y))},h}const xt=sd(Zo);xt.Axios=ai,xt.CanceledError=Ui,xt.CancelToken=Ly,xt.isCancel=qu,xt.VERSION=od,xt.toFormData=Na,xt.AxiosError=ze,xt.Cancel=xt.CanceledError,xt.all=function(a){return Promise.all(a)},xt.spread=Ay,xt.isAxiosError=$y,xt.mergeConfig=oi,xt.AxiosHeaders=ur,xt.formToJSON=o=>Vu(ae.isHTMLForm(o)?new FormData(o):o),xt.getAdapter=nd.getAdapter,xt.HttpStatusCode=El,xt.default=xt;const{Axios:S1,AxiosError:C1,CanceledError:P1,isCancel:T1,CancelToken:R1,VERSION:L1,all:A1,Cancel:$1,isAxiosError:N1,spread:I1,toFormData:D1,AxiosHeaders:B1,HttpStatusCode:F1,formToJSON:M1,getAdapter:V1,mergeConfig:z1}=xt;function Ny(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Va={exports:{}},Ol={},cn={},si={},xl={},Sl={},Cl={},ld;function za(){return ld||(ld=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.regexpCode=o.getEsmExportName=o.getProperty=o.safeStringify=o.stringify=o.strConcat=o.addCodeArg=o.str=o._=o.nil=o._Code=o.Name=o.IDENTIFIER=o._CodeOrName=void 0;class a{}o._CodeOrName=a,o.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class h extends a{constructor(S){if(super(),!o.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}o.Name=h;class p extends a{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((P,L)=>`${P}${L}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((P,L)=>(L instanceof h&&(P[L.str]=(P[L.str]||0)+1),P),{})}}o._Code=p,o.nil=new p("");function y(x,...S){const P=[x[0]];let L=0;for(;L<S.length;)v(P,S[L]),P.push(x[++L]);return new p(P)}o._=y;const _=new p("+");function d(x,...S){const P=[w(x[0])];let L=0;for(;L<S.length;)P.push(_),v(P,S[L]),P.push(_,w(x[++L]));return i(P),new p(P)}o.str=d;function v(x,S){S instanceof p?x.push(...S._items):S instanceof h?x.push(S):x.push(g(S))}o.addCodeArg=v;function i(x){let S=1;for(;S<x.length-1;){if(x[S]===_){const P=f(x[S-1],x[S+1]);if(P!==void 0){x.splice(S-1,3,P);continue}x[S++]="+"}S++}}function f(x,S){if(S==='""')return x;if(x==='""')return S;if(typeof x=="string")return S instanceof h||x[x.length-1]!=='"'?void 0:typeof S!="string"?`${x.slice(0,-1)}${S}"`:S[0]==='"'?x.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(x instanceof h))return`"${x}${S.slice(1)}`}function m(x,S){return S.emptyStr()?x:x.emptyStr()?S:d`${x}${S}`}o.strConcat=m;function g(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:w(Array.isArray(x)?x.join(","):x)}function b(x){return new p(w(x))}o.stringify=b;function w(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o.safeStringify=w;function E(x){return typeof x=="string"&&o.IDENTIFIER.test(x)?new p(`.${x}`):y`[${x}]`}o.getProperty=E;function O(x){if(typeof x=="string"&&o.IDENTIFIER.test(x))return new p(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}o.getEsmExportName=O;function j(x){return new p(x.toString())}o.regexpCode=j})(Cl)),Cl}var Pl={},cd;function ud(){return cd||(cd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ValueScope=o.ValueScopeName=o.Scope=o.varKinds=o.UsedValueState=void 0;const a=za();class h extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var p;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(p||(o.UsedValueState=p={})),o.varKinds={const:new a.Name("const"),let:new a.Name("let"),var:new a.Name("var")};class y{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof a.Name?f:this.name(f)}name(f){return new a.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,g;if(!((g=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||g===void 0)&&g.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}o.Scope=y;class _ extends a.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:g}){this.value=f,this.scopePath=(0,a._)`.${new a.Name(m)}[${g}]`}}o.ValueScopeName=_;const d=(0,a._)`\n`;class v extends y{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?d:a.nil}}get(){return this._scope}name(f){return new _(f,this._newName(f))}value(f,m){var g;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const b=this.toName(f),{prefix:w}=b,E=(g=m.key)!==null&&g!==void 0?g:m.ref;let O=this._values[w];if(O){const S=O.get(E);if(S)return S}else O=this._values[w]=new Map;O.set(E,b);const j=this._scope[w]||(this._scope[w]=[]),x=j.length;return j[x]=m.ref,b.setValue(m,{property:w,itemIndex:x}),b}getValue(f,m){const g=this._values[f];if(g)return g.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,a._)`${f}${g.scopePath}`})}scopeCode(f=this._values,m,g){return this._reduceValues(f,b=>{if(b.value===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return b.value.code},m,g)}_reduceValues(f,m,g={},b){let w=a.nil;for(const E in f){const O=f[E];if(!O)continue;const j=g[E]=g[E]||new Map;O.forEach(x=>{if(j.has(x))return;j.set(x,p.Started);let S=m(x);if(S){const P=this.opts.es5?o.varKinds.var:o.varKinds.const;w=(0,a._)`${w}${P} ${x} = ${S};${this.opts._n}`}else if(S=b?.(x))w=(0,a._)`${w}${S}${this.opts._n}`;else throw new h(x);j.set(x,p.Completed)})}return w}}o.ValueScope=v})(Pl)),Pl}var dd;function rt(){return dd||(dd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.or=o.and=o.not=o.CodeGen=o.operators=o.varKinds=o.ValueScopeName=o.ValueScope=o.Scope=o.Name=o.regexpCode=o.stringify=o.getProperty=o.nil=o.strConcat=o.str=o._=void 0;const a=za(),h=ud();var p=za();Object.defineProperty(o,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(o,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(o,"strConcat",{enumerable:!0,get:function(){return p.strConcat}}),Object.defineProperty(o,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(o,"getProperty",{enumerable:!0,get:function(){return p.getProperty}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(o,"regexpCode",{enumerable:!0,get:function(){return p.regexpCode}}),Object.defineProperty(o,"Name",{enumerable:!0,get:function(){return p.Name}});var y=ud();Object.defineProperty(o,"Scope",{enumerable:!0,get:function(){return y.Scope}}),Object.defineProperty(o,"ValueScope",{enumerable:!0,get:function(){return y.ValueScope}}),Object.defineProperty(o,"ValueScopeName",{enumerable:!0,get:function(){return y.ValueScopeName}}),Object.defineProperty(o,"varKinds",{enumerable:!0,get:function(){return y.varKinds}}),o.operators={GT:new a._Code(">"),GTE:new a._Code(">="),LT:new a._Code("<"),LTE:new a._Code("<="),EQ:new a._Code("==="),NEQ:new a._Code("!=="),NOT:new a._Code("!"),OR:new a._Code("||"),AND:new a._Code("&&"),ADD:new a._Code("+")};class _{optimizeNodes(){return this}optimizeNames($,F){return this}}class d extends _{constructor($,F,ee){super(),this.varKind=$,this.name=F,this.rhs=ee}render({es5:$,_n:F}){const ee=$?h.varKinds.var:this.varKind,ge=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${ge};`+F}optimizeNames($,F){if($[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,$,F)),this}get names(){return this.rhs instanceof a._CodeOrName?this.rhs.names:{}}}class v extends _{constructor($,F,ee){super(),this.lhs=$,this.rhs=F,this.sideEffects=ee}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,F){if(!(this.lhs instanceof a.Name&&!$[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,$,F),this}get names(){const $=this.lhs instanceof a.Name?{}:{...this.lhs.names};return J($,this.rhs)}}class i extends v{constructor($,F,ee,ge){super($,ee,ge),this.op=F}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class f extends _{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class m extends _{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class g extends _{constructor($){super(),this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class b extends _{constructor($){super(),this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,F){return this.code=Y(this.code,$,F),this}get names(){return this.code instanceof a._CodeOrName?this.code.names:{}}}class w extends _{constructor($=[]){super(),this.nodes=$}render($){return this.nodes.reduce((F,ee)=>F+ee.render($),"")}optimizeNodes(){const{nodes:$}=this;let F=$.length;for(;F--;){const ee=$[F].optimizeNodes();Array.isArray(ee)?$.splice(F,1,...ee):ee?$[F]=ee:$.splice(F,1)}return $.length>0?this:void 0}optimizeNames($,F){const{nodes:ee}=this;let ge=ee.length;for(;ge--;){const _e=ee[ge];_e.optimizeNames($,F)||(se($,_e.names),ee.splice(ge,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce(($,F)=>G($,F.names),{})}}class E extends w{render($){return"{"+$._n+super.render($)+"}"+$._n}}class O extends w{}class j extends E{}j.kind="else";class x extends E{constructor($,F){super(F),this.condition=$}render($){let F=`if(${this.condition})`+super.render($);return this.else&&(F+="else "+this.else.render($)),F}optimizeNodes(){super.optimizeNodes();const $=this.condition;if($===!0)return this.nodes;let F=this.else;if(F){const ee=F.optimizeNodes();F=this.else=Array.isArray(ee)?new j(ee):ee}if(F)return $===!1?F instanceof x?F:F.nodes:this.nodes.length?this:new x(ue($),F instanceof x?[F]:F.nodes);if(!($===!1||!this.nodes.length))return this}optimizeNames($,F){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames($,F),!!(super.optimizeNames($,F)||this.else))return this.condition=Y(this.condition,$,F),this}get names(){const $=super.names;return J($,this.condition),this.else&&G($,this.else.names),$}}x.kind="if";class S extends E{}S.kind="for";class P extends S{constructor($){super(),this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,F){if(super.optimizeNames($,F))return this.iteration=Y(this.iteration,$,F),this}get names(){return G(super.names,this.iteration.names)}}class L extends S{constructor($,F,ee,ge){super(),this.varKind=$,this.name=F,this.from=ee,this.to=ge}render($){const F=$.es5?h.varKinds.var:this.varKind,{name:ee,from:ge,to:_e}=this;return`for(${F} ${ee}=${ge}; ${ee}<${_e}; ${ee}++)`+super.render($)}get names(){const $=J(super.names,this.from);return J($,this.to)}}class C extends S{constructor($,F,ee,ge){super(),this.loop=$,this.varKind=F,this.name=ee,this.iterable=ge}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,F){if(super.optimizeNames($,F))return this.iterable=Y(this.iterable,$,F),this}get names(){return G(super.names,this.iterable.names)}}class R extends E{constructor($,F,ee){super(),this.name=$,this.args=F,this.async=ee}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}R.kind="func";class A extends w{render($){return"return "+super.render($)}}A.kind="return";class I extends E{render($){let F="try"+super.render($);return this.catch&&(F+=this.catch.render($)),this.finally&&(F+=this.finally.render($)),F}optimizeNodes(){var $,F;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames($,F){var ee,ge;return super.optimizeNames($,F),(ee=this.catch)===null||ee===void 0||ee.optimizeNames($,F),(ge=this.finally)===null||ge===void 0||ge.optimizeNames($,F),this}get names(){const $=super.names;return this.catch&&G($,this.catch.names),this.finally&&G($,this.finally.names),$}}class D extends E{constructor($){super(),this.error=$}render($){return`catch(${this.error})`+super.render($)}}D.kind="catch";class M extends E{render($){return"finally"+super.render($)}}M.kind="finally";class V{constructor($,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
7
+ `:""},this._extScope=$,this._scope=new h.Scope({parent:$}),this._nodes=[new O]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,F){const ee=this._extScope.value($,F);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue($,F){return this._extScope.getValue($,F)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,F,ee,ge){const _e=this._scope.toName(F);return ee!==void 0&&ge&&(this._constants[_e.str]=ee),this._leafNode(new d($,_e,ee)),_e}const($,F,ee){return this._def(h.varKinds.const,$,F,ee)}let($,F,ee){return this._def(h.varKinds.let,$,F,ee)}var($,F,ee){return this._def(h.varKinds.var,$,F,ee)}assign($,F,ee){return this._leafNode(new v($,F,ee))}add($,F){return this._leafNode(new i($,o.operators.ADD,F))}code($){return typeof $=="function"?$():$!==a.nil&&this._leafNode(new b($)),this}object(...$){const F=["{"];for(const[ee,ge]of $)F.length>1&&F.push(","),F.push(ee),(ee!==ge||this.opts.es5)&&(F.push(":"),(0,a.addCodeArg)(F,ge));return F.push("}"),new a._Code(F)}if($,F,ee){if(this._blockNode(new x($)),F&&ee)this.code(F).else().code(ee).endIf();else if(F)this.code(F).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new x($))}else(){return this._elseNode(new j)}endIf(){return this._endBlockNode(x,j)}_for($,F){return this._blockNode($),F&&this.code(F).endFor(),this}for($,F){return this._for(new P($),F)}forRange($,F,ee,ge,_e=this.opts.es5?h.varKinds.var:h.varKinds.let){const je=this._scope.toName($);return this._for(new L(_e,je,F,ee),()=>ge(je))}forOf($,F,ee,ge=h.varKinds.const){const _e=this._scope.toName($);if(this.opts.es5){const je=F instanceof a.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,a._)`${je}.length`,ve=>{this.var(_e,(0,a._)`${je}[${ve}]`),ee(_e)})}return this._for(new C("of",ge,_e,F),()=>ee(_e))}forIn($,F,ee,ge=this.opts.es5?h.varKinds.var:h.varKinds.const){if(this.opts.ownProperties)return this.forOf($,(0,a._)`Object.keys(${F})`,ee);const _e=this._scope.toName($);return this._for(new C("in",ge,_e,F),()=>ee(_e))}endFor(){return this._endBlockNode(S)}label($){return this._leafNode(new f($))}break($){return this._leafNode(new m($))}return($){const F=new A;if(this._blockNode(F),this.code($),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try($,F,ee){if(!F&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const ge=new I;if(this._blockNode(ge),this.code($),F){const _e=this.name("e");this._currNode=ge.catch=new D(_e),F(_e)}return ee&&(this._currNode=ge.finally=new M,this.code(ee)),this._endBlockNode(D,M)}throw($){return this._leafNode(new g($))}block($,F){return this._blockStarts.push(this._nodes.length),$&&this.code($).endBlock(F),this}endBlock($){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-F;if(ee<0||$!==void 0&&ee!==$)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${$} expected`);return this._nodes.length=F,this}func($,F=a.nil,ee,ge){return this._blockNode(new R($,F,ee)),ge&&this.code(ge).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize($=1){for(;$-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,F){const ee=this._currNode;if(ee instanceof $||F&&ee instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${$.kind}/${F.kind}`:$.kind}"`)}_elseNode($){const F=this._currNode;if(!(F instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=$,this}get _root(){return this._nodes[0]}get _currNode(){const $=this._nodes;return $[$.length-1]}set _currNode($){const F=this._nodes;F[F.length-1]=$}}o.CodeGen=V;function G(z,$){for(const F in $)z[F]=(z[F]||0)+($[F]||0);return z}function J(z,$){return $ instanceof a._CodeOrName?G(z,$.names):z}function Y(z,$,F){if(z instanceof a.Name)return ee(z);if(!ge(z))return z;return new a._Code(z._items.reduce((_e,je)=>(je instanceof a.Name&&(je=ee(je)),je instanceof a._Code?_e.push(...je._items):_e.push(je),_e),[]));function ee(_e){const je=F[_e.str];return je===void 0||$[_e.str]!==1?_e:(delete $[_e.str],je)}function ge(_e){return _e instanceof a._Code&&_e._items.some(je=>je instanceof a.Name&&$[je.str]===1&&F[je.str]!==void 0)}}function se(z,$){for(const F in $)z[F]=(z[F]||0)-($[F]||0)}function ue(z){return typeof z=="boolean"||typeof z=="number"||z===null?!z:(0,a._)`!${te(z)}`}o.not=ue;const he=H(o.operators.AND);function de(...z){return z.reduce(he)}o.and=de;const be=H(o.operators.OR);function ie(...z){return z.reduce(be)}o.or=ie;function H(z){return($,F)=>$===a.nil?F:F===a.nil?$:(0,a._)`${te($)} ${z} ${te(F)}`}function te(z){return z instanceof a.Name?z:(0,a._)`(${z})`}})(Sl)),Sl}var We={},hd;function ut(){if(hd)return We;hd=1,Object.defineProperty(We,"__esModule",{value:!0}),We.checkStrictMode=We.getErrorPath=We.Type=We.useFunc=We.setEvaluated=We.evaluatedPropsToName=We.mergeEvaluated=We.eachItem=We.unescapeJsonPointer=We.escapeJsonPointer=We.escapeFragment=We.unescapeFragment=We.schemaRefOrVal=We.schemaHasRulesButRef=We.schemaHasRules=We.checkUnknownRules=We.alwaysValidSchema=We.toHash=void 0;const o=rt(),a=za();function h(C){const R={};for(const A of C)R[A]=!0;return R}We.toHash=h;function p(C,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(y(C,R),!_(R,C.self.RULES.all))}We.alwaysValidSchema=p;function y(C,R=C.schema){const{opts:A,self:I}=C;if(!A.strictSchema||typeof R=="boolean")return;const D=I.RULES.keywords;for(const M in R)D[M]||L(C,`unknown keyword: "${M}"`)}We.checkUnknownRules=y;function _(C,R){if(typeof C=="boolean")return!C;for(const A in C)if(R[A])return!0;return!1}We.schemaHasRules=_;function d(C,R){if(typeof C=="boolean")return!C;for(const A in C)if(A!=="$ref"&&R.all[A])return!0;return!1}We.schemaHasRulesButRef=d;function v({topSchemaRef:C,schemaPath:R},A,I,D){if(!D){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,o._)`${A}`}return(0,o._)`${C}${R}${(0,o.getProperty)(I)}`}We.schemaRefOrVal=v;function i(C){return g(decodeURIComponent(C))}We.unescapeFragment=i;function f(C){return encodeURIComponent(m(C))}We.escapeFragment=f;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}We.escapeJsonPointer=m;function g(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}We.unescapeJsonPointer=g;function b(C,R){if(Array.isArray(C))for(const A of C)R(A);else R(C)}We.eachItem=b;function w({mergeNames:C,mergeToName:R,mergeValues:A,resultToName:I}){return(D,M,V,G)=>{const J=V===void 0?M:V instanceof o.Name?(M instanceof o.Name?C(D,M,V):R(D,M,V),V):M instanceof o.Name?(R(D,V,M),M):A(M,V);return G===o.Name&&!(J instanceof o.Name)?I(D,J):J}}We.mergeEvaluated={props:w({mergeNames:(C,R,A)=>C.if((0,o._)`${A} !== true && ${R} !== undefined`,()=>{C.if((0,o._)`${R} === true`,()=>C.assign(A,!0),()=>C.assign(A,(0,o._)`${A} || {}`).code((0,o._)`Object.assign(${A}, ${R})`))}),mergeToName:(C,R,A)=>C.if((0,o._)`${A} !== true`,()=>{R===!0?C.assign(A,!0):(C.assign(A,(0,o._)`${A} || {}`),O(C,A,R))}),mergeValues:(C,R)=>C===!0?!0:{...C,...R},resultToName:E}),items:w({mergeNames:(C,R,A)=>C.if((0,o._)`${A} !== true && ${R} !== undefined`,()=>C.assign(A,(0,o._)`${R} === true ? true : ${A} > ${R} ? ${A} : ${R}`)),mergeToName:(C,R,A)=>C.if((0,o._)`${A} !== true`,()=>C.assign(A,R===!0?!0:(0,o._)`${A} > ${R} ? ${A} : ${R}`)),mergeValues:(C,R)=>C===!0?!0:Math.max(C,R),resultToName:(C,R)=>C.var("items",R)})};function E(C,R){if(R===!0)return C.var("props",!0);const A=C.var("props",(0,o._)`{}`);return R!==void 0&&O(C,A,R),A}We.evaluatedPropsToName=E;function O(C,R,A){Object.keys(A).forEach(I=>C.assign((0,o._)`${R}${(0,o.getProperty)(I)}`,!0))}We.setEvaluated=O;const j={};function x(C,R){return C.scopeValue("func",{ref:R,code:j[R.code]||(j[R.code]=new a._Code(R.code))})}We.useFunc=x;var S;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(S||(We.Type=S={}));function P(C,R,A){if(C instanceof o.Name){const I=R===S.Num;return A?I?(0,o._)`"[" + ${C} + "]"`:(0,o._)`"['" + ${C} + "']"`:I?(0,o._)`"/" + ${C}`:(0,o._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,o.getProperty)(C).toString():"/"+m(C)}We.getErrorPath=P;function L(C,R,A=C.opts.strictSchema){if(A){if(R=`strict mode: ${R}`,A===!0)throw new Error(R);C.self.logger.warn(R)}}return We.checkStrictMode=L,We}var qa={},fd;function Pn(){if(fd)return qa;fd=1,Object.defineProperty(qa,"__esModule",{value:!0});const o=rt(),a={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};return qa.default=a,qa}var pd;function Ha(){return pd||(pd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.extendErrors=o.resetErrorsCount=o.reportExtraError=o.reportError=o.keyword$DataError=o.keywordError=void 0;const a=rt(),h=ut(),p=Pn();o.keywordError={message:({keyword:j})=>(0,a.str)`must pass "${j}" keyword validation`},o.keyword$DataError={message:({keyword:j,schemaType:x})=>x?(0,a.str)`"${j}" keyword must be ${x} ($data)`:(0,a.str)`"${j}" keyword is invalid ($data)`};function y(j,x=o.keywordError,S,P){const{it:L}=j,{gen:C,compositeRule:R,allErrors:A}=L,I=g(j,x,S);P??(R||A)?i(C,I):f(L,(0,a._)`[${I}]`)}o.reportError=y;function _(j,x=o.keywordError,S){const{it:P}=j,{gen:L,compositeRule:C,allErrors:R}=P,A=g(j,x,S);i(L,A),C||R||f(P,p.default.vErrors)}o.reportExtraError=_;function d(j,x){j.assign(p.default.errors,x),j.if((0,a._)`${p.default.vErrors} !== null`,()=>j.if(x,()=>j.assign((0,a._)`${p.default.vErrors}.length`,x),()=>j.assign(p.default.vErrors,null)))}o.resetErrorsCount=d;function v({gen:j,keyword:x,schemaValue:S,data:P,errsCount:L,it:C}){if(L===void 0)throw new Error("ajv implementation error");const R=j.name("err");j.forRange("i",L,p.default.errors,A=>{j.const(R,(0,a._)`${p.default.vErrors}[${A}]`),j.if((0,a._)`${R}.instancePath === undefined`,()=>j.assign((0,a._)`${R}.instancePath`,(0,a.strConcat)(p.default.instancePath,C.errorPath))),j.assign((0,a._)`${R}.schemaPath`,(0,a.str)`${C.errSchemaPath}/${x}`),C.opts.verbose&&(j.assign((0,a._)`${R}.schema`,S),j.assign((0,a._)`${R}.data`,P))})}o.extendErrors=v;function i(j,x){const S=j.const("err",x);j.if((0,a._)`${p.default.vErrors} === null`,()=>j.assign(p.default.vErrors,(0,a._)`[${S}]`),(0,a._)`${p.default.vErrors}.push(${S})`),j.code((0,a._)`${p.default.errors}++`)}function f(j,x){const{gen:S,validateName:P,schemaEnv:L}=j;L.$async?S.throw((0,a._)`new ${j.ValidationError}(${x})`):(S.assign((0,a._)`${P}.errors`,x),S.return(!1))}const m={keyword:new a.Name("keyword"),schemaPath:new a.Name("schemaPath"),params:new a.Name("params"),propertyName:new a.Name("propertyName"),message:new a.Name("message"),schema:new a.Name("schema"),parentSchema:new a.Name("parentSchema")};function g(j,x,S){const{createErrors:P}=j.it;return P===!1?(0,a._)`{}`:b(j,x,S)}function b(j,x,S={}){const{gen:P,it:L}=j,C=[w(L,S),E(j,S)];return O(j,x,C),P.object(...C)}function w({errorPath:j},{instancePath:x}){const S=x?(0,a.str)`${j}${(0,h.getErrorPath)(x,h.Type.Str)}`:j;return[p.default.instancePath,(0,a.strConcat)(p.default.instancePath,S)]}function E({keyword:j,it:{errSchemaPath:x}},{schemaPath:S,parentSchema:P}){let L=P?x:(0,a.str)`${x}/${j}`;return S&&(L=(0,a.str)`${L}${(0,h.getErrorPath)(S,h.Type.Str)}`),[m.schemaPath,L]}function O(j,{params:x,message:S},P){const{keyword:L,data:C,schemaValue:R,it:A}=j,{opts:I,propertyName:D,topSchemaRef:M,schemaPath:V}=A;P.push([m.keyword,L],[m.params,typeof x=="function"?x(j):x||(0,a._)`{}`]),I.messages&&P.push([m.message,typeof S=="function"?S(j):S]),I.verbose&&P.push([m.schema,R],[m.parentSchema,(0,a._)`${M}${V}`],[p.default.data,C]),D&&P.push([m.propertyName,D])}})(xl)),xl}var md;function Iy(){if(md)return si;md=1,Object.defineProperty(si,"__esModule",{value:!0}),si.boolOrEmptySchema=si.topBoolOrEmptySchema=void 0;const o=Ha(),a=rt(),h=Pn(),p={message:"boolean schema is false"};function y(v){const{gen:i,schema:f,validateName:m}=v;f===!1?d(v,!1):typeof f=="object"&&f.$async===!0?i.return(h.default.data):(i.assign((0,a._)`${m}.errors`,null),i.return(!0))}si.topBoolOrEmptySchema=y;function _(v,i){const{gen:f,schema:m}=v;m===!1?(f.var(i,!1),d(v)):f.var(i,!0)}si.boolOrEmptySchema=_;function d(v,i){const{gen:f,data:m}=v,g={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:v};(0,o.reportError)(g,p,void 0,i)}return si}var Ut={},li={},yd;function vd(){if(yd)return li;yd=1,Object.defineProperty(li,"__esModule",{value:!0}),li.getRules=li.isJSONType=void 0;const o=["string","number","integer","boolean","null","object","array"],a=new Set(o);function h(y){return typeof y=="string"&&a.has(y)}li.isJSONType=h;function p(){const y={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...y,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},y.number,y.string,y.array,y.object],post:{rules:[]},all:{},keywords:{}}}return li.getRules=p,li}var un={},bd;function gd(){if(bd)return un;bd=1,Object.defineProperty(un,"__esModule",{value:!0}),un.shouldUseRule=un.shouldUseGroup=un.schemaHasRulesForType=void 0;function o({schema:p,self:y},_){const d=y.RULES.types[_];return d&&d!==!0&&a(p,d)}un.schemaHasRulesForType=o;function a(p,y){return y.rules.some(_=>h(p,_))}un.shouldUseGroup=a;function h(p,y){var _;return p[y.keyword]!==void 0||((_=y.definition.implements)===null||_===void 0?void 0:_.some(d=>p[d]!==void 0))}return un.shouldUseRule=h,un}var _d;function Ua(){if(_d)return Ut;_d=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.reportTypeError=Ut.checkDataTypes=Ut.checkDataType=Ut.coerceAndCheckDataType=Ut.getJSONTypes=Ut.getSchemaTypes=Ut.DataType=void 0;const o=vd(),a=gd(),h=Ha(),p=rt(),y=ut();var _;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(_||(Ut.DataType=_={}));function d(S){const P=v(S.type);if(P.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!P.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&P.push("null")}return P}Ut.getSchemaTypes=d;function v(S){const P=Array.isArray(S)?S:S?[S]:[];if(P.every(o.isJSONType))return P;throw new Error("type must be JSONType or JSONType[]: "+P.join(","))}Ut.getJSONTypes=v;function i(S,P){const{gen:L,data:C,opts:R}=S,A=m(P,R.coerceTypes),I=P.length>0&&!(A.length===0&&P.length===1&&(0,a.schemaHasRulesForType)(S,P[0]));if(I){const D=E(P,C,R.strictNumbers,_.Wrong);L.if(D,()=>{A.length?g(S,P,A):j(S)})}return I}Ut.coerceAndCheckDataType=i;const f=new Set(["string","number","integer","boolean","null"]);function m(S,P){return P?S.filter(L=>f.has(L)||P==="array"&&L==="array"):[]}function g(S,P,L){const{gen:C,data:R,opts:A}=S,I=C.let("dataType",(0,p._)`typeof ${R}`),D=C.let("coerced",(0,p._)`undefined`);A.coerceTypes==="array"&&C.if((0,p._)`${I} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>C.assign(R,(0,p._)`${R}[0]`).assign(I,(0,p._)`typeof ${R}`).if(E(P,R,A.strictNumbers),()=>C.assign(D,R))),C.if((0,p._)`${D} !== undefined`);for(const V of L)(f.has(V)||V==="array"&&A.coerceTypes==="array")&&M(V);C.else(),j(S),C.endIf(),C.if((0,p._)`${D} !== undefined`,()=>{C.assign(R,D),b(S,D)});function M(V){switch(V){case"string":C.elseIf((0,p._)`${I} == "number" || ${I} == "boolean"`).assign(D,(0,p._)`"" + ${R}`).elseIf((0,p._)`${R} === null`).assign(D,(0,p._)`""`);return;case"number":C.elseIf((0,p._)`${I} == "boolean" || ${R} === null
8
8
  || (${I} == "string" && ${R} && ${R} == +${R})`).assign(D,(0,p._)`+${R}`);return;case"integer":C.elseIf((0,p._)`${I} === "boolean" || ${R} === null
9
9
  || (${I} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(D,(0,p._)`+${R}`);return;case"boolean":C.elseIf((0,p._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(D,!1).elseIf((0,p._)`${R} === "true" || ${R} === 1`).assign(D,!0);return;case"null":C.elseIf((0,p._)`${R} === "" || ${R} === 0 || ${R} === false`),C.assign(D,null);return;case"array":C.elseIf((0,p._)`${I} === "string" || ${I} === "number"
10
- || ${I} === "boolean" || ${R} === null`).assign(D,(0,p._)`[${R}]`)}}}function b({gen:S,parentData:P,parentDataProperty:L},C){S.if((0,p._)`${P} !== undefined`,()=>S.assign((0,p._)`${P}[${L}]`,C))}function w(S,P,L,C=_.Correct){const R=C===_.Correct?p.operators.EQ:p.operators.NEQ;let A;switch(S){case"null":return(0,p._)`${P} ${R} null`;case"array":A=(0,p._)`Array.isArray(${P})`;break;case"object":A=(0,p._)`${P} && typeof ${P} == "object" && !Array.isArray(${P})`;break;case"integer":A=I((0,p._)`!(${P} % 1) && !isNaN(${P})`);break;case"number":A=I();break;default:return(0,p._)`typeof ${P} ${R} ${S}`}return C===_.Correct?A:(0,p.not)(A);function I(D=p.nil){return(0,p.and)((0,p._)`typeof ${P} == "number"`,D,L?(0,p._)`isFinite(${P})`:p.nil)}}Ut.checkDataType=w;function E(S,P,L,C){if(S.length===1)return w(S[0],P,L,C);let R;const A=(0,y.toHash)(S);if(A.array&&A.object){const I=(0,p._)`typeof ${P} != "object"`;R=A.null?I:(0,p._)`!${P} || ${I}`,delete A.null,delete A.array,delete A.object}else R=p.nil;A.number&&delete A.integer;for(const I in A)R=(0,p.and)(R,w(I,P,L,C));return R}Ut.checkDataTypes=E;const O={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:P})=>typeof S=="string"?(0,p._)`{type: ${S}}`:(0,p._)`{type: ${P}}`};function j(S){const P=x(S);(0,h.reportError)(P,O)}Ut.reportTypeError=j;function x(S){const{gen:P,data:L,schema:C}=S,R=(0,y.schemaRefOrVal)(S,C,"type");return{gen:P,keyword:"type",data:L,schema:C.type,schemaCode:R,schemaValue:R,parentSchema:C,params:{},it:S}}return Ut}var Qo={},wd;function Dy(){if(wd)return Qo;wd=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.assignDefaults=void 0;const o=rt(),a=ut();function h(y,_){const{properties:d,items:v}=y.schema;if(_==="object"&&d)for(const i in d)p(y,i,d[i].default);else _==="array"&&Array.isArray(v)&&v.forEach((i,f)=>p(y,f,i.default))}Qo.assignDefaults=h;function p(y,_,d){const{gen:v,compositeRule:i,data:f,opts:m}=y;if(d===void 0)return;const g=(0,o._)`${f}${(0,o.getProperty)(_)}`;if(i){(0,a.checkStrictMode)(y,`default is ignored for: ${g}`);return}let b=(0,o._)`${g} === undefined`;m.useDefaults==="empty"&&(b=(0,o._)`${b} || ${g} === null || ${g} === ""`),v.if(b,(0,o._)`${g} = ${(0,o.stringify)(d)}`)}return Qo}var xr={},ft={},kd;function Sr(){if(kd)return ft;kd=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateUnion=ft.validateArray=ft.usePattern=ft.callValidateCode=ft.schemaProperties=ft.allSchemaProperties=ft.noPropertyInData=ft.propertyInData=ft.isOwnProperty=ft.hasPropFunc=ft.reportMissingProp=ft.checkMissingProp=ft.checkReportMissingProp=void 0;const o=rt(),a=ut(),h=Pn(),p=ut();function y(S,P){const{gen:L,data:C,it:R}=S;L.if(m(L,C,P,R.opts.ownProperties),()=>{S.setParams({missingProperty:(0,o._)`${P}`},!0),S.error()})}ft.checkReportMissingProp=y;function _({gen:S,data:P,it:{opts:L}},C,R){return(0,o.or)(...C.map(A=>(0,o.and)(m(S,P,A,L.ownProperties),(0,o._)`${R} = ${A}`)))}ft.checkMissingProp=_;function d(S,P){S.setParams({missingProperty:P},!0),S.error()}ft.reportMissingProp=d;function v(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,o._)`Object.prototype.hasOwnProperty`})}ft.hasPropFunc=v;function i(S,P,L){return(0,o._)`${v(S)}.call(${P}, ${L})`}ft.isOwnProperty=i;function f(S,P,L,C){const R=(0,o._)`${P}${(0,o.getProperty)(L)} !== undefined`;return C?(0,o._)`${R} && ${i(S,P,L)}`:R}ft.propertyInData=f;function m(S,P,L,C){const R=(0,o._)`${P}${(0,o.getProperty)(L)} === undefined`;return C?(0,o.or)(R,(0,o.not)(i(S,P,L))):R}ft.noPropertyInData=m;function g(S){return S?Object.keys(S).filter(P=>P!=="__proto__"):[]}ft.allSchemaProperties=g;function b(S,P){return g(P).filter(L=>!(0,a.alwaysValidSchema)(S,P[L]))}ft.schemaProperties=b;function w({schemaCode:S,data:P,it:{gen:L,topSchemaRef:C,schemaPath:R,errorPath:A},it:I},D,M,V){const G=V?(0,o._)`${S}, ${P}, ${C}${R}`:P,J=[[h.default.instancePath,(0,o.strConcat)(h.default.instancePath,A)],[h.default.parentData,I.parentData],[h.default.parentDataProperty,I.parentDataProperty],[h.default.rootData,h.default.rootData]];I.opts.dynamicRef&&J.push([h.default.dynamicAnchors,h.default.dynamicAnchors]);const Y=(0,o._)`${G}, ${L.object(...J)}`;return M!==o.nil?(0,o._)`${D}.call(${M}, ${Y})`:(0,o._)`${D}(${Y})`}ft.callValidateCode=w;const E=(0,o._)`new RegExp`;function O({gen:S,it:{opts:P}},L){const C=P.unicodeRegExp?"u":"",{regExp:R}=P.code,A=R(L,C);return S.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,o._)`${R.code==="new RegExp"?E:(0,p.useFunc)(S,R)}(${L}, ${C})`})}ft.usePattern=O;function j(S){const{gen:P,data:L,keyword:C,it:R}=S,A=P.name("valid");if(R.allErrors){const D=P.let("valid",!0);return I(()=>P.assign(D,!1)),D}return P.var(A,!0),I(()=>P.break()),A;function I(D){const M=P.const("len",(0,o._)`${L}.length`);P.forRange("i",0,M,V=>{S.subschema({keyword:C,dataProp:V,dataPropType:a.Type.Num},A),P.if((0,o.not)(A),D)})}}ft.validateArray=j;function x(S){const{gen:P,schema:L,keyword:C,it:R}=S;if(!Array.isArray(L))throw new Error("ajv implementation error");if(L.some(M=>(0,a.alwaysValidSchema)(R,M))&&!R.opts.unevaluated)return;const I=P.let("valid",!1),D=P.name("_valid");P.block(()=>L.forEach((M,V)=>{const G=S.subschema({keyword:C,schemaProp:V,compositeRule:!0},D);P.assign(I,(0,o._)`${I} || ${D}`),S.mergeValidEvaluated(G,D)||P.if((0,o.not)(I))})),S.result(I,()=>S.reset(),()=>S.error(!0))}return ft.validateUnion=x,ft}var jd;function By(){if(jd)return xr;jd=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.validateKeywordUsage=xr.validSchemaType=xr.funcKeywordCode=xr.macroKeywordCode=void 0;const o=rt(),a=Pn(),h=Sr(),p=qa();function y(b,w){const{gen:E,keyword:O,schema:j,parentSchema:x,it:S}=b,P=w.macro.call(S.self,j,x,S),L=f(E,O,P);S.opts.validateSchema!==!1&&S.self.validateSchema(P,!0);const C=E.name("valid");b.subschema({schema:P,schemaPath:o.nil,errSchemaPath:`${S.errSchemaPath}/${O}`,topSchemaRef:L,compositeRule:!0},C),b.pass(C,()=>b.error(!0))}xr.macroKeywordCode=y;function _(b,w){var E;const{gen:O,keyword:j,schema:x,parentSchema:S,$data:P,it:L}=b;i(L,w);const C=!P&&w.compile?w.compile.call(L.self,x,S,L):w.validate,R=f(O,j,C),A=O.let("valid");b.block$data(A,I),b.ok((E=w.valid)!==null&&E!==void 0?E:A);function I(){if(w.errors===!1)V(),w.modifying&&d(b),G(()=>b.error());else{const J=w.async?D():M();w.modifying&&d(b),G(()=>v(b,J))}}function D(){const J=O.let("ruleErrs",null);return O.try(()=>V((0,o._)`await `),Y=>O.assign(A,!1).if((0,o._)`${Y} instanceof ${L.ValidationError}`,()=>O.assign(J,(0,o._)`${Y}.errors`),()=>O.throw(Y))),J}function M(){const J=(0,o._)`${R}.errors`;return O.assign(J,null),V(o.nil),J}function V(J=w.async?(0,o._)`await `:o.nil){const Y=L.opts.passContext?a.default.this:a.default.self,se=!("compile"in w&&!P||w.schema===!1);O.assign(A,(0,o._)`${J}${(0,h.callValidateCode)(b,R,Y,se)}`,w.modifying)}function G(J){var Y;O.if((0,o.not)((Y=w.valid)!==null&&Y!==void 0?Y:A),J)}}xr.funcKeywordCode=_;function d(b){const{gen:w,data:E,it:O}=b;w.if(O.parentData,()=>w.assign(E,(0,o._)`${O.parentData}[${O.parentDataProperty}]`))}function v(b,w){const{gen:E}=b;E.if((0,o._)`Array.isArray(${w})`,()=>{E.assign(a.default.vErrors,(0,o._)`${a.default.vErrors} === null ? ${w} : ${a.default.vErrors}.concat(${w})`).assign(a.default.errors,(0,o._)`${a.default.vErrors}.length`),(0,p.extendErrors)(b)},()=>b.error())}function i({schemaEnv:b},w){if(w.async&&!b.$async)throw new Error("async keyword in sync schema")}function f(b,w,E){if(E===void 0)throw new Error(`keyword "${w}" failed to compile`);return b.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,o.stringify)(E)})}function m(b,w,E=!1){return!w.length||w.some(O=>O==="array"?Array.isArray(b):O==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==O||E&&typeof b>"u")}xr.validSchemaType=m;function g({schema:b,opts:w,self:E,errSchemaPath:O},j,x){if(Array.isArray(j.keyword)?!j.keyword.includes(x):j.keyword!==x)throw new Error("ajv implementation error");const S=j.dependencies;if(S?.some(P=>!Object.prototype.hasOwnProperty.call(b,P)))throw new Error(`parent schema must have dependencies of ${x}: ${S.join(",")}`);if(j.validateSchema&&!j.validateSchema(b[x])){const L=`keyword "${x}" value is invalid at path "${O}": `+E.errorsText(j.validateSchema.errors);if(w.validateSchema==="log")E.logger.error(L);else throw new Error(L)}}return xr.validateKeywordUsage=g,xr}var un={},Ed;function Fy(){if(Ed)return un;Ed=1,Object.defineProperty(un,"__esModule",{value:!0}),un.extendSubschemaMode=un.extendSubschemaData=un.getSubschema=void 0;const o=rt(),a=ut();function h(_,{keyword:d,schemaProp:v,schema:i,schemaPath:f,errSchemaPath:m,topSchemaRef:g}){if(d!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const b=_.schema[d];return v===void 0?{schema:b,schemaPath:(0,o._)`${_.schemaPath}${(0,o.getProperty)(d)}`,errSchemaPath:`${_.errSchemaPath}/${d}`}:{schema:b[v],schemaPath:(0,o._)`${_.schemaPath}${(0,o.getProperty)(d)}${(0,o.getProperty)(v)}`,errSchemaPath:`${_.errSchemaPath}/${d}/${(0,a.escapeFragment)(v)}`}}if(i!==void 0){if(f===void 0||m===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:f,topSchemaRef:g,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}un.getSubschema=h;function p(_,d,{dataProp:v,dataPropType:i,data:f,dataTypes:m,propertyName:g}){if(f!==void 0&&v!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:b}=d;if(v!==void 0){const{errorPath:E,dataPathArr:O,opts:j}=d,x=b.let("data",(0,o._)`${d.data}${(0,o.getProperty)(v)}`,!0);w(x),_.errorPath=(0,o.str)`${E}${(0,a.getErrorPath)(v,i,j.jsPropertySyntax)}`,_.parentDataProperty=(0,o._)`${v}`,_.dataPathArr=[...O,_.parentDataProperty]}if(f!==void 0){const E=f instanceof o.Name?f:b.let("data",f,!0);w(E),g!==void 0&&(_.propertyName=g)}m&&(_.dataTypes=m);function w(E){_.data=E,_.dataLevel=d.dataLevel+1,_.dataTypes=[],d.definedProperties=new Set,_.parentData=d.data,_.dataNames=[...d.dataNames,E]}}un.extendSubschemaData=p;function y(_,{jtdDiscriminator:d,jtdMetadata:v,compositeRule:i,createErrors:f,allErrors:m}){i!==void 0&&(_.compositeRule=i),f!==void 0&&(_.createErrors=f),m!==void 0&&(_.allErrors=m),_.jtdDiscriminator=d,_.jtdMetadata=v}return un.extendSubschemaMode=y,un}var tr={},Tl,Od;function xd(){return Od||(Od=1,Tl=function o(a,h){if(a===h)return!0;if(a&&h&&typeof a=="object"&&typeof h=="object"){if(a.constructor!==h.constructor)return!1;var p,y,_;if(Array.isArray(a)){if(p=a.length,p!=h.length)return!1;for(y=p;y--!==0;)if(!o(a[y],h[y]))return!1;return!0}if(a.constructor===RegExp)return a.source===h.source&&a.flags===h.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===h.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===h.toString();if(_=Object.keys(a),p=_.length,p!==Object.keys(h).length)return!1;for(y=p;y--!==0;)if(!Object.prototype.hasOwnProperty.call(h,_[y]))return!1;for(y=p;y--!==0;){var d=_[y];if(!o(a[d],h[d]))return!1}return!0}return a!==a&&h!==h}),Tl}var Rl={exports:{}},Sd;function My(){if(Sd)return Rl.exports;Sd=1;var o=Rl.exports=function(p,y,_){typeof y=="function"&&(_=y,y={}),_=y.cb||_;var d=typeof _=="function"?_:_.pre||function(){},v=_.post||function(){};a(y,d,v,p,"",p)};o.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},o.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},o.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},o.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function a(p,y,_,d,v,i,f,m,g,b){if(d&&typeof d=="object"&&!Array.isArray(d)){y(d,v,i,f,m,g,b);for(var w in d){var E=d[w];if(Array.isArray(E)){if(w in o.arrayKeywords)for(var O=0;O<E.length;O++)a(p,y,_,E[O],v+"/"+w+"/"+O,i,v,w,d,O)}else if(w in o.propsKeywords){if(E&&typeof E=="object")for(var j in E)a(p,y,_,E[j],v+"/"+w+"/"+h(j),i,v,w,d,j)}else(w in o.keywords||p.allKeys&&!(w in o.skipKeywords))&&a(p,y,_,E,v+"/"+w,i,v,w,d)}_(d,v,i,f,m,g,b)}}function h(p){return p.replace(/~/g,"~0").replace(/\//g,"~1")}return Rl.exports}var Cd;function Ua(){if(Cd)return tr;Cd=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.getSchemaRefs=tr.resolveUrl=tr.normalizeId=tr._getFullPath=tr.getFullPath=tr.inlineRef=void 0;const o=ut(),a=xd(),h=My(),p=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function y(O,j=!0){return typeof O=="boolean"?!0:j===!0?!d(O):j?v(O)<=j:!1}tr.inlineRef=y;const _=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(O){for(const j in O){if(_.has(j))return!0;const x=O[j];if(Array.isArray(x)&&x.some(d)||typeof x=="object"&&d(x))return!0}return!1}function v(O){let j=0;for(const x in O){if(x==="$ref")return 1/0;if(j++,!p.has(x)&&(typeof O[x]=="object"&&(0,o.eachItem)(O[x],S=>j+=v(S)),j===1/0))return 1/0}return j}function i(O,j="",x){x!==!1&&(j=g(j));const S=O.parse(j);return f(O,S)}tr.getFullPath=i;function f(O,j){return O.serialize(j).split("#")[0]+"#"}tr._getFullPath=f;const m=/#\/?$/;function g(O){return O?O.replace(m,""):""}tr.normalizeId=g;function b(O,j,x){return x=g(x),O.resolve(j,x)}tr.resolveUrl=b;const w=/^[a-z_][-a-z0-9._]*$/i;function E(O,j){if(typeof O=="boolean")return{};const{schemaId:x,uriResolver:S}=this.opts,P=g(O[x]||j),L={"":P},C=i(S,P,!1),R={},A=new Set;return h(O,{allKeys:!0},(M,V,G,J)=>{if(J===void 0)return;const Y=C+V;let se=L[J];typeof M[x]=="string"&&(se=ue.call(this,M[x])),he.call(this,M.$anchor),he.call(this,M.$dynamicAnchor),L[V]=se;function ue(de){const be=this.opts.uriResolver.resolve;if(de=g(se?be(se,de):de),A.has(de))throw D(de);A.add(de);let ie=this.refs[de];return typeof ie=="string"&&(ie=this.refs[ie]),typeof ie=="object"?I(M,ie.schema,de):de!==g(Y)&&(de[0]==="#"?(I(M,R[de],de),R[de]=M):this.refs[de]=Y),de}function he(de){if(typeof de=="string"){if(!w.test(de))throw new Error(`invalid anchor "${de}"`);ue.call(this,`#${de}`)}}}),R;function I(M,V,G){if(V!==void 0&&!a(M,V))throw D(G)}function D(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return tr.getSchemaRefs=E,tr}var Pd;function Ga(){if(Pd)return ln;Pd=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.getData=ln.KeywordCxt=ln.validateFunctionCode=void 0;const o=Iy(),a=Ha(),h=gd(),p=Ha(),y=Dy(),_=By(),d=Fy(),v=rt(),i=Pn(),f=Ua(),m=ut(),g=qa();function b(U){if(C(U)&&(A(U),L(U))){j(U);return}w(U,()=>(0,o.topBoolOrEmptySchema)(U))}ln.validateFunctionCode=b;function w({gen:U,validateName:W,schema:ne,schemaEnv:ce,opts:pe},Oe){pe.code.es5?U.func(W,(0,v._)`${i.default.data}, ${i.default.valCxt}`,ce.$async,()=>{U.code((0,v._)`"use strict"; ${S(ne,pe)}`),O(U,pe),U.code(Oe)}):U.func(W,(0,v._)`${i.default.data}, ${E(pe)}`,ce.$async,()=>U.code(S(ne,pe)).code(Oe))}function E(U){return(0,v._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${U.dynamicRef?(0,v._)`, ${i.default.dynamicAnchors}={}`:v.nil}}={}`}function O(U,W){U.if(i.default.valCxt,()=>{U.var(i.default.instancePath,(0,v._)`${i.default.valCxt}.${i.default.instancePath}`),U.var(i.default.parentData,(0,v._)`${i.default.valCxt}.${i.default.parentData}`),U.var(i.default.parentDataProperty,(0,v._)`${i.default.valCxt}.${i.default.parentDataProperty}`),U.var(i.default.rootData,(0,v._)`${i.default.valCxt}.${i.default.rootData}`),W.dynamicRef&&U.var(i.default.dynamicAnchors,(0,v._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{U.var(i.default.instancePath,(0,v._)`""`),U.var(i.default.parentData,(0,v._)`undefined`),U.var(i.default.parentDataProperty,(0,v._)`undefined`),U.var(i.default.rootData,i.default.data),W.dynamicRef&&U.var(i.default.dynamicAnchors,(0,v._)`{}`)})}function j(U){const{schema:W,opts:ne,gen:ce}=U;w(U,()=>{ne.$comment&&W.$comment&&J(U),M(U),ce.let(i.default.vErrors,null),ce.let(i.default.errors,0),ne.unevaluated&&x(U),I(U),Y(U)})}function x(U){const{gen:W,validateName:ne}=U;U.evaluated=W.const("evaluated",(0,v._)`${ne}.evaluated`),W.if((0,v._)`${U.evaluated}.dynamicProps`,()=>W.assign((0,v._)`${U.evaluated}.props`,(0,v._)`undefined`)),W.if((0,v._)`${U.evaluated}.dynamicItems`,()=>W.assign((0,v._)`${U.evaluated}.items`,(0,v._)`undefined`))}function S(U,W){const ne=typeof U=="object"&&U[W.schemaId];return ne&&(W.code.source||W.code.process)?(0,v._)`/*# sourceURL=${ne} */`:v.nil}function P(U,W){if(C(U)&&(A(U),L(U))){R(U,W);return}(0,o.boolOrEmptySchema)(U,W)}function L({schema:U,self:W}){if(typeof U=="boolean")return!U;for(const ne in U)if(W.RULES.all[ne])return!0;return!1}function C(U){return typeof U.schema!="boolean"}function R(U,W){const{schema:ne,gen:ce,opts:pe}=U;pe.$comment&&ne.$comment&&J(U),V(U),G(U);const Oe=ce.const("_errs",i.default.errors);I(U,Oe),ce.var(W,(0,v._)`${Oe} === ${i.default.errors}`)}function A(U){(0,m.checkUnknownRules)(U),D(U)}function I(U,W){if(U.opts.jtd)return ue(U,[],!1,W);const ne=(0,a.getSchemaTypes)(U.schema),ce=(0,a.coerceAndCheckDataType)(U,ne);ue(U,ne,!ce,W)}function D(U){const{schema:W,errSchemaPath:ne,opts:ce,self:pe}=U;W.$ref&&ce.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(W,pe.RULES)&&pe.logger.warn(`$ref: keywords ignored in schema at path "${ne}"`)}function M(U){const{schema:W,opts:ne}=U;W.default!==void 0&&ne.useDefaults&&ne.strictSchema&&(0,m.checkStrictMode)(U,"default is ignored in the schema root")}function V(U){const W=U.schema[U.opts.schemaId];W&&(U.baseId=(0,f.resolveUrl)(U.opts.uriResolver,U.baseId,W))}function G(U){if(U.schema.$async&&!U.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:U,schemaEnv:W,schema:ne,errSchemaPath:ce,opts:pe}){const Oe=ne.$comment;if(pe.$comment===!0)U.code((0,v._)`${i.default.self}.logger.log(${Oe})`);else if(typeof pe.$comment=="function"){const $e=(0,v.str)`${ce}/$comment`,Fe=U.scopeValue("root",{ref:W.root});U.code((0,v._)`${i.default.self}.opts.$comment(${Oe}, ${$e}, ${Fe}.schema)`)}}function Y(U){const{gen:W,schemaEnv:ne,validateName:ce,ValidationError:pe,opts:Oe}=U;ne.$async?W.if((0,v._)`${i.default.errors} === 0`,()=>W.return(i.default.data),()=>W.throw((0,v._)`new ${pe}(${i.default.vErrors})`)):(W.assign((0,v._)`${ce}.errors`,i.default.vErrors),Oe.unevaluated&&se(U),W.return((0,v._)`${i.default.errors} === 0`))}function se({gen:U,evaluated:W,props:ne,items:ce}){ne instanceof v.Name&&U.assign((0,v._)`${W}.props`,ne),ce instanceof v.Name&&U.assign((0,v._)`${W}.items`,ce)}function ue(U,W,ne,ce){const{gen:pe,schema:Oe,data:$e,allErrors:Fe,opts:Ze,self:Ye}=U,{RULES:Ae}=Ye;if(Oe.$ref&&(Ze.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,Ae))){pe.block(()=>ge(U,"$ref",Ae.all.$ref.definition));return}Ze.jtd||de(U,W),pe.block(()=>{for(const De of Ae.rules)Qe(De);Qe(Ae.post)});function Qe(De){(0,h.shouldUseGroup)(Oe,De)&&(De.type?(pe.if((0,p.checkDataType)(De.type,$e,Ze.strictNumbers)),he(U,De),W.length===1&&W[0]===De.type&&ne&&(pe.else(),(0,p.reportTypeError)(U)),pe.endIf()):he(U,De),Fe||pe.if((0,v._)`${i.default.errors} === ${ce||0}`))}}function he(U,W){const{gen:ne,schema:ce,opts:{useDefaults:pe}}=U;pe&&(0,y.assignDefaults)(U,W.type),ne.block(()=>{for(const Oe of W.rules)(0,h.shouldUseRule)(ce,Oe)&&ge(U,Oe.keyword,Oe.definition,W.type)})}function de(U,W){U.schemaEnv.meta||!U.opts.strictTypes||(be(U,W),U.opts.allowUnionTypes||ie(U,W),H(U,U.dataTypes))}function be(U,W){if(W.length){if(!U.dataTypes.length){U.dataTypes=W;return}W.forEach(ne=>{z(U.dataTypes,ne)||F(U,`type "${ne}" not allowed by context "${U.dataTypes.join(",")}"`)}),$(U,W)}}function ie(U,W){W.length>1&&!(W.length===2&&W.includes("null"))&&F(U,"use allowUnionTypes to allow union type keyword")}function H(U,W){const ne=U.self.RULES.all;for(const ce in ne){const pe=ne[ce];if(typeof pe=="object"&&(0,h.shouldUseRule)(U.schema,pe)){const{type:Oe}=pe.definition;Oe.length&&!Oe.some($e=>te(W,$e))&&F(U,`missing type "${Oe.join(",")}" for keyword "${ce}"`)}}}function te(U,W){return U.includes(W)||W==="number"&&U.includes("integer")}function z(U,W){return U.includes(W)||W==="integer"&&U.includes("number")}function $(U,W){const ne=[];for(const ce of U.dataTypes)z(W,ce)?ne.push(ce):W.includes("integer")&&ce==="number"&&ne.push("integer");U.dataTypes=ne}function F(U,W){const ne=U.schemaEnv.baseId+U.errSchemaPath;W+=` at "${ne}" (strictTypes)`,(0,m.checkStrictMode)(U,W,U.opts.strictTypes)}class ee{constructor(W,ne,ce){if((0,_.validateKeywordUsage)(W,ne,ce),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=ce,this.data=W.data,this.schema=W.schema[ce],this.$data=ne.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(W,this.schema,ce,this.$data),this.schemaType=ne.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=ne,this.$data)this.schemaCode=W.gen.const("vSchema",ve(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,_.validSchemaType)(this.schema,ne.schemaType,ne.allowUndefined))throw new Error(`${ce} value must be ${JSON.stringify(ne.schemaType)}`);("code"in ne?ne.trackErrors:ne.errors!==!1)&&(this.errsCount=W.gen.const("_errs",i.default.errors))}result(W,ne,ce){this.failResult((0,v.not)(W),ne,ce)}failResult(W,ne,ce){this.gen.if(W),ce?ce():this.error(),ne?(this.gen.else(),ne(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(W,ne){this.failResult((0,v.not)(W),void 0,ne)}fail(W){if(W===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(W){if(!this.$data)return this.fail(W);const{schemaCode:ne}=this;this.fail((0,v._)`${ne} !== undefined && (${(0,v.or)(this.invalid$data(),W)})`)}error(W,ne,ce){if(ne){this.setParams(ne),this._error(W,ce),this.setParams({});return}this._error(W,ce)}_error(W,ne){(W?g.reportExtraError:g.reportError)(this,this.def.error,ne)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(W){this.allErrors||this.gen.if(W)}setParams(W,ne){ne?Object.assign(this.params,W):this.params=W}block$data(W,ne,ce=v.nil){this.gen.block(()=>{this.check$data(W,ce),ne()})}check$data(W=v.nil,ne=v.nil){if(!this.$data)return;const{gen:ce,schemaCode:pe,schemaType:Oe,def:$e}=this;ce.if((0,v.or)((0,v._)`${pe} === undefined`,ne)),W!==v.nil&&ce.assign(W,!0),(Oe.length||$e.validateSchema)&&(ce.elseIf(this.invalid$data()),this.$dataError(),W!==v.nil&&ce.assign(W,!1)),ce.else()}invalid$data(){const{gen:W,schemaCode:ne,schemaType:ce,def:pe,it:Oe}=this;return(0,v.or)($e(),Fe());function $e(){if(ce.length){if(!(ne instanceof v.Name))throw new Error("ajv implementation error");const Ze=Array.isArray(ce)?ce:[ce];return(0,v._)`${(0,p.checkDataTypes)(Ze,ne,Oe.opts.strictNumbers,p.DataType.Wrong)}`}return v.nil}function Fe(){if(pe.validateSchema){const Ze=W.scopeValue("validate$data",{ref:pe.validateSchema});return(0,v._)`!${Ze}(${ne})`}return v.nil}}subschema(W,ne){const ce=(0,d.getSubschema)(this.it,W);(0,d.extendSubschemaData)(ce,this.it,W),(0,d.extendSubschemaMode)(ce,W);const pe={...this.it,...ce,items:void 0,props:void 0};return P(pe,ne),pe}mergeEvaluated(W,ne){const{it:ce,gen:pe}=this;ce.opts.unevaluated&&(ce.props!==!0&&W.props!==void 0&&(ce.props=m.mergeEvaluated.props(pe,W.props,ce.props,ne)),ce.items!==!0&&W.items!==void 0&&(ce.items=m.mergeEvaluated.items(pe,W.items,ce.items,ne)))}mergeValidEvaluated(W,ne){const{it:ce,gen:pe}=this;if(ce.opts.unevaluated&&(ce.props!==!0||ce.items!==!0))return pe.if(ne,()=>this.mergeEvaluated(W,v.Name)),!0}}ln.KeywordCxt=ee;function ge(U,W,ne,ce){const pe=new ee(U,ne,W);"code"in ne?ne.code(pe,ce):pe.$data&&ne.validate?(0,_.funcKeywordCode)(pe,ne):"macro"in ne?(0,_.macroKeywordCode)(pe,ne):(ne.compile||ne.validate)&&(0,_.funcKeywordCode)(pe,ne)}const _e=/^\/(?:[^~]|~0|~1)*$/,je=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(U,{dataLevel:W,dataNames:ne,dataPathArr:ce}){let pe,Oe;if(U==="")return i.default.rootData;if(U[0]==="/"){if(!_e.test(U))throw new Error(`Invalid JSON-pointer: ${U}`);pe=U,Oe=i.default.rootData}else{const Ye=je.exec(U);if(!Ye)throw new Error(`Invalid JSON-pointer: ${U}`);const Ae=+Ye[1];if(pe=Ye[2],pe==="#"){if(Ae>=W)throw new Error(Ze("property/index",Ae));return ce[W-Ae]}if(Ae>W)throw new Error(Ze("data",Ae));if(Oe=ne[W-Ae],!pe)return Oe}let $e=Oe;const Fe=pe.split("/");for(const Ye of Fe)Ye&&(Oe=(0,v._)`${Oe}${(0,v.getProperty)((0,m.unescapeJsonPointer)(Ye))}`,$e=(0,v._)`${$e} && ${Oe}`);return $e;function Ze(Ye,Ae){return`Cannot access ${Ye} ${Ae} levels up, current level is ${W}`}}return ln.getData=ve,ln}var Ja={},Td;function Ll(){if(Td)return Ja;Td=1,Object.defineProperty(Ja,"__esModule",{value:!0});class o extends Error{constructor(h){super("validation failed"),this.errors=h,this.ajv=this.validation=!0}}return Ja.default=o,Ja}var Ka={},Rd;function Wa(){if(Rd)return Ka;Rd=1,Object.defineProperty(Ka,"__esModule",{value:!0});const o=Ua();class a extends Error{constructor(p,y,_,d){super(d||`can't resolve reference ${_} from id ${y}`),this.missingRef=(0,o.resolveUrl)(p,y,_),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(p,this.missingRef))}}return Ka.default=a,Ka}var pr={},Ld;function Al(){if(Ld)return pr;Ld=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.resolveSchema=pr.getCompilingSchema=pr.resolveRef=pr.compileSchema=pr.SchemaEnv=void 0;const o=rt(),a=Ll(),h=Pn(),p=Ua(),y=ut(),_=Ga();class d{constructor(x){var S;this.refs={},this.dynamicAnchors={};let P;typeof x.schema=="object"&&(P=x.schema),this.schema=x.schema,this.schemaId=x.schemaId,this.root=x.root||this,this.baseId=(S=x.baseId)!==null&&S!==void 0?S:(0,p.normalizeId)(P?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=P?.$async,this.refs={}}}pr.SchemaEnv=d;function v(j){const x=m.call(this,j);if(x)return x;const S=(0,p.getFullPath)(this.opts.uriResolver,j.root.baseId),{es5:P,lines:L}=this.opts.code,{ownProperties:C}=this.opts,R=new o.CodeGen(this.scope,{es5:P,lines:L,ownProperties:C});let A;j.$async&&(A=R.scopeValue("Error",{ref:a.default,code:(0,o._)`require("ajv/dist/runtime/validation_error").default`}));const I=R.scopeName("validate");j.validateName=I;const D={gen:R,allErrors:this.opts.allErrors,data:h.default.data,parentData:h.default.parentData,parentDataProperty:h.default.parentDataProperty,dataNames:[h.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:R.scopeValue("schema",this.opts.code.source===!0?{ref:j.schema,code:(0,o.stringify)(j.schema)}:{ref:j.schema}),validateName:I,ValidationError:A,schema:j.schema,schemaEnv:j,rootId:S,baseId:j.baseId||S,schemaPath:o.nil,errSchemaPath:j.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,o._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(j),(0,_.validateFunctionCode)(D),R.optimize(this.opts.code.optimize);const V=R.toString();M=`${R.scopeRefs(h.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,j));const J=new Function(`${h.default.self}`,`${h.default.scope}`,M)(this,this.scope.get());if(this.scope.value(I,{ref:J}),J.errors=null,J.schema=j.schema,J.schemaEnv=j,j.$async&&(J.$async=!0),this.opts.code.source===!0&&(J.source={validateName:I,validateCode:V,scopeValues:R._values}),this.opts.unevaluated){const{props:Y,items:se}=D;J.evaluated={props:Y instanceof o.Name?void 0:Y,items:se instanceof o.Name?void 0:se,dynamicProps:Y instanceof o.Name,dynamicItems:se instanceof o.Name},J.source&&(J.source.evaluated=(0,o.stringify)(J.evaluated))}return j.validate=J,j}catch(V){throw delete j.validate,delete j.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(j)}}pr.compileSchema=v;function i(j,x,S){var P;S=(0,p.resolveUrl)(this.opts.uriResolver,x,S);const L=j.refs[S];if(L)return L;let C=b.call(this,j,S);if(C===void 0){const R=(P=j.localRefs)===null||P===void 0?void 0:P[S],{schemaId:A}=this.opts;R&&(C=new d({schema:R,schemaId:A,root:j,baseId:x}))}if(C!==void 0)return j.refs[S]=f.call(this,C)}pr.resolveRef=i;function f(j){return(0,p.inlineRef)(j.schema,this.opts.inlineRefs)?j.schema:j.validate?j:v.call(this,j)}function m(j){for(const x of this._compilations)if(g(x,j))return x}pr.getCompilingSchema=m;function g(j,x){return j.schema===x.schema&&j.root===x.root&&j.baseId===x.baseId}function b(j,x){let S;for(;typeof(S=this.refs[x])=="string";)x=S;return S||this.schemas[x]||w.call(this,j,x)}function w(j,x){const S=this.opts.uriResolver.parse(x),P=(0,p._getFullPath)(this.opts.uriResolver,S);let L=(0,p.getFullPath)(this.opts.uriResolver,j.baseId,void 0);if(Object.keys(j.schema).length>0&&P===L)return O.call(this,S,j);const C=(0,p.normalizeId)(P),R=this.refs[C]||this.schemas[C];if(typeof R=="string"){const A=w.call(this,j,R);return typeof A?.schema!="object"?void 0:O.call(this,S,A)}if(typeof R?.schema=="object"){if(R.validate||v.call(this,R),C===(0,p.normalizeId)(x)){const{schema:A}=R,{schemaId:I}=this.opts,D=A[I];return D&&(L=(0,p.resolveUrl)(this.opts.uriResolver,L,D)),new d({schema:A,schemaId:I,root:j,baseId:L})}return O.call(this,S,R)}}pr.resolveSchema=w;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function O(j,{baseId:x,schema:S,root:P}){var L;if(((L=j.fragment)===null||L===void 0?void 0:L[0])!=="/")return;for(const A of j.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const I=S[(0,y.unescapeFragment)(A)];if(I===void 0)return;S=I;const D=typeof S=="object"&&S[this.opts.schemaId];!E.has(A)&&D&&(x=(0,p.resolveUrl)(this.opts.uriResolver,x,D))}let C;if(typeof S!="boolean"&&S.$ref&&!(0,y.schemaHasRulesButRef)(S,this.RULES)){const A=(0,p.resolveUrl)(this.opts.uriResolver,x,S.$ref);C=w.call(this,P,A)}const{schemaId:R}=this.opts;if(C=C||new d({schema:S,schemaId:R,root:P,baseId:x}),C.schema!==C.root.schema)return C}return pr}const Vy={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Za={},Xo={exports:{}},$l,Ad;function $d(){if(Ad)return $l;Ad=1;const o=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),a=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function h(b){let w="",E=0,O=0;for(O=0;O<b.length;O++)if(E=b[O].charCodeAt(0),E!==48){if(!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";w+=b[O];break}for(O+=1;O<b.length;O++){if(E=b[O].charCodeAt(0),!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";w+=b[O]}return w}const p=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(b){return b.length=0,!0}function _(b,w,E){if(b.length){const O=h(b);if(O!=="")w.push(O);else return E.error=!0,!1;b.length=0}return!0}function d(b){let w=0;const E={error:!1,address:"",zone:""},O=[],j=[];let x=!1,S=!1,P=_;for(let L=0;L<b.length;L++){const C=b[L];if(!(C==="["||C==="]"))if(C===":"){if(x===!0&&(S=!0),!P(j,O,E))break;if(++w>7){E.error=!0;break}L>0&&b[L-1]===":"&&(x=!0),O.push(":");continue}else if(C==="%"){if(!P(j,O,E))break;P=y}else{j.push(C);continue}}return j.length&&(P===y?E.zone=j.join(""):S?O.push(j.join("")):O.push(h(j))),E.address=O.join(""),E}function v(b){if(i(b,":")<2)return{host:b,isIPV6:!1};const w=d(b);if(w.error)return{host:b,isIPV6:!1};{let E=w.address,O=w.address;return w.zone&&(E+="%"+w.zone,O+="%25"+w.zone),{host:E,isIPV6:!0,escapedHost:O}}}function i(b,w){let E=0;for(let O=0;O<b.length;O++)b[O]===w&&E++;return E}function f(b){let w=b;const E=[];let O=-1,j=0;for(;j=w.length;){if(j===1){if(w===".")break;if(w==="/"){E.push("/");break}else{E.push(w);break}}else if(j===2){if(w[0]==="."){if(w[1]===".")break;if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&(w[1]==="."||w[1]==="/")){E.push("/");break}}else if(j===3&&w==="/.."){E.length!==0&&E.pop(),E.push("/");break}if(w[0]==="."){if(w[1]==="."){if(w[2]==="/"){w=w.slice(3);continue}}else if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&w[1]==="."){if(w[2]==="/"){w=w.slice(2);continue}else if(w[2]==="."&&w[3]==="/"){w=w.slice(3),E.length!==0&&E.pop();continue}}if((O=w.indexOf("/",1))===-1){E.push(w);break}else E.push(w.slice(0,O)),w=w.slice(O)}return E.join("")}function m(b,w){const E=w!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=E(b.scheme)),b.userinfo!==void 0&&(b.userinfo=E(b.userinfo)),b.host!==void 0&&(b.host=E(b.host)),b.path!==void 0&&(b.path=E(b.path)),b.query!==void 0&&(b.query=E(b.query)),b.fragment!==void 0&&(b.fragment=E(b.fragment)),b}function g(b){const w=[];if(b.userinfo!==void 0&&(w.push(b.userinfo),w.push("@")),b.host!==void 0){let E=unescape(b.host);if(!a(E)){const O=v(E);O.isIPV6===!0?E=`[${O.escapedHost}]`:E=b.host}w.push(E)}return(typeof b.port=="number"||typeof b.port=="string")&&(w.push(":"),w.push(String(b.port))),w.length?w.join(""):void 0}return $l={nonSimpleDomain:p,recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:a,isUUID:o,normalizeIPv6:v,stringArrayToHexStripped:h},$l}var Nl,Nd;function zy(){if(Nd)return Nl;Nd=1;const{isUUID:o}=$d(),a=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,h=["http","https","ws","wss","urn","urn:uuid"];function p(C){return h.indexOf(C)!==-1}function y(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function _(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function d(C){const R=String(C.scheme).toLowerCase()==="https";return(C.port===(R?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function v(C){return C.secure=y(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function i(C){if((C.port===(y(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[R,A]=C.resourceName.split("?");C.path=R&&R!=="/"?R:void 0,C.query=A,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,R){if(!C.path)return C.error="URN can not be parsed",C;const A=C.path.match(a);if(A){const I=R.scheme||C.scheme||"urn";C.nid=A[1].toLowerCase(),C.nss=A[2];const D=`${I}:${R.nid||C.nid}`,M=L(D);C.path=void 0,M&&(C=M.parse(C,R))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,R){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=R.scheme||C.scheme||"urn",I=C.nid.toLowerCase(),D=`${A}:${R.nid||I}`,M=L(D);M&&(C=M.serialize(C,R));const V=C,G=C.nss;return V.path=`${I||R.nid}:${G}`,R.skipEscape=!0,V}function g(C,R){const A=C;return A.uuid=A.nss,A.nss=void 0,!R.tolerant&&(!A.uuid||!o(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function b(C){const R=C;return R.nss=(C.uuid||"").toLowerCase(),R}const w={scheme:"http",domainHost:!0,parse:_,serialize:d},E={scheme:"https",domainHost:w.domainHost,parse:_,serialize:d},O={scheme:"ws",domainHost:!0,parse:v,serialize:i},j={scheme:"wss",domainHost:O.domainHost,parse:O.parse,serialize:O.serialize},P={http:w,https:E,ws:O,wss:j,urn:{scheme:"urn",parse:f,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:b,skipNormalize:!0}};Object.setPrototypeOf(P,null);function L(C){return C&&(P[C]||P[C.toLowerCase()])||void 0}return Nl={wsIsSecure:y,SCHEMES:P,isValidSchemeName:p,getSchemeHandler:L},Nl}var Id;function qy(){if(Id)return Xo.exports;Id=1;const{normalizeIPv6:o,removeDotSegments:a,recomposeAuthority:h,normalizeComponentEncoding:p,isIPv4:y,nonSimpleDomain:_}=$d(),{SCHEMES:d,getSchemeHandler:v}=zy();function i(j,x){return typeof j=="string"?j=b(E(j,x),x):typeof j=="object"&&(j=E(b(j,x),x)),j}function f(j,x,S){const P=S?Object.assign({scheme:"null"},S):{scheme:"null"},L=m(E(j,P),E(x,P),P,!0);return P.skipEscape=!0,b(L,P)}function m(j,x,S,P){const L={};return P||(j=E(b(j,S),S),x=E(b(x,S),S)),S=S||{},!S.tolerant&&x.scheme?(L.scheme=x.scheme,L.userinfo=x.userinfo,L.host=x.host,L.port=x.port,L.path=a(x.path||""),L.query=x.query):(x.userinfo!==void 0||x.host!==void 0||x.port!==void 0?(L.userinfo=x.userinfo,L.host=x.host,L.port=x.port,L.path=a(x.path||""),L.query=x.query):(x.path?(x.path[0]==="/"?L.path=a(x.path):((j.userinfo!==void 0||j.host!==void 0||j.port!==void 0)&&!j.path?L.path="/"+x.path:j.path?L.path=j.path.slice(0,j.path.lastIndexOf("/")+1)+x.path:L.path=x.path,L.path=a(L.path)),L.query=x.query):(L.path=j.path,x.query!==void 0?L.query=x.query:L.query=j.query),L.userinfo=j.userinfo,L.host=j.host,L.port=j.port),L.scheme=j.scheme),L.fragment=x.fragment,L}function g(j,x,S){return typeof j=="string"?(j=unescape(j),j=b(p(E(j,S),!0),{...S,skipEscape:!0})):typeof j=="object"&&(j=b(p(j,!0),{...S,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=b(p(E(x,S),!0),{...S,skipEscape:!0})):typeof x=="object"&&(x=b(p(x,!0),{...S,skipEscape:!0})),j.toLowerCase()===x.toLowerCase()}function b(j,x){const S={host:j.host,scheme:j.scheme,userinfo:j.userinfo,port:j.port,path:j.path,query:j.query,nid:j.nid,nss:j.nss,uuid:j.uuid,fragment:j.fragment,reference:j.reference,resourceName:j.resourceName,secure:j.secure,error:""},P=Object.assign({},x),L=[],C=v(P.scheme||S.scheme);C&&C.serialize&&C.serialize(S,P),S.path!==void 0&&(P.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),P.reference!=="suffix"&&S.scheme&&L.push(S.scheme,":");const R=h(S);if(R!==void 0&&(P.reference!=="suffix"&&L.push("//"),L.push(R),S.path&&S.path[0]!=="/"&&L.push("/")),S.path!==void 0){let A=S.path;!P.absolutePath&&(!C||!C.absolutePath)&&(A=a(A)),R===void 0&&A[0]==="/"&&A[1]==="/"&&(A="/%2F"+A.slice(2)),L.push(A)}return S.query!==void 0&&L.push("?",S.query),S.fragment!==void 0&&L.push("#",S.fragment),L.join("")}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function E(j,x){const S=Object.assign({},x),P={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let L=!1;S.reference==="suffix"&&(S.scheme?j=S.scheme+":"+j:j="//"+j);const C=j.match(w);if(C){if(P.scheme=C[1],P.userinfo=C[3],P.host=C[4],P.port=parseInt(C[5],10),P.path=C[6]||"",P.query=C[7],P.fragment=C[8],isNaN(P.port)&&(P.port=C[5]),P.host)if(y(P.host)===!1){const I=o(P.host);P.host=I.host.toLowerCase(),L=I.isIPV6}else L=!0;P.scheme===void 0&&P.userinfo===void 0&&P.host===void 0&&P.port===void 0&&P.query===void 0&&!P.path?P.reference="same-document":P.scheme===void 0?P.reference="relative":P.fragment===void 0?P.reference="absolute":P.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==P.reference&&(P.error=P.error||"URI is not a "+S.reference+" reference.");const R=v(S.scheme||P.scheme);if(!S.unicodeSupport&&(!R||!R.unicodeSupport)&&P.host&&(S.domainHost||R&&R.domainHost)&&L===!1&&_(P.host))try{P.host=URL.domainToASCII(P.host.toLowerCase())}catch(A){P.error=P.error||"Host's domain name can not be converted to ASCII: "+A}(!R||R&&!R.skipNormalize)&&(j.indexOf("%")!==-1&&(P.scheme!==void 0&&(P.scheme=unescape(P.scheme)),P.host!==void 0&&(P.host=unescape(P.host))),P.path&&(P.path=escape(unescape(P.path))),P.fragment&&(P.fragment=encodeURI(decodeURIComponent(P.fragment)))),R&&R.parse&&R.parse(P,S)}else P.error=P.error||"URI can not be parsed.";return P}const O={SCHEMES:d,normalize:i,resolve:f,resolveComponent:m,equal:g,serialize:b,parse:E};return Xo.exports=O,Xo.exports.default=O,Xo.exports.fastUri=O,Xo.exports}var Dd;function Hy(){if(Dd)return Za;Dd=1,Object.defineProperty(Za,"__esModule",{value:!0});const o=qy();return o.code='require("ajv/dist/runtime/uri").default',Za.default=o,Za}var Bd;function Uy(){return Bd||(Bd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.CodeGen=o.Name=o.nil=o.stringify=o.str=o._=o.KeywordCxt=void 0;var a=Ga();Object.defineProperty(o,"KeywordCxt",{enumerable:!0,get:function(){return a.KeywordCxt}});var h=rt();Object.defineProperty(o,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(o,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(o,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(o,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(o,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});const p=Ll(),y=Wa(),_=vd(),d=Al(),v=rt(),i=Ua(),f=Ha(),m=ut(),g=Vy,b=Hy(),w=(ie,H)=>new RegExp(ie,H);w.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],O=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),j={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function P(ie){var H,te,z,$,F,ee,ge,_e,je,ve,U,W,ne,ce,pe,Oe,$e,Fe,Ze,Ye,Ae,Qe,De,nt,me;const Ee=ie.strict,Se=(H=ie.code)===null||H===void 0?void 0:H.optimize,qe=Se===!0||Se===void 0?1:Se||0,it=(z=(te=ie.code)===null||te===void 0?void 0:te.regExp)!==null&&z!==void 0?z:w,Et=($=ie.uriResolver)!==null&&$!==void 0?$:b.default;return{strictSchema:(ee=(F=ie.strictSchema)!==null&&F!==void 0?F:Ee)!==null&&ee!==void 0?ee:!0,strictNumbers:(_e=(ge=ie.strictNumbers)!==null&&ge!==void 0?ge:Ee)!==null&&_e!==void 0?_e:!0,strictTypes:(ve=(je=ie.strictTypes)!==null&&je!==void 0?je:Ee)!==null&&ve!==void 0?ve:"log",strictTuples:(W=(U=ie.strictTuples)!==null&&U!==void 0?U:Ee)!==null&&W!==void 0?W:"log",strictRequired:(ce=(ne=ie.strictRequired)!==null&&ne!==void 0?ne:Ee)!==null&&ce!==void 0?ce:!1,code:ie.code?{...ie.code,optimize:qe,regExp:it}:{optimize:qe,regExp:it},loopRequired:(pe=ie.loopRequired)!==null&&pe!==void 0?pe:S,loopEnum:(Oe=ie.loopEnum)!==null&&Oe!==void 0?Oe:S,meta:($e=ie.meta)!==null&&$e!==void 0?$e:!0,messages:(Fe=ie.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ze=ie.inlineRefs)!==null&&Ze!==void 0?Ze:!0,schemaId:(Ye=ie.schemaId)!==null&&Ye!==void 0?Ye:"$id",addUsedSchema:(Ae=ie.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(Qe=ie.validateSchema)!==null&&Qe!==void 0?Qe:!0,validateFormats:(De=ie.validateFormats)!==null&&De!==void 0?De:!0,unicodeRegExp:(nt=ie.unicodeRegExp)!==null&&nt!==void 0?nt:!0,int32range:(me=ie.int32range)!==null&&me!==void 0?me:!0,uriResolver:Et}}class L{constructor(H={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,H=this.opts={...H,...P(H)};const{es5:te,lines:z}=this.opts.code;this.scope=new v.ValueScope({scope:{},prefixes:O,es5:te,lines:z}),this.logger=G(H.logger);const $=H.validateFormats;H.validateFormats=!1,this.RULES=(0,_.getRules)(),C.call(this,j,H,"NOT SUPPORTED"),C.call(this,x,H,"DEPRECATED","warn"),this._metaOpts=M.call(this),H.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),H.keywords&&D.call(this,H.keywords),typeof H.meta=="object"&&this.addMetaSchema(H.meta),A.call(this),H.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:H,meta:te,schemaId:z}=this.opts;let $=g;z==="id"&&($={...g},$.id=$.$id,delete $.$id),te&&H&&this.addMetaSchema($,$[z],!1)}defaultMeta(){const{meta:H,schemaId:te}=this.opts;return this.opts.defaultMeta=typeof H=="object"?H[te]||H:void 0}validate(H,te){let z;if(typeof H=="string"){if(z=this.getSchema(H),!z)throw new Error(`no schema with key or ref "${H}"`)}else z=this.compile(H);const $=z(te);return"$async"in z||(this.errors=z.errors),$}compile(H,te){const z=this._addSchema(H,te);return z.validate||this._compileSchemaEnv(z)}compileAsync(H,te){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:z}=this.opts;return $.call(this,H,te);async function $(ve,U){await F.call(this,ve.$schema);const W=this._addSchema(ve,U);return W.validate||ee.call(this,W)}async function F(ve){ve&&!this.getSchema(ve)&&await $.call(this,{$ref:ve},!0)}async function ee(ve){try{return this._compileSchemaEnv(ve)}catch(U){if(!(U instanceof y.default))throw U;return ge.call(this,U),await _e.call(this,U.missingSchema),ee.call(this,ve)}}function ge({missingSchema:ve,missingRef:U}){if(this.refs[ve])throw new Error(`AnySchema ${ve} is loaded but ${U} cannot be resolved`)}async function _e(ve){const U=await je.call(this,ve);this.refs[ve]||await F.call(this,U.$schema),this.refs[ve]||this.addSchema(U,ve,te)}async function je(ve){const U=this._loading[ve];if(U)return U;try{return await(this._loading[ve]=z(ve))}finally{delete this._loading[ve]}}}addSchema(H,te,z,$=this.opts.validateSchema){if(Array.isArray(H)){for(const ee of H)this.addSchema(ee,void 0,z,$);return this}let F;if(typeof H=="object"){const{schemaId:ee}=this.opts;if(F=H[ee],F!==void 0&&typeof F!="string")throw new Error(`schema ${ee} must be string`)}return te=(0,i.normalizeId)(te||F),this._checkUnique(te),this.schemas[te]=this._addSchema(H,z,te,$,!0),this}addMetaSchema(H,te,z=this.opts.validateSchema){return this.addSchema(H,te,!0,z),this}validateSchema(H,te){if(typeof H=="boolean")return!0;let z;if(z=H.$schema,z!==void 0&&typeof z!="string")throw new Error("$schema must be a string");if(z=z||this.opts.defaultMeta||this.defaultMeta(),!z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const $=this.validate(z,H);if(!$&&te){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return $}getSchema(H){let te;for(;typeof(te=R.call(this,H))=="string";)H=te;if(te===void 0){const{schemaId:z}=this.opts,$=new d.SchemaEnv({schema:{},schemaId:z});if(te=d.resolveSchema.call(this,$,H),!te)return;this.refs[H]=te}return te.validate||this._compileSchemaEnv(te)}removeSchema(H){if(H instanceof RegExp)return this._removeAllSchemas(this.schemas,H),this._removeAllSchemas(this.refs,H),this;switch(typeof H){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const te=R.call(this,H);return typeof te=="object"&&this._cache.delete(te.schema),delete this.schemas[H],delete this.refs[H],this}case"object":{const te=H;this._cache.delete(te);let z=H[this.opts.schemaId];return z&&(z=(0,i.normalizeId)(z),delete this.schemas[z],delete this.refs[z]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(H){for(const te of H)this.addKeyword(te);return this}addKeyword(H,te){let z;if(typeof H=="string")z=H,typeof te=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),te.keyword=z);else if(typeof H=="object"&&te===void 0){if(te=H,z=te.keyword,Array.isArray(z)&&!z.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,z,te),!te)return(0,m.eachItem)(z,F=>se.call(this,F)),this;he.call(this,te);const $={...te,type:(0,f.getJSONTypes)(te.type),schemaType:(0,f.getJSONTypes)(te.schemaType)};return(0,m.eachItem)(z,$.type.length===0?F=>se.call(this,F,$):F=>$.type.forEach(ee=>se.call(this,F,$,ee))),this}getKeyword(H){const te=this.RULES.all[H];return typeof te=="object"?te.definition:!!te}removeKeyword(H){const{RULES:te}=this;delete te.keywords[H],delete te.all[H];for(const z of te.rules){const $=z.rules.findIndex(F=>F.keyword===H);$>=0&&z.rules.splice($,1)}return this}addFormat(H,te){return typeof te=="string"&&(te=new RegExp(te)),this.formats[H]=te,this}errorsText(H=this.errors,{separator:te=", ",dataVar:z="data"}={}){return!H||H.length===0?"No errors":H.map($=>`${z}${$.instancePath} ${$.message}`).reduce(($,F)=>$+te+F)}$dataMetaSchema(H,te){const z=this.RULES.all;H=JSON.parse(JSON.stringify(H));for(const $ of te){const F=$.split("/").slice(1);let ee=H;for(const ge of F)ee=ee[ge];for(const ge in z){const _e=z[ge];if(typeof _e!="object")continue;const{$data:je}=_e.definition,ve=ee[ge];je&&ve&&(ee[ge]=be(ve))}}return H}_removeAllSchemas(H,te){for(const z in H){const $=H[z];(!te||te.test(z))&&(typeof $=="string"?delete H[z]:$&&!$.meta&&(this._cache.delete($.schema),delete H[z]))}}_addSchema(H,te,z,$=this.opts.validateSchema,F=this.opts.addUsedSchema){let ee;const{schemaId:ge}=this.opts;if(typeof H=="object")ee=H[ge];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof H!="boolean")throw new Error("schema must be object or boolean")}let _e=this._cache.get(H);if(_e!==void 0)return _e;z=(0,i.normalizeId)(ee||z);const je=i.getSchemaRefs.call(this,H,z);return _e=new d.SchemaEnv({schema:H,schemaId:ge,meta:te,baseId:z,localRefs:je}),this._cache.set(_e.schema,_e),F&&!z.startsWith("#")&&(z&&this._checkUnique(z),this.refs[z]=_e),$&&this.validateSchema(H,!0),_e}_checkUnique(H){if(this.schemas[H]||this.refs[H])throw new Error(`schema with key or id "${H}" already exists`)}_compileSchemaEnv(H){if(H.meta?this._compileMetaSchema(H):d.compileSchema.call(this,H),!H.validate)throw new Error("ajv implementation error");return H.validate}_compileMetaSchema(H){const te=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,H)}finally{this.opts=te}}}L.ValidationError=p.default,L.MissingRefError=y.default,o.default=L;function C(ie,H,te,z="error"){for(const $ in ie){const F=$;F in H&&this.logger[z](`${te}: option ${$}. ${ie[F]}`)}}function R(ie){return ie=(0,i.normalizeId)(ie),this.schemas[ie]||this.refs[ie]}function A(){const ie=this.opts.schemas;if(ie)if(Array.isArray(ie))this.addSchema(ie);else for(const H in ie)this.addSchema(ie[H],H)}function I(){for(const ie in this.opts.formats){const H=this.opts.formats[ie];H&&this.addFormat(ie,H)}}function D(ie){if(Array.isArray(ie)){this.addVocabulary(ie);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const H in ie){const te=ie[H];te.keyword||(te.keyword=H),this.addKeyword(te)}}function M(){const ie={...this.opts};for(const H of E)delete ie[H];return ie}const V={log(){},warn(){},error(){}};function G(ie){if(ie===!1)return V;if(ie===void 0)return console;if(ie.log&&ie.warn&&ie.error)return ie;throw new Error("logger must implement log, warn and error methods")}const J=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(ie,H){const{RULES:te}=this;if((0,m.eachItem)(ie,z=>{if(te.keywords[z])throw new Error(`Keyword ${z} is already defined`);if(!J.test(z))throw new Error(`Keyword ${z} has invalid name`)}),!!H&&H.$data&&!("code"in H||"validate"in H))throw new Error('$data keyword must have "code" or "validate" function')}function se(ie,H,te){var z;const $=H?.post;if(te&&$)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let ee=$?F.post:F.rules.find(({type:_e})=>_e===te);if(ee||(ee={type:te,rules:[]},F.rules.push(ee)),F.keywords[ie]=!0,!H)return;const ge={keyword:ie,definition:{...H,type:(0,f.getJSONTypes)(H.type),schemaType:(0,f.getJSONTypes)(H.schemaType)}};H.before?ue.call(this,ee,ge,H.before):ee.rules.push(ge),F.all[ie]=ge,(z=H.implements)===null||z===void 0||z.forEach(_e=>this.addKeyword(_e))}function ue(ie,H,te){const z=ie.rules.findIndex($=>$.keyword===te);z>=0?ie.rules.splice(z,0,H):(ie.rules.push(H),this.logger.warn(`rule ${te} is not defined`))}function he(ie){let{metaSchema:H}=ie;H!==void 0&&(ie.$data&&this.opts.$data&&(H=be(H)),ie.validateSchema=this.compile(H,!0))}const de={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function be(ie){return{anyOf:[ie,de]}}})(Ol)),Ol}var Ya={},Qa={},Xa={},Fd;function Gy(){if(Fd)return Xa;Fd=1,Object.defineProperty(Xa,"__esModule",{value:!0});const o={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Xa.default=o,Xa}var Tn={},Md;function Jy(){if(Md)return Tn;Md=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.callRef=Tn.getValidate=void 0;const o=Wa(),a=Sr(),h=rt(),p=Pn(),y=Al(),_=ut(),d={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:g,it:b}=f,{baseId:w,schemaEnv:E,validateName:O,opts:j,self:x}=b,{root:S}=E;if((g==="#"||g==="#/")&&w===S.baseId)return L();const P=y.resolveRef.call(x,S,w,g);if(P===void 0)throw new o.default(b.opts.uriResolver,w,g);if(P instanceof y.SchemaEnv)return C(P);return R(P);function L(){if(E===S)return i(f,O,E,E.$async);const A=m.scopeValue("root",{ref:S});return i(f,(0,h._)`${A}.validate`,S,S.$async)}function C(A){const I=v(f,A);i(f,I,A,A.$async)}function R(A){const I=m.scopeValue("schema",j.code.source===!0?{ref:A,code:(0,h.stringify)(A)}:{ref:A}),D=m.name("valid"),M=f.subschema({schema:A,dataTypes:[],schemaPath:h.nil,topSchemaRef:I,errSchemaPath:g},D);f.mergeEvaluated(M),f.ok(D)}}};function v(f,m){const{gen:g}=f;return m.validate?g.scopeValue("validate",{ref:m.validate}):(0,h._)`${g.scopeValue("wrapper",{ref:m})}.validate`}Tn.getValidate=v;function i(f,m,g,b){const{gen:w,it:E}=f,{allErrors:O,schemaEnv:j,opts:x}=E,S=x.passContext?p.default.this:h.nil;b?P():L();function P(){if(!j.$async)throw new Error("async schema referenced by sync schema");const A=w.let("valid");w.try(()=>{w.code((0,h._)`await ${(0,a.callValidateCode)(f,m,S)}`),R(m),O||w.assign(A,!0)},I=>{w.if((0,h._)`!(${I} instanceof ${E.ValidationError})`,()=>w.throw(I)),C(I),O||w.assign(A,!1)}),f.ok(A)}function L(){f.result((0,a.callValidateCode)(f,m,S),()=>R(m),()=>C(m))}function C(A){const I=(0,h._)`${A}.errors`;w.assign(p.default.vErrors,(0,h._)`${p.default.vErrors} === null ? ${I} : ${p.default.vErrors}.concat(${I})`),w.assign(p.default.errors,(0,h._)`${p.default.vErrors}.length`)}function R(A){var I;if(!E.opts.unevaluated)return;const D=(I=g?.validate)===null||I===void 0?void 0:I.evaluated;if(E.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(E.props=_.mergeEvaluated.props(w,D.props,E.props));else{const M=w.var("props",(0,h._)`${A}.evaluated.props`);E.props=_.mergeEvaluated.props(w,M,E.props,h.Name)}if(E.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(E.items=_.mergeEvaluated.items(w,D.items,E.items));else{const M=w.var("items",(0,h._)`${A}.evaluated.items`);E.items=_.mergeEvaluated.items(w,M,E.items,h.Name)}}}return Tn.callRef=i,Tn.default=d,Tn}var Vd;function Ky(){if(Vd)return Qa;Vd=1,Object.defineProperty(Qa,"__esModule",{value:!0});const o=Gy(),a=Jy(),h=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,a.default];return Qa.default=h,Qa}var es={},ts={},zd;function Wy(){if(zd)return ts;zd=1,Object.defineProperty(ts,"__esModule",{value:!0});const o=rt(),a=o.operators,h={maximum:{okStr:"<=",ok:a.LTE,fail:a.GT},minimum:{okStr:">=",ok:a.GTE,fail:a.LT},exclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},exclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}},p={message:({keyword:_,schemaCode:d})=>(0,o.str)`must be ${h[_].okStr} ${d}`,params:({keyword:_,schemaCode:d})=>(0,o._)`{comparison: ${h[_].okStr}, limit: ${d}}`},y={keyword:Object.keys(h),type:"number",schemaType:"number",$data:!0,error:p,code(_){const{keyword:d,data:v,schemaCode:i}=_;_.fail$data((0,o._)`${v} ${h[d].fail} ${i} || isNaN(${v})`)}};return ts.default=y,ts}var rs={},qd;function Zy(){if(qd)return rs;qd=1,Object.defineProperty(rs,"__esModule",{value:!0});const o=rt(),h={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:p})=>(0,o.str)`must be multiple of ${p}`,params:({schemaCode:p})=>(0,o._)`{multipleOf: ${p}}`},code(p){const{gen:y,data:_,schemaCode:d,it:v}=p,i=v.opts.multipleOfPrecision,f=y.let("res"),m=i?(0,o._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${i}`:(0,o._)`${f} !== parseInt(${f})`;p.fail$data((0,o._)`(${d} === 0 || (${f} = ${_}/${d}, ${m}))`)}};return rs.default=h,rs}var ns={},is={},Hd;function Yy(){if(Hd)return is;Hd=1,Object.defineProperty(is,"__esModule",{value:!0});function o(a){const h=a.length;let p=0,y=0,_;for(;y<h;)p++,_=a.charCodeAt(y++),_>=55296&&_<=56319&&y<h&&(_=a.charCodeAt(y),(_&64512)===56320&&y++);return p}return is.default=o,o.code='require("ajv/dist/runtime/ucs2length").default',is}var Ud;function Qy(){if(Ud)return ns;Ud=1,Object.defineProperty(ns,"__esModule",{value:!0});const o=rt(),a=ut(),h=Yy(),y={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:_,schemaCode:d}){const v=_==="maxLength"?"more":"fewer";return(0,o.str)`must NOT have ${v} than ${d} characters`},params:({schemaCode:_})=>(0,o._)`{limit: ${_}}`},code(_){const{keyword:d,data:v,schemaCode:i,it:f}=_,m=d==="maxLength"?o.operators.GT:o.operators.LT,g=f.opts.unicode===!1?(0,o._)`${v}.length`:(0,o._)`${(0,a.useFunc)(_.gen,h.default)}(${v})`;_.fail$data((0,o._)`${g} ${m} ${i}`)}};return ns.default=y,ns}var os={},Gd;function Xy(){if(Gd)return os;Gd=1,Object.defineProperty(os,"__esModule",{value:!0});const o=Sr(),a=rt(),p={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:y})=>(0,a.str)`must match pattern "${y}"`,params:({schemaCode:y})=>(0,a._)`{pattern: ${y}}`},code(y){const{data:_,$data:d,schema:v,schemaCode:i,it:f}=y,m=f.opts.unicodeRegExp?"u":"",g=d?(0,a._)`(new RegExp(${i}, ${m}))`:(0,o.usePattern)(y,v);y.fail$data((0,a._)`!${g}.test(${_})`)}};return os.default=p,os}var as={},Jd;function ev(){if(Jd)return as;Jd=1,Object.defineProperty(as,"__esModule",{value:!0});const o=rt(),h={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:p,schemaCode:y}){const _=p==="maxProperties"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} properties`},params:({schemaCode:p})=>(0,o._)`{limit: ${p}}`},code(p){const{keyword:y,data:_,schemaCode:d}=p,v=y==="maxProperties"?o.operators.GT:o.operators.LT;p.fail$data((0,o._)`Object.keys(${_}).length ${v} ${d}`)}};return as.default=h,as}var ss={},Kd;function tv(){if(Kd)return ss;Kd=1,Object.defineProperty(ss,"__esModule",{value:!0});const o=Sr(),a=rt(),h=ut(),y={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:_}})=>(0,a.str)`must have required property '${_}'`,params:({params:{missingProperty:_}})=>(0,a._)`{missingProperty: ${_}}`},code(_){const{gen:d,schema:v,schemaCode:i,data:f,$data:m,it:g}=_,{opts:b}=g;if(!m&&v.length===0)return;const w=v.length>=b.loopRequired;if(g.allErrors?E():O(),b.strictRequired){const S=_.parentSchema.properties,{definedProperties:P}=_.it;for(const L of v)if(S?.[L]===void 0&&!P.has(L)){const C=g.schemaEnv.baseId+g.errSchemaPath,R=`required property "${L}" is not defined at "${C}" (strictRequired)`;(0,h.checkStrictMode)(g,R,g.opts.strictRequired)}}function E(){if(w||m)_.block$data(a.nil,j);else for(const S of v)(0,o.checkReportMissingProp)(_,S)}function O(){const S=d.let("missing");if(w||m){const P=d.let("valid",!0);_.block$data(P,()=>x(S,P)),_.ok(P)}else d.if((0,o.checkMissingProp)(_,v,S)),(0,o.reportMissingProp)(_,S),d.else()}function j(){d.forOf("prop",i,S=>{_.setParams({missingProperty:S}),d.if((0,o.noPropertyInData)(d,f,S,b.ownProperties),()=>_.error())})}function x(S,P){_.setParams({missingProperty:S}),d.forOf(S,i,()=>{d.assign(P,(0,o.propertyInData)(d,f,S,b.ownProperties)),d.if((0,a.not)(P),()=>{_.error(),d.break()})},a.nil)}}};return ss.default=y,ss}var ls={},Wd;function rv(){if(Wd)return ls;Wd=1,Object.defineProperty(ls,"__esModule",{value:!0});const o=rt(),h={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:p,schemaCode:y}){const _=p==="maxItems"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} items`},params:({schemaCode:p})=>(0,o._)`{limit: ${p}}`},code(p){const{keyword:y,data:_,schemaCode:d}=p,v=y==="maxItems"?o.operators.GT:o.operators.LT;p.fail$data((0,o._)`${_}.length ${v} ${d}`)}};return ls.default=h,ls}var cs={},us={},Zd;function Il(){if(Zd)return us;Zd=1,Object.defineProperty(us,"__esModule",{value:!0});const o=xd();return o.code='require("ajv/dist/runtime/equal").default',us.default=o,us}var Yd;function nv(){if(Yd)return cs;Yd=1,Object.defineProperty(cs,"__esModule",{value:!0});const o=Ha(),a=rt(),h=ut(),p=Il(),_={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:v}})=>(0,a.str)`must NOT have duplicate items (items ## ${v} and ${d} are identical)`,params:({params:{i:d,j:v}})=>(0,a._)`{i: ${d}, j: ${v}}`},code(d){const{gen:v,data:i,$data:f,schema:m,parentSchema:g,schemaCode:b,it:w}=d;if(!f&&!m)return;const E=v.let("valid"),O=g.items?(0,o.getSchemaTypes)(g.items):[];d.block$data(E,j,(0,a._)`${b} === false`),d.ok(E);function j(){const L=v.let("i",(0,a._)`${i}.length`),C=v.let("j");d.setParams({i:L,j:C}),v.assign(E,!0),v.if((0,a._)`${L} > 1`,()=>(x()?S:P)(L,C))}function x(){return O.length>0&&!O.some(L=>L==="object"||L==="array")}function S(L,C){const R=v.name("item"),A=(0,o.checkDataTypes)(O,R,w.opts.strictNumbers,o.DataType.Wrong),I=v.const("indices",(0,a._)`{}`);v.for((0,a._)`;${L}--;`,()=>{v.let(R,(0,a._)`${i}[${L}]`),v.if(A,(0,a._)`continue`),O.length>1&&v.if((0,a._)`typeof ${R} == "string"`,(0,a._)`${R} += "_"`),v.if((0,a._)`typeof ${I}[${R}] == "number"`,()=>{v.assign(C,(0,a._)`${I}[${R}]`),d.error(),v.assign(E,!1).break()}).code((0,a._)`${I}[${R}] = ${L}`)})}function P(L,C){const R=(0,h.useFunc)(v,p.default),A=v.name("outer");v.label(A).for((0,a._)`;${L}--;`,()=>v.for((0,a._)`${C} = ${L}; ${C}--;`,()=>v.if((0,a._)`${R}(${i}[${L}], ${i}[${C}])`,()=>{d.error(),v.assign(E,!1).break(A)})))}}};return cs.default=_,cs}var ds={},Qd;function iv(){if(Qd)return ds;Qd=1,Object.defineProperty(ds,"__esModule",{value:!0});const o=rt(),a=ut(),h=Il(),y={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:_})=>(0,o._)`{allowedValue: ${_}}`},code(_){const{gen:d,data:v,$data:i,schemaCode:f,schema:m}=_;i||m&&typeof m=="object"?_.fail$data((0,o._)`!${(0,a.useFunc)(d,h.default)}(${v}, ${f})`):_.fail((0,o._)`${m} !== ${v}`)}};return ds.default=y,ds}var hs={},Xd;function ov(){if(Xd)return hs;Xd=1,Object.defineProperty(hs,"__esModule",{value:!0});const o=rt(),a=ut(),h=Il(),y={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:_})=>(0,o._)`{allowedValues: ${_}}`},code(_){const{gen:d,data:v,$data:i,schema:f,schemaCode:m,it:g}=_;if(!i&&f.length===0)throw new Error("enum must have non-empty array");const b=f.length>=g.opts.loopEnum;let w;const E=()=>w??(w=(0,a.useFunc)(d,h.default));let O;if(b||i)O=d.let("valid"),_.block$data(O,j);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const S=d.const("vSchema",m);O=(0,o.or)(...f.map((P,L)=>x(S,L)))}_.pass(O);function j(){d.assign(O,!1),d.forOf("v",m,S=>d.if((0,o._)`${E()}(${v}, ${S})`,()=>d.assign(O,!0).break()))}function x(S,P){const L=f[P];return typeof L=="object"&&L!==null?(0,o._)`${E()}(${v}, ${S}[${P}])`:(0,o._)`${v} === ${L}`}}};return hs.default=y,hs}var eh;function av(){if(eh)return es;eh=1,Object.defineProperty(es,"__esModule",{value:!0});const o=Wy(),a=Zy(),h=Qy(),p=Xy(),y=ev(),_=tv(),d=rv(),v=nv(),i=iv(),f=ov(),m=[o.default,a.default,h.default,p.default,y.default,_.default,d.default,v.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},i.default,f.default];return es.default=m,es}var fs={},Gi={},th;function rh(){if(th)return Gi;th=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.validateAdditionalItems=void 0;const o=rt(),a=ut(),p={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:_}})=>(0,o.str)`must NOT have more than ${_} items`,params:({params:{len:_}})=>(0,o._)`{limit: ${_}}`},code(_){const{parentSchema:d,it:v}=_,{items:i}=d;if(!Array.isArray(i)){(0,a.checkStrictMode)(v,'"additionalItems" is ignored when "items" is not an array of schemas');return}y(_,i)}};function y(_,d){const{gen:v,schema:i,data:f,keyword:m,it:g}=_;g.items=!0;const b=v.const("len",(0,o._)`${f}.length`);if(i===!1)_.setParams({len:d.length}),_.pass((0,o._)`${b} <= ${d.length}`);else if(typeof i=="object"&&!(0,a.alwaysValidSchema)(g,i)){const E=v.var("valid",(0,o._)`${b} <= ${d.length}`);v.if((0,o.not)(E),()=>w(E)),_.ok(E)}function w(E){v.forRange("i",d.length,b,O=>{_.subschema({keyword:m,dataProp:O,dataPropType:a.Type.Num},E),g.allErrors||v.if((0,o.not)(E),()=>v.break())})}}return Gi.validateAdditionalItems=y,Gi.default=p,Gi}var ps={},Ji={},nh;function ih(){if(nh)return Ji;nh=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.validateTuple=void 0;const o=rt(),a=ut(),h=Sr(),p={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(_){const{schema:d,it:v}=_;if(Array.isArray(d))return y(_,"additionalItems",d);v.items=!0,!(0,a.alwaysValidSchema)(v,d)&&_.ok((0,h.validateArray)(_))}};function y(_,d,v=_.schema){const{gen:i,parentSchema:f,data:m,keyword:g,it:b}=_;O(f),b.opts.unevaluated&&v.length&&b.items!==!0&&(b.items=a.mergeEvaluated.items(i,v.length,b.items));const w=i.name("valid"),E=i.const("len",(0,o._)`${m}.length`);v.forEach((j,x)=>{(0,a.alwaysValidSchema)(b,j)||(i.if((0,o._)`${E} > ${x}`,()=>_.subschema({keyword:g,schemaProp:x,dataProp:x},w)),_.ok(w))});function O(j){const{opts:x,errSchemaPath:S}=b,P=v.length,L=P===j.minItems&&(P===j.maxItems||j[d]===!1);if(x.strictTuples&&!L){const C=`"${g}" is ${P}-tuple, but minItems or maxItems/${d} are not specified or different at path "${S}"`;(0,a.checkStrictMode)(b,C,x.strictTuples)}}}return Ji.validateTuple=y,Ji.default=p,Ji}var oh;function sv(){if(oh)return ps;oh=1,Object.defineProperty(ps,"__esModule",{value:!0});const o=ih(),a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:h=>(0,o.validateTuple)(h,"items")};return ps.default=a,ps}var ms={},ah;function lv(){if(ah)return ms;ah=1,Object.defineProperty(ms,"__esModule",{value:!0});const o=rt(),a=ut(),h=Sr(),p=rh(),_={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,o.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,o._)`{limit: ${d}}`},code(d){const{schema:v,parentSchema:i,it:f}=d,{prefixItems:m}=i;f.items=!0,!(0,a.alwaysValidSchema)(f,v)&&(m?(0,p.validateAdditionalItems)(d,m):d.ok((0,h.validateArray)(d)))}};return ms.default=_,ms}var ys={},sh;function cv(){if(sh)return ys;sh=1,Object.defineProperty(ys,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:y,max:_}})=>_===void 0?(0,o.str)`must contain at least ${y} valid item(s)`:(0,o.str)`must contain at least ${y} and no more than ${_} valid item(s)`,params:({params:{min:y,max:_}})=>_===void 0?(0,o._)`{minContains: ${y}}`:(0,o._)`{minContains: ${y}, maxContains: ${_}}`},code(y){const{gen:_,schema:d,parentSchema:v,data:i,it:f}=y;let m,g;const{minContains:b,maxContains:w}=v;f.opts.next?(m=b===void 0?1:b,g=w):m=1;const E=_.const("len",(0,o._)`${i}.length`);if(y.setParams({min:m,max:g}),g===void 0&&m===0){(0,a.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&m>g){(0,a.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),y.fail();return}if((0,a.alwaysValidSchema)(f,d)){let P=(0,o._)`${E} >= ${m}`;g!==void 0&&(P=(0,o._)`${P} && ${E} <= ${g}`),y.pass(P);return}f.items=!0;const O=_.name("valid");g===void 0&&m===1?x(O,()=>_.if(O,()=>_.break())):m===0?(_.let(O,!0),g!==void 0&&_.if((0,o._)`${i}.length > 0`,j)):(_.let(O,!1),j()),y.result(O,()=>y.reset());function j(){const P=_.name("_valid"),L=_.let("count",0);x(P,()=>_.if(P,()=>S(L)))}function x(P,L){_.forRange("i",0,E,C=>{y.subschema({keyword:"contains",dataProp:C,dataPropType:a.Type.Num,compositeRule:!0},P),L()})}function S(P){_.code((0,o._)`${P}++`),g===void 0?_.if((0,o._)`${P} >= ${m}`,()=>_.assign(O,!0).break()):(_.if((0,o._)`${P} > ${g}`,()=>_.assign(O,!1).break()),m===1?_.assign(O,!0):_.if((0,o._)`${P} >= ${m}`,()=>_.assign(O,!0)))}}};return ys.default=p,ys}var Dl={},lh;function uv(){return lh||(lh=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.validateSchemaDeps=o.validatePropertyDeps=o.error=void 0;const a=rt(),h=ut(),p=Sr();o.error={message:({params:{property:i,depsCount:f,deps:m}})=>{const g=f===1?"property":"properties";return(0,a.str)`must have ${g} ${m} when property ${i} is present`},params:({params:{property:i,depsCount:f,deps:m,missingProperty:g}})=>(0,a._)`{property: ${i},
10
+ || ${I} === "boolean" || ${R} === null`).assign(D,(0,p._)`[${R}]`)}}}function b({gen:S,parentData:P,parentDataProperty:L},C){S.if((0,p._)`${P} !== undefined`,()=>S.assign((0,p._)`${P}[${L}]`,C))}function w(S,P,L,C=_.Correct){const R=C===_.Correct?p.operators.EQ:p.operators.NEQ;let A;switch(S){case"null":return(0,p._)`${P} ${R} null`;case"array":A=(0,p._)`Array.isArray(${P})`;break;case"object":A=(0,p._)`${P} && typeof ${P} == "object" && !Array.isArray(${P})`;break;case"integer":A=I((0,p._)`!(${P} % 1) && !isNaN(${P})`);break;case"number":A=I();break;default:return(0,p._)`typeof ${P} ${R} ${S}`}return C===_.Correct?A:(0,p.not)(A);function I(D=p.nil){return(0,p.and)((0,p._)`typeof ${P} == "number"`,D,L?(0,p._)`isFinite(${P})`:p.nil)}}Ut.checkDataType=w;function E(S,P,L,C){if(S.length===1)return w(S[0],P,L,C);let R;const A=(0,y.toHash)(S);if(A.array&&A.object){const I=(0,p._)`typeof ${P} != "object"`;R=A.null?I:(0,p._)`!${P} || ${I}`,delete A.null,delete A.array,delete A.object}else R=p.nil;A.number&&delete A.integer;for(const I in A)R=(0,p.and)(R,w(I,P,L,C));return R}Ut.checkDataTypes=E;const O={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:P})=>typeof S=="string"?(0,p._)`{type: ${S}}`:(0,p._)`{type: ${P}}`};function j(S){const P=x(S);(0,h.reportError)(P,O)}Ut.reportTypeError=j;function x(S){const{gen:P,data:L,schema:C}=S,R=(0,y.schemaRefOrVal)(S,C,"type");return{gen:P,keyword:"type",data:L,schema:C.type,schemaCode:R,schemaValue:R,parentSchema:C,params:{},it:S}}return Ut}var Qo={},wd;function Dy(){if(wd)return Qo;wd=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.assignDefaults=void 0;const o=rt(),a=ut();function h(y,_){const{properties:d,items:v}=y.schema;if(_==="object"&&d)for(const i in d)p(y,i,d[i].default);else _==="array"&&Array.isArray(v)&&v.forEach((i,f)=>p(y,f,i.default))}Qo.assignDefaults=h;function p(y,_,d){const{gen:v,compositeRule:i,data:f,opts:m}=y;if(d===void 0)return;const g=(0,o._)`${f}${(0,o.getProperty)(_)}`;if(i){(0,a.checkStrictMode)(y,`default is ignored for: ${g}`);return}let b=(0,o._)`${g} === undefined`;m.useDefaults==="empty"&&(b=(0,o._)`${b} || ${g} === null || ${g} === ""`),v.if(b,(0,o._)`${g} = ${(0,o.stringify)(d)}`)}return Qo}var xr={},ft={},kd;function Sr(){if(kd)return ft;kd=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateUnion=ft.validateArray=ft.usePattern=ft.callValidateCode=ft.schemaProperties=ft.allSchemaProperties=ft.noPropertyInData=ft.propertyInData=ft.isOwnProperty=ft.hasPropFunc=ft.reportMissingProp=ft.checkMissingProp=ft.checkReportMissingProp=void 0;const o=rt(),a=ut(),h=Pn(),p=ut();function y(S,P){const{gen:L,data:C,it:R}=S;L.if(m(L,C,P,R.opts.ownProperties),()=>{S.setParams({missingProperty:(0,o._)`${P}`},!0),S.error()})}ft.checkReportMissingProp=y;function _({gen:S,data:P,it:{opts:L}},C,R){return(0,o.or)(...C.map(A=>(0,o.and)(m(S,P,A,L.ownProperties),(0,o._)`${R} = ${A}`)))}ft.checkMissingProp=_;function d(S,P){S.setParams({missingProperty:P},!0),S.error()}ft.reportMissingProp=d;function v(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,o._)`Object.prototype.hasOwnProperty`})}ft.hasPropFunc=v;function i(S,P,L){return(0,o._)`${v(S)}.call(${P}, ${L})`}ft.isOwnProperty=i;function f(S,P,L,C){const R=(0,o._)`${P}${(0,o.getProperty)(L)} !== undefined`;return C?(0,o._)`${R} && ${i(S,P,L)}`:R}ft.propertyInData=f;function m(S,P,L,C){const R=(0,o._)`${P}${(0,o.getProperty)(L)} === undefined`;return C?(0,o.or)(R,(0,o.not)(i(S,P,L))):R}ft.noPropertyInData=m;function g(S){return S?Object.keys(S).filter(P=>P!=="__proto__"):[]}ft.allSchemaProperties=g;function b(S,P){return g(P).filter(L=>!(0,a.alwaysValidSchema)(S,P[L]))}ft.schemaProperties=b;function w({schemaCode:S,data:P,it:{gen:L,topSchemaRef:C,schemaPath:R,errorPath:A},it:I},D,M,V){const G=V?(0,o._)`${S}, ${P}, ${C}${R}`:P,J=[[h.default.instancePath,(0,o.strConcat)(h.default.instancePath,A)],[h.default.parentData,I.parentData],[h.default.parentDataProperty,I.parentDataProperty],[h.default.rootData,h.default.rootData]];I.opts.dynamicRef&&J.push([h.default.dynamicAnchors,h.default.dynamicAnchors]);const Y=(0,o._)`${G}, ${L.object(...J)}`;return M!==o.nil?(0,o._)`${D}.call(${M}, ${Y})`:(0,o._)`${D}(${Y})`}ft.callValidateCode=w;const E=(0,o._)`new RegExp`;function O({gen:S,it:{opts:P}},L){const C=P.unicodeRegExp?"u":"",{regExp:R}=P.code,A=R(L,C);return S.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,o._)`${R.code==="new RegExp"?E:(0,p.useFunc)(S,R)}(${L}, ${C})`})}ft.usePattern=O;function j(S){const{gen:P,data:L,keyword:C,it:R}=S,A=P.name("valid");if(R.allErrors){const D=P.let("valid",!0);return I(()=>P.assign(D,!1)),D}return P.var(A,!0),I(()=>P.break()),A;function I(D){const M=P.const("len",(0,o._)`${L}.length`);P.forRange("i",0,M,V=>{S.subschema({keyword:C,dataProp:V,dataPropType:a.Type.Num},A),P.if((0,o.not)(A),D)})}}ft.validateArray=j;function x(S){const{gen:P,schema:L,keyword:C,it:R}=S;if(!Array.isArray(L))throw new Error("ajv implementation error");if(L.some(M=>(0,a.alwaysValidSchema)(R,M))&&!R.opts.unevaluated)return;const I=P.let("valid",!1),D=P.name("_valid");P.block(()=>L.forEach((M,V)=>{const G=S.subschema({keyword:C,schemaProp:V,compositeRule:!0},D);P.assign(I,(0,o._)`${I} || ${D}`),S.mergeValidEvaluated(G,D)||P.if((0,o.not)(I))})),S.result(I,()=>S.reset(),()=>S.error(!0))}return ft.validateUnion=x,ft}var jd;function By(){if(jd)return xr;jd=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.validateKeywordUsage=xr.validSchemaType=xr.funcKeywordCode=xr.macroKeywordCode=void 0;const o=rt(),a=Pn(),h=Sr(),p=Ha();function y(b,w){const{gen:E,keyword:O,schema:j,parentSchema:x,it:S}=b,P=w.macro.call(S.self,j,x,S),L=f(E,O,P);S.opts.validateSchema!==!1&&S.self.validateSchema(P,!0);const C=E.name("valid");b.subschema({schema:P,schemaPath:o.nil,errSchemaPath:`${S.errSchemaPath}/${O}`,topSchemaRef:L,compositeRule:!0},C),b.pass(C,()=>b.error(!0))}xr.macroKeywordCode=y;function _(b,w){var E;const{gen:O,keyword:j,schema:x,parentSchema:S,$data:P,it:L}=b;i(L,w);const C=!P&&w.compile?w.compile.call(L.self,x,S,L):w.validate,R=f(O,j,C),A=O.let("valid");b.block$data(A,I),b.ok((E=w.valid)!==null&&E!==void 0?E:A);function I(){if(w.errors===!1)V(),w.modifying&&d(b),G(()=>b.error());else{const J=w.async?D():M();w.modifying&&d(b),G(()=>v(b,J))}}function D(){const J=O.let("ruleErrs",null);return O.try(()=>V((0,o._)`await `),Y=>O.assign(A,!1).if((0,o._)`${Y} instanceof ${L.ValidationError}`,()=>O.assign(J,(0,o._)`${Y}.errors`),()=>O.throw(Y))),J}function M(){const J=(0,o._)`${R}.errors`;return O.assign(J,null),V(o.nil),J}function V(J=w.async?(0,o._)`await `:o.nil){const Y=L.opts.passContext?a.default.this:a.default.self,se=!("compile"in w&&!P||w.schema===!1);O.assign(A,(0,o._)`${J}${(0,h.callValidateCode)(b,R,Y,se)}`,w.modifying)}function G(J){var Y;O.if((0,o.not)((Y=w.valid)!==null&&Y!==void 0?Y:A),J)}}xr.funcKeywordCode=_;function d(b){const{gen:w,data:E,it:O}=b;w.if(O.parentData,()=>w.assign(E,(0,o._)`${O.parentData}[${O.parentDataProperty}]`))}function v(b,w){const{gen:E}=b;E.if((0,o._)`Array.isArray(${w})`,()=>{E.assign(a.default.vErrors,(0,o._)`${a.default.vErrors} === null ? ${w} : ${a.default.vErrors}.concat(${w})`).assign(a.default.errors,(0,o._)`${a.default.vErrors}.length`),(0,p.extendErrors)(b)},()=>b.error())}function i({schemaEnv:b},w){if(w.async&&!b.$async)throw new Error("async keyword in sync schema")}function f(b,w,E){if(E===void 0)throw new Error(`keyword "${w}" failed to compile`);return b.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,o.stringify)(E)})}function m(b,w,E=!1){return!w.length||w.some(O=>O==="array"?Array.isArray(b):O==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==O||E&&typeof b>"u")}xr.validSchemaType=m;function g({schema:b,opts:w,self:E,errSchemaPath:O},j,x){if(Array.isArray(j.keyword)?!j.keyword.includes(x):j.keyword!==x)throw new Error("ajv implementation error");const S=j.dependencies;if(S?.some(P=>!Object.prototype.hasOwnProperty.call(b,P)))throw new Error(`parent schema must have dependencies of ${x}: ${S.join(",")}`);if(j.validateSchema&&!j.validateSchema(b[x])){const L=`keyword "${x}" value is invalid at path "${O}": `+E.errorsText(j.validateSchema.errors);if(w.validateSchema==="log")E.logger.error(L);else throw new Error(L)}}return xr.validateKeywordUsage=g,xr}var dn={},Ed;function Fy(){if(Ed)return dn;Ed=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.extendSubschemaMode=dn.extendSubschemaData=dn.getSubschema=void 0;const o=rt(),a=ut();function h(_,{keyword:d,schemaProp:v,schema:i,schemaPath:f,errSchemaPath:m,topSchemaRef:g}){if(d!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const b=_.schema[d];return v===void 0?{schema:b,schemaPath:(0,o._)`${_.schemaPath}${(0,o.getProperty)(d)}`,errSchemaPath:`${_.errSchemaPath}/${d}`}:{schema:b[v],schemaPath:(0,o._)`${_.schemaPath}${(0,o.getProperty)(d)}${(0,o.getProperty)(v)}`,errSchemaPath:`${_.errSchemaPath}/${d}/${(0,a.escapeFragment)(v)}`}}if(i!==void 0){if(f===void 0||m===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:f,topSchemaRef:g,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}dn.getSubschema=h;function p(_,d,{dataProp:v,dataPropType:i,data:f,dataTypes:m,propertyName:g}){if(f!==void 0&&v!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:b}=d;if(v!==void 0){const{errorPath:E,dataPathArr:O,opts:j}=d,x=b.let("data",(0,o._)`${d.data}${(0,o.getProperty)(v)}`,!0);w(x),_.errorPath=(0,o.str)`${E}${(0,a.getErrorPath)(v,i,j.jsPropertySyntax)}`,_.parentDataProperty=(0,o._)`${v}`,_.dataPathArr=[...O,_.parentDataProperty]}if(f!==void 0){const E=f instanceof o.Name?f:b.let("data",f,!0);w(E),g!==void 0&&(_.propertyName=g)}m&&(_.dataTypes=m);function w(E){_.data=E,_.dataLevel=d.dataLevel+1,_.dataTypes=[],d.definedProperties=new Set,_.parentData=d.data,_.dataNames=[...d.dataNames,E]}}dn.extendSubschemaData=p;function y(_,{jtdDiscriminator:d,jtdMetadata:v,compositeRule:i,createErrors:f,allErrors:m}){i!==void 0&&(_.compositeRule=i),f!==void 0&&(_.createErrors=f),m!==void 0&&(_.allErrors=m),_.jtdDiscriminator=d,_.jtdMetadata=v}return dn.extendSubschemaMode=y,dn}var tr={},Tl,Od;function xd(){return Od||(Od=1,Tl=function o(a,h){if(a===h)return!0;if(a&&h&&typeof a=="object"&&typeof h=="object"){if(a.constructor!==h.constructor)return!1;var p,y,_;if(Array.isArray(a)){if(p=a.length,p!=h.length)return!1;for(y=p;y--!==0;)if(!o(a[y],h[y]))return!1;return!0}if(a.constructor===RegExp)return a.source===h.source&&a.flags===h.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===h.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===h.toString();if(_=Object.keys(a),p=_.length,p!==Object.keys(h).length)return!1;for(y=p;y--!==0;)if(!Object.prototype.hasOwnProperty.call(h,_[y]))return!1;for(y=p;y--!==0;){var d=_[y];if(!o(a[d],h[d]))return!1}return!0}return a!==a&&h!==h}),Tl}var Rl={exports:{}},Sd;function My(){if(Sd)return Rl.exports;Sd=1;var o=Rl.exports=function(p,y,_){typeof y=="function"&&(_=y,y={}),_=y.cb||_;var d=typeof _=="function"?_:_.pre||function(){},v=_.post||function(){};a(y,d,v,p,"",p)};o.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},o.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},o.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},o.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function a(p,y,_,d,v,i,f,m,g,b){if(d&&typeof d=="object"&&!Array.isArray(d)){y(d,v,i,f,m,g,b);for(var w in d){var E=d[w];if(Array.isArray(E)){if(w in o.arrayKeywords)for(var O=0;O<E.length;O++)a(p,y,_,E[O],v+"/"+w+"/"+O,i,v,w,d,O)}else if(w in o.propsKeywords){if(E&&typeof E=="object")for(var j in E)a(p,y,_,E[j],v+"/"+w+"/"+h(j),i,v,w,d,j)}else(w in o.keywords||p.allKeys&&!(w in o.skipKeywords))&&a(p,y,_,E,v+"/"+w,i,v,w,d)}_(d,v,i,f,m,g,b)}}function h(p){return p.replace(/~/g,"~0").replace(/\//g,"~1")}return Rl.exports}var Cd;function Ga(){if(Cd)return tr;Cd=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.getSchemaRefs=tr.resolveUrl=tr.normalizeId=tr._getFullPath=tr.getFullPath=tr.inlineRef=void 0;const o=ut(),a=xd(),h=My(),p=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function y(O,j=!0){return typeof O=="boolean"?!0:j===!0?!d(O):j?v(O)<=j:!1}tr.inlineRef=y;const _=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(O){for(const j in O){if(_.has(j))return!0;const x=O[j];if(Array.isArray(x)&&x.some(d)||typeof x=="object"&&d(x))return!0}return!1}function v(O){let j=0;for(const x in O){if(x==="$ref")return 1/0;if(j++,!p.has(x)&&(typeof O[x]=="object"&&(0,o.eachItem)(O[x],S=>j+=v(S)),j===1/0))return 1/0}return j}function i(O,j="",x){x!==!1&&(j=g(j));const S=O.parse(j);return f(O,S)}tr.getFullPath=i;function f(O,j){return O.serialize(j).split("#")[0]+"#"}tr._getFullPath=f;const m=/#\/?$/;function g(O){return O?O.replace(m,""):""}tr.normalizeId=g;function b(O,j,x){return x=g(x),O.resolve(j,x)}tr.resolveUrl=b;const w=/^[a-z_][-a-z0-9._]*$/i;function E(O,j){if(typeof O=="boolean")return{};const{schemaId:x,uriResolver:S}=this.opts,P=g(O[x]||j),L={"":P},C=i(S,P,!1),R={},A=new Set;return h(O,{allKeys:!0},(M,V,G,J)=>{if(J===void 0)return;const Y=C+V;let se=L[J];typeof M[x]=="string"&&(se=ue.call(this,M[x])),he.call(this,M.$anchor),he.call(this,M.$dynamicAnchor),L[V]=se;function ue(de){const be=this.opts.uriResolver.resolve;if(de=g(se?be(se,de):de),A.has(de))throw D(de);A.add(de);let ie=this.refs[de];return typeof ie=="string"&&(ie=this.refs[ie]),typeof ie=="object"?I(M,ie.schema,de):de!==g(Y)&&(de[0]==="#"?(I(M,R[de],de),R[de]=M):this.refs[de]=Y),de}function he(de){if(typeof de=="string"){if(!w.test(de))throw new Error(`invalid anchor "${de}"`);ue.call(this,`#${de}`)}}}),R;function I(M,V,G){if(V!==void 0&&!a(M,V))throw D(G)}function D(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return tr.getSchemaRefs=E,tr}var Pd;function Ja(){if(Pd)return cn;Pd=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;const o=Iy(),a=Ua(),h=gd(),p=Ua(),y=Dy(),_=By(),d=Fy(),v=rt(),i=Pn(),f=Ga(),m=ut(),g=Ha();function b(U){if(C(U)&&(A(U),L(U))){j(U);return}w(U,()=>(0,o.topBoolOrEmptySchema)(U))}cn.validateFunctionCode=b;function w({gen:U,validateName:W,schema:ne,schemaEnv:ce,opts:pe},Oe){pe.code.es5?U.func(W,(0,v._)`${i.default.data}, ${i.default.valCxt}`,ce.$async,()=>{U.code((0,v._)`"use strict"; ${S(ne,pe)}`),O(U,pe),U.code(Oe)}):U.func(W,(0,v._)`${i.default.data}, ${E(pe)}`,ce.$async,()=>U.code(S(ne,pe)).code(Oe))}function E(U){return(0,v._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${U.dynamicRef?(0,v._)`, ${i.default.dynamicAnchors}={}`:v.nil}}={}`}function O(U,W){U.if(i.default.valCxt,()=>{U.var(i.default.instancePath,(0,v._)`${i.default.valCxt}.${i.default.instancePath}`),U.var(i.default.parentData,(0,v._)`${i.default.valCxt}.${i.default.parentData}`),U.var(i.default.parentDataProperty,(0,v._)`${i.default.valCxt}.${i.default.parentDataProperty}`),U.var(i.default.rootData,(0,v._)`${i.default.valCxt}.${i.default.rootData}`),W.dynamicRef&&U.var(i.default.dynamicAnchors,(0,v._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{U.var(i.default.instancePath,(0,v._)`""`),U.var(i.default.parentData,(0,v._)`undefined`),U.var(i.default.parentDataProperty,(0,v._)`undefined`),U.var(i.default.rootData,i.default.data),W.dynamicRef&&U.var(i.default.dynamicAnchors,(0,v._)`{}`)})}function j(U){const{schema:W,opts:ne,gen:ce}=U;w(U,()=>{ne.$comment&&W.$comment&&J(U),M(U),ce.let(i.default.vErrors,null),ce.let(i.default.errors,0),ne.unevaluated&&x(U),I(U),Y(U)})}function x(U){const{gen:W,validateName:ne}=U;U.evaluated=W.const("evaluated",(0,v._)`${ne}.evaluated`),W.if((0,v._)`${U.evaluated}.dynamicProps`,()=>W.assign((0,v._)`${U.evaluated}.props`,(0,v._)`undefined`)),W.if((0,v._)`${U.evaluated}.dynamicItems`,()=>W.assign((0,v._)`${U.evaluated}.items`,(0,v._)`undefined`))}function S(U,W){const ne=typeof U=="object"&&U[W.schemaId];return ne&&(W.code.source||W.code.process)?(0,v._)`/*# sourceURL=${ne} */`:v.nil}function P(U,W){if(C(U)&&(A(U),L(U))){R(U,W);return}(0,o.boolOrEmptySchema)(U,W)}function L({schema:U,self:W}){if(typeof U=="boolean")return!U;for(const ne in U)if(W.RULES.all[ne])return!0;return!1}function C(U){return typeof U.schema!="boolean"}function R(U,W){const{schema:ne,gen:ce,opts:pe}=U;pe.$comment&&ne.$comment&&J(U),V(U),G(U);const Oe=ce.const("_errs",i.default.errors);I(U,Oe),ce.var(W,(0,v._)`${Oe} === ${i.default.errors}`)}function A(U){(0,m.checkUnknownRules)(U),D(U)}function I(U,W){if(U.opts.jtd)return ue(U,[],!1,W);const ne=(0,a.getSchemaTypes)(U.schema),ce=(0,a.coerceAndCheckDataType)(U,ne);ue(U,ne,!ce,W)}function D(U){const{schema:W,errSchemaPath:ne,opts:ce,self:pe}=U;W.$ref&&ce.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(W,pe.RULES)&&pe.logger.warn(`$ref: keywords ignored in schema at path "${ne}"`)}function M(U){const{schema:W,opts:ne}=U;W.default!==void 0&&ne.useDefaults&&ne.strictSchema&&(0,m.checkStrictMode)(U,"default is ignored in the schema root")}function V(U){const W=U.schema[U.opts.schemaId];W&&(U.baseId=(0,f.resolveUrl)(U.opts.uriResolver,U.baseId,W))}function G(U){if(U.schema.$async&&!U.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:U,schemaEnv:W,schema:ne,errSchemaPath:ce,opts:pe}){const Oe=ne.$comment;if(pe.$comment===!0)U.code((0,v._)`${i.default.self}.logger.log(${Oe})`);else if(typeof pe.$comment=="function"){const $e=(0,v.str)`${ce}/$comment`,Fe=U.scopeValue("root",{ref:W.root});U.code((0,v._)`${i.default.self}.opts.$comment(${Oe}, ${$e}, ${Fe}.schema)`)}}function Y(U){const{gen:W,schemaEnv:ne,validateName:ce,ValidationError:pe,opts:Oe}=U;ne.$async?W.if((0,v._)`${i.default.errors} === 0`,()=>W.return(i.default.data),()=>W.throw((0,v._)`new ${pe}(${i.default.vErrors})`)):(W.assign((0,v._)`${ce}.errors`,i.default.vErrors),Oe.unevaluated&&se(U),W.return((0,v._)`${i.default.errors} === 0`))}function se({gen:U,evaluated:W,props:ne,items:ce}){ne instanceof v.Name&&U.assign((0,v._)`${W}.props`,ne),ce instanceof v.Name&&U.assign((0,v._)`${W}.items`,ce)}function ue(U,W,ne,ce){const{gen:pe,schema:Oe,data:$e,allErrors:Fe,opts:Ze,self:Ye}=U,{RULES:Ae}=Ye;if(Oe.$ref&&(Ze.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,Ae))){pe.block(()=>ge(U,"$ref",Ae.all.$ref.definition));return}Ze.jtd||de(U,W),pe.block(()=>{for(const De of Ae.rules)Qe(De);Qe(Ae.post)});function Qe(De){(0,h.shouldUseGroup)(Oe,De)&&(De.type?(pe.if((0,p.checkDataType)(De.type,$e,Ze.strictNumbers)),he(U,De),W.length===1&&W[0]===De.type&&ne&&(pe.else(),(0,p.reportTypeError)(U)),pe.endIf()):he(U,De),Fe||pe.if((0,v._)`${i.default.errors} === ${ce||0}`))}}function he(U,W){const{gen:ne,schema:ce,opts:{useDefaults:pe}}=U;pe&&(0,y.assignDefaults)(U,W.type),ne.block(()=>{for(const Oe of W.rules)(0,h.shouldUseRule)(ce,Oe)&&ge(U,Oe.keyword,Oe.definition,W.type)})}function de(U,W){U.schemaEnv.meta||!U.opts.strictTypes||(be(U,W),U.opts.allowUnionTypes||ie(U,W),H(U,U.dataTypes))}function be(U,W){if(W.length){if(!U.dataTypes.length){U.dataTypes=W;return}W.forEach(ne=>{z(U.dataTypes,ne)||F(U,`type "${ne}" not allowed by context "${U.dataTypes.join(",")}"`)}),$(U,W)}}function ie(U,W){W.length>1&&!(W.length===2&&W.includes("null"))&&F(U,"use allowUnionTypes to allow union type keyword")}function H(U,W){const ne=U.self.RULES.all;for(const ce in ne){const pe=ne[ce];if(typeof pe=="object"&&(0,h.shouldUseRule)(U.schema,pe)){const{type:Oe}=pe.definition;Oe.length&&!Oe.some($e=>te(W,$e))&&F(U,`missing type "${Oe.join(",")}" for keyword "${ce}"`)}}}function te(U,W){return U.includes(W)||W==="number"&&U.includes("integer")}function z(U,W){return U.includes(W)||W==="integer"&&U.includes("number")}function $(U,W){const ne=[];for(const ce of U.dataTypes)z(W,ce)?ne.push(ce):W.includes("integer")&&ce==="number"&&ne.push("integer");U.dataTypes=ne}function F(U,W){const ne=U.schemaEnv.baseId+U.errSchemaPath;W+=` at "${ne}" (strictTypes)`,(0,m.checkStrictMode)(U,W,U.opts.strictTypes)}class ee{constructor(W,ne,ce){if((0,_.validateKeywordUsage)(W,ne,ce),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=ce,this.data=W.data,this.schema=W.schema[ce],this.$data=ne.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(W,this.schema,ce,this.$data),this.schemaType=ne.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=ne,this.$data)this.schemaCode=W.gen.const("vSchema",ve(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,_.validSchemaType)(this.schema,ne.schemaType,ne.allowUndefined))throw new Error(`${ce} value must be ${JSON.stringify(ne.schemaType)}`);("code"in ne?ne.trackErrors:ne.errors!==!1)&&(this.errsCount=W.gen.const("_errs",i.default.errors))}result(W,ne,ce){this.failResult((0,v.not)(W),ne,ce)}failResult(W,ne,ce){this.gen.if(W),ce?ce():this.error(),ne?(this.gen.else(),ne(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(W,ne){this.failResult((0,v.not)(W),void 0,ne)}fail(W){if(W===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(W){if(!this.$data)return this.fail(W);const{schemaCode:ne}=this;this.fail((0,v._)`${ne} !== undefined && (${(0,v.or)(this.invalid$data(),W)})`)}error(W,ne,ce){if(ne){this.setParams(ne),this._error(W,ce),this.setParams({});return}this._error(W,ce)}_error(W,ne){(W?g.reportExtraError:g.reportError)(this,this.def.error,ne)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(W){this.allErrors||this.gen.if(W)}setParams(W,ne){ne?Object.assign(this.params,W):this.params=W}block$data(W,ne,ce=v.nil){this.gen.block(()=>{this.check$data(W,ce),ne()})}check$data(W=v.nil,ne=v.nil){if(!this.$data)return;const{gen:ce,schemaCode:pe,schemaType:Oe,def:$e}=this;ce.if((0,v.or)((0,v._)`${pe} === undefined`,ne)),W!==v.nil&&ce.assign(W,!0),(Oe.length||$e.validateSchema)&&(ce.elseIf(this.invalid$data()),this.$dataError(),W!==v.nil&&ce.assign(W,!1)),ce.else()}invalid$data(){const{gen:W,schemaCode:ne,schemaType:ce,def:pe,it:Oe}=this;return(0,v.or)($e(),Fe());function $e(){if(ce.length){if(!(ne instanceof v.Name))throw new Error("ajv implementation error");const Ze=Array.isArray(ce)?ce:[ce];return(0,v._)`${(0,p.checkDataTypes)(Ze,ne,Oe.opts.strictNumbers,p.DataType.Wrong)}`}return v.nil}function Fe(){if(pe.validateSchema){const Ze=W.scopeValue("validate$data",{ref:pe.validateSchema});return(0,v._)`!${Ze}(${ne})`}return v.nil}}subschema(W,ne){const ce=(0,d.getSubschema)(this.it,W);(0,d.extendSubschemaData)(ce,this.it,W),(0,d.extendSubschemaMode)(ce,W);const pe={...this.it,...ce,items:void 0,props:void 0};return P(pe,ne),pe}mergeEvaluated(W,ne){const{it:ce,gen:pe}=this;ce.opts.unevaluated&&(ce.props!==!0&&W.props!==void 0&&(ce.props=m.mergeEvaluated.props(pe,W.props,ce.props,ne)),ce.items!==!0&&W.items!==void 0&&(ce.items=m.mergeEvaluated.items(pe,W.items,ce.items,ne)))}mergeValidEvaluated(W,ne){const{it:ce,gen:pe}=this;if(ce.opts.unevaluated&&(ce.props!==!0||ce.items!==!0))return pe.if(ne,()=>this.mergeEvaluated(W,v.Name)),!0}}cn.KeywordCxt=ee;function ge(U,W,ne,ce){const pe=new ee(U,ne,W);"code"in ne?ne.code(pe,ce):pe.$data&&ne.validate?(0,_.funcKeywordCode)(pe,ne):"macro"in ne?(0,_.macroKeywordCode)(pe,ne):(ne.compile||ne.validate)&&(0,_.funcKeywordCode)(pe,ne)}const _e=/^\/(?:[^~]|~0|~1)*$/,je=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(U,{dataLevel:W,dataNames:ne,dataPathArr:ce}){let pe,Oe;if(U==="")return i.default.rootData;if(U[0]==="/"){if(!_e.test(U))throw new Error(`Invalid JSON-pointer: ${U}`);pe=U,Oe=i.default.rootData}else{const Ye=je.exec(U);if(!Ye)throw new Error(`Invalid JSON-pointer: ${U}`);const Ae=+Ye[1];if(pe=Ye[2],pe==="#"){if(Ae>=W)throw new Error(Ze("property/index",Ae));return ce[W-Ae]}if(Ae>W)throw new Error(Ze("data",Ae));if(Oe=ne[W-Ae],!pe)return Oe}let $e=Oe;const Fe=pe.split("/");for(const Ye of Fe)Ye&&(Oe=(0,v._)`${Oe}${(0,v.getProperty)((0,m.unescapeJsonPointer)(Ye))}`,$e=(0,v._)`${$e} && ${Oe}`);return $e;function Ze(Ye,Ae){return`Cannot access ${Ye} ${Ae} levels up, current level is ${W}`}}return cn.getData=ve,cn}var Ka={},Td;function Ll(){if(Td)return Ka;Td=1,Object.defineProperty(Ka,"__esModule",{value:!0});class o extends Error{constructor(h){super("validation failed"),this.errors=h,this.ajv=this.validation=!0}}return Ka.default=o,Ka}var Wa={},Rd;function Za(){if(Rd)return Wa;Rd=1,Object.defineProperty(Wa,"__esModule",{value:!0});const o=Ga();class a extends Error{constructor(p,y,_,d){super(d||`can't resolve reference ${_} from id ${y}`),this.missingRef=(0,o.resolveUrl)(p,y,_),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(p,this.missingRef))}}return Wa.default=a,Wa}var pr={},Ld;function Al(){if(Ld)return pr;Ld=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.resolveSchema=pr.getCompilingSchema=pr.resolveRef=pr.compileSchema=pr.SchemaEnv=void 0;const o=rt(),a=Ll(),h=Pn(),p=Ga(),y=ut(),_=Ja();class d{constructor(x){var S;this.refs={},this.dynamicAnchors={};let P;typeof x.schema=="object"&&(P=x.schema),this.schema=x.schema,this.schemaId=x.schemaId,this.root=x.root||this,this.baseId=(S=x.baseId)!==null&&S!==void 0?S:(0,p.normalizeId)(P?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=P?.$async,this.refs={}}}pr.SchemaEnv=d;function v(j){const x=m.call(this,j);if(x)return x;const S=(0,p.getFullPath)(this.opts.uriResolver,j.root.baseId),{es5:P,lines:L}=this.opts.code,{ownProperties:C}=this.opts,R=new o.CodeGen(this.scope,{es5:P,lines:L,ownProperties:C});let A;j.$async&&(A=R.scopeValue("Error",{ref:a.default,code:(0,o._)`require("ajv/dist/runtime/validation_error").default`}));const I=R.scopeName("validate");j.validateName=I;const D={gen:R,allErrors:this.opts.allErrors,data:h.default.data,parentData:h.default.parentData,parentDataProperty:h.default.parentDataProperty,dataNames:[h.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:R.scopeValue("schema",this.opts.code.source===!0?{ref:j.schema,code:(0,o.stringify)(j.schema)}:{ref:j.schema}),validateName:I,ValidationError:A,schema:j.schema,schemaEnv:j,rootId:S,baseId:j.baseId||S,schemaPath:o.nil,errSchemaPath:j.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,o._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(j),(0,_.validateFunctionCode)(D),R.optimize(this.opts.code.optimize);const V=R.toString();M=`${R.scopeRefs(h.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,j));const J=new Function(`${h.default.self}`,`${h.default.scope}`,M)(this,this.scope.get());if(this.scope.value(I,{ref:J}),J.errors=null,J.schema=j.schema,J.schemaEnv=j,j.$async&&(J.$async=!0),this.opts.code.source===!0&&(J.source={validateName:I,validateCode:V,scopeValues:R._values}),this.opts.unevaluated){const{props:Y,items:se}=D;J.evaluated={props:Y instanceof o.Name?void 0:Y,items:se instanceof o.Name?void 0:se,dynamicProps:Y instanceof o.Name,dynamicItems:se instanceof o.Name},J.source&&(J.source.evaluated=(0,o.stringify)(J.evaluated))}return j.validate=J,j}catch(V){throw delete j.validate,delete j.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(j)}}pr.compileSchema=v;function i(j,x,S){var P;S=(0,p.resolveUrl)(this.opts.uriResolver,x,S);const L=j.refs[S];if(L)return L;let C=b.call(this,j,S);if(C===void 0){const R=(P=j.localRefs)===null||P===void 0?void 0:P[S],{schemaId:A}=this.opts;R&&(C=new d({schema:R,schemaId:A,root:j,baseId:x}))}if(C!==void 0)return j.refs[S]=f.call(this,C)}pr.resolveRef=i;function f(j){return(0,p.inlineRef)(j.schema,this.opts.inlineRefs)?j.schema:j.validate?j:v.call(this,j)}function m(j){for(const x of this._compilations)if(g(x,j))return x}pr.getCompilingSchema=m;function g(j,x){return j.schema===x.schema&&j.root===x.root&&j.baseId===x.baseId}function b(j,x){let S;for(;typeof(S=this.refs[x])=="string";)x=S;return S||this.schemas[x]||w.call(this,j,x)}function w(j,x){const S=this.opts.uriResolver.parse(x),P=(0,p._getFullPath)(this.opts.uriResolver,S);let L=(0,p.getFullPath)(this.opts.uriResolver,j.baseId,void 0);if(Object.keys(j.schema).length>0&&P===L)return O.call(this,S,j);const C=(0,p.normalizeId)(P),R=this.refs[C]||this.schemas[C];if(typeof R=="string"){const A=w.call(this,j,R);return typeof A?.schema!="object"?void 0:O.call(this,S,A)}if(typeof R?.schema=="object"){if(R.validate||v.call(this,R),C===(0,p.normalizeId)(x)){const{schema:A}=R,{schemaId:I}=this.opts,D=A[I];return D&&(L=(0,p.resolveUrl)(this.opts.uriResolver,L,D)),new d({schema:A,schemaId:I,root:j,baseId:L})}return O.call(this,S,R)}}pr.resolveSchema=w;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function O(j,{baseId:x,schema:S,root:P}){var L;if(((L=j.fragment)===null||L===void 0?void 0:L[0])!=="/")return;for(const A of j.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const I=S[(0,y.unescapeFragment)(A)];if(I===void 0)return;S=I;const D=typeof S=="object"&&S[this.opts.schemaId];!E.has(A)&&D&&(x=(0,p.resolveUrl)(this.opts.uriResolver,x,D))}let C;if(typeof S!="boolean"&&S.$ref&&!(0,y.schemaHasRulesButRef)(S,this.RULES)){const A=(0,p.resolveUrl)(this.opts.uriResolver,x,S.$ref);C=w.call(this,P,A)}const{schemaId:R}=this.opts;if(C=C||new d({schema:S,schemaId:R,root:P,baseId:x}),C.schema!==C.root.schema)return C}return pr}const Vy={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Ya={},Xo={exports:{}},$l,Ad;function $d(){if(Ad)return $l;Ad=1;const o=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),a=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function h(b){let w="",E=0,O=0;for(O=0;O<b.length;O++)if(E=b[O].charCodeAt(0),E!==48){if(!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";w+=b[O];break}for(O+=1;O<b.length;O++){if(E=b[O].charCodeAt(0),!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";w+=b[O]}return w}const p=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(b){return b.length=0,!0}function _(b,w,E){if(b.length){const O=h(b);if(O!=="")w.push(O);else return E.error=!0,!1;b.length=0}return!0}function d(b){let w=0;const E={error:!1,address:"",zone:""},O=[],j=[];let x=!1,S=!1,P=_;for(let L=0;L<b.length;L++){const C=b[L];if(!(C==="["||C==="]"))if(C===":"){if(x===!0&&(S=!0),!P(j,O,E))break;if(++w>7){E.error=!0;break}L>0&&b[L-1]===":"&&(x=!0),O.push(":");continue}else if(C==="%"){if(!P(j,O,E))break;P=y}else{j.push(C);continue}}return j.length&&(P===y?E.zone=j.join(""):S?O.push(j.join("")):O.push(h(j))),E.address=O.join(""),E}function v(b){if(i(b,":")<2)return{host:b,isIPV6:!1};const w=d(b);if(w.error)return{host:b,isIPV6:!1};{let E=w.address,O=w.address;return w.zone&&(E+="%"+w.zone,O+="%25"+w.zone),{host:E,isIPV6:!0,escapedHost:O}}}function i(b,w){let E=0;for(let O=0;O<b.length;O++)b[O]===w&&E++;return E}function f(b){let w=b;const E=[];let O=-1,j=0;for(;j=w.length;){if(j===1){if(w===".")break;if(w==="/"){E.push("/");break}else{E.push(w);break}}else if(j===2){if(w[0]==="."){if(w[1]===".")break;if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&(w[1]==="."||w[1]==="/")){E.push("/");break}}else if(j===3&&w==="/.."){E.length!==0&&E.pop(),E.push("/");break}if(w[0]==="."){if(w[1]==="."){if(w[2]==="/"){w=w.slice(3);continue}}else if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&w[1]==="."){if(w[2]==="/"){w=w.slice(2);continue}else if(w[2]==="."&&w[3]==="/"){w=w.slice(3),E.length!==0&&E.pop();continue}}if((O=w.indexOf("/",1))===-1){E.push(w);break}else E.push(w.slice(0,O)),w=w.slice(O)}return E.join("")}function m(b,w){const E=w!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=E(b.scheme)),b.userinfo!==void 0&&(b.userinfo=E(b.userinfo)),b.host!==void 0&&(b.host=E(b.host)),b.path!==void 0&&(b.path=E(b.path)),b.query!==void 0&&(b.query=E(b.query)),b.fragment!==void 0&&(b.fragment=E(b.fragment)),b}function g(b){const w=[];if(b.userinfo!==void 0&&(w.push(b.userinfo),w.push("@")),b.host!==void 0){let E=unescape(b.host);if(!a(E)){const O=v(E);O.isIPV6===!0?E=`[${O.escapedHost}]`:E=b.host}w.push(E)}return(typeof b.port=="number"||typeof b.port=="string")&&(w.push(":"),w.push(String(b.port))),w.length?w.join(""):void 0}return $l={nonSimpleDomain:p,recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:a,isUUID:o,normalizeIPv6:v,stringArrayToHexStripped:h},$l}var Nl,Nd;function zy(){if(Nd)return Nl;Nd=1;const{isUUID:o}=$d(),a=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,h=["http","https","ws","wss","urn","urn:uuid"];function p(C){return h.indexOf(C)!==-1}function y(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function _(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function d(C){const R=String(C.scheme).toLowerCase()==="https";return(C.port===(R?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function v(C){return C.secure=y(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function i(C){if((C.port===(y(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[R,A]=C.resourceName.split("?");C.path=R&&R!=="/"?R:void 0,C.query=A,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,R){if(!C.path)return C.error="URN can not be parsed",C;const A=C.path.match(a);if(A){const I=R.scheme||C.scheme||"urn";C.nid=A[1].toLowerCase(),C.nss=A[2];const D=`${I}:${R.nid||C.nid}`,M=L(D);C.path=void 0,M&&(C=M.parse(C,R))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,R){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=R.scheme||C.scheme||"urn",I=C.nid.toLowerCase(),D=`${A}:${R.nid||I}`,M=L(D);M&&(C=M.serialize(C,R));const V=C,G=C.nss;return V.path=`${I||R.nid}:${G}`,R.skipEscape=!0,V}function g(C,R){const A=C;return A.uuid=A.nss,A.nss=void 0,!R.tolerant&&(!A.uuid||!o(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function b(C){const R=C;return R.nss=(C.uuid||"").toLowerCase(),R}const w={scheme:"http",domainHost:!0,parse:_,serialize:d},E={scheme:"https",domainHost:w.domainHost,parse:_,serialize:d},O={scheme:"ws",domainHost:!0,parse:v,serialize:i},j={scheme:"wss",domainHost:O.domainHost,parse:O.parse,serialize:O.serialize},P={http:w,https:E,ws:O,wss:j,urn:{scheme:"urn",parse:f,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:b,skipNormalize:!0}};Object.setPrototypeOf(P,null);function L(C){return C&&(P[C]||P[C.toLowerCase()])||void 0}return Nl={wsIsSecure:y,SCHEMES:P,isValidSchemeName:p,getSchemeHandler:L},Nl}var Id;function qy(){if(Id)return Xo.exports;Id=1;const{normalizeIPv6:o,removeDotSegments:a,recomposeAuthority:h,normalizeComponentEncoding:p,isIPv4:y,nonSimpleDomain:_}=$d(),{SCHEMES:d,getSchemeHandler:v}=zy();function i(j,x){return typeof j=="string"?j=b(E(j,x),x):typeof j=="object"&&(j=E(b(j,x),x)),j}function f(j,x,S){const P=S?Object.assign({scheme:"null"},S):{scheme:"null"},L=m(E(j,P),E(x,P),P,!0);return P.skipEscape=!0,b(L,P)}function m(j,x,S,P){const L={};return P||(j=E(b(j,S),S),x=E(b(x,S),S)),S=S||{},!S.tolerant&&x.scheme?(L.scheme=x.scheme,L.userinfo=x.userinfo,L.host=x.host,L.port=x.port,L.path=a(x.path||""),L.query=x.query):(x.userinfo!==void 0||x.host!==void 0||x.port!==void 0?(L.userinfo=x.userinfo,L.host=x.host,L.port=x.port,L.path=a(x.path||""),L.query=x.query):(x.path?(x.path[0]==="/"?L.path=a(x.path):((j.userinfo!==void 0||j.host!==void 0||j.port!==void 0)&&!j.path?L.path="/"+x.path:j.path?L.path=j.path.slice(0,j.path.lastIndexOf("/")+1)+x.path:L.path=x.path,L.path=a(L.path)),L.query=x.query):(L.path=j.path,x.query!==void 0?L.query=x.query:L.query=j.query),L.userinfo=j.userinfo,L.host=j.host,L.port=j.port),L.scheme=j.scheme),L.fragment=x.fragment,L}function g(j,x,S){return typeof j=="string"?(j=unescape(j),j=b(p(E(j,S),!0),{...S,skipEscape:!0})):typeof j=="object"&&(j=b(p(j,!0),{...S,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=b(p(E(x,S),!0),{...S,skipEscape:!0})):typeof x=="object"&&(x=b(p(x,!0),{...S,skipEscape:!0})),j.toLowerCase()===x.toLowerCase()}function b(j,x){const S={host:j.host,scheme:j.scheme,userinfo:j.userinfo,port:j.port,path:j.path,query:j.query,nid:j.nid,nss:j.nss,uuid:j.uuid,fragment:j.fragment,reference:j.reference,resourceName:j.resourceName,secure:j.secure,error:""},P=Object.assign({},x),L=[],C=v(P.scheme||S.scheme);C&&C.serialize&&C.serialize(S,P),S.path!==void 0&&(P.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),P.reference!=="suffix"&&S.scheme&&L.push(S.scheme,":");const R=h(S);if(R!==void 0&&(P.reference!=="suffix"&&L.push("//"),L.push(R),S.path&&S.path[0]!=="/"&&L.push("/")),S.path!==void 0){let A=S.path;!P.absolutePath&&(!C||!C.absolutePath)&&(A=a(A)),R===void 0&&A[0]==="/"&&A[1]==="/"&&(A="/%2F"+A.slice(2)),L.push(A)}return S.query!==void 0&&L.push("?",S.query),S.fragment!==void 0&&L.push("#",S.fragment),L.join("")}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function E(j,x){const S=Object.assign({},x),P={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let L=!1;S.reference==="suffix"&&(S.scheme?j=S.scheme+":"+j:j="//"+j);const C=j.match(w);if(C){if(P.scheme=C[1],P.userinfo=C[3],P.host=C[4],P.port=parseInt(C[5],10),P.path=C[6]||"",P.query=C[7],P.fragment=C[8],isNaN(P.port)&&(P.port=C[5]),P.host)if(y(P.host)===!1){const I=o(P.host);P.host=I.host.toLowerCase(),L=I.isIPV6}else L=!0;P.scheme===void 0&&P.userinfo===void 0&&P.host===void 0&&P.port===void 0&&P.query===void 0&&!P.path?P.reference="same-document":P.scheme===void 0?P.reference="relative":P.fragment===void 0?P.reference="absolute":P.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==P.reference&&(P.error=P.error||"URI is not a "+S.reference+" reference.");const R=v(S.scheme||P.scheme);if(!S.unicodeSupport&&(!R||!R.unicodeSupport)&&P.host&&(S.domainHost||R&&R.domainHost)&&L===!1&&_(P.host))try{P.host=URL.domainToASCII(P.host.toLowerCase())}catch(A){P.error=P.error||"Host's domain name can not be converted to ASCII: "+A}(!R||R&&!R.skipNormalize)&&(j.indexOf("%")!==-1&&(P.scheme!==void 0&&(P.scheme=unescape(P.scheme)),P.host!==void 0&&(P.host=unescape(P.host))),P.path&&(P.path=escape(unescape(P.path))),P.fragment&&(P.fragment=encodeURI(decodeURIComponent(P.fragment)))),R&&R.parse&&R.parse(P,S)}else P.error=P.error||"URI can not be parsed.";return P}const O={SCHEMES:d,normalize:i,resolve:f,resolveComponent:m,equal:g,serialize:b,parse:E};return Xo.exports=O,Xo.exports.default=O,Xo.exports.fastUri=O,Xo.exports}var Dd;function Hy(){if(Dd)return Ya;Dd=1,Object.defineProperty(Ya,"__esModule",{value:!0});const o=qy();return o.code='require("ajv/dist/runtime/uri").default',Ya.default=o,Ya}var Bd;function Uy(){return Bd||(Bd=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.CodeGen=o.Name=o.nil=o.stringify=o.str=o._=o.KeywordCxt=void 0;var a=Ja();Object.defineProperty(o,"KeywordCxt",{enumerable:!0,get:function(){return a.KeywordCxt}});var h=rt();Object.defineProperty(o,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(o,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(o,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(o,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(o,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});const p=Ll(),y=Za(),_=vd(),d=Al(),v=rt(),i=Ga(),f=Ua(),m=ut(),g=Vy,b=Hy(),w=(ie,H)=>new RegExp(ie,H);w.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],O=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),j={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function P(ie){var H,te,z,$,F,ee,ge,_e,je,ve,U,W,ne,ce,pe,Oe,$e,Fe,Ze,Ye,Ae,Qe,De,nt,me;const Ee=ie.strict,Se=(H=ie.code)===null||H===void 0?void 0:H.optimize,qe=Se===!0||Se===void 0?1:Se||0,it=(z=(te=ie.code)===null||te===void 0?void 0:te.regExp)!==null&&z!==void 0?z:w,Et=($=ie.uriResolver)!==null&&$!==void 0?$:b.default;return{strictSchema:(ee=(F=ie.strictSchema)!==null&&F!==void 0?F:Ee)!==null&&ee!==void 0?ee:!0,strictNumbers:(_e=(ge=ie.strictNumbers)!==null&&ge!==void 0?ge:Ee)!==null&&_e!==void 0?_e:!0,strictTypes:(ve=(je=ie.strictTypes)!==null&&je!==void 0?je:Ee)!==null&&ve!==void 0?ve:"log",strictTuples:(W=(U=ie.strictTuples)!==null&&U!==void 0?U:Ee)!==null&&W!==void 0?W:"log",strictRequired:(ce=(ne=ie.strictRequired)!==null&&ne!==void 0?ne:Ee)!==null&&ce!==void 0?ce:!1,code:ie.code?{...ie.code,optimize:qe,regExp:it}:{optimize:qe,regExp:it},loopRequired:(pe=ie.loopRequired)!==null&&pe!==void 0?pe:S,loopEnum:(Oe=ie.loopEnum)!==null&&Oe!==void 0?Oe:S,meta:($e=ie.meta)!==null&&$e!==void 0?$e:!0,messages:(Fe=ie.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ze=ie.inlineRefs)!==null&&Ze!==void 0?Ze:!0,schemaId:(Ye=ie.schemaId)!==null&&Ye!==void 0?Ye:"$id",addUsedSchema:(Ae=ie.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(Qe=ie.validateSchema)!==null&&Qe!==void 0?Qe:!0,validateFormats:(De=ie.validateFormats)!==null&&De!==void 0?De:!0,unicodeRegExp:(nt=ie.unicodeRegExp)!==null&&nt!==void 0?nt:!0,int32range:(me=ie.int32range)!==null&&me!==void 0?me:!0,uriResolver:Et}}class L{constructor(H={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,H=this.opts={...H,...P(H)};const{es5:te,lines:z}=this.opts.code;this.scope=new v.ValueScope({scope:{},prefixes:O,es5:te,lines:z}),this.logger=G(H.logger);const $=H.validateFormats;H.validateFormats=!1,this.RULES=(0,_.getRules)(),C.call(this,j,H,"NOT SUPPORTED"),C.call(this,x,H,"DEPRECATED","warn"),this._metaOpts=M.call(this),H.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),H.keywords&&D.call(this,H.keywords),typeof H.meta=="object"&&this.addMetaSchema(H.meta),A.call(this),H.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:H,meta:te,schemaId:z}=this.opts;let $=g;z==="id"&&($={...g},$.id=$.$id,delete $.$id),te&&H&&this.addMetaSchema($,$[z],!1)}defaultMeta(){const{meta:H,schemaId:te}=this.opts;return this.opts.defaultMeta=typeof H=="object"?H[te]||H:void 0}validate(H,te){let z;if(typeof H=="string"){if(z=this.getSchema(H),!z)throw new Error(`no schema with key or ref "${H}"`)}else z=this.compile(H);const $=z(te);return"$async"in z||(this.errors=z.errors),$}compile(H,te){const z=this._addSchema(H,te);return z.validate||this._compileSchemaEnv(z)}compileAsync(H,te){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:z}=this.opts;return $.call(this,H,te);async function $(ve,U){await F.call(this,ve.$schema);const W=this._addSchema(ve,U);return W.validate||ee.call(this,W)}async function F(ve){ve&&!this.getSchema(ve)&&await $.call(this,{$ref:ve},!0)}async function ee(ve){try{return this._compileSchemaEnv(ve)}catch(U){if(!(U instanceof y.default))throw U;return ge.call(this,U),await _e.call(this,U.missingSchema),ee.call(this,ve)}}function ge({missingSchema:ve,missingRef:U}){if(this.refs[ve])throw new Error(`AnySchema ${ve} is loaded but ${U} cannot be resolved`)}async function _e(ve){const U=await je.call(this,ve);this.refs[ve]||await F.call(this,U.$schema),this.refs[ve]||this.addSchema(U,ve,te)}async function je(ve){const U=this._loading[ve];if(U)return U;try{return await(this._loading[ve]=z(ve))}finally{delete this._loading[ve]}}}addSchema(H,te,z,$=this.opts.validateSchema){if(Array.isArray(H)){for(const ee of H)this.addSchema(ee,void 0,z,$);return this}let F;if(typeof H=="object"){const{schemaId:ee}=this.opts;if(F=H[ee],F!==void 0&&typeof F!="string")throw new Error(`schema ${ee} must be string`)}return te=(0,i.normalizeId)(te||F),this._checkUnique(te),this.schemas[te]=this._addSchema(H,z,te,$,!0),this}addMetaSchema(H,te,z=this.opts.validateSchema){return this.addSchema(H,te,!0,z),this}validateSchema(H,te){if(typeof H=="boolean")return!0;let z;if(z=H.$schema,z!==void 0&&typeof z!="string")throw new Error("$schema must be a string");if(z=z||this.opts.defaultMeta||this.defaultMeta(),!z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const $=this.validate(z,H);if(!$&&te){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return $}getSchema(H){let te;for(;typeof(te=R.call(this,H))=="string";)H=te;if(te===void 0){const{schemaId:z}=this.opts,$=new d.SchemaEnv({schema:{},schemaId:z});if(te=d.resolveSchema.call(this,$,H),!te)return;this.refs[H]=te}return te.validate||this._compileSchemaEnv(te)}removeSchema(H){if(H instanceof RegExp)return this._removeAllSchemas(this.schemas,H),this._removeAllSchemas(this.refs,H),this;switch(typeof H){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const te=R.call(this,H);return typeof te=="object"&&this._cache.delete(te.schema),delete this.schemas[H],delete this.refs[H],this}case"object":{const te=H;this._cache.delete(te);let z=H[this.opts.schemaId];return z&&(z=(0,i.normalizeId)(z),delete this.schemas[z],delete this.refs[z]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(H){for(const te of H)this.addKeyword(te);return this}addKeyword(H,te){let z;if(typeof H=="string")z=H,typeof te=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),te.keyword=z);else if(typeof H=="object"&&te===void 0){if(te=H,z=te.keyword,Array.isArray(z)&&!z.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,z,te),!te)return(0,m.eachItem)(z,F=>se.call(this,F)),this;he.call(this,te);const $={...te,type:(0,f.getJSONTypes)(te.type),schemaType:(0,f.getJSONTypes)(te.schemaType)};return(0,m.eachItem)(z,$.type.length===0?F=>se.call(this,F,$):F=>$.type.forEach(ee=>se.call(this,F,$,ee))),this}getKeyword(H){const te=this.RULES.all[H];return typeof te=="object"?te.definition:!!te}removeKeyword(H){const{RULES:te}=this;delete te.keywords[H],delete te.all[H];for(const z of te.rules){const $=z.rules.findIndex(F=>F.keyword===H);$>=0&&z.rules.splice($,1)}return this}addFormat(H,te){return typeof te=="string"&&(te=new RegExp(te)),this.formats[H]=te,this}errorsText(H=this.errors,{separator:te=", ",dataVar:z="data"}={}){return!H||H.length===0?"No errors":H.map($=>`${z}${$.instancePath} ${$.message}`).reduce(($,F)=>$+te+F)}$dataMetaSchema(H,te){const z=this.RULES.all;H=JSON.parse(JSON.stringify(H));for(const $ of te){const F=$.split("/").slice(1);let ee=H;for(const ge of F)ee=ee[ge];for(const ge in z){const _e=z[ge];if(typeof _e!="object")continue;const{$data:je}=_e.definition,ve=ee[ge];je&&ve&&(ee[ge]=be(ve))}}return H}_removeAllSchemas(H,te){for(const z in H){const $=H[z];(!te||te.test(z))&&(typeof $=="string"?delete H[z]:$&&!$.meta&&(this._cache.delete($.schema),delete H[z]))}}_addSchema(H,te,z,$=this.opts.validateSchema,F=this.opts.addUsedSchema){let ee;const{schemaId:ge}=this.opts;if(typeof H=="object")ee=H[ge];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof H!="boolean")throw new Error("schema must be object or boolean")}let _e=this._cache.get(H);if(_e!==void 0)return _e;z=(0,i.normalizeId)(ee||z);const je=i.getSchemaRefs.call(this,H,z);return _e=new d.SchemaEnv({schema:H,schemaId:ge,meta:te,baseId:z,localRefs:je}),this._cache.set(_e.schema,_e),F&&!z.startsWith("#")&&(z&&this._checkUnique(z),this.refs[z]=_e),$&&this.validateSchema(H,!0),_e}_checkUnique(H){if(this.schemas[H]||this.refs[H])throw new Error(`schema with key or id "${H}" already exists`)}_compileSchemaEnv(H){if(H.meta?this._compileMetaSchema(H):d.compileSchema.call(this,H),!H.validate)throw new Error("ajv implementation error");return H.validate}_compileMetaSchema(H){const te=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,H)}finally{this.opts=te}}}L.ValidationError=p.default,L.MissingRefError=y.default,o.default=L;function C(ie,H,te,z="error"){for(const $ in ie){const F=$;F in H&&this.logger[z](`${te}: option ${$}. ${ie[F]}`)}}function R(ie){return ie=(0,i.normalizeId)(ie),this.schemas[ie]||this.refs[ie]}function A(){const ie=this.opts.schemas;if(ie)if(Array.isArray(ie))this.addSchema(ie);else for(const H in ie)this.addSchema(ie[H],H)}function I(){for(const ie in this.opts.formats){const H=this.opts.formats[ie];H&&this.addFormat(ie,H)}}function D(ie){if(Array.isArray(ie)){this.addVocabulary(ie);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const H in ie){const te=ie[H];te.keyword||(te.keyword=H),this.addKeyword(te)}}function M(){const ie={...this.opts};for(const H of E)delete ie[H];return ie}const V={log(){},warn(){},error(){}};function G(ie){if(ie===!1)return V;if(ie===void 0)return console;if(ie.log&&ie.warn&&ie.error)return ie;throw new Error("logger must implement log, warn and error methods")}const J=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(ie,H){const{RULES:te}=this;if((0,m.eachItem)(ie,z=>{if(te.keywords[z])throw new Error(`Keyword ${z} is already defined`);if(!J.test(z))throw new Error(`Keyword ${z} has invalid name`)}),!!H&&H.$data&&!("code"in H||"validate"in H))throw new Error('$data keyword must have "code" or "validate" function')}function se(ie,H,te){var z;const $=H?.post;if(te&&$)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let ee=$?F.post:F.rules.find(({type:_e})=>_e===te);if(ee||(ee={type:te,rules:[]},F.rules.push(ee)),F.keywords[ie]=!0,!H)return;const ge={keyword:ie,definition:{...H,type:(0,f.getJSONTypes)(H.type),schemaType:(0,f.getJSONTypes)(H.schemaType)}};H.before?ue.call(this,ee,ge,H.before):ee.rules.push(ge),F.all[ie]=ge,(z=H.implements)===null||z===void 0||z.forEach(_e=>this.addKeyword(_e))}function ue(ie,H,te){const z=ie.rules.findIndex($=>$.keyword===te);z>=0?ie.rules.splice(z,0,H):(ie.rules.push(H),this.logger.warn(`rule ${te} is not defined`))}function he(ie){let{metaSchema:H}=ie;H!==void 0&&(ie.$data&&this.opts.$data&&(H=be(H)),ie.validateSchema=this.compile(H,!0))}const de={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function be(ie){return{anyOf:[ie,de]}}})(Ol)),Ol}var Qa={},Xa={},es={},Fd;function Gy(){if(Fd)return es;Fd=1,Object.defineProperty(es,"__esModule",{value:!0});const o={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return es.default=o,es}var Tn={},Md;function Jy(){if(Md)return Tn;Md=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.callRef=Tn.getValidate=void 0;const o=Za(),a=Sr(),h=rt(),p=Pn(),y=Al(),_=ut(),d={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:g,it:b}=f,{baseId:w,schemaEnv:E,validateName:O,opts:j,self:x}=b,{root:S}=E;if((g==="#"||g==="#/")&&w===S.baseId)return L();const P=y.resolveRef.call(x,S,w,g);if(P===void 0)throw new o.default(b.opts.uriResolver,w,g);if(P instanceof y.SchemaEnv)return C(P);return R(P);function L(){if(E===S)return i(f,O,E,E.$async);const A=m.scopeValue("root",{ref:S});return i(f,(0,h._)`${A}.validate`,S,S.$async)}function C(A){const I=v(f,A);i(f,I,A,A.$async)}function R(A){const I=m.scopeValue("schema",j.code.source===!0?{ref:A,code:(0,h.stringify)(A)}:{ref:A}),D=m.name("valid"),M=f.subschema({schema:A,dataTypes:[],schemaPath:h.nil,topSchemaRef:I,errSchemaPath:g},D);f.mergeEvaluated(M),f.ok(D)}}};function v(f,m){const{gen:g}=f;return m.validate?g.scopeValue("validate",{ref:m.validate}):(0,h._)`${g.scopeValue("wrapper",{ref:m})}.validate`}Tn.getValidate=v;function i(f,m,g,b){const{gen:w,it:E}=f,{allErrors:O,schemaEnv:j,opts:x}=E,S=x.passContext?p.default.this:h.nil;b?P():L();function P(){if(!j.$async)throw new Error("async schema referenced by sync schema");const A=w.let("valid");w.try(()=>{w.code((0,h._)`await ${(0,a.callValidateCode)(f,m,S)}`),R(m),O||w.assign(A,!0)},I=>{w.if((0,h._)`!(${I} instanceof ${E.ValidationError})`,()=>w.throw(I)),C(I),O||w.assign(A,!1)}),f.ok(A)}function L(){f.result((0,a.callValidateCode)(f,m,S),()=>R(m),()=>C(m))}function C(A){const I=(0,h._)`${A}.errors`;w.assign(p.default.vErrors,(0,h._)`${p.default.vErrors} === null ? ${I} : ${p.default.vErrors}.concat(${I})`),w.assign(p.default.errors,(0,h._)`${p.default.vErrors}.length`)}function R(A){var I;if(!E.opts.unevaluated)return;const D=(I=g?.validate)===null||I===void 0?void 0:I.evaluated;if(E.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(E.props=_.mergeEvaluated.props(w,D.props,E.props));else{const M=w.var("props",(0,h._)`${A}.evaluated.props`);E.props=_.mergeEvaluated.props(w,M,E.props,h.Name)}if(E.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(E.items=_.mergeEvaluated.items(w,D.items,E.items));else{const M=w.var("items",(0,h._)`${A}.evaluated.items`);E.items=_.mergeEvaluated.items(w,M,E.items,h.Name)}}}return Tn.callRef=i,Tn.default=d,Tn}var Vd;function Ky(){if(Vd)return Xa;Vd=1,Object.defineProperty(Xa,"__esModule",{value:!0});const o=Gy(),a=Jy(),h=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,a.default];return Xa.default=h,Xa}var ts={},rs={},zd;function Wy(){if(zd)return rs;zd=1,Object.defineProperty(rs,"__esModule",{value:!0});const o=rt(),a=o.operators,h={maximum:{okStr:"<=",ok:a.LTE,fail:a.GT},minimum:{okStr:">=",ok:a.GTE,fail:a.LT},exclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},exclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}},p={message:({keyword:_,schemaCode:d})=>(0,o.str)`must be ${h[_].okStr} ${d}`,params:({keyword:_,schemaCode:d})=>(0,o._)`{comparison: ${h[_].okStr}, limit: ${d}}`},y={keyword:Object.keys(h),type:"number",schemaType:"number",$data:!0,error:p,code(_){const{keyword:d,data:v,schemaCode:i}=_;_.fail$data((0,o._)`${v} ${h[d].fail} ${i} || isNaN(${v})`)}};return rs.default=y,rs}var ns={},qd;function Zy(){if(qd)return ns;qd=1,Object.defineProperty(ns,"__esModule",{value:!0});const o=rt(),h={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:p})=>(0,o.str)`must be multiple of ${p}`,params:({schemaCode:p})=>(0,o._)`{multipleOf: ${p}}`},code(p){const{gen:y,data:_,schemaCode:d,it:v}=p,i=v.opts.multipleOfPrecision,f=y.let("res"),m=i?(0,o._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${i}`:(0,o._)`${f} !== parseInt(${f})`;p.fail$data((0,o._)`(${d} === 0 || (${f} = ${_}/${d}, ${m}))`)}};return ns.default=h,ns}var is={},os={},Hd;function Yy(){if(Hd)return os;Hd=1,Object.defineProperty(os,"__esModule",{value:!0});function o(a){const h=a.length;let p=0,y=0,_;for(;y<h;)p++,_=a.charCodeAt(y++),_>=55296&&_<=56319&&y<h&&(_=a.charCodeAt(y),(_&64512)===56320&&y++);return p}return os.default=o,o.code='require("ajv/dist/runtime/ucs2length").default',os}var Ud;function Qy(){if(Ud)return is;Ud=1,Object.defineProperty(is,"__esModule",{value:!0});const o=rt(),a=ut(),h=Yy(),y={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:_,schemaCode:d}){const v=_==="maxLength"?"more":"fewer";return(0,o.str)`must NOT have ${v} than ${d} characters`},params:({schemaCode:_})=>(0,o._)`{limit: ${_}}`},code(_){const{keyword:d,data:v,schemaCode:i,it:f}=_,m=d==="maxLength"?o.operators.GT:o.operators.LT,g=f.opts.unicode===!1?(0,o._)`${v}.length`:(0,o._)`${(0,a.useFunc)(_.gen,h.default)}(${v})`;_.fail$data((0,o._)`${g} ${m} ${i}`)}};return is.default=y,is}var as={},Gd;function Xy(){if(Gd)return as;Gd=1,Object.defineProperty(as,"__esModule",{value:!0});const o=Sr(),a=rt(),p={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:y})=>(0,a.str)`must match pattern "${y}"`,params:({schemaCode:y})=>(0,a._)`{pattern: ${y}}`},code(y){const{data:_,$data:d,schema:v,schemaCode:i,it:f}=y,m=f.opts.unicodeRegExp?"u":"",g=d?(0,a._)`(new RegExp(${i}, ${m}))`:(0,o.usePattern)(y,v);y.fail$data((0,a._)`!${g}.test(${_})`)}};return as.default=p,as}var ss={},Jd;function ev(){if(Jd)return ss;Jd=1,Object.defineProperty(ss,"__esModule",{value:!0});const o=rt(),h={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:p,schemaCode:y}){const _=p==="maxProperties"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} properties`},params:({schemaCode:p})=>(0,o._)`{limit: ${p}}`},code(p){const{keyword:y,data:_,schemaCode:d}=p,v=y==="maxProperties"?o.operators.GT:o.operators.LT;p.fail$data((0,o._)`Object.keys(${_}).length ${v} ${d}`)}};return ss.default=h,ss}var ls={},Kd;function tv(){if(Kd)return ls;Kd=1,Object.defineProperty(ls,"__esModule",{value:!0});const o=Sr(),a=rt(),h=ut(),y={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:_}})=>(0,a.str)`must have required property '${_}'`,params:({params:{missingProperty:_}})=>(0,a._)`{missingProperty: ${_}}`},code(_){const{gen:d,schema:v,schemaCode:i,data:f,$data:m,it:g}=_,{opts:b}=g;if(!m&&v.length===0)return;const w=v.length>=b.loopRequired;if(g.allErrors?E():O(),b.strictRequired){const S=_.parentSchema.properties,{definedProperties:P}=_.it;for(const L of v)if(S?.[L]===void 0&&!P.has(L)){const C=g.schemaEnv.baseId+g.errSchemaPath,R=`required property "${L}" is not defined at "${C}" (strictRequired)`;(0,h.checkStrictMode)(g,R,g.opts.strictRequired)}}function E(){if(w||m)_.block$data(a.nil,j);else for(const S of v)(0,o.checkReportMissingProp)(_,S)}function O(){const S=d.let("missing");if(w||m){const P=d.let("valid",!0);_.block$data(P,()=>x(S,P)),_.ok(P)}else d.if((0,o.checkMissingProp)(_,v,S)),(0,o.reportMissingProp)(_,S),d.else()}function j(){d.forOf("prop",i,S=>{_.setParams({missingProperty:S}),d.if((0,o.noPropertyInData)(d,f,S,b.ownProperties),()=>_.error())})}function x(S,P){_.setParams({missingProperty:S}),d.forOf(S,i,()=>{d.assign(P,(0,o.propertyInData)(d,f,S,b.ownProperties)),d.if((0,a.not)(P),()=>{_.error(),d.break()})},a.nil)}}};return ls.default=y,ls}var cs={},Wd;function rv(){if(Wd)return cs;Wd=1,Object.defineProperty(cs,"__esModule",{value:!0});const o=rt(),h={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:p,schemaCode:y}){const _=p==="maxItems"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} items`},params:({schemaCode:p})=>(0,o._)`{limit: ${p}}`},code(p){const{keyword:y,data:_,schemaCode:d}=p,v=y==="maxItems"?o.operators.GT:o.operators.LT;p.fail$data((0,o._)`${_}.length ${v} ${d}`)}};return cs.default=h,cs}var us={},ds={},Zd;function Il(){if(Zd)return ds;Zd=1,Object.defineProperty(ds,"__esModule",{value:!0});const o=xd();return o.code='require("ajv/dist/runtime/equal").default',ds.default=o,ds}var Yd;function nv(){if(Yd)return us;Yd=1,Object.defineProperty(us,"__esModule",{value:!0});const o=Ua(),a=rt(),h=ut(),p=Il(),_={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:v}})=>(0,a.str)`must NOT have duplicate items (items ## ${v} and ${d} are identical)`,params:({params:{i:d,j:v}})=>(0,a._)`{i: ${d}, j: ${v}}`},code(d){const{gen:v,data:i,$data:f,schema:m,parentSchema:g,schemaCode:b,it:w}=d;if(!f&&!m)return;const E=v.let("valid"),O=g.items?(0,o.getSchemaTypes)(g.items):[];d.block$data(E,j,(0,a._)`${b} === false`),d.ok(E);function j(){const L=v.let("i",(0,a._)`${i}.length`),C=v.let("j");d.setParams({i:L,j:C}),v.assign(E,!0),v.if((0,a._)`${L} > 1`,()=>(x()?S:P)(L,C))}function x(){return O.length>0&&!O.some(L=>L==="object"||L==="array")}function S(L,C){const R=v.name("item"),A=(0,o.checkDataTypes)(O,R,w.opts.strictNumbers,o.DataType.Wrong),I=v.const("indices",(0,a._)`{}`);v.for((0,a._)`;${L}--;`,()=>{v.let(R,(0,a._)`${i}[${L}]`),v.if(A,(0,a._)`continue`),O.length>1&&v.if((0,a._)`typeof ${R} == "string"`,(0,a._)`${R} += "_"`),v.if((0,a._)`typeof ${I}[${R}] == "number"`,()=>{v.assign(C,(0,a._)`${I}[${R}]`),d.error(),v.assign(E,!1).break()}).code((0,a._)`${I}[${R}] = ${L}`)})}function P(L,C){const R=(0,h.useFunc)(v,p.default),A=v.name("outer");v.label(A).for((0,a._)`;${L}--;`,()=>v.for((0,a._)`${C} = ${L}; ${C}--;`,()=>v.if((0,a._)`${R}(${i}[${L}], ${i}[${C}])`,()=>{d.error(),v.assign(E,!1).break(A)})))}}};return us.default=_,us}var hs={},Qd;function iv(){if(Qd)return hs;Qd=1,Object.defineProperty(hs,"__esModule",{value:!0});const o=rt(),a=ut(),h=Il(),y={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:_})=>(0,o._)`{allowedValue: ${_}}`},code(_){const{gen:d,data:v,$data:i,schemaCode:f,schema:m}=_;i||m&&typeof m=="object"?_.fail$data((0,o._)`!${(0,a.useFunc)(d,h.default)}(${v}, ${f})`):_.fail((0,o._)`${m} !== ${v}`)}};return hs.default=y,hs}var fs={},Xd;function ov(){if(Xd)return fs;Xd=1,Object.defineProperty(fs,"__esModule",{value:!0});const o=rt(),a=ut(),h=Il(),y={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:_})=>(0,o._)`{allowedValues: ${_}}`},code(_){const{gen:d,data:v,$data:i,schema:f,schemaCode:m,it:g}=_;if(!i&&f.length===0)throw new Error("enum must have non-empty array");const b=f.length>=g.opts.loopEnum;let w;const E=()=>w??(w=(0,a.useFunc)(d,h.default));let O;if(b||i)O=d.let("valid"),_.block$data(O,j);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const S=d.const("vSchema",m);O=(0,o.or)(...f.map((P,L)=>x(S,L)))}_.pass(O);function j(){d.assign(O,!1),d.forOf("v",m,S=>d.if((0,o._)`${E()}(${v}, ${S})`,()=>d.assign(O,!0).break()))}function x(S,P){const L=f[P];return typeof L=="object"&&L!==null?(0,o._)`${E()}(${v}, ${S}[${P}])`:(0,o._)`${v} === ${L}`}}};return fs.default=y,fs}var eh;function av(){if(eh)return ts;eh=1,Object.defineProperty(ts,"__esModule",{value:!0});const o=Wy(),a=Zy(),h=Qy(),p=Xy(),y=ev(),_=tv(),d=rv(),v=nv(),i=iv(),f=ov(),m=[o.default,a.default,h.default,p.default,y.default,_.default,d.default,v.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},i.default,f.default];return ts.default=m,ts}var ps={},Gi={},th;function rh(){if(th)return Gi;th=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.validateAdditionalItems=void 0;const o=rt(),a=ut(),p={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:_}})=>(0,o.str)`must NOT have more than ${_} items`,params:({params:{len:_}})=>(0,o._)`{limit: ${_}}`},code(_){const{parentSchema:d,it:v}=_,{items:i}=d;if(!Array.isArray(i)){(0,a.checkStrictMode)(v,'"additionalItems" is ignored when "items" is not an array of schemas');return}y(_,i)}};function y(_,d){const{gen:v,schema:i,data:f,keyword:m,it:g}=_;g.items=!0;const b=v.const("len",(0,o._)`${f}.length`);if(i===!1)_.setParams({len:d.length}),_.pass((0,o._)`${b} <= ${d.length}`);else if(typeof i=="object"&&!(0,a.alwaysValidSchema)(g,i)){const E=v.var("valid",(0,o._)`${b} <= ${d.length}`);v.if((0,o.not)(E),()=>w(E)),_.ok(E)}function w(E){v.forRange("i",d.length,b,O=>{_.subschema({keyword:m,dataProp:O,dataPropType:a.Type.Num},E),g.allErrors||v.if((0,o.not)(E),()=>v.break())})}}return Gi.validateAdditionalItems=y,Gi.default=p,Gi}var ms={},Ji={},nh;function ih(){if(nh)return Ji;nh=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.validateTuple=void 0;const o=rt(),a=ut(),h=Sr(),p={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(_){const{schema:d,it:v}=_;if(Array.isArray(d))return y(_,"additionalItems",d);v.items=!0,!(0,a.alwaysValidSchema)(v,d)&&_.ok((0,h.validateArray)(_))}};function y(_,d,v=_.schema){const{gen:i,parentSchema:f,data:m,keyword:g,it:b}=_;O(f),b.opts.unevaluated&&v.length&&b.items!==!0&&(b.items=a.mergeEvaluated.items(i,v.length,b.items));const w=i.name("valid"),E=i.const("len",(0,o._)`${m}.length`);v.forEach((j,x)=>{(0,a.alwaysValidSchema)(b,j)||(i.if((0,o._)`${E} > ${x}`,()=>_.subschema({keyword:g,schemaProp:x,dataProp:x},w)),_.ok(w))});function O(j){const{opts:x,errSchemaPath:S}=b,P=v.length,L=P===j.minItems&&(P===j.maxItems||j[d]===!1);if(x.strictTuples&&!L){const C=`"${g}" is ${P}-tuple, but minItems or maxItems/${d} are not specified or different at path "${S}"`;(0,a.checkStrictMode)(b,C,x.strictTuples)}}}return Ji.validateTuple=y,Ji.default=p,Ji}var oh;function sv(){if(oh)return ms;oh=1,Object.defineProperty(ms,"__esModule",{value:!0});const o=ih(),a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:h=>(0,o.validateTuple)(h,"items")};return ms.default=a,ms}var ys={},ah;function lv(){if(ah)return ys;ah=1,Object.defineProperty(ys,"__esModule",{value:!0});const o=rt(),a=ut(),h=Sr(),p=rh(),_={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,o.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,o._)`{limit: ${d}}`},code(d){const{schema:v,parentSchema:i,it:f}=d,{prefixItems:m}=i;f.items=!0,!(0,a.alwaysValidSchema)(f,v)&&(m?(0,p.validateAdditionalItems)(d,m):d.ok((0,h.validateArray)(d)))}};return ys.default=_,ys}var vs={},sh;function cv(){if(sh)return vs;sh=1,Object.defineProperty(vs,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:y,max:_}})=>_===void 0?(0,o.str)`must contain at least ${y} valid item(s)`:(0,o.str)`must contain at least ${y} and no more than ${_} valid item(s)`,params:({params:{min:y,max:_}})=>_===void 0?(0,o._)`{minContains: ${y}}`:(0,o._)`{minContains: ${y}, maxContains: ${_}}`},code(y){const{gen:_,schema:d,parentSchema:v,data:i,it:f}=y;let m,g;const{minContains:b,maxContains:w}=v;f.opts.next?(m=b===void 0?1:b,g=w):m=1;const E=_.const("len",(0,o._)`${i}.length`);if(y.setParams({min:m,max:g}),g===void 0&&m===0){(0,a.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&m>g){(0,a.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),y.fail();return}if((0,a.alwaysValidSchema)(f,d)){let P=(0,o._)`${E} >= ${m}`;g!==void 0&&(P=(0,o._)`${P} && ${E} <= ${g}`),y.pass(P);return}f.items=!0;const O=_.name("valid");g===void 0&&m===1?x(O,()=>_.if(O,()=>_.break())):m===0?(_.let(O,!0),g!==void 0&&_.if((0,o._)`${i}.length > 0`,j)):(_.let(O,!1),j()),y.result(O,()=>y.reset());function j(){const P=_.name("_valid"),L=_.let("count",0);x(P,()=>_.if(P,()=>S(L)))}function x(P,L){_.forRange("i",0,E,C=>{y.subschema({keyword:"contains",dataProp:C,dataPropType:a.Type.Num,compositeRule:!0},P),L()})}function S(P){_.code((0,o._)`${P}++`),g===void 0?_.if((0,o._)`${P} >= ${m}`,()=>_.assign(O,!0).break()):(_.if((0,o._)`${P} > ${g}`,()=>_.assign(O,!1).break()),m===1?_.assign(O,!0):_.if((0,o._)`${P} >= ${m}`,()=>_.assign(O,!0)))}}};return vs.default=p,vs}var Dl={},lh;function uv(){return lh||(lh=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.validateSchemaDeps=o.validatePropertyDeps=o.error=void 0;const a=rt(),h=ut(),p=Sr();o.error={message:({params:{property:i,depsCount:f,deps:m}})=>{const g=f===1?"property":"properties";return(0,a.str)`must have ${g} ${m} when property ${i} is present`},params:({params:{property:i,depsCount:f,deps:m,missingProperty:g}})=>(0,a._)`{property: ${i},
11
11
  missingProperty: ${g},
12
12
  depsCount: ${f},
13
- deps: ${m}}`};const y={keyword:"dependencies",type:"object",schemaType:"object",error:o.error,code(i){const[f,m]=_(i);d(i,f),v(i,m)}};function _({schema:i}){const f={},m={};for(const g in i){if(g==="__proto__")continue;const b=Array.isArray(i[g])?f:m;b[g]=i[g]}return[f,m]}function d(i,f=i.schema){const{gen:m,data:g,it:b}=i;if(Object.keys(f).length===0)return;const w=m.let("missing");for(const E in f){const O=f[E];if(O.length===0)continue;const j=(0,p.propertyInData)(m,g,E,b.opts.ownProperties);i.setParams({property:E,depsCount:O.length,deps:O.join(", ")}),b.allErrors?m.if(j,()=>{for(const x of O)(0,p.checkReportMissingProp)(i,x)}):(m.if((0,a._)`${j} && (${(0,p.checkMissingProp)(i,O,w)})`),(0,p.reportMissingProp)(i,w),m.else())}}o.validatePropertyDeps=d;function v(i,f=i.schema){const{gen:m,data:g,keyword:b,it:w}=i,E=m.name("valid");for(const O in f)(0,h.alwaysValidSchema)(w,f[O])||(m.if((0,p.propertyInData)(m,g,O,w.opts.ownProperties),()=>{const j=i.subschema({keyword:b,schemaProp:O},E);i.mergeValidEvaluated(j,E)},()=>m.var(E,!0)),i.ok(E))}o.validateSchemaDeps=v,o.default=y})(Dl)),Dl}var vs={},ch;function dv(){if(ch)return vs;ch=1,Object.defineProperty(vs,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:y})=>(0,o._)`{propertyName: ${y.propertyName}}`},code(y){const{gen:_,schema:d,data:v,it:i}=y;if((0,a.alwaysValidSchema)(i,d))return;const f=_.name("valid");_.forIn("key",v,m=>{y.setParams({propertyName:m}),y.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},f),_.if((0,o.not)(f),()=>{y.error(!0),i.allErrors||_.break()})}),y.ok(f)}};return vs.default=p,vs}var bs={},uh;function dh(){if(uh)return bs;uh=1,Object.defineProperty(bs,"__esModule",{value:!0});const o=Sr(),a=rt(),h=Pn(),p=ut(),_={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,a._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:v,schema:i,parentSchema:f,data:m,errsCount:g,it:b}=d;if(!g)throw new Error("ajv implementation error");const{allErrors:w,opts:E}=b;if(b.props=!0,E.removeAdditional!=="all"&&(0,p.alwaysValidSchema)(b,i))return;const O=(0,o.allSchemaProperties)(f.properties),j=(0,o.allSchemaProperties)(f.patternProperties);x(),d.ok((0,a._)`${g} === ${h.default.errors}`);function x(){v.forIn("key",m,R=>{!O.length&&!j.length?L(R):v.if(S(R),()=>L(R))})}function S(R){let A;if(O.length>8){const I=(0,p.schemaRefOrVal)(b,f.properties,"properties");A=(0,o.isOwnProperty)(v,I,R)}else O.length?A=(0,a.or)(...O.map(I=>(0,a._)`${R} === ${I}`)):A=a.nil;return j.length&&(A=(0,a.or)(A,...j.map(I=>(0,a._)`${(0,o.usePattern)(d,I)}.test(${R})`))),(0,a.not)(A)}function P(R){v.code((0,a._)`delete ${m}[${R}]`)}function L(R){if(E.removeAdditional==="all"||E.removeAdditional&&i===!1){P(R);return}if(i===!1){d.setParams({additionalProperty:R}),d.error(),w||v.break();return}if(typeof i=="object"&&!(0,p.alwaysValidSchema)(b,i)){const A=v.name("valid");E.removeAdditional==="failing"?(C(R,A,!1),v.if((0,a.not)(A),()=>{d.reset(),P(R)})):(C(R,A),w||v.if((0,a.not)(A),()=>v.break()))}}function C(R,A,I){const D={keyword:"additionalProperties",dataProp:R,dataPropType:p.Type.Str};I===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,A)}}};return bs.default=_,bs}var gs={},hh;function hv(){if(hh)return gs;hh=1,Object.defineProperty(gs,"__esModule",{value:!0});const o=Ga(),a=Sr(),h=ut(),p=dh(),y={keyword:"properties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,parentSchema:i,data:f,it:m}=_;m.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&p.default.code(new o.KeywordCxt(m,p.default,"additionalProperties"));const g=(0,a.allSchemaProperties)(v);for(const j of g)m.definedProperties.add(j);m.opts.unevaluated&&g.length&&m.props!==!0&&(m.props=h.mergeEvaluated.props(d,(0,h.toHash)(g),m.props));const b=g.filter(j=>!(0,h.alwaysValidSchema)(m,v[j]));if(b.length===0)return;const w=d.name("valid");for(const j of b)E(j)?O(j):(d.if((0,a.propertyInData)(d,f,j,m.opts.ownProperties)),O(j),m.allErrors||d.else().var(w,!0),d.endIf()),_.it.definedProperties.add(j),_.ok(w);function E(j){return m.opts.useDefaults&&!m.compositeRule&&v[j].default!==void 0}function O(j){_.subschema({keyword:"properties",schemaProp:j,dataProp:j},w)}}};return gs.default=y,gs}var _s={},fh;function fv(){if(fh)return _s;fh=1,Object.defineProperty(_s,"__esModule",{value:!0});const o=Sr(),a=rt(),h=ut(),p=ut(),y={keyword:"patternProperties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,data:i,parentSchema:f,it:m}=_,{opts:g}=m,b=(0,o.allSchemaProperties)(v),w=b.filter(L=>(0,h.alwaysValidSchema)(m,v[L]));if(b.length===0||w.length===b.length&&(!m.opts.unevaluated||m.props===!0))return;const E=g.strictSchema&&!g.allowMatchingProperties&&f.properties,O=d.name("valid");m.props!==!0&&!(m.props instanceof a.Name)&&(m.props=(0,p.evaluatedPropsToName)(d,m.props));const{props:j}=m;x();function x(){for(const L of b)E&&S(L),m.allErrors?P(L):(d.var(O,!0),P(L),d.if(O))}function S(L){for(const C in E)new RegExp(L).test(C)&&(0,h.checkStrictMode)(m,`property ${C} matches pattern ${L} (use allowMatchingProperties)`)}function P(L){d.forIn("key",i,C=>{d.if((0,a._)`${(0,o.usePattern)(_,L)}.test(${C})`,()=>{const R=w.includes(L);R||_.subschema({keyword:"patternProperties",schemaProp:L,dataProp:C,dataPropType:p.Type.Str},O),m.opts.unevaluated&&j!==!0?d.assign((0,a._)`${j}[${C}]`,!0):!R&&!m.allErrors&&d.if((0,a.not)(O),()=>d.break())})})}}};return _s.default=y,_s}var ws={},ph;function pv(){if(ph)return ws;ph=1,Object.defineProperty(ws,"__esModule",{value:!0});const o=ut(),a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(h){const{gen:p,schema:y,it:_}=h;if((0,o.alwaysValidSchema)(_,y)){h.fail();return}const d=p.name("valid");h.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),h.failResult(d,()=>h.reset(),()=>h.error())},error:{message:"must NOT be valid"}};return ws.default=a,ws}var ks={},mh;function mv(){if(mh)return ks;mh=1,Object.defineProperty(ks,"__esModule",{value:!0});const a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Sr().validateUnion,error:{message:"must match a schema in anyOf"}};return ks.default=a,ks}var js={},yh;function yv(){if(yh)return js;yh=1,Object.defineProperty(js,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:y})=>(0,o._)`{passingSchemas: ${y.passing}}`},code(y){const{gen:_,schema:d,parentSchema:v,it:i}=y;if(!Array.isArray(d))throw new Error("ajv implementation error");if(i.opts.discriminator&&v.discriminator)return;const f=d,m=_.let("valid",!1),g=_.let("passing",null),b=_.name("_valid");y.setParams({passing:g}),_.block(w),y.result(m,()=>y.reset(),()=>y.error(!0));function w(){f.forEach((E,O)=>{let j;(0,a.alwaysValidSchema)(i,E)?_.var(b,!0):j=y.subschema({keyword:"oneOf",schemaProp:O,compositeRule:!0},b),O>0&&_.if((0,o._)`${b} && ${m}`).assign(m,!1).assign(g,(0,o._)`[${g}, ${O}]`).else(),_.if(b,()=>{_.assign(m,!0),_.assign(g,O),j&&y.mergeEvaluated(j,o.Name)})})}}};return js.default=p,js}var Es={},vh;function vv(){if(vh)return Es;vh=1,Object.defineProperty(Es,"__esModule",{value:!0});const o=ut(),a={keyword:"allOf",schemaType:"array",code(h){const{gen:p,schema:y,it:_}=h;if(!Array.isArray(y))throw new Error("ajv implementation error");const d=p.name("valid");y.forEach((v,i)=>{if((0,o.alwaysValidSchema)(_,v))return;const f=h.subschema({keyword:"allOf",schemaProp:i},d);h.ok(d),h.mergeEvaluated(f)})}};return Es.default=a,Es}var Os={},bh;function bv(){if(bh)return Os;bh=1,Object.defineProperty(Os,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:_})=>(0,o.str)`must match "${_.ifClause}" schema`,params:({params:_})=>(0,o._)`{failingKeyword: ${_.ifClause}}`},code(_){const{gen:d,parentSchema:v,it:i}=_;v.then===void 0&&v.else===void 0&&(0,a.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const f=y(i,"then"),m=y(i,"else");if(!f&&!m)return;const g=d.let("valid",!0),b=d.name("_valid");if(w(),_.reset(),f&&m){const O=d.let("ifClause");_.setParams({ifClause:O}),d.if(b,E("then",O),E("else",O))}else f?d.if(b,E("then")):d.if((0,o.not)(b),E("else"));_.pass(g,()=>_.error(!0));function w(){const O=_.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},b);_.mergeEvaluated(O)}function E(O,j){return()=>{const x=_.subschema({keyword:O},b);d.assign(g,b),_.mergeValidEvaluated(x,g),j?d.assign(j,(0,o._)`${O}`):_.setParams({ifClause:O})}}}};function y(_,d){const v=_.schema[d];return v!==void 0&&!(0,a.alwaysValidSchema)(_,v)}return Os.default=p,Os}var xs={},gh;function gv(){if(gh)return xs;gh=1,Object.defineProperty(xs,"__esModule",{value:!0});const o=ut(),a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:h,parentSchema:p,it:y}){p.if===void 0&&(0,o.checkStrictMode)(y,`"${h}" without "if" is ignored`)}};return xs.default=a,xs}var _h;function _v(){if(_h)return fs;_h=1,Object.defineProperty(fs,"__esModule",{value:!0});const o=rh(),a=sv(),h=ih(),p=lv(),y=cv(),_=uv(),d=dv(),v=dh(),i=hv(),f=fv(),m=pv(),g=mv(),b=yv(),w=vv(),E=bv(),O=gv();function j(x=!1){const S=[m.default,g.default,b.default,w.default,E.default,O.default,d.default,v.default,_.default,i.default,f.default];return x?S.push(a.default,p.default):S.push(o.default,h.default),S.push(y.default),S}return fs.default=j,fs}var Ss={},Cs={},wh;function wv(){if(wh)return Cs;wh=1,Object.defineProperty(Cs,"__esModule",{value:!0});const o=rt(),h={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:p})=>(0,o.str)`must match format "${p}"`,params:({schemaCode:p})=>(0,o._)`{format: ${p}}`},code(p,y){const{gen:_,data:d,$data:v,schema:i,schemaCode:f,it:m}=p,{opts:g,errSchemaPath:b,schemaEnv:w,self:E}=m;if(!g.validateFormats)return;v?O():j();function O(){const x=_.scopeValue("formats",{ref:E.formats,code:g.code.formats}),S=_.const("fDef",(0,o._)`${x}[${f}]`),P=_.let("fType"),L=_.let("format");_.if((0,o._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>_.assign(P,(0,o._)`${S}.type || "string"`).assign(L,(0,o._)`${S}.validate`),()=>_.assign(P,(0,o._)`"string"`).assign(L,S)),p.fail$data((0,o.or)(C(),R()));function C(){return g.strictSchema===!1?o.nil:(0,o._)`${f} && !${L}`}function R(){const A=w.$async?(0,o._)`(${S}.async ? await ${L}(${d}) : ${L}(${d}))`:(0,o._)`${L}(${d})`,I=(0,o._)`(typeof ${L} == "function" ? ${A} : ${L}.test(${d}))`;return(0,o._)`${L} && ${L} !== true && ${P} === ${y} && !${I}`}}function j(){const x=E.formats[i];if(!x){C();return}if(x===!0)return;const[S,P,L]=R(x);S===y&&p.pass(A());function C(){if(g.strictSchema===!1){E.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${i}" ignored in schema at path "${b}"`}}function R(I){const D=I instanceof RegExp?(0,o.regexpCode)(I):g.code.formats?(0,o._)`${g.code.formats}${(0,o.getProperty)(i)}`:void 0,M=_.scopeValue("formats",{key:i,ref:I,code:D});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,o._)`${M}.validate`]:["string",I,M]}function A(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!w.$async)throw new Error("async format in sync schema");return(0,o._)`await ${L}(${d})`}return typeof P=="function"?(0,o._)`${L}(${d})`:(0,o._)`${L}.test(${d})`}}}};return Cs.default=h,Cs}var kh;function kv(){if(kh)return Ss;kh=1,Object.defineProperty(Ss,"__esModule",{value:!0});const a=[wv().default];return Ss.default=a,Ss}var ci={},jh;function jv(){return jh||(jh=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.contentVocabulary=ci.metadataVocabulary=void 0,ci.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ci.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ci}var Eh;function Ev(){if(Eh)return Ya;Eh=1,Object.defineProperty(Ya,"__esModule",{value:!0});const o=Ky(),a=av(),h=_v(),p=kv(),y=jv(),_=[o.default,a.default,(0,h.default)(),p.default,y.metadataVocabulary,y.contentVocabulary];return Ya.default=_,Ya}var Ps={},ea={},Oh;function Ov(){if(Oh)return ea;Oh=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.DiscrError=void 0;var o;return(function(a){a.Tag="tag",a.Mapping="mapping"})(o||(ea.DiscrError=o={})),ea}var xh;function xv(){if(xh)return Ps;xh=1,Object.defineProperty(Ps,"__esModule",{value:!0});const o=rt(),a=Ov(),h=Al(),p=Wa(),y=ut(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:v,tagName:i}})=>v===a.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:v,tag:i,tagName:f}})=>(0,o._)`{error: ${v}, tag: ${f}, tagValue: ${i}}`},code(v){const{gen:i,data:f,schema:m,parentSchema:g,it:b}=v,{oneOf:w}=g;if(!b.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=m.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const O=i.let("valid",!1),j=i.const("tag",(0,o._)`${f}${(0,o.getProperty)(E)}`);i.if((0,o._)`typeof ${j} == "string"`,()=>x(),()=>v.error(!1,{discrError:a.DiscrError.Tag,tag:j,tagName:E})),v.ok(O);function x(){const L=P();i.if(!1);for(const C in L)i.elseIf((0,o._)`${j} === ${C}`),i.assign(O,S(L[C]));i.else(),v.error(!1,{discrError:a.DiscrError.Mapping,tag:j,tagName:E}),i.endIf()}function S(L){const C=i.name("valid"),R=v.subschema({keyword:"oneOf",schemaProp:L},C);return v.mergeEvaluated(R,o.Name),C}function P(){var L;const C={},R=I(g);let A=!0;for(let V=0;V<w.length;V++){let G=w[V];if(G?.$ref&&!(0,y.schemaHasRulesButRef)(G,b.self.RULES)){const Y=G.$ref;if(G=h.resolveRef.call(b.self,b.schemaEnv.root,b.baseId,Y),G instanceof h.SchemaEnv&&(G=G.schema),G===void 0)throw new p.default(b.opts.uriResolver,b.baseId,Y)}const J=(L=G?.properties)===null||L===void 0?void 0:L[E];if(typeof J!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);A=A&&(R||I(G)),D(J,V)}if(!A)throw new Error(`discriminator: "${E}" must be required`);return C;function I({required:V}){return Array.isArray(V)&&V.includes(E)}function D(V,G){if(V.const)M(V.const,G);else if(V.enum)for(const J of V.enum)M(J,G);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function M(V,G){if(typeof V!="string"||V in C)throw new Error(`discriminator: "${E}" values must be unique strings`);C[V]=G}}}};return Ps.default=d,Ps}const Sv={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Sh;function Cv(){return Sh||(Sh=1,(function(o,a){Object.defineProperty(a,"__esModule",{value:!0}),a.MissingRefError=a.ValidationError=a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=a.Ajv=void 0;const h=Uy(),p=Ev(),y=xv(),_=Sv,d=["/properties"],v="http://json-schema.org/draft-07/schema";class i extends h.default{_addVocabularies(){super._addVocabularies(),p.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(y.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(_,d):_;this.addMetaSchema(E,v,!1),this.refs["http://json-schema.org/schema"]=v}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(v)?v:void 0)}}a.Ajv=i,o.exports=a=i,o.exports.Ajv=i,Object.defineProperty(a,"__esModule",{value:!0}),a.default=i;var f=Ga();Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=rt();Object.defineProperty(a,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var g=Ll();Object.defineProperty(a,"ValidationError",{enumerable:!0,get:function(){return g.default}});var b=Wa();Object.defineProperty(a,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(Ma,Ma.exports)),Ma.exports}var Pv=Cv();const Tv=Ny(Pv),ta={app_id:"beanbagdb_system",meta:{name:"beanbagdb_system",description:"This is the default system app required for proper functioning of the database"},schemas:[{name:"schema",active:!0,description:"Meta-schema or the schema for defining other schemas",system_generated:!0,version:1.3,title:"Schema document",schema:{type:"object",additionalProperties:!1,properties:{system_generated:{title:"System generated schema",type:"boolean",default:!1},active:{title:"Active",description:"This indicates where new documents can be created using this schema or not. Old documents can still be edited",type:"boolean",default:!1},version:{type:"number",title:"Version",minimum:0,default:1,description:"This is an optional field.To be used primarily for system schemas"},name:{type:"string",title:"Name",minLength:4,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$",description:"This is the name of the schema.It cannot be changed later"},title:{type:"string",title:"Title",minLength:0,maxLength:1e3,description:"A title to display with records."},description:{type:"string",title:"About",minLength:0,maxLength:1e3,description:"A small description of what data in this schema stores."},schema:{type:"object",title:"JSON Schema specification",additionalProperties:!0,minProperties:1,maxProperties:50,description:"This must be a valid JSON Schema which will be used to validate documents created with this schema.See this https://tour.json-schema.org/",default:{}},settings:{type:"object",title:"Additional Settings",additionalProperties:!0,properties:{primary_keys:{title:"Primary key",type:"array",default:[],items:{type:"string"},maxItems:10,description:"Fields that makes each document unique in the schema.Leave it blank if you do not need it. You can still be able to distinguish documents using the link field and the document id."},non_editable_fields:{type:"array",title:"Non editable fields",default:[],items:{type:"string"},maxItems:50,minItems:0,description:"The list of fields whose values are added when the document is created but cannot be edited later in future."},encrypted_fields:{type:"array",title:"List of fields encrypted",default:[],items:{type:"string"},maxItems:50,description:"Once set, all the data in this field will be encrypted before storing it in the database. Encryption key must be provided during the time of BeanBagDB initialization and must be managed by the user as it is NOT stored in the database"},display_fields:{type:"array",title:"List of fields to show in short view",default:[],items:{type:"string"},maxItems:50,description:"These fields will be used when a record is displayed in short"},install_source:{type:"string",title:"Installation source",default:"human",description:"Describes how this schema was installed in database. This is determined by the system. By default the value is human. Possible value: name of the app , where it was cloned from etc..."},svg_icon25:{type:"string",title:"SVG Icon for schema",default:"human",description:"The height and width should be 25px"},text_templates:{type:"object",title:"Text templates for the schema",description:"Define templates that compile and generate text for an individual document in the database",default:{json_string:{engine:"js_script",format:"plain",template:`const pretty = JSON.stringify(doc, null, 2);
13
+ deps: ${m}}`};const y={keyword:"dependencies",type:"object",schemaType:"object",error:o.error,code(i){const[f,m]=_(i);d(i,f),v(i,m)}};function _({schema:i}){const f={},m={};for(const g in i){if(g==="__proto__")continue;const b=Array.isArray(i[g])?f:m;b[g]=i[g]}return[f,m]}function d(i,f=i.schema){const{gen:m,data:g,it:b}=i;if(Object.keys(f).length===0)return;const w=m.let("missing");for(const E in f){const O=f[E];if(O.length===0)continue;const j=(0,p.propertyInData)(m,g,E,b.opts.ownProperties);i.setParams({property:E,depsCount:O.length,deps:O.join(", ")}),b.allErrors?m.if(j,()=>{for(const x of O)(0,p.checkReportMissingProp)(i,x)}):(m.if((0,a._)`${j} && (${(0,p.checkMissingProp)(i,O,w)})`),(0,p.reportMissingProp)(i,w),m.else())}}o.validatePropertyDeps=d;function v(i,f=i.schema){const{gen:m,data:g,keyword:b,it:w}=i,E=m.name("valid");for(const O in f)(0,h.alwaysValidSchema)(w,f[O])||(m.if((0,p.propertyInData)(m,g,O,w.opts.ownProperties),()=>{const j=i.subschema({keyword:b,schemaProp:O},E);i.mergeValidEvaluated(j,E)},()=>m.var(E,!0)),i.ok(E))}o.validateSchemaDeps=v,o.default=y})(Dl)),Dl}var bs={},ch;function dv(){if(ch)return bs;ch=1,Object.defineProperty(bs,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:y})=>(0,o._)`{propertyName: ${y.propertyName}}`},code(y){const{gen:_,schema:d,data:v,it:i}=y;if((0,a.alwaysValidSchema)(i,d))return;const f=_.name("valid");_.forIn("key",v,m=>{y.setParams({propertyName:m}),y.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},f),_.if((0,o.not)(f),()=>{y.error(!0),i.allErrors||_.break()})}),y.ok(f)}};return bs.default=p,bs}var gs={},uh;function dh(){if(uh)return gs;uh=1,Object.defineProperty(gs,"__esModule",{value:!0});const o=Sr(),a=rt(),h=Pn(),p=ut(),_={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,a._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:v,schema:i,parentSchema:f,data:m,errsCount:g,it:b}=d;if(!g)throw new Error("ajv implementation error");const{allErrors:w,opts:E}=b;if(b.props=!0,E.removeAdditional!=="all"&&(0,p.alwaysValidSchema)(b,i))return;const O=(0,o.allSchemaProperties)(f.properties),j=(0,o.allSchemaProperties)(f.patternProperties);x(),d.ok((0,a._)`${g} === ${h.default.errors}`);function x(){v.forIn("key",m,R=>{!O.length&&!j.length?L(R):v.if(S(R),()=>L(R))})}function S(R){let A;if(O.length>8){const I=(0,p.schemaRefOrVal)(b,f.properties,"properties");A=(0,o.isOwnProperty)(v,I,R)}else O.length?A=(0,a.or)(...O.map(I=>(0,a._)`${R} === ${I}`)):A=a.nil;return j.length&&(A=(0,a.or)(A,...j.map(I=>(0,a._)`${(0,o.usePattern)(d,I)}.test(${R})`))),(0,a.not)(A)}function P(R){v.code((0,a._)`delete ${m}[${R}]`)}function L(R){if(E.removeAdditional==="all"||E.removeAdditional&&i===!1){P(R);return}if(i===!1){d.setParams({additionalProperty:R}),d.error(),w||v.break();return}if(typeof i=="object"&&!(0,p.alwaysValidSchema)(b,i)){const A=v.name("valid");E.removeAdditional==="failing"?(C(R,A,!1),v.if((0,a.not)(A),()=>{d.reset(),P(R)})):(C(R,A),w||v.if((0,a.not)(A),()=>v.break()))}}function C(R,A,I){const D={keyword:"additionalProperties",dataProp:R,dataPropType:p.Type.Str};I===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,A)}}};return gs.default=_,gs}var _s={},hh;function hv(){if(hh)return _s;hh=1,Object.defineProperty(_s,"__esModule",{value:!0});const o=Ja(),a=Sr(),h=ut(),p=dh(),y={keyword:"properties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,parentSchema:i,data:f,it:m}=_;m.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&p.default.code(new o.KeywordCxt(m,p.default,"additionalProperties"));const g=(0,a.allSchemaProperties)(v);for(const j of g)m.definedProperties.add(j);m.opts.unevaluated&&g.length&&m.props!==!0&&(m.props=h.mergeEvaluated.props(d,(0,h.toHash)(g),m.props));const b=g.filter(j=>!(0,h.alwaysValidSchema)(m,v[j]));if(b.length===0)return;const w=d.name("valid");for(const j of b)E(j)?O(j):(d.if((0,a.propertyInData)(d,f,j,m.opts.ownProperties)),O(j),m.allErrors||d.else().var(w,!0),d.endIf()),_.it.definedProperties.add(j),_.ok(w);function E(j){return m.opts.useDefaults&&!m.compositeRule&&v[j].default!==void 0}function O(j){_.subschema({keyword:"properties",schemaProp:j,dataProp:j},w)}}};return _s.default=y,_s}var ws={},fh;function fv(){if(fh)return ws;fh=1,Object.defineProperty(ws,"__esModule",{value:!0});const o=Sr(),a=rt(),h=ut(),p=ut(),y={keyword:"patternProperties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,data:i,parentSchema:f,it:m}=_,{opts:g}=m,b=(0,o.allSchemaProperties)(v),w=b.filter(L=>(0,h.alwaysValidSchema)(m,v[L]));if(b.length===0||w.length===b.length&&(!m.opts.unevaluated||m.props===!0))return;const E=g.strictSchema&&!g.allowMatchingProperties&&f.properties,O=d.name("valid");m.props!==!0&&!(m.props instanceof a.Name)&&(m.props=(0,p.evaluatedPropsToName)(d,m.props));const{props:j}=m;x();function x(){for(const L of b)E&&S(L),m.allErrors?P(L):(d.var(O,!0),P(L),d.if(O))}function S(L){for(const C in E)new RegExp(L).test(C)&&(0,h.checkStrictMode)(m,`property ${C} matches pattern ${L} (use allowMatchingProperties)`)}function P(L){d.forIn("key",i,C=>{d.if((0,a._)`${(0,o.usePattern)(_,L)}.test(${C})`,()=>{const R=w.includes(L);R||_.subschema({keyword:"patternProperties",schemaProp:L,dataProp:C,dataPropType:p.Type.Str},O),m.opts.unevaluated&&j!==!0?d.assign((0,a._)`${j}[${C}]`,!0):!R&&!m.allErrors&&d.if((0,a.not)(O),()=>d.break())})})}}};return ws.default=y,ws}var ks={},ph;function pv(){if(ph)return ks;ph=1,Object.defineProperty(ks,"__esModule",{value:!0});const o=ut(),a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(h){const{gen:p,schema:y,it:_}=h;if((0,o.alwaysValidSchema)(_,y)){h.fail();return}const d=p.name("valid");h.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),h.failResult(d,()=>h.reset(),()=>h.error())},error:{message:"must NOT be valid"}};return ks.default=a,ks}var js={},mh;function mv(){if(mh)return js;mh=1,Object.defineProperty(js,"__esModule",{value:!0});const a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Sr().validateUnion,error:{message:"must match a schema in anyOf"}};return js.default=a,js}var Es={},yh;function yv(){if(yh)return Es;yh=1,Object.defineProperty(Es,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:y})=>(0,o._)`{passingSchemas: ${y.passing}}`},code(y){const{gen:_,schema:d,parentSchema:v,it:i}=y;if(!Array.isArray(d))throw new Error("ajv implementation error");if(i.opts.discriminator&&v.discriminator)return;const f=d,m=_.let("valid",!1),g=_.let("passing",null),b=_.name("_valid");y.setParams({passing:g}),_.block(w),y.result(m,()=>y.reset(),()=>y.error(!0));function w(){f.forEach((E,O)=>{let j;(0,a.alwaysValidSchema)(i,E)?_.var(b,!0):j=y.subschema({keyword:"oneOf",schemaProp:O,compositeRule:!0},b),O>0&&_.if((0,o._)`${b} && ${m}`).assign(m,!1).assign(g,(0,o._)`[${g}, ${O}]`).else(),_.if(b,()=>{_.assign(m,!0),_.assign(g,O),j&&y.mergeEvaluated(j,o.Name)})})}}};return Es.default=p,Es}var Os={},vh;function vv(){if(vh)return Os;vh=1,Object.defineProperty(Os,"__esModule",{value:!0});const o=ut(),a={keyword:"allOf",schemaType:"array",code(h){const{gen:p,schema:y,it:_}=h;if(!Array.isArray(y))throw new Error("ajv implementation error");const d=p.name("valid");y.forEach((v,i)=>{if((0,o.alwaysValidSchema)(_,v))return;const f=h.subschema({keyword:"allOf",schemaProp:i},d);h.ok(d),h.mergeEvaluated(f)})}};return Os.default=a,Os}var xs={},bh;function bv(){if(bh)return xs;bh=1,Object.defineProperty(xs,"__esModule",{value:!0});const o=rt(),a=ut(),p={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:_})=>(0,o.str)`must match "${_.ifClause}" schema`,params:({params:_})=>(0,o._)`{failingKeyword: ${_.ifClause}}`},code(_){const{gen:d,parentSchema:v,it:i}=_;v.then===void 0&&v.else===void 0&&(0,a.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const f=y(i,"then"),m=y(i,"else");if(!f&&!m)return;const g=d.let("valid",!0),b=d.name("_valid");if(w(),_.reset(),f&&m){const O=d.let("ifClause");_.setParams({ifClause:O}),d.if(b,E("then",O),E("else",O))}else f?d.if(b,E("then")):d.if((0,o.not)(b),E("else"));_.pass(g,()=>_.error(!0));function w(){const O=_.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},b);_.mergeEvaluated(O)}function E(O,j){return()=>{const x=_.subschema({keyword:O},b);d.assign(g,b),_.mergeValidEvaluated(x,g),j?d.assign(j,(0,o._)`${O}`):_.setParams({ifClause:O})}}}};function y(_,d){const v=_.schema[d];return v!==void 0&&!(0,a.alwaysValidSchema)(_,v)}return xs.default=p,xs}var Ss={},gh;function gv(){if(gh)return Ss;gh=1,Object.defineProperty(Ss,"__esModule",{value:!0});const o=ut(),a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:h,parentSchema:p,it:y}){p.if===void 0&&(0,o.checkStrictMode)(y,`"${h}" without "if" is ignored`)}};return Ss.default=a,Ss}var _h;function _v(){if(_h)return ps;_h=1,Object.defineProperty(ps,"__esModule",{value:!0});const o=rh(),a=sv(),h=ih(),p=lv(),y=cv(),_=uv(),d=dv(),v=dh(),i=hv(),f=fv(),m=pv(),g=mv(),b=yv(),w=vv(),E=bv(),O=gv();function j(x=!1){const S=[m.default,g.default,b.default,w.default,E.default,O.default,d.default,v.default,_.default,i.default,f.default];return x?S.push(a.default,p.default):S.push(o.default,h.default),S.push(y.default),S}return ps.default=j,ps}var Cs={},Ps={},wh;function wv(){if(wh)return Ps;wh=1,Object.defineProperty(Ps,"__esModule",{value:!0});const o=rt(),h={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:p})=>(0,o.str)`must match format "${p}"`,params:({schemaCode:p})=>(0,o._)`{format: ${p}}`},code(p,y){const{gen:_,data:d,$data:v,schema:i,schemaCode:f,it:m}=p,{opts:g,errSchemaPath:b,schemaEnv:w,self:E}=m;if(!g.validateFormats)return;v?O():j();function O(){const x=_.scopeValue("formats",{ref:E.formats,code:g.code.formats}),S=_.const("fDef",(0,o._)`${x}[${f}]`),P=_.let("fType"),L=_.let("format");_.if((0,o._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>_.assign(P,(0,o._)`${S}.type || "string"`).assign(L,(0,o._)`${S}.validate`),()=>_.assign(P,(0,o._)`"string"`).assign(L,S)),p.fail$data((0,o.or)(C(),R()));function C(){return g.strictSchema===!1?o.nil:(0,o._)`${f} && !${L}`}function R(){const A=w.$async?(0,o._)`(${S}.async ? await ${L}(${d}) : ${L}(${d}))`:(0,o._)`${L}(${d})`,I=(0,o._)`(typeof ${L} == "function" ? ${A} : ${L}.test(${d}))`;return(0,o._)`${L} && ${L} !== true && ${P} === ${y} && !${I}`}}function j(){const x=E.formats[i];if(!x){C();return}if(x===!0)return;const[S,P,L]=R(x);S===y&&p.pass(A());function C(){if(g.strictSchema===!1){E.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${i}" ignored in schema at path "${b}"`}}function R(I){const D=I instanceof RegExp?(0,o.regexpCode)(I):g.code.formats?(0,o._)`${g.code.formats}${(0,o.getProperty)(i)}`:void 0,M=_.scopeValue("formats",{key:i,ref:I,code:D});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,o._)`${M}.validate`]:["string",I,M]}function A(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!w.$async)throw new Error("async format in sync schema");return(0,o._)`await ${L}(${d})`}return typeof P=="function"?(0,o._)`${L}(${d})`:(0,o._)`${L}.test(${d})`}}}};return Ps.default=h,Ps}var kh;function kv(){if(kh)return Cs;kh=1,Object.defineProperty(Cs,"__esModule",{value:!0});const a=[wv().default];return Cs.default=a,Cs}var ci={},jh;function jv(){return jh||(jh=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.contentVocabulary=ci.metadataVocabulary=void 0,ci.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ci.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ci}var Eh;function Ev(){if(Eh)return Qa;Eh=1,Object.defineProperty(Qa,"__esModule",{value:!0});const o=Ky(),a=av(),h=_v(),p=kv(),y=jv(),_=[o.default,a.default,(0,h.default)(),p.default,y.metadataVocabulary,y.contentVocabulary];return Qa.default=_,Qa}var Ts={},ea={},Oh;function Ov(){if(Oh)return ea;Oh=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.DiscrError=void 0;var o;return(function(a){a.Tag="tag",a.Mapping="mapping"})(o||(ea.DiscrError=o={})),ea}var xh;function xv(){if(xh)return Ts;xh=1,Object.defineProperty(Ts,"__esModule",{value:!0});const o=rt(),a=Ov(),h=Al(),p=Za(),y=ut(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:v,tagName:i}})=>v===a.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:v,tag:i,tagName:f}})=>(0,o._)`{error: ${v}, tag: ${f}, tagValue: ${i}}`},code(v){const{gen:i,data:f,schema:m,parentSchema:g,it:b}=v,{oneOf:w}=g;if(!b.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=m.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const O=i.let("valid",!1),j=i.const("tag",(0,o._)`${f}${(0,o.getProperty)(E)}`);i.if((0,o._)`typeof ${j} == "string"`,()=>x(),()=>v.error(!1,{discrError:a.DiscrError.Tag,tag:j,tagName:E})),v.ok(O);function x(){const L=P();i.if(!1);for(const C in L)i.elseIf((0,o._)`${j} === ${C}`),i.assign(O,S(L[C]));i.else(),v.error(!1,{discrError:a.DiscrError.Mapping,tag:j,tagName:E}),i.endIf()}function S(L){const C=i.name("valid"),R=v.subschema({keyword:"oneOf",schemaProp:L},C);return v.mergeEvaluated(R,o.Name),C}function P(){var L;const C={},R=I(g);let A=!0;for(let V=0;V<w.length;V++){let G=w[V];if(G?.$ref&&!(0,y.schemaHasRulesButRef)(G,b.self.RULES)){const Y=G.$ref;if(G=h.resolveRef.call(b.self,b.schemaEnv.root,b.baseId,Y),G instanceof h.SchemaEnv&&(G=G.schema),G===void 0)throw new p.default(b.opts.uriResolver,b.baseId,Y)}const J=(L=G?.properties)===null||L===void 0?void 0:L[E];if(typeof J!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);A=A&&(R||I(G)),D(J,V)}if(!A)throw new Error(`discriminator: "${E}" must be required`);return C;function I({required:V}){return Array.isArray(V)&&V.includes(E)}function D(V,G){if(V.const)M(V.const,G);else if(V.enum)for(const J of V.enum)M(J,G);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function M(V,G){if(typeof V!="string"||V in C)throw new Error(`discriminator: "${E}" values must be unique strings`);C[V]=G}}}};return Ts.default=d,Ts}const Sv={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Sh;function Cv(){return Sh||(Sh=1,(function(o,a){Object.defineProperty(a,"__esModule",{value:!0}),a.MissingRefError=a.ValidationError=a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=a.Ajv=void 0;const h=Uy(),p=Ev(),y=xv(),_=Sv,d=["/properties"],v="http://json-schema.org/draft-07/schema";class i extends h.default{_addVocabularies(){super._addVocabularies(),p.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(y.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(_,d):_;this.addMetaSchema(E,v,!1),this.refs["http://json-schema.org/schema"]=v}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(v)?v:void 0)}}a.Ajv=i,o.exports=a=i,o.exports.Ajv=i,Object.defineProperty(a,"__esModule",{value:!0}),a.default=i;var f=Ja();Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=rt();Object.defineProperty(a,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var g=Ll();Object.defineProperty(a,"ValidationError",{enumerable:!0,get:function(){return g.default}});var b=Za();Object.defineProperty(a,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(Va,Va.exports)),Va.exports}var Pv=Cv();const Tv=Ny(Pv),ta={app_id:"beanbagdb_system",meta:{name:"beanbagdb_system",description:"This is the default system app required for proper functioning of the database"},schemas:[{name:"schema",active:!0,description:"Meta-schema or the schema for defining other schemas",system_generated:!0,version:1.3,title:"Schema document",schema:{type:"object",additionalProperties:!1,properties:{system_generated:{title:"System generated schema",type:"boolean",default:!1},active:{title:"Active",description:"This indicates where new documents can be created using this schema or not. Old documents can still be edited",type:"boolean",default:!1},version:{type:"number",title:"Version",minimum:0,default:1,description:"This is an optional field.To be used primarily for system schemas"},name:{type:"string",title:"Name",minLength:4,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$",description:"This is the name of the schema.It cannot be changed later"},title:{type:"string",title:"Title",minLength:0,maxLength:1e3,description:"A title to display with records."},description:{type:"string",title:"About",minLength:0,maxLength:1e3,description:"A small description of what data in this schema stores."},schema:{type:"object",title:"JSON Schema specification",additionalProperties:!0,minProperties:1,maxProperties:50,description:"This must be a valid JSON Schema which will be used to validate documents created with this schema.See this https://tour.json-schema.org/",default:{}},settings:{type:"object",title:"Additional Settings",additionalProperties:!0,properties:{primary_keys:{title:"Primary key",type:"array",default:[],items:{type:"string"},maxItems:10,description:"Fields that makes each document unique in the schema.Leave it blank if you do not need it. You can still be able to distinguish documents using the link field and the document id."},non_editable_fields:{type:"array",title:"Non editable fields",default:[],items:{type:"string"},maxItems:50,minItems:0,description:"The list of fields whose values are added when the document is created but cannot be edited later in future."},encrypted_fields:{type:"array",title:"List of fields encrypted",default:[],items:{type:"string"},maxItems:50,description:"Once set, all the data in this field will be encrypted before storing it in the database. Encryption key must be provided during the time of BeanBagDB initialization and must be managed by the user as it is NOT stored in the database"},display_fields:{type:"array",title:"List of fields to show in short view",default:[],items:{type:"string"},maxItems:50,description:"These fields will be used when a record is displayed in short"},install_source:{type:"string",title:"Installation source",default:"human",description:"Describes how this schema was installed in database. This is determined by the system. By default the value is human. Possible value: name of the app , where it was cloned from etc..."},svg_icon25:{type:"string",title:"SVG Icon for schema",default:"human",description:"The height and width should be 25px"},text_templates:{type:"object",title:"Text templates for the schema",description:"Define templates that compile and generate text for an individual document in the database",default:{json_string:{engine:"js_script",format:"plain",template:`const pretty = JSON.stringify(doc, null, 2);
14
14
  return {text: pretty};`,description:"Generates a stringified JSON as plain text"}},patternProperties:{"^[a-zA-Z_][a-zA-Z0-9_]*$":{type:"object",required:["engine","template"],properties:{engine:{type:"string",enum:["handlebars","ejs","js_script","mustache"],description:"The templating engine used to render the template. js_script is when the template is code in javascript. All template compiler must returns an object `{text:'...'}`"},format:{type:"string",description:"The output format of the template. Eg plain,markdown,html,tex"},description:{type:"string",description:"A human-readable description of the template"},template:{type:"string",description:"The actual template string (must be compatible with the selected engine). Assume that the engine has access to the following json: { doc:{meta, data, app, _schema, schema, id} , ... other related data}"}},additionalProperties:!1}},additionalProperties:!1}},required:["primary_keys","non_editable_fields","encrypted_fields"]}},required:["name","description","schema","settings","title"]},settings:{primary_keys:["name"],non_editable_fields:["system_generated"],encrypted_fields:[],display_fields:["name","version","description","title","active"],svg_icon25:"<svg xmlns='http://www.w3.org/2000/svg' width='25' height='16' fill='currentColor' class='bi bi-database-fill-gear' viewBox='0 0 16 16'><path d='M8 1c-1.573 0-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4s.875 1.755 1.904 2.223C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777C13.125 5.755 14 5.007 14 4s-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1'/><path d='M2 7v-.839c.457.432 1.004.751 1.49.972C4.722 7.693 6.318 8 8 8s3.278-.307 4.51-.867c.486-.22 1.033-.54 1.49-.972V7c0 .424-.155.802-.411 1.133a4.51 4.51 0 0 0-4.815 1.843A12 12 0 0 1 8 10c-1.573 0-3.022-.289-4.096-.777C2.875 8.755 2 8.007 2 7m6.257 3.998L8 11c-1.682 0-3.278-.307-4.51-.867-.486-.22-1.033-.54-1.49-.972V10c0 1.007.875 1.755 1.904 2.223C4.978 12.711 6.427 13 8 13h.027a4.55 4.55 0 0 1 .23-2.002m-.002 3L8 14c-1.682 0-3.278-.307-4.51-.867-.486-.22-1.033-.54-1.49-.972V13c0 1.007.875 1.755 1.904 2.223C4.978 15.711 6.427 16 8 16c.536 0 1.058-.034 1.555-.097a4.5 4.5 0 0 1-1.3-1.905m3.631-4.538c.18-.613 1.048-.613 1.229 0l.043.148a.64.64 0 0 0 .921.382l.136-.074c.561-.306 1.175.308.87.869l-.075.136a.64.64 0 0 0 .382.92l.149.045c.612.18.612 1.048 0 1.229l-.15.043a.64.64 0 0 0-.38.921l.074.136c.305.561-.309 1.175-.87.87l-.136-.075a.64.64 0 0 0-.92.382l-.045.149c-.18.612-1.048.612-1.229 0l-.043-.15a.64.64 0 0 0-.921-.38l-.136.074c-.561.305-1.175-.309-.87-.87l.075-.136a.64.64 0 0 0-.382-.92l-.148-.045c-.613-.18-.613-1.048 0-1.229l.148-.043a.64.64 0 0 0 .382-.921l-.074-.136c-.306-.561.308-1.175.869-.87l.136.075a.64.64 0 0 0 .92-.382zM14 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0'/></svg>"}},{system_generated:!0,version:1,description:"To store user defined key. this can include anything like API tokens etc. There is a special method to fetch this. The values are encrypted",name:"system_key",title:"System key",active:!0,schema:{type:"object",additionalProperties:!0,required:["name","value"],properties:{name:{type:"string",minLength:5,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:"string",minLength:5,maxLength:5e3,pattern:`^[^
15
- \r]*$`,description:"Must be a single line string"},note:{type:"string",minLength:1,maxLength:5e3}}},settings:{primary_keys:["name"],encrypted_fields:["value"],non_editable_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-key-fill" viewBox="0 0 16 16"><path d="M3.5 11.5a3.5 3.5 0 1 1 3.163-5H14L15.5 8 14 9.5l-1-1-1 1-1-1-1 1-1-1-1 1H6.663a3.5 3.5 0 0 1-3.163 2M2.5 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'}},{version:1.1,system_generated:!0,description:"The system relies on these settings for proper functioning or enabling optional features.",name:"system_setting",title:"System Setting",active:!0,schema:{required:["name","value"],type:"object",additionalProperties:!0,properties:{name:{type:"string",minLength:5,maxLength:1e3,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:["array","object"],default:{key:"value"}}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-gear-fill" viewBox="0 0 16 16"><path d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z"/></svg>'}},{name:"system_edge_constraint",title:"Edge constraint",system_generated:!0,active:!0,version:1,description:"To define edge constraints for simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","name"],properties:{node1:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},node2:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},name:{type:"string",minLength:1,maxLength:500,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},label:{type:"string",maxLength:500},note:{type:"string",maxLength:5e3},max_from_node1:{type:"number",default:-1},max_to_node2:{type:"number",default:-1}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-node-plus-fill" viewBox="0 0 16 16"><path d="M11 13a5 5 0 1 0-4.975-5.5H4A1.5 1.5 0 0 0 2.5 6h-1A1.5 1.5 0 0 0 0 7.5v1A1.5 1.5 0 0 0 1.5 10h1A1.5 1.5 0 0 0 4 8.5h2.025A5 5 0 0 0 11 13m.5-7.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2a.5.5 0 0 1 1 0"/></svg>'}},{name:"system_edge",title:"Edge in the system graph",active:!0,system_generated:!0,version:1.5,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","edge_name"],properties:{node1:{type:"string"},node2:{type:"string"},edge_name:{type:"string"},note:{type:"string",default:" "},level_weight:{type:"number",default:1,description:"This helps order nodes at the same level in the graph. Nodes at the same level will be ordered in ascending order"}}},settings:{primary_keys:["node1","node2","edge_name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-diagram-2-fill" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6 3.5A1.5 1.5 0 0 1 7.5 2h1A1.5 1.5 0 0 1 10 3.5v1A1.5 1.5 0 0 1 8.5 6v1H11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 5 7h2.5V6A1.5 1.5 0 0 1 6 4.5zm-3 8A1.5 1.5 0 0 1 4.5 10h1A1.5 1.5 0 0 1 7 11.5v1A1.5 1.5 0 0 1 5.5 14h-1A1.5 1.5 0 0 1 3 12.5zm6 0a1.5 1.5 0 0 1 1.5-1.5h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1A1.5 1.5 0 0 1 9 12.5z"/></svg>'}},{name:"system_media",title:"Media content",active:!0,system_generated:!0,version:1,description:"To store images as Base64",schema:{type:"object",additionalProperties:!0,required:["imageBase64","caption","source"],properties:{imageBase64:{type:"string",media:{binaryEncoding:"base64"}},caption:{type:"string"},source:{type:"string"}}},settings:{primary_keys:["caption"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-image" viewBox="0 0 16 16"><path d="M8.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/><path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2M3 2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8l-2.083-2.083a.5.5 0 0 0-.76.063L8 11 5.835 9.7a.5.5 0 0 0-.611.076L3 12z"/></svg>'}},{name:"system_log",system_generated:!0,title:"System log",active:!0,version:1.25,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["text"],properties:{text:{type:"string"},app:{type:"string"}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-clock-history" viewBox="0 0 16 16"><path d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/><path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/><path d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/></svg>'}},{name:"system_script",system_generated:!0,title:"Executable script",active:!0,version:1,description:"To create scripts that implement some logic. Can run both on browser and client.",schema:{type:"object",additionalProperties:!0,required:["script","type","version","name"],properties:{type:{type:"string",default:"JS"},name:{type:"string",default:"script-name",pattern:"^[a-zA-Z0-9\\-]+$"},script:{type:"string",description:"The script",default:""},usage:{type:"string",description:"Documentation",default:" "},version:{type:"number",default:.1},log_execution:{type:"boolean",default:!1}}},settings:{primary_keys:["name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-braces-asterisk" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C2.25 2 1.49 2.759 1.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6M14.886 7.9v.164c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456v-1.3c-1.114 0-1.49-.362-1.49-1.456V4.352C14.51 2.759 13.75 2 12.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6M7.5 11.5V9.207l-1.621 1.621-.707-.707L6.792 8.5H4.5v-1h2.293L5.172 5.879l.707-.707L7.5 6.792V4.5h1v2.293l1.621-1.621.707.707L9.208 7.5H11.5v1H9.207l1.621 1.621-.707.707L8.5 9.208V11.5z"/></svg>'}},{name:"system_text",system_generated:!0,title:"Text",active:!0,version:1.1,description:"Plain text with optional formatting",schema:{type:"object",additionalProperties:!1,required:[],properties:{text:{type:"string",default:"Text...",description:"Content"},format:{type:"string",default:"plain",description:"Content format"}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>'}}],records:[]},Bl={additionalProperties:!0,type:"object",properties:{tags:{type:"array",items:{type:"string"},default:[],maxItems:40},link:{type:"string",minLength:2,maxLength:2e3,pattern:"^[a-zA-Z0-9-]+$"},title:{type:"string",default:"Document",maxLength:1e4},ref:{type:"object",description:"This can be used by apps to add additional data for later user like version ",default:{}},location:{type:"object",description:"this can be used to add created_from and last_updated_from location to the doc",default:{}}}},Rv={additionalProperties:!0,type:"object",required:["app_id"],properties:{app_id:{type:"string"},meta:{type:"object",additionalProperties:!0},schemas:{type:"array",minItems:1},records:{type:"array",default:[]},default_setting:{type:"object",additionalProperties:!0,default:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-earmark" viewBox="0 0 16 16"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"/></svg>'}}}};class Gr{constructor(a){if(this.util_check_required_fields(["name","encryption_key","api","utils","db_name"],a),this.util_check_required_fields(["insert","update","delete","search","get","createIndex"],a.api),this.util_check_required_fields(["encrypt","decrypt","ping","validate_schema","compile_template"],a.utils),a.encryption_key.length<20)throw new Gt([{message:Gr.error_codes.key_short}]);this.encryption_key=a.encryption_key,this.db_name=a.db_name,this.db_api=a.api,this.utils=a.utils,this.meta={database_name:a.name,backend_database:this.db_name,beanbagdb_version_db:null},this._version=this._get_current_version(),this.active=!1,this.apps={},console.log("Run ready() now")}static error_codes={key_short:"The encryption key must at least contain 20 characters",not_active:"Database is not ready. Run ready() first",schema_not_found:"Schema not found",doc_not_found:"Document with selected criteria does not exists"};static rest_enabled={ready:{use:"Makes the database ready to use"},metadata:{use:"Returns metadata related to the current BeanBagDB instance "},initialize_app:{use:"To install/initialize an external app",input:"{...app_data}"},update_indexes:{use:"Updates the indexes in the database for better searching"},create:{input:"{schema,data,meta}",use:"Creates a new doc"},read:{input:"{criteria,include_schema:false}",use:"Returns a doc. 3 ways to search for a doc : by _id, by link or by the primary key of the schema "},update:{input:"{criteria,updates}",use:"Updates a document"},delete:{input:"{criteria}",use:"Deletes a doc"},search:{input:"{criteria:{selector:{...}}}",use:"To search in the database"},get:{input:"{type,criteria}",use:"Returns special types of documents "},create_edge:{input:"{node1:{..criteria},node2:{..criteria},edge_name,edge_label}",use:"Creates a new edge in the system's simple directed graph "},util_get_now_unix_timestamp:{use:"Returns the current UNIX timestamp"},util_validate_data:{input:"{schema:{},data:{}}",use:"Validate the given data against the given schema and returns errors/validated doc"},util_validate_schema_object:{input:"{...schema_object...}",use:"Validated the schema document without inserting it in the DB"},util_generate_random_link:{use:"Returns a random link"}};metadata(){return{...this.meta,beanbagdb_version_code:this._version,ready_to_use:this.active}}async check_ready(){console.log("checking if DB is ready to be used");let a=await this.db_api.search({selector:{schema:"system_setting","data.name":"beanbagdb_system"}});if(a.docs.length>0){let h=a.docs[0];this.active=h.data.value.version==this._version,this.meta.beanbagdb_version_db=h.data.value.version}return this.active||console.log("Version mismatch.Init of default required"),this.active}async ready(a=!0){if(await this.check_ready())console.log("Ready.Set.Go");else if(a)console.log("Initializing"),await this.initialize();else throw new Error("DB cannot be used because there is a version mismatch between the DB and the script. Since automatically init flag was set to true, exiting")}async initialize(){try{let a=await this.initialize_app(ta);return this.meta.beanbagdb_version_db=this._version,this.active=!0,a}catch(a){throw console.log("Error in initializing instance"),console.log(a),a}}async initialize_app(a){if(!a)throw new Error("app_data_input is required");let h=this.util_validate_data({schema:Rv,data:a}),p=0;h.schemas.map(m=>{p=p+m.version,m.settings.install_source=`app:${h.app_id}`}),h.records.map(m=>{p=p+m.version});let y=await this.db_api.search({selector:{schema:"system_setting","data.name":h.app_id}}),_=!0,d;if(y.docs.length>0&&(d=y.docs[0],d.data.value.version==p&&(_=!1)),!_)return d;let v=`Initializing ${h.app_id} app to v.${p}`,i=["update started"];for(let m=0;m<h.schemas.length;m++){const g=h.schemas[m].name,b=h.schemas[m];i.push(`checking.${g}`);try{let w=await this.get({type:"schema",criteria:{name:g}});if(w.data.version!=b.version){i.push(`old.${g}.v.${w.data.version}`);let E=await this.db_api.get(w._id);E.data={...b},E.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(E),await this.db_api.update(E),i.push(`new.${g}.v=${b.version}`)}else i.push(`${g}.v.${w.data.version}=latest`)}catch(w){if(w instanceof dn){if(g=="schema"&&h.app_id=="beanbagdb_system"){let E=this._get_blank_doc("schema");E.data=b,await this.db_api.insert(E)}else{let E=ta.schemas[0].schema,O=this._get_blank_schema_doc("schema",E,b);await this.db_api.insert(O)}i.push(`init.${g}.v=${b.version}`)}else i.push(`${g}.error.message : ${w.message} `)}}for(let m=0;m<h.records.length;m++){const g=h.records[m].schema,b=h.records[m].record,w=h.records[m].title;i.push(`checking.records.${w}`);try{let E=await this.create({schema:g,data:b,meta:h.records[m].meta});i.push(`doc.${w}.created`)}catch(E){E instanceof ui||i.push(`error in doc ${w} insertion: ${E.message}, doc: ${JSON.stringify(b)}`)}}let f={...h.meta,app_id:h.app_id,version:p};try{await this.modify_setting(h.app_id,f,"update");let m=this._get_blank_doc("system_log");m.data={text:v,steps:i,app:h.app_id},m.meta.title=v,await this.db_api.insert(m),console.log("init logged")}catch(m){throw console.log(m),console.log("error in storing/updating beanbagdb_version"),m}return f}async update_indexes(){this._check_ready_to_use();let a=await this.db_api.search({selector:{schema:"schema"}}),h=[];a.docs.map(p=>{Object.keys(p.data.schema.properties).map(y=>{h.push("data."+y)})}),await this.db_api.createIndex({index:{fields:h}})}async create(a){this._check_ready_to_use();let h=[];if(a.schema||h.push("schema is required"),a.data||h.push("data is required"),h.length>0)throw new ui(`${h.join(",")}.`);if(Object.keys(a.data).length==0)throw new ui("No data provided");try{let p=await this._insert_pre_checks(a.schema,a.data,a?.meta||{},a?.app||{},a?.settings||{}),y=await this.db_api.insert(p);return{_id:y.id,_rev:y.rev,...p}}catch(p){throw p}}async read(a){this._check_ready_to_use();let h={doc:null},p=null;if(a._id)try{let y=await this.db_api.get(a._id);h.doc=y}catch{throw new dn(Gr.error_codes.doc_not_found)}else if(a.link){let y=await this.db_api.search({selector:{"meta.link":a.link}});if(y.docs.length==0)throw new dn(Gr.error_codes.doc_not_found);h.doc=y.docs[0]}else if(a.hasOwnProperty("schema")&a.hasOwnProperty("data")){p=await this.get({type:"schema",criteria:{name:a.schema}});let y=p.data.settings.primary_keys,_={schema:a.schema};y.forEach(v=>{if(!a.data[v])throw new Gt("Incomplete Primary key set. Required field(s) : "+y.join(","));_["data."+v]=a.data[v]});let d=await this.db_api.search({selector:_});if(d.docs.length==0)throw new dn(Gr.error_codes.doc_not_found);h.doc=d.docs[0]}else throw new Gt('Invalid criteria to read a document. Valid ways : {"schema":"schema_name","data":{...primary key}} or {"_id":""} or {"link":""} ');if(p||(p=await this.get({type:"schema",criteria:{name:h.doc.schema}})),a.include_schema&&(h.schema=p.data),h.doc=await this._decrypt_doc(p.data,h.doc),a.text_template){let y=this._compile_template(a.text_template,p.data,h.doc);h.view=y}return h}async update(a){this._check_ready_to_use();const{criteria:h,updates:p,rev_id:y="",update_source:_="api",save_conflict:d=!0}=a;if(!h)throw new Jr("Doc search criteria not provided");if(!p)throw new Jr("No updates provided. Format {'update':{'data':{...selected fields},'meta':{},'app':{... used by apps to manage app data} }}");let v=await this.read({...h,include_schema:!0}),i=v.schema,f=v.doc;if(f.schema=="schema"&&f.data.system_generated==!0)throw new Jr("System schemas cannot be updated using this API");let m=Object.keys(i.schema.properties),g=i.settings.non_editable_fields,b=m.filter(O=>!g.includes(O)),w=!1,E=this.util_filter_object(p.data||{},b);if(Object.keys(E).length>0){let O={...f.data,...E};if(f.schema=="system_edge"&&(O=await this._create_edge(O)),O=this.util_validate_data({schema:i.schema,data:O}),i.settings.primary_keys.length>0){let j=i.settings.primary_keys,x={schema:i.name};j.map(P=>{x["data."+P]=O[P]});let S=await this.search({selector:x});if(S.docs.length>0)if(S.docs.length==1){if(S.docs[0]._id!=f._id)throw new Jr("Update not allowed. Document with the same primary key already exists")}else throw new Error("There is something wrong with the schema primary keys")}f.data=O,w=!0}if(p.meta){let O=Bl;Object.keys(O.properties);let j={...f.meta,...p.meta};if(j=this.util_validate_data({schema:O,data:j}),j.link){let x=await this.search({selector:{"meta.link":j.link}});if(x.docs.length>0)if(x.docs.length==1){if(x.docs[0]._id!=f._id)throw new Jr("Update not allowed. Document with the same link already exists")}else throw new Error("There is something wrong.")}f.meta={...j},w=!0}if(p.app&&(f.app||(f.app={}),Object.entries(p.app).forEach(([O,j])=>{if(!j||typeof j!="object"||!j.mode||!j.data)throw console.warn(`Invalid update format for ${O}`),new Jr(`Invalid update format for app ${O}. Must be an object {mode:"update|replace|append|remove", data:{} }`);switch(j.mode){case"update":f.app[O]={...f.app[O],...j.data},w=!0;break;case"replace":f.app[O]=j.data,w=!0;break;case"append":Object.entries(j.data).forEach(([x,S])=>{Array.isArray(f.app[O]?.[x])||(f.app[O]=f.app[O]||{},f.app[O][x]=[]),f.app[O][x].push(S)}),w=!0;break;case"remove":delete f.app[O],w=!0;break;default:throw new Jr(`Unknown mode: ${j.mode} app ${O}. Must be an object {mode:"update|replace|append|remove", data:{} }`)}})),w)return f=await this._encrypt_doc(i,f),f.meta.updated_on=this.util_get_now_unix_timestamp(),f.meta.updated_by=_,await this.db_api.update(f);throw new Jr("Nothing to update")}async delete(a){this._check_ready_to_use();let h=await this.read(a);if(["schema","system_setting","system_log"].includes(h.schema))throw new Error(`Deletion of ${h.schema} doc is not support yet.`);await this.db_api.delete(h.doc._id)}async search(a={}){if(this._check_ready_to_use(),!a.selector)throw new Gt("Invalid search query.Use {selector:{...query...}}");let h=await this.db_api.search(a);return{...{decrypt_docs:!1},...a?.options||{}}.decrypt_docs&&h.docs.length>0&&(h=await this._decrypt_docs(h)),h}async _decrypt_docs(a){const h=[...new Set(a.docs.map(d=>d.schema))];let p=await this.db_api.search({selector:{schema:"schema","data.name":{$in:h}}}),y={};p.docs.map(d=>{y[d.data.name]=d.data});let _=[];for(let d=0;d<a.docs.length;d++){const v=a.docs[d];_.push(await this._decrypt_doc(y[v.schema],v))}return{docs:_}}async get(a){const h={schema:async p=>{let y=await this.db_api.search({selector:{schema:"schema","data.name":p.name}});if(y.docs.length==0)throw new dn(Gr.error_codes.schema_not_found);return y.docs[0]},schema_list:async p=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new dn(Gr.error_codes.schema_not_found);{let _=[];return y.docs.map(d=>{_.push({name:d.data.name,version:d.data.version,system_defined:d.data.system_generated,description:d.data.description,link:d.meta.link,title:d.data.title,_id:d._id})}),_}},schema_icons:async p=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new dn(Gr.error_codes.schema_not_found);{let _={};return y.docs.map(d=>{_[d.data.name]=d.data.settings.svg_icon25||""}),_}},editable_meta_schema:async p=>Bl,related_doc:async p=>{let y=await this.read(p);if(y.doc){let _=y.doc._id,d=await this.search({selector:{schema:"system_edge",$or:[{"data.node1":{$in:[_]}},{"data.node2":{$in:[_]}}]},fields:["_id","meta","data"]});if(d.docs.length>0){let v=[];d.docs.map(g=>{v.push(g.data.node1),v.push(g.data.node2)});let i=await this.search({selector:{_id:{$in:v}},fields:["_id","meta"]}),f={};i.docs.map(g=>{f[g._id]=g.meta});let m=[];return d.docs.map(g=>{m.push({node1:g.data.node1,node2:g.data.node2,label:g.data.edge_name,edge_id:g._id})}),{edges:m,details:f}}else return{}}else throw new Gt("Doc not found")}};if(!a.type)throw new Gt("No type provided. Must be: "+Object.keys(h).join(","));if(Object.keys(h).includes(a.type))return await h[a.type](a?.criteria||{});throw new Gt("Invalid name. Must be : "+Object.keys(h).join(","))}async load_scripts(a,h){if(this._check_ready_to_use(),this.apps[a]={},h)for(let p in h)typeof h[p]=="function"&&(this.apps[a][p]=h[p].bind(null,this));else console.log("app_module is blank")}async modify_setting(a,h,p){if(!a||!h||!p)throw new Jr("All 3 inputs (setting name, value and update_mode) are required");let y=await this.db_api.search({selector:{schema:"system_setting","data.name":a}});if(!["append","update"].includes(p))throw new Jr("Invalid update_mode");if(y.docs.length>0){let _={...y.docs[0]};return Array.isArray(h)?_.data.value=p==="append"?[..._.data.value,h]:h:_.data.value=p==="append"?{..._.data.value,...h}:h,_.meta.updated_on=this.util_get_now_unix_timestamp(),await this.db_api.update(_),_}else{let _=this._get_blank_doc("system_setting");_.data={value:h,name:a},await this.db_api.insert(_)}}async _create_edge(a){console.log(a);let{node1:h,node2:p,edge_name:y,note:_="",level_weight:d=1}=a;if(this._check_ready_to_use(),!y)throw new Gt("edge_name required");if(!h||Object.keys(h).length==0)throw new Gt("node1 required");if(!p||Object.keys(p).length==0)throw new Gt("node2 required");typeof h=="string"&&(h={_id:h}),typeof p=="string"&&(p={_id:p});let v=await this.read(h),i=await this.read(p);if(v.doc._id==i.doc._id)throw new Gt("Both nodes cannot be the same");if(v.doc.schema=="system_edge"||i.doc.schema=="system_edge")throw new Gt("A node cannot be an existing edge document");let f;try{f=(await this.read({schema:"system_edge_constraint",data:{name:y}})).doc.data;let g=[],b=v.doc._id,w=i.doc._id,E=this._check_nodes_edge(f.node1,f.node2,v.doc.schema,i.doc.schema);E.valid?E.swapped&&(b=i.doc._id,w=v.doc._id):g.push("Invalid nodes.This config of nodes not allowed");let O=await this.search({selector:{schema:"system_edge","data.edge_name":y}});if(f.max_from_node1!=-1&&O.docs.filter(x=>x.data.node1==b).length>=f.max_from_node1&&g.push("max limit reached"),f.max_to_node2!=-1){let j=O.docs.filter(x=>x.data.node2==w);filter1.length>=f.max_from_node1&&g.push("max limit reached")}if(g.length==0)return{node1:b,node2:w,edge_name:y,note:_,level_weight:d};throw new Lv(g)}catch(m){if(m instanceof dn){let g={node1:"*",node2:"*",name:y,note:_};return await this.create({schema:"system_edge_constraint",data:g}),{node1:v.doc._id,node2:i.doc._id,edge_name:y,note:_,level_weight:d}}else throw m}}_check_node_schema_match(a,h){return a==="*"?!0:a.startsWith("*-")?!a.slice(2).split(",").includes(h):a.split(",").includes(h)}_check_nodes_edge(a,h,p,y){const _=this._check_node_schema_match(a,p),d=this._check_node_schema_match(h,y),v=this._check_node_schema_match(h,p),i=this._check_node_schema_match(a,y);return _&&d?{valid:!0,swapped:!1}:v&&i?{valid:!0,swapped:!0}:{valid:!1,swapped:!1}}_compile_template(a,h,p){try{if(!a||!h||!p)throw new Error("Incomplete info provided");let y=h.settings?.text_templates[a];if(!y)throw Error("Template not found");if(y.engine=="js_script")return((v,i)=>{const f=v.replace(/\\n/g,`
15
+ \r]*$`,description:"Must be a single line string"},note:{type:"string",minLength:1,maxLength:5e3}}},settings:{primary_keys:["name"],encrypted_fields:["value"],non_editable_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-key-fill" viewBox="0 0 16 16"><path d="M3.5 11.5a3.5 3.5 0 1 1 3.163-5H14L15.5 8 14 9.5l-1-1-1 1-1-1-1 1-1-1-1 1H6.663a3.5 3.5 0 0 1-3.163 2M2.5 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'}},{version:1.1,system_generated:!0,description:"The system relies on these settings for proper functioning or enabling optional features.",name:"system_setting",title:"System Setting",active:!0,schema:{required:["name","value"],type:"object",additionalProperties:!0,properties:{name:{type:"string",minLength:5,maxLength:1e3,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:["array","object"],default:{key:"value"}}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-gear-fill" viewBox="0 0 16 16"><path d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z"/></svg>'}},{name:"system_edge_constraint",title:"Edge constraint",system_generated:!0,active:!0,version:1,description:"To define edge constraints for simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","name"],properties:{node1:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},node2:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},name:{type:"string",minLength:1,maxLength:500,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},label:{type:"string",maxLength:500},note:{type:"string",maxLength:5e3},max_from_node1:{type:"number",default:-1},max_to_node2:{type:"number",default:-1}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-node-plus-fill" viewBox="0 0 16 16"><path d="M11 13a5 5 0 1 0-4.975-5.5H4A1.5 1.5 0 0 0 2.5 6h-1A1.5 1.5 0 0 0 0 7.5v1A1.5 1.5 0 0 0 1.5 10h1A1.5 1.5 0 0 0 4 8.5h2.025A5 5 0 0 0 11 13m.5-7.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2a.5.5 0 0 1 1 0"/></svg>'}},{name:"system_edge",title:"Edge in the system graph",active:!0,system_generated:!0,version:1.5,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","edge_name"],properties:{node1:{type:"string"},node2:{type:"string"},edge_name:{type:"string"},note:{type:"string",default:" "},level_weight:{type:"number",default:1,description:"This helps order nodes at the same level in the graph. Nodes at the same level will be ordered in ascending order"}}},settings:{primary_keys:["node1","node2","edge_name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-diagram-2-fill" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6 3.5A1.5 1.5 0 0 1 7.5 2h1A1.5 1.5 0 0 1 10 3.5v1A1.5 1.5 0 0 1 8.5 6v1H11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 5 7h2.5V6A1.5 1.5 0 0 1 6 4.5zm-3 8A1.5 1.5 0 0 1 4.5 10h1A1.5 1.5 0 0 1 7 11.5v1A1.5 1.5 0 0 1 5.5 14h-1A1.5 1.5 0 0 1 3 12.5zm6 0a1.5 1.5 0 0 1 1.5-1.5h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1A1.5 1.5 0 0 1 9 12.5z"/></svg>'}},{name:"system_media",title:"Media content",active:!0,system_generated:!0,version:1,description:"To store images as Base64",schema:{type:"object",additionalProperties:!0,required:["imageBase64","caption","source"],properties:{imageBase64:{type:"string",media:{binaryEncoding:"base64"}},caption:{type:"string"},source:{type:"string"}}},settings:{primary_keys:["caption"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-image" viewBox="0 0 16 16"><path d="M8.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/><path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2M3 2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8l-2.083-2.083a.5.5 0 0 0-.76.063L8 11 5.835 9.7a.5.5 0 0 0-.611.076L3 12z"/></svg>'}},{name:"system_log",system_generated:!0,title:"System log",active:!0,version:1.25,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["text"],properties:{text:{type:"string"},app:{type:"string"}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-clock-history" viewBox="0 0 16 16"><path d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/><path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/><path d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/></svg>'}},{name:"system_script",system_generated:!0,title:"Executable script",active:!0,version:1,description:"To create scripts that implement some logic. Can run both on browser and client.",schema:{type:"object",additionalProperties:!0,required:["script","type","version","name"],properties:{type:{type:"string",default:"JS"},name:{type:"string",default:"script-name",pattern:"^[a-zA-Z0-9\\-]+$"},script:{type:"string",description:"The script",default:""},usage:{type:"string",description:"Documentation",default:" "},version:{type:"number",default:.1},log_execution:{type:"boolean",default:!1}}},settings:{primary_keys:["name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-braces-asterisk" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C2.25 2 1.49 2.759 1.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6M14.886 7.9v.164c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456v-1.3c-1.114 0-1.49-.362-1.49-1.456V4.352C14.51 2.759 13.75 2 12.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6M7.5 11.5V9.207l-1.621 1.621-.707-.707L6.792 8.5H4.5v-1h2.293L5.172 5.879l.707-.707L7.5 6.792V4.5h1v2.293l1.621-1.621.707.707L9.208 7.5H11.5v1H9.207l1.621 1.621-.707.707L8.5 9.208V11.5z"/></svg>'}},{name:"system_text",system_generated:!0,title:"Text",active:!0,version:1.1,description:"Plain text with optional formatting",schema:{type:"object",additionalProperties:!1,required:[],properties:{text:{type:"string",default:"Text...",description:"Content"},format:{type:"string",default:"plain",description:"Content format"}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>'}}],records:[]},Bl={additionalProperties:!0,type:"object",properties:{tags:{type:"array",items:{type:"string"},default:[],maxItems:40},link:{type:"string",minLength:2,maxLength:2e3,pattern:"^[a-zA-Z0-9-]+$"},title:{type:"string",default:"Document",maxLength:1e4},ref:{type:"object",description:"This can be used by apps to add additional data for later user like version ",default:{}},location:{type:"object",description:"this can be used to add created_from and last_updated_from location to the doc",default:{}}}},Rv={additionalProperties:!0,type:"object",required:["app_id"],properties:{app_id:{type:"string"},meta:{type:"object",additionalProperties:!0},schemas:{type:"array",minItems:1},records:{type:"array",default:[]},default_setting:{type:"object",additionalProperties:!0,default:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-earmark" viewBox="0 0 16 16"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"/></svg>'}}}};class Gr{constructor(a){if(this.util_check_required_fields(["name","encryption_key","api","utils","db_name"],a),this.util_check_required_fields(["insert","update","delete","search","get","createIndex"],a.api),this.util_check_required_fields(["encrypt","decrypt","ping","validate_schema","compile_template"],a.utils),a.encryption_key.length<20)throw new Gt([{message:Gr.error_codes.key_short}]);this.encryption_key=a.encryption_key,this.db_name=a.db_name,this.db_api=a.api,this.utils=a.utils,this.meta={database_name:a.name,backend_database:this.db_name,beanbagdb_version_db:null},this._version=this._get_current_version(),this.active=!1,this.apps={},console.log("Run ready() now")}static error_codes={key_short:"The encryption key must at least contain 20 characters",not_active:"Database is not ready. Run ready() first",schema_not_found:"Schema not found",doc_not_found:"Document with selected criteria does not exists"};static rest_enabled={ready:{use:"Makes the database ready to use"},metadata:{use:"Returns metadata related to the current BeanBagDB instance "},initialize_app:{use:"To install/initialize an external app",input:"{...app_data}"},update_indexes:{use:"Updates the indexes in the database for better searching"},create:{input:"{schema,data,meta}",use:"Creates a new doc"},read:{input:"{criteria,include_schema:false}",use:"Returns a doc. 3 ways to search for a doc : by _id, by link or by the primary key of the schema "},update:{input:"{criteria,updates}",use:"Updates a document"},delete:{input:"{criteria}",use:"Deletes a doc"},search:{input:"{criteria:{selector:{...}}}",use:"To search in the database"},get:{input:"{type,criteria}",use:"Returns special types of documents "},create_edge:{input:"{node1:{..criteria},node2:{..criteria},edge_name,edge_label}",use:"Creates a new edge in the system's simple directed graph "},util_get_now_unix_timestamp:{use:"Returns the current UNIX timestamp"},util_validate_data:{input:"{schema:{},data:{}}",use:"Validate the given data against the given schema and returns errors/validated doc"},util_validate_schema_object:{input:"{...schema_object...}",use:"Validated the schema document without inserting it in the DB"},util_generate_random_link:{use:"Returns a random link"}};metadata(){return{...this.meta,beanbagdb_version_code:this._version,ready_to_use:this.active}}async check_ready(){console.log("checking if DB is ready to be used");let a=await this.db_api.search({selector:{schema:"system_setting","data.name":"beanbagdb_system"}});if(a.docs.length>0){let h=a.docs[0];this.active=h.data.value.version==this._version,this.meta.beanbagdb_version_db=h.data.value.version}return this.active||console.log("Version mismatch.Init of default required"),this.active}async ready(a=!0){if(await this.check_ready())console.log("Ready.Set.Go");else if(a)console.log("Initializing"),await this.initialize();else throw new Error("DB cannot be used because there is a version mismatch between the DB and the script. Since automatically init flag was set to true, exiting")}async initialize(){try{let a=await this.initialize_app(ta);return this.meta.beanbagdb_version_db=this._version,this.active=!0,a}catch(a){throw console.log("Error in initializing instance"),console.log(a),a}}async initialize_app(a){if(!a)throw new Error("app_data_input is required");let h=this.util_validate_data({schema:Rv,data:a}),p=0;h.schemas.map(m=>{p=p+m.version,m.settings.install_source=`app:${h.app_id}`}),h.records.map(m=>{p=p+m.version});let y=await this.db_api.search({selector:{schema:"system_setting","data.name":h.app_id}}),_=!0,d;if(y.docs.length>0&&(d=y.docs[0],d.data.value.version==p&&(_=!1)),!_)return d;let v=`Initializing ${h.app_id} app to v.${p}`,i=["update started"];for(let m=0;m<h.schemas.length;m++){const g=h.schemas[m].name,b=h.schemas[m];i.push(`checking.${g}`);try{let w=await this.get({type:"schema",criteria:{name:g}});if(w.data.version!=b.version){i.push(`old.${g}.v.${w.data.version}`);let E=await this.db_api.get(w._id);E.data={...b},E.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(E),await this.db_api.update(E),i.push(`new.${g}.v=${b.version}`)}else i.push(`${g}.v.${w.data.version}=latest`)}catch(w){if(w instanceof hn){if(g=="schema"&&h.app_id=="beanbagdb_system"){let E=this._get_blank_doc("schema");E.data=b,await this.db_api.insert(E)}else{let E=ta.schemas[0].schema,O=this._get_blank_schema_doc("schema",E,b);await this.db_api.insert(O)}i.push(`init.${g}.v=${b.version}`)}else i.push(`${g}.error.message : ${w.message} `)}}for(let m=0;m<h.records.length;m++){const g=h.records[m].schema,b=h.records[m].record,w=h.records[m].title;i.push(`checking.records.${w}`);try{let E=await this.create({schema:g,data:b,meta:h.records[m].meta});i.push(`doc.${w}.created`)}catch(E){E instanceof ui||i.push(`error in doc ${w} insertion: ${E.message}, doc: ${JSON.stringify(b)}`)}}let f={...h.meta,app_id:h.app_id,version:p};try{await this.modify_setting(h.app_id,f,"update");let m=this._get_blank_doc("system_log");m.data={text:v,steps:i,app:h.app_id},m.meta.title=v,await this.db_api.insert(m),console.log("init logged")}catch(m){throw console.log(m),console.log("error in storing/updating beanbagdb_version"),m}return f}async update_indexes(){this._check_ready_to_use();let a=await this.db_api.search({selector:{schema:"schema"}}),h=[];a.docs.map(p=>{Object.keys(p.data.schema.properties).map(y=>{h.push("data."+y)})}),await this.db_api.createIndex({index:{fields:h}})}async create(a){this._check_ready_to_use();let h=[];if(a.schema||h.push("schema is required"),a.data||h.push("data is required"),h.length>0)throw new ui(`${h.join(",")}.`);if(Object.keys(a.data).length==0)throw new ui("No data provided");try{let p=await this._insert_pre_checks(a.schema,a.data,a?.meta||{},a?.app||{},a?.settings||{}),y=await this.db_api.insert(p);return{_id:y.id,_rev:y.rev,...p}}catch(p){throw p}}async read(a){this._check_ready_to_use();let h={doc:null},p=null;if(a._id)try{let y=await this.db_api.get(a._id);h.doc=y}catch{throw new hn(Gr.error_codes.doc_not_found)}else if(a.link){let y=await this.db_api.search({selector:{"meta.link":a.link}});if(y.docs.length==0)throw new hn(Gr.error_codes.doc_not_found);h.doc=y.docs[0]}else if(a.hasOwnProperty("schema")&a.hasOwnProperty("data")){p=await this.get({type:"schema",criteria:{name:a.schema}});let y=p.data.settings.primary_keys,_={schema:a.schema};y.forEach(v=>{if(!a.data[v])throw new Gt("Incomplete Primary key set. Required field(s) : "+y.join(","));_["data."+v]=a.data[v]});let d=await this.db_api.search({selector:_});if(d.docs.length==0)throw new hn(Gr.error_codes.doc_not_found);h.doc=d.docs[0]}else throw new Gt('Invalid criteria to read a document. Valid ways : {"schema":"schema_name","data":{...primary key}} or {"_id":""} or {"link":""} ');if(p||(p=await this.get({type:"schema",criteria:{name:h.doc.schema}})),a.include_schema&&(h.schema=p.data),h.doc=await this._decrypt_doc(p.data,h.doc),a.text_template){let y=this._compile_template(a.text_template,p.data,h.doc);h.view=y}return h}async update(a){this._check_ready_to_use();const{criteria:h,updates:p,rev_id:y="",update_source:_="api",save_conflict:d=!0}=a;if(!h)throw new Jr("Doc search criteria not provided");if(!p)throw new Jr("No updates provided. Format {'update':{'data':{...selected fields},'meta':{},'app':{... used by apps to manage app data} }}");let v=await this.read({...h,include_schema:!0}),i=v.schema,f=v.doc;if(f.schema=="schema"&&f.data.system_generated==!0)throw new Jr("System schemas cannot be updated using this API");let m=Object.keys(i.schema.properties),g=i.settings.non_editable_fields,b=m.filter(O=>!g.includes(O)),w=!1,E=this.util_filter_object(p.data||{},b);if(Object.keys(E).length>0){let O={...f.data,...E};if(f.schema=="system_edge"&&(O=await this._create_edge(O)),O=this.util_validate_data({schema:i.schema,data:O}),i.settings.primary_keys.length>0){let j=i.settings.primary_keys,x={schema:i.name};j.map(P=>{x["data."+P]=O[P]});let S=await this.search({selector:x});if(S.docs.length>0)if(S.docs.length==1){if(S.docs[0]._id!=f._id)throw new Jr("Update not allowed. Document with the same primary key already exists")}else throw new Error("There is something wrong with the schema primary keys")}f.data=O,w=!0}if(p.meta){let O=Bl;Object.keys(O.properties);let j={...f.meta,...p.meta};if(j=this.util_validate_data({schema:O,data:j}),j.link){let x=await this.search({selector:{"meta.link":j.link}});if(x.docs.length>0)if(x.docs.length==1){if(x.docs[0]._id!=f._id)throw new Jr("Update not allowed. Document with the same link already exists")}else throw new Error("There is something wrong.")}f.meta={...j},w=!0}if(p.app&&(f.app||(f.app={}),Object.entries(p.app).forEach(([O,j])=>{if(!j||typeof j!="object"||!j.mode||!j.data)throw console.warn(`Invalid update format for ${O}`),new Jr(`Invalid update format for app ${O}. Must be an object {mode:"update|replace|append|remove", data:{} }`);switch(j.mode){case"update":f.app[O]={...f.app[O],...j.data},w=!0;break;case"replace":f.app[O]=j.data,w=!0;break;case"append":Object.entries(j.data).forEach(([x,S])=>{Array.isArray(f.app[O]?.[x])||(f.app[O]=f.app[O]||{},f.app[O][x]=[]),f.app[O][x].push(S)}),w=!0;break;case"remove":delete f.app[O],w=!0;break;default:throw new Jr(`Unknown mode: ${j.mode} app ${O}. Must be an object {mode:"update|replace|append|remove", data:{} }`)}})),w)return f=await this._encrypt_doc(i,f),f.meta.updated_on=this.util_get_now_unix_timestamp(),f.meta.updated_by=_,await this.db_api.update(f);throw new Jr("Nothing to update")}async delete(a){this._check_ready_to_use();let h=await this.read(a);if(["schema","system_setting","system_log"].includes(h.schema))throw new Error(`Deletion of ${h.schema} doc is not support yet.`);await this.db_api.delete(h.doc._id)}async search(a={}){if(this._check_ready_to_use(),!a.selector)throw new Gt("Invalid search query.Use {selector:{...query...}}");let h=await this.db_api.search(a);return{...{decrypt_docs:!1},...a?.options||{}}.decrypt_docs&&h.docs.length>0&&(h=await this._decrypt_docs(h)),h}async _decrypt_docs(a){const h=[...new Set(a.docs.map(d=>d.schema))];let p=await this.db_api.search({selector:{schema:"schema","data.name":{$in:h}}}),y={};p.docs.map(d=>{y[d.data.name]=d.data});let _=[];for(let d=0;d<a.docs.length;d++){const v=a.docs[d];_.push(await this._decrypt_doc(y[v.schema],v))}return{docs:_}}async get(a){const h={schema:async p=>{let y=await this.db_api.search({selector:{schema:"schema","data.name":p.name}});if(y.docs.length==0)throw new hn(Gr.error_codes.schema_not_found);return y.docs[0]},schema_list:async p=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new hn(Gr.error_codes.schema_not_found);{let _=[];return y.docs.map(d=>{_.push({name:d.data.name,version:d.data.version,system_defined:d.data.system_generated,description:d.data.description,link:d.meta.link,title:d.data.title,_id:d._id})}),_}},schema_icons:async p=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new hn(Gr.error_codes.schema_not_found);{let _={};return y.docs.map(d=>{_[d.data.name]=d.data.settings.svg_icon25||""}),_}},editable_meta_schema:async p=>Bl,related_doc:async p=>{let y=await this.read(p);if(y.doc){let _=y.doc._id,d=await this.search({selector:{schema:"system_edge",$or:[{"data.node1":{$in:[_]}},{"data.node2":{$in:[_]}}]},fields:["_id","meta","data"]});if(d.docs.length>0){let v=[];d.docs.map(g=>{v.push(g.data.node1),v.push(g.data.node2)});let i=await this.search({selector:{_id:{$in:v}},fields:["_id","meta"]}),f={};i.docs.map(g=>{f[g._id]=g.meta});let m=[];return d.docs.map(g=>{m.push({node1:g.data.node1,node2:g.data.node2,label:g.data.edge_name,edge_id:g._id})}),{edges:m,details:f}}else return{}}else throw new Gt("Doc not found")}};if(!a.type)throw new Gt("No type provided. Must be: "+Object.keys(h).join(","));if(Object.keys(h).includes(a.type))return await h[a.type](a?.criteria||{});throw new Gt("Invalid name. Must be : "+Object.keys(h).join(","))}async load_scripts(a,h){if(this._check_ready_to_use(),this.apps[a]={},h)for(let p in h)typeof h[p]=="function"&&(this.apps[a][p]=h[p].bind(null,this));else console.log("app_module is blank")}async modify_setting(a,h,p){if(!a||!h||!p)throw new Jr("All 3 inputs (setting name, value and update_mode) are required");let y=await this.db_api.search({selector:{schema:"system_setting","data.name":a}});if(!["append","update"].includes(p))throw new Jr("Invalid update_mode");if(y.docs.length>0){let _={...y.docs[0]};return Array.isArray(h)?_.data.value=p==="append"?[..._.data.value,h]:h:_.data.value=p==="append"?{..._.data.value,...h}:h,_.meta.updated_on=this.util_get_now_unix_timestamp(),await this.db_api.update(_),_}else{let _=this._get_blank_doc("system_setting");_.data={value:h,name:a},await this.db_api.insert(_)}}async _create_edge(a){console.log(a);let{node1:h,node2:p,edge_name:y,note:_="",level_weight:d=1}=a;if(this._check_ready_to_use(),!y)throw new Gt("edge_name required");if(!h||Object.keys(h).length==0)throw new Gt("node1 required");if(!p||Object.keys(p).length==0)throw new Gt("node2 required");typeof h=="string"&&(h={_id:h}),typeof p=="string"&&(p={_id:p});let v=await this.read(h),i=await this.read(p);if(v.doc._id==i.doc._id)throw new Gt("Both nodes cannot be the same");if(v.doc.schema=="system_edge"||i.doc.schema=="system_edge")throw new Gt("A node cannot be an existing edge document");let f;try{f=(await this.read({schema:"system_edge_constraint",data:{name:y}})).doc.data;let g=[],b=v.doc._id,w=i.doc._id,E=this._check_nodes_edge(f.node1,f.node2,v.doc.schema,i.doc.schema);E.valid?E.swapped&&(b=i.doc._id,w=v.doc._id):g.push("Invalid nodes.This config of nodes not allowed");let O=await this.search({selector:{schema:"system_edge","data.edge_name":y}});if(f.max_from_node1!=-1&&O.docs.filter(x=>x.data.node1==b).length>=f.max_from_node1&&g.push("max limit reached"),f.max_to_node2!=-1){let j=O.docs.filter(x=>x.data.node2==w);filter1.length>=f.max_from_node1&&g.push("max limit reached")}if(g.length==0)return{node1:b,node2:w,edge_name:y,note:_,level_weight:d};throw new Lv(g)}catch(m){if(m instanceof hn){let g={node1:"*",node2:"*",name:y,note:_};return await this.create({schema:"system_edge_constraint",data:g}),{node1:v.doc._id,node2:i.doc._id,edge_name:y,note:_,level_weight:d}}else throw m}}_check_node_schema_match(a,h){return a==="*"?!0:a.startsWith("*-")?!a.slice(2).split(",").includes(h):a.split(",").includes(h)}_check_nodes_edge(a,h,p,y){const _=this._check_node_schema_match(a,p),d=this._check_node_schema_match(h,y),v=this._check_node_schema_match(h,p),i=this._check_node_schema_match(a,y);return _&&d?{valid:!0,swapped:!1}:v&&i?{valid:!0,swapped:!0}:{valid:!1,swapped:!1}}_compile_template(a,h,p){try{if(!a||!h||!p)throw new Error("Incomplete info provided");let y=h.settings?.text_templates[a];if(!y)throw Error("Template not found");if(y.engine=="js_script")return((v,i)=>{const f=v.replace(/\\n/g,`
16
16
  `).replace(/\\t/g," ").trim();if(!f)throw new Error("Empty script provided");const m=`
17
17
  "use strict";
18
18
  const {doc, schema} = arguments[0] || {};
19
19
  ${f}
20
20
  `;try{const b=new Function(m)(i);if(b&&typeof b.text=="string")return b;throw new Error("Script must return {text: '...'}")}catch(g){throw new Error(`Script parse error: ${g.message}
21
- Script: ${f.substring(0,100)}...`)}})(y.template,{doc:p,schema:h}).text;if(this.utils.compile_template[y.engine]){let _=this.utils.compile_template[y.engine](y.template,{doc:p,schema:h});if(!_.text)throw new Error(`${a} template must return {'text': '...'}`);return _.text}else throw Error(`The engine ${y.engine} is not available in the current instance of BBDB.`)}catch(y){return`Unable to compile the template ${a}.Error: ${y.message}`}}async _upgrade_schema_in_bulk(a,h=!1,p="Schema Upgrade in bulk"){let y=["schema update started"],_=!1;for(let d=0;d<a.length;d++){const v=a[d].name,i=a[d];y.push(`checking.${v}`);try{let f=await this.get({type:"schema",criteria:{name:v}});if(f.data.version!=i.version){y.push(`old.${v}.v.${f.data.version}`);let m=await this.db_api.get(f._id);m.data={...i},m.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(m),await this.db_api.update(m),y.push(`new.${v}.v=${i.version}`),_=_||!0}else y.push(`${v}.v.${f.data.version}=latest`)}catch(f){if(f instanceof dn){let m=ta.schemas[0].schema,g=this._get_blank_schema_doc("schema",m,i);await this.db_api.insert(g),y.push(`init.${v}.v=${i.version}`),_=_||!0}else y.push(`${v}.error.message : ${f.message} `)}}if(_&&h)try{let d=this._get_blank_doc("system_log");d.data={text:p,data:{steps:y},time:this.util_get_now_unix_timestamp()},await this.db_api.insert(d)}catch(d){console.log(d)}return{update_was_required:_,logs:y}}_get_current_version(){let a=0;if(ta.schemas.map(h=>{a=a+h.version}),ta.records.map(h=>{a=a+h.version}),a==NaN)throw Error("Error in system schema version numbers");return a}_check_ready_to_use(){if(!this.active)throw new Error(Gr.error_codes.not_active)}_get_blank_doc(a){if(!a)throw new Error("Schema name not provided for the blank doc");let h=this.util_get_now_unix_timestamp(),p=`${h}`;return{data:{},meta:{created_on:h,tags:[],link:this.util_generate_random_link(),title:p},app:{},schema:a}}_get_blank_schema_doc(a,h,p){let y=this.util_validate_data({schema:h,data:p}),_=this._get_blank_doc(a);return _.data=y,_}async _decrypt_doc(a,h){try{for(let p of a.settings.encrypted_fields)h.data[p]=await this.utils.decrypt(h.data[p],this.encryption_key);return{...h}}catch(p){throw console.log(p),new Ch([{message:p.message}])}}async _encrypt_doc(a,h){try{if(a.settings.encrypted_fields.length>0)for(let p of a.settings.encrypted_fields)h.data[p]=await this.utils.encrypt(h.data[p],this.encryption_key);return{...h}}catch(p){throw new Ch([{message:p.message}])}}async _insert_pre_checks(a,h,p={},y={},_={}){let d=await this.search({selector:{schema:"schema","data.name":a}});if(d.docs.length==0)throw new ui(`The schema "${a}" does not exists`);let v=d.docs[0].data;if(!v.active)throw new ui(`The schema "${a}" is not active`);let i;if(a!="system_edge"&&(i=this.util_validate_data({schema:v.schema,data:h})),Object.keys(p).length>0&&(p=this.util_validate_data({schema:Bl,data:p})),Object.keys(y).length>0){let m={type:"object",patternProperties:{".*":{type:"object"}},additionalProperties:!1};this.util_validate_data({schema:m,data:y})}if(p.link&&(await this.search({selector:{"meta.link":p.link}})).docs.length>0)throw new ui(`Document with the link "${p.link}" already exists in the Database.`);if(a=="schema"?this.util_validate_schema_object(i):a=="system_edge"&&(i=await this._create_edge(h)),v.settings.primary_keys.length>0){let m={schema:a};if(v.settings.primary_keys.map(b=>{m["data."+b]=i[b]}),(await this.search({selector:m})).docs.length>0)throw new ui(`Document with the given primary key (${v.settings.primary_keys.join(",")}) already exists in the schema "${a}"`)}if(v.settings.encrypted_fields.length>0)for(let m of v.settings.encrypted_fields)i[m]=await this.utils.encrypt(i[m],this.encryption_key);let f=this._get_blank_doc(a);return f.data=i,p&&(f.meta={...f.meta,...p}),y&&(f.app=y),f}util_get_now_unix_timestamp(){return Math.floor(Date.now()/1e3)}util_check_required_fields(a,h){for(const p of a)if(!h[p])throw new Gt(`The field ${p} is required.`)}util_filter_object(a,h){return h.reduce((p,y)=>(Object.prototype.hasOwnProperty.call(a,y)&&(p[y]=a[y]),p),{})}util_validate_data(a){if(!a.schema)throw new Gt("schema is required");if(!a.data)throw new Gt("data is required");const{valid:h,validate:p,data:y}=this.utils.validate_schema(a.schema,a.data);if(h)return y;throw new Gt(p.errors)}util_validate_schema_object(a){let h=[{message:"Schema validation errors "}];a.schema.type?a.schema.type!="object"&&h.push({message:"The schema.'type' value is invalid.Only 'object' allowed"}):h.push({message:"Schema must have the field schema.'type' which can only be 'object' "}),a.schema.properties?(typeof a.schema.properties!="object"&&h.push({message:"Invalid schema.properties. It must be an object and must have atleast one field inside."}),Object.keys(a.schema.properties).length==0&&h.push({message:"You must define at least one property"})):h.push({message:"The schema.'properties' object does not exists"}),a.schema.hasOwnProperty("additionalProperties")?typeof a.schema.additionalProperties!="boolean"&&h.push({message:"Invalid schema.additionalProperties. It must be a boolean value"}):h.push({message:"The schema.'additionalProperties' field is required"});const p=Object.keys(a.schema.properties);if(a.settings.primary_keys.length>0&&(a.settings.primary_keys.every(_=>p.includes(_)&&a.schema.properties[_].type!="object"&&a.schema.properties[_].type!="array")||h.push({message:"Primary keys invalid. All keys must be defined in the schema and must be non object"})),a.settings.non_editable_fields.length>0&&(a.settings.non_editable_fields.every(_=>p.includes(_))||h.push({message:"Non editable fields invalid. All fields must be defined in the schema "})),a.settings.encrypted_fields.length>0&&(a.settings.encrypted_fields.every(d=>p.includes(d)&&a.schema.properties[d].type=="string")||h.push({message:"Invalid encrypted fields. All fields must be defined in the schema and must be string "}),a.settings.encrypted_fields.every(d=>!a.settings.primary_keys.includes(d))||h.push({message:"Invalid encrypted fields.Primary key fields cannot be encrypted "})),h.length>1)throw new Gt(h)}util_generate_random_link(a={type:1}){return{0:()=>{const p=["rain","mars","banana","earth","kiwi","mercury","fuji","hurricane","matterhorn","snow","saturn","jupiter","peach","wind","pluto","apple","k2","storm","venus","denali","cloud","sunshine","mango","drizzle","pineapple","aconcagua","gasherbrum","apricot","neptune","fog","orange","blueberry","kilimanjaro","uranus","grape","storm","montblanc","lemon","chooyu","raspberry","cherry","thunder","vinson","breeze","elbrus","everest","parbat","makalu","nanga","kangchenjunga","lightning","cyclone","comet","asteroid","pomegranate","nectarine","clementine","strawberry","tornado","avalanche","andes","rockies","himalayas","pyrenees","carpathians","cascade","etna","vesuvius","volcano","tundra","whirlwind","iceberg","eclipse","zephyr","tropic","monsoon","aurora"];return Array.from({length:3},()=>p[Math.floor(Math.random()*p.length)]).join("-")},1:()=>{const p=Math.floor(Math.random()*3)+6;return Math.floor(Math.random()*Math.pow(16,p)).toString(16).padStart(p,"0")}}[a.type]()}}class Gt extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Validation failed with error(s): ${h.join(",")}`;super(p),this.name="ValidationError",this.errors=a}}class Jr extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in document update. ${h.join(",")}`;super(p),this.name="DocUpdateError",this.errors=a}}class ui extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in document creation. ${h.join(",")}`;super(p),this.name="DocCreationError",this.errors=a}}class dn extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in fetching document. Criteria : ${h.join(",")}`;super(p),this.name="DocNotFoundError",this.errors=a}}class Ch extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in encryption/decryption of data : ${h.join(",")}`;super(p),this.name="EncryptionError",this.errors=a}}class Lv extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in relation of the simple digraph : ${h.join(",")}`;super(p),this.name="RelationError",this.errors=a}}var Av=Object.prototype.toString,Ki=Array.isArray||function(a){return Av.call(a)==="[object Array]"};function Fl(o){return typeof o=="function"}function $v(o){return Ki(o)?"array":typeof o}function Ml(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ph(o,a){return o!=null&&typeof o=="object"&&a in o}function Nv(o,a){return o!=null&&typeof o!="object"&&o.hasOwnProperty&&o.hasOwnProperty(a)}var Iv=RegExp.prototype.test;function Dv(o,a){return Iv.call(o,a)}var Bv=/\S/;function Fv(o){return!Dv(Bv,o)}var Mv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function Vv(o){return String(o).replace(/[&<>"'`=\/]/g,function(h){return Mv[h]})}var zv=/\s*/,qv=/\s+/,Th=/\s*=/,Hv=/\s*\}/,Uv=/#|\^|\/|>|\{|&|=|!/;function Gv(o,a){if(!o)return[];var h=!1,p=[],y=[],_=[],d=!1,v=!1,i="",f=0;function m(){if(d&&!v)for(;_.length;)delete y[_.pop()];else _=[];d=!1,v=!1}var g,b,w;function E(I){if(typeof I=="string"&&(I=I.split(qv,2)),!Ki(I)||I.length!==2)throw new Error("Invalid tags: "+I);g=new RegExp(Ml(I[0])+"\\s*"),b=new RegExp("\\s*"+Ml(I[1])),w=new RegExp("\\s*"+Ml("}"+I[1]))}E(a||mr.tags);for(var O=new ra(o),j,x,S,P,L,C;!O.eos();){if(j=O.pos,S=O.scanUntil(g),S)for(var R=0,A=S.length;R<A;++R)P=S.charAt(R),Fv(P)?(_.push(y.length),i+=P):(v=!0,h=!0,i+=" "),y.push(["text",P,j,j+1]),j+=1,P===`
21
+ Script: ${f.substring(0,100)}...`)}})(y.template,{doc:p,schema:h}).text;if(this.utils.compile_template[y.engine]){let _=this.utils.compile_template[y.engine](y.template,{doc:p,schema:h});if(!_.text)throw new Error(`${a} template must return {'text': '...'}`);return _.text}else throw Error(`The engine ${y.engine} is not available in the current instance of BBDB.`)}catch(y){return`Unable to compile the template ${a}.Error: ${y.message}`}}async _upgrade_schema_in_bulk(a,h=!1,p="Schema Upgrade in bulk"){let y=["schema update started"],_=!1;for(let d=0;d<a.length;d++){const v=a[d].name,i=a[d];y.push(`checking.${v}`);try{let f=await this.get({type:"schema",criteria:{name:v}});if(f.data.version!=i.version){y.push(`old.${v}.v.${f.data.version}`);let m=await this.db_api.get(f._id);m.data={...i},m.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(m),await this.db_api.update(m),y.push(`new.${v}.v=${i.version}`),_=_||!0}else y.push(`${v}.v.${f.data.version}=latest`)}catch(f){if(f instanceof hn){let m=ta.schemas[0].schema,g=this._get_blank_schema_doc("schema",m,i);await this.db_api.insert(g),y.push(`init.${v}.v=${i.version}`),_=_||!0}else y.push(`${v}.error.message : ${f.message} `)}}if(_&&h)try{let d=this._get_blank_doc("system_log");d.data={text:p,data:{steps:y},time:this.util_get_now_unix_timestamp()},await this.db_api.insert(d)}catch(d){console.log(d)}return{update_was_required:_,logs:y}}_get_current_version(){let a=0;if(ta.schemas.map(h=>{a=a+h.version}),ta.records.map(h=>{a=a+h.version}),a==NaN)throw Error("Error in system schema version numbers");return a}_check_ready_to_use(){if(!this.active)throw new Error(Gr.error_codes.not_active)}_get_blank_doc(a){if(!a)throw new Error("Schema name not provided for the blank doc");let h=this.util_get_now_unix_timestamp(),p=`${h}`;return{data:{},meta:{created_on:h,tags:[],link:this.util_generate_random_link(),title:p},app:{},schema:a}}_get_blank_schema_doc(a,h,p){let y=this.util_validate_data({schema:h,data:p}),_=this._get_blank_doc(a);return _.data=y,_}async _decrypt_doc(a,h){try{for(let p of a.settings.encrypted_fields)h.data[p]=await this.utils.decrypt(h.data[p],this.encryption_key);return{...h}}catch(p){throw console.log(p),new Ch([{message:p.message}])}}async _encrypt_doc(a,h){try{if(a.settings.encrypted_fields.length>0)for(let p of a.settings.encrypted_fields)h.data[p]=await this.utils.encrypt(h.data[p],this.encryption_key);return{...h}}catch(p){throw new Ch([{message:p.message}])}}async _insert_pre_checks(a,h,p={},y={},_={}){let d=await this.search({selector:{schema:"schema","data.name":a}});if(d.docs.length==0)throw new ui(`The schema "${a}" does not exists`);let v=d.docs[0].data;if(!v.active)throw new ui(`The schema "${a}" is not active`);let i;if(a!="system_edge"&&(i=this.util_validate_data({schema:v.schema,data:h})),Object.keys(p).length>0&&(p=this.util_validate_data({schema:Bl,data:p})),Object.keys(y).length>0){let m={type:"object",patternProperties:{".*":{type:"object"}},additionalProperties:!1};this.util_validate_data({schema:m,data:y})}if(p.link&&(await this.search({selector:{"meta.link":p.link}})).docs.length>0)throw new ui(`Document with the link "${p.link}" already exists in the Database.`);if(a=="schema"?this.util_validate_schema_object(i):a=="system_edge"&&(i=await this._create_edge(h)),v.settings.primary_keys.length>0){let m={schema:a};if(v.settings.primary_keys.map(b=>{m["data."+b]=i[b]}),(await this.search({selector:m})).docs.length>0)throw new ui(`Document with the given primary key (${v.settings.primary_keys.join(",")}) already exists in the schema "${a}"`)}if(v.settings.encrypted_fields.length>0)for(let m of v.settings.encrypted_fields)i[m]=await this.utils.encrypt(i[m],this.encryption_key);let f=this._get_blank_doc(a);return f.data=i,p&&(f.meta={...f.meta,...p}),y&&(f.app=y),f}util_get_now_unix_timestamp(){return Math.floor(Date.now()/1e3)}util_check_required_fields(a,h){for(const p of a)if(!h[p])throw new Gt(`The field ${p} is required.`)}util_filter_object(a,h){return h.reduce((p,y)=>(Object.prototype.hasOwnProperty.call(a,y)&&(p[y]=a[y]),p),{})}util_validate_data(a){if(!a.schema)throw new Gt("schema is required");if(!a.data)throw new Gt("data is required");const{valid:h,validate:p,data:y}=this.utils.validate_schema(a.schema,a.data);if(h)return y;throw new Gt(p.errors)}util_validate_schema_object(a){let h=[{message:"Schema validation errors "}];a.schema.type?a.schema.type!="object"&&h.push({message:"The schema.'type' value is invalid.Only 'object' allowed"}):h.push({message:"Schema must have the field schema.'type' which can only be 'object' "}),a.schema.properties?(typeof a.schema.properties!="object"&&h.push({message:"Invalid schema.properties. It must be an object and must have atleast one field inside."}),Object.keys(a.schema.properties).length==0&&h.push({message:"You must define at least one property"})):h.push({message:"The schema.'properties' object does not exists"}),a.schema.hasOwnProperty("additionalProperties")?typeof a.schema.additionalProperties!="boolean"&&h.push({message:"Invalid schema.additionalProperties. It must be a boolean value"}):h.push({message:"The schema.'additionalProperties' field is required"});const p=Object.keys(a.schema.properties);if(a.settings.primary_keys.length>0&&(a.settings.primary_keys.every(_=>p.includes(_)&&a.schema.properties[_].type!="object"&&a.schema.properties[_].type!="array")||h.push({message:"Primary keys invalid. All keys must be defined in the schema and must be non object"})),a.settings.non_editable_fields.length>0&&(a.settings.non_editable_fields.every(_=>p.includes(_))||h.push({message:"Non editable fields invalid. All fields must be defined in the schema "})),a.settings.encrypted_fields.length>0&&(a.settings.encrypted_fields.every(d=>p.includes(d)&&a.schema.properties[d].type=="string")||h.push({message:"Invalid encrypted fields. All fields must be defined in the schema and must be string "}),a.settings.encrypted_fields.every(d=>!a.settings.primary_keys.includes(d))||h.push({message:"Invalid encrypted fields.Primary key fields cannot be encrypted "})),h.length>1)throw new Gt(h)}util_generate_random_link(a={type:1}){return{0:()=>{const p=["rain","mars","banana","earth","kiwi","mercury","fuji","hurricane","matterhorn","snow","saturn","jupiter","peach","wind","pluto","apple","k2","storm","venus","denali","cloud","sunshine","mango","drizzle","pineapple","aconcagua","gasherbrum","apricot","neptune","fog","orange","blueberry","kilimanjaro","uranus","grape","storm","montblanc","lemon","chooyu","raspberry","cherry","thunder","vinson","breeze","elbrus","everest","parbat","makalu","nanga","kangchenjunga","lightning","cyclone","comet","asteroid","pomegranate","nectarine","clementine","strawberry","tornado","avalanche","andes","rockies","himalayas","pyrenees","carpathians","cascade","etna","vesuvius","volcano","tundra","whirlwind","iceberg","eclipse","zephyr","tropic","monsoon","aurora"];return Array.from({length:3},()=>p[Math.floor(Math.random()*p.length)]).join("-")},1:()=>{const p=Math.floor(Math.random()*3)+6;return Math.floor(Math.random()*Math.pow(16,p)).toString(16).padStart(p,"0")}}[a.type]()}}class Gt extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Validation failed with error(s): ${h.join(",")}`;super(p),this.name="ValidationError",this.errors=a}}class Jr extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in document update. ${h.join(",")}`;super(p),this.name="DocUpdateError",this.errors=a}}class ui extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in document creation. ${h.join(",")}`;super(p),this.name="DocCreationError",this.errors=a}}class hn extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in fetching document. Criteria : ${h.join(",")}`;super(p),this.name="DocNotFoundError",this.errors=a}}class Ch extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in encryption/decryption of data : ${h.join(",")}`;super(p),this.name="EncryptionError",this.errors=a}}class Lv extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let p=`Error in relation of the simple digraph : ${h.join(",")}`;super(p),this.name="RelationError",this.errors=a}}var Av=Object.prototype.toString,Ki=Array.isArray||function(a){return Av.call(a)==="[object Array]"};function Fl(o){return typeof o=="function"}function $v(o){return Ki(o)?"array":typeof o}function Ml(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ph(o,a){return o!=null&&typeof o=="object"&&a in o}function Nv(o,a){return o!=null&&typeof o!="object"&&o.hasOwnProperty&&o.hasOwnProperty(a)}var Iv=RegExp.prototype.test;function Dv(o,a){return Iv.call(o,a)}var Bv=/\S/;function Fv(o){return!Dv(Bv,o)}var Mv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function Vv(o){return String(o).replace(/[&<>"'`=\/]/g,function(h){return Mv[h]})}var zv=/\s*/,qv=/\s+/,Th=/\s*=/,Hv=/\s*\}/,Uv=/#|\^|\/|>|\{|&|=|!/;function Gv(o,a){if(!o)return[];var h=!1,p=[],y=[],_=[],d=!1,v=!1,i="",f=0;function m(){if(d&&!v)for(;_.length;)delete y[_.pop()];else _=[];d=!1,v=!1}var g,b,w;function E(I){if(typeof I=="string"&&(I=I.split(qv,2)),!Ki(I)||I.length!==2)throw new Error("Invalid tags: "+I);g=new RegExp(Ml(I[0])+"\\s*"),b=new RegExp("\\s*"+Ml(I[1])),w=new RegExp("\\s*"+Ml("}"+I[1]))}E(a||mr.tags);for(var O=new ra(o),j,x,S,P,L,C;!O.eos();){if(j=O.pos,S=O.scanUntil(g),S)for(var R=0,A=S.length;R<A;++R)P=S.charAt(R),Fv(P)?(_.push(y.length),i+=P):(v=!0,h=!0,i+=" "),y.push(["text",P,j,j+1]),j+=1,P===`
22
22
  `&&(m(),i="",f=0,h=!1);if(!O.scan(g))break;if(d=!0,x=O.scan(Uv)||"name",O.scan(zv),x==="="?(S=O.scanUntil(Th),O.scan(Th),O.scanUntil(b)):x==="{"?(S=O.scanUntil(w),O.scan(Hv),O.scanUntil(b),x="&"):S=O.scanUntil(b),!O.scan(b))throw new Error("Unclosed tag at "+O.pos);if(x==">"?L=[x,S,j,O.pos,i,f,h]:L=[x,S,j,O.pos],f++,y.push(L),x==="#"||x==="^")p.push(L);else if(x==="/"){if(C=p.pop(),!C)throw new Error('Unopened section "'+S+'" at '+j);if(C[1]!==S)throw new Error('Unclosed section "'+C[1]+'" at '+j)}else x==="name"||x==="{"||x==="&"?v=!0:x==="="&&E(S)}if(m(),C=p.pop(),C)throw new Error('Unclosed section "'+C[1]+'" at '+O.pos);return Kv(Jv(y))}function Jv(o){for(var a=[],h,p,y=0,_=o.length;y<_;++y)h=o[y],h&&(h[0]==="text"&&p&&p[0]==="text"?(p[1]+=h[1],p[3]=h[3]):(a.push(h),p=h));return a}function Kv(o){for(var a=[],h=a,p=[],y,_,d=0,v=o.length;d<v;++d)switch(y=o[d],y[0]){case"#":case"^":h.push(y),p.push(y),h=y[4]=[];break;case"/":_=p.pop(),_[5]=y[2],h=p.length>0?p[p.length-1][4]:a;break;default:h.push(y)}return a}function ra(o){this.string=o,this.tail=o,this.pos=0}ra.prototype.eos=function(){return this.tail===""},ra.prototype.scan=function(a){var h=this.tail.match(a);if(!h||h.index!==0)return"";var p=h[0];return this.tail=this.tail.substring(p.length),this.pos+=p.length,p},ra.prototype.scanUntil=function(a){var h=this.tail.search(a),p;switch(h){case-1:p=this.tail,this.tail="";break;case 0:p="";break;default:p=this.tail.substring(0,h),this.tail=this.tail.substring(h)}return this.pos+=p.length,p};function Wi(o,a){this.view=o,this.cache={".":this.view},this.parent=a}Wi.prototype.push=function(a){return new Wi(a,this)},Wi.prototype.lookup=function(a){var h=this.cache,p;if(h.hasOwnProperty(a))p=h[a];else{for(var y=this,_,d,v,i=!1;y;){if(a.indexOf(".")>0)for(_=y.view,d=a.split("."),v=0;_!=null&&v<d.length;)v===d.length-1&&(i=Ph(_,d[v])||Nv(_,d[v])),_=_[d[v++]];else _=y.view[a],i=Ph(y.view,a);if(i){p=_;break}y=y.parent}h[a]=p}return Fl(p)&&(p=p.call(this.view)),p};function rr(){this.templateCache={_cache:{},set:function(a,h){this._cache[a]=h},get:function(a){return this._cache[a]},clear:function(){this._cache={}}}}rr.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},rr.prototype.parse=function(a,h){var p=this.templateCache,y=a+":"+(h||mr.tags).join(":"),_=typeof p<"u",d=_?p.get(y):void 0;return d==null&&(d=Gv(a,h),_&&p.set(y,d)),d},rr.prototype.render=function(a,h,p,y){var _=this.getConfigTags(y),d=this.parse(a,_),v=h instanceof Wi?h:new Wi(h,void 0);return this.renderTokens(d,v,p,a,y)},rr.prototype.renderTokens=function(a,h,p,y,_){for(var d="",v,i,f,m=0,g=a.length;m<g;++m)f=void 0,v=a[m],i=v[0],i==="#"?f=this.renderSection(v,h,p,y,_):i==="^"?f=this.renderInverted(v,h,p,y,_):i===">"?f=this.renderPartial(v,h,p,_):i==="&"?f=this.unescapedValue(v,h):i==="name"?f=this.escapedValue(v,h,_):i==="text"&&(f=this.rawValue(v)),f!==void 0&&(d+=f);return d},rr.prototype.renderSection=function(a,h,p,y,_){var d=this,v="",i=h.lookup(a[1]);function f(b){return d.render(b,h,p,_)}if(i){if(Ki(i))for(var m=0,g=i.length;m<g;++m)v+=this.renderTokens(a[4],h.push(i[m]),p,y,_);else if(typeof i=="object"||typeof i=="string"||typeof i=="number")v+=this.renderTokens(a[4],h.push(i),p,y,_);else if(Fl(i)){if(typeof y!="string")throw new Error("Cannot use higher-order sections without the original template");i=i.call(h.view,y.slice(a[3],a[5]),f),i!=null&&(v+=i)}else v+=this.renderTokens(a[4],h,p,y,_);return v}},rr.prototype.renderInverted=function(a,h,p,y,_){var d=h.lookup(a[1]);if(!d||Ki(d)&&d.length===0)return this.renderTokens(a[4],h,p,y,_)},rr.prototype.indentPartial=function(a,h,p){for(var y=h.replace(/[^ \t]/g,""),_=a.split(`
23
23
  `),d=0;d<_.length;d++)_[d].length&&(d>0||!p)&&(_[d]=y+_[d]);return _.join(`
24
- `)},rr.prototype.renderPartial=function(a,h,p,y){if(p){var _=this.getConfigTags(y),d=Fl(p)?p(a[1]):p[a[1]];if(d!=null){var v=a[6],i=a[5],f=a[4],m=d;i==0&&f&&(m=this.indentPartial(d,f,v));var g=this.parse(m,_);return this.renderTokens(g,h,p,m,y)}}},rr.prototype.unescapedValue=function(a,h){var p=h.lookup(a[1]);if(p!=null)return p},rr.prototype.escapedValue=function(a,h,p){var y=this.getConfigEscape(p)||mr.escape,_=h.lookup(a[1]);if(_!=null)return typeof _=="number"&&y===mr.escape?String(_):y(_)},rr.prototype.rawValue=function(a){return a[1]},rr.prototype.getConfigTags=function(a){return Ki(a)?a:a&&typeof a=="object"?a.tags:void 0},rr.prototype.getConfigEscape=function(a){if(a&&typeof a=="object"&&!Ki(a))return a.escape};var mr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(o){na.templateCache=o},get templateCache(){return na.templateCache}},na=new rr;mr.clearCache=function(){return na.clearCache()},mr.parse=function(a,h){return na.parse(a,h)},mr.render=function(a,h,p,y){if(typeof a!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+$v(a)+'" was given as the first argument for mustache#render(template, view, partials)');return na.render(a,h,p,y)},mr.escape=Vv,mr.Scanner=ra,mr.Context=Wi,mr.Writer=rr;function Wv(o){try{const a=new URL(o),h=a.username,p=a.password;if(!h||!p)throw new Error("Username and password must be in URL (http://user:pass@host:port)");const y=`${a.protocol}//${a.host}`;return{username:h,password:p,baseUrl:y}}catch(a){throw new Error(`Invalid CouchDB URL format: ${a.message}. Use: http://user:pass@host:port`)}}const Zv=async o=>{if(!o.url)throw new Error("No DB URL provided");if(!o.name)throw new Error("No DB name provided");if(!o.encryption_key)throw new Error("No encryption key provided");const{username:a,password:h,baseUrl:p}=Wv(o.url);let y=o.name;console.log(p);const _=o.url.match(/^(https?:\/\/[^\/]+(?:\/[^\/]+)*)\/([^\/]+)$/);_&&(_[1],y=o.name||_[2]);const d=xt.create({baseURL:`${p}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:a,password:h}}),v=xt.create({baseURL:`${p}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:a,password:h}});try{await v.get("/")}catch(m){if(m.response?.status===404)await d.put(`/${y}`),console.log(`Created database: ${y}`);else throw m}const i={db_name:"couchdb-rest",name:y,encryption_key:o.encryption_key,api:{insert:async m=>(await v.post("/",m)).data,update:async m=>{if(!m._id||!m._rev)throw new Error("Document must have _id and _rev for update");return(await v.put(`/${m._id}`,m)).data},search:async m=>(await v.post("_find",m)).data,get:async m=>(await v.get(`/${m}`)).data,createIndex:async m=>(await v.post("_index",m)).data,delete:async m=>{const g=await v.get(`/${m}`);return(await v.delete(`/${g.data._id}?rev=${g.data._rev}`)).data}},utils:{encrypt:async(m,g)=>{const b=new TextEncoder,w=b.encode(m),E=b.encode(g);if(![16,24,32].includes(E.length))throw new Error("Encryption key must be 16, 24, or 32 bytes long.");const O=await crypto.subtle.importKey("raw",E,{name:"AES-GCM"},!1,["encrypt"]),j=crypto.getRandomValues(new Uint8Array(12)),x=await crypto.subtle.encrypt({name:"AES-GCM",iv:j},O,w),S=new Uint8Array(x),P=btoa(String.fromCharCode(...S));return`${btoa(String.fromCharCode(...j))}:${P}`},decrypt:async(m,g)=>{const[b,w]=m.split(":"),E=Uint8Array.from(atob(b),L=>L.charCodeAt(0)),O=Uint8Array.from(atob(w),L=>L.charCodeAt(0)),j=new TextEncoder,x=await crypto.subtle.importKey("raw",j.encode(g),{name:"AES-GCM"},!1,["decrypt"]),S=await crypto.subtle.decrypt({name:"AES-GCM",iv:E},x,O);return new TextDecoder().decode(S)},ping:async()=>{try{return await v.get("/"),!0}catch{return!1}},validate_schema:(m,g)=>{const b=new Tv({code:{esm:!0},strict:!1,useDefaults:!0}),w={...g},E=b.compile(m);return{valid:E(w),validate:E,data:w}},compile_template:{mustache:(m,g)=>mr.render(m,g)}}};return new Gr(i)},Yv="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Yv);const Qv=1,Xv=2,Rh=4,eb=8,tb=16,rb=1,nb=2,ib=4,ob=8,ab=16,sb=1,lb=2,Lh="[",Ts="[!",Vl="]",di={},Jt=Symbol(),cb="http://www.w3.org/1999/xhtml",zl=!1;var Ah=Array.isArray,ub=Array.prototype.indexOf,Rs=Array.from,Ls=Object.keys,As=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,db=Object.prototype,hb=Array.prototype,fb=Object.getPrototypeOf,$h=Object.isExtensible;function pb(o){for(var a=0;a<o.length;a++)o[a]()}function Nh(){var o,a,h=new Promise((p,y)=>{o=p,a=y});return{promise:h,resolve:o,reject:a}}const Kt=2,$s=4,Ns=8,Ih=1<<24,hn=16,fn=32,Rn=64,ql=128,_r=512,Qt=1024,nr=2048,pn=4096,yr=8192,mn=16384,Is=32768,Zi=65536,Dh=1<<17,Bh=1<<18,fi=1<<19,mb=1<<20,yn=1<<25,pi=32768,Hl=1<<21,Ul=1<<22,Ln=1<<23,ia=Symbol("$state"),Fh=Symbol("legacy props"),yb=Symbol(""),Yi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ds=3,mi=8;function vb(o){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function bb(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function gb(o){throw new Error("https://svelte.dev/e/effect_in_teardown")}function _b(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function wb(o){throw new Error("https://svelte.dev/e/effect_orphan")}function kb(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jb(){throw new Error("https://svelte.dev/e/hydration_failed")}function Eb(o){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ob(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function xb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Sb(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Cb(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function oa(o){console.warn("https://svelte.dev/e/hydration_mismatch")}function Pb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let st=!1;function vn(o){st=o}let lt;function Xt(o){if(o===null)throw oa(),di;return lt=o}function Qi(){return Xt(Rr(lt))}function Re(o){if(st){if(Rr(lt)!==null)throw oa(),di;lt=o}}function Tb(o=1){if(st){for(var a=o,h=lt;a--;)h=Rr(h);lt=h}}function Bs(o=!0){for(var a=0,h=lt;;){if(h.nodeType===mi){var p=h.data;if(p===Vl){if(a===0)return h;a-=1}else(p===Lh||p===Ts)&&(a+=1)}var y=Rr(h);o&&h.remove(),h=y}}function Mh(o){if(!o||o.nodeType!==mi)throw oa(),di;return o.data}function Vh(o){return o===this.v}function Rb(o,a){return o!=o?a==a:o!==a||o!==null&&typeof o=="object"||typeof o=="function"}function zh(o){return!Rb(o,this.v)}let Xi=!1,Lb=!1;function Ab(){Xi=!0}let Pt=null;function eo(o){Pt=o}function yi(o,a=!1,h){Pt={p:Pt,i:!1,c:null,e:null,s:o,x:null,l:Xi&&!a?{s:null,u:null,$:[]}:null}}function vi(o){var a=Pt,h=a.e;if(h!==null){a.e=null;for(var p of h)hf(p)}return o!==void 0&&(a.x=o),a.i=!0,Pt=a.p,o??{}}function aa(){return!Xi||Pt!==null&&Pt.l===null}let bi=[];function qh(){var o=bi;bi=[],pb(o)}function gi(o){if(bi.length===0&&!sa){var a=bi;queueMicrotask(()=>{a===bi&&qh()})}bi.push(o)}function $b(){for(;bi.length>0;)qh()}function Hh(o){var a=ct;if(a===null)return ot.f|=Ln,o;if((a.f&Is)===0){if((a.f&ql)===0)throw o;a.b.error(o)}else to(o,a)}function to(o,a){for(;a!==null;){if((a.f&ql)!==0)try{a.b.error(o);return}catch(h){o=h}a=a.parent}throw o}const Nb=-7169;function Ft(o,a){o.f=o.f&Nb|a}function Gl(o){(o.f&_r)!==0||o.deps===null?Ft(o,Qt):Ft(o,pn)}function Uh(o){if(o!==null)for(const a of o)(a.f&Kt)===0||(a.f&pi)===0||(a.f^=pi,Uh(a.deps))}function Gh(o,a,h){(o.f&nr)!==0?a.add(o):(o.f&pn)!==0&&h.add(o),Uh(o.deps),Ft(o,Qt)}const Fs=new Set;let pt=null,Ms=null,Cr=null,wr=[],Vs=null,Jl=!1,sa=!1;class Pr{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#o=0;#a=null;#i=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#o>0}process(a){wr=[],Ms=null,this.apply();var h=[],p=[];for(const y of a)this.#s(y,h,p);this.is_fork||this.#c(),this.is_deferred()?(this.#l(p),this.#l(h)):(Ms=this,pt=null,Kh(p),Kh(h),Ms=null,this.#a?.resolve()),Cr=null}#s(a,h,p){a.f^=Qt;for(var y=a.first,_=null;y!==null;){var d=y.f,v=(d&(fn|Rn))!==0,i=v&&(d&Qt)!==0,f=i||(d&yr)!==0||this.skipped_effects.has(y);if(!f&&y.fn!==null){v?y.f^=Qt:_!==null&&(d&($s|Ns|Ih))!==0?_.b.defer_effect(y):(d&$s)!==0?h.push(y):ua(y)&&((d&hn)!==0&&this.#i.add(y),da(y));var m=y.first;if(m!==null){y=m;continue}}var g=y.parent;for(y=y.next;y===null&&g!==null;)g===_&&(_=null),y=g.next,g=g.parent}}#l(a){for(var h=0;h<a.length;h+=1)Gh(a[h],this.#i,this.#n)}capture(a,h){h!==Jt&&!this.previous.has(a)&&this.previous.set(a,h),(a.f&Ln)===0&&(this.current.set(a,a.v),Cr?.set(a,a.v))}activate(){pt=this,this.apply()}deactivate(){pt===this&&(pt=null,Cr=null)}flush(){if(this.activate(),wr.length>0){if(Jh(),pt!==null&&pt!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const a of this.#t)a(this);this.#t.clear()}#c(){if(this.#o===0){for(const a of this.#e)a();this.#e.clear()}this.#r===0&&this.#u()}#u(){if(Fs.size>1){this.previous.clear();var a=Cr,h=!0;for(const y of Fs){if(y===this){h=!1;continue}const _=[];for(const[v,i]of this.current){if(y.current.has(v))if(h&&i!==y.current.get(v))y.current.set(v,i);else continue;_.push(v)}if(_.length===0)continue;const d=[...y.current.keys()].filter(v=>!this.current.has(v));if(d.length>0){var p=wr;wr=[];const v=new Set,i=new Map;for(const f of _)Wh(f,d,v,i);if(wr.length>0){pt=y,y.apply();for(const f of wr)y.#s(f,[],[]);y.deactivate()}wr=p}}pt=null,Cr=a}this.committed=!0,Fs.delete(this)}increment(a){this.#r+=1,a&&(this.#o+=1)}decrement(a){this.#r-=1,a&&(this.#o-=1),this.revive()}revive(){for(const a of this.#i)this.#n.delete(a),Ft(a,nr),gn(a);for(const a of this.#n)Ft(a,pn),gn(a);this.flush()}oncommit(a){this.#e.add(a)}ondiscard(a){this.#t.add(a)}settled(){return(this.#a??=Nh()).promise}static ensure(){if(pt===null){const a=pt=new Pr;Fs.add(pt),sa||Pr.enqueue(()=>{pt===a&&a.flush()})}return pt}static enqueue(a){gi(a)}apply(){}}function St(o){var a=sa;sa=!0;try{for(var h;;){if($b(),wr.length===0&&(pt?.flush(),wr.length===0))return Vs=null,h;Jh()}}finally{sa=a}}function Jh(){var o=ki;Jl=!0;var a=null;try{var h=0;for(Us(!0);wr.length>0;){var p=Pr.ensure();if(h++>1e3){var y,_;Ib()}p.process(wr),An.clear()}}finally{Jl=!1,Us(o),Vs=null}}function Ib(){try{kb()}catch(o){to(o,Vs)}}let bn=null;function Kh(o){var a=o.length;if(a!==0){for(var h=0;h<a;){var p=o[h++];if((p.f&(mn|yr))===0&&ua(p)&&(bn=new Set,da(p),p.deps===null&&p.first===null&&p.nodes===null&&(p.teardown===null&&p.ac===null?vf(p):p.fn=null),bn?.size>0)){An.clear();for(const y of bn){if((y.f&(mn|yr))!==0)continue;const _=[y];let d=y.parent;for(;d!==null;)bn.has(d)&&(bn.delete(d),_.push(d)),d=d.parent;for(let v=_.length-1;v>=0;v--){const i=_[v];(i.f&(mn|yr))===0&&da(i)}}bn.clear()}}bn=null}}function Wh(o,a,h,p){if(!h.has(o)&&(h.add(o),o.reactions!==null))for(const y of o.reactions){const _=y.f;(_&Kt)!==0?Wh(y,a,h,p):(_&(Ul|hn))!==0&&(_&nr)===0&&Zh(y,a,p)&&(Ft(y,nr),gn(y))}}function Zh(o,a,h){const p=h.get(o);if(p!==void 0)return p;if(o.deps!==null)for(const y of o.deps){if(a.includes(y))return!0;if((y.f&Kt)!==0&&Zh(y,a,h))return h.set(y,!0),!0}return h.set(o,!1),!1}function gn(o){for(var a=Vs=o;a.parent!==null;){a=a.parent;var h=a.f;if(Jl&&a===ct&&(h&hn)!==0&&(h&Bh)===0)return;if((h&(Rn|fn))!==0){if((h&Qt)===0)return;a.f^=Qt}}wr.push(a)}function Db(o){let a=0,h=_i(0),p;return()=>{Xl()&&(re(h),Hs(()=>(a===0&&(p=ha(()=>o(()=>la(h)))),a+=1,()=>{gi(()=>{a-=1,a===0&&(p?.(),p=void 0,la(h))})})))}}var Bb=Zi|fi|ql;function Fb(o,a,h){new Mb(o,a,h)}class Mb{parent;is_pending=!1;#e;#t=st?lt:null;#r;#o;#a;#i=null;#n=null;#s=null;#l=null;#c=null;#u=0;#d=0;#f=!1;#p=new Set;#m=new Set;#h=null;#_=Db(()=>(this.#h=_i(this.#u),()=>{this.#h=null}));constructor(a,h,p){this.#e=a,this.#r=h,this.#o=p,this.parent=ct.b,this.is_pending=!!this.#r.pending,this.#a=tc(()=>{if(ct.b=this,st){const _=this.#t;Qi(),_.nodeType===mi&&_.data===Ts?this.#k():(this.#w(),this.#d===0&&(this.is_pending=!1))}else{var y=this.#b();try{this.#i=jr(()=>p(y))}catch(_){this.error(_)}this.#d>0?this.#v():this.is_pending=!1}return()=>{this.#c?.remove()}},Bb),st&&(this.#e=lt)}#w(){try{this.#i=jr(()=>this.#o(this.#e))}catch(a){this.error(a)}}#k(){const a=this.#r.pending;a&&(this.#n=jr(()=>a(this.#e)),Pr.enqueue(()=>{var h=this.#b();this.#i=this.#y(()=>(Pr.ensure(),jr(()=>this.#o(h)))),this.#d>0?this.#v():(wi(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var a=this.#e;return this.is_pending&&(this.#c=dr(),this.#e.before(this.#c),a=this.#c),a}defer_effect(a){Gh(a,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#y(a){var h=ct,p=ot,y=Pt;Wr(this.#a),hr(this.#a),eo(this.#a.ctx);try{return a()}catch(_){return Hh(_),null}finally{Wr(h),hr(p),eo(y)}}#v(){const a=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),_f(this.#i,this.#l)),this.#n===null&&(this.#n=jr(()=>a(this.#e)))}#g(a){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(a);return}if(this.#d+=a,this.#d===0){this.is_pending=!1;for(const h of this.#p)Ft(h,nr),gn(h);for(const h of this.#m)Ft(h,pn),gn(h);this.#p.clear(),this.#m.clear(),this.#n&&wi(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(a){this.#g(a),this.#u+=a,this.#h&&ro(this.#h,this.#u)}get_effect_pending(){return this.#_(),re(this.#h)}error(a){var h=this.#r.onerror;let p=this.#r.failed;if(this.#f||!h&&!p)throw a;this.#i&&(ir(this.#i),this.#i=null),this.#n&&(ir(this.#n),this.#n=null),this.#s&&(ir(this.#s),this.#s=null),st&&(Xt(this.#t),Tb(),Xt(Bs()));var y=!1,_=!1;const d=()=>{if(y){Pb();return}y=!0,_&&Cb(),Pr.ensure(),this.#u=0,this.#s!==null&&wi(this.#s,()=>{this.#s=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#y(()=>(this.#f=!1,jr(()=>this.#o(this.#e)))),this.#d>0?this.#v():this.is_pending=!1};var v=ot;try{hr(null),_=!0,h?.(a,d),_=!1}catch(i){to(i,this.#a&&this.#a.parent)}finally{hr(v)}p&&gi(()=>{this.#s=this.#y(()=>{Pr.ensure(),this.#f=!0;try{return jr(()=>{p(this.#e,()=>a,()=>d)})}catch(i){return to(i,this.#a.parent),null}finally{this.#f=!1}})})}}function Vb(o,a,h,p){const y=aa()?Kl:Wl;if(h.length===0&&o.length===0){p(a.map(y));return}var _=pt,d=ct,v=zb();function i(){Promise.all(h.map(f=>qb(f))).then(f=>{v();try{p([...a.map(y),...f])}catch(m){(d.f&mn)===0&&to(m,d)}_?.deactivate(),zs()}).catch(f=>{to(f,d)})}o.length>0?Promise.all(o).then(()=>{v();try{return i()}finally{_?.deactivate(),zs()}}):i()}function zb(){var o=ct,a=ot,h=Pt,p=pt;return function(_=!0){Wr(o),hr(a),eo(h),_&&p?.activate()}}function zs(){Wr(null),hr(null),eo(null)}function Kl(o){var a=Kt|nr,h=ot!==null&&(ot.f&Kt)!==0?ot:null;return ct!==null&&(ct.f|=fi),{ctx:Pt,deps:null,effects:null,equals:Vh,f:a,fn:o,reactions:null,rv:0,v:Jt,wv:0,parent:h??ct,ac:null}}function qb(o,a,h){let p=ct;p===null&&bb();var y=p.b,_=void 0,d=_i(Jt),v=!ot,i=new Map;return Yb(()=>{var f=Nh();_=f.promise;try{Promise.resolve(o()).then(f.resolve,f.reject).then(()=>{m===pt&&m.committed&&m.deactivate(),zs()})}catch(w){f.reject(w),zs()}var m=pt;if(v){var g=y.is_rendered();y.update_pending_count(1),m.increment(g),i.get(m)?.reject(Yi),i.delete(m),i.set(m,f)}const b=(w,E=void 0)=>{if(m.activate(),E)E!==Yi&&(d.f|=Ln,ro(d,E));else{(d.f&Ln)!==0&&(d.f^=Ln),ro(d,w);for(const[O,j]of i){if(i.delete(O),O===m)break;j.reject(Yi)}}v&&(y.update_pending_count(-1),m.decrement(g))};f.promise.then(b,w=>b(null,w||"unknown"))}),df(()=>{for(const f of i.values())f.reject(Yi)}),new Promise(f=>{function m(g){function b(){g===_?f(d):m(_)}g.then(b,b)}m(_)})}function Wl(o){const a=Kl(o);return a.equals=zh,a}function Yh(o){var a=o.effects;if(a!==null){o.effects=null;for(var h=0;h<a.length;h+=1)ir(a[h])}}function Hb(o){for(var a=o.parent;a!==null;){if((a.f&Kt)===0)return(a.f&mn)===0?a:null;a=a.parent}return null}function Zl(o){var a,h=ct;Wr(Hb(o));try{o.f&=~pi,Yh(o),a=xf(o)}finally{Wr(h)}return a}function Qh(o){var a=Zl(o);if(!o.equals(a)&&(o.wv=Ef(),(!pt?.is_fork||o.deps===null)&&(o.v=a,o.deps===null))){Ft(o,Qt);return}$n||(Cr!==null?(Xl()||pt?.is_fork)&&Cr.set(o,a):Gl(o))}let Yl=new Set;const An=new Map;let Xh=!1;function _i(o,a){var h={f:0,v:o,reactions:null,equals:Vh,rv:0,wv:0};return h}function mt(o,a){const h=_i(o);return Xb(h),h}function ef(o,a=!1,h=!0){const p=_i(o);return a||(p.equals=zh),Xi&&h&&Pt!==null&&Pt.l!==null&&(Pt.l.s??=[]).push(p),p}function et(o,a,h=!1){ot!==null&&(!Lr||(ot.f&Dh)!==0)&&aa()&&(ot.f&(Kt|hn|Ul|Dh))!==0&&!_n?.includes(o)&&Sb();let p=h?kr(a):a;return ro(o,p)}function ro(o,a){if(!o.equals(a)){var h=o.v;$n?An.set(o,a):An.set(o,h),o.v=a;var p=Pr.ensure();if(p.capture(o,h),(o.f&Kt)!==0){const y=o;(o.f&nr)!==0&&Zl(y),Gl(y)}o.wv=Ef(),tf(o,nr),aa()&&ct!==null&&(ct.f&Qt)!==0&&(ct.f&(fn|Rn))===0&&(Er===null?eg([o]):Er.push(o)),!p.is_fork&&Yl.size>0&&!Xh&&Ub()}return a}function Ub(){Xh=!1;var o=ki;Us(!0);const a=Array.from(Yl);try{for(const h of a)(h.f&Qt)!==0&&Ft(h,pn),ua(h)&&da(h)}finally{Us(o)}Yl.clear()}function la(o){et(o,o.v+1)}function tf(o,a){var h=o.reactions;if(h!==null)for(var p=aa(),y=h.length,_=0;_<y;_++){var d=h[_],v=d.f;if(!(!p&&d===ct)){var i=(v&nr)===0;if(i&&Ft(d,a),(v&Kt)!==0){var f=d;Cr?.delete(f),(v&pi)===0&&(v&_r&&(d.f|=pi),tf(f,pn))}else i&&((v&hn)!==0&&bn!==null&&bn.add(d),gn(d))}}}function kr(o){if(typeof o!="object"||o===null||ia in o)return o;const a=fb(o);if(a!==db&&a!==hb)return o;var h=new Map,p=Ah(o),y=mt(0),_=ji,d=v=>{if(ji===_)return v();var i=ot,f=ji;hr(null),jf(_);var m=v();return hr(i),jf(f),m};return p&&h.set("length",mt(o.length)),new Proxy(o,{defineProperty(v,i,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ob();var m=h.get(i);return m===void 0?m=d(()=>{var g=mt(f.value);return h.set(i,g),g}):et(m,f.value,!0),!0},deleteProperty(v,i){var f=h.get(i);if(f===void 0){if(i in v){const m=d(()=>mt(Jt));h.set(i,m),la(y)}}else et(f,Jt),la(y);return!0},get(v,i,f){if(i===ia)return o;var m=h.get(i),g=i in v;if(m===void 0&&(!g||hi(v,i)?.writable)&&(m=d(()=>{var w=kr(g?v[i]:Jt),E=mt(w);return E}),h.set(i,m)),m!==void 0){var b=re(m);return b===Jt?void 0:b}return Reflect.get(v,i,f)},getOwnPropertyDescriptor(v,i){var f=Reflect.getOwnPropertyDescriptor(v,i);if(f&&"value"in f){var m=h.get(i);m&&(f.value=re(m))}else if(f===void 0){var g=h.get(i),b=g?.v;if(g!==void 0&&b!==Jt)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return f},has(v,i){if(i===ia)return!0;var f=h.get(i),m=f!==void 0&&f.v!==Jt||Reflect.has(v,i);if(f!==void 0||ct!==null&&(!m||hi(v,i)?.writable)){f===void 0&&(f=d(()=>{var b=m?kr(v[i]):Jt,w=mt(b);return w}),h.set(i,f));var g=re(f);if(g===Jt)return!1}return m},set(v,i,f,m){var g=h.get(i),b=i in v;if(p&&i==="length")for(var w=f;w<g.v;w+=1){var E=h.get(w+"");E!==void 0?et(E,Jt):w in v&&(E=d(()=>mt(Jt)),h.set(w+"",E))}if(g===void 0)(!b||hi(v,i)?.writable)&&(g=d(()=>mt(void 0)),et(g,kr(f)),h.set(i,g));else{b=g.v!==Jt;var O=d(()=>kr(f));et(g,O)}var j=Reflect.getOwnPropertyDescriptor(v,i);if(j?.set&&j.set.call(m,f),!b){if(p&&typeof i=="string"){var x=h.get("length"),S=Number(i);Number.isInteger(S)&&S>=x.v&&et(x,S+1)}la(y)}return!0},ownKeys(v){re(y);var i=Reflect.ownKeys(v).filter(g=>{var b=h.get(g);return b===void 0||b.v!==Jt});for(var[f,m]of h)m.v!==Jt&&!(f in v)&&i.push(f);return i},setPrototypeOf(){xb()}})}var rf,nf,of,af;function Ql(){if(rf===void 0){rf=window,nf=/Firefox/.test(navigator.userAgent);var o=Element.prototype,a=Node.prototype,h=Text.prototype;of=hi(a,"firstChild").get,af=hi(a,"nextSibling").get,$h(o)&&(o.__click=void 0,o.__className=void 0,o.__attributes=null,o.__style=void 0,o.__e=void 0),$h(h)&&(h.__t=void 0)}}function dr(o=""){return document.createTextNode(o)}function Tr(o){return of.call(o)}function Rr(o){return af.call(o)}function Le(o,a){if(!st)return Tr(o);var h=Tr(lt);if(h===null)h=lt.appendChild(dr());else if(a&&h.nodeType!==Ds){var p=dr();return h?.before(p),Xt(p),p}return Xt(h),h}function Mt(o,a=!1){if(!st){var h=Tr(o);return h instanceof Comment&&h.data===""?Rr(h):h}if(a&&lt?.nodeType!==Ds){var p=dr();return lt?.before(p),Xt(p),p}return lt}function Ue(o,a=1,h=!1){let p=st?lt:o;for(var y;a--;)y=p,p=Rr(p);if(!st)return p;if(h&&p?.nodeType!==Ds){var _=dr();return p===null?y?.after(_):p.before(_),Xt(_),_}return Xt(p),p}function sf(o){o.textContent=""}function lf(){return!1}let cf=!1;function uf(){cf||(cf=!0,document.addEventListener("reset",o=>{Promise.resolve().then(()=>{if(!o.defaultPrevented)for(const a of o.target.elements)a.__on_r?.()})},{capture:!0}))}function qs(o){var a=ot,h=ct;hr(null),Wr(null);try{return o()}finally{hr(a),Wr(h)}}function Gb(o,a,h,p=h){o.addEventListener(a,()=>qs(h));const y=o.__on_r;y?o.__on_r=()=>{y(),p(!0)}:o.__on_r=()=>p(!0),uf()}function Jb(o){ct===null&&(ot===null&&wb(),_b()),$n&&gb()}function Kb(o,a){var h=a.last;h===null?a.last=a.first=o:(h.next=o,o.prev=h,a.last=o)}function Kr(o,a,h){var p=ct;p!==null&&(p.f&yr)!==0&&(o|=yr);var y={ctx:Pt,deps:null,nodes:null,f:o|nr|_r,first:null,fn:a,last:null,next:null,parent:p,b:p&&p.b,prev:null,teardown:null,wv:0,ac:null};if(h)try{da(y),y.f|=Is}catch(v){throw ir(y),v}else a!==null&&gn(y);var _=y;if(h&&_.deps===null&&_.teardown===null&&_.nodes===null&&_.first===_.last&&(_.f&fi)===0&&(_=_.first,(o&hn)!==0&&(o&Zi)!==0&&_!==null&&(_.f|=Zi)),_!==null&&(_.parent=p,p!==null&&Kb(_,p),ot!==null&&(ot.f&Kt)!==0&&(o&Rn)===0)){var d=ot;(d.effects??=[]).push(_)}return y}function Xl(){return ot!==null&&!Lr}function df(o){const a=Kr(Ns,null,!1);return Ft(a,Qt),a.teardown=o,a}function ec(o){Jb();var a=ct.f,h=!ot&&(a&fn)!==0&&(a&Is)===0;if(h){var p=Pt;(p.e??=[]).push(o)}else return hf(o)}function hf(o){return Kr($s|mb,o,!1)}function Wb(o){Pr.ensure();const a=Kr(Rn|fi,o,!0);return()=>{ir(a)}}function Zb(o){Pr.ensure();const a=Kr(Rn|fi,o,!0);return(h={})=>new Promise(p=>{h.outro?wi(a,()=>{ir(a),p(void 0)}):(ir(a),p(void 0))})}function ff(o){return Kr($s,o,!1)}function Yb(o){return Kr(Ul|fi,o,!0)}function Hs(o,a=0){return Kr(Ns|a,o,!0)}function Vt(o,a=[],h=[],p=[]){Vb(p,a,h,y=>{Kr(Ns,()=>o(...y.map(re)),!0)})}function tc(o,a=0){var h=Kr(hn|a,o,!0);return h}function jr(o){return Kr(fn|fi,o,!0)}function pf(o){var a=o.teardown;if(a!==null){const h=$n,p=ot;wf(!0),hr(null);try{a.call(null)}finally{wf(h),hr(p)}}}function mf(o,a=!1){var h=o.first;for(o.first=o.last=null;h!==null;){const y=h.ac;y!==null&&qs(()=>{y.abort(Yi)});var p=h.next;(h.f&Rn)!==0?h.parent=null:ir(h,a),h=p}}function Qb(o){for(var a=o.first;a!==null;){var h=a.next;(a.f&fn)===0&&ir(a),a=h}}function ir(o,a=!0){var h=!1;(a||(o.f&Bh)!==0)&&o.nodes!==null&&o.nodes.end!==null&&(yf(o.nodes.start,o.nodes.end),h=!0),mf(o,a&&!h),Gs(o,0),Ft(o,mn);var p=o.nodes&&o.nodes.t;if(p!==null)for(const _ of p)_.stop();pf(o);var y=o.parent;y!==null&&y.first!==null&&vf(o),o.next=o.prev=o.teardown=o.ctx=o.deps=o.fn=o.nodes=o.ac=null}function yf(o,a){for(;o!==null;){var h=o===a?null:Rr(o);o.remove(),o=h}}function vf(o){var a=o.parent,h=o.prev,p=o.next;h!==null&&(h.next=p),p!==null&&(p.prev=h),a!==null&&(a.first===o&&(a.first=p),a.last===o&&(a.last=h))}function wi(o,a,h=!0){var p=[];bf(o,p,!0);var y=()=>{h&&ir(o),a&&a()},_=p.length;if(_>0){var d=()=>--_||y();for(var v of p)v.out(d)}else y()}function bf(o,a,h){if((o.f&yr)===0){o.f^=yr;var p=o.nodes&&o.nodes.t;if(p!==null)for(const v of p)(v.is_global||h)&&a.push(v);for(var y=o.first;y!==null;){var _=y.next,d=(y.f&Zi)!==0||(y.f&fn)!==0&&(o.f&hn)!==0;bf(y,a,d?h:!1),y=_}}}function rc(o){gf(o,!0)}function gf(o,a){if((o.f&yr)!==0){o.f^=yr,(o.f&Qt)===0&&(Ft(o,nr),gn(o));for(var h=o.first;h!==null;){var p=h.next,y=(h.f&Zi)!==0||(h.f&fn)!==0;gf(h,y?a:!1),h=p}var _=o.nodes&&o.nodes.t;if(_!==null)for(const d of _)(d.is_global||a)&&d.in()}}function _f(o,a){if(o.nodes)for(var h=o.nodes.start,p=o.nodes.end;h!==null;){var y=h===p?null:Rr(h);a.append(h),h=y}}let ki=!1;function Us(o){ki=o}let $n=!1;function wf(o){$n=o}let ot=null,Lr=!1;function hr(o){ot=o}let ct=null;function Wr(o){ct=o}let _n=null;function Xb(o){ot!==null&&(_n===null?_n=[o]:_n.push(o))}let or=null,vr=0,Er=null;function eg(o){Er=o}let kf=1,ca=0,ji=ca;function jf(o){ji=o}function Ef(){return++kf}function ua(o){var a=o.f;if((a&nr)!==0)return!0;if(a&Kt&&(o.f&=~pi),(a&pn)!==0){for(var h=o.deps,p=h.length,y=0;y<p;y++){var _=h[y];if(ua(_)&&Qh(_),_.wv>o.wv)return!0}(a&_r)!==0&&Cr===null&&Ft(o,Qt)}return!1}function Of(o,a,h=!0){var p=o.reactions;if(p!==null&&!_n?.includes(o))for(var y=0;y<p.length;y++){var _=p[y];(_.f&Kt)!==0?Of(_,a,!1):a===_&&(h?Ft(_,nr):(_.f&Qt)!==0&&Ft(_,pn),gn(_))}}function xf(o){var a=or,h=vr,p=Er,y=ot,_=_n,d=Pt,v=Lr,i=ji,f=o.f;or=null,vr=0,Er=null,ot=(f&(fn|Rn))===0?o:null,_n=null,eo(o.ctx),Lr=!1,ji=++ca,o.ac!==null&&(qs(()=>{o.ac.abort(Yi)}),o.ac=null);try{o.f|=Hl;var m=o.fn,g=m(),b=o.deps;if(or!==null){var w;if(Gs(o,vr),b!==null&&vr>0)for(b.length=vr+or.length,w=0;w<or.length;w++)b[vr+w]=or[w];else o.deps=b=or;if(Xl()&&(o.f&_r)!==0)for(w=vr;w<b.length;w++)(b[w].reactions??=[]).push(o)}else b!==null&&vr<b.length&&(Gs(o,vr),b.length=vr);if(aa()&&Er!==null&&!Lr&&b!==null&&(o.f&(Kt|pn|nr))===0)for(w=0;w<Er.length;w++)Of(Er[w],o);return y!==null&&y!==o&&(ca++,Er!==null&&(p===null?p=Er:p.push(...Er))),(o.f&Ln)!==0&&(o.f^=Ln),g}catch(E){return Hh(E)}finally{o.f^=Hl,or=a,vr=h,Er=p,ot=y,_n=_,eo(d),Lr=v,ji=i}}function tg(o,a){let h=a.reactions;if(h!==null){var p=ub.call(h,o);if(p!==-1){var y=h.length-1;y===0?h=a.reactions=null:(h[p]=h[y],h.pop())}}if(h===null&&(a.f&Kt)!==0&&(or===null||!or.includes(a))){var _=a;(_.f&_r)!==0&&(_.f^=_r,_.f&=~pi),Gl(_),Yh(_),Gs(_,0)}}function Gs(o,a){var h=o.deps;if(h!==null)for(var p=a;p<h.length;p++)tg(o,h[p])}function da(o){var a=o.f;if((a&mn)===0){Ft(o,Qt);var h=ct,p=ki;ct=o,ki=!0;try{(a&(hn|Ih))!==0?Qb(o):mf(o),pf(o);var y=xf(o);o.teardown=typeof y=="function"?y:null,o.wv=kf;var _;zl&&Lb&&(o.f&nr)!==0&&o.deps}finally{ki=p,ct=h}}}async function rg(){await Promise.resolve(),St()}function re(o){var a=o.f,h=(a&Kt)!==0;if(ot!==null&&!Lr){var p=ct!==null&&(ct.f&mn)!==0;if(!p&&!_n?.includes(o)){var y=ot.deps;if((ot.f&Hl)!==0)o.rv<ca&&(o.rv=ca,or===null&&y!==null&&y[vr]===o?vr++:or===null?or=[o]:or.includes(o)||or.push(o));else{(ot.deps??=[]).push(o);var _=o.reactions;_===null?o.reactions=[ot]:_.includes(ot)||_.push(ot)}}}if($n&&An.has(o))return An.get(o);if(h){var d=o;if($n){var v=d.v;return((d.f&Qt)===0&&d.reactions!==null||Cf(d))&&(v=Zl(d)),An.set(d,v),v}var i=(d.f&_r)===0&&!Lr&&ot!==null&&(ki||(ot.f&_r)!==0),f=d.deps===null;ua(d)&&(i&&(d.f|=_r),Qh(d)),i&&!f&&Sf(d)}if(Cr?.has(o))return Cr.get(o);if((o.f&Ln)!==0)throw o.v;return o.v}function Sf(o){if(o.deps!==null){o.f|=_r;for(const a of o.deps)(a.reactions??=[]).push(o),(a.f&Kt)!==0&&(a.f&_r)===0&&Sf(a)}}function Cf(o){if(o.v===Jt)return!0;if(o.deps===null)return!1;for(const a of o.deps)if(An.has(a)||(a.f&Kt)!==0&&Cf(a))return!0;return!1}function ha(o){var a=Lr;try{return Lr=!0,o()}finally{Lr=a}}const Pf=new Set,nc=new Set;function ng(o,a,h,p={}){function y(_){if(p.capture||fa.call(a,_),!_.cancelBubble)return qs(()=>h?.call(this,_))}return o.startsWith("pointer")||o.startsWith("touch")||o==="wheel"?gi(()=>{a.addEventListener(o,y,p)}):a.addEventListener(o,y,p),y}function ig(o,a,h,p,y){var _={capture:p,passive:y},d=ng(o,a,h,_);(a===document.body||a===window||a===document||a instanceof HTMLMediaElement)&&df(()=>{a.removeEventListener(o,d,_)})}function ic(o){for(var a=0;a<o.length;a++)Pf.add(o[a]);for(var h of nc)h(o)}let Tf=null;function fa(o){var a=this,h=a.ownerDocument,p=o.type,y=o.composedPath?.()||[],_=y[0]||o.target;Tf=o;var d=0,v=Tf===o&&o.__root;if(v){var i=y.indexOf(v);if(i!==-1&&(a===document||a===window)){o.__root=a;return}var f=y.indexOf(a);if(f===-1)return;i<=f&&(d=i)}if(_=y[d]||o.target,_!==a){As(o,"currentTarget",{configurable:!0,get(){return _||h}});var m=ot,g=ct;hr(null),Wr(null);try{for(var b,w=[];_!==null;){var E=_.assignedSlot||_.parentNode||_.host||null;try{var O=_["__"+p];O!=null&&(!_.disabled||o.target===_)&&O.call(_,o)}catch(j){b?w.push(j):b=j}if(o.cancelBubble||E===a||E===null)break;_=E}if(b){for(let j of w)queueMicrotask(()=>{throw j});throw b}}finally{o.__root=a,delete o.currentTarget,hr(m),Wr(g)}}}function Rf(o){var a=document.createElement("template");return a.innerHTML=o.replaceAll("<!>","<!---->"),a.content}function Zr(o,a){var h=ct;h.nodes===null&&(h.nodes={start:o,end:a,a:null,t:null})}function dt(o,a){var h=(a&sb)!==0,p=(a&lb)!==0,y,_=!o.startsWith("<!>");return()=>{if(st)return Zr(lt,null),lt;y===void 0&&(y=Rf(_?o:"<!>"+o),h||(y=Tr(y)));var d=p||nf?document.importNode(y,!0):y.cloneNode(!0);if(h){var v=Tr(d),i=d.lastChild;Zr(v,i)}else Zr(d,d);return d}}function oc(o=""){if(!st){var a=dr(o+"");return Zr(a,a),a}var h=lt;return h.nodeType!==Ds&&(h.before(h=dr()),Xt(h)),Zr(h,h),h}function Nn(){if(st)return Zr(lt,null),lt;var o=document.createDocumentFragment(),a=document.createComment(""),h=dr();return o.append(a,h),Zr(a,h),o}function Me(o,a){if(st){var h=ct;((h.f&Is)===0||h.nodes.end===null)&&(h.nodes.end=lt),Qi();return}o!==null&&o.before(a)}const og=["touchstart","touchmove"];function ag(o){return og.includes(o)}function Tt(o,a){var h=a==null?"":typeof a=="object"?a+"":a;h!==(o.__t??=o.nodeValue)&&(o.__t=h,o.nodeValue=h+"")}function Lf(o,a){return Af(o,a)}function sg(o,a){Ql(),a.intro=a.intro??!1;const h=a.target,p=st,y=lt;try{for(var _=Tr(h);_&&(_.nodeType!==mi||_.data!==Lh);)_=Rr(_);if(!_)throw di;vn(!0),Xt(_);const d=Af(o,{...a,anchor:_});return vn(!1),d}catch(d){if(d instanceof Error&&d.message.split(`
25
- `).some(v=>v.startsWith("https://svelte.dev/e/")))throw d;return d!==di&&console.warn("Failed to hydrate: ",d),a.recover===!1&&jb(),Ql(),sf(h),vn(!1),Lf(o,a)}finally{vn(p),Xt(y)}}const no=new Map;function Af(o,{target:a,anchor:h,props:p={},events:y,context:_,intro:d=!0}){Ql();var v=new Set,i=g=>{for(var b=0;b<g.length;b++){var w=g[b];if(!v.has(w)){v.add(w);var E=ag(w);a.addEventListener(w,fa,{passive:E});var O=no.get(w);O===void 0?(document.addEventListener(w,fa,{passive:E}),no.set(w,1)):no.set(w,O+1)}}};i(Rs(Pf)),nc.add(i);var f=void 0,m=Zb(()=>{var g=h??a.appendChild(dr());return Fb(g,{pending:()=>{}},b=>{if(_){yi({});var w=Pt;w.c=_}if(y&&(p.$$events=y),st&&Zr(b,null),f=o(b,p)||{},st&&(ct.nodes.end=lt,lt===null||lt.nodeType!==mi||lt.data!==Vl))throw oa(),di;_&&vi()}),()=>{for(var b of v){a.removeEventListener(b,fa);var w=no.get(b);--w===0?(document.removeEventListener(b,fa),no.delete(b)):no.set(b,w)}nc.delete(i),g!==h&&g.parentNode?.removeChild(g)}});return ac.set(f,m),f}let ac=new WeakMap;function lg(o,a){const h=ac.get(o);return h?(ac.delete(o),h(a)):Promise.resolve()}class cg{anchor;#e=new Map;#t=new Map;#r=new Map;#o=new Set;#a=!0;constructor(a,h=!0){this.anchor=a,this.#a=h}#i=()=>{var a=pt;if(this.#e.has(a)){var h=this.#e.get(a),p=this.#t.get(h);if(p)rc(p),this.#o.delete(h);else{var y=this.#r.get(h);y&&(this.#t.set(h,y.effect),this.#r.delete(h),y.fragment.lastChild.remove(),this.anchor.before(y.fragment),p=y.effect)}for(const[_,d]of this.#e){if(this.#e.delete(_),_===a)break;const v=this.#r.get(d);v&&(ir(v.effect),this.#r.delete(d))}for(const[_,d]of this.#t){if(_===h||this.#o.has(_))continue;const v=()=>{if(Array.from(this.#e.values()).includes(_)){var f=document.createDocumentFragment();_f(d,f),f.append(dr()),this.#r.set(_,{effect:d,fragment:f})}else ir(d);this.#o.delete(_),this.#t.delete(_)};this.#a||!p?(this.#o.add(_),wi(d,v,!1)):v()}}};#n=a=>{this.#e.delete(a);const h=Array.from(this.#e.values());for(const[p,y]of this.#r)h.includes(p)||(ir(y.effect),this.#r.delete(p))};ensure(a,h){var p=pt,y=lf();if(h&&!this.#t.has(a)&&!this.#r.has(a))if(y){var _=document.createDocumentFragment(),d=dr();_.append(d),this.#r.set(a,{effect:jr(()=>h(d)),fragment:_})}else this.#t.set(a,jr(()=>h(this.anchor)));if(this.#e.set(p,a),y){for(const[v,i]of this.#t)v===a?p.skipped_effects.delete(i):p.skipped_effects.add(i);for(const[v,i]of this.#r)v===a?p.skipped_effects.delete(i.effect):p.skipped_effects.add(i.effect);p.oncommit(this.#i),p.ondiscard(this.#n)}else st&&(this.anchor=lt),this.#i()}}function Js(o){Pt===null&&vb(),Xi&&Pt.l!==null?ug(Pt).m.push(o):ec(()=>{const a=ha(o);if(typeof a=="function")return a})}function ug(o){var a=o.l;return a.u??={a:[],b:[],m:[]}}function Rt(o,a,h=!1){st&&Qi();var p=new cg(o),y=h?Zi:0;function _(d,v){if(st){const f=Mh(o)===Ts;if(d===f){var i=Bs();Xt(i),p.anchor=i,vn(!1),p.ensure(d,v),vn(!0);return}}p.ensure(d,v)}tc(()=>{var d=!1;a((v,i=!0)=>{d=!0,_(i,v)}),d||_(!1,null)},y)}function pa(o,a){return a}function dg(o,a,h){for(var p=[],y=a.length,_,d=a.length,v=0;v<y;v++){let g=a[v];wi(g,()=>{if(_){if(_.pending.delete(g),_.done.add(g),_.pending.size===0){var b=o.outrogroups;sc(Rs(_.done)),b.delete(_),b.size===0&&(o.outrogroups=null)}}else d-=1},!1)}if(d===0){var i=p.length===0&&h!==null;if(i){var f=h,m=f.parentNode;sf(m),m.append(f),o.items.clear()}sc(a,!i)}else _={pending:new Set(a),done:new Set},(o.outrogroups??=new Set).add(_)}function sc(o,a=!0){for(var h=0;h<o.length;h++)ir(o[h],a)}var $f;function io(o,a,h,p,y,_=null){var d=o,v=new Map,i=(a&Rh)!==0;if(i){var f=o;d=st?Xt(Tr(f)):f.appendChild(dr())}st&&Qi();var m=null,g=Wl(()=>{var x=h();return Ah(x)?x:x==null?[]:Rs(x)}),b,w=!0;function E(){j.fallback=m,hg(j,b,d,a,p),m!==null&&(b.length===0?(m.f&yn)===0?rc(m):(m.f^=yn,ma(m,null,d)):wi(m,()=>{m=null}))}var O=tc(()=>{b=re(g);var x=b.length;let S=!1;if(st){var P=Mh(d)===Ts;P!==(x===0)&&(d=Bs(),Xt(d),vn(!1),S=!0)}for(var L=new Set,C=pt,R=lf(),A=0;A<x;A+=1){st&&lt.nodeType===mi&&lt.data===Vl&&(d=lt,S=!0,vn(!1));var I=b[A],D=p(I,A),M=w?null:v.get(D);M?(M.v&&ro(M.v,I),M.i&&ro(M.i,A),R&&C.skipped_effects.delete(M.e)):(M=fg(v,w?d:$f??=dr(),I,D,A,y,a,h),w||(M.e.f|=yn),v.set(D,M)),L.add(D)}if(x===0&&_&&!m&&(w?m=jr(()=>_(d)):(m=jr(()=>_($f??=dr())),m.f|=yn)),st&&x>0&&Xt(Bs()),!w)if(R){for(const[V,G]of v)L.has(V)||C.skipped_effects.add(G.e);C.oncommit(E),C.ondiscard(()=>{})}else E();S&&vn(!0),re(g)}),j={effect:O,items:v,outrogroups:null,fallback:m};w=!1,st&&(d=lt)}function hg(o,a,h,p,y){var _=(p&eb)!==0,d=a.length,v=o.items,i=o.effect.first,f,m=null,g,b=[],w=[],E,O,j,x;if(_)for(x=0;x<d;x+=1)E=a[x],O=y(E,x),j=v.get(O).e,(j.f&yn)===0&&(j.nodes?.a?.measure(),(g??=new Set).add(j));for(x=0;x<d;x+=1){if(E=a[x],O=y(E,x),j=v.get(O).e,o.outrogroups!==null)for(const M of o.outrogroups)M.pending.delete(j),M.done.delete(j);if((j.f&yn)!==0)if(j.f^=yn,j===i)ma(j,null,h);else{var S=m?m.next:i;j===o.effect.last&&(o.effect.last=j.prev),j.prev&&(j.prev.next=j.next),j.next&&(j.next.prev=j.prev),In(o,m,j),In(o,j,S),ma(j,S,h),m=j,b=[],w=[],i=m.next;continue}if((j.f&yr)!==0&&(rc(j),_&&(j.nodes?.a?.unfix(),(g??=new Set).delete(j))),j!==i){if(f!==void 0&&f.has(j)){if(b.length<w.length){var P=w[0],L;m=P.prev;var C=b[0],R=b[b.length-1];for(L=0;L<b.length;L+=1)ma(b[L],P,h);for(L=0;L<w.length;L+=1)f.delete(w[L]);In(o,C.prev,R.next),In(o,m,C),In(o,R,P),i=P,m=R,x-=1,b=[],w=[]}else f.delete(j),ma(j,i,h),In(o,j.prev,j.next),In(o,j,m===null?o.effect.first:m.next),In(o,m,j),m=j;continue}for(b=[],w=[];i!==null&&i!==j;)(f??=new Set).add(i),w.push(i),i=i.next;if(i===null)continue}(j.f&yn)===0&&b.push(j),m=j,i=j.next}if(o.outrogroups!==null){for(const M of o.outrogroups)M.pending.size===0&&(sc(Rs(M.done)),o.outrogroups?.delete(M));o.outrogroups.size===0&&(o.outrogroups=null)}if(i!==null||f!==void 0){var A=[];if(f!==void 0)for(j of f)(j.f&yr)===0&&A.push(j);for(;i!==null;)(i.f&yr)===0&&i!==o.fallback&&A.push(i),i=i.next;var I=A.length;if(I>0){var D=(p&Rh)!==0&&d===0?h:null;if(_){for(x=0;x<I;x+=1)A[x].nodes?.a?.measure();for(x=0;x<I;x+=1)A[x].nodes?.a?.fix()}dg(o,A,D)}}_&&gi(()=>{if(g!==void 0)for(j of g)j.nodes?.a?.apply()})}function fg(o,a,h,p,y,_,d,v){var i=(d&Qv)!==0?(d&tb)===0?ef(h,!1,!1):_i(h):null,f=(d&Xv)!==0?_i(y):null;return{v:i,i:f,e:jr(()=>(_(a,i??h,f??y,v),()=>{o.delete(p)}))}}function ma(o,a,h){if(o.nodes)for(var p=o.nodes.start,y=o.nodes.end,_=a&&(a.f&yn)===0?a.nodes.start:h;p!==null;){var d=Rr(p);if(_.before(p),p===y)return;p=d}}function In(o,a,h){a===null?o.effect.first=h:a.next=h,h===null?o.effect.last=a:h.prev=a}function pg(o,a,h=!1,p=!1,y=!1){var _=o,d="";Vt(()=>{var v=ct;if(d===(d=a()??"")){st&&Qi();return}if(v.nodes!==null&&(yf(v.nodes.start,v.nodes.end),v.nodes=null),d!==""){if(st){lt.data;for(var i=Qi(),f=i;i!==null&&(i.nodeType!==mi||i.data!=="");)f=i,i=Rr(i);if(i===null)throw oa(),di;Zr(lt,f),_=Xt(i);return}var m=d+"";h?m=`<svg>${m}</svg>`:p&&(m=`<math>${m}</math>`);var g=Rf(m);if((h||p)&&(g=Tr(g)),Zr(Tr(g),g.lastChild),h||p)for(;Tr(g);)_.before(Tr(g));else _.before(g)}})}function ya(o,a){ff(()=>{var h=o.getRootNode(),p=h.host?h:h.head??h.ownerDocument.head;if(!p.querySelector("#"+a.hash)){const y=document.createElement("style");y.id=a.hash,y.textContent=a.code,p.appendChild(y)}})}const Nf=[...`
26
- \r\f \v\uFEFF`];function mg(o,a,h){var p=""+o;if(h){for(var y in h)if(h[y])p=p?p+" "+y:y;else if(p.length)for(var _=y.length,d=0;(d=p.indexOf(y,d))>=0;){var v=d+_;(d===0||Nf.includes(p[d-1]))&&(v===p.length||Nf.includes(p[v]))?p=(d===0?"":p.substring(0,d))+p.substring(v+1):d=v}}return p===""?null:p}function yg(o,a,h,p,y,_){var d=o.__className;if(st||d!==h||d===void 0){var v=mg(h,p,_);(!st||v!==o.getAttribute("class"))&&(v==null?o.removeAttribute("class"):o.className=v),o.__className=h}else if(_&&y!==_)for(var i in _){var f=!!_[i];(y==null||f!==!!y[i])&&o.classList.toggle(i,f)}return _}const vg=Symbol("is custom element"),bg=Symbol("is html");function lc(o){if(st){var a=!1,h=()=>{if(!a){if(a=!0,o.hasAttribute("value")){var p=o.value;If(o,"value",null),o.value=p}if(o.hasAttribute("checked")){var y=o.checked;If(o,"checked",null),o.checked=y}}};o.__on_r=h,gi(h),uf()}}function If(o,a,h,p){var y=gg(o);st&&(y[a]=o.getAttribute(a),a==="src"||a==="srcset"||a==="href"&&o.nodeName==="LINK")||y[a]!==(y[a]=h)&&(a==="loading"&&(o[yb]=h),o.removeAttribute(a))}function gg(o){return o.__attributes??={[vg]:o.nodeName.includes("-"),[bg]:o.namespaceURI===cb}}function cc(o,a,h=a){var p=new WeakSet;Gb(o,"input",async y=>{var _=y?o.defaultValue:o.value;if(_=uc(o)?dc(_):_,h(_),pt!==null&&p.add(pt),await rg(),_!==(_=a())){var d=o.selectionStart,v=o.selectionEnd,i=o.value.length;if(o.value=_??"",v!==null){var f=o.value.length;d===v&&v===i&&f>i?(o.selectionStart=f,o.selectionEnd=f):(o.selectionStart=d,o.selectionEnd=Math.min(v,f))}}}),(st&&o.defaultValue!==o.value||ha(a)==null&&o.value)&&(h(uc(o)?dc(o.value):o.value),pt!==null&&p.add(pt)),Hs(()=>{var y=a();if(o===document.activeElement){var _=Ms??pt;if(p.has(_))return}uc(o)&&y===dc(o.value)||o.type==="date"&&!y&&!o.value||y!==o.value&&(o.value=y??"")})}function uc(o){var a=o.type;return a==="number"||a==="range"}function dc(o){return o===""?null:+o}function Df(o,a){return o===a||o?.[ia]===a}function Bf(o={},a,h,p){return ff(()=>{var y,_;return Hs(()=>{y=_,_=[],ha(()=>{o!==h(..._)&&(a(o,..._),y&&Df(h(...y),o)&&a(null,...y))})}),()=>{gi(()=>{_&&Df(h(..._),o)&&a(null,..._)})}}),o}let Ks=!1;function _g(o){var a=Ks;try{return Ks=!1,[o(),Ks]}finally{Ks=a}}function Dt(o,a,h,p){var y=!Xi||(h&nb)!==0,_=(h&ob)!==0,d=(h&ab)!==0,v=p,i=!0,f=()=>(i&&(i=!1,v=d?ha(p):p),v),m;if(_){var g=ia in o||Fh in o;m=hi(o,a)?.set??(g&&a in o?P=>o[a]=P:void 0)}var b,w=!1;_?[b,w]=_g(()=>o[a]):b=o[a],b===void 0&&p!==void 0&&(b=f(),m&&(y&&Eb(),m(b)));var E;if(y?E=()=>{var P=o[a];return P===void 0?f():(i=!0,P)}:E=()=>{var P=o[a];return P!==void 0&&(v=void 0),P===void 0?v:P},y&&(h&ib)===0)return E;if(m){var O=o.$$legacy;return(function(P,L){return arguments.length>0?((!y||!L||O||w)&&m(L?E():P),P):E()})}var j=!1,x=((h&rb)!==0?Kl:Wl)(()=>(j=!1,E()));_&&re(x);var S=ct;return(function(P,L){if(arguments.length>0){const C=L?re(x):y&&_?kr(P):P;return et(x,C),j=!0,v!==void 0&&(v=C),P}return $n&&j||(S.f&mn)!==0?x.v:re(x)})}function wg(o){return new kg(o)}class kg{#e;#t;constructor(a){var h=new Map,p=(_,d)=>{var v=ef(d,!1,!1);return h.set(_,v),v};const y=new Proxy({...a.props||{},$$events:{}},{get(_,d){return re(h.get(d)??p(d,Reflect.get(_,d)))},has(_,d){return d===Fh?!0:(re(h.get(d)??p(d,Reflect.get(_,d))),Reflect.has(_,d))},set(_,d,v){return et(h.get(d)??p(d,v),v),Reflect.set(_,d,v)}});this.#t=(a.hydrate?sg:Lf)(a.component,{target:a.target,anchor:a.anchor,props:y,context:a.context,intro:a.intro??!1,recover:a.recover}),(!a?.props?.$$host||a.sync===!1)&&St(),this.#e=y.$$events;for(const _ of Object.keys(this.#t))_==="$set"||_==="$destroy"||_==="$on"||As(this,_,{get(){return this.#t[_]},set(d){this.#t[_]=d},enumerable:!0});this.#t.$set=_=>{Object.assign(y,_)},this.#t.$destroy=()=>{lg(this.#t)}}$set(a){this.#t.$set(a)}$on(a,h){this.#e[a]=this.#e[a]||[];const p=(...y)=>h.call(this,...y);return this.#e[a].push(p),()=>{this.#e[a]=this.#e[a].filter(y=>y!==p)}}$destroy(){this.#t.$destroy()}}let Ff;typeof HTMLElement=="function"&&(Ff=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(o,a,h){super(),this.$$ctor=o,this.$$s=a,h&&this.attachShadow({mode:"open"})}addEventListener(o,a,h){if(this.$$l[o]=this.$$l[o]||[],this.$$l[o].push(a),this.$$c){const p=this.$$c.$on(o,a);this.$$l_u.set(a,p)}super.addEventListener(o,a,h)}removeEventListener(o,a,h){if(super.removeEventListener(o,a,h),this.$$c){const p=this.$$l_u.get(a);p&&(p(),this.$$l_u.delete(a))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let o=function(p){return y=>{const _=document.createElement("slot");p!=="default"&&(_.name=p),Me(y,_)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const a={},h=jg(this);for(const p of this.$$s)p in h&&(p==="default"&&!this.$$d.children?(this.$$d.children=o(p),a.default=!0):a[p]=o(p));for(const p of this.attributes){const y=this.$$g_p(p.name);y in this.$$d||(this.$$d[y]=Ws(y,p.value,this.$$p_d,"toProp"))}for(const p in this.$$p_d)!(p in this.$$d)&&this[p]!==void 0&&(this.$$d[p]=this[p],delete this[p]);this.$$c=wg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:a,$$host:this}}),this.$$me=Wb(()=>{Hs(()=>{this.$$r=!0;for(const p of Ls(this.$$c)){if(!this.$$p_d[p]?.reflect)continue;this.$$d[p]=this.$$c[p];const y=Ws(p,this.$$d[p],this.$$p_d,"toAttribute");y==null?this.removeAttribute(this.$$p_d[p].attribute||p):this.setAttribute(this.$$p_d[p].attribute||p,y)}this.$$r=!1})});for(const p in this.$$l)for(const y of this.$$l[p]){const _=this.$$c.$on(p,y);this.$$l_u.set(y,_)}this.$$l={}}}attributeChangedCallback(o,a,h){this.$$r||(o=this.$$g_p(o),this.$$d[o]=Ws(o,h,this.$$p_d,"toProp"),this.$$c?.$set({[o]:this.$$d[o]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(o){return Ls(this.$$p_d).find(a=>this.$$p_d[a].attribute===o||!this.$$p_d[a].attribute&&a.toLowerCase()===o)||o}});function Ws(o,a,h,p){const y=h[o]?.type;if(a=y==="Boolean"&&typeof a!="boolean"?a!=null:a,!p||!h[o])return a;if(p==="toAttribute")switch(y){case"Object":case"Array":return a==null?null:JSON.stringify(a);case"Boolean":return a?"":null;case"Number":return a??null;default:return a}else switch(y){case"Object":case"Array":return a&&JSON.parse(a);case"Boolean":return a;case"Number":return a!=null?+a:a;default:return a}}function jg(o){const a={};return o.childNodes.forEach(h=>{a[h.slot||"default"]=!0}),a}function Dn(o,a,h,p,y,_){let d=class extends Ff{constructor(){super(o,h,y),this.$$p_d=a}static get observedAttributes(){return Ls(a).map(v=>(a[v].attribute||v).toLowerCase())}};return Ls(a).forEach(v=>{As(d.prototype,v,{get(){return this.$$c&&v in this.$$c?this.$$c[v]:this.$$d[v]},set(i){i=Ws(v,i,a),this.$$d[v]=i;var f=this.$$c;if(f){var m=hi(f,v)?.get;m?f[v]=i:f.$set({[v]:i})}}})}),p.forEach(v=>{As(d.prototype,v,{get(){return this.$$c?.[v]}})}),o.element=d,d}var hc={exports:{}};var Mf;function Eg(){return Mf||(Mf=1,(function(o,a){(function(h,p){o.exports=p()})(self,(()=>(()=>{var h={9306:(d,v,i)=>{var f=i(4901),m=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(m(b)+" is not a function")}},5548:(d,v,i)=>{var f=i(3517),m=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(m(b)+" is not a constructor")}},3506:(d,v,i)=>{var f=i(3925),m=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g("Can't set "+m(b)+" as a prototype")}},6469:(d,v,i)=>{var f=i(8227),m=i(2360),g=i(4913).f,b=f("unscopables"),w=Array.prototype;w[b]===void 0&&g(w,b,{configurable:!0,value:m(null)}),d.exports=function(E){w[b][E]=!0}},7829:(d,v,i)=>{var f=i(8183).charAt;d.exports=function(m,g,b){return g+(b?f(m,g).length:1)}},679:(d,v,i)=>{var f=i(1625),m=TypeError;d.exports=function(g,b){if(f(b,g))return g;throw new m("Incorrect invocation")}},8551:(d,v,i)=>{var f=i(34),m=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(m(b)+" is not an object")}},235:(d,v,i)=>{var f=i(9213).forEach,m=i(4598)("forEach");d.exports=m?[].forEach:function(g){return f(this,g,arguments.length>1?arguments[1]:void 0)}},7916:(d,v,i)=>{var f=i(6080),m=i(9565),g=i(8981),b=i(6319),w=i(4209),E=i(3517),O=i(6198),j=i(4659),x=i(81),S=i(851),P=Array;d.exports=function(L){var C=g(L),R=E(this),A=arguments.length,I=A>1?arguments[1]:void 0,D=I!==void 0;D&&(I=f(I,A>2?arguments[2]:void 0));var M,V,G,J,Y,se,ue=S(C),he=0;if(!ue||this===P&&w(ue))for(M=O(C),V=R?new this(M):P(M);M>he;he++)se=D?I(C[he],he):C[he],j(V,he,se);else for(V=R?new this:[],Y=(J=x(C,ue)).next;!(G=m(Y,J)).done;he++)se=D?b(J,I,[G.value,he],!0):G.value,j(V,he,se);return V.length=he,V}},9617:(d,v,i)=>{var f=i(5397),m=i(5610),g=i(6198),b=function(w){return function(E,O,j){var x=f(E),S=g(x);if(S===0)return!w&&-1;var P,L=m(j,S);if(w&&O!=O){for(;S>L;)if((P=x[L++])!=P)return!0}else for(;S>L;L++)if((w||L in x)&&x[L]===O)return w||L||0;return!w&&-1}};d.exports={includes:b(!0),indexOf:b(!1)}},9213:(d,v,i)=>{var f=i(6080),m=i(9504),g=i(7055),b=i(8981),w=i(6198),E=i(1469),O=m([].push),j=function(x){var S=x===1,P=x===2,L=x===3,C=x===4,R=x===6,A=x===7,I=x===5||R;return function(D,M,V,G){for(var J,Y,se=b(D),ue=g(se),he=w(ue),de=f(M,V),be=0,ie=G||E,H=S?ie(D,he):P||A?ie(D,0):void 0;he>be;be++)if((I||be in ue)&&(Y=de(J=ue[be],be,se),x))if(S)H[be]=Y;else if(Y)switch(x){case 3:return!0;case 5:return J;case 6:return be;case 2:O(H,J)}else switch(x){case 4:return!1;case 7:O(H,J)}return R?-1:L||C?C:H}};d.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},597:(d,v,i)=>{var f=i(9039),m=i(8227),g=i(7388),b=m("species");d.exports=function(w){return g>=51||!f((function(){var E=[];return(E.constructor={})[b]=function(){return{foo:1}},E[w](Boolean).foo!==1}))}},4598:(d,v,i)=>{var f=i(9039);d.exports=function(m,g){var b=[][m];return!!b&&f((function(){b.call(null,g||function(){return 1},1)}))}},926:(d,v,i)=>{var f=i(9306),m=i(8981),g=i(7055),b=i(6198),w=TypeError,E="Reduce of empty array with no initial value",O=function(j){return function(x,S,P,L){var C=m(x),R=g(C),A=b(C);if(f(S),A===0&&P<2)throw new w(E);var I=j?A-1:0,D=j?-1:1;if(P<2)for(;;){if(I in R){L=R[I],I+=D;break}if(I+=D,j?I<0:A<=I)throw new w(E)}for(;j?I>=0:A>I;I+=D)I in R&&(L=S(L,R[I],I,C));return L}};d.exports={left:O(!1),right:O(!0)}},4527:(d,v,i)=>{var f=i(3724),m=i(4376),g=TypeError,b=Object.getOwnPropertyDescriptor,w=f&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}})();d.exports=w?function(E,O){if(m(E)&&!b(E,"length").writable)throw new g("Cannot set read only .length");return E.length=O}:function(E,O){return E.length=O}},7680:(d,v,i)=>{var f=i(9504);d.exports=f([].slice)},4488:(d,v,i)=>{var f=i(7680),m=Math.floor,g=function(b,w){var E=b.length;if(E<8)for(var O,j,x=1;x<E;){for(j=x,O=b[x];j&&w(b[j-1],O)>0;)b[j]=b[--j];j!==x++&&(b[j]=O)}else for(var S=m(E/2),P=g(f(b,0,S),w),L=g(f(b,S),w),C=P.length,R=L.length,A=0,I=0;A<C||I<R;)b[A+I]=A<C&&I<R?w(P[A],L[I])<=0?P[A++]:L[I++]:A<C?P[A++]:L[I++];return b};d.exports=g},7433:(d,v,i)=>{var f=i(4376),m=i(3517),g=i(34),b=i(8227)("species"),w=Array;d.exports=function(E){var O;return f(E)&&(O=E.constructor,(m(O)&&(O===w||f(O.prototype))||g(O)&&(O=O[b])===null)&&(O=void 0)),O===void 0?w:O}},1469:(d,v,i)=>{var f=i(7433);d.exports=function(m,g){return new(f(m))(g===0?0:g)}},6319:(d,v,i)=>{var f=i(8551),m=i(9539);d.exports=function(g,b,w,E){try{return E?b(f(w)[0],w[1]):b(w)}catch(O){m(g,"throw",O)}}},4428:(d,v,i)=>{var f=i(8227)("iterator"),m=!1;try{var g=0,b={next:function(){return{done:!!g++}},return:function(){m=!0}};b[f]=function(){return this},Array.from(b,(function(){throw 2}))}catch{}d.exports=function(w,E){try{if(!E&&!m)return!1}catch{return!1}var O=!1;try{var j={};j[f]=function(){return{next:function(){return{done:O=!0}}}},w(j)}catch{}return O}},4576:(d,v,i)=>{var f=i(9504),m=f({}.toString),g=f("".slice);d.exports=function(b){return g(m(b),8,-1)}},6955:(d,v,i)=>{var f=i(2140),m=i(4901),g=i(4576),b=i(8227)("toStringTag"),w=Object,E=g((function(){return arguments})())==="Arguments";d.exports=f?g:function(O){var j,x,S;return O===void 0?"Undefined":O===null?"Null":typeof(x=(function(P,L){try{return P[L]}catch{}})(j=w(O),b))=="string"?x:E?g(j):(S=g(j))==="Object"&&m(j.callee)?"Arguments":S}},7740:(d,v,i)=>{var f=i(9297),m=i(5031),g=i(7347),b=i(4913);d.exports=function(w,E,O){for(var j=m(E),x=b.f,S=g.f,P=0;P<j.length;P++){var L=j[P];f(w,L)||O&&f(O,L)||x(w,L,S(E,L))}}},1436:(d,v,i)=>{var f=i(8227)("match");d.exports=function(m){var g=/./;try{"/./"[m](g)}catch{try{return g[f]=!1,"/./"[m](g)}catch{}}return!1}},2211:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){function m(){}return m.prototype.constructor=null,Object.getPrototypeOf(new m)!==m.prototype}))},2529:d=>{d.exports=function(v,i){return{value:v,done:i}}},6699:(d,v,i)=>{var f=i(3724),m=i(4913),g=i(6980);d.exports=f?function(b,w,E){return m.f(b,w,g(1,E))}:function(b,w,E){return b[w]=E,b}},6980:d=>{d.exports=function(v,i){return{enumerable:!(1&v),configurable:!(2&v),writable:!(4&v),value:i}}},4659:(d,v,i)=>{var f=i(3724),m=i(4913),g=i(6980);d.exports=function(b,w,E){f?m.f(b,w,g(0,E)):b[w]=E}},380:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(533).start,b=RangeError,w=isFinite,E=Math.abs,O=Date.prototype,j=O.toISOString,x=f(O.getTime),S=f(O.getUTCDate),P=f(O.getUTCFullYear),L=f(O.getUTCHours),C=f(O.getUTCMilliseconds),R=f(O.getUTCMinutes),A=f(O.getUTCMonth),I=f(O.getUTCSeconds);d.exports=m((function(){return j.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"}))||!m((function(){j.call(new Date(NaN))}))?function(){if(!w(x(this)))throw new b("Invalid time value");var D=this,M=P(D),V=C(D),G=M<0?"-":M>9999?"+":"";return G+g(E(M),G?6:4,0)+"-"+g(A(D)+1,2,0)+"-"+g(S(D),2,0)+"T"+g(L(D),2,0)+":"+g(R(D),2,0)+":"+g(I(D),2,0)+"."+g(V,3,0)+"Z"}:j},3640:(d,v,i)=>{var f=i(8551),m=i(4270),g=TypeError;d.exports=function(b){if(f(this),b==="string"||b==="default")b="string";else if(b!=="number")throw new g("Incorrect hint");return m(this,b)}},2106:(d,v,i)=>{var f=i(283),m=i(4913);d.exports=function(g,b,w){return w.get&&f(w.get,b,{getter:!0}),w.set&&f(w.set,b,{setter:!0}),m.f(g,b,w)}},6840:(d,v,i)=>{var f=i(4901),m=i(4913),g=i(283),b=i(9433);d.exports=function(w,E,O,j){j||(j={});var x=j.enumerable,S=j.name!==void 0?j.name:E;if(f(O)&&g(O,S,j),j.global)x?w[E]=O:b(E,O);else{try{j.unsafe?w[E]&&(x=!0):delete w[E]}catch{}x?w[E]=O:m.f(w,E,{value:O,enumerable:!1,configurable:!j.nonConfigurable,writable:!j.nonWritable})}return w}},9433:(d,v,i)=>{var f=i(4475),m=Object.defineProperty;d.exports=function(g,b){try{m(f,g,{value:b,configurable:!0,writable:!0})}catch{f[g]=b}return b}},4606:(d,v,i)=>{var f=i(6823),m=TypeError;d.exports=function(g,b){if(!delete g[b])throw new m("Cannot delete property "+f(b)+" of "+f(g))}},3724:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},4055:(d,v,i)=>{var f=i(4475),m=i(34),g=f.document,b=m(g)&&m(g.createElement);d.exports=function(w){return b?g.createElement(w):{}}},6837:d=>{var v=TypeError;d.exports=function(i){if(i>9007199254740991)throw v("Maximum allowed index exceeded");return i}},7400:d=>{d.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}},9296:(d,v,i)=>{var f=i(4055)("span").classList,m=f&&f.constructor&&f.constructor.prototype;d.exports=m===Object.prototype?void 0:m},8834:(d,v,i)=>{var f=i(9392).match(/firefox\/(\d+)/i);d.exports=!!f&&+f[1]},7290:(d,v,i)=>{var f=i(516),m=i(9088);d.exports=!f&&!m&&typeof window=="object"&&typeof document=="object"},6763:d=>{d.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},516:d=>{d.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},3202:(d,v,i)=>{var f=i(9392);d.exports=/MSIE|Trident/.test(f)},28:(d,v,i)=>{var f=i(9392);d.exports=/ipad|iphone|ipod/i.test(f)&&typeof Pebble<"u"},8119:(d,v,i)=>{var f=i(9392);d.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(f)},9088:(d,v,i)=>{var f=i(4475),m=i(4576);d.exports=m(f.process)==="process"},6765:(d,v,i)=>{var f=i(9392);d.exports=/web0s(?!.*chrome)/i.test(f)},9392:d=>{d.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:(d,v,i)=>{var f,m,g=i(4475),b=i(9392),w=g.process,E=g.Deno,O=w&&w.versions||E&&E.version,j=O&&O.v8;j&&(m=(f=j.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!m&&b&&(!(f=b.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=b.match(/Chrome\/(\d+)/))&&(m=+f[1]),d.exports=m},9160:(d,v,i)=>{var f=i(9392).match(/AppleWebKit\/(\d+)\./);d.exports=!!f&&+f[1]},8727:d=>{d.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(d,v,i)=>{var f=i(4475),m=i(7347).f,g=i(6699),b=i(6840),w=i(9433),E=i(7740),O=i(2796);d.exports=function(j,x){var S,P,L,C,R,A=j.target,I=j.global,D=j.stat;if(S=I?f:D?f[A]||w(A,{}):f[A]&&f[A].prototype)for(P in x){if(C=x[P],L=j.dontCallGetSet?(R=m(S,P))&&R.value:S[P],!O(I?P:A+(D?".":"#")+P,j.forced)&&L!==void 0){if(typeof C==typeof L)continue;E(C,L)}(j.sham||L&&L.sham)&&g(C,"sham",!0),b(S,P,C,j)}}},9039:d=>{d.exports=function(v){try{return!!v()}catch{return!0}}},9228:(d,v,i)=>{i(7495);var f=i(9565),m=i(6840),g=i(7323),b=i(9039),w=i(8227),E=i(6699),O=w("species"),j=RegExp.prototype;d.exports=function(x,S,P,L){var C=w(x),R=!b((function(){var M={};return M[C]=function(){return 7},""[x](M)!==7})),A=R&&!b((function(){var M=!1,V=/a/;return x==="split"&&((V={}).constructor={},V.constructor[O]=function(){return V},V.flags="",V[C]=/./[C]),V.exec=function(){return M=!0,null},V[C](""),!M}));if(!R||!A||P){var I=/./[C],D=S(C,""[x],(function(M,V,G,J,Y){var se=V.exec;return se===g||se===j.exec?R&&!Y?{done:!0,value:f(I,V,G,J)}:{done:!0,value:f(M,G,V,J)}:{done:!1}}));m(String.prototype,x,D[0]),m(j,C,D[1])}L&&E(j[C],"sham",!0)}},8745:(d,v,i)=>{var f=i(616),m=Function.prototype,g=m.apply,b=m.call;d.exports=typeof Reflect=="object"&&Reflect.apply||(f?b.bind(g):function(){return b.apply(g,arguments)})},6080:(d,v,i)=>{var f=i(7476),m=i(9306),g=i(616),b=f(f.bind);d.exports=function(w,E){return m(w),E===void 0?w:g?b(w,E):function(){return w.apply(E,arguments)}}},616:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){var m=(function(){}).bind();return typeof m!="function"||m.hasOwnProperty("prototype")}))},566:(d,v,i)=>{var f=i(9504),m=i(9306),g=i(34),b=i(9297),w=i(7680),E=i(616),O=Function,j=f([].concat),x=f([].join),S={};d.exports=E?O.bind:function(P){var L=m(this),C=L.prototype,R=w(arguments,1),A=function(){var I=j(R,w(arguments));return this instanceof A?(function(D,M,V){if(!b(S,M)){for(var G=[],J=0;J<M;J++)G[J]="a["+J+"]";S[M]=O("C,a","return new C("+x(G,",")+")")}return S[M](D,V)})(L,I.length,I):L.apply(P,I)};return g(C)&&(A.prototype=C),A}},9565:(d,v,i)=>{var f=i(616),m=Function.prototype.call;d.exports=f?m.bind(m):function(){return m.apply(m,arguments)}},350:(d,v,i)=>{var f=i(3724),m=i(9297),g=Function.prototype,b=f&&Object.getOwnPropertyDescriptor,w=m(g,"name"),E=w&&(function(){}).name==="something",O=w&&(!f||f&&b(g,"name").configurable);d.exports={EXISTS:w,PROPER:E,CONFIGURABLE:O}},6706:(d,v,i)=>{var f=i(9504),m=i(9306);d.exports=function(g,b,w){try{return f(m(Object.getOwnPropertyDescriptor(g,b)[w]))}catch{}}},7476:(d,v,i)=>{var f=i(4576),m=i(9504);d.exports=function(g){if(f(g)==="Function")return m(g)}},9504:(d,v,i)=>{var f=i(616),m=Function.prototype,g=m.call,b=f&&m.bind.bind(g,g);d.exports=f?b:function(w){return function(){return g.apply(w,arguments)}}},7751:(d,v,i)=>{var f=i(4475),m=i(4901);d.exports=function(g,b){return arguments.length<2?(w=f[g],m(w)?w:void 0):f[g]&&f[g][b];var w}},851:(d,v,i)=>{var f=i(6955),m=i(5966),g=i(4117),b=i(6269),w=i(8227)("iterator");d.exports=function(E){if(!g(E))return m(E,w)||m(E,"@@iterator")||b[f(E)]}},81:(d,v,i)=>{var f=i(9565),m=i(9306),g=i(8551),b=i(6823),w=i(851),E=TypeError;d.exports=function(O,j){var x=arguments.length<2?w(O):j;if(m(x))return g(f(x,O));throw new E(b(O)+" is not iterable")}},6933:(d,v,i)=>{var f=i(9504),m=i(4376),g=i(4901),b=i(4576),w=i(655),E=f([].push);d.exports=function(O){if(g(O))return O;if(m(O)){for(var j=O.length,x=[],S=0;S<j;S++){var P=O[S];typeof P=="string"?E(x,P):typeof P!="number"&&b(P)!=="Number"&&b(P)!=="String"||E(x,w(P))}var L=x.length,C=!0;return function(R,A){if(C)return C=!1,A;if(m(this))return A;for(var I=0;I<L;I++)if(x[I]===R)return A}}}},5966:(d,v,i)=>{var f=i(9306),m=i(4117);d.exports=function(g,b){var w=g[b];return m(w)?void 0:f(w)}},2478:(d,v,i)=>{var f=i(9504),m=i(8981),g=Math.floor,b=f("".charAt),w=f("".replace),E=f("".slice),O=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;d.exports=function(x,S,P,L,C,R){var A=P+x.length,I=L.length,D=j;return C!==void 0&&(C=m(C),D=O),w(R,D,(function(M,V){var G;switch(b(V,0)){case"$":return"$";case"&":return x;case"`":return E(S,0,P);case"'":return E(S,A);case"<":G=C[E(V,1,-1)];break;default:var J=+V;if(J===0)return M;if(J>I){var Y=g(J/10);return Y===0?M:Y<=I?L[Y-1]===void 0?b(V,1):L[Y-1]+b(V,1):M}G=L[J-1]}return G===void 0?"":G}))}},4475:function(d,v,i){var f=function(m){return m&&m.Math===Math&&m};d.exports=f(typeof globalThis=="object"&&globalThis)||f(typeof window=="object"&&window)||f(typeof self=="object"&&self)||f(typeof i.g=="object"&&i.g)||f(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},9297:(d,v,i)=>{var f=i(9504),m=i(8981),g=f({}.hasOwnProperty);d.exports=Object.hasOwn||function(b,w){return g(m(b),w)}},421:d=>{d.exports={}},3138:d=>{d.exports=function(v,i){try{arguments.length===1?console.error(v):console.error(v,i)}catch{}}},397:(d,v,i)=>{var f=i(7751);d.exports=f("document","documentElement")},5917:(d,v,i)=>{var f=i(3724),m=i(9039),g=i(4055);d.exports=!f&&!m((function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7}))},7055:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(4576),b=Object,w=f("".split);d.exports=m((function(){return!b("z").propertyIsEnumerable(0)}))?function(E){return g(E)==="String"?w(E,""):b(E)}:b},3167:(d,v,i)=>{var f=i(4901),m=i(34),g=i(2967);d.exports=function(b,w,E){var O,j;return g&&f(O=w.constructor)&&O!==E&&m(j=O.prototype)&&j!==E.prototype&&g(b,j),b}},3706:(d,v,i)=>{var f=i(9504),m=i(4901),g=i(7629),b=f(Function.toString);m(g.inspectSource)||(g.inspectSource=function(w){return b(w)}),d.exports=g.inspectSource},1181:(d,v,i)=>{var f,m,g,b=i(8622),w=i(4475),E=i(34),O=i(6699),j=i(9297),x=i(7629),S=i(6119),P=i(421),L="Object already initialized",C=w.TypeError,R=w.WeakMap;if(b||x.state){var A=x.state||(x.state=new R);A.get=A.get,A.has=A.has,A.set=A.set,f=function(D,M){if(A.has(D))throw new C(L);return M.facade=D,A.set(D,M),M},m=function(D){return A.get(D)||{}},g=function(D){return A.has(D)}}else{var I=S("state");P[I]=!0,f=function(D,M){if(j(D,I))throw new C(L);return M.facade=D,O(D,I,M),M},m=function(D){return j(D,I)?D[I]:{}},g=function(D){return j(D,I)}}d.exports={set:f,get:m,has:g,enforce:function(D){return g(D)?m(D):f(D,{})},getterFor:function(D){return function(M){var V;if(!E(M)||(V=m(M)).type!==D)throw new C("Incompatible receiver, "+D+" required");return V}}}},4209:(d,v,i)=>{var f=i(8227),m=i(6269),g=f("iterator"),b=Array.prototype;d.exports=function(w){return w!==void 0&&(m.Array===w||b[g]===w)}},4376:(d,v,i)=>{var f=i(4576);d.exports=Array.isArray||function(m){return f(m)==="Array"}},4901:d=>{var v=typeof document=="object"&&document.all;d.exports=v===void 0&&v!==void 0?function(i){return typeof i=="function"||i===v}:function(i){return typeof i=="function"}},3517:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(4901),b=i(6955),w=i(7751),E=i(3706),O=function(){},j=w("Reflect","construct"),x=/^\s*(?:class|function)\b/,S=f(x.exec),P=!x.test(O),L=function(R){if(!g(R))return!1;try{return j(O,[],R),!0}catch{return!1}},C=function(R){if(!g(R))return!1;switch(b(R)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return P||!!S(x,E(R))}catch{return!0}};C.sham=!0,d.exports=!j||m((function(){var R;return L(L.call)||!L(Object)||!L((function(){R=!0}))||R}))?C:L},6575:(d,v,i)=>{var f=i(9297);d.exports=function(m){return m!==void 0&&(f(m,"value")||f(m,"writable"))}},2796:(d,v,i)=>{var f=i(9039),m=i(4901),g=/#|\.prototype\./,b=function(x,S){var P=E[w(x)];return P===j||P!==O&&(m(S)?f(S):!!S)},w=b.normalize=function(x){return String(x).replace(g,".").toLowerCase()},E=b.data={},O=b.NATIVE="N",j=b.POLYFILL="P";d.exports=b},4117:d=>{d.exports=function(v){return v==null}},34:(d,v,i)=>{var f=i(4901);d.exports=function(m){return typeof m=="object"?m!==null:f(m)}},3925:(d,v,i)=>{var f=i(34);d.exports=function(m){return f(m)||m===null}},6395:d=>{d.exports=!1},788:(d,v,i)=>{var f=i(34),m=i(4576),g=i(8227)("match");d.exports=function(b){var w;return f(b)&&((w=b[g])!==void 0?!!w:m(b)==="RegExp")}},757:(d,v,i)=>{var f=i(7751),m=i(4901),g=i(1625),b=i(7040),w=Object;d.exports=b?function(E){return typeof E=="symbol"}:function(E){var O=f("Symbol");return m(O)&&g(O.prototype,w(E))}},2652:(d,v,i)=>{var f=i(6080),m=i(9565),g=i(8551),b=i(6823),w=i(4209),E=i(6198),O=i(1625),j=i(81),x=i(851),S=i(9539),P=TypeError,L=function(R,A){this.stopped=R,this.result=A},C=L.prototype;d.exports=function(R,A,I){var D,M,V,G,J,Y,se,ue=I&&I.that,he=!(!I||!I.AS_ENTRIES),de=!(!I||!I.IS_RECORD),be=!(!I||!I.IS_ITERATOR),ie=!(!I||!I.INTERRUPTED),H=f(A,ue),te=function($){return D&&S(D,"normal",$),new L(!0,$)},z=function($){return he?(g($),ie?H($[0],$[1],te):H($[0],$[1])):ie?H($,te):H($)};if(de)D=R.iterator;else if(be)D=R;else{if(!(M=x(R)))throw new P(b(R)+" is not iterable");if(w(M)){for(V=0,G=E(R);G>V;V++)if((J=z(R[V]))&&O(C,J))return J;return new L(!1)}D=j(R,M)}for(Y=de?R.next:D.next;!(se=m(Y,D)).done;){try{J=z(se.value)}catch($){S(D,"throw",$)}if(typeof J=="object"&&J&&O(C,J))return J}return new L(!1)}},9539:(d,v,i)=>{var f=i(9565),m=i(8551),g=i(5966);d.exports=function(b,w,E){var O,j;m(b);try{if(!(O=g(b,"return"))){if(w==="throw")throw E;return E}O=f(O,b)}catch(x){j=!0,O=x}if(w==="throw")throw E;if(j)throw O;return m(O),E}},3994:(d,v,i)=>{var f=i(7657).IteratorPrototype,m=i(2360),g=i(6980),b=i(687),w=i(6269),E=function(){return this};d.exports=function(O,j,x,S){var P=j+" Iterator";return O.prototype=m(f,{next:g(+!S,x)}),b(O,P,!1,!0),w[P]=E,O}},1088:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(6395),b=i(350),w=i(4901),E=i(3994),O=i(2787),j=i(2967),x=i(687),S=i(6699),P=i(6840),L=i(8227),C=i(6269),R=i(7657),A=b.PROPER,I=b.CONFIGURABLE,D=R.IteratorPrototype,M=R.BUGGY_SAFARI_ITERATORS,V=L("iterator"),G="keys",J="values",Y="entries",se=function(){return this};d.exports=function(ue,he,de,be,ie,H,te){E(de,he,be);var z,$,F,ee=function(ne){if(ne===ie&&U)return U;if(!M&&ne&&ne in je)return je[ne];switch(ne){case G:case J:case Y:return function(){return new de(this,ne)}}return function(){return new de(this)}},ge=he+" Iterator",_e=!1,je=ue.prototype,ve=je[V]||je["@@iterator"]||ie&&je[ie],U=!M&&ve||ee(ie),W=he==="Array"&&je.entries||ve;if(W&&(z=O(W.call(new ue)))!==Object.prototype&&z.next&&(g||O(z)===D||(j?j(z,D):w(z[V])||P(z,V,se)),x(z,ge,!0,!0),g&&(C[ge]=se)),A&&ie===J&&ve&&ve.name!==J&&(!g&&I?S(je,"name",J):(_e=!0,U=function(){return m(ve,this)})),ie)if($={values:ee(J),keys:H?U:ee(G),entries:ee(Y)},te)for(F in $)(M||_e||!(F in je))&&P(je,F,$[F]);else f({target:he,proto:!0,forced:M||_e},$);return g&&!te||je[V]===U||P(je,V,U,{name:ie}),C[he]=U,$}},7657:(d,v,i)=>{var f,m,g,b=i(9039),w=i(4901),E=i(34),O=i(2360),j=i(2787),x=i(6840),S=i(8227),P=i(6395),L=S("iterator"),C=!1;[].keys&&("next"in(g=[].keys())?(m=j(j(g)))!==Object.prototype&&(f=m):C=!0),!E(f)||b((function(){var R={};return f[L].call(R)!==R}))?f={}:P&&(f=O(f)),w(f[L])||x(f,L,(function(){return this})),d.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:C}},6269:d=>{d.exports={}},6198:(d,v,i)=>{var f=i(8014);d.exports=function(m){return f(m.length)}},283:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(4901),b=i(9297),w=i(3724),E=i(350).CONFIGURABLE,O=i(3706),j=i(1181),x=j.enforce,S=j.get,P=String,L=Object.defineProperty,C=f("".slice),R=f("".replace),A=f([].join),I=w&&!m((function(){return L((function(){}),"length",{value:8}).length!==8})),D=String(String).split("String"),M=d.exports=function(V,G,J){C(P(G),0,7)==="Symbol("&&(G="["+R(P(G),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),J&&J.getter&&(G="get "+G),J&&J.setter&&(G="set "+G),(!b(V,"name")||E&&V.name!==G)&&(w?L(V,"name",{value:G,configurable:!0}):V.name=G),I&&J&&b(J,"arity")&&V.length!==J.arity&&L(V,"length",{value:J.arity});try{J&&b(J,"constructor")&&J.constructor?w&&L(V,"prototype",{writable:!1}):V.prototype&&(V.prototype=void 0)}catch{}var Y=x(V);return b(Y,"source")||(Y.source=A(D,typeof G=="string"?G:"")),V};Function.prototype.toString=M((function(){return g(this)&&S(this).source||O(this)}),"toString")},741:d=>{var v=Math.ceil,i=Math.floor;d.exports=Math.trunc||function(f){var m=+f;return(m>0?i:v)(m)}},1955:(d,v,i)=>{var f,m,g,b,w,E=i(4475),O=i(3389),j=i(6080),x=i(9225).set,S=i(8265),P=i(8119),L=i(28),C=i(6765),R=i(9088),A=E.MutationObserver||E.WebKitMutationObserver,I=E.document,D=E.process,M=E.Promise,V=O("queueMicrotask");if(!V){var G=new S,J=function(){var Y,se;for(R&&(Y=D.domain)&&Y.exit();se=G.get();)try{se()}catch(ue){throw G.head&&f(),ue}Y&&Y.enter()};P||R||C||!A||!I?!L&&M&&M.resolve?((b=M.resolve(void 0)).constructor=M,w=j(b.then,b),f=function(){w(J)}):R?f=function(){D.nextTick(J)}:(x=j(x,E),f=function(){x(J)}):(m=!0,g=I.createTextNode(""),new A(J).observe(g,{characterData:!0}),f=function(){g.data=m=!m}),V=function(Y){G.head||f(),G.add(Y)}}d.exports=V},6043:(d,v,i)=>{var f=i(9306),m=TypeError,g=function(b){var w,E;this.promise=new b((function(O,j){if(w!==void 0||E!==void 0)throw new m("Bad Promise constructor");w=O,E=j})),this.resolve=f(w),this.reject=f(E)};d.exports.f=function(b){return new g(b)}},5749:(d,v,i)=>{var f=i(788),m=TypeError;d.exports=function(g){if(f(g))throw new m("The method doesn't accept regular expressions");return g}},3904:(d,v,i)=>{var f=i(4475),m=i(9039),g=i(9504),b=i(655),w=i(3802).trim,E=i(7452),O=g("".charAt),j=f.parseFloat,x=f.Symbol,S=x&&x.iterator,P=1/j(E+"-0")!=-1/0||S&&!m((function(){j(Object(S))}));d.exports=P?function(L){var C=w(b(L)),R=j(C);return R===0&&O(C,0)==="-"?-0:R}:j},2703:(d,v,i)=>{var f=i(4475),m=i(9039),g=i(9504),b=i(655),w=i(3802).trim,E=i(7452),O=f.parseInt,j=f.Symbol,x=j&&j.iterator,S=/^[+-]?0x/i,P=g(S.exec),L=O(E+"08")!==8||O(E+"0x16")!==22||x&&!m((function(){O(Object(x))}));d.exports=L?function(C,R){var A=w(b(C));return O(A,R>>>0||(P(S,A)?16:10))}:O},4213:(d,v,i)=>{var f=i(3724),m=i(9504),g=i(9565),b=i(9039),w=i(1072),E=i(3717),O=i(8773),j=i(8981),x=i(7055),S=Object.assign,P=Object.defineProperty,L=m([].concat);d.exports=!S||b((function(){if(f&&S({b:1},S(P({},"a",{enumerable:!0,get:function(){P(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var C={},R={},A=Symbol("assign detection"),I="abcdefghijklmnopqrst";return C[A]=7,I.split("").forEach((function(D){R[D]=D})),S({},C)[A]!==7||w(S({},R)).join("")!==I}))?function(C,R){for(var A=j(C),I=arguments.length,D=1,M=E.f,V=O.f;I>D;)for(var G,J=x(arguments[D++]),Y=M?L(w(J),M(J)):w(J),se=Y.length,ue=0;se>ue;)G=Y[ue++],f&&!g(V,J,G)||(A[G]=J[G]);return A}:S},2360:(d,v,i)=>{var f,m=i(8551),g=i(6801),b=i(8727),w=i(421),E=i(397),O=i(4055),j=i(6119),x="prototype",S="script",P=j("IE_PROTO"),L=function(){},C=function(I){return"<"+S+">"+I+"</"+S+">"},R=function(I){I.write(C("")),I.close();var D=I.parentWindow.Object;return I=null,D},A=function(){try{f=new ActiveXObject("htmlfile")}catch{}var I,D,M;A=typeof document<"u"?document.domain&&f?R(f):(D=O("iframe"),M="java"+S+":",D.style.display="none",E.appendChild(D),D.src=String(M),(I=D.contentWindow.document).open(),I.write(C("document.F=Object")),I.close(),I.F):R(f);for(var V=b.length;V--;)delete A[x][b[V]];return A()};w[P]=!0,d.exports=Object.create||function(I,D){var M;return I!==null?(L[x]=m(I),M=new L,L[x]=null,M[P]=I):M=A(),D===void 0?M:g.f(M,D)}},6801:(d,v,i)=>{var f=i(3724),m=i(8686),g=i(4913),b=i(8551),w=i(5397),E=i(1072);v.f=f&&!m?Object.defineProperties:function(O,j){b(O);for(var x,S=w(j),P=E(j),L=P.length,C=0;L>C;)g.f(O,x=P[C++],S[x]);return O}},4913:(d,v,i)=>{var f=i(3724),m=i(5917),g=i(8686),b=i(8551),w=i(6969),E=TypeError,O=Object.defineProperty,j=Object.getOwnPropertyDescriptor,x="enumerable",S="configurable",P="writable";v.f=f?g?function(L,C,R){if(b(L),C=w(C),b(R),typeof L=="function"&&C==="prototype"&&"value"in R&&P in R&&!R[P]){var A=j(L,C);A&&A[P]&&(L[C]=R.value,R={configurable:S in R?R[S]:A[S],enumerable:x in R?R[x]:A[x],writable:!1})}return O(L,C,R)}:O:function(L,C,R){if(b(L),C=w(C),b(R),m)try{return O(L,C,R)}catch{}if("get"in R||"set"in R)throw new E("Accessors not supported");return"value"in R&&(L[C]=R.value),L}},7347:(d,v,i)=>{var f=i(3724),m=i(9565),g=i(8773),b=i(6980),w=i(5397),E=i(6969),O=i(9297),j=i(5917),x=Object.getOwnPropertyDescriptor;v.f=f?x:function(S,P){if(S=w(S),P=E(P),j)try{return x(S,P)}catch{}if(O(S,P))return b(!m(g.f,S,P),S[P])}},298:(d,v,i)=>{var f=i(4576),m=i(5397),g=i(8480).f,b=i(7680),w=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(E){return w&&f(E)==="Window"?(function(O){try{return g(O)}catch{return b(w)}})(E):g(m(E))}},8480:(d,v,i)=>{var f=i(1828),m=i(8727).concat("length","prototype");v.f=Object.getOwnPropertyNames||function(g){return f(g,m)}},3717:(d,v)=>{v.f=Object.getOwnPropertySymbols},2787:(d,v,i)=>{var f=i(9297),m=i(4901),g=i(8981),b=i(6119),w=i(2211),E=b("IE_PROTO"),O=Object,j=O.prototype;d.exports=w?O.getPrototypeOf:function(x){var S=g(x);if(f(S,E))return S[E];var P=S.constructor;return m(P)&&S instanceof P?P.prototype:S instanceof O?j:null}},1625:(d,v,i)=>{var f=i(9504);d.exports=f({}.isPrototypeOf)},1828:(d,v,i)=>{var f=i(9504),m=i(9297),g=i(5397),b=i(9617).indexOf,w=i(421),E=f([].push);d.exports=function(O,j){var x,S=g(O),P=0,L=[];for(x in S)!m(w,x)&&m(S,x)&&E(L,x);for(;j.length>P;)m(S,x=j[P++])&&(~b(L,x)||E(L,x));return L}},1072:(d,v,i)=>{var f=i(1828),m=i(8727);d.exports=Object.keys||function(g){return f(g,m)}},8773:(d,v)=>{var i={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,m=f&&!i.call({1:2},1);v.f=m?function(g){var b=f(this,g);return!!b&&b.enumerable}:i},2967:(d,v,i)=>{var f=i(6706),m=i(34),g=i(7750),b=i(3506);d.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var w,E=!1,O={};try{(w=f(Object.prototype,"__proto__","set"))(O,[]),E=O instanceof Array}catch{}return function(j,x){return g(j),b(x),m(j)&&(E?w(j,x):j.__proto__=x),j}})():void 0)},2357:(d,v,i)=>{var f=i(3724),m=i(9039),g=i(9504),b=i(2787),w=i(1072),E=i(5397),O=g(i(8773).f),j=g([].push),x=f&&m((function(){var P=Object.create(null);return P[2]=2,!O(P,2)})),S=function(P){return function(L){for(var C,R=E(L),A=w(R),I=x&&b(R)===null,D=A.length,M=0,V=[];D>M;)C=A[M++],f&&!(I?C in R:O(R,C))||j(V,P?[C,R[C]]:R[C]);return V}};d.exports={entries:S(!0),values:S(!1)}},3179:(d,v,i)=>{var f=i(2140),m=i(6955);d.exports=f?{}.toString:function(){return"[object "+m(this)+"]"}},4270:(d,v,i)=>{var f=i(9565),m=i(4901),g=i(34),b=TypeError;d.exports=function(w,E){var O,j;if(E==="string"&&m(O=w.toString)&&!g(j=f(O,w))||m(O=w.valueOf)&&!g(j=f(O,w))||E!=="string"&&m(O=w.toString)&&!g(j=f(O,w)))return j;throw new b("Can't convert object to primitive value")}},5031:(d,v,i)=>{var f=i(7751),m=i(9504),g=i(8480),b=i(3717),w=i(8551),E=m([].concat);d.exports=f("Reflect","ownKeys")||function(O){var j=g.f(w(O)),x=b.f;return x?E(j,x(O)):j}},9167:(d,v,i)=>{var f=i(4475);d.exports=f},1103:d=>{d.exports=function(v){try{return{error:!1,value:v()}}catch(i){return{error:!0,value:i}}}},916:(d,v,i)=>{var f=i(4475),m=i(550),g=i(4901),b=i(2796),w=i(3706),E=i(8227),O=i(7290),j=i(516),x=i(6395),S=i(7388),P=m&&m.prototype,L=E("species"),C=!1,R=g(f.PromiseRejectionEvent),A=b("Promise",(function(){var I=w(m),D=I!==String(m);if(!D&&S===66||x&&(!P.catch||!P.finally))return!0;if(!S||S<51||!/native code/.test(I)){var M=new m((function(G){G(1)})),V=function(G){G((function(){}),(function(){}))};if((M.constructor={})[L]=V,!(C=M.then((function(){}))instanceof V))return!0}return!D&&(O||j)&&!R}));d.exports={CONSTRUCTOR:A,REJECTION_EVENT:R,SUBCLASSING:C}},550:(d,v,i)=>{var f=i(4475);d.exports=f.Promise},3438:(d,v,i)=>{var f=i(8551),m=i(34),g=i(6043);d.exports=function(b,w){if(f(b),m(w)&&w.constructor===b)return w;var E=g.f(b);return(0,E.resolve)(w),E.promise}},537:(d,v,i)=>{var f=i(550),m=i(4428),g=i(916).CONSTRUCTOR;d.exports=g||!m((function(b){f.all(b).then(void 0,(function(){}))}))},1056:(d,v,i)=>{var f=i(4913).f;d.exports=function(m,g,b){b in m||f(m,b,{configurable:!0,get:function(){return g[b]},set:function(w){g[b]=w}})}},8265:d=>{var v=function(){this.head=null,this.tail=null};v.prototype={add:function(i){var f={item:i,next:null},m=this.tail;m?m.next=f:this.head=f,this.tail=f},get:function(){var i=this.head;if(i)return(this.head=i.next)===null&&(this.tail=null),i.item}},d.exports=v},6682:(d,v,i)=>{var f=i(9565),m=i(8551),g=i(4901),b=i(4576),w=i(7323),E=TypeError;d.exports=function(O,j){var x=O.exec;if(g(x)){var S=f(x,O,j);return S!==null&&m(S),S}if(b(O)==="RegExp")return f(w,O,j);throw new E("RegExp#exec called on incompatible receiver")}},7323:(d,v,i)=>{var f,m,g=i(9565),b=i(9504),w=i(655),E=i(7979),O=i(8429),j=i(5745),x=i(2360),S=i(1181).get,P=i(3635),L=i(8814),C=j("native-string-replace",String.prototype.replace),R=RegExp.prototype.exec,A=R,I=b("".charAt),D=b("".indexOf),M=b("".replace),V=b("".slice),G=(m=/b*/g,g(R,f=/a/,"a"),g(R,m,"a"),f.lastIndex!==0||m.lastIndex!==0),J=O.BROKEN_CARET,Y=/()??/.exec("")[1]!==void 0;(G||Y||J||P||L)&&(A=function(se){var ue,he,de,be,ie,H,te,z=this,$=S(z),F=w(se),ee=$.raw;if(ee)return ee.lastIndex=z.lastIndex,ue=g(A,ee,F),z.lastIndex=ee.lastIndex,ue;var ge=$.groups,_e=J&&z.sticky,je=g(E,z),ve=z.source,U=0,W=F;if(_e&&(je=M(je,"y",""),D(je,"g")===-1&&(je+="g"),W=V(F,z.lastIndex),z.lastIndex>0&&(!z.multiline||z.multiline&&I(F,z.lastIndex-1)!==`
24
+ `)},rr.prototype.renderPartial=function(a,h,p,y){if(p){var _=this.getConfigTags(y),d=Fl(p)?p(a[1]):p[a[1]];if(d!=null){var v=a[6],i=a[5],f=a[4],m=d;i==0&&f&&(m=this.indentPartial(d,f,v));var g=this.parse(m,_);return this.renderTokens(g,h,p,m,y)}}},rr.prototype.unescapedValue=function(a,h){var p=h.lookup(a[1]);if(p!=null)return p},rr.prototype.escapedValue=function(a,h,p){var y=this.getConfigEscape(p)||mr.escape,_=h.lookup(a[1]);if(_!=null)return typeof _=="number"&&y===mr.escape?String(_):y(_)},rr.prototype.rawValue=function(a){return a[1]},rr.prototype.getConfigTags=function(a){return Ki(a)?a:a&&typeof a=="object"?a.tags:void 0},rr.prototype.getConfigEscape=function(a){if(a&&typeof a=="object"&&!Ki(a))return a.escape};var mr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(o){na.templateCache=o},get templateCache(){return na.templateCache}},na=new rr;mr.clearCache=function(){return na.clearCache()},mr.parse=function(a,h){return na.parse(a,h)},mr.render=function(a,h,p,y){if(typeof a!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+$v(a)+'" was given as the first argument for mustache#render(template, view, partials)');return na.render(a,h,p,y)},mr.escape=Vv,mr.Scanner=ra,mr.Context=Wi,mr.Writer=rr;function Wv(o){try{const a=new URL(o),h=a.username,p=a.password;if(!h||!p)throw new Error("Username and password must be in URL (http://user:pass@host:port)");const y=`${a.protocol}//${a.host}`;return{username:h,password:p,baseUrl:y}}catch(a){throw new Error(`Invalid CouchDB URL format: ${a.message}. Use: http://user:pass@host:port`)}}const Zv=async o=>{if(!o.url)throw new Error("No DB URL provided");if(!o.name)throw new Error("No DB name provided");if(!o.encryption_key)throw new Error("No encryption key provided");const{username:a,password:h,baseUrl:p}=Wv(o.url);let y=o.name;console.log(p);const _=o.url.match(/^(https?:\/\/[^\/]+(?:\/[^\/]+)*)\/([^\/]+)$/);_&&(_[1],y=o.name||_[2]);const d=xt.create({baseURL:`${p}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:a,password:h}}),v=xt.create({baseURL:`${p}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:a,password:h}});try{await v.get("/")}catch(m){if(m.response?.status===404)await d.put(`/${y}`),console.log(`Created database: ${y}`);else throw m}const i={db_name:"couchdb-rest",name:y,encryption_key:o.encryption_key,api:{insert:async m=>(await v.post("/",m)).data,update:async m=>{if(!m._id||!m._rev)throw new Error("Document must have _id and _rev for update");return(await v.put(`/${m._id}`,m)).data},search:async m=>(await v.post("_find",m)).data,get:async m=>(await v.get(`/${m}`)).data,createIndex:async m=>(await v.post("_index",m)).data,delete:async m=>{const g=await v.get(`/${m}`);return(await v.delete(`/${g.data._id}?rev=${g.data._rev}`)).data}},utils:{encrypt:async(m,g)=>{const b=new TextEncoder,w=b.encode(m),E=b.encode(g);if(![16,24,32].includes(E.length))throw new Error("Encryption key must be 16, 24, or 32 bytes long.");const O=await crypto.subtle.importKey("raw",E,{name:"AES-GCM"},!1,["encrypt"]),j=crypto.getRandomValues(new Uint8Array(12)),x=await crypto.subtle.encrypt({name:"AES-GCM",iv:j},O,w),S=new Uint8Array(x),P=btoa(String.fromCharCode(...S));return`${btoa(String.fromCharCode(...j))}:${P}`},decrypt:async(m,g)=>{const[b,w]=m.split(":"),E=Uint8Array.from(atob(b),L=>L.charCodeAt(0)),O=Uint8Array.from(atob(w),L=>L.charCodeAt(0)),j=new TextEncoder,x=await crypto.subtle.importKey("raw",j.encode(g),{name:"AES-GCM"},!1,["decrypt"]),S=await crypto.subtle.decrypt({name:"AES-GCM",iv:E},x,O);return new TextDecoder().decode(S)},ping:async()=>{try{return await v.get("/"),!0}catch{return!1}},validate_schema:(m,g)=>{const b=new Tv({code:{esm:!0},strict:!1,useDefaults:!0}),w={...g},E=b.compile(m);return{valid:E(w),validate:E,data:w}},compile_template:{mustache:(m,g)=>mr.render(m,g)}}};return new Gr(i)},Yv="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Yv);const Qv=1,Xv=2,Rh=4,eb=8,tb=16,rb=1,nb=2,ib=4,ob=8,ab=16,sb=1,lb=2,Lh="[",Rs="[!",Vl="]",di={},Jt=Symbol(),cb="http://www.w3.org/1999/xhtml",zl=!1;var Ah=Array.isArray,ub=Array.prototype.indexOf,Ls=Array.from,As=Object.keys,$s=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,db=Object.prototype,hb=Array.prototype,fb=Object.getPrototypeOf,$h=Object.isExtensible;function pb(o){for(var a=0;a<o.length;a++)o[a]()}function Nh(){var o,a,h=new Promise((p,y)=>{o=p,a=y});return{promise:h,resolve:o,reject:a}}const Kt=2,Ns=4,Is=8,Ih=1<<24,fn=16,pn=32,Rn=64,ql=128,_r=512,Qt=1024,nr=2048,mn=4096,yr=8192,yn=16384,Ds=32768,Zi=65536,Dh=1<<17,Bh=1<<18,fi=1<<19,mb=1<<20,vn=1<<25,pi=32768,Hl=1<<21,Ul=1<<22,Ln=1<<23,ia=Symbol("$state"),Fh=Symbol("legacy props"),yb=Symbol(""),Yi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Bs=3,mi=8;function vb(o){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function bb(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function gb(o){throw new Error("https://svelte.dev/e/effect_in_teardown")}function _b(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function wb(o){throw new Error("https://svelte.dev/e/effect_orphan")}function kb(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jb(){throw new Error("https://svelte.dev/e/hydration_failed")}function Eb(o){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ob(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function xb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Sb(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Cb(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function oa(o){console.warn("https://svelte.dev/e/hydration_mismatch")}function Pb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let st=!1;function bn(o){st=o}let lt;function Xt(o){if(o===null)throw oa(),di;return lt=o}function Qi(){return Xt(Rr(lt))}function Re(o){if(st){if(Rr(lt)!==null)throw oa(),di;lt=o}}function Tb(o=1){if(st){for(var a=o,h=lt;a--;)h=Rr(h);lt=h}}function Fs(o=!0){for(var a=0,h=lt;;){if(h.nodeType===mi){var p=h.data;if(p===Vl){if(a===0)return h;a-=1}else(p===Lh||p===Rs)&&(a+=1)}var y=Rr(h);o&&h.remove(),h=y}}function Mh(o){if(!o||o.nodeType!==mi)throw oa(),di;return o.data}function Vh(o){return o===this.v}function Rb(o,a){return o!=o?a==a:o!==a||o!==null&&typeof o=="object"||typeof o=="function"}function zh(o){return!Rb(o,this.v)}let Xi=!1,Lb=!1;function Ab(){Xi=!0}let Pt=null;function eo(o){Pt=o}function yi(o,a=!1,h){Pt={p:Pt,i:!1,c:null,e:null,s:o,x:null,l:Xi&&!a?{s:null,u:null,$:[]}:null}}function vi(o){var a=Pt,h=a.e;if(h!==null){a.e=null;for(var p of h)hf(p)}return o!==void 0&&(a.x=o),a.i=!0,Pt=a.p,o??{}}function aa(){return!Xi||Pt!==null&&Pt.l===null}let bi=[];function qh(){var o=bi;bi=[],pb(o)}function gi(o){if(bi.length===0&&!sa){var a=bi;queueMicrotask(()=>{a===bi&&qh()})}bi.push(o)}function $b(){for(;bi.length>0;)qh()}function Hh(o){var a=ct;if(a===null)return ot.f|=Ln,o;if((a.f&Ds)===0){if((a.f&ql)===0)throw o;a.b.error(o)}else to(o,a)}function to(o,a){for(;a!==null;){if((a.f&ql)!==0)try{a.b.error(o);return}catch(h){o=h}a=a.parent}throw o}const Nb=-7169;function Ft(o,a){o.f=o.f&Nb|a}function Gl(o){(o.f&_r)!==0||o.deps===null?Ft(o,Qt):Ft(o,mn)}function Uh(o){if(o!==null)for(const a of o)(a.f&Kt)===0||(a.f&pi)===0||(a.f^=pi,Uh(a.deps))}function Gh(o,a,h){(o.f&nr)!==0?a.add(o):(o.f&mn)!==0&&h.add(o),Uh(o.deps),Ft(o,Qt)}const Ms=new Set;let pt=null,Vs=null,Cr=null,wr=[],zs=null,Jl=!1,sa=!1;class Pr{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#o=0;#a=null;#i=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#o>0}process(a){wr=[],Vs=null,this.apply();var h=[],p=[];for(const y of a)this.#s(y,h,p);this.is_fork||this.#c(),this.is_deferred()?(this.#l(p),this.#l(h)):(Vs=this,pt=null,Kh(p),Kh(h),Vs=null,this.#a?.resolve()),Cr=null}#s(a,h,p){a.f^=Qt;for(var y=a.first,_=null;y!==null;){var d=y.f,v=(d&(pn|Rn))!==0,i=v&&(d&Qt)!==0,f=i||(d&yr)!==0||this.skipped_effects.has(y);if(!f&&y.fn!==null){v?y.f^=Qt:_!==null&&(d&(Ns|Is|Ih))!==0?_.b.defer_effect(y):(d&Ns)!==0?h.push(y):ua(y)&&((d&fn)!==0&&this.#i.add(y),da(y));var m=y.first;if(m!==null){y=m;continue}}var g=y.parent;for(y=y.next;y===null&&g!==null;)g===_&&(_=null),y=g.next,g=g.parent}}#l(a){for(var h=0;h<a.length;h+=1)Gh(a[h],this.#i,this.#n)}capture(a,h){h!==Jt&&!this.previous.has(a)&&this.previous.set(a,h),(a.f&Ln)===0&&(this.current.set(a,a.v),Cr?.set(a,a.v))}activate(){pt=this,this.apply()}deactivate(){pt===this&&(pt=null,Cr=null)}flush(){if(this.activate(),wr.length>0){if(Jh(),pt!==null&&pt!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const a of this.#t)a(this);this.#t.clear()}#c(){if(this.#o===0){for(const a of this.#e)a();this.#e.clear()}this.#r===0&&this.#u()}#u(){if(Ms.size>1){this.previous.clear();var a=Cr,h=!0;for(const y of Ms){if(y===this){h=!1;continue}const _=[];for(const[v,i]of this.current){if(y.current.has(v))if(h&&i!==y.current.get(v))y.current.set(v,i);else continue;_.push(v)}if(_.length===0)continue;const d=[...y.current.keys()].filter(v=>!this.current.has(v));if(d.length>0){var p=wr;wr=[];const v=new Set,i=new Map;for(const f of _)Wh(f,d,v,i);if(wr.length>0){pt=y,y.apply();for(const f of wr)y.#s(f,[],[]);y.deactivate()}wr=p}}pt=null,Cr=a}this.committed=!0,Ms.delete(this)}increment(a){this.#r+=1,a&&(this.#o+=1)}decrement(a){this.#r-=1,a&&(this.#o-=1),this.revive()}revive(){for(const a of this.#i)this.#n.delete(a),Ft(a,nr),_n(a);for(const a of this.#n)Ft(a,mn),_n(a);this.flush()}oncommit(a){this.#e.add(a)}ondiscard(a){this.#t.add(a)}settled(){return(this.#a??=Nh()).promise}static ensure(){if(pt===null){const a=pt=new Pr;Ms.add(pt),sa||Pr.enqueue(()=>{pt===a&&a.flush()})}return pt}static enqueue(a){gi(a)}apply(){}}function St(o){var a=sa;sa=!0;try{for(var h;;){if($b(),wr.length===0&&(pt?.flush(),wr.length===0))return zs=null,h;Jh()}}finally{sa=a}}function Jh(){var o=ki;Jl=!0;var a=null;try{var h=0;for(Gs(!0);wr.length>0;){var p=Pr.ensure();if(h++>1e3){var y,_;Ib()}p.process(wr),An.clear()}}finally{Jl=!1,Gs(o),zs=null}}function Ib(){try{kb()}catch(o){to(o,zs)}}let gn=null;function Kh(o){var a=o.length;if(a!==0){for(var h=0;h<a;){var p=o[h++];if((p.f&(yn|yr))===0&&ua(p)&&(gn=new Set,da(p),p.deps===null&&p.first===null&&p.nodes===null&&(p.teardown===null&&p.ac===null?vf(p):p.fn=null),gn?.size>0)){An.clear();for(const y of gn){if((y.f&(yn|yr))!==0)continue;const _=[y];let d=y.parent;for(;d!==null;)gn.has(d)&&(gn.delete(d),_.push(d)),d=d.parent;for(let v=_.length-1;v>=0;v--){const i=_[v];(i.f&(yn|yr))===0&&da(i)}}gn.clear()}}gn=null}}function Wh(o,a,h,p){if(!h.has(o)&&(h.add(o),o.reactions!==null))for(const y of o.reactions){const _=y.f;(_&Kt)!==0?Wh(y,a,h,p):(_&(Ul|fn))!==0&&(_&nr)===0&&Zh(y,a,p)&&(Ft(y,nr),_n(y))}}function Zh(o,a,h){const p=h.get(o);if(p!==void 0)return p;if(o.deps!==null)for(const y of o.deps){if(a.includes(y))return!0;if((y.f&Kt)!==0&&Zh(y,a,h))return h.set(y,!0),!0}return h.set(o,!1),!1}function _n(o){for(var a=zs=o;a.parent!==null;){a=a.parent;var h=a.f;if(Jl&&a===ct&&(h&fn)!==0&&(h&Bh)===0)return;if((h&(Rn|pn))!==0){if((h&Qt)===0)return;a.f^=Qt}}wr.push(a)}function Db(o){let a=0,h=_i(0),p;return()=>{Xl()&&(re(h),Us(()=>(a===0&&(p=ha(()=>o(()=>la(h)))),a+=1,()=>{gi(()=>{a-=1,a===0&&(p?.(),p=void 0,la(h))})})))}}var Bb=Zi|fi|ql;function Fb(o,a,h){new Mb(o,a,h)}class Mb{parent;is_pending=!1;#e;#t=st?lt:null;#r;#o;#a;#i=null;#n=null;#s=null;#l=null;#c=null;#u=0;#d=0;#f=!1;#p=new Set;#m=new Set;#h=null;#_=Db(()=>(this.#h=_i(this.#u),()=>{this.#h=null}));constructor(a,h,p){this.#e=a,this.#r=h,this.#o=p,this.parent=ct.b,this.is_pending=!!this.#r.pending,this.#a=tc(()=>{if(ct.b=this,st){const _=this.#t;Qi(),_.nodeType===mi&&_.data===Rs?this.#k():(this.#w(),this.#d===0&&(this.is_pending=!1))}else{var y=this.#b();try{this.#i=jr(()=>p(y))}catch(_){this.error(_)}this.#d>0?this.#v():this.is_pending=!1}return()=>{this.#c?.remove()}},Bb),st&&(this.#e=lt)}#w(){try{this.#i=jr(()=>this.#o(this.#e))}catch(a){this.error(a)}}#k(){const a=this.#r.pending;a&&(this.#n=jr(()=>a(this.#e)),Pr.enqueue(()=>{var h=this.#b();this.#i=this.#y(()=>(Pr.ensure(),jr(()=>this.#o(h)))),this.#d>0?this.#v():(wi(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var a=this.#e;return this.is_pending&&(this.#c=dr(),this.#e.before(this.#c),a=this.#c),a}defer_effect(a){Gh(a,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#y(a){var h=ct,p=ot,y=Pt;Wr(this.#a),hr(this.#a),eo(this.#a.ctx);try{return a()}catch(_){return Hh(_),null}finally{Wr(h),hr(p),eo(y)}}#v(){const a=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),_f(this.#i,this.#l)),this.#n===null&&(this.#n=jr(()=>a(this.#e)))}#g(a){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(a);return}if(this.#d+=a,this.#d===0){this.is_pending=!1;for(const h of this.#p)Ft(h,nr),_n(h);for(const h of this.#m)Ft(h,mn),_n(h);this.#p.clear(),this.#m.clear(),this.#n&&wi(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(a){this.#g(a),this.#u+=a,this.#h&&ro(this.#h,this.#u)}get_effect_pending(){return this.#_(),re(this.#h)}error(a){var h=this.#r.onerror;let p=this.#r.failed;if(this.#f||!h&&!p)throw a;this.#i&&(ir(this.#i),this.#i=null),this.#n&&(ir(this.#n),this.#n=null),this.#s&&(ir(this.#s),this.#s=null),st&&(Xt(this.#t),Tb(),Xt(Fs()));var y=!1,_=!1;const d=()=>{if(y){Pb();return}y=!0,_&&Cb(),Pr.ensure(),this.#u=0,this.#s!==null&&wi(this.#s,()=>{this.#s=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#y(()=>(this.#f=!1,jr(()=>this.#o(this.#e)))),this.#d>0?this.#v():this.is_pending=!1};var v=ot;try{hr(null),_=!0,h?.(a,d),_=!1}catch(i){to(i,this.#a&&this.#a.parent)}finally{hr(v)}p&&gi(()=>{this.#s=this.#y(()=>{Pr.ensure(),this.#f=!0;try{return jr(()=>{p(this.#e,()=>a,()=>d)})}catch(i){return to(i,this.#a.parent),null}finally{this.#f=!1}})})}}function Vb(o,a,h,p){const y=aa()?Kl:Wl;if(h.length===0&&o.length===0){p(a.map(y));return}var _=pt,d=ct,v=zb();function i(){Promise.all(h.map(f=>qb(f))).then(f=>{v();try{p([...a.map(y),...f])}catch(m){(d.f&yn)===0&&to(m,d)}_?.deactivate(),qs()}).catch(f=>{to(f,d)})}o.length>0?Promise.all(o).then(()=>{v();try{return i()}finally{_?.deactivate(),qs()}}):i()}function zb(){var o=ct,a=ot,h=Pt,p=pt;return function(_=!0){Wr(o),hr(a),eo(h),_&&p?.activate()}}function qs(){Wr(null),hr(null),eo(null)}function Kl(o){var a=Kt|nr,h=ot!==null&&(ot.f&Kt)!==0?ot:null;return ct!==null&&(ct.f|=fi),{ctx:Pt,deps:null,effects:null,equals:Vh,f:a,fn:o,reactions:null,rv:0,v:Jt,wv:0,parent:h??ct,ac:null}}function qb(o,a,h){let p=ct;p===null&&bb();var y=p.b,_=void 0,d=_i(Jt),v=!ot,i=new Map;return Yb(()=>{var f=Nh();_=f.promise;try{Promise.resolve(o()).then(f.resolve,f.reject).then(()=>{m===pt&&m.committed&&m.deactivate(),qs()})}catch(w){f.reject(w),qs()}var m=pt;if(v){var g=y.is_rendered();y.update_pending_count(1),m.increment(g),i.get(m)?.reject(Yi),i.delete(m),i.set(m,f)}const b=(w,E=void 0)=>{if(m.activate(),E)E!==Yi&&(d.f|=Ln,ro(d,E));else{(d.f&Ln)!==0&&(d.f^=Ln),ro(d,w);for(const[O,j]of i){if(i.delete(O),O===m)break;j.reject(Yi)}}v&&(y.update_pending_count(-1),m.decrement(g))};f.promise.then(b,w=>b(null,w||"unknown"))}),df(()=>{for(const f of i.values())f.reject(Yi)}),new Promise(f=>{function m(g){function b(){g===_?f(d):m(_)}g.then(b,b)}m(_)})}function Wl(o){const a=Kl(o);return a.equals=zh,a}function Yh(o){var a=o.effects;if(a!==null){o.effects=null;for(var h=0;h<a.length;h+=1)ir(a[h])}}function Hb(o){for(var a=o.parent;a!==null;){if((a.f&Kt)===0)return(a.f&yn)===0?a:null;a=a.parent}return null}function Zl(o){var a,h=ct;Wr(Hb(o));try{o.f&=~pi,Yh(o),a=xf(o)}finally{Wr(h)}return a}function Qh(o){var a=Zl(o);if(!o.equals(a)&&(o.wv=Ef(),(!pt?.is_fork||o.deps===null)&&(o.v=a,o.deps===null))){Ft(o,Qt);return}$n||(Cr!==null?(Xl()||pt?.is_fork)&&Cr.set(o,a):Gl(o))}let Yl=new Set;const An=new Map;let Xh=!1;function _i(o,a){var h={f:0,v:o,reactions:null,equals:Vh,rv:0,wv:0};return h}function mt(o,a){const h=_i(o);return Xb(h),h}function ef(o,a=!1,h=!0){const p=_i(o);return a||(p.equals=zh),Xi&&h&&Pt!==null&&Pt.l!==null&&(Pt.l.s??=[]).push(p),p}function et(o,a,h=!1){ot!==null&&(!Lr||(ot.f&Dh)!==0)&&aa()&&(ot.f&(Kt|fn|Ul|Dh))!==0&&!wn?.includes(o)&&Sb();let p=h?kr(a):a;return ro(o,p)}function ro(o,a){if(!o.equals(a)){var h=o.v;$n?An.set(o,a):An.set(o,h),o.v=a;var p=Pr.ensure();if(p.capture(o,h),(o.f&Kt)!==0){const y=o;(o.f&nr)!==0&&Zl(y),Gl(y)}o.wv=Ef(),tf(o,nr),aa()&&ct!==null&&(ct.f&Qt)!==0&&(ct.f&(pn|Rn))===0&&(Er===null?eg([o]):Er.push(o)),!p.is_fork&&Yl.size>0&&!Xh&&Ub()}return a}function Ub(){Xh=!1;var o=ki;Gs(!0);const a=Array.from(Yl);try{for(const h of a)(h.f&Qt)!==0&&Ft(h,mn),ua(h)&&da(h)}finally{Gs(o)}Yl.clear()}function la(o){et(o,o.v+1)}function tf(o,a){var h=o.reactions;if(h!==null)for(var p=aa(),y=h.length,_=0;_<y;_++){var d=h[_],v=d.f;if(!(!p&&d===ct)){var i=(v&nr)===0;if(i&&Ft(d,a),(v&Kt)!==0){var f=d;Cr?.delete(f),(v&pi)===0&&(v&_r&&(d.f|=pi),tf(f,mn))}else i&&((v&fn)!==0&&gn!==null&&gn.add(d),_n(d))}}}function kr(o){if(typeof o!="object"||o===null||ia in o)return o;const a=fb(o);if(a!==db&&a!==hb)return o;var h=new Map,p=Ah(o),y=mt(0),_=ji,d=v=>{if(ji===_)return v();var i=ot,f=ji;hr(null),jf(_);var m=v();return hr(i),jf(f),m};return p&&h.set("length",mt(o.length)),new Proxy(o,{defineProperty(v,i,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ob();var m=h.get(i);return m===void 0?m=d(()=>{var g=mt(f.value);return h.set(i,g),g}):et(m,f.value,!0),!0},deleteProperty(v,i){var f=h.get(i);if(f===void 0){if(i in v){const m=d(()=>mt(Jt));h.set(i,m),la(y)}}else et(f,Jt),la(y);return!0},get(v,i,f){if(i===ia)return o;var m=h.get(i),g=i in v;if(m===void 0&&(!g||hi(v,i)?.writable)&&(m=d(()=>{var w=kr(g?v[i]:Jt),E=mt(w);return E}),h.set(i,m)),m!==void 0){var b=re(m);return b===Jt?void 0:b}return Reflect.get(v,i,f)},getOwnPropertyDescriptor(v,i){var f=Reflect.getOwnPropertyDescriptor(v,i);if(f&&"value"in f){var m=h.get(i);m&&(f.value=re(m))}else if(f===void 0){var g=h.get(i),b=g?.v;if(g!==void 0&&b!==Jt)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return f},has(v,i){if(i===ia)return!0;var f=h.get(i),m=f!==void 0&&f.v!==Jt||Reflect.has(v,i);if(f!==void 0||ct!==null&&(!m||hi(v,i)?.writable)){f===void 0&&(f=d(()=>{var b=m?kr(v[i]):Jt,w=mt(b);return w}),h.set(i,f));var g=re(f);if(g===Jt)return!1}return m},set(v,i,f,m){var g=h.get(i),b=i in v;if(p&&i==="length")for(var w=f;w<g.v;w+=1){var E=h.get(w+"");E!==void 0?et(E,Jt):w in v&&(E=d(()=>mt(Jt)),h.set(w+"",E))}if(g===void 0)(!b||hi(v,i)?.writable)&&(g=d(()=>mt(void 0)),et(g,kr(f)),h.set(i,g));else{b=g.v!==Jt;var O=d(()=>kr(f));et(g,O)}var j=Reflect.getOwnPropertyDescriptor(v,i);if(j?.set&&j.set.call(m,f),!b){if(p&&typeof i=="string"){var x=h.get("length"),S=Number(i);Number.isInteger(S)&&S>=x.v&&et(x,S+1)}la(y)}return!0},ownKeys(v){re(y);var i=Reflect.ownKeys(v).filter(g=>{var b=h.get(g);return b===void 0||b.v!==Jt});for(var[f,m]of h)m.v!==Jt&&!(f in v)&&i.push(f);return i},setPrototypeOf(){xb()}})}var rf,nf,of,af;function Ql(){if(rf===void 0){rf=window,nf=/Firefox/.test(navigator.userAgent);var o=Element.prototype,a=Node.prototype,h=Text.prototype;of=hi(a,"firstChild").get,af=hi(a,"nextSibling").get,$h(o)&&(o.__click=void 0,o.__className=void 0,o.__attributes=null,o.__style=void 0,o.__e=void 0),$h(h)&&(h.__t=void 0)}}function dr(o=""){return document.createTextNode(o)}function Tr(o){return of.call(o)}function Rr(o){return af.call(o)}function Le(o,a){if(!st)return Tr(o);var h=Tr(lt);if(h===null)h=lt.appendChild(dr());else if(a&&h.nodeType!==Bs){var p=dr();return h?.before(p),Xt(p),p}return Xt(h),h}function Mt(o,a=!1){if(!st){var h=Tr(o);return h instanceof Comment&&h.data===""?Rr(h):h}if(a&&lt?.nodeType!==Bs){var p=dr();return lt?.before(p),Xt(p),p}return lt}function Ue(o,a=1,h=!1){let p=st?lt:o;for(var y;a--;)y=p,p=Rr(p);if(!st)return p;if(h&&p?.nodeType!==Bs){var _=dr();return p===null?y?.after(_):p.before(_),Xt(_),_}return Xt(p),p}function sf(o){o.textContent=""}function lf(){return!1}let cf=!1;function uf(){cf||(cf=!0,document.addEventListener("reset",o=>{Promise.resolve().then(()=>{if(!o.defaultPrevented)for(const a of o.target.elements)a.__on_r?.()})},{capture:!0}))}function Hs(o){var a=ot,h=ct;hr(null),Wr(null);try{return o()}finally{hr(a),Wr(h)}}function Gb(o,a,h,p=h){o.addEventListener(a,()=>Hs(h));const y=o.__on_r;y?o.__on_r=()=>{y(),p(!0)}:o.__on_r=()=>p(!0),uf()}function Jb(o){ct===null&&(ot===null&&wb(),_b()),$n&&gb()}function Kb(o,a){var h=a.last;h===null?a.last=a.first=o:(h.next=o,o.prev=h,a.last=o)}function Kr(o,a,h){var p=ct;p!==null&&(p.f&yr)!==0&&(o|=yr);var y={ctx:Pt,deps:null,nodes:null,f:o|nr|_r,first:null,fn:a,last:null,next:null,parent:p,b:p&&p.b,prev:null,teardown:null,wv:0,ac:null};if(h)try{da(y),y.f|=Ds}catch(v){throw ir(y),v}else a!==null&&_n(y);var _=y;if(h&&_.deps===null&&_.teardown===null&&_.nodes===null&&_.first===_.last&&(_.f&fi)===0&&(_=_.first,(o&fn)!==0&&(o&Zi)!==0&&_!==null&&(_.f|=Zi)),_!==null&&(_.parent=p,p!==null&&Kb(_,p),ot!==null&&(ot.f&Kt)!==0&&(o&Rn)===0)){var d=ot;(d.effects??=[]).push(_)}return y}function Xl(){return ot!==null&&!Lr}function df(o){const a=Kr(Is,null,!1);return Ft(a,Qt),a.teardown=o,a}function ec(o){Jb();var a=ct.f,h=!ot&&(a&pn)!==0&&(a&Ds)===0;if(h){var p=Pt;(p.e??=[]).push(o)}else return hf(o)}function hf(o){return Kr(Ns|mb,o,!1)}function Wb(o){Pr.ensure();const a=Kr(Rn|fi,o,!0);return()=>{ir(a)}}function Zb(o){Pr.ensure();const a=Kr(Rn|fi,o,!0);return(h={})=>new Promise(p=>{h.outro?wi(a,()=>{ir(a),p(void 0)}):(ir(a),p(void 0))})}function ff(o){return Kr(Ns,o,!1)}function Yb(o){return Kr(Ul|fi,o,!0)}function Us(o,a=0){return Kr(Is|a,o,!0)}function Vt(o,a=[],h=[],p=[]){Vb(p,a,h,y=>{Kr(Is,()=>o(...y.map(re)),!0)})}function tc(o,a=0){var h=Kr(fn|a,o,!0);return h}function jr(o){return Kr(pn|fi,o,!0)}function pf(o){var a=o.teardown;if(a!==null){const h=$n,p=ot;wf(!0),hr(null);try{a.call(null)}finally{wf(h),hr(p)}}}function mf(o,a=!1){var h=o.first;for(o.first=o.last=null;h!==null;){const y=h.ac;y!==null&&Hs(()=>{y.abort(Yi)});var p=h.next;(h.f&Rn)!==0?h.parent=null:ir(h,a),h=p}}function Qb(o){for(var a=o.first;a!==null;){var h=a.next;(a.f&pn)===0&&ir(a),a=h}}function ir(o,a=!0){var h=!1;(a||(o.f&Bh)!==0)&&o.nodes!==null&&o.nodes.end!==null&&(yf(o.nodes.start,o.nodes.end),h=!0),mf(o,a&&!h),Js(o,0),Ft(o,yn);var p=o.nodes&&o.nodes.t;if(p!==null)for(const _ of p)_.stop();pf(o);var y=o.parent;y!==null&&y.first!==null&&vf(o),o.next=o.prev=o.teardown=o.ctx=o.deps=o.fn=o.nodes=o.ac=null}function yf(o,a){for(;o!==null;){var h=o===a?null:Rr(o);o.remove(),o=h}}function vf(o){var a=o.parent,h=o.prev,p=o.next;h!==null&&(h.next=p),p!==null&&(p.prev=h),a!==null&&(a.first===o&&(a.first=p),a.last===o&&(a.last=h))}function wi(o,a,h=!0){var p=[];bf(o,p,!0);var y=()=>{h&&ir(o),a&&a()},_=p.length;if(_>0){var d=()=>--_||y();for(var v of p)v.out(d)}else y()}function bf(o,a,h){if((o.f&yr)===0){o.f^=yr;var p=o.nodes&&o.nodes.t;if(p!==null)for(const v of p)(v.is_global||h)&&a.push(v);for(var y=o.first;y!==null;){var _=y.next,d=(y.f&Zi)!==0||(y.f&pn)!==0&&(o.f&fn)!==0;bf(y,a,d?h:!1),y=_}}}function rc(o){gf(o,!0)}function gf(o,a){if((o.f&yr)!==0){o.f^=yr,(o.f&Qt)===0&&(Ft(o,nr),_n(o));for(var h=o.first;h!==null;){var p=h.next,y=(h.f&Zi)!==0||(h.f&pn)!==0;gf(h,y?a:!1),h=p}var _=o.nodes&&o.nodes.t;if(_!==null)for(const d of _)(d.is_global||a)&&d.in()}}function _f(o,a){if(o.nodes)for(var h=o.nodes.start,p=o.nodes.end;h!==null;){var y=h===p?null:Rr(h);a.append(h),h=y}}let ki=!1;function Gs(o){ki=o}let $n=!1;function wf(o){$n=o}let ot=null,Lr=!1;function hr(o){ot=o}let ct=null;function Wr(o){ct=o}let wn=null;function Xb(o){ot!==null&&(wn===null?wn=[o]:wn.push(o))}let or=null,vr=0,Er=null;function eg(o){Er=o}let kf=1,ca=0,ji=ca;function jf(o){ji=o}function Ef(){return++kf}function ua(o){var a=o.f;if((a&nr)!==0)return!0;if(a&Kt&&(o.f&=~pi),(a&mn)!==0){for(var h=o.deps,p=h.length,y=0;y<p;y++){var _=h[y];if(ua(_)&&Qh(_),_.wv>o.wv)return!0}(a&_r)!==0&&Cr===null&&Ft(o,Qt)}return!1}function Of(o,a,h=!0){var p=o.reactions;if(p!==null&&!wn?.includes(o))for(var y=0;y<p.length;y++){var _=p[y];(_.f&Kt)!==0?Of(_,a,!1):a===_&&(h?Ft(_,nr):(_.f&Qt)!==0&&Ft(_,mn),_n(_))}}function xf(o){var a=or,h=vr,p=Er,y=ot,_=wn,d=Pt,v=Lr,i=ji,f=o.f;or=null,vr=0,Er=null,ot=(f&(pn|Rn))===0?o:null,wn=null,eo(o.ctx),Lr=!1,ji=++ca,o.ac!==null&&(Hs(()=>{o.ac.abort(Yi)}),o.ac=null);try{o.f|=Hl;var m=o.fn,g=m(),b=o.deps;if(or!==null){var w;if(Js(o,vr),b!==null&&vr>0)for(b.length=vr+or.length,w=0;w<or.length;w++)b[vr+w]=or[w];else o.deps=b=or;if(Xl()&&(o.f&_r)!==0)for(w=vr;w<b.length;w++)(b[w].reactions??=[]).push(o)}else b!==null&&vr<b.length&&(Js(o,vr),b.length=vr);if(aa()&&Er!==null&&!Lr&&b!==null&&(o.f&(Kt|mn|nr))===0)for(w=0;w<Er.length;w++)Of(Er[w],o);return y!==null&&y!==o&&(ca++,Er!==null&&(p===null?p=Er:p.push(...Er))),(o.f&Ln)!==0&&(o.f^=Ln),g}catch(E){return Hh(E)}finally{o.f^=Hl,or=a,vr=h,Er=p,ot=y,wn=_,eo(d),Lr=v,ji=i}}function tg(o,a){let h=a.reactions;if(h!==null){var p=ub.call(h,o);if(p!==-1){var y=h.length-1;y===0?h=a.reactions=null:(h[p]=h[y],h.pop())}}if(h===null&&(a.f&Kt)!==0&&(or===null||!or.includes(a))){var _=a;(_.f&_r)!==0&&(_.f^=_r,_.f&=~pi),Gl(_),Yh(_),Js(_,0)}}function Js(o,a){var h=o.deps;if(h!==null)for(var p=a;p<h.length;p++)tg(o,h[p])}function da(o){var a=o.f;if((a&yn)===0){Ft(o,Qt);var h=ct,p=ki;ct=o,ki=!0;try{(a&(fn|Ih))!==0?Qb(o):mf(o),pf(o);var y=xf(o);o.teardown=typeof y=="function"?y:null,o.wv=kf;var _;zl&&Lb&&(o.f&nr)!==0&&o.deps}finally{ki=p,ct=h}}}async function rg(){await Promise.resolve(),St()}function re(o){var a=o.f,h=(a&Kt)!==0;if(ot!==null&&!Lr){var p=ct!==null&&(ct.f&yn)!==0;if(!p&&!wn?.includes(o)){var y=ot.deps;if((ot.f&Hl)!==0)o.rv<ca&&(o.rv=ca,or===null&&y!==null&&y[vr]===o?vr++:or===null?or=[o]:or.includes(o)||or.push(o));else{(ot.deps??=[]).push(o);var _=o.reactions;_===null?o.reactions=[ot]:_.includes(ot)||_.push(ot)}}}if($n&&An.has(o))return An.get(o);if(h){var d=o;if($n){var v=d.v;return((d.f&Qt)===0&&d.reactions!==null||Cf(d))&&(v=Zl(d)),An.set(d,v),v}var i=(d.f&_r)===0&&!Lr&&ot!==null&&(ki||(ot.f&_r)!==0),f=d.deps===null;ua(d)&&(i&&(d.f|=_r),Qh(d)),i&&!f&&Sf(d)}if(Cr?.has(o))return Cr.get(o);if((o.f&Ln)!==0)throw o.v;return o.v}function Sf(o){if(o.deps!==null){o.f|=_r;for(const a of o.deps)(a.reactions??=[]).push(o),(a.f&Kt)!==0&&(a.f&_r)===0&&Sf(a)}}function Cf(o){if(o.v===Jt)return!0;if(o.deps===null)return!1;for(const a of o.deps)if(An.has(a)||(a.f&Kt)!==0&&Cf(a))return!0;return!1}function ha(o){var a=Lr;try{return Lr=!0,o()}finally{Lr=a}}const Pf=new Set,nc=new Set;function ng(o,a,h,p={}){function y(_){if(p.capture||fa.call(a,_),!_.cancelBubble)return Hs(()=>h?.call(this,_))}return o.startsWith("pointer")||o.startsWith("touch")||o==="wheel"?gi(()=>{a.addEventListener(o,y,p)}):a.addEventListener(o,y,p),y}function ig(o,a,h,p,y){var _={capture:p,passive:y},d=ng(o,a,h,_);(a===document.body||a===window||a===document||a instanceof HTMLMediaElement)&&df(()=>{a.removeEventListener(o,d,_)})}function ic(o){for(var a=0;a<o.length;a++)Pf.add(o[a]);for(var h of nc)h(o)}let Tf=null;function fa(o){var a=this,h=a.ownerDocument,p=o.type,y=o.composedPath?.()||[],_=y[0]||o.target;Tf=o;var d=0,v=Tf===o&&o.__root;if(v){var i=y.indexOf(v);if(i!==-1&&(a===document||a===window)){o.__root=a;return}var f=y.indexOf(a);if(f===-1)return;i<=f&&(d=i)}if(_=y[d]||o.target,_!==a){$s(o,"currentTarget",{configurable:!0,get(){return _||h}});var m=ot,g=ct;hr(null),Wr(null);try{for(var b,w=[];_!==null;){var E=_.assignedSlot||_.parentNode||_.host||null;try{var O=_["__"+p];O!=null&&(!_.disabled||o.target===_)&&O.call(_,o)}catch(j){b?w.push(j):b=j}if(o.cancelBubble||E===a||E===null)break;_=E}if(b){for(let j of w)queueMicrotask(()=>{throw j});throw b}}finally{o.__root=a,delete o.currentTarget,hr(m),Wr(g)}}}function Rf(o){var a=document.createElement("template");return a.innerHTML=o.replaceAll("<!>","<!---->"),a.content}function Zr(o,a){var h=ct;h.nodes===null&&(h.nodes={start:o,end:a,a:null,t:null})}function dt(o,a){var h=(a&sb)!==0,p=(a&lb)!==0,y,_=!o.startsWith("<!>");return()=>{if(st)return Zr(lt,null),lt;y===void 0&&(y=Rf(_?o:"<!>"+o),h||(y=Tr(y)));var d=p||nf?document.importNode(y,!0):y.cloneNode(!0);if(h){var v=Tr(d),i=d.lastChild;Zr(v,i)}else Zr(d,d);return d}}function oc(o=""){if(!st){var a=dr(o+"");return Zr(a,a),a}var h=lt;return h.nodeType!==Bs&&(h.before(h=dr()),Xt(h)),Zr(h,h),h}function Nn(){if(st)return Zr(lt,null),lt;var o=document.createDocumentFragment(),a=document.createComment(""),h=dr();return o.append(a,h),Zr(a,h),o}function Me(o,a){if(st){var h=ct;((h.f&Ds)===0||h.nodes.end===null)&&(h.nodes.end=lt),Qi();return}o!==null&&o.before(a)}const og=["touchstart","touchmove"];function ag(o){return og.includes(o)}function Tt(o,a){var h=a==null?"":typeof a=="object"?a+"":a;h!==(o.__t??=o.nodeValue)&&(o.__t=h,o.nodeValue=h+"")}function Lf(o,a){return Af(o,a)}function sg(o,a){Ql(),a.intro=a.intro??!1;const h=a.target,p=st,y=lt;try{for(var _=Tr(h);_&&(_.nodeType!==mi||_.data!==Lh);)_=Rr(_);if(!_)throw di;bn(!0),Xt(_);const d=Af(o,{...a,anchor:_});return bn(!1),d}catch(d){if(d instanceof Error&&d.message.split(`
25
+ `).some(v=>v.startsWith("https://svelte.dev/e/")))throw d;return d!==di&&console.warn("Failed to hydrate: ",d),a.recover===!1&&jb(),Ql(),sf(h),bn(!1),Lf(o,a)}finally{bn(p),Xt(y)}}const no=new Map;function Af(o,{target:a,anchor:h,props:p={},events:y,context:_,intro:d=!0}){Ql();var v=new Set,i=g=>{for(var b=0;b<g.length;b++){var w=g[b];if(!v.has(w)){v.add(w);var E=ag(w);a.addEventListener(w,fa,{passive:E});var O=no.get(w);O===void 0?(document.addEventListener(w,fa,{passive:E}),no.set(w,1)):no.set(w,O+1)}}};i(Ls(Pf)),nc.add(i);var f=void 0,m=Zb(()=>{var g=h??a.appendChild(dr());return Fb(g,{pending:()=>{}},b=>{if(_){yi({});var w=Pt;w.c=_}if(y&&(p.$$events=y),st&&Zr(b,null),f=o(b,p)||{},st&&(ct.nodes.end=lt,lt===null||lt.nodeType!==mi||lt.data!==Vl))throw oa(),di;_&&vi()}),()=>{for(var b of v){a.removeEventListener(b,fa);var w=no.get(b);--w===0?(document.removeEventListener(b,fa),no.delete(b)):no.set(b,w)}nc.delete(i),g!==h&&g.parentNode?.removeChild(g)}});return ac.set(f,m),f}let ac=new WeakMap;function lg(o,a){const h=ac.get(o);return h?(ac.delete(o),h(a)):Promise.resolve()}class cg{anchor;#e=new Map;#t=new Map;#r=new Map;#o=new Set;#a=!0;constructor(a,h=!0){this.anchor=a,this.#a=h}#i=()=>{var a=pt;if(this.#e.has(a)){var h=this.#e.get(a),p=this.#t.get(h);if(p)rc(p),this.#o.delete(h);else{var y=this.#r.get(h);y&&(this.#t.set(h,y.effect),this.#r.delete(h),y.fragment.lastChild.remove(),this.anchor.before(y.fragment),p=y.effect)}for(const[_,d]of this.#e){if(this.#e.delete(_),_===a)break;const v=this.#r.get(d);v&&(ir(v.effect),this.#r.delete(d))}for(const[_,d]of this.#t){if(_===h||this.#o.has(_))continue;const v=()=>{if(Array.from(this.#e.values()).includes(_)){var f=document.createDocumentFragment();_f(d,f),f.append(dr()),this.#r.set(_,{effect:d,fragment:f})}else ir(d);this.#o.delete(_),this.#t.delete(_)};this.#a||!p?(this.#o.add(_),wi(d,v,!1)):v()}}};#n=a=>{this.#e.delete(a);const h=Array.from(this.#e.values());for(const[p,y]of this.#r)h.includes(p)||(ir(y.effect),this.#r.delete(p))};ensure(a,h){var p=pt,y=lf();if(h&&!this.#t.has(a)&&!this.#r.has(a))if(y){var _=document.createDocumentFragment(),d=dr();_.append(d),this.#r.set(a,{effect:jr(()=>h(d)),fragment:_})}else this.#t.set(a,jr(()=>h(this.anchor)));if(this.#e.set(p,a),y){for(const[v,i]of this.#t)v===a?p.skipped_effects.delete(i):p.skipped_effects.add(i);for(const[v,i]of this.#r)v===a?p.skipped_effects.delete(i.effect):p.skipped_effects.add(i.effect);p.oncommit(this.#i),p.ondiscard(this.#n)}else st&&(this.anchor=lt),this.#i()}}function Ks(o){Pt===null&&vb(),Xi&&Pt.l!==null?ug(Pt).m.push(o):ec(()=>{const a=ha(o);if(typeof a=="function")return a})}function ug(o){var a=o.l;return a.u??={a:[],b:[],m:[]}}function Rt(o,a,h=!1){st&&Qi();var p=new cg(o),y=h?Zi:0;function _(d,v){if(st){const f=Mh(o)===Rs;if(d===f){var i=Fs();Xt(i),p.anchor=i,bn(!1),p.ensure(d,v),bn(!0);return}}p.ensure(d,v)}tc(()=>{var d=!1;a((v,i=!0)=>{d=!0,_(i,v)}),d||_(!1,null)},y)}function pa(o,a){return a}function dg(o,a,h){for(var p=[],y=a.length,_,d=a.length,v=0;v<y;v++){let g=a[v];wi(g,()=>{if(_){if(_.pending.delete(g),_.done.add(g),_.pending.size===0){var b=o.outrogroups;sc(Ls(_.done)),b.delete(_),b.size===0&&(o.outrogroups=null)}}else d-=1},!1)}if(d===0){var i=p.length===0&&h!==null;if(i){var f=h,m=f.parentNode;sf(m),m.append(f),o.items.clear()}sc(a,!i)}else _={pending:new Set(a),done:new Set},(o.outrogroups??=new Set).add(_)}function sc(o,a=!0){for(var h=0;h<o.length;h++)ir(o[h],a)}var $f;function io(o,a,h,p,y,_=null){var d=o,v=new Map,i=(a&Rh)!==0;if(i){var f=o;d=st?Xt(Tr(f)):f.appendChild(dr())}st&&Qi();var m=null,g=Wl(()=>{var x=h();return Ah(x)?x:x==null?[]:Ls(x)}),b,w=!0;function E(){j.fallback=m,hg(j,b,d,a,p),m!==null&&(b.length===0?(m.f&vn)===0?rc(m):(m.f^=vn,ma(m,null,d)):wi(m,()=>{m=null}))}var O=tc(()=>{b=re(g);var x=b.length;let S=!1;if(st){var P=Mh(d)===Rs;P!==(x===0)&&(d=Fs(),Xt(d),bn(!1),S=!0)}for(var L=new Set,C=pt,R=lf(),A=0;A<x;A+=1){st&&lt.nodeType===mi&&lt.data===Vl&&(d=lt,S=!0,bn(!1));var I=b[A],D=p(I,A),M=w?null:v.get(D);M?(M.v&&ro(M.v,I),M.i&&ro(M.i,A),R&&C.skipped_effects.delete(M.e)):(M=fg(v,w?d:$f??=dr(),I,D,A,y,a,h),w||(M.e.f|=vn),v.set(D,M)),L.add(D)}if(x===0&&_&&!m&&(w?m=jr(()=>_(d)):(m=jr(()=>_($f??=dr())),m.f|=vn)),st&&x>0&&Xt(Fs()),!w)if(R){for(const[V,G]of v)L.has(V)||C.skipped_effects.add(G.e);C.oncommit(E),C.ondiscard(()=>{})}else E();S&&bn(!0),re(g)}),j={effect:O,items:v,outrogroups:null,fallback:m};w=!1,st&&(d=lt)}function hg(o,a,h,p,y){var _=(p&eb)!==0,d=a.length,v=o.items,i=o.effect.first,f,m=null,g,b=[],w=[],E,O,j,x;if(_)for(x=0;x<d;x+=1)E=a[x],O=y(E,x),j=v.get(O).e,(j.f&vn)===0&&(j.nodes?.a?.measure(),(g??=new Set).add(j));for(x=0;x<d;x+=1){if(E=a[x],O=y(E,x),j=v.get(O).e,o.outrogroups!==null)for(const M of o.outrogroups)M.pending.delete(j),M.done.delete(j);if((j.f&vn)!==0)if(j.f^=vn,j===i)ma(j,null,h);else{var S=m?m.next:i;j===o.effect.last&&(o.effect.last=j.prev),j.prev&&(j.prev.next=j.next),j.next&&(j.next.prev=j.prev),In(o,m,j),In(o,j,S),ma(j,S,h),m=j,b=[],w=[],i=m.next;continue}if((j.f&yr)!==0&&(rc(j),_&&(j.nodes?.a?.unfix(),(g??=new Set).delete(j))),j!==i){if(f!==void 0&&f.has(j)){if(b.length<w.length){var P=w[0],L;m=P.prev;var C=b[0],R=b[b.length-1];for(L=0;L<b.length;L+=1)ma(b[L],P,h);for(L=0;L<w.length;L+=1)f.delete(w[L]);In(o,C.prev,R.next),In(o,m,C),In(o,R,P),i=P,m=R,x-=1,b=[],w=[]}else f.delete(j),ma(j,i,h),In(o,j.prev,j.next),In(o,j,m===null?o.effect.first:m.next),In(o,m,j),m=j;continue}for(b=[],w=[];i!==null&&i!==j;)(f??=new Set).add(i),w.push(i),i=i.next;if(i===null)continue}(j.f&vn)===0&&b.push(j),m=j,i=j.next}if(o.outrogroups!==null){for(const M of o.outrogroups)M.pending.size===0&&(sc(Ls(M.done)),o.outrogroups?.delete(M));o.outrogroups.size===0&&(o.outrogroups=null)}if(i!==null||f!==void 0){var A=[];if(f!==void 0)for(j of f)(j.f&yr)===0&&A.push(j);for(;i!==null;)(i.f&yr)===0&&i!==o.fallback&&A.push(i),i=i.next;var I=A.length;if(I>0){var D=(p&Rh)!==0&&d===0?h:null;if(_){for(x=0;x<I;x+=1)A[x].nodes?.a?.measure();for(x=0;x<I;x+=1)A[x].nodes?.a?.fix()}dg(o,A,D)}}_&&gi(()=>{if(g!==void 0)for(j of g)j.nodes?.a?.apply()})}function fg(o,a,h,p,y,_,d,v){var i=(d&Qv)!==0?(d&tb)===0?ef(h,!1,!1):_i(h):null,f=(d&Xv)!==0?_i(y):null;return{v:i,i:f,e:jr(()=>(_(a,i??h,f??y,v),()=>{o.delete(p)}))}}function ma(o,a,h){if(o.nodes)for(var p=o.nodes.start,y=o.nodes.end,_=a&&(a.f&vn)===0?a.nodes.start:h;p!==null;){var d=Rr(p);if(_.before(p),p===y)return;p=d}}function In(o,a,h){a===null?o.effect.first=h:a.next=h,h===null?o.effect.last=a:h.prev=a}function pg(o,a,h=!1,p=!1,y=!1){var _=o,d="";Vt(()=>{var v=ct;if(d===(d=a()??"")){st&&Qi();return}if(v.nodes!==null&&(yf(v.nodes.start,v.nodes.end),v.nodes=null),d!==""){if(st){lt.data;for(var i=Qi(),f=i;i!==null&&(i.nodeType!==mi||i.data!=="");)f=i,i=Rr(i);if(i===null)throw oa(),di;Zr(lt,f),_=Xt(i);return}var m=d+"";h?m=`<svg>${m}</svg>`:p&&(m=`<math>${m}</math>`);var g=Rf(m);if((h||p)&&(g=Tr(g)),Zr(Tr(g),g.lastChild),h||p)for(;Tr(g);)_.before(Tr(g));else _.before(g)}})}function ya(o,a){ff(()=>{var h=o.getRootNode(),p=h.host?h:h.head??h.ownerDocument.head;if(!p.querySelector("#"+a.hash)){const y=document.createElement("style");y.id=a.hash,y.textContent=a.code,p.appendChild(y)}})}const Nf=[...`
26
+ \r\f \v\uFEFF`];function mg(o,a,h){var p=""+o;if(h){for(var y in h)if(h[y])p=p?p+" "+y:y;else if(p.length)for(var _=y.length,d=0;(d=p.indexOf(y,d))>=0;){var v=d+_;(d===0||Nf.includes(p[d-1]))&&(v===p.length||Nf.includes(p[v]))?p=(d===0?"":p.substring(0,d))+p.substring(v+1):d=v}}return p===""?null:p}function yg(o,a,h,p,y,_){var d=o.__className;if(st||d!==h||d===void 0){var v=mg(h,p,_);(!st||v!==o.getAttribute("class"))&&(v==null?o.removeAttribute("class"):o.className=v),o.__className=h}else if(_&&y!==_)for(var i in _){var f=!!_[i];(y==null||f!==!!y[i])&&o.classList.toggle(i,f)}return _}const vg=Symbol("is custom element"),bg=Symbol("is html");function lc(o){if(st){var a=!1,h=()=>{if(!a){if(a=!0,o.hasAttribute("value")){var p=o.value;If(o,"value",null),o.value=p}if(o.hasAttribute("checked")){var y=o.checked;If(o,"checked",null),o.checked=y}}};o.__on_r=h,gi(h),uf()}}function If(o,a,h,p){var y=gg(o);st&&(y[a]=o.getAttribute(a),a==="src"||a==="srcset"||a==="href"&&o.nodeName==="LINK")||y[a]!==(y[a]=h)&&(a==="loading"&&(o[yb]=h),o.removeAttribute(a))}function gg(o){return o.__attributes??={[vg]:o.nodeName.includes("-"),[bg]:o.namespaceURI===cb}}function cc(o,a,h=a){var p=new WeakSet;Gb(o,"input",async y=>{var _=y?o.defaultValue:o.value;if(_=uc(o)?dc(_):_,h(_),pt!==null&&p.add(pt),await rg(),_!==(_=a())){var d=o.selectionStart,v=o.selectionEnd,i=o.value.length;if(o.value=_??"",v!==null){var f=o.value.length;d===v&&v===i&&f>i?(o.selectionStart=f,o.selectionEnd=f):(o.selectionStart=d,o.selectionEnd=Math.min(v,f))}}}),(st&&o.defaultValue!==o.value||ha(a)==null&&o.value)&&(h(uc(o)?dc(o.value):o.value),pt!==null&&p.add(pt)),Us(()=>{var y=a();if(o===document.activeElement){var _=Vs??pt;if(p.has(_))return}uc(o)&&y===dc(o.value)||o.type==="date"&&!y&&!o.value||y!==o.value&&(o.value=y??"")})}function uc(o){var a=o.type;return a==="number"||a==="range"}function dc(o){return o===""?null:+o}function Df(o,a){return o===a||o?.[ia]===a}function Bf(o={},a,h,p){return ff(()=>{var y,_;return Us(()=>{y=_,_=[],ha(()=>{o!==h(..._)&&(a(o,..._),y&&Df(h(...y),o)&&a(null,...y))})}),()=>{gi(()=>{_&&Df(h(..._),o)&&a(null,..._)})}}),o}let Ws=!1;function _g(o){var a=Ws;try{return Ws=!1,[o(),Ws]}finally{Ws=a}}function Dt(o,a,h,p){var y=!Xi||(h&nb)!==0,_=(h&ob)!==0,d=(h&ab)!==0,v=p,i=!0,f=()=>(i&&(i=!1,v=d?ha(p):p),v),m;if(_){var g=ia in o||Fh in o;m=hi(o,a)?.set??(g&&a in o?P=>o[a]=P:void 0)}var b,w=!1;_?[b,w]=_g(()=>o[a]):b=o[a],b===void 0&&p!==void 0&&(b=f(),m&&(y&&Eb(),m(b)));var E;if(y?E=()=>{var P=o[a];return P===void 0?f():(i=!0,P)}:E=()=>{var P=o[a];return P!==void 0&&(v=void 0),P===void 0?v:P},y&&(h&ib)===0)return E;if(m){var O=o.$$legacy;return(function(P,L){return arguments.length>0?((!y||!L||O||w)&&m(L?E():P),P):E()})}var j=!1,x=((h&rb)!==0?Kl:Wl)(()=>(j=!1,E()));_&&re(x);var S=ct;return(function(P,L){if(arguments.length>0){const C=L?re(x):y&&_?kr(P):P;return et(x,C),j=!0,v!==void 0&&(v=C),P}return $n&&j||(S.f&yn)!==0?x.v:re(x)})}function wg(o){return new kg(o)}class kg{#e;#t;constructor(a){var h=new Map,p=(_,d)=>{var v=ef(d,!1,!1);return h.set(_,v),v};const y=new Proxy({...a.props||{},$$events:{}},{get(_,d){return re(h.get(d)??p(d,Reflect.get(_,d)))},has(_,d){return d===Fh?!0:(re(h.get(d)??p(d,Reflect.get(_,d))),Reflect.has(_,d))},set(_,d,v){return et(h.get(d)??p(d,v),v),Reflect.set(_,d,v)}});this.#t=(a.hydrate?sg:Lf)(a.component,{target:a.target,anchor:a.anchor,props:y,context:a.context,intro:a.intro??!1,recover:a.recover}),(!a?.props?.$$host||a.sync===!1)&&St(),this.#e=y.$$events;for(const _ of Object.keys(this.#t))_==="$set"||_==="$destroy"||_==="$on"||$s(this,_,{get(){return this.#t[_]},set(d){this.#t[_]=d},enumerable:!0});this.#t.$set=_=>{Object.assign(y,_)},this.#t.$destroy=()=>{lg(this.#t)}}$set(a){this.#t.$set(a)}$on(a,h){this.#e[a]=this.#e[a]||[];const p=(...y)=>h.call(this,...y);return this.#e[a].push(p),()=>{this.#e[a]=this.#e[a].filter(y=>y!==p)}}$destroy(){this.#t.$destroy()}}let Ff;typeof HTMLElement=="function"&&(Ff=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(o,a,h){super(),this.$$ctor=o,this.$$s=a,h&&this.attachShadow({mode:"open"})}addEventListener(o,a,h){if(this.$$l[o]=this.$$l[o]||[],this.$$l[o].push(a),this.$$c){const p=this.$$c.$on(o,a);this.$$l_u.set(a,p)}super.addEventListener(o,a,h)}removeEventListener(o,a,h){if(super.removeEventListener(o,a,h),this.$$c){const p=this.$$l_u.get(a);p&&(p(),this.$$l_u.delete(a))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let o=function(p){return y=>{const _=document.createElement("slot");p!=="default"&&(_.name=p),Me(y,_)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const a={},h=jg(this);for(const p of this.$$s)p in h&&(p==="default"&&!this.$$d.children?(this.$$d.children=o(p),a.default=!0):a[p]=o(p));for(const p of this.attributes){const y=this.$$g_p(p.name);y in this.$$d||(this.$$d[y]=Zs(y,p.value,this.$$p_d,"toProp"))}for(const p in this.$$p_d)!(p in this.$$d)&&this[p]!==void 0&&(this.$$d[p]=this[p],delete this[p]);this.$$c=wg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:a,$$host:this}}),this.$$me=Wb(()=>{Us(()=>{this.$$r=!0;for(const p of As(this.$$c)){if(!this.$$p_d[p]?.reflect)continue;this.$$d[p]=this.$$c[p];const y=Zs(p,this.$$d[p],this.$$p_d,"toAttribute");y==null?this.removeAttribute(this.$$p_d[p].attribute||p):this.setAttribute(this.$$p_d[p].attribute||p,y)}this.$$r=!1})});for(const p in this.$$l)for(const y of this.$$l[p]){const _=this.$$c.$on(p,y);this.$$l_u.set(y,_)}this.$$l={}}}attributeChangedCallback(o,a,h){this.$$r||(o=this.$$g_p(o),this.$$d[o]=Zs(o,h,this.$$p_d,"toProp"),this.$$c?.$set({[o]:this.$$d[o]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(o){return As(this.$$p_d).find(a=>this.$$p_d[a].attribute===o||!this.$$p_d[a].attribute&&a.toLowerCase()===o)||o}});function Zs(o,a,h,p){const y=h[o]?.type;if(a=y==="Boolean"&&typeof a!="boolean"?a!=null:a,!p||!h[o])return a;if(p==="toAttribute")switch(y){case"Object":case"Array":return a==null?null:JSON.stringify(a);case"Boolean":return a?"":null;case"Number":return a??null;default:return a}else switch(y){case"Object":case"Array":return a&&JSON.parse(a);case"Boolean":return a;case"Number":return a!=null?+a:a;default:return a}}function jg(o){const a={};return o.childNodes.forEach(h=>{a[h.slot||"default"]=!0}),a}function Dn(o,a,h,p,y,_){let d=class extends Ff{constructor(){super(o,h,y),this.$$p_d=a}static get observedAttributes(){return As(a).map(v=>(a[v].attribute||v).toLowerCase())}};return As(a).forEach(v=>{$s(d.prototype,v,{get(){return this.$$c&&v in this.$$c?this.$$c[v]:this.$$d[v]},set(i){i=Zs(v,i,a),this.$$d[v]=i;var f=this.$$c;if(f){var m=hi(f,v)?.get;m?f[v]=i:f.$set({[v]:i})}}})}),p.forEach(v=>{$s(d.prototype,v,{get(){return this.$$c?.[v]}})}),o.element=d,d}var hc={exports:{}};var Mf;function Eg(){return Mf||(Mf=1,(function(o,a){(function(h,p){o.exports=p()})(self,(()=>(()=>{var h={9306:(d,v,i)=>{var f=i(4901),m=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(m(b)+" is not a function")}},5548:(d,v,i)=>{var f=i(3517),m=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(m(b)+" is not a constructor")}},3506:(d,v,i)=>{var f=i(3925),m=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g("Can't set "+m(b)+" as a prototype")}},6469:(d,v,i)=>{var f=i(8227),m=i(2360),g=i(4913).f,b=f("unscopables"),w=Array.prototype;w[b]===void 0&&g(w,b,{configurable:!0,value:m(null)}),d.exports=function(E){w[b][E]=!0}},7829:(d,v,i)=>{var f=i(8183).charAt;d.exports=function(m,g,b){return g+(b?f(m,g).length:1)}},679:(d,v,i)=>{var f=i(1625),m=TypeError;d.exports=function(g,b){if(f(b,g))return g;throw new m("Incorrect invocation")}},8551:(d,v,i)=>{var f=i(34),m=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(m(b)+" is not an object")}},235:(d,v,i)=>{var f=i(9213).forEach,m=i(4598)("forEach");d.exports=m?[].forEach:function(g){return f(this,g,arguments.length>1?arguments[1]:void 0)}},7916:(d,v,i)=>{var f=i(6080),m=i(9565),g=i(8981),b=i(6319),w=i(4209),E=i(3517),O=i(6198),j=i(4659),x=i(81),S=i(851),P=Array;d.exports=function(L){var C=g(L),R=E(this),A=arguments.length,I=A>1?arguments[1]:void 0,D=I!==void 0;D&&(I=f(I,A>2?arguments[2]:void 0));var M,V,G,J,Y,se,ue=S(C),he=0;if(!ue||this===P&&w(ue))for(M=O(C),V=R?new this(M):P(M);M>he;he++)se=D?I(C[he],he):C[he],j(V,he,se);else for(V=R?new this:[],Y=(J=x(C,ue)).next;!(G=m(Y,J)).done;he++)se=D?b(J,I,[G.value,he],!0):G.value,j(V,he,se);return V.length=he,V}},9617:(d,v,i)=>{var f=i(5397),m=i(5610),g=i(6198),b=function(w){return function(E,O,j){var x=f(E),S=g(x);if(S===0)return!w&&-1;var P,L=m(j,S);if(w&&O!=O){for(;S>L;)if((P=x[L++])!=P)return!0}else for(;S>L;L++)if((w||L in x)&&x[L]===O)return w||L||0;return!w&&-1}};d.exports={includes:b(!0),indexOf:b(!1)}},9213:(d,v,i)=>{var f=i(6080),m=i(9504),g=i(7055),b=i(8981),w=i(6198),E=i(1469),O=m([].push),j=function(x){var S=x===1,P=x===2,L=x===3,C=x===4,R=x===6,A=x===7,I=x===5||R;return function(D,M,V,G){for(var J,Y,se=b(D),ue=g(se),he=w(ue),de=f(M,V),be=0,ie=G||E,H=S?ie(D,he):P||A?ie(D,0):void 0;he>be;be++)if((I||be in ue)&&(Y=de(J=ue[be],be,se),x))if(S)H[be]=Y;else if(Y)switch(x){case 3:return!0;case 5:return J;case 6:return be;case 2:O(H,J)}else switch(x){case 4:return!1;case 7:O(H,J)}return R?-1:L||C?C:H}};d.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},597:(d,v,i)=>{var f=i(9039),m=i(8227),g=i(7388),b=m("species");d.exports=function(w){return g>=51||!f((function(){var E=[];return(E.constructor={})[b]=function(){return{foo:1}},E[w](Boolean).foo!==1}))}},4598:(d,v,i)=>{var f=i(9039);d.exports=function(m,g){var b=[][m];return!!b&&f((function(){b.call(null,g||function(){return 1},1)}))}},926:(d,v,i)=>{var f=i(9306),m=i(8981),g=i(7055),b=i(6198),w=TypeError,E="Reduce of empty array with no initial value",O=function(j){return function(x,S,P,L){var C=m(x),R=g(C),A=b(C);if(f(S),A===0&&P<2)throw new w(E);var I=j?A-1:0,D=j?-1:1;if(P<2)for(;;){if(I in R){L=R[I],I+=D;break}if(I+=D,j?I<0:A<=I)throw new w(E)}for(;j?I>=0:A>I;I+=D)I in R&&(L=S(L,R[I],I,C));return L}};d.exports={left:O(!1),right:O(!0)}},4527:(d,v,i)=>{var f=i(3724),m=i(4376),g=TypeError,b=Object.getOwnPropertyDescriptor,w=f&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}})();d.exports=w?function(E,O){if(m(E)&&!b(E,"length").writable)throw new g("Cannot set read only .length");return E.length=O}:function(E,O){return E.length=O}},7680:(d,v,i)=>{var f=i(9504);d.exports=f([].slice)},4488:(d,v,i)=>{var f=i(7680),m=Math.floor,g=function(b,w){var E=b.length;if(E<8)for(var O,j,x=1;x<E;){for(j=x,O=b[x];j&&w(b[j-1],O)>0;)b[j]=b[--j];j!==x++&&(b[j]=O)}else for(var S=m(E/2),P=g(f(b,0,S),w),L=g(f(b,S),w),C=P.length,R=L.length,A=0,I=0;A<C||I<R;)b[A+I]=A<C&&I<R?w(P[A],L[I])<=0?P[A++]:L[I++]:A<C?P[A++]:L[I++];return b};d.exports=g},7433:(d,v,i)=>{var f=i(4376),m=i(3517),g=i(34),b=i(8227)("species"),w=Array;d.exports=function(E){var O;return f(E)&&(O=E.constructor,(m(O)&&(O===w||f(O.prototype))||g(O)&&(O=O[b])===null)&&(O=void 0)),O===void 0?w:O}},1469:(d,v,i)=>{var f=i(7433);d.exports=function(m,g){return new(f(m))(g===0?0:g)}},6319:(d,v,i)=>{var f=i(8551),m=i(9539);d.exports=function(g,b,w,E){try{return E?b(f(w)[0],w[1]):b(w)}catch(O){m(g,"throw",O)}}},4428:(d,v,i)=>{var f=i(8227)("iterator"),m=!1;try{var g=0,b={next:function(){return{done:!!g++}},return:function(){m=!0}};b[f]=function(){return this},Array.from(b,(function(){throw 2}))}catch{}d.exports=function(w,E){try{if(!E&&!m)return!1}catch{return!1}var O=!1;try{var j={};j[f]=function(){return{next:function(){return{done:O=!0}}}},w(j)}catch{}return O}},4576:(d,v,i)=>{var f=i(9504),m=f({}.toString),g=f("".slice);d.exports=function(b){return g(m(b),8,-1)}},6955:(d,v,i)=>{var f=i(2140),m=i(4901),g=i(4576),b=i(8227)("toStringTag"),w=Object,E=g((function(){return arguments})())==="Arguments";d.exports=f?g:function(O){var j,x,S;return O===void 0?"Undefined":O===null?"Null":typeof(x=(function(P,L){try{return P[L]}catch{}})(j=w(O),b))=="string"?x:E?g(j):(S=g(j))==="Object"&&m(j.callee)?"Arguments":S}},7740:(d,v,i)=>{var f=i(9297),m=i(5031),g=i(7347),b=i(4913);d.exports=function(w,E,O){for(var j=m(E),x=b.f,S=g.f,P=0;P<j.length;P++){var L=j[P];f(w,L)||O&&f(O,L)||x(w,L,S(E,L))}}},1436:(d,v,i)=>{var f=i(8227)("match");d.exports=function(m){var g=/./;try{"/./"[m](g)}catch{try{return g[f]=!1,"/./"[m](g)}catch{}}return!1}},2211:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){function m(){}return m.prototype.constructor=null,Object.getPrototypeOf(new m)!==m.prototype}))},2529:d=>{d.exports=function(v,i){return{value:v,done:i}}},6699:(d,v,i)=>{var f=i(3724),m=i(4913),g=i(6980);d.exports=f?function(b,w,E){return m.f(b,w,g(1,E))}:function(b,w,E){return b[w]=E,b}},6980:d=>{d.exports=function(v,i){return{enumerable:!(1&v),configurable:!(2&v),writable:!(4&v),value:i}}},4659:(d,v,i)=>{var f=i(3724),m=i(4913),g=i(6980);d.exports=function(b,w,E){f?m.f(b,w,g(0,E)):b[w]=E}},380:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(533).start,b=RangeError,w=isFinite,E=Math.abs,O=Date.prototype,j=O.toISOString,x=f(O.getTime),S=f(O.getUTCDate),P=f(O.getUTCFullYear),L=f(O.getUTCHours),C=f(O.getUTCMilliseconds),R=f(O.getUTCMinutes),A=f(O.getUTCMonth),I=f(O.getUTCSeconds);d.exports=m((function(){return j.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"}))||!m((function(){j.call(new Date(NaN))}))?function(){if(!w(x(this)))throw new b("Invalid time value");var D=this,M=P(D),V=C(D),G=M<0?"-":M>9999?"+":"";return G+g(E(M),G?6:4,0)+"-"+g(A(D)+1,2,0)+"-"+g(S(D),2,0)+"T"+g(L(D),2,0)+":"+g(R(D),2,0)+":"+g(I(D),2,0)+"."+g(V,3,0)+"Z"}:j},3640:(d,v,i)=>{var f=i(8551),m=i(4270),g=TypeError;d.exports=function(b){if(f(this),b==="string"||b==="default")b="string";else if(b!=="number")throw new g("Incorrect hint");return m(this,b)}},2106:(d,v,i)=>{var f=i(283),m=i(4913);d.exports=function(g,b,w){return w.get&&f(w.get,b,{getter:!0}),w.set&&f(w.set,b,{setter:!0}),m.f(g,b,w)}},6840:(d,v,i)=>{var f=i(4901),m=i(4913),g=i(283),b=i(9433);d.exports=function(w,E,O,j){j||(j={});var x=j.enumerable,S=j.name!==void 0?j.name:E;if(f(O)&&g(O,S,j),j.global)x?w[E]=O:b(E,O);else{try{j.unsafe?w[E]&&(x=!0):delete w[E]}catch{}x?w[E]=O:m.f(w,E,{value:O,enumerable:!1,configurable:!j.nonConfigurable,writable:!j.nonWritable})}return w}},9433:(d,v,i)=>{var f=i(4475),m=Object.defineProperty;d.exports=function(g,b){try{m(f,g,{value:b,configurable:!0,writable:!0})}catch{f[g]=b}return b}},4606:(d,v,i)=>{var f=i(6823),m=TypeError;d.exports=function(g,b){if(!delete g[b])throw new m("Cannot delete property "+f(b)+" of "+f(g))}},3724:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},4055:(d,v,i)=>{var f=i(4475),m=i(34),g=f.document,b=m(g)&&m(g.createElement);d.exports=function(w){return b?g.createElement(w):{}}},6837:d=>{var v=TypeError;d.exports=function(i){if(i>9007199254740991)throw v("Maximum allowed index exceeded");return i}},7400:d=>{d.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}},9296:(d,v,i)=>{var f=i(4055)("span").classList,m=f&&f.constructor&&f.constructor.prototype;d.exports=m===Object.prototype?void 0:m},8834:(d,v,i)=>{var f=i(9392).match(/firefox\/(\d+)/i);d.exports=!!f&&+f[1]},7290:(d,v,i)=>{var f=i(516),m=i(9088);d.exports=!f&&!m&&typeof window=="object"&&typeof document=="object"},6763:d=>{d.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},516:d=>{d.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},3202:(d,v,i)=>{var f=i(9392);d.exports=/MSIE|Trident/.test(f)},28:(d,v,i)=>{var f=i(9392);d.exports=/ipad|iphone|ipod/i.test(f)&&typeof Pebble<"u"},8119:(d,v,i)=>{var f=i(9392);d.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(f)},9088:(d,v,i)=>{var f=i(4475),m=i(4576);d.exports=m(f.process)==="process"},6765:(d,v,i)=>{var f=i(9392);d.exports=/web0s(?!.*chrome)/i.test(f)},9392:d=>{d.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:(d,v,i)=>{var f,m,g=i(4475),b=i(9392),w=g.process,E=g.Deno,O=w&&w.versions||E&&E.version,j=O&&O.v8;j&&(m=(f=j.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!m&&b&&(!(f=b.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=b.match(/Chrome\/(\d+)/))&&(m=+f[1]),d.exports=m},9160:(d,v,i)=>{var f=i(9392).match(/AppleWebKit\/(\d+)\./);d.exports=!!f&&+f[1]},8727:d=>{d.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(d,v,i)=>{var f=i(4475),m=i(7347).f,g=i(6699),b=i(6840),w=i(9433),E=i(7740),O=i(2796);d.exports=function(j,x){var S,P,L,C,R,A=j.target,I=j.global,D=j.stat;if(S=I?f:D?f[A]||w(A,{}):f[A]&&f[A].prototype)for(P in x){if(C=x[P],L=j.dontCallGetSet?(R=m(S,P))&&R.value:S[P],!O(I?P:A+(D?".":"#")+P,j.forced)&&L!==void 0){if(typeof C==typeof L)continue;E(C,L)}(j.sham||L&&L.sham)&&g(C,"sham",!0),b(S,P,C,j)}}},9039:d=>{d.exports=function(v){try{return!!v()}catch{return!0}}},9228:(d,v,i)=>{i(7495);var f=i(9565),m=i(6840),g=i(7323),b=i(9039),w=i(8227),E=i(6699),O=w("species"),j=RegExp.prototype;d.exports=function(x,S,P,L){var C=w(x),R=!b((function(){var M={};return M[C]=function(){return 7},""[x](M)!==7})),A=R&&!b((function(){var M=!1,V=/a/;return x==="split"&&((V={}).constructor={},V.constructor[O]=function(){return V},V.flags="",V[C]=/./[C]),V.exec=function(){return M=!0,null},V[C](""),!M}));if(!R||!A||P){var I=/./[C],D=S(C,""[x],(function(M,V,G,J,Y){var se=V.exec;return se===g||se===j.exec?R&&!Y?{done:!0,value:f(I,V,G,J)}:{done:!0,value:f(M,G,V,J)}:{done:!1}}));m(String.prototype,x,D[0]),m(j,C,D[1])}L&&E(j[C],"sham",!0)}},8745:(d,v,i)=>{var f=i(616),m=Function.prototype,g=m.apply,b=m.call;d.exports=typeof Reflect=="object"&&Reflect.apply||(f?b.bind(g):function(){return b.apply(g,arguments)})},6080:(d,v,i)=>{var f=i(7476),m=i(9306),g=i(616),b=f(f.bind);d.exports=function(w,E){return m(w),E===void 0?w:g?b(w,E):function(){return w.apply(E,arguments)}}},616:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){var m=(function(){}).bind();return typeof m!="function"||m.hasOwnProperty("prototype")}))},566:(d,v,i)=>{var f=i(9504),m=i(9306),g=i(34),b=i(9297),w=i(7680),E=i(616),O=Function,j=f([].concat),x=f([].join),S={};d.exports=E?O.bind:function(P){var L=m(this),C=L.prototype,R=w(arguments,1),A=function(){var I=j(R,w(arguments));return this instanceof A?(function(D,M,V){if(!b(S,M)){for(var G=[],J=0;J<M;J++)G[J]="a["+J+"]";S[M]=O("C,a","return new C("+x(G,",")+")")}return S[M](D,V)})(L,I.length,I):L.apply(P,I)};return g(C)&&(A.prototype=C),A}},9565:(d,v,i)=>{var f=i(616),m=Function.prototype.call;d.exports=f?m.bind(m):function(){return m.apply(m,arguments)}},350:(d,v,i)=>{var f=i(3724),m=i(9297),g=Function.prototype,b=f&&Object.getOwnPropertyDescriptor,w=m(g,"name"),E=w&&(function(){}).name==="something",O=w&&(!f||f&&b(g,"name").configurable);d.exports={EXISTS:w,PROPER:E,CONFIGURABLE:O}},6706:(d,v,i)=>{var f=i(9504),m=i(9306);d.exports=function(g,b,w){try{return f(m(Object.getOwnPropertyDescriptor(g,b)[w]))}catch{}}},7476:(d,v,i)=>{var f=i(4576),m=i(9504);d.exports=function(g){if(f(g)==="Function")return m(g)}},9504:(d,v,i)=>{var f=i(616),m=Function.prototype,g=m.call,b=f&&m.bind.bind(g,g);d.exports=f?b:function(w){return function(){return g.apply(w,arguments)}}},7751:(d,v,i)=>{var f=i(4475),m=i(4901);d.exports=function(g,b){return arguments.length<2?(w=f[g],m(w)?w:void 0):f[g]&&f[g][b];var w}},851:(d,v,i)=>{var f=i(6955),m=i(5966),g=i(4117),b=i(6269),w=i(8227)("iterator");d.exports=function(E){if(!g(E))return m(E,w)||m(E,"@@iterator")||b[f(E)]}},81:(d,v,i)=>{var f=i(9565),m=i(9306),g=i(8551),b=i(6823),w=i(851),E=TypeError;d.exports=function(O,j){var x=arguments.length<2?w(O):j;if(m(x))return g(f(x,O));throw new E(b(O)+" is not iterable")}},6933:(d,v,i)=>{var f=i(9504),m=i(4376),g=i(4901),b=i(4576),w=i(655),E=f([].push);d.exports=function(O){if(g(O))return O;if(m(O)){for(var j=O.length,x=[],S=0;S<j;S++){var P=O[S];typeof P=="string"?E(x,P):typeof P!="number"&&b(P)!=="Number"&&b(P)!=="String"||E(x,w(P))}var L=x.length,C=!0;return function(R,A){if(C)return C=!1,A;if(m(this))return A;for(var I=0;I<L;I++)if(x[I]===R)return A}}}},5966:(d,v,i)=>{var f=i(9306),m=i(4117);d.exports=function(g,b){var w=g[b];return m(w)?void 0:f(w)}},2478:(d,v,i)=>{var f=i(9504),m=i(8981),g=Math.floor,b=f("".charAt),w=f("".replace),E=f("".slice),O=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;d.exports=function(x,S,P,L,C,R){var A=P+x.length,I=L.length,D=j;return C!==void 0&&(C=m(C),D=O),w(R,D,(function(M,V){var G;switch(b(V,0)){case"$":return"$";case"&":return x;case"`":return E(S,0,P);case"'":return E(S,A);case"<":G=C[E(V,1,-1)];break;default:var J=+V;if(J===0)return M;if(J>I){var Y=g(J/10);return Y===0?M:Y<=I?L[Y-1]===void 0?b(V,1):L[Y-1]+b(V,1):M}G=L[J-1]}return G===void 0?"":G}))}},4475:function(d,v,i){var f=function(m){return m&&m.Math===Math&&m};d.exports=f(typeof globalThis=="object"&&globalThis)||f(typeof window=="object"&&window)||f(typeof self=="object"&&self)||f(typeof i.g=="object"&&i.g)||f(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},9297:(d,v,i)=>{var f=i(9504),m=i(8981),g=f({}.hasOwnProperty);d.exports=Object.hasOwn||function(b,w){return g(m(b),w)}},421:d=>{d.exports={}},3138:d=>{d.exports=function(v,i){try{arguments.length===1?console.error(v):console.error(v,i)}catch{}}},397:(d,v,i)=>{var f=i(7751);d.exports=f("document","documentElement")},5917:(d,v,i)=>{var f=i(3724),m=i(9039),g=i(4055);d.exports=!f&&!m((function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7}))},7055:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(4576),b=Object,w=f("".split);d.exports=m((function(){return!b("z").propertyIsEnumerable(0)}))?function(E){return g(E)==="String"?w(E,""):b(E)}:b},3167:(d,v,i)=>{var f=i(4901),m=i(34),g=i(2967);d.exports=function(b,w,E){var O,j;return g&&f(O=w.constructor)&&O!==E&&m(j=O.prototype)&&j!==E.prototype&&g(b,j),b}},3706:(d,v,i)=>{var f=i(9504),m=i(4901),g=i(7629),b=f(Function.toString);m(g.inspectSource)||(g.inspectSource=function(w){return b(w)}),d.exports=g.inspectSource},1181:(d,v,i)=>{var f,m,g,b=i(8622),w=i(4475),E=i(34),O=i(6699),j=i(9297),x=i(7629),S=i(6119),P=i(421),L="Object already initialized",C=w.TypeError,R=w.WeakMap;if(b||x.state){var A=x.state||(x.state=new R);A.get=A.get,A.has=A.has,A.set=A.set,f=function(D,M){if(A.has(D))throw new C(L);return M.facade=D,A.set(D,M),M},m=function(D){return A.get(D)||{}},g=function(D){return A.has(D)}}else{var I=S("state");P[I]=!0,f=function(D,M){if(j(D,I))throw new C(L);return M.facade=D,O(D,I,M),M},m=function(D){return j(D,I)?D[I]:{}},g=function(D){return j(D,I)}}d.exports={set:f,get:m,has:g,enforce:function(D){return g(D)?m(D):f(D,{})},getterFor:function(D){return function(M){var V;if(!E(M)||(V=m(M)).type!==D)throw new C("Incompatible receiver, "+D+" required");return V}}}},4209:(d,v,i)=>{var f=i(8227),m=i(6269),g=f("iterator"),b=Array.prototype;d.exports=function(w){return w!==void 0&&(m.Array===w||b[g]===w)}},4376:(d,v,i)=>{var f=i(4576);d.exports=Array.isArray||function(m){return f(m)==="Array"}},4901:d=>{var v=typeof document=="object"&&document.all;d.exports=v===void 0&&v!==void 0?function(i){return typeof i=="function"||i===v}:function(i){return typeof i=="function"}},3517:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(4901),b=i(6955),w=i(7751),E=i(3706),O=function(){},j=w("Reflect","construct"),x=/^\s*(?:class|function)\b/,S=f(x.exec),P=!x.test(O),L=function(R){if(!g(R))return!1;try{return j(O,[],R),!0}catch{return!1}},C=function(R){if(!g(R))return!1;switch(b(R)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return P||!!S(x,E(R))}catch{return!0}};C.sham=!0,d.exports=!j||m((function(){var R;return L(L.call)||!L(Object)||!L((function(){R=!0}))||R}))?C:L},6575:(d,v,i)=>{var f=i(9297);d.exports=function(m){return m!==void 0&&(f(m,"value")||f(m,"writable"))}},2796:(d,v,i)=>{var f=i(9039),m=i(4901),g=/#|\.prototype\./,b=function(x,S){var P=E[w(x)];return P===j||P!==O&&(m(S)?f(S):!!S)},w=b.normalize=function(x){return String(x).replace(g,".").toLowerCase()},E=b.data={},O=b.NATIVE="N",j=b.POLYFILL="P";d.exports=b},4117:d=>{d.exports=function(v){return v==null}},34:(d,v,i)=>{var f=i(4901);d.exports=function(m){return typeof m=="object"?m!==null:f(m)}},3925:(d,v,i)=>{var f=i(34);d.exports=function(m){return f(m)||m===null}},6395:d=>{d.exports=!1},788:(d,v,i)=>{var f=i(34),m=i(4576),g=i(8227)("match");d.exports=function(b){var w;return f(b)&&((w=b[g])!==void 0?!!w:m(b)==="RegExp")}},757:(d,v,i)=>{var f=i(7751),m=i(4901),g=i(1625),b=i(7040),w=Object;d.exports=b?function(E){return typeof E=="symbol"}:function(E){var O=f("Symbol");return m(O)&&g(O.prototype,w(E))}},2652:(d,v,i)=>{var f=i(6080),m=i(9565),g=i(8551),b=i(6823),w=i(4209),E=i(6198),O=i(1625),j=i(81),x=i(851),S=i(9539),P=TypeError,L=function(R,A){this.stopped=R,this.result=A},C=L.prototype;d.exports=function(R,A,I){var D,M,V,G,J,Y,se,ue=I&&I.that,he=!(!I||!I.AS_ENTRIES),de=!(!I||!I.IS_RECORD),be=!(!I||!I.IS_ITERATOR),ie=!(!I||!I.INTERRUPTED),H=f(A,ue),te=function($){return D&&S(D,"normal",$),new L(!0,$)},z=function($){return he?(g($),ie?H($[0],$[1],te):H($[0],$[1])):ie?H($,te):H($)};if(de)D=R.iterator;else if(be)D=R;else{if(!(M=x(R)))throw new P(b(R)+" is not iterable");if(w(M)){for(V=0,G=E(R);G>V;V++)if((J=z(R[V]))&&O(C,J))return J;return new L(!1)}D=j(R,M)}for(Y=de?R.next:D.next;!(se=m(Y,D)).done;){try{J=z(se.value)}catch($){S(D,"throw",$)}if(typeof J=="object"&&J&&O(C,J))return J}return new L(!1)}},9539:(d,v,i)=>{var f=i(9565),m=i(8551),g=i(5966);d.exports=function(b,w,E){var O,j;m(b);try{if(!(O=g(b,"return"))){if(w==="throw")throw E;return E}O=f(O,b)}catch(x){j=!0,O=x}if(w==="throw")throw E;if(j)throw O;return m(O),E}},3994:(d,v,i)=>{var f=i(7657).IteratorPrototype,m=i(2360),g=i(6980),b=i(687),w=i(6269),E=function(){return this};d.exports=function(O,j,x,S){var P=j+" Iterator";return O.prototype=m(f,{next:g(+!S,x)}),b(O,P,!1,!0),w[P]=E,O}},1088:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(6395),b=i(350),w=i(4901),E=i(3994),O=i(2787),j=i(2967),x=i(687),S=i(6699),P=i(6840),L=i(8227),C=i(6269),R=i(7657),A=b.PROPER,I=b.CONFIGURABLE,D=R.IteratorPrototype,M=R.BUGGY_SAFARI_ITERATORS,V=L("iterator"),G="keys",J="values",Y="entries",se=function(){return this};d.exports=function(ue,he,de,be,ie,H,te){E(de,he,be);var z,$,F,ee=function(ne){if(ne===ie&&U)return U;if(!M&&ne&&ne in je)return je[ne];switch(ne){case G:case J:case Y:return function(){return new de(this,ne)}}return function(){return new de(this)}},ge=he+" Iterator",_e=!1,je=ue.prototype,ve=je[V]||je["@@iterator"]||ie&&je[ie],U=!M&&ve||ee(ie),W=he==="Array"&&je.entries||ve;if(W&&(z=O(W.call(new ue)))!==Object.prototype&&z.next&&(g||O(z)===D||(j?j(z,D):w(z[V])||P(z,V,se)),x(z,ge,!0,!0),g&&(C[ge]=se)),A&&ie===J&&ve&&ve.name!==J&&(!g&&I?S(je,"name",J):(_e=!0,U=function(){return m(ve,this)})),ie)if($={values:ee(J),keys:H?U:ee(G),entries:ee(Y)},te)for(F in $)(M||_e||!(F in je))&&P(je,F,$[F]);else f({target:he,proto:!0,forced:M||_e},$);return g&&!te||je[V]===U||P(je,V,U,{name:ie}),C[he]=U,$}},7657:(d,v,i)=>{var f,m,g,b=i(9039),w=i(4901),E=i(34),O=i(2360),j=i(2787),x=i(6840),S=i(8227),P=i(6395),L=S("iterator"),C=!1;[].keys&&("next"in(g=[].keys())?(m=j(j(g)))!==Object.prototype&&(f=m):C=!0),!E(f)||b((function(){var R={};return f[L].call(R)!==R}))?f={}:P&&(f=O(f)),w(f[L])||x(f,L,(function(){return this})),d.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:C}},6269:d=>{d.exports={}},6198:(d,v,i)=>{var f=i(8014);d.exports=function(m){return f(m.length)}},283:(d,v,i)=>{var f=i(9504),m=i(9039),g=i(4901),b=i(9297),w=i(3724),E=i(350).CONFIGURABLE,O=i(3706),j=i(1181),x=j.enforce,S=j.get,P=String,L=Object.defineProperty,C=f("".slice),R=f("".replace),A=f([].join),I=w&&!m((function(){return L((function(){}),"length",{value:8}).length!==8})),D=String(String).split("String"),M=d.exports=function(V,G,J){C(P(G),0,7)==="Symbol("&&(G="["+R(P(G),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),J&&J.getter&&(G="get "+G),J&&J.setter&&(G="set "+G),(!b(V,"name")||E&&V.name!==G)&&(w?L(V,"name",{value:G,configurable:!0}):V.name=G),I&&J&&b(J,"arity")&&V.length!==J.arity&&L(V,"length",{value:J.arity});try{J&&b(J,"constructor")&&J.constructor?w&&L(V,"prototype",{writable:!1}):V.prototype&&(V.prototype=void 0)}catch{}var Y=x(V);return b(Y,"source")||(Y.source=A(D,typeof G=="string"?G:"")),V};Function.prototype.toString=M((function(){return g(this)&&S(this).source||O(this)}),"toString")},741:d=>{var v=Math.ceil,i=Math.floor;d.exports=Math.trunc||function(f){var m=+f;return(m>0?i:v)(m)}},1955:(d,v,i)=>{var f,m,g,b,w,E=i(4475),O=i(3389),j=i(6080),x=i(9225).set,S=i(8265),P=i(8119),L=i(28),C=i(6765),R=i(9088),A=E.MutationObserver||E.WebKitMutationObserver,I=E.document,D=E.process,M=E.Promise,V=O("queueMicrotask");if(!V){var G=new S,J=function(){var Y,se;for(R&&(Y=D.domain)&&Y.exit();se=G.get();)try{se()}catch(ue){throw G.head&&f(),ue}Y&&Y.enter()};P||R||C||!A||!I?!L&&M&&M.resolve?((b=M.resolve(void 0)).constructor=M,w=j(b.then,b),f=function(){w(J)}):R?f=function(){D.nextTick(J)}:(x=j(x,E),f=function(){x(J)}):(m=!0,g=I.createTextNode(""),new A(J).observe(g,{characterData:!0}),f=function(){g.data=m=!m}),V=function(Y){G.head||f(),G.add(Y)}}d.exports=V},6043:(d,v,i)=>{var f=i(9306),m=TypeError,g=function(b){var w,E;this.promise=new b((function(O,j){if(w!==void 0||E!==void 0)throw new m("Bad Promise constructor");w=O,E=j})),this.resolve=f(w),this.reject=f(E)};d.exports.f=function(b){return new g(b)}},5749:(d,v,i)=>{var f=i(788),m=TypeError;d.exports=function(g){if(f(g))throw new m("The method doesn't accept regular expressions");return g}},3904:(d,v,i)=>{var f=i(4475),m=i(9039),g=i(9504),b=i(655),w=i(3802).trim,E=i(7452),O=g("".charAt),j=f.parseFloat,x=f.Symbol,S=x&&x.iterator,P=1/j(E+"-0")!=-1/0||S&&!m((function(){j(Object(S))}));d.exports=P?function(L){var C=w(b(L)),R=j(C);return R===0&&O(C,0)==="-"?-0:R}:j},2703:(d,v,i)=>{var f=i(4475),m=i(9039),g=i(9504),b=i(655),w=i(3802).trim,E=i(7452),O=f.parseInt,j=f.Symbol,x=j&&j.iterator,S=/^[+-]?0x/i,P=g(S.exec),L=O(E+"08")!==8||O(E+"0x16")!==22||x&&!m((function(){O(Object(x))}));d.exports=L?function(C,R){var A=w(b(C));return O(A,R>>>0||(P(S,A)?16:10))}:O},4213:(d,v,i)=>{var f=i(3724),m=i(9504),g=i(9565),b=i(9039),w=i(1072),E=i(3717),O=i(8773),j=i(8981),x=i(7055),S=Object.assign,P=Object.defineProperty,L=m([].concat);d.exports=!S||b((function(){if(f&&S({b:1},S(P({},"a",{enumerable:!0,get:function(){P(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var C={},R={},A=Symbol("assign detection"),I="abcdefghijklmnopqrst";return C[A]=7,I.split("").forEach((function(D){R[D]=D})),S({},C)[A]!==7||w(S({},R)).join("")!==I}))?function(C,R){for(var A=j(C),I=arguments.length,D=1,M=E.f,V=O.f;I>D;)for(var G,J=x(arguments[D++]),Y=M?L(w(J),M(J)):w(J),se=Y.length,ue=0;se>ue;)G=Y[ue++],f&&!g(V,J,G)||(A[G]=J[G]);return A}:S},2360:(d,v,i)=>{var f,m=i(8551),g=i(6801),b=i(8727),w=i(421),E=i(397),O=i(4055),j=i(6119),x="prototype",S="script",P=j("IE_PROTO"),L=function(){},C=function(I){return"<"+S+">"+I+"</"+S+">"},R=function(I){I.write(C("")),I.close();var D=I.parentWindow.Object;return I=null,D},A=function(){try{f=new ActiveXObject("htmlfile")}catch{}var I,D,M;A=typeof document<"u"?document.domain&&f?R(f):(D=O("iframe"),M="java"+S+":",D.style.display="none",E.appendChild(D),D.src=String(M),(I=D.contentWindow.document).open(),I.write(C("document.F=Object")),I.close(),I.F):R(f);for(var V=b.length;V--;)delete A[x][b[V]];return A()};w[P]=!0,d.exports=Object.create||function(I,D){var M;return I!==null?(L[x]=m(I),M=new L,L[x]=null,M[P]=I):M=A(),D===void 0?M:g.f(M,D)}},6801:(d,v,i)=>{var f=i(3724),m=i(8686),g=i(4913),b=i(8551),w=i(5397),E=i(1072);v.f=f&&!m?Object.defineProperties:function(O,j){b(O);for(var x,S=w(j),P=E(j),L=P.length,C=0;L>C;)g.f(O,x=P[C++],S[x]);return O}},4913:(d,v,i)=>{var f=i(3724),m=i(5917),g=i(8686),b=i(8551),w=i(6969),E=TypeError,O=Object.defineProperty,j=Object.getOwnPropertyDescriptor,x="enumerable",S="configurable",P="writable";v.f=f?g?function(L,C,R){if(b(L),C=w(C),b(R),typeof L=="function"&&C==="prototype"&&"value"in R&&P in R&&!R[P]){var A=j(L,C);A&&A[P]&&(L[C]=R.value,R={configurable:S in R?R[S]:A[S],enumerable:x in R?R[x]:A[x],writable:!1})}return O(L,C,R)}:O:function(L,C,R){if(b(L),C=w(C),b(R),m)try{return O(L,C,R)}catch{}if("get"in R||"set"in R)throw new E("Accessors not supported");return"value"in R&&(L[C]=R.value),L}},7347:(d,v,i)=>{var f=i(3724),m=i(9565),g=i(8773),b=i(6980),w=i(5397),E=i(6969),O=i(9297),j=i(5917),x=Object.getOwnPropertyDescriptor;v.f=f?x:function(S,P){if(S=w(S),P=E(P),j)try{return x(S,P)}catch{}if(O(S,P))return b(!m(g.f,S,P),S[P])}},298:(d,v,i)=>{var f=i(4576),m=i(5397),g=i(8480).f,b=i(7680),w=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(E){return w&&f(E)==="Window"?(function(O){try{return g(O)}catch{return b(w)}})(E):g(m(E))}},8480:(d,v,i)=>{var f=i(1828),m=i(8727).concat("length","prototype");v.f=Object.getOwnPropertyNames||function(g){return f(g,m)}},3717:(d,v)=>{v.f=Object.getOwnPropertySymbols},2787:(d,v,i)=>{var f=i(9297),m=i(4901),g=i(8981),b=i(6119),w=i(2211),E=b("IE_PROTO"),O=Object,j=O.prototype;d.exports=w?O.getPrototypeOf:function(x){var S=g(x);if(f(S,E))return S[E];var P=S.constructor;return m(P)&&S instanceof P?P.prototype:S instanceof O?j:null}},1625:(d,v,i)=>{var f=i(9504);d.exports=f({}.isPrototypeOf)},1828:(d,v,i)=>{var f=i(9504),m=i(9297),g=i(5397),b=i(9617).indexOf,w=i(421),E=f([].push);d.exports=function(O,j){var x,S=g(O),P=0,L=[];for(x in S)!m(w,x)&&m(S,x)&&E(L,x);for(;j.length>P;)m(S,x=j[P++])&&(~b(L,x)||E(L,x));return L}},1072:(d,v,i)=>{var f=i(1828),m=i(8727);d.exports=Object.keys||function(g){return f(g,m)}},8773:(d,v)=>{var i={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,m=f&&!i.call({1:2},1);v.f=m?function(g){var b=f(this,g);return!!b&&b.enumerable}:i},2967:(d,v,i)=>{var f=i(6706),m=i(34),g=i(7750),b=i(3506);d.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var w,E=!1,O={};try{(w=f(Object.prototype,"__proto__","set"))(O,[]),E=O instanceof Array}catch{}return function(j,x){return g(j),b(x),m(j)&&(E?w(j,x):j.__proto__=x),j}})():void 0)},2357:(d,v,i)=>{var f=i(3724),m=i(9039),g=i(9504),b=i(2787),w=i(1072),E=i(5397),O=g(i(8773).f),j=g([].push),x=f&&m((function(){var P=Object.create(null);return P[2]=2,!O(P,2)})),S=function(P){return function(L){for(var C,R=E(L),A=w(R),I=x&&b(R)===null,D=A.length,M=0,V=[];D>M;)C=A[M++],f&&!(I?C in R:O(R,C))||j(V,P?[C,R[C]]:R[C]);return V}};d.exports={entries:S(!0),values:S(!1)}},3179:(d,v,i)=>{var f=i(2140),m=i(6955);d.exports=f?{}.toString:function(){return"[object "+m(this)+"]"}},4270:(d,v,i)=>{var f=i(9565),m=i(4901),g=i(34),b=TypeError;d.exports=function(w,E){var O,j;if(E==="string"&&m(O=w.toString)&&!g(j=f(O,w))||m(O=w.valueOf)&&!g(j=f(O,w))||E!=="string"&&m(O=w.toString)&&!g(j=f(O,w)))return j;throw new b("Can't convert object to primitive value")}},5031:(d,v,i)=>{var f=i(7751),m=i(9504),g=i(8480),b=i(3717),w=i(8551),E=m([].concat);d.exports=f("Reflect","ownKeys")||function(O){var j=g.f(w(O)),x=b.f;return x?E(j,x(O)):j}},9167:(d,v,i)=>{var f=i(4475);d.exports=f},1103:d=>{d.exports=function(v){try{return{error:!1,value:v()}}catch(i){return{error:!0,value:i}}}},916:(d,v,i)=>{var f=i(4475),m=i(550),g=i(4901),b=i(2796),w=i(3706),E=i(8227),O=i(7290),j=i(516),x=i(6395),S=i(7388),P=m&&m.prototype,L=E("species"),C=!1,R=g(f.PromiseRejectionEvent),A=b("Promise",(function(){var I=w(m),D=I!==String(m);if(!D&&S===66||x&&(!P.catch||!P.finally))return!0;if(!S||S<51||!/native code/.test(I)){var M=new m((function(G){G(1)})),V=function(G){G((function(){}),(function(){}))};if((M.constructor={})[L]=V,!(C=M.then((function(){}))instanceof V))return!0}return!D&&(O||j)&&!R}));d.exports={CONSTRUCTOR:A,REJECTION_EVENT:R,SUBCLASSING:C}},550:(d,v,i)=>{var f=i(4475);d.exports=f.Promise},3438:(d,v,i)=>{var f=i(8551),m=i(34),g=i(6043);d.exports=function(b,w){if(f(b),m(w)&&w.constructor===b)return w;var E=g.f(b);return(0,E.resolve)(w),E.promise}},537:(d,v,i)=>{var f=i(550),m=i(4428),g=i(916).CONSTRUCTOR;d.exports=g||!m((function(b){f.all(b).then(void 0,(function(){}))}))},1056:(d,v,i)=>{var f=i(4913).f;d.exports=function(m,g,b){b in m||f(m,b,{configurable:!0,get:function(){return g[b]},set:function(w){g[b]=w}})}},8265:d=>{var v=function(){this.head=null,this.tail=null};v.prototype={add:function(i){var f={item:i,next:null},m=this.tail;m?m.next=f:this.head=f,this.tail=f},get:function(){var i=this.head;if(i)return(this.head=i.next)===null&&(this.tail=null),i.item}},d.exports=v},6682:(d,v,i)=>{var f=i(9565),m=i(8551),g=i(4901),b=i(4576),w=i(7323),E=TypeError;d.exports=function(O,j){var x=O.exec;if(g(x)){var S=f(x,O,j);return S!==null&&m(S),S}if(b(O)==="RegExp")return f(w,O,j);throw new E("RegExp#exec called on incompatible receiver")}},7323:(d,v,i)=>{var f,m,g=i(9565),b=i(9504),w=i(655),E=i(7979),O=i(8429),j=i(5745),x=i(2360),S=i(1181).get,P=i(3635),L=i(8814),C=j("native-string-replace",String.prototype.replace),R=RegExp.prototype.exec,A=R,I=b("".charAt),D=b("".indexOf),M=b("".replace),V=b("".slice),G=(m=/b*/g,g(R,f=/a/,"a"),g(R,m,"a"),f.lastIndex!==0||m.lastIndex!==0),J=O.BROKEN_CARET,Y=/()??/.exec("")[1]!==void 0;(G||Y||J||P||L)&&(A=function(se){var ue,he,de,be,ie,H,te,z=this,$=S(z),F=w(se),ee=$.raw;if(ee)return ee.lastIndex=z.lastIndex,ue=g(A,ee,F),z.lastIndex=ee.lastIndex,ue;var ge=$.groups,_e=J&&z.sticky,je=g(E,z),ve=z.source,U=0,W=F;if(_e&&(je=M(je,"y",""),D(je,"g")===-1&&(je+="g"),W=V(F,z.lastIndex),z.lastIndex>0&&(!z.multiline||z.multiline&&I(F,z.lastIndex-1)!==`
27
27
  `)&&(ve="(?: "+ve+")",W=" "+W,U++),he=new RegExp("^(?:"+ve+")",je)),Y&&(he=new RegExp("^"+ve+"$(?!\\s)",je)),G&&(de=z.lastIndex),be=g(R,_e?he:z,W),_e?be?(be.input=V(be.input,U),be[0]=V(be[0],U),be.index=z.lastIndex,z.lastIndex+=be[0].length):z.lastIndex=0:G&&be&&(z.lastIndex=z.global?be.index+be[0].length:de),Y&&be&&be.length>1&&g(C,be[0],he,(function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(be[ie]=void 0)})),be&&ge)for(be.groups=H=x(null),ie=0;ie<ge.length;ie++)H[(te=ge[ie])[0]]=be[te[1]];return be}),d.exports=A},7979:(d,v,i)=>{var f=i(8551);d.exports=function(){var m=f(this),g="";return m.hasIndices&&(g+="d"),m.global&&(g+="g"),m.ignoreCase&&(g+="i"),m.multiline&&(g+="m"),m.dotAll&&(g+="s"),m.unicode&&(g+="u"),m.unicodeSets&&(g+="v"),m.sticky&&(g+="y"),g}},1034:(d,v,i)=>{var f=i(9565),m=i(9297),g=i(1625),b=i(7979),w=RegExp.prototype;d.exports=function(E){var O=E.flags;return O!==void 0||"flags"in w||m(E,"flags")||!g(w,E)?O:f(b,E)}},8429:(d,v,i)=>{var f=i(9039),m=i(4475).RegExp,g=f((function(){var E=m("a","y");return E.lastIndex=2,E.exec("abcd")!==null})),b=g||f((function(){return!m("a","y").sticky})),w=g||f((function(){var E=m("^r","gy");return E.lastIndex=2,E.exec("str")!==null}));d.exports={BROKEN_CARET:w,MISSED_STICKY:b,UNSUPPORTED_Y:g}},3635:(d,v,i)=>{var f=i(9039),m=i(4475).RegExp;d.exports=f((function(){var g=m(".","s");return!(g.dotAll&&g.test(`
28
28
  `)&&g.flags==="s")}))},8814:(d,v,i)=>{var f=i(9039),m=i(4475).RegExp;d.exports=f((function(){var g=m("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"}))},7750:(d,v,i)=>{var f=i(4117),m=TypeError;d.exports=function(g){if(f(g))throw new m("Can't call method on "+g);return g}},3389:(d,v,i)=>{var f=i(4475),m=i(3724),g=Object.getOwnPropertyDescriptor;d.exports=function(b){if(!m)return f[b];var w=g(f,b);return w&&w.value}},9472:(d,v,i)=>{var f,m=i(4475),g=i(8745),b=i(4901),w=i(6763),E=i(9392),O=i(7680),j=i(2812),x=m.Function,S=/MSIE .\./.test(E)||w&&((f=m.Bun.version.split(".")).length<3||f[0]==="0"&&(f[1]<3||f[1]==="3"&&f[2]==="0"));d.exports=function(P,L){var C=L?2:1;return S?function(R,A){var I=j(arguments.length,1)>C,D=b(R)?R:x(R),M=I?O(arguments,C):[],V=I?function(){g(D,this,M)}:D;return L?P(V,A):P(V)}:P}},7633:(d,v,i)=>{var f=i(7751),m=i(2106),g=i(8227),b=i(3724),w=g("species");d.exports=function(E){var O=f(E);b&&O&&!O[w]&&m(O,w,{configurable:!0,get:function(){return this}})}},687:(d,v,i)=>{var f=i(4913).f,m=i(9297),g=i(8227)("toStringTag");d.exports=function(b,w,E){b&&!E&&(b=b.prototype),b&&!m(b,g)&&f(b,g,{configurable:!0,value:w})}},6119:(d,v,i)=>{var f=i(5745),m=i(3392),g=f("keys");d.exports=function(b){return g[b]||(g[b]=m(b))}},7629:(d,v,i)=>{var f=i(6395),m=i(4475),g=i(9433),b="__core-js_shared__",w=d.exports=m[b]||g(b,{});(w.versions||(w.versions=[])).push({version:"3.36.1",mode:f?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(d,v,i)=>{var f=i(7629);d.exports=function(m,g){return f[m]||(f[m]=g||{})}},2293:(d,v,i)=>{var f=i(8551),m=i(5548),g=i(4117),b=i(8227)("species");d.exports=function(w,E){var O,j=f(w).constructor;return j===void 0||g(O=f(j)[b])?E:m(O)}},8183:(d,v,i)=>{var f=i(9504),m=i(1291),g=i(655),b=i(7750),w=f("".charAt),E=f("".charCodeAt),O=f("".slice),j=function(x){return function(S,P){var L,C,R=g(b(S)),A=m(P),I=R.length;return A<0||A>=I?x?"":void 0:(L=E(R,A))<55296||L>56319||A+1===I||(C=E(R,A+1))<56320||C>57343?x?w(R,A):L:x?O(R,A,A+2):C-56320+(L-55296<<10)+65536}};d.exports={codeAt:j(!1),charAt:j(!0)}},533:(d,v,i)=>{var f=i(9504),m=i(8014),g=i(655),b=i(2333),w=i(7750),E=f(b),O=f("".slice),j=Math.ceil,x=function(S){return function(P,L,C){var R,A,I=g(w(P)),D=m(L),M=I.length,V=C===void 0?" ":g(C);return D<=M||V===""?I:((A=E(V,j((R=D-M)/V.length))).length>R&&(A=O(A,0,R)),S?I+A:A+I)}};d.exports={start:x(!1),end:x(!0)}},2333:(d,v,i)=>{var f=i(1291),m=i(655),g=i(7750),b=RangeError;d.exports=function(w){var E=m(g(this)),O="",j=f(w);if(j<0||j===1/0)throw new b("Wrong number of repetitions");for(;j>0;(j>>>=1)&&(E+=E))1&j&&(O+=E);return O}},706:(d,v,i)=>{var f=i(350).PROPER,m=i(9039),g=i(7452);d.exports=function(b){return m((function(){return!!g[b]()||"​…᠎"[b]()!=="​…᠎"||f&&g[b].name!==b}))}},3802:(d,v,i)=>{var f=i(9504),m=i(7750),g=i(655),b=i(7452),w=f("".replace),E=RegExp("^["+b+"]+"),O=RegExp("(^|[^"+b+"])["+b+"]+$"),j=function(x){return function(S){var P=g(m(S));return 1&x&&(P=w(P,E,"")),2&x&&(P=w(P,O,"$1")),P}};d.exports={start:j(1),end:j(2),trim:j(3)}},4495:(d,v,i)=>{var f=i(7388),m=i(9039),g=i(4475).String;d.exports=!!Object.getOwnPropertySymbols&&!m((function(){var b=Symbol("symbol detection");return!g(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&f&&f<41}))},8242:(d,v,i)=>{var f=i(9565),m=i(7751),g=i(8227),b=i(6840);d.exports=function(){var w=m("Symbol"),E=w&&w.prototype,O=E&&E.valueOf,j=g("toPrimitive");E&&!E[j]&&b(E,j,(function(x){return f(O,this)}),{arity:1})}},1296:(d,v,i)=>{var f=i(4495);d.exports=f&&!!Symbol.for&&!!Symbol.keyFor},9225:(d,v,i)=>{var f,m,g,b,w=i(4475),E=i(8745),O=i(6080),j=i(4901),x=i(9297),S=i(9039),P=i(397),L=i(7680),C=i(4055),R=i(2812),A=i(8119),I=i(9088),D=w.setImmediate,M=w.clearImmediate,V=w.process,G=w.Dispatch,J=w.Function,Y=w.MessageChannel,se=w.String,ue=0,he={},de="onreadystatechange";S((function(){f=w.location}));var be=function(z){if(x(he,z)){var $=he[z];delete he[z],$()}},ie=function(z){return function(){be(z)}},H=function(z){be(z.data)},te=function(z){w.postMessage(se(z),f.protocol+"//"+f.host)};D&&M||(D=function(z){R(arguments.length,1);var $=j(z)?z:J(z),F=L(arguments,1);return he[++ue]=function(){E($,void 0,F)},m(ue),ue},M=function(z){delete he[z]},I?m=function(z){V.nextTick(ie(z))}:G&&G.now?m=function(z){G.now(ie(z))}:Y&&!A?(b=(g=new Y).port2,g.port1.onmessage=H,m=O(b.postMessage,b)):w.addEventListener&&j(w.postMessage)&&!w.importScripts&&f&&f.protocol!=="file:"&&!S(te)?(m=te,w.addEventListener("message",H,!1)):m=de in C("script")?function(z){P.appendChild(C("script"))[de]=function(){P.removeChild(this),be(z)}}:function(z){setTimeout(ie(z),0)}),d.exports={set:D,clear:M}},1240:(d,v,i)=>{var f=i(9504);d.exports=f(1 .valueOf)},5610:(d,v,i)=>{var f=i(1291),m=Math.max,g=Math.min;d.exports=function(b,w){var E=f(b);return E<0?m(E+w,0):g(E,w)}},5397:(d,v,i)=>{var f=i(7055),m=i(7750);d.exports=function(g){return f(m(g))}},1291:(d,v,i)=>{var f=i(741);d.exports=function(m){var g=+m;return g!=g||g===0?0:f(g)}},8014:(d,v,i)=>{var f=i(1291),m=Math.min;d.exports=function(g){var b=f(g);return b>0?m(b,9007199254740991):0}},8981:(d,v,i)=>{var f=i(7750),m=Object;d.exports=function(g){return m(f(g))}},2777:(d,v,i)=>{var f=i(9565),m=i(34),g=i(757),b=i(5966),w=i(4270),E=i(8227),O=TypeError,j=E("toPrimitive");d.exports=function(x,S){if(!m(x)||g(x))return x;var P,L=b(x,j);if(L){if(S===void 0&&(S="default"),P=f(L,x,S),!m(P)||g(P))return P;throw new O("Can't convert object to primitive value")}return S===void 0&&(S="number"),w(x,S)}},6969:(d,v,i)=>{var f=i(2777),m=i(757);d.exports=function(g){var b=f(g,"string");return m(b)?b:b+""}},2140:(d,v,i)=>{var f={};f[i(8227)("toStringTag")]="z",d.exports=String(f)==="[object z]"},655:(d,v,i)=>{var f=i(6955),m=String;d.exports=function(g){if(f(g)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return m(g)}},6823:d=>{var v=String;d.exports=function(i){try{return v(i)}catch{return"Object"}}},3392:(d,v,i)=>{var f=i(9504),m=0,g=Math.random(),b=f(1 .toString);d.exports=function(w){return"Symbol("+(w===void 0?"":w)+")_"+b(++m+g,36)}},7040:(d,v,i)=>{var f=i(4495);d.exports=f&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:(d,v,i)=>{var f=i(3724),m=i(9039);d.exports=f&&m((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},2812:d=>{var v=TypeError;d.exports=function(i,f){if(i<f)throw new v("Not enough arguments");return i}},8622:(d,v,i)=>{var f=i(4475),m=i(4901),g=f.WeakMap;d.exports=m(g)&&/native code/.test(String(g))},511:(d,v,i)=>{var f=i(9167),m=i(9297),g=i(1951),b=i(4913).f;d.exports=function(w){var E=f.Symbol||(f.Symbol={});m(E,w)||b(E,w,{value:g.f(w)})}},1951:(d,v,i)=>{var f=i(8227);v.f=f},8227:(d,v,i)=>{var f=i(4475),m=i(5745),g=i(9297),b=i(3392),w=i(4495),E=i(7040),O=f.Symbol,j=m("wks"),x=E?O.for||O:O&&O.withoutSetter||b;d.exports=function(S){return g(j,S)||(j[S]=w&&g(O,S)?O[S]:x("Symbol."+S)),j[S]}},7452:d=>{d.exports=`
29
- \v\f\r                 \u2028\u2029\uFEFF`},8706:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(4376),b=i(34),w=i(8981),E=i(6198),O=i(6837),j=i(4659),x=i(1469),S=i(597),P=i(8227),L=i(7388),C=P("isConcatSpreadable"),R=L>=51||!m((function(){var I=[];return I[C]=!1,I.concat()[0]!==I})),A=function(I){if(!b(I))return!1;var D=I[C];return D!==void 0?!!D:g(I)};f({target:"Array",proto:!0,arity:1,forced:!R||!S("concat")},{concat:function(I){var D,M,V,G,J,Y=w(this),se=x(Y,0),ue=0;for(D=-1,V=arguments.length;D<V;D++)if(A(J=D===-1?Y:arguments[D]))for(G=E(J),O(ue+G),M=0;M<G;M++,ue++)M in J&&j(se,ue,J[M]);else O(ue+1),j(se,ue++,J);return se.length=ue,se}})},8431:(d,v,i)=>{var f=i(6518),m=i(9213).every;f({target:"Array",proto:!0,forced:!i(4598)("every")},{every:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},2008:(d,v,i)=>{var f=i(6518),m=i(9213).filter;f({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},113:(d,v,i)=>{var f=i(6518),m=i(9213).find,g=i(6469),b="find",w=!0;b in[]&&Array(1)[b]((function(){w=!1})),f({target:"Array",proto:!0,forced:w},{find:function(E){return m(this,E,arguments.length>1?arguments[1]:void 0)}}),g(b)},1629:(d,v,i)=>{var f=i(6518),m=i(235);f({target:"Array",proto:!0,forced:[].forEach!==m},{forEach:m})},3418:(d,v,i)=>{var f=i(6518),m=i(7916);f({target:"Array",stat:!0,forced:!i(4428)((function(g){Array.from(g)}))},{from:m})},4423:(d,v,i)=>{var f=i(6518),m=i(9617).includes,g=i(9039),b=i(6469);f({target:"Array",proto:!0,forced:g((function(){return!Array(1).includes()}))},{includes:function(w){return m(this,w,arguments.length>1?arguments[1]:void 0)}}),b("includes")},5276:(d,v,i)=>{var f=i(6518),m=i(7476),g=i(9617).indexOf,b=i(4598),w=m([].indexOf),E=!!w&&1/w([1],1,-0)<0;f({target:"Array",proto:!0,forced:E||!b("indexOf")},{indexOf:function(O){var j=arguments.length>1?arguments[1]:void 0;return E?w(this,O,j)||0:g(this,O,j)}})},4346:(d,v,i)=>{i(6518)({target:"Array",stat:!0},{isArray:i(4376)})},3792:(d,v,i)=>{var f=i(5397),m=i(6469),g=i(6269),b=i(1181),w=i(4913).f,E=i(1088),O=i(2529),j=i(6395),x=i(3724),S="Array Iterator",P=b.set,L=b.getterFor(S);d.exports=E(Array,"Array",(function(R,A){P(this,{type:S,target:f(R),index:0,kind:A})}),(function(){var R=L(this),A=R.target,I=R.index++;if(!A||I>=A.length)return R.target=void 0,O(void 0,!0);switch(R.kind){case"keys":return O(I,!1);case"values":return O(A[I],!1)}return O([I,A[I]],!1)}),"values");var C=g.Arguments=g.Array;if(m("keys"),m("values"),m("entries"),!j&&x&&C.name!=="values")try{w(C,"name",{value:"values"})}catch{}},8598:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(7055),b=i(5397),w=i(4598),E=m([].join);f({target:"Array",proto:!0,forced:g!==Object||!w("join",",")},{join:function(O){return E(b(this),O===void 0?",":O)}})},2062:(d,v,i)=>{var f=i(6518),m=i(9213).map;f({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:(d,v,i)=>{var f=i(6518),m=i(926).left,g=i(4598),b=i(7388);f({target:"Array",proto:!0,forced:!i(9088)&&b>79&&b<83||!g("reduce")},{reduce:function(w){var E=arguments.length;return m(this,w,E,E>1?arguments[1]:void 0)}})},4490:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(4376),b=m([].reverse),w=[1,2];f({target:"Array",proto:!0,forced:String(w)===String(w.reverse())},{reverse:function(){return g(this)&&(this.length=this.length),b(this)}})},4782:(d,v,i)=>{var f=i(6518),m=i(4376),g=i(3517),b=i(34),w=i(5610),E=i(6198),O=i(5397),j=i(4659),x=i(8227),S=i(597),P=i(7680),L=S("slice"),C=x("species"),R=Array,A=Math.max;f({target:"Array",proto:!0,forced:!L},{slice:function(I,D){var M,V,G,J=O(this),Y=E(J),se=w(I,Y),ue=w(D===void 0?Y:D,Y);if(m(J)&&(M=J.constructor,(g(M)&&(M===R||m(M.prototype))||b(M)&&(M=M[C])===null)&&(M=void 0),M===R||M===void 0))return P(J,se,ue);for(V=new(M===void 0?R:M)(A(ue-se,0)),G=0;se<ue;se++,G++)se in J&&j(V,G,J[se]);return V.length=G,V}})},5086:(d,v,i)=>{var f=i(6518),m=i(9213).some;f({target:"Array",proto:!0,forced:!i(4598)("some")},{some:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},6910:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(9306),b=i(8981),w=i(6198),E=i(4606),O=i(655),j=i(9039),x=i(4488),S=i(4598),P=i(8834),L=i(3202),C=i(7388),R=i(9160),A=[],I=m(A.sort),D=m(A.push),M=j((function(){A.sort(void 0)})),V=j((function(){A.sort(null)})),G=S("sort"),J=!j((function(){if(C)return C<70;if(!(P&&P>3)){if(L)return!0;if(R)return R<603;var Y,se,ue,he,de="";for(Y=65;Y<76;Y++){switch(se=String.fromCharCode(Y),Y){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(he=0;he<47;he++)A.push({k:se+he,v:ue})}for(A.sort((function(be,ie){return ie.v-be.v})),he=0;he<A.length;he++)se=A[he].k.charAt(0),de.charAt(de.length-1)!==se&&(de+=se);return de!=="DGBEFHACIJK"}}));f({target:"Array",proto:!0,forced:M||!V||!G||!J},{sort:function(Y){Y!==void 0&&g(Y);var se=b(this);if(J)return Y===void 0?I(se):I(se,Y);var ue,he,de=[],be=w(se);for(he=0;he<be;he++)he in se&&D(de,se[he]);for(x(de,(function(ie){return function(H,te){return te===void 0?-1:H===void 0?1:ie!==void 0?+ie(H,te)||0:O(H)>O(te)?1:-1}})(Y)),ue=w(de),he=0;he<ue;)se[he]=de[he++];for(;he<be;)E(se,he++);return se}})},4554:(d,v,i)=>{var f=i(6518),m=i(8981),g=i(5610),b=i(1291),w=i(6198),E=i(4527),O=i(6837),j=i(1469),x=i(4659),S=i(4606),P=i(597)("splice"),L=Math.max,C=Math.min;f({target:"Array",proto:!0,forced:!P},{splice:function(R,A){var I,D,M,V,G,J,Y=m(this),se=w(Y),ue=g(R,se),he=arguments.length;for(he===0?I=D=0:he===1?(I=0,D=se-ue):(I=he-2,D=C(L(b(A),0),se-ue)),O(se+I-D),M=j(Y,D),V=0;V<D;V++)(G=ue+V)in Y&&x(M,V,Y[G]);if(M.length=D,I<D){for(V=ue;V<se-D;V++)J=V+I,(G=V+D)in Y?Y[J]=Y[G]:S(Y,J);for(V=se;V>se-D+I;V--)S(Y,V-1)}else if(I>D)for(V=se-D;V>ue;V--)J=V+I-1,(G=V+D-1)in Y?Y[J]=Y[G]:S(Y,J);for(V=0;V<I;V++)Y[V+ue]=arguments[V+2];return E(Y,se-D+I),M}})},1688:(d,v,i)=>{var f=i(6518),m=i(380);f({target:"Date",proto:!0,forced:Date.prototype.toISOString!==m},{toISOString:m})},739:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(8981),b=i(2777);f({target:"Date",proto:!0,arity:1,forced:m((function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1}))},{toJSON:function(w){var E=g(this),O=b(E,"number");return typeof O!="number"||isFinite(O)?E.toISOString():null}})},9572:(d,v,i)=>{var f=i(9297),m=i(6840),g=i(3640),b=i(8227)("toPrimitive"),w=Date.prototype;f(w,b)||m(w,b,g)},3288:(d,v,i)=>{var f=i(9504),m=i(6840),g=Date.prototype,b="Invalid Date",w="toString",E=f(g[w]),O=f(g.getTime);String(new Date(NaN))!==b&&m(g,w,(function(){var j=O(this);return j==j?E(this):b}))},4170:(d,v,i)=>{var f=i(6518),m=i(566);f({target:"Function",proto:!0,forced:Function.bind!==m},{bind:m})},2010:(d,v,i)=>{var f=i(3724),m=i(350).EXISTS,g=i(9504),b=i(2106),w=Function.prototype,E=g(w.toString),O=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=g(O.exec);f&&!m&&b(w,"name",{configurable:!0,get:function(){try{return j(O,E(this))[1]}catch{return""}}})},3110:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(8745),b=i(9565),w=i(9504),E=i(9039),O=i(4901),j=i(757),x=i(7680),S=i(6933),P=i(4495),L=String,C=m("JSON","stringify"),R=w(/./.exec),A=w("".charAt),I=w("".charCodeAt),D=w("".replace),M=w(1 .toString),V=/[\uD800-\uDFFF]/g,G=/^[\uD800-\uDBFF]$/,J=/^[\uDC00-\uDFFF]$/,Y=!P||E((function(){var de=m("Symbol")("stringify detection");return C([de])!=="[null]"||C({a:de})!=="{}"||C(Object(de))!=="{}"})),se=E((function(){return C("\uDF06\uD834")!=='"\\udf06\\ud834"'||C("\uDEAD")!=='"\\udead"'})),ue=function(de,be){var ie=x(arguments),H=S(be);if(O(H)||de!==void 0&&!j(de))return ie[1]=function(te,z){if(O(H)&&(z=b(H,this,L(te),z)),!j(z))return z},g(C,null,ie)},he=function(de,be,ie){var H=A(ie,be-1),te=A(ie,be+1);return R(G,de)&&!R(J,te)||R(J,de)&&!R(G,H)?"\\u"+M(I(de,0),16):de};C&&f({target:"JSON",stat:!0,arity:3,forced:Y||se},{stringify:function(de,be,ie){var H=x(arguments),te=g(Y?ue:C,null,H);return se&&typeof te=="string"?D(te,V,he):te}})},4731:(d,v,i)=>{var f=i(4475);i(687)(f.JSON,"JSON",!0)},479:(d,v,i)=>{i(687)(Math,"Math",!0)},2892:(d,v,i)=>{var f=i(6518),m=i(6395),g=i(3724),b=i(4475),w=i(9167),E=i(9504),O=i(2796),j=i(9297),x=i(3167),S=i(1625),P=i(757),L=i(2777),C=i(9039),R=i(8480).f,A=i(7347).f,I=i(4913).f,D=i(1240),M=i(3802).trim,V="Number",G=b[V],J=w[V],Y=G.prototype,se=b.TypeError,ue=E("".slice),he=E("".charCodeAt),de=O(V,!G(" 0o1")||!G("0b1")||G("+0x1")),be=function(H){var te,z=arguments.length<1?0:G((function($){var F=L($,"number");return typeof F=="bigint"?F:(function(ee){var ge,_e,je,ve,U,W,ne,ce,pe=L(ee,"number");if(P(pe))throw new se("Cannot convert a Symbol value to a number");if(typeof pe=="string"&&pe.length>2){if(pe=M(pe),(ge=he(pe,0))===43||ge===45){if((_e=he(pe,2))===88||_e===120)return NaN}else if(ge===48){switch(he(pe,1)){case 66:case 98:je=2,ve=49;break;case 79:case 111:je=8,ve=55;break;default:return+pe}for(W=(U=ue(pe,2)).length,ne=0;ne<W;ne++)if((ce=he(U,ne))<48||ce>ve)return NaN;return parseInt(U,je)}}return+pe})(F)})(H));return S(Y,te=this)&&C((function(){D(te)}))?x(Object(z),this,be):z};be.prototype=Y,de&&!m&&(Y.constructor=be),f({global:!0,constructor:!0,wrap:!0,forced:de},{Number:be});var ie=function(H,te){for(var z,$=g?R(te):"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(","),F=0;$.length>F;F++)j(te,z=$[F])&&!j(H,z)&&I(H,z,A(te,z))};m&&J&&ie(w[V],J),(de||m)&&ie(w[V],G)},9868:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(1291),b=i(1240),w=i(2333),E=i(9039),O=RangeError,j=String,x=Math.floor,S=m(w),P=m("".slice),L=m(1 .toFixed),C=function(D,M,V){return M===0?V:M%2==1?C(D,M-1,V*D):C(D*D,M/2,V)},R=function(D,M,V){for(var G=-1,J=V;++G<6;)J+=M*D[G],D[G]=J%1e7,J=x(J/1e7)},A=function(D,M){for(var V=6,G=0;--V>=0;)G+=D[V],D[V]=x(G/M),G=G%M*1e7},I=function(D){for(var M=6,V="";--M>=0;)if(V!==""||M===0||D[M]!==0){var G=j(D[M]);V=V===""?G:V+S("0",7-G.length)+G}return V};f({target:"Number",proto:!0,forced:E((function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"}))||!E((function(){L({})}))},{toFixed:function(D){var M,V,G,J,Y=b(this),se=g(D),ue=[0,0,0,0,0,0],he="",de="0";if(se<0||se>20)throw new O("Incorrect fraction digits");if(Y!=Y)return"NaN";if(Y<=-1e21||Y>=1e21)return j(Y);if(Y<0&&(he="-",Y=-Y),Y>1e-21)if(V=(M=(function(be){for(var ie=0,H=be;H>=4096;)ie+=12,H/=4096;for(;H>=2;)ie+=1,H/=2;return ie})(Y*C(2,69,1))-69)<0?Y*C(2,-M,1):Y/C(2,M,1),V*=4503599627370496,(M=52-M)>0){for(R(ue,0,V),G=se;G>=7;)R(ue,1e7,0),G-=7;for(R(ue,C(10,G,1),0),G=M-1;G>=23;)A(ue,8388608),G-=23;A(ue,1<<G),R(ue,1,1),A(ue,2),de=I(ue)}else R(ue,0,V),R(ue,1<<-M,0),de=I(ue)+S("0",se);return se>0?he+((J=de.length)<=se?"0."+S("0",se-J)+de:P(de,0,J-se)+"."+P(de,J-se)):he+de}})},9085:(d,v,i)=>{var f=i(6518),m=i(4213);f({target:"Object",stat:!0,arity:2,forced:Object.assign!==m},{assign:m})},9904:(d,v,i)=>{i(6518)({target:"Object",stat:!0,sham:!i(3724)},{create:i(2360)})},7945:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(6801).f;f({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!m},{defineProperties:g})},4185:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(4913).f;f({target:"Object",stat:!0,forced:Object.defineProperty!==g,sham:!m},{defineProperty:g})},5506:(d,v,i)=>{var f=i(6518),m=i(2357).entries;f({target:"Object",stat:!0},{entries:function(g){return m(g)}})},3851:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(5397),b=i(7347).f,w=i(3724);f({target:"Object",stat:!0,forced:!w||m((function(){b(1)})),sham:!w},{getOwnPropertyDescriptor:function(E,O){return b(g(E),O)}})},1278:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(5031),b=i(5397),w=i(7347),E=i(4659);f({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(O){for(var j,x,S=b(O),P=w.f,L=g(S),C={},R=0;L.length>R;)(x=P(S,j=L[R++]))!==void 0&&E(C,j,x);return C}})},9773:(d,v,i)=>{var f=i(6518),m=i(4495),g=i(9039),b=i(3717),w=i(8981);f({target:"Object",stat:!0,forced:!m||g((function(){b.f(1)}))},{getOwnPropertySymbols:function(E){var O=b.f;return O?O(w(E)):[]}})},875:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(8981),b=i(2787),w=i(2211);f({target:"Object",stat:!0,forced:m((function(){b(1)})),sham:!w},{getPrototypeOf:function(E){return b(g(E))}})},9432:(d,v,i)=>{var f=i(6518),m=i(8981),g=i(1072);f({target:"Object",stat:!0,forced:i(9039)((function(){g(1)}))},{keys:function(b){return g(m(b))}})},287:(d,v,i)=>{i(6518)({target:"Object",stat:!0},{setPrototypeOf:i(2967)})},6099:(d,v,i)=>{var f=i(2140),m=i(6840),g=i(3179);f||m(Object.prototype,"toString",g,{unsafe:!0})},6034:(d,v,i)=>{var f=i(6518),m=i(2357).values;f({target:"Object",stat:!0},{values:function(g){return m(g)}})},8459:(d,v,i)=>{var f=i(6518),m=i(3904);f({global:!0,forced:parseFloat!==m},{parseFloat:m})},8940:(d,v,i)=>{var f=i(6518),m=i(2703);f({global:!0,forced:parseInt!==m},{parseInt:m})},6499:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(9306),b=i(6043),w=i(1103),E=i(2652);f({target:"Promise",stat:!0,forced:i(537)},{all:function(O){var j=this,x=b.f(j),S=x.resolve,P=x.reject,L=w((function(){var C=g(j.resolve),R=[],A=0,I=1;E(O,(function(D){var M=A++,V=!1;I++,m(C,j,D).then((function(G){V||(V=!0,R[M]=G,--I||S(R))}),P)})),--I||S(R)}));return L.error&&P(L.value),x.promise}})},2003:(d,v,i)=>{var f=i(6518),m=i(6395),g=i(916).CONSTRUCTOR,b=i(550),w=i(7751),E=i(4901),O=i(6840),j=b&&b.prototype;if(f({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(S){return this.then(void 0,S)}}),!m&&E(b)){var x=w("Promise").prototype.catch;j.catch!==x&&O(j,"catch",x,{unsafe:!0})}},436:(d,v,i)=>{var f,m,g,b=i(6518),w=i(6395),E=i(9088),O=i(4475),j=i(9565),x=i(6840),S=i(2967),P=i(687),L=i(7633),C=i(9306),R=i(4901),A=i(34),I=i(679),D=i(2293),M=i(9225).set,V=i(1955),G=i(3138),J=i(1103),Y=i(8265),se=i(1181),ue=i(550),he=i(916),de=i(6043),be="Promise",ie=he.CONSTRUCTOR,H=he.REJECTION_EVENT,te=he.SUBCLASSING,z=se.getterFor(be),$=se.set,F=ue&&ue.prototype,ee=ue,ge=F,_e=O.TypeError,je=O.document,ve=O.process,U=de.f,W=U,ne=!!(je&&je.createEvent&&O.dispatchEvent),ce="unhandledrejection",pe=function(me){var Ee;return!(!A(me)||!R(Ee=me.then))&&Ee},Oe=function(me,Ee){var Se,qe,it,Et=Ee.value,Ct=Ee.state===1,Lt=Ct?me.ok:me.fail,_t=me.resolve,At=me.reject,zt=me.domain;try{Lt?(Ct||(Ee.rejection===2&&Ae(Ee),Ee.rejection=1),Lt===!0?Se=Et:(zt&&zt.enter(),Se=Lt(Et),zt&&(zt.exit(),it=!0)),Se===me.promise?At(new _e("Promise-chain cycle")):(qe=pe(Se))?j(qe,Se,_t,At):_t(Se)):At(Et)}catch($t){zt&&!it&&zt.exit(),At($t)}},$e=function(me,Ee){me.notified||(me.notified=!0,V((function(){for(var Se,qe=me.reactions;Se=qe.get();)Oe(Se,me);me.notified=!1,Ee&&!me.rejection&&Ze(me)})))},Fe=function(me,Ee,Se){var qe,it;ne?((qe=je.createEvent("Event")).promise=Ee,qe.reason=Se,qe.initEvent(me,!1,!0),O.dispatchEvent(qe)):qe={promise:Ee,reason:Se},!H&&(it=O["on"+me])?it(qe):me===ce&&G("Unhandled promise rejection",Se)},Ze=function(me){j(M,O,(function(){var Ee,Se=me.facade,qe=me.value;if(Ye(me)&&(Ee=J((function(){E?ve.emit("unhandledRejection",qe,Se):Fe(ce,Se,qe)})),me.rejection=E||Ye(me)?2:1,Ee.error))throw Ee.value}))},Ye=function(me){return me.rejection!==1&&!me.parent},Ae=function(me){j(M,O,(function(){var Ee=me.facade;E?ve.emit("rejectionHandled",Ee):Fe("rejectionhandled",Ee,me.value)}))},Qe=function(me,Ee,Se){return function(qe){me(Ee,qe,Se)}},De=function(me,Ee,Se){me.done||(me.done=!0,Se&&(me=Se),me.value=Ee,me.state=2,$e(me,!0))},nt=function(me,Ee,Se){if(!me.done){me.done=!0,Se&&(me=Se);try{if(me.facade===Ee)throw new _e("Promise can't be resolved itself");var qe=pe(Ee);qe?V((function(){var it={done:!1};try{j(qe,Ee,Qe(nt,it,me),Qe(De,it,me))}catch(Et){De(it,Et,me)}})):(me.value=Ee,me.state=1,$e(me,!1))}catch(it){De({done:!1},it,me)}}};if(ie&&(ge=(ee=function(me){I(this,ge),C(me),j(f,this);var Ee=z(this);try{me(Qe(nt,Ee),Qe(De,Ee))}catch(Se){De(Ee,Se)}}).prototype,(f=function(me){$(this,{type:be,done:!1,notified:!1,parent:!1,reactions:new Y,rejection:!1,state:0,value:void 0})}).prototype=x(ge,"then",(function(me,Ee){var Se=z(this),qe=U(D(this,ee));return Se.parent=!0,qe.ok=!R(me)||me,qe.fail=R(Ee)&&Ee,qe.domain=E?ve.domain:void 0,Se.state===0?Se.reactions.add(qe):V((function(){Oe(qe,Se)})),qe.promise})),m=function(){var me=new f,Ee=z(me);this.promise=me,this.resolve=Qe(nt,Ee),this.reject=Qe(De,Ee)},de.f=U=function(me){return me===ee||me===void 0?new m(me):W(me)},!w&&R(ue)&&F!==Object.prototype)){g=F.then,te||x(F,"then",(function(me,Ee){var Se=this;return new ee((function(qe,it){j(g,Se,qe,it)})).then(me,Ee)}),{unsafe:!0});try{delete F.constructor}catch{}S&&S(F,ge)}b({global:!0,constructor:!0,wrap:!0,forced:ie},{Promise:ee}),P(ee,be,!1,!0),L(be)},3362:(d,v,i)=>{i(436),i(6499),i(2003),i(7743),i(1481),i(280)},7743:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(9306),b=i(6043),w=i(1103),E=i(2652);f({target:"Promise",stat:!0,forced:i(537)},{race:function(O){var j=this,x=b.f(j),S=x.reject,P=w((function(){var L=g(j.resolve);E(O,(function(C){m(L,j,C).then(x.resolve,S)}))}));return P.error&&S(P.value),x.promise}})},1481:(d,v,i)=>{var f=i(6518),m=i(6043);f({target:"Promise",stat:!0,forced:i(916).CONSTRUCTOR},{reject:function(g){var b=m.f(this);return(0,b.reject)(g),b.promise}})},280:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(6395),b=i(550),w=i(916).CONSTRUCTOR,E=i(3438),O=m("Promise"),j=g&&!w;f({target:"Promise",stat:!0,forced:g||w},{resolve:function(x){return E(j&&this===O?b:this,x)}})},825:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(8745),b=i(566),w=i(5548),E=i(8551),O=i(34),j=i(2360),x=i(9039),S=m("Reflect","construct"),P=Object.prototype,L=[].push,C=x((function(){function I(){}return!(S((function(){}),[],I)instanceof I)})),R=!x((function(){S((function(){}))})),A=C||R;f({target:"Reflect",stat:!0,forced:A,sham:A},{construct:function(I,D){w(I),E(D);var M=arguments.length<3?I:w(arguments[2]);if(R&&!C)return S(I,D,M);if(I===M){switch(D.length){case 0:return new I;case 1:return new I(D[0]);case 2:return new I(D[0],D[1]);case 3:return new I(D[0],D[1],D[2]);case 4:return new I(D[0],D[1],D[2],D[3])}var V=[null];return g(L,V,D),new(g(b,I,V))}var G=M.prototype,J=j(O(G)?G:P),Y=g(I,J,D);return O(Y)?Y:J}})},888:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(34),b=i(8551),w=i(6575),E=i(7347),O=i(2787);f({target:"Reflect",stat:!0},{get:function j(x,S){var P,L,C=arguments.length<3?x:arguments[2];return b(x)===C?x[S]:(P=E.f(x,S))?w(P)?P.value:P.get===void 0?void 0:m(P.get,C):g(L=O(x))?j(L,S,C):void 0}})},4864:(d,v,i)=>{var f=i(3724),m=i(4475),g=i(9504),b=i(2796),w=i(3167),E=i(6699),O=i(2360),j=i(8480).f,x=i(1625),S=i(788),P=i(655),L=i(1034),C=i(8429),R=i(1056),A=i(6840),I=i(9039),D=i(9297),M=i(1181).enforce,V=i(7633),G=i(8227),J=i(3635),Y=i(8814),se=G("match"),ue=m.RegExp,he=ue.prototype,de=m.SyntaxError,be=g(he.exec),ie=g("".charAt),H=g("".replace),te=g("".indexOf),z=g("".slice),$=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,ee=/a/g,ge=new ue(F)!==F,_e=C.MISSED_STICKY,je=C.UNSUPPORTED_Y;if(b("RegExp",f&&(!ge||_e||J||Y||I((function(){return ee[se]=!1,ue(F)!==F||ue(ee)===ee||String(ue(F,"i"))!=="/a/i"}))))){for(var ve=function(ne,ce){var pe,Oe,$e,Fe,Ze,Ye,Ae=x(he,this),Qe=S(ne),De=ce===void 0,nt=[],me=ne;if(!Ae&&Qe&&De&&ne.constructor===ve)return ne;if((Qe||x(he,ne))&&(ne=ne.source,De&&(ce=L(me))),ne=ne===void 0?"":P(ne),ce=ce===void 0?"":P(ce),me=ne,J&&"dotAll"in F&&(Oe=!!ce&&te(ce,"s")>-1)&&(ce=H(ce,/s/g,"")),pe=ce,_e&&"sticky"in F&&($e=!!ce&&te(ce,"y")>-1)&&je&&(ce=H(ce,/y/g,"")),Y&&(Fe=(function(Ee){for(var Se,qe=Ee.length,it=0,Et="",Ct=[],Lt=O(null),_t=!1,At=!1,zt=0,$t="";it<=qe;it++){if((Se=ie(Ee,it))==="\\")Se+=ie(Ee,++it);else if(Se==="]")_t=!1;else if(!_t)switch(!0){case Se==="[":_t=!0;break;case Se==="(":be($,z(Ee,it+1))&&(it+=2,At=!0),Et+=Se,zt++;continue;case(Se===">"&&At):if($t===""||D(Lt,$t))throw new de("Invalid capture group name");Lt[$t]=!0,Ct[Ct.length]=[$t,zt],At=!1,$t="";continue}At?$t+=Se:Et+=Se}return[Et,Ct]})(ne),ne=Fe[0],nt=Fe[1]),Ze=w(ue(ne,ce),Ae?this:he,ve),(Oe||$e||nt.length)&&(Ye=M(Ze),Oe&&(Ye.dotAll=!0,Ye.raw=ve((function(Ee){for(var Se,qe=Ee.length,it=0,Et="",Ct=!1;it<=qe;it++)(Se=ie(Ee,it))!=="\\"?Ct||Se!=="."?(Se==="["?Ct=!0:Se==="]"&&(Ct=!1),Et+=Se):Et+="[\\s\\S]":Et+=Se+ie(Ee,++it);return Et})(ne),pe)),$e&&(Ye.sticky=!0),nt.length&&(Ye.groups=nt)),ne!==me)try{E(Ze,"source",me===""?"(?:)":me)}catch{}return Ze},U=j(ue),W=0;U.length>W;)R(ve,ue,U[W++]);he.constructor=ve,ve.prototype=he,A(m,"RegExp",ve,{constructor:!0})}V("RegExp")},7495:(d,v,i)=>{var f=i(6518),m=i(7323);f({target:"RegExp",proto:!0,forced:/./.exec!==m},{exec:m})},8781:(d,v,i)=>{var f=i(350).PROPER,m=i(6840),g=i(8551),b=i(655),w=i(9039),E=i(1034),O="toString",j=RegExp.prototype,x=j[O],S=w((function(){return x.call({source:"a",flags:"b"})!=="/a/b"})),P=f&&x.name!==O;(S||P)&&m(j,O,(function(){var L=g(this);return"/"+b(L.source)+"/"+b(E(L))}),{unsafe:!0})},1699:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(5749),b=i(7750),w=i(655),E=i(1436),O=m("".indexOf);f({target:"String",proto:!0,forced:!E("includes")},{includes:function(j){return!!~O(w(b(this)),w(g(j)),arguments.length>1?arguments[1]:void 0)}})},7764:(d,v,i)=>{var f=i(8183).charAt,m=i(655),g=i(1181),b=i(1088),w=i(2529),E="String Iterator",O=g.set,j=g.getterFor(E);b(String,"String",(function(x){O(this,{type:E,string:m(x),index:0})}),(function(){var x,S=j(this),P=S.string,L=S.index;return L>=P.length?w(void 0,!0):(x=f(P,L),S.index+=x.length,w(x,!1))}))},1761:(d,v,i)=>{var f=i(9565),m=i(9228),g=i(8551),b=i(4117),w=i(8014),E=i(655),O=i(7750),j=i(5966),x=i(7829),S=i(6682);m("match",(function(P,L,C){return[function(R){var A=O(this),I=b(R)?void 0:j(R,P);return I?f(I,R,A):new RegExp(R)[P](E(A))},function(R){var A=g(this),I=E(R),D=C(L,A,I);if(D.done)return D.value;if(!A.global)return S(A,I);var M=A.unicode;A.lastIndex=0;for(var V,G=[],J=0;(V=S(A,I))!==null;){var Y=E(V[0]);G[J]=Y,Y===""&&(A.lastIndex=x(I,w(A.lastIndex),M)),J++}return J===0?null:G}]}))},5440:(d,v,i)=>{var f=i(8745),m=i(9565),g=i(9504),b=i(9228),w=i(9039),E=i(8551),O=i(4901),j=i(4117),x=i(1291),S=i(8014),P=i(655),L=i(7750),C=i(7829),R=i(5966),A=i(2478),I=i(6682),D=i(8227)("replace"),M=Math.max,V=Math.min,G=g([].concat),J=g([].push),Y=g("".indexOf),se=g("".slice),ue="a".replace(/./,"$0")==="$0",he=!!/./[D]&&/./[D]("a","$0")==="";b("replace",(function(de,be,ie){var H=he?"$":"$0";return[function(te,z){var $=L(this),F=j(te)?void 0:R(te,D);return F?m(F,te,$,z):m(be,P($),te,z)},function(te,z){var $=E(this),F=P(te);if(typeof z=="string"&&Y(z,H)===-1&&Y(z,"$<")===-1){var ee=ie(be,$,F,z);if(ee.done)return ee.value}var ge=O(z);ge||(z=P(z));var _e,je=$.global;je&&(_e=$.unicode,$.lastIndex=0);for(var ve,U=[];(ve=I($,F))!==null&&(J(U,ve),je);)P(ve[0])===""&&($.lastIndex=C(F,S($.lastIndex),_e));for(var W,ne="",ce=0,pe=0;pe<U.length;pe++){for(var Oe,$e=P((ve=U[pe])[0]),Fe=M(V(x(ve.index),F.length),0),Ze=[],Ye=1;Ye<ve.length;Ye++)J(Ze,(W=ve[Ye])===void 0?W:String(W));var Ae=ve.groups;if(ge){var Qe=G([$e],Ze,Fe,F);Ae!==void 0&&J(Qe,Ae),Oe=P(f(z,void 0,Qe))}else Oe=A($e,F,Fe,Ze,Ae,z);Fe>=ce&&(ne+=se(F,ce,Fe)+Oe,ce=Fe+$e.length)}return ne+se(F,ce)}]}),!!w((function(){var de=/./;return de.exec=function(){var be=[];return be.groups={a:"7"},be},"".replace(de,"$<a>")!=="7"}))||!ue||he)},1392:(d,v,i)=>{var f,m=i(6518),g=i(7476),b=i(7347).f,w=i(8014),E=i(655),O=i(5749),j=i(7750),x=i(1436),S=i(6395),P=g("".slice),L=Math.min,C=x("startsWith");m({target:"String",proto:!0,forced:!(!S&&!C&&(f=b(String.prototype,"startsWith"),f&&!f.writable)||C)},{startsWith:function(R){var A=E(j(this));O(R);var I=w(L(arguments.length>1?arguments[1]:void 0,A.length)),D=E(R);return P(A,I,I+D.length)===D}})},2762:(d,v,i)=>{var f=i(6518),m=i(3802).trim;f({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return m(this)}})},6412:(d,v,i)=>{i(511)("asyncIterator")},6761:(d,v,i)=>{var f=i(6518),m=i(4475),g=i(9565),b=i(9504),w=i(6395),E=i(3724),O=i(4495),j=i(9039),x=i(9297),S=i(1625),P=i(8551),L=i(5397),C=i(6969),R=i(655),A=i(6980),I=i(2360),D=i(1072),M=i(8480),V=i(298),G=i(3717),J=i(7347),Y=i(4913),se=i(6801),ue=i(8773),he=i(6840),de=i(2106),be=i(5745),ie=i(6119),H=i(421),te=i(3392),z=i(8227),$=i(1951),F=i(511),ee=i(8242),ge=i(687),_e=i(1181),je=i(9213).forEach,ve=ie("hidden"),U="Symbol",W="prototype",ne=_e.set,ce=_e.getterFor(U),pe=Object[W],Oe=m.Symbol,$e=Oe&&Oe[W],Fe=m.RangeError,Ze=m.TypeError,Ye=m.QObject,Ae=J.f,Qe=Y.f,De=V.f,nt=ue.f,me=b([].push),Ee=be("symbols"),Se=be("op-symbols"),qe=be("wks"),it=!Ye||!Ye[W]||!Ye[W].findChild,Et=function(Ie,Ge,Ve){var Je=Ae(pe,Ge);Je&&delete pe[Ge],Qe(Ie,Ge,Ve),Je&&Ie!==pe&&Qe(pe,Ge,Je)},Ct=E&&j((function(){return I(Qe({},"a",{get:function(){return Qe(this,"a",{value:7}).a}})).a!==7}))?Et:Qe,Lt=function(Ie,Ge){var Ve=Ee[Ie]=I($e);return ne(Ve,{type:U,tag:Ie,description:Ge}),E||(Ve.description=Ge),Ve},_t=function(Ie,Ge,Ve){Ie===pe&&_t(Se,Ge,Ve),P(Ie);var Je=C(Ge);return P(Ve),x(Ee,Je)?(Ve.enumerable?(x(Ie,ve)&&Ie[ve][Je]&&(Ie[ve][Je]=!1),Ve=I(Ve,{enumerable:A(0,!1)})):(x(Ie,ve)||Qe(Ie,ve,A(1,I(null))),Ie[ve][Je]=!0),Ct(Ie,Je,Ve)):Qe(Ie,Je,Ve)},At=function(Ie,Ge){P(Ie);var Ve=L(Ge),Je=D(Ve).concat(Bn(Ve));return je(Je,(function(Ot){E&&!g(zt,Ve,Ot)||_t(Ie,Ot,Ve[Ot])})),Ie},zt=function(Ie){var Ge=C(Ie),Ve=g(nt,this,Ge);return!(this===pe&&x(Ee,Ge)&&!x(Se,Ge))&&(!(Ve||!x(this,Ge)||!x(Ee,Ge)||x(this,ve)&&this[ve][Ge])||Ve)},$t=function(Ie,Ge){var Ve=L(Ie),Je=C(Ge);if(Ve!==pe||!x(Ee,Je)||x(Se,Je)){var Ot=Ae(Ve,Je);return!Ot||!x(Ee,Je)||x(Ve,ve)&&Ve[ve][Je]||(Ot.enumerable=!0),Ot}},Ei=function(Ie){var Ge=De(L(Ie)),Ve=[];return je(Ge,(function(Je){x(Ee,Je)||x(H,Je)||me(Ve,Je)})),Ve},Bn=function(Ie){var Ge=Ie===pe,Ve=De(Ge?Se:L(Ie)),Je=[];return je(Ve,(function(Ot){!x(Ee,Ot)||Ge&&!x(pe,Ot)||me(Je,Ee[Ot])})),Je};O||(he($e=(Oe=function(){if(S($e,this))throw new Ze("Symbol is not a constructor");var Ie=arguments.length&&arguments[0]!==void 0?R(arguments[0]):void 0,Ge=te(Ie),Ve=function(Je){var Ot=this===void 0?m:this;Ot===pe&&g(Ve,Se,Je),x(Ot,ve)&&x(Ot[ve],Ge)&&(Ot[ve][Ge]=!1);var oo=A(1,Je);try{Ct(Ot,Ge,oo)}catch(He){if(!(He instanceof Fe))throw He;Et(Ot,Ge,oo)}};return E&&it&&Ct(pe,Ge,{configurable:!0,set:Ve}),Lt(Ge,Ie)})[W],"toString",(function(){return ce(this).tag})),he(Oe,"withoutSetter",(function(Ie){return Lt(te(Ie),Ie)})),ue.f=zt,Y.f=_t,se.f=At,J.f=$t,M.f=V.f=Ei,G.f=Bn,$.f=function(Ie){return Lt(z(Ie),Ie)},E&&(de($e,"description",{configurable:!0,get:function(){return ce(this).description}}),w||he(pe,"propertyIsEnumerable",zt,{unsafe:!0}))),f({global:!0,constructor:!0,wrap:!0,forced:!O,sham:!O},{Symbol:Oe}),je(D(qe),(function(Ie){F(Ie)})),f({target:U,stat:!0,forced:!O},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),f({target:"Object",stat:!0,forced:!O,sham:!E},{create:function(Ie,Ge){return Ge===void 0?I(Ie):At(I(Ie),Ge)},defineProperty:_t,defineProperties:At,getOwnPropertyDescriptor:$t}),f({target:"Object",stat:!0,forced:!O},{getOwnPropertyNames:Ei}),ee(),ge(Oe,U),H[ve]=!0},9463:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(4475),b=i(9504),w=i(9297),E=i(4901),O=i(1625),j=i(655),x=i(2106),S=i(7740),P=g.Symbol,L=P&&P.prototype;if(m&&E(P)&&(!("description"in L)||P().description!==void 0)){var C={},R=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),Y=O(L,this)?new P(J):J===void 0?P():P(J);return J===""&&(C[Y]=!0),Y};S(R,P),R.prototype=L,L.constructor=R;var A=String(P("description detection"))==="Symbol(description detection)",I=b(L.valueOf),D=b(L.toString),M=/^Symbol\((.*)\)[^)]+$/,V=b("".replace),G=b("".slice);x(L,"description",{configurable:!0,get:function(){var J=I(this);if(w(C,J))return"";var Y=D(J),se=A?G(Y,7,-1):V(Y,M,"$1");return se===""?void 0:se}}),f({global:!0,constructor:!0,forced:!0},{Symbol:R})}},1510:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(9297),b=i(655),w=i(5745),E=i(1296),O=w("string-to-symbol-registry"),j=w("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!E},{for:function(x){var S=b(x);if(g(O,S))return O[S];var P=m("Symbol")(S);return O[S]=P,j[P]=S,P}})},2259:(d,v,i)=>{i(511)("iterator")},2675:(d,v,i)=>{i(6761),i(1510),i(7812),i(3110),i(9773)},7812:(d,v,i)=>{var f=i(6518),m=i(9297),g=i(757),b=i(6823),w=i(5745),E=i(1296),O=w("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!E},{keyFor:function(j){if(!g(j))throw new TypeError(b(j)+" is not a symbol");if(m(O,j))return O[j]}})},5700:(d,v,i)=>{var f=i(511),m=i(8242);f("toPrimitive"),m()},8125:(d,v,i)=>{var f=i(7751),m=i(511),g=i(687);m("toStringTag"),g(f("Symbol"),"Symbol")},3500:(d,v,i)=>{var f=i(4475),m=i(7400),g=i(9296),b=i(235),w=i(6699),E=function(j){if(j&&j.forEach!==b)try{w(j,"forEach",b)}catch{j.forEach=b}};for(var O in m)m[O]&&E(f[O]&&f[O].prototype);E(g)},2953:(d,v,i)=>{var f=i(4475),m=i(7400),g=i(9296),b=i(3792),w=i(6699),E=i(687),O=i(8227)("iterator"),j=b.values,x=function(P,L){if(P){if(P[O]!==j)try{w(P,O,j)}catch{P[O]=j}if(E(P,L,!0),m[L]){for(var C in b)if(P[C]!==b[C])try{w(P,C,b[C])}catch{P[C]=b[C]}}}};for(var S in m)x(f[S]&&f[S].prototype,S);x(g,"DOMTokenList")},5575:(d,v,i)=>{var f=i(6518),m=i(4475),g=i(9472)(m.setInterval,!0);f({global:!0,bind:!0,forced:m.setInterval!==g},{setInterval:g})},4599:(d,v,i)=>{var f=i(6518),m=i(4475),g=i(9472)(m.setTimeout,!0);f({global:!0,bind:!0,forced:m.setTimeout!==g},{setTimeout:g})},6031:(d,v,i)=>{i(5575),i(4599)}},p={};function y(d){var v=p[d];if(v!==void 0)return v.exports;var i=p[d]={exports:{}};return h[d].call(i.exports,i,i.exports,y),i.exports}y.d=(d,v)=>{for(var i in v)y.o(v,i)&&!y.o(d,i)&&Object.defineProperty(d,i,{enumerable:!0,get:v[i]})},y.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),y.o=(d,v)=>Object.prototype.hasOwnProperty.call(d,v),y.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})};var _={};return(()=>{y.r(_),y.d(_,{JSONEditor:()=>Sn}),y(2675),y(9463),y(6412),y(2259),y(5700),y(8125),y(8706),y(113),y(1629),y(3418),y(4346),y(3792),y(2712),y(4490),y(4782),y(739),y(9572),y(3288),y(2010),y(4731),y(479),y(2892),y(9085),y(9904),y(4185),y(875),y(9432),y(287),y(6099),y(6034),y(3362),y(7495),y(8781),y(7764),y(3500),y(2953),y(5506),y(4864),y(5440),y(4423);var d=["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"],v=[function(l){return l.type==="string"&&l.format==="color"&&"colorpicker"},function(l){return l.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(l.format)&&"ip"},function(l){return l.type==="string"&&d.includes(l.format)&&"ace"},function(l){return l.type==="string"&&["xhtml","bbcode"].includes(l.format)&&"sceditor"},function(l){return l.type==="string"&&l.format==="markdown"&&"simplemde"},function(l){return l.type==="string"&&l.format==="jodit"&&"jodit"},function(l){return l.type==="string"&&l.format==="autocomplete"&&"autocomplete"},function(l){return l.type==="string"&&l.format==="uuid"&&"uuid"},function(l){return l.format==="info"&&"info"},function(l){return l.format==="button"&&"button"},function(l){if((l.type==="integer"||l.type==="number")&&l.format==="stepper")return"stepper"},function(l){if(l.links){for(var r=0;r<l.links.length;r++)if(l.links[r].rel&&l.links[r].rel.toLowerCase()==="describedby")return"describedBy"}},function(l){return["string","integer"].includes(l.type)&&["starrating","rating"].includes(l.format)&&"starrating"},function(l){return["string","integer"].includes(l.type)&&["date","time","datetime-local"].includes(l.format)&&"datetime"},function(l){var r,n;return(l.oneOf||l.anyOf)&&((r=(n=l.options)===null||n===void 0?void 0:n.switcher)===null||r===void 0||r)===!0&&"multiple"},function(l){return l.if&&"multiple"},function(l,r){if(l.items&&(l.items=r.expandSchema(l.items)),l.type==="array"&&l.items&&!Array.isArray(l.items)&&["string","number","integer"].includes(l.items.type)){if(l.format==="choices")return"arrayChoices";if(l.uniqueItems){if(l.format==="selectize")return"arraySelectize";if(l.format==="select2")return"arraySelect2";if(l.items.enum)return"multiselect"}}},function(l){if(l.enum){if(l.type==="array"||l.type==="object")return"enum";if(l.type==="number"||l.type==="integer"||l.type==="string")return l.format==="radio"?"radio":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"}},function(l){if(l.enumSource)return l.format==="radio"?"radio":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"},function(l){return l.type==="array"&&l.format==="table"&&"table"},function(l){return l.type==="string"&&l.format==="url"&&window.FileReader&&l.options&&l.options.upload===Object(l.options.upload)&&"upload"},function(l){return l.type==="string"&&l.media&&l.media.binaryEncoding==="base64"&&"base64"},function(l){return l.type==="any"&&"multiple"},function(l){if(l.type==="boolean")return l.format==="checkbox"||l.options&&l.options.checkbox?"checkbox":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"},function(l){return l.type==="string"&&l.format==="signature"&&"signature"},function(l){return typeof l.type=="string"&&["string","number","integer","boolean","null","array","object"].includes(l.type)&&l.type},function(l){return!l.type&&l.properties&&"object"},function(l){return typeof l.type!="string"&&"multiple"},function(l){return typeof l.type=="string"&&"string"}];function i(l,r,n){var c;return c=(function(e,t){if(f(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var u=s.call(e,"string");if(f(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)})(r),(r=f(c)=="symbol"?c:c+"")in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function f(l){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(l)}function m(l){return!(l===null||f(l)!=="object"||l.nodeType||l===l.window||l.constructor&&!O(l.constructor.prototype,"isPrototypeOf"))}function g(l){return m(l)?b({},l):Array.isArray(l)?l.map(g):l}function b(l){for(var r=arguments.length,n=new Array(r>1?r-1:0),c=1;c<r;c++)n[c-1]=arguments[c];return n.forEach((function(e){e&&Object.keys(e).forEach((function(t){e[t]&&m(e[t])?(O(l,t)||(l[t]={}),b(l[t],e[t])):Array.isArray(e[t])?l[t]=g(e[t]):l[t]=e[t]}))})),l}function w(l,r){var n=document.createEvent("HTMLEvents");n.initEvent(r,!0,!0),l.dispatchEvent(n)}function E(l){return l&&(l.toString()==="[object ShadowRoot]"?l:E(l.parentNode))}function O(l,r){return l&&Object.prototype.hasOwnProperty.call(l,r)}y(4170),y(3851),y(825),y(888),y(8598),y(1699),y(1761),y(5276),y(5086),y(1392),y(2062),y(8459),y(8940);var j=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,x=/^\s*(-|\+)?(\d+)\s*$/;function S(){var l=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(l+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(r){var n=(l+16*Math.random())%16|0;return l=Math.floor(l/16),(r==="x"?n:3&n|8).toString(16)}))}function P(l){return l&&f(l)==="object"&&!Array.isArray(l)}function L(l){for(var r=arguments.length,n=new Array(r>1?r-1:0),c=1;c<r;c++)n[c-1]=arguments[c];if(!n.length)return l;var e=n.shift();if(P(l)&&P(e))for(var t in e)P(e[t])?(l[t]||Object.assign(l,i({},t,{})),L(l[t],e[t])):Object.assign(l,i({},t,e[t]));return L.apply(void 0,[l].concat(n))}function C(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function R(l){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R(l)}function A(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,I(c.key),c)}}function I(l){var r=(function(n,c){if(R(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(R(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return R(r)=="symbol"?r:r+""}var D=(function(){return l=function n(c,e){var t,s;(function(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")})(this,n),this.defaults=e,this.jsoneditor=c.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=c.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.isUiOnly=!1,this.options=b({},this.options||{},this.schema.options||{},c.schema.options||{},c),this.enforceConstEnabled=(t=this.options.enforce_const)!==null&&t!==void 0?t:this.jsoneditor.options.enforce_const,this.formname=this.jsoneditor.options.form_name_root||"root",c.path||this.schema.id||(this.schema.id=this.formname),this.path=c.path||this.formname,this.formname=c.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=c.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,this.optInWidget=(s=this.options.opt_in_widget)!==null&&s!==void 0?s:this.jsoneditor.options.opt_in_widget,c.container&&this.setContainer(c.container),this.registerDependencies()},r=[{key:"onChildEditorChange",value:function(n,c){this.onChange(!0,!1,c)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(n){this.parent?this.parent.onChildEditorChange(this,n):this.jsoneditor&&this.jsoneditor.onChange(n)}},{key:"onChange",value:function(n,c,e){this.notify(),c||this.watch_listener&&this.watch_listener(),n&&this.change(e)}},{key:"register",value:function(){if(this.jsoneditor.registerEditor(this),this.input&&!this.label){var n=this.getTitle()||this.formname;this.input.setAttribute("aria-label",n)}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 n=this;this.dependenciesFulfilled=!0;var c=this.options.dependencies;c&&Object.keys(c).forEach((function(e){var t;e.startsWith(n.jsoneditor.root.path)?t=e:((t=n.path.split("."))[t.length-1]=e,t=t.join(".")),n.jsoneditor.watch(t,(function(){n.evaluateDependencies()}))}))}},{key:"evaluateDependencies",value:function(){var n=this,c=this.container||this.control;if(c&&this.jsoneditor!==null){var e=this.options.dependencies;if(e){var t=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(e).forEach((function(u){var k;u.startsWith(n.jsoneditor.root.path)?k=u:((k=n.path.split("."))[k.length-1]=u,k=k.join("."));var T=e[u];n.checkDependency(k,T)})),this.dependenciesFulfilled!==t&&this.notify();var s=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(s="none"),c.tagName==="TD"?Object.keys(c.childNodes).forEach((function(u){return c.childNodes[u].style.display=s})):c.style.display=s}}}},{key:"checkDependency",value:function(n,c){var e=this;if(this.path!==n&&this.jsoneditor!==null){var t=this.jsoneditor.getEditor(n),s=t?t.getValue():void 0;t&&t.dependenciesFulfilled&&s?Array.isArray(c)?this.dependenciesFulfilled=c.some((function(u){if(JSON.stringify(s)===JSON.stringify(u))return!0})):R(c)==="object"?R(s)!=="object"?this.dependenciesFulfilled=c===s:Object.keys(c).some((function(u){return!!O(c,u)&&(O(s,u)&&c[u]===s[u]?void 0:(e.dependenciesFulfilled=!1,!0))})):typeof c=="string"||typeof c=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&s===c:typeof c=="boolean"&&(this.dependenciesFulfilled=c?this.dependenciesFulfilled&&(s||s.length>0):this.dependenciesFulfilled&&(!s||s.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(n){this.container=n,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(){var n,c=this;n=this.optInWidget==="switch"?this.theme.getOptInSwitch(this.formname):this.theme.getOptInCheckbox(this.formname),this.optInCheckbox=n.checkbox,this.optInContainer=n.container,this.optInCheckbox.addEventListener("click",(function(){c.isActive()?c.deactivate():c.activate()}));var e=this.jsoneditor.options.show_opt_in,t=this.parent.options.show_opt_in!==void 0,s=t&&this.parent.options.show_opt_in===!0,u=t&&this.parent.options.show_opt_in===!1;(s||!u&&e||!t&&e)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.insertBefore(this.optInContainer,this.header.firstChild),this.optInAppended=!0)}},{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(),this.options.titleHidden&&(this.theme.visuallyHidden(this.label),this.theme.visuallyHidden(this.header)),this.enforceConstEnabled&&this.schema.const&&this.disable()}},{key:"setupWatchListeners",value:function(){var n=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){n.refreshWatchedFieldValues()&&n.onWatchedFieldChange()},O(this.schema,"watch")){var c,e,t,s,u,k=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(T){if(c=n.schema.watch[T],Array.isArray(c)){if(c.length<2)return;e=[c[0]].concat(c[1].split("."))}else e=c.split("."),n.theme.closest(n.container,'[data-schemaid="'.concat(e[0],'"]'))||e.unshift("#");if((t=e.shift())==="#"&&(t=n.jsoneditor.schema.id||n.jsoneditor.root.formname),!(s=n.theme.closest(n.container,'[data-schemaid="'.concat(t,'"]'))))throw new Error("Could not find ancestor node with id ".concat(t));u="".concat(s.getAttribute("data-schemapath"),".").concat(e.join(".")),k.startsWith(u)&&(n.watchLoop=!0),n.jsoneditor.watch(u,n.watch_listener),n.watched[T]=u}))}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 n=0;n<this.schema.links.length;n++)this.addLink(this.getLink(this.schema.links[n]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(n,c,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],s="json-editor-btn-".concat(c);c=this.iconlib?this.iconlib.getIcon(c):null,n=this.translate(n,t),e=this.translate(e,t),!c&&e&&(n=e,e=null);var u=this.theme.getButton(n,c,e);return u.classList.add(s),u}},{key:"setButtonText",value:function(n,c,e,t){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return e=this.iconlib?this.iconlib.getIcon(e):null,c=this.translate(c,s),t=this.translate(t,s),!e&&t&&(c=t,t=null),this.theme.setButtonText(n,c,e,t)}},{key:"addLink",value:function(n){this.link_holder&&this.link_holder.appendChild(n)}},{key:"getLink",value:function(n){var c,e,t=(n.mediaType||"application/javascript").split("/")[0],s=this.jsoneditor.compileTemplate(n.href,this.template_engine),u=this.jsoneditor.compileTemplate(n.rel?n.rel:n.href,this.template_engine),k=null;if(n.download&&(k=n.download),k&&k!==!0&&(k=this.jsoneditor.compileTemplate(k,this.template_engine)),t==="image"){c=this.theme.getBlockLinkHolder(),(e=document.createElement("a")).setAttribute("target","_blank");var T=document.createElement("img");this.theme.createImageLink(c,e,T),this.link_watchers.push((function(B){var q=s(B),Q=u(B);e.setAttribute("href",q),e.setAttribute("title",Q||q),T.setAttribute("src",q)}))}else if(["audio","video"].includes(t)){c=this.theme.getBlockLinkHolder(),(e=this.theme.getBlockLink()).setAttribute("target","_blank");var N=document.createElement(t);N.setAttribute("controls","controls"),this.theme.createMediaLink(c,e,N),this.link_watchers.push((function(B){var q=s(B),Q=u(B);e.setAttribute("href",q),e.textContent=Q||q,N.setAttribute("src",q)}))}else e=c=this.theme.getBlockLink(),c.setAttribute("target","_blank"),c.textContent=n.rel,c.style.display="none",this.link_watchers.push((function(B){var q=s(B),Q=u(B);q&&(c.style.display=""),c.setAttribute("href",q),c.textContent=Q||q}));return k&&e&&(k===!0?e.setAttribute("download",""):this.link_watchers.push((function(B){e.setAttribute("download",k(B))}))),n.class&&n.class.split(" ").forEach((function(B){e.classList.add(B)})),c}},{key:"refreshWatchedFieldValues",value:function(){var n=this;if(this.watched_values){var c={},e=!1;return this.watched&&Object.keys(this.watched).forEach((function(t){var s=n.jsoneditor.getEditor(n.watched[t]),u=s?s.getValue():null;n.watched_values[t]!==u&&(e=!0),c[t]=u})),c.self=this.getValue(),this.watched_values.self!==c.self&&(e=!0),this.watched_values=c,e}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var n=this.getHeaderText();if(this.header.children.length){for(var c=0;c<this.header.childNodes.length;c++)if(this.header.childNodes[c].nodeType===3){this.header.childNodes[c].nodeValue=this.cleanText(n);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(n):this.header.textContent=this.cleanText(n)}}},{key:"getHeaderText",value:function(n){return this.header_text?this.header_text:n?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(n){var c=document.createElement("div");return c.innerHTML=n,c.textContent||c.innerText}},{key:"onWatchedFieldChange",value:function(){var n,c=this;if(this.header_template){n=b(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()}),this.editors&&Object.keys(this.editors).length&&(n.properties={},Object.keys(this.editors).forEach((function(s){var u=c.editors[s];if(u.schema&&u.schema.enum&&u.schema.options&&u.schema.options.enum_titles){var k=u.schema.enum.indexOf(u.value),T=u.options.enum_titles[k];n.properties[s]={enumTitle:T}}})));var e=this.header_template(n);e!==this.header_text&&(this.header_text=e,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){n=this.getWatchedFieldValues();for(var t=0;t<this.link_watchers.length;t++)this.link_watchers[t](n)}}},{key:"setValue",value:function(n){n=this.applyConstFilter(n),this.value=n}},{key:"applyConstFilter",value:function(n){return this.enforceConstEnabled&&this.schema.const!==void 0&&(n=this.schema.const),n}},{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 n=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach((function(c){return n.jsoneditor.unwatch(c,n.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.enforceConstEnabled&&this.schema.const)return this.schema.const;if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var n=this.schema.type||this.schema.oneOf;if(n&&Array.isArray(n)&&(n=n[0]),n&&R(n)==="object"&&(n=n.type),n&&Array.isArray(n)&&(n=n[0]),typeof n=="string"){if(n==="number")return this.isDefaultRequired()?0:void 0;if(n==="boolean")return!this.isDefaultRequired()&&void 0;if(n==="integer")return this.isDefaultRequired()?0:void 0;if(n==="string")return this.isDefaultRequired()?"":void 0;if(n==="null")return null;if(n==="object")return{};if(n==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key||this.formname)}},{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(n){var c=[],e={};n.forEach((function(s){s.title&&(e[s.title]=e[s.title]||0,e[s.title]++),s.description&&(e[s.description]=e[s.description]||0,e[s.description]++),s.format&&(e[s.format]=e[s.format]||0,e[s.format]++),s.type&&(e[s.type]=e[s.type]||0,e[s.type]++)})),n.forEach((function(s){var u;u=typeof s=="string"?s:s.title&&e[s.title]<=1?s.title:s.format&&e[s.format]<=1?s.format:s.type&&e[s.type]<=1?s.type:s.description&&e[s.description]<=1?s.description:s.title?s.title:s.format?s.format:s.type?s.type:s.description?s.description:JSON.stringify(s).length<500?JSON.stringify(s):"type",c.push(u)}));var t={};return c.forEach((function(s,u){t[s]=t[s]||0,t[s]++,e[s]>1&&(c[u]="".concat(s," ").concat(t[s]))})),c}},{key:"getValidId",value:function(n){return(n=n===void 0?"":n.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(n,c){if(this.schema.options&&this.schema.options.inputAttributes){var e=this.schema.options.inputAttributes,t=["name","type"].concat(n),s=c||this.input;Object.keys(e).forEach((function(u){t.includes(u.toLowerCase())||s.setAttribute(u,e[u])}))}}},{key:"setContainerAttributes",value:function(){var n=this;if(this.schema.options&&this.schema.options.containerAttributes){var c=this.schema.options.containerAttributes,e=["data-schemapath","data-schematype","data-schemaid"];Object.keys(c).forEach((function(t){e.includes(t.toLowerCase())||n.container.setAttribute(t,c[t])}))}}},{key:"expandCallbacks",value:function(n,c){var e=this,t=this.defaults.callbacks[n];return Object.entries(c).forEach((function(s){var u,k,T=(k=2,(function(q){if(Array.isArray(q))return q})(u=s)||(function(q,Q){var X=q==null?null:typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(X!=null){var le,ye,xe,Pe,Be=[],Ke=!0,tt=!1;try{if(xe=(X=X.call(q)).next,Q===0){if(Object(X)!==X)return;Ke=!1}else for(;!(Ke=(le=xe.call(X)).done)&&(Be.push(le.value),Be.length!==Q);Ke=!0);}catch(we){tt=!0,ye=we}finally{try{if(!Ke&&X.return!=null&&(Pe=X.return(),Object(Pe)!==Pe))return}finally{if(tt)throw ye}}return Be}})(u,k)||(function(q,Q){if(q){if(typeof q=="string")return C(q,Q);var X=Object.prototype.toString.call(q).slice(8,-1);return X==="Object"&&q.constructor&&(X=q.constructor.name),X==="Map"||X==="Set"?Array.from(q):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?C(q,Q):void 0}})(u,k)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),N=T[0],B=T[1];B===Object(B)?c[N]=e.expandCallbacks(n,B):typeof B=="string"&&R(t)==="object"&&typeof t[B]=="function"&&(c[N]=t[B].bind(null,e))})),c}},{key:"showValidationErrors",value:function(n){}}],r&&A(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function M(l){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},M(l)}function V(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,G(c.key),c)}}function G(l){var r=(function(n,c){if(M(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(M(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return M(r)=="symbol"?r:r+""}function J(l,r,n){return r=ue(r),(function(c,e){if(e&&(M(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Y()?Reflect.construct(r,n||[],ue(l).constructor):r.apply(l,n))}function Y(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Y=function(){return!!l})()}function se(){return se=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ue(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},se.apply(this,arguments)}function ue(l){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ue(l)}function he(l,r){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},he(l,r)}var de=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),J(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){se(ue(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){se(ue(r.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(e,t,s){if(e=this.applyConstFilter(e),(!this.template||s)&&(this.shouldBeUnset()||e!=null?M(e)==="object"?e=JSON.stringify(e):this.shouldBeUnset()||typeof e=="string"||(e="".concat(e)):e="",e!==this.serialized)){var u=this.sanitize(e);if(this.input.value!==u){if(this.setValueToInputField(u),this.format==="range"){var k=this.control.querySelector("output");k&&(k.value=u)}var T=s||this.getValue()!==e;return this.refreshValue(),t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),T&&this.onChange(!0,s),{changed:T,value:u}}}}},{key:"setValueToInputField",value:function(e){this.input.value=e===void 0?"":e}},{key:"getNumColumns",value:function(){var e,t=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return e=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(t,e))}},{key:"build",value:function(){var e,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 s=this.schema.minimum||0,u=this.schema.maximum||Math.max(100,s+1),k=1;this.schema.multipleOf&&(s%this.schema.multipleOf&&(s=Math.ceil(s/this.schema.multipleOf)*this.schema.multipleOf),u%this.schema.multipleOf&&(u=Math.floor(u/this.schema.multipleOf)*this.schema.multipleOf),k=this.schema.multipleOf),this.input=this.theme.getRangeInput(s,u,k,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);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(Q){if(Q.preventDefault(),Q.stopPropagation(),t.schema.template)Q.currentTarget.value=t.value;else{var X=Q.currentTarget.value,le=t.sanitize(X);X!==le&&(Q.currentTarget.value=le),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(Q){if(Q){var X,le=Q.offsetHeight;if(Q.offsetHeight<Q.scrollHeight)for(X=0;Q.offsetHeight<Q.scrollHeight+3&&!(X>100);)X++,le++,Q.style.height="".concat(le,"px");else{for(X=0;Q.offsetHeight>=Q.scrollHeight+3&&!(X>100);)X++,le--,Q.style.height="".concat(le,"px");Q.style.height="".concat(le+1,"px")}}},this.input.addEventListener("keyup",(function(Q){t.adjust_height(Q.currentTarget)})),this.input.addEventListener("change",(function(Q){t.adjust_height(Q.currentTarget)})),this.adjust_height());var T=(e=this.options.prompt_paste_max_length_reached)!==null&&e!==void 0?e:this.jsoneditor.options.prompt_paste_max_length_reached,N=this.schema.maxLength!==void 0;T&&N&&this.input.addEventListener("paste",(function(Q){(Q.clipboardData||window.clipboardData).getData("text").length+t.input.value.length>t.schema.maxLength&&alert(t.translate("paste_max_length_reached",[t.schema.maxLength]))})),this.format&&this.input.setAttribute("data-schemaformat",this.format);var B=this.input;if(this.format==="range"&&(B=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,B,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 q=this.expandCallbacks("template",{template:this.schema.template});typeof q.template=="function"?this.template=q.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(e){var t=this.expandCallbacks("cleave",b({},this.defaults.options.cleave||{},this.options.cleave||{}));M(t)==="object"&&Object.keys(t).length>0&&(this.cleave_instance=new window.Cleave(e,t))}},{key:"setupImask",value:function(e){var t=this.expandCallbacks("imask",b({},this.defaults.options.imask||{},this.options.imask||{}));M(t)==="object"&&Object.keys(t).length>0&&(this.imask_instance=window.IMask(e,this.ajustIMaskOptions(t)))}},{key:"ajustIMaskOptions",value:function(e){var t=this;return Object.keys(e).forEach((function(s){if(e[s]===Object(e[s]))e[s]=t.ajustIMaskOptions(e[s]);else if(s==="mask")if(e[s].substr(0,6)==="regex:"){var u=e[s].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(u!==null)try{e[s]=new RegExp(u[1],u[2])}catch{}}else e[s]=t.getGlobalPropertyFromString(e[s])})),e}},{key:"getGlobalPropertyFromString",value:function(e){if(e.includes(".")){var t=e.split("."),s=t[0],u=t[1];if(window[s]!==void 0&&window[s][u]!==void 0)return window[s][u]}else if(window[e]!==void 0)return window[e];return e}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var e=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||e)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:se(ue(r.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,se(ue(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,se(ue(r.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),se(ue(r.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(e){return e}},{key:"onWatchedFieldChange",value:function(){var e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),se(ue(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=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 s=e.reduce((function(u,k){return k.path===t.path&&u.push(k.message),u}),[]);s.length?this.theme.addInputError(this.input,"".concat(s.join(". "),".")):this.theme.removeInputError(this.input)}}])&&V(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function be(l){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},be(l)}function ie(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,H(c.key),c)}}function H(l){var r=(function(n,c){if(be(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(be(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return be(r)=="symbol"?r:r+""}function te(l,r,n){return r=F(r),(function(c,e){if(e&&(be(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,z()?Reflect.construct(r,n||[],F(l).constructor):r.apply(l,n))}function z(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(z=function(){return!!l})()}function $(){return $=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=F(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},$.apply(this,arguments)}function F(l){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(l)}function ee(l,r){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ee(l,r)}var ge=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),te(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=$(F(r.prototype),"setValue",this).call(this,e,t,s);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",$(F(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;if(window.ace){var s=this.input_type;s!=="cpp"&&s!=="c++"&&s!=="c"||(s="c_cpp"),e=this.expandCallbacks("ace",b({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(s)})),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,e),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(){t.input.value=t.ace_editor_instance.getValue(),t.refreshValue(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)}else $(F(r.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),$(F(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),$(F(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),$(F(r.prototype),"destroy",this).call(this)}}])&&ie(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function _e(l){return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_e(l)}function je(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,ve(c.key),c)}}function ve(l){var r=(function(n,c){if(_e(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(_e(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return _e(r)=="symbol"?r:r+""}function U(l,r,n){return r=ce(r),(function(c,e){if(e&&(_e(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,W()?Reflect.construct(r,n||[],ce(l).constructor):r.apply(l,n))}function W(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(W=function(){return!!l})()}function ne(){return ne=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ce(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ne.apply(this,arguments)}function ce(l){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ce(l)}function pe(l,r){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},pe(l,r)}y(2008),y(4554);var Oe=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),U(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pe(e,t)})(r,l),n=r,c=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"register",value:function(){ne(ce(r.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){ne(ce(r.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach((function(e){return e.unregister()}))}},{key:"getNumColumns",value:function(){var e=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,e.width+2),4):e.width}},{key:"enable",value:function(){var e=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach((function(t){t.enable(),e.setAvailability(t,!1)})),ne(ce(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){var t=this;e&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach((function(s){s.disable(e),t.setAvailability(s,!0)})),ne(ce(r.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(e,t){e.add_row_button&&(e.add_row_button.disabled=t),e.remove_all_rows_button&&(e.remove_all_rows_button.disabled=t),e.delete_last_row_button&&(e.delete_last_row_button.disabled=t),e.copy_button&&(e.copy_button.disabled=t),e.delete_button&&(e.delete_button.disabled=t),e.moveup_button&&(e.moveup_button.disabled=t),e.movedown_button&&(e.movedown_button.disabled=t)}},{key:"preBuild",value:function(){ne(ce(r.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("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()}},{key:"postBuild",value:function(){ne(ce(r.prototype),"postBuild",this).call(this),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),this.refreshTabs(!0),this.is_dirty=!0,ne(ce(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var e=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(e.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(e){return Array.isArray(this.schema.items)?e>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?b({},this.schema.additionalItems):void 0:b({},this.schema.items[e]):this.schema.items?b({},this.schema.items):{}}},{key:"getItemInfo",value:function(e){var t=this.getItemSchema(e);this.item_info=this.item_info||{};var s=JSON.stringify(t);return this.item_info[s]!==void 0||(t=this.jsoneditor.expandRefs(t),this.item_info[s]={title:this.translateProperty(t.title)||this.translate("default_array_item_title"),default:t.default,width:12,child_editors:t.properties||t.items}),this.item_info[s]}},{key:"getElementEditor",value:function(e){var t=this.getItemInfo(e),s=this.getItemSchema(e);(s=this.jsoneditor.expandRefs(s)).title="".concat(t.title," ").concat(e+1);var u,k=this.jsoneditor.getEditorClass(s);this.tabs_holder?(u=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(e):u=t.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(u);var T=this.jsoneditor.createEditor(k,{jsoneditor:this.jsoneditor,schema:s,container:u,path:"".concat(this.path,".").concat(e),parent:this,required:!0});return T.preBuild(),T.build(),T.postBuild(),T.title_controls||(T.array_controls=this.theme.getButtonHolder(),u.appendChild(T.array_controls)),T}},{key:"checkParent",value:function(e){return e&&e.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,ne(ce(r.prototype),"destroy",this).call(this)}},{key:"empty",value:function(e){var t=this;if(this.rows!==null){if(this.rows.forEach((function(u,k){e&&(t.checkParent(u.tab)&&u.tab.parentNode.removeChild(u.tab),t.destroyRow(u,!0),t.row_cache[k]=null),t.rows[k]=null})),e)for(var s=this.rows.length;s<this.row_cache.length;s++)this.destroyRow(this.row_cache[s],!0),this.row_cache[s]=null;this.rows=[],e&&(this.row_cache=[])}}},{key:"destroyRow",value:function(e,t){var s=e.container;t?(e.destroy(),s.parentNode&&s.parentNode.removeChild(s),this.checkParent(e.tab)&&e.tab.parentNode.removeChild(e.tab)):(e.tab&&(e.tab.style.display="none"),s.style.display="none",e.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(e){var t=this;this.rows.forEach((function(s){s.tab&&(e?s.tab_text.textContent=s.getHeaderText():s.tab===t.active_tab?t.theme.markTabActive(s):t.theme.markTabInactive(s))}))}},{key:"ensureArraySize",value:function(e){if(Array.isArray(e)||(e=[e]),this.schema.minItems)for(;e.length<this.schema.minItems;)e.push(this.getItemInfo(e.length).default);return this.getMax()&&e.length>this.getMax()&&(e=e.slice(0,this.getMax())),e}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){t.forEach((function(N,B){if(e.rows[B])e.rows[B].setValue(N,s);else if(e.row_cache[B])e.rows[B]=e.row_cache[B],e.rows[B].setValue(N,s),e.rows[B].container.style.display="",e.rows[B].tab&&(e.rows[B].tab.style.display=""),e.rows[B].register(),e.jsoneditor.trigger("addRow",e.rows[B]);else{var q=e.addRow(N,s);e.jsoneditor.trigger("addRow",q)}}));for(var u=t.length;u<this.rows.length;u++)this.destroyRow(this.rows[u]),this.rows[u]=null;this.rows=this.rows.slice(0,t.length);var k=this.rows.find((function(N){return N.tab===e.active_tab})),T=k!==void 0?k.tab:null;!T&&this.rows.length&&(T=this.rows[0].tab),this.active_tab=T,this.refreshValue(s),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}else s&&this.refreshValue(s)}},{key:"setButtonState",value:function(e,t){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:e.style.display=t?"":"none";break;case 2:e.disabled=!t}}},{key:"setupButtons",value:function(e){var t=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var s=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,s),t.push(s)}else{var u=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,u),t.push(u);var k=!(e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,k),t.push(k)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var T=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,T),t.push(T),t.some((function(N){return N}))}},{key:"refreshValue",value:function(e){var t=this,s=this.value?this.value.length:0;if(this.value=this.rows.map((function(k){return k.getValue()})),s!==this.value.length||e){var u=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(k,T){if(k.movedown_button){var N=T!==t.rows.length-1;t.setButtonState(k.movedown_button,N)}k.delete_button&&t.setButtonState(k.delete_button,!u),t.value[T]=k.getValue()})),this.setupButtons(u)&&!this.collapsed?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(e,t){var s=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(T){s.active_tab=s.rows[u].tab,s.refreshTabs(),T.preventDefault(),T.stopPropagation()})),this._supportDragDrop(this.rows[u].tab)):this._supportDragDrop(this.rows[u].container,!0);var k=this.rows[u].title_controls||this.rows[u].array_controls;return this.hide_delete_buttons||(this.rows[u].delete_button=this._createDeleteButton(u,k)),this.show_copy_button&&(this.rows[u].copy_button=this._createCopyButton(u,k)),u&&!this.hide_move_buttons&&(this.rows[u].moveup_button=this._createMoveUpButton(u,k)),this.hide_move_buttons||(this.rows[u].movedown_button=this._createMoveDownButton(u,k)),e!==void 0&&this.rows[u].setValue(e,t),this.refreshTabs(),this.rows[u]}},{key:"_createDeleteButton",value:function(e,t){var s=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",e),u.addEventListener("click",(function(k){if(k.preventDefault(),k.stopPropagation(),!s.askConfirmation())return!1;var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue().filter((function(Q,X){return X!==T})),B=null,q=s.rows[T].getValue();s.setValue(N),s.rows[T]?B=s.rows[T].tab:s.rows[T-1]&&(B=s.rows[T-1].tab),B&&(s.active_tab=B,s.refreshTabs()),s.onChange(!0),s.jsoneditor.trigger("deleteRow",q)})),t&&t.appendChild(u),u}},{key:"_createCopyButton",value:function(e,t){var s=this,u=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),k=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(T){var N=s.getValue();T.preventDefault(),T.stopPropagation();var B=1*T.currentTarget.getAttribute("data-i");N.forEach((function(q,Q){if(Q===B){if(k.items.type==="string"&&k.items.format==="uuid")q=S();else if(k.items.type==="object"&&k.items.properties)for(var X=0,le=Object.keys(q);X<le.length;X++){var ye=le[X];k.items.properties&&k.items.properties[ye]&&k.items.properties[ye].format==="uuid"&&(q[ye]=S())}N.push(q)}})),s.setValue(N),s.refreshValue(!0),s.onChange(!0),s.jsoneditor.trigger("copyRow",s.rows[B-1])})),t.appendChild(u),u}},{key:"_createMoveUpButton",value:function(e,t){var s=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",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i");if(!(T<=0)){var N=s.getValue(),B=N[T-1];N[T-1]=N[T],N[T]=B,s.setValue(N),s.active_tab=s.rows[T-1].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T-1])}})),t&&t.appendChild(u),u}},{key:"_createMoveDownButton",value:function(e,t){var s=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",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue();if(!(T>=N.length-1)){var B=N[T+1];N[T+1]=N[T],N[T]=B,s.setValue(N),s.active_tab=s.rows[T+1].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T+1])}})),t&&t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e,t){var s=this;$e(e,(function(u,k){var T=s.getValue(),N=T[u];T.splice(u,1),T.splice(k,0,N),s.setValue(T),s.active_tab=s.rows[k].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[k])}),{useTrigger:t})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&w(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 e=this,t=this.getButton("","collapse","button_collapse");t.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(t,this.title.childNodes[0]);var s=this.row_holder.style.display,u=this.controls.style.display;return t.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation(),e.panel&&e.setButtonState(e.panel,e.collapsed),e.tabs_holder&&e.setButtonState(e.tabs_holder,e.collapsed),e.collapsed?(e.collapsed=!1,e.row_holder.style.display=s,e.controls.style.display=u,e.setButtonText(k.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.row_holder.style.display="none",e.controls.style.display="none",e.setButtonText(k.currentTarget,"","expand","button_expand"))})),t}},{key:"_createAddRowButton",value:function(){var e=this,t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",(function(s){s.preventDefault(),s.stopPropagation();var u,k=e.rows.length;e.row_cache[k]?(u=e.rows[k]=e.row_cache[k],e.rows[k].setValue(e.rows[k].getDefault(),!0),typeof e.rows[k].deactivateNonRequiredProperties=="function"&&e.rows[k].deactivateNonRequiredProperties(!0),e.rows[k].container.style.display="",e.rows[k].tab&&(e.rows[k].tab.style.display=""),e.rows[k].register()):u=e.addRow(),e.active_tab=e.rows[k].tab,e.refreshTabs(),e.refreshValue(),e.onChange(!0),e.jsoneditor.trigger("addRow",u)})),this.controls.appendChild(t),t}},{key:"_createDeleteLastRowButton",value:function(){var e=this,t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue(),k=null,T=u.pop();e.setValue(u),e.rows[e.rows.length-1]&&(k=e.rows[e.rows.length-1].tab),k&&(e.active_tab=k,e.refreshTabs()),e.onChange(!0),e.jsoneditor.trigger("deleteRow",T)})),this.controls.appendChild(t),t}},{key:"_createRemoveAllRowsButton",value:function(){var e=this,t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue();e.empty(!0),e.setValue([]),e.onChange(!0),e.jsoneditor.trigger("deleteAllRows",u)})),this.controls.appendChild(t),t}},{key:"showValidationErrors",value:function(e){var t=this,s=[],u=[];e.forEach((function(k){k.path===t.path?s.push(k):u.push(k)})),this.error_holder&&(s.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s.forEach((function(k){t.error_holder.appendChild(t.theme.getErrorMessage(k.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(k){return k.showValidationErrors(u)}))}}],c&&je(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function $e(l,r){(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).useTrigger?l.addEventListener("mousedown",(function(n){if(n.ctrlKey){l.draggable=!0;var c=function e(t){l.draggable=!1,document.removeEventListener("dragend",e),document.removeEventListener("mouseup",e)};document.addEventListener("dragend",c),document.addEventListener("mouseup",c)}})):l.draggable=!0,l.addEventListener("dragstart",(function(n){window.curDrag=l})),l.addEventListener("dragover",(function(n){window.curDrag===null||window.curDrag===l||window.curDrag.parentElement!==l.parentElement?n.dataTransfer.dropEffect="none":n.dataTransfer.dropEffect="move",n.preventDefault()})),l.addEventListener("drop",(function(n){if(n.preventDefault(),n.stopPropagation(),window.curDrag!==null&&window.curDrag!==l&&window.curDrag.parentElement===l.parentElement){var c=function(s){for(var u=0,k=s.parentElement.firstElementChild;k!==s&&k!==null;)k=k.nextSibling,++u;return u},e=c(window.curDrag),t=c(l);r(e,t,window.curDrag,l),window.curDrag=null}}))}function Fe(l){return Fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fe(l)}function Ze(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Ye(c.key),c)}}function Ye(l){var r=(function(n,c){if(Fe(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fe(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fe(r)=="symbol"?r:r+""}function Ae(l,r,n){return r=nt(r),(function(c,e){if(e&&(Fe(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Qe()?Reflect.construct(r,n||[],nt(l).constructor):r.apply(l,n))}function Qe(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qe=function(){return!!l})()}function De(){return De=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=nt(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},De.apply(this,arguments)}function nt(l){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nt(l)}function me(l,r){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},me(l,r)}Oe.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var Ee=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Ae(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)})(r,l),n=r,(c=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){De(nt(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){De(nt(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var e=this,t=this.getTitle().length;return Object.keys(this.select_values).forEach((function(s){return t=Math.max(t,"".concat(e.select_values[s]).length+4)})),Math.min(12,Math.max(t/7,2))}},{key:"preBuild",value:function(){var e;De(nt(r.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var t=this.jsoneditor.expandRefs(this.schema.items||{}),s=t.enum||[],u=t.options&&t.options.enum||[],k=t.options&&t.options.enum_titles||[];for(e=0;e<s.length;e++)if(this.sanitize(s[e])===s[e]){var T=u[e]||{};"title"in T||(T.title="".concat(k[e]||s[e])),this.option_keys.push("".concat(s[e])),this.option_enum.push(T),this.select_values["".concat(s[e])]=s[e]}}},{key:"build",value:function(){var e,t=this;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={},e=0;e<this.option_keys.length;e++){var s=this.formname+e.toString();this.inputs[this.option_keys[e]]=this.theme.getCheckbox(),this.inputs[this.option_keys[e]].id=s,this.select_options[this.option_keys[e]]=this.inputs[this.option_keys[e]];var u=this.theme.getCheckboxLabel(this.option_enum[e].title);if(u.htmlFor=s,this.option_enum[e].infoText){var k=this.theme.getInfoButton(this.translateProperty(this.option_enum[e].infoText));u.appendChild(k)}this.controls["_"+this.option_keys[e]]=this.theme.getFormControl(u,this.inputs[this.option_keys[e]])}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((function(T){return T.title}))),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),e=0;e<this.option_keys.length;e++)this.select_options[this.option_keys[e]]=this.input.children[e];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=function(T){var N=[];for(e=0;e<t.option_keys.length;e++)t.select_options[t.option_keys[e]]&&(t.select_options[t.option_keys[e]].selected||t.select_options[t.option_keys[e]].checked)&&N.push(t.select_values[t.option_keys[e]]);t.updateValue(N),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"postBuild",value:function(){De(nt(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(e,t){var s=this;e=(e=this.applyConstFilter(e))||[],Array.isArray(e)||(e=[e]),e=e.map((function(u){return"".concat(u)})),Object.keys(this.select_options).forEach((function(u){s.select_options[u][s.input_type==="select"?"selected":"checked"]=e.includes(u)})),this.updateValue(e),this.onChange(!0)}},{key:"removeValue",value:function(e){e=[].concat(e),this.setValue(this.getValue().filter((function(t){return!e.includes(t)})))}},{key:"addValue",value:function(e){this.setValue(this.getValue().concat(e))}},{key:"updateValue",value:function(e){for(var t=!1,s=[],u=0;u<e.length;u++)if(this.select_options["".concat(e[u])]){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}else t=!0;return this.value=s,t}},{key:"sanitize",value:function(e){return this.schema.items.type==="boolean"?!!e:this.schema.items.type==="number"?1*e||0:this.schema.items.type==="integer"?Math.floor(1*e||0):"".concat(e)}},{key:"enable",value:function(){var e=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach((function(t){return e.inputs[t].disabled=!1})),De(nt(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){var t=this;e&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach((function(s){return t.inputs[s].disabled=!0})),De(nt(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){De(nt(r.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(e){var t=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),s=e.reduce((function(u,k){return k.path.match(t)&&u.push(k.message),u}),[]);s.length?this.theme.addInputError(this.input||this.inputs,"".concat(s.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&Ze(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Se(l){return Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Se(l)}function qe(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,it(c.key),c)}}function it(l){var r=(function(n,c){if(Se(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Se(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Se(r)=="symbol"?r:r+""}function Et(l,r,n){return r=_t(r),(function(c,e){if(e&&(Se(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ct()?Reflect.construct(r,n||[],_t(l).constructor):r.apply(l,n))}function Ct(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ct=function(){return!!l})()}function Lt(){return Lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=_t(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Lt.apply(this,arguments)}function _t(l){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_t(l)}function At(l,r){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},At(l,r)}var zt=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Et(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&At(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){this.choices_instance?(e=this.applyConstFilter(e),e=[].concat(e).map((function(s){return"".concat(s)})),this.updateValue(e),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):Lt(_t(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",b({},{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=function(s){var u=e.choices_instance.getValue(!0);e.updateValue(u),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}Lt(_t(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,s=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}return this.value=s,t}},{key:"addNewOption",value:function(e){return this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.schema.items.enum.push(e),this.choices_instance.setChoices([{value:"".concat(e),label:"".concat(e)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Lt(_t(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),Lt(_t(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Lt(_t(r.prototype),"destroy",this).call(this)}}])&&qe(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ee);function $t(l){return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$t(l)}function Ei(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Bn(c.key),c)}}function Bn(l){var r=(function(n,c){if($t(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if($t(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return $t(r)=="symbol"?r:r+""}function Ie(l,r,n){return r=Je(r),(function(c,e){if(e&&($t(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ge()?Reflect.construct(r,n||[],Je(l).constructor):r.apply(l,n))}function Ge(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ge=function(){return!!l})()}function Ve(){return Ve=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Je(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ve.apply(this,arguments)}function Je(l){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Je(l)}function Ot(l,r){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ot(l,r)}var oo=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Ie(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.select2_instance?(e=[].concat(e).map((function(s){return"".concat(s)})),this.updateValue(e),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Ve(Je(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e,t=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(e=this.expandCallbacks("select2",b({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=e.tags=!!e.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=O(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var s=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(s),t.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Ve(Je(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,s=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}return this.value=s,t}},{key:"addNewOption",value:function(e){this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.schema.items.enum.push(e);var t=this.input.querySelector('option[value="'.concat(e,'"]'));return t?t.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(e,e,!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)),Ve(Je(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Ve(Je(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ve(Je(r.prototype),"destroy",this).call(this)}}])&&Ei(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ee);function He(l){return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},He(l)}function yt(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,qt(c.key),c)}}function qt(l){var r=(function(n,c){if(He(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(He(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return He(r)=="symbol"?r:r+""}function fr(l,r,n){return r=kt(r),(function(c,e){if(e&&(He(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,wt()?Reflect.construct(r,n||[],kt(l).constructor):r.apply(l,n))}function wt(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(wt=function(){return!!l})()}function ht(){return ht=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=kt(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ht.apply(this,arguments)}function kt(l){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kt(l)}function wn(l,r){return wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wn(l,r)}var fc=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),fr(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wn(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.selectize_instance?(e=[].concat(e).map((function(s){return"".concat(s)})),this.updateValue(e),this.selectize_instance.setValue(this.value),this.onChange(!0)):ht(kt(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e,t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){e=this.expandCallbacks("selectize",b({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=e.create=!!e.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(T){var N=t.selectize_instance.getValue();t.updateValue(N),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);var s=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),s.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(s,this.input);var u=this.selectize_instance.$control[0];if(u){var k=this.theme.getHiddenLabel(this.formname);k.setAttribute("for",this.formname+"-selectized"),u.appendChild(k)}}ht(kt(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,s=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}return this.value=s,t}},{key:"addNewOption",value:function(e){return this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.selectize_instance.addOption({text:e,value:e}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),ht(kt(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),ht(kt(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),ht(kt(r.prototype),"destroy",this).call(this)}}])&&yt(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ee);function Fn(l){return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fn(l)}function va(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,pc(c.key),c)}}function pc(l){var r=(function(n,c){if(Fn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fn(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fn(r)=="symbol"?r:r+""}function ba(l,r,n){return r=Yr(r),(function(c,e){if(e&&(Fn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ys()?Reflect.construct(r,n||[],Yr(l).constructor):r.apply(l,n))}function Ys(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ys=function(){return!!l})()}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Yr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Oi.apply(this,arguments)}function Yr(l){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yr(l)}function ao(l,r){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ao(l,r)}var mc=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ba(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ao(e,t)})(r,l),n=r,(c=[{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)),Oi(Yr(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var e,t=this;window.Autocomplete&&!this.autocomplete_instance&&(e=this.expandCallbacks("autocomplete",b({},{search:function(s){return console.log('No "search" callback defined for autocomplete in property "'.concat(s.key,'"')),[]},onSubmit:function(){t.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(e.baseClass),this.autocomplete_dropdown.classList.add("".concat(e.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,e)),Oi(Yr(r.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),Oi(Yr(r.prototype),"destroy",this).call(this)}}])&&va(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function Nt(l){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Nt(l)}function Wt(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,so(c.key),c)}}function so(l){var r=(function(n,c){if(Nt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Nt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Nt(r)=="symbol"?r:r+""}function yc(l,r,n){return r=Mn(r),(function(c,e){if(e&&(Nt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Gf()?Reflect.construct(r,n||[],Mn(l).constructor):r.apply(l,n))}function Gf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Gf=function(){return!!l})()}function ga(){return ga=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Mn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ga.apply(this,arguments)}function Mn(l){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mn(l)}function vc(l,r){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},vc(l,r)}var h_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),yc(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vc(e,t)})(r,l),n=r,(c=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(e){var t=this;e.addEventListener("load",(function(s){if(t.count===t.current_item_index)t.value[t.count][t.key]=s.target.result;else{var u={};for(var k in t.parent.schema.properties)u[k]="";u[t.key]=s.target.result,t.value.splice(t.count,0,u)}t.count+=1,t.count===t.total+t.current_item_index&&t.arrayEditor.setValue(t.value)}))}},{key:"build",value:function(){var e=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(s){if(s.preventDefault(),s.stopPropagation(),s.currentTarget.files&&s.currentTarget.files.length)if(s.currentTarget.files.length>1&&e.schema.options&&e.schema.options.multiple&&e.schema.options.multiple===!0&&e.parent&&e.parent.schema.type==="object"&&e.parent.parent&&e.parent.parent.schema.type==="array"){e.arrayEditor=e.jsoneditor.getEditor(e.parent.parent.path),e.value=e.arrayEditor.getValue(),e.total=s.currentTarget.files.length,e.current_item_index=parseInt(e.parent.key),e.count=e.current_item_index;for(var u=0;u<e.total;u++){var k=new FileReader;e.setFileReaderListener(k),k.readAsDataURL(s.currentTarget.files[u])}}else{var T=new FileReader;T.onload=function(N){e.value=N.target.result,e.refreshPreview(),e.onChange(!0),T=null},T.readAsDataURL(s.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 t=this.getButton("button_upload","upload","button_upload");t.addEventListener("click",(function(){e.uploader.click()})),this.control.appendChild(t),this.setInputAttributes(["multiple"],t)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var e=this.value.match(/^data:([^;,]+)[;,]/);if(e&&(e=e[1]),e){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(e,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),e.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.src=this.value,this.preview.appendChild(t)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),ga(Mn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),ga(Mn(r.prototype),"disable",this).call(this)}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(e)?this.value=this.schema.enum[0]:this.value=e,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),ga(Mn(r.prototype),"destroy",this).call(this)}}])&&Wt(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function lo(l){return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lo(l)}function f_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,p_(c.key),c)}}function p_(l){var r=(function(n,c){if(lo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(lo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return lo(r)=="symbol"?r:r+""}function m_(l,r,n){return r=Vn(r),(function(c,e){if(e&&(lo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Jf()?Reflect.construct(r,n||[],Vn(l).constructor):r.apply(l,n))}function Jf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Jf=function(){return!!l})()}function _a(){return _a=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Vn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},_a.apply(this,arguments)}function Vn(l){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vn(l)}function bc(l,r){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},bc(l,r)}var Kf=(function(l){function r(e,t){var s;return(function(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")})(this,r),(s=m_(this,r,[e,t])).active=!1,s.isUiOnly=!0,s.parent&&s.parent.schema&&(Array.isArray(s.parent.schema.required)?s.parent.schema.required.includes(s.key)||s.parent.schema.required.push(s.key):s.parent.schema.required=[s.key]),s}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){var e=this;this.options.compact=!0;var t=this.expandCallbacks("button",b({},{icon:"",validated:!1,align:"left",action:function(u,k){window.alert('No button action defined for "'.concat(u.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),s=this.translateProperty(t.text||this.schema.title)||this.key;this.input=this.getButton(s,t.icon,s),typeof t.action!="function"?window.alert('No button action defined for "'.concat(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=function(){e.jsoneditor.validate(e.jsoneditor.getValue()).length>0?e.disable():e.enable()},t.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,_a(Vn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,_a(Vn(r.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,_a(Vn(r.prototype),"destroy",this).call(this)}}])&&f_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function co(l){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},co(l)}function y_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,v_(c.key),c)}}function v_(l){var r=(function(n,c){if(co(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(co(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return co(r)=="symbol"?r:r+""}function b_(l,r,n){return r=Ar(r),(function(c,e){if(e&&(co(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Wf()?Reflect.construct(r,n||[],Ar(l).constructor):r.apply(l,n))}function Wf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Wf=function(){return!!l})()}function zn(){return zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Ar(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},zn.apply(this,arguments)}function Ar(l){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ar(l)}function gc(l,r){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},gc(l,r)}var g_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),b_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=!!(e=this.applyConstFilter(e));var s=this.getValue()!==e;this.value=e,this.input.checked=this.value,t||(this.is_dirty=!0),this.onChange(s)}},{key:"register",value:function(){zn(Ar(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){zn(Ar(r.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:"setOptInCheckbox",value:function(){zn(Ar(r.prototype),"setOptInCheckbox",this).call(this),this.optInAppended&&(this.container.insertBefore(this.optInContainer,this.container.firstChild),this.optInContainer.style.verticalAlign="top",this.control.style.marginTop="0")}},{key:"build",value:function(){var e=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.control.style.display="inline-block",(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.value=t.currentTarget.checked,e.is_dirty=!0,e.onChange(!0)})),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,zn(Ar(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,zn(Ar(r.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),zn(Ar(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,s=this.jsoneditor.options.show_errors,u=s==="change"||s==="interaction";if((s!=="never"||this.is_dirty)&&(!u||this.is_dirty)){var k=e.reduce((function(T,N){return N.path===t.path&&T.push(N.message),T}),[]);this.input.controlgroup=this.control,k.length?this.theme.addInputError(this.input,"".concat(k.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&y_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function uo(l){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uo(l)}function __(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,w_(c.key),c)}}function w_(l){var r=(function(n,c){if(uo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(uo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return uo(r)=="symbol"?r:r+""}function k_(l,r,n){return r=$r(r),(function(c,e){if(e&&(uo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Zf()?Reflect.construct(r,n||[],$r(l).constructor):r.apply(l,n))}function Zf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Zf=function(){return!!l})()}function qn(){return qn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=$r(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},qn.apply(this,arguments)}function $r(l){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$r(l)}function _c(l,r){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},_c(l,r)}y(6910);var wa=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),k_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e);var s=this.typecast(e),u=this.enum_options.length>0&&this.enum_values.includes(s),k=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;if(this.hasPlaceholderOption||u&&(!t||this.isRequired()||k)||(s=this.enum_values[0]),this.value!==s){var T=this.enum_values.indexOf(s);u&&T!==-1?this.input.value=this.enum_options[T]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=s,this.value=s,t||(this.is_dirty=!0),this.onChange(),this.change()}}},{key:"register",value:function(){qn($r(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){qn($r(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var e=this.getTitle().length,t=0;t<this.enum_options.length;t++)e=Math.max(e,this.enum_options[t].length+4);return Math.min(12,Math.max(e/7,2))}},{key:"typecast",value:function(e){return this.schema.type==="boolean"?e==="undefined"||e===void 0?void 0:!!e:this.schema.type==="number"?1*e||0:this.schema.type==="integer"?Math.floor(1*e||0):this.schema.enum&&e===void 0?void 0:"".concat(e)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var e,t,s,u,k=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.hasPlaceholderOption=((e=this.schema)===null||e===void 0||(e=e.options)===null||e===void 0?void 0:e.has_placeholder_option)||!1,this.placeholderOptionText=((t=this.schema)===null||t===void 0||(t=t.options)===null||t===void 0?void 0:t.placeholder_option_text)||" ",this.enforceConst&&this.schema.const){var T=this.schema.const;this.enum_options=["".concat(T)],this.enum_display=["".concat(this.translateProperty(T)||T)],this.enum_values=[this.typecast(T)]}else if(this.schema.enum){var N=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(B,q){k.enum_options[q]="".concat(B),k.enum_display[q]="".concat(k.translateProperty(N[q])||B),k.enum_values[q]=k.typecast(B)}))}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(s=0;s<this.schema.enumSource.length;s++)typeof this.schema.enumSource[s]=="string"?this.enumSource[s]={source:this.schema.enumSource[s]}:Array.isArray(this.schema.enumSource[s])?this.enumSource[s]=this.schema.enumSource[s]:this.enumSource[s]=b({},this.schema.enumSource[s]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(s=0;s<this.enumSource.length;s++)this.enumSource[s].value&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[s].value})).template=="function"?this.enumSource[s].value=u.template:this.enumSource[s].value=this.jsoneditor.compileTemplate(this.enumSource[s].value,this.template_engine)),this.enumSource[s].title&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[s].title})).template=="function"?this.enumSource[s].title=u.template:this.enumSource[s].title=this.jsoneditor.compileTemplate(this.enumSource[s].title,this.template_engine)),this.enumSource[s].filter&&this.enumSource[s].value&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[s].filter})).template=="function"?this.enumSource[s].filter=u.template:this.enumSource[s].filter=this.jsoneditor.compileTemplate(this.enumSource[s].filter,this.template_engine))}}},{key:"build",value:function(){var e=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.hasPlaceholderOption,this.placeholderOptionText),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.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((function(){e.input.parentNode&&e.afterInputReady()}))}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var e,t=this.typecast(this.input.value);(e=this.enum_values.includes(t)?this.enum_values[this.enum_values.indexOf(t)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=e,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var e,t,s=[],u=[];if(this.enumSource){e=this.getWatchedFieldValues();for(var k=0;k<this.enumSource.length;k++)if(Array.isArray(this.enumSource[k]))s=s.concat(this.enumSource[k]),u=u.concat(this.enumSource[k]);else{var T=[];if(T=Array.isArray(this.enumSource[k].source)?this.enumSource[k].source:e[this.enumSource[k].source]){if(this.enumSource[k].slice&&(T=Array.prototype.slice.apply(T,this.enumSource[k].slice)),this.enumSource[k].filter){var N=[];for(t=0;t<T.length;t++)this.enumSource[k].filter({i:t,item:T[t],watched:e})&&N.push(T[t]);T=N}var B=[],q=[];for(t=0;t<T.length;t++){var Q=T[t];this.enumSource[k].value?q[t]=this.typecast(this.enumSource[k].value({i:t,item:Q})):q[t]=T[t],this.enumSource[k].title?B[t]=this.enumSource[k].title({i:t,item:Q}):B[t]=q[t]}this.enumSource[k].sort&&(function(le,ye,xe){le.map((function(Pe,Be){return{v:Pe,t:ye[Be]}})).sort((function(Pe,Be){return Pe.v<Be.v?-xe:Pe.v===Be.v?0:xe})).forEach((function(Pe,Be){le[Be]=Pe.v,ye[Be]=Pe.t}))}).bind(null,q,B,this.enumSource[k].sort==="desc"?1:-1)(),s=s.concat(q),u=u.concat(B)}}var X=this.value;this.theme.setSelectOptions(this.input,s,u),this.enum_options=s,this.enum_display=u,this.enum_values=s,s.includes(X)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=X,this.value=X):(this.input.value=s[0],this.value=this.typecast(s[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}qn($r(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,qn($r(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,qn($r(r.prototype),"disable",this).call(this,e)}},{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),qn($r(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,s=this.jsoneditor.options.show_errors,u=s==="change"||s==="interaction";if((s!=="never"||this.is_dirty)&&(!u||this.is_dirty)){var k=e.reduce((function(T,N){return N.path===t.path&&T.push(N.message),T}),[]);k.length?this.theme.addInputError(this.input,"".concat(k.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&__(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function ho(l){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ho(l)}function j_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,E_(c.key),c)}}function E_(l){var r=(function(n,c){if(ho(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ho(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ho(r)=="symbol"?r:r+""}function O_(l,r,n){return r=Nr(r),(function(c,e){if(e&&(ho(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Yf()?Reflect.construct(r,n||[],Nr(l).constructor):r.apply(l,n))}function Yf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Yf=function(){return!!l})()}function Hn(){return Hn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Nr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Hn.apply(this,arguments)}function Nr(l){return Nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nr(l)}function wc(l,r){return wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wc(l,r)}var Qf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),O_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.choices_instance){var s=this.typecast(e||"");if(this.enum_values.includes(s)||(s=this.enum_values[0]),this.value===s)return;t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(s)],this.choices_instance.setChoiceByValue(this.input.value),this.value=s,this.onChange()}else Hn(Nr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",b({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,e)}Hn(Nr(r.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var e=this;if(Hn(Nr(r.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var t=this.enum_options.map((function(s,u){return{value:s,label:e.enum_display[u]}}));this.choices_instance.setChoices(t,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Hn(Nr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),Hn(Nr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Hn(Nr(r.prototype),"destroy",this).call(this)}}])&&j_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(wa);function xi(l){return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xi(l)}function x_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,S_(c.key),c)}}function S_(l){var r=(function(n,c){if(xi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(xi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return xi(r)=="symbol"?r:r+""}function C_(l,r,n){return r=Un(r),(function(c,e){if(e&&(xi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Xf()?Reflect.construct(r,n||[],Un(l).constructor):r.apply(l,n))}function Xf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xf=function(){return!!l})()}function ka(){return ka=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Un(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ka.apply(this,arguments)}function Un(l){return Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Un(l)}function kc(l,r){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},kc(l,r)}Qf.rules={".choices > *":"box-sizing:border-box"};var P_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),C_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(ka(Un(r.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&&xi(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 e=this.input;if(this.options.flatpickr.wrap===!0){var t=[];if(this.options.flatpickr.showToggleButton!==!1){var s=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");s.setAttribute("data-toggle",""),t.push(s)}if(this.options.flatpickr.showClearButton!==!1){var u=this.getButton("","clear","flatpickr_clear_button");u.setAttribute("data-clear",""),t.push(u)}var k=this.input.parentNode,T=this.input.nextSibling,N=this.theme.getInputGroup(this.input,t);N!==void 0?(this.options.flatpickr.inline=!1,k.insertBefore(N,T),e=N):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(e,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 e=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(e).getTime()/1e3)}}}},{key:"setValue",value:function(e,t,s){if(e=this.applyConstFilter(e),this.schema.type==="string")ka(Un(r.prototype),"setValue",this).call(this,e,t,s),this.flatpickr&&this.flatpickr.setDate(e);else if(e>0){var u=new Date(1e3*e),k=u.getFullYear(),T=this.zeroPad(u.getMonth()+1),N=this.zeroPad(u.getDate()),B=this.zeroPad(u.getHours()),q=this.zeroPad(u.getMinutes()),Q=this.zeroPad(u.getSeconds()),X=[k,T,N].join("-"),le=[B,q,Q].join(":"),ye="".concat(X,"T").concat(le);this.schema.format==="date"?ye=X:this.schema.format==="time"&&(ye=le),this.input.value=ye,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(ye)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,ka(Un(r.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(e){return"0".concat(e).slice(-2)}}])&&x_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function fo(l){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fo(l)}function T_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,R_(c.key),c)}}function R_(l){var r=(function(n,c){if(fo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(fo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return fo(r)=="symbol"?r:r+""}function L_(l,r,n){return r=Ir(r),(function(c,e){if(e&&(fo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,ep()?Reflect.construct(r,n||[],Ir(l).constructor):r.apply(l,n))}function ep(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ep=function(){return!!l})()}function Gn(){return Gn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Ir(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Gn.apply(this,arguments)}function Ir(l){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ir(l)}function jc(l,r){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},jc(l,r)}var A_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),L_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){if(this.editors){for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Gn(Ir(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Gn(Ir(r.prototype),"unregister",this).call(this),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].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 e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].enable();Gn(Ir(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable();Gn(Ir(r.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var e=this,t=this.getWatchedFieldValues();if(t){var s=document.location.origin+document.location.pathname+this.template(t);this.editors[this.refs[s]]||this.buildChildEditor(s),this.currentEditor=this.refs[s],this.register(),this.editors.forEach((function(u,k){u&&(e.currentEditor===k?u.container.style.display="":u.container.style.display="none")})),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(e){this.refs[e]=this.editors.length;var t=this.theme.getChildEditorHolder();this.editor_holder.appendChild(t);var s=b({},this.schema,this.jsoneditor.refs[e]),u=this.jsoneditor.getEditorClass(s,this.jsoneditor),k=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:s,container:t,path:this.path,parent:this,required:!0});this.editors.push(k),k.preBuild(),k.build(),k.postBuild()}},{key:"preBuild",value:function(){var e;for(this.refs={},this.editors=[],this.currentEditor="",e=0;e<this.schema.links.length;e++)if(this.schema.links[e].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[e].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,e).concat(this.schema.links.slice(e+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=b({},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(e,t){this.editors[this.currentEditor]&&this.refreshValue(),Gn(Ir(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(e,t),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach((function(e){e&&e.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Gn(Ir(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){this.editors.forEach((function(t){t&&t.showValidationErrors(e)}))}}])&&T_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Si(l){return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Si(l)}function tp(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function $_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,N_(c.key),c)}}function N_(l){var r=(function(n,c){if(Si(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Si(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Si(r)=="symbol"?r:r+""}function I_(l,r,n){return r=Jn(r),(function(c,e){if(e&&(Si(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,rp()?Reflect.construct(r,n||[],Jn(l).constructor):r.apply(l,n))}function rp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rp=function(){return!!l})()}function ja(){return ja=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Jn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ja.apply(this,arguments)}function Jn(l){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jn(l)}function Ec(l,r){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ec(l,r)}var D_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),I_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ec(e,t)})(r,l),n=r,(c=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var e=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.enforceConstEnabled&&this.schema.const?this.enum=[this.schema.const]:this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var t=0;t<this.enum.length;t++)this.select_options[t]=this.options.enum_titles[t]||"Value ".concat(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",(function(s){e.selected=e.select_options.indexOf(s.currentTarget.value),e.value=e.enum[e.selected],e.refreshValue(),e.onChange(!0)})),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var e=this;if(this.enum){this.selected=-1;var t=JSON.stringify(this.value);this.enum.forEach((function(s,u){if(t===JSON.stringify(s))return e.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,ja(Jn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.switcher.disabled=!0,ja(Jn(r.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(e){var t,s,u=this;if(e===null)return"<em>null</em>";if(Si(e)==="object"){var k="";return t=e,s=function(T,N){var B=u.getHTML(N);Array.isArray(e)||(B="<div><em>".concat(T,"</em>: ").concat(B,"</div>")),k+="<li>".concat(B,"</li>")},Array.isArray(t)||typeof t.length=="number"&&t.length>0&&t.length-1 in t?Array.from(t).forEach((function(T,N){return s(N,T)})):Object.entries(t).forEach((function(T){var N,B,q=(B=2,(function(le){if(Array.isArray(le))return le})(N=T)||(function(le,ye){var xe=le==null?null:typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(xe!=null){var Pe,Be,Ke,tt,we=[],Ce=!0,at=!1;try{if(Ke=(xe=xe.call(le)).next,ye===0){if(Object(xe)!==xe)return;Ce=!1}else for(;!(Ce=(Pe=Ke.call(xe)).done)&&(we.push(Pe.value),we.length!==ye);Ce=!0);}catch(vt){at=!0,Be=vt}finally{try{if(!Ce&&xe.return!=null&&(tt=xe.return(),Object(tt)!==tt))return}finally{if(at)throw Be}}return we}})(N,B)||(function(le,ye){if(le){if(typeof le=="string")return tp(le,ye);var xe=Object.prototype.toString.call(le).slice(8,-1);return xe==="Object"&&le.constructor&&(xe=le.constructor.name),xe==="Map"||xe==="Set"?Array.from(le):xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe)?tp(le,ye):void 0}})(N,B)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),Q=q[0],X=q[1];return s(Q,X)})),k=Array.isArray(e)?"<ol>".concat(k,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(k,"</ul>")}return typeof e=="boolean"?e?"true":"false":typeof e=="string"?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.value=e,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),ja(Jn(r.prototype),"destroy",this).call(this)}}])&&$_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ci(l){return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ci(l)}function B_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,F_(c.key),c)}}function F_(l){var r=(function(n,c){if(Ci(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ci(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ci(r)=="symbol"?r:r+""}function M_(l,r,n){return r=Dr(r),(function(c,e){if(e&&(Ci(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,np()?Reflect.construct(r,n||[],Dr(l).constructor):r.apply(l,n))}function np(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(np=function(){return!!l})()}function Kn(){return Kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Dr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Kn.apply(this,arguments)}function Dr(l){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dr(l)}function Oc(l,r){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Oc(l,r)}var V_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),M_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){Kn(Dr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Kn(Dr(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(e,t,s){if(e=this.applyConstFilter(e),(!this.template||s)&&(e==null?e="":Ci(e)==="object"?e=JSON.stringify(e):typeof e!="string"&&(e="".concat(e)),e!==this.serialized)){var u=this.sanitize(e);if(this.input.value!==u){this.input.value=u;var k=s||this.getValue()!==e;this.refreshValue(),t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(k)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Kn(Dr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Kn(Dr(r.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),Kn(Dr(r.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(e){return e}},{key:"onWatchedFieldChange",value:function(){var e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),Kn(Dr(r.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 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()}}])&&B_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function po(l){return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},po(l)}function z_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,q_(c.key),c)}}function q_(l){var r=(function(n,c){if(po(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(po(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return po(r)=="symbol"?r:r+""}function H_(l,r,n){return r=Qs(r),(function(c,e){if(e&&(po(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,ip()?Reflect.construct(r,n||[],Qs(l).constructor):r.apply(l,n))}function ip(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ip=function(){return!!l})()}function Qs(l){return Qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qs(l)}function xc(l,r){return xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},xc(l,r)}var U_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),H_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){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)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}},{key:"disable",value:function(){return!1}},{key:"enable",value:function(){return!1}}])&&z_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Kf);function mo(l){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mo(l)}function G_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,J_(c.key),c)}}function J_(l){var r=(function(n,c){if(mo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(mo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return mo(r)=="symbol"?r:r+""}function K_(l,r,n){return r=yo(r),(function(c,e){if(e&&(mo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,op()?Reflect.construct(r,n||[],yo(l).constructor):r.apply(l,n))}function op(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(op=function(){return!!l})()}function Sc(){return Sc=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=yo(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Sc.apply(this,arguments)}function yo(l){return yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yo(l)}function Cc(l,r){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Cc(l,r)}var ap=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),K_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(Sc(yo(r.prototype),"build",this).call(this),this.schema.minimum!==void 0){var e=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(e+=1),this.input.setAttribute("min",e)}if(this.schema.maximum!==void 0){var t=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(t-=1),this.input.setAttribute("max",t)}if(this.schema.step!==void 0){var s=this.schema.step||1;this.input.setAttribute("step",s)}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(e){if(e==null)return!1;var t=e.match(j),s=parseFloat(e);return t!==null&&!isNaN(s)&&isFinite(s)})(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&G_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function vo(l){return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vo(l)}function W_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Z_(c.key),c)}}function Z_(l){var r=(function(n,c){if(vo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(vo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return vo(r)=="symbol"?r:r+""}function Y_(l,r,n){return r=Xs(r),(function(c,e){if(e&&(vo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,sp()?Reflect.construct(r,n||[],Xs(l).constructor):r.apply(l,n))}function sp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(sp=function(){return!!l})()}function Xs(l){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(l)}function Pc(l,r){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Pc(l,r)}var lp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Y_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pc(e,t)})(r,l),n=r,(c=[{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(e){if(e==null)return!1;var t=e.match(x),s=parseInt(e);return t!==null&&!isNaN(s)&&isFinite(s)})(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&W_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ap);function bo(l){return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bo(l)}function Q_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,X_(c.key),c)}}function X_(l){var r=(function(n,c){if(bo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(bo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return bo(r)=="symbol"?r:r+""}function e0(l,r,n){return r=go(r),(function(c,e){if(e&&(bo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,cp()?Reflect.construct(r,n||[],go(l).constructor):r.apply(l,n))}function cp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(cp=function(){return!!l})()}function Tc(){return Tc=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=go(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Tc.apply(this,arguments)}function go(l){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},go(l)}function Rc(l,r){return Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Rc(l,r)}var t0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),e0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){if(Tc(go(r.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=b(this.options,this.schema.options||{})}}])&&Q_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function _o(l){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_o(l)}function r0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,n0(c.key),c)}}function n0(l){var r=(function(n,c){if(_o(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(_o(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return _o(r)=="symbol"?r:r+""}function i0(l,r,n){return r=Br(r),(function(c,e){if(e&&(_o(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,up()?Reflect.construct(r,n||[],Br(l).constructor):r.apply(l,n))}function up(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(up=function(){return!!l})()}function Wn(){return Wn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Br(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Wn.apply(this,arguments)}function Br(l){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Br(l)}function Lc(l,r){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Lc(l,r)}var o0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),i0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Wn(Br(r.prototype),"setValue",this).call(this,e,t,s);u!==void 0&&u.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(u.value)}},{key:"build",value:function(){this.options.format="textarea",Wn(Br(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;window.Jodit?(e=this.expandCallbacks("jodit",b({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",(function(){t.value=t.jodit_instance.getEditorValue(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)):Wn(Br(r.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),Wn(Br(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Wn(Br(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Wn(Br(r.prototype),"destroy",this).call(this)}}])&&r0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function a0(l,r,n,c){try{switch(l.format){case"ipv4":(function(e){var t=e.split(".");if(t.length!==4)throw new Error("error_ipv4");t.forEach((function(s){if(isNaN(+s)||+s<0||+s>255)throw new Error("error_ipv4")}))})(r);break;case"ipv6":(function(e){if(!e.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")})(r);break;case"hostname":(function(e){if(!e.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")})(r)}return[]}catch(e){return[{path:n,property:"format",message:c(e.message)}]}}function dp(l,r){var n=Object.keys(l);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(l);r&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),n.push.apply(n,c)}return n}function s0(l,r,n){return(r=hp(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function Fr(l){return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fr(l)}function Ea(l,r){return(function(n){if(Array.isArray(n))return n})(l)||(function(n,c){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,s,u,k,T=[],N=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!(N=(t=u.call(e)).done)&&(T.push(t.value),T.length!==c);N=!0);}catch(q){B=!0,s=q}finally{try{if(!N&&e.return!=null&&(k=e.return(),Object(k)!==k))return}finally{if(B)throw s}}return T}})(l,r)||Ac(l,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ \v\f\r                 \u2028\u2029\uFEFF`},8706:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(4376),b=i(34),w=i(8981),E=i(6198),O=i(6837),j=i(4659),x=i(1469),S=i(597),P=i(8227),L=i(7388),C=P("isConcatSpreadable"),R=L>=51||!m((function(){var I=[];return I[C]=!1,I.concat()[0]!==I})),A=function(I){if(!b(I))return!1;var D=I[C];return D!==void 0?!!D:g(I)};f({target:"Array",proto:!0,arity:1,forced:!R||!S("concat")},{concat:function(I){var D,M,V,G,J,Y=w(this),se=x(Y,0),ue=0;for(D=-1,V=arguments.length;D<V;D++)if(A(J=D===-1?Y:arguments[D]))for(G=E(J),O(ue+G),M=0;M<G;M++,ue++)M in J&&j(se,ue,J[M]);else O(ue+1),j(se,ue++,J);return se.length=ue,se}})},8431:(d,v,i)=>{var f=i(6518),m=i(9213).every;f({target:"Array",proto:!0,forced:!i(4598)("every")},{every:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},2008:(d,v,i)=>{var f=i(6518),m=i(9213).filter;f({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},113:(d,v,i)=>{var f=i(6518),m=i(9213).find,g=i(6469),b="find",w=!0;b in[]&&Array(1)[b]((function(){w=!1})),f({target:"Array",proto:!0,forced:w},{find:function(E){return m(this,E,arguments.length>1?arguments[1]:void 0)}}),g(b)},1629:(d,v,i)=>{var f=i(6518),m=i(235);f({target:"Array",proto:!0,forced:[].forEach!==m},{forEach:m})},3418:(d,v,i)=>{var f=i(6518),m=i(7916);f({target:"Array",stat:!0,forced:!i(4428)((function(g){Array.from(g)}))},{from:m})},4423:(d,v,i)=>{var f=i(6518),m=i(9617).includes,g=i(9039),b=i(6469);f({target:"Array",proto:!0,forced:g((function(){return!Array(1).includes()}))},{includes:function(w){return m(this,w,arguments.length>1?arguments[1]:void 0)}}),b("includes")},5276:(d,v,i)=>{var f=i(6518),m=i(7476),g=i(9617).indexOf,b=i(4598),w=m([].indexOf),E=!!w&&1/w([1],1,-0)<0;f({target:"Array",proto:!0,forced:E||!b("indexOf")},{indexOf:function(O){var j=arguments.length>1?arguments[1]:void 0;return E?w(this,O,j)||0:g(this,O,j)}})},4346:(d,v,i)=>{i(6518)({target:"Array",stat:!0},{isArray:i(4376)})},3792:(d,v,i)=>{var f=i(5397),m=i(6469),g=i(6269),b=i(1181),w=i(4913).f,E=i(1088),O=i(2529),j=i(6395),x=i(3724),S="Array Iterator",P=b.set,L=b.getterFor(S);d.exports=E(Array,"Array",(function(R,A){P(this,{type:S,target:f(R),index:0,kind:A})}),(function(){var R=L(this),A=R.target,I=R.index++;if(!A||I>=A.length)return R.target=void 0,O(void 0,!0);switch(R.kind){case"keys":return O(I,!1);case"values":return O(A[I],!1)}return O([I,A[I]],!1)}),"values");var C=g.Arguments=g.Array;if(m("keys"),m("values"),m("entries"),!j&&x&&C.name!=="values")try{w(C,"name",{value:"values"})}catch{}},8598:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(7055),b=i(5397),w=i(4598),E=m([].join);f({target:"Array",proto:!0,forced:g!==Object||!w("join",",")},{join:function(O){return E(b(this),O===void 0?",":O)}})},2062:(d,v,i)=>{var f=i(6518),m=i(9213).map;f({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:(d,v,i)=>{var f=i(6518),m=i(926).left,g=i(4598),b=i(7388);f({target:"Array",proto:!0,forced:!i(9088)&&b>79&&b<83||!g("reduce")},{reduce:function(w){var E=arguments.length;return m(this,w,E,E>1?arguments[1]:void 0)}})},4490:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(4376),b=m([].reverse),w=[1,2];f({target:"Array",proto:!0,forced:String(w)===String(w.reverse())},{reverse:function(){return g(this)&&(this.length=this.length),b(this)}})},4782:(d,v,i)=>{var f=i(6518),m=i(4376),g=i(3517),b=i(34),w=i(5610),E=i(6198),O=i(5397),j=i(4659),x=i(8227),S=i(597),P=i(7680),L=S("slice"),C=x("species"),R=Array,A=Math.max;f({target:"Array",proto:!0,forced:!L},{slice:function(I,D){var M,V,G,J=O(this),Y=E(J),se=w(I,Y),ue=w(D===void 0?Y:D,Y);if(m(J)&&(M=J.constructor,(g(M)&&(M===R||m(M.prototype))||b(M)&&(M=M[C])===null)&&(M=void 0),M===R||M===void 0))return P(J,se,ue);for(V=new(M===void 0?R:M)(A(ue-se,0)),G=0;se<ue;se++,G++)se in J&&j(V,G,J[se]);return V.length=G,V}})},5086:(d,v,i)=>{var f=i(6518),m=i(9213).some;f({target:"Array",proto:!0,forced:!i(4598)("some")},{some:function(g){return m(this,g,arguments.length>1?arguments[1]:void 0)}})},6910:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(9306),b=i(8981),w=i(6198),E=i(4606),O=i(655),j=i(9039),x=i(4488),S=i(4598),P=i(8834),L=i(3202),C=i(7388),R=i(9160),A=[],I=m(A.sort),D=m(A.push),M=j((function(){A.sort(void 0)})),V=j((function(){A.sort(null)})),G=S("sort"),J=!j((function(){if(C)return C<70;if(!(P&&P>3)){if(L)return!0;if(R)return R<603;var Y,se,ue,he,de="";for(Y=65;Y<76;Y++){switch(se=String.fromCharCode(Y),Y){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(he=0;he<47;he++)A.push({k:se+he,v:ue})}for(A.sort((function(be,ie){return ie.v-be.v})),he=0;he<A.length;he++)se=A[he].k.charAt(0),de.charAt(de.length-1)!==se&&(de+=se);return de!=="DGBEFHACIJK"}}));f({target:"Array",proto:!0,forced:M||!V||!G||!J},{sort:function(Y){Y!==void 0&&g(Y);var se=b(this);if(J)return Y===void 0?I(se):I(se,Y);var ue,he,de=[],be=w(se);for(he=0;he<be;he++)he in se&&D(de,se[he]);for(x(de,(function(ie){return function(H,te){return te===void 0?-1:H===void 0?1:ie!==void 0?+ie(H,te)||0:O(H)>O(te)?1:-1}})(Y)),ue=w(de),he=0;he<ue;)se[he]=de[he++];for(;he<be;)E(se,he++);return se}})},4554:(d,v,i)=>{var f=i(6518),m=i(8981),g=i(5610),b=i(1291),w=i(6198),E=i(4527),O=i(6837),j=i(1469),x=i(4659),S=i(4606),P=i(597)("splice"),L=Math.max,C=Math.min;f({target:"Array",proto:!0,forced:!P},{splice:function(R,A){var I,D,M,V,G,J,Y=m(this),se=w(Y),ue=g(R,se),he=arguments.length;for(he===0?I=D=0:he===1?(I=0,D=se-ue):(I=he-2,D=C(L(b(A),0),se-ue)),O(se+I-D),M=j(Y,D),V=0;V<D;V++)(G=ue+V)in Y&&x(M,V,Y[G]);if(M.length=D,I<D){for(V=ue;V<se-D;V++)J=V+I,(G=V+D)in Y?Y[J]=Y[G]:S(Y,J);for(V=se;V>se-D+I;V--)S(Y,V-1)}else if(I>D)for(V=se-D;V>ue;V--)J=V+I-1,(G=V+D-1)in Y?Y[J]=Y[G]:S(Y,J);for(V=0;V<I;V++)Y[V+ue]=arguments[V+2];return E(Y,se-D+I),M}})},1688:(d,v,i)=>{var f=i(6518),m=i(380);f({target:"Date",proto:!0,forced:Date.prototype.toISOString!==m},{toISOString:m})},739:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(8981),b=i(2777);f({target:"Date",proto:!0,arity:1,forced:m((function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1}))},{toJSON:function(w){var E=g(this),O=b(E,"number");return typeof O!="number"||isFinite(O)?E.toISOString():null}})},9572:(d,v,i)=>{var f=i(9297),m=i(6840),g=i(3640),b=i(8227)("toPrimitive"),w=Date.prototype;f(w,b)||m(w,b,g)},3288:(d,v,i)=>{var f=i(9504),m=i(6840),g=Date.prototype,b="Invalid Date",w="toString",E=f(g[w]),O=f(g.getTime);String(new Date(NaN))!==b&&m(g,w,(function(){var j=O(this);return j==j?E(this):b}))},4170:(d,v,i)=>{var f=i(6518),m=i(566);f({target:"Function",proto:!0,forced:Function.bind!==m},{bind:m})},2010:(d,v,i)=>{var f=i(3724),m=i(350).EXISTS,g=i(9504),b=i(2106),w=Function.prototype,E=g(w.toString),O=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=g(O.exec);f&&!m&&b(w,"name",{configurable:!0,get:function(){try{return j(O,E(this))[1]}catch{return""}}})},3110:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(8745),b=i(9565),w=i(9504),E=i(9039),O=i(4901),j=i(757),x=i(7680),S=i(6933),P=i(4495),L=String,C=m("JSON","stringify"),R=w(/./.exec),A=w("".charAt),I=w("".charCodeAt),D=w("".replace),M=w(1 .toString),V=/[\uD800-\uDFFF]/g,G=/^[\uD800-\uDBFF]$/,J=/^[\uDC00-\uDFFF]$/,Y=!P||E((function(){var de=m("Symbol")("stringify detection");return C([de])!=="[null]"||C({a:de})!=="{}"||C(Object(de))!=="{}"})),se=E((function(){return C("\uDF06\uD834")!=='"\\udf06\\ud834"'||C("\uDEAD")!=='"\\udead"'})),ue=function(de,be){var ie=x(arguments),H=S(be);if(O(H)||de!==void 0&&!j(de))return ie[1]=function(te,z){if(O(H)&&(z=b(H,this,L(te),z)),!j(z))return z},g(C,null,ie)},he=function(de,be,ie){var H=A(ie,be-1),te=A(ie,be+1);return R(G,de)&&!R(J,te)||R(J,de)&&!R(G,H)?"\\u"+M(I(de,0),16):de};C&&f({target:"JSON",stat:!0,arity:3,forced:Y||se},{stringify:function(de,be,ie){var H=x(arguments),te=g(Y?ue:C,null,H);return se&&typeof te=="string"?D(te,V,he):te}})},4731:(d,v,i)=>{var f=i(4475);i(687)(f.JSON,"JSON",!0)},479:(d,v,i)=>{i(687)(Math,"Math",!0)},2892:(d,v,i)=>{var f=i(6518),m=i(6395),g=i(3724),b=i(4475),w=i(9167),E=i(9504),O=i(2796),j=i(9297),x=i(3167),S=i(1625),P=i(757),L=i(2777),C=i(9039),R=i(8480).f,A=i(7347).f,I=i(4913).f,D=i(1240),M=i(3802).trim,V="Number",G=b[V],J=w[V],Y=G.prototype,se=b.TypeError,ue=E("".slice),he=E("".charCodeAt),de=O(V,!G(" 0o1")||!G("0b1")||G("+0x1")),be=function(H){var te,z=arguments.length<1?0:G((function($){var F=L($,"number");return typeof F=="bigint"?F:(function(ee){var ge,_e,je,ve,U,W,ne,ce,pe=L(ee,"number");if(P(pe))throw new se("Cannot convert a Symbol value to a number");if(typeof pe=="string"&&pe.length>2){if(pe=M(pe),(ge=he(pe,0))===43||ge===45){if((_e=he(pe,2))===88||_e===120)return NaN}else if(ge===48){switch(he(pe,1)){case 66:case 98:je=2,ve=49;break;case 79:case 111:je=8,ve=55;break;default:return+pe}for(W=(U=ue(pe,2)).length,ne=0;ne<W;ne++)if((ce=he(U,ne))<48||ce>ve)return NaN;return parseInt(U,je)}}return+pe})(F)})(H));return S(Y,te=this)&&C((function(){D(te)}))?x(Object(z),this,be):z};be.prototype=Y,de&&!m&&(Y.constructor=be),f({global:!0,constructor:!0,wrap:!0,forced:de},{Number:be});var ie=function(H,te){for(var z,$=g?R(te):"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(","),F=0;$.length>F;F++)j(te,z=$[F])&&!j(H,z)&&I(H,z,A(te,z))};m&&J&&ie(w[V],J),(de||m)&&ie(w[V],G)},9868:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(1291),b=i(1240),w=i(2333),E=i(9039),O=RangeError,j=String,x=Math.floor,S=m(w),P=m("".slice),L=m(1 .toFixed),C=function(D,M,V){return M===0?V:M%2==1?C(D,M-1,V*D):C(D*D,M/2,V)},R=function(D,M,V){for(var G=-1,J=V;++G<6;)J+=M*D[G],D[G]=J%1e7,J=x(J/1e7)},A=function(D,M){for(var V=6,G=0;--V>=0;)G+=D[V],D[V]=x(G/M),G=G%M*1e7},I=function(D){for(var M=6,V="";--M>=0;)if(V!==""||M===0||D[M]!==0){var G=j(D[M]);V=V===""?G:V+S("0",7-G.length)+G}return V};f({target:"Number",proto:!0,forced:E((function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"}))||!E((function(){L({})}))},{toFixed:function(D){var M,V,G,J,Y=b(this),se=g(D),ue=[0,0,0,0,0,0],he="",de="0";if(se<0||se>20)throw new O("Incorrect fraction digits");if(Y!=Y)return"NaN";if(Y<=-1e21||Y>=1e21)return j(Y);if(Y<0&&(he="-",Y=-Y),Y>1e-21)if(V=(M=(function(be){for(var ie=0,H=be;H>=4096;)ie+=12,H/=4096;for(;H>=2;)ie+=1,H/=2;return ie})(Y*C(2,69,1))-69)<0?Y*C(2,-M,1):Y/C(2,M,1),V*=4503599627370496,(M=52-M)>0){for(R(ue,0,V),G=se;G>=7;)R(ue,1e7,0),G-=7;for(R(ue,C(10,G,1),0),G=M-1;G>=23;)A(ue,8388608),G-=23;A(ue,1<<G),R(ue,1,1),A(ue,2),de=I(ue)}else R(ue,0,V),R(ue,1<<-M,0),de=I(ue)+S("0",se);return se>0?he+((J=de.length)<=se?"0."+S("0",se-J)+de:P(de,0,J-se)+"."+P(de,J-se)):he+de}})},9085:(d,v,i)=>{var f=i(6518),m=i(4213);f({target:"Object",stat:!0,arity:2,forced:Object.assign!==m},{assign:m})},9904:(d,v,i)=>{i(6518)({target:"Object",stat:!0,sham:!i(3724)},{create:i(2360)})},7945:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(6801).f;f({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!m},{defineProperties:g})},4185:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(4913).f;f({target:"Object",stat:!0,forced:Object.defineProperty!==g,sham:!m},{defineProperty:g})},5506:(d,v,i)=>{var f=i(6518),m=i(2357).entries;f({target:"Object",stat:!0},{entries:function(g){return m(g)}})},3851:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(5397),b=i(7347).f,w=i(3724);f({target:"Object",stat:!0,forced:!w||m((function(){b(1)})),sham:!w},{getOwnPropertyDescriptor:function(E,O){return b(g(E),O)}})},1278:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(5031),b=i(5397),w=i(7347),E=i(4659);f({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(O){for(var j,x,S=b(O),P=w.f,L=g(S),C={},R=0;L.length>R;)(x=P(S,j=L[R++]))!==void 0&&E(C,j,x);return C}})},9773:(d,v,i)=>{var f=i(6518),m=i(4495),g=i(9039),b=i(3717),w=i(8981);f({target:"Object",stat:!0,forced:!m||g((function(){b.f(1)}))},{getOwnPropertySymbols:function(E){var O=b.f;return O?O(w(E)):[]}})},875:(d,v,i)=>{var f=i(6518),m=i(9039),g=i(8981),b=i(2787),w=i(2211);f({target:"Object",stat:!0,forced:m((function(){b(1)})),sham:!w},{getPrototypeOf:function(E){return b(g(E))}})},9432:(d,v,i)=>{var f=i(6518),m=i(8981),g=i(1072);f({target:"Object",stat:!0,forced:i(9039)((function(){g(1)}))},{keys:function(b){return g(m(b))}})},287:(d,v,i)=>{i(6518)({target:"Object",stat:!0},{setPrototypeOf:i(2967)})},6099:(d,v,i)=>{var f=i(2140),m=i(6840),g=i(3179);f||m(Object.prototype,"toString",g,{unsafe:!0})},6034:(d,v,i)=>{var f=i(6518),m=i(2357).values;f({target:"Object",stat:!0},{values:function(g){return m(g)}})},8459:(d,v,i)=>{var f=i(6518),m=i(3904);f({global:!0,forced:parseFloat!==m},{parseFloat:m})},8940:(d,v,i)=>{var f=i(6518),m=i(2703);f({global:!0,forced:parseInt!==m},{parseInt:m})},6499:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(9306),b=i(6043),w=i(1103),E=i(2652);f({target:"Promise",stat:!0,forced:i(537)},{all:function(O){var j=this,x=b.f(j),S=x.resolve,P=x.reject,L=w((function(){var C=g(j.resolve),R=[],A=0,I=1;E(O,(function(D){var M=A++,V=!1;I++,m(C,j,D).then((function(G){V||(V=!0,R[M]=G,--I||S(R))}),P)})),--I||S(R)}));return L.error&&P(L.value),x.promise}})},2003:(d,v,i)=>{var f=i(6518),m=i(6395),g=i(916).CONSTRUCTOR,b=i(550),w=i(7751),E=i(4901),O=i(6840),j=b&&b.prototype;if(f({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(S){return this.then(void 0,S)}}),!m&&E(b)){var x=w("Promise").prototype.catch;j.catch!==x&&O(j,"catch",x,{unsafe:!0})}},436:(d,v,i)=>{var f,m,g,b=i(6518),w=i(6395),E=i(9088),O=i(4475),j=i(9565),x=i(6840),S=i(2967),P=i(687),L=i(7633),C=i(9306),R=i(4901),A=i(34),I=i(679),D=i(2293),M=i(9225).set,V=i(1955),G=i(3138),J=i(1103),Y=i(8265),se=i(1181),ue=i(550),he=i(916),de=i(6043),be="Promise",ie=he.CONSTRUCTOR,H=he.REJECTION_EVENT,te=he.SUBCLASSING,z=se.getterFor(be),$=se.set,F=ue&&ue.prototype,ee=ue,ge=F,_e=O.TypeError,je=O.document,ve=O.process,U=de.f,W=U,ne=!!(je&&je.createEvent&&O.dispatchEvent),ce="unhandledrejection",pe=function(me){var Ee;return!(!A(me)||!R(Ee=me.then))&&Ee},Oe=function(me,Ee){var Se,qe,it,Et=Ee.value,Ct=Ee.state===1,Lt=Ct?me.ok:me.fail,_t=me.resolve,At=me.reject,zt=me.domain;try{Lt?(Ct||(Ee.rejection===2&&Ae(Ee),Ee.rejection=1),Lt===!0?Se=Et:(zt&&zt.enter(),Se=Lt(Et),zt&&(zt.exit(),it=!0)),Se===me.promise?At(new _e("Promise-chain cycle")):(qe=pe(Se))?j(qe,Se,_t,At):_t(Se)):At(Et)}catch($t){zt&&!it&&zt.exit(),At($t)}},$e=function(me,Ee){me.notified||(me.notified=!0,V((function(){for(var Se,qe=me.reactions;Se=qe.get();)Oe(Se,me);me.notified=!1,Ee&&!me.rejection&&Ze(me)})))},Fe=function(me,Ee,Se){var qe,it;ne?((qe=je.createEvent("Event")).promise=Ee,qe.reason=Se,qe.initEvent(me,!1,!0),O.dispatchEvent(qe)):qe={promise:Ee,reason:Se},!H&&(it=O["on"+me])?it(qe):me===ce&&G("Unhandled promise rejection",Se)},Ze=function(me){j(M,O,(function(){var Ee,Se=me.facade,qe=me.value;if(Ye(me)&&(Ee=J((function(){E?ve.emit("unhandledRejection",qe,Se):Fe(ce,Se,qe)})),me.rejection=E||Ye(me)?2:1,Ee.error))throw Ee.value}))},Ye=function(me){return me.rejection!==1&&!me.parent},Ae=function(me){j(M,O,(function(){var Ee=me.facade;E?ve.emit("rejectionHandled",Ee):Fe("rejectionhandled",Ee,me.value)}))},Qe=function(me,Ee,Se){return function(qe){me(Ee,qe,Se)}},De=function(me,Ee,Se){me.done||(me.done=!0,Se&&(me=Se),me.value=Ee,me.state=2,$e(me,!0))},nt=function(me,Ee,Se){if(!me.done){me.done=!0,Se&&(me=Se);try{if(me.facade===Ee)throw new _e("Promise can't be resolved itself");var qe=pe(Ee);qe?V((function(){var it={done:!1};try{j(qe,Ee,Qe(nt,it,me),Qe(De,it,me))}catch(Et){De(it,Et,me)}})):(me.value=Ee,me.state=1,$e(me,!1))}catch(it){De({done:!1},it,me)}}};if(ie&&(ge=(ee=function(me){I(this,ge),C(me),j(f,this);var Ee=z(this);try{me(Qe(nt,Ee),Qe(De,Ee))}catch(Se){De(Ee,Se)}}).prototype,(f=function(me){$(this,{type:be,done:!1,notified:!1,parent:!1,reactions:new Y,rejection:!1,state:0,value:void 0})}).prototype=x(ge,"then",(function(me,Ee){var Se=z(this),qe=U(D(this,ee));return Se.parent=!0,qe.ok=!R(me)||me,qe.fail=R(Ee)&&Ee,qe.domain=E?ve.domain:void 0,Se.state===0?Se.reactions.add(qe):V((function(){Oe(qe,Se)})),qe.promise})),m=function(){var me=new f,Ee=z(me);this.promise=me,this.resolve=Qe(nt,Ee),this.reject=Qe(De,Ee)},de.f=U=function(me){return me===ee||me===void 0?new m(me):W(me)},!w&&R(ue)&&F!==Object.prototype)){g=F.then,te||x(F,"then",(function(me,Ee){var Se=this;return new ee((function(qe,it){j(g,Se,qe,it)})).then(me,Ee)}),{unsafe:!0});try{delete F.constructor}catch{}S&&S(F,ge)}b({global:!0,constructor:!0,wrap:!0,forced:ie},{Promise:ee}),P(ee,be,!1,!0),L(be)},3362:(d,v,i)=>{i(436),i(6499),i(2003),i(7743),i(1481),i(280)},7743:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(9306),b=i(6043),w=i(1103),E=i(2652);f({target:"Promise",stat:!0,forced:i(537)},{race:function(O){var j=this,x=b.f(j),S=x.reject,P=w((function(){var L=g(j.resolve);E(O,(function(C){m(L,j,C).then(x.resolve,S)}))}));return P.error&&S(P.value),x.promise}})},1481:(d,v,i)=>{var f=i(6518),m=i(6043);f({target:"Promise",stat:!0,forced:i(916).CONSTRUCTOR},{reject:function(g){var b=m.f(this);return(0,b.reject)(g),b.promise}})},280:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(6395),b=i(550),w=i(916).CONSTRUCTOR,E=i(3438),O=m("Promise"),j=g&&!w;f({target:"Promise",stat:!0,forced:g||w},{resolve:function(x){return E(j&&this===O?b:this,x)}})},825:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(8745),b=i(566),w=i(5548),E=i(8551),O=i(34),j=i(2360),x=i(9039),S=m("Reflect","construct"),P=Object.prototype,L=[].push,C=x((function(){function I(){}return!(S((function(){}),[],I)instanceof I)})),R=!x((function(){S((function(){}))})),A=C||R;f({target:"Reflect",stat:!0,forced:A,sham:A},{construct:function(I,D){w(I),E(D);var M=arguments.length<3?I:w(arguments[2]);if(R&&!C)return S(I,D,M);if(I===M){switch(D.length){case 0:return new I;case 1:return new I(D[0]);case 2:return new I(D[0],D[1]);case 3:return new I(D[0],D[1],D[2]);case 4:return new I(D[0],D[1],D[2],D[3])}var V=[null];return g(L,V,D),new(g(b,I,V))}var G=M.prototype,J=j(O(G)?G:P),Y=g(I,J,D);return O(Y)?Y:J}})},888:(d,v,i)=>{var f=i(6518),m=i(9565),g=i(34),b=i(8551),w=i(6575),E=i(7347),O=i(2787);f({target:"Reflect",stat:!0},{get:function j(x,S){var P,L,C=arguments.length<3?x:arguments[2];return b(x)===C?x[S]:(P=E.f(x,S))?w(P)?P.value:P.get===void 0?void 0:m(P.get,C):g(L=O(x))?j(L,S,C):void 0}})},4864:(d,v,i)=>{var f=i(3724),m=i(4475),g=i(9504),b=i(2796),w=i(3167),E=i(6699),O=i(2360),j=i(8480).f,x=i(1625),S=i(788),P=i(655),L=i(1034),C=i(8429),R=i(1056),A=i(6840),I=i(9039),D=i(9297),M=i(1181).enforce,V=i(7633),G=i(8227),J=i(3635),Y=i(8814),se=G("match"),ue=m.RegExp,he=ue.prototype,de=m.SyntaxError,be=g(he.exec),ie=g("".charAt),H=g("".replace),te=g("".indexOf),z=g("".slice),$=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,ee=/a/g,ge=new ue(F)!==F,_e=C.MISSED_STICKY,je=C.UNSUPPORTED_Y;if(b("RegExp",f&&(!ge||_e||J||Y||I((function(){return ee[se]=!1,ue(F)!==F||ue(ee)===ee||String(ue(F,"i"))!=="/a/i"}))))){for(var ve=function(ne,ce){var pe,Oe,$e,Fe,Ze,Ye,Ae=x(he,this),Qe=S(ne),De=ce===void 0,nt=[],me=ne;if(!Ae&&Qe&&De&&ne.constructor===ve)return ne;if((Qe||x(he,ne))&&(ne=ne.source,De&&(ce=L(me))),ne=ne===void 0?"":P(ne),ce=ce===void 0?"":P(ce),me=ne,J&&"dotAll"in F&&(Oe=!!ce&&te(ce,"s")>-1)&&(ce=H(ce,/s/g,"")),pe=ce,_e&&"sticky"in F&&($e=!!ce&&te(ce,"y")>-1)&&je&&(ce=H(ce,/y/g,"")),Y&&(Fe=(function(Ee){for(var Se,qe=Ee.length,it=0,Et="",Ct=[],Lt=O(null),_t=!1,At=!1,zt=0,$t="";it<=qe;it++){if((Se=ie(Ee,it))==="\\")Se+=ie(Ee,++it);else if(Se==="]")_t=!1;else if(!_t)switch(!0){case Se==="[":_t=!0;break;case Se==="(":be($,z(Ee,it+1))&&(it+=2,At=!0),Et+=Se,zt++;continue;case(Se===">"&&At):if($t===""||D(Lt,$t))throw new de("Invalid capture group name");Lt[$t]=!0,Ct[Ct.length]=[$t,zt],At=!1,$t="";continue}At?$t+=Se:Et+=Se}return[Et,Ct]})(ne),ne=Fe[0],nt=Fe[1]),Ze=w(ue(ne,ce),Ae?this:he,ve),(Oe||$e||nt.length)&&(Ye=M(Ze),Oe&&(Ye.dotAll=!0,Ye.raw=ve((function(Ee){for(var Se,qe=Ee.length,it=0,Et="",Ct=!1;it<=qe;it++)(Se=ie(Ee,it))!=="\\"?Ct||Se!=="."?(Se==="["?Ct=!0:Se==="]"&&(Ct=!1),Et+=Se):Et+="[\\s\\S]":Et+=Se+ie(Ee,++it);return Et})(ne),pe)),$e&&(Ye.sticky=!0),nt.length&&(Ye.groups=nt)),ne!==me)try{E(Ze,"source",me===""?"(?:)":me)}catch{}return Ze},U=j(ue),W=0;U.length>W;)R(ve,ue,U[W++]);he.constructor=ve,ve.prototype=he,A(m,"RegExp",ve,{constructor:!0})}V("RegExp")},7495:(d,v,i)=>{var f=i(6518),m=i(7323);f({target:"RegExp",proto:!0,forced:/./.exec!==m},{exec:m})},8781:(d,v,i)=>{var f=i(350).PROPER,m=i(6840),g=i(8551),b=i(655),w=i(9039),E=i(1034),O="toString",j=RegExp.prototype,x=j[O],S=w((function(){return x.call({source:"a",flags:"b"})!=="/a/b"})),P=f&&x.name!==O;(S||P)&&m(j,O,(function(){var L=g(this);return"/"+b(L.source)+"/"+b(E(L))}),{unsafe:!0})},1699:(d,v,i)=>{var f=i(6518),m=i(9504),g=i(5749),b=i(7750),w=i(655),E=i(1436),O=m("".indexOf);f({target:"String",proto:!0,forced:!E("includes")},{includes:function(j){return!!~O(w(b(this)),w(g(j)),arguments.length>1?arguments[1]:void 0)}})},7764:(d,v,i)=>{var f=i(8183).charAt,m=i(655),g=i(1181),b=i(1088),w=i(2529),E="String Iterator",O=g.set,j=g.getterFor(E);b(String,"String",(function(x){O(this,{type:E,string:m(x),index:0})}),(function(){var x,S=j(this),P=S.string,L=S.index;return L>=P.length?w(void 0,!0):(x=f(P,L),S.index+=x.length,w(x,!1))}))},1761:(d,v,i)=>{var f=i(9565),m=i(9228),g=i(8551),b=i(4117),w=i(8014),E=i(655),O=i(7750),j=i(5966),x=i(7829),S=i(6682);m("match",(function(P,L,C){return[function(R){var A=O(this),I=b(R)?void 0:j(R,P);return I?f(I,R,A):new RegExp(R)[P](E(A))},function(R){var A=g(this),I=E(R),D=C(L,A,I);if(D.done)return D.value;if(!A.global)return S(A,I);var M=A.unicode;A.lastIndex=0;for(var V,G=[],J=0;(V=S(A,I))!==null;){var Y=E(V[0]);G[J]=Y,Y===""&&(A.lastIndex=x(I,w(A.lastIndex),M)),J++}return J===0?null:G}]}))},5440:(d,v,i)=>{var f=i(8745),m=i(9565),g=i(9504),b=i(9228),w=i(9039),E=i(8551),O=i(4901),j=i(4117),x=i(1291),S=i(8014),P=i(655),L=i(7750),C=i(7829),R=i(5966),A=i(2478),I=i(6682),D=i(8227)("replace"),M=Math.max,V=Math.min,G=g([].concat),J=g([].push),Y=g("".indexOf),se=g("".slice),ue="a".replace(/./,"$0")==="$0",he=!!/./[D]&&/./[D]("a","$0")==="";b("replace",(function(de,be,ie){var H=he?"$":"$0";return[function(te,z){var $=L(this),F=j(te)?void 0:R(te,D);return F?m(F,te,$,z):m(be,P($),te,z)},function(te,z){var $=E(this),F=P(te);if(typeof z=="string"&&Y(z,H)===-1&&Y(z,"$<")===-1){var ee=ie(be,$,F,z);if(ee.done)return ee.value}var ge=O(z);ge||(z=P(z));var _e,je=$.global;je&&(_e=$.unicode,$.lastIndex=0);for(var ve,U=[];(ve=I($,F))!==null&&(J(U,ve),je);)P(ve[0])===""&&($.lastIndex=C(F,S($.lastIndex),_e));for(var W,ne="",ce=0,pe=0;pe<U.length;pe++){for(var Oe,$e=P((ve=U[pe])[0]),Fe=M(V(x(ve.index),F.length),0),Ze=[],Ye=1;Ye<ve.length;Ye++)J(Ze,(W=ve[Ye])===void 0?W:String(W));var Ae=ve.groups;if(ge){var Qe=G([$e],Ze,Fe,F);Ae!==void 0&&J(Qe,Ae),Oe=P(f(z,void 0,Qe))}else Oe=A($e,F,Fe,Ze,Ae,z);Fe>=ce&&(ne+=se(F,ce,Fe)+Oe,ce=Fe+$e.length)}return ne+se(F,ce)}]}),!!w((function(){var de=/./;return de.exec=function(){var be=[];return be.groups={a:"7"},be},"".replace(de,"$<a>")!=="7"}))||!ue||he)},1392:(d,v,i)=>{var f,m=i(6518),g=i(7476),b=i(7347).f,w=i(8014),E=i(655),O=i(5749),j=i(7750),x=i(1436),S=i(6395),P=g("".slice),L=Math.min,C=x("startsWith");m({target:"String",proto:!0,forced:!(!S&&!C&&(f=b(String.prototype,"startsWith"),f&&!f.writable)||C)},{startsWith:function(R){var A=E(j(this));O(R);var I=w(L(arguments.length>1?arguments[1]:void 0,A.length)),D=E(R);return P(A,I,I+D.length)===D}})},2762:(d,v,i)=>{var f=i(6518),m=i(3802).trim;f({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return m(this)}})},6412:(d,v,i)=>{i(511)("asyncIterator")},6761:(d,v,i)=>{var f=i(6518),m=i(4475),g=i(9565),b=i(9504),w=i(6395),E=i(3724),O=i(4495),j=i(9039),x=i(9297),S=i(1625),P=i(8551),L=i(5397),C=i(6969),R=i(655),A=i(6980),I=i(2360),D=i(1072),M=i(8480),V=i(298),G=i(3717),J=i(7347),Y=i(4913),se=i(6801),ue=i(8773),he=i(6840),de=i(2106),be=i(5745),ie=i(6119),H=i(421),te=i(3392),z=i(8227),$=i(1951),F=i(511),ee=i(8242),ge=i(687),_e=i(1181),je=i(9213).forEach,ve=ie("hidden"),U="Symbol",W="prototype",ne=_e.set,ce=_e.getterFor(U),pe=Object[W],Oe=m.Symbol,$e=Oe&&Oe[W],Fe=m.RangeError,Ze=m.TypeError,Ye=m.QObject,Ae=J.f,Qe=Y.f,De=V.f,nt=ue.f,me=b([].push),Ee=be("symbols"),Se=be("op-symbols"),qe=be("wks"),it=!Ye||!Ye[W]||!Ye[W].findChild,Et=function(Ie,Ge,Ve){var Je=Ae(pe,Ge);Je&&delete pe[Ge],Qe(Ie,Ge,Ve),Je&&Ie!==pe&&Qe(pe,Ge,Je)},Ct=E&&j((function(){return I(Qe({},"a",{get:function(){return Qe(this,"a",{value:7}).a}})).a!==7}))?Et:Qe,Lt=function(Ie,Ge){var Ve=Ee[Ie]=I($e);return ne(Ve,{type:U,tag:Ie,description:Ge}),E||(Ve.description=Ge),Ve},_t=function(Ie,Ge,Ve){Ie===pe&&_t(Se,Ge,Ve),P(Ie);var Je=C(Ge);return P(Ve),x(Ee,Je)?(Ve.enumerable?(x(Ie,ve)&&Ie[ve][Je]&&(Ie[ve][Je]=!1),Ve=I(Ve,{enumerable:A(0,!1)})):(x(Ie,ve)||Qe(Ie,ve,A(1,I(null))),Ie[ve][Je]=!0),Ct(Ie,Je,Ve)):Qe(Ie,Je,Ve)},At=function(Ie,Ge){P(Ie);var Ve=L(Ge),Je=D(Ve).concat(Bn(Ve));return je(Je,(function(Ot){E&&!g(zt,Ve,Ot)||_t(Ie,Ot,Ve[Ot])})),Ie},zt=function(Ie){var Ge=C(Ie),Ve=g(nt,this,Ge);return!(this===pe&&x(Ee,Ge)&&!x(Se,Ge))&&(!(Ve||!x(this,Ge)||!x(Ee,Ge)||x(this,ve)&&this[ve][Ge])||Ve)},$t=function(Ie,Ge){var Ve=L(Ie),Je=C(Ge);if(Ve!==pe||!x(Ee,Je)||x(Se,Je)){var Ot=Ae(Ve,Je);return!Ot||!x(Ee,Je)||x(Ve,ve)&&Ve[ve][Je]||(Ot.enumerable=!0),Ot}},Ei=function(Ie){var Ge=De(L(Ie)),Ve=[];return je(Ge,(function(Je){x(Ee,Je)||x(H,Je)||me(Ve,Je)})),Ve},Bn=function(Ie){var Ge=Ie===pe,Ve=De(Ge?Se:L(Ie)),Je=[];return je(Ve,(function(Ot){!x(Ee,Ot)||Ge&&!x(pe,Ot)||me(Je,Ee[Ot])})),Je};O||(he($e=(Oe=function(){if(S($e,this))throw new Ze("Symbol is not a constructor");var Ie=arguments.length&&arguments[0]!==void 0?R(arguments[0]):void 0,Ge=te(Ie),Ve=function(Je){var Ot=this===void 0?m:this;Ot===pe&&g(Ve,Se,Je),x(Ot,ve)&&x(Ot[ve],Ge)&&(Ot[ve][Ge]=!1);var oo=A(1,Je);try{Ct(Ot,Ge,oo)}catch(He){if(!(He instanceof Fe))throw He;Et(Ot,Ge,oo)}};return E&&it&&Ct(pe,Ge,{configurable:!0,set:Ve}),Lt(Ge,Ie)})[W],"toString",(function(){return ce(this).tag})),he(Oe,"withoutSetter",(function(Ie){return Lt(te(Ie),Ie)})),ue.f=zt,Y.f=_t,se.f=At,J.f=$t,M.f=V.f=Ei,G.f=Bn,$.f=function(Ie){return Lt(z(Ie),Ie)},E&&(de($e,"description",{configurable:!0,get:function(){return ce(this).description}}),w||he(pe,"propertyIsEnumerable",zt,{unsafe:!0}))),f({global:!0,constructor:!0,wrap:!0,forced:!O,sham:!O},{Symbol:Oe}),je(D(qe),(function(Ie){F(Ie)})),f({target:U,stat:!0,forced:!O},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),f({target:"Object",stat:!0,forced:!O,sham:!E},{create:function(Ie,Ge){return Ge===void 0?I(Ie):At(I(Ie),Ge)},defineProperty:_t,defineProperties:At,getOwnPropertyDescriptor:$t}),f({target:"Object",stat:!0,forced:!O},{getOwnPropertyNames:Ei}),ee(),ge(Oe,U),H[ve]=!0},9463:(d,v,i)=>{var f=i(6518),m=i(3724),g=i(4475),b=i(9504),w=i(9297),E=i(4901),O=i(1625),j=i(655),x=i(2106),S=i(7740),P=g.Symbol,L=P&&P.prototype;if(m&&E(P)&&(!("description"in L)||P().description!==void 0)){var C={},R=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),Y=O(L,this)?new P(J):J===void 0?P():P(J);return J===""&&(C[Y]=!0),Y};S(R,P),R.prototype=L,L.constructor=R;var A=String(P("description detection"))==="Symbol(description detection)",I=b(L.valueOf),D=b(L.toString),M=/^Symbol\((.*)\)[^)]+$/,V=b("".replace),G=b("".slice);x(L,"description",{configurable:!0,get:function(){var J=I(this);if(w(C,J))return"";var Y=D(J),se=A?G(Y,7,-1):V(Y,M,"$1");return se===""?void 0:se}}),f({global:!0,constructor:!0,forced:!0},{Symbol:R})}},1510:(d,v,i)=>{var f=i(6518),m=i(7751),g=i(9297),b=i(655),w=i(5745),E=i(1296),O=w("string-to-symbol-registry"),j=w("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!E},{for:function(x){var S=b(x);if(g(O,S))return O[S];var P=m("Symbol")(S);return O[S]=P,j[P]=S,P}})},2259:(d,v,i)=>{i(511)("iterator")},2675:(d,v,i)=>{i(6761),i(1510),i(7812),i(3110),i(9773)},7812:(d,v,i)=>{var f=i(6518),m=i(9297),g=i(757),b=i(6823),w=i(5745),E=i(1296),O=w("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!E},{keyFor:function(j){if(!g(j))throw new TypeError(b(j)+" is not a symbol");if(m(O,j))return O[j]}})},5700:(d,v,i)=>{var f=i(511),m=i(8242);f("toPrimitive"),m()},8125:(d,v,i)=>{var f=i(7751),m=i(511),g=i(687);m("toStringTag"),g(f("Symbol"),"Symbol")},3500:(d,v,i)=>{var f=i(4475),m=i(7400),g=i(9296),b=i(235),w=i(6699),E=function(j){if(j&&j.forEach!==b)try{w(j,"forEach",b)}catch{j.forEach=b}};for(var O in m)m[O]&&E(f[O]&&f[O].prototype);E(g)},2953:(d,v,i)=>{var f=i(4475),m=i(7400),g=i(9296),b=i(3792),w=i(6699),E=i(687),O=i(8227)("iterator"),j=b.values,x=function(P,L){if(P){if(P[O]!==j)try{w(P,O,j)}catch{P[O]=j}if(E(P,L,!0),m[L]){for(var C in b)if(P[C]!==b[C])try{w(P,C,b[C])}catch{P[C]=b[C]}}}};for(var S in m)x(f[S]&&f[S].prototype,S);x(g,"DOMTokenList")},5575:(d,v,i)=>{var f=i(6518),m=i(4475),g=i(9472)(m.setInterval,!0);f({global:!0,bind:!0,forced:m.setInterval!==g},{setInterval:g})},4599:(d,v,i)=>{var f=i(6518),m=i(4475),g=i(9472)(m.setTimeout,!0);f({global:!0,bind:!0,forced:m.setTimeout!==g},{setTimeout:g})},6031:(d,v,i)=>{i(5575),i(4599)}},p={};function y(d){var v=p[d];if(v!==void 0)return v.exports;var i=p[d]={exports:{}};return h[d].call(i.exports,i,i.exports,y),i.exports}y.d=(d,v)=>{for(var i in v)y.o(v,i)&&!y.o(d,i)&&Object.defineProperty(d,i,{enumerable:!0,get:v[i]})},y.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),y.o=(d,v)=>Object.prototype.hasOwnProperty.call(d,v),y.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})};var _={};return(()=>{y.r(_),y.d(_,{JSONEditor:()=>Cn}),y(2675),y(9463),y(6412),y(2259),y(5700),y(8125),y(8706),y(113),y(1629),y(3418),y(4346),y(3792),y(2712),y(4490),y(4782),y(739),y(9572),y(3288),y(2010),y(4731),y(479),y(2892),y(9085),y(9904),y(4185),y(875),y(9432),y(287),y(6099),y(6034),y(3362),y(7495),y(8781),y(7764),y(3500),y(2953),y(5506),y(4864),y(5440),y(4423);var d=["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"],v=[function(l){return l.type==="string"&&l.format==="color"&&"colorpicker"},function(l){return l.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(l.format)&&"ip"},function(l){return l.type==="string"&&d.includes(l.format)&&"ace"},function(l){return l.type==="string"&&["xhtml","bbcode"].includes(l.format)&&"sceditor"},function(l){return l.type==="string"&&l.format==="markdown"&&"simplemde"},function(l){return l.type==="string"&&l.format==="jodit"&&"jodit"},function(l){return l.type==="string"&&l.format==="autocomplete"&&"autocomplete"},function(l){return l.type==="string"&&l.format==="uuid"&&"uuid"},function(l){return l.format==="info"&&"info"},function(l){return l.format==="button"&&"button"},function(l){if((l.type==="integer"||l.type==="number")&&l.format==="stepper")return"stepper"},function(l){if(l.links){for(var r=0;r<l.links.length;r++)if(l.links[r].rel&&l.links[r].rel.toLowerCase()==="describedby")return"describedBy"}},function(l){return["string","integer"].includes(l.type)&&["starrating","rating"].includes(l.format)&&"starrating"},function(l){return["string","integer"].includes(l.type)&&["date","time","datetime-local"].includes(l.format)&&"datetime"},function(l){var r,n;return(l.oneOf||l.anyOf)&&((r=(n=l.options)===null||n===void 0?void 0:n.switcher)===null||r===void 0||r)===!0&&"multiple"},function(l){return l.if&&"multiple"},function(l,r){if(l.items&&(l.items=r.expandSchema(l.items)),l.type==="array"&&l.items&&!Array.isArray(l.items)&&["string","number","integer"].includes(l.items.type)){if(l.format==="choices")return"arrayChoices";if(l.uniqueItems){if(l.format==="selectize")return"arraySelectize";if(l.format==="select2")return"arraySelect2";if(l.items.enum)return"multiselect"}}},function(l){if(l.enum){if(l.type==="array"||l.type==="object")return"enum";if(l.type==="number"||l.type==="integer"||l.type==="string")return l.format==="radio"?"radio":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"}},function(l){if(l.enumSource)return l.format==="radio"?"radio":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"},function(l){return l.type==="array"&&l.format==="table"&&"table"},function(l){return l.type==="string"&&l.format==="url"&&window.FileReader&&l.options&&l.options.upload===Object(l.options.upload)&&"upload"},function(l){return l.type==="string"&&l.media&&l.media.binaryEncoding==="base64"&&"base64"},function(l){return l.type==="any"&&"multiple"},function(l){if(l.type==="boolean")return l.format==="checkbox"||l.options&&l.options.checkbox?"checkbox":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"},function(l){return l.type==="string"&&l.format==="signature"&&"signature"},function(l){return typeof l.type=="string"&&["string","number","integer","boolean","null","array","object"].includes(l.type)&&l.type},function(l){return!l.type&&l.properties&&"object"},function(l){return typeof l.type!="string"&&"multiple"},function(l){return typeof l.type=="string"&&"string"}];function i(l,r,n){var c;return c=(function(e,t){if(f(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var u=s.call(e,"string");if(f(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)})(r),(r=f(c)=="symbol"?c:c+"")in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function f(l){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(l)}function m(l){return!(l===null||f(l)!=="object"||l.nodeType||l===l.window||l.constructor&&!O(l.constructor.prototype,"isPrototypeOf"))}function g(l){return m(l)?b({},l):Array.isArray(l)?l.map(g):l}function b(l){for(var r=arguments.length,n=new Array(r>1?r-1:0),c=1;c<r;c++)n[c-1]=arguments[c];return n.forEach((function(e){e&&Object.keys(e).forEach((function(t){e[t]&&m(e[t])?(O(l,t)||(l[t]={}),b(l[t],e[t])):Array.isArray(e[t])?l[t]=g(e[t]):l[t]=e[t]}))})),l}function w(l,r){var n=document.createEvent("HTMLEvents");n.initEvent(r,!0,!0),l.dispatchEvent(n)}function E(l){return l&&(l.toString()==="[object ShadowRoot]"?l:E(l.parentNode))}function O(l,r){return l&&Object.prototype.hasOwnProperty.call(l,r)}y(4170),y(3851),y(825),y(888),y(8598),y(1699),y(1761),y(5276),y(5086),y(1392),y(2062),y(8459),y(8940);var j=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,x=/^\s*(-|\+)?(\d+)\s*$/;function S(){var l=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(l+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(r){var n=(l+16*Math.random())%16|0;return l=Math.floor(l/16),(r==="x"?n:3&n|8).toString(16)}))}function P(l){return l&&f(l)==="object"&&!Array.isArray(l)}function L(l){for(var r=arguments.length,n=new Array(r>1?r-1:0),c=1;c<r;c++)n[c-1]=arguments[c];if(!n.length)return l;var e=n.shift();if(P(l)&&P(e))for(var t in e)P(e[t])?(l[t]||Object.assign(l,i({},t,{})),L(l[t],e[t])):Object.assign(l,i({},t,e[t]));return L.apply(void 0,[l].concat(n))}function C(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function R(l){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R(l)}function A(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,I(c.key),c)}}function I(l){var r=(function(n,c){if(R(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(R(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return R(r)=="symbol"?r:r+""}var D=(function(){return l=function n(c,e){var t,s;(function(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")})(this,n),this.defaults=e,this.jsoneditor=c.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=c.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.isUiOnly=!1,this.options=b({},this.options||{},this.schema.options||{},c.schema.options||{},c),this.enforceConstEnabled=(t=this.options.enforce_const)!==null&&t!==void 0?t:this.jsoneditor.options.enforce_const,this.formname=this.jsoneditor.options.form_name_root||"root",c.path||this.schema.id||(this.schema.id=this.formname),this.path=c.path||this.formname,this.formname=c.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=c.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,this.optInWidget=(s=this.options.opt_in_widget)!==null&&s!==void 0?s:this.jsoneditor.options.opt_in_widget,c.container&&this.setContainer(c.container),this.registerDependencies()},r=[{key:"onChildEditorChange",value:function(n,c){this.onChange(!0,!1,c)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(n){this.parent?this.parent.onChildEditorChange(this,n):this.jsoneditor&&this.jsoneditor.onChange(n)}},{key:"onChange",value:function(n,c,e){this.notify(),c||this.watch_listener&&this.watch_listener(),n&&this.change(e)}},{key:"register",value:function(){if(this.jsoneditor.registerEditor(this),this.input&&!this.label){var n=this.getTitle()||this.formname;this.input.setAttribute("aria-label",n)}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 n=this;this.dependenciesFulfilled=!0;var c=this.options.dependencies;c&&Object.keys(c).forEach((function(e){var t;e.startsWith(n.jsoneditor.root.path)?t=e:((t=n.path.split("."))[t.length-1]=e,t=t.join(".")),n.jsoneditor.watch(t,(function(){n.evaluateDependencies()}))}))}},{key:"evaluateDependencies",value:function(){var n=this,c=this.container||this.control;if(c&&this.jsoneditor!==null){var e=this.options.dependencies;if(e){var t=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(e).forEach((function(u){var k;u.startsWith(n.jsoneditor.root.path)?k=u:((k=n.path.split("."))[k.length-1]=u,k=k.join("."));var T=e[u];n.checkDependency(k,T)})),this.dependenciesFulfilled!==t&&this.notify();var s=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(s="none"),c.tagName==="TD"?Object.keys(c.childNodes).forEach((function(u){return c.childNodes[u].style.display=s})):c.style.display=s}}}},{key:"checkDependency",value:function(n,c){var e=this;if(this.path!==n&&this.jsoneditor!==null){var t=this.jsoneditor.getEditor(n),s=t?t.getValue():void 0;t&&t.dependenciesFulfilled&&s?Array.isArray(c)?this.dependenciesFulfilled=c.some((function(u){if(JSON.stringify(s)===JSON.stringify(u))return!0})):R(c)==="object"?R(s)!=="object"?this.dependenciesFulfilled=c===s:Object.keys(c).some((function(u){return!!O(c,u)&&(O(s,u)&&c[u]===s[u]?void 0:(e.dependenciesFulfilled=!1,!0))})):typeof c=="string"||typeof c=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&s===c:typeof c=="boolean"&&(this.dependenciesFulfilled=c?this.dependenciesFulfilled&&(s||s.length>0):this.dependenciesFulfilled&&(!s||s.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(n){this.container=n,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(){var n,c=this;n=this.optInWidget==="switch"?this.theme.getOptInSwitch(this.formname):this.theme.getOptInCheckbox(this.formname),this.optInCheckbox=n.checkbox,this.optInContainer=n.container,this.optInCheckbox.addEventListener("click",(function(){c.isActive()?c.deactivate():c.activate()}));var e=this.jsoneditor.options.show_opt_in,t=this.parent.options.show_opt_in!==void 0,s=t&&this.parent.options.show_opt_in===!0,u=t&&this.parent.options.show_opt_in===!1;(s||!u&&e||!t&&e)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.insertBefore(this.optInContainer,this.header.firstChild),this.optInAppended=!0)}},{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(),this.options.titleHidden&&(this.theme.visuallyHidden(this.label),this.theme.visuallyHidden(this.header)),this.enforceConstEnabled&&this.schema.const&&this.disable()}},{key:"setupWatchListeners",value:function(){var n=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){n.refreshWatchedFieldValues()&&n.onWatchedFieldChange()},O(this.schema,"watch")){var c,e,t,s,u,k=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(T){if(c=n.schema.watch[T],Array.isArray(c)){if(c.length<2)return;e=[c[0]].concat(c[1].split("."))}else e=c.split("."),n.theme.closest(n.container,'[data-schemaid="'.concat(e[0],'"]'))||e.unshift("#");if((t=e.shift())==="#"&&(t=n.jsoneditor.schema.id||n.jsoneditor.root.formname),!(s=n.theme.closest(n.container,'[data-schemaid="'.concat(t,'"]'))))throw new Error("Could not find ancestor node with id ".concat(t));u="".concat(s.getAttribute("data-schemapath"),".").concat(e.join(".")),k.startsWith(u)&&(n.watchLoop=!0),n.jsoneditor.watch(u,n.watch_listener),n.watched[T]=u}))}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 n=0;n<this.schema.links.length;n++)this.addLink(this.getLink(this.schema.links[n]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(n,c,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],s="json-editor-btn-".concat(c);c=this.iconlib?this.iconlib.getIcon(c):null,n=this.translate(n,t),e=this.translate(e,t),!c&&e&&(n=e,e=null);var u=this.theme.getButton(n,c,e);return u.classList.add(s),u}},{key:"setButtonText",value:function(n,c,e,t){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return e=this.iconlib?this.iconlib.getIcon(e):null,c=this.translate(c,s),t=this.translate(t,s),!e&&t&&(c=t,t=null),this.theme.setButtonText(n,c,e,t)}},{key:"addLink",value:function(n){this.link_holder&&this.link_holder.appendChild(n)}},{key:"getLink",value:function(n){var c,e,t=(n.mediaType||"application/javascript").split("/")[0],s=this.jsoneditor.compileTemplate(n.href,this.template_engine),u=this.jsoneditor.compileTemplate(n.rel?n.rel:n.href,this.template_engine),k=null;if(n.download&&(k=n.download),k&&k!==!0&&(k=this.jsoneditor.compileTemplate(k,this.template_engine)),t==="image"){c=this.theme.getBlockLinkHolder(),(e=document.createElement("a")).setAttribute("target","_blank");var T=document.createElement("img");this.theme.createImageLink(c,e,T),this.link_watchers.push((function(B){var q=s(B),Q=u(B);e.setAttribute("href",q),e.setAttribute("title",Q||q),T.setAttribute("src",q)}))}else if(["audio","video"].includes(t)){c=this.theme.getBlockLinkHolder(),(e=this.theme.getBlockLink()).setAttribute("target","_blank");var N=document.createElement(t);N.setAttribute("controls","controls"),this.theme.createMediaLink(c,e,N),this.link_watchers.push((function(B){var q=s(B),Q=u(B);e.setAttribute("href",q),e.textContent=Q||q,N.setAttribute("src",q)}))}else e=c=this.theme.getBlockLink(),c.setAttribute("target","_blank"),c.textContent=n.rel,c.style.display="none",this.link_watchers.push((function(B){var q=s(B),Q=u(B);q&&(c.style.display=""),c.setAttribute("href",q),c.textContent=Q||q}));return k&&e&&(k===!0?e.setAttribute("download",""):this.link_watchers.push((function(B){e.setAttribute("download",k(B))}))),n.class&&n.class.split(" ").forEach((function(B){e.classList.add(B)})),c}},{key:"refreshWatchedFieldValues",value:function(){var n=this;if(this.watched_values){var c={},e=!1;return this.watched&&Object.keys(this.watched).forEach((function(t){var s=n.jsoneditor.getEditor(n.watched[t]),u=s?s.getValue():null;n.watched_values[t]!==u&&(e=!0),c[t]=u})),c.self=this.getValue(),this.watched_values.self!==c.self&&(e=!0),this.watched_values=c,e}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var n=this.getHeaderText();if(this.header.children.length){for(var c=0;c<this.header.childNodes.length;c++)if(this.header.childNodes[c].nodeType===3){this.header.childNodes[c].nodeValue=this.cleanText(n);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(n):this.header.textContent=this.cleanText(n)}}},{key:"getHeaderText",value:function(n){return this.header_text?this.header_text:n?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(n){var c=document.createElement("div");return c.innerHTML=n,c.textContent||c.innerText}},{key:"onWatchedFieldChange",value:function(){var n,c=this;if(this.header_template){n=b(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()}),this.editors&&Object.keys(this.editors).length&&(n.properties={},Object.keys(this.editors).forEach((function(s){var u=c.editors[s];if(u.schema&&u.schema.enum&&u.schema.options&&u.schema.options.enum_titles){var k=u.schema.enum.indexOf(u.value),T=u.options.enum_titles[k];n.properties[s]={enumTitle:T}}})));var e=this.header_template(n);e!==this.header_text&&(this.header_text=e,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){n=this.getWatchedFieldValues();for(var t=0;t<this.link_watchers.length;t++)this.link_watchers[t](n)}}},{key:"setValue",value:function(n){n=this.applyConstFilter(n),this.value=n}},{key:"applyConstFilter",value:function(n){return this.enforceConstEnabled&&this.schema.const!==void 0&&(n=this.schema.const),n}},{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 n=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach((function(c){return n.jsoneditor.unwatch(c,n.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.enforceConstEnabled&&this.schema.const)return this.schema.const;if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var n=this.schema.type||this.schema.oneOf;if(n&&Array.isArray(n)&&(n=n[0]),n&&R(n)==="object"&&(n=n.type),n&&Array.isArray(n)&&(n=n[0]),typeof n=="string"){if(n==="number")return this.isDefaultRequired()?0:void 0;if(n==="boolean")return!this.isDefaultRequired()&&void 0;if(n==="integer")return this.isDefaultRequired()?0:void 0;if(n==="string")return this.isDefaultRequired()?"":void 0;if(n==="null")return null;if(n==="object")return{};if(n==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key||this.formname)}},{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(n){var c=[],e={};n.forEach((function(s){s.title&&(e[s.title]=e[s.title]||0,e[s.title]++),s.description&&(e[s.description]=e[s.description]||0,e[s.description]++),s.format&&(e[s.format]=e[s.format]||0,e[s.format]++),s.type&&(e[s.type]=e[s.type]||0,e[s.type]++)})),n.forEach((function(s){var u;u=typeof s=="string"?s:s.title&&e[s.title]<=1?s.title:s.format&&e[s.format]<=1?s.format:s.type&&e[s.type]<=1?s.type:s.description&&e[s.description]<=1?s.description:s.title?s.title:s.format?s.format:s.type?s.type:s.description?s.description:JSON.stringify(s).length<500?JSON.stringify(s):"type",c.push(u)}));var t={};return c.forEach((function(s,u){t[s]=t[s]||0,t[s]++,e[s]>1&&(c[u]="".concat(s," ").concat(t[s]))})),c}},{key:"getValidId",value:function(n){return(n=n===void 0?"":n.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(n,c){if(this.schema.options&&this.schema.options.inputAttributes){var e=this.schema.options.inputAttributes,t=["name","type"].concat(n),s=c||this.input;Object.keys(e).forEach((function(u){t.includes(u.toLowerCase())||s.setAttribute(u,e[u])}))}}},{key:"setContainerAttributes",value:function(){var n=this;if(this.schema.options&&this.schema.options.containerAttributes){var c=this.schema.options.containerAttributes,e=["data-schemapath","data-schematype","data-schemaid"];Object.keys(c).forEach((function(t){e.includes(t.toLowerCase())||n.container.setAttribute(t,c[t])}))}}},{key:"expandCallbacks",value:function(n,c){var e=this,t=this.defaults.callbacks[n];return Object.entries(c).forEach((function(s){var u,k,T=(k=2,(function(q){if(Array.isArray(q))return q})(u=s)||(function(q,Q){var X=q==null?null:typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(X!=null){var le,ye,xe,Pe,Be=[],Ke=!0,tt=!1;try{if(xe=(X=X.call(q)).next,Q===0){if(Object(X)!==X)return;Ke=!1}else for(;!(Ke=(le=xe.call(X)).done)&&(Be.push(le.value),Be.length!==Q);Ke=!0);}catch(we){tt=!0,ye=we}finally{try{if(!Ke&&X.return!=null&&(Pe=X.return(),Object(Pe)!==Pe))return}finally{if(tt)throw ye}}return Be}})(u,k)||(function(q,Q){if(q){if(typeof q=="string")return C(q,Q);var X=Object.prototype.toString.call(q).slice(8,-1);return X==="Object"&&q.constructor&&(X=q.constructor.name),X==="Map"||X==="Set"?Array.from(q):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?C(q,Q):void 0}})(u,k)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),N=T[0],B=T[1];B===Object(B)?c[N]=e.expandCallbacks(n,B):typeof B=="string"&&R(t)==="object"&&typeof t[B]=="function"&&(c[N]=t[B].bind(null,e))})),c}},{key:"showValidationErrors",value:function(n){}}],r&&A(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function M(l){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},M(l)}function V(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,G(c.key),c)}}function G(l){var r=(function(n,c){if(M(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(M(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return M(r)=="symbol"?r:r+""}function J(l,r,n){return r=ue(r),(function(c,e){if(e&&(M(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Y()?Reflect.construct(r,n||[],ue(l).constructor):r.apply(l,n))}function Y(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Y=function(){return!!l})()}function se(){return se=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ue(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},se.apply(this,arguments)}function ue(l){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ue(l)}function he(l,r){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},he(l,r)}var de=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),J(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){se(ue(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){se(ue(r.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(e,t,s){if(e=this.applyConstFilter(e),(!this.template||s)&&(this.shouldBeUnset()||e!=null?M(e)==="object"?e=JSON.stringify(e):this.shouldBeUnset()||typeof e=="string"||(e="".concat(e)):e="",e!==this.serialized)){var u=this.sanitize(e);if(this.input.value!==u){if(this.setValueToInputField(u),this.format==="range"){var k=this.control.querySelector("output");k&&(k.value=u)}var T=s||this.getValue()!==e;return this.refreshValue(),t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),T&&this.onChange(!0,s),{changed:T,value:u}}}}},{key:"setValueToInputField",value:function(e){this.input.value=e===void 0?"":e}},{key:"getNumColumns",value:function(){var e,t=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return e=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(t,e))}},{key:"build",value:function(){var e,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 s=this.schema.minimum||0,u=this.schema.maximum||Math.max(100,s+1),k=1;this.schema.multipleOf&&(s%this.schema.multipleOf&&(s=Math.ceil(s/this.schema.multipleOf)*this.schema.multipleOf),u%this.schema.multipleOf&&(u=Math.floor(u/this.schema.multipleOf)*this.schema.multipleOf),k=this.schema.multipleOf),this.input=this.theme.getRangeInput(s,u,k,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);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(Q){if(Q.preventDefault(),Q.stopPropagation(),t.schema.template)Q.currentTarget.value=t.value;else{var X=Q.currentTarget.value,le=t.sanitize(X);X!==le&&(Q.currentTarget.value=le),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(Q){if(Q){var X,le=Q.offsetHeight;if(Q.offsetHeight<Q.scrollHeight)for(X=0;Q.offsetHeight<Q.scrollHeight+3&&!(X>100);)X++,le++,Q.style.height="".concat(le,"px");else{for(X=0;Q.offsetHeight>=Q.scrollHeight+3&&!(X>100);)X++,le--,Q.style.height="".concat(le,"px");Q.style.height="".concat(le+1,"px")}}},this.input.addEventListener("keyup",(function(Q){t.adjust_height(Q.currentTarget)})),this.input.addEventListener("change",(function(Q){t.adjust_height(Q.currentTarget)})),this.adjust_height());var T=(e=this.options.prompt_paste_max_length_reached)!==null&&e!==void 0?e:this.jsoneditor.options.prompt_paste_max_length_reached,N=this.schema.maxLength!==void 0;T&&N&&this.input.addEventListener("paste",(function(Q){(Q.clipboardData||window.clipboardData).getData("text").length+t.input.value.length>t.schema.maxLength&&alert(t.translate("paste_max_length_reached",[t.schema.maxLength]))})),this.format&&this.input.setAttribute("data-schemaformat",this.format);var B=this.input;if(this.format==="range"&&(B=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,B,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 q=this.expandCallbacks("template",{template:this.schema.template});typeof q.template=="function"?this.template=q.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(e){var t=this.expandCallbacks("cleave",b({},this.defaults.options.cleave||{},this.options.cleave||{}));M(t)==="object"&&Object.keys(t).length>0&&(this.cleave_instance=new window.Cleave(e,t))}},{key:"setupImask",value:function(e){var t=this.expandCallbacks("imask",b({},this.defaults.options.imask||{},this.options.imask||{}));M(t)==="object"&&Object.keys(t).length>0&&(this.imask_instance=window.IMask(e,this.ajustIMaskOptions(t)))}},{key:"ajustIMaskOptions",value:function(e){var t=this;return Object.keys(e).forEach((function(s){if(e[s]===Object(e[s]))e[s]=t.ajustIMaskOptions(e[s]);else if(s==="mask")if(e[s].substr(0,6)==="regex:"){var u=e[s].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(u!==null)try{e[s]=new RegExp(u[1],u[2])}catch{}}else e[s]=t.getGlobalPropertyFromString(e[s])})),e}},{key:"getGlobalPropertyFromString",value:function(e){if(e.includes(".")){var t=e.split("."),s=t[0],u=t[1];if(window[s]!==void 0&&window[s][u]!==void 0)return window[s][u]}else if(window[e]!==void 0)return window[e];return e}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var e=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||e)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:se(ue(r.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,se(ue(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,se(ue(r.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),se(ue(r.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(e){return e}},{key:"onWatchedFieldChange",value:function(){var e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),se(ue(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=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 s=e.reduce((function(u,k){return k.path===t.path&&u.push(k.message),u}),[]);s.length?this.theme.addInputError(this.input,"".concat(s.join(". "),".")):this.theme.removeInputError(this.input)}}])&&V(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function be(l){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},be(l)}function ie(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,H(c.key),c)}}function H(l){var r=(function(n,c){if(be(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(be(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return be(r)=="symbol"?r:r+""}function te(l,r,n){return r=F(r),(function(c,e){if(e&&(be(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,z()?Reflect.construct(r,n||[],F(l).constructor):r.apply(l,n))}function z(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(z=function(){return!!l})()}function $(){return $=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=F(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},$.apply(this,arguments)}function F(l){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(l)}function ee(l,r){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ee(l,r)}var ge=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),te(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=$(F(r.prototype),"setValue",this).call(this,e,t,s);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",$(F(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;if(window.ace){var s=this.input_type;s!=="cpp"&&s!=="c++"&&s!=="c"||(s="c_cpp"),e=this.expandCallbacks("ace",b({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(s)})),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,e),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(){t.input.value=t.ace_editor_instance.getValue(),t.refreshValue(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)}else $(F(r.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),$(F(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),$(F(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),$(F(r.prototype),"destroy",this).call(this)}}])&&ie(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function _e(l){return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_e(l)}function je(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,ve(c.key),c)}}function ve(l){var r=(function(n,c){if(_e(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(_e(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return _e(r)=="symbol"?r:r+""}function U(l,r,n){return r=ce(r),(function(c,e){if(e&&(_e(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,W()?Reflect.construct(r,n||[],ce(l).constructor):r.apply(l,n))}function W(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(W=function(){return!!l})()}function ne(){return ne=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ce(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ne.apply(this,arguments)}function ce(l){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ce(l)}function pe(l,r){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},pe(l,r)}y(2008),y(4554);var Oe=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),U(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pe(e,t)})(r,l),n=r,c=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"register",value:function(){ne(ce(r.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){ne(ce(r.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach((function(e){return e.unregister()}))}},{key:"getNumColumns",value:function(){var e=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,e.width+2),4):e.width}},{key:"enable",value:function(){var e=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach((function(t){t.enable(),e.setAvailability(t,!1)})),ne(ce(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){var t=this;e&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach((function(s){s.disable(e),t.setAvailability(s,!0)})),ne(ce(r.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(e,t){e.add_row_button&&(e.add_row_button.disabled=t),e.remove_all_rows_button&&(e.remove_all_rows_button.disabled=t),e.delete_last_row_button&&(e.delete_last_row_button.disabled=t),e.copy_button&&(e.copy_button.disabled=t),e.delete_button&&(e.delete_button.disabled=t),e.moveup_button&&(e.moveup_button.disabled=t),e.movedown_button&&(e.movedown_button.disabled=t)}},{key:"preBuild",value:function(){ne(ce(r.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("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()}},{key:"postBuild",value:function(){ne(ce(r.prototype),"postBuild",this).call(this),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),this.refreshTabs(!0),this.is_dirty=!0,ne(ce(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var e=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(e.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(e){return Array.isArray(this.schema.items)?e>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?b({},this.schema.additionalItems):void 0:b({},this.schema.items[e]):this.schema.items?b({},this.schema.items):{}}},{key:"getItemInfo",value:function(e){var t=this.getItemSchema(e);this.item_info=this.item_info||{};var s=JSON.stringify(t);return this.item_info[s]!==void 0||(t=this.jsoneditor.expandRefs(t),this.item_info[s]={title:this.translateProperty(t.title)||this.translate("default_array_item_title"),default:t.default,width:12,child_editors:t.properties||t.items}),this.item_info[s]}},{key:"getElementEditor",value:function(e){var t=this.getItemInfo(e),s=this.getItemSchema(e);(s=this.jsoneditor.expandRefs(s)).title="".concat(t.title," ").concat(e+1);var u,k=this.jsoneditor.getEditorClass(s);this.tabs_holder?(u=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(e):u=t.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(u);var T=this.jsoneditor.createEditor(k,{jsoneditor:this.jsoneditor,schema:s,container:u,path:"".concat(this.path,".").concat(e),parent:this,required:!0});return T.preBuild(),T.build(),T.postBuild(),T.title_controls||(T.array_controls=this.theme.getButtonHolder(),u.appendChild(T.array_controls)),T}},{key:"checkParent",value:function(e){return e&&e.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,ne(ce(r.prototype),"destroy",this).call(this)}},{key:"empty",value:function(e){var t=this;if(this.rows!==null){if(this.rows.forEach((function(u,k){e&&(t.checkParent(u.tab)&&u.tab.parentNode.removeChild(u.tab),t.destroyRow(u,!0),t.row_cache[k]=null),t.rows[k]=null})),e)for(var s=this.rows.length;s<this.row_cache.length;s++)this.destroyRow(this.row_cache[s],!0),this.row_cache[s]=null;this.rows=[],e&&(this.row_cache=[])}}},{key:"destroyRow",value:function(e,t){var s=e.container;t?(e.destroy(),s.parentNode&&s.parentNode.removeChild(s),this.checkParent(e.tab)&&e.tab.parentNode.removeChild(e.tab)):(e.tab&&(e.tab.style.display="none"),s.style.display="none",e.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(e){var t=this;this.rows.forEach((function(s){s.tab&&(e?s.tab_text.textContent=s.getHeaderText():s.tab===t.active_tab?t.theme.markTabActive(s):t.theme.markTabInactive(s))}))}},{key:"ensureArraySize",value:function(e){if(Array.isArray(e)||(e=[e]),this.schema.minItems)for(;e.length<this.schema.minItems;)e.push(this.getItemInfo(e.length).default);return this.getMax()&&e.length>this.getMax()&&(e=e.slice(0,this.getMax())),e}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){t.forEach((function(N,B){if(e.rows[B])e.rows[B].setValue(N,s);else if(e.row_cache[B])e.rows[B]=e.row_cache[B],e.rows[B].setValue(N,s),e.rows[B].container.style.display="",e.rows[B].tab&&(e.rows[B].tab.style.display=""),e.rows[B].register(),e.jsoneditor.trigger("addRow",e.rows[B]);else{var q=e.addRow(N,s);e.jsoneditor.trigger("addRow",q)}}));for(var u=t.length;u<this.rows.length;u++)this.destroyRow(this.rows[u]),this.rows[u]=null;this.rows=this.rows.slice(0,t.length);var k=this.rows.find((function(N){return N.tab===e.active_tab})),T=k!==void 0?k.tab:null;!T&&this.rows.length&&(T=this.rows[0].tab),this.active_tab=T,this.refreshValue(s),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}else s&&this.refreshValue(s)}},{key:"setButtonState",value:function(e,t){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:e.style.display=t?"":"none";break;case 2:e.disabled=!t}}},{key:"setupButtons",value:function(e){var t=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var s=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,s),t.push(s)}else{var u=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,u),t.push(u);var k=!(e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,k),t.push(k)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var T=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,T),t.push(T),t.some((function(N){return N}))}},{key:"refreshValue",value:function(e){var t=this,s=this.value?this.value.length:0;if(this.value=this.rows.map((function(k){return k.getValue()})),s!==this.value.length||e){var u=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(k,T){if(k.movedown_button){var N=T!==t.rows.length-1;t.setButtonState(k.movedown_button,N)}k.delete_button&&t.setButtonState(k.delete_button,!u),t.value[T]=k.getValue()})),this.setupButtons(u)&&!this.collapsed?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(e,t){var s=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(T){s.active_tab=s.rows[u].tab,s.refreshTabs(),T.preventDefault(),T.stopPropagation()})),this._supportDragDrop(this.rows[u].tab)):this._supportDragDrop(this.rows[u].container,!0);var k=this.rows[u].title_controls||this.rows[u].array_controls;return this.hide_delete_buttons||(this.rows[u].delete_button=this._createDeleteButton(u,k)),this.show_copy_button&&(this.rows[u].copy_button=this._createCopyButton(u,k)),u&&!this.hide_move_buttons&&(this.rows[u].moveup_button=this._createMoveUpButton(u,k)),this.hide_move_buttons||(this.rows[u].movedown_button=this._createMoveDownButton(u,k)),e!==void 0&&this.rows[u].setValue(e,t),this.refreshTabs(),this.rows[u]}},{key:"_createDeleteButton",value:function(e,t){var s=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",e),u.addEventListener("click",(function(k){if(k.preventDefault(),k.stopPropagation(),!s.askConfirmation())return!1;var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue().filter((function(Q,X){return X!==T})),B=null,q=s.rows[T].getValue();s.setValue(N),s.rows[T]?B=s.rows[T].tab:s.rows[T-1]&&(B=s.rows[T-1].tab),B&&(s.active_tab=B,s.refreshTabs()),s.onChange(!0),s.jsoneditor.trigger("deleteRow",q)})),t&&t.appendChild(u),u}},{key:"_createCopyButton",value:function(e,t){var s=this,u=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),k=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(T){var N=s.getValue();T.preventDefault(),T.stopPropagation();var B=1*T.currentTarget.getAttribute("data-i");N.forEach((function(q,Q){if(Q===B){if(k.items.type==="string"&&k.items.format==="uuid")q=S();else if(k.items.type==="object"&&k.items.properties)for(var X=0,le=Object.keys(q);X<le.length;X++){var ye=le[X];k.items.properties&&k.items.properties[ye]&&k.items.properties[ye].format==="uuid"&&(q[ye]=S())}N.push(q)}})),s.setValue(N),s.refreshValue(!0),s.onChange(!0),s.jsoneditor.trigger("copyRow",s.rows[B-1])})),t.appendChild(u),u}},{key:"_createMoveUpButton",value:function(e,t){var s=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",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i");if(!(T<=0)){var N=s.getValue(),B=N[T-1];N[T-1]=N[T],N[T]=B,s.setValue(N),s.active_tab=s.rows[T-1].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T-1])}})),t&&t.appendChild(u),u}},{key:"_createMoveDownButton",value:function(e,t){var s=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",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue();if(!(T>=N.length-1)){var B=N[T+1];N[T+1]=N[T],N[T]=B,s.setValue(N),s.active_tab=s.rows[T+1].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T+1])}})),t&&t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e,t){var s=this;$e(e,(function(u,k){var T=s.getValue(),N=T[u];T.splice(u,1),T.splice(k,0,N),s.setValue(T),s.active_tab=s.rows[k].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[k])}),{useTrigger:t})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&w(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 e=this,t=this.getButton("","collapse","button_collapse");t.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(t,this.title.childNodes[0]);var s=this.row_holder.style.display,u=this.controls.style.display;return t.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation(),e.panel&&e.setButtonState(e.panel,e.collapsed),e.tabs_holder&&e.setButtonState(e.tabs_holder,e.collapsed),e.collapsed?(e.collapsed=!1,e.row_holder.style.display=s,e.controls.style.display=u,e.setButtonText(k.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.row_holder.style.display="none",e.controls.style.display="none",e.setButtonText(k.currentTarget,"","expand","button_expand"))})),t}},{key:"_createAddRowButton",value:function(){var e=this,t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",(function(s){s.preventDefault(),s.stopPropagation();var u,k=e.rows.length;e.row_cache[k]?(u=e.rows[k]=e.row_cache[k],e.rows[k].setValue(e.rows[k].getDefault(),!0),typeof e.rows[k].deactivateNonRequiredProperties=="function"&&e.rows[k].deactivateNonRequiredProperties(!0),e.rows[k].container.style.display="",e.rows[k].tab&&(e.rows[k].tab.style.display=""),e.rows[k].register()):u=e.addRow(),e.active_tab=e.rows[k].tab,e.refreshTabs(),e.refreshValue(),e.onChange(!0),e.jsoneditor.trigger("addRow",u)})),this.controls.appendChild(t),t}},{key:"_createDeleteLastRowButton",value:function(){var e=this,t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue(),k=null,T=u.pop();e.setValue(u),e.rows[e.rows.length-1]&&(k=e.rows[e.rows.length-1].tab),k&&(e.active_tab=k,e.refreshTabs()),e.onChange(!0),e.jsoneditor.trigger("deleteRow",T)})),this.controls.appendChild(t),t}},{key:"_createRemoveAllRowsButton",value:function(){var e=this,t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue();e.empty(!0),e.setValue([]),e.onChange(!0),e.jsoneditor.trigger("deleteAllRows",u)})),this.controls.appendChild(t),t}},{key:"showValidationErrors",value:function(e){var t=this,s=[],u=[];e.forEach((function(k){k.path===t.path?s.push(k):u.push(k)})),this.error_holder&&(s.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s.forEach((function(k){t.error_holder.appendChild(t.theme.getErrorMessage(k.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(k){return k.showValidationErrors(u)}))}}],c&&je(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function $e(l,r){(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).useTrigger?l.addEventListener("mousedown",(function(n){if(n.ctrlKey){l.draggable=!0;var c=function e(t){l.draggable=!1,document.removeEventListener("dragend",e),document.removeEventListener("mouseup",e)};document.addEventListener("dragend",c),document.addEventListener("mouseup",c)}})):l.draggable=!0,l.addEventListener("dragstart",(function(n){window.curDrag=l})),l.addEventListener("dragover",(function(n){window.curDrag===null||window.curDrag===l||window.curDrag.parentElement!==l.parentElement?n.dataTransfer.dropEffect="none":n.dataTransfer.dropEffect="move",n.preventDefault()})),l.addEventListener("drop",(function(n){if(n.preventDefault(),n.stopPropagation(),window.curDrag!==null&&window.curDrag!==l&&window.curDrag.parentElement===l.parentElement){var c=function(s){for(var u=0,k=s.parentElement.firstElementChild;k!==s&&k!==null;)k=k.nextSibling,++u;return u},e=c(window.curDrag),t=c(l);r(e,t,window.curDrag,l),window.curDrag=null}}))}function Fe(l){return Fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fe(l)}function Ze(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Ye(c.key),c)}}function Ye(l){var r=(function(n,c){if(Fe(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fe(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fe(r)=="symbol"?r:r+""}function Ae(l,r,n){return r=nt(r),(function(c,e){if(e&&(Fe(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Qe()?Reflect.construct(r,n||[],nt(l).constructor):r.apply(l,n))}function Qe(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qe=function(){return!!l})()}function De(){return De=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=nt(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},De.apply(this,arguments)}function nt(l){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nt(l)}function me(l,r){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},me(l,r)}Oe.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var Ee=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Ae(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)})(r,l),n=r,(c=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){De(nt(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){De(nt(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var e=this,t=this.getTitle().length;return Object.keys(this.select_values).forEach((function(s){return t=Math.max(t,"".concat(e.select_values[s]).length+4)})),Math.min(12,Math.max(t/7,2))}},{key:"preBuild",value:function(){var e;De(nt(r.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var t=this.jsoneditor.expandRefs(this.schema.items||{}),s=t.enum||[],u=t.options&&t.options.enum||[],k=t.options&&t.options.enum_titles||[];for(e=0;e<s.length;e++)if(this.sanitize(s[e])===s[e]){var T=u[e]||{};"title"in T||(T.title="".concat(k[e]||s[e])),this.option_keys.push("".concat(s[e])),this.option_enum.push(T),this.select_values["".concat(s[e])]=s[e]}}},{key:"build",value:function(){var e,t=this;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={},e=0;e<this.option_keys.length;e++){var s=this.formname+e.toString();this.inputs[this.option_keys[e]]=this.theme.getCheckbox(),this.inputs[this.option_keys[e]].id=s,this.select_options[this.option_keys[e]]=this.inputs[this.option_keys[e]];var u=this.theme.getCheckboxLabel(this.option_enum[e].title);if(u.htmlFor=s,this.option_enum[e].infoText){var k=this.theme.getInfoButton(this.translateProperty(this.option_enum[e].infoText));u.appendChild(k)}this.controls["_"+this.option_keys[e]]=this.theme.getFormControl(u,this.inputs[this.option_keys[e]])}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((function(T){return T.title}))),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),e=0;e<this.option_keys.length;e++)this.select_options[this.option_keys[e]]=this.input.children[e];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=function(T){var N=[];for(e=0;e<t.option_keys.length;e++)t.select_options[t.option_keys[e]]&&(t.select_options[t.option_keys[e]].selected||t.select_options[t.option_keys[e]].checked)&&N.push(t.select_values[t.option_keys[e]]);t.updateValue(N),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"postBuild",value:function(){De(nt(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(e,t){var s=this;e=(e=this.applyConstFilter(e))||[],Array.isArray(e)||(e=[e]),e=e.map((function(u){return"".concat(u)})),Object.keys(this.select_options).forEach((function(u){s.select_options[u][s.input_type==="select"?"selected":"checked"]=e.includes(u)})),this.updateValue(e),this.onChange(!0)}},{key:"removeValue",value:function(e){e=[].concat(e),this.setValue(this.getValue().filter((function(t){return!e.includes(t)})))}},{key:"addValue",value:function(e){this.setValue(this.getValue().concat(e))}},{key:"updateValue",value:function(e){for(var t=!1,s=[],u=0;u<e.length;u++)if(this.select_options["".concat(e[u])]){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}else t=!0;return this.value=s,t}},{key:"sanitize",value:function(e){return this.schema.items.type==="boolean"?!!e:this.schema.items.type==="number"?1*e||0:this.schema.items.type==="integer"?Math.floor(1*e||0):"".concat(e)}},{key:"enable",value:function(){var e=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach((function(t){return e.inputs[t].disabled=!1})),De(nt(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){var t=this;e&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach((function(s){return t.inputs[s].disabled=!0})),De(nt(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){De(nt(r.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(e){var t=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),s=e.reduce((function(u,k){return k.path.match(t)&&u.push(k.message),u}),[]);s.length?this.theme.addInputError(this.input||this.inputs,"".concat(s.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&Ze(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Se(l){return Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Se(l)}function qe(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,it(c.key),c)}}function it(l){var r=(function(n,c){if(Se(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Se(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Se(r)=="symbol"?r:r+""}function Et(l,r,n){return r=_t(r),(function(c,e){if(e&&(Se(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ct()?Reflect.construct(r,n||[],_t(l).constructor):r.apply(l,n))}function Ct(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ct=function(){return!!l})()}function Lt(){return Lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=_t(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Lt.apply(this,arguments)}function _t(l){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_t(l)}function At(l,r){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},At(l,r)}var zt=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Et(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&At(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){this.choices_instance?(e=this.applyConstFilter(e),e=[].concat(e).map((function(s){return"".concat(s)})),this.updateValue(e),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):Lt(_t(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",b({},{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=function(s){var u=e.choices_instance.getValue(!0);e.updateValue(u),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}Lt(_t(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,s=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}return this.value=s,t}},{key:"addNewOption",value:function(e){return this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.schema.items.enum.push(e),this.choices_instance.setChoices([{value:"".concat(e),label:"".concat(e)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Lt(_t(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),Lt(_t(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Lt(_t(r.prototype),"destroy",this).call(this)}}])&&qe(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ee);function $t(l){return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$t(l)}function Ei(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Bn(c.key),c)}}function Bn(l){var r=(function(n,c){if($t(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if($t(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return $t(r)=="symbol"?r:r+""}function Ie(l,r,n){return r=Je(r),(function(c,e){if(e&&($t(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ge()?Reflect.construct(r,n||[],Je(l).constructor):r.apply(l,n))}function Ge(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ge=function(){return!!l})()}function Ve(){return Ve=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Je(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ve.apply(this,arguments)}function Je(l){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Je(l)}function Ot(l,r){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ot(l,r)}var oo=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Ie(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.select2_instance?(e=[].concat(e).map((function(s){return"".concat(s)})),this.updateValue(e),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Ve(Je(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e,t=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(e=this.expandCallbacks("select2",b({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=e.tags=!!e.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=O(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var s=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(s),t.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Ve(Je(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,s=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}return this.value=s,t}},{key:"addNewOption",value:function(e){this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.schema.items.enum.push(e);var t=this.input.querySelector('option[value="'.concat(e,'"]'));return t?t.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(e,e,!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)),Ve(Je(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Ve(Je(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ve(Je(r.prototype),"destroy",this).call(this)}}])&&Ei(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ee);function He(l){return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},He(l)}function yt(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,qt(c.key),c)}}function qt(l){var r=(function(n,c){if(He(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(He(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return He(r)=="symbol"?r:r+""}function fr(l,r,n){return r=kt(r),(function(c,e){if(e&&(He(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,wt()?Reflect.construct(r,n||[],kt(l).constructor):r.apply(l,n))}function wt(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(wt=function(){return!!l})()}function ht(){return ht=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=kt(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ht.apply(this,arguments)}function kt(l){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kt(l)}function kn(l,r){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},kn(l,r)}var fc=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),fr(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kn(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.selectize_instance?(e=[].concat(e).map((function(s){return"".concat(s)})),this.updateValue(e),this.selectize_instance.setValue(this.value),this.onChange(!0)):ht(kt(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e,t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){e=this.expandCallbacks("selectize",b({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=e.create=!!e.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(T){var N=t.selectize_instance.getValue();t.updateValue(N),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);var s=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),s.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(s,this.input);var u=this.selectize_instance.$control[0];if(u){var k=this.theme.getHiddenLabel(this.formname);k.setAttribute("for",this.formname+"-selectized"),u.appendChild(k)}}ht(kt(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,s=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var k=this.sanitize(this.select_values[e[u]]);s.push(k),k!==e[u]&&(t=!0)}return this.value=s,t}},{key:"addNewOption",value:function(e){return this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.selectize_instance.addOption({text:e,value:e}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),ht(kt(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),ht(kt(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),ht(kt(r.prototype),"destroy",this).call(this)}}])&&yt(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ee);function Fn(l){return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fn(l)}function ba(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,pc(c.key),c)}}function pc(l){var r=(function(n,c){if(Fn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fn(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fn(r)=="symbol"?r:r+""}function ga(l,r,n){return r=Yr(r),(function(c,e){if(e&&(Fn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ys()?Reflect.construct(r,n||[],Yr(l).constructor):r.apply(l,n))}function Ys(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ys=function(){return!!l})()}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Yr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Oi.apply(this,arguments)}function Yr(l){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yr(l)}function ao(l,r){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ao(l,r)}var mc=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ga(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ao(e,t)})(r,l),n=r,(c=[{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)),Oi(Yr(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var e,t=this;window.Autocomplete&&!this.autocomplete_instance&&(e=this.expandCallbacks("autocomplete",b({},{search:function(s){return console.log('No "search" callback defined for autocomplete in property "'.concat(s.key,'"')),[]},onSubmit:function(){t.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(e.baseClass),this.autocomplete_dropdown.classList.add("".concat(e.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,e)),Oi(Yr(r.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),Oi(Yr(r.prototype),"destroy",this).call(this)}}])&&ba(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function Nt(l){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Nt(l)}function Wt(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,so(c.key),c)}}function so(l){var r=(function(n,c){if(Nt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Nt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Nt(r)=="symbol"?r:r+""}function yc(l,r,n){return r=Mn(r),(function(c,e){if(e&&(Nt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Gf()?Reflect.construct(r,n||[],Mn(l).constructor):r.apply(l,n))}function Gf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Gf=function(){return!!l})()}function _a(){return _a=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Mn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},_a.apply(this,arguments)}function Mn(l){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mn(l)}function vc(l,r){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},vc(l,r)}var h_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),yc(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vc(e,t)})(r,l),n=r,(c=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(e){var t=this;e.addEventListener("load",(function(s){if(t.count===t.current_item_index)t.value[t.count][t.key]=s.target.result;else{var u={};for(var k in t.parent.schema.properties)u[k]="";u[t.key]=s.target.result,t.value.splice(t.count,0,u)}t.count+=1,t.count===t.total+t.current_item_index&&t.arrayEditor.setValue(t.value)}))}},{key:"build",value:function(){var e=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(s){if(s.preventDefault(),s.stopPropagation(),s.currentTarget.files&&s.currentTarget.files.length)if(s.currentTarget.files.length>1&&e.schema.options&&e.schema.options.multiple&&e.schema.options.multiple===!0&&e.parent&&e.parent.schema.type==="object"&&e.parent.parent&&e.parent.parent.schema.type==="array"){e.arrayEditor=e.jsoneditor.getEditor(e.parent.parent.path),e.value=e.arrayEditor.getValue(),e.total=s.currentTarget.files.length,e.current_item_index=parseInt(e.parent.key),e.count=e.current_item_index;for(var u=0;u<e.total;u++){var k=new FileReader;e.setFileReaderListener(k),k.readAsDataURL(s.currentTarget.files[u])}}else{var T=new FileReader;T.onload=function(N){e.value=N.target.result,e.refreshPreview(),e.onChange(!0),T=null},T.readAsDataURL(s.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 t=this.getButton("button_upload","upload","button_upload");t.addEventListener("click",(function(){e.uploader.click()})),this.control.appendChild(t),this.setInputAttributes(["multiple"],t)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var e=this.value.match(/^data:([^;,]+)[;,]/);if(e&&(e=e[1]),e){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(e,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),e.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.src=this.value,this.preview.appendChild(t)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),_a(Mn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),_a(Mn(r.prototype),"disable",this).call(this)}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(e)?this.value=this.schema.enum[0]:this.value=e,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),_a(Mn(r.prototype),"destroy",this).call(this)}}])&&Wt(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function lo(l){return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lo(l)}function f_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,p_(c.key),c)}}function p_(l){var r=(function(n,c){if(lo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(lo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return lo(r)=="symbol"?r:r+""}function m_(l,r,n){return r=Vn(r),(function(c,e){if(e&&(lo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Jf()?Reflect.construct(r,n||[],Vn(l).constructor):r.apply(l,n))}function Jf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Jf=function(){return!!l})()}function wa(){return wa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Vn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},wa.apply(this,arguments)}function Vn(l){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vn(l)}function bc(l,r){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},bc(l,r)}var Kf=(function(l){function r(e,t){var s;return(function(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")})(this,r),(s=m_(this,r,[e,t])).active=!1,s.isUiOnly=!0,s.parent&&s.parent.schema&&(Array.isArray(s.parent.schema.required)?s.parent.schema.required.includes(s.key)||s.parent.schema.required.push(s.key):s.parent.schema.required=[s.key]),s}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){var e=this;this.options.compact=!0;var t=this.expandCallbacks("button",b({},{icon:"",validated:!1,align:"left",action:function(u,k){window.alert('No button action defined for "'.concat(u.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),s=this.translateProperty(t.text||this.schema.title)||this.key;this.input=this.getButton(s,t.icon,s),typeof t.action!="function"?window.alert('No button action defined for "'.concat(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=function(){e.jsoneditor.validate(e.jsoneditor.getValue()).length>0?e.disable():e.enable()},t.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,wa(Vn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,wa(Vn(r.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,wa(Vn(r.prototype),"destroy",this).call(this)}}])&&f_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function co(l){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},co(l)}function y_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,v_(c.key),c)}}function v_(l){var r=(function(n,c){if(co(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(co(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return co(r)=="symbol"?r:r+""}function b_(l,r,n){return r=Ar(r),(function(c,e){if(e&&(co(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Wf()?Reflect.construct(r,n||[],Ar(l).constructor):r.apply(l,n))}function Wf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Wf=function(){return!!l})()}function zn(){return zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Ar(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},zn.apply(this,arguments)}function Ar(l){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ar(l)}function gc(l,r){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},gc(l,r)}var g_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),b_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=!!(e=this.applyConstFilter(e));var s=this.getValue()!==e;this.value=e,this.input.checked=this.value,t||(this.is_dirty=!0),this.onChange(s)}},{key:"register",value:function(){zn(Ar(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){zn(Ar(r.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:"setOptInCheckbox",value:function(){zn(Ar(r.prototype),"setOptInCheckbox",this).call(this),this.optInAppended&&(this.container.insertBefore(this.optInContainer,this.container.firstChild),this.optInContainer.style.verticalAlign="top",this.control.style.marginTop="0")}},{key:"build",value:function(){var e=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.control.style.display="inline-block",(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.value=t.currentTarget.checked,e.is_dirty=!0,e.onChange(!0)})),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,zn(Ar(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,zn(Ar(r.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),zn(Ar(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,s=this.jsoneditor.options.show_errors,u=s==="change"||s==="interaction";if((s!=="never"||this.is_dirty)&&(!u||this.is_dirty)){var k=e.reduce((function(T,N){return N.path===t.path&&T.push(N.message),T}),[]);this.input.controlgroup=this.control,k.length?this.theme.addInputError(this.input,"".concat(k.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&y_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function uo(l){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uo(l)}function __(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,w_(c.key),c)}}function w_(l){var r=(function(n,c){if(uo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(uo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return uo(r)=="symbol"?r:r+""}function k_(l,r,n){return r=$r(r),(function(c,e){if(e&&(uo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Zf()?Reflect.construct(r,n||[],$r(l).constructor):r.apply(l,n))}function Zf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Zf=function(){return!!l})()}function qn(){return qn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=$r(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},qn.apply(this,arguments)}function $r(l){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$r(l)}function _c(l,r){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},_c(l,r)}y(6910);var ka=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),k_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e);var s=this.typecast(e),u=this.enum_options.length>0&&this.enum_values.includes(s),k=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;if(this.hasPlaceholderOption||u&&(!t||this.isRequired()||k)||(s=this.enum_values[0]),this.value!==s){var T=this.enum_values.indexOf(s);u&&T!==-1?this.input.value=this.enum_options[T]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=s,this.value=s,t||(this.is_dirty=!0),this.onChange(),this.change()}}},{key:"register",value:function(){qn($r(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){qn($r(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var e=this.getTitle().length,t=0;t<this.enum_options.length;t++)e=Math.max(e,this.enum_options[t].length+4);return Math.min(12,Math.max(e/7,2))}},{key:"typecast",value:function(e){return this.schema.type==="boolean"?e==="undefined"||e===void 0?void 0:!!e:this.schema.type==="number"?1*e||0:this.schema.type==="integer"?Math.floor(1*e||0):this.schema.enum&&e===void 0?void 0:"".concat(e)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var e,t,s,u,k=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.hasPlaceholderOption=((e=this.schema)===null||e===void 0||(e=e.options)===null||e===void 0?void 0:e.has_placeholder_option)||!1,this.placeholderOptionText=((t=this.schema)===null||t===void 0||(t=t.options)===null||t===void 0?void 0:t.placeholder_option_text)||" ",this.enforceConst&&this.schema.const){var T=this.schema.const;this.enum_options=["".concat(T)],this.enum_display=["".concat(this.translateProperty(T)||T)],this.enum_values=[this.typecast(T)]}else if(this.schema.enum){var N=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(B,q){k.enum_options[q]="".concat(B),k.enum_display[q]="".concat(k.translateProperty(N[q])||B),k.enum_values[q]=k.typecast(B)}))}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(s=0;s<this.schema.enumSource.length;s++)typeof this.schema.enumSource[s]=="string"?this.enumSource[s]={source:this.schema.enumSource[s]}:Array.isArray(this.schema.enumSource[s])?this.enumSource[s]=this.schema.enumSource[s]:this.enumSource[s]=b({},this.schema.enumSource[s]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(s=0;s<this.enumSource.length;s++)this.enumSource[s].value&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[s].value})).template=="function"?this.enumSource[s].value=u.template:this.enumSource[s].value=this.jsoneditor.compileTemplate(this.enumSource[s].value,this.template_engine)),this.enumSource[s].title&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[s].title})).template=="function"?this.enumSource[s].title=u.template:this.enumSource[s].title=this.jsoneditor.compileTemplate(this.enumSource[s].title,this.template_engine)),this.enumSource[s].filter&&this.enumSource[s].value&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[s].filter})).template=="function"?this.enumSource[s].filter=u.template:this.enumSource[s].filter=this.jsoneditor.compileTemplate(this.enumSource[s].filter,this.template_engine))}}},{key:"build",value:function(){var e=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.hasPlaceholderOption,this.placeholderOptionText),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.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((function(){e.input.parentNode&&e.afterInputReady()}))}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var e,t=this.typecast(this.input.value);(e=this.enum_values.includes(t)?this.enum_values[this.enum_values.indexOf(t)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=e,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var e,t,s=[],u=[];if(this.enumSource){e=this.getWatchedFieldValues();for(var k=0;k<this.enumSource.length;k++)if(Array.isArray(this.enumSource[k]))s=s.concat(this.enumSource[k]),u=u.concat(this.enumSource[k]);else{var T=[];if(T=Array.isArray(this.enumSource[k].source)?this.enumSource[k].source:e[this.enumSource[k].source]){if(this.enumSource[k].slice&&(T=Array.prototype.slice.apply(T,this.enumSource[k].slice)),this.enumSource[k].filter){var N=[];for(t=0;t<T.length;t++)this.enumSource[k].filter({i:t,item:T[t],watched:e})&&N.push(T[t]);T=N}var B=[],q=[];for(t=0;t<T.length;t++){var Q=T[t];this.enumSource[k].value?q[t]=this.typecast(this.enumSource[k].value({i:t,item:Q})):q[t]=T[t],this.enumSource[k].title?B[t]=this.enumSource[k].title({i:t,item:Q}):B[t]=q[t]}this.enumSource[k].sort&&(function(le,ye,xe){le.map((function(Pe,Be){return{v:Pe,t:ye[Be]}})).sort((function(Pe,Be){return Pe.v<Be.v?-xe:Pe.v===Be.v?0:xe})).forEach((function(Pe,Be){le[Be]=Pe.v,ye[Be]=Pe.t}))}).bind(null,q,B,this.enumSource[k].sort==="desc"?1:-1)(),s=s.concat(q),u=u.concat(B)}}var X=this.value;this.theme.setSelectOptions(this.input,s,u),this.enum_options=s,this.enum_display=u,this.enum_values=s,s.includes(X)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=X,this.value=X):(this.input.value=s[0],this.value=this.typecast(s[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}qn($r(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,qn($r(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,qn($r(r.prototype),"disable",this).call(this,e)}},{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),qn($r(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,s=this.jsoneditor.options.show_errors,u=s==="change"||s==="interaction";if((s!=="never"||this.is_dirty)&&(!u||this.is_dirty)){var k=e.reduce((function(T,N){return N.path===t.path&&T.push(N.message),T}),[]);k.length?this.theme.addInputError(this.input,"".concat(k.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&__(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function ho(l){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ho(l)}function j_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,E_(c.key),c)}}function E_(l){var r=(function(n,c){if(ho(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ho(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ho(r)=="symbol"?r:r+""}function O_(l,r,n){return r=Nr(r),(function(c,e){if(e&&(ho(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Yf()?Reflect.construct(r,n||[],Nr(l).constructor):r.apply(l,n))}function Yf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Yf=function(){return!!l})()}function Hn(){return Hn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Nr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Hn.apply(this,arguments)}function Nr(l){return Nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nr(l)}function wc(l,r){return wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wc(l,r)}var Qf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),O_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.choices_instance){var s=this.typecast(e||"");if(this.enum_values.includes(s)||(s=this.enum_values[0]),this.value===s)return;t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(s)],this.choices_instance.setChoiceByValue(this.input.value),this.value=s,this.onChange()}else Hn(Nr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",b({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,e)}Hn(Nr(r.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var e=this;if(Hn(Nr(r.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var t=this.enum_options.map((function(s,u){return{value:s,label:e.enum_display[u]}}));this.choices_instance.setChoices(t,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Hn(Nr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),Hn(Nr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Hn(Nr(r.prototype),"destroy",this).call(this)}}])&&j_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ka);function xi(l){return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xi(l)}function x_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,S_(c.key),c)}}function S_(l){var r=(function(n,c){if(xi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(xi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return xi(r)=="symbol"?r:r+""}function C_(l,r,n){return r=Un(r),(function(c,e){if(e&&(xi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Xf()?Reflect.construct(r,n||[],Un(l).constructor):r.apply(l,n))}function Xf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xf=function(){return!!l})()}function ja(){return ja=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Un(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},ja.apply(this,arguments)}function Un(l){return Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Un(l)}function kc(l,r){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},kc(l,r)}Qf.rules={".choices > *":"box-sizing:border-box"};var P_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),C_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(ja(Un(r.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&&xi(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 e=this.input;if(this.options.flatpickr.wrap===!0){var t=[];if(this.options.flatpickr.showToggleButton!==!1){var s=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");s.setAttribute("data-toggle",""),t.push(s)}if(this.options.flatpickr.showClearButton!==!1){var u=this.getButton("","clear","flatpickr_clear_button");u.setAttribute("data-clear",""),t.push(u)}var k=this.input.parentNode,T=this.input.nextSibling,N=this.theme.getInputGroup(this.input,t);N!==void 0?(this.options.flatpickr.inline=!1,k.insertBefore(N,T),e=N):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(e,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 e=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(e).getTime()/1e3)}}}},{key:"setValue",value:function(e,t,s){if(e=this.applyConstFilter(e),this.schema.type==="string")ja(Un(r.prototype),"setValue",this).call(this,e,t,s),this.flatpickr&&this.flatpickr.setDate(e);else if(e>0){var u=new Date(1e3*e),k=u.getFullYear(),T=this.zeroPad(u.getMonth()+1),N=this.zeroPad(u.getDate()),B=this.zeroPad(u.getHours()),q=this.zeroPad(u.getMinutes()),Q=this.zeroPad(u.getSeconds()),X=[k,T,N].join("-"),le=[B,q,Q].join(":"),ye="".concat(X,"T").concat(le);this.schema.format==="date"?ye=X:this.schema.format==="time"&&(ye=le),this.input.value=ye,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(ye)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,ja(Un(r.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(e){return"0".concat(e).slice(-2)}}])&&x_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function fo(l){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fo(l)}function T_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,R_(c.key),c)}}function R_(l){var r=(function(n,c){if(fo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(fo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return fo(r)=="symbol"?r:r+""}function L_(l,r,n){return r=Ir(r),(function(c,e){if(e&&(fo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,ep()?Reflect.construct(r,n||[],Ir(l).constructor):r.apply(l,n))}function ep(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ep=function(){return!!l})()}function Gn(){return Gn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Ir(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Gn.apply(this,arguments)}function Ir(l){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ir(l)}function jc(l,r){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},jc(l,r)}var A_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),L_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){if(this.editors){for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Gn(Ir(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Gn(Ir(r.prototype),"unregister",this).call(this),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].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 e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].enable();Gn(Ir(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable();Gn(Ir(r.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var e=this,t=this.getWatchedFieldValues();if(t){var s=document.location.origin+document.location.pathname+this.template(t);this.editors[this.refs[s]]||this.buildChildEditor(s),this.currentEditor=this.refs[s],this.register(),this.editors.forEach((function(u,k){u&&(e.currentEditor===k?u.container.style.display="":u.container.style.display="none")})),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(e){this.refs[e]=this.editors.length;var t=this.theme.getChildEditorHolder();this.editor_holder.appendChild(t);var s=b({},this.schema,this.jsoneditor.refs[e]),u=this.jsoneditor.getEditorClass(s,this.jsoneditor),k=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:s,container:t,path:this.path,parent:this,required:!0});this.editors.push(k),k.preBuild(),k.build(),k.postBuild()}},{key:"preBuild",value:function(){var e;for(this.refs={},this.editors=[],this.currentEditor="",e=0;e<this.schema.links.length;e++)if(this.schema.links[e].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[e].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,e).concat(this.schema.links.slice(e+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=b({},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(e,t){this.editors[this.currentEditor]&&this.refreshValue(),Gn(Ir(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(e,t),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach((function(e){e&&e.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Gn(Ir(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){this.editors.forEach((function(t){t&&t.showValidationErrors(e)}))}}])&&T_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Si(l){return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Si(l)}function tp(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function $_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,N_(c.key),c)}}function N_(l){var r=(function(n,c){if(Si(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Si(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Si(r)=="symbol"?r:r+""}function I_(l,r,n){return r=Jn(r),(function(c,e){if(e&&(Si(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,rp()?Reflect.construct(r,n||[],Jn(l).constructor):r.apply(l,n))}function rp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rp=function(){return!!l})()}function Ea(){return Ea=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Jn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ea.apply(this,arguments)}function Jn(l){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jn(l)}function Ec(l,r){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ec(l,r)}var D_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),I_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ec(e,t)})(r,l),n=r,(c=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var e=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.enforceConstEnabled&&this.schema.const?this.enum=[this.schema.const]:this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var t=0;t<this.enum.length;t++)this.select_options[t]=this.options.enum_titles[t]||"Value ".concat(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",(function(s){e.selected=e.select_options.indexOf(s.currentTarget.value),e.value=e.enum[e.selected],e.refreshValue(),e.onChange(!0)})),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var e=this;if(this.enum){this.selected=-1;var t=JSON.stringify(this.value);this.enum.forEach((function(s,u){if(t===JSON.stringify(s))return e.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,Ea(Jn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.switcher.disabled=!0,Ea(Jn(r.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(e){var t,s,u=this;if(e===null)return"<em>null</em>";if(Si(e)==="object"){var k="";return t=e,s=function(T,N){var B=u.getHTML(N);Array.isArray(e)||(B="<div><em>".concat(T,"</em>: ").concat(B,"</div>")),k+="<li>".concat(B,"</li>")},Array.isArray(t)||typeof t.length=="number"&&t.length>0&&t.length-1 in t?Array.from(t).forEach((function(T,N){return s(N,T)})):Object.entries(t).forEach((function(T){var N,B,q=(B=2,(function(le){if(Array.isArray(le))return le})(N=T)||(function(le,ye){var xe=le==null?null:typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(xe!=null){var Pe,Be,Ke,tt,we=[],Ce=!0,at=!1;try{if(Ke=(xe=xe.call(le)).next,ye===0){if(Object(xe)!==xe)return;Ce=!1}else for(;!(Ce=(Pe=Ke.call(xe)).done)&&(we.push(Pe.value),we.length!==ye);Ce=!0);}catch(vt){at=!0,Be=vt}finally{try{if(!Ce&&xe.return!=null&&(tt=xe.return(),Object(tt)!==tt))return}finally{if(at)throw Be}}return we}})(N,B)||(function(le,ye){if(le){if(typeof le=="string")return tp(le,ye);var xe=Object.prototype.toString.call(le).slice(8,-1);return xe==="Object"&&le.constructor&&(xe=le.constructor.name),xe==="Map"||xe==="Set"?Array.from(le):xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe)?tp(le,ye):void 0}})(N,B)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),Q=q[0],X=q[1];return s(Q,X)})),k=Array.isArray(e)?"<ol>".concat(k,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(k,"</ul>")}return typeof e=="boolean"?e?"true":"false":typeof e=="string"?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.value=e,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),Ea(Jn(r.prototype),"destroy",this).call(this)}}])&&$_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ci(l){return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ci(l)}function B_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,F_(c.key),c)}}function F_(l){var r=(function(n,c){if(Ci(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ci(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ci(r)=="symbol"?r:r+""}function M_(l,r,n){return r=Dr(r),(function(c,e){if(e&&(Ci(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,np()?Reflect.construct(r,n||[],Dr(l).constructor):r.apply(l,n))}function np(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(np=function(){return!!l})()}function Kn(){return Kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Dr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Kn.apply(this,arguments)}function Dr(l){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dr(l)}function Oc(l,r){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Oc(l,r)}var V_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),M_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){Kn(Dr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Kn(Dr(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(e,t,s){if(e=this.applyConstFilter(e),(!this.template||s)&&(e==null?e="":Ci(e)==="object"?e=JSON.stringify(e):typeof e!="string"&&(e="".concat(e)),e!==this.serialized)){var u=this.sanitize(e);if(this.input.value!==u){this.input.value=u;var k=s||this.getValue()!==e;this.refreshValue(),t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(k)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Kn(Dr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Kn(Dr(r.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),Kn(Dr(r.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(e){return e}},{key:"onWatchedFieldChange",value:function(){var e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),Kn(Dr(r.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 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()}}])&&B_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function po(l){return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},po(l)}function z_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,q_(c.key),c)}}function q_(l){var r=(function(n,c){if(po(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(po(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return po(r)=="symbol"?r:r+""}function H_(l,r,n){return r=Qs(r),(function(c,e){if(e&&(po(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,ip()?Reflect.construct(r,n||[],Qs(l).constructor):r.apply(l,n))}function ip(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ip=function(){return!!l})()}function Qs(l){return Qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qs(l)}function xc(l,r){return xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},xc(l,r)}var U_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),H_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){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)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}},{key:"disable",value:function(){return!1}},{key:"enable",value:function(){return!1}}])&&z_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Kf);function mo(l){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mo(l)}function G_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,J_(c.key),c)}}function J_(l){var r=(function(n,c){if(mo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(mo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return mo(r)=="symbol"?r:r+""}function K_(l,r,n){return r=yo(r),(function(c,e){if(e&&(mo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,op()?Reflect.construct(r,n||[],yo(l).constructor):r.apply(l,n))}function op(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(op=function(){return!!l})()}function Sc(){return Sc=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=yo(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Sc.apply(this,arguments)}function yo(l){return yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yo(l)}function Cc(l,r){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Cc(l,r)}var ap=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),K_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(Sc(yo(r.prototype),"build",this).call(this),this.schema.minimum!==void 0){var e=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(e+=1),this.input.setAttribute("min",e)}if(this.schema.maximum!==void 0){var t=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(t-=1),this.input.setAttribute("max",t)}if(this.schema.step!==void 0){var s=this.schema.step||1;this.input.setAttribute("step",s)}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(e){if(e==null)return!1;var t=e.match(j),s=parseFloat(e);return t!==null&&!isNaN(s)&&isFinite(s)})(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&G_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function vo(l){return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vo(l)}function W_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Z_(c.key),c)}}function Z_(l){var r=(function(n,c){if(vo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(vo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return vo(r)=="symbol"?r:r+""}function Y_(l,r,n){return r=Xs(r),(function(c,e){if(e&&(vo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,sp()?Reflect.construct(r,n||[],Xs(l).constructor):r.apply(l,n))}function sp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(sp=function(){return!!l})()}function Xs(l){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(l)}function Pc(l,r){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Pc(l,r)}var lp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Y_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pc(e,t)})(r,l),n=r,(c=[{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(e){if(e==null)return!1;var t=e.match(x),s=parseInt(e);return t!==null&&!isNaN(s)&&isFinite(s)})(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&W_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ap);function bo(l){return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bo(l)}function Q_(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,X_(c.key),c)}}function X_(l){var r=(function(n,c){if(bo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(bo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return bo(r)=="symbol"?r:r+""}function e0(l,r,n){return r=go(r),(function(c,e){if(e&&(bo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,cp()?Reflect.construct(r,n||[],go(l).constructor):r.apply(l,n))}function cp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(cp=function(){return!!l})()}function Tc(){return Tc=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=go(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Tc.apply(this,arguments)}function go(l){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},go(l)}function Rc(l,r){return Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Rc(l,r)}var t0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),e0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){if(Tc(go(r.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=b(this.options,this.schema.options||{})}}])&&Q_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function _o(l){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_o(l)}function r0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,n0(c.key),c)}}function n0(l){var r=(function(n,c){if(_o(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(_o(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return _o(r)=="symbol"?r:r+""}function i0(l,r,n){return r=Br(r),(function(c,e){if(e&&(_o(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,up()?Reflect.construct(r,n||[],Br(l).constructor):r.apply(l,n))}function up(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(up=function(){return!!l})()}function Wn(){return Wn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Br(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Wn.apply(this,arguments)}function Br(l){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Br(l)}function Lc(l,r){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Lc(l,r)}var o0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),i0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Wn(Br(r.prototype),"setValue",this).call(this,e,t,s);u!==void 0&&u.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(u.value)}},{key:"build",value:function(){this.options.format="textarea",Wn(Br(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;window.Jodit?(e=this.expandCallbacks("jodit",b({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",(function(){t.value=t.jodit_instance.getEditorValue(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)):Wn(Br(r.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),Wn(Br(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Wn(Br(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Wn(Br(r.prototype),"destroy",this).call(this)}}])&&r0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function a0(l,r,n,c){try{switch(l.format){case"ipv4":(function(e){var t=e.split(".");if(t.length!==4)throw new Error("error_ipv4");t.forEach((function(s){if(isNaN(+s)||+s<0||+s>255)throw new Error("error_ipv4")}))})(r);break;case"ipv6":(function(e){if(!e.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")})(r);break;case"hostname":(function(e){if(!e.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")})(r)}return[]}catch(e){return[{path:n,property:"format",message:c(e.message)}]}}function dp(l,r){var n=Object.keys(l);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(l);r&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),n.push.apply(n,c)}return n}function s0(l,r,n){return(r=hp(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function Fr(l){return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fr(l)}function Oa(l,r){return(function(n){if(Array.isArray(n))return n})(l)||(function(n,c){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,s,u,k,T=[],N=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!(N=(t=u.call(e)).done)&&(T.push(t.value),T.length!==c);N=!0);}catch(q){B=!0,s=q}finally{try{if(!N&&e.return!=null&&(k=e.return(),Object(k)!==k))return}finally{if(B)throw s}}return T}})(l,r)||Ac(l,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32
32
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function jt(l){return(function(r){if(Array.isArray(r))return $c(r)})(l)||(function(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)})(l)||Ac(l)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
33
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ac(l,r){if(l){if(typeof l=="string")return $c(l,r);var n=Object.prototype.toString.call(l).slice(8,-1);return n==="Object"&&l.constructor&&(n=l.constructor.name),n==="Map"||n==="Set"?Array.from(l):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$c(l,r):void 0}}function $c(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function l0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,hp(c.key),c)}}function hp(l){var r=(function(n,c){if(Fr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fr(r)=="symbol"?r:r+""}y(8431),y(7945),y(1278);var fp=(function(){return l=function n(c,e,t,s){(function(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")})(this,n),this.jsoneditor=c,this.schema=e||this.jsoneditor.schema,this.options=t||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired:function(u,k,T){var N=[];if(u.dependentRequired!==void 0){var B=[];Object.keys(u.dependentRequired).forEach((function(q){if(k[q]!==void 0){var Q=u.dependentRequired[q];B=Q.filter((function(X){return!O(k,X)}))}})),B.length>0&&N.push({message:"Must have the required properties: "+B.join(", "),path:T})}return N},dependentSchemas:function(u,k,T){var N=this,B=[];return Object.keys(u.dependentSchemas).forEach((function(q){if(k[q]!==void 0){var Q=u.dependentSchemas[q],X=N._validateSchema(Q,k,T);B=[].concat(jt(B),jt(X))}})),B},contains:function(u,k,T){var N=this,B=[],q=0;k.forEach((function(X){N._validateSchema(u.contains,X,T).length===0&&q++}));var Q=q===0;return u.minContains!==void 0?q<u.minContains&&B.push({message:this.translate("error_minContains",[q,u.minContains],u),path:T}):Q&&B.push({message:this.translate("error_contains",null,u),path:T}),u.maxContains!==void 0&&q>u.maxContains&&B.push({message:this.translate("error_maxContains",[q,u.maxContains],u),path:T}),B},if:function(u,k,T){if(u.then===void 0&&u.else===void 0)return[];var N=this._validateSchema(u.if,k,T),B=[],q=[];return u.then!==void 0&&(B=this._validateSchema(u.then,k,T)),u.else!==void 0&&(q=this._validateSchema(u.else,k,T)),u.if===!0?B:u.if===!1?q:N.length===0?B:N.length>0?q:[]},const:function(u,k,T){return JSON.stringify(u.const)===JSON.stringify(k)?[]:[{path:T,property:"const",message:this.translate("error_const",null,u)}]},enum:function(u,k,T){var N=JSON.stringify(k);return u.enum.some((function(B){return N===JSON.stringify(B)}))?[]:[{path:T,property:"enum",message:this.translate("error_enum",null,u)}]},extends:function(u,k,T){var N=this;return u.extends.reduce((function(B,q){return B.push.apply(B,jt(N._validateSchema(q,k,T))),B}),[])},allOf:function(u,k,T){var N=this;return u.allOf.reduce((function(B,q){return B.push.apply(B,jt(N._validateSchema(q,k,T))),B}),[])},anyOf:function(u,k,T){var N=this;return u.anyOf.some((function(B){return!N._validateSchema(B,k,T).length}))?[]:[{path:T,property:"anyOf",message:this.translate("error_anyOf",null,u)}]},oneOf:function(u,k,T){var N=this,B=0,q=[];u.oneOf.forEach((function(X,le){var ye=N._validateSchema(X,k,T);ye.length||B++,ye.forEach((function(xe){xe.path="".concat(T,".oneOf[").concat(le,"]").concat(xe.path.substr(T.length))})),q.push.apply(q,jt(ye))}));var Q=[];return B!==1&&(Q.push({path:T,property:"oneOf",message:this.translate("error_oneOf",[B],u)}),Q.push.apply(Q,q)),Q},not:function(u,k,T){return this._validateSchema(u.not,k,T).length?[]:[{path:T,property:"not",message:this.translate("error_not",null,u)}]},type:function(u,k,T){var N=this;if(Array.isArray(u.type)){if(!u.type.some((function(B){return N._checkType(B,k)})))return[{path:T,property:"type",message:this.translate("error_type_union",null,u)}]}else if(["date","time","datetime-local"].includes(u.format)&&u.type==="integer"){if(!this._checkType("string","".concat(k)))return[{path:T,property:"type",message:this.translate("error_type",[u.format],u)}]}else if(!this._checkType(u.type,k))return[{path:T,property:"type",message:this.translate("error_type",[u.type],u)}];return[]},disallow:function(u,k,T){var N=this;if(Array.isArray(u.disallow)){if(u.disallow.some((function(B){return N._checkType(B,k)})))return[{path:T,property:"disallow",message:this.translate("error_disallow_union",null,u)}]}else if(this._checkType(u.disallow,k))return[{path:T,property:"disallow",message:this.translate("error_disallow",[u.disallow],u)}];return[]}},this._validateNumberSubSchema={multipleOf:function(u,k,T){return this._validateNumberSubSchemaMultipleDivisible(u,k,T)},divisibleBy:function(u,k,T){return this._validateNumberSubSchemaMultipleDivisible(u,k,T)},maximum:function(u,k,T){var N=u.exclusiveMaximum?k<u.maximum:k<=u.maximum;return window.math?N=window.math[u.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(k),window.math.bignumber(u.maximum)):window.Decimal&&(N=new window.Decimal(k)[u.exclusiveMaximum?"lt":"lte"](new window.Decimal(u.maximum))),N?[]:[{path:T,property:"maximum",message:this.translate(u.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[u.maximum],u)}]},minimum:function(u,k,T){var N=u.exclusiveMinimum?k>u.minimum:k>=u.minimum;return window.math?N=window.math[u.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(k),window.math.bignumber(u.minimum)):window.Decimal&&(N=new window.Decimal(k)[u.exclusiveMinimum?"gt":"gte"](new window.Decimal(u.minimum))),N?[]:[{path:T,property:"minimum",message:this.translate(u.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[u.minimum],u)}]}},this._validateStringSubSchema={maxLength:function(u,k,T){var N=[];return"".concat(k).length>u.maxLength&&N.push({path:T,property:"maxLength",message:this.translate("error_maxLength",[u.maxLength],u)}),N},minLength:function(u,k,T){return"".concat(k).length<u.minLength?[{path:T,property:"minLength",message:this.translate(u.minLength===1?"error_notempty":"error_minLength",[u.minLength],u)}]:[]},pattern:function(u,k,T){return new RegExp(u.pattern).test(k)?[]:[{path:T,property:"pattern",message:u.options&&u.options.patternmessage?u.options.patternmessage:this.translate("error_pattern",[u.pattern],u)}]}},this._validateArraySubSchema={items:function(u,k,T){var N=this,B=[];if(Array.isArray(u.items))for(var q=0;q<k.length;q++)if(u.items[q])B.push.apply(B,jt(this._validateSchema(u.items[q],k[q],"".concat(T,".").concat(q))));else{if(u.additionalItems===!0)break;if(!u.additionalItems){if(u.additionalItems===!1){B.push({path:T,property:"additionalItems",message:this.translate("error_additionalItems",null,u)});break}break}B.push.apply(B,jt(this._validateSchema(u.additionalItems,k[q],"".concat(T,".").concat(q))))}else k.forEach((function(Q,X){B.push.apply(B,jt(N._validateSchema(u.items,Q,"".concat(T,".").concat(X))))}));return B},maxItems:function(u,k,T){return k.length>u.maxItems?[{path:T,property:"maxItems",message:this.translate("error_maxItems",[u.maxItems],u)}]:[]},minItems:function(u,k,T){return k.length<u.minItems?[{path:T,property:"minItems",message:this.translate("error_minItems",[u.minItems],u)}]:[]},uniqueItems:function(u,k,T){for(var N={},B=0;B<k.length;B++){var q=JSON.stringify(k[B]);if(N[q])return[{path:T,property:"uniqueItems",message:this.translate("error_uniqueItems",null,u)}];N[q]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(u,k,T){return Object.keys(k).length>u.maxProperties?[{path:T,property:"maxProperties",message:this.translate("error_maxProperties",[u.maxProperties],u)}]:[]},minProperties:function(u,k,T){return Object.keys(k).length<u.minProperties?[{path:T,property:"minProperties",message:this.translate("error_minProperties",[u.minProperties],u)}]:[]},required:function(u,k,T){var N=this,B=[];return Array.isArray(u.required)&&u.required.forEach((function(q){if(k[q]===void 0){var Q=N.jsoneditor.getEditor("".concat(T,".").concat(q));Q&&Q.dependenciesFulfilled===!1||Q&&["button","info"].includes(Q.schema.format||Q.schema.type)||B.push({path:T,property:"required",message:N.translate("error_required",[u&&u.properties&&u.properties[q]&&u.properties[q].title?u.properties[q].title:q],u)})}})),B},properties:function(u,k,T,N){var B=this,q=[];return Object.entries(u.properties).forEach((function(Q){var X=Ea(Q,2),le=X[0],ye=X[1];N[le]=!0,q.push.apply(q,jt(B._validateSchema(ye,k[le],"".concat(T,".").concat(le))))})),q},patternProperties:function(u,k,T,N){var B=this,q=[];return Object.entries(u.patternProperties).forEach((function(Q){var X=Ea(Q,2),le=X[0],ye=X[1],xe=new RegExp(le);Object.entries(k).forEach((function(Pe){var Be=Ea(Pe,2),Ke=Be[0],tt=Be[1];xe.test(Ke)&&(N[Ke]=!0,q.push.apply(q,jt(B._validateSchema(ye,tt,"".concat(T,".").concat(Ke)))))}))})),q}},this._validateObjectSubSchema2={propertyNames:function(u,k,T,N){for(var B,q=this,Q=[],X=Object.keys(k),le=null,ye=function(){var Pe="";return le=X[xe],typeof u.propertyNames=="boolean"?u.propertyNames===!0?0:(Q.push({path:T,property:"propertyNames",message:q.translate("error_property_names_false",[le],u)}),1):Object.entries(u.propertyNames).every((function(Be){var Ke=Ea(Be,2),tt=Ke[0],we=Ke[1],Ce=!1;switch(tt){case"maxLength":if(typeof we!="number"){Pe="error_property_names_maxlength";break}if(le.length>we){Pe="error_property_names_exceeds_maxlength";break}return!0;case"const":if(we!==le){Pe="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(we)){Pe="error_property_names_enum";break}if(we.forEach((function(at){at===le&&(Ce=!0)})),!Ce){Pe="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof we!="string"){Pe="error_property_names_pattern";break}if(!new RegExp(we).test(le)){Pe="error_property_names_pattern_mismatch";break}return!0;default:return Q.push({path:T,property:"propertyNames",message:q.translate("error_property_names_unsupported",[tt],u)}),!1}return Q.push({path:T,property:"propertyNames",message:q.translate(Pe,[le],u)}),!1}))?void 0:1},xe=0;xe<X.length&&((B=ye())===0||B!==1);xe++);return Q},additionalProperties:function(u,k,T,N){for(var B=[],q=Object.keys(k),Q=0;Q<q.length;Q++){var X=q[Q];if(!N[X]){if(!u.additionalProperties){B.push({path:T,property:"additionalProperties",message:this.translate("error_additional_properties",[X],u)});break}if(u.additionalProperties===!0)break;B.push.apply(B,jt(this._validateSchema(u.additionalProperties,k[X],"".concat(T,".").concat(X))))}}return B},dependencies:function(u,k,T){var N=this,B=[];return Object.entries(u.dependencies).forEach((function(q){var Q=Ea(q,2),X=Q[0],le=Q[1];k[X]!==void 0&&(Array.isArray(le)?le.forEach((function(ye){k[ye]===void 0&&B.push({path:T,property:"dependencies",message:N.translate("error_dependency",[ye],u)})})):B.push.apply(B,jt(N._validateSchema(le,k,T))))})),B}}},r=[{key:"fitTest",value:function(n,c){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,t={match:0,extra:0};if(Fr(n)==="object"&&n!==null){var s=this._getSchema(c);if(s.anyOf){var u,k=(function(le){for(var ye=1;ye<arguments.length;ye++){var xe=arguments[ye]!=null?arguments[ye]:{};ye%2?dp(Object(xe),!0).forEach((function(Pe){s0(le,Pe,xe[Pe])})):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(xe)):dp(Object(xe)).forEach((function(Pe){Object.defineProperty(le,Pe,Object.getOwnPropertyDescriptor(xe,Pe))}))}return le})({},t),T=(function(le,ye){var xe=typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(!xe){if(Array.isArray(le)||(xe=Ac(le))){xe&&(le=xe);var Pe=0,Be=function(){};return{s:Be,n:function(){return Pe>=le.length?{done:!0}:{done:!1,value:le[Pe++]}},e:function(Ce){throw Ce},f:Be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ac(l,r){if(l){if(typeof l=="string")return $c(l,r);var n=Object.prototype.toString.call(l).slice(8,-1);return n==="Object"&&l.constructor&&(n=l.constructor.name),n==="Map"||n==="Set"?Array.from(l):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$c(l,r):void 0}}function $c(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function l0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,hp(c.key),c)}}function hp(l){var r=(function(n,c){if(Fr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fr(r)=="symbol"?r:r+""}y(8431),y(7945),y(1278);var fp=(function(){return l=function n(c,e,t,s){(function(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")})(this,n),this.jsoneditor=c,this.schema=e||this.jsoneditor.schema,this.options=t||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired:function(u,k,T){var N=[];if(u.dependentRequired!==void 0){var B=[];Object.keys(u.dependentRequired).forEach((function(q){if(k[q]!==void 0){var Q=u.dependentRequired[q];B=Q.filter((function(X){return!O(k,X)}))}})),B.length>0&&N.push({message:"Must have the required properties: "+B.join(", "),path:T})}return N},dependentSchemas:function(u,k,T){var N=this,B=[];return Object.keys(u.dependentSchemas).forEach((function(q){if(k[q]!==void 0){var Q=u.dependentSchemas[q],X=N._validateSchema(Q,k,T);B=[].concat(jt(B),jt(X))}})),B},contains:function(u,k,T){var N=this,B=[],q=0;k.forEach((function(X){N._validateSchema(u.contains,X,T).length===0&&q++}));var Q=q===0;return u.minContains!==void 0?q<u.minContains&&B.push({message:this.translate("error_minContains",[q,u.minContains],u),path:T}):Q&&B.push({message:this.translate("error_contains",null,u),path:T}),u.maxContains!==void 0&&q>u.maxContains&&B.push({message:this.translate("error_maxContains",[q,u.maxContains],u),path:T}),B},if:function(u,k,T){if(u.then===void 0&&u.else===void 0)return[];var N=this._validateSchema(u.if,k,T),B=[],q=[];return u.then!==void 0&&(B=this._validateSchema(u.then,k,T)),u.else!==void 0&&(q=this._validateSchema(u.else,k,T)),u.if===!0?B:u.if===!1?q:N.length===0?B:N.length>0?q:[]},const:function(u,k,T){return JSON.stringify(u.const)===JSON.stringify(k)?[]:[{path:T,property:"const",message:this.translate("error_const",null,u)}]},enum:function(u,k,T){var N=JSON.stringify(k);return u.enum.some((function(B){return N===JSON.stringify(B)}))?[]:[{path:T,property:"enum",message:this.translate("error_enum",null,u)}]},extends:function(u,k,T){var N=this;return u.extends.reduce((function(B,q){return B.push.apply(B,jt(N._validateSchema(q,k,T))),B}),[])},allOf:function(u,k,T){var N=this;return u.allOf.reduce((function(B,q){return B.push.apply(B,jt(N._validateSchema(q,k,T))),B}),[])},anyOf:function(u,k,T){var N=this;return u.anyOf.some((function(B){return!N._validateSchema(B,k,T).length}))?[]:[{path:T,property:"anyOf",message:this.translate("error_anyOf",null,u)}]},oneOf:function(u,k,T){var N=this,B=0,q=[];u.oneOf.forEach((function(X,le){var ye=N._validateSchema(X,k,T);ye.length||B++,ye.forEach((function(xe){xe.path="".concat(T,".oneOf[").concat(le,"]").concat(xe.path.substr(T.length))})),q.push.apply(q,jt(ye))}));var Q=[];return B!==1&&(Q.push({path:T,property:"oneOf",message:this.translate("error_oneOf",[B],u)}),Q.push.apply(Q,q)),Q},not:function(u,k,T){return this._validateSchema(u.not,k,T).length?[]:[{path:T,property:"not",message:this.translate("error_not",null,u)}]},type:function(u,k,T){var N=this;if(Array.isArray(u.type)){if(!u.type.some((function(B){return N._checkType(B,k)})))return[{path:T,property:"type",message:this.translate("error_type_union",null,u)}]}else if(["date","time","datetime-local"].includes(u.format)&&u.type==="integer"){if(!this._checkType("string","".concat(k)))return[{path:T,property:"type",message:this.translate("error_type",[u.format],u)}]}else if(!this._checkType(u.type,k))return[{path:T,property:"type",message:this.translate("error_type",[u.type],u)}];return[]},disallow:function(u,k,T){var N=this;if(Array.isArray(u.disallow)){if(u.disallow.some((function(B){return N._checkType(B,k)})))return[{path:T,property:"disallow",message:this.translate("error_disallow_union",null,u)}]}else if(this._checkType(u.disallow,k))return[{path:T,property:"disallow",message:this.translate("error_disallow",[u.disallow],u)}];return[]}},this._validateNumberSubSchema={multipleOf:function(u,k,T){return this._validateNumberSubSchemaMultipleDivisible(u,k,T)},divisibleBy:function(u,k,T){return this._validateNumberSubSchemaMultipleDivisible(u,k,T)},maximum:function(u,k,T){var N=u.exclusiveMaximum?k<u.maximum:k<=u.maximum;return window.math?N=window.math[u.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(k),window.math.bignumber(u.maximum)):window.Decimal&&(N=new window.Decimal(k)[u.exclusiveMaximum?"lt":"lte"](new window.Decimal(u.maximum))),N?[]:[{path:T,property:"maximum",message:this.translate(u.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[u.maximum],u)}]},minimum:function(u,k,T){var N=u.exclusiveMinimum?k>u.minimum:k>=u.minimum;return window.math?N=window.math[u.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(k),window.math.bignumber(u.minimum)):window.Decimal&&(N=new window.Decimal(k)[u.exclusiveMinimum?"gt":"gte"](new window.Decimal(u.minimum))),N?[]:[{path:T,property:"minimum",message:this.translate(u.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[u.minimum],u)}]}},this._validateStringSubSchema={maxLength:function(u,k,T){var N=[];return"".concat(k).length>u.maxLength&&N.push({path:T,property:"maxLength",message:this.translate("error_maxLength",[u.maxLength],u)}),N},minLength:function(u,k,T){return"".concat(k).length<u.minLength?[{path:T,property:"minLength",message:this.translate(u.minLength===1?"error_notempty":"error_minLength",[u.minLength],u)}]:[]},pattern:function(u,k,T){return new RegExp(u.pattern).test(k)?[]:[{path:T,property:"pattern",message:u.options&&u.options.patternmessage?u.options.patternmessage:this.translate("error_pattern",[u.pattern],u)}]}},this._validateArraySubSchema={items:function(u,k,T){var N=this,B=[];if(Array.isArray(u.items))for(var q=0;q<k.length;q++)if(u.items[q])B.push.apply(B,jt(this._validateSchema(u.items[q],k[q],"".concat(T,".").concat(q))));else{if(u.additionalItems===!0)break;if(!u.additionalItems){if(u.additionalItems===!1){B.push({path:T,property:"additionalItems",message:this.translate("error_additionalItems",null,u)});break}break}B.push.apply(B,jt(this._validateSchema(u.additionalItems,k[q],"".concat(T,".").concat(q))))}else k.forEach((function(Q,X){B.push.apply(B,jt(N._validateSchema(u.items,Q,"".concat(T,".").concat(X))))}));return B},maxItems:function(u,k,T){return k.length>u.maxItems?[{path:T,property:"maxItems",message:this.translate("error_maxItems",[u.maxItems],u)}]:[]},minItems:function(u,k,T){return k.length<u.minItems?[{path:T,property:"minItems",message:this.translate("error_minItems",[u.minItems],u)}]:[]},uniqueItems:function(u,k,T){for(var N={},B=0;B<k.length;B++){var q=JSON.stringify(k[B]);if(N[q])return[{path:T,property:"uniqueItems",message:this.translate("error_uniqueItems",null,u)}];N[q]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(u,k,T){return Object.keys(k).length>u.maxProperties?[{path:T,property:"maxProperties",message:this.translate("error_maxProperties",[u.maxProperties],u)}]:[]},minProperties:function(u,k,T){return Object.keys(k).length<u.minProperties?[{path:T,property:"minProperties",message:this.translate("error_minProperties",[u.minProperties],u)}]:[]},required:function(u,k,T){var N=this,B=[];return Array.isArray(u.required)&&u.required.forEach((function(q){if(k[q]===void 0){var Q=N.jsoneditor.getEditor("".concat(T,".").concat(q));Q&&Q.dependenciesFulfilled===!1||Q&&["button","info"].includes(Q.schema.format||Q.schema.type)||B.push({path:T,property:"required",message:N.translate("error_required",[u&&u.properties&&u.properties[q]&&u.properties[q].title?u.properties[q].title:q],u)})}})),B},properties:function(u,k,T,N){var B=this,q=[];return Object.entries(u.properties).forEach((function(Q){var X=Oa(Q,2),le=X[0],ye=X[1];N[le]=!0,q.push.apply(q,jt(B._validateSchema(ye,k[le],"".concat(T,".").concat(le))))})),q},patternProperties:function(u,k,T,N){var B=this,q=[];return Object.entries(u.patternProperties).forEach((function(Q){var X=Oa(Q,2),le=X[0],ye=X[1],xe=new RegExp(le);Object.entries(k).forEach((function(Pe){var Be=Oa(Pe,2),Ke=Be[0],tt=Be[1];xe.test(Ke)&&(N[Ke]=!0,q.push.apply(q,jt(B._validateSchema(ye,tt,"".concat(T,".").concat(Ke)))))}))})),q}},this._validateObjectSubSchema2={propertyNames:function(u,k,T,N){for(var B,q=this,Q=[],X=Object.keys(k),le=null,ye=function(){var Pe="";return le=X[xe],typeof u.propertyNames=="boolean"?u.propertyNames===!0?0:(Q.push({path:T,property:"propertyNames",message:q.translate("error_property_names_false",[le],u)}),1):Object.entries(u.propertyNames).every((function(Be){var Ke=Oa(Be,2),tt=Ke[0],we=Ke[1],Ce=!1;switch(tt){case"maxLength":if(typeof we!="number"){Pe="error_property_names_maxlength";break}if(le.length>we){Pe="error_property_names_exceeds_maxlength";break}return!0;case"const":if(we!==le){Pe="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(we)){Pe="error_property_names_enum";break}if(we.forEach((function(at){at===le&&(Ce=!0)})),!Ce){Pe="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof we!="string"){Pe="error_property_names_pattern";break}if(!new RegExp(we).test(le)){Pe="error_property_names_pattern_mismatch";break}return!0;default:return Q.push({path:T,property:"propertyNames",message:q.translate("error_property_names_unsupported",[tt],u)}),!1}return Q.push({path:T,property:"propertyNames",message:q.translate(Pe,[le],u)}),!1}))?void 0:1},xe=0;xe<X.length&&((B=ye())===0||B!==1);xe++);return Q},additionalProperties:function(u,k,T,N){for(var B=[],q=Object.keys(k),Q=0;Q<q.length;Q++){var X=q[Q];if(!N[X]){if(!u.additionalProperties){B.push({path:T,property:"additionalProperties",message:this.translate("error_additional_properties",[X],u)});break}if(u.additionalProperties===!0)break;B.push.apply(B,jt(this._validateSchema(u.additionalProperties,k[X],"".concat(T,".").concat(X))))}}return B},dependencies:function(u,k,T){var N=this,B=[];return Object.entries(u.dependencies).forEach((function(q){var Q=Oa(q,2),X=Q[0],le=Q[1];k[X]!==void 0&&(Array.isArray(le)?le.forEach((function(ye){k[ye]===void 0&&B.push({path:T,property:"dependencies",message:N.translate("error_dependency",[ye],u)})})):B.push.apply(B,jt(N._validateSchema(le,k,T))))})),B}}},r=[{key:"fitTest",value:function(n,c){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,t={match:0,extra:0};if(Fr(n)==="object"&&n!==null){var s=this._getSchema(c);if(s.anyOf){var u,k=(function(le){for(var ye=1;ye<arguments.length;ye++){var xe=arguments[ye]!=null?arguments[ye]:{};ye%2?dp(Object(xe),!0).forEach((function(Pe){s0(le,Pe,xe[Pe])})):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(xe)):dp(Object(xe)).forEach((function(Pe){Object.defineProperty(le,Pe,Object.getOwnPropertyDescriptor(xe,Pe))}))}return le})({},t),T=(function(le,ye){var xe=typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(!xe){if(Array.isArray(le)||(xe=Ac(le))){xe&&(le=xe);var Pe=0,Be=function(){};return{s:Be,n:function(){return Pe>=le.length?{done:!0}:{done:!1,value:le[Pe++]}},e:function(Ce){throw Ce},f:Be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
34
34
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ke,tt=!0,we=!1;return{s:function(){xe=xe.call(le)},n:function(){var Ce=xe.next();return tt=Ce.done,Ce},e:function(Ce){we=!0,Ke=Ce},f:function(){try{tt||xe.return==null||xe.return()}finally{if(we)throw Ke}}}})(s.anyOf);try{for(T.s();!(u=T.n()).done;){var N=u.value,B=this.fitTest(n,N,e);(B.match>k.match||B.match===k.match&&B.extra<k.extra)&&(k=B)}}catch(le){T.e(le)}finally{T.f()}return k}var q=this._getSchema(c).properties;for(var Q in q)if(O(q,Q)){if(Fr(n[Q])==="object"&&Fr(q[Q])==="object"&&Fr(q[Q].properties)==="object"){var X=this.fitTest(n[Q],q[Q],e/100);t.match+=X.match,t.extra+=X.extra}n[Q]!==void 0&&(t.match+=e)}else t.extra+=e}return t}},{key:"_getSchema",value:function(n){return n===void 0?b({},this.jsoneditor.expandRefs(this.schema)):n}},{key:"validate",value:function(n){return this._validateSchema(this.schema,n)}},{key:"_validateSchema",value:function(n,c,e){var t=this,s=[];return e=e||this.jsoneditor.root.formname,n=b({},this.jsoneditor.expandRefs(n)),c===void 0?this._validateV3Required(n,c,e):(Object.keys(n).forEach((function(u){t._validateSubSchema[u]&&s.push.apply(s,jt(t._validateSubSchema[u].call(t,n,c,e)))})),s.push.apply(s,jt(this._validateByValueType(n,c,e))),n.links&&n.links.forEach((function(u,k){u.rel&&u.rel.toLowerCase()==="describedby"&&(n=t._expandSchemaLink(n,k),s.push.apply(s,jt(t._validateSchema(n,c,e,t.translate))))})),["date","time","datetime-local"].includes(n.format)&&s.push.apply(s,jt(this._validateDateTimeSubSchema(n,c,e))),["uuid"].includes(n.format)&&s.push.apply(s,jt(this._validateUUIDSchema(n,c,e))),s.push.apply(s,jt(this._validateCustomValidator(n,c,e))),this._removeDuplicateErrors(s))}},{key:"_expandSchemaLink",value:function(n,c){var e=n.links[c].href,t=this.jsoneditor.root.getValue(),s=this.jsoneditor.compileTemplate(e,this.jsoneditor.template),u=document.location.origin+document.location.pathname+s(t);return n.links=n.links.slice(0,c).concat(n.links.slice(c+1)),b({},n,this.jsoneditor.refs[u])}},{key:"_validateV3Required",value:function(n,c,e){return(n.required!==void 0&&n.required===!0||n.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&n.type!=="info"?[{path:e,property:"required",message:this.translate("error_notset",null,n)}]:[]}},{key:"_validateByValueType",value:function(n,c,e){var t=this,s=[];if(c===null)return s;if(typeof c=="number")Object.keys(n).forEach((function(k){t._validateNumberSubSchema[k]&&s.push.apply(s,jt(t._validateNumberSubSchema[k].call(t,n,c,e)))}));else if(typeof c=="string")Object.keys(n).forEach((function(k){t._validateStringSubSchema[k]&&s.push.apply(s,jt(t._validateStringSubSchema[k].call(t,n,c,e)))}));else if(Array.isArray(c))Object.keys(n).forEach((function(k){t._validateArraySubSchema[k]&&s.push.apply(s,jt(t._validateArraySubSchema[k].call(t,n,c,e)))}));else if(Fr(c)==="object"){var u={};Object.keys(n).forEach((function(k){t._validateObjectSubSchema[k]&&s.push.apply(s,jt(t._validateObjectSubSchema[k].call(t,n,c,e,u)))})),n.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||n.oneOf||n.anyOf||n.allOf||(n.additionalProperties=!1),Object.keys(n).forEach((function(k){t._validateObjectSubSchema2[k]!==void 0&&s.push.apply(s,jt(t._validateObjectSubSchema2[k].call(t,n,c,e,u)))}))}return s}},{key:"_validateUUIDSchema",value:function(n,c,e){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(c)?[]:[{path:e,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}$"],n)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(n,c,e){var t=n.multipleOf||n.divisibleBy,s=c/t===Math.floor(c/t);return window.math?s=window.math.mod(window.math.bignumber(c),window.math.bignumber(t)).equals(0):window.Decimal&&(s=new window.Decimal(c).mod(new window.Decimal(t)).equals(0)),s?[]:[{path:e,property:n.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[t],n)}]}},{key:"_validateDateTimeSubSchema",value:function(n,c,e){var t=this,s=this.jsoneditor.getEditor(e),u=s&&s.flatpickr?s.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[n.format];if(n.type==="integer")return(function(k,T,N){return 1*T<1?[{path:N,property:"format",message:t.translate("error_invalid_epoch",null,k)}]:T!==Math.abs(parseInt(T))?[{path:N,property:"format",message:t.translate("error_".concat(k.format.replace(/-/g,"_")),[u],k)}]:[]})(n,c,e);if(s&&s.flatpickr){if(s)return(function(k,T,N,B){if(T!==""){var q;if(B.flatpickr.config.mode!=="single"){var Q=B.flatpickr.config.mode==="range"?B.flatpickr.l10n.rangeSeparator:", ";q=B.flatpickr.selectedDates.map((function(le){return B.flatpickr.formatDate(le,B.flatpickr.config.dateFormat)})).join(Q)}try{if(q){if(q!==T)throw new Error("".concat(B.flatpickr.config.mode," mismatch"))}else if(B.flatpickr.formatDate(B.flatpickr.parseDate(T,B.flatpickr.config.dateFormat),B.flatpickr.config.dateFormat)!==T)throw new Error("mismatch")}catch{var X=B.flatpickr.config.errorDateFormat!==void 0?B.flatpickr.config.errorDateFormat:B.flatpickr.config.dateFormat;return[{path:N,property:"format",message:t.translate("error_".concat(B.format.replace(/-/g,"_")),[X],k)}]}}return[]})(n,c,e,s)}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})?)$/}[n.format].test(c))return[{path:e,property:"format",message:this.translate("error_".concat(n.format.replace(/-/g,"_")),[u],n)}];return[]}},{key:"_validateCustomValidator",value:function(n,c,e){var t=this,s=[];s.push.apply(s,jt(a0.call(this,n,c,e,this.translate)));var u=function(k){s.push.apply(s,jt(k.call(t,n,c,e)))};return this.defaults.custom_validators.forEach(u),this.options.custom_validators&&this.options.custom_validators.forEach(u),s}},{key:"_removeDuplicateErrors",value:function(n){return n.reduce((function(c,e){var t=!0;return c||(c=[]),c.forEach((function(s){s.message===e.message&&s.path===e.path&&s.property===e.property&&(s.errorcount++,t=!1)})),t&&(e.errorcount=1,c.push(e)),c}),[])}},{key:"_checkType",value:function(n,c){var e={string:function(t){return typeof t=="string"},number:function(t){return typeof t=="number"},integer:function(t){return typeof t=="number"&&t===Math.floor(t)},boolean:function(t){return typeof t=="boolean"},array:function(t){return Array.isArray(t)},object:function(t){return t!==null&&!Array.isArray(t)&&Fr(t)==="object"},null:function(t){return t===null}};return typeof n=="string"?!e[n]||e[n](c):!this._validateSchema(n,c).length}}],r&&l0(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Pi(l){return Pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pi(l)}function c0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,u0(c.key),c)}}function u0(l){var r=(function(n,c){if(Pi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Pi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Pi(r)=="symbol"?r:r+""}function d0(l,r,n){return r=Mr(r),(function(c,e){if(e&&(Pi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,pp()?Reflect.construct(r,n||[],Mr(l).constructor):r.apply(l,n))}function pp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(pp=function(){return!!l})()}function Zn(){return Zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Mr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Zn.apply(this,arguments)}function Mr(l){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mr(l)}function Nc(l,r){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Nc(l,r)}var h0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),d0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nc(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){if(this.editors){for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister();this.editors[this.type]&&this.editors[this.type].register()}Zn(Mr(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Zn(Mr(r.prototype),"unregister",this).call(this),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].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 e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].enable();this.switcher.disabled=!1,Zn(Mr(r.prototype),"enable",this).call(this)}}},{key:"disable",value:function(e){if(e&&(this.always_disabled=!0),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable(e);this.switcher.disabled=!0,Zn(Mr(r.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(e){var t=this;this.lastType=this.type,this.editors[e]||this.buildChildEditor(e);var s=this.getValue();this.type=e,this.register(),this.editors.forEach((function(u,k){var T,N;u&&(t.type===k?(t.keep_only_existing_values&&(T=u.getValue(),N=s,Object.keys(N).forEach((function(B){B in T&&(T[B]=N[B])})),s=T),(t.keep_values||t.if)&&u.setValue(s,!0),u.container.style.display=""):u.container.style.display="none")})),this.onChange(!0,!1,{event:"switch",data:{type:this.lastType,path:this.editors[e].path}}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(e){var t,s,u=this,k=this.types[e],T=this.theme.getChildEditorHolder();this.editor_holder.appendChild(T),typeof k=="string"?(s=b({},this.schema)).type=k:(s=b({},this.schema,k),s=this.jsoneditor.expandRefs(s),k&&k.required&&Array.isArray(k.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(s.required=this.schema.required.concat(k.required))),(t=s)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies&&delete s.options.dependencies;var N=this.jsoneditor.getEditorClass(s);this.editors[e]=this.jsoneditor.createEditor(N,{jsoneditor:this.jsoneditor,schema:s,container:T,path:this.path,parent:this,required:!0}),this.editors[e].preBuild(),this.editors[e].build(),this.editors[e].postBuild(),this.editors[e].header&&this.theme.visuallyHidden(this.editors[e].header),this.editors[e].option=this.switcher_options[e],T.addEventListener("change_header_text",(function(){u.refreshHeaderText()})),e!==this.type&&(T.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&&L(this.thenSchema,this.schema,this.schema.then),this.schema.else&&L(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach((function(s){delete s.if,delete s.then,delete s.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 e=this.schema.disallow;Pi(e)==="object"&&Array.isArray(e)||(e=[e]);var t=[];this.types.forEach((function(s){e.includes(s)||t.push(s)})),this.types=t}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var e=this,t=this.container;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",(function(u){u.preventDefault(),u.stopPropagation(),e.switchEditor(e.display_text.indexOf(u.currentTarget.value)),e.onChange(!0)})),this.editor_holder=document.createElement("div"),t.appendChild(this.editor_holder);var s={};this.jsoneditor.options.custom_validators&&(s.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((function(u,k){var T;e.editors[k]=!1,typeof u=="string"?(T=b({},e.schema)).type=u:(T=b({},e.schema,u),u.required&&Array.isArray(u.required)&&e.schema.required&&Array.isArray(e.schema.required)&&(T.required=e.schema.required.concat(u.required))),e.validators[k]=new fp(e.jsoneditor,T,s,e.defaults)})),this.jsoneditor.on("change",(function(){e.switchIf()})),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(e,t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),Zn(Mr(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"refreshHeaderText",value:function(){var e=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach((function(t,s){t.textContent=e[s]}))}},{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 e=this.getIfType(this.value);this.lastType!==e&&(this.switchEditor(e),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(e){return this.jsoneditor.validator._validateSchema(this.ifSchema,e).length===0?0:1}},{key:"setValue",value:function(e,t){var s=this;e=this.applyConstFilter(e);var u=this.type,k={match:0,extra:0,i:this.type},T={match:0,i:null};this.validators.forEach((function(q,Q){var X=null;s.anyOf!==void 0&&s.anyOf&&(X=q.fitTest(e),(k.match<X.match||k.match===X.match&&k.extra>X.extra)&&((k=X).i=Q)),q.validate(e).length||T.i!==null?k=T:(T.i=Q,X!==null&&(T.match=X.match))}));var N=T.i;this.anyOf!==void 0&&this.anyOf&&T.match<k.match&&(N=k.i),this.if&&(N=this.getIfType(e)),N===null&&(N=this.type),this.type=N,this.switcher.value=this.display_text[N];var B=this.type!==u;B&&(this.switchEditor(this.type),this.editors[this.type].setValue(e,t)),e!==void 0&&this.editors[this.type].setValue(e,t),this.refreshValue(),this.onChange(B)}},{key:"destroy",value:function(){this.editors.forEach((function(e){e&&e.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),Zn(Mr(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this;if(this.oneOf||this.anyOf){var s=this.oneOf?"oneOf":"anyOf";this.editors.forEach((function(u,k){if(u){var T="".concat(t.path,".").concat(s,"[").concat(k,"]");u.showValidationErrors(e.reduce((function(N,B){if(B.path.startsWith(T)||B.path===T.substr(0,B.path.length)){var q=b({},B);B.path.startsWith(T)&&(q.path=t.path+q.path.substr(T.length)),N.push(q)}return N}),[]))}}))}else this.editors.forEach((function(u){u&&u.showValidationErrors(e)}))}},{key:"addLinks",value:function(){}}])&&c0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function wo(l){return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},wo(l)}function f0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,p0(c.key),c)}}function p0(l){var r=(function(n,c){if(wo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(wo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return wo(r)=="symbol"?r:r+""}function m0(l,r,n){return r=el(r),(function(c,e){if(e&&(wo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,mp()?Reflect.construct(r,n||[],el(l).constructor):r.apply(l,n))}function mp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(mp=function(){return!!l})()}function el(l){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},el(l)}function Ic(l,r){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ic(l,r)}var y0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),m0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ic(e,t)})(r,l),n=r,(c=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&f0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function yp(l,r){var n=Object.keys(l);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(l);r&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),n.push.apply(n,c)}return n}function ko(l){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?yp(Object(n),!0).forEach((function(c){tl(l,c,n[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(n)):yp(Object(n)).forEach((function(c){Object.defineProperty(l,c,Object.getOwnPropertyDescriptor(n,c))}))}return l}function tl(l,r,n){return(r=bp(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function jo(l,r){return(function(n){if(Array.isArray(n))return n})(l)||(function(n,c){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,s,u,k,T=[],N=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!(N=(t=u.call(e)).done)&&(T.push(t.value),T.length!==c);N=!0);}catch(q){B=!0,s=q}finally{try{if(!N&&e.return!=null&&(k=e.return(),Object(k)!==k))return}finally{if(B)throw s}}return T}})(l,r)||(function(n,c){if(n){if(typeof n=="string")return vp(n,c);var e=Object.prototype.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?vp(n,c):void 0}})(l,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vp(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function kn(l){return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},kn(l)}function v0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,bp(c.key),c)}}function bp(l){var r=(function(n,c){if(kn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(kn(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return kn(r)=="symbol"?r:r+""}function b0(l,r,n){return r=br(r),(function(c,e){if(e&&(kn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,gp()?Reflect.construct(r,n||[],br(l).constructor):r.apply(l,n))}function gp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(gp=function(){return!!l})()}function Qr(){return Qr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=br(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Qr.apply(this,arguments)}function br(l){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},br(l)}function Dc(l,r){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Dc(l,r)}var _p=(function(l){function r(e,t,s){var u;return(function(k,T){if(!(k instanceof T))throw new TypeError("Cannot call a class as a function")})(this,r),(u=b0(this,r,[e,t])).currentDepth=s,u}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)})(r,l),n=r,(c=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Qr(br(r.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){Qr(br(r.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.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),Qr(br(r.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){(e.isActive()||e.isUiOnly)&&e.enable(),e.optInCheckbox&&(e.optInCheckbox.disabled=!1)})))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),Qr(br(r.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){(t.isActive()||t.isUiOnly)&&t.disable(e),t.optInCheckbox.disabled=!0}))}},{key:"layoutEditors",value:function(){var e,t,s=this;if(this.row_container){var u;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(tt,we){var Ce=s.editors[tt].schema.propertyOrder,at=s.editors[we].schema.propertyOrder;return typeof Ce!="number"&&(Ce=1e3),typeof at!="number"&&(at=1e3),Ce-at}));var k,T=this.format==="categories",N=[],B=null,q=null;if(this.format==="grid-strict"){var Q=0;if(k=[],this.property_order.forEach((function(tt){var we=s.editors[tt];if(!we.property_removed){var Ce=we.options.hidden?0:we.options.grid_columns||we.getNumColumns(),at=we.options.hidden?0:we.options.grid_offset||0,vt=!we.options.hidden&&(we.options.grid_break||!1),ar={key:tt,width:Ce,offset:at,height:we.options.hidden?0:we.container.offsetHeight};k.push(ar),N[Q]=k,vt&&(Q++,k=[])}})),this.layout===JSON.stringify(N))return!1;for(this.layout=JSON.stringify(N),u=document.createElement("div"),e=0;e<N.length;e++)for(k=this.theme.getGridRow(),u.appendChild(k),t=0;t<N[e].length;t++)B=N[e][t].key,(q=this.editors[B]).options.hidden?q.container.style.display="none":this.theme.setGridColumnSize(q.container,N[e][t].width,N[e][t].offset),k.appendChild(q.container)}else if(this.format==="grid"){for(this.property_order.forEach((function(tt){var we=s.editors[tt];if(!we.property_removed){for(var Ce=!1,at=we.options.hidden?0:we.options.grid_columns||we.getNumColumns(),vt=we.options.hidden?0:we.container.offsetHeight,ar=0;ar<N.length;ar++)N[ar].width+at<=12&&(!vt||.5*N[ar].minh<vt&&2*N[ar].maxh>vt)&&(Ce=ar);Ce===!1&&(N.push({width:0,minh:999999,maxh:0,editors:[]}),Ce=N.length-1),N[Ce].editors.push({key:tt,width:at,height:vt}),N[Ce].width+=at,N[Ce].minh=Math.min(N[Ce].minh,vt),N[Ce].maxh=Math.max(N[Ce].maxh,vt)}})),e=0;e<N.length;e++)if(N[e].width<12){var X=!1,le=0;for(t=0;t<N[e].editors.length;t++)(X===!1||N[e].editors[t].width>N[e].editors[X].width)&&(X=t),N[e].editors[t].width*=12/N[e].width,N[e].editors[t].width=Math.floor(N[e].editors[t].width),le+=N[e].editors[t].width;le<12&&(N[e].editors[X].width+=12-le),N[e].width=12}if(this.layout===JSON.stringify(N))return!1;for(this.layout=JSON.stringify(N),u=document.createElement("div"),e=0;e<N.length;e++)for(k=this.theme.getGridRow(),u.appendChild(k),t=0;t<N[e].editors.length;t++)B=N[e].editors[t].key,(q=this.editors[B]).options.hidden?q.container.style.display="none":this.theme.setGridColumnSize(q.container,N[e].editors[t].width),k.appendChild(q.container)}else{if(u=document.createElement("div"),T){var ye=document.createElement("div"),xe=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Pe=this.theme.getTopTabContentHolder(xe);for(this.property_order.forEach((function(tt){var we=s.editors[tt];if(!we.property_removed){var Ce=s.theme.getTabContent(),at=we.schema&&(we.schema.type==="object"||we.schema.type==="array");Ce.isObjOrArray=at;var vt=s.theme.getGridRow();we.tab||(s.basicPane===void 0?s.addRow(we,xe,Ce):s.addRow(we,xe,s.basicPane)),Ce.id=s.getValidId(we.tab_text.textContent),at?(Ce.appendChild(vt),Pe.appendChild(Ce),s.theme.addTopTab(xe,we.tab)):(ye.appendChild(vt),Pe.childElementCount>0?Pe.firstChild.isObjOrArray&&(Ce.appendChild(ye),Pe.insertBefore(Ce,Pe.firstChild),s.theme.insertBasicTopTab(we.tab,xe),we.basicPane=Ce):(Ce.appendChild(ye),Pe.appendChild(Ce),s.theme.addTopTab(xe,we.tab),we.basicPane=Ce)),we.options.hidden?we.container.style.display="none":s.theme.setGridColumnSize(we.container,12),vt.appendChild(we.container),we.rowPane=Ce}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var Be=this.tabs_holder.parentNode;Be.removeChild(Be.firstChild),Be.appendChild(xe),this.tabPanesContainer=Pe,this.tabs_holder=xe;var Ke=this.theme.getFirstTab(this.tabs_holder);return void(Ke&&w(Ke,"click"))}this.property_order.forEach((function(tt){var we=s.editors[tt];we.property_removed||(k=s.theme.getGridRow(),u.appendChild(k),we.options.hidden?we.container.style.display="none":s.theme.setGridColumnSize(we.container,12),k.appendChild(we.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(u)}}},{key:"getPropertySchema",value:function(e){var t=this,s=this.schema.properties[e]||{};s=b({},s);var u=!!this.schema.properties[e];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(k){new RegExp(k).test(e)&&(s.allOf=s.allOf||[],s.allOf.push(t.schema.patternProperties[k]),u=!0)})),!u&&this.schema.additionalProperties&&kn(this.schema.additionalProperties)==="object"&&(s=b({},this.schema.additionalProperties)),s}},{key:"preBuild",value:function(){var e=this;if(Qr(br(r.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(t){var s=jo(t,2),u=s[0],k=s[1],T=e.jsoneditor.getEditorClass(k);e.editors[u]=e.jsoneditor.createEditor(T,{jsoneditor:e.jsoneditor,schema:k,path:"".concat(e.path,".").concat(u),parent:e,compact:!0,required:!0},e.currentDepth+1),e.editors[u].preBuild();var N=e.editors[u].options.hidden?0:e.editors[u].options.grid_columns||e.editors[u].getNumColumns();e.minwidth+=N,e.maxwidth+=N})),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(t){return e.isRequiredObject({key:t,schema:e.schema.properties[t]})})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach((function(t){e.addObjectProperty(t,!0),e.editors[t]&&(e.minwidth=Math.max(e.minwidth,e.editors[t].options.grid_columns||e.editors[t].getNumColumns()),e.maxwidth+=e.editors[t].options.grid_columns||e.editors[t].getNumColumns())}))}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(t,s){var u=e.editors[t].schema.propertyOrder,k=e.editors[s].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof k!="number"&&(k=1e3),u-k}))}},{key:"addTab",value:function(e){var t=this,s=this.rows[e].schema&&(this.rows[e].schema.type==="object"||this.rows[e].schema.type==="array");this.tabs_holder&&(this.rows[e].tab_text=document.createElement("span"),this.rows[e].tab_text.textContent=s?this.rows[e].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[e].tab=this.theme.getTopTab(this.rows[e].tab_text,this.getValidId(this.rows[e].tab_text.textContent)),this.rows[e].tab.addEventListener("click",(function(u){t.active_tab=t.rows[e].tab,t.refreshTabs(),u.preventDefault(),u.stopPropagation()})))}},{key:"addRow",value:function(e,t,s){var u=this.rows.length,k=e.schema.type==="object"||e.schema.type==="array";this.rows[u]=e,this.rows[u].rowPane=s,k?(this.addTab(u),this.theme.addTopTab(t,this.rows[u].tab)):this.basicTab===void 0?(this.addTab(u),this.basicTab=u,this.basicPane=s,this.theme.addTopTab(t,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(e){var t=this,s=this.basicTab!==void 0,u=!1;this.rows.forEach((function(k){k.tab&&k.rowPane&&k.rowPane.parentNode&&(s&&k.tab===t.rows[t.basicTab].tab&&u||(e?k.tab_text.textContent=k.getHeaderText():(s&&k.tab===t.rows[t.basicTab].tab&&(u=!0),k.tab===t.active_tab?t.theme.markTabActive(k):t.theme.markTabInactive(k))))}))}},{key:"build",value:function(){var e=this,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((function(u){var k=jo(u,2),T=k[0],N=k[1],B=e.theme.getTableCell();e.editor_holder.appendChild(B),N.setContainer(B),N.build(),N.postBuild(),N.setOptInCheckbox(N.header),N.setValue(N.getDefault(),!0),e.editors[T].options.hidden&&(B.style.display="none"),e.editors[T].options.input_width&&(B.style.width=e.editors[T].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",(function(u){u.preventDefault(),u.stopPropagation(),e.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(),e.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(),e.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",(function(u){if(u.preventDefault(),u.stopPropagation(),e.addproperty_input.value){if(e.editors[e.addproperty_input.value])return void window.alert("there is already a property with that name");e.addObjectProperty(e.addproperty_input.value),e.editors[e.addproperty_input.value]&&e.editors[e.addproperty_input.value].disable();var k=e.editors[e.addproperty_input.value].key,T=e.editors[e.addproperty_input.value].type,N=e.editors[e.addproperty_input.value].path;e.onChange(!0,!1,{event:"add",data:{key:k,type:T,path:N}})}})),this.addproperty_input.addEventListener("input",(function(u){u.target.previousSibling.previousSibling.childNodes.forEach((function(k){var T=k.innerText,N=u.target.value;e.options.case_sensitive_property_search||e.jsoneditor.options.case_sensitive_property_search||(T=T.toLowerCase(),N=N.toLowerCase()),T.includes(N)?k.style.display="":k.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);var s=document.createElement("div");s.style.clear="both",this.addproperty_holder.appendChild(s),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((function(u){var k=e.theme.getTabContent(),T=e.theme.getGridColumn(),N=!(!u.schema||u.schema.type!=="object"&&u.schema.type!=="array");if(k.isObjOrArray=N,t){if(N){var B=e.theme.getGridContainer();B.appendChild(T),k.appendChild(B),e.tabPanesContainer.appendChild(k),e.row_container=B}else e.row_container_basic===void 0&&(e.row_container_basic=e.theme.getGridContainer(),k.appendChild(e.row_container_basic),e.tabPanesContainer.childElementCount===0?e.tabPanesContainer.appendChild(k):e.tabPanesContainer.insertBefore(k,e.tabPanesContainer.childNodes[1])),e.row_container_basic.appendChild(T);e.addRow(u,e.tabs_holder,k),k.id=e.getValidId(u.schema.title)}else e.row_container.appendChild(T);u.setContainer(T),u.build(),u.postBuild(),u.setOptInCheckbox(u.header)})),this.rows[0]&&w(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(),e.collapsed?(e.editor_holder.style.display="",e.collapsed=!1,e.setButtonText(e.collapse_control,"","collapse","button_collapse")):(e.editor_holder.style.display="none",e.collapsed=!0,e.setButtonText(e.collapse_control,"","expand","button_expand"))})),this.options.collapsed&&w(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(),e.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(),e.toggleAddProperty()})),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties(!1)}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach((function(u){e.editor_holder.appendChild(e.editors[u].container)}))):(this.layoutEditors(),this.layoutEditors()),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"deactivateNonRequiredProperties",value:function(e){var t=this,s=this.jsoneditor.options.show_opt_in,u=this.options.show_opt_in!==void 0,k=u&&this.options.show_opt_in===!0,T=u&&this.options.show_opt_in===!1;(k||!T&&s||!u&&s)&&Object.entries(this.editors).forEach((function(N){var B=jo(N,2),q=B[0],Q=B[1];t.isRequiredObject(Q)||t.editors[q].deactivate(),e&&typeof t.editors[q].deactivateNonRequiredProperties=="function"&&t.editors[q].deactivateNonRequiredProperties(e)}))}},{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(){this.editjson_holder&&navigator.clipboard.writeText(this.editjson_textarea.value).catch((function(e){return window.alert(e)}))}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var e=JSON.parse(this.editjson_textarea.value);this.setValue(e),this.hideEditJSON(),this.onChange(!0)}catch(t){throw window.alert("invalid JSON"),t}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(e,t,s){var u;this.schema.properties[e]&&(u=this.schema.properties[e].propertyOrder),typeof u!="number"&&(u=1e3),t.propertyOrder=u;for(var k=0;k<s.childNodes.length;k++){var T=s.childNodes[k];if(t.propertyOrder<T.propertyOrder){this.addproperty_list.insertBefore(t,T),t=null;break}}t&&this.addproperty_list.appendChild(t)}},{key:"addPropertyCheckbox",value:function(e){var t,s=this,u=this.theme.getCheckbox();t=this.schema.properties[e]&&this.schema.properties[e].title?this.schema.properties[e].title:e;var k=this.theme.getCheckboxLabel(t),T=this.theme.getFormControl(k,u,null,null,this.path+"-"+e);return T.style.paddingBottom=T.style.marginBottom=T.style.paddingTop=T.style.marginTop=0,T.style.height="auto",this.insertPropertyControlUsingPropertyOrder(e,T,this.addproperty_list),u.checked=e in this.editors,u.addEventListener("change",(function(){u.checked?s.addObjectProperty(e):s.removeObjectProperty(e),s.onChange(!0)})),this.addproperty_checkboxes[e]=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(e){if(this.editors[e]){var t;if((t=this.editors[e].schema)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies)return;this.editors[e].unregister(),delete this.editors[e],this.refreshValue(),this.layoutEditors()}}},{key:"getSchemaOnMaxDepth",value:function(e){return Object.keys(e).reduce((function(t,s){switch(s){case"$ref":return t;case"properties":case"items":return ko(ko({},t),{},tl({},s,{}));case"additionalProperties":case"propertyNames":return ko(ko({},t),{},tl({},s,!0));default:return ko(ko({},t),{},tl({},s,e[s]))}}),{})}},{key:"addObjectProperty",value:function(e,t){if(!this.editors[e]){if(this.cached_editors[e]){if(this.editors[e]=this.cached_editors[e],t)return;this.editors[e].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[e]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find((function(N){return new RegExp(N).test(e)}))))return;var s=this.getPropertySchema(e);typeof s.propertyOrder!="number"&&(s.propertyOrder=Object.keys(this.editors).length+1e3);var u=this.jsoneditor.getEditorClass(s),k=this.jsoneditor.options.max_depth;if(this.editors[e]=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:k&&this.currentDepth>=k?this.getSchemaOnMaxDepth(s):s,path:"".concat(this.path,".").concat(e),parent:this},this.currentDepth+1),this.editors[e].preBuild(),!t){var T=this.theme.getChildEditorHolder();this.editor_holder.appendChild(T),this.editors[e].setContainer(T),this.editors[e].build(),this.editors[e].postBuild(),this.editors[e].setOptInCheckbox(u.header),this.editors[e].activate()}this.cached_editors[e]=this.editors[e]}t||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(e){var t=e.path||e.composedPath&&e.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(t[0])&&this.adding_property&&(e.preventDefault(),e.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),Qr(br(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:kn(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(e){return e.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),Qr(br(r.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var e=Qr(br(r.prototype),"getValue",this).call(this);return e&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(e).forEach((function(t){var s;((s=e[t])===void 0||s===""||s===Object(s)&&Object.keys(s).length===0&&s.constructor===Object)&&delete e[t]})),e&&(this.jsoneditor.options.remove_false_properties||this.options.remove_false_properties)&&Object.keys(e).forEach((function(t){e[t]===!1&&delete e[t]})),e}}},{key:"refreshValue",value:function(){var e=this;this.value={},this.editors&&(Object.keys(this.editors).forEach((function(t){e.editors[t].isActive()&&(e.editors[t].refreshValue(),e.value[t]=e.editors[t].getValue())})),Object.keys(this.editors).forEach((function(t){e.editors[t].isActive()&&e.activateDependentRequired(e.editors[t].key)})),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(e){var t=this;this.getDependentRequired(e).forEach((function(s){var u;Object.entries(t.cached_editors).forEach((function(k){var T=jo(k,2),N=(T[0],T[1]);N.key===s&&(u=N)})),u&&!u.isActive()&&u.activate()}))}},{key:"getDependentRequired",value:function(e){return this.schema.dependentRequired&&O(this.schema.dependentRequired,e)?this.schema.dependentRequired[e]:[]}},{key:"refreshAddProperties",value:function(){var e=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var t,s=0,u=!1;Object.keys(this.editors).forEach((function(k){return s++})),t=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&s>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(k){e.addPropertyCheckbox(k),e.isRequiredObject(e.cached_editors[k])&&k in e.editors&&(e.addproperty_checkboxes[k].disabled=!0),e.schema.minProperties!==void 0&&s<=e.schema.minProperties?(e.addproperty_checkboxes[k].disabled=e.addproperty_checkboxes[k].checked,e.addproperty_checkboxes[k].checked||(u=!0)):k in e.editors?u=!0:t||O(e.schema.properties,k)?(e.addproperty_checkboxes[k].disabled=!1,u=!0):e.addproperty_checkboxes[k].disabled=!0})),this.canHaveAdditionalProperties()&&(u=!0),Object.keys(this.schema.properties).forEach((function(k){e.cached_editors[k]||(u=!0,e.addPropertyCheckbox(k))})),u?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!t:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(e){if(e)return typeof e.schema.required=="boolean"?e.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(e.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(e,t){var s=this;(kn(e=(e=this.applyConstFilter(e))||{})!=="object"||Array.isArray(e))&&(e={}),Object.entries(this.cached_editors).forEach((function(u){var k=jo(u,2),T=k[0],N=k[1];e[T]!==void 0?(s.addObjectProperty(T),N.setValue(e[T],t),N.activate(),s.disabled&&N.disable()):t||s.isRequiredObject(N)?N.setValue(N.getDefault(),t):s.jsoneditor.options.show_opt_in||s.options.show_opt_in?N.deactivate():s.removeObjectProperty(T)})),Object.entries(e).forEach((function(u){var k=jo(u,2),T=k[0],N=k[1];s.cached_editors[T]||(s.addObjectProperty(T),s.editors[T]&&s.editors[T].setValue(N,t,!!s.editors[T].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(e){var t=this,s=[],u=[];e.forEach((function(k){k.path===t.path?s.push(k):u.push(k)})),this.error_holder&&(s.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s.forEach((function(k){k.errorcount&&k.errorcount>1&&(k.message+=" (".concat(k.errorcount," errors)")),t.error_holder.appendChild(t.theme.getErrorMessage(k.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(s.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(k){k.showValidationErrors(u)}))}}])&&v0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Eo(l){return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Eo(l)}function g0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,_0(c.key),c)}}function _0(l){var r=(function(n,c){if(Eo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Eo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Eo(r)=="symbol"?r:r+""}function w0(l,r,n){return r=jn(r),(function(c,e){if(e&&(Eo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,wp()?Reflect.construct(r,n||[],jn(l).constructor):r.apply(l,n))}function wp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(wp=function(){return!!l})()}function Oo(){return Oo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=jn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Oo.apply(this,arguments)}function jn(l){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jn(l)}function Bc(l,r){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Bc(l,r)}_p.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 k0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),w0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){Oo(jn(r.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var e=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 t=function(q){e.setValue(q.currentTarget.value),e.onChange(!0),e.radioGroup.forEach((function(Q){Q.checked=Q.value===e.getValue()}))},s=0;s<this.enum_values.length;s++){var u={id:"".concat(this.formname,"[").concat(s,"]"),value:this.enum_values[s]};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",t,!1),this.radioGroup.push(this.input);var k=this.theme.getFormRadioLabel(this.enum_display[s]);k.htmlFor=this.input.id;var T=this.theme.getFormRadioControl(k,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(T)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var N=0;N<this.radioGroup.length;N++)this.radioGroup[N].disabled=!0;this.radioContainer.classList.add("readonly")}var B=this.theme.getContainer();B.appendChild(this.radioContainer),B.dataset.containerFor="radio",this.input=B,this.control=this.theme.getFormControl(this.label,B,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.input.parentNode&&e.afterInputReady()}))}},{key:"enable",value:function(){if(!this.always_disabled){for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!1;this.radioContainer.classList.remove("readonly"),Oo(jn(r.prototype),"enable",this).call(this)}}},{key:"disable",value:function(e){e&&(this.always_disabled=!0);for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!0;this.radioContainer.classList.add("readonly"),Oo(jn(r.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),Oo(jn(r.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(e){typeof(e=this.applyConstFilter(e))!="string"&&(e=String(e));for(var t=0;t<this.radioGroup.length;t++){if(this.radioGroup[t].value===e){this.radioGroup[t].checked=!0;break}this.radioGroup[t].checked=!1}this.value=e,this.onChange()}}])&&g0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(wa);function xo(l){return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xo(l)}function j0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,E0(c.key),c)}}function E0(l){var r=(function(n,c){if(xo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(xo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return xo(r)=="symbol"?r:r+""}function O0(l,r,n){return r=Vr(r),(function(c,e){if(e&&(xo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,kp()?Reflect.construct(r,n||[],Vr(l).constructor):r.apply(l,n))}function kp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(kp=function(){return!!l})()}function Yn(){return Yn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Vr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Yn.apply(this,arguments)}function Vr(l){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vr(l)}function Fc(l,r){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Fc(l,r)}var x0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),O0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Yn(Vr(r.prototype),"setValue",this).call(this,e,t,s);u!==void 0&&u.changed&&this.sceditor_instance&&this.sceditor_instance.val(u.value)}},{key:"build",value:function(){this.options.format="textarea",Yn(Vr(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e=this;if(window.sceditor){var t=this.expandCallbacks("sceditor",b({},{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})),s=window.sceditor.instance(this.input);s===void 0&&window.sceditor.create(this.input,t),this.sceditor_instance=s||window.sceditor.instance(this.input),this.sceditor_instance.blur((function(){e.value=e.sceditor_instance.val(),e.sceditor_instance.updateOriginal(),e.is_dirty=!0,e.onChange(!0)})),this.theme.afterInputReady(this.input)}else Yn(Vr(r.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),Yn(Vr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Yn(Vr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Yn(Vr(r.prototype),"destroy",this).call(this)}}])&&j0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function So(l){return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},So(l)}function S0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,C0(c.key),c)}}function C0(l){var r=(function(n,c){if(So(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(So(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return So(r)=="symbol"?r:r+""}function P0(l,r,n){return r=Xr(r),(function(c,e){if(e&&(So(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,jp()?Reflect.construct(r,n||[],Xr(l).constructor):r.apply(l,n))}function jp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jp=function(){return!!l})()}function Ti(){return Ti=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Xr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ti.apply(this,arguments)}function Xr(l){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xr(l)}function Mc(l,r){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Mc(l,r)}var T0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),P0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.select2_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var s=this.updateValue(e);this.input.value=s,this.select2v4?this.select2_instance.val(s).trigger("change"):this.select2_instance.select2("val",s),this.onChange(!0)}else Ti(Xr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var t=this.expandCallbacks("select2",b({},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=O(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var s=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(s),e.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}Ti(Xr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){var t=this.enum_values[0];return e=this.typecast(e||""),this.enum_values.includes(e)?t=e:this.newEnumAllowed&&(t=this.addNewOption(e)?e:t),this.value=t,t}},{key:"addNewOption",value:function(e){var t,s=this.typecast(e),u=!1;return this.enum_values.includes(s)||s===""||(this.enum_options.push("".concat(s)),this.enum_display.push("".concat(s)),this.enum_values.push(s),this.schema.enum.push(s),(t=this.input.querySelector('option[value="'.concat(s,'"]')))?t.removeAttribute("data-select2-tag"):this.select2_instance.append(new Option(s,s,!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)),Ti(Xr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Ti(Xr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ti(Xr(r.prototype),"destroy",this).call(this)}}])&&S0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(wa);function Co(l){return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Co(l)}function R0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,L0(c.key),c)}}function L0(l){var r=(function(n,c){if(Co(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Co(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Co(r)=="symbol"?r:r+""}function A0(l,r,n){return r=zr(r),(function(c,e){if(e&&(Co(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ep()?Reflect.construct(r,n||[],zr(l).constructor):r.apply(l,n))}function Ep(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ep=function(){return!!l})()}function Qn(){return Qn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=zr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Qn.apply(this,arguments)}function zr(l){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zr(l)}function Vc(l,r){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Vc(l,r)}var $0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),A0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.selectize_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var s=this.updateValue(e);this.input.value=s,this.selectize_instance.clear(!0),this.selectize_instance.setValue(s),this.onChange(!0)}else Qn(zr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var t=this.expandCallbacks("selectize",b({},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=function(s){e.updateValue(s),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Qn(zr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){var t=this.enum_values[0];return e=this.typecast(e||""),this.enum_values.includes(e)?t=e:this.newEnumAllowed&&(t=this.addNewOption(e)?e:t),this.value=t,t}},{key:"addNewOption",value:function(e){var t=this.typecast(e),s=!1;return this.enum_values.includes(t)||t===""||(this.enum_options.push("".concat(t)),this.enum_display.push("".concat(t)),this.enum_values.push(t),this.schema.enum.push(t),this.selectize_instance.addItem(t),this.selectize_instance.refreshOptions(!1),s=!0),s}},{key:"onWatchedFieldChange",value:function(){var e=this;Qn(zr(r.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((function(t,s){e.selectize_instance.addOption({value:t,text:e.enum_display[s]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Qn(zr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),Qn(zr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Qn(zr(r.prototype),"destroy",this).call(this)}}])&&R0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(wa);function Po(l){return Po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Po(l)}function N0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,I0(c.key),c)}}function I0(l){var r=(function(n,c){if(Po(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Po(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Po(r)=="symbol"?r:r+""}function D0(l,r,n){return r=rl(r),(function(c,e){if(e&&(Po(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Op()?Reflect.construct(r,n||[],rl(l).constructor):r.apply(l,n))}function Op(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Op=function(){return!!l})()}function rl(l){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rl(l)}function zc(l,r){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},zc(l,r)}var B0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),D0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){var e=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 t=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var s=document.createElement("div");s.classList.add("signature-container");var u=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&u.setAttribute("name",t),u.classList.add("signature"),s.appendChild(u),this.signaturePad=new window.SignaturePad(u),this.signaturePad.onEnd=function(){e.signaturePad.isEmpty()?e.input.value="":e.input.value=e.signaturePad.toDataURL(),e.is_dirty=!0,e.refreshValue(),e.watch_listener(),e.jsoneditor.notifyWatchers(e.path),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange()};var k=document.createElement("div"),T=document.createElement("button");T.classList.add("tiny","button"),T.innerHTML="Clear signature",k.appendChild(T),s.appendChild(k),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(B){u.setAttribute("readOnly","readOnly"),B.disabled=!0}))),T.addEventListener("click",(function(B){B.preventDefault(),B.stopPropagation(),e.signaturePad.clear(),e.signaturePad.strokeEnd()})),this.control=this.theme.getFormControl(this.label,s,this.description),this.container.appendChild(this.control),this.refreshValue(),u.width=s.offsetWidth,this.options&&this.options.canvas_height?u.height=this.options.canvas_height:u.height="300"}else{var N=document.createElement("p");N.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(N)}}},{key:"setValue",value:function(e){if(e=this.applyConstFilter(e),typeof SignaturePad=="function"){var t=this.sanitize(e);return this.value===t?void 0:(this.value=t,this.input.value=this.value,this.signaturePad.clear(),e&&e!==""&&this.signaturePad.fromDataURL(e),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&N0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function To(l){return To=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},To(l)}function F0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,M0(c.key),c)}}function M0(l){var r=(function(n,c){if(To(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(To(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return To(r)=="symbol"?r:r+""}function V0(l,r,n){return r=qr(r),(function(c,e){if(e&&(To(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,xp()?Reflect.construct(r,n||[],qr(l).constructor):r.apply(l,n))}function xp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xp=function(){return!!l})()}function Xn(){return Xn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=qr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Xn.apply(this,arguments)}function qr(l){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qr(l)}function qc(l,r){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},qc(l,r)}y(6031);var z0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),V0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Xn(qr(r.prototype),"setValue",this).call(this,e,t,s);u!==void 0&&u.changed&&this.simplemde_instance&&this.simplemde_instance.value(u.value)}},{key:"build",value:function(){this.options.format="textarea",Xn(qr(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;window.SimpleMDE?(e=this.expandCallbacks("simplemde",b({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",(function(){t.value=t.simplemde_instance.value(),t.is_dirty=!0,t.onChange(!0)})),e.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Xn(qr(r.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),Xn(qr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Xn(qr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Xn(qr(r.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(e,t){var s=this,u=function k(){e.display.wrapper.offsetHeight?(s.stopListening(e,t),e.display.lastWrapHeight!==e.display.wrapper.clientHeight&&e.refresh()):t.timeout=window.setTimeout(k,t.delay)};t.timeout=window.setTimeout(u,t.delay),t.hurry=function(){window.clearTimeout(t.timeout),t.timeout=window.setTimeout(u,50)},e.on(window,"mouseup",t.hurry),e.on(window,"keyup",t.hurry)}},{key:"stopListening",value:function(e,t){window.clearTimeout(t.timeout),e.off(window,"mouseup",t.hurry),e.off(window,"keyup",t.hurry)}}])&&F0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function Ro(l){return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ro(l)}function q0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,H0(c.key),c)}}function H0(l){var r=(function(n,c){if(Ro(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ro(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ro(r)=="symbol"?r:r+""}function U0(l,r,n){return r=Ri(r),(function(c,e){if(e&&(Ro(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Sp()?Reflect.construct(r,n||[],Ri(l).constructor):r.apply(l,n))}function Sp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Sp=function(){return!!l})()}function nl(){return nl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Ri(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},nl.apply(this,arguments)}function Ri(l){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ri(l)}function Hc(l,r){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Hc(l,r)}var Cp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),U0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){var e=this;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){var t=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&t--,this.enum_values=[];for(var s=0;s<t;s++)this.enum_values.push(s+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var u=function(le){le.preventDefault(),le.stopPropagation(),e.setValue(le.currentTarget.value),e.onChange(!0)},k=this.enum_values.length-1;k>-1;k--){var T=this.formname+(k+1),N=this.theme.getFormInputField("radio");N.name="".concat(this.formname,"[starrating]"),N.value=this.enum_values[k],N.id=T,N.addEventListener("change",u,!1),this.radioGroup.push(N);var B=document.createElement("label");B.htmlFor=T,B.title=this.enum_values[k],this.options.displayValue&&B.classList.add("starrating-display-enabled");var q=this.theme.getHiddenText("label");q.textContent=k,B.appendChild(q),this.ratingContainer.appendChild(N),this.ratingContainer.appendChild(B)}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 Q=0;Q<this.radioGroup.length;Q++)this.radioGroup[Q].disabled=!0;this.ratingContainer.classList.add("readonly")}var X=this.theme.getContainer();X.appendChild(this.ratingContainer),this.input=X,this.control=this.theme.getFormControl(this.label,X,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(e){e&&(this.always_disabled=!0);for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].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),nl(Ri(r.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===""?0:parseInt(this.value):this.value}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value=e;for(var t=0;t<this.radioGroup.length;t++)if(this.radioGroup[t].value==="".concat(e)){this.radioGroup[t].checked=!0,this.value=e,this.options.displayValue&&(this.displayRating.innerHTML=this.value);break}nl(Ri(r.prototype),"setValue",this).call(this,this.value)}}])&&q0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function Lo(l){return Lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Lo(l)}function G0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,J0(c.key),c)}}function J0(l){var r=(function(n,c){if(Lo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Lo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Lo(r)=="symbol"?r:r+""}function K0(l,r,n){return r=ei(r),(function(c,e){if(e&&(Lo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Pp()?Reflect.construct(r,n||[],ei(l).constructor):r.apply(l,n))}function Pp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Pp=function(){return!!l})()}function Oa(){return Oa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ei(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Oa.apply(this,arguments)}function ei(l){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ei(l)}function Uc(l,r){return Uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Uc(l,r)}Cp.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 W0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),K0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){Oa(ei(r.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var e=this.theme.getStepperButtons(this.input);this.control.appendChild(e),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){Oa(ei(r.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){Oa(ei(r.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&G0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(lp);function Ao(l){return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ao(l)}function Z0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Y0(c.key),c)}}function Y0(l){var r=(function(n,c){if(Ao(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ao(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ao(r)=="symbol"?r:r+""}function Q0(l,r,n){return r=en(r),(function(c,e){if(e&&(Ao(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Tp()?Reflect.construct(r,n||[],en(l).constructor):r.apply(l,n))}function Tp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Tp=function(){return!!l})()}function Li(){return Li=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=en(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Li.apply(this,arguments)}function en(l){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},en(l)}function Gc(l,r){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Gc(l,r)}var X0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Q0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)})(r,l),n=r,c=[{key:"register",value:function(){if(Li(en(r.prototype),"register",this).call(this),this.rows)for(var e=0;e<this.rows.length;e++)this.rows[e].register()}},{key:"unregister",value:function(){if(Li(en(r.prototype),"unregister",this).call(this),this.rows)for(var e=0;e<this.rows.length;e++)this.rows[e].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var e=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=e.title||"row",this.item_default=e.default||null,this.item_has_child_editors=e.properties||e.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,Li(en(r.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 e=this.getElementEditor(0,!0);if(this.item_default=e.getDefault(),this.width=e.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)for(var t=e.getChildEditors(),s=e.property_order||Object.keys(t),u=0;u<s.length;u++){var k=this.theme.getTableHeaderCell(t[s[u]].getTitle());t[s[u]].options.hidden&&(k.style.display="none"),this.header_row.appendChild(k)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));e.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()}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),Li(en(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"getItemDefault",value:function(){return b({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(e,t){var s=b({},this.schema.items),u=this.jsoneditor.getEditorClass(s,this.jsoneditor),k=this.row_holder.appendChild(this.theme.getTableRow()),T=k;this.item_has_child_editors||(T=this.theme.getTableCell(),k.appendChild(T));var N=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:s,container:T,path:"".concat(this.path,".").concat(e),parent:this,compact:!0,table_row:!0});return N.preBuild(),t||(N.build(),N.postBuild(),N.controls_cell=k.appendChild(this.theme.getTableCell()),N.row=k,N.table_controls=this.theme.getButtonHolder(),N.controls_cell.appendChild(N.table_controls),N.table_controls.style.margin=0,N.table_controls.style.padding=0),N}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,Li(en(r.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(e){if(Array.isArray(e)||(e=[e]),this.schema.minItems)for(;e.length<this.schema.minItems;)e.push(this.getItemDefault());return this.schema.maxItems&&e.length>this.schema.maxItems&&(e=e.slice(0,this.schema.maxItems)),e}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){var u=!1;t.forEach((function(N,B){e.rows[B]?e.rows[B].setValue(N):(e.addRow(N),u=!0)}));for(var k=t.length;k<this.rows.length;k++){var T=this.rows[k].container;this.item_has_child_editors||this.rows[k].row.parentNode.removeChild(this.rows[k].row),this.rows[k].destroy(),T.parentNode&&T.parentNode.removeChild(T),this.rows[k]=null,u=!0}this.rows=this.rows.slice(0,t.length),this.refreshValue(),(u||s)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var e=this,t=this.schema.minItems&&this.schema.minItems>=this.rows.length,s=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,u=[];this.rows.forEach((function(Q,X){if(Q.delete_button){var le=!t;e.setButtonState(Q.delete_button,le),u.push(le)}if(Q.copy_button){var ye=!s;e.setButtonState(Q.copy_button,ye),u.push(ye)}if(Q.moveup_button){var xe=X!==0;e.setButtonState(Q.moveup_button,xe),u.push(xe)}if(Q.movedown_button){var Pe=X!==e.rows.length-1;e.setButtonState(Q.movedown_button,Pe),u.push(Pe)}}));var k=u.some((function(Q){return Q}));this.rows.forEach((function(Q){return e.setButtonState(Q.controls_cell,k)})),this.setButtonState(this.controls_header_cell,k),this.setButtonState(this.table,this.value.length);var T=!(s||this.hide_add_button);this.setButtonState(this.add_row_button,T);var N=!(!this.value.length||t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,N);var B=!(this.value.length<=1||t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,B);var q=T||N||B;this.setButtonState(this.controls,q)}},{key:"refreshValue",value:function(){var e=this;this.value=[],this.rows.forEach((function(t,s){e.value[s]=t.getValue()})),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(e){var t=this.rows.length;this.rows[t]=this.getElementEditor(t);var s=this.rows[t].table_controls;return this.hide_delete_buttons||(this.rows[t].delete_button=this._createDeleteButton(t,s)),this.show_copy_button&&(this.rows[t].copy_button=this._createCopyButton(t,s)),this.hide_move_buttons||(this.rows[t].moveup_button=this._createMoveUpButton(t,s)),this.hide_move_buttons||(this.rows[t].movedown_button=this._createMoveDownButton(t,s)),this._supportDragDrop(this.rows[t].row),e!==void 0&&this.rows[t].setValue(e),this.rows[t]}},{key:"_createDeleteButton",value:function(e,t){var s=this,u=this.getButton("","delete","button_delete_row_title_short");return u.classList.add("delete","json-editor-btntype-delete"),u.setAttribute("data-i",e),u.addEventListener("click",(function(k){if(k.preventDefault(),k.stopPropagation(),!s.askConfirmation())return!1;var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue(),B=s.getValue()[T];N.splice(T,1),s.setValue(N),s.onChange(!0),s.jsoneditor.trigger("deleteRow",B)})),t.appendChild(u),u}},{key:"_createCopyButton",value:function(e,t){var s=this,u=this.getButton("","copy","button_copy_row_title_short"),k=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(T){T.preventDefault(),T.stopPropagation();var N=1*T.currentTarget.getAttribute("data-i"),B=s.getValue(),q=B[N];k.items.type==="string"&&k.items.format==="uuid"?q=S():k.items.type==="object"&&k.items.properties&&B.forEach((function(Q,X){if(N===X)for(var le=0,ye=Object.keys(Q);le<ye.length;le++){var xe=ye[le];k.items.properties&&k.items.properties[xe]&&k.items.properties[xe].format==="uuid"&&((q=Object.assign({},B[N]))[xe]=S())}})),B.splice(N+1,0,q),s.setValue(B),s.onChange(!0),s.jsoneditor.trigger("copyRow",s.rows[N+1])})),t.appendChild(u),u}},{key:"_createMoveUpButton",value:function(e,t){var s=this,u=this.getButton("","moveup","button_move_up_title");return u.classList.add("moveup","json-editor-btntype-move"),u.setAttribute("data-i",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue();N.splice(T-1,0,N.splice(T,1)[0]),s.setValue(N),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T-1])})),t.appendChild(u),u}},{key:"_createMoveDownButton",value:function(e,t){var s=this,u=this.getButton("","movedown","button_move_down_title");return u.classList.add("movedown","json-editor-btntype-move"),u.setAttribute("data-i",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue();N.splice(T+1,0,N.splice(T,1)[0]),s.setValue(N),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T+1])})),t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e){var t=this;$e(e,(function(s,u){var k=t.getValue(),T=k[s];k.splice(s,1),k.splice(u,0,T),t.setValue(k),t.onChange(!0),t.jsoneditor.trigger("moveRow",t.rows[u])}),{useTrigger:!0})}},{key:"addControls",value:function(){var e=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(t){t.preventDefault(),t.stopPropagation(),e.setButtonState(e.panel,e.collapsed),e.collapsed?(e.collapsed=!1,e.setButtonText(t.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.setButtonText(t.currentTarget,"","expand","button_expand"))})),this.options.collapsed&&w(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 e=this.getButton("","collapse","button_collapse");return e.classList.add("json-editor-btntype-toggle"),e}},{key:"_createAddRowButton",value:function(){var e=this,t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",(function(s){s.preventDefault(),s.stopPropagation();var u=e.addRow();e.refreshValue(),e.refreshRowButtons(),e.onChange(!0),e.jsoneditor.trigger("addRow",u)})),this.controls.appendChild(t),t}},{key:"_createDeleteLastRowButton",value:function(){var e=this,t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue(),k=u.pop();e.setValue(u),e.onChange(!0),e.jsoneditor.trigger("deleteRow",k)})),this.controls.appendChild(t),t}},{key:"_createRemoveAllRowsButton",value:function(){var e=this,t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue();e.setValue([]),e.onChange(!0),e.jsoneditor.trigger("deleteAllRows",u)})),this.controls.appendChild(t),t}}],c&&Z0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Oe);function $o(l){return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$o(l)}function ew(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,tw(c.key),c)}}function tw(l){var r=(function(n,c){if($o(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if($o(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return $o(r)=="symbol"?r:r+""}function rw(l,r,n){return r=ti(r),(function(c,e){if(e&&($o(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Rp()?Reflect.construct(r,n||[],ti(l).constructor):r.apply(l,n))}function Rp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Rp=function(){return!!l})()}function xa(){return xa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ti(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},xa.apply(this,arguments)}function ti(l){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ti(l)}function Jc(l,r){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Jc(l,r)}function No(l){return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},No(l)}function nw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,iw(c.key),c)}}function iw(l){var r=(function(n,c){if(No(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(No(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return No(r)=="symbol"?r:r+""}function ow(l,r,n){return r=ri(r),(function(c,e){if(e&&(No(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Lp()?Reflect.construct(r,n||[],ri(l).constructor):r.apply(l,n))}function Lp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Lp=function(){return!!l})()}function Sa(){return Sa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ri(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Sa.apply(this,arguments)}function ri(l){return ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ri(l)}function Kc(l,r){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Kc(l,r)}function Io(l){return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Io(l)}function aw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,sw(c.key),c)}}function sw(l){var r=(function(n,c){if(Io(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Io(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Io(r)=="symbol"?r:r+""}function lw(l,r,n){return r=tn(r),(function(c,e){if(e&&(Io(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ap()?Reflect.construct(r,n||[],tn(l).constructor):r.apply(l,n))}function Ap(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ap=function(){return!!l})()}function Ai(){return Ai=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=tn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ai.apply(this,arguments)}function tn(l){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tn(l)}function Wc(l,r){return Wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Wc(l,r)}y(9868);var il={ace:ge,array:Oe,arrayChoices:zt,arraySelect2:oo,arraySelectize:fc,autocomplete:mc,base64:h_,button:Kf,checkbox:g_,choices:Qf,datetime:P_,describedBy:A_,enum:D_,hidden:V_,info:U_,integer:lp,ip:t0,jodit:o0,multiple:h0,multiselect:Ee,null:y0,number:ap,object:_p,radio:k0,sceditor:x0,select:wa,select2:T0,selectize:$0,signature:B0,simplemde:z0,starrating:Cp,stepper:W0,string:de,table:X0,upload:(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),rw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)})(r,l),n=r,(c=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var 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.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",b({},{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,k,T,N){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){e.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 k=u.target.files||u.dataTransfer.files;if(k&&k.length)if(e.options.max_upload_size!==0&&k[0].size>e.options.max_upload_size)e.theme.addInputError(e.uploader,"".concat(e.translate("upload_max_size")," ").concat(e.options.max_upload_size));else if(e.options.mime_type.length===0||e.isValidMimeType(k[0].type,e.options.mime_type)){e.fileDisplay&&(e.fileDisplay.value=k[0].name);var T=new window.FileReader;T.onload=function(N){e.preview_value=N.target.result,e.refreshPreview(k),e.onChange(!0),T=null},T.readAsDataURL(k[0])}else e.theme.addInputError(e.uploader,"".concat(e.translate("upload_wrong_file_format")," ").concat(e.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(u){var k=u.dataTransfer.items||u.dataTransfer.files,T=k&&k.length&&(e.options.mime_type.length===0||e.isValidMimeType(k[0].type,e.options.mime_type)),N=u.currentTarget.classList&&u.currentTarget.classList.contains("upload-dropzone")&&T;switch((u.currentTarget===window?"w_":"e_")+u.type){case"w_drop":case"w_dragover":N||(u.dataTransfer.dropEffect="none");break;case"e_dragenter":N?(e.dropZone.classList.add("valid-dropzone"),u.dataTransfer.dropEffect="copy"):e.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":N&&(u.dataTransfer.dropEffect="copy");break;case"e_dragleave":e.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":e.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),N&&e.uploadHandler(u)}N||u.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach((function(u){window.addEventListener(u,e.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(u){e.dropZone.addEventListener(u,e.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 t=this.uploader||this.input,s=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&s.appendChild(this.dropZone),this.fileUploadGroup&&s.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&s.appendChild(this.dropZone),s.appendChild(this.preview),t.parentNode.insertBefore(s,t.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.afterInputReady()}))}},{key:"afterInputReady",value:function(){var e=this;if(this.value){var t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.onload=function(s){e.preview.appendChild(t)},t.onerror=function(s){console.error("upload error",s,s.currentTarget)},t.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(e){var t=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var s=e[0],u=this.preview_value.match(/^data:([^;,]+)[;,]/);if(s.mimeType=u?u[1]:"unknown",s.size>0){var k=Math.floor(Math.log(s.size)/Math.log(1024));s.formattedSize="".concat(parseFloat((s.size/Math.pow(1024,k)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][k])}else s.formattedSize="0 Bytes";var T=this.getButton("button_upload","upload","button_upload");T.addEventListener("click",(function(N){N.preventDefault(),T.setAttribute("disabled","disabled"),t.theme.removeInputError(t.uploader),t.theme.getProgressBar&&(t.progressBar=t.theme.getProgressBar(),t.preview.appendChild(t.progressBar)),t.options.upload_handler(t.path,s,{success:function(B){t.setValue(B),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange(),t.progressBar&&t.preview.removeChild(t.progressBar),T.removeAttribute("disabled")},failure:function(B){t.theme.addInputError(t.uploader,B),t.progressBar&&t.preview.removeChild(t.progressBar),T.removeAttribute("disabled")},updateProgress:function(B){t.progressBar&&(B?t.theme.updateProgressBar(t.progressBar,B):t.theme.updateProgressBarUnknown(t.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(s,T,this.preview_value)),this.options.auto_upload&&(T.dispatchEvent(new window.MouseEvent("click")),T.parentNode.removeChild(T))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),xa(ti(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),xa(ti(r.prototype),"disable",this).call(this)}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.value=e,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var e=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach((function(t){window.removeEventListener(t,e.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(t){e.dropZone.removeEventListener(t,e.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),xa(ti(r.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(e,t){return t.reduce((function(s,u){return s||new RegExp(u.replace(/\*/g,".*"),"gi").test(e)}),!1)}}])&&ew(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D),uuid:(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ow(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){Sa(ri(r.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(){Sa(ri(r.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(e){return this.testUuid(e)||(e=this.uuid),e}},{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e),this.testUuid(e)||(e=this.uuid),this.uuid=e,Sa(ri(r.prototype),"setValue",this).call(this,e,t,s)}},{key:"getUuid",value:function(){return S()}},{key:"testUuid",value:function(e){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)}}])&&nw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de),colorpicker:(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),lw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wc(e,t)})(r,l),n=r,(c=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Ai(tn(r.prototype),"setValue",this).call(this,e,t,s);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(){Ai(tn(r.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(Ai(tn(r.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var e=this.picker_instance.domElement.querySelectorAll("button"),t=0;t<e.length;t++)e[t].disabled=!0}}},{key:"enable",value:function(){if(Ai(tn(r.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var e=this.picker_instance.domElement.querySelectorAll("button"),t=0;t<e.length;t++)e[t].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),Ai(tn(r.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(e){var t=this;if(e){if(window.Picker&&!this.picker_instance){var s=this.expandCallbacks("colorpicker",b({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),u=function(k){var T=t.picker_instance.settings.editorFormat,N=t.picker_instance.settings.alpha;t.setValue(T==="hex"?N?k.hex:k.hex.slice(0,7):k["".concat(T+(N?"a":""),"String")])};s.popup||typeof s.onChange=="function"?s.popup&&typeof s.onDone!="function"&&(s.onDone=u):s.onChange=u,this.picker_instance=new window.Picker(s),s.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="")}}])&&aw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de)};function $p(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}var Np={},Zc="en",cw=Zc;Np.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",paste_max_length_reached:"Pasted text exceeded maximum length of {{0}} and will be clipped."},Object.entries(il).forEach((function(l){var r=(function(e,t){return(function(s){if(Array.isArray(s))return s})(e)||(function(s,u){var k=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(k!=null){var T,N,B,q,Q=[],X=!0,le=!1;try{if(B=(k=k.call(s)).next,u!==0)for(;!(X=(T=B.call(k)).done)&&(Q.push(T.value),Q.length!==u);X=!0);}catch(ye){le=!0,N=ye}finally{try{if(!X&&k.return!=null&&(q=k.return(),Object(q)!==q))return}finally{if(le)throw N}}return Q}})(e,t)||(function(s,u){if(s){if(typeof s=="string")return $p(s,u);var k=Object.prototype.toString.call(s).slice(8,-1);return k==="Object"&&s.constructor&&(k=s.constructor.name),k==="Map"||k==="Set"?Array.from(s):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?$p(s,u):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vp(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function jn(l){return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jn(l)}function v0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,bp(c.key),c)}}function bp(l){var r=(function(n,c){if(jn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(jn(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return jn(r)=="symbol"?r:r+""}function b0(l,r,n){return r=br(r),(function(c,e){if(e&&(jn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,gp()?Reflect.construct(r,n||[],br(l).constructor):r.apply(l,n))}function gp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(gp=function(){return!!l})()}function Qr(){return Qr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=br(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Qr.apply(this,arguments)}function br(l){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},br(l)}function Dc(l,r){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Dc(l,r)}var _p=(function(l){function r(e,t,s){var u;return(function(k,T){if(!(k instanceof T))throw new TypeError("Cannot call a class as a function")})(this,r),(u=b0(this,r,[e,t])).currentDepth=s,u}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)})(r,l),n=r,(c=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Qr(br(r.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){Qr(br(r.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.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),Qr(br(r.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){(e.isActive()||e.isUiOnly)&&e.enable(),e.optInCheckbox&&(e.optInCheckbox.disabled=!1)})))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),Qr(br(r.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){(t.isActive()||t.isUiOnly)&&t.disable(e),t.optInCheckbox.disabled=!0}))}},{key:"layoutEditors",value:function(){var e,t,s=this;if(this.row_container){var u;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(tt,we){var Ce=s.editors[tt].schema.propertyOrder,at=s.editors[we].schema.propertyOrder;return typeof Ce!="number"&&(Ce=1e3),typeof at!="number"&&(at=1e3),Ce-at}));var k,T=this.format==="categories",N=[],B=null,q=null;if(this.format==="grid-strict"){var Q=0;if(k=[],this.property_order.forEach((function(tt){var we=s.editors[tt];if(!we.property_removed){var Ce=we.options.hidden?0:we.options.grid_columns||we.getNumColumns(),at=we.options.hidden?0:we.options.grid_offset||0,vt=!we.options.hidden&&(we.options.grid_break||!1),ar={key:tt,width:Ce,offset:at,height:we.options.hidden?0:we.container.offsetHeight};k.push(ar),N[Q]=k,vt&&(Q++,k=[])}})),this.layout===JSON.stringify(N))return!1;for(this.layout=JSON.stringify(N),u=document.createElement("div"),e=0;e<N.length;e++)for(k=this.theme.getGridRow(),u.appendChild(k),t=0;t<N[e].length;t++)B=N[e][t].key,(q=this.editors[B]).options.hidden?q.container.style.display="none":this.theme.setGridColumnSize(q.container,N[e][t].width,N[e][t].offset),k.appendChild(q.container)}else if(this.format==="grid"){for(this.property_order.forEach((function(tt){var we=s.editors[tt];if(!we.property_removed){for(var Ce=!1,at=we.options.hidden?0:we.options.grid_columns||we.getNumColumns(),vt=we.options.hidden?0:we.container.offsetHeight,ar=0;ar<N.length;ar++)N[ar].width+at<=12&&(!vt||.5*N[ar].minh<vt&&2*N[ar].maxh>vt)&&(Ce=ar);Ce===!1&&(N.push({width:0,minh:999999,maxh:0,editors:[]}),Ce=N.length-1),N[Ce].editors.push({key:tt,width:at,height:vt}),N[Ce].width+=at,N[Ce].minh=Math.min(N[Ce].minh,vt),N[Ce].maxh=Math.max(N[Ce].maxh,vt)}})),e=0;e<N.length;e++)if(N[e].width<12){var X=!1,le=0;for(t=0;t<N[e].editors.length;t++)(X===!1||N[e].editors[t].width>N[e].editors[X].width)&&(X=t),N[e].editors[t].width*=12/N[e].width,N[e].editors[t].width=Math.floor(N[e].editors[t].width),le+=N[e].editors[t].width;le<12&&(N[e].editors[X].width+=12-le),N[e].width=12}if(this.layout===JSON.stringify(N))return!1;for(this.layout=JSON.stringify(N),u=document.createElement("div"),e=0;e<N.length;e++)for(k=this.theme.getGridRow(),u.appendChild(k),t=0;t<N[e].editors.length;t++)B=N[e].editors[t].key,(q=this.editors[B]).options.hidden?q.container.style.display="none":this.theme.setGridColumnSize(q.container,N[e].editors[t].width),k.appendChild(q.container)}else{if(u=document.createElement("div"),T){var ye=document.createElement("div"),xe=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Pe=this.theme.getTopTabContentHolder(xe);for(this.property_order.forEach((function(tt){var we=s.editors[tt];if(!we.property_removed){var Ce=s.theme.getTabContent(),at=we.schema&&(we.schema.type==="object"||we.schema.type==="array");Ce.isObjOrArray=at;var vt=s.theme.getGridRow();we.tab||(s.basicPane===void 0?s.addRow(we,xe,Ce):s.addRow(we,xe,s.basicPane)),Ce.id=s.getValidId(we.tab_text.textContent),at?(Ce.appendChild(vt),Pe.appendChild(Ce),s.theme.addTopTab(xe,we.tab)):(ye.appendChild(vt),Pe.childElementCount>0?Pe.firstChild.isObjOrArray&&(Ce.appendChild(ye),Pe.insertBefore(Ce,Pe.firstChild),s.theme.insertBasicTopTab(we.tab,xe),we.basicPane=Ce):(Ce.appendChild(ye),Pe.appendChild(Ce),s.theme.addTopTab(xe,we.tab),we.basicPane=Ce)),we.options.hidden?we.container.style.display="none":s.theme.setGridColumnSize(we.container,12),vt.appendChild(we.container),we.rowPane=Ce}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var Be=this.tabs_holder.parentNode;Be.removeChild(Be.firstChild),Be.appendChild(xe),this.tabPanesContainer=Pe,this.tabs_holder=xe;var Ke=this.theme.getFirstTab(this.tabs_holder);return void(Ke&&w(Ke,"click"))}this.property_order.forEach((function(tt){var we=s.editors[tt];we.property_removed||(k=s.theme.getGridRow(),u.appendChild(k),we.options.hidden?we.container.style.display="none":s.theme.setGridColumnSize(we.container,12),k.appendChild(we.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(u)}}},{key:"getPropertySchema",value:function(e){var t=this,s=this.schema.properties[e]||{};s=b({},s);var u=!!this.schema.properties[e];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(k){new RegExp(k).test(e)&&(s.allOf=s.allOf||[],s.allOf.push(t.schema.patternProperties[k]),u=!0)})),!u&&this.schema.additionalProperties&&jn(this.schema.additionalProperties)==="object"&&(s=b({},this.schema.additionalProperties)),s}},{key:"preBuild",value:function(){var e=this;if(Qr(br(r.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(t){var s=jo(t,2),u=s[0],k=s[1],T=e.jsoneditor.getEditorClass(k);e.editors[u]=e.jsoneditor.createEditor(T,{jsoneditor:e.jsoneditor,schema:k,path:"".concat(e.path,".").concat(u),parent:e,compact:!0,required:!0},e.currentDepth+1),e.editors[u].preBuild();var N=e.editors[u].options.hidden?0:e.editors[u].options.grid_columns||e.editors[u].getNumColumns();e.minwidth+=N,e.maxwidth+=N})),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(t){return e.isRequiredObject({key:t,schema:e.schema.properties[t]})})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach((function(t){e.addObjectProperty(t,!0),e.editors[t]&&(e.minwidth=Math.max(e.minwidth,e.editors[t].options.grid_columns||e.editors[t].getNumColumns()),e.maxwidth+=e.editors[t].options.grid_columns||e.editors[t].getNumColumns())}))}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(t,s){var u=e.editors[t].schema.propertyOrder,k=e.editors[s].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof k!="number"&&(k=1e3),u-k}))}},{key:"addTab",value:function(e){var t=this,s=this.rows[e].schema&&(this.rows[e].schema.type==="object"||this.rows[e].schema.type==="array");this.tabs_holder&&(this.rows[e].tab_text=document.createElement("span"),this.rows[e].tab_text.textContent=s?this.rows[e].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[e].tab=this.theme.getTopTab(this.rows[e].tab_text,this.getValidId(this.rows[e].tab_text.textContent)),this.rows[e].tab.addEventListener("click",(function(u){t.active_tab=t.rows[e].tab,t.refreshTabs(),u.preventDefault(),u.stopPropagation()})))}},{key:"addRow",value:function(e,t,s){var u=this.rows.length,k=e.schema.type==="object"||e.schema.type==="array";this.rows[u]=e,this.rows[u].rowPane=s,k?(this.addTab(u),this.theme.addTopTab(t,this.rows[u].tab)):this.basicTab===void 0?(this.addTab(u),this.basicTab=u,this.basicPane=s,this.theme.addTopTab(t,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(e){var t=this,s=this.basicTab!==void 0,u=!1;this.rows.forEach((function(k){k.tab&&k.rowPane&&k.rowPane.parentNode&&(s&&k.tab===t.rows[t.basicTab].tab&&u||(e?k.tab_text.textContent=k.getHeaderText():(s&&k.tab===t.rows[t.basicTab].tab&&(u=!0),k.tab===t.active_tab?t.theme.markTabActive(k):t.theme.markTabInactive(k))))}))}},{key:"build",value:function(){var e=this,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((function(u){var k=jo(u,2),T=k[0],N=k[1],B=e.theme.getTableCell();e.editor_holder.appendChild(B),N.setContainer(B),N.build(),N.postBuild(),N.setOptInCheckbox(N.header),N.setValue(N.getDefault(),!0),e.editors[T].options.hidden&&(B.style.display="none"),e.editors[T].options.input_width&&(B.style.width=e.editors[T].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",(function(u){u.preventDefault(),u.stopPropagation(),e.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(),e.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(),e.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",(function(u){if(u.preventDefault(),u.stopPropagation(),e.addproperty_input.value){if(e.editors[e.addproperty_input.value])return void window.alert("there is already a property with that name");e.addObjectProperty(e.addproperty_input.value),e.editors[e.addproperty_input.value]&&e.editors[e.addproperty_input.value].disable();var k=e.editors[e.addproperty_input.value].key,T=e.editors[e.addproperty_input.value].type,N=e.editors[e.addproperty_input.value].path;e.onChange(!0,!1,{event:"add",data:{key:k,type:T,path:N}})}})),this.addproperty_input.addEventListener("input",(function(u){u.target.previousSibling.previousSibling.childNodes.forEach((function(k){var T=k.innerText,N=u.target.value;e.options.case_sensitive_property_search||e.jsoneditor.options.case_sensitive_property_search||(T=T.toLowerCase(),N=N.toLowerCase()),T.includes(N)?k.style.display="":k.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);var s=document.createElement("div");s.style.clear="both",this.addproperty_holder.appendChild(s),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((function(u){var k=e.theme.getTabContent(),T=e.theme.getGridColumn(),N=!(!u.schema||u.schema.type!=="object"&&u.schema.type!=="array");if(k.isObjOrArray=N,t){if(N){var B=e.theme.getGridContainer();B.appendChild(T),k.appendChild(B),e.tabPanesContainer.appendChild(k),e.row_container=B}else e.row_container_basic===void 0&&(e.row_container_basic=e.theme.getGridContainer(),k.appendChild(e.row_container_basic),e.tabPanesContainer.childElementCount===0?e.tabPanesContainer.appendChild(k):e.tabPanesContainer.insertBefore(k,e.tabPanesContainer.childNodes[1])),e.row_container_basic.appendChild(T);e.addRow(u,e.tabs_holder,k),k.id=e.getValidId(u.schema.title)}else e.row_container.appendChild(T);u.setContainer(T),u.build(),u.postBuild(),u.setOptInCheckbox(u.header)})),this.rows[0]&&w(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(),e.collapsed?(e.editor_holder.style.display="",e.collapsed=!1,e.setButtonText(e.collapse_control,"","collapse","button_collapse")):(e.editor_holder.style.display="none",e.collapsed=!0,e.setButtonText(e.collapse_control,"","expand","button_expand"))})),this.options.collapsed&&w(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(),e.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(),e.toggleAddProperty()})),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties(!1)}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach((function(u){e.editor_holder.appendChild(e.editors[u].container)}))):(this.layoutEditors(),this.layoutEditors()),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"deactivateNonRequiredProperties",value:function(e){var t=this,s=this.jsoneditor.options.show_opt_in,u=this.options.show_opt_in!==void 0,k=u&&this.options.show_opt_in===!0,T=u&&this.options.show_opt_in===!1;(k||!T&&s||!u&&s)&&Object.entries(this.editors).forEach((function(N){var B=jo(N,2),q=B[0],Q=B[1];t.isRequiredObject(Q)||t.editors[q].deactivate(),e&&typeof t.editors[q].deactivateNonRequiredProperties=="function"&&t.editors[q].deactivateNonRequiredProperties(e)}))}},{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(){this.editjson_holder&&navigator.clipboard.writeText(this.editjson_textarea.value).catch((function(e){return window.alert(e)}))}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var e=JSON.parse(this.editjson_textarea.value);this.setValue(e),this.hideEditJSON(),this.onChange(!0)}catch(t){throw window.alert("invalid JSON"),t}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(e,t,s){var u;this.schema.properties[e]&&(u=this.schema.properties[e].propertyOrder),typeof u!="number"&&(u=1e3),t.propertyOrder=u;for(var k=0;k<s.childNodes.length;k++){var T=s.childNodes[k];if(t.propertyOrder<T.propertyOrder){this.addproperty_list.insertBefore(t,T),t=null;break}}t&&this.addproperty_list.appendChild(t)}},{key:"addPropertyCheckbox",value:function(e){var t,s=this,u=this.theme.getCheckbox();t=this.schema.properties[e]&&this.schema.properties[e].title?this.schema.properties[e].title:e;var k=this.theme.getCheckboxLabel(t),T=this.theme.getFormControl(k,u,null,null,this.path+"-"+e);return T.style.paddingBottom=T.style.marginBottom=T.style.paddingTop=T.style.marginTop=0,T.style.height="auto",this.insertPropertyControlUsingPropertyOrder(e,T,this.addproperty_list),u.checked=e in this.editors,u.addEventListener("change",(function(){u.checked?s.addObjectProperty(e):s.removeObjectProperty(e),s.onChange(!0)})),this.addproperty_checkboxes[e]=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(e){if(this.editors[e]){var t;if((t=this.editors[e].schema)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies)return;this.editors[e].unregister(),delete this.editors[e],this.refreshValue(),this.layoutEditors()}}},{key:"getSchemaOnMaxDepth",value:function(e){return Object.keys(e).reduce((function(t,s){switch(s){case"$ref":return t;case"properties":case"items":return ko(ko({},t),{},tl({},s,{}));case"additionalProperties":case"propertyNames":return ko(ko({},t),{},tl({},s,!0));default:return ko(ko({},t),{},tl({},s,e[s]))}}),{})}},{key:"addObjectProperty",value:function(e,t){if(!this.editors[e]){if(this.cached_editors[e]){if(this.editors[e]=this.cached_editors[e],t)return;this.editors[e].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[e]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find((function(N){return new RegExp(N).test(e)}))))return;var s=this.getPropertySchema(e);typeof s.propertyOrder!="number"&&(s.propertyOrder=Object.keys(this.editors).length+1e3);var u=this.jsoneditor.getEditorClass(s),k=this.jsoneditor.options.max_depth;if(this.editors[e]=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:k&&this.currentDepth>=k?this.getSchemaOnMaxDepth(s):s,path:"".concat(this.path,".").concat(e),parent:this},this.currentDepth+1),this.editors[e].preBuild(),!t){var T=this.theme.getChildEditorHolder();this.editor_holder.appendChild(T),this.editors[e].setContainer(T),this.editors[e].build(),this.editors[e].postBuild(),this.editors[e].setOptInCheckbox(u.header),this.editors[e].activate()}this.cached_editors[e]=this.editors[e]}t||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(e){var t=e.path||e.composedPath&&e.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(t[0])&&this.adding_property&&(e.preventDefault(),e.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),Qr(br(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:jn(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(e){return e.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),Qr(br(r.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var e=Qr(br(r.prototype),"getValue",this).call(this);return e&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(e).forEach((function(t){var s;((s=e[t])===void 0||s===""||s===Object(s)&&Object.keys(s).length===0&&s.constructor===Object)&&delete e[t]})),e&&(this.jsoneditor.options.remove_false_properties||this.options.remove_false_properties)&&Object.keys(e).forEach((function(t){e[t]===!1&&delete e[t]})),e}}},{key:"refreshValue",value:function(){var e=this;this.value={},this.editors&&(Object.keys(this.editors).forEach((function(t){e.editors[t].isActive()&&(e.editors[t].refreshValue(),e.value[t]=e.editors[t].getValue())})),Object.keys(this.editors).forEach((function(t){e.editors[t].isActive()&&e.activateDependentRequired(e.editors[t].key)})),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(e){var t=this;this.getDependentRequired(e).forEach((function(s){var u;Object.entries(t.cached_editors).forEach((function(k){var T=jo(k,2),N=(T[0],T[1]);N.key===s&&(u=N)})),u&&!u.isActive()&&u.activate()}))}},{key:"getDependentRequired",value:function(e){return this.schema.dependentRequired&&O(this.schema.dependentRequired,e)?this.schema.dependentRequired[e]:[]}},{key:"refreshAddProperties",value:function(){var e=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var t,s=0,u=!1;Object.keys(this.editors).forEach((function(k){return s++})),t=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&s>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(k){e.addPropertyCheckbox(k),e.isRequiredObject(e.cached_editors[k])&&k in e.editors&&(e.addproperty_checkboxes[k].disabled=!0),e.schema.minProperties!==void 0&&s<=e.schema.minProperties?(e.addproperty_checkboxes[k].disabled=e.addproperty_checkboxes[k].checked,e.addproperty_checkboxes[k].checked||(u=!0)):k in e.editors?u=!0:t||O(e.schema.properties,k)?(e.addproperty_checkboxes[k].disabled=!1,u=!0):e.addproperty_checkboxes[k].disabled=!0})),this.canHaveAdditionalProperties()&&(u=!0),Object.keys(this.schema.properties).forEach((function(k){e.cached_editors[k]||(u=!0,e.addPropertyCheckbox(k))})),u?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!t:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(e){if(e)return typeof e.schema.required=="boolean"?e.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(e.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(e,t){var s=this;(jn(e=(e=this.applyConstFilter(e))||{})!=="object"||Array.isArray(e))&&(e={}),Object.entries(this.cached_editors).forEach((function(u){var k=jo(u,2),T=k[0],N=k[1];e[T]!==void 0?(s.addObjectProperty(T),N.setValue(e[T],t),N.activate(),s.disabled&&N.disable()):t||s.isRequiredObject(N)?N.setValue(N.getDefault(),t):s.jsoneditor.options.show_opt_in||s.options.show_opt_in?N.deactivate():s.removeObjectProperty(T)})),Object.entries(e).forEach((function(u){var k=jo(u,2),T=k[0],N=k[1];s.cached_editors[T]||(s.addObjectProperty(T),s.editors[T]&&s.editors[T].setValue(N,t,!!s.editors[T].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(e){var t=this,s=[],u=[];e.forEach((function(k){k.path===t.path?s.push(k):u.push(k)})),this.error_holder&&(s.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s.forEach((function(k){k.errorcount&&k.errorcount>1&&(k.message+=" (".concat(k.errorcount," errors)")),t.error_holder.appendChild(t.theme.getErrorMessage(k.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(s.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(k){k.showValidationErrors(u)}))}}])&&v0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Eo(l){return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Eo(l)}function g0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,_0(c.key),c)}}function _0(l){var r=(function(n,c){if(Eo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Eo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Eo(r)=="symbol"?r:r+""}function w0(l,r,n){return r=En(r),(function(c,e){if(e&&(Eo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,wp()?Reflect.construct(r,n||[],En(l).constructor):r.apply(l,n))}function wp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(wp=function(){return!!l})()}function Oo(){return Oo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=En(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Oo.apply(this,arguments)}function En(l){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},En(l)}function Bc(l,r){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Bc(l,r)}_p.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 k0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),w0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){Oo(En(r.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var e=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 t=function(q){e.setValue(q.currentTarget.value),e.onChange(!0),e.radioGroup.forEach((function(Q){Q.checked=Q.value===e.getValue()}))},s=0;s<this.enum_values.length;s++){var u={id:"".concat(this.formname,"[").concat(s,"]"),value:this.enum_values[s]};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",t,!1),this.radioGroup.push(this.input);var k=this.theme.getFormRadioLabel(this.enum_display[s]);k.htmlFor=this.input.id;var T=this.theme.getFormRadioControl(k,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(T)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var N=0;N<this.radioGroup.length;N++)this.radioGroup[N].disabled=!0;this.radioContainer.classList.add("readonly")}var B=this.theme.getContainer();B.appendChild(this.radioContainer),B.dataset.containerFor="radio",this.input=B,this.control=this.theme.getFormControl(this.label,B,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.input.parentNode&&e.afterInputReady()}))}},{key:"enable",value:function(){if(!this.always_disabled){for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!1;this.radioContainer.classList.remove("readonly"),Oo(En(r.prototype),"enable",this).call(this)}}},{key:"disable",value:function(e){e&&(this.always_disabled=!0);for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!0;this.radioContainer.classList.add("readonly"),Oo(En(r.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),Oo(En(r.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(e){typeof(e=this.applyConstFilter(e))!="string"&&(e=String(e));for(var t=0;t<this.radioGroup.length;t++){if(this.radioGroup[t].value===e){this.radioGroup[t].checked=!0;break}this.radioGroup[t].checked=!1}this.value=e,this.onChange()}}])&&g0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ka);function xo(l){return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xo(l)}function j0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,E0(c.key),c)}}function E0(l){var r=(function(n,c){if(xo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(xo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return xo(r)=="symbol"?r:r+""}function O0(l,r,n){return r=Vr(r),(function(c,e){if(e&&(xo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,kp()?Reflect.construct(r,n||[],Vr(l).constructor):r.apply(l,n))}function kp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(kp=function(){return!!l})()}function Yn(){return Yn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Vr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Yn.apply(this,arguments)}function Vr(l){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vr(l)}function Fc(l,r){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Fc(l,r)}var x0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),O0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Yn(Vr(r.prototype),"setValue",this).call(this,e,t,s);u!==void 0&&u.changed&&this.sceditor_instance&&this.sceditor_instance.val(u.value)}},{key:"build",value:function(){this.options.format="textarea",Yn(Vr(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e=this;if(window.sceditor){var t=this.expandCallbacks("sceditor",b({},{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})),s=window.sceditor.instance(this.input);s===void 0&&window.sceditor.create(this.input,t),this.sceditor_instance=s||window.sceditor.instance(this.input),this.sceditor_instance.blur((function(){e.value=e.sceditor_instance.val(),e.sceditor_instance.updateOriginal(),e.is_dirty=!0,e.onChange(!0)})),this.theme.afterInputReady(this.input)}else Yn(Vr(r.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),Yn(Vr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Yn(Vr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Yn(Vr(r.prototype),"destroy",this).call(this)}}])&&j0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function So(l){return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},So(l)}function S0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,C0(c.key),c)}}function C0(l){var r=(function(n,c){if(So(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(So(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return So(r)=="symbol"?r:r+""}function P0(l,r,n){return r=Xr(r),(function(c,e){if(e&&(So(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,jp()?Reflect.construct(r,n||[],Xr(l).constructor):r.apply(l,n))}function jp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jp=function(){return!!l})()}function Ti(){return Ti=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Xr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ti.apply(this,arguments)}function Xr(l){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xr(l)}function Mc(l,r){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Mc(l,r)}var T0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),P0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.select2_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var s=this.updateValue(e);this.input.value=s,this.select2v4?this.select2_instance.val(s).trigger("change"):this.select2_instance.select2("val",s),this.onChange(!0)}else Ti(Xr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var t=this.expandCallbacks("select2",b({},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=O(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var s=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(s),e.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}Ti(Xr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){var t=this.enum_values[0];return e=this.typecast(e||""),this.enum_values.includes(e)?t=e:this.newEnumAllowed&&(t=this.addNewOption(e)?e:t),this.value=t,t}},{key:"addNewOption",value:function(e){var t,s=this.typecast(e),u=!1;return this.enum_values.includes(s)||s===""||(this.enum_options.push("".concat(s)),this.enum_display.push("".concat(s)),this.enum_values.push(s),this.schema.enum.push(s),(t=this.input.querySelector('option[value="'.concat(s,'"]')))?t.removeAttribute("data-select2-tag"):this.select2_instance.append(new Option(s,s,!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)),Ti(Xr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Ti(Xr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ti(Xr(r.prototype),"destroy",this).call(this)}}])&&S0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ka);function Co(l){return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Co(l)}function R0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,L0(c.key),c)}}function L0(l){var r=(function(n,c){if(Co(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Co(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Co(r)=="symbol"?r:r+""}function A0(l,r,n){return r=zr(r),(function(c,e){if(e&&(Co(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ep()?Reflect.construct(r,n||[],zr(l).constructor):r.apply(l,n))}function Ep(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ep=function(){return!!l})()}function Qn(){return Qn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=zr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Qn.apply(this,arguments)}function zr(l){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zr(l)}function Vc(l,r){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Vc(l,r)}var $0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),A0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.selectize_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var s=this.updateValue(e);this.input.value=s,this.selectize_instance.clear(!0),this.selectize_instance.setValue(s),this.onChange(!0)}else Qn(zr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var t=this.expandCallbacks("selectize",b({},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=function(s){e.updateValue(s),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Qn(zr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){var t=this.enum_values[0];return e=this.typecast(e||""),this.enum_values.includes(e)?t=e:this.newEnumAllowed&&(t=this.addNewOption(e)?e:t),this.value=t,t}},{key:"addNewOption",value:function(e){var t=this.typecast(e),s=!1;return this.enum_values.includes(t)||t===""||(this.enum_options.push("".concat(t)),this.enum_display.push("".concat(t)),this.enum_values.push(t),this.schema.enum.push(t),this.selectize_instance.addItem(t),this.selectize_instance.refreshOptions(!1),s=!0),s}},{key:"onWatchedFieldChange",value:function(){var e=this;Qn(zr(r.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((function(t,s){e.selectize_instance.addOption({value:t,text:e.enum_display[s]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Qn(zr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),Qn(zr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Qn(zr(r.prototype),"destroy",this).call(this)}}])&&R0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ka);function Po(l){return Po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Po(l)}function N0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,I0(c.key),c)}}function I0(l){var r=(function(n,c){if(Po(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Po(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Po(r)=="symbol"?r:r+""}function D0(l,r,n){return r=rl(r),(function(c,e){if(e&&(Po(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Op()?Reflect.construct(r,n||[],rl(l).constructor):r.apply(l,n))}function Op(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Op=function(){return!!l})()}function rl(l){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rl(l)}function zc(l,r){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},zc(l,r)}var B0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),D0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){var e=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 t=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var s=document.createElement("div");s.classList.add("signature-container");var u=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&u.setAttribute("name",t),u.classList.add("signature"),s.appendChild(u),this.signaturePad=new window.SignaturePad(u),this.signaturePad.onEnd=function(){e.signaturePad.isEmpty()?e.input.value="":e.input.value=e.signaturePad.toDataURL(),e.is_dirty=!0,e.refreshValue(),e.watch_listener(),e.jsoneditor.notifyWatchers(e.path),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange()};var k=document.createElement("div"),T=document.createElement("button");T.classList.add("tiny","button"),T.innerHTML="Clear signature",k.appendChild(T),s.appendChild(k),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(B){u.setAttribute("readOnly","readOnly"),B.disabled=!0}))),T.addEventListener("click",(function(B){B.preventDefault(),B.stopPropagation(),e.signaturePad.clear(),e.signaturePad.strokeEnd()})),this.control=this.theme.getFormControl(this.label,s,this.description),this.container.appendChild(this.control),this.refreshValue(),u.width=s.offsetWidth,this.options&&this.options.canvas_height?u.height=this.options.canvas_height:u.height="300"}else{var N=document.createElement("p");N.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(N)}}},{key:"setValue",value:function(e){if(e=this.applyConstFilter(e),typeof SignaturePad=="function"){var t=this.sanitize(e);return this.value===t?void 0:(this.value=t,this.input.value=this.value,this.signaturePad.clear(),e&&e!==""&&this.signaturePad.fromDataURL(e),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&N0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function To(l){return To=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},To(l)}function F0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,M0(c.key),c)}}function M0(l){var r=(function(n,c){if(To(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(To(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return To(r)=="symbol"?r:r+""}function V0(l,r,n){return r=qr(r),(function(c,e){if(e&&(To(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,xp()?Reflect.construct(r,n||[],qr(l).constructor):r.apply(l,n))}function xp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xp=function(){return!!l})()}function Xn(){return Xn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=qr(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Xn.apply(this,arguments)}function qr(l){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qr(l)}function qc(l,r){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},qc(l,r)}y(6031);var z0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),V0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Xn(qr(r.prototype),"setValue",this).call(this,e,t,s);u!==void 0&&u.changed&&this.simplemde_instance&&this.simplemde_instance.value(u.value)}},{key:"build",value:function(){this.options.format="textarea",Xn(qr(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;window.SimpleMDE?(e=this.expandCallbacks("simplemde",b({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",(function(){t.value=t.simplemde_instance.value(),t.is_dirty=!0,t.onChange(!0)})),e.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Xn(qr(r.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),Xn(qr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Xn(qr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Xn(qr(r.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(e,t){var s=this,u=function k(){e.display.wrapper.offsetHeight?(s.stopListening(e,t),e.display.lastWrapHeight!==e.display.wrapper.clientHeight&&e.refresh()):t.timeout=window.setTimeout(k,t.delay)};t.timeout=window.setTimeout(u,t.delay),t.hurry=function(){window.clearTimeout(t.timeout),t.timeout=window.setTimeout(u,50)},e.on(window,"mouseup",t.hurry),e.on(window,"keyup",t.hurry)}},{key:"stopListening",value:function(e,t){window.clearTimeout(t.timeout),e.off(window,"mouseup",t.hurry),e.off(window,"keyup",t.hurry)}}])&&F0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function Ro(l){return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ro(l)}function q0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,H0(c.key),c)}}function H0(l){var r=(function(n,c){if(Ro(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ro(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ro(r)=="symbol"?r:r+""}function U0(l,r,n){return r=Ri(r),(function(c,e){if(e&&(Ro(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Sp()?Reflect.construct(r,n||[],Ri(l).constructor):r.apply(l,n))}function Sp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Sp=function(){return!!l})()}function nl(){return nl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Ri(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},nl.apply(this,arguments)}function Ri(l){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ri(l)}function Hc(l,r){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Hc(l,r)}var Cp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),U0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){var e=this;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){var t=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&t--,this.enum_values=[];for(var s=0;s<t;s++)this.enum_values.push(s+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var u=function(le){le.preventDefault(),le.stopPropagation(),e.setValue(le.currentTarget.value),e.onChange(!0)},k=this.enum_values.length-1;k>-1;k--){var T=this.formname+(k+1),N=this.theme.getFormInputField("radio");N.name="".concat(this.formname,"[starrating]"),N.value=this.enum_values[k],N.id=T,N.addEventListener("change",u,!1),this.radioGroup.push(N);var B=document.createElement("label");B.htmlFor=T,B.title=this.enum_values[k],this.options.displayValue&&B.classList.add("starrating-display-enabled");var q=this.theme.getHiddenText("label");q.textContent=k,B.appendChild(q),this.ratingContainer.appendChild(N),this.ratingContainer.appendChild(B)}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 Q=0;Q<this.radioGroup.length;Q++)this.radioGroup[Q].disabled=!0;this.ratingContainer.classList.add("readonly")}var X=this.theme.getContainer();X.appendChild(this.ratingContainer),this.input=X,this.control=this.theme.getFormControl(this.label,X,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(e){e&&(this.always_disabled=!0);for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].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),nl(Ri(r.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===""?0:parseInt(this.value):this.value}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value=e;for(var t=0;t<this.radioGroup.length;t++)if(this.radioGroup[t].value==="".concat(e)){this.radioGroup[t].checked=!0,this.value=e,this.options.displayValue&&(this.displayRating.innerHTML=this.value);break}nl(Ri(r.prototype),"setValue",this).call(this,this.value)}}])&&q0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de);function Lo(l){return Lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Lo(l)}function G0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,J0(c.key),c)}}function J0(l){var r=(function(n,c){if(Lo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Lo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Lo(r)=="symbol"?r:r+""}function K0(l,r,n){return r=ei(r),(function(c,e){if(e&&(Lo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Pp()?Reflect.construct(r,n||[],ei(l).constructor):r.apply(l,n))}function Pp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Pp=function(){return!!l})()}function xa(){return xa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ei(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},xa.apply(this,arguments)}function ei(l){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ei(l)}function Uc(l,r){return Uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Uc(l,r)}Cp.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 W0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),K0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){xa(ei(r.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var e=this.theme.getStepperButtons(this.input);this.control.appendChild(e),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){xa(ei(r.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){xa(ei(r.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&G0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(lp);function Ao(l){return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ao(l)}function Z0(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Y0(c.key),c)}}function Y0(l){var r=(function(n,c){if(Ao(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ao(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ao(r)=="symbol"?r:r+""}function Q0(l,r,n){return r=en(r),(function(c,e){if(e&&(Ao(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Tp()?Reflect.construct(r,n||[],en(l).constructor):r.apply(l,n))}function Tp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Tp=function(){return!!l})()}function Li(){return Li=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=en(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Li.apply(this,arguments)}function en(l){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},en(l)}function Gc(l,r){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Gc(l,r)}var X0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Q0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)})(r,l),n=r,c=[{key:"register",value:function(){if(Li(en(r.prototype),"register",this).call(this),this.rows)for(var e=0;e<this.rows.length;e++)this.rows[e].register()}},{key:"unregister",value:function(){if(Li(en(r.prototype),"unregister",this).call(this),this.rows)for(var e=0;e<this.rows.length;e++)this.rows[e].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var e=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=e.title||"row",this.item_default=e.default||null,this.item_has_child_editors=e.properties||e.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,Li(en(r.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 e=this.getElementEditor(0,!0);if(this.item_default=e.getDefault(),this.width=e.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)for(var t=e.getChildEditors(),s=e.property_order||Object.keys(t),u=0;u<s.length;u++){var k=this.theme.getTableHeaderCell(t[s[u]].getTitle());t[s[u]].options.hidden&&(k.style.display="none"),this.header_row.appendChild(k)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));e.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()}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),Li(en(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"getItemDefault",value:function(){return b({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(e,t){var s=b({},this.schema.items),u=this.jsoneditor.getEditorClass(s,this.jsoneditor),k=this.row_holder.appendChild(this.theme.getTableRow()),T=k;this.item_has_child_editors||(T=this.theme.getTableCell(),k.appendChild(T));var N=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:s,container:T,path:"".concat(this.path,".").concat(e),parent:this,compact:!0,table_row:!0});return N.preBuild(),t||(N.build(),N.postBuild(),N.controls_cell=k.appendChild(this.theme.getTableCell()),N.row=k,N.table_controls=this.theme.getButtonHolder(),N.controls_cell.appendChild(N.table_controls),N.table_controls.style.margin=0,N.table_controls.style.padding=0),N}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,Li(en(r.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(e){if(Array.isArray(e)||(e=[e]),this.schema.minItems)for(;e.length<this.schema.minItems;)e.push(this.getItemDefault());return this.schema.maxItems&&e.length>this.schema.maxItems&&(e=e.slice(0,this.schema.maxItems)),e}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){var u=!1;t.forEach((function(N,B){e.rows[B]?e.rows[B].setValue(N):(e.addRow(N),u=!0)}));for(var k=t.length;k<this.rows.length;k++){var T=this.rows[k].container;this.item_has_child_editors||this.rows[k].row.parentNode.removeChild(this.rows[k].row),this.rows[k].destroy(),T.parentNode&&T.parentNode.removeChild(T),this.rows[k]=null,u=!0}this.rows=this.rows.slice(0,t.length),this.refreshValue(),(u||s)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var e=this,t=this.schema.minItems&&this.schema.minItems>=this.rows.length,s=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,u=[];this.rows.forEach((function(Q,X){if(Q.delete_button){var le=!t;e.setButtonState(Q.delete_button,le),u.push(le)}if(Q.copy_button){var ye=!s;e.setButtonState(Q.copy_button,ye),u.push(ye)}if(Q.moveup_button){var xe=X!==0;e.setButtonState(Q.moveup_button,xe),u.push(xe)}if(Q.movedown_button){var Pe=X!==e.rows.length-1;e.setButtonState(Q.movedown_button,Pe),u.push(Pe)}}));var k=u.some((function(Q){return Q}));this.rows.forEach((function(Q){return e.setButtonState(Q.controls_cell,k)})),this.setButtonState(this.controls_header_cell,k),this.setButtonState(this.table,this.value.length);var T=!(s||this.hide_add_button);this.setButtonState(this.add_row_button,T);var N=!(!this.value.length||t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,N);var B=!(this.value.length<=1||t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,B);var q=T||N||B;this.setButtonState(this.controls,q)}},{key:"refreshValue",value:function(){var e=this;this.value=[],this.rows.forEach((function(t,s){e.value[s]=t.getValue()})),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(e){var t=this.rows.length;this.rows[t]=this.getElementEditor(t);var s=this.rows[t].table_controls;return this.hide_delete_buttons||(this.rows[t].delete_button=this._createDeleteButton(t,s)),this.show_copy_button&&(this.rows[t].copy_button=this._createCopyButton(t,s)),this.hide_move_buttons||(this.rows[t].moveup_button=this._createMoveUpButton(t,s)),this.hide_move_buttons||(this.rows[t].movedown_button=this._createMoveDownButton(t,s)),this._supportDragDrop(this.rows[t].row),e!==void 0&&this.rows[t].setValue(e),this.rows[t]}},{key:"_createDeleteButton",value:function(e,t){var s=this,u=this.getButton("","delete","button_delete_row_title_short");return u.classList.add("delete","json-editor-btntype-delete"),u.setAttribute("data-i",e),u.addEventListener("click",(function(k){if(k.preventDefault(),k.stopPropagation(),!s.askConfirmation())return!1;var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue(),B=s.getValue()[T];N.splice(T,1),s.setValue(N),s.onChange(!0),s.jsoneditor.trigger("deleteRow",B)})),t.appendChild(u),u}},{key:"_createCopyButton",value:function(e,t){var s=this,u=this.getButton("","copy","button_copy_row_title_short"),k=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(T){T.preventDefault(),T.stopPropagation();var N=1*T.currentTarget.getAttribute("data-i"),B=s.getValue(),q=B[N];k.items.type==="string"&&k.items.format==="uuid"?q=S():k.items.type==="object"&&k.items.properties&&B.forEach((function(Q,X){if(N===X)for(var le=0,ye=Object.keys(Q);le<ye.length;le++){var xe=ye[le];k.items.properties&&k.items.properties[xe]&&k.items.properties[xe].format==="uuid"&&((q=Object.assign({},B[N]))[xe]=S())}})),B.splice(N+1,0,q),s.setValue(B),s.onChange(!0),s.jsoneditor.trigger("copyRow",s.rows[N+1])})),t.appendChild(u),u}},{key:"_createMoveUpButton",value:function(e,t){var s=this,u=this.getButton("","moveup","button_move_up_title");return u.classList.add("moveup","json-editor-btntype-move"),u.setAttribute("data-i",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue();N.splice(T-1,0,N.splice(T,1)[0]),s.setValue(N),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T-1])})),t.appendChild(u),u}},{key:"_createMoveDownButton",value:function(e,t){var s=this,u=this.getButton("","movedown","button_move_down_title");return u.classList.add("movedown","json-editor-btntype-move"),u.setAttribute("data-i",e),u.addEventListener("click",(function(k){k.preventDefault(),k.stopPropagation();var T=1*k.currentTarget.getAttribute("data-i"),N=s.getValue();N.splice(T+1,0,N.splice(T,1)[0]),s.setValue(N),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[T+1])})),t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e){var t=this;$e(e,(function(s,u){var k=t.getValue(),T=k[s];k.splice(s,1),k.splice(u,0,T),t.setValue(k),t.onChange(!0),t.jsoneditor.trigger("moveRow",t.rows[u])}),{useTrigger:!0})}},{key:"addControls",value:function(){var e=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(t){t.preventDefault(),t.stopPropagation(),e.setButtonState(e.panel,e.collapsed),e.collapsed?(e.collapsed=!1,e.setButtonText(t.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.setButtonText(t.currentTarget,"","expand","button_expand"))})),this.options.collapsed&&w(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 e=this.getButton("","collapse","button_collapse");return e.classList.add("json-editor-btntype-toggle"),e}},{key:"_createAddRowButton",value:function(){var e=this,t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",(function(s){s.preventDefault(),s.stopPropagation();var u=e.addRow();e.refreshValue(),e.refreshRowButtons(),e.onChange(!0),e.jsoneditor.trigger("addRow",u)})),this.controls.appendChild(t),t}},{key:"_createDeleteLastRowButton",value:function(){var e=this,t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue(),k=u.pop();e.setValue(u),e.onChange(!0),e.jsoneditor.trigger("deleteRow",k)})),this.controls.appendChild(t),t}},{key:"_createRemoveAllRowsButton",value:function(){var e=this,t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",(function(s){if(s.preventDefault(),s.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue();e.setValue([]),e.onChange(!0),e.jsoneditor.trigger("deleteAllRows",u)})),this.controls.appendChild(t),t}}],c&&Z0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Oe);function $o(l){return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$o(l)}function ew(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,tw(c.key),c)}}function tw(l){var r=(function(n,c){if($o(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if($o(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return $o(r)=="symbol"?r:r+""}function rw(l,r,n){return r=ti(r),(function(c,e){if(e&&($o(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Rp()?Reflect.construct(r,n||[],ti(l).constructor):r.apply(l,n))}function Rp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Rp=function(){return!!l})()}function Sa(){return Sa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ti(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Sa.apply(this,arguments)}function ti(l){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ti(l)}function Jc(l,r){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Jc(l,r)}function No(l){return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},No(l)}function nw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,iw(c.key),c)}}function iw(l){var r=(function(n,c){if(No(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(No(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return No(r)=="symbol"?r:r+""}function ow(l,r,n){return r=ri(r),(function(c,e){if(e&&(No(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Lp()?Reflect.construct(r,n||[],ri(l).constructor):r.apply(l,n))}function Lp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Lp=function(){return!!l})()}function Ca(){return Ca=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=ri(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ca.apply(this,arguments)}function ri(l){return ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ri(l)}function Kc(l,r){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Kc(l,r)}function Io(l){return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Io(l)}function aw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,sw(c.key),c)}}function sw(l){var r=(function(n,c){if(Io(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Io(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Io(r)=="symbol"?r:r+""}function lw(l,r,n){return r=tn(r),(function(c,e){if(e&&(Io(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Ap()?Reflect.construct(r,n||[],tn(l).constructor):r.apply(l,n))}function Ap(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ap=function(){return!!l})()}function Ai(){return Ai=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=tn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Ai.apply(this,arguments)}function tn(l){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tn(l)}function Wc(l,r){return Wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Wc(l,r)}y(9868);var il={ace:ge,array:Oe,arrayChoices:zt,arraySelect2:oo,arraySelectize:fc,autocomplete:mc,base64:h_,button:Kf,checkbox:g_,choices:Qf,datetime:P_,describedBy:A_,enum:D_,hidden:V_,info:U_,integer:lp,ip:t0,jodit:o0,multiple:h0,multiselect:Ee,null:y0,number:ap,object:_p,radio:k0,sceditor:x0,select:ka,select2:T0,selectize:$0,signature:B0,simplemde:z0,starrating:Cp,stepper:W0,string:de,table:X0,upload:(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),rw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)})(r,l),n=r,(c=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var 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.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",b({},{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,k,T,N){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){e.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 k=u.target.files||u.dataTransfer.files;if(k&&k.length)if(e.options.max_upload_size!==0&&k[0].size>e.options.max_upload_size)e.theme.addInputError(e.uploader,"".concat(e.translate("upload_max_size")," ").concat(e.options.max_upload_size));else if(e.options.mime_type.length===0||e.isValidMimeType(k[0].type,e.options.mime_type)){e.fileDisplay&&(e.fileDisplay.value=k[0].name);var T=new window.FileReader;T.onload=function(N){e.preview_value=N.target.result,e.refreshPreview(k),e.onChange(!0),T=null},T.readAsDataURL(k[0])}else e.theme.addInputError(e.uploader,"".concat(e.translate("upload_wrong_file_format")," ").concat(e.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(u){var k=u.dataTransfer.items||u.dataTransfer.files,T=k&&k.length&&(e.options.mime_type.length===0||e.isValidMimeType(k[0].type,e.options.mime_type)),N=u.currentTarget.classList&&u.currentTarget.classList.contains("upload-dropzone")&&T;switch((u.currentTarget===window?"w_":"e_")+u.type){case"w_drop":case"w_dragover":N||(u.dataTransfer.dropEffect="none");break;case"e_dragenter":N?(e.dropZone.classList.add("valid-dropzone"),u.dataTransfer.dropEffect="copy"):e.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":N&&(u.dataTransfer.dropEffect="copy");break;case"e_dragleave":e.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":e.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),N&&e.uploadHandler(u)}N||u.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach((function(u){window.addEventListener(u,e.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(u){e.dropZone.addEventListener(u,e.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 t=this.uploader||this.input,s=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&s.appendChild(this.dropZone),this.fileUploadGroup&&s.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&s.appendChild(this.dropZone),s.appendChild(this.preview),t.parentNode.insertBefore(s,t.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.afterInputReady()}))}},{key:"afterInputReady",value:function(){var e=this;if(this.value){var t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.onload=function(s){e.preview.appendChild(t)},t.onerror=function(s){console.error("upload error",s,s.currentTarget)},t.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(e){var t=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var s=e[0],u=this.preview_value.match(/^data:([^;,]+)[;,]/);if(s.mimeType=u?u[1]:"unknown",s.size>0){var k=Math.floor(Math.log(s.size)/Math.log(1024));s.formattedSize="".concat(parseFloat((s.size/Math.pow(1024,k)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][k])}else s.formattedSize="0 Bytes";var T=this.getButton("button_upload","upload","button_upload");T.addEventListener("click",(function(N){N.preventDefault(),T.setAttribute("disabled","disabled"),t.theme.removeInputError(t.uploader),t.theme.getProgressBar&&(t.progressBar=t.theme.getProgressBar(),t.preview.appendChild(t.progressBar)),t.options.upload_handler(t.path,s,{success:function(B){t.setValue(B),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange(),t.progressBar&&t.preview.removeChild(t.progressBar),T.removeAttribute("disabled")},failure:function(B){t.theme.addInputError(t.uploader,B),t.progressBar&&t.preview.removeChild(t.progressBar),T.removeAttribute("disabled")},updateProgress:function(B){t.progressBar&&(B?t.theme.updateProgressBar(t.progressBar,B):t.theme.updateProgressBarUnknown(t.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(s,T,this.preview_value)),this.options.auto_upload&&(T.dispatchEvent(new window.MouseEvent("click")),T.parentNode.removeChild(T))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Sa(ti(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Sa(ti(r.prototype),"disable",this).call(this)}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.value=e,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var e=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach((function(t){window.removeEventListener(t,e.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(t){e.dropZone.removeEventListener(t,e.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),Sa(ti(r.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(e,t){return t.reduce((function(s,u){return s||new RegExp(u.replace(/\*/g,".*"),"gi").test(e)}),!1)}}])&&ew(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D),uuid:(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ow(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){Ca(ri(r.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(){Ca(ri(r.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(e){return this.testUuid(e)||(e=this.uuid),e}},{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e),this.testUuid(e)||(e=this.uuid),this.uuid=e,Ca(ri(r.prototype),"setValue",this).call(this,e,t,s)}},{key:"getUuid",value:function(){return S()}},{key:"testUuid",value:function(e){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)}}])&&nw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de),colorpicker:(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),lw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wc(e,t)})(r,l),n=r,(c=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Ai(tn(r.prototype),"setValue",this).call(this,e,t,s);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(){Ai(tn(r.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(Ai(tn(r.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var e=this.picker_instance.domElement.querySelectorAll("button"),t=0;t<e.length;t++)e[t].disabled=!0}}},{key:"enable",value:function(){if(Ai(tn(r.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var e=this.picker_instance.domElement.querySelectorAll("button"),t=0;t<e.length;t++)e[t].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),Ai(tn(r.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(e){var t=this;if(e){if(window.Picker&&!this.picker_instance){var s=this.expandCallbacks("colorpicker",b({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),u=function(k){var T=t.picker_instance.settings.editorFormat,N=t.picker_instance.settings.alpha;t.setValue(T==="hex"?N?k.hex:k.hex.slice(0,7):k["".concat(T+(N?"a":""),"String")])};s.popup||typeof s.onChange=="function"?s.popup&&typeof s.onDone!="function"&&(s.onDone=u):s.onChange=u,this.picker_instance=new window.Picker(s),s.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="")}}])&&aw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(de)};function $p(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}var Np={},Zc="en",cw=Zc;Np.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",paste_max_length_reached:"Pasted text exceeded maximum length of {{0}} and will be clipped."},Object.entries(il).forEach((function(l){var r=(function(e,t){return(function(s){if(Array.isArray(s))return s})(e)||(function(s,u){var k=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(k!=null){var T,N,B,q,Q=[],X=!0,le=!1;try{if(B=(k=k.call(s)).next,u!==0)for(;!(X=(T=B.call(k)).done)&&(Q.push(T.value),Q.length!==u);X=!0);}catch(ye){le=!0,N=ye}finally{try{if(!X&&k.return!=null&&(q=k.return(),Object(q)!==q))return}finally{if(le)throw N}}return Q}})(e,t)||(function(s,u){if(s){if(typeof s=="string")return $p(s,u);var k=Object.prototype.toString.call(s).slice(8,-1);return k==="Object"&&s.constructor&&(k=s.constructor.name),k==="Map"||k==="Set"?Array.from(s):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?$p(s,u):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
36
36
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(l,2),n=r[0],c=r[1];il[n].options=c.options||{}}));var $i={options:{upload:function(l,r,n){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,show_errors:"interaction",prompt_paste_max_length_reached:!1,remove_false_properties:!1,enforce_const:!1,opt_in_widget:"checkbox"},theme:"html",template:"default",themes:{},callbacks:{},templates:{},iconlibs:{},editors:il,languages:Np,resolvers:v,custom_validators:[],default_language:Zc,language:cw,translate:function(l,r,n){var c={};n&&n.options&&n.options.error_messages&&n.options.error_messages[$i.language]&&(c=n.options.error_messages[$i.language]);var e=$i.languages[$i.language];if(!e)throw new Error("Unknown language ".concat($i.language));var t=c[l]||e[l]||$i.languages[Zc][l]||l;if(r)for(var s=0;s<r.length;s++)t=t.replace(new RegExp("\\{\\{".concat(s,"}}"),"g"),r[s]);return t},translateProperty:function(l,r){return l}};function Ni(){Ni=function(){return r};var l,r={},n=Object.prototype,c=n.hasOwnProperty,e=Object.defineProperty||function(Z,K,oe){Z[K]=oe.value},t=typeof Symbol=="function"?Symbol:{},s=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",k=t.toStringTag||"@@toStringTag";function T(Z,K,oe){return Object.defineProperty(Z,K,{value:oe,enumerable:!0,configurable:!0,writable:!0}),Z[K]}try{T({},"")}catch{T=function(K,oe,ke){return K[oe]=ke}}function N(Z,K,oe,ke){var fe=K&&K.prototype instanceof xe?K:xe,Te=Object.create(fe.prototype),Xe=new sn(ke||[]);return e(Te,"_invoke",{value:ar(Z,oe,Xe)}),Te}function B(Z,K,oe){try{return{type:"normal",arg:Z.call(K,oe)}}catch(ke){return{type:"throw",arg:ke}}}r.wrap=N;var q="suspendedStart",Q="suspendedYield",X="executing",le="completed",ye={};function xe(){}function Pe(){}function Be(){}var Ke={};T(Ke,s,(function(){return this}));var tt=Object.getPrototypeOf,we=tt&&tt(tt(sr([])));we&&we!==n&&c.call(we,s)&&(Ke=we);var Ce=Be.prototype=xe.prototype=Object.create(Ke);function at(Z){["next","throw","return"].forEach((function(K){T(Z,K,(function(oe){return this._invoke(K,oe)}))}))}function vt(Z,K){function oe(fe,Te,Xe,bt){var gt=B(Z[fe],Z,Te);if(gt.type!=="throw"){var gr=gt.arg,Hr=gr.value;return Hr&&Ht(Hr)=="object"&&c.call(Hr,"__await")?K.resolve(Hr.__await).then((function(lr){oe("next",lr,Xe,bt)}),(function(lr){oe("throw",lr,Xe,bt)})):K.resolve(Hr).then((function(lr){gr.value=lr,Xe(gr)}),(function(lr){return oe("throw",lr,Xe,bt)}))}bt(gt.arg)}var ke;e(this,"_invoke",{value:function(fe,Te){function Xe(){return new K((function(bt,gt){oe(fe,Te,bt,gt)}))}return ke=ke?ke.then(Xe,Xe):Xe()}})}function ar(Z,K,oe){var ke=q;return function(fe,Te){if(ke===X)throw Error("Generator is already running");if(ke===le){if(fe==="throw")throw Te;return{value:l,done:!0}}for(oe.method=fe,oe.arg=Te;;){var Xe=oe.delegate;if(Xe){var bt=ni(Xe,oe);if(bt){if(bt===ye)continue;return bt}}if(oe.method==="next")oe.sent=oe._sent=oe.arg;else if(oe.method==="throw"){if(ke===q)throw ke=le,oe.arg;oe.dispatchException(oe.arg)}else oe.method==="return"&&oe.abrupt("return",oe.arg);ke=X;var gt=B(Z,K,oe);if(gt.type==="normal"){if(ke=oe.done?le:Q,gt.arg===ye)continue;return{value:gt.arg,done:oe.done}}gt.type==="throw"&&(ke=le,oe.method="throw",oe.arg=gt.arg)}}}function ni(Z,K){var oe=K.method,ke=Z.iterator[oe];if(ke===l)return K.delegate=null,oe==="throw"&&Z.iterator.return&&(K.method="return",K.arg=l,ni(Z,K),K.method==="throw")||oe!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+oe+"' method")),ye;var fe=B(ke,Z.iterator,K.arg);if(fe.type==="throw")return K.method="throw",K.arg=fe.arg,K.delegate=null,ye;var Te=fe.arg;return Te?Te.done?(K[Z.resultName]=Te.value,K.next=Z.nextLoc,K.method!=="return"&&(K.method="next",K.arg=l),K.delegate=null,ye):Te:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,ye)}function Go(Z){var K={tryLoc:Z[0]};1 in Z&&(K.catchLoc=Z[1]),2 in Z&&(K.finallyLoc=Z[2],K.afterLoc=Z[3]),this.tryEntries.push(K)}function Ne(Z){var K=Z.completion||{};K.type="normal",delete K.arg,Z.completion=K}function sn(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(Go,this),this.reset(!0)}function sr(Z){if(Z||Z===""){var K=Z[s];if(K)return K.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var oe=-1,ke=function fe(){for(;++oe<Z.length;)if(c.call(Z,oe))return fe.value=Z[oe],fe.done=!1,fe;return fe.value=l,fe.done=!0,fe};return ke.next=ke}}throw new TypeError(Ht(Z)+" is not iterable")}return Pe.prototype=Be,e(Ce,"constructor",{value:Be,configurable:!0}),e(Be,"constructor",{value:Pe,configurable:!0}),Pe.displayName=T(Be,k,"GeneratorFunction"),r.isGeneratorFunction=function(Z){var K=typeof Z=="function"&&Z.constructor;return!!K&&(K===Pe||(K.displayName||K.name)==="GeneratorFunction")},r.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,Be):(Z.__proto__=Be,T(Z,k,"GeneratorFunction")),Z.prototype=Object.create(Ce),Z},r.awrap=function(Z){return{__await:Z}},at(vt.prototype),T(vt.prototype,u,(function(){return this})),r.AsyncIterator=vt,r.async=function(Z,K,oe,ke,fe){fe===void 0&&(fe=Promise);var Te=new vt(N(Z,K,oe,ke),fe);return r.isGeneratorFunction(K)?Te:Te.next().then((function(Xe){return Xe.done?Xe.value:Te.next()}))},at(Ce),T(Ce,k,"Generator"),T(Ce,s,(function(){return this})),T(Ce,"toString",(function(){return"[object Generator]"})),r.keys=function(Z){var K=Object(Z),oe=[];for(var ke in K)oe.push(ke);return oe.reverse(),function fe(){for(;oe.length;){var Te=oe.pop();if(Te in K)return fe.value=Te,fe.done=!1,fe}return fe.done=!0,fe}},r.values=sr,sn.prototype={constructor:sn,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(Ne),!Z)for(var K in this)K.charAt(0)==="t"&&c.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=l)},stop:function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval},dispatchException:function(Z){if(this.done)throw Z;var K=this;function oe(gt,gr){return Te.type="throw",Te.arg=Z,K.next=gt,gr&&(K.method="next",K.arg=l),!!gr}for(var ke=this.tryEntries.length-1;ke>=0;--ke){var fe=this.tryEntries[ke],Te=fe.completion;if(fe.tryLoc==="root")return oe("end");if(fe.tryLoc<=this.prev){var Xe=c.call(fe,"catchLoc"),bt=c.call(fe,"finallyLoc");if(Xe&&bt){if(this.prev<fe.catchLoc)return oe(fe.catchLoc,!0);if(this.prev<fe.finallyLoc)return oe(fe.finallyLoc)}else if(Xe){if(this.prev<fe.catchLoc)return oe(fe.catchLoc,!0)}else{if(!bt)throw Error("try statement without catch or finally");if(this.prev<fe.finallyLoc)return oe(fe.finallyLoc)}}}},abrupt:function(Z,K){for(var oe=this.tryEntries.length-1;oe>=0;--oe){var ke=this.tryEntries[oe];if(ke.tryLoc<=this.prev&&c.call(ke,"finallyLoc")&&this.prev<ke.finallyLoc){var fe=ke;break}}fe&&(Z==="break"||Z==="continue")&&fe.tryLoc<=K&&K<=fe.finallyLoc&&(fe=null);var Te=fe?fe.completion:{};return Te.type=Z,Te.arg=K,fe?(this.method="next",this.next=fe.finallyLoc,ye):this.complete(Te)},complete:function(Z,K){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&K&&(this.next=K),ye},finish:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var oe=this.tryEntries[K];if(oe.finallyLoc===Z)return this.complete(oe.completion,oe.afterLoc),Ne(oe),ye}},catch:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var oe=this.tryEntries[K];if(oe.tryLoc===Z){var ke=oe.completion;if(ke.type==="throw"){var fe=ke.arg;Ne(oe)}return fe}}throw Error("illegal catch attempt")},delegateYield:function(Z,K,oe){return this.delegate={iterator:sr(Z),resultName:K,nextLoc:oe},this.method==="next"&&(this.arg=l),ye}},r}function Ip(l,r,n,c,e,t,s){try{var u=l[t](s),k=u.value}catch(T){return void n(T)}u.done?r(k):Promise.resolve(k).then(c,e)}function Dp(l){return function(){var r=this,n=arguments;return new Promise((function(c,e){var t=l.apply(r,n);function s(k){Ip(t,c,e,s,u,"next",k)}function u(k){Ip(t,c,e,s,u,"throw",k)}s(void 0)}))}}function Ii(l,r){return(function(n){if(Array.isArray(n))return n})(l)||(function(n,c){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,s,u,k,T=[],N=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!(N=(t=u.call(e)).done)&&(T.push(t.value),T.length!==c);N=!0);}catch(q){B=!0,s=q}finally{try{if(!N&&e.return!=null&&(k=e.return(),Object(k)!==k))return}finally{if(B)throw s}}return T}})(l,r)||(function(n,c){if(n){if(typeof n=="string")return Bp(n,c);var e=Object.prototype.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Bp(n,c):void 0}})(l,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
37
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Bp(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function Ht(l){return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ht(l)}function uw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,dw(c.key),c)}}function dw(l){var r=(function(n,c){if(Ht(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ht(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ht(r)=="symbol"?r:r+""}y(1688);var hw=(function(){return l=function e(t){(function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),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:function(s){Ht(s.type)==="object"&&(s.type=this._expandSubSchema(s.type))},disallow:function(s){Ht(s.disallow)==="object"&&(s.disallow=this._expandSubSchema(s.disallow))},anyOf:function(s){var u=this;Object.entries(s.anyOf).forEach((function(k){var T=Ii(k,2),N=T[0],B=T[1];s.anyOf[N]=u.expandSchema(B)}))},dependencies:function(s){var u=this;Object.entries(s.dependencies).forEach((function(k){var T=Ii(k,2),N=T[0],B=T[1];Ht(B)!=="object"||Array.isArray(B)||(s.dependencies[N]=u.expandSchema(B))}))},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,u){var k=this,T=b({},u);return Object.entries(s.allOf).forEach((function(N){var B=Ii(N,2),q=B[0],Q=B[1];s.allOf[q]=k.expandRefs(Q,!0),T=k.extendSchemas(T,k.expandSchema(Q))})),delete T.allOf,T},extends:function(s,u){var k,T=this;return delete(k=Array.isArray(s.extends)?s.extends.reduce((function(N,B,q){return T.extendSchemas(N,T.expandSchema(B))}),u):this.extendSchemas(u,this.expandSchema(s.extends))).extends,k},oneOf:function(s,u){var k=this,T=b({},u);return delete T.oneOf,s.oneOf.reduce((function(N,B,q){return N.oneOf[q]=k.extendSchemas(k.expandSchema(B),T),N}),u),u}}},r=[{key:"load",value:(c=Dp(Ni().mark((function e(t,s,u){return Ni().wrap((function(k){for(;;)switch(k.prev=k.next){case 0:return this.schema=t,k.next=3,this._asyncloadExternalRefs(t,s,this._getFileBase(u),!0);case 3:return k.abrupt("return",this.expandRefs(t));case 4:case"end":return k.stop()}}),e,this)}))),function(e,t,s){return c.apply(this,arguments)})},{key:"expandRefs",value:function(e,t){var s=this,u=b({},e);if(!u.$ref)return u;var k=u.$ref.split("#");if(k.length===2&&!this.refs_with_info[u.$ref]){var T=this.expandRecursivePointer(this.schema,k[1]),N=this.extendSchemas(u,this.expandSchema(T));return delete N.$ref,N}var B=k.length>2?this.refs_with_info["#"+k[1]]:this.refs_with_info[u.$ref];delete u.$ref;var q=B.$ref.startsWith("#")?B.fetchUrl:"",Q=this._getRef(q,B);if(this.refs[Q]){if(t&&O(this.refs[Q],"allOf")){var X=this.refs[Q].allOf;Object.keys(X).forEach((function(le){X[le]=s.expandRefs(X[le],!0)}))}}else console.warn("reference:'".concat(Q,"' not found!"));return k.length>2?this.extendSchemas(u,this.expandSchema(this.expandRecursivePointer(this.refs[Q],k[2]))):this.extendSchemas(u,this.expandSchema(this.refs[Q]))}},{key:"expandRecursivePointer",value:function(e,t){var s=e;return t.split("/").slice(1).forEach((function(u){s[u]&&(s=s[u])})),s.$refs&&s.$refs.startsWith("#")?this.expandRecursivePointer(e,s.$refs):s}},{key:"expandSchema",value:function(e){var t=this;Object.entries(this._subSchema1).forEach((function(u){var k=Ii(u,2),T=k[0],N=k[1];e[T]&&N.call(t,e)}));var s=b({},e);return Object.entries(this._subSchema2).forEach((function(u){var k=Ii(u,2),T=k[0],N=k[1];e[T]&&(s=N.call(t,e,s))})),this.expandRefs(s)}},{key:"_getRef",value:function(e,t){var s=e+t;return this.refs[s]?s:e+decodeURIComponent(t.$ref)}},{key:"_expandSubSchema",value:function(e){var t=this;return Array.isArray(e)?e.map((function(s){return Ht(s)==="object"?t.expandSchema(s):s})):this.expandSchema(e)}},{key:"_manageRecursivePointer",value:function(e,t){Object.keys(e).forEach((function(s){e[s]!==null&&e[s].$ref&&e[s].$ref.indexOf("#")===0&&(e[s].$ref=t+e[s].$ref)}))}},{key:"_getExternalRefs",value:function(e,t){var s=this,u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u||this._manageRecursivePointer(e,t);var k={},T=function(X){return Object.keys(X).forEach((function(le){k[le]=!0}))};if(e.$ref&&Ht(e.$ref)!=="object"&&(e.$ref.indexOf("#")!==0||!u)){var N=e.$ref,B="";N.indexOf("#")>0&&(N=N.substr(0,N.indexOf("#"))),N!==e.$ref&&(B=e.$ref.substr(e.$ref.indexOf("#")));var q=this.refs_prefix+this.refs_counter++,Q=q+B;e.$ref.substr(0,1)==="#"||this.refs[e.$ref]||(k[N]=!0),this.refs_with_info[q]={fetchUrl:t,$ref:N},e.$ref=Q}return Object.values(e).forEach((function(X){X&&Ht(X)==="object"&&(Array.isArray(X)?Object.values(X).forEach((function(le){le&&Ht(le)==="object"&&T(s._getExternalRefs(le,t,u))})):X.$ref&&typeof X.$ref=="string"&&X.$ref.startsWith("#")||T(s._getExternalRefs(X,t,u)))})),e.id&&typeof e.id=="string"&&e.id.substr(0,4)==="urn:"?this.refs[e.id]=e:e.$id&&typeof e.$id=="string"&&e.$id.substr(0,4)==="urn:"&&(this.refs[e.$id]=e),k}},{key:"_getFileBase",value:function(e){if(!e)return"/";var t=this.options.ajaxBase;return t===void 0?this._getFileBaseFromFileLocation(e):t}},{key:"_getFileBaseFromFileLocation",value:function(e){var t=e.split("/");return t.pop(),"".concat(t.join("/"),"/")}},{key:"_joinUrl",value:function(e,t){var s=e;return e.substr(0,7)!=="http://"&&e.substr(0,8)!=="https://"&&e.substr(0,5)!=="blob:"&&e.substr(0,5)!=="data:"&&e.substr(0,1)!=="#"&&e.substr(0,1)!=="/"&&(s=t+e),s.indexOf("#")>0&&(s=s.substr(0,s.indexOf("#"))),s}},{key:"_isUniformResourceName",value:function(e){return e.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(n=Dp(Ni().mark((function e(t,s,u){var k,T,N,B,q,Q,X=this,le=arguments;return Ni().wrap((function(ye){for(;;)switch(ye.prev=ye.next){case 0:k=le.length>3&&le[3]!==void 0&&le[3],T=this._getExternalRefs(t,s,k),N=0,B=Ni().mark((function xe(){var Pe,Be,Ke,tt,we,Ce,at,vt,ar,ni,Go;return Ni().wrap((function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if((Pe=Q[q])!==void 0){Ne.next=3;break}return Ne.abrupt("return",0);case 3:if(!X.refs[Pe]){Ne.next=5;break}return Ne.abrupt("return",0);case 5:if(!X._isUniformResourceName(Pe)){Ne.next=40;break}if(X.refs[Pe]="loading",N++,Be=X.options.urn_resolver,Ke=Pe,typeof Be=="function"){Ne.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Ke,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Ke));case 13:return Ke.indexOf("#")>0&&(Ke=Ke.substr(0,Ke.indexOf("#"))),Ne.prev=14,Ne.next=17,Be(Ke);case 17:tt=Ne.sent,Ne.prev=18,we=JSON.parse(tt),Ne.next=26;break;case 22:throw Ne.prev=22,Ne.t0=Ne.catch(18),console.log(Ne.t0),new Error("Failed to parse external ref ".concat(Ke));case 26:if(!(typeof we!="boolean"&&Ht(we)!=="object"||we===null||Array.isArray(we))){Ne.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Ke));case 28:return X.refs[Pe]=we,Ne.next=31,X._asyncloadExternalRefs(we,Pe,u);case 31:Ne.next=37;break;case 33:throw Ne.prev=33,Ne.t1=Ne.catch(14),console.log(Ne.t1),new Error("Failed to parse external ref ".concat(Ke));case 37:if(typeof tt!="boolean"){Ne.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Ke));case 39:return Ne.abrupt("return",0);case 40:if(X.options.ajax){Ne.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(Pe));case 42:if(N++,Ce=X._joinUrl(Pe,u),X.options.ajax_cache_responses&&(vt=X.cacheGet(Ce))&&(at=vt),at){Ne.next=61;break}return Ne.next=48,new Promise((function(sn){var sr=new XMLHttpRequest;X.options.ajaxCredentials&&(sr.withCredentials=X.options.ajaxCredentials),sr.overrideMimeType("application/json"),sr.open("GET",Ce,!0),sr.onload=function(){sn(sr)},sr.onerror=function(Z){sn(void 0)},sr.send()}));case 48:if((ar=Ne.sent)!==void 0){Ne.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(Pe));case 51:Ne.prev=51,at=JSON.parse(ar.responseText),X.onSchemaLoaded({schema:at,schemaUrl:Ce}),X.options.ajax_cache_responses&&X.cacheSet(Ce,at),Ne.next=61;break;case 57:throw Ne.prev=57,Ne.t2=Ne.catch(51),console.log(Ne.t2),new Error("Failed to parse external ref ".concat(Ce));case 61:if(!(typeof at!="boolean"&&Ht(at)!=="object"||at===null||Array.isArray(at))){Ne.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Ce));case 63:return X.refs[Pe]=at,ni=X._getFileBaseFromFileLocation(Ce),Ce!==Pe&&(Go=Ce.split("/"),Ce=(Pe.substr(0,1)==="/"?"/":"")+Go.pop()),Ne.next=68,X._asyncloadExternalRefs(at,Ce,ni);case 68:case"end":return Ne.stop()}}),xe,null,[[14,33],[18,22],[51,57]])})),q=0,Q=Object.keys(T);case 5:if(!(q<Q.length)){ye.next=13;break}return ye.delegateYield(B(),"t0",7);case 7:if(ye.t0!==0){ye.next=10;break}return ye.abrupt("continue",10);case 10:q++,ye.next=5;break;case 13:if(N){ye.next=15;break}return ye.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ye.stop()}}),e,this)}))),function(e,t,s){return n.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(e){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(e,t){var s=this;e=b({},e),t=b({},t);var u={},k=function(T){typeof T=="string"&&(T=[T]),typeof t.type=="string"&&(t.type=[t.type]),t.type&&t.type.length?u.type=T.filter((function(N){return t.type.includes(N)})):u.type=T,u.type.length===1&&typeof u.type[0]=="string"?u.type=u.type[0]:u.type.length===0&&delete u.type};return Object.entries(e).forEach((function(T){var N=Ii(T,2),B=N[0],q=N[1];t[B]!==void 0?(function(Q,X){(function(le,ye){return(le==="required"||le==="defaultProperties")&&Ht(ye)==="object"&&Array.isArray(ye)})(Q,X)?u[Q]=X.concat(t[Q]).reduce((function(le,ye){return le.includes(ye)||le.push(ye),le}),[]):Q!=="type"||typeof X!="string"&&!Array.isArray(X)?Ht(X)!=="object"||Array.isArray(X)||X===null?u[Q]=X:u[Q]=s.extendSchemas(X,t[Q]):k(X)})(B,q):u[B]=q})),Object.entries(t).forEach((function(T){var N=Ii(T,2),B=N[0],q=N[1];e[B]===void 0&&(u[B]=q)})),u}},{key:"getCacheKey",value:function(e){return["je-cache",e].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(e,t){try{window.localStorage.setItem(this.getCacheKey(e),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:t}))}catch(s){console.error(s)}}},{key:"cacheGet",value:function(e){try{var t=window.localStorage.getItem(this.getCacheKey(e));if(t){var s=JSON.parse(t);if(s.cacheBuster&&s.schema&&s.cacheBuster===this.getCacheBuster())return s.schema;this.cacheDelete(e)}}catch(u){console.error(u)}}},{key:"cacheDelete",value:function(e){window.localStorage.removeItem(this.getCacheKey(e))}}],r&&uw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r,n,c})(),fw=(y(2762),{default:function(){return{compile:function(l){var r=l.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),n=r&&r.length;if(!n)return function(){return l};for(var c=[],e=function(s){var u,k,T=r[s].replace(/[{}]+/g,"").trim().split("."),N=T.length;N>1?u=function(B){for(k=B,s=0;s<N&&(k=k[T[s]]);s++);return k}:(T=T[0],u=function(B){return B[T]}),c.push({s:r[s],r:u})},t=0;t<n;t++)e(t);return function(s){for(var u,k="".concat(l),T=0;T<n;T++)u=c[T],k=k.replace(u.s,u.r(s));return k}}}},ejs:function(){return!!window.EJS&&{compile:function(l){var r=new window.EJS({text:l});return function(n){return r.render(n)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(l){var r=window.Hogan.compile(l);return function(n){return r.render(n)}}}},lodash:function(){return!!window._&&{compile:function(l){return function(r){return window._.template(l)(r)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(l){return function(r){return window.Mark.up(l,r)}}}},mustache:function(){return!!window.Mustache&&{compile:function(l){return function(r){return window.Mustache.render(l,r)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(l){return function(r){return window._.template(l)(r)}}}}});function Ca(l){return Ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ca(l)}function Yc(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function pw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,mw(c.key),c)}}function mw(l){var r=(function(n,c){if(Ca(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ca(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ca(r)=="symbol"?r:r+""}var yw={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},En=(function(){return l=function n(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yw;(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,n),this.mapping=e,this.icon_prefix=c},(r=[{key:"getIconClass",value:function(n){return this.mapping[n]?this.icon_prefix+this.mapping[n]:this.icon_prefix+n}},{key:"getIcon",value:function(n){var c,e=this.getIconClass(n);if(!e)return null;var t,s=document.createElement("i");return(c=s.classList).add.apply(c,(function(u){if(Array.isArray(u))return Yc(u)})(t=e.split(" "))||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(t)||(function(u,k){if(u){if(typeof u=="string")return Yc(u,k);var T=Object.prototype.toString.call(u).slice(8,-1);return T==="Object"&&u.constructor&&(T=u.constructor.name),T==="Map"||T==="Set"?Array.from(u):T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?Yc(u,k):void 0}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
38
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),s}}])&&pw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Qc(l){return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qc(l)}function vw(l,r,n){return r=ol(r),(function(c,e){if(e&&(Qc(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Fp()?Reflect.construct(r,n||[],ol(l).constructor):r.apply(l,n))}function Fp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fp=function(){return!!l})()}function ol(l){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ol(l)}function Xc(l,r){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Xc(l,r)}var bw={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"},gw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),vw(this,r,["glyphicon glyphicon-",bw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&Xc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function eu(l){return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},eu(l)}function _w(l,r,n){return r=al(r),(function(c,e){if(e&&(eu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Mp()?Reflect.construct(r,n||[],al(l).constructor):r.apply(l,n))}function Mp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Mp=function(){return!!l})()}function al(l){return al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},al(l)}function tu(l,r){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},tu(l,r)}var ww={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"},kw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),_w(this,r,["icon-",ww])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&tu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function ru(l){return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ru(l)}function jw(l,r,n){return r=sl(r),(function(c,e){if(e&&(ru(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Vp()?Reflect.construct(r,n||[],sl(l).constructor):r.apply(l,n))}function Vp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Vp=function(){return!!l})()}function sl(l){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(l)}function nu(l,r){return nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},nu(l,r)}var Ew={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"},Ow=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),jw(this,r,["fa fa-",Ew])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&nu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function iu(l){return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},iu(l)}function xw(l,r,n){return r=ll(r),(function(c,e){if(e&&(iu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,zp()?Reflect.construct(r,n||[],ll(l).constructor):r.apply(l,n))}function zp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(zp=function(){return!!l})()}function ll(l){return ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(l)}function ou(l,r){return ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ou(l,r)}var Sw={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"},Cw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),xw(this,r,["fas fa-",Sw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&ou(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function au(l){return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},au(l)}function Pw(l,r,n){return r=cl(r),(function(c,e){if(e&&(au(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,qp()?Reflect.construct(r,n||[],cl(l).constructor):r.apply(l,n))}function qp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(qp=function(){return!!l})()}function cl(l){return cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(l)}function su(l,r){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},su(l,r)}var Tw={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"},Rw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Pw(this,r,["ui-icon ui-icon-",Tw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&su(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function lu(l){return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lu(l)}function Lw(l,r,n){return r=ul(r),(function(c,e){if(e&&(lu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Hp()?Reflect.construct(r,n||[],ul(l).constructor):r.apply(l,n))}function Hp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Hp=function(){return!!l})()}function ul(l){return ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(l)}function cu(l,r){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},cu(l,r)}var Aw={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"},$w=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Lw(this,r,["oi oi-",Aw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&cu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function uu(l){return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uu(l)}function Nw(l,r,n){return r=dl(r),(function(c,e){if(e&&(uu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Up()?Reflect.construct(r,n||[],dl(l).constructor):r.apply(l,n))}function Up(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Up=function(){return!!l})()}function dl(l){return dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(l)}function du(l,r){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},du(l,r)}var Iw={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"},Dw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Nw(this,r,["icon icon-",Iw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&du(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En);function hu(l){return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hu(l)}function Bw(l,r,n){return r=hl(r),(function(c,e){if(e&&(hu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Gp()?Reflect.construct(r,n||[],hl(l).constructor):r.apply(l,n))}function Gp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Gp=function(){return!!l})()}function hl(l){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(l)}function fu(l,r){return fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},fu(l,r)}var Fw={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"},Mw={bootstrap:(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Bw(this,r,["bi bi-",Fw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&fu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(En),bootstrap3:gw,fontawesome3:kw,fontawesome4:Ow,fontawesome5:Cw,jqueryui:Rw,openiconic:$w,spectre:Dw};function Pa(l){return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pa(l)}function Vw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,zw(c.key),c)}}function zw(l){var r=(function(n,c){if(Pa(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Pa(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Pa(r)=="symbol"?r:r+""}var Jp=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(l){return l in document.documentElement})),On=(function(){return l=function n(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,n),this.jsoneditor=c,Object.keys(e).forEach((function(t){c.options[t]!==void 0&&(e[t]=c.options[t])})),this.options=e},r=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getOptInCheckbox",value:function(n){var c=document.createElement("span"),e=this.getHiddenLabel(n+" opt-in");e.setAttribute("for",n+"-opt-in"),e.textContent=n+"-opt-in";var t=document.createElement("input");return t.setAttribute("type","checkbox"),t.setAttribute("style","margin: 0 10px 0 0;"),t.setAttribute("id",n+"-opt-in"),t.classList.add("json-editor-opt-in"),c.appendChild(t),c.appendChild(e),{label:e,checkbox:t,container:c}}},{key:"getOptInSwitch",value:function(n){return this.getOptInCheckbox()}},{key:"getFloatRightLinkHolder",value:function(){var n=document.createElement("div");return n.classList.add("je-float-right-linkholder"),n}},{key:"getModal",value:function(){var n=document.createElement("div");return n.style.display="none",n.classList.add("je-modal"),n}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var n=document.createElement("div");return n.classList.add("row"),n}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(n,c){}},{key:"getLink",value:function(n){var c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(document.createTextNode(n)),c}},{key:"disableHeader",value:function(n){n.style.color="#ccc"}},{key:"disableLabel",value:function(n){n.style.color="#ccc"}},{key:"enableHeader",value:function(n){n.style.color=""}},{key:"enableLabel",value:function(n){n.style.color=""}},{key:"getInfoButton",value:function(n){var c=document.createElement("span");c.innerText="ⓘ",c.classList.add("je-infobutton-icon");var e=document.createElement("span");return e.classList.add("je-infobutton-tooltip"),e.innerText=n,c.onmouseover=function(){e.style.visibility="visible"},c.onmouseleave=function(){e.style.visibility="hidden"},c.appendChild(e),c}},{key:"getFormInputLabel",value:function(n,c){var e=document.createElement("label");return e.appendChild(document.createTextNode(n)),c&&e.classList.add("required"),e}},{key:"getLabelLike",value:function(n,c){var e=document.createElement("b");return e.appendChild(document.createTextNode(n)),c&&e.classList.add("required"),e}},{key:"getHeader",value:function(n,c){var e=document.createElement("span");return typeof n=="string"?e.textContent=n:e.appendChild(n),e.classList.add("je-header"),e}},{key:"getCheckbox",value:function(){var n=this.getFormInputField("checkbox");return n.classList.add("je-checkbox"),n}},{key:"getCheckboxLabel",value:function(n,c){var e=document.createElement("label");return e.appendChild(document.createTextNode(" ".concat(n))),c&&e.classList.add("required"),e}},{key:"getMultiCheckboxHolder",value:function(n,c,e,t){var s=document.createElement("div");return s.classList.add("control-group"),c&&(c.style.display="block",s.appendChild(c),t&&c.appendChild(t)),Object.values(n).forEach((function(u){u.style.display="inline-block",u.style.marginRight="20px",s.appendChild(u)})),e&&s.appendChild(e),s}},{key:"getFormCheckboxControl",value:function(n,c,e){var t=document.createElement("div");return t.appendChild(n),c.style.width="auto",n.insertBefore(c,n.firstChild),e&&t.classList.add("je-checkbox-control--compact"),t}},{key:"getFormRadio",value:function(n){var c=this.getFormInputField("radio");return Object.keys(n).forEach((function(e){return c.setAttribute(e,n[e])})),c.classList.add("je-radio"),c}},{key:"getFormRadioLabel",value:function(n,c){var e=document.createElement("label");return e.appendChild(document.createTextNode(" ".concat(n))),c&&e.classList.add("required"),e}},{key:"getFormRadioControl",value:function(n,c,e,t){var s=document.createElement("div");return s.appendChild(n),c.style.width="auto",n.insertBefore(c,n.firstChild),e&&s.classList.add("je-radio-control--compact"),c.tagName.toLowerCase()!=="div"&&t&&n&&c&&(c.setAttribute("id",t),c.setAttribute("aria-labelledby",t),n.setAttribute("for",t)),s}},{key:"getSelectInput",value:function(n,c){var e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],t=document.createElement("select");return n&&this.setSelectOptions(t,n,[],e),t}},{key:"getSwitcher",value:function(n){var c=this.getSelectInput(n,!1);return c.classList.add("je-switcher"),c}},{key:"getSwitcherOptions",value:function(n){return n.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(n,c,e){this.setSelectOptions(n,c,e)}},{key:"setSelectOptions",value:function(n,c){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],t=arguments.length>3&&arguments[3]!==void 0&&arguments[3],s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:" ";if(n.innerHTML="",t){var u=document.createElement("option");u.setAttribute("value","_placeholder_"),u.textContent=s,u.setAttribute("disabled",""),u.setAttribute("hidden",""),n.appendChild(u)}for(var k=0;k<c.length;k++){var T=document.createElement("option");T.setAttribute("value",c[k]),T.textContent=e[k]||c[k],n.appendChild(T)}}},{key:"getTextareaInput",value:function(){var n=document.createElement("textarea");return n.classList.add("je-textarea"),n}},{key:"getHiddenLabel",value:function(n){var c=document.createElement("label");return c.textContent=n,c.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),c}},{key:"visuallyHidden",value:function(n){n&&n.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}},{key:"getHiddenText",value:function(n){var c=document.createElement("span");return c.textContent=n,c.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),c}},{key:"getRangeInput",value:function(n,c,e,t,s){var u=this.getFormInputField("range");return u.setAttribute("min",n),u.setAttribute("max",c),u.setAttribute("step",e),t&&(t.setAttribute("id",s+"-description"),u.setAttribute("aria-describedby",s+"-description")),u}},{key:"getStepperButtons",value:function(n){var c=document.createElement("div"),e=document.createElement("button");e.setAttribute("type","button"),e.classList.add("stepper-down");var t=document.createElement("button");t.setAttribute("type","button"),t.classList.add("stepper-up"),n.getAttribute("readonly")&&(e.setAttribute("disabled",!0),t.setAttribute("disabled",!0)),e.textContent="-",t.textContent="+";var s=function(T,N){T.value=Number(N||T.value),T.setAttribute("initialized","1")},u=n.getAttribute("min"),k=n.getAttribute("max");return e.addEventListener("click",(function(){n.getAttribute("initialized")?u?Number(n.value)>Number(u)&&n.stepDown():n.stepDown():s(n,u),w(n,"change")})),t.addEventListener("click",(function(){n.getAttribute("initialized")?k?Number(n.value)<Number(k)&&n.stepUp():n.stepUp():s(n,u),w(n,"change")})),c.appendChild(e),c.appendChild(t),c}},{key:"getRangeOutput",value:function(n){var c=document.createElement("output"),e=function(t){c.value=t.currentTarget.value};return n.addEventListener("change",e,!1),n.addEventListener("input",e,!1),c}},{key:"getRangeControl",value:function(n,c){var e=document.createElement("div");return e.classList.add("je-range-control"),c&&e.appendChild(c),e.appendChild(n),e}},{key:"getFormInputField",value:function(n){var c=document.createElement("input");return c.setAttribute("type",n),c}},{key:"afterInputReady",value:function(n){}},{key:"getFormControl",value:function(n,c,e,t,s){var u=document.createElement("div");return u.classList.add("form-control"),n&&(u.appendChild(n),s&&n.setAttribute("for",s)),c.type!=="checkbox"&&c.type!=="radio"||!n?(t&&n&&n.appendChild(t),u.appendChild(c)):(c.style.width="auto",n.insertBefore(c,n.firstChild),t&&n.appendChild(t)),c.tagName.toLowerCase()!=="div"&&c&&n&&s&&(n.setAttribute("for",s),c.setAttribute("id",s)),c.tagName.toLowerCase()!=="div"&&c&&e&&(e.setAttribute("id",s+"-description"),c.setAttribute("aria-describedby",s+"-description")),e&&u.appendChild(e),u}},{key:"getIndentedPanel",value:function(){var n=document.createElement("div");return n.classList.add("je-indented-panel"),n}},{key:"getTopIndentedPanel",value:function(){var n=document.createElement("div");return n.classList.add("je-indented-panel--top"),n}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(n){var c=document.createElement("p");return window.DOMPurify?c.innerHTML=window.DOMPurify.sanitize(n):c.textContent=this.cleanText(n),c}},{key:"getCheckboxDescription",value:function(n){return this.getDescription(n)}},{key:"getFormInputDescription",value:function(n){return this.getDescription(n)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(n){return this.getButtonHolder()}},{key:"getButton",value:function(n,c,e){var t=document.createElement("button");return t.type="button",this.setButtonText(t,n,c,e),t}},{key:"getFormButton",value:function(n,c,e){return this.getButton(n,c,e)}},{key:"setButtonText",value:function(n,c,e,t){for(;n.firstChild;)n.removeChild(n.firstChild);if(e&&(n.appendChild(e),c=" ".concat(c)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!e){var s=document.createElement("span");s.appendChild(document.createTextNode(c)),n.appendChild(s)}t&&n.setAttribute("title",t)}},{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(n){var c=document.createElement("th");return c.textContent=n,c}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(n){var c=document.createElement("p");return c.style=c.style||{},c.style.color="red",c.appendChild(document.createTextNode(n)),c}},{key:"addInputError",value:function(n,c){n.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(n){}},{key:"addTableRowError",value:function(n){}},{key:"removeTableRowError",value:function(n){}},{key:"getTabHolder",value:function(n){var c=n===void 0?"":n,e=document.createElement("div");return e.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(c,"'></div><div class='je-tabholder--clear'></div>"),e}},{key:"getTopTabHolder",value:function(n){var c=n===void 0?"":n,e=document.createElement("div");return e.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(c,"'></div>"),e}},{key:"applyStyles",value:function(n,c){Object.keys(c).forEach((function(e){return n.style[e]=c[e]}))}},{key:"closest",value:function(n,c){for(;n&&n!==document;){if(!n[Jp])return!1;if(n[Jp](c))return n;n=n.parentNode}return!1}},{key:"insertBasicTopTab",value:function(n,c){c.firstChild.insertBefore(n,c.firstChild.firstChild)}},{key:"getTab",value:function(n,c){var e=document.createElement("div");return e.appendChild(n),e.id=c,e.classList.add("je-tab"),e}},{key:"getTopTab",value:function(n,c){var e=document.createElement("div");return e.appendChild(n),e.id=c,e.classList.add("je-tab--top"),e}},{key:"getTabContentHolder",value:function(n){return n.children[1]}},{key:"getTopTabContentHolder",value:function(n){return n.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(n){this.applyStyles(n.tab,{opacity:1,background:"white"}),n.rowPane!==void 0?n.rowPane.style.display="":n.container.style.display=""}},{key:"markTabInactive",value:function(n){this.applyStyles(n.tab,{opacity:.5,background:""}),n.rowPane!==void 0?n.rowPane.style.display="none":n.container.style.display="none"}},{key:"addTab",value:function(n,c){n.children[0].appendChild(c)}},{key:"addTopTab",value:function(n,c){n.children[0].appendChild(c)}},{key:"getBlockLink",value:function(){var n=document.createElement("a");return n.classList.add("je-block-link"),n}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(n,c,e){n.appendChild(c),e.classList.add("je-media"),n.appendChild(e)}},{key:"createImageLink",value:function(n,c,e){n.appendChild(c),c.appendChild(e)}},{key:"getFirstTab",value:function(n){return n.firstChild.firstChild}},{key:"getInputGroup",value:function(n,c){}},{key:"cleanText",value:function(n){var c=document.createElement("div");return c.innerHTML=n,c.textContent||c.innerText}},{key:"getDropZone",value:function(n){var c=document.createElement("div");return c.setAttribute("data-text",n),c.classList.add("je-dropzone"),c}},{key:"getUploadPreview",value:function(n,c,e){var t=document.createElement("div");if(t.classList.add("je-upload-preview"),n.mimeType.substr(0,5)==="image"){var s=document.createElement("img");s.src=e,t.appendChild(s)}var u=document.createElement("div");u.innerHTML+="<strong>Name:</strong> ".concat(n.name,"<br><strong>Type:</strong> ").concat(n.type,"<br><strong>Size:</strong> ").concat(n.formattedSize),t.appendChild(u),t.appendChild(c);var k=document.createElement("div");return k.style.clear="left",t.appendChild(k),t}},{key:"getProgressBar",value:function(){var n=document.createElement("progress");return n.setAttribute("max",100),n.setAttribute("value",0),n}},{key:"updateProgressBar",value:function(n,c){n&&n.setAttribute("value",c)}},{key:"updateProgressBarUnknown",value:function(n){n&&n.removeAttribute("value")}}],r&&Vw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Do(l){return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Do(l)}function qw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Hw(c.key),c)}}function Hw(l){var r=(function(n,c){if(Do(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Do(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Do(r)=="symbol"?r:r+""}function Uw(l,r,n){return r=rn(r),(function(c,e){if(e&&(Do(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Kp()?Reflect.construct(r,n||[],rn(l).constructor):r.apply(l,n))}function Kp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Kp=function(){return!!l})()}function Di(){return Di=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=rn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Di.apply(this,arguments)}function rn(l){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rn(l)}function pu(l,r){return pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},pu(l,r)}var Wp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Uw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pu(e,t)})(r,l),n=r,(c=[{key:"getFormInputLabel",value:function(e,t){var s=Di(rn(r.prototype),"getFormInputLabel",this).call(this,e,t);return s.classList.add("je-form-input-label"),s}},{key:"getFormInputDescription",value:function(e){var t=Di(rn(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-form-input-label"),t}},{key:"getIndentedPanel",value:function(){var e=Di(rn(r.prototype),"getIndentedPanel",this).call(this);return e.classList.add("je-indented-panel"),e}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var e=Di(rn(r.prototype),"getChildEditorHolder",this).call(this);return e.classList.add("je-child-editor-holder"),e}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.classList.add("je-header-button-holder"),e}},{key:"getTable",value:function(){var e=Di(rn(r.prototype),"getTable",this).call(this);return e.classList.add("je-table"),e}},{key:"addInputError",value:function(e,t){var s=this.closest(e,".form-control")||e.controlgroup;e.errmsg?e.errmsg.style.display="block":(e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),e.errmsg.style=e.errmsg.style||{},e.errmsg.style.color="red",s.appendChild(e.errmsg)),e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(t)),e.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}])&&qw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function Bo(l){return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bo(l)}function Gw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Jw(c.key),c)}}function Jw(l){var r=(function(n,c){if(Bo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Bo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Bo(r)=="symbol"?r:r+""}function Kw(l,r,n){return r=nn(r),(function(c,e){if(e&&(Bo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Zp()?Reflect.construct(r,n||[],nn(l).constructor):r.apply(l,n))}function Zp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Zp=function(){return!!l})()}function Bi(){return Bi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=nn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Bi.apply(this,arguments)}function nn(l){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nn(l)}function mu(l,r){return mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},mu(l,r)}Wp.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 Yp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Kw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mu(e,t)})(r,l),n=r,(c=[{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("label");s.classList.add("switch");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("json-editor-opt-in");var k=document.createElement("span");k.classList.add("switch-slider");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",s.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"getSelectInput",value:function(e,t){var s=Bi(nn(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-control"),s}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-md-".concat(t)),s&&e.classList.add("col-md-offset-".concat(s))}},{key:"afterInputReady",value:function(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-control"),e}},{key:"getRangeInput",value:function(e,t,s,u,k){return Bi(nn(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k)}},{key:"getFormInputField",value:function(e){var t=Bi(nn(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&t.classList.add("form-control"),t}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("sr-only")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");return!e||t.type!=="checkbox"&&t.type!=="radio"?(T.classList.add("form-group"),e&&(e.classList.add("control-label"),T.appendChild(e),u&&e.appendChild(u)),T.appendChild(t)):(T.classList.add(t.type),u&&e.appendChild(u),e.insertBefore(t,e.firstChild),T.appendChild(e)),s&&T.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),T}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("well","well-sm"),e.style.paddingBottom=0,e}},{key:"getInfoButton",value:function(e){var t=document.createElement("span");t.classList.add("glyphicon","glyphicon-info-sign","pull-right"),t.style.padding=".25rem",t.style.position="relative",t.style.display="inline-block";var s=document.createElement("span");return s.style["font-family"]="sans-serif",s.style.visibility="hidden",s.style["background-color"]="rgba(50, 50, 50, .75)",s.style.margin="0 .25rem",s.style.color="#FAFAFA",s.style.padding=".5rem 1rem",s.style["border-radius"]=".25rem",s.style.width="25rem",s.style.position="absolute",s.innerText=e,t.onmouseover=function(){s.style.visibility="visible"},t.onmouseleave=function(){s.style.visibility="hidden"},t.appendChild(s),t}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("p");return t.classList.add("help-block"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeaderContainer",value:function(){return document.createElement("div")}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return s.classList.add("h3"),typeof e=="string"?s.textContent=e:s.appendChild(e),s}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.style.marginLeft="10px",e}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getButton",value:function(e,t,s){var u=Bi(nn(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-default"),u}},{key:"getTableContainer",value:function(){var e=Bi(nn(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-bordered"),e.style.width="auto",e.style.maxWidth="none",e}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("help-block","errormsg"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(t,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(t,"'></div>"),s}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML="<ul class='nav nav-tabs' id='".concat(t,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(t,"'></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),u.setAttribute("aria-controls",t),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),u.setAttribute("aria-controls",t),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);var u=document.createElement("div");u.classList.add("input-group-btn"),s.appendChild(u);for(var k=0;k<t.length;k++)u.appendChild(t[k]);return s}}}])&&Gw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function Fo(l){return Fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fo(l)}function Ww(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Zw(c.key),c)}}function Zw(l){var r=(function(n,c){if(Fo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fo(r)=="symbol"?r:r+""}function Yw(l,r,n){return r=on(r),(function(c,e){if(e&&(Fo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Qp()?Reflect.construct(r,n||[],on(l).constructor):r.apply(l,n))}function Qp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qp=function(){return!!l})()}function Fi(){return Fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=on(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Fi.apply(this,arguments)}function on(l){return on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},on(l)}function yu(l,r){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},yu(l,r)}Yp.rules={".switch":"position:relative;display:inline-block;width:28px;height:16px;margin-right:10px",".switch input":"opacity:0;width:0;height:0",".switch-slider":"position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:%23ccc;transition:.1s;border-radius:34px",".switch-slider:before":"position:absolute;content:%22%22;height:12px;width:12px;left:1px;top:2px;background-color:white;transition:.1s;border-radius:50%25","input:checked + .switch-slider":"background-color:%232196F3","input:focus + .switch-slider":"box-shadow:0%200%201px%20%232196F3","input:checked + .switch-slider:before":"transform:translateX(12px)","input:disabled + .switch-slider":"opacity:0.5"};var Qw={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"},Xp=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),Yw(this,r,[e,Qw])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yu(e,t)})(r,l),n=r,(c=[{key:"getSelectInput",value:function(e,t){var s=Fi(on(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&s.classList.add("form-control-sm"),this.options.input_size==="large"&&s.classList.add("form-control-lg")):(s.classList.remove("form-control"),s.classList.add("custom-select"),this.options.input_size==="small"&&s.classList.add("custom-select-sm"),this.options.input_size==="large"&&s.classList.add("custom-select-lg")),s}},{key:"getContainer",value:function(){var e=document.createElement("div");return this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("div");s.classList.add("custom-control","custom-switch","d-inline-block","fs-6");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("custom-control-input","json-editor-opt-in");var k=document.createElement("label");k.setAttribute("for",e+"-opt-in"),k.classList.add("custom-control-label");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",k.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-md-".concat(t)),s&&e.classList.add("offset-md-".concat(s))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var s=e.parentNode.parentNode.getElementsByTagName("label")[0];s&&(s.htmlFor=t),e.controlgroup=this.closest(e,".form-group")}}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return 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:"getRangeInput",value:function(e,t,s,u,k){var T=Fi(on(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k);return this.options.custom_forms===!0&&(T.classList.remove("form-control"),T.classList.add("custom-range")),T}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),s=document.createElement("div"),u=document.createElement("div"),k=document.createElement("button");k.setAttribute("type","button");var T=document.createElement("button");T.setAttribute("type","button"),t.appendChild(s),t.appendChild(e),t.appendChild(u),s.appendChild(k),u.appendChild(T),t.classList.add("input-group"),s.classList.add("input-group-prepend"),u.classList.add("input-group-append"),k.classList.add("btn"),k.classList.add("btn-secondary"),k.classList.add("stepper-down"),T.classList.add("btn"),T.classList.add("btn-secondary"),T.classList.add("stepper-up"),e.getAttribute("readonly")&&(k.setAttribute("disabled",!0),T.setAttribute("disabled",!0)),k.textContent="-",T.textContent="+";var N=function(Q,X){Q.value=Number(X||Q.value),Q.setAttribute("initialized","1")},B=e.getAttribute("min"),q=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),k.addEventListener("click",(function(){e.getAttribute("initialized")?B?Number(e.value)>Number(B)&&e.stepDown():e.stepDown():N(e,B),w(e,"change")})),T.addEventListener("click",(function(){e.getAttribute("initialized")?q?Number(e.value)<Number(q)&&e.stepUp():e.stepUp():N(e,B),w(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=Fi(on(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&e!=="file"&&(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")),e==="file"&&t.classList.add("form-control-file"),t}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("sr-only")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");if(T.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(T.appendChild(e),u&&T.appendChild(u)),T.appendChild(t);else{var N=document.createElement("div");this.options.custom_forms===!1?(N.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label")):(N.classList.add("custom-control"),t.classList.add("custom-control-input"),e.classList.add("custom-control-label"),t.type==="checkbox"?N.classList.add("custom-checkbox"):N.classList.add("custom-radio")),N.appendChild(t),N.appendChild(e),u&&N.appendChild(u),T.appendChild(N)}return s&&T.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),T}},{key:"getInfoButton",value:function(e){var t=document.createElement("button");t.type="button",t.classList.add("ml-3","jsoneditor-twbs4-text-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("data-placement","auto"),t.title=e;var s=document.createTextNode("ⓘ");return t.appendChild(s),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(t).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&t.classList.add("je-tooltip"),t}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){var k=document.createElement("div");k.classList.add("form-group"),t&&(k.appendChild(t),u&&t.appendChild(u));var T=document.createElement("div");return Object.values(e).forEach((function(N){var B=N.firstChild;T.appendChild(B)})),k.appendChild(T),s&&k.appendChild(s),k}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in e)t.setAttribute(s,e[s]);return this.options.custom_forms===!1?t.classList.add("form-check-input"):t.classList.add("custom-control-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var s=document.createElement("label");return this.options.custom_forms===!1?s.classList.add("form-check-label"):s.classList.add("custom-control-label"),s.appendChild(document.createTextNode(e)),s}},{key:"getFormRadioControl",value:function(e,t,s){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(t),u.appendChild(e),s&&(this.options.custom_forms===!1?u.classList.add("form-check-inline"):u.classList.add("custom-control-inline")),u}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("card","card-body","mb-3"),this.options.object_background&&e.classList.add(this.options.object_background),this.options.object_text&&e.classList.add(this.options.object_text),e}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("small");return t.classList.add("form-text"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return s.classList.add("h3"),s.classList.add("card-title"),s.classList.add("level-"+t),typeof e=="string"?s.textContent=e:s.appendChild(e),s.style.display="inline-block",s}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=this.getButtonHolder();return t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"&&t.classList.add("text-right"),t}},{key:"getButton",value:function(e,t,s){var u=Fi(on(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var e=Fi(on(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-sm"),this.options.table_border&&e.classList.add("table-bordered"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getErrorMessage",value:function(e){var t=document.createElement("div");return t.classList.add("alert","alert-danger"),t.setAttribute("role","alert"),t.appendChild(document.createTextNode(e)),t}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("is-invalid"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("invalid-feedback"),e.controlgroup.appendChild(e.errmsg),e.errmsg.style.display="block"),e.errmsg.style.display="block",e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),s=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(s,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(s,"'></div></div>"),t.classList.add("row"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.classList.add("card"),s.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(t,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(t,"'></div></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(e,t){t.children[0].children[0].insertBefore(e,t.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getFirstTab",value:function(e){return e.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getBlockLink",value:function(){var e=document.createElement("a");return e.classList.add("mb-3","d-inline-block"),e}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);var u=document.createElement("div");u.classList.add("input-group-append"),s.appendChild(u);for(var k=0;k<t.length;k++)t[k].classList.remove("mr-2","btn-secondary"),t[k].classList.add("btn-outline-secondary"),u.appendChild(t[k]);return s}}}])&&Ww(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function Mo(l){return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mo(l)}function Xw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,e1(c.key),c)}}function e1(l){var r=(function(n,c){if(Mo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Mo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Mo(r)=="symbol"?r:r+""}function t1(l,r,n){return r=an(r),(function(c,e){if(e&&(Mo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,em()?Reflect.construct(r,n||[],an(l).constructor):r.apply(l,n))}function em(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(em=function(){return!!l})()}function Mi(){return Mi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=an(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Mi.apply(this,arguments)}function an(l){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},an(l)}function vu(l,r){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},vu(l,r)}Xp.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 r1={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},tm=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),t1(this,r,[e,r1])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vu(e,t)})(r,l),n=r,(c=[{key:"getSelectInput",value:function(e,t){var s=Mi(an(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-control"),s.classList.add("form-select"),this.options.input_size==="small"&&s.classList.add("form-control-sm"),this.options.input_size==="large"&&s.classList.add("form-control-lg"),s}},{key:"getContainer",value:function(){var e=document.createElement("div");return this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("div");s.classList.add("form-check","form-switch","d-inline-block","fs-6");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("role","switch"),u.setAttribute("id",e+"-opt-in"),u.classList.add("form-check-input","json-editor-opt-in");var k=document.createElement("label");k.setAttribute("for",e+"-opt-in"),k.classList.add("form-check-label");var T=document.createElement("span");return T.classList.add("visually-hidden"),T.textContent=e+"-opt-in",k.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-md-".concat(t)),s&&e.classList.add("offset-md-".concat(s))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var s=e.parentNode.parentNode.getElementsByTagName("label")[0];s&&(s.classList.add("form-label"),s.htmlFor=t),e.controlgroup=this.closest(e,".form-group")}}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return 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:"getRangeInput",value:function(e,t,s,u,k){var T=Mi(an(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k);return T.classList.remove("form-control"),T.classList.add("form-range"),T}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),s=document.createElement("button");s.setAttribute("type","button");var u=document.createElement("button");u.setAttribute("type","button"),t.appendChild(s),t.appendChild(e),t.appendChild(u),t.classList.add("input-group"),s.classList.add("btn"),s.classList.add("btn-secondary"),s.classList.add("stepper-down"),u.classList.add("btn"),u.classList.add("btn-secondary"),u.classList.add("stepper-up"),e.getAttribute("readonly")&&(s.setAttribute("disabled",!0),u.setAttribute("disabled",!0)),s.textContent="-",u.textContent="+";var k=function(B,q){B.value=Number(q||B.value),B.setAttribute("initialized","1")},T=e.getAttribute("min"),N=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),s.addEventListener("click",(function(){e.getAttribute("initialized")?T?Number(e.value)>Number(T)&&e.stepDown():e.stepDown():k(e,T),w(e,"change")})),u.addEventListener("click",(function(){e.getAttribute("initialized")?N?Number(e.value)<Number(N)&&e.stepUp():e.stepUp():k(e,T),w(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=Mi(an(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&(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:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");if(T.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(e.classList.add("form-label"),T.appendChild(e),u&&T.appendChild(u)),T.appendChild(t);else{var N=document.createElement("div");N.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label"),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),N.appendChild(t),N.appendChild(e),u&&N.appendChild(u),T.appendChild(N)}return s&&T.appendChild(s),T}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("visually-hidden"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("visually-hidden")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getInfoButton",value:function(e){var t=document.createElement("button");t.type="button",t.classList.add("ms-3","jsoneditor-twbs5-text-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("data-placement","auto"),t.title=e;var s=document.createTextNode("ⓘ");return t.appendChild(s),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(t).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&t.classList.add("je-tooltip"),t}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){var k=document.createElement("div");k.classList.add("form-group"),t&&(k.appendChild(t),u&&t.appendChild(u));var T=document.createElement("div");return Object.values(e).forEach((function(N){var B=N.firstChild;T.appendChild(B)})),k.appendChild(T),s&&k.appendChild(s),k}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in e)t.setAttribute(s,e[s]);return t.classList.add("form-check-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var s=document.createElement("label");return s.classList.add("form-check-label"),s.appendChild(document.createTextNode(e)),s}},{key:"getFormRadioControl",value:function(e,t,s){var u=document.createElement("div");return u.classList.add("form-check"),u.appendChild(t),u.appendChild(e),s&&u.classList.add("form-check-inline"),u}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("card","card-body","my-3"),this.options.object_background&&e.classList.add(this.options.object_background),this.options.object_text&&e.classList.add(this.options.object_text),e}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("small");return t.classList.add("form-text"),t.classList.add("d-block"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return s.classList.add("h3"),s.classList.add("card-title"),s.classList.add("level-"+t),typeof e=="string"?s.textContent=e:s.appendChild(e),s.style.display="inline-block",s}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=this.getButtonHolder();return t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"&&t.classList.add("text-end"),t}},{key:"getButton",value:function(e,t,s){var u=Mi(an(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var e=Mi(an(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-sm"),this.options.table_border&&e.classList.add("table-bordered"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getErrorMessage",value:function(e){var t=document.createElement("div");return t.classList.add("alert","alert-danger"),t.setAttribute("role","alert"),t.appendChild(document.createTextNode(e)),t}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("is-invalid"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("invalid-feedback"),e.controlgroup.appendChild(e.errmsg),e.errmsg.style.display="block"),e.errmsg.style.display="block",e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),s=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(s,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(s,"'></div></div>"),t.classList.add("row"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.classList.add("card"),s.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(t,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(t,"'></div></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(e,t){t.children[0].children[0].insertBefore(e,t.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getFirstTab",value:function(e){return e.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getBlockLink",value:function(){var e=document.createElement("a");return e.classList.add("mb-3","d-inline-block"),e}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);for(var u=0;u<t.length;u++)t[u].classList.remove("me-2","btn-secondary"),t[u].classList.add("btn-outline-secondary"),s.appendChild(t[u]);return s}}}])&&Xw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function Vo(l){return Vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vo(l)}function n1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,i1(c.key),c)}}function i1(l){var r=(function(n,c){if(Vo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Vo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Vo(r)=="symbol"?r:r+""}function o1(l,r,n){return r=xn(r),(function(c,e){if(e&&(Vo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,rm()?Reflect.construct(r,n||[],xn(l).constructor):r.apply(l,n))}function rm(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rm=function(){return!!l})()}function zo(){return zo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=xn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},zo.apply(this,arguments)}function xn(l){return xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xn(l)}function bu(l,r){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},bu(l,r)}tm.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 nm=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),o1(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bu(e,t)})(r,l),n=r,(c=[{key:"getTable",value:function(){var e=zo(xn(r.prototype),"getTable",this).call(this);return e.setAttribute("cellpadding",5),e.setAttribute("cellspacing",0),e}},{key:"getTableHeaderCell",value:function(e){var t=zo(xn(r.prototype),"getTableHeaderCell",this).call(this,e);return t.classList.add("ui-state-active"),t.style.fontWeight="bold",t}},{key:"getTableCell",value:function(){var e=zo(xn(r.prototype),"getTableCell",this).call(this);return e.classList.add("ui-widget-content"),e}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.style.marginLeft="10px",e.style.fontSize=".6em",e.style.display="inline-block",e}},{key:"getFormInputDescription",value:function(e){var t=this.getDescription(e);return t.style.marginLeft="10px",t.style.display="inline-block",t}},{key:"getFormControl",value:function(e,t,s,u){var k=zo(xn(r.prototype),"getFormControl",this).call(this,e,t,s,u);return t.type==="checkbox"?(k.style.lineHeight="25px",k.style.padding="3px 0"):k.style.padding="4px 0 8px 0",k}},{key:"getDescription",value:function(e){var t=document.createElement("span");return t.style.fontSize=".8em",t.style.fontStyle="italic",window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getButtonHolder",value:function(){var e=document.createElement("div");return e.classList.add("ui-buttonset"),e.style.fontSize=".7em",e}},{key:"getFormInputLabel",value:function(e,t){var s=document.createElement("label");return s.style.fontWeight="bold",s.style.display="block",s.textContent=e,t&&s.classList.add("required"),s}},{key:"getButton",value:function(e,t,s){var u=document.createElement("button");u.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),t&&!e?(u.classList.add("ui-button-icon-only"),t.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(t)):t?(u.classList.add("ui-button-text-icon-primary"),t.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(t)):u.classList.add("ui-button-text-only");var k=document.createElement("span");return k.classList.add("ui-button-text"),k.textContent=e||s||".",u.appendChild(k),u.setAttribute("title",s),u}},{key:"setButtonText",value:function(e,t,s,u){e.innerHTML="",e.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),s&&!t?(e.classList.add("ui-button-icon-only"),s.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(s)):s?(e.classList.add("ui-button-text-icon-primary"),s.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(s)):e.classList.add("ui-button-text-only");var k=document.createElement("span");k.classList.add("ui-button-text"),k.textContent=t||u||".",e.appendChild(k),e.setAttribute("title",u)}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("ui-widget-content","ui-corner-all"),e.style.padding="1em 1.4em",e.style.marginBottom="20px",e}},{key:"afterInputReady",value:function(e){if(!e.controls&&(e.controls=this.closest(e,".form-control"),this.queuedInputErrorText)){var t=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(e,t)}}},{key:"addInputError",value:function(e,t){e.controls?(e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("div"),e.errmsg.classList.add("ui-state-error"),e.controls.appendChild(e.errmsg)),e.errmsg.textContent=t):this.queuedInputErrorText=t}},{key:"removeInputError",value:function(e){e.controls||delete this.queuedInputErrorText,e.errmsg&&(e.errmsg.style.display="none")}},{key:"markTabActive",value:function(e){e.tab.classList.remove("ui-widget-header"),e.tab.classList.add("ui-state-active"),e.rowPane!==void 0?e.rowPane.style.display="":e.container.style.display=""}},{key:"markTabInactive",value:function(e){e.tab.classList.add("ui-widget-header"),e.tab.classList.remove("ui-state-active"),e.rowPane!==void 0?e.rowPane.style.display="none":e.container.style.display="none"}}])&&n1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function qo(l){return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qo(l)}function a1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,s1(c.key),c)}}function s1(l){var r=(function(n,c){if(qo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(qo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return qo(r)=="symbol"?r:r+""}function l1(l,r,n){return r=fl(r),(function(c,e){if(e&&(qo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,im()?Reflect.construct(r,n||[],fl(l).constructor):r.apply(l,n))}function im(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(im=function(){return!!l})()}function fl(l){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(l)}function gu(l,r){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},gu(l,r)}nm.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 om=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),l1(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)})(r,l),n=r,(c=[{key:"addInputError",value:function(e,t){if(e.errmsg)e.errmsg.style.display="block";else{var s=this.closest(e,".form-control");e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),s.nodeName&&s.appendChild(e.errmsg)}e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(t)),e.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}])&&a1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function Ho(l){return Ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ho(l)}function c1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,u1(c.key),c)}}function u1(l){var r=(function(n,c){if(Ho(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ho(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ho(r)=="symbol"?r:r+""}function d1(l,r,n){return r=It(r),(function(c,e){if(e&&(Ho(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,am()?Reflect.construct(r,n||[],It(l).constructor):r.apply(l,n))}function am(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(am=function(){return!!l})()}function Zt(){return Zt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=It(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Zt.apply(this,arguments)}function It(l){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},It(l)}function _u(l,r){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},_u(l,r)}om.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 h1={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"},sm=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),d1(this,r,[e,h1])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_u(e,t)})(r,l),n=r,(c=[{key:"getOptInSwitch",value:function(e){var t=document.createElement("span");t.classList.add("form-group");var s=document.createElement("label");s.classList.add("form-switch","d-inline-block");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("json-editor-opt-in");var k=document.createElement("i");k.classList.add("form-icon");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",s.appendChild(T),s.appendChild(u),s.appendChild(k),t.appendChild(s),{label:s,checkbox:u,container:t}}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-".concat(t)),s&&e.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var e=document.createElement("div");return e.classList.add("container"),this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getGridRow",value:function(){var e=document.createElement("div");return e.classList.add("columns"),e}},{key:"getGridColumn",value:function(){var e=document.createElement("div");return e.classList.add("column"),this.options.align_bottom&&e.classList.add("je-align-bottom"),e}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("je-panel"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getTopIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("je-panel-top"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=Zt(It(r.prototype),"getButtonHolder",this).call(this);return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=Zt(It(r.prototype),"getFormButtonHolder",this).call(this);return t.classList.remove("btn-group"),t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"?t.classList.add("text-right"):t.classList.add("text-left"),t}},{key:"getFormButton",value:function(e,t,s){var u=Zt(It(r.prototype),"getFormButton",this).call(this,e,t,s);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(e,t,s){var u=Zt(It(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),u}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return typeof e=="string"?s.textContent=e:s.appendChild(e),s.style.display="inline-block",s}},{key:"getFormInputDescription",value:function(e){var t=Zt(It(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-desc","hide-sm"),t}},{key:"getFormInputLabel",value:function(e,t){var s=Zt(It(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold&&s.classList.add("je-label"),s}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(e,t){var s=Zt(It(r.prototype),"getCheckboxLabel",this).call(this,e,t),u=document.createElement("i");return u.classList.add("form-icon"),s.classList.add("form-checkbox","pr-0"),s.insertBefore(u,s.firstChild),s}},{key:"getFormCheckboxControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("form-inline"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){return Zt(It(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,s,u)}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in e)t.setAttribute(s,e[s]);return t}},{key:"getFormRadioLabel",value:function(e,t){var s=Zt(It(r.prototype),"getFormRadioLabel",this).call(this,e,t),u=document.createElement("i");return u.classList.add("form-icon"),s.classList.add("form-radio"),s.insertBefore(u,s.firstChild),s}},{key:"getFormRadioControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("form-inline"),e}},{key:"getFormInputField",value:function(e){var t=Zt(It(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("form-input"),t}},{key:"getRangeInput",value:function(e,t,s,u,k){var T=Zt(It(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k);return T.classList.add("slider"),T.classList.remove("form-input"),T.setAttribute("oninput",'this.setAttribute("value", this.value)'),T}},{key:"getRangeControl",value:function(e,t){var s=Zt(It(r.prototype),"getRangeControl",this).call(this,e,t);return s.classList.add("text-center"),s}},{key:"getSelectInput",value:function(e,t){var s=Zt(It(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-select"),s}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-input"),e}},{key:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");return T.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio"?(e&&(e.classList.add("form-label"),T.appendChild(e),u&&e.appendChild(u)),T.appendChild(t)):(T.classList.add(t.type),u&&e.appendChild(u),e.insertBefore(t,e.firstChild),T.appendChild(e)),this.options.input_size==="small"?t.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&t.classList.add("input-lg","select-lg"),t.type!=="checkbox"&&T.appendChild(t),s&&T.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),T}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);for(var u=0;u<t.length;u++)t[u].classList.add("input-group-btn"),t[u].classList.remove("btn-sm","mr-2","my-1"),s.appendChild(t[u]);return s}}},{key:"getInfoButton",value:function(e){var t=document.createElement("div");t.classList.add("popover","popover-left","float-right");var s=document.createElement("button");s.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),s.setAttribute("tabindex","-1"),t.appendChild(s);var u=document.createTextNode("I");s.appendChild(u);var k=document.createElement("div");k.classList.add("popover-container"),t.appendChild(k);var T=document.createElement("div");T.classList.add("card"),k.appendChild(T);var N=document.createElement("div");return N.classList.add("card-body"),N.innerHTML=e,T.appendChild(N),t}},{key:"getTable",value:function(){var e=Zt(It(r.prototype),"getTable",this).call(this);return e.classList.add("table","table-scroll"),this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getProgressBar",value:function(){var e=Zt(It(r.prototype),"getProgressBar",this).call(this);return e.classList.add("progress"),e}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.classList.add("columns"),s.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(t,'"></div>'),s}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(t,'"></div>'),s}},{key:"getTab",value:function(e,t){var s=document.createElement("a");return s.classList.add("btn","btn-secondary","btn-block"),s.setAttribute("href","#".concat(t)),s.appendChild(e),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.id=t,s.classList.add("tab-item");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),s.appendChild(u),s}},{key:"markTabActive",value:function(e){e.tab.classList.add("active"),e.rowPane!==void 0?e.rowPane.style.display="":e.container.style.display=""}},{key:"markTabInactive",value:function(e){e.tab.classList.remove("active"),e.rowPane!==void 0?e.rowPane.style.display="none":e.container.style.display="none"}},{key:"afterInputReady",value:function(e){if(e.localName==="select"){if(e.classList.contains("selectized")){var t=e.nextSibling;t&&(t.classList.remove("form-select"),Array.from(t.querySelectorAll(".form-select")).forEach((function(u){u.classList.remove("form-select")})))}else if(e.classList.contains("select2-hidden-accessible")){var s=e.nextSibling;s&&s.querySelector(".select2-selection--single")&&s.classList.add("form-select")}}e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("form-input-hint"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.classList.remove("d-hide"),e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.classList.add("d-hide"),e.controlgroup.classList.remove("has-error"))}}])&&c1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);function Uo(l){return Uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Uo(l)}function f1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,p1(c.key),c)}}function p1(l){var r=(function(n,c){if(Uo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Uo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Uo(r)=="symbol"?r:r+""}function m1(l,r,n){return r=Bt(r),(function(c,e){if(e&&(Uo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,lm()?Reflect.construct(r,n||[],Bt(l).constructor):r.apply(l,n))}function lm(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(lm=function(){return!!l})()}function er(){return er=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Bt(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},er.apply(this,arguments)}function Bt(l){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bt(l)}function wu(l,r){return wu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wu(l,r)}sm.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 y1={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},cm=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),m1(this,r,[e,y1])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wu(e,t)})(r,l),n=r,(c=[{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("label");s.classList.add("switch");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("json-editor-opt-in");var k=document.createElement("span");k.classList.add("switch-slider","round");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",s.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"getGridContainer",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-col","w-full"),this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getGridRow",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-wrap","w-full"),e}},{key:"getGridColumn",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-col"),e}},{key:"setGridColumnSize",value:function(e,t,s){t>0&&t<12?e.classList.add("w-".concat(t,"/12"),"px-1"):e.classList.add("w-full","px-1"),s&&(e.style.marginLeft="".concat(100/12*s,"%"))}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","p-1"):e.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&&e.classList.add("je-border"),e}},{key:"getTopIndentedPanel",value:function(){var e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","m-2"):e.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&&e.classList.add("je-border"),e}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(e,t){var s=er(Bt(r.prototype),"getSelectInput",this).call(this,e);return t?s.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"):s.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&&s.classList.add("compact"),s}},{key:"afterInputReady",value:function(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var e=er(Bt(r.prototype),"getTextareaInput",this).call(this);return e.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e.style.height=0,e}},{key:"getRangeInput",value:function(e,t,s){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",e),u.setAttribute("max",t),u.setAttribute("step",s),u}},{key:"getRangeControl",value:function(e,t){var s=er(Bt(r.prototype),"getRangeControl",this).call(this,e,t);return s.classList.add("text-center","text-black"),s}},{key:"getCheckbox",value:function(){var e=this.getFormInputField("checkbox");return e.classList.add("form-checkbox","text-red-600"),e}},{key:"getCheckboxLabel",value:function(e,t){var s=er(Bt(r.prototype),"getCheckboxLabel",this).call(this,e,t);return s.classList.add("inline-flex","items-center"),s}},{key:"getFormCheckboxControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("inline-flex flex-row"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){var k=er(Bt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,s,u);return k.classList.add("inline-flex","flex-col"),k}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in t.classList.add("form-radio","text-red-600"),e)t.setAttribute(s,e[s]);return t}},{key:"getFormRadioLabel",value:function(e,t){var s=er(Bt(r.prototype),"getFormRadioLabel",this).call(this,e,t);return s.classList.add("inline-flex","items-center","mr-2"),s}},{key:"getFormRadioControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("form-radio"),e}},{key:"getRadioHolder",value:function(e,t,s,u,k){var T=er(Bt(r.prototype),"getRadioHolder",this).call(this,t,s,u,k);return e.options.layout==="h"?T.classList.add("inline-flex","flex-row"):T.classList.add("inline-flex","flex-col"),T}},{key:"getFormInputLabel",value:function(e,t){var s=er(Bt(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold?s.classList.add("font-bold"):s.classList.add("required"),s}},{key:"getFormInputField",value:function(e){var t=er(Bt(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("p");return t.classList.add("block","mt-1","text-xs"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getFormControl",value:function(e,t,s,u){var k=document.createElement("div");return k.classList.add("form-group","mb-1","w-full"),e&&(e.classList.add("text-xs"),t.type==="checkbox"&&(t.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormCheckboxControl(e,t,!1,u)),t.type==="radio"&&(t.classList.add("form-radio","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormRadioControl(e,t,!1,u)),k.appendChild(e),!["checkbox","radio"].includes(t.type)&&u&&k.appendChild(u)),["checkbox","radio"].includes(t.type)||(this.options.input_size==="small"?t.classList.add("text-xs"):this.options.input_size==="normal"?t.classList.add("text-base"):this.options.input_size==="large"&&t.classList.add("text-xl"),k.appendChild(t)),s&&k.appendChild(s),k}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.classList.add("text-sm"),e}},{key:"getButtonHolder",value:function(){var e=document.createElement("div");return e.classList.add("flex","relative","inline-flex","align-middle"),e}},{key:"getButton",value:function(e,t,s){var u=er(Bt(r.prototype),"getButton",this).call(this,e,t,s);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(e){var t=document.createElement("a");t.classList.add("tooltips","float-right"),t.innerHTML="ⓘ";var s=document.createElement("span");return s.innerHTML=e,t.appendChild(s),t}},{key:"getTable",value:function(){var e=er(Bt(r.prototype),"getTable",this).call(this);return this.options.table_border?e.classList.add("je-table-border"):e.classList.add("table","border","p-0"),e}},{key:"getTableRow",value:function(){var e=er(Bt(r.prototype),"getTableRow",this).call(this);return this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("je-table-zebra"),e}},{key:"getTableHeaderCell",value:function(e){var t=er(Bt(r.prototype),"getTableHeaderCell",this).call(this,e);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("text-xs","border","p-0","m-0"),t}},{key:"getTableCell",value:function(){var e=er(Bt(r.prototype),"getTableCell",this).call(this);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("border-0","p-0","m-0"),e}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.controlgroup.classList.add("text-red-600"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("block","mt-1","text-xs","text-red"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=t)}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("text-red-600"),e.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),s=e===void 0?"":e;return t.innerHTML="<div class='w-2/12' id='".concat(s,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(s,"'></div>"),t.classList.add("flex"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(t,"'></ul><div class='p-6 block' id='").concat(t,"'></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.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(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.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(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("block"),e.tab.firstChild.classList.contains("border-b")===!0?(e.tab.firstChild.classList.add("border-b-0"),e.tab.firstChild.classList.remove("border-b")):e.tab.firstChild.classList.add("border-b-0"),e.container.classList.contains("hidden")===!0&&e.container.classList.remove("hidden"),e.container.classList.add("block")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.contains("border-b-0")===!0?(e.tab.firstChild.classList.add("border-b"),e.tab.firstChild.classList.remove("border-b-0")):e.tab.firstChild.classList.add("border-b"),e.container.classList.contains("block")===!0&&(e.container.classList.remove("block"),e.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),t.removeAttribute("aria-valuenow"),t.classList.add("w-full"),t.innerHTML=""}}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("relative","items-stretch","w-full"),s.appendChild(e);var u=document.createElement("div");u.classList.add("-mr-1"),s.appendChild(u);for(var k=0;k<t.length;k++)u.appendChild(t[k]);return s}}}])&&f1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(On);cm.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",".switch":"position:relative;display:inline-block;width:28px;height:16px;margin-right:10px",".switch input":"opacity:0;width:0;height:0",".switch-slider":"position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:%23ccc;transition:.1s;border-radius:34px",".switch-slider:before":"position:absolute;content:%22%22;height:12px;width:12px;left:1px;top:2px;background-color:white;transition:.1s;border-radius:50%25","input:checked + .switch-slider":"background-color:%232196F3","input:focus + .switch-slider":"box-shadow:0%200%201px%20%232196F3","input:checked + .switch-slider:before":"transform:translateX(12px)","input:disabled + .switch-slider":"opacity:0.5"};var v1={html:Wp,bootstrap3:Yp,bootstrap4:Xp,bootstrap5:tm,jqueryui:nm,barebones:om,spectre:sm,tailwind:cm};const b1={".table-responsive .autocomplete-result-list":"position:relative%20!important",".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 Vi(l){return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vi(l)}function ku(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function ju(){ju=function(){return r};var l,r={},n=Object.prototype,c=n.hasOwnProperty,e=Object.defineProperty||function(Z,K,oe){Z[K]=oe.value},t=typeof Symbol=="function"?Symbol:{},s=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",k=t.toStringTag||"@@toStringTag";function T(Z,K,oe){return Object.defineProperty(Z,K,{value:oe,enumerable:!0,configurable:!0,writable:!0}),Z[K]}try{T({},"")}catch{T=function(K,oe,ke){return K[oe]=ke}}function N(Z,K,oe,ke){var fe=K&&K.prototype instanceof xe?K:xe,Te=Object.create(fe.prototype),Xe=new sn(ke||[]);return e(Te,"_invoke",{value:ar(Z,oe,Xe)}),Te}function B(Z,K,oe){try{return{type:"normal",arg:Z.call(K,oe)}}catch(ke){return{type:"throw",arg:ke}}}r.wrap=N;var q="suspendedStart",Q="suspendedYield",X="executing",le="completed",ye={};function xe(){}function Pe(){}function Be(){}var Ke={};T(Ke,s,(function(){return this}));var tt=Object.getPrototypeOf,we=tt&&tt(tt(sr([])));we&&we!==n&&c.call(we,s)&&(Ke=we);var Ce=Be.prototype=xe.prototype=Object.create(Ke);function at(Z){["next","throw","return"].forEach((function(K){T(Z,K,(function(oe){return this._invoke(K,oe)}))}))}function vt(Z,K){function oe(fe,Te,Xe,bt){var gt=B(Z[fe],Z,Te);if(gt.type!=="throw"){var gr=gt.arg,Hr=gr.value;return Hr&&Vi(Hr)=="object"&&c.call(Hr,"__await")?K.resolve(Hr.__await).then((function(lr){oe("next",lr,Xe,bt)}),(function(lr){oe("throw",lr,Xe,bt)})):K.resolve(Hr).then((function(lr){gr.value=lr,Xe(gr)}),(function(lr){return oe("throw",lr,Xe,bt)}))}bt(gt.arg)}var ke;e(this,"_invoke",{value:function(fe,Te){function Xe(){return new K((function(bt,gt){oe(fe,Te,bt,gt)}))}return ke=ke?ke.then(Xe,Xe):Xe()}})}function ar(Z,K,oe){var ke=q;return function(fe,Te){if(ke===X)throw Error("Generator is already running");if(ke===le){if(fe==="throw")throw Te;return{value:l,done:!0}}for(oe.method=fe,oe.arg=Te;;){var Xe=oe.delegate;if(Xe){var bt=ni(Xe,oe);if(bt){if(bt===ye)continue;return bt}}if(oe.method==="next")oe.sent=oe._sent=oe.arg;else if(oe.method==="throw"){if(ke===q)throw ke=le,oe.arg;oe.dispatchException(oe.arg)}else oe.method==="return"&&oe.abrupt("return",oe.arg);ke=X;var gt=B(Z,K,oe);if(gt.type==="normal"){if(ke=oe.done?le:Q,gt.arg===ye)continue;return{value:gt.arg,done:oe.done}}gt.type==="throw"&&(ke=le,oe.method="throw",oe.arg=gt.arg)}}}function ni(Z,K){var oe=K.method,ke=Z.iterator[oe];if(ke===l)return K.delegate=null,oe==="throw"&&Z.iterator.return&&(K.method="return",K.arg=l,ni(Z,K),K.method==="throw")||oe!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+oe+"' method")),ye;var fe=B(ke,Z.iterator,K.arg);if(fe.type==="throw")return K.method="throw",K.arg=fe.arg,K.delegate=null,ye;var Te=fe.arg;return Te?Te.done?(K[Z.resultName]=Te.value,K.next=Z.nextLoc,K.method!=="return"&&(K.method="next",K.arg=l),K.delegate=null,ye):Te:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,ye)}function Go(Z){var K={tryLoc:Z[0]};1 in Z&&(K.catchLoc=Z[1]),2 in Z&&(K.finallyLoc=Z[2],K.afterLoc=Z[3]),this.tryEntries.push(K)}function Ne(Z){var K=Z.completion||{};K.type="normal",delete K.arg,Z.completion=K}function sn(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(Go,this),this.reset(!0)}function sr(Z){if(Z||Z===""){var K=Z[s];if(K)return K.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var oe=-1,ke=function fe(){for(;++oe<Z.length;)if(c.call(Z,oe))return fe.value=Z[oe],fe.done=!1,fe;return fe.value=l,fe.done=!0,fe};return ke.next=ke}}throw new TypeError(Vi(Z)+" is not iterable")}return Pe.prototype=Be,e(Ce,"constructor",{value:Be,configurable:!0}),e(Be,"constructor",{value:Pe,configurable:!0}),Pe.displayName=T(Be,k,"GeneratorFunction"),r.isGeneratorFunction=function(Z){var K=typeof Z=="function"&&Z.constructor;return!!K&&(K===Pe||(K.displayName||K.name)==="GeneratorFunction")},r.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,Be):(Z.__proto__=Be,T(Z,k,"GeneratorFunction")),Z.prototype=Object.create(Ce),Z},r.awrap=function(Z){return{__await:Z}},at(vt.prototype),T(vt.prototype,u,(function(){return this})),r.AsyncIterator=vt,r.async=function(Z,K,oe,ke,fe){fe===void 0&&(fe=Promise);var Te=new vt(N(Z,K,oe,ke),fe);return r.isGeneratorFunction(K)?Te:Te.next().then((function(Xe){return Xe.done?Xe.value:Te.next()}))},at(Ce),T(Ce,k,"Generator"),T(Ce,s,(function(){return this})),T(Ce,"toString",(function(){return"[object Generator]"})),r.keys=function(Z){var K=Object(Z),oe=[];for(var ke in K)oe.push(ke);return oe.reverse(),function fe(){for(;oe.length;){var Te=oe.pop();if(Te in K)return fe.value=Te,fe.done=!1,fe}return fe.done=!0,fe}},r.values=sr,sn.prototype={constructor:sn,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(Ne),!Z)for(var K in this)K.charAt(0)==="t"&&c.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=l)},stop:function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval},dispatchException:function(Z){if(this.done)throw Z;var K=this;function oe(gt,gr){return Te.type="throw",Te.arg=Z,K.next=gt,gr&&(K.method="next",K.arg=l),!!gr}for(var ke=this.tryEntries.length-1;ke>=0;--ke){var fe=this.tryEntries[ke],Te=fe.completion;if(fe.tryLoc==="root")return oe("end");if(fe.tryLoc<=this.prev){var Xe=c.call(fe,"catchLoc"),bt=c.call(fe,"finallyLoc");if(Xe&&bt){if(this.prev<fe.catchLoc)return oe(fe.catchLoc,!0);if(this.prev<fe.finallyLoc)return oe(fe.finallyLoc)}else if(Xe){if(this.prev<fe.catchLoc)return oe(fe.catchLoc,!0)}else{if(!bt)throw Error("try statement without catch or finally");if(this.prev<fe.finallyLoc)return oe(fe.finallyLoc)}}}},abrupt:function(Z,K){for(var oe=this.tryEntries.length-1;oe>=0;--oe){var ke=this.tryEntries[oe];if(ke.tryLoc<=this.prev&&c.call(ke,"finallyLoc")&&this.prev<ke.finallyLoc){var fe=ke;break}}fe&&(Z==="break"||Z==="continue")&&fe.tryLoc<=K&&K<=fe.finallyLoc&&(fe=null);var Te=fe?fe.completion:{};return Te.type=Z,Te.arg=K,fe?(this.method="next",this.next=fe.finallyLoc,ye):this.complete(Te)},complete:function(Z,K){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&K&&(this.next=K),ye},finish:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var oe=this.tryEntries[K];if(oe.finallyLoc===Z)return this.complete(oe.completion,oe.afterLoc),Ne(oe),ye}},catch:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var oe=this.tryEntries[K];if(oe.tryLoc===Z){var ke=oe.completion;if(ke.type==="throw"){var fe=ke.arg;Ne(oe)}return fe}}throw Error("illegal catch attempt")},delegateYield:function(Z,K,oe){return this.delegate={iterator:sr(Z),resultName:K,nextLoc:oe},this.method==="next"&&(this.arg=l),ye}},r}function um(l,r,n,c,e,t,s){try{var u=l[t](s),k=u.value}catch(T){return void n(T)}u.done?r(k):Promise.resolve(k).then(c,e)}function g1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,_1(c.key),c)}}function _1(l){var r=(function(n,c){if(Vi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Vi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Vi(r)=="symbol"?r:r+""}var Sn=(function(){function l(t){var s=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((function(X,le){if(!(X instanceof le))throw new TypeError("Cannot call a class as a function")})(this,l),!(t instanceof Element))throw new Error("element should be an instance of Element");this.element=t,this.options=b({},l.defaults.options,u),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||l.defaults.translate,this.translateProperty=this.options.translateProperty||l.defaults.translateProperty,this.uuid=0,this.__data={};var k=this.options.theme||l.defaults.theme,T=l.defaults.themes[k];if(!T)throw new Error("Unknown theme ".concat(k));this.element.setAttribute("data-theme",k),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new T(this);var N=b(b1,this.getEditorsRules()),B=function(X,le,ye){return ye?s.addNewStyleRulesToShadowRoot(X,le,ye):s.addNewStyleRules(X,le)};if(!this.theme.options.disable_theme_rules){var q=E(this.element);B("default",N,q),T.rules!==void 0&&B(k,T.rules,q)}var Q=l.defaults.iconlibs[this.options.iconlib||l.defaults.iconlib];Q&&(this.iconlib=new Q),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}return r=l,n=[{key:"load",value:(c=ju().mark((function t(){var s,u,k,T,N,B,q=this;return ju().wrap((function(Q){for(;;)switch(Q.prev=Q.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(u=new hw(this.options)).onSchemaLoaded=function(X){q.trigger("schemaLoaded",X)},u.onAllSchemasLoaded=function(){q.trigger("allSchemasLoaded")},this.expandSchema=function(X){return u.expandSchema(X)},this.expandRefs=function(X,le){return u.expandRefs(X,le)},k=document.location.toString(),Q.next=9,u.load(this.schema,s,k);case 9:T=Q.sent,N=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new fp(this,null,N,l.defaults),B=this.getEditorClass(T),this.root=this.createEditor(B,{jsoneditor:this,schema:T,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),O(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(){q.ready&&(q.validation_results=q.validator.validate(q.root.getValue()),q.root.showValidationErrors(q.validation_results),q.trigger("ready"),q.trigger("change"))}));case 24:case"end":return Q.stop()}}),t,this)})),e=function(){var t=this,s=arguments;return new Promise((function(u,k){var T=c.apply(t,s);function N(q){um(T,u,k,N,B,"next",q)}function B(q){um(T,u,k,N,B,"throw",q)}N(void 0)}))},function(){return e.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(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}},{key:"validate",value:function(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}},{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(t,s){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(s),this}},{key:"off",value:function(t,s){if(t&&s){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var u=[],k=0;k<this.callbacks[t].length;k++)this.callbacks[t][k]!==s&&u.push(this.callbacks[t][k]);this.callbacks[t]=u}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,s){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var u=0;u<this.callbacks[t].length;u++)this.callbacks[t][u].apply(this,[s]);return this}},{key:"setOption",value:function(t,s){if(t!=="show_errors")throw new Error("Option ".concat(t," must be set during instantiation and cannot be changed later"));return this.options.show_errors=s,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(l.defaults.editors).reduce((function(t,s){return s.rules?b(t,s.rules):t}),{})}},{key:"getEditorClass",value:function(t){var s,u=this;if(t=this.expandSchema(t),l.defaults.resolvers.find((function(k){return(s=k(t,u))&&l.defaults.editors[s]})),!s)throw new Error("Unknown editor for schema ".concat(JSON.stringify(t)));if(!l.defaults.editors[s])throw new Error("Unknown editor ".concat(s));return l.defaults.editors[s]}},{key:"createEditor",value:function(t,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new t(s=b({},t.options||{},s),l.defaults,u)}},{key:"onChange",value:function(t){var s=this;if(this.ready&&(t&&this.trigger(t.event,t.data),!this.firing_change))return this.firing_change=!0,window.requestAnimationFrame((function(){s.firing_change=!1,s.ready&&(s.validation_results=s.validator.validate(s.root.getValue()),s.options.show_errors!=="never"?s.root.showValidationErrors(s.validation_results):s.root.showValidationErrors([]),s.trigger("change"))})),this}},{key:"compileTemplate",value:function(t){var s,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.defaults.template;if(typeof u=="string"){if(!l.defaults.templates[u])throw new Error("Unknown template engine ".concat(u));if(!(s=l.defaults.templates[u]()))throw new Error("Template engine ".concat(u," missing required library."))}else s=u;if(!s)throw new Error("No template engine set");if(!s.compile)throw new Error("Invalid template engine set");return s.compile(t)}},{key:"_data",value:function(t,s,u){if(arguments.length!==3)return t.hasAttribute("data-jsoneditor-".concat(s))?this.__data[t.getAttribute("data-jsoneditor-".concat(s))]:null;var k;t.hasAttribute("data-jsoneditor-".concat(s))?k=t.getAttribute("data-jsoneditor-".concat(s)):(k=this.uuid++,t.setAttribute("data-jsoneditor-".concat(s),k)),this.__data[k]=u}},{key:"registerEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=t,this}},{key:"unregisterEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=null,this}},{key:"getEditor",value:function(t){if(this.editors)return this.editors[t]}},{key:"watch",value:function(t,s){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(s),this}},{key:"unwatch",value:function(t,s){if(!this.watchlist||!this.watchlist[t])return this;if(!s)return this.watchlist[t]=null,this;for(var u=[],k=0;k<this.watchlist[t].length;k++)this.watchlist[t][k]!==s&&u.push(this.watchlist[t][k]);return this.watchlist[t]=u.length?u:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var s=0;s<this.watchlist[t].length;s++)this.watchlist[t][s]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(t){this.copyClipboard=t}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(t,s){var u=document.querySelector("#theme-".concat(t));u||((u=document.createElement("style")).setAttribute("id","theme-".concat(t)),u.appendChild(document.createTextNode("")),document.head.appendChild(u));for(var k=u.sheet?u.sheet:u.styleSheet,T=this.element.nodeName.toLowerCase();k.cssRules.length>0;)k.deleteRule(0);Object.keys(s).forEach((function(N){var B=t==="default"?N:"".concat(T,'[data-theme="').concat(t,'"] ').concat(N);k.insertRule?k.insertRule(B+" {"+decodeURIComponent(s[N])+"}",0):k.addRule&&k.addRule(B,decodeURIComponent(s[N]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,s,u){var k=this.element.nodeName.toLowerCase(),T="";Object.keys(s).forEach((function(q){var Q=t==="default"?q:"".concat(k,'[data-theme="').concat(t,'"] ').concat(q);T+=Q+" {"+decodeURIComponent(s[q])+`}
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Bp(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function Ht(l){return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ht(l)}function uw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,dw(c.key),c)}}function dw(l){var r=(function(n,c){if(Ht(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ht(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ht(r)=="symbol"?r:r+""}y(1688);var hw=(function(){return l=function e(t){(function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),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:function(s){Ht(s.type)==="object"&&(s.type=this._expandSubSchema(s.type))},disallow:function(s){Ht(s.disallow)==="object"&&(s.disallow=this._expandSubSchema(s.disallow))},anyOf:function(s){var u=this;Object.entries(s.anyOf).forEach((function(k){var T=Ii(k,2),N=T[0],B=T[1];s.anyOf[N]=u.expandSchema(B)}))},dependencies:function(s){var u=this;Object.entries(s.dependencies).forEach((function(k){var T=Ii(k,2),N=T[0],B=T[1];Ht(B)!=="object"||Array.isArray(B)||(s.dependencies[N]=u.expandSchema(B))}))},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,u){var k=this,T=b({},u);return Object.entries(s.allOf).forEach((function(N){var B=Ii(N,2),q=B[0],Q=B[1];s.allOf[q]=k.expandRefs(Q,!0),T=k.extendSchemas(T,k.expandSchema(Q))})),delete T.allOf,T},extends:function(s,u){var k,T=this;return delete(k=Array.isArray(s.extends)?s.extends.reduce((function(N,B,q){return T.extendSchemas(N,T.expandSchema(B))}),u):this.extendSchemas(u,this.expandSchema(s.extends))).extends,k},oneOf:function(s,u){var k=this,T=b({},u);return delete T.oneOf,s.oneOf.reduce((function(N,B,q){return N.oneOf[q]=k.extendSchemas(k.expandSchema(B),T),N}),u),u}}},r=[{key:"load",value:(c=Dp(Ni().mark((function e(t,s,u){return Ni().wrap((function(k){for(;;)switch(k.prev=k.next){case 0:return this.schema=t,k.next=3,this._asyncloadExternalRefs(t,s,this._getFileBase(u),!0);case 3:return k.abrupt("return",this.expandRefs(t));case 4:case"end":return k.stop()}}),e,this)}))),function(e,t,s){return c.apply(this,arguments)})},{key:"expandRefs",value:function(e,t){var s=this,u=b({},e);if(!u.$ref)return u;var k=u.$ref.split("#");if(k.length===2&&!this.refs_with_info[u.$ref]){var T=this.expandRecursivePointer(this.schema,k[1]),N=this.extendSchemas(u,this.expandSchema(T));return delete N.$ref,N}var B=k.length>2?this.refs_with_info["#"+k[1]]:this.refs_with_info[u.$ref];delete u.$ref;var q=B.$ref.startsWith("#")?B.fetchUrl:"",Q=this._getRef(q,B);if(this.refs[Q]){if(t&&O(this.refs[Q],"allOf")){var X=this.refs[Q].allOf;Object.keys(X).forEach((function(le){X[le]=s.expandRefs(X[le],!0)}))}}else console.warn("reference:'".concat(Q,"' not found!"));return k.length>2?this.extendSchemas(u,this.expandSchema(this.expandRecursivePointer(this.refs[Q],k[2]))):this.extendSchemas(u,this.expandSchema(this.refs[Q]))}},{key:"expandRecursivePointer",value:function(e,t){var s=e;return t.split("/").slice(1).forEach((function(u){s[u]&&(s=s[u])})),s.$refs&&s.$refs.startsWith("#")?this.expandRecursivePointer(e,s.$refs):s}},{key:"expandSchema",value:function(e){var t=this;Object.entries(this._subSchema1).forEach((function(u){var k=Ii(u,2),T=k[0],N=k[1];e[T]&&N.call(t,e)}));var s=b({},e);return Object.entries(this._subSchema2).forEach((function(u){var k=Ii(u,2),T=k[0],N=k[1];e[T]&&(s=N.call(t,e,s))})),this.expandRefs(s)}},{key:"_getRef",value:function(e,t){var s=e+t;return this.refs[s]?s:e+decodeURIComponent(t.$ref)}},{key:"_expandSubSchema",value:function(e){var t=this;return Array.isArray(e)?e.map((function(s){return Ht(s)==="object"?t.expandSchema(s):s})):this.expandSchema(e)}},{key:"_manageRecursivePointer",value:function(e,t){Object.keys(e).forEach((function(s){e[s]!==null&&e[s].$ref&&e[s].$ref.indexOf("#")===0&&(e[s].$ref=t+e[s].$ref)}))}},{key:"_getExternalRefs",value:function(e,t){var s=this,u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u||this._manageRecursivePointer(e,t);var k={},T=function(X){return Object.keys(X).forEach((function(le){k[le]=!0}))};if(e.$ref&&Ht(e.$ref)!=="object"&&(e.$ref.indexOf("#")!==0||!u)){var N=e.$ref,B="";N.indexOf("#")>0&&(N=N.substr(0,N.indexOf("#"))),N!==e.$ref&&(B=e.$ref.substr(e.$ref.indexOf("#")));var q=this.refs_prefix+this.refs_counter++,Q=q+B;e.$ref.substr(0,1)==="#"||this.refs[e.$ref]||(k[N]=!0),this.refs_with_info[q]={fetchUrl:t,$ref:N},e.$ref=Q}return Object.values(e).forEach((function(X){X&&Ht(X)==="object"&&(Array.isArray(X)?Object.values(X).forEach((function(le){le&&Ht(le)==="object"&&T(s._getExternalRefs(le,t,u))})):X.$ref&&typeof X.$ref=="string"&&X.$ref.startsWith("#")||T(s._getExternalRefs(X,t,u)))})),e.id&&typeof e.id=="string"&&e.id.substr(0,4)==="urn:"?this.refs[e.id]=e:e.$id&&typeof e.$id=="string"&&e.$id.substr(0,4)==="urn:"&&(this.refs[e.$id]=e),k}},{key:"_getFileBase",value:function(e){if(!e)return"/";var t=this.options.ajaxBase;return t===void 0?this._getFileBaseFromFileLocation(e):t}},{key:"_getFileBaseFromFileLocation",value:function(e){var t=e.split("/");return t.pop(),"".concat(t.join("/"),"/")}},{key:"_joinUrl",value:function(e,t){var s=e;return e.substr(0,7)!=="http://"&&e.substr(0,8)!=="https://"&&e.substr(0,5)!=="blob:"&&e.substr(0,5)!=="data:"&&e.substr(0,1)!=="#"&&e.substr(0,1)!=="/"&&(s=t+e),s.indexOf("#")>0&&(s=s.substr(0,s.indexOf("#"))),s}},{key:"_isUniformResourceName",value:function(e){return e.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(n=Dp(Ni().mark((function e(t,s,u){var k,T,N,B,q,Q,X=this,le=arguments;return Ni().wrap((function(ye){for(;;)switch(ye.prev=ye.next){case 0:k=le.length>3&&le[3]!==void 0&&le[3],T=this._getExternalRefs(t,s,k),N=0,B=Ni().mark((function xe(){var Pe,Be,Ke,tt,we,Ce,at,vt,ar,ni,Go;return Ni().wrap((function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if((Pe=Q[q])!==void 0){Ne.next=3;break}return Ne.abrupt("return",0);case 3:if(!X.refs[Pe]){Ne.next=5;break}return Ne.abrupt("return",0);case 5:if(!X._isUniformResourceName(Pe)){Ne.next=40;break}if(X.refs[Pe]="loading",N++,Be=X.options.urn_resolver,Ke=Pe,typeof Be=="function"){Ne.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Ke,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Ke));case 13:return Ke.indexOf("#")>0&&(Ke=Ke.substr(0,Ke.indexOf("#"))),Ne.prev=14,Ne.next=17,Be(Ke);case 17:tt=Ne.sent,Ne.prev=18,we=JSON.parse(tt),Ne.next=26;break;case 22:throw Ne.prev=22,Ne.t0=Ne.catch(18),console.log(Ne.t0),new Error("Failed to parse external ref ".concat(Ke));case 26:if(!(typeof we!="boolean"&&Ht(we)!=="object"||we===null||Array.isArray(we))){Ne.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Ke));case 28:return X.refs[Pe]=we,Ne.next=31,X._asyncloadExternalRefs(we,Pe,u);case 31:Ne.next=37;break;case 33:throw Ne.prev=33,Ne.t1=Ne.catch(14),console.log(Ne.t1),new Error("Failed to parse external ref ".concat(Ke));case 37:if(typeof tt!="boolean"){Ne.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Ke));case 39:return Ne.abrupt("return",0);case 40:if(X.options.ajax){Ne.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(Pe));case 42:if(N++,Ce=X._joinUrl(Pe,u),X.options.ajax_cache_responses&&(vt=X.cacheGet(Ce))&&(at=vt),at){Ne.next=61;break}return Ne.next=48,new Promise((function(sn){var sr=new XMLHttpRequest;X.options.ajaxCredentials&&(sr.withCredentials=X.options.ajaxCredentials),sr.overrideMimeType("application/json"),sr.open("GET",Ce,!0),sr.onload=function(){sn(sr)},sr.onerror=function(Z){sn(void 0)},sr.send()}));case 48:if((ar=Ne.sent)!==void 0){Ne.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(Pe));case 51:Ne.prev=51,at=JSON.parse(ar.responseText),X.onSchemaLoaded({schema:at,schemaUrl:Ce}),X.options.ajax_cache_responses&&X.cacheSet(Ce,at),Ne.next=61;break;case 57:throw Ne.prev=57,Ne.t2=Ne.catch(51),console.log(Ne.t2),new Error("Failed to parse external ref ".concat(Ce));case 61:if(!(typeof at!="boolean"&&Ht(at)!=="object"||at===null||Array.isArray(at))){Ne.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Ce));case 63:return X.refs[Pe]=at,ni=X._getFileBaseFromFileLocation(Ce),Ce!==Pe&&(Go=Ce.split("/"),Ce=(Pe.substr(0,1)==="/"?"/":"")+Go.pop()),Ne.next=68,X._asyncloadExternalRefs(at,Ce,ni);case 68:case"end":return Ne.stop()}}),xe,null,[[14,33],[18,22],[51,57]])})),q=0,Q=Object.keys(T);case 5:if(!(q<Q.length)){ye.next=13;break}return ye.delegateYield(B(),"t0",7);case 7:if(ye.t0!==0){ye.next=10;break}return ye.abrupt("continue",10);case 10:q++,ye.next=5;break;case 13:if(N){ye.next=15;break}return ye.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ye.stop()}}),e,this)}))),function(e,t,s){return n.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(e){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(e,t){var s=this;e=b({},e),t=b({},t);var u={},k=function(T){typeof T=="string"&&(T=[T]),typeof t.type=="string"&&(t.type=[t.type]),t.type&&t.type.length?u.type=T.filter((function(N){return t.type.includes(N)})):u.type=T,u.type.length===1&&typeof u.type[0]=="string"?u.type=u.type[0]:u.type.length===0&&delete u.type};return Object.entries(e).forEach((function(T){var N=Ii(T,2),B=N[0],q=N[1];t[B]!==void 0?(function(Q,X){(function(le,ye){return(le==="required"||le==="defaultProperties")&&Ht(ye)==="object"&&Array.isArray(ye)})(Q,X)?u[Q]=X.concat(t[Q]).reduce((function(le,ye){return le.includes(ye)||le.push(ye),le}),[]):Q!=="type"||typeof X!="string"&&!Array.isArray(X)?Ht(X)!=="object"||Array.isArray(X)||X===null?u[Q]=X:u[Q]=s.extendSchemas(X,t[Q]):k(X)})(B,q):u[B]=q})),Object.entries(t).forEach((function(T){var N=Ii(T,2),B=N[0],q=N[1];e[B]===void 0&&(u[B]=q)})),u}},{key:"getCacheKey",value:function(e){return["je-cache",e].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(e,t){try{window.localStorage.setItem(this.getCacheKey(e),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:t}))}catch(s){console.error(s)}}},{key:"cacheGet",value:function(e){try{var t=window.localStorage.getItem(this.getCacheKey(e));if(t){var s=JSON.parse(t);if(s.cacheBuster&&s.schema&&s.cacheBuster===this.getCacheBuster())return s.schema;this.cacheDelete(e)}}catch(u){console.error(u)}}},{key:"cacheDelete",value:function(e){window.localStorage.removeItem(this.getCacheKey(e))}}],r&&uw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r,n,c})(),fw=(y(2762),{default:function(){return{compile:function(l){var r=l.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),n=r&&r.length;if(!n)return function(){return l};for(var c=[],e=function(s){var u,k,T=r[s].replace(/[{}]+/g,"").trim().split("."),N=T.length;N>1?u=function(B){for(k=B,s=0;s<N&&(k=k[T[s]]);s++);return k}:(T=T[0],u=function(B){return B[T]}),c.push({s:r[s],r:u})},t=0;t<n;t++)e(t);return function(s){for(var u,k="".concat(l),T=0;T<n;T++)u=c[T],k=k.replace(u.s,u.r(s));return k}}}},ejs:function(){return!!window.EJS&&{compile:function(l){var r=new window.EJS({text:l});return function(n){return r.render(n)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(l){var r=window.Hogan.compile(l);return function(n){return r.render(n)}}}},lodash:function(){return!!window._&&{compile:function(l){return function(r){return window._.template(l)(r)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(l){return function(r){return window.Mark.up(l,r)}}}},mustache:function(){return!!window.Mustache&&{compile:function(l){return function(r){return window.Mustache.render(l,r)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(l){return function(r){return window._.template(l)(r)}}}}});function Pa(l){return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pa(l)}function Yc(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function pw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,mw(c.key),c)}}function mw(l){var r=(function(n,c){if(Pa(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Pa(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Pa(r)=="symbol"?r:r+""}var yw={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},On=(function(){return l=function n(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yw;(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,n),this.mapping=e,this.icon_prefix=c},(r=[{key:"getIconClass",value:function(n){return this.mapping[n]?this.icon_prefix+this.mapping[n]:this.icon_prefix+n}},{key:"getIcon",value:function(n){var c,e=this.getIconClass(n);if(!e)return null;var t,s=document.createElement("i");return(c=s.classList).add.apply(c,(function(u){if(Array.isArray(u))return Yc(u)})(t=e.split(" "))||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(t)||(function(u,k){if(u){if(typeof u=="string")return Yc(u,k);var T=Object.prototype.toString.call(u).slice(8,-1);return T==="Object"&&u.constructor&&(T=u.constructor.name),T==="Map"||T==="Set"?Array.from(u):T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?Yc(u,k):void 0}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
38
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),s}}])&&pw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Qc(l){return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qc(l)}function vw(l,r,n){return r=ol(r),(function(c,e){if(e&&(Qc(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Fp()?Reflect.construct(r,n||[],ol(l).constructor):r.apply(l,n))}function Fp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fp=function(){return!!l})()}function ol(l){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ol(l)}function Xc(l,r){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Xc(l,r)}var bw={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"},gw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),vw(this,r,["glyphicon glyphicon-",bw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&Xc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function eu(l){return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},eu(l)}function _w(l,r,n){return r=al(r),(function(c,e){if(e&&(eu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Mp()?Reflect.construct(r,n||[],al(l).constructor):r.apply(l,n))}function Mp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Mp=function(){return!!l})()}function al(l){return al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},al(l)}function tu(l,r){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},tu(l,r)}var ww={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"},kw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),_w(this,r,["icon-",ww])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&tu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function ru(l){return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ru(l)}function jw(l,r,n){return r=sl(r),(function(c,e){if(e&&(ru(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Vp()?Reflect.construct(r,n||[],sl(l).constructor):r.apply(l,n))}function Vp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Vp=function(){return!!l})()}function sl(l){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(l)}function nu(l,r){return nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},nu(l,r)}var Ew={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"},Ow=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),jw(this,r,["fa fa-",Ew])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&nu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function iu(l){return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},iu(l)}function xw(l,r,n){return r=ll(r),(function(c,e){if(e&&(iu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,zp()?Reflect.construct(r,n||[],ll(l).constructor):r.apply(l,n))}function zp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(zp=function(){return!!l})()}function ll(l){return ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(l)}function ou(l,r){return ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ou(l,r)}var Sw={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"},Cw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),xw(this,r,["fas fa-",Sw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&ou(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function au(l){return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},au(l)}function Pw(l,r,n){return r=cl(r),(function(c,e){if(e&&(au(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,qp()?Reflect.construct(r,n||[],cl(l).constructor):r.apply(l,n))}function qp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(qp=function(){return!!l})()}function cl(l){return cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(l)}function su(l,r){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},su(l,r)}var Tw={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"},Rw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Pw(this,r,["ui-icon ui-icon-",Tw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&su(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function lu(l){return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lu(l)}function Lw(l,r,n){return r=ul(r),(function(c,e){if(e&&(lu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Hp()?Reflect.construct(r,n||[],ul(l).constructor):r.apply(l,n))}function Hp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Hp=function(){return!!l})()}function ul(l){return ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(l)}function cu(l,r){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},cu(l,r)}var Aw={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"},$w=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Lw(this,r,["oi oi-",Aw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&cu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function uu(l){return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uu(l)}function Nw(l,r,n){return r=dl(r),(function(c,e){if(e&&(uu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Up()?Reflect.construct(r,n||[],dl(l).constructor):r.apply(l,n))}function Up(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Up=function(){return!!l})()}function dl(l){return dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(l)}function du(l,r){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},du(l,r)}var Iw={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"},Dw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Nw(this,r,["icon icon-",Iw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&du(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On);function hu(l){return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hu(l)}function Bw(l,r,n){return r=hl(r),(function(c,e){if(e&&(hu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Gp()?Reflect.construct(r,n||[],hl(l).constructor):r.apply(l,n))}function Gp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Gp=function(){return!!l})()}function hl(l){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(l)}function fu(l,r){return fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},fu(l,r)}var Fw={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"},Mw={bootstrap:(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Bw(this,r,["bi bi-",Fw])}return(function(c,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&fu(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(On),bootstrap3:gw,fontawesome3:kw,fontawesome4:Ow,fontawesome5:Cw,jqueryui:Rw,openiconic:$w,spectre:Dw};function Ta(l){return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ta(l)}function Vw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,zw(c.key),c)}}function zw(l){var r=(function(n,c){if(Ta(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ta(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ta(r)=="symbol"?r:r+""}var Jp=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(l){return l in document.documentElement})),xn=(function(){return l=function n(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,n),this.jsoneditor=c,Object.keys(e).forEach((function(t){c.options[t]!==void 0&&(e[t]=c.options[t])})),this.options=e},r=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getOptInCheckbox",value:function(n){var c=document.createElement("span"),e=this.getHiddenLabel(n+" opt-in");e.setAttribute("for",n+"-opt-in"),e.textContent=n+"-opt-in";var t=document.createElement("input");return t.setAttribute("type","checkbox"),t.setAttribute("style","margin: 0 10px 0 0;"),t.setAttribute("id",n+"-opt-in"),t.classList.add("json-editor-opt-in"),c.appendChild(t),c.appendChild(e),{label:e,checkbox:t,container:c}}},{key:"getOptInSwitch",value:function(n){return this.getOptInCheckbox()}},{key:"getFloatRightLinkHolder",value:function(){var n=document.createElement("div");return n.classList.add("je-float-right-linkholder"),n}},{key:"getModal",value:function(){var n=document.createElement("div");return n.style.display="none",n.classList.add("je-modal"),n}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var n=document.createElement("div");return n.classList.add("row"),n}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(n,c){}},{key:"getLink",value:function(n){var c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(document.createTextNode(n)),c}},{key:"disableHeader",value:function(n){n.style.color="#ccc"}},{key:"disableLabel",value:function(n){n.style.color="#ccc"}},{key:"enableHeader",value:function(n){n.style.color=""}},{key:"enableLabel",value:function(n){n.style.color=""}},{key:"getInfoButton",value:function(n){var c=document.createElement("span");c.innerText="ⓘ",c.classList.add("je-infobutton-icon");var e=document.createElement("span");return e.classList.add("je-infobutton-tooltip"),e.innerText=n,c.onmouseover=function(){e.style.visibility="visible"},c.onmouseleave=function(){e.style.visibility="hidden"},c.appendChild(e),c}},{key:"getFormInputLabel",value:function(n,c){var e=document.createElement("label");return e.appendChild(document.createTextNode(n)),c&&e.classList.add("required"),e}},{key:"getLabelLike",value:function(n,c){var e=document.createElement("b");return e.appendChild(document.createTextNode(n)),c&&e.classList.add("required"),e}},{key:"getHeader",value:function(n,c){var e=document.createElement("span");return typeof n=="string"?e.textContent=n:e.appendChild(n),e.classList.add("je-header"),e}},{key:"getCheckbox",value:function(){var n=this.getFormInputField("checkbox");return n.classList.add("je-checkbox"),n}},{key:"getCheckboxLabel",value:function(n,c){var e=document.createElement("label");return e.appendChild(document.createTextNode(" ".concat(n))),c&&e.classList.add("required"),e}},{key:"getMultiCheckboxHolder",value:function(n,c,e,t){var s=document.createElement("div");return s.classList.add("control-group"),c&&(c.style.display="block",s.appendChild(c),t&&c.appendChild(t)),Object.values(n).forEach((function(u){u.style.display="inline-block",u.style.marginRight="20px",s.appendChild(u)})),e&&s.appendChild(e),s}},{key:"getFormCheckboxControl",value:function(n,c,e){var t=document.createElement("div");return t.appendChild(n),c.style.width="auto",n.insertBefore(c,n.firstChild),e&&t.classList.add("je-checkbox-control--compact"),t}},{key:"getFormRadio",value:function(n){var c=this.getFormInputField("radio");return Object.keys(n).forEach((function(e){return c.setAttribute(e,n[e])})),c.classList.add("je-radio"),c}},{key:"getFormRadioLabel",value:function(n,c){var e=document.createElement("label");return e.appendChild(document.createTextNode(" ".concat(n))),c&&e.classList.add("required"),e}},{key:"getFormRadioControl",value:function(n,c,e,t){var s=document.createElement("div");return s.appendChild(n),c.style.width="auto",n.insertBefore(c,n.firstChild),e&&s.classList.add("je-radio-control--compact"),c.tagName.toLowerCase()!=="div"&&t&&n&&c&&(c.setAttribute("id",t),c.setAttribute("aria-labelledby",t),n.setAttribute("for",t)),s}},{key:"getSelectInput",value:function(n,c){var e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],t=document.createElement("select");return n&&this.setSelectOptions(t,n,[],e),t}},{key:"getSwitcher",value:function(n){var c=this.getSelectInput(n,!1);return c.classList.add("je-switcher"),c}},{key:"getSwitcherOptions",value:function(n){return n.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(n,c,e){this.setSelectOptions(n,c,e)}},{key:"setSelectOptions",value:function(n,c){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],t=arguments.length>3&&arguments[3]!==void 0&&arguments[3],s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:" ";if(n.innerHTML="",t){var u=document.createElement("option");u.setAttribute("value","_placeholder_"),u.textContent=s,u.setAttribute("disabled",""),u.setAttribute("hidden",""),n.appendChild(u)}for(var k=0;k<c.length;k++){var T=document.createElement("option");T.setAttribute("value",c[k]),T.textContent=e[k]||c[k],n.appendChild(T)}}},{key:"getTextareaInput",value:function(){var n=document.createElement("textarea");return n.classList.add("je-textarea"),n}},{key:"getHiddenLabel",value:function(n){var c=document.createElement("label");return c.textContent=n,c.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),c}},{key:"visuallyHidden",value:function(n){n&&n.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}},{key:"getHiddenText",value:function(n){var c=document.createElement("span");return c.textContent=n,c.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),c}},{key:"getRangeInput",value:function(n,c,e,t,s){var u=this.getFormInputField("range");return u.setAttribute("min",n),u.setAttribute("max",c),u.setAttribute("step",e),t&&(t.setAttribute("id",s+"-description"),u.setAttribute("aria-describedby",s+"-description")),u}},{key:"getStepperButtons",value:function(n){var c=document.createElement("div"),e=document.createElement("button");e.setAttribute("type","button"),e.classList.add("stepper-down");var t=document.createElement("button");t.setAttribute("type","button"),t.classList.add("stepper-up"),n.getAttribute("readonly")&&(e.setAttribute("disabled",!0),t.setAttribute("disabled",!0)),e.textContent="-",t.textContent="+";var s=function(T,N){T.value=Number(N||T.value),T.setAttribute("initialized","1")},u=n.getAttribute("min"),k=n.getAttribute("max");return e.addEventListener("click",(function(){n.getAttribute("initialized")?u?Number(n.value)>Number(u)&&n.stepDown():n.stepDown():s(n,u),w(n,"change")})),t.addEventListener("click",(function(){n.getAttribute("initialized")?k?Number(n.value)<Number(k)&&n.stepUp():n.stepUp():s(n,u),w(n,"change")})),c.appendChild(e),c.appendChild(t),c}},{key:"getRangeOutput",value:function(n){var c=document.createElement("output"),e=function(t){c.value=t.currentTarget.value};return n.addEventListener("change",e,!1),n.addEventListener("input",e,!1),c}},{key:"getRangeControl",value:function(n,c){var e=document.createElement("div");return e.classList.add("je-range-control"),c&&e.appendChild(c),e.appendChild(n),e}},{key:"getFormInputField",value:function(n){var c=document.createElement("input");return c.setAttribute("type",n),c}},{key:"afterInputReady",value:function(n){}},{key:"getFormControl",value:function(n,c,e,t,s){var u=document.createElement("div");return u.classList.add("form-control"),n&&(u.appendChild(n),s&&n.setAttribute("for",s)),c.type!=="checkbox"&&c.type!=="radio"||!n?(t&&n&&n.appendChild(t),u.appendChild(c)):(c.style.width="auto",n.insertBefore(c,n.firstChild),t&&n.appendChild(t)),c.tagName.toLowerCase()!=="div"&&c&&n&&s&&(n.setAttribute("for",s),c.setAttribute("id",s)),c.tagName.toLowerCase()!=="div"&&c&&e&&(e.setAttribute("id",s+"-description"),c.setAttribute("aria-describedby",s+"-description")),e&&u.appendChild(e),u}},{key:"getIndentedPanel",value:function(){var n=document.createElement("div");return n.classList.add("je-indented-panel"),n}},{key:"getTopIndentedPanel",value:function(){var n=document.createElement("div");return n.classList.add("je-indented-panel--top"),n}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(n){var c=document.createElement("p");return window.DOMPurify?c.innerHTML=window.DOMPurify.sanitize(n):c.textContent=this.cleanText(n),c}},{key:"getCheckboxDescription",value:function(n){return this.getDescription(n)}},{key:"getFormInputDescription",value:function(n){return this.getDescription(n)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(n){return this.getButtonHolder()}},{key:"getButton",value:function(n,c,e){var t=document.createElement("button");return t.type="button",this.setButtonText(t,n,c,e),t}},{key:"getFormButton",value:function(n,c,e){return this.getButton(n,c,e)}},{key:"setButtonText",value:function(n,c,e,t){for(;n.firstChild;)n.removeChild(n.firstChild);if(e&&(n.appendChild(e),c=" ".concat(c)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!e){var s=document.createElement("span");s.appendChild(document.createTextNode(c)),n.appendChild(s)}t&&n.setAttribute("title",t)}},{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(n){var c=document.createElement("th");return c.textContent=n,c}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(n){var c=document.createElement("p");return c.style=c.style||{},c.style.color="red",c.appendChild(document.createTextNode(n)),c}},{key:"addInputError",value:function(n,c){n.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(n){}},{key:"addTableRowError",value:function(n){}},{key:"removeTableRowError",value:function(n){}},{key:"getTabHolder",value:function(n){var c=n===void 0?"":n,e=document.createElement("div");return e.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(c,"'></div><div class='je-tabholder--clear'></div>"),e}},{key:"getTopTabHolder",value:function(n){var c=n===void 0?"":n,e=document.createElement("div");return e.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(c,"'></div>"),e}},{key:"applyStyles",value:function(n,c){Object.keys(c).forEach((function(e){return n.style[e]=c[e]}))}},{key:"closest",value:function(n,c){for(;n&&n!==document;){if(!n[Jp])return!1;if(n[Jp](c))return n;n=n.parentNode}return!1}},{key:"insertBasicTopTab",value:function(n,c){c.firstChild.insertBefore(n,c.firstChild.firstChild)}},{key:"getTab",value:function(n,c){var e=document.createElement("div");return e.appendChild(n),e.id=c,e.classList.add("je-tab"),e}},{key:"getTopTab",value:function(n,c){var e=document.createElement("div");return e.appendChild(n),e.id=c,e.classList.add("je-tab--top"),e}},{key:"getTabContentHolder",value:function(n){return n.children[1]}},{key:"getTopTabContentHolder",value:function(n){return n.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(n){this.applyStyles(n.tab,{opacity:1,background:"white"}),n.rowPane!==void 0?n.rowPane.style.display="":n.container.style.display=""}},{key:"markTabInactive",value:function(n){this.applyStyles(n.tab,{opacity:.5,background:""}),n.rowPane!==void 0?n.rowPane.style.display="none":n.container.style.display="none"}},{key:"addTab",value:function(n,c){n.children[0].appendChild(c)}},{key:"addTopTab",value:function(n,c){n.children[0].appendChild(c)}},{key:"getBlockLink",value:function(){var n=document.createElement("a");return n.classList.add("je-block-link"),n}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(n,c,e){n.appendChild(c),e.classList.add("je-media"),n.appendChild(e)}},{key:"createImageLink",value:function(n,c,e){n.appendChild(c),c.appendChild(e)}},{key:"getFirstTab",value:function(n){return n.firstChild.firstChild}},{key:"getInputGroup",value:function(n,c){}},{key:"cleanText",value:function(n){var c=document.createElement("div");return c.innerHTML=n,c.textContent||c.innerText}},{key:"getDropZone",value:function(n){var c=document.createElement("div");return c.setAttribute("data-text",n),c.classList.add("je-dropzone"),c}},{key:"getUploadPreview",value:function(n,c,e){var t=document.createElement("div");if(t.classList.add("je-upload-preview"),n.mimeType.substr(0,5)==="image"){var s=document.createElement("img");s.src=e,t.appendChild(s)}var u=document.createElement("div");u.innerHTML+="<strong>Name:</strong> ".concat(n.name,"<br><strong>Type:</strong> ").concat(n.type,"<br><strong>Size:</strong> ").concat(n.formattedSize),t.appendChild(u),t.appendChild(c);var k=document.createElement("div");return k.style.clear="left",t.appendChild(k),t}},{key:"getProgressBar",value:function(){var n=document.createElement("progress");return n.setAttribute("max",100),n.setAttribute("value",0),n}},{key:"updateProgressBar",value:function(n,c){n&&n.setAttribute("value",c)}},{key:"updateProgressBarUnknown",value:function(n){n&&n.removeAttribute("value")}}],r&&Vw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Do(l){return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Do(l)}function qw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Hw(c.key),c)}}function Hw(l){var r=(function(n,c){if(Do(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Do(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Do(r)=="symbol"?r:r+""}function Uw(l,r,n){return r=rn(r),(function(c,e){if(e&&(Do(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Kp()?Reflect.construct(r,n||[],rn(l).constructor):r.apply(l,n))}function Kp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Kp=function(){return!!l})()}function Di(){return Di=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=rn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Di.apply(this,arguments)}function rn(l){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rn(l)}function pu(l,r){return pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},pu(l,r)}var Wp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Uw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pu(e,t)})(r,l),n=r,(c=[{key:"getFormInputLabel",value:function(e,t){var s=Di(rn(r.prototype),"getFormInputLabel",this).call(this,e,t);return s.classList.add("je-form-input-label"),s}},{key:"getFormInputDescription",value:function(e){var t=Di(rn(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-form-input-label"),t}},{key:"getIndentedPanel",value:function(){var e=Di(rn(r.prototype),"getIndentedPanel",this).call(this);return e.classList.add("je-indented-panel"),e}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var e=Di(rn(r.prototype),"getChildEditorHolder",this).call(this);return e.classList.add("je-child-editor-holder"),e}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.classList.add("je-header-button-holder"),e}},{key:"getTable",value:function(){var e=Di(rn(r.prototype),"getTable",this).call(this);return e.classList.add("je-table"),e}},{key:"addInputError",value:function(e,t){var s=this.closest(e,".form-control")||e.controlgroup;e.errmsg?e.errmsg.style.display="block":(e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),e.errmsg.style=e.errmsg.style||{},e.errmsg.style.color="red",s.appendChild(e.errmsg)),e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(t)),e.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}])&&qw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function Bo(l){return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bo(l)}function Gw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Jw(c.key),c)}}function Jw(l){var r=(function(n,c){if(Bo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Bo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Bo(r)=="symbol"?r:r+""}function Kw(l,r,n){return r=nn(r),(function(c,e){if(e&&(Bo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Zp()?Reflect.construct(r,n||[],nn(l).constructor):r.apply(l,n))}function Zp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Zp=function(){return!!l})()}function Bi(){return Bi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=nn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Bi.apply(this,arguments)}function nn(l){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nn(l)}function mu(l,r){return mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},mu(l,r)}Wp.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 Yp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Kw(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mu(e,t)})(r,l),n=r,(c=[{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("label");s.classList.add("switch");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("json-editor-opt-in");var k=document.createElement("span");k.classList.add("switch-slider");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",s.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"getSelectInput",value:function(e,t){var s=Bi(nn(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-control"),s}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-md-".concat(t)),s&&e.classList.add("col-md-offset-".concat(s))}},{key:"afterInputReady",value:function(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-control"),e}},{key:"getRangeInput",value:function(e,t,s,u,k){return Bi(nn(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k)}},{key:"getFormInputField",value:function(e){var t=Bi(nn(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&t.classList.add("form-control"),t}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("sr-only")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");return!e||t.type!=="checkbox"&&t.type!=="radio"?(T.classList.add("form-group"),e&&(e.classList.add("control-label"),T.appendChild(e),u&&e.appendChild(u)),T.appendChild(t)):(T.classList.add(t.type),u&&e.appendChild(u),e.insertBefore(t,e.firstChild),T.appendChild(e)),s&&T.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),T}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("well","well-sm"),e.style.paddingBottom=0,e}},{key:"getInfoButton",value:function(e){var t=document.createElement("span");t.classList.add("glyphicon","glyphicon-info-sign","pull-right"),t.style.padding=".25rem",t.style.position="relative",t.style.display="inline-block";var s=document.createElement("span");return s.style["font-family"]="sans-serif",s.style.visibility="hidden",s.style["background-color"]="rgba(50, 50, 50, .75)",s.style.margin="0 .25rem",s.style.color="#FAFAFA",s.style.padding=".5rem 1rem",s.style["border-radius"]=".25rem",s.style.width="25rem",s.style.position="absolute",s.innerText=e,t.onmouseover=function(){s.style.visibility="visible"},t.onmouseleave=function(){s.style.visibility="hidden"},t.appendChild(s),t}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("p");return t.classList.add("help-block"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeaderContainer",value:function(){return document.createElement("div")}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return s.classList.add("h3"),typeof e=="string"?s.textContent=e:s.appendChild(e),s}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.style.marginLeft="10px",e}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getButton",value:function(e,t,s){var u=Bi(nn(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-default"),u}},{key:"getTableContainer",value:function(){var e=Bi(nn(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-bordered"),e.style.width="auto",e.style.maxWidth="none",e}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("help-block","errormsg"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(t,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(t,"'></div>"),s}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML="<ul class='nav nav-tabs' id='".concat(t,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(t,"'></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),u.setAttribute("aria-controls",t),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),u.setAttribute("aria-controls",t),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);var u=document.createElement("div");u.classList.add("input-group-btn"),s.appendChild(u);for(var k=0;k<t.length;k++)u.appendChild(t[k]);return s}}}])&&Gw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function Fo(l){return Fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fo(l)}function Ww(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,Zw(c.key),c)}}function Zw(l){var r=(function(n,c){if(Fo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Fo(r)=="symbol"?r:r+""}function Yw(l,r,n){return r=on(r),(function(c,e){if(e&&(Fo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,Qp()?Reflect.construct(r,n||[],on(l).constructor):r.apply(l,n))}function Qp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qp=function(){return!!l})()}function Fi(){return Fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=on(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Fi.apply(this,arguments)}function on(l){return on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},on(l)}function yu(l,r){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},yu(l,r)}Yp.rules={".switch":"position:relative;display:inline-block;width:28px;height:16px;margin-right:10px",".switch input":"opacity:0;width:0;height:0",".switch-slider":"position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:%23ccc;transition:.1s;border-radius:34px",".switch-slider:before":"position:absolute;content:%22%22;height:12px;width:12px;left:1px;top:2px;background-color:white;transition:.1s;border-radius:50%25","input:checked + .switch-slider":"background-color:%232196F3","input:focus + .switch-slider":"box-shadow:0%200%201px%20%232196F3","input:checked + .switch-slider:before":"transform:translateX(12px)","input:disabled + .switch-slider":"opacity:0.5"};var Qw={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"},Xp=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),Yw(this,r,[e,Qw])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yu(e,t)})(r,l),n=r,(c=[{key:"getSelectInput",value:function(e,t){var s=Fi(on(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&s.classList.add("form-control-sm"),this.options.input_size==="large"&&s.classList.add("form-control-lg")):(s.classList.remove("form-control"),s.classList.add("custom-select"),this.options.input_size==="small"&&s.classList.add("custom-select-sm"),this.options.input_size==="large"&&s.classList.add("custom-select-lg")),s}},{key:"getContainer",value:function(){var e=document.createElement("div");return this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("div");s.classList.add("custom-control","custom-switch","d-inline-block","fs-6");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("custom-control-input","json-editor-opt-in");var k=document.createElement("label");k.setAttribute("for",e+"-opt-in"),k.classList.add("custom-control-label");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",k.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-md-".concat(t)),s&&e.classList.add("offset-md-".concat(s))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var s=e.parentNode.parentNode.getElementsByTagName("label")[0];s&&(s.htmlFor=t),e.controlgroup=this.closest(e,".form-group")}}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return 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:"getRangeInput",value:function(e,t,s,u,k){var T=Fi(on(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k);return this.options.custom_forms===!0&&(T.classList.remove("form-control"),T.classList.add("custom-range")),T}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),s=document.createElement("div"),u=document.createElement("div"),k=document.createElement("button");k.setAttribute("type","button");var T=document.createElement("button");T.setAttribute("type","button"),t.appendChild(s),t.appendChild(e),t.appendChild(u),s.appendChild(k),u.appendChild(T),t.classList.add("input-group"),s.classList.add("input-group-prepend"),u.classList.add("input-group-append"),k.classList.add("btn"),k.classList.add("btn-secondary"),k.classList.add("stepper-down"),T.classList.add("btn"),T.classList.add("btn-secondary"),T.classList.add("stepper-up"),e.getAttribute("readonly")&&(k.setAttribute("disabled",!0),T.setAttribute("disabled",!0)),k.textContent="-",T.textContent="+";var N=function(Q,X){Q.value=Number(X||Q.value),Q.setAttribute("initialized","1")},B=e.getAttribute("min"),q=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),k.addEventListener("click",(function(){e.getAttribute("initialized")?B?Number(e.value)>Number(B)&&e.stepDown():e.stepDown():N(e,B),w(e,"change")})),T.addEventListener("click",(function(){e.getAttribute("initialized")?q?Number(e.value)<Number(q)&&e.stepUp():e.stepUp():N(e,B),w(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=Fi(on(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&e!=="file"&&(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")),e==="file"&&t.classList.add("form-control-file"),t}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("sr-only")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");if(T.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(T.appendChild(e),u&&T.appendChild(u)),T.appendChild(t);else{var N=document.createElement("div");this.options.custom_forms===!1?(N.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label")):(N.classList.add("custom-control"),t.classList.add("custom-control-input"),e.classList.add("custom-control-label"),t.type==="checkbox"?N.classList.add("custom-checkbox"):N.classList.add("custom-radio")),N.appendChild(t),N.appendChild(e),u&&N.appendChild(u),T.appendChild(N)}return s&&T.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),T}},{key:"getInfoButton",value:function(e){var t=document.createElement("button");t.type="button",t.classList.add("ml-3","jsoneditor-twbs4-text-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("data-placement","auto"),t.title=e;var s=document.createTextNode("ⓘ");return t.appendChild(s),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(t).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&t.classList.add("je-tooltip"),t}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){var k=document.createElement("div");k.classList.add("form-group"),t&&(k.appendChild(t),u&&t.appendChild(u));var T=document.createElement("div");return Object.values(e).forEach((function(N){var B=N.firstChild;T.appendChild(B)})),k.appendChild(T),s&&k.appendChild(s),k}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in e)t.setAttribute(s,e[s]);return this.options.custom_forms===!1?t.classList.add("form-check-input"):t.classList.add("custom-control-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var s=document.createElement("label");return this.options.custom_forms===!1?s.classList.add("form-check-label"):s.classList.add("custom-control-label"),s.appendChild(document.createTextNode(e)),s}},{key:"getFormRadioControl",value:function(e,t,s){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(t),u.appendChild(e),s&&(this.options.custom_forms===!1?u.classList.add("form-check-inline"):u.classList.add("custom-control-inline")),u}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("card","card-body","mb-3"),this.options.object_background&&e.classList.add(this.options.object_background),this.options.object_text&&e.classList.add(this.options.object_text),e}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("small");return t.classList.add("form-text"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return s.classList.add("h3"),s.classList.add("card-title"),s.classList.add("level-"+t),typeof e=="string"?s.textContent=e:s.appendChild(e),s.style.display="inline-block",s}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=this.getButtonHolder();return t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"&&t.classList.add("text-right"),t}},{key:"getButton",value:function(e,t,s){var u=Fi(on(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var e=Fi(on(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-sm"),this.options.table_border&&e.classList.add("table-bordered"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getErrorMessage",value:function(e){var t=document.createElement("div");return t.classList.add("alert","alert-danger"),t.setAttribute("role","alert"),t.appendChild(document.createTextNode(e)),t}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("is-invalid"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("invalid-feedback"),e.controlgroup.appendChild(e.errmsg),e.errmsg.style.display="block"),e.errmsg.style.display="block",e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),s=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(s,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(s,"'></div></div>"),t.classList.add("row"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.classList.add("card"),s.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(t,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(t,"'></div></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(e,t){t.children[0].children[0].insertBefore(e,t.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getFirstTab",value:function(e){return e.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getBlockLink",value:function(){var e=document.createElement("a");return e.classList.add("mb-3","d-inline-block"),e}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);var u=document.createElement("div");u.classList.add("input-group-append"),s.appendChild(u);for(var k=0;k<t.length;k++)t[k].classList.remove("mr-2","btn-secondary"),t[k].classList.add("btn-outline-secondary"),u.appendChild(t[k]);return s}}}])&&Ww(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function Mo(l){return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mo(l)}function Xw(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,e1(c.key),c)}}function e1(l){var r=(function(n,c){if(Mo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Mo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Mo(r)=="symbol"?r:r+""}function t1(l,r,n){return r=an(r),(function(c,e){if(e&&(Mo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,em()?Reflect.construct(r,n||[],an(l).constructor):r.apply(l,n))}function em(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(em=function(){return!!l})()}function Mi(){return Mi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=an(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Mi.apply(this,arguments)}function an(l){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},an(l)}function vu(l,r){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},vu(l,r)}Xp.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 r1={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},tm=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),t1(this,r,[e,r1])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vu(e,t)})(r,l),n=r,(c=[{key:"getSelectInput",value:function(e,t){var s=Mi(an(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-control"),s.classList.add("form-select"),this.options.input_size==="small"&&s.classList.add("form-control-sm"),this.options.input_size==="large"&&s.classList.add("form-control-lg"),s}},{key:"getContainer",value:function(){var e=document.createElement("div");return this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("div");s.classList.add("form-check","form-switch","d-inline-block","fs-6");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("role","switch"),u.setAttribute("id",e+"-opt-in"),u.classList.add("form-check-input","json-editor-opt-in");var k=document.createElement("label");k.setAttribute("for",e+"-opt-in"),k.classList.add("form-check-label");var T=document.createElement("span");return T.classList.add("visually-hidden"),T.textContent=e+"-opt-in",k.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-md-".concat(t)),s&&e.classList.add("offset-md-".concat(s))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var s=e.parentNode.parentNode.getElementsByTagName("label")[0];s&&(s.classList.add("form-label"),s.htmlFor=t),e.controlgroup=this.closest(e,".form-group")}}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return 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:"getRangeInput",value:function(e,t,s,u,k){var T=Mi(an(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k);return T.classList.remove("form-control"),T.classList.add("form-range"),T}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),s=document.createElement("button");s.setAttribute("type","button");var u=document.createElement("button");u.setAttribute("type","button"),t.appendChild(s),t.appendChild(e),t.appendChild(u),t.classList.add("input-group"),s.classList.add("btn"),s.classList.add("btn-secondary"),s.classList.add("stepper-down"),u.classList.add("btn"),u.classList.add("btn-secondary"),u.classList.add("stepper-up"),e.getAttribute("readonly")&&(s.setAttribute("disabled",!0),u.setAttribute("disabled",!0)),s.textContent="-",u.textContent="+";var k=function(B,q){B.value=Number(q||B.value),B.setAttribute("initialized","1")},T=e.getAttribute("min"),N=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),s.addEventListener("click",(function(){e.getAttribute("initialized")?T?Number(e.value)>Number(T)&&e.stepDown():e.stepDown():k(e,T),w(e,"change")})),u.addEventListener("click",(function(){e.getAttribute("initialized")?N?Number(e.value)<Number(N)&&e.stepUp():e.stepUp():k(e,T),w(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=Mi(an(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&(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:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");if(T.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(e.classList.add("form-label"),T.appendChild(e),u&&T.appendChild(u)),T.appendChild(t);else{var N=document.createElement("div");N.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label"),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),N.appendChild(t),N.appendChild(e),u&&N.appendChild(u),T.appendChild(N)}return s&&T.appendChild(s),T}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("visually-hidden"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("visually-hidden")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getInfoButton",value:function(e){var t=document.createElement("button");t.type="button",t.classList.add("ms-3","jsoneditor-twbs5-text-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("data-placement","auto"),t.title=e;var s=document.createTextNode("ⓘ");return t.appendChild(s),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(t).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&t.classList.add("je-tooltip"),t}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){var k=document.createElement("div");k.classList.add("form-group"),t&&(k.appendChild(t),u&&t.appendChild(u));var T=document.createElement("div");return Object.values(e).forEach((function(N){var B=N.firstChild;T.appendChild(B)})),k.appendChild(T),s&&k.appendChild(s),k}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in e)t.setAttribute(s,e[s]);return t.classList.add("form-check-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var s=document.createElement("label");return s.classList.add("form-check-label"),s.appendChild(document.createTextNode(e)),s}},{key:"getFormRadioControl",value:function(e,t,s){var u=document.createElement("div");return u.classList.add("form-check"),u.appendChild(t),u.appendChild(e),s&&u.classList.add("form-check-inline"),u}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("card","card-body","my-3"),this.options.object_background&&e.classList.add(this.options.object_background),this.options.object_text&&e.classList.add(this.options.object_text),e}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("small");return t.classList.add("form-text"),t.classList.add("d-block"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return s.classList.add("h3"),s.classList.add("card-title"),s.classList.add("level-"+t),typeof e=="string"?s.textContent=e:s.appendChild(e),s.style.display="inline-block",s}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=this.getButtonHolder();return t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"&&t.classList.add("text-end"),t}},{key:"getButton",value:function(e,t,s){var u=Mi(an(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var e=Mi(an(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-sm"),this.options.table_border&&e.classList.add("table-bordered"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getErrorMessage",value:function(e){var t=document.createElement("div");return t.classList.add("alert","alert-danger"),t.setAttribute("role","alert"),t.appendChild(document.createTextNode(e)),t}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("is-invalid"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("invalid-feedback"),e.controlgroup.appendChild(e.errmsg),e.errmsg.style.display="block"),e.errmsg.style.display="block",e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),s=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(s,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(s,"'></div></div>"),t.classList.add("row"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.classList.add("card"),s.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(t,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(t,"'></div></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(e,t){t.children[0].children[0].insertBefore(e,t.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getFirstTab",value:function(e){return e.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getBlockLink",value:function(){var e=document.createElement("a");return e.classList.add("mb-3","d-inline-block"),e}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);for(var u=0;u<t.length;u++)t[u].classList.remove("me-2","btn-secondary"),t[u].classList.add("btn-outline-secondary"),s.appendChild(t[u]);return s}}}])&&Xw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function Vo(l){return Vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vo(l)}function n1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,i1(c.key),c)}}function i1(l){var r=(function(n,c){if(Vo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Vo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Vo(r)=="symbol"?r:r+""}function o1(l,r,n){return r=Sn(r),(function(c,e){if(e&&(Vo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,rm()?Reflect.construct(r,n||[],Sn(l).constructor):r.apply(l,n))}function rm(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rm=function(){return!!l})()}function zo(){return zo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Sn(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},zo.apply(this,arguments)}function Sn(l){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sn(l)}function bu(l,r){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},bu(l,r)}tm.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 nm=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),o1(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bu(e,t)})(r,l),n=r,(c=[{key:"getTable",value:function(){var e=zo(Sn(r.prototype),"getTable",this).call(this);return e.setAttribute("cellpadding",5),e.setAttribute("cellspacing",0),e}},{key:"getTableHeaderCell",value:function(e){var t=zo(Sn(r.prototype),"getTableHeaderCell",this).call(this,e);return t.classList.add("ui-state-active"),t.style.fontWeight="bold",t}},{key:"getTableCell",value:function(){var e=zo(Sn(r.prototype),"getTableCell",this).call(this);return e.classList.add("ui-widget-content"),e}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.style.marginLeft="10px",e.style.fontSize=".6em",e.style.display="inline-block",e}},{key:"getFormInputDescription",value:function(e){var t=this.getDescription(e);return t.style.marginLeft="10px",t.style.display="inline-block",t}},{key:"getFormControl",value:function(e,t,s,u){var k=zo(Sn(r.prototype),"getFormControl",this).call(this,e,t,s,u);return t.type==="checkbox"?(k.style.lineHeight="25px",k.style.padding="3px 0"):k.style.padding="4px 0 8px 0",k}},{key:"getDescription",value:function(e){var t=document.createElement("span");return t.style.fontSize=".8em",t.style.fontStyle="italic",window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getButtonHolder",value:function(){var e=document.createElement("div");return e.classList.add("ui-buttonset"),e.style.fontSize=".7em",e}},{key:"getFormInputLabel",value:function(e,t){var s=document.createElement("label");return s.style.fontWeight="bold",s.style.display="block",s.textContent=e,t&&s.classList.add("required"),s}},{key:"getButton",value:function(e,t,s){var u=document.createElement("button");u.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),t&&!e?(u.classList.add("ui-button-icon-only"),t.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(t)):t?(u.classList.add("ui-button-text-icon-primary"),t.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(t)):u.classList.add("ui-button-text-only");var k=document.createElement("span");return k.classList.add("ui-button-text"),k.textContent=e||s||".",u.appendChild(k),u.setAttribute("title",s),u}},{key:"setButtonText",value:function(e,t,s,u){e.innerHTML="",e.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),s&&!t?(e.classList.add("ui-button-icon-only"),s.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(s)):s?(e.classList.add("ui-button-text-icon-primary"),s.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(s)):e.classList.add("ui-button-text-only");var k=document.createElement("span");k.classList.add("ui-button-text"),k.textContent=t||u||".",e.appendChild(k),e.setAttribute("title",u)}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("ui-widget-content","ui-corner-all"),e.style.padding="1em 1.4em",e.style.marginBottom="20px",e}},{key:"afterInputReady",value:function(e){if(!e.controls&&(e.controls=this.closest(e,".form-control"),this.queuedInputErrorText)){var t=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(e,t)}}},{key:"addInputError",value:function(e,t){e.controls?(e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("div"),e.errmsg.classList.add("ui-state-error"),e.controls.appendChild(e.errmsg)),e.errmsg.textContent=t):this.queuedInputErrorText=t}},{key:"removeInputError",value:function(e){e.controls||delete this.queuedInputErrorText,e.errmsg&&(e.errmsg.style.display="none")}},{key:"markTabActive",value:function(e){e.tab.classList.remove("ui-widget-header"),e.tab.classList.add("ui-state-active"),e.rowPane!==void 0?e.rowPane.style.display="":e.container.style.display=""}},{key:"markTabInactive",value:function(e){e.tab.classList.add("ui-widget-header"),e.tab.classList.remove("ui-state-active"),e.rowPane!==void 0?e.rowPane.style.display="none":e.container.style.display="none"}}])&&n1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function qo(l){return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qo(l)}function a1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,s1(c.key),c)}}function s1(l){var r=(function(n,c){if(qo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(qo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return qo(r)=="symbol"?r:r+""}function l1(l,r,n){return r=fl(r),(function(c,e){if(e&&(qo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,im()?Reflect.construct(r,n||[],fl(l).constructor):r.apply(l,n))}function im(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(im=function(){return!!l})()}function fl(l){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(l)}function gu(l,r){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},gu(l,r)}nm.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 om=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),l1(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)})(r,l),n=r,(c=[{key:"addInputError",value:function(e,t){if(e.errmsg)e.errmsg.style.display="block";else{var s=this.closest(e,".form-control");e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),s.nodeName&&s.appendChild(e.errmsg)}e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(t)),e.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}])&&a1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function Ho(l){return Ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ho(l)}function c1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,u1(c.key),c)}}function u1(l){var r=(function(n,c){if(Ho(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ho(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ho(r)=="symbol"?r:r+""}function d1(l,r,n){return r=It(r),(function(c,e){if(e&&(Ho(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,am()?Reflect.construct(r,n||[],It(l).constructor):r.apply(l,n))}function am(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(am=function(){return!!l})()}function Zt(){return Zt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=It(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},Zt.apply(this,arguments)}function It(l){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},It(l)}function _u(l,r){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},_u(l,r)}om.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 h1={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"},sm=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),d1(this,r,[e,h1])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_u(e,t)})(r,l),n=r,(c=[{key:"getOptInSwitch",value:function(e){var t=document.createElement("span");t.classList.add("form-group");var s=document.createElement("label");s.classList.add("form-switch","d-inline-block");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("json-editor-opt-in");var k=document.createElement("i");k.classList.add("form-icon");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",s.appendChild(T),s.appendChild(u),s.appendChild(k),t.appendChild(s),{label:s,checkbox:u,container:t}}},{key:"setGridColumnSize",value:function(e,t,s){e.classList.add("col-".concat(t)),s&&e.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var e=document.createElement("div");return e.classList.add("container"),this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getGridRow",value:function(){var e=document.createElement("div");return e.classList.add("columns"),e}},{key:"getGridColumn",value:function(){var e=document.createElement("div");return e.classList.add("column"),this.options.align_bottom&&e.classList.add("je-align-bottom"),e}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("je-panel"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getTopIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("je-panel-top"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=Zt(It(r.prototype),"getButtonHolder",this).call(this);return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=Zt(It(r.prototype),"getFormButtonHolder",this).call(this);return t.classList.remove("btn-group"),t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"?t.classList.add("text-right"):t.classList.add("text-left"),t}},{key:"getFormButton",value:function(e,t,s){var u=Zt(It(r.prototype),"getFormButton",this).call(this,e,t,s);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(e,t,s){var u=Zt(It(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),u}},{key:"getHeader",value:function(e,t){var s=document.createElement("span");return typeof e=="string"?s.textContent=e:s.appendChild(e),s.style.display="inline-block",s}},{key:"getFormInputDescription",value:function(e){var t=Zt(It(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-desc","hide-sm"),t}},{key:"getFormInputLabel",value:function(e,t){var s=Zt(It(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold&&s.classList.add("je-label"),s}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(e,t){var s=Zt(It(r.prototype),"getCheckboxLabel",this).call(this,e,t),u=document.createElement("i");return u.classList.add("form-icon"),s.classList.add("form-checkbox","pr-0"),s.insertBefore(u,s.firstChild),s}},{key:"getFormCheckboxControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("form-inline"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){return Zt(It(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,s,u)}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in e)t.setAttribute(s,e[s]);return t}},{key:"getFormRadioLabel",value:function(e,t){var s=Zt(It(r.prototype),"getFormRadioLabel",this).call(this,e,t),u=document.createElement("i");return u.classList.add("form-icon"),s.classList.add("form-radio"),s.insertBefore(u,s.firstChild),s}},{key:"getFormRadioControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("form-inline"),e}},{key:"getFormInputField",value:function(e){var t=Zt(It(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("form-input"),t}},{key:"getRangeInput",value:function(e,t,s,u,k){var T=Zt(It(r.prototype),"getRangeInput",this).call(this,e,t,s,u,k);return T.classList.add("slider"),T.classList.remove("form-input"),T.setAttribute("oninput",'this.setAttribute("value", this.value)'),T}},{key:"getRangeControl",value:function(e,t){var s=Zt(It(r.prototype),"getRangeControl",this).call(this,e,t);return s.classList.add("text-center"),s}},{key:"getSelectInput",value:function(e,t){var s=Zt(It(r.prototype),"getSelectInput",this).call(this,e);return s.classList.add("form-select"),s}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-input"),e}},{key:"getFormControl",value:function(e,t,s,u,k){var T=document.createElement("div");return T.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio"?(e&&(e.classList.add("form-label"),T.appendChild(e),u&&e.appendChild(u)),T.appendChild(t)):(T.classList.add(t.type),u&&e.appendChild(u),e.insertBefore(t,e.firstChild),T.appendChild(e)),this.options.input_size==="small"?t.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&t.classList.add("input-lg","select-lg"),t.type!=="checkbox"&&T.appendChild(t),s&&T.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&k&&(e.setAttribute("for",k),t.setAttribute("id",k)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",k+"-description"),t.setAttribute("aria-describedby",k+"-description")),T}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("input-group"),s.appendChild(e);for(var u=0;u<t.length;u++)t[u].classList.add("input-group-btn"),t[u].classList.remove("btn-sm","mr-2","my-1"),s.appendChild(t[u]);return s}}},{key:"getInfoButton",value:function(e){var t=document.createElement("div");t.classList.add("popover","popover-left","float-right");var s=document.createElement("button");s.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),s.setAttribute("tabindex","-1"),t.appendChild(s);var u=document.createTextNode("I");s.appendChild(u);var k=document.createElement("div");k.classList.add("popover-container"),t.appendChild(k);var T=document.createElement("div");T.classList.add("card"),k.appendChild(T);var N=document.createElement("div");return N.classList.add("card-body"),N.innerHTML=e,T.appendChild(N),t}},{key:"getTable",value:function(){var e=Zt(It(r.prototype),"getTable",this).call(this);return e.classList.add("table","table-scroll"),this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getProgressBar",value:function(){var e=Zt(It(r.prototype),"getProgressBar",this).call(this);return e.classList.add("progress"),e}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.classList.add("columns"),s.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(t,'"></div>'),s}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(t,'"></div>'),s}},{key:"getTab",value:function(e,t){var s=document.createElement("a");return s.classList.add("btn","btn-secondary","btn-block"),s.setAttribute("href","#".concat(t)),s.appendChild(e),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.id=t,s.classList.add("tab-item");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),s.appendChild(u),s}},{key:"markTabActive",value:function(e){e.tab.classList.add("active"),e.rowPane!==void 0?e.rowPane.style.display="":e.container.style.display=""}},{key:"markTabInactive",value:function(e){e.tab.classList.remove("active"),e.rowPane!==void 0?e.rowPane.style.display="none":e.container.style.display="none"}},{key:"afterInputReady",value:function(e){if(e.localName==="select"){if(e.classList.contains("selectized")){var t=e.nextSibling;t&&(t.classList.remove("form-select"),Array.from(t.querySelectorAll(".form-select")).forEach((function(u){u.classList.remove("form-select")})))}else if(e.classList.contains("select2-hidden-accessible")){var s=e.nextSibling;s&&s.querySelector(".select2-selection--single")&&s.classList.add("form-select")}}e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("form-input-hint"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.classList.remove("d-hide"),e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.classList.add("d-hide"),e.controlgroup.classList.remove("has-error"))}}])&&c1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);function Uo(l){return Uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Uo(l)}function f1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,p1(c.key),c)}}function p1(l){var r=(function(n,c){if(Uo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Uo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Uo(r)=="symbol"?r:r+""}function m1(l,r,n){return r=Bt(r),(function(c,e){if(e&&(Uo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(c)})(l,lm()?Reflect.construct(r,n||[],Bt(l).constructor):r.apply(l,n))}function lm(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(lm=function(){return!!l})()}function er(){return er=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,s){for(;!Object.prototype.hasOwnProperty.call(t,s)&&(t=Bt(t))!==null;);return t})(l,r);if(c){var e=Object.getOwnPropertyDescriptor(c,r);return e.get?e.get.call(arguments.length<3?l:n):e.value}},er.apply(this,arguments)}function Bt(l){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bt(l)}function wu(l,r){return wu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wu(l,r)}sm.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 y1={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},cm=(function(l){function r(e){return(function(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r),m1(this,r,[e,y1])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wu(e,t)})(r,l),n=r,(c=[{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var s=document.createElement("label");s.classList.add("switch");var u=document.createElement("input");u.setAttribute("type","checkbox"),u.setAttribute("id",e+"-opt-in"),u.classList.add("json-editor-opt-in");var k=document.createElement("span");k.classList.add("switch-slider","round");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",s.appendChild(T),s.appendChild(u),s.appendChild(k),{label:t,checkbox:u,container:s}}},{key:"getGridContainer",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-col","w-full"),this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getGridRow",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-wrap","w-full"),e}},{key:"getGridColumn",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-col"),e}},{key:"setGridColumnSize",value:function(e,t,s){t>0&&t<12?e.classList.add("w-".concat(t,"/12"),"px-1"):e.classList.add("w-full","px-1"),s&&(e.style.marginLeft="".concat(100/12*s,"%"))}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","p-1"):e.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&&e.classList.add("je-border"),e}},{key:"getTopIndentedPanel",value:function(){var e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","m-2"):e.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&&e.classList.add("je-border"),e}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(e,t){var s=er(Bt(r.prototype),"getSelectInput",this).call(this,e);return t?s.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"):s.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&&s.classList.add("compact"),s}},{key:"afterInputReady",value:function(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var e=er(Bt(r.prototype),"getTextareaInput",this).call(this);return e.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e.style.height=0,e}},{key:"getRangeInput",value:function(e,t,s){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",e),u.setAttribute("max",t),u.setAttribute("step",s),u}},{key:"getRangeControl",value:function(e,t){var s=er(Bt(r.prototype),"getRangeControl",this).call(this,e,t);return s.classList.add("text-center","text-black"),s}},{key:"getCheckbox",value:function(){var e=this.getFormInputField("checkbox");return e.classList.add("form-checkbox","text-red-600"),e}},{key:"getCheckboxLabel",value:function(e,t){var s=er(Bt(r.prototype),"getCheckboxLabel",this).call(this,e,t);return s.classList.add("inline-flex","items-center"),s}},{key:"getFormCheckboxControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("inline-flex flex-row"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,s,u){var k=er(Bt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,s,u);return k.classList.add("inline-flex","flex-col"),k}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var s in t.classList.add("form-radio","text-red-600"),e)t.setAttribute(s,e[s]);return t}},{key:"getFormRadioLabel",value:function(e,t){var s=er(Bt(r.prototype),"getFormRadioLabel",this).call(this,e,t);return s.classList.add("inline-flex","items-center","mr-2"),s}},{key:"getFormRadioControl",value:function(e,t,s){return e.insertBefore(t,e.firstChild),s&&e.classList.add("form-radio"),e}},{key:"getRadioHolder",value:function(e,t,s,u,k){var T=er(Bt(r.prototype),"getRadioHolder",this).call(this,t,s,u,k);return e.options.layout==="h"?T.classList.add("inline-flex","flex-row"):T.classList.add("inline-flex","flex-col"),T}},{key:"getFormInputLabel",value:function(e,t){var s=er(Bt(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold?s.classList.add("font-bold"):s.classList.add("required"),s}},{key:"getFormInputField",value:function(e){var t=er(Bt(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("p");return t.classList.add("block","mt-1","text-xs"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getFormControl",value:function(e,t,s,u){var k=document.createElement("div");return k.classList.add("form-group","mb-1","w-full"),e&&(e.classList.add("text-xs"),t.type==="checkbox"&&(t.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormCheckboxControl(e,t,!1,u)),t.type==="radio"&&(t.classList.add("form-radio","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormRadioControl(e,t,!1,u)),k.appendChild(e),!["checkbox","radio"].includes(t.type)&&u&&k.appendChild(u)),["checkbox","radio"].includes(t.type)||(this.options.input_size==="small"?t.classList.add("text-xs"):this.options.input_size==="normal"?t.classList.add("text-base"):this.options.input_size==="large"&&t.classList.add("text-xl"),k.appendChild(t)),s&&k.appendChild(s),k}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.classList.add("text-sm"),e}},{key:"getButtonHolder",value:function(){var e=document.createElement("div");return e.classList.add("flex","relative","inline-flex","align-middle"),e}},{key:"getButton",value:function(e,t,s){var u=er(Bt(r.prototype),"getButton",this).call(this,e,t,s);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(e){var t=document.createElement("a");t.classList.add("tooltips","float-right"),t.innerHTML="ⓘ";var s=document.createElement("span");return s.innerHTML=e,t.appendChild(s),t}},{key:"getTable",value:function(){var e=er(Bt(r.prototype),"getTable",this).call(this);return this.options.table_border?e.classList.add("je-table-border"):e.classList.add("table","border","p-0"),e}},{key:"getTableRow",value:function(){var e=er(Bt(r.prototype),"getTableRow",this).call(this);return this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("je-table-zebra"),e}},{key:"getTableHeaderCell",value:function(e){var t=er(Bt(r.prototype),"getTableHeaderCell",this).call(this,e);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("text-xs","border","p-0","m-0"),t}},{key:"getTableCell",value:function(){var e=er(Bt(r.prototype),"getTableCell",this).call(this);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("border-0","p-0","m-0"),e}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.controlgroup.classList.add("text-red-600"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("block","mt-1","text-xs","text-red"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=t)}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("text-red-600"),e.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),s=e===void 0?"":e;return t.innerHTML="<div class='w-2/12' id='".concat(s,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(s,"'></div>"),t.classList.add("flex"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,s=document.createElement("div");return s.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(t,"'></ul><div class='p-6 block' id='").concat(t,"'></div>"),s}},{key:"getTab",value:function(e,t){var s=document.createElement("li");s.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(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTopTab",value:function(e,t){var s=document.createElement("li");s.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(t)),u.setAttribute("data-toggle","tab"),u.appendChild(e),s.appendChild(u),s}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("block"),e.tab.firstChild.classList.contains("border-b")===!0?(e.tab.firstChild.classList.add("border-b-0"),e.tab.firstChild.classList.remove("border-b")):e.tab.firstChild.classList.add("border-b-0"),e.container.classList.contains("hidden")===!0&&e.container.classList.remove("hidden"),e.container.classList.add("block")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.contains("border-b-0")===!0?(e.tab.firstChild.classList.add("border-b"),e.tab.firstChild.classList.remove("border-b-0")):e.tab.firstChild.classList.add("border-b"),e.container.classList.contains("block")===!0&&(e.container.classList.remove("block"),e.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var s=e.firstChild,u="".concat(t,"%");s.setAttribute("aria-valuenow",t),s.style.width=u,s.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),t.removeAttribute("aria-valuenow"),t.classList.add("w-full"),t.innerHTML=""}}},{key:"getInputGroup",value:function(e,t){if(e){var s=document.createElement("div");s.classList.add("relative","items-stretch","w-full"),s.appendChild(e);var u=document.createElement("div");u.classList.add("-mr-1"),s.appendChild(u);for(var k=0;k<t.length;k++)u.appendChild(t[k]);return s}}}])&&f1(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(xn);cm.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",".switch":"position:relative;display:inline-block;width:28px;height:16px;margin-right:10px",".switch input":"opacity:0;width:0;height:0",".switch-slider":"position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:%23ccc;transition:.1s;border-radius:34px",".switch-slider:before":"position:absolute;content:%22%22;height:12px;width:12px;left:1px;top:2px;background-color:white;transition:.1s;border-radius:50%25","input:checked + .switch-slider":"background-color:%232196F3","input:focus + .switch-slider":"box-shadow:0%200%201px%20%232196F3","input:checked + .switch-slider:before":"transform:translateX(12px)","input:disabled + .switch-slider":"opacity:0.5"};var v1={html:Wp,bootstrap3:Yp,bootstrap4:Xp,bootstrap5:tm,jqueryui:nm,barebones:om,spectre:sm,tailwind:cm};const b1={".table-responsive .autocomplete-result-list":"position:relative%20!important",".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 Vi(l){return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vi(l)}function ku(l,r){(r==null||r>l.length)&&(r=l.length);for(var n=0,c=new Array(r);n<r;n++)c[n]=l[n];return c}function ju(){ju=function(){return r};var l,r={},n=Object.prototype,c=n.hasOwnProperty,e=Object.defineProperty||function(Z,K,oe){Z[K]=oe.value},t=typeof Symbol=="function"?Symbol:{},s=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",k=t.toStringTag||"@@toStringTag";function T(Z,K,oe){return Object.defineProperty(Z,K,{value:oe,enumerable:!0,configurable:!0,writable:!0}),Z[K]}try{T({},"")}catch{T=function(K,oe,ke){return K[oe]=ke}}function N(Z,K,oe,ke){var fe=K&&K.prototype instanceof xe?K:xe,Te=Object.create(fe.prototype),Xe=new sn(ke||[]);return e(Te,"_invoke",{value:ar(Z,oe,Xe)}),Te}function B(Z,K,oe){try{return{type:"normal",arg:Z.call(K,oe)}}catch(ke){return{type:"throw",arg:ke}}}r.wrap=N;var q="suspendedStart",Q="suspendedYield",X="executing",le="completed",ye={};function xe(){}function Pe(){}function Be(){}var Ke={};T(Ke,s,(function(){return this}));var tt=Object.getPrototypeOf,we=tt&&tt(tt(sr([])));we&&we!==n&&c.call(we,s)&&(Ke=we);var Ce=Be.prototype=xe.prototype=Object.create(Ke);function at(Z){["next","throw","return"].forEach((function(K){T(Z,K,(function(oe){return this._invoke(K,oe)}))}))}function vt(Z,K){function oe(fe,Te,Xe,bt){var gt=B(Z[fe],Z,Te);if(gt.type!=="throw"){var gr=gt.arg,Hr=gr.value;return Hr&&Vi(Hr)=="object"&&c.call(Hr,"__await")?K.resolve(Hr.__await).then((function(lr){oe("next",lr,Xe,bt)}),(function(lr){oe("throw",lr,Xe,bt)})):K.resolve(Hr).then((function(lr){gr.value=lr,Xe(gr)}),(function(lr){return oe("throw",lr,Xe,bt)}))}bt(gt.arg)}var ke;e(this,"_invoke",{value:function(fe,Te){function Xe(){return new K((function(bt,gt){oe(fe,Te,bt,gt)}))}return ke=ke?ke.then(Xe,Xe):Xe()}})}function ar(Z,K,oe){var ke=q;return function(fe,Te){if(ke===X)throw Error("Generator is already running");if(ke===le){if(fe==="throw")throw Te;return{value:l,done:!0}}for(oe.method=fe,oe.arg=Te;;){var Xe=oe.delegate;if(Xe){var bt=ni(Xe,oe);if(bt){if(bt===ye)continue;return bt}}if(oe.method==="next")oe.sent=oe._sent=oe.arg;else if(oe.method==="throw"){if(ke===q)throw ke=le,oe.arg;oe.dispatchException(oe.arg)}else oe.method==="return"&&oe.abrupt("return",oe.arg);ke=X;var gt=B(Z,K,oe);if(gt.type==="normal"){if(ke=oe.done?le:Q,gt.arg===ye)continue;return{value:gt.arg,done:oe.done}}gt.type==="throw"&&(ke=le,oe.method="throw",oe.arg=gt.arg)}}}function ni(Z,K){var oe=K.method,ke=Z.iterator[oe];if(ke===l)return K.delegate=null,oe==="throw"&&Z.iterator.return&&(K.method="return",K.arg=l,ni(Z,K),K.method==="throw")||oe!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+oe+"' method")),ye;var fe=B(ke,Z.iterator,K.arg);if(fe.type==="throw")return K.method="throw",K.arg=fe.arg,K.delegate=null,ye;var Te=fe.arg;return Te?Te.done?(K[Z.resultName]=Te.value,K.next=Z.nextLoc,K.method!=="return"&&(K.method="next",K.arg=l),K.delegate=null,ye):Te:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,ye)}function Go(Z){var K={tryLoc:Z[0]};1 in Z&&(K.catchLoc=Z[1]),2 in Z&&(K.finallyLoc=Z[2],K.afterLoc=Z[3]),this.tryEntries.push(K)}function Ne(Z){var K=Z.completion||{};K.type="normal",delete K.arg,Z.completion=K}function sn(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(Go,this),this.reset(!0)}function sr(Z){if(Z||Z===""){var K=Z[s];if(K)return K.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var oe=-1,ke=function fe(){for(;++oe<Z.length;)if(c.call(Z,oe))return fe.value=Z[oe],fe.done=!1,fe;return fe.value=l,fe.done=!0,fe};return ke.next=ke}}throw new TypeError(Vi(Z)+" is not iterable")}return Pe.prototype=Be,e(Ce,"constructor",{value:Be,configurable:!0}),e(Be,"constructor",{value:Pe,configurable:!0}),Pe.displayName=T(Be,k,"GeneratorFunction"),r.isGeneratorFunction=function(Z){var K=typeof Z=="function"&&Z.constructor;return!!K&&(K===Pe||(K.displayName||K.name)==="GeneratorFunction")},r.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,Be):(Z.__proto__=Be,T(Z,k,"GeneratorFunction")),Z.prototype=Object.create(Ce),Z},r.awrap=function(Z){return{__await:Z}},at(vt.prototype),T(vt.prototype,u,(function(){return this})),r.AsyncIterator=vt,r.async=function(Z,K,oe,ke,fe){fe===void 0&&(fe=Promise);var Te=new vt(N(Z,K,oe,ke),fe);return r.isGeneratorFunction(K)?Te:Te.next().then((function(Xe){return Xe.done?Xe.value:Te.next()}))},at(Ce),T(Ce,k,"Generator"),T(Ce,s,(function(){return this})),T(Ce,"toString",(function(){return"[object Generator]"})),r.keys=function(Z){var K=Object(Z),oe=[];for(var ke in K)oe.push(ke);return oe.reverse(),function fe(){for(;oe.length;){var Te=oe.pop();if(Te in K)return fe.value=Te,fe.done=!1,fe}return fe.done=!0,fe}},r.values=sr,sn.prototype={constructor:sn,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(Ne),!Z)for(var K in this)K.charAt(0)==="t"&&c.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=l)},stop:function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval},dispatchException:function(Z){if(this.done)throw Z;var K=this;function oe(gt,gr){return Te.type="throw",Te.arg=Z,K.next=gt,gr&&(K.method="next",K.arg=l),!!gr}for(var ke=this.tryEntries.length-1;ke>=0;--ke){var fe=this.tryEntries[ke],Te=fe.completion;if(fe.tryLoc==="root")return oe("end");if(fe.tryLoc<=this.prev){var Xe=c.call(fe,"catchLoc"),bt=c.call(fe,"finallyLoc");if(Xe&&bt){if(this.prev<fe.catchLoc)return oe(fe.catchLoc,!0);if(this.prev<fe.finallyLoc)return oe(fe.finallyLoc)}else if(Xe){if(this.prev<fe.catchLoc)return oe(fe.catchLoc,!0)}else{if(!bt)throw Error("try statement without catch or finally");if(this.prev<fe.finallyLoc)return oe(fe.finallyLoc)}}}},abrupt:function(Z,K){for(var oe=this.tryEntries.length-1;oe>=0;--oe){var ke=this.tryEntries[oe];if(ke.tryLoc<=this.prev&&c.call(ke,"finallyLoc")&&this.prev<ke.finallyLoc){var fe=ke;break}}fe&&(Z==="break"||Z==="continue")&&fe.tryLoc<=K&&K<=fe.finallyLoc&&(fe=null);var Te=fe?fe.completion:{};return Te.type=Z,Te.arg=K,fe?(this.method="next",this.next=fe.finallyLoc,ye):this.complete(Te)},complete:function(Z,K){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&K&&(this.next=K),ye},finish:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var oe=this.tryEntries[K];if(oe.finallyLoc===Z)return this.complete(oe.completion,oe.afterLoc),Ne(oe),ye}},catch:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var oe=this.tryEntries[K];if(oe.tryLoc===Z){var ke=oe.completion;if(ke.type==="throw"){var fe=ke.arg;Ne(oe)}return fe}}throw Error("illegal catch attempt")},delegateYield:function(Z,K,oe){return this.delegate={iterator:sr(Z),resultName:K,nextLoc:oe},this.method==="next"&&(this.arg=l),ye}},r}function um(l,r,n,c,e,t,s){try{var u=l[t](s),k=u.value}catch(T){return void n(T)}u.done?r(k):Promise.resolve(k).then(c,e)}function g1(l,r){for(var n=0;n<r.length;n++){var c=r[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,_1(c.key),c)}}function _1(l){var r=(function(n,c){if(Vi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Vi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Vi(r)=="symbol"?r:r+""}var Cn=(function(){function l(t){var s=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((function(X,le){if(!(X instanceof le))throw new TypeError("Cannot call a class as a function")})(this,l),!(t instanceof Element))throw new Error("element should be an instance of Element");this.element=t,this.options=b({},l.defaults.options,u),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||l.defaults.translate,this.translateProperty=this.options.translateProperty||l.defaults.translateProperty,this.uuid=0,this.__data={};var k=this.options.theme||l.defaults.theme,T=l.defaults.themes[k];if(!T)throw new Error("Unknown theme ".concat(k));this.element.setAttribute("data-theme",k),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new T(this);var N=b(b1,this.getEditorsRules()),B=function(X,le,ye){return ye?s.addNewStyleRulesToShadowRoot(X,le,ye):s.addNewStyleRules(X,le)};if(!this.theme.options.disable_theme_rules){var q=E(this.element);B("default",N,q),T.rules!==void 0&&B(k,T.rules,q)}var Q=l.defaults.iconlibs[this.options.iconlib||l.defaults.iconlib];Q&&(this.iconlib=new Q),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}return r=l,n=[{key:"load",value:(c=ju().mark((function t(){var s,u,k,T,N,B,q=this;return ju().wrap((function(Q){for(;;)switch(Q.prev=Q.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(u=new hw(this.options)).onSchemaLoaded=function(X){q.trigger("schemaLoaded",X)},u.onAllSchemasLoaded=function(){q.trigger("allSchemasLoaded")},this.expandSchema=function(X){return u.expandSchema(X)},this.expandRefs=function(X,le){return u.expandRefs(X,le)},k=document.location.toString(),Q.next=9,u.load(this.schema,s,k);case 9:T=Q.sent,N=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new fp(this,null,N,l.defaults),B=this.getEditorClass(T),this.root=this.createEditor(B,{jsoneditor:this,schema:T,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),O(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(){q.ready&&(q.validation_results=q.validator.validate(q.root.getValue()),q.root.showValidationErrors(q.validation_results),q.trigger("ready"),q.trigger("change"))}));case 24:case"end":return Q.stop()}}),t,this)})),e=function(){var t=this,s=arguments;return new Promise((function(u,k){var T=c.apply(t,s);function N(q){um(T,u,k,N,B,"next",q)}function B(q){um(T,u,k,N,B,"throw",q)}N(void 0)}))},function(){return e.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(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}},{key:"validate",value:function(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}},{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(t,s){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(s),this}},{key:"off",value:function(t,s){if(t&&s){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var u=[],k=0;k<this.callbacks[t].length;k++)this.callbacks[t][k]!==s&&u.push(this.callbacks[t][k]);this.callbacks[t]=u}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,s){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var u=0;u<this.callbacks[t].length;u++)this.callbacks[t][u].apply(this,[s]);return this}},{key:"setOption",value:function(t,s){if(t!=="show_errors")throw new Error("Option ".concat(t," must be set during instantiation and cannot be changed later"));return this.options.show_errors=s,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(l.defaults.editors).reduce((function(t,s){return s.rules?b(t,s.rules):t}),{})}},{key:"getEditorClass",value:function(t){var s,u=this;if(t=this.expandSchema(t),l.defaults.resolvers.find((function(k){return(s=k(t,u))&&l.defaults.editors[s]})),!s)throw new Error("Unknown editor for schema ".concat(JSON.stringify(t)));if(!l.defaults.editors[s])throw new Error("Unknown editor ".concat(s));return l.defaults.editors[s]}},{key:"createEditor",value:function(t,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new t(s=b({},t.options||{},s),l.defaults,u)}},{key:"onChange",value:function(t){var s=this;if(this.ready&&(t&&this.trigger(t.event,t.data),!this.firing_change))return this.firing_change=!0,window.requestAnimationFrame((function(){s.firing_change=!1,s.ready&&(s.validation_results=s.validator.validate(s.root.getValue()),s.options.show_errors!=="never"?s.root.showValidationErrors(s.validation_results):s.root.showValidationErrors([]),s.trigger("change"))})),this}},{key:"compileTemplate",value:function(t){var s,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.defaults.template;if(typeof u=="string"){if(!l.defaults.templates[u])throw new Error("Unknown template engine ".concat(u));if(!(s=l.defaults.templates[u]()))throw new Error("Template engine ".concat(u," missing required library."))}else s=u;if(!s)throw new Error("No template engine set");if(!s.compile)throw new Error("Invalid template engine set");return s.compile(t)}},{key:"_data",value:function(t,s,u){if(arguments.length!==3)return t.hasAttribute("data-jsoneditor-".concat(s))?this.__data[t.getAttribute("data-jsoneditor-".concat(s))]:null;var k;t.hasAttribute("data-jsoneditor-".concat(s))?k=t.getAttribute("data-jsoneditor-".concat(s)):(k=this.uuid++,t.setAttribute("data-jsoneditor-".concat(s),k)),this.__data[k]=u}},{key:"registerEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=t,this}},{key:"unregisterEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=null,this}},{key:"getEditor",value:function(t){if(this.editors)return this.editors[t]}},{key:"watch",value:function(t,s){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(s),this}},{key:"unwatch",value:function(t,s){if(!this.watchlist||!this.watchlist[t])return this;if(!s)return this.watchlist[t]=null,this;for(var u=[],k=0;k<this.watchlist[t].length;k++)this.watchlist[t][k]!==s&&u.push(this.watchlist[t][k]);return this.watchlist[t]=u.length?u:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var s=0;s<this.watchlist[t].length;s++)this.watchlist[t][s]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(t){this.copyClipboard=t}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(t,s){var u=document.querySelector("#theme-".concat(t));u||((u=document.createElement("style")).setAttribute("id","theme-".concat(t)),u.appendChild(document.createTextNode("")),document.head.appendChild(u));for(var k=u.sheet?u.sheet:u.styleSheet,T=this.element.nodeName.toLowerCase();k.cssRules.length>0;)k.deleteRule(0);Object.keys(s).forEach((function(N){var B=t==="default"?N:"".concat(T,'[data-theme="').concat(t,'"] ').concat(N);k.insertRule?k.insertRule(B+" {"+decodeURIComponent(s[N])+"}",0):k.addRule&&k.addRule(B,decodeURIComponent(s[N]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,s,u){var k=this.element.nodeName.toLowerCase(),T="";Object.keys(s).forEach((function(q){var Q=t==="default"?q:"".concat(k,'[data-theme="').concat(t,'"] ').concat(q);T+=Q+" {"+decodeURIComponent(s[q])+`}
39
39
  `}));var N,B=new CSSStyleSheet;B.replaceSync(T),u.adoptedStyleSheets=[].concat((function(q){if(Array.isArray(q))return ku(q)})(N=u.adoptedStyleSheets)||(function(q){if(typeof Symbol<"u"&&q[Symbol.iterator]!=null||q["@@iterator"]!=null)return Array.from(q)})(N)||(function(q,Q){if(q){if(typeof q=="string")return ku(q,Q);var X=Object.prototype.toString.call(q).slice(8,-1);return X==="Object"&&q.constructor&&(X=q.constructor.name),X==="Map"||X==="Set"?Array.from(q):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?ku(q,Q):void 0}})(N)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
40
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(),[B])}},{key:"showValidationErrors",value:function(t){var s=t??this.validate();Object.values(this.editors).forEach((function(u){u&&(u.is_dirty=!0,u.showValidationErrors(s))}))}}],n&&g1(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,c,e})();Sn.defaults=$i,Sn.AbstractEditor=D,Sn.AbstractTheme=On,Sn.AbstractIconLib=En,Object.assign(Sn.defaults.themes,v1),Object.assign(Sn.defaults.editors,il),Object.assign(Sn.defaults.templates,fw),Object.assign(Sn.defaults.iconlibs,Mw)})(),_})()))})(hc)),hc.exports}var Og=Eg();Ab();function xg(o){}Dn(xg,{},[],[],!0);function Sg(o){}Dn(Sg,{},[],[],!0);var Cg=dt("<li> </li>"),Pg=dt('<div class="data-error">Errors : <ul></ul></div>'),Tg=dt('<div id="editor-json"></div> <!>',1),Rg=dt("<p> </p>");const Lg={hash:"svelte-1jdjhi",code:`#editor-json .row .form-control {display:flex;flex-direction:column;gap:0.25rem;}#editor-json .form-control label {order:-1; /* Label first */margin-bottom:0;font-size:15px !important;}#editor-json .form-control input,
40
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(),[B])}},{key:"showValidationErrors",value:function(t){var s=t??this.validate();Object.values(this.editors).forEach((function(u){u&&(u.is_dirty=!0,u.showValidationErrors(s))}))}}],n&&g1(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,c,e})();Cn.defaults=$i,Cn.AbstractEditor=D,Cn.AbstractTheme=xn,Cn.AbstractIconLib=On,Object.assign(Cn.defaults.themes,v1),Object.assign(Cn.defaults.editors,il),Object.assign(Cn.defaults.templates,fw),Object.assign(Cn.defaults.iconlibs,Mw)})(),_})()))})(hc)),hc.exports}var Og=Eg();Ab();function xg(o){}Dn(xg,{},[],[],!0);function Sg(o){}Dn(Sg,{},[],[],!0);var Cg=dt("<li> </li>"),Pg=dt('<div class="data-error">Errors : <ul></ul></div>'),Tg=dt('<div id="editor-json"></div> <!>',1),Rg=dt("<p> </p>");const Lg={hash:"svelte-1jdjhi",code:`#editor-json .row .form-control {display:flex;flex-direction:column;gap:0.25rem;}#editor-json .form-control label {order:-1; /* Label first */margin-bottom:0;font-size:15px !important;}#editor-json .form-control input,
41
41
  :global(#editor-json .form-control textarea) {width:100% !important;flex:1;box-sizing:border-box;font-size:20px !important;}
42
42
 
43
43
  /* Broader target with higher specificity */#editor-json input,
@@ -51,7 +51,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
51
51
 
52
52
  /* Checkbox inputs */#editor-json input[type="checkbox"] {width:20px !important;height:20px !important;margin-right:8px !important;accent-color:#007bff; /* Custom check color */background:#fff !important;}#editor-json label:has(input[type="checkbox"]) {font-size:18px !important;display:flex;align-items:center;gap:0.5rem;}
53
53
 
54
- /* Multi-checkbox combo */#editor-json .je-array-controls {background:transparent;}
54
+ /* Multi-checkbox combo */#editor-json .je-array-controls {background:transparent;}#editor-json .je-modal {background-color:#ccccccb0 !important;}#editor-json .json-editor-btn-edit_properties {margin-left:3px;margin-right:3px;}
55
55
 
56
56
  /* Full combo integration */#editor-json input,
57
57
  :global(#editor-json textarea) {font-size:20px !important;background:transparent !important;border:1px solid #cccccc4f !important;}
@@ -60,11 +60,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
60
60
 
61
61
  /* Type switcher: small, unstyled, inline with label */#editor-json select.je-switcher {width:auto !important;font-size:inherit !important;padding:initial !important;margin-left:0.5rem !important;background:initial !important;border:initial !important;box-sizing:content-box !important;display:inline-block !important;vertical-align:baseline !important;}
62
62
 
63
- /* Ensure the <b> label and switcher are on one line */#editor-json [data-schemapath="root.type"] > b {display:inline-block;margin-right:0.25rem;}`};function Zs(o,a){yi(a,!0),ya(o,Lg);let h=Dt(a,"schema",15),p=Dt(a,"schema_name",15),y=Dt(a,"data",15),_=Dt(a,"data_valid",15),d=Dt(a,"editor_options",23,()=>({})),v=Dt(a,"mode",7,"new");const i={schema:{new:!0,edit:!0,customEditor:!0},system_setting:{new:!0,edit:!0,property_modifications:{value:{type:"object",default:{}}}},system_key:{new:!0,edit:!0},system_edge_constraint:{new:!0,edit:!0,customEditor:!0},system_edge:{new:!0,edit:!0,customEditor:!0},system_media:{new:!0,edit:!0},system_log:{new:!1,edit:!1},system_script:{new:!0,edit:!0,customEditor:!0,property_modifications:{script:{format:"textarea"},usage:{format:"textarea"}}},system_text:{new:!0,edit:!0,property_modifications:{text:{format:"textarea",default:"Text..."}}}};let f=mt(null),m=mt(null),g=mt(null),b=mt(!1),w=mt("Loading"),E={theme:"barebones",titleHidden:!1,form_name_root:"",disable_collapse:!0,disable_edit_json:!1,disable_properties:!0,use_default_values:!0,disable_array_delete_last_row:!0,disable_array_reorder:!0,array_controls_top:!1,expand_height:!0},O=mt(kr({new:!0,edit:!0,customEditor:!1,property_modifications:{}}));const j=()=>{if(et(m,null),re(f)){if(!h())throw new Error("No schema provided");if(i[p()]&&(console.log("should update"),et(O,i[p()],!0)),console.log(re(O)),!re(O)[v()])throw et(w,`Editing ${p()} in ${v()} mode is not supported`),et(b,!1),_(!1),new Error("Can not be loaded");let R={...h()};re(O)?.property_modifications&&Object.keys(re(O).property_modifications).map(I=>{R.properties[I]={...R.properties[I],...re(O).property_modifications[I]}});const A={...E,...d(),schema:R};et(m,new Og.JSONEditor(re(f),A),!0),re(m).on("ready",()=>{y()&&re(m).setValue(y())}),re(m).on("change",()=>{const I=re(m).validate();console.log(I),_(I.length===0),_()?(y(re(m).getValue()),et(g,null)):et(g,I,!0)})}else console.error("Container element still null")};Js(async()=>{et(b,!0),setTimeout(j,50)});var x={get schema(){return h()},set schema(R){h(R),St()},get schema_name(){return p()},set schema_name(R){p(R),St()},get data(){return y()},set data(R){y(R),St()},get data_valid(){return _()},set data_valid(R){_(R),St()},get editor_options(){return d()},set editor_options(R={}){d(R),St()},get mode(){return v()},set mode(R="new"){v(R),St()}},S=Nn(),P=Mt(S);{var L=R=>{var A=Tg(),I=Mt(A);Bf(I,G=>et(f,G),()=>re(f));var D=Ue(I,2);{var M=G=>{var J=Pg(),Y=Ue(Le(J));io(Y,21,()=>re(g),pa,(se,ue)=>{var he=Cg(),de=Le(he);Re(he),Vt(()=>Tt(de,`${re(ue).path??""}:${re(ue).property??""}:${re(ue).message??""}`)),Me(se,he)}),Re(Y),Re(J),Me(G,J)},V=G=>{};Rt(D,G=>{_()?G(V,!1):G(M)})}Me(R,A)},C=R=>{var A=Rg(),I=Le(A,!0);Re(A),Vt(()=>Tt(I,re(w))),Me(R,A)};Rt(P,R=>{re(b)?R(L):R(C,!1)})}return Me(o,S),vi(x)}Dn(Zs,{schema:{},schema_name:{},data:{},data_valid:{},editor_options:{},mode:{}},[],[],!0);var Ag=dt("<button>Save changes</button>"),$g=dt("<!> <hr/> <!>",1),Ng=dt("<tr><td> </td><td> </td><td><button>Copy URL</button> <button>Copy Key</button></td></tr>"),Ig=dt('<tr><td colspan="3">No databases yet</td></tr>'),Dg=dt('<table border="1"><thead><tr><th>Name</th><th>About</th><th>Actions</th></tr></thead><tbody></tbody></table> <button> </button>',1);function Vf(o,a){yi(a,!0);let h=Dt(a,"mode",7,"list"),p=mt(kr([])),y=mt(!1),_=mt(!0);const d="bbdb-db-list",v={$schema:"http://json-schema.org/draft-07/schema#",type:"array",title:"Databases",minItems:1,items:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1},url:{type:"string",format:"uri",minLength:1},encryption_key:{type:"string",minLength:1},about:{type:"string",minLength:0}},required:["name","url","encryption_key","about"],additionalProperties:!1},uniqueItems:!0};Js(()=>{const O=localStorage.getItem(d);O&&et(p,JSON.parse(O),!0)});const i=()=>{localStorage.setItem(d,JSON.stringify(re(p))),et(y,!1)};function f(O){navigator.clipboard.writeText(O)}var m={get mode(){return h()},set mode(O="list"){h(O),St()}},g=Nn(),b=Mt(g);{var w=O=>{var j=$g(),x=Mt(j);Zs(x,{get schema(){return v},editor_options:{},get data(){return re(p)},set data(L){et(p,L,!0)},get data_valid(){return re(_)},set data_valid(L){et(_,L,!0)}});var S=Ue(x,4);{var P=L=>{var C=Ag();C.__click=()=>i(),Me(L,C)};Rt(S,L=>{re(_)&&L(P)})}Me(O,j)},E=O=>{var j=Dg(),x=Mt(j),S=Ue(Le(x));io(S,21,()=>re(p),pa,(C,R)=>{var A=Ng(),I=Le(A),D=Le(I,!0);Re(I);var M=Ue(I),V=Le(M,!0);Re(M);var G=Ue(M),J=Le(G);J.__click=()=>f(re(R).url);var Y=Ue(J,2);Y.__click=()=>f(re(R).encryption_key),Re(G),Re(A),Vt(()=>{Tt(D,re(R).name),Tt(V,re(R).about)}),Me(C,A)},C=>{var R=Ig();Me(C,R)}),Re(S),Re(x);var P=Ue(x,2);P.__click=()=>et(y,!re(y));var L=Le(P,!0);Re(P),Vt(()=>Tt(L,re(y)?"Cancel Editor mode":"Edit List/ Add new")),Me(O,j)};Rt(b,O=>{re(y)?O(w):O(E,!1)})}return Me(o,g),vi(m)}ic(["click"]),customElements.define("db-list",Dn(Vf,{mode:{}},[],[],!0));var Bg=dt('<span class="tag svelte-2vg1zj"> <button class="svelte-2vg1zj"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"></path></svg></button></span>'),Fg=dt('<div class="tags-editor svelte-2vg1zj"><div class="input-container svelte-2vg1zj"><div class="tags-list svelte-2vg1zj"><span style="padding: 2px;">Tags:</span> <!></div> <input placeholder="add tag..." class="svelte-2vg1zj"/></div></div>');const Mg={hash:"svelte-2vg1zj",code:`.tags-editor.svelte-2vg1zj {width:100%;}.input-container.svelte-2vg1zj {display:flex;flex-wrap:wrap;gap:0.5em;padding:0.5em;
63
+ /* Ensure the <b> label and switcher are on one line */#editor-json [data-schemapath="root.type"] > b {display:inline-block;margin-right:0.25rem;}`};function va(o,a){yi(a,!0),ya(o,Lg);let h=Dt(a,"schema",15),p=Dt(a,"schema_name",15),y=Dt(a,"data",15),_=Dt(a,"data_valid",15),d=Dt(a,"editor_options",23,()=>({})),v=Dt(a,"mode",7,"new");const i={schema:{new:!0,edit:!0,customEditor:!0},system_setting:{new:!0,edit:!0,property_modifications:{value:{type:"object",default:{}}}},system_key:{new:!0,edit:!0},system_edge_constraint:{new:!0,edit:!0,customEditor:!0},system_edge:{new:!0,edit:!0,customEditor:!0},system_media:{new:!0,edit:!0},system_log:{new:!1,edit:!1},system_script:{new:!0,edit:!0,customEditor:!0,property_modifications:{script:{format:"textarea"},usage:{format:"textarea"}}},system_text:{new:!0,edit:!0,property_modifications:{text:{format:"textarea",default:"Text..."}}}};let f=mt(null),m=mt(null),g=mt(null),b=mt(!1),w=mt("Loading"),E={theme:"barebones",titleHidden:!1,form_name_root:"",disable_collapse:!0,disable_edit_json:!1,disable_properties:!0,use_default_values:!0,disable_array_delete_last_row:!0,disable_array_reorder:!0,array_controls_top:!1,expand_height:!0},O=mt(kr({new:!0,edit:!0,customEditor:!1,property_modifications:{}}));const j=()=>{if(et(m,null),re(f)){if(!h())throw new Error("No schema provided");if(i[p()]&&(console.log("should update"),et(O,i[p()],!0)),console.log(re(O)),!re(O)[v()])throw et(w,`Editing ${p()} in ${v()} mode is not supported`),et(b,!1),_(!1),new Error("Can not be loaded");let R={...h()};re(O)?.property_modifications&&Object.keys(re(O).property_modifications).map(I=>{R.properties[I]={...R.properties[I],...re(O).property_modifications[I]}});const A={...E,...d(),schema:R};et(m,new Og.JSONEditor(re(f),A),!0),re(m).on("ready",()=>{y()&&re(m).setValue(y())}),re(m).on("change",()=>{const I=re(m).validate();console.log(I),_(I.length===0),_()?(y(re(m).getValue()),et(g,null)):et(g,I,!0)})}else console.error("Container element still null")};Ks(async()=>{et(b,!0),setTimeout(j,50)});var x={get schema(){return h()},set schema(R){h(R),St()},get schema_name(){return p()},set schema_name(R){p(R),St()},get data(){return y()},set data(R){y(R),St()},get data_valid(){return _()},set data_valid(R){_(R),St()},get editor_options(){return d()},set editor_options(R={}){d(R),St()},get mode(){return v()},set mode(R="new"){v(R),St()}},S=Nn(),P=Mt(S);{var L=R=>{var A=Tg(),I=Mt(A);Bf(I,G=>et(f,G),()=>re(f));var D=Ue(I,2);{var M=G=>{var J=Pg(),Y=Ue(Le(J));io(Y,21,()=>re(g),pa,(se,ue)=>{var he=Cg(),de=Le(he);Re(he),Vt(()=>Tt(de,`${re(ue).path??""}:${re(ue).property??""}:${re(ue).message??""}`)),Me(se,he)}),Re(Y),Re(J),Me(G,J)},V=G=>{};Rt(D,G=>{_()?G(V,!1):G(M)})}Me(R,A)},C=R=>{var A=Rg(),I=Le(A,!0);Re(A),Vt(()=>Tt(I,re(w))),Me(R,A)};Rt(P,R=>{re(b)?R(L):R(C,!1)})}return Me(o,S),vi(x)}customElements.define("json-editor",Dn(va,{schema:{},schema_name:{},data:{},data_valid:{},editor_options:{},mode:{}},[],[],!0));var Ag=dt("<button>Save changes</button>"),$g=dt("<!> <hr/> <!>",1),Ng=dt("<tr><td> </td><td> </td><td><button>Copy URL</button> <button>Copy Key</button></td></tr>"),Ig=dt('<tr><td colspan="3">No databases yet</td></tr>'),Dg=dt('<table border="1"><thead><tr><th>Name</th><th>About</th><th>Actions</th></tr></thead><tbody></tbody></table> <button> </button>',1);function Vf(o,a){yi(a,!0);let h=Dt(a,"mode",7,"list"),p=mt(kr([])),y=mt(!1),_=mt(!0);const d="bbdb-db-list",v={$schema:"http://json-schema.org/draft-07/schema#",type:"array",title:"Databases",minItems:1,items:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1},url:{type:"string",format:"uri",minLength:1},encryption_key:{type:"string",minLength:1},about:{type:"string",minLength:0}},required:["name","url","encryption_key","about"],additionalProperties:!1},uniqueItems:!0};Ks(()=>{const O=localStorage.getItem(d);O&&et(p,JSON.parse(O),!0)});const i=()=>{localStorage.setItem(d,JSON.stringify(re(p))),et(y,!1)};function f(O){navigator.clipboard.writeText(O)}var m={get mode(){return h()},set mode(O="list"){h(O),St()}},g=Nn(),b=Mt(g);{var w=O=>{var j=$g(),x=Mt(j);va(x,{get schema(){return v},editor_options:{},get data(){return re(p)},set data(L){et(p,L,!0)},get data_valid(){return re(_)},set data_valid(L){et(_,L,!0)}});var S=Ue(x,4);{var P=L=>{var C=Ag();C.__click=()=>i(),Me(L,C)};Rt(S,L=>{re(_)&&L(P)})}Me(O,j)},E=O=>{var j=Dg(),x=Mt(j),S=Ue(Le(x));io(S,21,()=>re(p),pa,(C,R)=>{var A=Ng(),I=Le(A),D=Le(I,!0);Re(I);var M=Ue(I),V=Le(M,!0);Re(M);var G=Ue(M),J=Le(G);J.__click=()=>f(re(R).url);var Y=Ue(J,2);Y.__click=()=>f(re(R).encryption_key),Re(G),Re(A),Vt(()=>{Tt(D,re(R).name),Tt(V,re(R).about)}),Me(C,A)},C=>{var R=Ig();Me(C,R)}),Re(S),Re(x);var P=Ue(x,2);P.__click=()=>et(y,!re(y));var L=Le(P,!0);Re(P),Vt(()=>Tt(L,re(y)?"Cancel Editor mode":"Edit List/ Add new")),Me(O,j)};Rt(b,O=>{re(y)?O(w):O(E,!1)})}return Me(o,g),vi(m)}ic(["click"]),customElements.define("db-list",Dn(Vf,{mode:{}},[],[],!0));var Bg=dt('<span class="tag svelte-2vg1zj"> <button class="svelte-2vg1zj"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"></path></svg></button></span>'),Fg=dt('<div class="tags-editor svelte-2vg1zj"><div class="input-container svelte-2vg1zj"><div class="tags-list svelte-2vg1zj"><span style="padding: 2px;">Tags:</span> <!></div> <input placeholder="add tag..." class="svelte-2vg1zj"/></div></div>');const Mg={hash:"svelte-2vg1zj",code:`.tags-editor.svelte-2vg1zj {width:100%;}.input-container.svelte-2vg1zj {display:flex;flex-wrap:wrap;gap:0.5em;padding:0.5em;
64
64
  /* border-bottom: 1px solid #cccccc4f; */}.tags-list.svelte-2vg1zj {display:flex;flex-wrap:wrap;gap:0.5em;flex:1;}.tag.svelte-2vg1zj {background:#007acc;color:white;padding:0.3em 0.6em;
65
65
  /* border-radius: 3px; */font-size:12px;}.tag.svelte-2vg1zj button:where(.svelte-2vg1zj) {margin-left:0.3em;background:none;border:none;color:inherit;font-size:12px;cursor:pointer;padding:0 0.2em;line-height:1;}.tag.svelte-2vg1zj button:where(.svelte-2vg1zj):hover {opacity:0.7;}input.svelte-2vg1zj {border:1px solid #cccccc4f;padding:0.4em;font-size:12px;min-width:100px;}input.svelte-2vg1zj:focus {outline:none;border-color:#007acc;}`};function zf(o,a){yi(a,!0),ya(o,Mg);let h=Dt(a,"tags",15),p=Dt(a,"saveTags",7);function y(){p()?.()}function _(w){if(w.key==="Enter"&&w.target.value.trim()){const E=w.target.value.trim().toLowerCase();h().includes(E)||h([...h(),E]),w.target.value="",y()}}function d(w){h(h().filter(E=>E!==w)),y()}var v={get tags(){return h()},set tags(w){h(w),St()},get saveTags(){return p()},set saveTags(w){p(w),St()}},i=Fg(),f=Le(i),m=Le(f),g=Ue(Le(m),2);io(g,17,h,pa,(w,E)=>{var O=Bg(),j=Le(O),x=Ue(j);x.__click=()=>d(re(E)),Re(O),Vt(()=>Tt(j,`${re(E)??""} `)),Me(w,O)}),Re(m);var b=Ue(m,2);return b.__keydown=_,Re(f),Re(i),Me(o,i),vi(v)}ic(["click","keydown"]),Dn(zf,{tags:{},saveTags:{}},[],[],!0);var Vg=dt('<div class="table-responsive"><div></div></div>');const zg={hash:"svelte-1nqgmja",code:`.table-responsive table {margin-bottom:0.5rem;}.table-responsive td > table {margin:0;}.table-responsive td, .table-responsive th {word-wrap:break-word;white-space:normal;max-width:400px;padding:0.5rem;}.table-responsive .table {font-size:0.875rem;}.table-responsive .align-top {vertical-align:top;}
66
66
 
67
- /* Preserve newlines, tabs, and spaces in string values */.table-responsive .preserve-whitespace {white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;}`};function qf(o,a){yi(a,!0),ya(o,zg);let h=Dt(a,"data",15),p;function y(g,b=0){const w=document.createElement("table");if(w.className="table table-bordered table-sm ",b>0&&(w.style.fontSize="0.9em",w.style.marginLeft="10px"),Array.isArray(g)){if(g.length===0){const O=w.insertRow().insertCell();return O.colSpan=2,O.textContent="(empty array)",O.className="text-muted fst-italic",w}g.forEach((E,O)=>{const j=w.insertRow(),x=j.insertCell();x.textContent=O,x.className="text-muted",x.style.width="50px";const S=j.insertCell();typeof E=="object"&&E!==null?S.appendChild(y(E,b+1)):(S.textContent=_(E),typeof E=="string"&&S.classList.add("preserve-whitespace"))})}else if(typeof g=="object"&&g!==null){if(Object.keys(g).length===0){const j=w.insertRow().insertCell();return j.colSpan=2,j.textContent="(empty object)",j.className="text-muted fst-italic",w}for(const O in g){const j=w.insertRow(),x=j.insertCell();x.innerHTML=`<strong>${d(O)}</strong>`,x.className="align-top",x.style.width="30%";const S=j.insertCell();typeof g[O]=="object"&&g[O]!==null?S.appendChild(y(g[O],b+1)):(S.textContent=_(g[O]),S.className="align-top",typeof g[O]=="string"&&S.classList.add("preserve-whitespace"))}}else{const O=w.insertRow().insertCell();O.colSpan=2,O.textContent=_(g),typeof g=="string"&&O.classList.add("preserve-whitespace")}return w}function _(g){return g===null?"null":g===void 0?"undefined":g===""?"(empty string)":typeof g=="boolean"||typeof g=="number"?g.toString():g}function d(g){const b=document.createElement("div");return b.textContent=g,b.innerHTML}function v(){if(h()&&p){p.innerHTML="";try{p.appendChild(y(h()))}catch(g){console.error("Error rendering table:",g),p.innerHTML='<div class="alert alert-danger">Error rendering data</div>'}}}ec(()=>{v()}),Js(()=>{v()});var i={get data(){return h()},set data(g){h(g),St()}},f=Vg(),m=Le(f);return Bf(m,g=>p=g,()=>p),Re(f),Me(o,f),vi(i)}Dn(qf,{data:{}},[],[],!0);var qg=dt('<div class="loading svelte-f31g1k">Searching...</div>'),Hg=dt('<div class="no-results svelte-f31g1k">No results</div>'),Ug=dt('<div><div class="item-title svelte-f31g1k"> </div> <div class="item-id svelte-f31g1k"> </div></div>'),Gg=dt('<div class="search-box svelte-f31g1k"><input type="text" placeholder="e.g. title.foo tag.bar" class="search-input svelte-f31g1k"/> <!> <div class="results-container svelte-f31g1k"><!></div></div>');const Jg={hash:"svelte-f31g1k",code:`.search-box.svelte-f31g1k {
67
+ /* Preserve newlines, tabs, and spaces in string values */.table-responsive .preserve-whitespace {white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;}`};function qf(o,a){yi(a,!0),ya(o,zg);let h=Dt(a,"data",15),p;function y(g,b=0){const w=document.createElement("table");if(w.className="table table-bordered table-sm ",b>0&&(w.style.fontSize="0.9em",w.style.marginLeft="10px"),Array.isArray(g)){if(g.length===0){const O=w.insertRow().insertCell();return O.colSpan=2,O.textContent="(empty array)",O.className="text-muted fst-italic",w}g.forEach((E,O)=>{const j=w.insertRow(),x=j.insertCell();x.textContent=O,x.className="text-muted",x.style.width="50px";const S=j.insertCell();typeof E=="object"&&E!==null?S.appendChild(y(E,b+1)):(S.textContent=_(E),typeof E=="string"&&S.classList.add("preserve-whitespace"))})}else if(typeof g=="object"&&g!==null){if(Object.keys(g).length===0){const j=w.insertRow().insertCell();return j.colSpan=2,j.textContent="(empty object)",j.className="text-muted fst-italic",w}for(const O in g){const j=w.insertRow(),x=j.insertCell();x.innerHTML=`<strong>${d(O)}</strong>`,x.className="align-top",x.style.width="30%";const S=j.insertCell();typeof g[O]=="object"&&g[O]!==null?S.appendChild(y(g[O],b+1)):(S.textContent=_(g[O]),S.className="align-top",typeof g[O]=="string"&&S.classList.add("preserve-whitespace"))}}else{const O=w.insertRow().insertCell();O.colSpan=2,O.textContent=_(g),typeof g=="string"&&O.classList.add("preserve-whitespace")}return w}function _(g){return g===null?"null":g===void 0?"undefined":g===""?"(empty string)":typeof g=="boolean"||typeof g=="number"?g.toString():g}function d(g){const b=document.createElement("div");return b.textContent=g,b.innerHTML}function v(){if(h()&&p){p.innerHTML="";try{p.appendChild(y(h()))}catch(g){console.error("Error rendering table:",g),p.innerHTML='<div class="alert alert-danger">Error rendering data</div>'}}}ec(()=>{v()}),Ks(()=>{v()});var i={get data(){return h()},set data(g){h(g),St()}},f=Vg(),m=Le(f);return Bf(m,g=>p=g,()=>p),Re(f),Me(o,f),vi(i)}Dn(qf,{data:{}},[],[],!0);var qg=dt('<div class="loading svelte-f31g1k">Searching...</div>'),Hg=dt('<div class="no-results svelte-f31g1k">No results</div>'),Ug=dt('<div><div class="item-title svelte-f31g1k"> </div> <div class="item-id svelte-f31g1k"> </div></div>'),Gg=dt('<div class="search-box svelte-f31g1k"><input type="text" placeholder="e.g. title.foo tag.bar" class="search-input svelte-f31g1k"/> <!> <div class="results-container svelte-f31g1k"><!></div></div>');const Jg={hash:"svelte-f31g1k",code:`.search-box.svelte-f31g1k {
68
68
  /* border: 1px solid #ccc; */
69
69
  /* border-radius: 4px; */width:inherit;max-height:300px;overflow:hidden;}.search-input.svelte-f31g1k {width:100%;padding:5px;border:none;
70
70
  /* border-bottom: 1px solid #eee; */font-size:14px;box-sizing:border-box;}.search-input.svelte-f31g1k:focus {outline:none;}.results-container.svelte-f31g1k {max-height:220px;overflow-y:auto;}.result-item.svelte-f31g1k {padding:12px;cursor:pointer;border-bottom:1px solid #f5f5f5;}.result-item.svelte-f31g1k:hover {background:#f9f9f9;}.result-item.selected.svelte-f31g1k {background:#f0f0f0;}.item-title.svelte-f31g1k {font-size:14px;margin-bottom:4px;}.item-id.svelte-f31g1k {font-size:12px;color:#666;font-family:monospace;}.loading.svelte-f31g1k,
@@ -91,5 +91,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
91
91
  } */details.svelte-17un9g9 summary:where(.svelte-17un9g9)::-webkit-details-marker {display:none;}details.svelte-17un9g9 summary:where(.svelte-17un9g9) {width:100%;padding:0.5rem 0;border-top:1px solid #cccccc4f;position:relative;cursor:pointer;font-size:1.25rem;font-weight:300;list-style:none;}details.svelte-17un9g9 summary:where(.svelte-17un9g9):after {content:"+";color:#cccccc4f;position:absolute;font-size:1.75rem;line-height:0;margin-top:0.75rem;right:0;font-weight:200;transform-origin:center;transition:200ms linear;}details[open].svelte-17un9g9 summary:where(.svelte-17un9g9):after {transform:rotate(45deg);font-size:2rem;}details.svelte-17un9g9 summary:where(.svelte-17un9g9) {outline:0;}details.svelte-17un9g9 {padding:2px;}.action-btn.svelte-17un9g9 {padding:2px;margin-left:2px;margin-right:2px;}button.svelte-17un9g9 {font-size:14px;padding-left:2px;padding-right:2px;}.card.svelte-17un9g9{border:1px solid #dfdfdf36;margin-top:5px;padding:5px;}.card.svelte-17un9g9 {display:flex;flex-direction:row;
92
92
  /* background-color: DodgerBlue; */padding:5px;}.search-input.svelte-17un9g9 {
93
93
  /* width: 100%; */padding:5px;border:none;
94
- /* border-bottom: 1px solid #eee; */font-size:14px;box-sizing:border-box;}.related-list.svelte-17un9g9{font-size:14px;} td.svelte-17un9g9 {padding:10px;}`};function Uf(o,a){yi(a,!0),ya(o,u_);let h=Dt(a,"BBDB",7),p=Dt(a,"new_doc",7,!0),y=Dt(a,"search_criteria",7),_=Dt(a,"schema_name",7),d=Dt(a,"mode",7,"view"),v=Dt(a,"edit_mode",7,"internal"),i=Dt(a,"setting_schemas",23,()=>({})),f=mt("Loading...");const m=($,F)=>{a.$$host.dispatchEvent(new CustomEvent("action",{detail:{name:$,...F},bubbles:!0,composed:!0}))},g={system_text:{engine:"mustache",format:"html",template:"{{doc.data.text}}",description:"HTML"},system_media:{engine:"mustache",format:"html",template:'<img src="{{doc.data.imageBase64}}" alt="Document image" /><p>{{doc.data.caption}}</p> ',description:"HTML"}};let b=mt(kr({selected_schema:"",schema:null,list:[],doc:null,doc_valid:!1})),w=mt(kr({doc:{},schema:{},data_valid:!0,related_docs:{}})),E=mt(""),O=mt(kr({edit_title:!1}));Js(async()=>{try{if(!h())throw new Error("No instance of BBDB provided to the component");if(p())if(_())re(b).selected_schema=_(),re(b).schema=await j(_());else{let $=await h().get({type:"schema_list"});console.log($),re(b).list=await h().get({type:"schema_list"})}else{if(!y())throw new Error("Search criteria for doc not provided");if(!["view","edit"].includes(d()))throw new Error("Invalid mode");await P()}et(f,"")}catch($){console.error($),et(f,`Error loading. ${$.message}`),m("message",{type:"error",message:re(f)})}});const j=async $=>(await h().get({type:"schema",criteria:{name:$}})).data.schema,x=async $=>{console.log($),re(b).selected_schema="",re(b).schema=null,re(b).doc={},setTimeout(async()=>{re(b).selected_schema=$,re(b).selected_schema&&(re(b).schema=await j($))},50)},S=async()=>{try{let $=await h().create({schema:re(b).selected_schema,data:re(b).doc,meta:{}});m("message_link",{type:"success",message:"Document added.",link:`${h().meta.database_name}.link.${$.meta.link}`}),L()}catch($){console.log($),m("message",{type:"error",message:`${$.message}`})}},P=async()=>{try{let $=await h().read({...y(),include_schema:!0});et(w,$,!0),console.log(re(w)),C()}catch($){console.log($),m("message",{type:"error",message:`${$.message}`})}},L=async()=>{re(b).selected_schema="",re(b).schema=null,re(b).doc=null,setTimeout(async()=>{_()&&(re(b).selected_schema=_(),re(b).schema=await j(_()))},50)},C=()=>{et(E,"");let $=re(w).doc.schema;g[$]&&(et(E,mr.render(g[$].template,re(w)),!0),console.log(re(E)))};let R=mt(!1);const A=async $=>{if(re(R))throw new Error("Update already in progress");et(R,!0);try{let F={},ee={_id:re(w).doc._id};$=="title"?F={meta:{title:re(w).doc.meta.title}}:$=="tags"?F={meta:{tags:re(w).doc.meta.tags}}:$=="data"&&(F={data:re(w).doc.data}),console.log(F);let ge=await h().update({criteria:ee,updates:F});console.log(ge)}catch(F){console.log(F)}finally{et(R,!1)}},I=async($,F,ee)=>{$.key==="Enter"&&$.target.value.trim()&&(await A(F),ee&&ee())},D=async()=>{await A("tags")},M=($,F)=>{{const ee=new Date(Number($)*1e3);return isNaN(ee.getTime())?"Invalid date":ee.toLocaleString()}},V=()=>{d()!="edit"&&d("edit")},G=()=>{d()!="view"&&(C(),d("view"))},J=async()=>{await A("data")},Y=async()=>{try{re(w).related_docs={};let $=await h().get({type:"related_doc",criteria:{link:re(w).doc.meta.link}});console.log($),re(w).related_docs=$}catch($){console.log($),m("message",{message:"No related docs exists",type:"danger"})}};let se=mt(""),ue=mt("related");const he=async()=>{re(se)||m("message",{type:"error",message:"No doc selected"}),console.log(re(se));let $={edge_name:re(ue),node1:re(w).doc._id,node2:re(se)};console.log($);let F=await h().create({data:$,schema:"system_edge"});console.log(F),Y()},de=async $=>{console.log($),await h().delete({_id:$}),Y()};var be={get BBDB(){return h()},set BBDB($){h($),St()},get new_doc(){return p()},set new_doc($=!0){p($),St()},get search_criteria(){return y()},set search_criteria($){y($),St()},get schema_name(){return _()},set schema_name($){_($),St()},get mode(){return d()},set mode($="view"){d($),St()},get edit_mode(){return v()},set edit_mode($="internal"){v($),St()},get setting_schemas(){return i()},set setting_schemas($={}){i($),St()}},ie=Nn(),H=Mt(ie);{var te=$=>{var F=oc();Vt(()=>Tt(F,re(f))),Me($,F)},z=$=>{var F=Nn(),ee=Mt(F);{var ge=je=>{var ve=Xg(),U=Mt(ve);{var W=Oe=>{var $e=Kg(),Fe=Le($e);Re($e),Vt(()=>Tt(Fe,`Create new ${_()??""} doc`)),Me(Oe,$e)},ne=Oe=>{var $e=Zg(),Fe=Ue(Mt($e),2);Fe.__change=Ae=>{x(Ae.target.value)};var Ze=Le(Fe);Ze.value=Ze.__value="";var Ye=Ue(Ze);io(Ye,17,()=>re(b).list,pa,(Ae,Qe)=>{var De=Wg(),nt=Le(De,!0);Re(De);var me={};Vt(()=>{Tt(nt,re(Qe).title),me!==(me=re(Qe).name)&&(De.value=(De.__value=re(Qe).name)??"")}),Me(Ae,De)}),Re(Fe),Me(Oe,$e)};Rt(U,Oe=>{_()?Oe(W):Oe(ne,!1)})}var ce=Ue(U,2);{var pe=Oe=>{var $e=Qg(),Fe=Mt($e);Zs(Fe,{mode:"new",get schema(){return re(b).schema},set schema(Ae){re(b).schema=Ae},get schema_name(){return re(b).selected_schema},set schema_name(Ae){re(b).selected_schema=Ae},get data(){return re(b).doc},set data(Ae){re(b).doc=Ae},get data_valid(){return re(b).doc_valid},set data_valid(Ae){re(b).doc_valid=Ae}});var Ze=Ue(Fe,2);{var Ye=Ae=>{var Qe=Yg(),De=Mt(Qe);De.__click=()=>{S()};var nt=Ue(De,2),me=Le(nt,!0);Re(nt),Vt(Ee=>Tt(me,Ee),[()=>JSON.stringify(re(b).doc,null,2)]),Me(Ae,Qe)};Rt(Ze,Ae=>{re(b).doc_valid&&Ae(Ye)})}Me(Oe,$e)};Rt(ce,Oe=>{re(b).selected_schema&&Oe(pe)})}Me(je,ve)},_e=je=>{var ve=c_(),U=Mt(ve),W=Le(U);{var ne=He=>{var yt=e_(),qt=Mt(yt);lc(qt),qt.__keydown=kt=>{I(kt,"title",()=>{re(O).edit_title=!re(O).edit_title})};var fr=Ue(qt,2),wt=Le(fr);wt.__click=()=>{A("title")};var ht=Ue(wt,2);ht.__click=()=>{re(O).edit_title=!re(O).edit_title},Re(fr),cc(qt,()=>re(w).doc.meta.title,kt=>re(w).doc.meta.title=kt),Me(He,yt)},ce=He=>{var yt=t_();yt.__dblclick=()=>{re(O).edit_title=!0};var qt=Le(yt),fr=Ue(qt);fr.__click=()=>{re(O).edit_title=!re(O).edit_title},Re(yt),Vt(()=>Tt(qt,`${re(w).doc.meta.title??""} `)),Me(He,yt)};Rt(W,He=>{re(O).edit_title?He(ne):He(ce,!1)})}Re(U);var pe=Ue(U,2),Oe=Ue(Le(pe),2),$e=Le(Oe),Fe=Le($e),Ze=Le(Fe),Ye=Le(Ze);Re(Ze);var Ae=Ue(Ze),Qe=Le(Ae);Re(Ae),Re(Fe),Re($e),Re(Oe);var De=Ue(Oe,2);zf(De,{saveTags:()=>{D()},get tags(){return re(w).doc.meta.tags},set tags(He){re(w).doc.meta.tags=He}}),Re(pe);var nt=Ue(pe,2),me=Ue(Le(nt),2),Ee=Ue(Le(me),4);Ee.__click=()=>{Y()},Re(me);var Se=Ue(me,2),qe=Le(Se);{var it=He=>{var yt=o_(),qt=Le(yt);io(qt,21,()=>re(w).related_docs.edges,pa,(fr,wt)=>{var ht=i_(),kt=Le(ht),wn=Le(kt);{var fc=Nt=>{var Wt=oc();Vt(()=>Tt(Wt,re(w).related_docs.details[re(wt).node1].title)),Me(Nt,Wt)},Fn=Nt=>{var Wt=r_();Wt.__click=()=>{m("open_link",{link:`${h().meta.database_name}._id.${re(wt).node1}`})};var so=Le(Wt,!0);Re(Wt),Vt(()=>Tt(so,re(w).related_docs.details[re(wt).node1].title)),Me(Nt,Wt)};Rt(wn,Nt=>{re(wt).node1==re(w).doc._id?Nt(fc):Nt(Fn,!1)})}Re(kt);var va=Ue(kt),pc=Le(va,!0);Re(va);var ba=Ue(va),Ys=Le(ba);{var Oi=Nt=>{var Wt=oc();Vt(()=>Tt(Wt,re(w).related_docs.details[re(wt).node2].title)),Me(Nt,Wt)},Yr=Nt=>{var Wt=n_();Wt.__click=()=>{m("open_link",{link:`${h().meta.database_name}._id.${re(wt).node2}`})};var so=Le(Wt),yc=Le(so,!0);Re(so),Re(Wt),Vt(()=>Tt(yc,re(w).related_docs.details[re(wt).node2].title)),Me(Nt,Wt)};Rt(Ys,Nt=>{re(wt).node2==re(w).doc._id?Nt(Oi):Nt(Yr,!1)})}Re(ba);var ao=Ue(ba),mc=Le(ao);mc.__click=()=>{de(re(wt).edge_id)},Re(ao),Re(ht),Vt(()=>Tt(pc,re(wt).label)),Me(fr,ht)}),Re(qt),Re(yt),Me(He,yt)};Rt(qe,He=>{re(w).related_docs&&He(it)})}var Et=Ue(qe,6),Ct=Le(Et),Lt=Le(Ct);Hf(Lt,{get BBDB(){return h()},get selected(){return re(se)},set selected(He){et(se,He,!0)}}),Re(Ct);var _t=Ue(Ct,2),At=Ue(Le(_t),2);lc(At),Re(_t);var zt=Ue(_t,2),$t=Le(zt);$t.__click=()=>{he()},Re(zt),Re(Et),Re(Se),Re(nt);var Ei=Ue(nt,2),Bn=Le(Ei),Ie=Ue(Le(Bn));{var Ge=He=>{var yt=a_();yt.__click=()=>V(),Me(He,yt)},Ve=He=>{var yt=Nn(),qt=Mt(yt);{var fr=wt=>{var ht=s_(),kt=Mt(ht);kt.__click=()=>J();var wn=Ue(kt,2);wn.__click=()=>G(),Me(wt,ht)};Rt(qt,wt=>{d()=="edit"&&wt(fr)},!0)}Me(He,yt)};Rt(Ie,He=>{d()=="view"?He(Ge):He(Ve,!1)})}Re(Bn);var Je=Ue(Bn,2);{var Ot=He=>{var yt=Nn(),qt=Mt(yt);{var fr=ht=>{var kt=l_(),wn=Le(kt);pg(wn,()=>re(E)),Re(kt),Me(ht,kt)},wt=ht=>{qf(ht,{get data(){return re(w).doc.data}})};Rt(qt,ht=>{re(E)?ht(fr):ht(wt,!1)})}Me(He,yt)},oo=He=>{var yt=Nn(),qt=Mt(yt);{var fr=wt=>{Zs(wt,{mode:"edit",get schema(){return re(w).schema},set schema(ht){re(w).schema=ht},get schema_name(){return re(w).doc.schema.schema},set schema_name(ht){re(w).doc.schema.schema=ht},get data(){return re(w).doc.data},set data(ht){re(w).doc.data=ht},get data_valid(){return re(w).doc_valid},set data_valid(ht){re(w).doc_valid=ht}})};Rt(qt,wt=>{d()=="edit"&&wt(fr)},!0)}Me(He,yt)};Rt(Je,He=>{d()=="view"?He(Ot):He(oo,!1)})}Re(Ei),Vt((He,yt)=>{Tt(Ye,`Created On : ${He??""}`),Tt(Qe,`Updated On: ${yt??""}`)},[()=>M(re(w).doc.meta.created_on),()=>M(re(w).doc.meta.updated_on)]),cc(At,()=>re(ue),He=>et(ue,He)),Me(je,ve)};Rt(ee,je=>{p()?je(ge):je(_e,!1)},!0)}Me($,F)};Rt(H,$=>{re(f)?$(te):$(z,!1)})}return Me(o,ie),vi(be)}ic(["change","click","keydown","dblclick"]),customElements.define("bbdb-doc",Dn(Uf,{BBDB:{},new_doc:{},search_criteria:{},schema_name:{},mode:{},edit_mode:{},setting_schemas:{}},[],[],!0));const d_=Zv;Cn.BBDB=d_,Cn.DBList=Vf,Cn.Doc=Uf,Object.defineProperty(Cn,Symbol.toStringTag,{value:"Module"})}));
94
+ /* border-bottom: 1px solid #eee; */font-size:14px;box-sizing:border-box;}.related-list.svelte-17un9g9{font-size:14px;} td.svelte-17un9g9 {padding:10px;}`};function Uf(o,a){yi(a,!0),ya(o,u_);let h=Dt(a,"BBDB",7),p=Dt(a,"new_doc",7,!0),y=Dt(a,"search_criteria",7),_=Dt(a,"schema_name",7),d=Dt(a,"mode",7,"view"),v=Dt(a,"edit_mode",7,"internal"),i=Dt(a,"setting_schemas",23,()=>({})),f=mt("Loading...");const m=($,F)=>{a.$$host.dispatchEvent(new CustomEvent("action",{detail:{name:$,...F},bubbles:!0,composed:!0}))},g={system_text:{engine:"mustache",format:"html",template:"{{doc.data.text}}",description:"HTML"},system_media:{engine:"mustache",format:"html",template:'<img src="{{doc.data.imageBase64}}" alt="Document image" /><p>{{doc.data.caption}}</p> ',description:"HTML"}};let b=mt(kr({selected_schema:"",schema:null,list:[],doc:null,doc_valid:!1})),w=mt(kr({doc:{},schema:{},data_valid:!0,related_docs:{}})),E=mt(""),O=mt(kr({edit_title:!1}));Ks(async()=>{try{if(!h())throw new Error("No instance of BBDB provided to the component");if(p())if(_())re(b).selected_schema=_(),re(b).schema=await j(_());else{let $=await h().get({type:"schema_list"});console.log($),re(b).list=await h().get({type:"schema_list"})}else{if(!y())throw new Error("Search criteria for doc not provided");if(!["view","edit"].includes(d()))throw new Error("Invalid mode");await P()}et(f,"")}catch($){console.error($),et(f,`Error loading. ${$.message}`),m("message",{type:"error",message:re(f)})}});const j=async $=>(await h().get({type:"schema",criteria:{name:$}})).data.schema,x=async $=>{console.log($),re(b).selected_schema="",re(b).schema=null,re(b).doc={},setTimeout(async()=>{re(b).selected_schema=$,re(b).selected_schema&&(re(b).schema=await j($))},50)},S=async()=>{try{let $=await h().create({schema:re(b).selected_schema,data:re(b).doc,meta:{}});m("message_link",{type:"success",message:"Document added.",link:`${h().meta.database_name}.link.${$.meta.link}`}),L()}catch($){console.log($),m("message",{type:"error",message:`${$.message}`})}},P=async()=>{try{let $=await h().read({...y(),include_schema:!0});et(w,$,!0),console.log(re(w)),C()}catch($){console.log($),m("message",{type:"error",message:`${$.message}`})}},L=async()=>{re(b).selected_schema="",re(b).schema=null,re(b).doc=null,setTimeout(async()=>{_()&&(re(b).selected_schema=_(),re(b).schema=await j(_()))},50)},C=()=>{et(E,"");let $=re(w).doc.schema;g[$]&&(et(E,mr.render(g[$].template,re(w)),!0),console.log(re(E)))};let R=mt(!1);const A=async $=>{if(re(R))throw new Error("Update already in progress");et(R,!0);try{let F={},ee={_id:re(w).doc._id};$=="title"?F={meta:{title:re(w).doc.meta.title}}:$=="tags"?F={meta:{tags:re(w).doc.meta.tags}}:$=="data"&&(F={data:re(w).doc.data}),console.log(F);let ge=await h().update({criteria:ee,updates:F});console.log(ge)}catch(F){console.log(F)}finally{et(R,!1)}},I=async($,F,ee)=>{$.key==="Enter"&&$.target.value.trim()&&(await A(F),ee&&ee())},D=async()=>{await A("tags")},M=($,F)=>{{const ee=new Date(Number($)*1e3);return isNaN(ee.getTime())?"Invalid date":ee.toLocaleString()}},V=()=>{d()!="edit"&&d("edit")},G=()=>{d()!="view"&&(C(),d("view"))},J=async()=>{await A("data")},Y=async()=>{try{re(w).related_docs={};let $=await h().get({type:"related_doc",criteria:{link:re(w).doc.meta.link}});console.log($),re(w).related_docs=$}catch($){console.log($),m("message",{message:"No related docs exists",type:"danger"})}};let se=mt(""),ue=mt("related");const he=async()=>{re(se)||m("message",{type:"error",message:"No doc selected"}),console.log(re(se));let $={edge_name:re(ue),node1:re(w).doc._id,node2:re(se)};console.log($);let F=await h().create({data:$,schema:"system_edge"});console.log(F),Y()},de=async $=>{console.log($),await h().delete({_id:$}),Y()};var be={get BBDB(){return h()},set BBDB($){h($),St()},get new_doc(){return p()},set new_doc($=!0){p($),St()},get search_criteria(){return y()},set search_criteria($){y($),St()},get schema_name(){return _()},set schema_name($){_($),St()},get mode(){return d()},set mode($="view"){d($),St()},get edit_mode(){return v()},set edit_mode($="internal"){v($),St()},get setting_schemas(){return i()},set setting_schemas($={}){i($),St()}},ie=Nn(),H=Mt(ie);{var te=$=>{var F=oc();Vt(()=>Tt(F,re(f))),Me($,F)},z=$=>{var F=Nn(),ee=Mt(F);{var ge=je=>{var ve=Xg(),U=Mt(ve);{var W=Oe=>{var $e=Kg(),Fe=Le($e);Re($e),Vt(()=>Tt(Fe,`Create new ${_()??""} doc`)),Me(Oe,$e)},ne=Oe=>{var $e=Zg(),Fe=Ue(Mt($e),2);Fe.__change=Ae=>{x(Ae.target.value)};var Ze=Le(Fe);Ze.value=Ze.__value="";var Ye=Ue(Ze);io(Ye,17,()=>re(b).list,pa,(Ae,Qe)=>{var De=Wg(),nt=Le(De,!0);Re(De);var me={};Vt(()=>{Tt(nt,re(Qe).title),me!==(me=re(Qe).name)&&(De.value=(De.__value=re(Qe).name)??"")}),Me(Ae,De)}),Re(Fe),Me(Oe,$e)};Rt(U,Oe=>{_()?Oe(W):Oe(ne,!1)})}var ce=Ue(U,2);{var pe=Oe=>{var $e=Qg(),Fe=Mt($e);va(Fe,{mode:"new",get schema(){return re(b).schema},set schema(Ae){re(b).schema=Ae},get schema_name(){return re(b).selected_schema},set schema_name(Ae){re(b).selected_schema=Ae},get data(){return re(b).doc},set data(Ae){re(b).doc=Ae},get data_valid(){return re(b).doc_valid},set data_valid(Ae){re(b).doc_valid=Ae}});var Ze=Ue(Fe,2);{var Ye=Ae=>{var Qe=Yg(),De=Mt(Qe);De.__click=()=>{S()};var nt=Ue(De,2),me=Le(nt,!0);Re(nt),Vt(Ee=>Tt(me,Ee),[()=>JSON.stringify(re(b).doc,null,2)]),Me(Ae,Qe)};Rt(Ze,Ae=>{re(b).doc_valid&&Ae(Ye)})}Me(Oe,$e)};Rt(ce,Oe=>{re(b).selected_schema&&Oe(pe)})}Me(je,ve)},_e=je=>{var ve=c_(),U=Mt(ve),W=Le(U);{var ne=He=>{var yt=e_(),qt=Mt(yt);lc(qt),qt.__keydown=kt=>{I(kt,"title",()=>{re(O).edit_title=!re(O).edit_title})};var fr=Ue(qt,2),wt=Le(fr);wt.__click=()=>{A("title")};var ht=Ue(wt,2);ht.__click=()=>{re(O).edit_title=!re(O).edit_title},Re(fr),cc(qt,()=>re(w).doc.meta.title,kt=>re(w).doc.meta.title=kt),Me(He,yt)},ce=He=>{var yt=t_();yt.__dblclick=()=>{re(O).edit_title=!0};var qt=Le(yt),fr=Ue(qt);fr.__click=()=>{re(O).edit_title=!re(O).edit_title},Re(yt),Vt(()=>Tt(qt,`${re(w).doc.meta.title??""} `)),Me(He,yt)};Rt(W,He=>{re(O).edit_title?He(ne):He(ce,!1)})}Re(U);var pe=Ue(U,2),Oe=Ue(Le(pe),2),$e=Le(Oe),Fe=Le($e),Ze=Le(Fe),Ye=Le(Ze);Re(Ze);var Ae=Ue(Ze),Qe=Le(Ae);Re(Ae),Re(Fe),Re($e),Re(Oe);var De=Ue(Oe,2);zf(De,{saveTags:()=>{D()},get tags(){return re(w).doc.meta.tags},set tags(He){re(w).doc.meta.tags=He}}),Re(pe);var nt=Ue(pe,2),me=Ue(Le(nt),2),Ee=Ue(Le(me),4);Ee.__click=()=>{Y()},Re(me);var Se=Ue(me,2),qe=Le(Se);{var it=He=>{var yt=o_(),qt=Le(yt);io(qt,21,()=>re(w).related_docs.edges,pa,(fr,wt)=>{var ht=i_(),kt=Le(ht),kn=Le(kt);{var fc=Nt=>{var Wt=oc();Vt(()=>Tt(Wt,re(w).related_docs.details[re(wt).node1].title)),Me(Nt,Wt)},Fn=Nt=>{var Wt=r_();Wt.__click=()=>{m("open_link",{link:`${h().meta.database_name}._id.${re(wt).node1}`})};var so=Le(Wt,!0);Re(Wt),Vt(()=>Tt(so,re(w).related_docs.details[re(wt).node1].title)),Me(Nt,Wt)};Rt(kn,Nt=>{re(wt).node1==re(w).doc._id?Nt(fc):Nt(Fn,!1)})}Re(kt);var ba=Ue(kt),pc=Le(ba,!0);Re(ba);var ga=Ue(ba),Ys=Le(ga);{var Oi=Nt=>{var Wt=oc();Vt(()=>Tt(Wt,re(w).related_docs.details[re(wt).node2].title)),Me(Nt,Wt)},Yr=Nt=>{var Wt=n_();Wt.__click=()=>{m("open_link",{link:`${h().meta.database_name}._id.${re(wt).node2}`})};var so=Le(Wt),yc=Le(so,!0);Re(so),Re(Wt),Vt(()=>Tt(yc,re(w).related_docs.details[re(wt).node2].title)),Me(Nt,Wt)};Rt(Ys,Nt=>{re(wt).node2==re(w).doc._id?Nt(Oi):Nt(Yr,!1)})}Re(ga);var ao=Ue(ga),mc=Le(ao);mc.__click=()=>{de(re(wt).edge_id)},Re(ao),Re(ht),Vt(()=>Tt(pc,re(wt).label)),Me(fr,ht)}),Re(qt),Re(yt),Me(He,yt)};Rt(qe,He=>{re(w).related_docs&&He(it)})}var Et=Ue(qe,6),Ct=Le(Et),Lt=Le(Ct);Hf(Lt,{get BBDB(){return h()},get selected(){return re(se)},set selected(He){et(se,He,!0)}}),Re(Ct);var _t=Ue(Ct,2),At=Ue(Le(_t),2);lc(At),Re(_t);var zt=Ue(_t,2),$t=Le(zt);$t.__click=()=>{he()},Re(zt),Re(Et),Re(Se),Re(nt);var Ei=Ue(nt,2),Bn=Le(Ei),Ie=Ue(Le(Bn));{var Ge=He=>{var yt=a_();yt.__click=()=>V(),Me(He,yt)},Ve=He=>{var yt=Nn(),qt=Mt(yt);{var fr=wt=>{var ht=s_(),kt=Mt(ht);kt.__click=()=>J();var kn=Ue(kt,2);kn.__click=()=>G(),Me(wt,ht)};Rt(qt,wt=>{d()=="edit"&&wt(fr)},!0)}Me(He,yt)};Rt(Ie,He=>{d()=="view"?He(Ge):He(Ve,!1)})}Re(Bn);var Je=Ue(Bn,2);{var Ot=He=>{var yt=Nn(),qt=Mt(yt);{var fr=ht=>{var kt=l_(),kn=Le(kt);pg(kn,()=>re(E)),Re(kt),Me(ht,kt)},wt=ht=>{qf(ht,{get data(){return re(w).doc.data}})};Rt(qt,ht=>{re(E)?ht(fr):ht(wt,!1)})}Me(He,yt)},oo=He=>{var yt=Nn(),qt=Mt(yt);{var fr=wt=>{va(wt,{mode:"edit",get schema(){return re(w).schema},set schema(ht){re(w).schema=ht},get schema_name(){return re(w).doc.schema.schema},set schema_name(ht){re(w).doc.schema.schema=ht},get data(){return re(w).doc.data},set data(ht){re(w).doc.data=ht},get data_valid(){return re(w).doc_valid},set data_valid(ht){re(w).doc_valid=ht}})};Rt(qt,wt=>{d()=="edit"&&wt(fr)},!0)}Me(He,yt)};Rt(Je,He=>{d()=="view"?He(Ot):He(oo,!1)})}Re(Ei),Vt((He,yt)=>{Tt(Ye,`Created On : ${He??""}`),Tt(Qe,`Updated On: ${yt??""}`)},[()=>M(re(w).doc.meta.created_on),()=>M(re(w).doc.meta.updated_on)]),cc(At,()=>re(ue),He=>et(ue,He)),Me(je,ve)};Rt(ee,je=>{p()?je(ge):je(_e,!1)},!0)}Me($,F)};Rt(H,$=>{re(f)?$(te):$(z,!1)})}return Me(o,ie),vi(be)}ic(["change","click","keydown","dblclick"]),customElements.define("bbdb-doc",Dn(Uf,{BBDB:{},new_doc:{},search_criteria:{},schema_name:{},mode:{},edit_mode:{},setting_schemas:{}},[],[],!0));const d_=Zv;ln.BBDB=d_,ln.DBList=Vf,ln.Doc=Uf,ln.Editor=va,Object.defineProperty(ln,Symbol.toStringTag,{value:"Module"})}));
95
95
  //# sourceMappingURL=main.umd.cjs.map