beanbagdb-components 0.2.5 → 0.2.6
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/app.js +5 -1
- package/dist/app.style.css +1 -1
- package/dist/doc.html +5 -1
- package/dist/main.js +9816 -9237
- package/dist/main.js.map +1 -1
- package/dist/main.umd.cjs +74 -30
- package/dist/main.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/main.umd.cjs
CHANGED
|
@@ -1,40 +1,84 @@
|
|
|
1
|
-
(function(hn,ji){typeof exports=="object"&&typeof module<"u"?ji(exports):typeof define=="function"&&define.amd?define(["exports"],ji):(hn=typeof globalThis<"u"?globalThis:hn||self,ji(hn.BBDBComponents={}))})(this,(function(hn){"use strict";function ji(o,s){return function(){return o.apply(s,arguments)}}const{toString:Ip}=Object.prototype,{getPrototypeOf:Ua}=Object,{iterator:is,toStringTag:Yc}=Symbol,os=(o=>s=>{const h=Ip.call(s);return o[h]||(o[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),cr=o=>(o=o.toLowerCase(),s=>os(s)===o),ss=o=>s=>typeof s===o,{isArray:Oi}=Array,Ei=ss("undefined");function xo(o){return o!==null&&!Ei(o)&&o.constructor!==null&&!Ei(o.constructor)&&Ut(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Qc=cr("ArrayBuffer");function Np(o){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(o):s=o&&o.buffer&&Qc(o.buffer),s}const Dp=ss("string"),Ut=ss("function"),Xc=ss("number"),Co=o=>o!==null&&typeof o=="object",Bp=o=>o===!0||o===!1,as=o=>{if(os(o)!=="object")return!1;const s=Ua(o);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Yc in o)&&!(is in o)},Fp=o=>{if(!Co(o)||xo(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},Mp=cr("Date"),qp=cr("File"),Vp=cr("Blob"),zp=cr("FileList"),Hp=o=>Co(o)&&Ut(o.pipe),Up=o=>{let s;return o&&(typeof FormData=="function"&&o instanceof FormData||Ut(o.append)&&((s=os(o))==="formdata"||s==="object"&&Ut(o.toString)&&o.toString()==="[object FormData]"))},Gp=cr("URLSearchParams"),[Jp,Kp,Wp,Zp]=["ReadableStream","Request","Response","Headers"].map(cr),Yp=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(o,s,{allOwnKeys:h=!1}={}){if(o===null||typeof o>"u")return;let m,y;if(typeof o!="object"&&(o=[o]),Oi(o))for(m=0,y=o.length;m<y;m++)s.call(null,o[m],m,o);else{if(xo(o))return;const _=h?Object.getOwnPropertyNames(o):Object.keys(o),d=_.length;let v;for(m=0;m<d;m++)v=_[m],s.call(null,o[v],v,o)}}function eu(o,s){if(xo(o))return null;s=s.toLowerCase();const h=Object.keys(o);let m=h.length,y;for(;m-- >0;)if(y=h[m],s===y.toLowerCase())return y;return null}const zn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tu=o=>!Ei(o)&&o!==zn;function Ga(){const{caseless:o,skipUndefined:s}=tu(this)&&this||{},h={},m=(y,_)=>{const d=o&&eu(h,_)||_;as(h[d])&&as(y)?h[d]=Ga(h[d],y):as(y)?h[d]=Ga({},y):Oi(y)?h[d]=y.slice():(!s||!Ei(y))&&(h[d]=y)};for(let y=0,_=arguments.length;y<_;y++)arguments[y]&&Po(arguments[y],m);return h}const Qp=(o,s,h,{allOwnKeys:m}={})=>(Po(s,(y,_)=>{h&&Ut(y)?o[_]=ji(y,h):o[_]=y},{allOwnKeys:m}),o),Xp=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),em=(o,s,h,m)=>{o.prototype=Object.create(s.prototype,m),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:s.prototype}),h&&Object.assign(o.prototype,h)},tm=(o,s,h,m)=>{let y,_,d;const v={};if(s=s||{},o==null)return s;do{for(y=Object.getOwnPropertyNames(o),_=y.length;_-- >0;)d=y[_],(!m||m(d,o,s))&&!v[d]&&(s[d]=o[d],v[d]=!0);o=h!==!1&&Ua(o)}while(o&&(!h||h(o,s))&&o!==Object.prototype);return s},rm=(o,s,h)=>{o=String(o),(h===void 0||h>o.length)&&(h=o.length),h-=s.length;const m=o.indexOf(s,h);return m!==-1&&m===h},nm=o=>{if(!o)return null;if(Oi(o))return o;let s=o.length;if(!Xc(s))return null;const h=new Array(s);for(;s-- >0;)h[s]=o[s];return h},im=(o=>s=>o&&s instanceof o)(typeof Uint8Array<"u"&&Ua(Uint8Array)),om=(o,s)=>{const m=(o&&o[is]).call(o);let y;for(;(y=m.next())&&!y.done;){const _=y.value;s.call(o,_[0],_[1])}},sm=(o,s)=>{let h;const m=[];for(;(h=o.exec(s))!==null;)m.push(h);return m},am=cr("HTMLFormElement"),lm=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,m,y){return m.toUpperCase()+y}),ru=(({hasOwnProperty:o})=>(s,h)=>o.call(s,h))(Object.prototype),cm=cr("RegExp"),nu=(o,s)=>{const h=Object.getOwnPropertyDescriptors(o),m={};Po(h,(y,_)=>{let d;(d=s(y,_,o))!==!1&&(m[_]=d||y)}),Object.defineProperties(o,m)},um=o=>{nu(o,(s,h)=>{if(Ut(o)&&["arguments","caller","callee"].indexOf(h)!==-1)return!1;const m=o[h];if(Ut(m)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+h+"'")})}})},dm=(o,s)=>{const h={},m=y=>{y.forEach(_=>{h[_]=!0})};return Oi(o)?m(o):m(String(o).split(s)),h},hm=()=>{},fm=(o,s)=>o!=null&&Number.isFinite(o=+o)?o:s;function pm(o){return!!(o&&Ut(o.append)&&o[Yc]==="FormData"&&o[is])}const mm=o=>{const s=new Array(10),h=(m,y)=>{if(Co(m)){if(s.indexOf(m)>=0)return;if(xo(m))return m;if(!("toJSON"in m)){s[y]=m;const _=Oi(m)?[]:{};return Po(m,(d,v)=>{const i=h(d,y+1);!Ei(i)&&(_[v]=i)}),s[y]=void 0,_}}return m};return h(o,0)},ym=cr("AsyncFunction"),vm=o=>o&&(Co(o)||Ut(o))&&Ut(o.then)&&Ut(o.catch),iu=((o,s)=>o?setImmediate:s?((h,m)=>(zn.addEventListener("message",({source:y,data:_})=>{y===zn&&_===h&&m.length&&m.shift()()},!1),y=>{m.push(y),zn.postMessage(h,"*")}))(`axios@${Math.random()}`,[]):h=>setTimeout(h))(typeof setImmediate=="function",Ut(zn.postMessage)),bm=typeof queueMicrotask<"u"?queueMicrotask.bind(zn):typeof process<"u"&&process.nextTick||iu,oe={isArray:Oi,isArrayBuffer:Qc,isBuffer:xo,isFormData:Up,isArrayBufferView:Np,isString:Dp,isNumber:Xc,isBoolean:Bp,isObject:Co,isPlainObject:as,isEmptyObject:Fp,isReadableStream:Jp,isRequest:Kp,isResponse:Wp,isHeaders:Zp,isUndefined:Ei,isDate:Mp,isFile:qp,isBlob:Vp,isRegExp:cm,isFunction:Ut,isStream:Hp,isURLSearchParams:Gp,isTypedArray:im,isFileList:zp,forEach:Po,merge:Ga,extend:Qp,trim:Yp,stripBOM:Xp,inherits:em,toFlatObject:tm,kindOf:os,kindOfTest:cr,endsWith:rm,toArray:nm,forEachEntry:om,matchAll:sm,isHTMLForm:am,hasOwnProperty:ru,hasOwnProp:ru,reduceDescriptors:nu,freezeMethods:um,toObjectSet:dm,toCamelCase:lm,noop:hm,toFiniteNumber:fm,findKey:eu,global:zn,isContextDefined:tu,isSpecCompliantForm:pm,toJSONObject:mm,isAsyncFn:ym,isThenable:vm,setImmediate:iu,asap:bm,isIterable:o=>o!=null&&Ut(o[is])};function $e(o,s,h,m,y){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",s&&(this.code=s),h&&(this.config=h),m&&(this.request=m),y&&(this.response=y,this.status=y.status?y.status:null)}oe.inherits($e,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:oe.toJSONObject(this.config),code:this.code,status:this.status}}});const ou=$e.prototype,su={};["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=>{su[o]={value:o}}),Object.defineProperties($e,su),Object.defineProperty(ou,"isAxiosError",{value:!0}),$e.from=(o,s,h,m,y,_)=>{const d=Object.create(ou);oe.toFlatObject(o,d,function(p){return p!==Error.prototype},f=>f!=="isAxiosError");const v=o&&o.message?o.message:"Error",i=s==null&&o?o.code:s;return $e.call(d,v,i,h,m,y),o&&d.cause==null&&Object.defineProperty(d,"cause",{value:o,configurable:!0}),d.name=o&&o.name||"Error",_&&Object.assign(d,_),d};const gm=null;function Ja(o){return oe.isPlainObject(o)||oe.isArray(o)}function au(o){return oe.endsWith(o,"[]")?o.slice(0,-2):o}function lu(o,s,h){return o?o.concat(s).map(function(y,_){return y=au(y),!h&&_?"["+y+"]":y}).join(h?".":""):s}function _m(o){return oe.isArray(o)&&!o.some(Ja)}const wm=oe.toFlatObject(oe,{},null,function(s){return/^is[A-Z]/.test(s)});function ls(o,s,h){if(!oe.isObject(o))throw new TypeError("target must be an object");s=s||new FormData,h=oe.toFlatObject(h,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,k){return!oe.isUndefined(k[E])});const m=h.metaTokens,y=h.visitor||p,_=h.dots,d=h.indexes,i=(h.Blob||typeof Blob<"u"&&Blob)&&oe.isSpecCompliantForm(s);if(!oe.isFunction(y))throw new TypeError("visitor must be a function");function f(O){if(O===null)return"";if(oe.isDate(O))return O.toISOString();if(oe.isBoolean(O))return O.toString();if(!i&&oe.isBlob(O))throw new $e("Blob is not supported. Use a Buffer instead.");return oe.isArrayBuffer(O)||oe.isTypedArray(O)?i&&typeof Blob=="function"?new Blob([O]):Buffer.from(O):O}function p(O,E,k){let S=O;if(O&&!k&&typeof O=="object"){if(oe.endsWith(E,"{}"))E=m?E:E.slice(0,-2),O=JSON.stringify(O);else if(oe.isArray(O)&&_m(O)||(oe.isFileList(O)||oe.endsWith(E,"[]"))&&(S=oe.toArray(O)))return E=au(E),S.forEach(function(P,A){!(oe.isUndefined(P)||P===null)&&s.append(d===!0?lu([E],A,_):d===null?E:E+"[]",f(P))}),!1}return Ja(O)?!0:(s.append(lu(k,E,_),f(O)),!1)}const g=[],b=Object.assign(wm,{defaultVisitor:p,convertValue:f,isVisitable:Ja});function j(O,E){if(!oe.isUndefined(O)){if(g.indexOf(O)!==-1)throw Error("Circular reference detected in "+E.join("."));g.push(O),oe.forEach(O,function(S,x){(!(oe.isUndefined(S)||S===null)&&y.call(s,S,oe.isString(x)?x.trim():x,E,b))===!0&&j(S,E?E.concat(x):[x])}),g.pop()}}if(!oe.isObject(o))throw new TypeError("data must be an object");return j(o),s}function cu(o){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(m){return s[m]})}function Ka(o,s){this._pairs=[],o&&ls(o,this,s)}const uu=Ka.prototype;uu.append=function(s,h){this._pairs.push([s,h])},uu.toString=function(s){const h=s?function(m){return s.call(this,m,cu)}:cu;return this._pairs.map(function(y){return h(y[0])+"="+h(y[1])},"").join("&")};function km(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function du(o,s,h){if(!s)return o;const m=h&&h.encode||km;oe.isFunction(h)&&(h={serialize:h});const y=h&&h.serialize;let _;if(y?_=y(s,h):_=oe.isURLSearchParams(s)?s.toString():new Ka(s,h).toString(m),_){const d=o.indexOf("#");d!==-1&&(o=o.slice(0,d)),o+=(o.indexOf("?")===-1?"?":"&")+_}return o}class hu{constructor(){this.handlers=[]}use(s,h,m){return this.handlers.push({fulfilled:s,rejected:h,synchronous:m?m.synchronous:!1,runWhen:m?m.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){oe.forEach(this.handlers,function(m){m!==null&&s(m)})}}const fu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jm={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ka,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Wa=typeof window<"u"&&typeof document<"u",Za=typeof navigator=="object"&&navigator||void 0,Om=Wa&&(!Za||["ReactNative","NativeScript","NS"].indexOf(Za.product)<0),Em=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sm=Wa&&window.location.href||"http://localhost",Pt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wa,hasStandardBrowserEnv:Om,hasStandardBrowserWebWorkerEnv:Em,navigator:Za,origin:Sm},Symbol.toStringTag,{value:"Module"})),...jm};function xm(o,s){return ls(o,new Pt.classes.URLSearchParams,{visitor:function(h,m,y,_){return Pt.isNode&&oe.isBuffer(h)?(this.append(m,h.toString("base64")),!1):_.defaultVisitor.apply(this,arguments)},...s})}function Cm(o){return oe.matchAll(/\w+|\[(\w*)]/g,o).map(s=>s[0]==="[]"?"":s[1]||s[0])}function Pm(o){const s={},h=Object.keys(o);let m;const y=h.length;let _;for(m=0;m<y;m++)_=h[m],s[_]=o[_];return s}function pu(o){function s(h,m,y,_){let d=h[_++];if(d==="__proto__")return!0;const v=Number.isFinite(+d),i=_>=h.length;return d=!d&&oe.isArray(y)?y.length:d,i?(oe.hasOwnProp(y,d)?y[d]=[y[d],m]:y[d]=m,!v):((!y[d]||!oe.isObject(y[d]))&&(y[d]=[]),s(h,m,y[d],_)&&oe.isArray(y[d])&&(y[d]=Pm(y[d])),!v)}if(oe.isFormData(o)&&oe.isFunction(o.entries)){const h={};return oe.forEachEntry(o,(m,y)=>{s(Cm(m),y,h,0)}),h}return null}function Tm(o,s,h){if(oe.isString(o))try{return(s||JSON.parse)(o),oe.trim(o)}catch(m){if(m.name!=="SyntaxError")throw m}return(h||JSON.stringify)(o)}const To={transitional:fu,adapter:["xhr","http","fetch"],transformRequest:[function(s,h){const m=h.getContentType()||"",y=m.indexOf("application/json")>-1,_=oe.isObject(s);if(_&&oe.isHTMLForm(s)&&(s=new FormData(s)),oe.isFormData(s))return y?JSON.stringify(pu(s)):s;if(oe.isArrayBuffer(s)||oe.isBuffer(s)||oe.isStream(s)||oe.isFile(s)||oe.isBlob(s)||oe.isReadableStream(s))return s;if(oe.isArrayBufferView(s))return s.buffer;if(oe.isURLSearchParams(s))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let v;if(_){if(m.indexOf("application/x-www-form-urlencoded")>-1)return xm(s,this.formSerializer).toString();if((v=oe.isFileList(s))||m.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return ls(v?{"files[]":s}:s,i&&new i,this.formSerializer)}}return _||y?(h.setContentType("application/json",!1),Tm(s)):s}],transformResponse:[function(s){const h=this.transitional||To.transitional,m=h&&h.forcedJSONParsing,y=this.responseType==="json";if(oe.isResponse(s)||oe.isReadableStream(s))return s;if(s&&oe.isString(s)&&(m&&!this.responseType||y)){const d=!(h&&h.silentJSONParsing)&&y;try{return JSON.parse(s,this.parseReviver)}catch(v){if(d)throw v.name==="SyntaxError"?$e.from(v,$e.ERR_BAD_RESPONSE,this,null,this.response):v}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};oe.forEach(["delete","get","head","post","put","patch"],o=>{To.headers[o]={}});const Rm=oe.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"]),Am=o=>{const s={};let h,m,y;return o&&o.split(`
|
|
2
|
-
`).forEach(function(d){y=d.indexOf(":"),h=d.substring(0,y).trim().toLowerCase(),m=d.substring(y+1).trim(),!(!h||
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...h){const m=new this(s);return h.forEach(y=>m.set(y)),m}static accessor(s){const m=(this[mu]=this[mu]={accessors:{}}).accessors,y=this.prototype;function _(d){const v=Ro(d);m[v]||(Nm(y,d),m[v]=!0)}return oe.isArray(s)?s.forEach(_):_(s),this}};Gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),oe.reduceDescriptors(Gt.prototype,({value:o},s)=>{let h=s[0].toUpperCase()+s.slice(1);return{get:()=>o,set(m){this[h]=m}}}),oe.freezeMethods(Gt);function Qa(o,s){const h=this||To,m=s||h,y=Gt.from(m.headers);let _=m.data;return oe.forEach(o,function(v){_=v.call(h,_,y.normalize(),s?s.status:void 0)}),y.normalize(),_}function yu(o){return!!(o&&o.__CANCEL__)}function Si(o,s,h){$e.call(this,o??"canceled",$e.ERR_CANCELED,s,h),this.name="CanceledError"}oe.inherits(Si,$e,{__CANCEL__:!0});function vu(o,s,h){const m=h.config.validateStatus;!h.status||!m||m(h.status)?o(h):s(new $e("Request failed with status code "+h.status,[$e.ERR_BAD_REQUEST,$e.ERR_BAD_RESPONSE][Math.floor(h.status/100)-4],h.config,h.request,h))}function Dm(o){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return s&&s[1]||""}function Bm(o,s){o=o||10;const h=new Array(o),m=new Array(o);let y=0,_=0,d;return s=s!==void 0?s:1e3,function(i){const f=Date.now(),p=m[_];d||(d=f),h[y]=i,m[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<s)return;const j=p&&f-p;return j?Math.round(b*1e3/j):void 0}}function Fm(o,s){let h=0,m=1e3/s,y,_;const d=(f,p=Date.now())=>{h=p,y=null,_&&(clearTimeout(_),_=null),o(...f)};return[(...f)=>{const p=Date.now(),g=p-h;g>=m?d(f,p):(y=f,_||(_=setTimeout(()=>{_=null,d(y)},m-g)))},()=>y&&d(y)]}const us=(o,s,h=3)=>{let m=0;const y=Bm(50,250);return Fm(_=>{const d=_.loaded,v=_.lengthComputable?_.total:void 0,i=d-m,f=y(i),p=d<=v;m=d;const g={loaded:d,total:v,progress:v?d/v:void 0,bytes:i,rate:f||void 0,estimated:f&&v&&p?(v-d)/f:void 0,event:_,lengthComputable:v!=null,[s?"download":"upload"]:!0};o(g)},h)},bu=(o,s)=>{const h=o!=null;return[m=>s[0]({lengthComputable:h,total:o,loaded:m}),s[1]]},gu=o=>(...s)=>oe.asap(()=>o(...s)),Mm=Pt.hasStandardBrowserEnv?((o,s)=>h=>(h=new URL(h,Pt.origin),o.protocol===h.protocol&&o.host===h.host&&(s||o.port===h.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0,qm=Pt.hasStandardBrowserEnv?{write(o,s,h,m,y,_,d){if(typeof document>"u")return;const v=[`${o}=${encodeURIComponent(s)}`];oe.isNumber(h)&&v.push(`expires=${new Date(h).toUTCString()}`),oe.isString(m)&&v.push(`path=${m}`),oe.isString(y)&&v.push(`domain=${y}`),_===!0&&v.push("secure"),oe.isString(d)&&v.push(`SameSite=${d}`),document.cookie=v.join("; ")},read(o){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vm(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function zm(o,s){return s?o.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):o}function _u(o,s,h){let m=!Vm(s);return o&&(m||h==!1)?zm(o,s):s}const wu=o=>o instanceof Gt?{...o}:o;function Hn(o,s){s=s||{};const h={};function m(f,p,g,b){return oe.isPlainObject(f)&&oe.isPlainObject(p)?oe.merge.call({caseless:b},f,p):oe.isPlainObject(p)?oe.merge({},p):oe.isArray(p)?p.slice():p}function y(f,p,g,b){if(oe.isUndefined(p)){if(!oe.isUndefined(f))return m(void 0,f,g,b)}else return m(f,p,g,b)}function _(f,p){if(!oe.isUndefined(p))return m(void 0,p)}function d(f,p){if(oe.isUndefined(p)){if(!oe.isUndefined(f))return m(void 0,f)}else return m(void 0,p)}function v(f,p,g){if(g in s)return m(f,p);if(g in o)return m(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,p,g)=>y(wu(f),wu(p),g,!0)};return oe.forEach(Object.keys({...o,...s}),function(p){const g=i[p]||y,b=g(o[p],s[p],p);oe.isUndefined(b)&&g!==v||(h[p]=b)}),h}const ku=o=>{const s=Hn({},o);let{data:h,withXSRFToken:m,xsrfHeaderName:y,xsrfCookieName:_,headers:d,auth:v}=s;if(s.headers=d=Gt.from(d),s.url=du(_u(s.baseURL,s.url,s.allowAbsoluteUrls),o.params,o.paramsSerializer),v&&d.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):""))),oe.isFormData(h)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(oe.isFunction(h.getHeaders)){const i=h.getHeaders(),f=["content-type","content-length"];Object.entries(i).forEach(([p,g])=>{f.includes(p.toLowerCase())&&d.set(p,g)})}}if(Pt.hasStandardBrowserEnv&&(m&&oe.isFunction(m)&&(m=m(s)),m||m!==!1&&Mm(s.url))){const i=y&&_&&qm.read(_);i&&d.set(y,i)}return s},Hm=typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(h,m){const y=ku(o);let _=y.data;const d=Gt.from(y.headers).normalize();let{responseType:v,onUploadProgress:i,onDownloadProgress:f}=y,p,g,b,j,O;function E(){j&&j(),O&&O(),y.cancelToken&&y.cancelToken.unsubscribe(p),y.signal&&y.signal.removeEventListener("abort",p)}let k=new XMLHttpRequest;k.open(y.method.toUpperCase(),y.url,!0),k.timeout=y.timeout;function S(){if(!k)return;const P=Gt.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),C={data:!v||v==="text"||v==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:P,config:o,request:k};vu(function(L){h(L),E()},function(L){m(L),E()},C),k=null}"onloadend"in k?k.onloadend=S:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(S)},k.onabort=function(){k&&(m(new $e("Request aborted",$e.ECONNABORTED,o,k)),k=null)},k.onerror=function(A){const C=A&&A.message?A.message:"Network Error",R=new $e(C,$e.ERR_NETWORK,o,k);R.event=A||null,m(R),k=null},k.ontimeout=function(){let A=y.timeout?"timeout of "+y.timeout+"ms exceeded":"timeout exceeded";const C=y.transitional||fu;y.timeoutErrorMessage&&(A=y.timeoutErrorMessage),m(new $e(A,C.clarifyTimeoutError?$e.ETIMEDOUT:$e.ECONNABORTED,o,k)),k=null},_===void 0&&d.setContentType(null),"setRequestHeader"in k&&oe.forEach(d.toJSON(),function(A,C){k.setRequestHeader(C,A)}),oe.isUndefined(y.withCredentials)||(k.withCredentials=!!y.withCredentials),v&&v!=="json"&&(k.responseType=y.responseType),f&&([b,O]=us(f,!0),k.addEventListener("progress",b)),i&&k.upload&&([g,j]=us(i),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",j)),(y.cancelToken||y.signal)&&(p=P=>{k&&(m(!P||P.type?new Si(null,o,k):P),k.abort(),k=null)},y.cancelToken&&y.cancelToken.subscribe(p),y.signal&&(y.signal.aborted?p():y.signal.addEventListener("abort",p)));const x=Dm(y.url);if(x&&Pt.protocols.indexOf(x)===-1){m(new $e("Unsupported protocol "+x+":",$e.ERR_BAD_REQUEST,o));return}k.send(_||null)})},Um=(o,s)=>{const{length:h}=o=o?o.filter(Boolean):[];if(s||h){let m=new AbortController,y;const _=function(f){if(!y){y=!0,v();const p=f instanceof Error?f:this.reason;m.abort(p instanceof $e?p:new Si(p instanceof Error?p.message:p))}};let d=s&&setTimeout(()=>{d=null,_(new $e(`timeout ${s} of ms exceeded`,$e.ETIMEDOUT))},s);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}=m;return i.unsubscribe=()=>oe.asap(v),i}},Gm=function*(o,s){let h=o.byteLength;if(h<s){yield o;return}let m=0,y;for(;m<h;)y=m+s,yield o.slice(m,y),m=y},Jm=async function*(o,s){for await(const h of Km(o))yield*Gm(h,s)},Km=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const s=o.getReader();try{for(;;){const{done:h,value:m}=await s.read();if(h)break;yield m}}finally{await s.cancel()}},ju=(o,s,h,m)=>{const y=Jm(o,s);let _=0,d,v=i=>{d||(d=!0,m&&m(i))};return new ReadableStream({async pull(i){try{const{done:f,value:p}=await y.next();if(f){v(),i.close();return}let g=p.byteLength;if(h){let b=_+=g;h(b)}i.enqueue(new Uint8Array(p))}catch(f){throw v(f),f}},cancel(i){return v(i),y.return()}},{highWaterMark:2})},Ou=64*1024,{isFunction:ds}=oe,Wm=(({Request:o,Response:s})=>({Request:o,Response:s}))(oe.global),{ReadableStream:Eu,TextEncoder:Su}=oe.global,xu=(o,...s)=>{try{return!!o(...s)}catch{return!1}},Zm=o=>{o=oe.merge.call({skipUndefined:!0},Wm,o);const{fetch:s,Request:h,Response:m}=o,y=s?ds(s):typeof fetch=="function",_=ds(h),d=ds(m);if(!y)return!1;const v=y&&ds(Eu),i=y&&(typeof Su=="function"?(O=>E=>O.encode(E))(new Su):async O=>new Uint8Array(await new h(O).arrayBuffer())),f=_&&v&&xu(()=>{let O=!1;const E=new h(Pt.origin,{body:new Eu,method:"POST",get duplex(){return O=!0,"half"}}).headers.has("Content-Type");return O&&!E}),p=d&&v&&xu(()=>oe.isReadableStream(new m("").body)),g={stream:p&&(O=>O.body)};y&&["text","arrayBuffer","blob","formData","stream"].forEach(O=>{!g[O]&&(g[O]=(E,k)=>{let S=E&&E[O];if(S)return S.call(E);throw new $e(`Response type '${O}' is not supported`,$e.ERR_NOT_SUPPORT,k)})});const b=async O=>{if(O==null)return 0;if(oe.isBlob(O))return O.size;if(oe.isSpecCompliantForm(O))return(await new h(Pt.origin,{method:"POST",body:O}).arrayBuffer()).byteLength;if(oe.isArrayBufferView(O)||oe.isArrayBuffer(O))return O.byteLength;if(oe.isURLSearchParams(O)&&(O=O+""),oe.isString(O))return(await i(O)).byteLength},j=async(O,E)=>{const k=oe.toFiniteNumber(O.getContentLength());return k??b(E)};return async O=>{let{url:E,method:k,data:S,signal:x,cancelToken:P,timeout:A,onDownloadProgress:C,onUploadProgress:R,responseType:L,headers:I,withCredentials:D="same-origin",fetchOptions:M}=ku(O),q=s||fetch;L=L?(L+"").toLowerCase():"text";let J=Um([x,P&&P.toAbortSignal()],A),G=null;const Y=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let ae;try{if(R&&f&&k!=="get"&&k!=="head"&&(ae=await j(I,S))!==0){let H=new h(E,{method:"POST",body:S,duplex:"half"}),ee;if(oe.isFormData(S)&&(ee=H.headers.get("content-type"))&&I.setContentType(ee),H.body){const[V,N]=bu(ae,us(gu(R)));S=ju(H.body,Ou,V,N)}}oe.isString(D)||(D=D?"include":"omit");const ce=_&&"credentials"in h.prototype,de={...M,signal:J,method:k.toUpperCase(),headers:I.normalize().toJSON(),body:S,duplex:"half",credentials:ce?D:void 0};G=_&&new h(E,de);let ue=await(_?q(G,M):q(E,de));const pe=p&&(L==="stream"||L==="response");if(p&&(C||pe&&Y)){const H={};["status","statusText","headers"].forEach(F=>{H[F]=ue[F]});const ee=oe.toFiniteNumber(ue.headers.get("content-length")),[V,N]=C&&bu(ee,us(gu(C),!0))||[];ue=new m(ju(ue.body,Ou,V,()=>{N&&N(),Y&&Y()}),H)}L=L||"text";let ie=await g[oe.findKey(g,L)||"text"](ue,O);return!pe&&Y&&Y(),await new Promise((H,ee)=>{vu(H,ee,{data:ie,headers:Gt.from(ue.headers),status:ue.status,statusText:ue.statusText,config:O,request:G})})}catch(ce){throw Y&&Y(),ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)?Object.assign(new $e("Network Error",$e.ERR_NETWORK,O,G),{cause:ce.cause||ce}):$e.from(ce,ce&&ce.code,O,G)}}},Ym=new Map,Cu=o=>{let s=o&&o.env||{};const{fetch:h,Request:m,Response:y}=s,_=[m,y,h];let d=_.length,v=d,i,f,p=Ym;for(;v--;)i=_[v],f=p.get(i),f===void 0&&p.set(i,f=v?new Map:Zm(s)),p=f;return f};Cu();const Xa={http:gm,xhr:Hm,fetch:{get:Cu}};oe.forEach(Xa,(o,s)=>{if(o){try{Object.defineProperty(o,"name",{value:s})}catch{}Object.defineProperty(o,"adapterName",{value:s})}});const Pu=o=>`- ${o}`,Qm=o=>oe.isFunction(o)||o===null||o===!1;function Xm(o,s){o=oe.isArray(o)?o:[o];const{length:h}=o;let m,y;const _={};for(let d=0;d<h;d++){m=o[d];let v;if(y=m,!Qm(m)&&(y=Xa[(v=String(m)).toLowerCase()],y===void 0))throw new $e(`Unknown adapter '${v}'`);if(y&&(oe.isFunction(y)||(y=y.get(s))))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
|
-
`+d.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+_):m.stack=_}catch{}}throw m}}_request(s,h){typeof s=="string"?(h=h||{},h.url=s):h=s||{},h=Hn(this.defaults,h);const{transitional:m,paramsSerializer:y,headers:_}=h;m!==void 0&&fs.assertOptions(m,{silentJSONParsing:Pr.transitional(Pr.boolean),forcedJSONParsing:Pr.transitional(Pr.boolean),clarifyTimeoutError:Pr.transitional(Pr.boolean)},!1),y!=null&&(oe.isFunction(y)?h.paramsSerializer={serialize:y}:fs.assertOptions(y,{encode:Pr.function,serialize:Pr.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),fs.assertOptions(h,{baseUrl:Pr.spelling("baseURL"),withXsrfToken:Pr.spelling("withXSRFToken")},!0),h.method=(h.method||this.defaults.method||"get").toLowerCase();let d=_&&oe.merge(_.common,_[h.method]);_&&oe.forEach(["delete","get","head","post","put","patch","common"],O=>{delete _[O]}),h.headers=Gt.concat(d,_);const v=[];let i=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(h)===!1||(i=i&&E.synchronous,v.unshift(E.fulfilled,E.rejected))});const f=[];this.interceptors.response.forEach(function(E){f.push(E.fulfilled,E.rejected)});let p,g=0,b;if(!i){const O=[Ru.bind(this),void 0];for(O.unshift(...v),O.push(...f),b=O.length,p=Promise.resolve(h);g<b;)p=p.then(O[g++],O[g++]);return p}b=v.length;let j=h;for(;g<b;){const O=v[g++],E=v[g++];try{j=O(j)}catch(k){E.call(this,k);break}}try{p=Ru.call(this,j)}catch(O){return Promise.reject(O)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(s){s=Hn(this.defaults,s);const h=_u(s.baseURL,s.url,s.allowAbsoluteUrls);return du(h,s.params,s.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(s){Un.prototype[s]=function(h,m){return this.request(Hn(m||{},{method:s,url:h,data:(m||{}).data}))}}),oe.forEach(["post","put","patch"],function(s){function h(m){return function(_,d,v){return this.request(Hn(v||{},{method:s,headers:m?{"Content-Type":"multipart/form-data"}:{},url:_,data:d}))}}Un.prototype[s]=h(),Un.prototype[s+"Form"]=h(!0)});let ty=class $p{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let h;this.promise=new Promise(function(_){h=_});const m=this;this.promise.then(y=>{if(!m._listeners)return;let _=m._listeners.length;for(;_-- >0;)m._listeners[_](y);m._listeners=null}),this.promise.then=y=>{let _;const d=new Promise(v=>{m.subscribe(v),_=v}).then(y);return d.cancel=function(){m.unsubscribe(_)},d},s(function(_,d,v){m.reason||(m.reason=new Si(_,d,v),h(m.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const h=this._listeners.indexOf(s);h!==-1&&this._listeners.splice(h,1)}toAbortSignal(){const s=new AbortController,h=m=>{s.abort(m)};return this.subscribe(h),s.signal.unsubscribe=()=>this.unsubscribe(h),s.signal}static source(){let s;return{token:new $p(function(y){s=y}),cancel:s}}};function ry(o){return function(h){return o.apply(null,h)}}function ny(o){return oe.isObject(o)&&o.isAxiosError===!0}const tl={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(tl).forEach(([o,s])=>{tl[s]=o});function $u(o){const s=new Un(o),h=ji(Un.prototype.request,s);return oe.extend(h,Un.prototype,s,{allOwnKeys:!0}),oe.extend(h,s,null,{allOwnKeys:!0}),h.create=function(y){return $u(Hn(o,y))},h}const dt=$u(To);dt.Axios=Un,dt.CanceledError=Si,dt.CancelToken=ty,dt.isCancel=yu,dt.VERSION=Au,dt.toFormData=ls,dt.AxiosError=$e,dt.Cancel=dt.CanceledError,dt.all=function(s){return Promise.all(s)},dt.spread=ry,dt.isAxiosError=ny,dt.mergeConfig=Hn,dt.AxiosHeaders=Gt,dt.formToJSON=o=>pu(oe.isHTMLForm(o)?new FormData(o):o),dt.getAdapter=Tu.getAdapter,dt.HttpStatusCode=tl,dt.default=dt;const{Axios:Tw,AxiosError:Rw,CanceledError:Aw,isCancel:Lw,CancelToken:$w,VERSION:Iw,all:Nw,Cancel:Dw,isAxiosError:Bw,spread:Fw,toFormData:Mw,AxiosHeaders:qw,HttpStatusCode:Vw,formToJSON:zw,getAdapter:Hw,mergeConfig:Uw}=dt;function iy(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ps={exports:{}},rl={},Ur={},Gn={},nl={},il={},ol={},Iu;function ms(){return Iu||(Iu=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 s{}o._CodeOrName=s,o.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class h extends s{constructor(x){if(super(),!o.IDENTIFIER.test(x))throw new Error("CodeGen: name must be a valid identifier");this.str=x}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}o.Name=h;class m extends s{constructor(x){super(),this._items=typeof x=="string"?[x]:x}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const x=this._items[0];return x===""||x==='""'}get str(){var x;return(x=this._str)!==null&&x!==void 0?x:this._str=this._items.reduce((P,A)=>`${P}${A}`,"")}get names(){var x;return(x=this._names)!==null&&x!==void 0?x:this._names=this._items.reduce((P,A)=>(A instanceof h&&(P[A.str]=(P[A.str]||0)+1),P),{})}}o._Code=m,o.nil=new m("");function y(S,...x){const P=[S[0]];let A=0;for(;A<x.length;)v(P,x[A]),P.push(S[++A]);return new m(P)}o._=y;const _=new m("+");function d(S,...x){const P=[j(S[0])];let A=0;for(;A<x.length;)P.push(_),v(P,x[A]),P.push(_,j(S[++A]));return i(P),new m(P)}o.str=d;function v(S,x){x instanceof m?S.push(...x._items):x instanceof h?S.push(x):S.push(g(x))}o.addCodeArg=v;function i(S){let x=1;for(;x<S.length-1;){if(S[x]===_){const P=f(S[x-1],S[x+1]);if(P!==void 0){S.splice(x-1,3,P);continue}S[x++]="+"}x++}}function f(S,x){if(x==='""')return S;if(S==='""')return x;if(typeof S=="string")return x instanceof h||S[S.length-1]!=='"'?void 0:typeof x!="string"?`${S.slice(0,-1)}${x}"`:x[0]==='"'?S.slice(0,-1)+x.slice(1):void 0;if(typeof x=="string"&&x[0]==='"'&&!(S instanceof h))return`"${S}${x.slice(1)}`}function p(S,x){return x.emptyStr()?S:S.emptyStr()?x:d`${S}${x}`}o.strConcat=p;function g(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:j(Array.isArray(S)?S.join(","):S)}function b(S){return new m(j(S))}o.stringify=b;function j(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o.safeStringify=j;function O(S){return typeof S=="string"&&o.IDENTIFIER.test(S)?new m(`.${S}`):y`[${S}]`}o.getProperty=O;function E(S){if(typeof S=="string"&&o.IDENTIFIER.test(S))return new m(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}o.getEsmExportName=E;function k(S){return new m(S.toString())}o.regexpCode=k})(ol)),ol}var sl={},Nu;function Du(){return Nu||(Nu=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ValueScope=o.ValueScopeName=o.Scope=o.varKinds=o.UsedValueState=void 0;const s=ms();class h extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var m;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(m||(o.UsedValueState=m={})),o.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class y{constructor({prefixes:f,parent:p}={}){this._names={},this._prefixes=f,this._parent=p}toName(f){return f instanceof s.Name?f:this.name(f)}name(f){return new s.Name(this._newName(f))}_newName(f){const p=this._names[f]||this._nameGroup(f);return`${f}${p.index++}`}_nameGroup(f){var p,g;if(!((g=(p=this._parent)===null||p===void 0?void 0:p._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 s.Name{constructor(f,p){super(p),this.prefix=f}setValue(f,{property:p,itemIndex:g}){this.value=f,this.scopePath=(0,s._)`.${new s.Name(p)}[${g}]`}}o.ValueScopeName=_;const d=(0,s._)`\n`;class v extends y{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?d:s.nil}}get(){return this._scope}name(f){return new _(f,this._newName(f))}value(f,p){var g;if(p.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const b=this.toName(f),{prefix:j}=b,O=(g=p.key)!==null&&g!==void 0?g:p.ref;let E=this._values[j];if(E){const x=E.get(O);if(x)return x}else E=this._values[j]=new Map;E.set(O,b);const k=this._scope[j]||(this._scope[j]=[]),S=k.length;return k[S]=p.ref,b.setValue(p,{property:j,itemIndex:S}),b}getValue(f,p){const g=this._values[f];if(g)return g.get(p)}scopeRefs(f,p=this._values){return this._reduceValues(p,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,s._)`${f}${g.scopePath}`})}scopeCode(f=this._values,p,g){return this._reduceValues(f,b=>{if(b.value===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return b.value.code},p,g)}_reduceValues(f,p,g={},b){let j=s.nil;for(const O in f){const E=f[O];if(!E)continue;const k=g[O]=g[O]||new Map;E.forEach(S=>{if(k.has(S))return;k.set(S,m.Started);let x=p(S);if(x){const P=this.opts.es5?o.varKinds.var:o.varKinds.const;j=(0,s._)`${j}${P} ${S} = ${x};${this.opts._n}`}else if(x=b?.(S))j=(0,s._)`${j}${x}${this.opts._n}`;else throw new h(S);k.set(S,m.Completed)})}return j}}o.ValueScope=v})(sl)),sl}var Bu;function ze(){return Bu||(Bu=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 s=ms(),h=Du();var m=ms();Object.defineProperty(o,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(o,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(o,"strConcat",{enumerable:!0,get:function(){return m.strConcat}}),Object.defineProperty(o,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(o,"getProperty",{enumerable:!0,get:function(){return m.getProperty}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(o,"regexpCode",{enumerable:!0,get:function(){return m.regexpCode}}),Object.defineProperty(o,"Name",{enumerable:!0,get:function(){return m.Name}});var y=Du();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 s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class _{optimizeNodes(){return this}optimizeNames(N,F){return this}}class d extends _{constructor(N,F,te){super(),this.varKind=N,this.name=F,this.rhs=te}render({es5:N,_n:F}){const te=N?h.varKinds.var:this.varKind,ge=this.rhs===void 0?"":` = ${this.rhs}`;return`${te} ${this.name}${ge};`+F}optimizeNames(N,F){if(N[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,N,F)),this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class v extends _{constructor(N,F,te){super(),this.lhs=N,this.rhs=F,this.sideEffects=te}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,F){if(!(this.lhs instanceof s.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,N,F),this}get names(){const N=this.lhs instanceof s.Name?{}:{...this.lhs.names};return G(N,this.rhs)}}class i extends v{constructor(N,F,te,ge){super(N,te,ge),this.op=F}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class f extends _{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class p extends _{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class g extends _{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class b extends _{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,F){return this.code=Y(this.code,N,F),this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class j extends _{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((F,te)=>F+te.render(N),"")}optimizeNodes(){const{nodes:N}=this;let F=N.length;for(;F--;){const te=N[F].optimizeNodes();Array.isArray(te)?N.splice(F,1,...te):te?N[F]=te:N.splice(F,1)}return N.length>0?this:void 0}optimizeNames(N,F){const{nodes:te}=this;let ge=te.length;for(;ge--;){const be=te[ge];be.optimizeNames(N,F)||(ae(N,be.names),te.splice(ge,1))}return te.length>0?this:void 0}get names(){return this.nodes.reduce((N,F)=>J(N,F.names),{})}}class O extends j{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class E extends j{}class k extends O{}k.kind="else";class S extends O{constructor(N,F){super(F),this.condition=N}render(N){let F=`if(${this.condition})`+super.render(N);return this.else&&(F+="else "+this.else.render(N)),F}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let F=this.else;if(F){const te=F.optimizeNodes();F=this.else=Array.isArray(te)?new k(te):te}if(F)return N===!1?F instanceof S?F:F.nodes:this.nodes.length?this:new S(ce(N),F instanceof S?[F]:F.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,F){var te;if(this.else=(te=this.else)===null||te===void 0?void 0:te.optimizeNames(N,F),!!(super.optimizeNames(N,F)||this.else))return this.condition=Y(this.condition,N,F),this}get names(){const N=super.names;return G(N,this.condition),this.else&&J(N,this.else.names),N}}S.kind="if";class x extends O{}x.kind="for";class P extends x{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,F){if(super.optimizeNames(N,F))return this.iteration=Y(this.iteration,N,F),this}get names(){return J(super.names,this.iteration.names)}}class A extends x{constructor(N,F,te,ge){super(),this.varKind=N,this.name=F,this.from=te,this.to=ge}render(N){const F=N.es5?h.varKinds.var:this.varKind,{name:te,from:ge,to:be}=this;return`for(${F} ${te}=${ge}; ${te}<${be}; ${te}++)`+super.render(N)}get names(){const N=G(super.names,this.from);return G(N,this.to)}}class C extends x{constructor(N,F,te,ge){super(),this.loop=N,this.varKind=F,this.name=te,this.iterable=ge}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,F){if(super.optimizeNames(N,F))return this.iterable=Y(this.iterable,N,F),this}get names(){return J(super.names,this.iterable.names)}}class R extends O{constructor(N,F,te){super(),this.name=N,this.args=F,this.async=te}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}R.kind="func";class L extends j{render(N){return"return "+super.render(N)}}L.kind="return";class I extends O{render(N){let F="try"+super.render(N);return this.catch&&(F+=this.catch.render(N)),this.finally&&(F+=this.finally.render(N)),F}optimizeNodes(){var N,F;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(N,F){var te,ge;return super.optimizeNames(N,F),(te=this.catch)===null||te===void 0||te.optimizeNames(N,F),(ge=this.finally)===null||ge===void 0||ge.optimizeNames(N,F),this}get names(){const N=super.names;return this.catch&&J(N,this.catch.names),this.finally&&J(N,this.finally.names),N}}class D extends O{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}D.kind="catch";class M extends O{render(N){return"finally"+super.render(N)}}M.kind="finally";class q{constructor(N,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
|
|
7
|
-
`:""},this._extScope=N,this._scope=new h.Scope({parent:N}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,F){const te=this._extScope.value(N,F);return(this._values[te.prefix]||(this._values[te.prefix]=new Set)).add(te),te}getScopeValue(N,F){return this._extScope.getValue(N,F)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,F,te,ge){const be=this._scope.toName(F);return te!==void 0&&ge&&(this._constants[be.str]=te),this._leafNode(new d(N,be,te)),be}const(N,F,te){return this._def(h.varKinds.const,N,F,te)}let(N,F,te){return this._def(h.varKinds.let,N,F,te)}var(N,F,te){return this._def(h.varKinds.var,N,F,te)}assign(N,F,te){return this._leafNode(new v(N,F,te))}add(N,F){return this._leafNode(new i(N,o.operators.ADD,F))}code(N){return typeof N=="function"?N():N!==s.nil&&this._leafNode(new b(N)),this}object(...N){const F=["{"];for(const[te,ge]of N)F.length>1&&F.push(","),F.push(te),(te!==ge||this.opts.es5)&&(F.push(":"),(0,s.addCodeArg)(F,ge));return F.push("}"),new s._Code(F)}if(N,F,te){if(this._blockNode(new S(N)),F&&te)this.code(F).else().code(te).endIf();else if(F)this.code(F).endIf();else if(te)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new S(N))}else(){return this._elseNode(new k)}endIf(){return this._endBlockNode(S,k)}_for(N,F){return this._blockNode(N),F&&this.code(F).endFor(),this}for(N,F){return this._for(new P(N),F)}forRange(N,F,te,ge,be=this.opts.es5?h.varKinds.var:h.varKinds.let){const Oe=this._scope.toName(N);return this._for(new A(be,Oe,F,te),()=>ge(Oe))}forOf(N,F,te,ge=h.varKinds.const){const be=this._scope.toName(N);if(this.opts.es5){const Oe=F instanceof s.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,s._)`${Oe}.length`,ve=>{this.var(be,(0,s._)`${Oe}[${ve}]`),te(be)})}return this._for(new C("of",ge,be,F),()=>te(be))}forIn(N,F,te,ge=this.opts.es5?h.varKinds.var:h.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,s._)`Object.keys(${F})`,te);const be=this._scope.toName(N);return this._for(new C("in",ge,be,F),()=>te(be))}endFor(){return this._endBlockNode(x)}label(N){return this._leafNode(new f(N))}break(N){return this._leafNode(new p(N))}return(N){const F=new L;if(this._blockNode(F),this.code(N),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(L)}try(N,F,te){if(!F&&!te)throw new Error('CodeGen: "try" without "catch" and "finally"');const ge=new I;if(this._blockNode(ge),this.code(N),F){const be=this.name("e");this._currNode=ge.catch=new D(be),F(be)}return te&&(this._currNode=ge.finally=new M,this.code(te)),this._endBlockNode(D,M)}throw(N){return this._leafNode(new g(N))}block(N,F){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(F),this}endBlock(N){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const te=this._nodes.length-F;if(te<0||N!==void 0&&te!==N)throw new Error(`CodeGen: wrong number of nodes: ${te} vs ${N} expected`);return this._nodes.length=F,this}func(N,F=s.nil,te,ge){return this._blockNode(new R(N,F,te)),ge&&this.code(ge).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,F){const te=this._currNode;if(te instanceof N||F&&te instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${N.kind}/${F.kind}`:N.kind}"`)}_elseNode(N){const F=this._currNode;if(!(F instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const F=this._nodes;F[F.length-1]=N}}o.CodeGen=q;function J(V,N){for(const F in N)V[F]=(V[F]||0)+(N[F]||0);return V}function G(V,N){return N instanceof s._CodeOrName?J(V,N.names):V}function Y(V,N,F){if(V instanceof s.Name)return te(V);if(!ge(V))return V;return new s._Code(V._items.reduce((be,Oe)=>(Oe instanceof s.Name&&(Oe=te(Oe)),Oe instanceof s._Code?be.push(...Oe._items):be.push(Oe),be),[]));function te(be){const Oe=F[be.str];return Oe===void 0||N[be.str]!==1?be:(delete N[be.str],Oe)}function ge(be){return be instanceof s._Code&&be._items.some(Oe=>Oe instanceof s.Name&&N[Oe.str]===1&&F[Oe.str]!==void 0)}}function ae(V,N){for(const F in N)V[F]=(V[F]||0)-(N[F]||0)}function ce(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,s._)`!${ee(V)}`}o.not=ce;const de=H(o.operators.AND);function ue(...V){return V.reduce(de)}o.and=ue;const pe=H(o.operators.OR);function ie(...V){return V.reduce(pe)}o.or=ie;function H(V){return(N,F)=>N===s.nil?F:F===s.nil?N:(0,s._)`${ee(N)} ${V} ${ee(F)}`}function ee(V){return V instanceof s.Name?V:(0,s._)`(${V})`}})(il)),il}var De={},Fu;function Ye(){if(Fu)return De;Fu=1,Object.defineProperty(De,"__esModule",{value:!0}),De.checkStrictMode=De.getErrorPath=De.Type=De.useFunc=De.setEvaluated=De.evaluatedPropsToName=De.mergeEvaluated=De.eachItem=De.unescapeJsonPointer=De.escapeJsonPointer=De.escapeFragment=De.unescapeFragment=De.schemaRefOrVal=De.schemaHasRulesButRef=De.schemaHasRules=De.checkUnknownRules=De.alwaysValidSchema=De.toHash=void 0;const o=ze(),s=ms();function h(C){const R={};for(const L of C)R[L]=!0;return R}De.toHash=h;function m(C,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(y(C,R),!_(R,C.self.RULES.all))}De.alwaysValidSchema=m;function y(C,R=C.schema){const{opts:L,self:I}=C;if(!L.strictSchema||typeof R=="boolean")return;const D=I.RULES.keywords;for(const M in R)D[M]||A(C,`unknown keyword: "${M}"`)}De.checkUnknownRules=y;function _(C,R){if(typeof C=="boolean")return!C;for(const L in C)if(R[L])return!0;return!1}De.schemaHasRules=_;function d(C,R){if(typeof C=="boolean")return!C;for(const L in C)if(L!=="$ref"&&R.all[L])return!0;return!1}De.schemaHasRulesButRef=d;function v({topSchemaRef:C,schemaPath:R},L,I,D){if(!D){if(typeof L=="number"||typeof L=="boolean")return L;if(typeof L=="string")return(0,o._)`${L}`}return(0,o._)`${C}${R}${(0,o.getProperty)(I)}`}De.schemaRefOrVal=v;function i(C){return g(decodeURIComponent(C))}De.unescapeFragment=i;function f(C){return encodeURIComponent(p(C))}De.escapeFragment=f;function p(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=p;function g(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=g;function b(C,R){if(Array.isArray(C))for(const L of C)R(L);else R(C)}De.eachItem=b;function j({mergeNames:C,mergeToName:R,mergeValues:L,resultToName:I}){return(D,M,q,J)=>{const G=q===void 0?M:q instanceof o.Name?(M instanceof o.Name?C(D,M,q):R(D,M,q),q):M instanceof o.Name?(R(D,q,M),M):L(M,q);return J===o.Name&&!(G instanceof o.Name)?I(D,G):G}}De.mergeEvaluated={props:j({mergeNames:(C,R,L)=>C.if((0,o._)`${L} !== true && ${R} !== undefined`,()=>{C.if((0,o._)`${R} === true`,()=>C.assign(L,!0),()=>C.assign(L,(0,o._)`${L} || {}`).code((0,o._)`Object.assign(${L}, ${R})`))}),mergeToName:(C,R,L)=>C.if((0,o._)`${L} !== true`,()=>{R===!0?C.assign(L,!0):(C.assign(L,(0,o._)`${L} || {}`),E(C,L,R))}),mergeValues:(C,R)=>C===!0?!0:{...C,...R},resultToName:O}),items:j({mergeNames:(C,R,L)=>C.if((0,o._)`${L} !== true && ${R} !== undefined`,()=>C.assign(L,(0,o._)`${R} === true ? true : ${L} > ${R} ? ${L} : ${R}`)),mergeToName:(C,R,L)=>C.if((0,o._)`${L} !== true`,()=>C.assign(L,R===!0?!0:(0,o._)`${L} > ${R} ? ${L} : ${R}`)),mergeValues:(C,R)=>C===!0?!0:Math.max(C,R),resultToName:(C,R)=>C.var("items",R)})};function O(C,R){if(R===!0)return C.var("props",!0);const L=C.var("props",(0,o._)`{}`);return R!==void 0&&E(C,L,R),L}De.evaluatedPropsToName=O;function E(C,R,L){Object.keys(L).forEach(I=>C.assign((0,o._)`${R}${(0,o.getProperty)(I)}`,!0))}De.setEvaluated=E;const k={};function S(C,R){return C.scopeValue("func",{ref:R,code:k[R.code]||(k[R.code]=new s._Code(R.code))})}De.useFunc=S;var x;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(x||(De.Type=x={}));function P(C,R,L){if(C instanceof o.Name){const I=R===x.Num;return L?I?(0,o._)`"[" + ${C} + "]"`:(0,o._)`"['" + ${C} + "']"`:I?(0,o._)`"/" + ${C}`:(0,o._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return L?(0,o.getProperty)(C).toString():"/"+p(C)}De.getErrorPath=P;function A(C,R,L=C.opts.strictSchema){if(L){if(R=`strict mode: ${R}`,L===!0)throw new Error(R);C.self.logger.warn(R)}}return De.checkStrictMode=A,De}var ys={},Mu;function fn(){if(Mu)return ys;Mu=1,Object.defineProperty(ys,"__esModule",{value:!0});const o=ze(),s={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 ys.default=s,ys}var qu;function vs(){return qu||(qu=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 s=ze(),h=Ye(),m=fn();o.keywordError={message:({keyword:k})=>(0,s.str)`must pass "${k}" keyword validation`},o.keyword$DataError={message:({keyword:k,schemaType:S})=>S?(0,s.str)`"${k}" keyword must be ${S} ($data)`:(0,s.str)`"${k}" keyword is invalid ($data)`};function y(k,S=o.keywordError,x,P){const{it:A}=k,{gen:C,compositeRule:R,allErrors:L}=A,I=g(k,S,x);P??(R||L)?i(C,I):f(A,(0,s._)`[${I}]`)}o.reportError=y;function _(k,S=o.keywordError,x){const{it:P}=k,{gen:A,compositeRule:C,allErrors:R}=P,L=g(k,S,x);i(A,L),C||R||f(P,m.default.vErrors)}o.reportExtraError=_;function d(k,S){k.assign(m.default.errors,S),k.if((0,s._)`${m.default.vErrors} !== null`,()=>k.if(S,()=>k.assign((0,s._)`${m.default.vErrors}.length`,S),()=>k.assign(m.default.vErrors,null)))}o.resetErrorsCount=d;function v({gen:k,keyword:S,schemaValue:x,data:P,errsCount:A,it:C}){if(A===void 0)throw new Error("ajv implementation error");const R=k.name("err");k.forRange("i",A,m.default.errors,L=>{k.const(R,(0,s._)`${m.default.vErrors}[${L}]`),k.if((0,s._)`${R}.instancePath === undefined`,()=>k.assign((0,s._)`${R}.instancePath`,(0,s.strConcat)(m.default.instancePath,C.errorPath))),k.assign((0,s._)`${R}.schemaPath`,(0,s.str)`${C.errSchemaPath}/${S}`),C.opts.verbose&&(k.assign((0,s._)`${R}.schema`,x),k.assign((0,s._)`${R}.data`,P))})}o.extendErrors=v;function i(k,S){const x=k.const("err",S);k.if((0,s._)`${m.default.vErrors} === null`,()=>k.assign(m.default.vErrors,(0,s._)`[${x}]`),(0,s._)`${m.default.vErrors}.push(${x})`),k.code((0,s._)`${m.default.errors}++`)}function f(k,S){const{gen:x,validateName:P,schemaEnv:A}=k;A.$async?x.throw((0,s._)`new ${k.ValidationError}(${S})`):(x.assign((0,s._)`${P}.errors`,S),x.return(!1))}const p={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function g(k,S,x){const{createErrors:P}=k.it;return P===!1?(0,s._)`{}`:b(k,S,x)}function b(k,S,x={}){const{gen:P,it:A}=k,C=[j(A,x),O(k,x)];return E(k,S,C),P.object(...C)}function j({errorPath:k},{instancePath:S}){const x=S?(0,s.str)`${k}${(0,h.getErrorPath)(S,h.Type.Str)}`:k;return[m.default.instancePath,(0,s.strConcat)(m.default.instancePath,x)]}function O({keyword:k,it:{errSchemaPath:S}},{schemaPath:x,parentSchema:P}){let A=P?S:(0,s.str)`${S}/${k}`;return x&&(A=(0,s.str)`${A}${(0,h.getErrorPath)(x,h.Type.Str)}`),[p.schemaPath,A]}function E(k,{params:S,message:x},P){const{keyword:A,data:C,schemaValue:R,it:L}=k,{opts:I,propertyName:D,topSchemaRef:M,schemaPath:q}=L;P.push([p.keyword,A],[p.params,typeof S=="function"?S(k):S||(0,s._)`{}`]),I.messages&&P.push([p.message,typeof x=="function"?x(k):x]),I.verbose&&P.push([p.schema,R],[p.parentSchema,(0,s._)`${M}${q}`],[m.default.data,C]),D&&P.push([p.propertyName,D])}})(nl)),nl}var Vu;function oy(){if(Vu)return Gn;Vu=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.boolOrEmptySchema=Gn.topBoolOrEmptySchema=void 0;const o=vs(),s=ze(),h=fn(),m={message:"boolean schema is false"};function y(v){const{gen:i,schema:f,validateName:p}=v;f===!1?d(v,!1):typeof f=="object"&&f.$async===!0?i.return(h.default.data):(i.assign((0,s._)`${p}.errors`,null),i.return(!0))}Gn.topBoolOrEmptySchema=y;function _(v,i){const{gen:f,schema:p}=v;p===!1?(f.var(i,!1),d(v)):f.var(i,!0)}Gn.boolOrEmptySchema=_;function d(v,i){const{gen:f,data:p}=v,g={gen:f,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:v};(0,o.reportError)(g,m,void 0,i)}return Gn}var jt={},Jn={},zu;function Hu(){if(zu)return Jn;zu=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.getRules=Jn.isJSONType=void 0;const o=["string","number","integer","boolean","null","object","array"],s=new Set(o);function h(y){return typeof y=="string"&&s.has(y)}Jn.isJSONType=h;function m(){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 Jn.getRules=m,Jn}var Gr={},Uu;function Gu(){if(Uu)return Gr;Uu=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.shouldUseRule=Gr.shouldUseGroup=Gr.schemaHasRulesForType=void 0;function o({schema:m,self:y},_){const d=y.RULES.types[_];return d&&d!==!0&&s(m,d)}Gr.schemaHasRulesForType=o;function s(m,y){return y.rules.some(_=>h(m,_))}Gr.shouldUseGroup=s;function h(m,y){var _;return m[y.keyword]!==void 0||((_=y.definition.implements)===null||_===void 0?void 0:_.some(d=>m[d]!==void 0))}return Gr.shouldUseRule=h,Gr}var Ju;function bs(){if(Ju)return jt;Ju=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.reportTypeError=jt.checkDataTypes=jt.checkDataType=jt.coerceAndCheckDataType=jt.getJSONTypes=jt.getSchemaTypes=jt.DataType=void 0;const o=Hu(),s=Gu(),h=vs(),m=ze(),y=Ye();var _;(function(x){x[x.Correct=0]="Correct",x[x.Wrong=1]="Wrong"})(_||(jt.DataType=_={}));function d(x){const P=v(x.type);if(P.includes("null")){if(x.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!P.length&&x.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');x.nullable===!0&&P.push("null")}return P}jt.getSchemaTypes=d;function v(x){const P=Array.isArray(x)?x:x?[x]:[];if(P.every(o.isJSONType))return P;throw new Error("type must be JSONType or JSONType[]: "+P.join(","))}jt.getJSONTypes=v;function i(x,P){const{gen:A,data:C,opts:R}=x,L=p(P,R.coerceTypes),I=P.length>0&&!(L.length===0&&P.length===1&&(0,s.schemaHasRulesForType)(x,P[0]));if(I){const D=O(P,C,R.strictNumbers,_.Wrong);A.if(D,()=>{L.length?g(x,P,L):k(x)})}return I}jt.coerceAndCheckDataType=i;const f=new Set(["string","number","integer","boolean","null"]);function p(x,P){return P?x.filter(A=>f.has(A)||P==="array"&&A==="array"):[]}function g(x,P,A){const{gen:C,data:R,opts:L}=x,I=C.let("dataType",(0,m._)`typeof ${R}`),D=C.let("coerced",(0,m._)`undefined`);L.coerceTypes==="array"&&C.if((0,m._)`${I} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>C.assign(R,(0,m._)`${R}[0]`).assign(I,(0,m._)`typeof ${R}`).if(O(P,R,L.strictNumbers),()=>C.assign(D,R))),C.if((0,m._)`${D} !== undefined`);for(const q of A)(f.has(q)||q==="array"&&L.coerceTypes==="array")&&M(q);C.else(),k(x),C.endIf(),C.if((0,m._)`${D} !== undefined`,()=>{C.assign(R,D),b(x,D)});function M(q){switch(q){case"string":C.elseIf((0,m._)`${I} == "number" || ${I} == "boolean"`).assign(D,(0,m._)`"" + ${R}`).elseIf((0,m._)`${R} === null`).assign(D,(0,m._)`""`);return;case"number":C.elseIf((0,m._)`${I} == "boolean" || ${R} === null
|
|
8
|
-
|| (${I} == "string" && ${R} && ${R} == +${R})`).assign(D,(0,m._)`+${R}`);return;case"integer":
|
|
9
|
-
|| (${I} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(D,(0,m._)`+${R}`);return;case"boolean":
|
|
10
|
-
|| ${I} === "boolean" || ${R} === null`).assign(D,(0,m._)`[${R}]`)}}}function b({gen:x,parentData:P,parentDataProperty:A},C){x.if((0,m._)`${P} !== undefined`,()=>x.assign((0,m._)`${P}[${A}]`,C))}function j(x,P,A,C=_.Correct){const R=C===_.Correct?m.operators.EQ:m.operators.NEQ;let L;switch(x){case"null":return(0,m._)`${P} ${R} null`;case"array":L=(0,m._)`Array.isArray(${P})`;break;case"object":L=(0,m._)`${P} && typeof ${P} == "object" && !Array.isArray(${P})`;break;case"integer":L=I((0,m._)`!(${P} % 1) && !isNaN(${P})`);break;case"number":L=I();break;default:return(0,m._)`typeof ${P} ${R} ${x}`}return C===_.Correct?L:(0,m.not)(L);function I(D=m.nil){return(0,m.and)((0,m._)`typeof ${P} == "number"`,D,A?(0,m._)`isFinite(${P})`:m.nil)}}jt.checkDataType=j;function O(x,P,A,C){if(x.length===1)return j(x[0],P,A,C);let R;const L=(0,y.toHash)(x);if(L.array&&L.object){const I=(0,m._)`typeof ${P} != "object"`;R=L.null?I:(0,m._)`!${P} || ${I}`,delete L.null,delete L.array,delete L.object}else R=m.nil;L.number&&delete L.integer;for(const I in L)R=(0,m.and)(R,j(I,P,A,C));return R}jt.checkDataTypes=O;const E={message:({schema:x})=>`must be ${x}`,params:({schema:x,schemaValue:P})=>typeof x=="string"?(0,m._)`{type: ${x}}`:(0,m._)`{type: ${P}}`};function k(x){const P=S(x);(0,h.reportError)(P,E)}jt.reportTypeError=k;function S(x){const{gen:P,data:A,schema:C}=x,R=(0,y.schemaRefOrVal)(x,C,"type");return{gen:P,keyword:"type",data:A,schema:C.type,schemaCode:R,schemaValue:R,parentSchema:C,params:{},it:x}}return jt}var Ao={},Ku;function sy(){if(Ku)return Ao;Ku=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.assignDefaults=void 0;const o=ze(),s=Ye();function h(y,_){const{properties:d,items:v}=y.schema;if(_==="object"&&d)for(const i in d)m(y,i,d[i].default);else _==="array"&&Array.isArray(v)&&v.forEach((i,f)=>m(y,f,i.default))}Ao.assignDefaults=h;function m(y,_,d){const{gen:v,compositeRule:i,data:f,opts:p}=y;if(d===void 0)return;const g=(0,o._)`${f}${(0,o.getProperty)(_)}`;if(i){(0,s.checkStrictMode)(y,`default is ignored for: ${g}`);return}let b=(0,o._)`${g} === undefined`;p.useDefaults==="empty"&&(b=(0,o._)`${b} || ${g} === null || ${g} === ""`),v.if(b,(0,o._)`${g} = ${(0,o.stringify)(d)}`)}return Ao}var ur={},rt={},Wu;function dr(){if(Wu)return rt;Wu=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.validateUnion=rt.validateArray=rt.usePattern=rt.callValidateCode=rt.schemaProperties=rt.allSchemaProperties=rt.noPropertyInData=rt.propertyInData=rt.isOwnProperty=rt.hasPropFunc=rt.reportMissingProp=rt.checkMissingProp=rt.checkReportMissingProp=void 0;const o=ze(),s=Ye(),h=fn(),m=Ye();function y(x,P){const{gen:A,data:C,it:R}=x;A.if(p(A,C,P,R.opts.ownProperties),()=>{x.setParams({missingProperty:(0,o._)`${P}`},!0),x.error()})}rt.checkReportMissingProp=y;function _({gen:x,data:P,it:{opts:A}},C,R){return(0,o.or)(...C.map(L=>(0,o.and)(p(x,P,L,A.ownProperties),(0,o._)`${R} = ${L}`)))}rt.checkMissingProp=_;function d(x,P){x.setParams({missingProperty:P},!0),x.error()}rt.reportMissingProp=d;function v(x){return x.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,o._)`Object.prototype.hasOwnProperty`})}rt.hasPropFunc=v;function i(x,P,A){return(0,o._)`${v(x)}.call(${P}, ${A})`}rt.isOwnProperty=i;function f(x,P,A,C){const R=(0,o._)`${P}${(0,o.getProperty)(A)} !== undefined`;return C?(0,o._)`${R} && ${i(x,P,A)}`:R}rt.propertyInData=f;function p(x,P,A,C){const R=(0,o._)`${P}${(0,o.getProperty)(A)} === undefined`;return C?(0,o.or)(R,(0,o.not)(i(x,P,A))):R}rt.noPropertyInData=p;function g(x){return x?Object.keys(x).filter(P=>P!=="__proto__"):[]}rt.allSchemaProperties=g;function b(x,P){return g(P).filter(A=>!(0,s.alwaysValidSchema)(x,P[A]))}rt.schemaProperties=b;function j({schemaCode:x,data:P,it:{gen:A,topSchemaRef:C,schemaPath:R,errorPath:L},it:I},D,M,q){const J=q?(0,o._)`${x}, ${P}, ${C}${R}`:P,G=[[h.default.instancePath,(0,o.strConcat)(h.default.instancePath,L)],[h.default.parentData,I.parentData],[h.default.parentDataProperty,I.parentDataProperty],[h.default.rootData,h.default.rootData]];I.opts.dynamicRef&&G.push([h.default.dynamicAnchors,h.default.dynamicAnchors]);const Y=(0,o._)`${J}, ${A.object(...G)}`;return M!==o.nil?(0,o._)`${D}.call(${M}, ${Y})`:(0,o._)`${D}(${Y})`}rt.callValidateCode=j;const O=(0,o._)`new RegExp`;function E({gen:x,it:{opts:P}},A){const C=P.unicodeRegExp?"u":"",{regExp:R}=P.code,L=R(A,C);return x.scopeValue("pattern",{key:L.toString(),ref:L,code:(0,o._)`${R.code==="new RegExp"?O:(0,m.useFunc)(x,R)}(${A}, ${C})`})}rt.usePattern=E;function k(x){const{gen:P,data:A,keyword:C,it:R}=x,L=P.name("valid");if(R.allErrors){const D=P.let("valid",!0);return I(()=>P.assign(D,!1)),D}return P.var(L,!0),I(()=>P.break()),L;function I(D){const M=P.const("len",(0,o._)`${A}.length`);P.forRange("i",0,M,q=>{x.subschema({keyword:C,dataProp:q,dataPropType:s.Type.Num},L),P.if((0,o.not)(L),D)})}}rt.validateArray=k;function S(x){const{gen:P,schema:A,keyword:C,it:R}=x;if(!Array.isArray(A))throw new Error("ajv implementation error");if(A.some(M=>(0,s.alwaysValidSchema)(R,M))&&!R.opts.unevaluated)return;const I=P.let("valid",!1),D=P.name("_valid");P.block(()=>A.forEach((M,q)=>{const J=x.subschema({keyword:C,schemaProp:q,compositeRule:!0},D);P.assign(I,(0,o._)`${I} || ${D}`),x.mergeValidEvaluated(J,D)||P.if((0,o.not)(I))})),x.result(I,()=>x.reset(),()=>x.error(!0))}return rt.validateUnion=S,rt}var Zu;function ay(){if(Zu)return ur;Zu=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.validateKeywordUsage=ur.validSchemaType=ur.funcKeywordCode=ur.macroKeywordCode=void 0;const o=ze(),s=fn(),h=dr(),m=vs();function y(b,j){const{gen:O,keyword:E,schema:k,parentSchema:S,it:x}=b,P=j.macro.call(x.self,k,S,x),A=f(O,E,P);x.opts.validateSchema!==!1&&x.self.validateSchema(P,!0);const C=O.name("valid");b.subschema({schema:P,schemaPath:o.nil,errSchemaPath:`${x.errSchemaPath}/${E}`,topSchemaRef:A,compositeRule:!0},C),b.pass(C,()=>b.error(!0))}ur.macroKeywordCode=y;function _(b,j){var O;const{gen:E,keyword:k,schema:S,parentSchema:x,$data:P,it:A}=b;i(A,j);const C=!P&&j.compile?j.compile.call(A.self,S,x,A):j.validate,R=f(E,k,C),L=E.let("valid");b.block$data(L,I),b.ok((O=j.valid)!==null&&O!==void 0?O:L);function I(){if(j.errors===!1)q(),j.modifying&&d(b),J(()=>b.error());else{const G=j.async?D():M();j.modifying&&d(b),J(()=>v(b,G))}}function D(){const G=E.let("ruleErrs",null);return E.try(()=>q((0,o._)`await `),Y=>E.assign(L,!1).if((0,o._)`${Y} instanceof ${A.ValidationError}`,()=>E.assign(G,(0,o._)`${Y}.errors`),()=>E.throw(Y))),G}function M(){const G=(0,o._)`${R}.errors`;return E.assign(G,null),q(o.nil),G}function q(G=j.async?(0,o._)`await `:o.nil){const Y=A.opts.passContext?s.default.this:s.default.self,ae=!("compile"in j&&!P||j.schema===!1);E.assign(L,(0,o._)`${G}${(0,h.callValidateCode)(b,R,Y,ae)}`,j.modifying)}function J(G){var Y;E.if((0,o.not)((Y=j.valid)!==null&&Y!==void 0?Y:L),G)}}ur.funcKeywordCode=_;function d(b){const{gen:j,data:O,it:E}=b;j.if(E.parentData,()=>j.assign(O,(0,o._)`${E.parentData}[${E.parentDataProperty}]`))}function v(b,j){const{gen:O}=b;O.if((0,o._)`Array.isArray(${j})`,()=>{O.assign(s.default.vErrors,(0,o._)`${s.default.vErrors} === null ? ${j} : ${s.default.vErrors}.concat(${j})`).assign(s.default.errors,(0,o._)`${s.default.vErrors}.length`),(0,m.extendErrors)(b)},()=>b.error())}function i({schemaEnv:b},j){if(j.async&&!b.$async)throw new Error("async keyword in sync schema")}function f(b,j,O){if(O===void 0)throw new Error(`keyword "${j}" failed to compile`);return b.scopeValue("keyword",typeof O=="function"?{ref:O}:{ref:O,code:(0,o.stringify)(O)})}function p(b,j,O=!1){return!j.length||j.some(E=>E==="array"?Array.isArray(b):E==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==E||O&&typeof b>"u")}ur.validSchemaType=p;function g({schema:b,opts:j,self:O,errSchemaPath:E},k,S){if(Array.isArray(k.keyword)?!k.keyword.includes(S):k.keyword!==S)throw new Error("ajv implementation error");const x=k.dependencies;if(x?.some(P=>!Object.prototype.hasOwnProperty.call(b,P)))throw new Error(`parent schema must have dependencies of ${S}: ${x.join(",")}`);if(k.validateSchema&&!k.validateSchema(b[S])){const A=`keyword "${S}" value is invalid at path "${E}": `+O.errorsText(k.validateSchema.errors);if(j.validateSchema==="log")O.logger.error(A);else throw new Error(A)}}return ur.validateKeywordUsage=g,ur}var Jr={},Yu;function ly(){if(Yu)return Jr;Yu=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.extendSubschemaMode=Jr.extendSubschemaData=Jr.getSubschema=void 0;const o=ze(),s=Ye();function h(_,{keyword:d,schemaProp:v,schema:i,schemaPath:f,errSchemaPath:p,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,s.escapeFragment)(v)}`}}if(i!==void 0){if(f===void 0||p===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:f,topSchemaRef:g,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}Jr.getSubschema=h;function m(_,d,{dataProp:v,dataPropType:i,data:f,dataTypes:p,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:O,dataPathArr:E,opts:k}=d,S=b.let("data",(0,o._)`${d.data}${(0,o.getProperty)(v)}`,!0);j(S),_.errorPath=(0,o.str)`${O}${(0,s.getErrorPath)(v,i,k.jsPropertySyntax)}`,_.parentDataProperty=(0,o._)`${v}`,_.dataPathArr=[...E,_.parentDataProperty]}if(f!==void 0){const O=f instanceof o.Name?f:b.let("data",f,!0);j(O),g!==void 0&&(_.propertyName=g)}p&&(_.dataTypes=p);function j(O){_.data=O,_.dataLevel=d.dataLevel+1,_.dataTypes=[],d.definedProperties=new Set,_.parentData=d.data,_.dataNames=[...d.dataNames,O]}}Jr.extendSubschemaData=m;function y(_,{jtdDiscriminator:d,jtdMetadata:v,compositeRule:i,createErrors:f,allErrors:p}){i!==void 0&&(_.compositeRule=i),f!==void 0&&(_.createErrors=f),p!==void 0&&(_.allErrors=p),_.jtdDiscriminator=d,_.jtdMetadata=v}return Jr.extendSubschemaMode=y,Jr}var $t={},al,Qu;function Xu(){return Qu||(Qu=1,al=function o(s,h){if(s===h)return!0;if(s&&h&&typeof s=="object"&&typeof h=="object"){if(s.constructor!==h.constructor)return!1;var m,y,_;if(Array.isArray(s)){if(m=s.length,m!=h.length)return!1;for(y=m;y--!==0;)if(!o(s[y],h[y]))return!1;return!0}if(s.constructor===RegExp)return s.source===h.source&&s.flags===h.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===h.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===h.toString();if(_=Object.keys(s),m=_.length,m!==Object.keys(h).length)return!1;for(y=m;y--!==0;)if(!Object.prototype.hasOwnProperty.call(h,_[y]))return!1;for(y=m;y--!==0;){var d=_[y];if(!o(s[d],h[d]))return!1}return!0}return s!==s&&h!==h}),al}var ll={exports:{}},ed;function cy(){if(ed)return ll.exports;ed=1;var o=ll.exports=function(m,y,_){typeof y=="function"&&(_=y,y={}),_=y.cb||_;var d=typeof _=="function"?_:_.pre||function(){},v=_.post||function(){};s(y,d,v,m,"",m)};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 s(m,y,_,d,v,i,f,p,g,b){if(d&&typeof d=="object"&&!Array.isArray(d)){y(d,v,i,f,p,g,b);for(var j in d){var O=d[j];if(Array.isArray(O)){if(j in o.arrayKeywords)for(var E=0;E<O.length;E++)s(m,y,_,O[E],v+"/"+j+"/"+E,i,v,j,d,E)}else if(j in o.propsKeywords){if(O&&typeof O=="object")for(var k in O)s(m,y,_,O[k],v+"/"+j+"/"+h(k),i,v,j,d,k)}else(j in o.keywords||m.allKeys&&!(j in o.skipKeywords))&&s(m,y,_,O,v+"/"+j,i,v,j,d)}_(d,v,i,f,p,g,b)}}function h(m){return m.replace(/~/g,"~0").replace(/\//g,"~1")}return ll.exports}var td;function gs(){if(td)return $t;td=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.getSchemaRefs=$t.resolveUrl=$t.normalizeId=$t._getFullPath=$t.getFullPath=$t.inlineRef=void 0;const o=Ye(),s=Xu(),h=cy(),m=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function y(E,k=!0){return typeof E=="boolean"?!0:k===!0?!d(E):k?v(E)<=k:!1}$t.inlineRef=y;const _=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(E){for(const k in E){if(_.has(k))return!0;const S=E[k];if(Array.isArray(S)&&S.some(d)||typeof S=="object"&&d(S))return!0}return!1}function v(E){let k=0;for(const S in E){if(S==="$ref")return 1/0;if(k++,!m.has(S)&&(typeof E[S]=="object"&&(0,o.eachItem)(E[S],x=>k+=v(x)),k===1/0))return 1/0}return k}function i(E,k="",S){S!==!1&&(k=g(k));const x=E.parse(k);return f(E,x)}$t.getFullPath=i;function f(E,k){return E.serialize(k).split("#")[0]+"#"}$t._getFullPath=f;const p=/#\/?$/;function g(E){return E?E.replace(p,""):""}$t.normalizeId=g;function b(E,k,S){return S=g(S),E.resolve(k,S)}$t.resolveUrl=b;const j=/^[a-z_][-a-z0-9._]*$/i;function O(E,k){if(typeof E=="boolean")return{};const{schemaId:S,uriResolver:x}=this.opts,P=g(E[S]||k),A={"":P},C=i(x,P,!1),R={},L=new Set;return h(E,{allKeys:!0},(M,q,J,G)=>{if(G===void 0)return;const Y=C+q;let ae=A[G];typeof M[S]=="string"&&(ae=ce.call(this,M[S])),de.call(this,M.$anchor),de.call(this,M.$dynamicAnchor),A[q]=ae;function ce(ue){const pe=this.opts.uriResolver.resolve;if(ue=g(ae?pe(ae,ue):ue),L.has(ue))throw D(ue);L.add(ue);let ie=this.refs[ue];return typeof ie=="string"&&(ie=this.refs[ie]),typeof ie=="object"?I(M,ie.schema,ue):ue!==g(Y)&&(ue[0]==="#"?(I(M,R[ue],ue),R[ue]=M):this.refs[ue]=Y),ue}function de(ue){if(typeof ue=="string"){if(!j.test(ue))throw new Error(`invalid anchor "${ue}"`);ce.call(this,`#${ue}`)}}}),R;function I(M,q,J){if(q!==void 0&&!s(M,q))throw D(J)}function D(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return $t.getSchemaRefs=O,$t}var rd;function _s(){if(rd)return Ur;rd=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.getData=Ur.KeywordCxt=Ur.validateFunctionCode=void 0;const o=oy(),s=bs(),h=Gu(),m=bs(),y=sy(),_=ay(),d=ly(),v=ze(),i=fn(),f=gs(),p=Ye(),g=vs();function b(U){if(C(U)&&(L(U),A(U))){k(U);return}j(U,()=>(0,o.topBoolOrEmptySchema)(U))}Ur.validateFunctionCode=b;function j({gen:U,validateName:Z,schema:re,schemaEnv:le,opts:fe},Pe){fe.code.es5?U.func(Z,(0,v._)`${i.default.data}, ${i.default.valCxt}`,le.$async,()=>{U.code((0,v._)`"use strict"; ${x(re,fe)}`),E(U,fe),U.code(Pe)}):U.func(Z,(0,v._)`${i.default.data}, ${O(fe)}`,le.$async,()=>U.code(x(re,fe)).code(Pe))}function O(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 E(U,Z){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}`),Z.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),Z.dynamicRef&&U.var(i.default.dynamicAnchors,(0,v._)`{}`)})}function k(U){const{schema:Z,opts:re,gen:le}=U;j(U,()=>{re.$comment&&Z.$comment&&G(U),M(U),le.let(i.default.vErrors,null),le.let(i.default.errors,0),re.unevaluated&&S(U),I(U),Y(U)})}function S(U){const{gen:Z,validateName:re}=U;U.evaluated=Z.const("evaluated",(0,v._)`${re}.evaluated`),Z.if((0,v._)`${U.evaluated}.dynamicProps`,()=>Z.assign((0,v._)`${U.evaluated}.props`,(0,v._)`undefined`)),Z.if((0,v._)`${U.evaluated}.dynamicItems`,()=>Z.assign((0,v._)`${U.evaluated}.items`,(0,v._)`undefined`))}function x(U,Z){const re=typeof U=="object"&&U[Z.schemaId];return re&&(Z.code.source||Z.code.process)?(0,v._)`/*# sourceURL=${re} */`:v.nil}function P(U,Z){if(C(U)&&(L(U),A(U))){R(U,Z);return}(0,o.boolOrEmptySchema)(U,Z)}function A({schema:U,self:Z}){if(typeof U=="boolean")return!U;for(const re in U)if(Z.RULES.all[re])return!0;return!1}function C(U){return typeof U.schema!="boolean"}function R(U,Z){const{schema:re,gen:le,opts:fe}=U;fe.$comment&&re.$comment&&G(U),q(U),J(U);const Pe=le.const("_errs",i.default.errors);I(U,Pe),le.var(Z,(0,v._)`${Pe} === ${i.default.errors}`)}function L(U){(0,p.checkUnknownRules)(U),D(U)}function I(U,Z){if(U.opts.jtd)return ce(U,[],!1,Z);const re=(0,s.getSchemaTypes)(U.schema),le=(0,s.coerceAndCheckDataType)(U,re);ce(U,re,!le,Z)}function D(U){const{schema:Z,errSchemaPath:re,opts:le,self:fe}=U;Z.$ref&&le.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(Z,fe.RULES)&&fe.logger.warn(`$ref: keywords ignored in schema at path "${re}"`)}function M(U){const{schema:Z,opts:re}=U;Z.default!==void 0&&re.useDefaults&&re.strictSchema&&(0,p.checkStrictMode)(U,"default is ignored in the schema root")}function q(U){const Z=U.schema[U.opts.schemaId];Z&&(U.baseId=(0,f.resolveUrl)(U.opts.uriResolver,U.baseId,Z))}function J(U){if(U.schema.$async&&!U.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:U,schemaEnv:Z,schema:re,errSchemaPath:le,opts:fe}){const Pe=re.$comment;if(fe.$comment===!0)U.code((0,v._)`${i.default.self}.logger.log(${Pe})`);else if(typeof fe.$comment=="function"){const He=(0,v.str)`${le}/$comment`,We=U.scopeValue("root",{ref:Z.root});U.code((0,v._)`${i.default.self}.opts.$comment(${Pe}, ${He}, ${We}.schema)`)}}function Y(U){const{gen:Z,schemaEnv:re,validateName:le,ValidationError:fe,opts:Pe}=U;re.$async?Z.if((0,v._)`${i.default.errors} === 0`,()=>Z.return(i.default.data),()=>Z.throw((0,v._)`new ${fe}(${i.default.vErrors})`)):(Z.assign((0,v._)`${le}.errors`,i.default.vErrors),Pe.unevaluated&&ae(U),Z.return((0,v._)`${i.default.errors} === 0`))}function ae({gen:U,evaluated:Z,props:re,items:le}){re instanceof v.Name&&U.assign((0,v._)`${Z}.props`,re),le instanceof v.Name&&U.assign((0,v._)`${Z}.items`,le)}function ce(U,Z,re,le){const{gen:fe,schema:Pe,data:He,allErrors:We,opts:nt,self:Ze}=U,{RULES:et}=Ze;if(Pe.$ref&&(nt.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(Pe,et))){fe.block(()=>ge(U,"$ref",et.all.$ref.definition));return}nt.jtd||ue(U,Z),fe.block(()=>{for(const Ge of et.rules)tt(Ge);tt(et.post)});function tt(Ge){(0,h.shouldUseGroup)(Pe,Ge)&&(Ge.type?(fe.if((0,m.checkDataType)(Ge.type,He,nt.strictNumbers)),de(U,Ge),Z.length===1&&Z[0]===Ge.type&&re&&(fe.else(),(0,m.reportTypeError)(U)),fe.endIf()):de(U,Ge),We||fe.if((0,v._)`${i.default.errors} === ${le||0}`))}}function de(U,Z){const{gen:re,schema:le,opts:{useDefaults:fe}}=U;fe&&(0,y.assignDefaults)(U,Z.type),re.block(()=>{for(const Pe of Z.rules)(0,h.shouldUseRule)(le,Pe)&&ge(U,Pe.keyword,Pe.definition,Z.type)})}function ue(U,Z){U.schemaEnv.meta||!U.opts.strictTypes||(pe(U,Z),U.opts.allowUnionTypes||ie(U,Z),H(U,U.dataTypes))}function pe(U,Z){if(Z.length){if(!U.dataTypes.length){U.dataTypes=Z;return}Z.forEach(re=>{V(U.dataTypes,re)||F(U,`type "${re}" not allowed by context "${U.dataTypes.join(",")}"`)}),N(U,Z)}}function ie(U,Z){Z.length>1&&!(Z.length===2&&Z.includes("null"))&&F(U,"use allowUnionTypes to allow union type keyword")}function H(U,Z){const re=U.self.RULES.all;for(const le in re){const fe=re[le];if(typeof fe=="object"&&(0,h.shouldUseRule)(U.schema,fe)){const{type:Pe}=fe.definition;Pe.length&&!Pe.some(He=>ee(Z,He))&&F(U,`missing type "${Pe.join(",")}" for keyword "${le}"`)}}}function ee(U,Z){return U.includes(Z)||Z==="number"&&U.includes("integer")}function V(U,Z){return U.includes(Z)||Z==="integer"&&U.includes("number")}function N(U,Z){const re=[];for(const le of U.dataTypes)V(Z,le)?re.push(le):Z.includes("integer")&&le==="number"&&re.push("integer");U.dataTypes=re}function F(U,Z){const re=U.schemaEnv.baseId+U.errSchemaPath;Z+=` at "${re}" (strictTypes)`,(0,p.checkStrictMode)(U,Z,U.opts.strictTypes)}class te{constructor(Z,re,le){if((0,_.validateKeywordUsage)(Z,re,le),this.gen=Z.gen,this.allErrors=Z.allErrors,this.keyword=le,this.data=Z.data,this.schema=Z.schema[le],this.$data=re.$data&&Z.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(Z,this.schema,le,this.$data),this.schemaType=re.schemaType,this.parentSchema=Z.schema,this.params={},this.it=Z,this.def=re,this.$data)this.schemaCode=Z.gen.const("vSchema",ve(this.$data,Z));else if(this.schemaCode=this.schemaValue,!(0,_.validSchemaType)(this.schema,re.schemaType,re.allowUndefined))throw new Error(`${le} value must be ${JSON.stringify(re.schemaType)}`);("code"in re?re.trackErrors:re.errors!==!1)&&(this.errsCount=Z.gen.const("_errs",i.default.errors))}result(Z,re,le){this.failResult((0,v.not)(Z),re,le)}failResult(Z,re,le){this.gen.if(Z),le?le():this.error(),re?(this.gen.else(),re(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Z,re){this.failResult((0,v.not)(Z),void 0,re)}fail(Z){if(Z===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Z),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Z){if(!this.$data)return this.fail(Z);const{schemaCode:re}=this;this.fail((0,v._)`${re} !== undefined && (${(0,v.or)(this.invalid$data(),Z)})`)}error(Z,re,le){if(re){this.setParams(re),this._error(Z,le),this.setParams({});return}this._error(Z,le)}_error(Z,re){(Z?g.reportExtraError:g.reportError)(this,this.def.error,re)}$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(Z){this.allErrors||this.gen.if(Z)}setParams(Z,re){re?Object.assign(this.params,Z):this.params=Z}block$data(Z,re,le=v.nil){this.gen.block(()=>{this.check$data(Z,le),re()})}check$data(Z=v.nil,re=v.nil){if(!this.$data)return;const{gen:le,schemaCode:fe,schemaType:Pe,def:He}=this;le.if((0,v.or)((0,v._)`${fe} === undefined`,re)),Z!==v.nil&&le.assign(Z,!0),(Pe.length||He.validateSchema)&&(le.elseIf(this.invalid$data()),this.$dataError(),Z!==v.nil&&le.assign(Z,!1)),le.else()}invalid$data(){const{gen:Z,schemaCode:re,schemaType:le,def:fe,it:Pe}=this;return(0,v.or)(He(),We());function He(){if(le.length){if(!(re instanceof v.Name))throw new Error("ajv implementation error");const nt=Array.isArray(le)?le:[le];return(0,v._)`${(0,m.checkDataTypes)(nt,re,Pe.opts.strictNumbers,m.DataType.Wrong)}`}return v.nil}function We(){if(fe.validateSchema){const nt=Z.scopeValue("validate$data",{ref:fe.validateSchema});return(0,v._)`!${nt}(${re})`}return v.nil}}subschema(Z,re){const le=(0,d.getSubschema)(this.it,Z);(0,d.extendSubschemaData)(le,this.it,Z),(0,d.extendSubschemaMode)(le,Z);const fe={...this.it,...le,items:void 0,props:void 0};return P(fe,re),fe}mergeEvaluated(Z,re){const{it:le,gen:fe}=this;le.opts.unevaluated&&(le.props!==!0&&Z.props!==void 0&&(le.props=p.mergeEvaluated.props(fe,Z.props,le.props,re)),le.items!==!0&&Z.items!==void 0&&(le.items=p.mergeEvaluated.items(fe,Z.items,le.items,re)))}mergeValidEvaluated(Z,re){const{it:le,gen:fe}=this;if(le.opts.unevaluated&&(le.props!==!0||le.items!==!0))return fe.if(re,()=>this.mergeEvaluated(Z,v.Name)),!0}}Ur.KeywordCxt=te;function ge(U,Z,re,le){const fe=new te(U,re,Z);"code"in re?re.code(fe,le):fe.$data&&re.validate?(0,_.funcKeywordCode)(fe,re):"macro"in re?(0,_.macroKeywordCode)(fe,re):(re.compile||re.validate)&&(0,_.funcKeywordCode)(fe,re)}const be=/^\/(?:[^~]|~0|~1)*$/,Oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(U,{dataLevel:Z,dataNames:re,dataPathArr:le}){let fe,Pe;if(U==="")return i.default.rootData;if(U[0]==="/"){if(!be.test(U))throw new Error(`Invalid JSON-pointer: ${U}`);fe=U,Pe=i.default.rootData}else{const Ze=Oe.exec(U);if(!Ze)throw new Error(`Invalid JSON-pointer: ${U}`);const et=+Ze[1];if(fe=Ze[2],fe==="#"){if(et>=Z)throw new Error(nt("property/index",et));return le[Z-et]}if(et>Z)throw new Error(nt("data",et));if(Pe=re[Z-et],!fe)return Pe}let He=Pe;const We=fe.split("/");for(const Ze of We)Ze&&(Pe=(0,v._)`${Pe}${(0,v.getProperty)((0,p.unescapeJsonPointer)(Ze))}`,He=(0,v._)`${He} && ${Pe}`);return He;function nt(Ze,et){return`Cannot access ${Ze} ${et} levels up, current level is ${Z}`}}return Ur.getData=ve,Ur}var ws={},nd;function cl(){if(nd)return ws;nd=1,Object.defineProperty(ws,"__esModule",{value:!0});class o extends Error{constructor(h){super("validation failed"),this.errors=h,this.ajv=this.validation=!0}}return ws.default=o,ws}var ks={},id;function js(){if(id)return ks;id=1,Object.defineProperty(ks,"__esModule",{value:!0});const o=gs();class s extends Error{constructor(m,y,_,d){super(d||`can't resolve reference ${_} from id ${y}`),this.missingRef=(0,o.resolveUrl)(m,y,_),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(m,this.missingRef))}}return ks.default=s,ks}var Wt={},od;function ul(){if(od)return Wt;od=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.resolveSchema=Wt.getCompilingSchema=Wt.resolveRef=Wt.compileSchema=Wt.SchemaEnv=void 0;const o=ze(),s=cl(),h=fn(),m=gs(),y=Ye(),_=_s();class d{constructor(S){var x;this.refs={},this.dynamicAnchors={};let P;typeof S.schema=="object"&&(P=S.schema),this.schema=S.schema,this.schemaId=S.schemaId,this.root=S.root||this,this.baseId=(x=S.baseId)!==null&&x!==void 0?x:(0,m.normalizeId)(P?.[S.schemaId||"$id"]),this.schemaPath=S.schemaPath,this.localRefs=S.localRefs,this.meta=S.meta,this.$async=P?.$async,this.refs={}}}Wt.SchemaEnv=d;function v(k){const S=p.call(this,k);if(S)return S;const x=(0,m.getFullPath)(this.opts.uriResolver,k.root.baseId),{es5:P,lines:A}=this.opts.code,{ownProperties:C}=this.opts,R=new o.CodeGen(this.scope,{es5:P,lines:A,ownProperties:C});let L;k.$async&&(L=R.scopeValue("Error",{ref:s.default,code:(0,o._)`require("ajv/dist/runtime/validation_error").default`}));const I=R.scopeName("validate");k.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:k.schema,code:(0,o.stringify)(k.schema)}:{ref:k.schema}),validateName:I,ValidationError:L,schema:k.schema,schemaEnv:k,rootId:x,baseId:k.baseId||x,schemaPath:o.nil,errSchemaPath:k.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,o._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(k),(0,_.validateFunctionCode)(D),R.optimize(this.opts.code.optimize);const q=R.toString();M=`${R.scopeRefs(h.default.scope)}return ${q}`,this.opts.code.process&&(M=this.opts.code.process(M,k));const G=new Function(`${h.default.self}`,`${h.default.scope}`,M)(this,this.scope.get());if(this.scope.value(I,{ref:G}),G.errors=null,G.schema=k.schema,G.schemaEnv=k,k.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:I,validateCode:q,scopeValues:R._values}),this.opts.unevaluated){const{props:Y,items:ae}=D;G.evaluated={props:Y instanceof o.Name?void 0:Y,items:ae instanceof o.Name?void 0:ae,dynamicProps:Y instanceof o.Name,dynamicItems:ae instanceof o.Name},G.source&&(G.source.evaluated=(0,o.stringify)(G.evaluated))}return k.validate=G,k}catch(q){throw delete k.validate,delete k.validateName,M&&this.logger.error("Error compiling schema, function code:",M),q}finally{this._compilations.delete(k)}}Wt.compileSchema=v;function i(k,S,x){var P;x=(0,m.resolveUrl)(this.opts.uriResolver,S,x);const A=k.refs[x];if(A)return A;let C=b.call(this,k,x);if(C===void 0){const R=(P=k.localRefs)===null||P===void 0?void 0:P[x],{schemaId:L}=this.opts;R&&(C=new d({schema:R,schemaId:L,root:k,baseId:S}))}if(C!==void 0)return k.refs[x]=f.call(this,C)}Wt.resolveRef=i;function f(k){return(0,m.inlineRef)(k.schema,this.opts.inlineRefs)?k.schema:k.validate?k:v.call(this,k)}function p(k){for(const S of this._compilations)if(g(S,k))return S}Wt.getCompilingSchema=p;function g(k,S){return k.schema===S.schema&&k.root===S.root&&k.baseId===S.baseId}function b(k,S){let x;for(;typeof(x=this.refs[S])=="string";)S=x;return x||this.schemas[S]||j.call(this,k,S)}function j(k,S){const x=this.opts.uriResolver.parse(S),P=(0,m._getFullPath)(this.opts.uriResolver,x);let A=(0,m.getFullPath)(this.opts.uriResolver,k.baseId,void 0);if(Object.keys(k.schema).length>0&&P===A)return E.call(this,x,k);const C=(0,m.normalizeId)(P),R=this.refs[C]||this.schemas[C];if(typeof R=="string"){const L=j.call(this,k,R);return typeof L?.schema!="object"?void 0:E.call(this,x,L)}if(typeof R?.schema=="object"){if(R.validate||v.call(this,R),C===(0,m.normalizeId)(S)){const{schema:L}=R,{schemaId:I}=this.opts,D=L[I];return D&&(A=(0,m.resolveUrl)(this.opts.uriResolver,A,D)),new d({schema:L,schemaId:I,root:k,baseId:A})}return E.call(this,x,R)}}Wt.resolveSchema=j;const O=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function E(k,{baseId:S,schema:x,root:P}){var A;if(((A=k.fragment)===null||A===void 0?void 0:A[0])!=="/")return;for(const L of k.fragment.slice(1).split("/")){if(typeof x=="boolean")return;const I=x[(0,y.unescapeFragment)(L)];if(I===void 0)return;x=I;const D=typeof x=="object"&&x[this.opts.schemaId];!O.has(L)&&D&&(S=(0,m.resolveUrl)(this.opts.uriResolver,S,D))}let C;if(typeof x!="boolean"&&x.$ref&&!(0,y.schemaHasRulesButRef)(x,this.RULES)){const L=(0,m.resolveUrl)(this.opts.uriResolver,S,x.$ref);C=j.call(this,P,L)}const{schemaId:R}=this.opts;if(C=C||new d({schema:x,schemaId:R,root:P,baseId:S}),C.schema!==C.root.schema)return C}return Wt}const uy={$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 Os={},Lo={exports:{}},dl,sd;function ad(){if(sd)return dl;sd=1;const o=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),s=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 j="",O=0,E=0;for(E=0;E<b.length;E++)if(O=b[E].charCodeAt(0),O!==48){if(!(O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102))return"";j+=b[E];break}for(E+=1;E<b.length;E++){if(O=b[E].charCodeAt(0),!(O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102))return"";j+=b[E]}return j}const m=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(b){return b.length=0,!0}function _(b,j,O){if(b.length){const E=h(b);if(E!=="")j.push(E);else return O.error=!0,!1;b.length=0}return!0}function d(b){let j=0;const O={error:!1,address:"",zone:""},E=[],k=[];let S=!1,x=!1,P=_;for(let A=0;A<b.length;A++){const C=b[A];if(!(C==="["||C==="]"))if(C===":"){if(S===!0&&(x=!0),!P(k,E,O))break;if(++j>7){O.error=!0;break}A>0&&b[A-1]===":"&&(S=!0),E.push(":");continue}else if(C==="%"){if(!P(k,E,O))break;P=y}else{k.push(C);continue}}return k.length&&(P===y?O.zone=k.join(""):x?E.push(k.join("")):E.push(h(k))),O.address=E.join(""),O}function v(b){if(i(b,":")<2)return{host:b,isIPV6:!1};const j=d(b);if(j.error)return{host:b,isIPV6:!1};{let O=j.address,E=j.address;return j.zone&&(O+="%"+j.zone,E+="%25"+j.zone),{host:O,isIPV6:!0,escapedHost:E}}}function i(b,j){let O=0;for(let E=0;E<b.length;E++)b[E]===j&&O++;return O}function f(b){let j=b;const O=[];let E=-1,k=0;for(;k=j.length;){if(k===1){if(j===".")break;if(j==="/"){O.push("/");break}else{O.push(j);break}}else if(k===2){if(j[0]==="."){if(j[1]===".")break;if(j[1]==="/"){j=j.slice(2);continue}}else if(j[0]==="/"&&(j[1]==="."||j[1]==="/")){O.push("/");break}}else if(k===3&&j==="/.."){O.length!==0&&O.pop(),O.push("/");break}if(j[0]==="."){if(j[1]==="."){if(j[2]==="/"){j=j.slice(3);continue}}else if(j[1]==="/"){j=j.slice(2);continue}}else if(j[0]==="/"&&j[1]==="."){if(j[2]==="/"){j=j.slice(2);continue}else if(j[2]==="."&&j[3]==="/"){j=j.slice(3),O.length!==0&&O.pop();continue}}if((E=j.indexOf("/",1))===-1){O.push(j);break}else O.push(j.slice(0,E)),j=j.slice(E)}return O.join("")}function p(b,j){const O=j!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=O(b.scheme)),b.userinfo!==void 0&&(b.userinfo=O(b.userinfo)),b.host!==void 0&&(b.host=O(b.host)),b.path!==void 0&&(b.path=O(b.path)),b.query!==void 0&&(b.query=O(b.query)),b.fragment!==void 0&&(b.fragment=O(b.fragment)),b}function g(b){const j=[];if(b.userinfo!==void 0&&(j.push(b.userinfo),j.push("@")),b.host!==void 0){let O=unescape(b.host);if(!s(O)){const E=v(O);E.isIPV6===!0?O=`[${E.escapedHost}]`:O=b.host}j.push(O)}return(typeof b.port=="number"||typeof b.port=="string")&&(j.push(":"),j.push(String(b.port))),j.length?j.join(""):void 0}return dl={nonSimpleDomain:m,recomposeAuthority:g,normalizeComponentEncoding:p,removeDotSegments:f,isIPv4:s,isUUID:o,normalizeIPv6:v,stringArrayToHexStripped:h},dl}var hl,ld;function dy(){if(ld)return hl;ld=1;const{isUUID:o}=ad(),s=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,h=["http","https","ws","wss","urn","urn:uuid"];function m(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,L]=C.resourceName.split("?");C.path=R&&R!=="/"?R:void 0,C.query=L,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 L=C.path.match(s);if(L){const I=R.scheme||C.scheme||"urn";C.nid=L[1].toLowerCase(),C.nss=L[2];const D=`${I}:${R.nid||C.nid}`,M=A(D);C.path=void 0,M&&(C=M.parse(C,R))}else C.error=C.error||"URN can not be parsed.";return C}function p(C,R){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const L=R.scheme||C.scheme||"urn",I=C.nid.toLowerCase(),D=`${L}:${R.nid||I}`,M=A(D);M&&(C=M.serialize(C,R));const q=C,J=C.nss;return q.path=`${I||R.nid}:${J}`,R.skipEscape=!0,q}function g(C,R){const L=C;return L.uuid=L.nss,L.nss=void 0,!R.tolerant&&(!L.uuid||!o(L.uuid))&&(L.error=L.error||"UUID is not valid."),L}function b(C){const R=C;return R.nss=(C.uuid||"").toLowerCase(),R}const j={scheme:"http",domainHost:!0,parse:_,serialize:d},O={scheme:"https",domainHost:j.domainHost,parse:_,serialize:d},E={scheme:"ws",domainHost:!0,parse:v,serialize:i},k={scheme:"wss",domainHost:E.domainHost,parse:E.parse,serialize:E.serialize},P={http:j,https:O,ws:E,wss:k,urn:{scheme:"urn",parse:f,serialize:p,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:b,skipNormalize:!0}};Object.setPrototypeOf(P,null);function A(C){return C&&(P[C]||P[C.toLowerCase()])||void 0}return hl={wsIsSecure:y,SCHEMES:P,isValidSchemeName:m,getSchemeHandler:A},hl}var cd;function hy(){if(cd)return Lo.exports;cd=1;const{normalizeIPv6:o,removeDotSegments:s,recomposeAuthority:h,normalizeComponentEncoding:m,isIPv4:y,nonSimpleDomain:_}=ad(),{SCHEMES:d,getSchemeHandler:v}=dy();function i(k,S){return typeof k=="string"?k=b(O(k,S),S):typeof k=="object"&&(k=O(b(k,S),S)),k}function f(k,S,x){const P=x?Object.assign({scheme:"null"},x):{scheme:"null"},A=p(O(k,P),O(S,P),P,!0);return P.skipEscape=!0,b(A,P)}function p(k,S,x,P){const A={};return P||(k=O(b(k,x),x),S=O(b(S,x),x)),x=x||{},!x.tolerant&&S.scheme?(A.scheme=S.scheme,A.userinfo=S.userinfo,A.host=S.host,A.port=S.port,A.path=s(S.path||""),A.query=S.query):(S.userinfo!==void 0||S.host!==void 0||S.port!==void 0?(A.userinfo=S.userinfo,A.host=S.host,A.port=S.port,A.path=s(S.path||""),A.query=S.query):(S.path?(S.path[0]==="/"?A.path=s(S.path):((k.userinfo!==void 0||k.host!==void 0||k.port!==void 0)&&!k.path?A.path="/"+S.path:k.path?A.path=k.path.slice(0,k.path.lastIndexOf("/")+1)+S.path:A.path=S.path,A.path=s(A.path)),A.query=S.query):(A.path=k.path,S.query!==void 0?A.query=S.query:A.query=k.query),A.userinfo=k.userinfo,A.host=k.host,A.port=k.port),A.scheme=k.scheme),A.fragment=S.fragment,A}function g(k,S,x){return typeof k=="string"?(k=unescape(k),k=b(m(O(k,x),!0),{...x,skipEscape:!0})):typeof k=="object"&&(k=b(m(k,!0),{...x,skipEscape:!0})),typeof S=="string"?(S=unescape(S),S=b(m(O(S,x),!0),{...x,skipEscape:!0})):typeof S=="object"&&(S=b(m(S,!0),{...x,skipEscape:!0})),k.toLowerCase()===S.toLowerCase()}function b(k,S){const x={host:k.host,scheme:k.scheme,userinfo:k.userinfo,port:k.port,path:k.path,query:k.query,nid:k.nid,nss:k.nss,uuid:k.uuid,fragment:k.fragment,reference:k.reference,resourceName:k.resourceName,secure:k.secure,error:""},P=Object.assign({},S),A=[],C=v(P.scheme||x.scheme);C&&C.serialize&&C.serialize(x,P),x.path!==void 0&&(P.skipEscape?x.path=unescape(x.path):(x.path=escape(x.path),x.scheme!==void 0&&(x.path=x.path.split("%3A").join(":")))),P.reference!=="suffix"&&x.scheme&&A.push(x.scheme,":");const R=h(x);if(R!==void 0&&(P.reference!=="suffix"&&A.push("//"),A.push(R),x.path&&x.path[0]!=="/"&&A.push("/")),x.path!==void 0){let L=x.path;!P.absolutePath&&(!C||!C.absolutePath)&&(L=s(L)),R===void 0&&L[0]==="/"&&L[1]==="/"&&(L="/%2F"+L.slice(2)),A.push(L)}return x.query!==void 0&&A.push("?",x.query),x.fragment!==void 0&&A.push("#",x.fragment),A.join("")}const j=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function O(k,S){const x=Object.assign({},S),P={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let A=!1;x.reference==="suffix"&&(x.scheme?k=x.scheme+":"+k:k="//"+k);const C=k.match(j);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(),A=I.isIPV6}else A=!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",x.reference&&x.reference!=="suffix"&&x.reference!==P.reference&&(P.error=P.error||"URI is not a "+x.reference+" reference.");const R=v(x.scheme||P.scheme);if(!x.unicodeSupport&&(!R||!R.unicodeSupport)&&P.host&&(x.domainHost||R&&R.domainHost)&&A===!1&&_(P.host))try{P.host=URL.domainToASCII(P.host.toLowerCase())}catch(L){P.error=P.error||"Host's domain name can not be converted to ASCII: "+L}(!R||R&&!R.skipNormalize)&&(k.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,x)}else P.error=P.error||"URI can not be parsed.";return P}const E={SCHEMES:d,normalize:i,resolve:f,resolveComponent:p,equal:g,serialize:b,parse:O};return Lo.exports=E,Lo.exports.default=E,Lo.exports.fastUri=E,Lo.exports}var ud;function fy(){if(ud)return Os;ud=1,Object.defineProperty(Os,"__esModule",{value:!0});const o=hy();return o.code='require("ajv/dist/runtime/uri").default',Os.default=o,Os}var dd;function py(){return dd||(dd=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 s=_s();Object.defineProperty(o,"KeywordCxt",{enumerable:!0,get:function(){return s.KeywordCxt}});var h=ze();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 m=cl(),y=js(),_=Hu(),d=ul(),v=ze(),i=gs(),f=bs(),p=Ye(),g=uy,b=fy(),j=(ie,H)=>new RegExp(ie,H);j.code="new RegExp";const O=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),k={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."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x=200;function P(ie){var H,ee,V,N,F,te,ge,be,Oe,ve,U,Z,re,le,fe,Pe,He,We,nt,Ze,et,tt,Ge,ot,ye;const ke=ie.strict,xe=(H=ie.code)===null||H===void 0?void 0:H.optimize,Be=xe===!0||xe===void 0?1:xe||0,Ke=(V=(ee=ie.code)===null||ee===void 0?void 0:ee.regExp)!==null&&V!==void 0?V:j,mt=(N=ie.uriResolver)!==null&&N!==void 0?N:b.default;return{strictSchema:(te=(F=ie.strictSchema)!==null&&F!==void 0?F:ke)!==null&&te!==void 0?te:!0,strictNumbers:(be=(ge=ie.strictNumbers)!==null&&ge!==void 0?ge:ke)!==null&&be!==void 0?be:!0,strictTypes:(ve=(Oe=ie.strictTypes)!==null&&Oe!==void 0?Oe:ke)!==null&&ve!==void 0?ve:"log",strictTuples:(Z=(U=ie.strictTuples)!==null&&U!==void 0?U:ke)!==null&&Z!==void 0?Z:"log",strictRequired:(le=(re=ie.strictRequired)!==null&&re!==void 0?re:ke)!==null&&le!==void 0?le:!1,code:ie.code?{...ie.code,optimize:Be,regExp:Ke}:{optimize:Be,regExp:Ke},loopRequired:(fe=ie.loopRequired)!==null&&fe!==void 0?fe:x,loopEnum:(Pe=ie.loopEnum)!==null&&Pe!==void 0?Pe:x,meta:(He=ie.meta)!==null&&He!==void 0?He:!0,messages:(We=ie.messages)!==null&&We!==void 0?We:!0,inlineRefs:(nt=ie.inlineRefs)!==null&&nt!==void 0?nt:!0,schemaId:(Ze=ie.schemaId)!==null&&Ze!==void 0?Ze:"$id",addUsedSchema:(et=ie.addUsedSchema)!==null&&et!==void 0?et:!0,validateSchema:(tt=ie.validateSchema)!==null&&tt!==void 0?tt:!0,validateFormats:(Ge=ie.validateFormats)!==null&&Ge!==void 0?Ge:!0,unicodeRegExp:(ot=ie.unicodeRegExp)!==null&&ot!==void 0?ot:!0,int32range:(ye=ie.int32range)!==null&&ye!==void 0?ye:!0,uriResolver:mt}}class A{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:ee,lines:V}=this.opts.code;this.scope=new v.ValueScope({scope:{},prefixes:E,es5:ee,lines:V}),this.logger=J(H.logger);const N=H.validateFormats;H.validateFormats=!1,this.RULES=(0,_.getRules)(),C.call(this,k,H,"NOT SUPPORTED"),C.call(this,S,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),L.call(this),H.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:H,meta:ee,schemaId:V}=this.opts;let N=g;V==="id"&&(N={...g},N.id=N.$id,delete N.$id),ee&&H&&this.addMetaSchema(N,N[V],!1)}defaultMeta(){const{meta:H,schemaId:ee}=this.opts;return this.opts.defaultMeta=typeof H=="object"?H[ee]||H:void 0}validate(H,ee){let V;if(typeof H=="string"){if(V=this.getSchema(H),!V)throw new Error(`no schema with key or ref "${H}"`)}else V=this.compile(H);const N=V(ee);return"$async"in V||(this.errors=V.errors),N}compile(H,ee){const V=this._addSchema(H,ee);return V.validate||this._compileSchemaEnv(V)}compileAsync(H,ee){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:V}=this.opts;return N.call(this,H,ee);async function N(ve,U){await F.call(this,ve.$schema);const Z=this._addSchema(ve,U);return Z.validate||te.call(this,Z)}async function F(ve){ve&&!this.getSchema(ve)&&await N.call(this,{$ref:ve},!0)}async function te(ve){try{return this._compileSchemaEnv(ve)}catch(U){if(!(U instanceof y.default))throw U;return ge.call(this,U),await be.call(this,U.missingSchema),te.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 be(ve){const U=await Oe.call(this,ve);this.refs[ve]||await F.call(this,U.$schema),this.refs[ve]||this.addSchema(U,ve,ee)}async function Oe(ve){const U=this._loading[ve];if(U)return U;try{return await(this._loading[ve]=V(ve))}finally{delete this._loading[ve]}}}addSchema(H,ee,V,N=this.opts.validateSchema){if(Array.isArray(H)){for(const te of H)this.addSchema(te,void 0,V,N);return this}let F;if(typeof H=="object"){const{schemaId:te}=this.opts;if(F=H[te],F!==void 0&&typeof F!="string")throw new Error(`schema ${te} must be string`)}return ee=(0,i.normalizeId)(ee||F),this._checkUnique(ee),this.schemas[ee]=this._addSchema(H,V,ee,N,!0),this}addMetaSchema(H,ee,V=this.opts.validateSchema){return this.addSchema(H,ee,!0,V),this}validateSchema(H,ee){if(typeof H=="boolean")return!0;let V;if(V=H.$schema,V!==void 0&&typeof V!="string")throw new Error("$schema must be a string");if(V=V||this.opts.defaultMeta||this.defaultMeta(),!V)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(V,H);if(!N&&ee){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return N}getSchema(H){let ee;for(;typeof(ee=R.call(this,H))=="string";)H=ee;if(ee===void 0){const{schemaId:V}=this.opts,N=new d.SchemaEnv({schema:{},schemaId:V});if(ee=d.resolveSchema.call(this,N,H),!ee)return;this.refs[H]=ee}return ee.validate||this._compileSchemaEnv(ee)}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 ee=R.call(this,H);return typeof ee=="object"&&this._cache.delete(ee.schema),delete this.schemas[H],delete this.refs[H],this}case"object":{const ee=H;this._cache.delete(ee);let V=H[this.opts.schemaId];return V&&(V=(0,i.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(H){for(const ee of H)this.addKeyword(ee);return this}addKeyword(H,ee){let V;if(typeof H=="string")V=H,typeof ee=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ee.keyword=V);else if(typeof H=="object"&&ee===void 0){if(ee=H,V=ee.keyword,Array.isArray(V)&&!V.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,V,ee),!ee)return(0,p.eachItem)(V,F=>ae.call(this,F)),this;de.call(this,ee);const N={...ee,type:(0,f.getJSONTypes)(ee.type),schemaType:(0,f.getJSONTypes)(ee.schemaType)};return(0,p.eachItem)(V,N.type.length===0?F=>ae.call(this,F,N):F=>N.type.forEach(te=>ae.call(this,F,N,te))),this}getKeyword(H){const ee=this.RULES.all[H];return typeof ee=="object"?ee.definition:!!ee}removeKeyword(H){const{RULES:ee}=this;delete ee.keywords[H],delete ee.all[H];for(const V of ee.rules){const N=V.rules.findIndex(F=>F.keyword===H);N>=0&&V.rules.splice(N,1)}return this}addFormat(H,ee){return typeof ee=="string"&&(ee=new RegExp(ee)),this.formats[H]=ee,this}errorsText(H=this.errors,{separator:ee=", ",dataVar:V="data"}={}){return!H||H.length===0?"No errors":H.map(N=>`${V}${N.instancePath} ${N.message}`).reduce((N,F)=>N+ee+F)}$dataMetaSchema(H,ee){const V=this.RULES.all;H=JSON.parse(JSON.stringify(H));for(const N of ee){const F=N.split("/").slice(1);let te=H;for(const ge of F)te=te[ge];for(const ge in V){const be=V[ge];if(typeof be!="object")continue;const{$data:Oe}=be.definition,ve=te[ge];Oe&&ve&&(te[ge]=pe(ve))}}return H}_removeAllSchemas(H,ee){for(const V in H){const N=H[V];(!ee||ee.test(V))&&(typeof N=="string"?delete H[V]:N&&!N.meta&&(this._cache.delete(N.schema),delete H[V]))}}_addSchema(H,ee,V,N=this.opts.validateSchema,F=this.opts.addUsedSchema){let te;const{schemaId:ge}=this.opts;if(typeof H=="object")te=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 be=this._cache.get(H);if(be!==void 0)return be;V=(0,i.normalizeId)(te||V);const Oe=i.getSchemaRefs.call(this,H,V);return be=new d.SchemaEnv({schema:H,schemaId:ge,meta:ee,baseId:V,localRefs:Oe}),this._cache.set(be.schema,be),F&&!V.startsWith("#")&&(V&&this._checkUnique(V),this.refs[V]=be),N&&this.validateSchema(H,!0),be}_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 ee=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,H)}finally{this.opts=ee}}}A.ValidationError=m.default,A.MissingRefError=y.default,o.default=A;function C(ie,H,ee,V="error"){for(const N in ie){const F=N;F in H&&this.logger[V](`${ee}: option ${N}. ${ie[F]}`)}}function R(ie){return ie=(0,i.normalizeId)(ie),this.schemas[ie]||this.refs[ie]}function L(){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 ee=ie[H];ee.keyword||(ee.keyword=H),this.addKeyword(ee)}}function M(){const ie={...this.opts};for(const H of O)delete ie[H];return ie}const q={log(){},warn(){},error(){}};function J(ie){if(ie===!1)return q;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 G=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(ie,H){const{RULES:ee}=this;if((0,p.eachItem)(ie,V=>{if(ee.keywords[V])throw new Error(`Keyword ${V} is already defined`);if(!G.test(V))throw new Error(`Keyword ${V} has invalid name`)}),!!H&&H.$data&&!("code"in H||"validate"in H))throw new Error('$data keyword must have "code" or "validate" function')}function ae(ie,H,ee){var V;const N=H?.post;if(ee&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let te=N?F.post:F.rules.find(({type:be})=>be===ee);if(te||(te={type:ee,rules:[]},F.rules.push(te)),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?ce.call(this,te,ge,H.before):te.rules.push(ge),F.all[ie]=ge,(V=H.implements)===null||V===void 0||V.forEach(be=>this.addKeyword(be))}function ce(ie,H,ee){const V=ie.rules.findIndex(N=>N.keyword===ee);V>=0?ie.rules.splice(V,0,H):(ie.rules.push(H),this.logger.warn(`rule ${ee} is not defined`))}function de(ie){let{metaSchema:H}=ie;H!==void 0&&(ie.$data&&this.opts.$data&&(H=pe(H)),ie.validateSchema=this.compile(H,!0))}const ue={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(ie){return{anyOf:[ie,ue]}}})(rl)),rl}var Es={},Ss={},xs={},hd;function my(){if(hd)return xs;hd=1,Object.defineProperty(xs,"__esModule",{value:!0});const o={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return xs.default=o,xs}var pn={},fd;function yy(){if(fd)return pn;fd=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.callRef=pn.getValidate=void 0;const o=js(),s=dr(),h=ze(),m=fn(),y=ul(),_=Ye(),d={keyword:"$ref",schemaType:"string",code(f){const{gen:p,schema:g,it:b}=f,{baseId:j,schemaEnv:O,validateName:E,opts:k,self:S}=b,{root:x}=O;if((g==="#"||g==="#/")&&j===x.baseId)return A();const P=y.resolveRef.call(S,x,j,g);if(P===void 0)throw new o.default(b.opts.uriResolver,j,g);if(P instanceof y.SchemaEnv)return C(P);return R(P);function A(){if(O===x)return i(f,E,O,O.$async);const L=p.scopeValue("root",{ref:x});return i(f,(0,h._)`${L}.validate`,x,x.$async)}function C(L){const I=v(f,L);i(f,I,L,L.$async)}function R(L){const I=p.scopeValue("schema",k.code.source===!0?{ref:L,code:(0,h.stringify)(L)}:{ref:L}),D=p.name("valid"),M=f.subschema({schema:L,dataTypes:[],schemaPath:h.nil,topSchemaRef:I,errSchemaPath:g},D);f.mergeEvaluated(M),f.ok(D)}}};function v(f,p){const{gen:g}=f;return p.validate?g.scopeValue("validate",{ref:p.validate}):(0,h._)`${g.scopeValue("wrapper",{ref:p})}.validate`}pn.getValidate=v;function i(f,p,g,b){const{gen:j,it:O}=f,{allErrors:E,schemaEnv:k,opts:S}=O,x=S.passContext?m.default.this:h.nil;b?P():A();function P(){if(!k.$async)throw new Error("async schema referenced by sync schema");const L=j.let("valid");j.try(()=>{j.code((0,h._)`await ${(0,s.callValidateCode)(f,p,x)}`),R(p),E||j.assign(L,!0)},I=>{j.if((0,h._)`!(${I} instanceof ${O.ValidationError})`,()=>j.throw(I)),C(I),E||j.assign(L,!1)}),f.ok(L)}function A(){f.result((0,s.callValidateCode)(f,p,x),()=>R(p),()=>C(p))}function C(L){const I=(0,h._)`${L}.errors`;j.assign(m.default.vErrors,(0,h._)`${m.default.vErrors} === null ? ${I} : ${m.default.vErrors}.concat(${I})`),j.assign(m.default.errors,(0,h._)`${m.default.vErrors}.length`)}function R(L){var I;if(!O.opts.unevaluated)return;const D=(I=g?.validate)===null||I===void 0?void 0:I.evaluated;if(O.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(O.props=_.mergeEvaluated.props(j,D.props,O.props));else{const M=j.var("props",(0,h._)`${L}.evaluated.props`);O.props=_.mergeEvaluated.props(j,M,O.props,h.Name)}if(O.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(O.items=_.mergeEvaluated.items(j,D.items,O.items));else{const M=j.var("items",(0,h._)`${L}.evaluated.items`);O.items=_.mergeEvaluated.items(j,M,O.items,h.Name)}}}return pn.callRef=i,pn.default=d,pn}var pd;function vy(){if(pd)return Ss;pd=1,Object.defineProperty(Ss,"__esModule",{value:!0});const o=my(),s=yy(),h=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,s.default];return Ss.default=h,Ss}var Cs={},Ps={},md;function by(){if(md)return Ps;md=1,Object.defineProperty(Ps,"__esModule",{value:!0});const o=ze(),s=o.operators,h={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},m={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:m,code(_){const{keyword:d,data:v,schemaCode:i}=_;_.fail$data((0,o._)`${v} ${h[d].fail} ${i} || isNaN(${v})`)}};return Ps.default=y,Ps}var Ts={},yd;function gy(){if(yd)return Ts;yd=1,Object.defineProperty(Ts,"__esModule",{value:!0});const o=ze(),h={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:m})=>(0,o.str)`must be multiple of ${m}`,params:({schemaCode:m})=>(0,o._)`{multipleOf: ${m}}`},code(m){const{gen:y,data:_,schemaCode:d,it:v}=m,i=v.opts.multipleOfPrecision,f=y.let("res"),p=i?(0,o._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${i}`:(0,o._)`${f} !== parseInt(${f})`;m.fail$data((0,o._)`(${d} === 0 || (${f} = ${_}/${d}, ${p}))`)}};return Ts.default=h,Ts}var Rs={},As={},vd;function _y(){if(vd)return As;vd=1,Object.defineProperty(As,"__esModule",{value:!0});function o(s){const h=s.length;let m=0,y=0,_;for(;y<h;)m++,_=s.charCodeAt(y++),_>=55296&&_<=56319&&y<h&&(_=s.charCodeAt(y),(_&64512)===56320&&y++);return m}return As.default=o,o.code='require("ajv/dist/runtime/ucs2length").default',As}var bd;function wy(){if(bd)return Rs;bd=1,Object.defineProperty(Rs,"__esModule",{value:!0});const o=ze(),s=Ye(),h=_y(),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}=_,p=d==="maxLength"?o.operators.GT:o.operators.LT,g=f.opts.unicode===!1?(0,o._)`${v}.length`:(0,o._)`${(0,s.useFunc)(_.gen,h.default)}(${v})`;_.fail$data((0,o._)`${g} ${p} ${i}`)}};return Rs.default=y,Rs}var Ls={},gd;function ky(){if(gd)return Ls;gd=1,Object.defineProperty(Ls,"__esModule",{value:!0});const o=dr(),s=ze(),m={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:y})=>(0,s.str)`must match pattern "${y}"`,params:({schemaCode:y})=>(0,s._)`{pattern: ${y}}`},code(y){const{data:_,$data:d,schema:v,schemaCode:i,it:f}=y,p=f.opts.unicodeRegExp?"u":"",g=d?(0,s._)`(new RegExp(${i}, ${p}))`:(0,o.usePattern)(y,v);y.fail$data((0,s._)`!${g}.test(${_})`)}};return Ls.default=m,Ls}var $s={},_d;function jy(){if(_d)return $s;_d=1,Object.defineProperty($s,"__esModule",{value:!0});const o=ze(),h={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:y}){const _=m==="maxProperties"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} properties`},params:({schemaCode:m})=>(0,o._)`{limit: ${m}}`},code(m){const{keyword:y,data:_,schemaCode:d}=m,v=y==="maxProperties"?o.operators.GT:o.operators.LT;m.fail$data((0,o._)`Object.keys(${_}).length ${v} ${d}`)}};return $s.default=h,$s}var Is={},wd;function Oy(){if(wd)return Is;wd=1,Object.defineProperty(Is,"__esModule",{value:!0});const o=dr(),s=ze(),h=Ye(),y={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:_}})=>(0,s.str)`must have required property '${_}'`,params:({params:{missingProperty:_}})=>(0,s._)`{missingProperty: ${_}}`},code(_){const{gen:d,schema:v,schemaCode:i,data:f,$data:p,it:g}=_,{opts:b}=g;if(!p&&v.length===0)return;const j=v.length>=b.loopRequired;if(g.allErrors?O():E(),b.strictRequired){const x=_.parentSchema.properties,{definedProperties:P}=_.it;for(const A of v)if(x?.[A]===void 0&&!P.has(A)){const C=g.schemaEnv.baseId+g.errSchemaPath,R=`required property "${A}" is not defined at "${C}" (strictRequired)`;(0,h.checkStrictMode)(g,R,g.opts.strictRequired)}}function O(){if(j||p)_.block$data(s.nil,k);else for(const x of v)(0,o.checkReportMissingProp)(_,x)}function E(){const x=d.let("missing");if(j||p){const P=d.let("valid",!0);_.block$data(P,()=>S(x,P)),_.ok(P)}else d.if((0,o.checkMissingProp)(_,v,x)),(0,o.reportMissingProp)(_,x),d.else()}function k(){d.forOf("prop",i,x=>{_.setParams({missingProperty:x}),d.if((0,o.noPropertyInData)(d,f,x,b.ownProperties),()=>_.error())})}function S(x,P){_.setParams({missingProperty:x}),d.forOf(x,i,()=>{d.assign(P,(0,o.propertyInData)(d,f,x,b.ownProperties)),d.if((0,s.not)(P),()=>{_.error(),d.break()})},s.nil)}}};return Is.default=y,Is}var Ns={},kd;function Ey(){if(kd)return Ns;kd=1,Object.defineProperty(Ns,"__esModule",{value:!0});const o=ze(),h={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:y}){const _=m==="maxItems"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} items`},params:({schemaCode:m})=>(0,o._)`{limit: ${m}}`},code(m){const{keyword:y,data:_,schemaCode:d}=m,v=y==="maxItems"?o.operators.GT:o.operators.LT;m.fail$data((0,o._)`${_}.length ${v} ${d}`)}};return Ns.default=h,Ns}var Ds={},Bs={},jd;function fl(){if(jd)return Bs;jd=1,Object.defineProperty(Bs,"__esModule",{value:!0});const o=Xu();return o.code='require("ajv/dist/runtime/equal").default',Bs.default=o,Bs}var Od;function Sy(){if(Od)return Ds;Od=1,Object.defineProperty(Ds,"__esModule",{value:!0});const o=bs(),s=ze(),h=Ye(),m=fl(),_={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:v}})=>(0,s.str)`must NOT have duplicate items (items ## ${v} and ${d} are identical)`,params:({params:{i:d,j:v}})=>(0,s._)`{i: ${d}, j: ${v}}`},code(d){const{gen:v,data:i,$data:f,schema:p,parentSchema:g,schemaCode:b,it:j}=d;if(!f&&!p)return;const O=v.let("valid"),E=g.items?(0,o.getSchemaTypes)(g.items):[];d.block$data(O,k,(0,s._)`${b} === false`),d.ok(O);function k(){const A=v.let("i",(0,s._)`${i}.length`),C=v.let("j");d.setParams({i:A,j:C}),v.assign(O,!0),v.if((0,s._)`${A} > 1`,()=>(S()?x:P)(A,C))}function S(){return E.length>0&&!E.some(A=>A==="object"||A==="array")}function x(A,C){const R=v.name("item"),L=(0,o.checkDataTypes)(E,R,j.opts.strictNumbers,o.DataType.Wrong),I=v.const("indices",(0,s._)`{}`);v.for((0,s._)`;${A}--;`,()=>{v.let(R,(0,s._)`${i}[${A}]`),v.if(L,(0,s._)`continue`),E.length>1&&v.if((0,s._)`typeof ${R} == "string"`,(0,s._)`${R} += "_"`),v.if((0,s._)`typeof ${I}[${R}] == "number"`,()=>{v.assign(C,(0,s._)`${I}[${R}]`),d.error(),v.assign(O,!1).break()}).code((0,s._)`${I}[${R}] = ${A}`)})}function P(A,C){const R=(0,h.useFunc)(v,m.default),L=v.name("outer");v.label(L).for((0,s._)`;${A}--;`,()=>v.for((0,s._)`${C} = ${A}; ${C}--;`,()=>v.if((0,s._)`${R}(${i}[${A}], ${i}[${C}])`,()=>{d.error(),v.assign(O,!1).break(L)})))}}};return Ds.default=_,Ds}var Fs={},Ed;function xy(){if(Ed)return Fs;Ed=1,Object.defineProperty(Fs,"__esModule",{value:!0});const o=ze(),s=Ye(),h=fl(),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:p}=_;i||p&&typeof p=="object"?_.fail$data((0,o._)`!${(0,s.useFunc)(d,h.default)}(${v}, ${f})`):_.fail((0,o._)`${p} !== ${v}`)}};return Fs.default=y,Fs}var Ms={},Sd;function Cy(){if(Sd)return Ms;Sd=1,Object.defineProperty(Ms,"__esModule",{value:!0});const o=ze(),s=Ye(),h=fl(),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:p,it:g}=_;if(!i&&f.length===0)throw new Error("enum must have non-empty array");const b=f.length>=g.opts.loopEnum;let j;const O=()=>j??(j=(0,s.useFunc)(d,h.default));let E;if(b||i)E=d.let("valid"),_.block$data(E,k);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const x=d.const("vSchema",p);E=(0,o.or)(...f.map((P,A)=>S(x,A)))}_.pass(E);function k(){d.assign(E,!1),d.forOf("v",p,x=>d.if((0,o._)`${O()}(${v}, ${x})`,()=>d.assign(E,!0).break()))}function S(x,P){const A=f[P];return typeof A=="object"&&A!==null?(0,o._)`${O()}(${v}, ${x}[${P}])`:(0,o._)`${v} === ${A}`}}};return Ms.default=y,Ms}var xd;function Py(){if(xd)return Cs;xd=1,Object.defineProperty(Cs,"__esModule",{value:!0});const o=by(),s=gy(),h=wy(),m=ky(),y=jy(),_=Oy(),d=Ey(),v=Sy(),i=xy(),f=Cy(),p=[o.default,s.default,h.default,m.default,y.default,_.default,d.default,v.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},i.default,f.default];return Cs.default=p,Cs}var qs={},xi={},Cd;function Pd(){if(Cd)return xi;Cd=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.validateAdditionalItems=void 0;const o=ze(),s=Ye(),m={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,s.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:p,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,s.alwaysValidSchema)(g,i)){const O=v.var("valid",(0,o._)`${b} <= ${d.length}`);v.if((0,o.not)(O),()=>j(O)),_.ok(O)}function j(O){v.forRange("i",d.length,b,E=>{_.subschema({keyword:p,dataProp:E,dataPropType:s.Type.Num},O),g.allErrors||v.if((0,o.not)(O),()=>v.break())})}}return xi.validateAdditionalItems=y,xi.default=m,xi}var Vs={},Ci={},Td;function Rd(){if(Td)return Ci;Td=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.validateTuple=void 0;const o=ze(),s=Ye(),h=dr(),m={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,s.alwaysValidSchema)(v,d)&&_.ok((0,h.validateArray)(_))}};function y(_,d,v=_.schema){const{gen:i,parentSchema:f,data:p,keyword:g,it:b}=_;E(f),b.opts.unevaluated&&v.length&&b.items!==!0&&(b.items=s.mergeEvaluated.items(i,v.length,b.items));const j=i.name("valid"),O=i.const("len",(0,o._)`${p}.length`);v.forEach((k,S)=>{(0,s.alwaysValidSchema)(b,k)||(i.if((0,o._)`${O} > ${S}`,()=>_.subschema({keyword:g,schemaProp:S,dataProp:S},j)),_.ok(j))});function E(k){const{opts:S,errSchemaPath:x}=b,P=v.length,A=P===k.minItems&&(P===k.maxItems||k[d]===!1);if(S.strictTuples&&!A){const C=`"${g}" is ${P}-tuple, but minItems or maxItems/${d} are not specified or different at path "${x}"`;(0,s.checkStrictMode)(b,C,S.strictTuples)}}}return Ci.validateTuple=y,Ci.default=m,Ci}var Ad;function Ty(){if(Ad)return Vs;Ad=1,Object.defineProperty(Vs,"__esModule",{value:!0});const o=Rd(),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:h=>(0,o.validateTuple)(h,"items")};return Vs.default=s,Vs}var zs={},Ld;function Ry(){if(Ld)return zs;Ld=1,Object.defineProperty(zs,"__esModule",{value:!0});const o=ze(),s=Ye(),h=dr(),m=Pd(),_={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:p}=i;f.items=!0,!(0,s.alwaysValidSchema)(f,v)&&(p?(0,m.validateAdditionalItems)(d,p):d.ok((0,h.validateArray)(d)))}};return zs.default=_,zs}var Hs={},$d;function Ay(){if($d)return Hs;$d=1,Object.defineProperty(Hs,"__esModule",{value:!0});const o=ze(),s=Ye(),m={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 p,g;const{minContains:b,maxContains:j}=v;f.opts.next?(p=b===void 0?1:b,g=j):p=1;const O=_.const("len",(0,o._)`${i}.length`);if(y.setParams({min:p,max:g}),g===void 0&&p===0){(0,s.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&p>g){(0,s.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),y.fail();return}if((0,s.alwaysValidSchema)(f,d)){let P=(0,o._)`${O} >= ${p}`;g!==void 0&&(P=(0,o._)`${P} && ${O} <= ${g}`),y.pass(P);return}f.items=!0;const E=_.name("valid");g===void 0&&p===1?S(E,()=>_.if(E,()=>_.break())):p===0?(_.let(E,!0),g!==void 0&&_.if((0,o._)`${i}.length > 0`,k)):(_.let(E,!1),k()),y.result(E,()=>y.reset());function k(){const P=_.name("_valid"),A=_.let("count",0);S(P,()=>_.if(P,()=>x(A)))}function S(P,A){_.forRange("i",0,O,C=>{y.subschema({keyword:"contains",dataProp:C,dataPropType:s.Type.Num,compositeRule:!0},P),A()})}function x(P){_.code((0,o._)`${P}++`),g===void 0?_.if((0,o._)`${P} >= ${p}`,()=>_.assign(E,!0).break()):(_.if((0,o._)`${P} > ${g}`,()=>_.assign(E,!1).break()),p===1?_.assign(E,!0):_.if((0,o._)`${P} >= ${p}`,()=>_.assign(E,!0)))}}};return Hs.default=m,Hs}var pl={},Id;function Ly(){return Id||(Id=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.validateSchemaDeps=o.validatePropertyDeps=o.error=void 0;const s=ze(),h=Ye(),m=dr();o.error={message:({params:{property:i,depsCount:f,deps:p}})=>{const g=f===1?"property":"properties";return(0,s.str)`must have ${g} ${p} when property ${i} is present`},params:({params:{property:i,depsCount:f,deps:p,missingProperty:g}})=>(0,s._)`{property: ${i},
|
|
1
|
+
(function(gn,xi){typeof exports=="object"&&typeof module<"u"?xi(exports):typeof define=="function"&&define.amd?define(["exports"],xi):(gn=typeof globalThis<"u"?globalThis:gn||self,xi(gn.BBDBComponents={}))})(this,(function(gn){"use strict";function xi(o,a){return function(){return o.apply(a,arguments)}}const{toString:Gp}=Object.prototype,{getPrototypeOf:el}=Object,{iterator:fa,toStringTag:su}=Symbol,pa=(o=>a=>{const h=Gp.call(a);return o[h]||(o[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),mr=o=>(o=o.toLowerCase(),a=>pa(a)===o),ma=o=>a=>typeof a===o,{isArray:Si}=Array,Ci=ma("undefined");function Lo(o){return o!==null&&!Ci(o)&&o.constructor!==null&&!Ci(o.constructor)&&Qt(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const lu=mr("ArrayBuffer");function Jp(o){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(o):a=o&&o.buffer&&lu(o.buffer),a}const Kp=ma("string"),Qt=ma("function"),cu=ma("number"),Ao=o=>o!==null&&typeof o=="object",Wp=o=>o===!0||o===!1,ya=o=>{if(pa(o)!=="object")return!1;const a=el(o);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(su in o)&&!(fa in o)},Zp=o=>{if(!Ao(o)||Lo(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},Yp=mr("Date"),Qp=mr("File"),Xp=mr("Blob"),em=mr("FileList"),tm=o=>Ao(o)&&Qt(o.pipe),rm=o=>{let a;return o&&(typeof FormData=="function"&&o instanceof FormData||Qt(o.append)&&((a=pa(o))==="formdata"||a==="object"&&Qt(o.toString)&&o.toString()==="[object FormData]"))},nm=mr("URLSearchParams"),[im,om,am,sm]=["ReadableStream","Request","Response","Headers"].map(mr),lm=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $o(o,a,{allOwnKeys:h=!1}={}){if(o===null||typeof o>"u")return;let m,y;if(typeof o!="object"&&(o=[o]),Si(o))for(m=0,y=o.length;m<y;m++)a.call(null,o[m],m,o);else{if(Lo(o))return;const _=h?Object.getOwnPropertyNames(o):Object.keys(o),d=_.length;let v;for(m=0;m<d;m++)v=_[m],a.call(null,o[v],v,o)}}function uu(o,a){if(Lo(o))return null;a=a.toLowerCase();const h=Object.keys(o);let m=h.length,y;for(;m-- >0;)if(y=h[m],a===y.toLowerCase())return y;return null}const Gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,du=o=>!Ci(o)&&o!==Gn;function tl(){const{caseless:o,skipUndefined:a}=du(this)&&this||{},h={},m=(y,_)=>{const d=o&&uu(h,_)||_;ya(h[d])&&ya(y)?h[d]=tl(h[d],y):ya(y)?h[d]=tl({},y):Si(y)?h[d]=y.slice():(!a||!Ci(y))&&(h[d]=y)};for(let y=0,_=arguments.length;y<_;y++)arguments[y]&&$o(arguments[y],m);return h}const cm=(o,a,h,{allOwnKeys:m}={})=>($o(a,(y,_)=>{h&&Qt(y)?o[_]=xi(y,h):o[_]=y},{allOwnKeys:m}),o),um=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),dm=(o,a,h,m)=>{o.prototype=Object.create(a.prototype,m),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:a.prototype}),h&&Object.assign(o.prototype,h)},hm=(o,a,h,m)=>{let y,_,d;const v={};if(a=a||{},o==null)return a;do{for(y=Object.getOwnPropertyNames(o),_=y.length;_-- >0;)d=y[_],(!m||m(d,o,a))&&!v[d]&&(a[d]=o[d],v[d]=!0);o=h!==!1&&el(o)}while(o&&(!h||h(o,a))&&o!==Object.prototype);return a},fm=(o,a,h)=>{o=String(o),(h===void 0||h>o.length)&&(h=o.length),h-=a.length;const m=o.indexOf(a,h);return m!==-1&&m===h},pm=o=>{if(!o)return null;if(Si(o))return o;let a=o.length;if(!cu(a))return null;const h=new Array(a);for(;a-- >0;)h[a]=o[a];return h},mm=(o=>a=>o&&a instanceof o)(typeof Uint8Array<"u"&&el(Uint8Array)),ym=(o,a)=>{const m=(o&&o[fa]).call(o);let y;for(;(y=m.next())&&!y.done;){const _=y.value;a.call(o,_[0],_[1])}},vm=(o,a)=>{let h;const m=[];for(;(h=o.exec(a))!==null;)m.push(h);return m},bm=mr("HTMLFormElement"),gm=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,m,y){return m.toUpperCase()+y}),hu=(({hasOwnProperty:o})=>(a,h)=>o.call(a,h))(Object.prototype),_m=mr("RegExp"),fu=(o,a)=>{const h=Object.getOwnPropertyDescriptors(o),m={};$o(h,(y,_)=>{let d;(d=a(y,_,o))!==!1&&(m[_]=d||y)}),Object.defineProperties(o,m)},wm=o=>{fu(o,(a,h)=>{if(Qt(o)&&["arguments","caller","callee"].indexOf(h)!==-1)return!1;const m=o[h];if(Qt(m)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+h+"'")})}})},km=(o,a)=>{const h={},m=y=>{y.forEach(_=>{h[_]=!0})};return Si(o)?m(o):m(String(o).split(a)),h},jm=()=>{},Em=(o,a)=>o!=null&&Number.isFinite(o=+o)?o:a;function Om(o){return!!(o&&Qt(o.append)&&o[su]==="FormData"&&o[fa])}const xm=o=>{const a=new Array(10),h=(m,y)=>{if(Ao(m)){if(a.indexOf(m)>=0)return;if(Lo(m))return m;if(!("toJSON"in m)){a[y]=m;const _=Si(m)?[]:{};return $o(m,(d,v)=>{const i=h(d,y+1);!Ci(i)&&(_[v]=i)}),a[y]=void 0,_}}return m};return h(o,0)},Sm=mr("AsyncFunction"),Cm=o=>o&&(Ao(o)||Qt(o))&&Qt(o.then)&&Qt(o.catch),pu=((o,a)=>o?setImmediate:a?((h,m)=>(Gn.addEventListener("message",({source:y,data:_})=>{y===Gn&&_===h&&m.length&&m.shift()()},!1),y=>{m.push(y),Gn.postMessage(h,"*")}))(`axios@${Math.random()}`,[]):h=>setTimeout(h))(typeof setImmediate=="function",Qt(Gn.postMessage)),Pm=typeof queueMicrotask<"u"?queueMicrotask.bind(Gn):typeof process<"u"&&process.nextTick||pu,ae={isArray:Si,isArrayBuffer:lu,isBuffer:Lo,isFormData:rm,isArrayBufferView:Jp,isString:Kp,isNumber:cu,isBoolean:Wp,isObject:Ao,isPlainObject:ya,isEmptyObject:Zp,isReadableStream:im,isRequest:om,isResponse:am,isHeaders:sm,isUndefined:Ci,isDate:Yp,isFile:Qp,isBlob:Xp,isRegExp:_m,isFunction:Qt,isStream:tm,isURLSearchParams:nm,isTypedArray:mm,isFileList:em,forEach:$o,merge:tl,extend:cm,trim:lm,stripBOM:um,inherits:dm,toFlatObject:hm,kindOf:pa,kindOfTest:mr,endsWith:fm,toArray:pm,forEachEntry:ym,matchAll:vm,isHTMLForm:bm,hasOwnProperty:hu,hasOwnProp:hu,reduceDescriptors:fu,freezeMethods:wm,toObjectSet:km,toCamelCase:gm,noop:jm,toFiniteNumber:Em,findKey:uu,global:Gn,isContextDefined:du,isSpecCompliantForm:Om,toJSONObject:xm,isAsyncFn:Sm,isThenable:Cm,setImmediate:pu,asap:Pm,isIterable:o=>o!=null&&Qt(o[fa])};function De(o,a,h,m,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),m&&(this.request=m),y&&(this.response=y,this.status=y.status?y.status:null)}ae.inherits(De,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 mu=De.prototype,yu={};["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=>{yu[o]={value:o}}),Object.defineProperties(De,yu),Object.defineProperty(mu,"isAxiosError",{value:!0}),De.from=(o,a,h,m,y,_)=>{const d=Object.create(mu);ae.toFlatObject(o,d,function(p){return p!==Error.prototype},f=>f!=="isAxiosError");const v=o&&o.message?o.message:"Error",i=a==null&&o?o.code:a;return De.call(d,v,i,h,m,y),o&&d.cause==null&&Object.defineProperty(d,"cause",{value:o,configurable:!0}),d.name=o&&o.name||"Error",_&&Object.assign(d,_),d};const Tm=null;function rl(o){return ae.isPlainObject(o)||ae.isArray(o)}function vu(o){return ae.endsWith(o,"[]")?o.slice(0,-2):o}function bu(o,a,h){return o?o.concat(a).map(function(y,_){return y=vu(y),!h&&_?"["+y+"]":y}).join(h?".":""):a}function Rm(o){return ae.isArray(o)&&!o.some(rl)}const Lm=ae.toFlatObject(ae,{},null,function(a){return/^is[A-Z]/.test(a)});function va(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 m=h.metaTokens,y=h.visitor||p,_=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 De("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 p(E,O,j){let x=E;if(E&&!j&&typeof E=="object"){if(ae.endsWith(O,"{}"))O=m?O:O.slice(0,-2),E=JSON.stringify(E);else if(ae.isArray(E)&&Rm(E)||(ae.isFileList(E)||ae.endsWith(O,"[]"))&&(x=ae.toArray(E)))return O=vu(O),x.forEach(function(C,L){!(ae.isUndefined(C)||C===null)&&a.append(d===!0?bu([O],L,_):d===null?O:O+"[]",f(C))}),!1}return rl(E)?!0:(a.append(bu(j,O,_),f(E)),!1)}const g=[],b=Object.assign(Lm,{defaultVisitor:p,convertValue:f,isVisitable:rl});function k(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&&k(x,O?O.concat(S):[S])}),g.pop()}}if(!ae.isObject(o))throw new TypeError("data must be an object");return k(o),a}function gu(o){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(m){return a[m]})}function nl(o,a){this._pairs=[],o&&va(o,this,a)}const _u=nl.prototype;_u.append=function(a,h){this._pairs.push([a,h])},_u.toString=function(a){const h=a?function(m){return a.call(this,m,gu)}:gu;return this._pairs.map(function(y){return h(y[0])+"="+h(y[1])},"").join("&")};function Am(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function wu(o,a,h){if(!a)return o;const m=h&&h.encode||Am;ae.isFunction(h)&&(h={serialize:h});const y=h&&h.serialize;let _;if(y?_=y(a,h):_=ae.isURLSearchParams(a)?a.toString():new nl(a,h).toString(m),_){const d=o.indexOf("#");d!==-1&&(o=o.slice(0,d)),o+=(o.indexOf("?")===-1?"?":"&")+_}return o}class ku{constructor(){this.handlers=[]}use(a,h,m){return this.handlers.push({fulfilled:a,rejected:h,synchronous:m?m.synchronous:!1,runWhen:m?m.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(m){m!==null&&a(m)})}}const ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$m={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:nl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},il=typeof window<"u"&&typeof document<"u",ol=typeof navigator=="object"&&navigator||void 0,Im=il&&(!ol||["ReactNative","NativeScript","NS"].indexOf(ol.product)<0),Nm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dm=il&&window.location.href||"http://localhost",Nt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:il,hasStandardBrowserEnv:Im,hasStandardBrowserWebWorkerEnv:Nm,navigator:ol,origin:Dm},Symbol.toStringTag,{value:"Module"})),...$m};function Bm(o,a){return va(o,new Nt.classes.URLSearchParams,{visitor:function(h,m,y,_){return Nt.isNode&&ae.isBuffer(h)?(this.append(m,h.toString("base64")),!1):_.defaultVisitor.apply(this,arguments)},...a})}function Fm(o){return ae.matchAll(/\w+|\[(\w*)]/g,o).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Mm(o){const a={},h=Object.keys(o);let m;const y=h.length;let _;for(m=0;m<y;m++)_=h[m],a[_]=o[_];return a}function Eu(o){function a(h,m,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],m]:y[d]=m,!v):((!y[d]||!ae.isObject(y[d]))&&(y[d]=[]),a(h,m,y[d],_)&&ae.isArray(y[d])&&(y[d]=Mm(y[d])),!v)}if(ae.isFormData(o)&&ae.isFunction(o.entries)){const h={};return ae.forEachEntry(o,(m,y)=>{a(Fm(m),y,h,0)}),h}return null}function Vm(o,a,h){if(ae.isString(o))try{return(a||JSON.parse)(o),ae.trim(o)}catch(m){if(m.name!=="SyntaxError")throw m}return(h||JSON.stringify)(o)}const Io={transitional:ju,adapter:["xhr","http","fetch"],transformRequest:[function(a,h){const m=h.getContentType()||"",y=m.indexOf("application/json")>-1,_=ae.isObject(a);if(_&&ae.isHTMLForm(a)&&(a=new FormData(a)),ae.isFormData(a))return y?JSON.stringify(Eu(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(m.indexOf("application/x-www-form-urlencoded")>-1)return Bm(a,this.formSerializer).toString();if((v=ae.isFileList(a))||m.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return va(v?{"files[]":a}:a,i&&new i,this.formSerializer)}}return _||y?(h.setContentType("application/json",!1),Vm(a)):a}],transformResponse:[function(a){const h=this.transitional||Io.transitional,m=h&&h.forcedJSONParsing,y=this.responseType==="json";if(ae.isResponse(a)||ae.isReadableStream(a))return a;if(a&&ae.isString(a)&&(m&&!this.responseType||y)){const d=!(h&&h.silentJSONParsing)&&y;try{return JSON.parse(a,this.parseReviver)}catch(v){if(d)throw v.name==="SyntaxError"?De.from(v,De.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:Nt.classes.FormData,Blob:Nt.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=>{Io.headers[o]={}});const qm=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"]),zm=o=>{const a={};let h,m,y;return o&&o.split(`
|
|
2
|
+
`).forEach(function(d){y=d.indexOf(":"),h=d.substring(0,y).trim().toLowerCase(),m=d.substring(y+1).trim(),!(!h||a[h]&&qm[h])&&(h==="set-cookie"?a[h]?a[h].push(m):a[h]=[m]:a[h]=a[h]?a[h]+", "+m:m)}),a},Ou=Symbol("internals");function No(o){return o&&String(o).trim().toLowerCase()}function ba(o){return o===!1||o==null?o:ae.isArray(o)?o.map(ba):String(o)}function Hm(o){const a=Object.create(null),h=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let m;for(;m=h.exec(o);)a[m[1]]=m[2];return a}const Um=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function al(o,a,h,m,y){if(ae.isFunction(m))return m.call(this,a,h);if(y&&(a=h),!!ae.isString(a)){if(ae.isString(m))return a.indexOf(m)!==-1;if(ae.isRegExp(m))return m.test(a)}}function Gm(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,h,m)=>h.toUpperCase()+m)}function Jm(o,a){const h=ae.toCamelCase(" "+a);["get","set","has"].forEach(m=>{Object.defineProperty(o,m+h,{value:function(y,_,d){return this[m].call(this,a,y,_,d)},configurable:!0})})}let Xt=class{constructor(a){a&&this.set(a)}set(a,h,m){const y=this;function _(v,i,f){const p=No(i);if(!p)throw new Error("header name must be a non-empty string");const g=ae.findKey(y,p);(!g||y[g]===void 0||f===!0||f===void 0&&y[g]!==!1)&&(y[g||i]=ba(v))}const d=(v,i)=>ae.forEach(v,(f,p)=>_(f,p,i));if(ae.isPlainObject(a)||a instanceof this.constructor)d(a,h);else if(ae.isString(a)&&(a=a.trim())&&!Um(a))d(zm(a),h);else if(ae.isObject(a)&&ae.isIterable(a)){let v={},i,f;for(const p of a){if(!ae.isArray(p))throw TypeError("Object iterator must return a key-value pair");v[f=p[0]]=(i=v[f])?ae.isArray(i)?[...i,p[1]]:[i,p[1]]:p[1]}d(v,h)}else a!=null&&_(h,a,m);return this}get(a,h){if(a=No(a),a){const m=ae.findKey(this,a);if(m){const y=this[m];if(!h)return y;if(h===!0)return Hm(y);if(ae.isFunction(h))return h.call(this,y,m);if(ae.isRegExp(h))return h.exec(y);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,h){if(a=No(a),a){const m=ae.findKey(this,a);return!!(m&&this[m]!==void 0&&(!h||al(this,this[m],m,h)))}return!1}delete(a,h){const m=this;let y=!1;function _(d){if(d=No(d),d){const v=ae.findKey(m,d);v&&(!h||al(m,m[v],v,h))&&(delete m[v],y=!0)}}return ae.isArray(a)?a.forEach(_):_(a),y}clear(a){const h=Object.keys(this);let m=h.length,y=!1;for(;m--;){const _=h[m];(!a||al(this,this[_],_,a,!0))&&(delete this[_],y=!0)}return y}normalize(a){const h=this,m={};return ae.forEach(this,(y,_)=>{const d=ae.findKey(m,_);if(d){h[d]=ba(y),delete h[_];return}const v=a?Gm(_):String(_).trim();v!==_&&delete h[_],h[v]=ba(y),m[v]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const h=Object.create(null);return ae.forEach(this,(m,y)=>{m!=null&&m!==!1&&(h[y]=a&&ae.isArray(m)?m.join(", "):m)}),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 m=new this(a);return h.forEach(y=>m.set(y)),m}static accessor(a){const m=(this[Ou]=this[Ou]={accessors:{}}).accessors,y=this.prototype;function _(d){const v=No(d);m[v]||(Jm(y,d),m[v]=!0)}return ae.isArray(a)?a.forEach(_):_(a),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ae.reduceDescriptors(Xt.prototype,({value:o},a)=>{let h=a[0].toUpperCase()+a.slice(1);return{get:()=>o,set(m){this[h]=m}}}),ae.freezeMethods(Xt);function sl(o,a){const h=this||Io,m=a||h,y=Xt.from(m.headers);let _=m.data;return ae.forEach(o,function(v){_=v.call(h,_,y.normalize(),a?a.status:void 0)}),y.normalize(),_}function xu(o){return!!(o&&o.__CANCEL__)}function Pi(o,a,h){De.call(this,o??"canceled",De.ERR_CANCELED,a,h),this.name="CanceledError"}ae.inherits(Pi,De,{__CANCEL__:!0});function Su(o,a,h){const m=h.config.validateStatus;!h.status||!m||m(h.status)?o(h):a(new De("Request failed with status code "+h.status,[De.ERR_BAD_REQUEST,De.ERR_BAD_RESPONSE][Math.floor(h.status/100)-4],h.config,h.request,h))}function Km(o){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return a&&a[1]||""}function Wm(o,a){o=o||10;const h=new Array(o),m=new Array(o);let y=0,_=0,d;return a=a!==void 0?a:1e3,function(i){const f=Date.now(),p=m[_];d||(d=f),h[y]=i,m[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 k=p&&f-p;return k?Math.round(b*1e3/k):void 0}}function Zm(o,a){let h=0,m=1e3/a,y,_;const d=(f,p=Date.now())=>{h=p,y=null,_&&(clearTimeout(_),_=null),o(...f)};return[(...f)=>{const p=Date.now(),g=p-h;g>=m?d(f,p):(y=f,_||(_=setTimeout(()=>{_=null,d(y)},m-g)))},()=>y&&d(y)]}const ga=(o,a,h=3)=>{let m=0;const y=Wm(50,250);return Zm(_=>{const d=_.loaded,v=_.lengthComputable?_.total:void 0,i=d-m,f=y(i),p=d<=v;m=d;const g={loaded:d,total:v,progress:v?d/v:void 0,bytes:i,rate:f||void 0,estimated:f&&v&&p?(v-d)/f:void 0,event:_,lengthComputable:v!=null,[a?"download":"upload"]:!0};o(g)},h)},Cu=(o,a)=>{const h=o!=null;return[m=>a[0]({lengthComputable:h,total:o,loaded:m}),a[1]]},Pu=o=>(...a)=>ae.asap(()=>o(...a)),Ym=Nt.hasStandardBrowserEnv?((o,a)=>h=>(h=new URL(h,Nt.origin),o.protocol===h.protocol&&o.host===h.host&&(a||o.port===h.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,Qm=Nt.hasStandardBrowserEnv?{write(o,a,h,m,y,_,d){if(typeof document>"u")return;const v=[`${o}=${encodeURIComponent(a)}`];ae.isNumber(h)&&v.push(`expires=${new Date(h).toUTCString()}`),ae.isString(m)&&v.push(`path=${m}`),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 Xm(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function ey(o,a){return a?o.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):o}function Tu(o,a,h){let m=!Xm(a);return o&&(m||h==!1)?ey(o,a):a}const Ru=o=>o instanceof Xt?{...o}:o;function Jn(o,a){a=a||{};const h={};function m(f,p,g,b){return ae.isPlainObject(f)&&ae.isPlainObject(p)?ae.merge.call({caseless:b},f,p):ae.isPlainObject(p)?ae.merge({},p):ae.isArray(p)?p.slice():p}function y(f,p,g,b){if(ae.isUndefined(p)){if(!ae.isUndefined(f))return m(void 0,f,g,b)}else return m(f,p,g,b)}function _(f,p){if(!ae.isUndefined(p))return m(void 0,p)}function d(f,p){if(ae.isUndefined(p)){if(!ae.isUndefined(f))return m(void 0,f)}else return m(void 0,p)}function v(f,p,g){if(g in a)return m(f,p);if(g in o)return m(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,p,g)=>y(Ru(f),Ru(p),g,!0)};return ae.forEach(Object.keys({...o,...a}),function(p){const g=i[p]||y,b=g(o[p],a[p],p);ae.isUndefined(b)&&g!==v||(h[p]=b)}),h}const Lu=o=>{const a=Jn({},o);let{data:h,withXSRFToken:m,xsrfHeaderName:y,xsrfCookieName:_,headers:d,auth:v}=a;if(a.headers=d=Xt.from(d),a.url=wu(Tu(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(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(ae.isFunction(h.getHeaders)){const i=h.getHeaders(),f=["content-type","content-length"];Object.entries(i).forEach(([p,g])=>{f.includes(p.toLowerCase())&&d.set(p,g)})}}if(Nt.hasStandardBrowserEnv&&(m&&ae.isFunction(m)&&(m=m(a)),m||m!==!1&&Ym(a.url))){const i=y&&_&&Qm.read(_);i&&d.set(y,i)}return a},ty=typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(h,m){const y=Lu(o);let _=y.data;const d=Xt.from(y.headers).normalize();let{responseType:v,onUploadProgress:i,onDownloadProgress:f}=y,p,g,b,k,E;function O(){k&&k(),E&&E(),y.cancelToken&&y.cancelToken.unsubscribe(p),y.signal&&y.signal.removeEventListener("abort",p)}let j=new XMLHttpRequest;j.open(y.method.toUpperCase(),y.url,!0),j.timeout=y.timeout;function x(){if(!j)return;const C=Xt.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),T={data:!v||v==="text"||v==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:C,config:o,request:j};Su(function(A){h(A),O()},function(A){m(A),O()},T),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&&(m(new De("Request aborted",De.ECONNABORTED,o,j)),j=null)},j.onerror=function(L){const T=L&&L.message?L.message:"Network Error",R=new De(T,De.ERR_NETWORK,o,j);R.event=L||null,m(R),j=null},j.ontimeout=function(){let L=y.timeout?"timeout of "+y.timeout+"ms exceeded":"timeout exceeded";const T=y.transitional||ju;y.timeoutErrorMessage&&(L=y.timeoutErrorMessage),m(new De(L,T.clarifyTimeoutError?De.ETIMEDOUT:De.ECONNABORTED,o,j)),j=null},_===void 0&&d.setContentType(null),"setRequestHeader"in j&&ae.forEach(d.toJSON(),function(L,T){j.setRequestHeader(T,L)}),ae.isUndefined(y.withCredentials)||(j.withCredentials=!!y.withCredentials),v&&v!=="json"&&(j.responseType=y.responseType),f&&([b,E]=ga(f,!0),j.addEventListener("progress",b)),i&&j.upload&&([g,k]=ga(i),j.upload.addEventListener("progress",g),j.upload.addEventListener("loadend",k)),(y.cancelToken||y.signal)&&(p=C=>{j&&(m(!C||C.type?new Pi(null,o,j):C),j.abort(),j=null)},y.cancelToken&&y.cancelToken.subscribe(p),y.signal&&(y.signal.aborted?p():y.signal.addEventListener("abort",p)));const S=Km(y.url);if(S&&Nt.protocols.indexOf(S)===-1){m(new De("Unsupported protocol "+S+":",De.ERR_BAD_REQUEST,o));return}j.send(_||null)})},ry=(o,a)=>{const{length:h}=o=o?o.filter(Boolean):[];if(a||h){let m=new AbortController,y;const _=function(f){if(!y){y=!0,v();const p=f instanceof Error?f:this.reason;m.abort(p instanceof De?p:new Pi(p instanceof Error?p.message:p))}};let d=a&&setTimeout(()=>{d=null,_(new De(`timeout ${a} of ms exceeded`,De.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}=m;return i.unsubscribe=()=>ae.asap(v),i}},ny=function*(o,a){let h=o.byteLength;if(h<a){yield o;return}let m=0,y;for(;m<h;)y=m+a,yield o.slice(m,y),m=y},iy=async function*(o,a){for await(const h of oy(o))yield*ny(h,a)},oy=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const a=o.getReader();try{for(;;){const{done:h,value:m}=await a.read();if(h)break;yield m}}finally{await a.cancel()}},Au=(o,a,h,m)=>{const y=iy(o,a);let _=0,d,v=i=>{d||(d=!0,m&&m(i))};return new ReadableStream({async pull(i){try{const{done:f,value:p}=await y.next();if(f){v(),i.close();return}let g=p.byteLength;if(h){let b=_+=g;h(b)}i.enqueue(new Uint8Array(p))}catch(f){throw v(f),f}},cancel(i){return v(i),y.return()}},{highWaterMark:2})},$u=64*1024,{isFunction:_a}=ae,ay=(({Request:o,Response:a})=>({Request:o,Response:a}))(ae.global),{ReadableStream:Iu,TextEncoder:Nu}=ae.global,Du=(o,...a)=>{try{return!!o(...a)}catch{return!1}},sy=o=>{o=ae.merge.call({skipUndefined:!0},ay,o);const{fetch:a,Request:h,Response:m}=o,y=a?_a(a):typeof fetch=="function",_=_a(h),d=_a(m);if(!y)return!1;const v=y&&_a(Iu),i=y&&(typeof Nu=="function"?(E=>O=>E.encode(O))(new Nu):async E=>new Uint8Array(await new h(E).arrayBuffer())),f=_&&v&&Du(()=>{let E=!1;const O=new h(Nt.origin,{body:new Iu,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!O}),p=d&&v&&Du(()=>ae.isReadableStream(new m("").body)),g={stream:p&&(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 De(`Response type '${E}' is not supported`,De.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(Nt.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},k=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:C,timeout:L,onDownloadProgress:T,onUploadProgress:R,responseType:A,headers:I,withCredentials:D="same-origin",fetchOptions:M}=Lu(E),V=a||fetch;A=A?(A+"").toLowerCase():"text";let G=ry([S,C&&C.toAbortSignal()],L),J=null;const Y=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let ce;try{if(R&&f&&j!=="get"&&j!=="head"&&(ce=await k(I,x))!==0){let U=new h(O,{method:"POST",body:x,duplex:"half"}),ne;if(ae.isFormData(x)&&(ne=U.headers.get("content-type"))&&I.setContentType(ne),U.body){const[q,N]=Cu(ce,ga(Pu(R)));x=Au(U.body,$u,q,N)}}ae.isString(D)||(D=D?"include":"omit");const ue=_&&"credentials"in h.prototype,fe={...M,signal:G,method:j.toUpperCase(),headers:I.normalize().toJSON(),body:x,duplex:"half",credentials:ue?D:void 0};J=_&&new h(O,fe);let X=await(_?V(J,M):V(O,fe));const pe=p&&(A==="stream"||A==="response");if(p&&(T||pe&&Y)){const U={};["status","statusText","headers"].forEach(F=>{U[F]=X[F]});const ne=ae.toFiniteNumber(X.headers.get("content-length")),[q,N]=T&&Cu(ne,ga(Pu(T),!0))||[];X=new m(Au(X.body,$u,q,()=>{N&&N(),Y&&Y()}),U)}A=A||"text";let re=await g[ae.findKey(g,A)||"text"](X,E);return!pe&&Y&&Y(),await new Promise((U,ne)=>{Su(U,ne,{data:re,headers:Xt.from(X.headers),status:X.status,statusText:X.statusText,config:E,request:J})})}catch(ue){throw Y&&Y(),ue&&ue.name==="TypeError"&&/Load failed|fetch/i.test(ue.message)?Object.assign(new De("Network Error",De.ERR_NETWORK,E,J),{cause:ue.cause||ue}):De.from(ue,ue&&ue.code,E,J)}}},ly=new Map,Bu=o=>{let a=o&&o.env||{};const{fetch:h,Request:m,Response:y}=a,_=[m,y,h];let d=_.length,v=d,i,f,p=ly;for(;v--;)i=_[v],f=p.get(i),f===void 0&&p.set(i,f=v?new Map:sy(a)),p=f;return f};Bu();const ll={http:Tm,xhr:ty,fetch:{get:Bu}};ae.forEach(ll,(o,a)=>{if(o){try{Object.defineProperty(o,"name",{value:a})}catch{}Object.defineProperty(o,"adapterName",{value:a})}});const Fu=o=>`- ${o}`,cy=o=>ae.isFunction(o)||o===null||o===!1;function uy(o,a){o=ae.isArray(o)?o:[o];const{length:h}=o;let m,y;const _={};for(let d=0;d<h;d++){m=o[d];let v;if(y=m,!cy(m)&&(y=ll[(v=String(m)).toLowerCase()],y===void 0))throw new De(`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
|
+
`+d.map(Fu).join(`
|
|
5
|
+
`):" "+Fu(d[0]):"as no adapter specified";throw new De("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return y}const Mu={getAdapter:uy,adapters:ll};function cl(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new Pi(null,o)}function Vu(o){return cl(o),o.headers=Xt.from(o.headers),o.data=sl.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),Mu.getAdapter(o.adapter||Io.adapter,o)(o).then(function(m){return cl(o),m.data=sl.call(o,o.transformResponse,m),m.headers=Xt.from(m.headers),m},function(m){return xu(m)||(cl(o),m&&m.response&&(m.response.data=sl.call(o,o.transformResponse,m.response),m.response.headers=Xt.from(m.response.headers))),Promise.reject(m)})}const qu="1.13.2",wa={};["object","boolean","number","function","string","symbol"].forEach((o,a)=>{wa[o]=function(m){return typeof m===o||"a"+(a<1?"n ":" ")+o}});const zu={};wa.transitional=function(a,h,m){function y(_,d){return"[Axios v"+qu+"] Transitional option '"+_+"'"+d+(m?". "+m:"")}return(_,d,v)=>{if(a===!1)throw new De(y(d," has been removed"+(h?" in "+h:"")),De.ERR_DEPRECATED);return h&&!zu[d]&&(zu[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}},wa.spelling=function(a){return(h,m)=>(console.warn(`${m} is likely a misspelling of ${a}`),!0)};function dy(o,a,h){if(typeof o!="object")throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const m=Object.keys(o);let y=m.length;for(;y-- >0;){const _=m[y],d=a[_];if(d){const v=o[_],i=v===void 0||d(v,_,o);if(i!==!0)throw new De("option "+_+" must be "+i,De.ERR_BAD_OPTION_VALUE);continue}if(h!==!0)throw new De("Unknown option "+_,De.ERR_BAD_OPTION)}}const ka={assertOptions:dy,validators:wa},Nr=ka.validators;let Kn=class{constructor(a){this.defaults=a||{},this.interceptors={request:new ku,response:new ku}}async request(a,h){try{return await this._request(a,h)}catch(m){if(m instanceof Error){let y={};Error.captureStackTrace?Error.captureStackTrace(y):y=new Error;const _=y.stack?y.stack.replace(/^.+\n/,""):"";try{m.stack?_&&!String(m.stack).endsWith(_.replace(/^.+\n.+\n/,""))&&(m.stack+=`
|
|
6
|
+
`+_):m.stack=_}catch{}}throw m}}_request(a,h){typeof a=="string"?(h=h||{},h.url=a):h=a||{},h=Jn(this.defaults,h);const{transitional:m,paramsSerializer:y,headers:_}=h;m!==void 0&&ka.assertOptions(m,{silentJSONParsing:Nr.transitional(Nr.boolean),forcedJSONParsing:Nr.transitional(Nr.boolean),clarifyTimeoutError:Nr.transitional(Nr.boolean)},!1),y!=null&&(ae.isFunction(y)?h.paramsSerializer={serialize:y}:ka.assertOptions(y,{encode:Nr.function,serialize:Nr.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),ka.assertOptions(h,{baseUrl:Nr.spelling("baseURL"),withXsrfToken:Nr.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=Xt.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 p,g=0,b;if(!i){const E=[Vu.bind(this),void 0];for(E.unshift(...v),E.push(...f),b=E.length,p=Promise.resolve(h);g<b;)p=p.then(E[g++],E[g++]);return p}b=v.length;let k=h;for(;g<b;){const E=v[g++],O=v[g++];try{k=E(k)}catch(j){O.call(this,j);break}}try{p=Vu.call(this,k)}catch(E){return Promise.reject(E)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(a){a=Jn(this.defaults,a);const h=Tu(a.baseURL,a.url,a.allowAbsoluteUrls);return wu(h,a.params,a.paramsSerializer)}};ae.forEach(["delete","get","head","options"],function(a){Kn.prototype[a]=function(h,m){return this.request(Jn(m||{},{method:a,url:h,data:(m||{}).data}))}}),ae.forEach(["post","put","patch"],function(a){function h(m){return function(_,d,v){return this.request(Jn(v||{},{method:a,headers:m?{"Content-Type":"multipart/form-data"}:{},url:_,data:d}))}}Kn.prototype[a]=h(),Kn.prototype[a+"Form"]=h(!0)});let hy=class Up{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let h;this.promise=new Promise(function(_){h=_});const m=this;this.promise.then(y=>{if(!m._listeners)return;let _=m._listeners.length;for(;_-- >0;)m._listeners[_](y);m._listeners=null}),this.promise.then=y=>{let _;const d=new Promise(v=>{m.subscribe(v),_=v}).then(y);return d.cancel=function(){m.unsubscribe(_)},d},a(function(_,d,v){m.reason||(m.reason=new Pi(_,d,v),h(m.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=m=>{a.abort(m)};return this.subscribe(h),a.signal.unsubscribe=()=>this.unsubscribe(h),a.signal}static source(){let a;return{token:new Up(function(y){a=y}),cancel:a}}};function fy(o){return function(h){return o.apply(null,h)}}function py(o){return ae.isObject(o)&&o.isAxiosError===!0}const ul={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(ul).forEach(([o,a])=>{ul[a]=o});function Hu(o){const a=new Kn(o),h=xi(Kn.prototype.request,a);return ae.extend(h,Kn.prototype,a,{allOwnKeys:!0}),ae.extend(h,a,null,{allOwnKeys:!0}),h.create=function(y){return Hu(Jn(o,y))},h}const kt=Hu(Io);kt.Axios=Kn,kt.CanceledError=Pi,kt.CancelToken=hy,kt.isCancel=xu,kt.VERSION=qu,kt.toFormData=va,kt.AxiosError=De,kt.Cancel=kt.CanceledError,kt.all=function(a){return Promise.all(a)},kt.spread=fy,kt.isAxiosError=py,kt.mergeConfig=Jn,kt.AxiosHeaders=Xt,kt.formToJSON=o=>Eu(ae.isHTMLForm(o)?new FormData(o):o),kt.getAdapter=Mu.getAdapter,kt.HttpStatusCode=ul,kt.default=kt;const{Axios:c1,AxiosError:u1,CanceledError:d1,isCancel:h1,CancelToken:f1,VERSION:p1,all:m1,Cancel:y1,isAxiosError:v1,spread:b1,toFormData:g1,AxiosHeaders:_1,HttpStatusCode:w1,formToJSON:k1,getAdapter:j1,mergeConfig:E1}=kt;function my(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ja={exports:{}},dl={},Qr={},Wn={},hl={},fl={},pl={},Uu;function Ea(){return Uu||(Uu=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 m 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((C,L)=>`${C}${L}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((C,L)=>(L instanceof h&&(C[L.str]=(C[L.str]||0)+1),C),{})}}o._Code=m,o.nil=new m("");function y(x,...S){const C=[x[0]];let L=0;for(;L<S.length;)v(C,S[L]),C.push(x[++L]);return new m(C)}o._=y;const _=new m("+");function d(x,...S){const C=[k(x[0])];let L=0;for(;L<S.length;)C.push(_),v(C,S[L]),C.push(_,k(x[++L]));return i(C),new m(C)}o.str=d;function v(x,S){S instanceof m?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 C=f(x[S-1],x[S+1]);if(C!==void 0){x.splice(S-1,3,C);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 p(x,S){return S.emptyStr()?x:x.emptyStr()?S:d`${x}${S}`}o.strConcat=p;function g(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:k(Array.isArray(x)?x.join(","):x)}function b(x){return new m(k(x))}o.stringify=b;function k(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o.safeStringify=k;function E(x){return typeof x=="string"&&o.IDENTIFIER.test(x)?new m(`.${x}`):y`[${x}]`}o.getProperty=E;function O(x){if(typeof x=="string"&&o.IDENTIFIER.test(x))return new m(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}o.getEsmExportName=O;function j(x){return new m(x.toString())}o.regexpCode=j})(pl)),pl}var ml={},Gu;function Ju(){return Gu||(Gu=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ValueScope=o.ValueScopeName=o.Scope=o.varKinds=o.UsedValueState=void 0;const a=Ea();class h extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var m;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(m||(o.UsedValueState=m={})),o.varKinds={const:new a.Name("const"),let:new a.Name("let"),var:new a.Name("var")};class y{constructor({prefixes:f,parent:p}={}){this._names={},this._prefixes=f,this._parent=p}toName(f){return f instanceof a.Name?f:this.name(f)}name(f){return new a.Name(this._newName(f))}_newName(f){const p=this._names[f]||this._nameGroup(f);return`${f}${p.index++}`}_nameGroup(f){var p,g;if(!((g=(p=this._parent)===null||p===void 0?void 0:p._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,p){super(p),this.prefix=f}setValue(f,{property:p,itemIndex:g}){this.value=f,this.scopePath=(0,a._)`.${new a.Name(p)}[${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,p){var g;if(p.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const b=this.toName(f),{prefix:k}=b,E=(g=p.key)!==null&&g!==void 0?g:p.ref;let O=this._values[k];if(O){const S=O.get(E);if(S)return S}else O=this._values[k]=new Map;O.set(E,b);const j=this._scope[k]||(this._scope[k]=[]),x=j.length;return j[x]=p.ref,b.setValue(p,{property:k,itemIndex:x}),b}getValue(f,p){const g=this._values[f];if(g)return g.get(p)}scopeRefs(f,p=this._values){return this._reduceValues(p,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,p,g){return this._reduceValues(f,b=>{if(b.value===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return b.value.code},p,g)}_reduceValues(f,p,g={},b){let k=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,m.Started);let S=p(x);if(S){const C=this.opts.es5?o.varKinds.var:o.varKinds.const;k=(0,a._)`${k}${C} ${x} = ${S};${this.opts._n}`}else if(S=b?.(x))k=(0,a._)`${k}${S}${this.opts._n}`;else throw new h(x);j.set(x,m.Completed)})}return k}}o.ValueScope=v})(ml)),ml}var Ku;function Je(){return Ku||(Ku=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=Ea(),h=Ju();var m=Ea();Object.defineProperty(o,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(o,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(o,"strConcat",{enumerable:!0,get:function(){return m.strConcat}}),Object.defineProperty(o,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(o,"getProperty",{enumerable:!0,get:function(){return m.getProperty}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(o,"regexpCode",{enumerable:!0,get:function(){return m.regexpCode}}),Object.defineProperty(o,"Name",{enumerable:!0,get:function(){return m.Name}});var y=Ju();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(N,F){return this}}class d extends _{constructor(N,F,ie){super(),this.varKind=N,this.name=F,this.rhs=ie}render({es5:N,_n:F}){const ie=N?h.varKinds.var:this.varKind,ke=this.rhs===void 0?"":` = ${this.rhs}`;return`${ie} ${this.name}${ke};`+F}optimizeNames(N,F){if(N[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,N,F)),this}get names(){return this.rhs instanceof a._CodeOrName?this.rhs.names:{}}}class v extends _{constructor(N,F,ie){super(),this.lhs=N,this.rhs=F,this.sideEffects=ie}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,F){if(!(this.lhs instanceof a.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,N,F),this}get names(){const N=this.lhs instanceof a.Name?{}:{...this.lhs.names};return J(N,this.rhs)}}class i extends v{constructor(N,F,ie,ke){super(N,ie,ke),this.op=F}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class f extends _{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class p extends _{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class g extends _{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class b extends _{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,F){return this.code=Y(this.code,N,F),this}get names(){return this.code instanceof a._CodeOrName?this.code.names:{}}}class k extends _{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((F,ie)=>F+ie.render(N),"")}optimizeNodes(){const{nodes:N}=this;let F=N.length;for(;F--;){const ie=N[F].optimizeNodes();Array.isArray(ie)?N.splice(F,1,...ie):ie?N[F]=ie:N.splice(F,1)}return N.length>0?this:void 0}optimizeNames(N,F){const{nodes:ie}=this;let ke=ie.length;for(;ke--;){const _e=ie[ke];_e.optimizeNames(N,F)||(ce(N,_e.names),ie.splice(ke,1))}return ie.length>0?this:void 0}get names(){return this.nodes.reduce((N,F)=>G(N,F.names),{})}}class E extends k{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class O extends k{}class j extends E{}j.kind="else";class x extends E{constructor(N,F){super(F),this.condition=N}render(N){let F=`if(${this.condition})`+super.render(N);return this.else&&(F+="else "+this.else.render(N)),F}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let F=this.else;if(F){const ie=F.optimizeNodes();F=this.else=Array.isArray(ie)?new j(ie):ie}if(F)return N===!1?F instanceof x?F:F.nodes:this.nodes.length?this:new x(ue(N),F instanceof x?[F]:F.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,F){var ie;if(this.else=(ie=this.else)===null||ie===void 0?void 0:ie.optimizeNames(N,F),!!(super.optimizeNames(N,F)||this.else))return this.condition=Y(this.condition,N,F),this}get names(){const N=super.names;return J(N,this.condition),this.else&&G(N,this.else.names),N}}x.kind="if";class S extends E{}S.kind="for";class C extends S{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,F){if(super.optimizeNames(N,F))return this.iteration=Y(this.iteration,N,F),this}get names(){return G(super.names,this.iteration.names)}}class L extends S{constructor(N,F,ie,ke){super(),this.varKind=N,this.name=F,this.from=ie,this.to=ke}render(N){const F=N.es5?h.varKinds.var:this.varKind,{name:ie,from:ke,to:_e}=this;return`for(${F} ${ie}=${ke}; ${ie}<${_e}; ${ie}++)`+super.render(N)}get names(){const N=J(super.names,this.from);return J(N,this.to)}}class T extends S{constructor(N,F,ie,ke){super(),this.loop=N,this.varKind=F,this.name=ie,this.iterable=ke}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,F){if(super.optimizeNames(N,F))return this.iterable=Y(this.iterable,N,F),this}get names(){return G(super.names,this.iterable.names)}}class R extends E{constructor(N,F,ie){super(),this.name=N,this.args=F,this.async=ie}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}R.kind="func";class A extends k{render(N){return"return "+super.render(N)}}A.kind="return";class I extends E{render(N){let F="try"+super.render(N);return this.catch&&(F+=this.catch.render(N)),this.finally&&(F+=this.finally.render(N)),F}optimizeNodes(){var N,F;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(N,F){var ie,ke;return super.optimizeNames(N,F),(ie=this.catch)===null||ie===void 0||ie.optimizeNames(N,F),(ke=this.finally)===null||ke===void 0||ke.optimizeNames(N,F),this}get names(){const N=super.names;return this.catch&&G(N,this.catch.names),this.finally&&G(N,this.finally.names),N}}class D extends E{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}D.kind="catch";class M extends E{render(N){return"finally"+super.render(N)}}M.kind="finally";class V{constructor(N,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
|
|
7
|
+
`:""},this._extScope=N,this._scope=new h.Scope({parent:N}),this._nodes=[new O]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,F){const ie=this._extScope.value(N,F);return(this._values[ie.prefix]||(this._values[ie.prefix]=new Set)).add(ie),ie}getScopeValue(N,F){return this._extScope.getValue(N,F)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,F,ie,ke){const _e=this._scope.toName(F);return ie!==void 0&&ke&&(this._constants[_e.str]=ie),this._leafNode(new d(N,_e,ie)),_e}const(N,F,ie){return this._def(h.varKinds.const,N,F,ie)}let(N,F,ie){return this._def(h.varKinds.let,N,F,ie)}var(N,F,ie){return this._def(h.varKinds.var,N,F,ie)}assign(N,F,ie){return this._leafNode(new v(N,F,ie))}add(N,F){return this._leafNode(new i(N,o.operators.ADD,F))}code(N){return typeof N=="function"?N():N!==a.nil&&this._leafNode(new b(N)),this}object(...N){const F=["{"];for(const[ie,ke]of N)F.length>1&&F.push(","),F.push(ie),(ie!==ke||this.opts.es5)&&(F.push(":"),(0,a.addCodeArg)(F,ke));return F.push("}"),new a._Code(F)}if(N,F,ie){if(this._blockNode(new x(N)),F&&ie)this.code(F).else().code(ie).endIf();else if(F)this.code(F).endIf();else if(ie)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new x(N))}else(){return this._elseNode(new j)}endIf(){return this._endBlockNode(x,j)}_for(N,F){return this._blockNode(N),F&&this.code(F).endFor(),this}for(N,F){return this._for(new C(N),F)}forRange(N,F,ie,ke,_e=this.opts.es5?h.varKinds.var:h.varKinds.let){const Oe=this._scope.toName(N);return this._for(new L(_e,Oe,F,ie),()=>ke(Oe))}forOf(N,F,ie,ke=h.varKinds.const){const _e=this._scope.toName(N);if(this.opts.es5){const Oe=F instanceof a.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,a._)`${Oe}.length`,ye=>{this.var(_e,(0,a._)`${Oe}[${ye}]`),ie(_e)})}return this._for(new T("of",ke,_e,F),()=>ie(_e))}forIn(N,F,ie,ke=this.opts.es5?h.varKinds.var:h.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,a._)`Object.keys(${F})`,ie);const _e=this._scope.toName(N);return this._for(new T("in",ke,_e,F),()=>ie(_e))}endFor(){return this._endBlockNode(S)}label(N){return this._leafNode(new f(N))}break(N){return this._leafNode(new p(N))}return(N){const F=new A;if(this._blockNode(F),this.code(N),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(N,F,ie){if(!F&&!ie)throw new Error('CodeGen: "try" without "catch" and "finally"');const ke=new I;if(this._blockNode(ke),this.code(N),F){const _e=this.name("e");this._currNode=ke.catch=new D(_e),F(_e)}return ie&&(this._currNode=ke.finally=new M,this.code(ie)),this._endBlockNode(D,M)}throw(N){return this._leafNode(new g(N))}block(N,F){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(F),this}endBlock(N){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const ie=this._nodes.length-F;if(ie<0||N!==void 0&&ie!==N)throw new Error(`CodeGen: wrong number of nodes: ${ie} vs ${N} expected`);return this._nodes.length=F,this}func(N,F=a.nil,ie,ke){return this._blockNode(new R(N,F,ie)),ke&&this.code(ke).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,F){const ie=this._currNode;if(ie instanceof N||F&&ie instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${N.kind}/${F.kind}`:N.kind}"`)}_elseNode(N){const F=this._currNode;if(!(F instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const F=this._nodes;F[F.length-1]=N}}o.CodeGen=V;function G(q,N){for(const F in N)q[F]=(q[F]||0)+(N[F]||0);return q}function J(q,N){return N instanceof a._CodeOrName?G(q,N.names):q}function Y(q,N,F){if(q instanceof a.Name)return ie(q);if(!ke(q))return q;return new a._Code(q._items.reduce((_e,Oe)=>(Oe instanceof a.Name&&(Oe=ie(Oe)),Oe instanceof a._Code?_e.push(...Oe._items):_e.push(Oe),_e),[]));function ie(_e){const Oe=F[_e.str];return Oe===void 0||N[_e.str]!==1?_e:(delete N[_e.str],Oe)}function ke(_e){return _e instanceof a._Code&&_e._items.some(Oe=>Oe instanceof a.Name&&N[Oe.str]===1&&F[Oe.str]!==void 0)}}function ce(q,N){for(const F in N)q[F]=(q[F]||0)-(N[F]||0)}function ue(q){return typeof q=="boolean"||typeof q=="number"||q===null?!q:(0,a._)`!${ne(q)}`}o.not=ue;const fe=U(o.operators.AND);function X(...q){return q.reduce(fe)}o.and=X;const pe=U(o.operators.OR);function re(...q){return q.reduce(pe)}o.or=re;function U(q){return(N,F)=>N===a.nil?F:F===a.nil?N:(0,a._)`${ne(N)} ${q} ${ne(F)}`}function ne(q){return q instanceof a.Name?q:(0,a._)`(${q})`}})(fl)),fl}var Ve={},Wu;function tt(){if(Wu)return Ve;Wu=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;const o=Je(),a=Ea();function h(T){const R={};for(const A of T)R[A]=!0;return R}Ve.toHash=h;function m(T,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(y(T,R),!_(R,T.self.RULES.all))}Ve.alwaysValidSchema=m;function y(T,R=T.schema){const{opts:A,self:I}=T;if(!A.strictSchema||typeof R=="boolean")return;const D=I.RULES.keywords;for(const M in R)D[M]||L(T,`unknown keyword: "${M}"`)}Ve.checkUnknownRules=y;function _(T,R){if(typeof T=="boolean")return!T;for(const A in T)if(R[A])return!0;return!1}Ve.schemaHasRules=_;function d(T,R){if(typeof T=="boolean")return!T;for(const A in T)if(A!=="$ref"&&R.all[A])return!0;return!1}Ve.schemaHasRulesButRef=d;function v({topSchemaRef:T,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._)`${T}${R}${(0,o.getProperty)(I)}`}Ve.schemaRefOrVal=v;function i(T){return g(decodeURIComponent(T))}Ve.unescapeFragment=i;function f(T){return encodeURIComponent(p(T))}Ve.escapeFragment=f;function p(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=p;function g(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=g;function b(T,R){if(Array.isArray(T))for(const A of T)R(A);else R(T)}Ve.eachItem=b;function k({mergeNames:T,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?T(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}}Ve.mergeEvaluated={props:k({mergeNames:(T,R,A)=>T.if((0,o._)`${A} !== true && ${R} !== undefined`,()=>{T.if((0,o._)`${R} === true`,()=>T.assign(A,!0),()=>T.assign(A,(0,o._)`${A} || {}`).code((0,o._)`Object.assign(${A}, ${R})`))}),mergeToName:(T,R,A)=>T.if((0,o._)`${A} !== true`,()=>{R===!0?T.assign(A,!0):(T.assign(A,(0,o._)`${A} || {}`),O(T,A,R))}),mergeValues:(T,R)=>T===!0?!0:{...T,...R},resultToName:E}),items:k({mergeNames:(T,R,A)=>T.if((0,o._)`${A} !== true && ${R} !== undefined`,()=>T.assign(A,(0,o._)`${R} === true ? true : ${A} > ${R} ? ${A} : ${R}`)),mergeToName:(T,R,A)=>T.if((0,o._)`${A} !== true`,()=>T.assign(A,R===!0?!0:(0,o._)`${A} > ${R} ? ${A} : ${R}`)),mergeValues:(T,R)=>T===!0?!0:Math.max(T,R),resultToName:(T,R)=>T.var("items",R)})};function E(T,R){if(R===!0)return T.var("props",!0);const A=T.var("props",(0,o._)`{}`);return R!==void 0&&O(T,A,R),A}Ve.evaluatedPropsToName=E;function O(T,R,A){Object.keys(A).forEach(I=>T.assign((0,o._)`${R}${(0,o.getProperty)(I)}`,!0))}Ve.setEvaluated=O;const j={};function x(T,R){return T.scopeValue("func",{ref:R,code:j[R.code]||(j[R.code]=new a._Code(R.code))})}Ve.useFunc=x;var S;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(S||(Ve.Type=S={}));function C(T,R,A){if(T instanceof o.Name){const I=R===S.Num;return A?I?(0,o._)`"[" + ${T} + "]"`:(0,o._)`"['" + ${T} + "']"`:I?(0,o._)`"/" + ${T}`:(0,o._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,o.getProperty)(T).toString():"/"+p(T)}Ve.getErrorPath=C;function L(T,R,A=T.opts.strictSchema){if(A){if(R=`strict mode: ${R}`,A===!0)throw new Error(R);T.self.logger.warn(R)}}return Ve.checkStrictMode=L,Ve}var Oa={},Zu;function _n(){if(Zu)return Oa;Zu=1,Object.defineProperty(Oa,"__esModule",{value:!0});const o=Je(),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 Oa.default=a,Oa}var Yu;function xa(){return Yu||(Yu=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=Je(),h=tt(),m=_n();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,C){const{it:L}=j,{gen:T,compositeRule:R,allErrors:A}=L,I=g(j,x,S);C??(R||A)?i(T,I):f(L,(0,a._)`[${I}]`)}o.reportError=y;function _(j,x=o.keywordError,S){const{it:C}=j,{gen:L,compositeRule:T,allErrors:R}=C,A=g(j,x,S);i(L,A),T||R||f(C,m.default.vErrors)}o.reportExtraError=_;function d(j,x){j.assign(m.default.errors,x),j.if((0,a._)`${m.default.vErrors} !== null`,()=>j.if(x,()=>j.assign((0,a._)`${m.default.vErrors}.length`,x),()=>j.assign(m.default.vErrors,null)))}o.resetErrorsCount=d;function v({gen:j,keyword:x,schemaValue:S,data:C,errsCount:L,it:T}){if(L===void 0)throw new Error("ajv implementation error");const R=j.name("err");j.forRange("i",L,m.default.errors,A=>{j.const(R,(0,a._)`${m.default.vErrors}[${A}]`),j.if((0,a._)`${R}.instancePath === undefined`,()=>j.assign((0,a._)`${R}.instancePath`,(0,a.strConcat)(m.default.instancePath,T.errorPath))),j.assign((0,a._)`${R}.schemaPath`,(0,a.str)`${T.errSchemaPath}/${x}`),T.opts.verbose&&(j.assign((0,a._)`${R}.schema`,S),j.assign((0,a._)`${R}.data`,C))})}o.extendErrors=v;function i(j,x){const S=j.const("err",x);j.if((0,a._)`${m.default.vErrors} === null`,()=>j.assign(m.default.vErrors,(0,a._)`[${S}]`),(0,a._)`${m.default.vErrors}.push(${S})`),j.code((0,a._)`${m.default.errors}++`)}function f(j,x){const{gen:S,validateName:C,schemaEnv:L}=j;L.$async?S.throw((0,a._)`new ${j.ValidationError}(${x})`):(S.assign((0,a._)`${C}.errors`,x),S.return(!1))}const p={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:C}=j.it;return C===!1?(0,a._)`{}`:b(j,x,S)}function b(j,x,S={}){const{gen:C,it:L}=j,T=[k(L,S),E(j,S)];return O(j,x,T),C.object(...T)}function k({errorPath:j},{instancePath:x}){const S=x?(0,a.str)`${j}${(0,h.getErrorPath)(x,h.Type.Str)}`:j;return[m.default.instancePath,(0,a.strConcat)(m.default.instancePath,S)]}function E({keyword:j,it:{errSchemaPath:x}},{schemaPath:S,parentSchema:C}){let L=C?x:(0,a.str)`${x}/${j}`;return S&&(L=(0,a.str)`${L}${(0,h.getErrorPath)(S,h.Type.Str)}`),[p.schemaPath,L]}function O(j,{params:x,message:S},C){const{keyword:L,data:T,schemaValue:R,it:A}=j,{opts:I,propertyName:D,topSchemaRef:M,schemaPath:V}=A;C.push([p.keyword,L],[p.params,typeof x=="function"?x(j):x||(0,a._)`{}`]),I.messages&&C.push([p.message,typeof S=="function"?S(j):S]),I.verbose&&C.push([p.schema,R],[p.parentSchema,(0,a._)`${M}${V}`],[m.default.data,T]),D&&C.push([p.propertyName,D])}})(hl)),hl}var Qu;function yy(){if(Qu)return Wn;Qu=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.boolOrEmptySchema=Wn.topBoolOrEmptySchema=void 0;const o=xa(),a=Je(),h=_n(),m={message:"boolean schema is false"};function y(v){const{gen:i,schema:f,validateName:p}=v;f===!1?d(v,!1):typeof f=="object"&&f.$async===!0?i.return(h.default.data):(i.assign((0,a._)`${p}.errors`,null),i.return(!0))}Wn.topBoolOrEmptySchema=y;function _(v,i){const{gen:f,schema:p}=v;p===!1?(f.var(i,!1),d(v)):f.var(i,!0)}Wn.boolOrEmptySchema=_;function d(v,i){const{gen:f,data:p}=v,g={gen:f,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:v};(0,o.reportError)(g,m,void 0,i)}return Wn}var Rt={},Zn={},Xu;function ed(){if(Xu)return Zn;Xu=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.getRules=Zn.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)}Zn.isJSONType=h;function m(){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 Zn.getRules=m,Zn}var Xr={},td;function rd(){if(td)return Xr;td=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.shouldUseRule=Xr.shouldUseGroup=Xr.schemaHasRulesForType=void 0;function o({schema:m,self:y},_){const d=y.RULES.types[_];return d&&d!==!0&&a(m,d)}Xr.schemaHasRulesForType=o;function a(m,y){return y.rules.some(_=>h(m,_))}Xr.shouldUseGroup=a;function h(m,y){var _;return m[y.keyword]!==void 0||((_=y.definition.implements)===null||_===void 0?void 0:_.some(d=>m[d]!==void 0))}return Xr.shouldUseRule=h,Xr}var nd;function Sa(){if(nd)return Rt;nd=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.reportTypeError=Rt.checkDataTypes=Rt.checkDataType=Rt.coerceAndCheckDataType=Rt.getJSONTypes=Rt.getSchemaTypes=Rt.DataType=void 0;const o=ed(),a=rd(),h=xa(),m=Je(),y=tt();var _;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(_||(Rt.DataType=_={}));function d(S){const C=v(S.type);if(C.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!C.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&C.push("null")}return C}Rt.getSchemaTypes=d;function v(S){const C=Array.isArray(S)?S:S?[S]:[];if(C.every(o.isJSONType))return C;throw new Error("type must be JSONType or JSONType[]: "+C.join(","))}Rt.getJSONTypes=v;function i(S,C){const{gen:L,data:T,opts:R}=S,A=p(C,R.coerceTypes),I=C.length>0&&!(A.length===0&&C.length===1&&(0,a.schemaHasRulesForType)(S,C[0]));if(I){const D=E(C,T,R.strictNumbers,_.Wrong);L.if(D,()=>{A.length?g(S,C,A):j(S)})}return I}Rt.coerceAndCheckDataType=i;const f=new Set(["string","number","integer","boolean","null"]);function p(S,C){return C?S.filter(L=>f.has(L)||C==="array"&&L==="array"):[]}function g(S,C,L){const{gen:T,data:R,opts:A}=S,I=T.let("dataType",(0,m._)`typeof ${R}`),D=T.let("coerced",(0,m._)`undefined`);A.coerceTypes==="array"&&T.if((0,m._)`${I} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>T.assign(R,(0,m._)`${R}[0]`).assign(I,(0,m._)`typeof ${R}`).if(E(C,R,A.strictNumbers),()=>T.assign(D,R))),T.if((0,m._)`${D} !== undefined`);for(const V of L)(f.has(V)||V==="array"&&A.coerceTypes==="array")&&M(V);T.else(),j(S),T.endIf(),T.if((0,m._)`${D} !== undefined`,()=>{T.assign(R,D),b(S,D)});function M(V){switch(V){case"string":T.elseIf((0,m._)`${I} == "number" || ${I} == "boolean"`).assign(D,(0,m._)`"" + ${R}`).elseIf((0,m._)`${R} === null`).assign(D,(0,m._)`""`);return;case"number":T.elseIf((0,m._)`${I} == "boolean" || ${R} === null
|
|
8
|
+
|| (${I} == "string" && ${R} && ${R} == +${R})`).assign(D,(0,m._)`+${R}`);return;case"integer":T.elseIf((0,m._)`${I} === "boolean" || ${R} === null
|
|
9
|
+
|| (${I} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(D,(0,m._)`+${R}`);return;case"boolean":T.elseIf((0,m._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(D,!1).elseIf((0,m._)`${R} === "true" || ${R} === 1`).assign(D,!0);return;case"null":T.elseIf((0,m._)`${R} === "" || ${R} === 0 || ${R} === false`),T.assign(D,null);return;case"array":T.elseIf((0,m._)`${I} === "string" || ${I} === "number"
|
|
10
|
+
|| ${I} === "boolean" || ${R} === null`).assign(D,(0,m._)`[${R}]`)}}}function b({gen:S,parentData:C,parentDataProperty:L},T){S.if((0,m._)`${C} !== undefined`,()=>S.assign((0,m._)`${C}[${L}]`,T))}function k(S,C,L,T=_.Correct){const R=T===_.Correct?m.operators.EQ:m.operators.NEQ;let A;switch(S){case"null":return(0,m._)`${C} ${R} null`;case"array":A=(0,m._)`Array.isArray(${C})`;break;case"object":A=(0,m._)`${C} && typeof ${C} == "object" && !Array.isArray(${C})`;break;case"integer":A=I((0,m._)`!(${C} % 1) && !isNaN(${C})`);break;case"number":A=I();break;default:return(0,m._)`typeof ${C} ${R} ${S}`}return T===_.Correct?A:(0,m.not)(A);function I(D=m.nil){return(0,m.and)((0,m._)`typeof ${C} == "number"`,D,L?(0,m._)`isFinite(${C})`:m.nil)}}Rt.checkDataType=k;function E(S,C,L,T){if(S.length===1)return k(S[0],C,L,T);let R;const A=(0,y.toHash)(S);if(A.array&&A.object){const I=(0,m._)`typeof ${C} != "object"`;R=A.null?I:(0,m._)`!${C} || ${I}`,delete A.null,delete A.array,delete A.object}else R=m.nil;A.number&&delete A.integer;for(const I in A)R=(0,m.and)(R,k(I,C,L,T));return R}Rt.checkDataTypes=E;const O={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:C})=>typeof S=="string"?(0,m._)`{type: ${S}}`:(0,m._)`{type: ${C}}`};function j(S){const C=x(S);(0,h.reportError)(C,O)}Rt.reportTypeError=j;function x(S){const{gen:C,data:L,schema:T}=S,R=(0,y.schemaRefOrVal)(S,T,"type");return{gen:C,keyword:"type",data:L,schema:T.type,schemaCode:R,schemaValue:R,parentSchema:T,params:{},it:S}}return Rt}var Do={},id;function vy(){if(id)return Do;id=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.assignDefaults=void 0;const o=Je(),a=tt();function h(y,_){const{properties:d,items:v}=y.schema;if(_==="object"&&d)for(const i in d)m(y,i,d[i].default);else _==="array"&&Array.isArray(v)&&v.forEach((i,f)=>m(y,f,i.default))}Do.assignDefaults=h;function m(y,_,d){const{gen:v,compositeRule:i,data:f,opts:p}=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`;p.useDefaults==="empty"&&(b=(0,o._)`${b} || ${g} === null || ${g} === ""`),v.if(b,(0,o._)`${g} = ${(0,o.stringify)(d)}`)}return Do}var yr={},ct={},od;function vr(){if(od)return ct;od=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.validateUnion=ct.validateArray=ct.usePattern=ct.callValidateCode=ct.schemaProperties=ct.allSchemaProperties=ct.noPropertyInData=ct.propertyInData=ct.isOwnProperty=ct.hasPropFunc=ct.reportMissingProp=ct.checkMissingProp=ct.checkReportMissingProp=void 0;const o=Je(),a=tt(),h=_n(),m=tt();function y(S,C){const{gen:L,data:T,it:R}=S;L.if(p(L,T,C,R.opts.ownProperties),()=>{S.setParams({missingProperty:(0,o._)`${C}`},!0),S.error()})}ct.checkReportMissingProp=y;function _({gen:S,data:C,it:{opts:L}},T,R){return(0,o.or)(...T.map(A=>(0,o.and)(p(S,C,A,L.ownProperties),(0,o._)`${R} = ${A}`)))}ct.checkMissingProp=_;function d(S,C){S.setParams({missingProperty:C},!0),S.error()}ct.reportMissingProp=d;function v(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,o._)`Object.prototype.hasOwnProperty`})}ct.hasPropFunc=v;function i(S,C,L){return(0,o._)`${v(S)}.call(${C}, ${L})`}ct.isOwnProperty=i;function f(S,C,L,T){const R=(0,o._)`${C}${(0,o.getProperty)(L)} !== undefined`;return T?(0,o._)`${R} && ${i(S,C,L)}`:R}ct.propertyInData=f;function p(S,C,L,T){const R=(0,o._)`${C}${(0,o.getProperty)(L)} === undefined`;return T?(0,o.or)(R,(0,o.not)(i(S,C,L))):R}ct.noPropertyInData=p;function g(S){return S?Object.keys(S).filter(C=>C!=="__proto__"):[]}ct.allSchemaProperties=g;function b(S,C){return g(C).filter(L=>!(0,a.alwaysValidSchema)(S,C[L]))}ct.schemaProperties=b;function k({schemaCode:S,data:C,it:{gen:L,topSchemaRef:T,schemaPath:R,errorPath:A},it:I},D,M,V){const G=V?(0,o._)`${S}, ${C}, ${T}${R}`:C,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})`}ct.callValidateCode=k;const E=(0,o._)`new RegExp`;function O({gen:S,it:{opts:C}},L){const T=C.unicodeRegExp?"u":"",{regExp:R}=C.code,A=R(L,T);return S.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,o._)`${R.code==="new RegExp"?E:(0,m.useFunc)(S,R)}(${L}, ${T})`})}ct.usePattern=O;function j(S){const{gen:C,data:L,keyword:T,it:R}=S,A=C.name("valid");if(R.allErrors){const D=C.let("valid",!0);return I(()=>C.assign(D,!1)),D}return C.var(A,!0),I(()=>C.break()),A;function I(D){const M=C.const("len",(0,o._)`${L}.length`);C.forRange("i",0,M,V=>{S.subschema({keyword:T,dataProp:V,dataPropType:a.Type.Num},A),C.if((0,o.not)(A),D)})}}ct.validateArray=j;function x(S){const{gen:C,schema:L,keyword:T,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=C.let("valid",!1),D=C.name("_valid");C.block(()=>L.forEach((M,V)=>{const G=S.subschema({keyword:T,schemaProp:V,compositeRule:!0},D);C.assign(I,(0,o._)`${I} || ${D}`),S.mergeValidEvaluated(G,D)||C.if((0,o.not)(I))})),S.result(I,()=>S.reset(),()=>S.error(!0))}return ct.validateUnion=x,ct}var ad;function by(){if(ad)return yr;ad=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.validateKeywordUsage=yr.validSchemaType=yr.funcKeywordCode=yr.macroKeywordCode=void 0;const o=Je(),a=_n(),h=vr(),m=xa();function y(b,k){const{gen:E,keyword:O,schema:j,parentSchema:x,it:S}=b,C=k.macro.call(S.self,j,x,S),L=f(E,O,C);S.opts.validateSchema!==!1&&S.self.validateSchema(C,!0);const T=E.name("valid");b.subschema({schema:C,schemaPath:o.nil,errSchemaPath:`${S.errSchemaPath}/${O}`,topSchemaRef:L,compositeRule:!0},T),b.pass(T,()=>b.error(!0))}yr.macroKeywordCode=y;function _(b,k){var E;const{gen:O,keyword:j,schema:x,parentSchema:S,$data:C,it:L}=b;i(L,k);const T=!C&&k.compile?k.compile.call(L.self,x,S,L):k.validate,R=f(O,j,T),A=O.let("valid");b.block$data(A,I),b.ok((E=k.valid)!==null&&E!==void 0?E:A);function I(){if(k.errors===!1)V(),k.modifying&&d(b),G(()=>b.error());else{const J=k.async?D():M();k.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=k.async?(0,o._)`await `:o.nil){const Y=L.opts.passContext?a.default.this:a.default.self,ce=!("compile"in k&&!C||k.schema===!1);O.assign(A,(0,o._)`${J}${(0,h.callValidateCode)(b,R,Y,ce)}`,k.modifying)}function G(J){var Y;O.if((0,o.not)((Y=k.valid)!==null&&Y!==void 0?Y:A),J)}}yr.funcKeywordCode=_;function d(b){const{gen:k,data:E,it:O}=b;k.if(O.parentData,()=>k.assign(E,(0,o._)`${O.parentData}[${O.parentDataProperty}]`))}function v(b,k){const{gen:E}=b;E.if((0,o._)`Array.isArray(${k})`,()=>{E.assign(a.default.vErrors,(0,o._)`${a.default.vErrors} === null ? ${k} : ${a.default.vErrors}.concat(${k})`).assign(a.default.errors,(0,o._)`${a.default.vErrors}.length`),(0,m.extendErrors)(b)},()=>b.error())}function i({schemaEnv:b},k){if(k.async&&!b.$async)throw new Error("async keyword in sync schema")}function f(b,k,E){if(E===void 0)throw new Error(`keyword "${k}" failed to compile`);return b.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,o.stringify)(E)})}function p(b,k,E=!1){return!k.length||k.some(O=>O==="array"?Array.isArray(b):O==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==O||E&&typeof b>"u")}yr.validSchemaType=p;function g({schema:b,opts:k,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(C=>!Object.prototype.hasOwnProperty.call(b,C)))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(k.validateSchema==="log")E.logger.error(L);else throw new Error(L)}}return yr.validateKeywordUsage=g,yr}var en={},sd;function gy(){if(sd)return en;sd=1,Object.defineProperty(en,"__esModule",{value:!0}),en.extendSubschemaMode=en.extendSubschemaData=en.getSubschema=void 0;const o=Je(),a=tt();function h(_,{keyword:d,schemaProp:v,schema:i,schemaPath:f,errSchemaPath:p,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||p===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:f,topSchemaRef:g,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}en.getSubschema=h;function m(_,d,{dataProp:v,dataPropType:i,data:f,dataTypes:p,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);k(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);k(E),g!==void 0&&(_.propertyName=g)}p&&(_.dataTypes=p);function k(E){_.data=E,_.dataLevel=d.dataLevel+1,_.dataTypes=[],d.definedProperties=new Set,_.parentData=d.data,_.dataNames=[...d.dataNames,E]}}en.extendSubschemaData=m;function y(_,{jtdDiscriminator:d,jtdMetadata:v,compositeRule:i,createErrors:f,allErrors:p}){i!==void 0&&(_.compositeRule=i),f!==void 0&&(_.createErrors=f),p!==void 0&&(_.allErrors=p),_.jtdDiscriminator=d,_.jtdMetadata=v}return en.extendSubschemaMode=y,en}var zt={},yl,ld;function cd(){return ld||(ld=1,yl=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 m,y,_;if(Array.isArray(a)){if(m=a.length,m!=h.length)return!1;for(y=m;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),m=_.length,m!==Object.keys(h).length)return!1;for(y=m;y--!==0;)if(!Object.prototype.hasOwnProperty.call(h,_[y]))return!1;for(y=m;y--!==0;){var d=_[y];if(!o(a[d],h[d]))return!1}return!0}return a!==a&&h!==h}),yl}var vl={exports:{}},ud;function _y(){if(ud)return vl.exports;ud=1;var o=vl.exports=function(m,y,_){typeof y=="function"&&(_=y,y={}),_=y.cb||_;var d=typeof _=="function"?_:_.pre||function(){},v=_.post||function(){};a(y,d,v,m,"",m)};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(m,y,_,d,v,i,f,p,g,b){if(d&&typeof d=="object"&&!Array.isArray(d)){y(d,v,i,f,p,g,b);for(var k in d){var E=d[k];if(Array.isArray(E)){if(k in o.arrayKeywords)for(var O=0;O<E.length;O++)a(m,y,_,E[O],v+"/"+k+"/"+O,i,v,k,d,O)}else if(k in o.propsKeywords){if(E&&typeof E=="object")for(var j in E)a(m,y,_,E[j],v+"/"+k+"/"+h(j),i,v,k,d,j)}else(k in o.keywords||m.allKeys&&!(k in o.skipKeywords))&&a(m,y,_,E,v+"/"+k,i,v,k,d)}_(d,v,i,f,p,g,b)}}function h(m){return m.replace(/~/g,"~0").replace(/\//g,"~1")}return vl.exports}var dd;function Ca(){if(dd)return zt;dd=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.getSchemaRefs=zt.resolveUrl=zt.normalizeId=zt._getFullPath=zt.getFullPath=zt.inlineRef=void 0;const o=tt(),a=cd(),h=_y(),m=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}zt.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++,!m.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)}zt.getFullPath=i;function f(O,j){return O.serialize(j).split("#")[0]+"#"}zt._getFullPath=f;const p=/#\/?$/;function g(O){return O?O.replace(p,""):""}zt.normalizeId=g;function b(O,j,x){return x=g(x),O.resolve(j,x)}zt.resolveUrl=b;const k=/^[a-z_][-a-z0-9._]*$/i;function E(O,j){if(typeof O=="boolean")return{};const{schemaId:x,uriResolver:S}=this.opts,C=g(O[x]||j),L={"":C},T=i(S,C,!1),R={},A=new Set;return h(O,{allKeys:!0},(M,V,G,J)=>{if(J===void 0)return;const Y=T+V;let ce=L[J];typeof M[x]=="string"&&(ce=ue.call(this,M[x])),fe.call(this,M.$anchor),fe.call(this,M.$dynamicAnchor),L[V]=ce;function ue(X){const pe=this.opts.uriResolver.resolve;if(X=g(ce?pe(ce,X):X),A.has(X))throw D(X);A.add(X);let re=this.refs[X];return typeof re=="string"&&(re=this.refs[re]),typeof re=="object"?I(M,re.schema,X):X!==g(Y)&&(X[0]==="#"?(I(M,R[X],X),R[X]=M):this.refs[X]=Y),X}function fe(X){if(typeof X=="string"){if(!k.test(X))throw new Error(`invalid anchor "${X}"`);ue.call(this,`#${X}`)}}}),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 zt.getSchemaRefs=E,zt}var hd;function Pa(){if(hd)return Qr;hd=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.getData=Qr.KeywordCxt=Qr.validateFunctionCode=void 0;const o=yy(),a=Sa(),h=rd(),m=Sa(),y=vy(),_=by(),d=gy(),v=Je(),i=_n(),f=Ca(),p=tt(),g=xa();function b(H){if(T(H)&&(A(H),L(H))){j(H);return}k(H,()=>(0,o.topBoolOrEmptySchema)(H))}Qr.validateFunctionCode=b;function k({gen:H,validateName:K,schema:te,schemaEnv:se,opts:de},Ce){de.code.es5?H.func(K,(0,v._)`${i.default.data}, ${i.default.valCxt}`,se.$async,()=>{H.code((0,v._)`"use strict"; ${S(te,de)}`),O(H,de),H.code(Ce)}):H.func(K,(0,v._)`${i.default.data}, ${E(de)}`,se.$async,()=>H.code(S(te,de)).code(Ce))}function E(H){return(0,v._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${H.dynamicRef?(0,v._)`, ${i.default.dynamicAnchors}={}`:v.nil}}={}`}function O(H,K){H.if(i.default.valCxt,()=>{H.var(i.default.instancePath,(0,v._)`${i.default.valCxt}.${i.default.instancePath}`),H.var(i.default.parentData,(0,v._)`${i.default.valCxt}.${i.default.parentData}`),H.var(i.default.parentDataProperty,(0,v._)`${i.default.valCxt}.${i.default.parentDataProperty}`),H.var(i.default.rootData,(0,v._)`${i.default.valCxt}.${i.default.rootData}`),K.dynamicRef&&H.var(i.default.dynamicAnchors,(0,v._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{H.var(i.default.instancePath,(0,v._)`""`),H.var(i.default.parentData,(0,v._)`undefined`),H.var(i.default.parentDataProperty,(0,v._)`undefined`),H.var(i.default.rootData,i.default.data),K.dynamicRef&&H.var(i.default.dynamicAnchors,(0,v._)`{}`)})}function j(H){const{schema:K,opts:te,gen:se}=H;k(H,()=>{te.$comment&&K.$comment&&J(H),M(H),se.let(i.default.vErrors,null),se.let(i.default.errors,0),te.unevaluated&&x(H),I(H),Y(H)})}function x(H){const{gen:K,validateName:te}=H;H.evaluated=K.const("evaluated",(0,v._)`${te}.evaluated`),K.if((0,v._)`${H.evaluated}.dynamicProps`,()=>K.assign((0,v._)`${H.evaluated}.props`,(0,v._)`undefined`)),K.if((0,v._)`${H.evaluated}.dynamicItems`,()=>K.assign((0,v._)`${H.evaluated}.items`,(0,v._)`undefined`))}function S(H,K){const te=typeof H=="object"&&H[K.schemaId];return te&&(K.code.source||K.code.process)?(0,v._)`/*# sourceURL=${te} */`:v.nil}function C(H,K){if(T(H)&&(A(H),L(H))){R(H,K);return}(0,o.boolOrEmptySchema)(H,K)}function L({schema:H,self:K}){if(typeof H=="boolean")return!H;for(const te in H)if(K.RULES.all[te])return!0;return!1}function T(H){return typeof H.schema!="boolean"}function R(H,K){const{schema:te,gen:se,opts:de}=H;de.$comment&&te.$comment&&J(H),V(H),G(H);const Ce=se.const("_errs",i.default.errors);I(H,Ce),se.var(K,(0,v._)`${Ce} === ${i.default.errors}`)}function A(H){(0,p.checkUnknownRules)(H),D(H)}function I(H,K){if(H.opts.jtd)return ue(H,[],!1,K);const te=(0,a.getSchemaTypes)(H.schema),se=(0,a.coerceAndCheckDataType)(H,te);ue(H,te,!se,K)}function D(H){const{schema:K,errSchemaPath:te,opts:se,self:de}=H;K.$ref&&se.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(K,de.RULES)&&de.logger.warn(`$ref: keywords ignored in schema at path "${te}"`)}function M(H){const{schema:K,opts:te}=H;K.default!==void 0&&te.useDefaults&&te.strictSchema&&(0,p.checkStrictMode)(H,"default is ignored in the schema root")}function V(H){const K=H.schema[H.opts.schemaId];K&&(H.baseId=(0,f.resolveUrl)(H.opts.uriResolver,H.baseId,K))}function G(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:H,schemaEnv:K,schema:te,errSchemaPath:se,opts:de}){const Ce=te.$comment;if(de.$comment===!0)H.code((0,v._)`${i.default.self}.logger.log(${Ce})`);else if(typeof de.$comment=="function"){const Ae=(0,v.str)`${se}/$comment`,Fe=H.scopeValue("root",{ref:K.root});H.code((0,v._)`${i.default.self}.opts.$comment(${Ce}, ${Ae}, ${Fe}.schema)`)}}function Y(H){const{gen:K,schemaEnv:te,validateName:se,ValidationError:de,opts:Ce}=H;te.$async?K.if((0,v._)`${i.default.errors} === 0`,()=>K.return(i.default.data),()=>K.throw((0,v._)`new ${de}(${i.default.vErrors})`)):(K.assign((0,v._)`${se}.errors`,i.default.vErrors),Ce.unevaluated&&ce(H),K.return((0,v._)`${i.default.errors} === 0`))}function ce({gen:H,evaluated:K,props:te,items:se}){te instanceof v.Name&&H.assign((0,v._)`${K}.props`,te),se instanceof v.Name&&H.assign((0,v._)`${K}.items`,se)}function ue(H,K,te,se){const{gen:de,schema:Ce,data:Ae,allErrors:Fe,opts:Ue,self:Ke}=H,{RULES:et}=Ke;if(Ce.$ref&&(Ue.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(Ce,et))){de.block(()=>ke(H,"$ref",et.all.$ref.definition));return}Ue.jtd||X(H,K),de.block(()=>{for(const We of et.rules)nt(We);nt(et.post)});function nt(We){(0,h.shouldUseGroup)(Ce,We)&&(We.type?(de.if((0,m.checkDataType)(We.type,Ae,Ue.strictNumbers)),fe(H,We),K.length===1&&K[0]===We.type&&te&&(de.else(),(0,m.reportTypeError)(H)),de.endIf()):fe(H,We),Fe||de.if((0,v._)`${i.default.errors} === ${se||0}`))}}function fe(H,K){const{gen:te,schema:se,opts:{useDefaults:de}}=H;de&&(0,y.assignDefaults)(H,K.type),te.block(()=>{for(const Ce of K.rules)(0,h.shouldUseRule)(se,Ce)&&ke(H,Ce.keyword,Ce.definition,K.type)})}function X(H,K){H.schemaEnv.meta||!H.opts.strictTypes||(pe(H,K),H.opts.allowUnionTypes||re(H,K),U(H,H.dataTypes))}function pe(H,K){if(K.length){if(!H.dataTypes.length){H.dataTypes=K;return}K.forEach(te=>{q(H.dataTypes,te)||F(H,`type "${te}" not allowed by context "${H.dataTypes.join(",")}"`)}),N(H,K)}}function re(H,K){K.length>1&&!(K.length===2&&K.includes("null"))&&F(H,"use allowUnionTypes to allow union type keyword")}function U(H,K){const te=H.self.RULES.all;for(const se in te){const de=te[se];if(typeof de=="object"&&(0,h.shouldUseRule)(H.schema,de)){const{type:Ce}=de.definition;Ce.length&&!Ce.some(Ae=>ne(K,Ae))&&F(H,`missing type "${Ce.join(",")}" for keyword "${se}"`)}}}function ne(H,K){return H.includes(K)||K==="number"&&H.includes("integer")}function q(H,K){return H.includes(K)||K==="integer"&&H.includes("number")}function N(H,K){const te=[];for(const se of H.dataTypes)q(K,se)?te.push(se):K.includes("integer")&&se==="number"&&te.push("integer");H.dataTypes=te}function F(H,K){const te=H.schemaEnv.baseId+H.errSchemaPath;K+=` at "${te}" (strictTypes)`,(0,p.checkStrictMode)(H,K,H.opts.strictTypes)}class ie{constructor(K,te,se){if((0,_.validateKeywordUsage)(K,te,se),this.gen=K.gen,this.allErrors=K.allErrors,this.keyword=se,this.data=K.data,this.schema=K.schema[se],this.$data=te.$data&&K.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(K,this.schema,se,this.$data),this.schemaType=te.schemaType,this.parentSchema=K.schema,this.params={},this.it=K,this.def=te,this.$data)this.schemaCode=K.gen.const("vSchema",ye(this.$data,K));else if(this.schemaCode=this.schemaValue,!(0,_.validSchemaType)(this.schema,te.schemaType,te.allowUndefined))throw new Error(`${se} value must be ${JSON.stringify(te.schemaType)}`);("code"in te?te.trackErrors:te.errors!==!1)&&(this.errsCount=K.gen.const("_errs",i.default.errors))}result(K,te,se){this.failResult((0,v.not)(K),te,se)}failResult(K,te,se){this.gen.if(K),se?se():this.error(),te?(this.gen.else(),te(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(K,te){this.failResult((0,v.not)(K),void 0,te)}fail(K){if(K===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(K),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(K){if(!this.$data)return this.fail(K);const{schemaCode:te}=this;this.fail((0,v._)`${te} !== undefined && (${(0,v.or)(this.invalid$data(),K)})`)}error(K,te,se){if(te){this.setParams(te),this._error(K,se),this.setParams({});return}this._error(K,se)}_error(K,te){(K?g.reportExtraError:g.reportError)(this,this.def.error,te)}$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(K){this.allErrors||this.gen.if(K)}setParams(K,te){te?Object.assign(this.params,K):this.params=K}block$data(K,te,se=v.nil){this.gen.block(()=>{this.check$data(K,se),te()})}check$data(K=v.nil,te=v.nil){if(!this.$data)return;const{gen:se,schemaCode:de,schemaType:Ce,def:Ae}=this;se.if((0,v.or)((0,v._)`${de} === undefined`,te)),K!==v.nil&&se.assign(K,!0),(Ce.length||Ae.validateSchema)&&(se.elseIf(this.invalid$data()),this.$dataError(),K!==v.nil&&se.assign(K,!1)),se.else()}invalid$data(){const{gen:K,schemaCode:te,schemaType:se,def:de,it:Ce}=this;return(0,v.or)(Ae(),Fe());function Ae(){if(se.length){if(!(te instanceof v.Name))throw new Error("ajv implementation error");const Ue=Array.isArray(se)?se:[se];return(0,v._)`${(0,m.checkDataTypes)(Ue,te,Ce.opts.strictNumbers,m.DataType.Wrong)}`}return v.nil}function Fe(){if(de.validateSchema){const Ue=K.scopeValue("validate$data",{ref:de.validateSchema});return(0,v._)`!${Ue}(${te})`}return v.nil}}subschema(K,te){const se=(0,d.getSubschema)(this.it,K);(0,d.extendSubschemaData)(se,this.it,K),(0,d.extendSubschemaMode)(se,K);const de={...this.it,...se,items:void 0,props:void 0};return C(de,te),de}mergeEvaluated(K,te){const{it:se,gen:de}=this;se.opts.unevaluated&&(se.props!==!0&&K.props!==void 0&&(se.props=p.mergeEvaluated.props(de,K.props,se.props,te)),se.items!==!0&&K.items!==void 0&&(se.items=p.mergeEvaluated.items(de,K.items,se.items,te)))}mergeValidEvaluated(K,te){const{it:se,gen:de}=this;if(se.opts.unevaluated&&(se.props!==!0||se.items!==!0))return de.if(te,()=>this.mergeEvaluated(K,v.Name)),!0}}Qr.KeywordCxt=ie;function ke(H,K,te,se){const de=new ie(H,te,K);"code"in te?te.code(de,se):de.$data&&te.validate?(0,_.funcKeywordCode)(de,te):"macro"in te?(0,_.macroKeywordCode)(de,te):(te.compile||te.validate)&&(0,_.funcKeywordCode)(de,te)}const _e=/^\/(?:[^~]|~0|~1)*$/,Oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(H,{dataLevel:K,dataNames:te,dataPathArr:se}){let de,Ce;if(H==="")return i.default.rootData;if(H[0]==="/"){if(!_e.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);de=H,Ce=i.default.rootData}else{const Ke=Oe.exec(H);if(!Ke)throw new Error(`Invalid JSON-pointer: ${H}`);const et=+Ke[1];if(de=Ke[2],de==="#"){if(et>=K)throw new Error(Ue("property/index",et));return se[K-et]}if(et>K)throw new Error(Ue("data",et));if(Ce=te[K-et],!de)return Ce}let Ae=Ce;const Fe=de.split("/");for(const Ke of Fe)Ke&&(Ce=(0,v._)`${Ce}${(0,v.getProperty)((0,p.unescapeJsonPointer)(Ke))}`,Ae=(0,v._)`${Ae} && ${Ce}`);return Ae;function Ue(Ke,et){return`Cannot access ${Ke} ${et} levels up, current level is ${K}`}}return Qr.getData=ye,Qr}var Ta={},fd;function bl(){if(fd)return Ta;fd=1,Object.defineProperty(Ta,"__esModule",{value:!0});class o extends Error{constructor(h){super("validation failed"),this.errors=h,this.ajv=this.validation=!0}}return Ta.default=o,Ta}var Ra={},pd;function La(){if(pd)return Ra;pd=1,Object.defineProperty(Ra,"__esModule",{value:!0});const o=Ca();class a extends Error{constructor(m,y,_,d){super(d||`can't resolve reference ${_} from id ${y}`),this.missingRef=(0,o.resolveUrl)(m,y,_),this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(m,this.missingRef))}}return Ra.default=a,Ra}var nr={},md;function gl(){if(md)return nr;md=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.resolveSchema=nr.getCompilingSchema=nr.resolveRef=nr.compileSchema=nr.SchemaEnv=void 0;const o=Je(),a=bl(),h=_n(),m=Ca(),y=tt(),_=Pa();class d{constructor(x){var S;this.refs={},this.dynamicAnchors={};let C;typeof x.schema=="object"&&(C=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,m.normalizeId)(C?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=C?.$async,this.refs={}}}nr.SchemaEnv=d;function v(j){const x=p.call(this,j);if(x)return x;const S=(0,m.getFullPath)(this.opts.uriResolver,j.root.baseId),{es5:C,lines:L}=this.opts.code,{ownProperties:T}=this.opts,R=new o.CodeGen(this.scope,{es5:C,lines:L,ownProperties:T});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:ce}=D;J.evaluated={props:Y instanceof o.Name?void 0:Y,items:ce instanceof o.Name?void 0:ce,dynamicProps:Y instanceof o.Name,dynamicItems:ce 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)}}nr.compileSchema=v;function i(j,x,S){var C;S=(0,m.resolveUrl)(this.opts.uriResolver,x,S);const L=j.refs[S];if(L)return L;let T=b.call(this,j,S);if(T===void 0){const R=(C=j.localRefs)===null||C===void 0?void 0:C[S],{schemaId:A}=this.opts;R&&(T=new d({schema:R,schemaId:A,root:j,baseId:x}))}if(T!==void 0)return j.refs[S]=f.call(this,T)}nr.resolveRef=i;function f(j){return(0,m.inlineRef)(j.schema,this.opts.inlineRefs)?j.schema:j.validate?j:v.call(this,j)}function p(j){for(const x of this._compilations)if(g(x,j))return x}nr.getCompilingSchema=p;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]||k.call(this,j,x)}function k(j,x){const S=this.opts.uriResolver.parse(x),C=(0,m._getFullPath)(this.opts.uriResolver,S);let L=(0,m.getFullPath)(this.opts.uriResolver,j.baseId,void 0);if(Object.keys(j.schema).length>0&&C===L)return O.call(this,S,j);const T=(0,m.normalizeId)(C),R=this.refs[T]||this.schemas[T];if(typeof R=="string"){const A=k.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),T===(0,m.normalizeId)(x)){const{schema:A}=R,{schemaId:I}=this.opts,D=A[I];return D&&(L=(0,m.resolveUrl)(this.opts.uriResolver,L,D)),new d({schema:A,schemaId:I,root:j,baseId:L})}return O.call(this,S,R)}}nr.resolveSchema=k;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function O(j,{baseId:x,schema:S,root:C}){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,m.resolveUrl)(this.opts.uriResolver,x,D))}let T;if(typeof S!="boolean"&&S.$ref&&!(0,y.schemaHasRulesButRef)(S,this.RULES)){const A=(0,m.resolveUrl)(this.opts.uriResolver,x,S.$ref);T=k.call(this,C,A)}const{schemaId:R}=this.opts;if(T=T||new d({schema:S,schemaId:R,root:C,baseId:x}),T.schema!==T.root.schema)return T}return nr}const wy={$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 Aa={},Bo={exports:{}},_l,yd;function vd(){if(yd)return _l;yd=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 k="",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"";k+=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"";k+=b[O]}return k}const m=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(b){return b.length=0,!0}function _(b,k,E){if(b.length){const O=h(b);if(O!=="")k.push(O);else return E.error=!0,!1;b.length=0}return!0}function d(b){let k=0;const E={error:!1,address:"",zone:""},O=[],j=[];let x=!1,S=!1,C=_;for(let L=0;L<b.length;L++){const T=b[L];if(!(T==="["||T==="]"))if(T===":"){if(x===!0&&(S=!0),!C(j,O,E))break;if(++k>7){E.error=!0;break}L>0&&b[L-1]===":"&&(x=!0),O.push(":");continue}else if(T==="%"){if(!C(j,O,E))break;C=y}else{j.push(T);continue}}return j.length&&(C===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 k=d(b);if(k.error)return{host:b,isIPV6:!1};{let E=k.address,O=k.address;return k.zone&&(E+="%"+k.zone,O+="%25"+k.zone),{host:E,isIPV6:!0,escapedHost:O}}}function i(b,k){let E=0;for(let O=0;O<b.length;O++)b[O]===k&&E++;return E}function f(b){let k=b;const E=[];let O=-1,j=0;for(;j=k.length;){if(j===1){if(k===".")break;if(k==="/"){E.push("/");break}else{E.push(k);break}}else if(j===2){if(k[0]==="."){if(k[1]===".")break;if(k[1]==="/"){k=k.slice(2);continue}}else if(k[0]==="/"&&(k[1]==="."||k[1]==="/")){E.push("/");break}}else if(j===3&&k==="/.."){E.length!==0&&E.pop(),E.push("/");break}if(k[0]==="."){if(k[1]==="."){if(k[2]==="/"){k=k.slice(3);continue}}else if(k[1]==="/"){k=k.slice(2);continue}}else if(k[0]==="/"&&k[1]==="."){if(k[2]==="/"){k=k.slice(2);continue}else if(k[2]==="."&&k[3]==="/"){k=k.slice(3),E.length!==0&&E.pop();continue}}if((O=k.indexOf("/",1))===-1){E.push(k);break}else E.push(k.slice(0,O)),k=k.slice(O)}return E.join("")}function p(b,k){const E=k!==!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 k=[];if(b.userinfo!==void 0&&(k.push(b.userinfo),k.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}k.push(E)}return(typeof b.port=="number"||typeof b.port=="string")&&(k.push(":"),k.push(String(b.port))),k.length?k.join(""):void 0}return _l={nonSimpleDomain:m,recomposeAuthority:g,normalizeComponentEncoding:p,removeDotSegments:f,isIPv4:a,isUUID:o,normalizeIPv6:v,stringArrayToHexStripped:h},_l}var wl,bd;function ky(){if(bd)return wl;bd=1;const{isUUID:o}=vd(),a=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,h=["http","https","ws","wss","urn","urn:uuid"];function m(T){return h.indexOf(T)!==-1}function y(T){return T.secure===!0?!0:T.secure===!1?!1:T.scheme?T.scheme.length===3&&(T.scheme[0]==="w"||T.scheme[0]==="W")&&(T.scheme[1]==="s"||T.scheme[1]==="S")&&(T.scheme[2]==="s"||T.scheme[2]==="S"):!1}function _(T){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T}function d(T){const R=String(T.scheme).toLowerCase()==="https";return(T.port===(R?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}function v(T){return T.secure=y(T),T.resourceName=(T.path||"/")+(T.query?"?"+T.query:""),T.path=void 0,T.query=void 0,T}function i(T){if((T.port===(y(T)?443:80)||T.port==="")&&(T.port=void 0),typeof T.secure=="boolean"&&(T.scheme=T.secure?"wss":"ws",T.secure=void 0),T.resourceName){const[R,A]=T.resourceName.split("?");T.path=R&&R!=="/"?R:void 0,T.query=A,T.resourceName=void 0}return T.fragment=void 0,T}function f(T,R){if(!T.path)return T.error="URN can not be parsed",T;const A=T.path.match(a);if(A){const I=R.scheme||T.scheme||"urn";T.nid=A[1].toLowerCase(),T.nss=A[2];const D=`${I}:${R.nid||T.nid}`,M=L(D);T.path=void 0,M&&(T=M.parse(T,R))}else T.error=T.error||"URN can not be parsed.";return T}function p(T,R){if(T.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=R.scheme||T.scheme||"urn",I=T.nid.toLowerCase(),D=`${A}:${R.nid||I}`,M=L(D);M&&(T=M.serialize(T,R));const V=T,G=T.nss;return V.path=`${I||R.nid}:${G}`,R.skipEscape=!0,V}function g(T,R){const A=T;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(T){const R=T;return R.nss=(T.uuid||"").toLowerCase(),R}const k={scheme:"http",domainHost:!0,parse:_,serialize:d},E={scheme:"https",domainHost:k.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},C={http:k,https:E,ws:O,wss:j,urn:{scheme:"urn",parse:f,serialize:p,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:b,skipNormalize:!0}};Object.setPrototypeOf(C,null);function L(T){return T&&(C[T]||C[T.toLowerCase()])||void 0}return wl={wsIsSecure:y,SCHEMES:C,isValidSchemeName:m,getSchemeHandler:L},wl}var gd;function jy(){if(gd)return Bo.exports;gd=1;const{normalizeIPv6:o,removeDotSegments:a,recomposeAuthority:h,normalizeComponentEncoding:m,isIPv4:y,nonSimpleDomain:_}=vd(),{SCHEMES:d,getSchemeHandler:v}=ky();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 C=S?Object.assign({scheme:"null"},S):{scheme:"null"},L=p(E(j,C),E(x,C),C,!0);return C.skipEscape=!0,b(L,C)}function p(j,x,S,C){const L={};return C||(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(m(E(j,S),!0),{...S,skipEscape:!0})):typeof j=="object"&&(j=b(m(j,!0),{...S,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=b(m(E(x,S),!0),{...S,skipEscape:!0})):typeof x=="object"&&(x=b(m(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:""},C=Object.assign({},x),L=[],T=v(C.scheme||S.scheme);T&&T.serialize&&T.serialize(S,C),S.path!==void 0&&(C.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),C.reference!=="suffix"&&S.scheme&&L.push(S.scheme,":");const R=h(S);if(R!==void 0&&(C.reference!=="suffix"&&L.push("//"),L.push(R),S.path&&S.path[0]!=="/"&&L.push("/")),S.path!==void 0){let A=S.path;!C.absolutePath&&(!T||!T.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 k=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function E(j,x){const S=Object.assign({},x),C={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 T=j.match(k);if(T){if(C.scheme=T[1],C.userinfo=T[3],C.host=T[4],C.port=parseInt(T[5],10),C.path=T[6]||"",C.query=T[7],C.fragment=T[8],isNaN(C.port)&&(C.port=T[5]),C.host)if(y(C.host)===!1){const I=o(C.host);C.host=I.host.toLowerCase(),L=I.isIPV6}else L=!0;C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&C.query===void 0&&!C.path?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==C.reference&&(C.error=C.error||"URI is not a "+S.reference+" reference.");const R=v(S.scheme||C.scheme);if(!S.unicodeSupport&&(!R||!R.unicodeSupport)&&C.host&&(S.domainHost||R&&R.domainHost)&&L===!1&&_(C.host))try{C.host=URL.domainToASCII(C.host.toLowerCase())}catch(A){C.error=C.error||"Host's domain name can not be converted to ASCII: "+A}(!R||R&&!R.skipNormalize)&&(j.indexOf("%")!==-1&&(C.scheme!==void 0&&(C.scheme=unescape(C.scheme)),C.host!==void 0&&(C.host=unescape(C.host))),C.path&&(C.path=escape(unescape(C.path))),C.fragment&&(C.fragment=encodeURI(decodeURIComponent(C.fragment)))),R&&R.parse&&R.parse(C,S)}else C.error=C.error||"URI can not be parsed.";return C}const O={SCHEMES:d,normalize:i,resolve:f,resolveComponent:p,equal:g,serialize:b,parse:E};return Bo.exports=O,Bo.exports.default=O,Bo.exports.fastUri=O,Bo.exports}var _d;function Ey(){if(_d)return Aa;_d=1,Object.defineProperty(Aa,"__esModule",{value:!0});const o=jy();return o.code='require("ajv/dist/runtime/uri").default',Aa.default=o,Aa}var wd;function Oy(){return wd||(wd=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=Pa();Object.defineProperty(o,"KeywordCxt",{enumerable:!0,get:function(){return a.KeywordCxt}});var h=Je();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 m=bl(),y=La(),_=ed(),d=gl(),v=Je(),i=Ca(),f=Sa(),p=tt(),g=wy,b=Ey(),k=(re,U)=>new RegExp(re,U);k.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 C(re){var U,ne,q,N,F,ie,ke,_e,Oe,ye,H,K,te,se,de,Ce,Ae,Fe,Ue,Ke,et,nt,We,dt,ge;const ve=re.strict,we=(U=re.code)===null||U===void 0?void 0:U.optimize,Re=we===!0||we===void 0?1:we||0,Ne=(q=(ne=re.code)===null||ne===void 0?void 0:ne.regExp)!==null&&q!==void 0?q:k,it=(N=re.uriResolver)!==null&&N!==void 0?N:b.default;return{strictSchema:(ie=(F=re.strictSchema)!==null&&F!==void 0?F:ve)!==null&&ie!==void 0?ie:!0,strictNumbers:(_e=(ke=re.strictNumbers)!==null&&ke!==void 0?ke:ve)!==null&&_e!==void 0?_e:!0,strictTypes:(ye=(Oe=re.strictTypes)!==null&&Oe!==void 0?Oe:ve)!==null&&ye!==void 0?ye:"log",strictTuples:(K=(H=re.strictTuples)!==null&&H!==void 0?H:ve)!==null&&K!==void 0?K:"log",strictRequired:(se=(te=re.strictRequired)!==null&&te!==void 0?te:ve)!==null&&se!==void 0?se:!1,code:re.code?{...re.code,optimize:Re,regExp:Ne}:{optimize:Re,regExp:Ne},loopRequired:(de=re.loopRequired)!==null&&de!==void 0?de:S,loopEnum:(Ce=re.loopEnum)!==null&&Ce!==void 0?Ce:S,meta:(Ae=re.meta)!==null&&Ae!==void 0?Ae:!0,messages:(Fe=re.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ue=re.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(Ke=re.schemaId)!==null&&Ke!==void 0?Ke:"$id",addUsedSchema:(et=re.addUsedSchema)!==null&&et!==void 0?et:!0,validateSchema:(nt=re.validateSchema)!==null&&nt!==void 0?nt:!0,validateFormats:(We=re.validateFormats)!==null&&We!==void 0?We:!0,unicodeRegExp:(dt=re.unicodeRegExp)!==null&&dt!==void 0?dt:!0,int32range:(ge=re.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:it}}class L{constructor(U={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,U=this.opts={...U,...C(U)};const{es5:ne,lines:q}=this.opts.code;this.scope=new v.ValueScope({scope:{},prefixes:O,es5:ne,lines:q}),this.logger=G(U.logger);const N=U.validateFormats;U.validateFormats=!1,this.RULES=(0,_.getRules)(),T.call(this,j,U,"NOT SUPPORTED"),T.call(this,x,U,"DEPRECATED","warn"),this._metaOpts=M.call(this),U.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),U.keywords&&D.call(this,U.keywords),typeof U.meta=="object"&&this.addMetaSchema(U.meta),A.call(this),U.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:U,meta:ne,schemaId:q}=this.opts;let N=g;q==="id"&&(N={...g},N.id=N.$id,delete N.$id),ne&&U&&this.addMetaSchema(N,N[q],!1)}defaultMeta(){const{meta:U,schemaId:ne}=this.opts;return this.opts.defaultMeta=typeof U=="object"?U[ne]||U:void 0}validate(U,ne){let q;if(typeof U=="string"){if(q=this.getSchema(U),!q)throw new Error(`no schema with key or ref "${U}"`)}else q=this.compile(U);const N=q(ne);return"$async"in q||(this.errors=q.errors),N}compile(U,ne){const q=this._addSchema(U,ne);return q.validate||this._compileSchemaEnv(q)}compileAsync(U,ne){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:q}=this.opts;return N.call(this,U,ne);async function N(ye,H){await F.call(this,ye.$schema);const K=this._addSchema(ye,H);return K.validate||ie.call(this,K)}async function F(ye){ye&&!this.getSchema(ye)&&await N.call(this,{$ref:ye},!0)}async function ie(ye){try{return this._compileSchemaEnv(ye)}catch(H){if(!(H instanceof y.default))throw H;return ke.call(this,H),await _e.call(this,H.missingSchema),ie.call(this,ye)}}function ke({missingSchema:ye,missingRef:H}){if(this.refs[ye])throw new Error(`AnySchema ${ye} is loaded but ${H} cannot be resolved`)}async function _e(ye){const H=await Oe.call(this,ye);this.refs[ye]||await F.call(this,H.$schema),this.refs[ye]||this.addSchema(H,ye,ne)}async function Oe(ye){const H=this._loading[ye];if(H)return H;try{return await(this._loading[ye]=q(ye))}finally{delete this._loading[ye]}}}addSchema(U,ne,q,N=this.opts.validateSchema){if(Array.isArray(U)){for(const ie of U)this.addSchema(ie,void 0,q,N);return this}let F;if(typeof U=="object"){const{schemaId:ie}=this.opts;if(F=U[ie],F!==void 0&&typeof F!="string")throw new Error(`schema ${ie} must be string`)}return ne=(0,i.normalizeId)(ne||F),this._checkUnique(ne),this.schemas[ne]=this._addSchema(U,q,ne,N,!0),this}addMetaSchema(U,ne,q=this.opts.validateSchema){return this.addSchema(U,ne,!0,q),this}validateSchema(U,ne){if(typeof U=="boolean")return!0;let q;if(q=U.$schema,q!==void 0&&typeof q!="string")throw new Error("$schema must be a string");if(q=q||this.opts.defaultMeta||this.defaultMeta(),!q)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(q,U);if(!N&&ne){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return N}getSchema(U){let ne;for(;typeof(ne=R.call(this,U))=="string";)U=ne;if(ne===void 0){const{schemaId:q}=this.opts,N=new d.SchemaEnv({schema:{},schemaId:q});if(ne=d.resolveSchema.call(this,N,U),!ne)return;this.refs[U]=ne}return ne.validate||this._compileSchemaEnv(ne)}removeSchema(U){if(U instanceof RegExp)return this._removeAllSchemas(this.schemas,U),this._removeAllSchemas(this.refs,U),this;switch(typeof U){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ne=R.call(this,U);return typeof ne=="object"&&this._cache.delete(ne.schema),delete this.schemas[U],delete this.refs[U],this}case"object":{const ne=U;this._cache.delete(ne);let q=U[this.opts.schemaId];return q&&(q=(0,i.normalizeId)(q),delete this.schemas[q],delete this.refs[q]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(U){for(const ne of U)this.addKeyword(ne);return this}addKeyword(U,ne){let q;if(typeof U=="string")q=U,typeof ne=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ne.keyword=q);else if(typeof U=="object"&&ne===void 0){if(ne=U,q=ne.keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,q,ne),!ne)return(0,p.eachItem)(q,F=>ce.call(this,F)),this;fe.call(this,ne);const N={...ne,type:(0,f.getJSONTypes)(ne.type),schemaType:(0,f.getJSONTypes)(ne.schemaType)};return(0,p.eachItem)(q,N.type.length===0?F=>ce.call(this,F,N):F=>N.type.forEach(ie=>ce.call(this,F,N,ie))),this}getKeyword(U){const ne=this.RULES.all[U];return typeof ne=="object"?ne.definition:!!ne}removeKeyword(U){const{RULES:ne}=this;delete ne.keywords[U],delete ne.all[U];for(const q of ne.rules){const N=q.rules.findIndex(F=>F.keyword===U);N>=0&&q.rules.splice(N,1)}return this}addFormat(U,ne){return typeof ne=="string"&&(ne=new RegExp(ne)),this.formats[U]=ne,this}errorsText(U=this.errors,{separator:ne=", ",dataVar:q="data"}={}){return!U||U.length===0?"No errors":U.map(N=>`${q}${N.instancePath} ${N.message}`).reduce((N,F)=>N+ne+F)}$dataMetaSchema(U,ne){const q=this.RULES.all;U=JSON.parse(JSON.stringify(U));for(const N of ne){const F=N.split("/").slice(1);let ie=U;for(const ke of F)ie=ie[ke];for(const ke in q){const _e=q[ke];if(typeof _e!="object")continue;const{$data:Oe}=_e.definition,ye=ie[ke];Oe&&ye&&(ie[ke]=pe(ye))}}return U}_removeAllSchemas(U,ne){for(const q in U){const N=U[q];(!ne||ne.test(q))&&(typeof N=="string"?delete U[q]:N&&!N.meta&&(this._cache.delete(N.schema),delete U[q]))}}_addSchema(U,ne,q,N=this.opts.validateSchema,F=this.opts.addUsedSchema){let ie;const{schemaId:ke}=this.opts;if(typeof U=="object")ie=U[ke];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof U!="boolean")throw new Error("schema must be object or boolean")}let _e=this._cache.get(U);if(_e!==void 0)return _e;q=(0,i.normalizeId)(ie||q);const Oe=i.getSchemaRefs.call(this,U,q);return _e=new d.SchemaEnv({schema:U,schemaId:ke,meta:ne,baseId:q,localRefs:Oe}),this._cache.set(_e.schema,_e),F&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=_e),N&&this.validateSchema(U,!0),_e}_checkUnique(U){if(this.schemas[U]||this.refs[U])throw new Error(`schema with key or id "${U}" already exists`)}_compileSchemaEnv(U){if(U.meta?this._compileMetaSchema(U):d.compileSchema.call(this,U),!U.validate)throw new Error("ajv implementation error");return U.validate}_compileMetaSchema(U){const ne=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,U)}finally{this.opts=ne}}}L.ValidationError=m.default,L.MissingRefError=y.default,o.default=L;function T(re,U,ne,q="error"){for(const N in re){const F=N;F in U&&this.logger[q](`${ne}: option ${N}. ${re[F]}`)}}function R(re){return re=(0,i.normalizeId)(re),this.schemas[re]||this.refs[re]}function A(){const re=this.opts.schemas;if(re)if(Array.isArray(re))this.addSchema(re);else for(const U in re)this.addSchema(re[U],U)}function I(){for(const re in this.opts.formats){const U=this.opts.formats[re];U&&this.addFormat(re,U)}}function D(re){if(Array.isArray(re)){this.addVocabulary(re);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const U in re){const ne=re[U];ne.keyword||(ne.keyword=U),this.addKeyword(ne)}}function M(){const re={...this.opts};for(const U of E)delete re[U];return re}const V={log(){},warn(){},error(){}};function G(re){if(re===!1)return V;if(re===void 0)return console;if(re.log&&re.warn&&re.error)return re;throw new Error("logger must implement log, warn and error methods")}const J=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(re,U){const{RULES:ne}=this;if((0,p.eachItem)(re,q=>{if(ne.keywords[q])throw new Error(`Keyword ${q} is already defined`);if(!J.test(q))throw new Error(`Keyword ${q} has invalid name`)}),!!U&&U.$data&&!("code"in U||"validate"in U))throw new Error('$data keyword must have "code" or "validate" function')}function ce(re,U,ne){var q;const N=U?.post;if(ne&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let ie=N?F.post:F.rules.find(({type:_e})=>_e===ne);if(ie||(ie={type:ne,rules:[]},F.rules.push(ie)),F.keywords[re]=!0,!U)return;const ke={keyword:re,definition:{...U,type:(0,f.getJSONTypes)(U.type),schemaType:(0,f.getJSONTypes)(U.schemaType)}};U.before?ue.call(this,ie,ke,U.before):ie.rules.push(ke),F.all[re]=ke,(q=U.implements)===null||q===void 0||q.forEach(_e=>this.addKeyword(_e))}function ue(re,U,ne){const q=re.rules.findIndex(N=>N.keyword===ne);q>=0?re.rules.splice(q,0,U):(re.rules.push(U),this.logger.warn(`rule ${ne} is not defined`))}function fe(re){let{metaSchema:U}=re;U!==void 0&&(re.$data&&this.opts.$data&&(U=pe(U)),re.validateSchema=this.compile(U,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(re){return{anyOf:[re,X]}}})(dl)),dl}var $a={},Ia={},Na={},kd;function xy(){if(kd)return Na;kd=1,Object.defineProperty(Na,"__esModule",{value:!0});const o={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Na.default=o,Na}var wn={},jd;function Sy(){if(jd)return wn;jd=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.callRef=wn.getValidate=void 0;const o=La(),a=vr(),h=Je(),m=_n(),y=gl(),_=tt(),d={keyword:"$ref",schemaType:"string",code(f){const{gen:p,schema:g,it:b}=f,{baseId:k,schemaEnv:E,validateName:O,opts:j,self:x}=b,{root:S}=E;if((g==="#"||g==="#/")&&k===S.baseId)return L();const C=y.resolveRef.call(x,S,k,g);if(C===void 0)throw new o.default(b.opts.uriResolver,k,g);if(C instanceof y.SchemaEnv)return T(C);return R(C);function L(){if(E===S)return i(f,O,E,E.$async);const A=p.scopeValue("root",{ref:S});return i(f,(0,h._)`${A}.validate`,S,S.$async)}function T(A){const I=v(f,A);i(f,I,A,A.$async)}function R(A){const I=p.scopeValue("schema",j.code.source===!0?{ref:A,code:(0,h.stringify)(A)}:{ref:A}),D=p.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,p){const{gen:g}=f;return p.validate?g.scopeValue("validate",{ref:p.validate}):(0,h._)`${g.scopeValue("wrapper",{ref:p})}.validate`}wn.getValidate=v;function i(f,p,g,b){const{gen:k,it:E}=f,{allErrors:O,schemaEnv:j,opts:x}=E,S=x.passContext?m.default.this:h.nil;b?C():L();function C(){if(!j.$async)throw new Error("async schema referenced by sync schema");const A=k.let("valid");k.try(()=>{k.code((0,h._)`await ${(0,a.callValidateCode)(f,p,S)}`),R(p),O||k.assign(A,!0)},I=>{k.if((0,h._)`!(${I} instanceof ${E.ValidationError})`,()=>k.throw(I)),T(I),O||k.assign(A,!1)}),f.ok(A)}function L(){f.result((0,a.callValidateCode)(f,p,S),()=>R(p),()=>T(p))}function T(A){const I=(0,h._)`${A}.errors`;k.assign(m.default.vErrors,(0,h._)`${m.default.vErrors} === null ? ${I} : ${m.default.vErrors}.concat(${I})`),k.assign(m.default.errors,(0,h._)`${m.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(k,D.props,E.props));else{const M=k.var("props",(0,h._)`${A}.evaluated.props`);E.props=_.mergeEvaluated.props(k,M,E.props,h.Name)}if(E.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(E.items=_.mergeEvaluated.items(k,D.items,E.items));else{const M=k.var("items",(0,h._)`${A}.evaluated.items`);E.items=_.mergeEvaluated.items(k,M,E.items,h.Name)}}}return wn.callRef=i,wn.default=d,wn}var Ed;function Cy(){if(Ed)return Ia;Ed=1,Object.defineProperty(Ia,"__esModule",{value:!0});const o=xy(),a=Sy(),h=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,a.default];return Ia.default=h,Ia}var Da={},Ba={},Od;function Py(){if(Od)return Ba;Od=1,Object.defineProperty(Ba,"__esModule",{value:!0});const o=Je(),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}},m={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:m,code(_){const{keyword:d,data:v,schemaCode:i}=_;_.fail$data((0,o._)`${v} ${h[d].fail} ${i} || isNaN(${v})`)}};return Ba.default=y,Ba}var Fa={},xd;function Ty(){if(xd)return Fa;xd=1,Object.defineProperty(Fa,"__esModule",{value:!0});const o=Je(),h={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:m})=>(0,o.str)`must be multiple of ${m}`,params:({schemaCode:m})=>(0,o._)`{multipleOf: ${m}}`},code(m){const{gen:y,data:_,schemaCode:d,it:v}=m,i=v.opts.multipleOfPrecision,f=y.let("res"),p=i?(0,o._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${i}`:(0,o._)`${f} !== parseInt(${f})`;m.fail$data((0,o._)`(${d} === 0 || (${f} = ${_}/${d}, ${p}))`)}};return Fa.default=h,Fa}var Ma={},Va={},Sd;function Ry(){if(Sd)return Va;Sd=1,Object.defineProperty(Va,"__esModule",{value:!0});function o(a){const h=a.length;let m=0,y=0,_;for(;y<h;)m++,_=a.charCodeAt(y++),_>=55296&&_<=56319&&y<h&&(_=a.charCodeAt(y),(_&64512)===56320&&y++);return m}return Va.default=o,o.code='require("ajv/dist/runtime/ucs2length").default',Va}var Cd;function Ly(){if(Cd)return Ma;Cd=1,Object.defineProperty(Ma,"__esModule",{value:!0});const o=Je(),a=tt(),h=Ry(),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}=_,p=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} ${p} ${i}`)}};return Ma.default=y,Ma}var qa={},Pd;function Ay(){if(Pd)return qa;Pd=1,Object.defineProperty(qa,"__esModule",{value:!0});const o=vr(),a=Je(),m={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,p=f.opts.unicodeRegExp?"u":"",g=d?(0,a._)`(new RegExp(${i}, ${p}))`:(0,o.usePattern)(y,v);y.fail$data((0,a._)`!${g}.test(${_})`)}};return qa.default=m,qa}var za={},Td;function $y(){if(Td)return za;Td=1,Object.defineProperty(za,"__esModule",{value:!0});const o=Je(),h={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:y}){const _=m==="maxProperties"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} properties`},params:({schemaCode:m})=>(0,o._)`{limit: ${m}}`},code(m){const{keyword:y,data:_,schemaCode:d}=m,v=y==="maxProperties"?o.operators.GT:o.operators.LT;m.fail$data((0,o._)`Object.keys(${_}).length ${v} ${d}`)}};return za.default=h,za}var Ha={},Rd;function Iy(){if(Rd)return Ha;Rd=1,Object.defineProperty(Ha,"__esModule",{value:!0});const o=vr(),a=Je(),h=tt(),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:p,it:g}=_,{opts:b}=g;if(!p&&v.length===0)return;const k=v.length>=b.loopRequired;if(g.allErrors?E():O(),b.strictRequired){const S=_.parentSchema.properties,{definedProperties:C}=_.it;for(const L of v)if(S?.[L]===void 0&&!C.has(L)){const T=g.schemaEnv.baseId+g.errSchemaPath,R=`required property "${L}" is not defined at "${T}" (strictRequired)`;(0,h.checkStrictMode)(g,R,g.opts.strictRequired)}}function E(){if(k||p)_.block$data(a.nil,j);else for(const S of v)(0,o.checkReportMissingProp)(_,S)}function O(){const S=d.let("missing");if(k||p){const C=d.let("valid",!0);_.block$data(C,()=>x(S,C)),_.ok(C)}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,C){_.setParams({missingProperty:S}),d.forOf(S,i,()=>{d.assign(C,(0,o.propertyInData)(d,f,S,b.ownProperties)),d.if((0,a.not)(C),()=>{_.error(),d.break()})},a.nil)}}};return Ha.default=y,Ha}var Ua={},Ld;function Ny(){if(Ld)return Ua;Ld=1,Object.defineProperty(Ua,"__esModule",{value:!0});const o=Je(),h={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:y}){const _=m==="maxItems"?"more":"fewer";return(0,o.str)`must NOT have ${_} than ${y} items`},params:({schemaCode:m})=>(0,o._)`{limit: ${m}}`},code(m){const{keyword:y,data:_,schemaCode:d}=m,v=y==="maxItems"?o.operators.GT:o.operators.LT;m.fail$data((0,o._)`${_}.length ${v} ${d}`)}};return Ua.default=h,Ua}var Ga={},Ja={},Ad;function kl(){if(Ad)return Ja;Ad=1,Object.defineProperty(Ja,"__esModule",{value:!0});const o=cd();return o.code='require("ajv/dist/runtime/equal").default',Ja.default=o,Ja}var $d;function Dy(){if($d)return Ga;$d=1,Object.defineProperty(Ga,"__esModule",{value:!0});const o=Sa(),a=Je(),h=tt(),m=kl(),_={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:p,parentSchema:g,schemaCode:b,it:k}=d;if(!f&&!p)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`),T=v.let("j");d.setParams({i:L,j:T}),v.assign(E,!0),v.if((0,a._)`${L} > 1`,()=>(x()?S:C)(L,T))}function x(){return O.length>0&&!O.some(L=>L==="object"||L==="array")}function S(L,T){const R=v.name("item"),A=(0,o.checkDataTypes)(O,R,k.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(T,(0,a._)`${I}[${R}]`),d.error(),v.assign(E,!1).break()}).code((0,a._)`${I}[${R}] = ${L}`)})}function C(L,T){const R=(0,h.useFunc)(v,m.default),A=v.name("outer");v.label(A).for((0,a._)`;${L}--;`,()=>v.for((0,a._)`${T} = ${L}; ${T}--;`,()=>v.if((0,a._)`${R}(${i}[${L}], ${i}[${T}])`,()=>{d.error(),v.assign(E,!1).break(A)})))}}};return Ga.default=_,Ga}var Ka={},Id;function By(){if(Id)return Ka;Id=1,Object.defineProperty(Ka,"__esModule",{value:!0});const o=Je(),a=tt(),h=kl(),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:p}=_;i||p&&typeof p=="object"?_.fail$data((0,o._)`!${(0,a.useFunc)(d,h.default)}(${v}, ${f})`):_.fail((0,o._)`${p} !== ${v}`)}};return Ka.default=y,Ka}var Wa={},Nd;function Fy(){if(Nd)return Wa;Nd=1,Object.defineProperty(Wa,"__esModule",{value:!0});const o=Je(),a=tt(),h=kl(),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:p,it:g}=_;if(!i&&f.length===0)throw new Error("enum must have non-empty array");const b=f.length>=g.opts.loopEnum;let k;const E=()=>k??(k=(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",p);O=(0,o.or)(...f.map((C,L)=>x(S,L)))}_.pass(O);function j(){d.assign(O,!1),d.forOf("v",p,S=>d.if((0,o._)`${E()}(${v}, ${S})`,()=>d.assign(O,!0).break()))}function x(S,C){const L=f[C];return typeof L=="object"&&L!==null?(0,o._)`${E()}(${v}, ${S}[${C}])`:(0,o._)`${v} === ${L}`}}};return Wa.default=y,Wa}var Dd;function My(){if(Dd)return Da;Dd=1,Object.defineProperty(Da,"__esModule",{value:!0});const o=Py(),a=Ty(),h=Ly(),m=Ay(),y=$y(),_=Iy(),d=Ny(),v=Dy(),i=By(),f=Fy(),p=[o.default,a.default,h.default,m.default,y.default,_.default,d.default,v.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},i.default,f.default];return Da.default=p,Da}var Za={},Ti={},Bd;function Fd(){if(Bd)return Ti;Bd=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.validateAdditionalItems=void 0;const o=Je(),a=tt(),m={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:p,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),()=>k(E)),_.ok(E)}function k(E){v.forRange("i",d.length,b,O=>{_.subschema({keyword:p,dataProp:O,dataPropType:a.Type.Num},E),g.allErrors||v.if((0,o.not)(E),()=>v.break())})}}return Ti.validateAdditionalItems=y,Ti.default=m,Ti}var Ya={},Ri={},Md;function Vd(){if(Md)return Ri;Md=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.validateTuple=void 0;const o=Je(),a=tt(),h=vr(),m={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:p,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 k=i.name("valid"),E=i.const("len",(0,o._)`${p}.length`);v.forEach((j,x)=>{(0,a.alwaysValidSchema)(b,j)||(i.if((0,o._)`${E} > ${x}`,()=>_.subschema({keyword:g,schemaProp:x,dataProp:x},k)),_.ok(k))});function O(j){const{opts:x,errSchemaPath:S}=b,C=v.length,L=C===j.minItems&&(C===j.maxItems||j[d]===!1);if(x.strictTuples&&!L){const T=`"${g}" is ${C}-tuple, but minItems or maxItems/${d} are not specified or different at path "${S}"`;(0,a.checkStrictMode)(b,T,x.strictTuples)}}}return Ri.validateTuple=y,Ri.default=m,Ri}var qd;function Vy(){if(qd)return Ya;qd=1,Object.defineProperty(Ya,"__esModule",{value:!0});const o=Vd(),a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:h=>(0,o.validateTuple)(h,"items")};return Ya.default=a,Ya}var Qa={},zd;function qy(){if(zd)return Qa;zd=1,Object.defineProperty(Qa,"__esModule",{value:!0});const o=Je(),a=tt(),h=vr(),m=Fd(),_={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:p}=i;f.items=!0,!(0,a.alwaysValidSchema)(f,v)&&(p?(0,m.validateAdditionalItems)(d,p):d.ok((0,h.validateArray)(d)))}};return Qa.default=_,Qa}var Xa={},Hd;function zy(){if(Hd)return Xa;Hd=1,Object.defineProperty(Xa,"__esModule",{value:!0});const o=Je(),a=tt(),m={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 p,g;const{minContains:b,maxContains:k}=v;f.opts.next?(p=b===void 0?1:b,g=k):p=1;const E=_.const("len",(0,o._)`${i}.length`);if(y.setParams({min:p,max:g}),g===void 0&&p===0){(0,a.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&p>g){(0,a.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),y.fail();return}if((0,a.alwaysValidSchema)(f,d)){let C=(0,o._)`${E} >= ${p}`;g!==void 0&&(C=(0,o._)`${C} && ${E} <= ${g}`),y.pass(C);return}f.items=!0;const O=_.name("valid");g===void 0&&p===1?x(O,()=>_.if(O,()=>_.break())):p===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 C=_.name("_valid"),L=_.let("count",0);x(C,()=>_.if(C,()=>S(L)))}function x(C,L){_.forRange("i",0,E,T=>{y.subschema({keyword:"contains",dataProp:T,dataPropType:a.Type.Num,compositeRule:!0},C),L()})}function S(C){_.code((0,o._)`${C}++`),g===void 0?_.if((0,o._)`${C} >= ${p}`,()=>_.assign(O,!0).break()):(_.if((0,o._)`${C} > ${g}`,()=>_.assign(O,!1).break()),p===1?_.assign(O,!0):_.if((0,o._)`${C} >= ${p}`,()=>_.assign(O,!0)))}}};return Xa.default=m,Xa}var jl={},Ud;function Hy(){return Ud||(Ud=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.validateSchemaDeps=o.validatePropertyDeps=o.error=void 0;const a=Je(),h=tt(),m=vr();o.error={message:({params:{property:i,depsCount:f,deps:p}})=>{const g=f===1?"property":"properties";return(0,a.str)`must have ${g} ${p} when property ${i} is present`},params:({params:{property:i,depsCount:f,deps:p,missingProperty:g}})=>(0,a._)`{property: ${i},
|
|
11
11
|
missingProperty: ${g},
|
|
12
12
|
depsCount: ${f},
|
|
13
|
-
deps: ${p}}`};const y={keyword:"dependencies",type:"object",schemaType:"object",error:o.error,code(i){const[f,p]=_(i);d(i,f),v(i,p)}};function _({schema:i}){const f={},p={};for(const g in i){if(g==="__proto__")continue;const b=Array.isArray(i[g])?f:p;b[g]=i[g]}return[f,p]}function d(i,f=i.schema){const{gen:p,data:g,it:b}=i;if(Object.keys(f).length===0)return;const j=p.let("missing");for(const O in f){const E=f[O];if(E.length===0)continue;const k=(0,m.propertyInData)(p,g,O,b.opts.ownProperties);i.setParams({property:O,depsCount:E.length,deps:E.join(", ")}),b.allErrors?p.if(k,()=>{for(const S of E)(0,m.checkReportMissingProp)(i,S)}):(p.if((0,s._)`${k} && (${(0,m.checkMissingProp)(i,E,j)})`),(0,m.reportMissingProp)(i,j),p.else())}}o.validatePropertyDeps=d;function v(i,f=i.schema){const{gen:p,data:g,keyword:b,it:j}=i,O=p.name("valid");for(const E in f)(0,h.alwaysValidSchema)(j,f[E])||(p.if((0,m.propertyInData)(p,g,E,j.opts.ownProperties),()=>{const k=i.subschema({keyword:b,schemaProp:E},O);i.mergeValidEvaluated(k,O)},()=>p.var(O,!0)),i.ok(O))}o.validateSchemaDeps=v,o.default=y})(pl)),pl}var Us={},Nd;function $y(){if(Nd)return Us;Nd=1,Object.defineProperty(Us,"__esModule",{value:!0});const o=ze(),s=Ye(),m={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,s.alwaysValidSchema)(i,d))return;const f=_.name("valid");_.forIn("key",v,p=>{y.setParams({propertyName:p}),y.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:!0},f),_.if((0,o.not)(f),()=>{y.error(!0),i.allErrors||_.break()})}),y.ok(f)}};return Us.default=m,Us}var Gs={},Dd;function Bd(){if(Dd)return Gs;Dd=1,Object.defineProperty(Gs,"__esModule",{value:!0});const o=dr(),s=ze(),h=fn(),m=Ye(),_={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,s._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:v,schema:i,parentSchema:f,data:p,errsCount:g,it:b}=d;if(!g)throw new Error("ajv implementation error");const{allErrors:j,opts:O}=b;if(b.props=!0,O.removeAdditional!=="all"&&(0,m.alwaysValidSchema)(b,i))return;const E=(0,o.allSchemaProperties)(f.properties),k=(0,o.allSchemaProperties)(f.patternProperties);S(),d.ok((0,s._)`${g} === ${h.default.errors}`);function S(){v.forIn("key",p,R=>{!E.length&&!k.length?A(R):v.if(x(R),()=>A(R))})}function x(R){let L;if(E.length>8){const I=(0,m.schemaRefOrVal)(b,f.properties,"properties");L=(0,o.isOwnProperty)(v,I,R)}else E.length?L=(0,s.or)(...E.map(I=>(0,s._)`${R} === ${I}`)):L=s.nil;return k.length&&(L=(0,s.or)(L,...k.map(I=>(0,s._)`${(0,o.usePattern)(d,I)}.test(${R})`))),(0,s.not)(L)}function P(R){v.code((0,s._)`delete ${p}[${R}]`)}function A(R){if(O.removeAdditional==="all"||O.removeAdditional&&i===!1){P(R);return}if(i===!1){d.setParams({additionalProperty:R}),d.error(),j||v.break();return}if(typeof i=="object"&&!(0,m.alwaysValidSchema)(b,i)){const L=v.name("valid");O.removeAdditional==="failing"?(C(R,L,!1),v.if((0,s.not)(L),()=>{d.reset(),P(R)})):(C(R,L),j||v.if((0,s.not)(L),()=>v.break()))}}function C(R,L,I){const D={keyword:"additionalProperties",dataProp:R,dataPropType:m.Type.Str};I===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,L)}}};return Gs.default=_,Gs}var Js={},Fd;function Iy(){if(Fd)return Js;Fd=1,Object.defineProperty(Js,"__esModule",{value:!0});const o=_s(),s=dr(),h=Ye(),m=Bd(),y={keyword:"properties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,parentSchema:i,data:f,it:p}=_;p.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&m.default.code(new o.KeywordCxt(p,m.default,"additionalProperties"));const g=(0,s.allSchemaProperties)(v);for(const k of g)p.definedProperties.add(k);p.opts.unevaluated&&g.length&&p.props!==!0&&(p.props=h.mergeEvaluated.props(d,(0,h.toHash)(g),p.props));const b=g.filter(k=>!(0,h.alwaysValidSchema)(p,v[k]));if(b.length===0)return;const j=d.name("valid");for(const k of b)O(k)?E(k):(d.if((0,s.propertyInData)(d,f,k,p.opts.ownProperties)),E(k),p.allErrors||d.else().var(j,!0),d.endIf()),_.it.definedProperties.add(k),_.ok(j);function O(k){return p.opts.useDefaults&&!p.compositeRule&&v[k].default!==void 0}function E(k){_.subschema({keyword:"properties",schemaProp:k,dataProp:k},j)}}};return Js.default=y,Js}var Ks={},Md;function Ny(){if(Md)return Ks;Md=1,Object.defineProperty(Ks,"__esModule",{value:!0});const o=dr(),s=ze(),h=Ye(),m=Ye(),y={keyword:"patternProperties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,data:i,parentSchema:f,it:p}=_,{opts:g}=p,b=(0,o.allSchemaProperties)(v),j=b.filter(A=>(0,h.alwaysValidSchema)(p,v[A]));if(b.length===0||j.length===b.length&&(!p.opts.unevaluated||p.props===!0))return;const O=g.strictSchema&&!g.allowMatchingProperties&&f.properties,E=d.name("valid");p.props!==!0&&!(p.props instanceof s.Name)&&(p.props=(0,m.evaluatedPropsToName)(d,p.props));const{props:k}=p;S();function S(){for(const A of b)O&&x(A),p.allErrors?P(A):(d.var(E,!0),P(A),d.if(E))}function x(A){for(const C in O)new RegExp(A).test(C)&&(0,h.checkStrictMode)(p,`property ${C} matches pattern ${A} (use allowMatchingProperties)`)}function P(A){d.forIn("key",i,C=>{d.if((0,s._)`${(0,o.usePattern)(_,A)}.test(${C})`,()=>{const R=j.includes(A);R||_.subschema({keyword:"patternProperties",schemaProp:A,dataProp:C,dataPropType:m.Type.Str},E),p.opts.unevaluated&&k!==!0?d.assign((0,s._)`${k}[${C}]`,!0):!R&&!p.allErrors&&d.if((0,s.not)(E),()=>d.break())})})}}};return Ks.default=y,Ks}var Ws={},qd;function Dy(){if(qd)return Ws;qd=1,Object.defineProperty(Ws,"__esModule",{value:!0});const o=Ye(),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(h){const{gen:m,schema:y,it:_}=h;if((0,o.alwaysValidSchema)(_,y)){h.fail();return}const d=m.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=s,Ws}var Zs={},Vd;function By(){if(Vd)return Zs;Vd=1,Object.defineProperty(Zs,"__esModule",{value:!0});const s={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dr().validateUnion,error:{message:"must match a schema in anyOf"}};return Zs.default=s,Zs}var Ys={},zd;function Fy(){if(zd)return Ys;zd=1,Object.defineProperty(Ys,"__esModule",{value:!0});const o=ze(),s=Ye(),m={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,p=_.let("valid",!1),g=_.let("passing",null),b=_.name("_valid");y.setParams({passing:g}),_.block(j),y.result(p,()=>y.reset(),()=>y.error(!0));function j(){f.forEach((O,E)=>{let k;(0,s.alwaysValidSchema)(i,O)?_.var(b,!0):k=y.subschema({keyword:"oneOf",schemaProp:E,compositeRule:!0},b),E>0&&_.if((0,o._)`${b} && ${p}`).assign(p,!1).assign(g,(0,o._)`[${g}, ${E}]`).else(),_.if(b,()=>{_.assign(p,!0),_.assign(g,E),k&&y.mergeEvaluated(k,o.Name)})})}}};return Ys.default=m,Ys}var Qs={},Hd;function My(){if(Hd)return Qs;Hd=1,Object.defineProperty(Qs,"__esModule",{value:!0});const o=Ye(),s={keyword:"allOf",schemaType:"array",code(h){const{gen:m,schema:y,it:_}=h;if(!Array.isArray(y))throw new Error("ajv implementation error");const d=m.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 Qs.default=s,Qs}var Xs={},Ud;function qy(){if(Ud)return Xs;Ud=1,Object.defineProperty(Xs,"__esModule",{value:!0});const o=ze(),s=Ye(),m={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,s.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const f=y(i,"then"),p=y(i,"else");if(!f&&!p)return;const g=d.let("valid",!0),b=d.name("_valid");if(j(),_.reset(),f&&p){const E=d.let("ifClause");_.setParams({ifClause:E}),d.if(b,O("then",E),O("else",E))}else f?d.if(b,O("then")):d.if((0,o.not)(b),O("else"));_.pass(g,()=>_.error(!0));function j(){const E=_.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},b);_.mergeEvaluated(E)}function O(E,k){return()=>{const S=_.subschema({keyword:E},b);d.assign(g,b),_.mergeValidEvaluated(S,g),k?d.assign(k,(0,o._)`${E}`):_.setParams({ifClause:E})}}}};function y(_,d){const v=_.schema[d];return v!==void 0&&!(0,s.alwaysValidSchema)(_,v)}return Xs.default=m,Xs}var ea={},Gd;function Vy(){if(Gd)return ea;Gd=1,Object.defineProperty(ea,"__esModule",{value:!0});const o=Ye(),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:h,parentSchema:m,it:y}){m.if===void 0&&(0,o.checkStrictMode)(y,`"${h}" without "if" is ignored`)}};return ea.default=s,ea}var Jd;function zy(){if(Jd)return qs;Jd=1,Object.defineProperty(qs,"__esModule",{value:!0});const o=Pd(),s=Ty(),h=Rd(),m=Ry(),y=Ay(),_=Ly(),d=$y(),v=Bd(),i=Iy(),f=Ny(),p=Dy(),g=By(),b=Fy(),j=My(),O=qy(),E=Vy();function k(S=!1){const x=[p.default,g.default,b.default,j.default,O.default,E.default,d.default,v.default,_.default,i.default,f.default];return S?x.push(s.default,m.default):x.push(o.default,h.default),x.push(y.default),x}return qs.default=k,qs}var ta={},ra={},Kd;function Hy(){if(Kd)return ra;Kd=1,Object.defineProperty(ra,"__esModule",{value:!0});const o=ze(),h={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:m})=>(0,o.str)`must match format "${m}"`,params:({schemaCode:m})=>(0,o._)`{format: ${m}}`},code(m,y){const{gen:_,data:d,$data:v,schema:i,schemaCode:f,it:p}=m,{opts:g,errSchemaPath:b,schemaEnv:j,self:O}=p;if(!g.validateFormats)return;v?E():k();function E(){const S=_.scopeValue("formats",{ref:O.formats,code:g.code.formats}),x=_.const("fDef",(0,o._)`${S}[${f}]`),P=_.let("fType"),A=_.let("format");_.if((0,o._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>_.assign(P,(0,o._)`${x}.type || "string"`).assign(A,(0,o._)`${x}.validate`),()=>_.assign(P,(0,o._)`"string"`).assign(A,x)),m.fail$data((0,o.or)(C(),R()));function C(){return g.strictSchema===!1?o.nil:(0,o._)`${f} && !${A}`}function R(){const L=j.$async?(0,o._)`(${x}.async ? await ${A}(${d}) : ${A}(${d}))`:(0,o._)`${A}(${d})`,I=(0,o._)`(typeof ${A} == "function" ? ${L} : ${A}.test(${d}))`;return(0,o._)`${A} && ${A} !== true && ${P} === ${y} && !${I}`}}function k(){const S=O.formats[i];if(!S){C();return}if(S===!0)return;const[x,P,A]=R(S);x===y&&m.pass(L());function C(){if(g.strictSchema===!1){O.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 L(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!j.$async)throw new Error("async format in sync schema");return(0,o._)`await ${A}(${d})`}return typeof P=="function"?(0,o._)`${A}(${d})`:(0,o._)`${A}.test(${d})`}}}};return ra.default=h,ra}var Wd;function Uy(){if(Wd)return ta;Wd=1,Object.defineProperty(ta,"__esModule",{value:!0});const s=[Hy().default];return ta.default=s,ta}var Kn={},Zd;function Gy(){return Zd||(Zd=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.contentVocabulary=Kn.metadataVocabulary=void 0,Kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Kn}var Yd;function Jy(){if(Yd)return Es;Yd=1,Object.defineProperty(Es,"__esModule",{value:!0});const o=vy(),s=Py(),h=zy(),m=Uy(),y=Gy(),_=[o.default,s.default,(0,h.default)(),m.default,y.metadataVocabulary,y.contentVocabulary];return Es.default=_,Es}var na={},$o={},Qd;function Ky(){if(Qd)return $o;Qd=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.DiscrError=void 0;var o;return(function(s){s.Tag="tag",s.Mapping="mapping"})(o||($o.DiscrError=o={})),$o}var Xd;function Wy(){if(Xd)return na;Xd=1,Object.defineProperty(na,"__esModule",{value:!0});const o=ze(),s=Ky(),h=ul(),m=js(),y=Ye(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:v,tagName:i}})=>v===s.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:p,parentSchema:g,it:b}=v,{oneOf:j}=g;if(!b.opts.discriminator)throw new Error("discriminator: requires discriminator option");const O=p.propertyName;if(typeof O!="string")throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!j)throw new Error("discriminator: requires oneOf keyword");const E=i.let("valid",!1),k=i.const("tag",(0,o._)`${f}${(0,o.getProperty)(O)}`);i.if((0,o._)`typeof ${k} == "string"`,()=>S(),()=>v.error(!1,{discrError:s.DiscrError.Tag,tag:k,tagName:O})),v.ok(E);function S(){const A=P();i.if(!1);for(const C in A)i.elseIf((0,o._)`${k} === ${C}`),i.assign(E,x(A[C]));i.else(),v.error(!1,{discrError:s.DiscrError.Mapping,tag:k,tagName:O}),i.endIf()}function x(A){const C=i.name("valid"),R=v.subschema({keyword:"oneOf",schemaProp:A},C);return v.mergeEvaluated(R,o.Name),C}function P(){var A;const C={},R=I(g);let L=!0;for(let q=0;q<j.length;q++){let J=j[q];if(J?.$ref&&!(0,y.schemaHasRulesButRef)(J,b.self.RULES)){const Y=J.$ref;if(J=h.resolveRef.call(b.self,b.schemaEnv.root,b.baseId,Y),J instanceof h.SchemaEnv&&(J=J.schema),J===void 0)throw new m.default(b.opts.uriResolver,b.baseId,Y)}const G=(A=J?.properties)===null||A===void 0?void 0:A[O];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${O}"`);L=L&&(R||I(J)),D(G,q)}if(!L)throw new Error(`discriminator: "${O}" must be required`);return C;function I({required:q}){return Array.isArray(q)&&q.includes(O)}function D(q,J){if(q.const)M(q.const,J);else if(q.enum)for(const G of q.enum)M(G,J);else throw new Error(`discriminator: "properties/${O}" must have "const" or "enum"`)}function M(q,J){if(typeof q!="string"||q in C)throw new Error(`discriminator: "${O}" values must be unique strings`);C[q]=J}}}};return na.default=d,na}const Zy={$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 eh;function Yy(){return eh||(eh=1,(function(o,s){Object.defineProperty(s,"__esModule",{value:!0}),s.MissingRefError=s.ValidationError=s.CodeGen=s.Name=s.nil=s.stringify=s.str=s._=s.KeywordCxt=s.Ajv=void 0;const h=py(),m=Jy(),y=Wy(),_=Zy,d=["/properties"],v="http://json-schema.org/draft-07/schema";class i extends h.default{_addVocabularies(){super._addVocabularies(),m.default.forEach(O=>this.addVocabulary(O)),this.opts.discriminator&&this.addKeyword(y.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const O=this.opts.$data?this.$dataMetaSchema(_,d):_;this.addMetaSchema(O,v,!1),this.refs["http://json-schema.org/schema"]=v}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(v)?v:void 0)}}s.Ajv=i,o.exports=s=i,o.exports.Ajv=i,Object.defineProperty(s,"__esModule",{value:!0}),s.default=i;var f=_s();Object.defineProperty(s,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var p=ze();Object.defineProperty(s,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(s,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(s,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(s,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(s,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(s,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var g=cl();Object.defineProperty(s,"ValidationError",{enumerable:!0,get:function(){return g.default}});var b=js();Object.defineProperty(s,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(ps,ps.exports)),ps.exports}var Qy=Yy();const Xy=iy(Qy),Io={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: ${p}}`};const y={keyword:"dependencies",type:"object",schemaType:"object",error:o.error,code(i){const[f,p]=_(i);d(i,f),v(i,p)}};function _({schema:i}){const f={},p={};for(const g in i){if(g==="__proto__")continue;const b=Array.isArray(i[g])?f:p;b[g]=i[g]}return[f,p]}function d(i,f=i.schema){const{gen:p,data:g,it:b}=i;if(Object.keys(f).length===0)return;const k=p.let("missing");for(const E in f){const O=f[E];if(O.length===0)continue;const j=(0,m.propertyInData)(p,g,E,b.opts.ownProperties);i.setParams({property:E,depsCount:O.length,deps:O.join(", ")}),b.allErrors?p.if(j,()=>{for(const x of O)(0,m.checkReportMissingProp)(i,x)}):(p.if((0,a._)`${j} && (${(0,m.checkMissingProp)(i,O,k)})`),(0,m.reportMissingProp)(i,k),p.else())}}o.validatePropertyDeps=d;function v(i,f=i.schema){const{gen:p,data:g,keyword:b,it:k}=i,E=p.name("valid");for(const O in f)(0,h.alwaysValidSchema)(k,f[O])||(p.if((0,m.propertyInData)(p,g,O,k.opts.ownProperties),()=>{const j=i.subschema({keyword:b,schemaProp:O},E);i.mergeValidEvaluated(j,E)},()=>p.var(E,!0)),i.ok(E))}o.validateSchemaDeps=v,o.default=y})(jl)),jl}var es={},Gd;function Uy(){if(Gd)return es;Gd=1,Object.defineProperty(es,"__esModule",{value:!0});const o=Je(),a=tt(),m={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,p=>{y.setParams({propertyName:p}),y.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:!0},f),_.if((0,o.not)(f),()=>{y.error(!0),i.allErrors||_.break()})}),y.ok(f)}};return es.default=m,es}var ts={},Jd;function Kd(){if(Jd)return ts;Jd=1,Object.defineProperty(ts,"__esModule",{value:!0});const o=vr(),a=Je(),h=_n(),m=tt(),_={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:p,errsCount:g,it:b}=d;if(!g)throw new Error("ajv implementation error");const{allErrors:k,opts:E}=b;if(b.props=!0,E.removeAdditional!=="all"&&(0,m.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",p,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,m.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 C(R){v.code((0,a._)`delete ${p}[${R}]`)}function L(R){if(E.removeAdditional==="all"||E.removeAdditional&&i===!1){C(R);return}if(i===!1){d.setParams({additionalProperty:R}),d.error(),k||v.break();return}if(typeof i=="object"&&!(0,m.alwaysValidSchema)(b,i)){const A=v.name("valid");E.removeAdditional==="failing"?(T(R,A,!1),v.if((0,a.not)(A),()=>{d.reset(),C(R)})):(T(R,A),k||v.if((0,a.not)(A),()=>v.break()))}}function T(R,A,I){const D={keyword:"additionalProperties",dataProp:R,dataPropType:m.Type.Str};I===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,A)}}};return ts.default=_,ts}var rs={},Wd;function Gy(){if(Wd)return rs;Wd=1,Object.defineProperty(rs,"__esModule",{value:!0});const o=Pa(),a=vr(),h=tt(),m=Kd(),y={keyword:"properties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,parentSchema:i,data:f,it:p}=_;p.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&m.default.code(new o.KeywordCxt(p,m.default,"additionalProperties"));const g=(0,a.allSchemaProperties)(v);for(const j of g)p.definedProperties.add(j);p.opts.unevaluated&&g.length&&p.props!==!0&&(p.props=h.mergeEvaluated.props(d,(0,h.toHash)(g),p.props));const b=g.filter(j=>!(0,h.alwaysValidSchema)(p,v[j]));if(b.length===0)return;const k=d.name("valid");for(const j of b)E(j)?O(j):(d.if((0,a.propertyInData)(d,f,j,p.opts.ownProperties)),O(j),p.allErrors||d.else().var(k,!0),d.endIf()),_.it.definedProperties.add(j),_.ok(k);function E(j){return p.opts.useDefaults&&!p.compositeRule&&v[j].default!==void 0}function O(j){_.subschema({keyword:"properties",schemaProp:j,dataProp:j},k)}}};return rs.default=y,rs}var ns={},Zd;function Jy(){if(Zd)return ns;Zd=1,Object.defineProperty(ns,"__esModule",{value:!0});const o=vr(),a=Je(),h=tt(),m=tt(),y={keyword:"patternProperties",type:"object",schemaType:"object",code(_){const{gen:d,schema:v,data:i,parentSchema:f,it:p}=_,{opts:g}=p,b=(0,o.allSchemaProperties)(v),k=b.filter(L=>(0,h.alwaysValidSchema)(p,v[L]));if(b.length===0||k.length===b.length&&(!p.opts.unevaluated||p.props===!0))return;const E=g.strictSchema&&!g.allowMatchingProperties&&f.properties,O=d.name("valid");p.props!==!0&&!(p.props instanceof a.Name)&&(p.props=(0,m.evaluatedPropsToName)(d,p.props));const{props:j}=p;x();function x(){for(const L of b)E&&S(L),p.allErrors?C(L):(d.var(O,!0),C(L),d.if(O))}function S(L){for(const T in E)new RegExp(L).test(T)&&(0,h.checkStrictMode)(p,`property ${T} matches pattern ${L} (use allowMatchingProperties)`)}function C(L){d.forIn("key",i,T=>{d.if((0,a._)`${(0,o.usePattern)(_,L)}.test(${T})`,()=>{const R=k.includes(L);R||_.subschema({keyword:"patternProperties",schemaProp:L,dataProp:T,dataPropType:m.Type.Str},O),p.opts.unevaluated&&j!==!0?d.assign((0,a._)`${j}[${T}]`,!0):!R&&!p.allErrors&&d.if((0,a.not)(O),()=>d.break())})})}}};return ns.default=y,ns}var is={},Yd;function Ky(){if(Yd)return is;Yd=1,Object.defineProperty(is,"__esModule",{value:!0});const o=tt(),a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(h){const{gen:m,schema:y,it:_}=h;if((0,o.alwaysValidSchema)(_,y)){h.fail();return}const d=m.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 is.default=a,is}var os={},Qd;function Wy(){if(Qd)return os;Qd=1,Object.defineProperty(os,"__esModule",{value:!0});const a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:vr().validateUnion,error:{message:"must match a schema in anyOf"}};return os.default=a,os}var as={},Xd;function Zy(){if(Xd)return as;Xd=1,Object.defineProperty(as,"__esModule",{value:!0});const o=Je(),a=tt(),m={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,p=_.let("valid",!1),g=_.let("passing",null),b=_.name("_valid");y.setParams({passing:g}),_.block(k),y.result(p,()=>y.reset(),()=>y.error(!0));function k(){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} && ${p}`).assign(p,!1).assign(g,(0,o._)`[${g}, ${O}]`).else(),_.if(b,()=>{_.assign(p,!0),_.assign(g,O),j&&y.mergeEvaluated(j,o.Name)})})}}};return as.default=m,as}var ss={},eh;function Yy(){if(eh)return ss;eh=1,Object.defineProperty(ss,"__esModule",{value:!0});const o=tt(),a={keyword:"allOf",schemaType:"array",code(h){const{gen:m,schema:y,it:_}=h;if(!Array.isArray(y))throw new Error("ajv implementation error");const d=m.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 ss.default=a,ss}var ls={},th;function Qy(){if(th)return ls;th=1,Object.defineProperty(ls,"__esModule",{value:!0});const o=Je(),a=tt(),m={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"),p=y(i,"else");if(!f&&!p)return;const g=d.let("valid",!0),b=d.name("_valid");if(k(),_.reset(),f&&p){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 k(){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 ls.default=m,ls}var cs={},rh;function Xy(){if(rh)return cs;rh=1,Object.defineProperty(cs,"__esModule",{value:!0});const o=tt(),a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:h,parentSchema:m,it:y}){m.if===void 0&&(0,o.checkStrictMode)(y,`"${h}" without "if" is ignored`)}};return cs.default=a,cs}var nh;function ev(){if(nh)return Za;nh=1,Object.defineProperty(Za,"__esModule",{value:!0});const o=Fd(),a=Vy(),h=Vd(),m=qy(),y=zy(),_=Hy(),d=Uy(),v=Kd(),i=Gy(),f=Jy(),p=Ky(),g=Wy(),b=Zy(),k=Yy(),E=Qy(),O=Xy();function j(x=!1){const S=[p.default,g.default,b.default,k.default,E.default,O.default,d.default,v.default,_.default,i.default,f.default];return x?S.push(a.default,m.default):S.push(o.default,h.default),S.push(y.default),S}return Za.default=j,Za}var us={},ds={},ih;function tv(){if(ih)return ds;ih=1,Object.defineProperty(ds,"__esModule",{value:!0});const o=Je(),h={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:m})=>(0,o.str)`must match format "${m}"`,params:({schemaCode:m})=>(0,o._)`{format: ${m}}`},code(m,y){const{gen:_,data:d,$data:v,schema:i,schemaCode:f,it:p}=m,{opts:g,errSchemaPath:b,schemaEnv:k,self:E}=p;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}]`),C=_.let("fType"),L=_.let("format");_.if((0,o._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>_.assign(C,(0,o._)`${S}.type || "string"`).assign(L,(0,o._)`${S}.validate`),()=>_.assign(C,(0,o._)`"string"`).assign(L,S)),m.fail$data((0,o.or)(T(),R()));function T(){return g.strictSchema===!1?o.nil:(0,o._)`${f} && !${L}`}function R(){const A=k.$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 && ${C} === ${y} && !${I}`}}function j(){const x=E.formats[i];if(!x){T();return}if(x===!0)return;const[S,C,L]=R(x);S===y&&m.pass(A());function T(){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(!k.$async)throw new Error("async format in sync schema");return(0,o._)`await ${L}(${d})`}return typeof C=="function"?(0,o._)`${L}(${d})`:(0,o._)`${L}.test(${d})`}}}};return ds.default=h,ds}var oh;function rv(){if(oh)return us;oh=1,Object.defineProperty(us,"__esModule",{value:!0});const a=[tv().default];return us.default=a,us}var Yn={},ah;function nv(){return ah||(ah=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.contentVocabulary=Yn.metadataVocabulary=void 0,Yn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Yn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Yn}var sh;function iv(){if(sh)return $a;sh=1,Object.defineProperty($a,"__esModule",{value:!0});const o=Cy(),a=My(),h=ev(),m=rv(),y=nv(),_=[o.default,a.default,(0,h.default)(),m.default,y.metadataVocabulary,y.contentVocabulary];return $a.default=_,$a}var hs={},Fo={},lh;function ov(){if(lh)return Fo;lh=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.DiscrError=void 0;var o;return(function(a){a.Tag="tag",a.Mapping="mapping"})(o||(Fo.DiscrError=o={})),Fo}var ch;function av(){if(ch)return hs;ch=1,Object.defineProperty(hs,"__esModule",{value:!0});const o=Je(),a=ov(),h=gl(),m=La(),y=tt(),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:p,parentSchema:g,it:b}=v,{oneOf:k}=g;if(!b.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=p.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!k)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=C();i.if(!1);for(const T in L)i.elseIf((0,o._)`${j} === ${T}`),i.assign(O,S(L[T]));i.else(),v.error(!1,{discrError:a.DiscrError.Mapping,tag:j,tagName:E}),i.endIf()}function S(L){const T=i.name("valid"),R=v.subschema({keyword:"oneOf",schemaProp:L},T);return v.mergeEvaluated(R,o.Name),T}function C(){var L;const T={},R=I(g);let A=!0;for(let V=0;V<k.length;V++){let G=k[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 m.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 T;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 T)throw new Error(`discriminator: "${E}" values must be unique strings`);T[V]=G}}}};return hs.default=d,hs}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 uh;function lv(){return uh||(uh=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=Oy(),m=iv(),y=av(),_=sv,d=["/properties"],v="http://json-schema.org/draft-07/schema";class i extends h.default{_addVocabularies(){super._addVocabularies(),m.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=Pa();Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var p=Je();Object.defineProperty(a,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var g=bl();Object.defineProperty(a,"ValidationError",{enumerable:!0,get:function(){return g.default}});var b=La();Object.defineProperty(a,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(ja,ja.exports)),ja.exports}var cv=lv();const uv=my(cv),Mo={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,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"]}}},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:"Plain text",active:!0,version:1,description:"Plain text nothing more",schema:{type:"object",additionalProperties:!1,required:[],properties:{text:{type:"string",default:"Text..."}}},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:[]},ml={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:{}}}},ev={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 Tr{constructor(s){if(this.util_check_required_fields(["name","encryption_key","api","utils","db_name"],s),this.util_check_required_fields(["insert","update","delete","search","get","createIndex"],s.api),this.util_check_required_fields(["encrypt","decrypt","ping","validate_schema","compile_template"],s.utils),s.encryption_key.length<20)throw new Tt([{message:Tr.error_codes.key_short}]);this.encryption_key=s.encryption_key,this.db_name=s.db_name,this.db_api=s.api,this.utils=s.utils,this.meta={database_name:s.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 s=await this.db_api.search({selector:{schema:"system_setting","data.name":"beanbagdb_system"}});if(s.docs.length>0){let h=s.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(s=!0){if(await this.check_ready())console.log("Ready.Set.Go");else if(s)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 s=await this.initialize_app(Io);return this.meta.beanbagdb_version_db=this._version,this.active=!0,s}catch(s){throw console.log("Error in initializing instance"),console.log(s),s}}async initialize_app(s){if(!s)throw new Error("app_data_input is required");let h=this.util_validate_data({schema:ev,data:s}),m=0;h.schemas.map(p=>{m=m+p.version,p.settings.install_source=`app:${h.app_id}`}),h.records.map(p=>{m=m+p.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==m&&(_=!1)),!_)return d;let v=`Initializing ${h.app_id} app to v.${m}`,i=["update started"];for(let p=0;p<h.schemas.length;p++){const g=h.schemas[p].name,b=h.schemas[p];i.push(`checking.${g}`);try{let j=await this.get({type:"schema",criteria:{name:g}});if(j.data.version!=b.version){i.push(`old.${g}.v.${j.data.version}`);let O=await this.db_api.get(j._id);O.data={...b},O.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(O),await this.db_api.update(O),i.push(`new.${g}.v=${b.version}`)}else i.push(`${g}.v.${j.data.version}=latest`)}catch(j){if(j instanceof Kr){if(g=="schema"&&h.app_id=="beanbagdb_system"){let O=this._get_blank_doc("schema");O.data=b,await this.db_api.insert(O)}else{let O=Io.schemas[0].schema,E=this._get_blank_schema_doc("schema",O,b);await this.db_api.insert(E)}i.push(`init.${g}.v=${b.version}`)}else i.push(`${g}.error.message : ${j.message} `)}}for(let p=0;p<h.records.length;p++){const g=h.records[p].schema,b=h.records[p].record,j=h.records[p].title;i.push(`checking.records.${j}`);try{let O=await this.create({schema:g,data:b,meta:h.records[p].meta});i.push(`doc.${j}.created`)}catch(O){O instanceof Wn||i.push(`error in doc ${j} insertion: ${O.message}, doc: ${JSON.stringify(b)}`)}}let f={...h.meta,app_id:h.app_id,version:m};try{await this.modify_setting(h.app_id,f,"update");let p=this._get_blank_doc("system_log");p.data={text:v,steps:i,app:h.app_id},p.meta.title=v,await this.db_api.insert(p),console.log("init logged")}catch(p){throw console.log(p),console.log("error in storing/updating beanbagdb_version"),p}return f}async update_indexes(){this._check_ready_to_use();let s=await this.db_api.search({selector:{schema:"schema"}}),h=[];s.docs.map(m=>{Object.keys(m.data.schema.properties).map(y=>{h.push("data."+y)})}),await this.db_api.createIndex({index:{fields:h}})}async create(s){this._check_ready_to_use();let h=[];if(s.schema||h.push("schema is required"),s.data||h.push("data is required"),h.length>0)throw new Wn(`${h.join(",")}.`);if(Object.keys(s.data).length==0)throw new Wn("No data provided");try{let m=await this._insert_pre_checks(s.schema,s.data,s?.meta||{},s?.app||{},s?.settings||{}),y=await this.db_api.insert(m);return{_id:y.id,_rev:y.rev,...m}}catch(m){throw m}}async read(s){this._check_ready_to_use();let h={doc:null},m=null;if(s._id)try{let y=await this.db_api.get(s._id);h.doc=y}catch{throw new Kr(Tr.error_codes.doc_not_found)}else if(s.link){let y=await this.db_api.search({selector:{"meta.link":s.link}});if(y.docs.length==0)throw new Kr(Tr.error_codes.doc_not_found);h.doc=y.docs[0]}else if(s.hasOwnProperty("schema")&s.hasOwnProperty("data")){m=await this.get({type:"schema",criteria:{name:s.schema}});let y=m.data.settings.primary_keys,_={schema:s.schema};y.forEach(v=>{if(!s.data[v])throw new Tt("Incomplete Primary key set. Required field(s) : "+y.join(","));_["data."+v]=s.data[v]});let d=await this.db_api.search({selector:_});if(d.docs.length==0)throw new Kr(Tr.error_codes.doc_not_found);h.doc=d.docs[0]}else throw new Tt('Invalid criteria to read a document. Valid ways : {"schema":"schema_name","data":{...primary key}} or {"_id":""} or {"link":""} ');if(m||(m=await this.get({type:"schema",criteria:{name:h.doc.schema}})),s.include_schema&&(h.schema=m.data),h.doc=await this._decrypt_doc(m.data,h.doc),s.text_template){let y=this._compile_template(s.text_template,m.data,h.doc);h.view=y}return h}async update(s){this._check_ready_to_use();const{criteria:h,updates:m,rev_id:y="",update_source:_="api",save_conflict:d=!0}=s;if(!h)throw new Rr("Doc search criteria not provided");if(!m)throw new Rr("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 Rr("System schemas cannot be updated using this API");let p=Object.keys(i.schema.properties),g=i.settings.non_editable_fields,b=p.filter(E=>!g.includes(E)),j=!1,O=this.util_filter_object(m.data||{},b);if(Object.keys(O).length>0){let E={...f.data,...O};if(f.schema=="system_edge"&&(E=await this._create_edge(E)),E=this.util_validate_data({schema:i.schema,data:E}),i.settings.primary_keys.length>0){let k=i.settings.primary_keys,S={schema:i.name};k.map(P=>{S["data."+P]=E[P]});let x=await this.search({selector:S});if(x.docs.length>0)if(x.docs.length==1){if(x.docs[0]._id!=f._id)throw new Rr("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=E,j=!0}if(m.meta){let E=ml;Object.keys(E.properties);let k={...f.meta,...m.meta};if(k=this.util_validate_data({schema:E,data:k}),k.link){let S=await this.search({selector:{"meta.link":k.link}});if(S.docs.length>0)if(S.docs.length==1){if(S.docs[0]._id!=f._id)throw new Rr("Update not allowed. Document with the same link already exists")}else throw new Error("There is something wrong.")}f.meta={...k},j=!0}if(m.app&&(f.app||(f.app={}),Object.entries(m.app).forEach(([E,k])=>{if(!k||typeof k!="object"||!k.mode||!k.data)throw console.warn(`Invalid update format for ${E}`),new Rr(`Invalid update format for app ${E}. Must be an object {mode:"update|replace|append|remove", data:{} }`);switch(k.mode){case"update":f.app[E]={...f.app[E],...k.data},j=!0;break;case"replace":f.app[E]=k.data,j=!0;break;case"append":Object.entries(k.data).forEach(([S,x])=>{Array.isArray(f.app[E]?.[S])||(f.app[E]=f.app[E]||{},f.app[E][S]=[]),f.app[E][S].push(x)}),j=!0;break;case"remove":delete f.app[E],j=!0;break;default:throw new Rr(`Unknown mode: ${k.mode} app ${E}. Must be an object {mode:"update|replace|append|remove", data:{} }`)}})),j)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 Rr("Nothing to update")}async delete(s){this._check_ready_to_use();let h=await this.read(s);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(s={}){if(this._check_ready_to_use(),!s.selector)throw new Tt("Invalid search query.Use {selector:{...query...}}");let h=await this.db_api.search(s);return{...{decrypt_docs:!1},...s?.options||{}}.decrypt_docs&&h.docs.length>0&&(h=await this._decrypt_docs(h)),h}async _decrypt_docs(s){const h=[...new Set(s.docs.map(d=>d.schema))];let m=await this.db_api.search({selector:{schema:"schema","data.name":{$in:h}}}),y={};m.docs.map(d=>{y[d.data.name]=d.data});let _=[];for(let d=0;d<s.docs.length;d++){const v=s.docs[d];_.push(await this._decrypt_doc(y[v.schema],v))}return{docs:_}}async get(s){const h={schema:async m=>{let y=await this.db_api.search({selector:{schema:"schema","data.name":m.name}});if(y.docs.length==0)throw new Kr(Tr.error_codes.schema_not_found);return y.docs[0]},schema_list:async m=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new Kr(Tr.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 m=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new Kr(Tr.error_codes.schema_not_found);{let _={};return y.docs.map(d=>{_[d.data.name]=d.data.settings.svg_icon25||""}),_}},editable_meta_schema:async m=>ml};if(!s.type)throw new Tt("No type provided. Must be: "+Object.keys(h).join(","));if(Object.keys(h).includes(s.type))return await h[s.type](s?.criteria||{});throw new Tt("Invalid name. Must be : "+Object.keys(h).join(","))}async load_scripts(s,h){if(this._check_ready_to_use(),this.apps[s]={},h)for(let m in h)typeof h[m]=="function"&&(this.apps[s][m]=h[m].bind(null,this));else console.log("app_module is blank")}async modify_setting(s,h,m){if(!s||!h||!m)throw new Rr("All 3 inputs (setting name, value and update_mode) are required");let y=await this.db_api.search({selector:{schema:"system_setting","data.name":s}});if(!["append","update"].includes(m))throw new Rr("Invalid update_mode");if(y.docs.length>0){let _={...y.docs[0]};return Array.isArray(h)?_.data.value=m==="append"?[..._.data.value,h]:h:_.data.value=m==="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:s},await this.db_api.insert(_)}}async _create_edge(s){console.log(s);let{node1:h,node2:m,edge_name:y,note:_="",level_weight:d=1}=s;if(this._check_ready_to_use(),!y)throw new Tt("edge_name required");if(!h||Object.keys(h).length==0)throw new Tt("node1 required");if(!m||Object.keys(m).length==0)throw new Tt("node2 required");typeof h=="string"&&(h={_id:h}),typeof m=="string"&&(m={_id:m});let v=await this.read(h),i=await this.read(m);if(v.doc._id==i.doc._id)throw new Tt("Both nodes cannot be the same");if(v.doc.schema=="system_edge"||i.doc.schema=="system_edge")throw new Tt("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,j=i.doc._id,O=this._check_nodes_edge(f.node1,f.node2,v.doc.schema,i.doc.schema);O.valid?O.swapped&&(b=i.doc._id,j=v.doc._id):g.push("Invalid nodes.This config of nodes not allowed");let E=await this.search({selector:{schema:"system_edge","data.edge_name":y}});if(f.max_from_node1!=-1&&E.docs.filter(S=>S.data.node1==b).length>=f.max_from_node1&&g.push("max limit reached"),f.max_to_node2!=-1){let k=E.docs.filter(S=>S.data.node2==j);filter1.length>=f.max_from_node1&&g.push("max limit reached")}if(g.length==0)return{node1:b,node2:j,edge_name:y,note:_,level_weight:d};throw new tv(g)}catch(p){if(p instanceof Kr){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 p}}_check_node_schema_match(s,h){return s==="*"?!0:s.startsWith("*-")?!s.slice(2).split(",").includes(h):s.split(",").includes(h)}_check_nodes_edge(s,h,m,y){const _=this._check_node_schema_match(s,m),d=this._check_node_schema_match(h,y),v=this._check_node_schema_match(h,m),i=this._check_node_schema_match(s,y);return _&&d?{valid:!0,swapped:!1}:v&&i?{valid:!0,swapped:!0}:{valid:!1,swapped:!1}}_compile_template(s,h,m){try{if(!s||!h||!m)throw new Error("Incomplete info provided");let y=h.settings?.text_templates[s];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,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"]}}},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:"Plain text",active:!0,version:1,description:"Plain text nothing more",schema:{type:"object",additionalProperties:!1,required:[],properties:{text:{type:"string",default:"Text..."}}},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:[]},El={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:{}}}},dv={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 Dr{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 Dt([{message:Dr.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(Mo);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:dv,data:a}),m=0;h.schemas.map(p=>{m=m+p.version,p.settings.install_source=`app:${h.app_id}`}),h.records.map(p=>{m=m+p.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==m&&(_=!1)),!_)return d;let v=`Initializing ${h.app_id} app to v.${m}`,i=["update started"];for(let p=0;p<h.schemas.length;p++){const g=h.schemas[p].name,b=h.schemas[p];i.push(`checking.${g}`);try{let k=await this.get({type:"schema",criteria:{name:g}});if(k.data.version!=b.version){i.push(`old.${g}.v.${k.data.version}`);let E=await this.db_api.get(k._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.${k.data.version}=latest`)}catch(k){if(k instanceof tn){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=Mo.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 : ${k.message} `)}}for(let p=0;p<h.records.length;p++){const g=h.records[p].schema,b=h.records[p].record,k=h.records[p].title;i.push(`checking.records.${k}`);try{let E=await this.create({schema:g,data:b,meta:h.records[p].meta});i.push(`doc.${k}.created`)}catch(E){E instanceof Qn||i.push(`error in doc ${k} insertion: ${E.message}, doc: ${JSON.stringify(b)}`)}}let f={...h.meta,app_id:h.app_id,version:m};try{await this.modify_setting(h.app_id,f,"update");let p=this._get_blank_doc("system_log");p.data={text:v,steps:i,app:h.app_id},p.meta.title=v,await this.db_api.insert(p),console.log("init logged")}catch(p){throw console.log(p),console.log("error in storing/updating beanbagdb_version"),p}return f}async update_indexes(){this._check_ready_to_use();let a=await this.db_api.search({selector:{schema:"schema"}}),h=[];a.docs.map(m=>{Object.keys(m.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 Qn(`${h.join(",")}.`);if(Object.keys(a.data).length==0)throw new Qn("No data provided");try{let m=await this._insert_pre_checks(a.schema,a.data,a?.meta||{},a?.app||{},a?.settings||{}),y=await this.db_api.insert(m);return{_id:y.id,_rev:y.rev,...m}}catch(m){throw m}}async read(a){this._check_ready_to_use();let h={doc:null},m=null;if(a._id)try{let y=await this.db_api.get(a._id);h.doc=y}catch{throw new tn(Dr.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 tn(Dr.error_codes.doc_not_found);h.doc=y.docs[0]}else if(a.hasOwnProperty("schema")&a.hasOwnProperty("data")){m=await this.get({type:"schema",criteria:{name:a.schema}});let y=m.data.settings.primary_keys,_={schema:a.schema};y.forEach(v=>{if(!a.data[v])throw new Dt("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 tn(Dr.error_codes.doc_not_found);h.doc=d.docs[0]}else throw new Dt('Invalid criteria to read a document. Valid ways : {"schema":"schema_name","data":{...primary key}} or {"_id":""} or {"link":""} ');if(m||(m=await this.get({type:"schema",criteria:{name:h.doc.schema}})),a.include_schema&&(h.schema=m.data),h.doc=await this._decrypt_doc(m.data,h.doc),a.text_template){let y=this._compile_template(a.text_template,m.data,h.doc);h.view=y}return h}async update(a){this._check_ready_to_use();const{criteria:h,updates:m,rev_id:y="",update_source:_="api",save_conflict:d=!0}=a;if(!h)throw new Br("Doc search criteria not provided");if(!m)throw new Br("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 Br("System schemas cannot be updated using this API");let p=Object.keys(i.schema.properties),g=i.settings.non_editable_fields,b=p.filter(O=>!g.includes(O)),k=!1,E=this.util_filter_object(m.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(C=>{x["data."+C]=O[C]});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 Br("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,k=!0}if(m.meta){let O=El;Object.keys(O.properties);let j={...f.meta,...m.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 Br("Update not allowed. Document with the same link already exists")}else throw new Error("There is something wrong.")}f.meta={...j},k=!0}if(m.app&&(f.app||(f.app={}),Object.entries(m.app).forEach(([O,j])=>{if(!j||typeof j!="object"||!j.mode||!j.data)throw console.warn(`Invalid update format for ${O}`),new Br(`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},k=!0;break;case"replace":f.app[O]=j.data,k=!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)}),k=!0;break;case"remove":delete f.app[O],k=!0;break;default:throw new Br(`Unknown mode: ${j.mode} app ${O}. Must be an object {mode:"update|replace|append|remove", data:{} }`)}})),k)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 Br("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 Dt("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 m=await this.db_api.search({selector:{schema:"schema","data.name":{$in:h}}}),y={};m.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 m=>{let y=await this.db_api.search({selector:{schema:"schema","data.name":m.name}});if(y.docs.length==0)throw new tn(Dr.error_codes.schema_not_found);return y.docs[0]},schema_list:async m=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new tn(Dr.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 m=>{let y=await this.db_api.search({selector:{schema:"schema"}});if(y.docs.length==0)throw new tn(Dr.error_codes.schema_not_found);{let _={};return y.docs.map(d=>{_[d.data.name]=d.data.settings.svg_icon25||""}),_}},editable_meta_schema:async m=>El};if(!a.type)throw new Dt("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 Dt("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 m in h)typeof h[m]=="function"&&(this.apps[a][m]=h[m].bind(null,this));else console.log("app_module is blank")}async modify_setting(a,h,m){if(!a||!h||!m)throw new Br("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(m))throw new Br("Invalid update_mode");if(y.docs.length>0){let _={...y.docs[0]};return Array.isArray(h)?_.data.value=m==="append"?[..._.data.value,h]:h:_.data.value=m==="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:m,edge_name:y,note:_="",level_weight:d=1}=a;if(this._check_ready_to_use(),!y)throw new Dt("edge_name required");if(!h||Object.keys(h).length==0)throw new Dt("node1 required");if(!m||Object.keys(m).length==0)throw new Dt("node2 required");typeof h=="string"&&(h={_id:h}),typeof m=="string"&&(m={_id:m});let v=await this.read(h),i=await this.read(m);if(v.doc._id==i.doc._id)throw new Dt("Both nodes cannot be the same");if(v.doc.schema=="system_edge"||i.doc.schema=="system_edge")throw new Dt("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,k=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,k=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==k);filter1.length>=f.max_from_node1&&g.push("max limit reached")}if(g.length==0)return{node1:b,node2:k,edge_name:y,note:_,level_weight:d};throw new hv(g)}catch(p){if(p instanceof tn){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 p}}_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,m,y){const _=this._check_node_schema_match(a,m),d=this._check_node_schema_match(h,y),v=this._check_node_schema_match(h,m),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,m){try{if(!a||!h||!m)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 p=`
|
|
17
17
|
"use strict";
|
|
18
18
|
const {doc, schema} = arguments[0] || {};
|
|
19
19
|
${f}
|
|
20
20
|
`;try{const b=new Function(p)(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:m,schema:h}).text;if(this.utils.compile_template[y.engine]){let _=this.utils.compile_template[y.engine](y.template,{doc:m,schema:h});if(!_.text)throw new Error(`${s} 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 ${s}.Error: ${y.message}`}}async _upgrade_schema_in_bulk(s,h=!1,m="Schema Upgrade in bulk"){let y=["schema update started"],_=!1;for(let d=0;d<s.length;d++){const v=s[d].name,i=s[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 p=await this.db_api.get(f._id);p.data={...i},p.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(p),await this.db_api.update(p),y.push(`new.${v}.v=${i.version}`),_=_||!0}else y.push(`${v}.v.${f.data.version}=latest`)}catch(f){if(f instanceof Kr){let p=Io.schemas[0].schema,g=this._get_blank_schema_doc("schema",p,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:m,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 s=0;if(Io.schemas.map(h=>{s=s+h.version}),Io.records.map(h=>{s=s+h.version}),s==NaN)throw Error("Error in system schema version numbers");return s}_check_ready_to_use(){if(!this.active)throw new Error(Tr.error_codes.not_active)}_get_blank_doc(s){if(!s)throw new Error("Schema name not provided for the blank doc");let h=this.util_get_now_unix_timestamp(),m=`${h}`;return{data:{},meta:{created_on:h,tags:[],link:this.util_generate_random_link(),title:m},app:{},schema:s}}_get_blank_schema_doc(s,h,m){let y=this.util_validate_data({schema:h,data:m}),_=this._get_blank_doc(s);return _.data=y,_}async _decrypt_doc(s,h){try{for(let m of s.settings.encrypted_fields)h.data[m]=await this.utils.decrypt(h.data[m],this.encryption_key);return{...h}}catch(m){throw console.log(m),new th([{message:m.message}])}}async _encrypt_doc(s,h){try{if(s.settings.encrypted_fields.length>0)for(let m of s.settings.encrypted_fields)h.data[m]=await this.utils.encrypt(h.data[m],this.encryption_key);return{...h}}catch(m){throw new th([{message:m.message}])}}async _insert_pre_checks(s,h,m={},y={},_={}){let d=await this.search({selector:{schema:"schema","data.name":s}});if(d.docs.length==0)throw new Wn(`The schema "${s}" does not exists`);let v=d.docs[0].data;if(!v.active)throw new Wn(`The schema "${s}" is not active`);let i;if(s!="system_edge"&&(i=this.util_validate_data({schema:v.schema,data:h})),Object.keys(m).length>0&&(m=this.util_validate_data({schema:ml,data:m})),Object.keys(y).length>0){let p={type:"object",patternProperties:{".*":{type:"object"}},additionalProperties:!1};this.util_validate_data({schema:p,data:y})}if(m.link&&(await this.search({selector:{"meta.link":m.link}})).docs.length>0)throw new Wn(`Document with the link "${m.link}" already exists in the Database.`);if(s=="schema"?this.util_validate_schema_object(i):s=="system_edge"&&(i=await this._create_edge(h)),v.settings.primary_keys.length>0){let p={schema:s};if(v.settings.primary_keys.map(b=>{p["data."+b]=i[b]}),(await this.search({selector:p})).docs.length>0)throw new Wn(`Document with the given primary key (${v.settings.primary_keys.join(",")}) already exists in the schema "${s}"`)}if(v.settings.encrypted_fields.length>0)for(let p of v.settings.encrypted_fields)i[p]=await this.utils.encrypt(i[p],this.encryption_key);let f=this._get_blank_doc(s);return f.data=i,m&&(f.meta={...f.meta,...m}),y&&(f.app=y),f}util_get_now_unix_timestamp(){return Math.floor(Date.now()/1e3)}util_check_required_fields(s,h){for(const m of s)if(!h[m])throw new Tt(`The field ${m} is required.`)}util_filter_object(s,h){return h.reduce((m,y)=>(Object.prototype.hasOwnProperty.call(s,y)&&(m[y]=s[y]),m),{})}util_validate_data(s){if(!s.schema)throw new Tt("schema is required");if(!s.data)throw new Tt("data is required");const{valid:h,validate:m,data:y}=this.utils.validate_schema(s.schema,s.data);if(h)return y;throw new Tt(m.errors)}util_validate_schema_object(s){let h=[{message:"Schema validation errors "}];s.schema.type?s.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' "}),s.schema.properties?(typeof s.schema.properties!="object"&&h.push({message:"Invalid schema.properties. It must be an object and must have atleast one field inside."}),Object.keys(s.schema.properties).length==0&&h.push({message:"You must define at least one property"})):h.push({message:"The schema.'properties' object does not exists"}),s.schema.hasOwnProperty("additionalProperties")?typeof s.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 m=Object.keys(s.schema.properties);if(s.settings.primary_keys.length>0&&(s.settings.primary_keys.every(_=>m.includes(_)&&s.schema.properties[_].type!="object"&&s.schema.properties[_].type!="array")||h.push({message:"Primary keys invalid. All keys must be defined in the schema and must be non object"})),s.settings.non_editable_fields.length>0&&(s.settings.non_editable_fields.every(_=>m.includes(_))||h.push({message:"Non editable fields invalid. All fields must be defined in the schema "})),s.settings.encrypted_fields.length>0&&(s.settings.encrypted_fields.every(d=>m.includes(d)&&s.schema.properties[d].type=="string")||h.push({message:"Invalid encrypted fields. All fields must be defined in the schema and must be string "}),s.settings.encrypted_fields.every(d=>!s.settings.primary_keys.includes(d))||h.push({message:"Invalid encrypted fields.Primary key fields cannot be encrypted "})),h.length>1)throw new Tt(h)}util_generate_random_link(s={type:1}){return{0:()=>{const m=["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},()=>m[Math.floor(Math.random()*m.length)]).join("-")},1:()=>{const m=Math.floor(Math.random()*3)+6;return Math.floor(Math.random()*Math.pow(16,m)).toString(16).padStart(m,"0")}}[s.type]()}}class Tt extends Error{constructor(s=[]){let h;Array.isArray(s)?h=s.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[s];let m=`Validation failed with error(s): ${h.join(",")}`;super(m),this.name="ValidationError",this.errors=s}}class Rr extends Error{constructor(s=[]){let h;Array.isArray(s)?h=s.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[s];let m=`Error in document update. ${h.join(",")}`;super(m),this.name="DocUpdateError",this.errors=s}}class Wn extends Error{constructor(s=[]){let h;Array.isArray(s)?h=s.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[s];let m=`Error in document creation. ${h.join(",")}`;super(m),this.name="DocCreationError",this.errors=s}}class Kr extends Error{constructor(s=[]){let h;Array.isArray(s)?h=s.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[s];let m=`Error in fetching document. Criteria : ${h.join(",")}`;super(m),this.name="DocNotFoundError",this.errors=s}}class th extends Error{constructor(s=[]){let h;Array.isArray(s)?h=s.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[s];let m=`Error in encryption/decryption of data : ${h.join(",")}`;super(m),this.name="EncryptionError",this.errors=s}}class tv extends Error{constructor(s=[]){let h;Array.isArray(s)?h=s.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[s];let m=`Error in relation of the simple digraph : ${h.join(",")}`;super(m),this.name="RelationError",this.errors=s}}var rv=Object.prototype.toString,Pi=Array.isArray||function(s){return rv.call(s)==="[object Array]"};function yl(o){return typeof o=="function"}function nv(o){return Pi(o)?"array":typeof o}function vl(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function rh(o,s){return o!=null&&typeof o=="object"&&s in o}function iv(o,s){return o!=null&&typeof o!="object"&&o.hasOwnProperty&&o.hasOwnProperty(s)}var ov=RegExp.prototype.test;function sv(o,s){return ov.call(o,s)}var av=/\S/;function lv(o){return!sv(av,o)}var cv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function uv(o){return String(o).replace(/[&<>"'`=\/]/g,function(h){return cv[h]})}var dv=/\s*/,hv=/\s+/,nh=/\s*=/,fv=/\s*\}/,pv=/#|\^|\/|>|\{|&|=|!/;function mv(o,s){if(!o)return[];var h=!1,m=[],y=[],_=[],d=!1,v=!1,i="",f=0;function p(){if(d&&!v)for(;_.length;)delete y[_.pop()];else _=[];d=!1,v=!1}var g,b,j;function O(I){if(typeof I=="string"&&(I=I.split(hv,2)),!Pi(I)||I.length!==2)throw new Error("Invalid tags: "+I);g=new RegExp(vl(I[0])+"\\s*"),b=new RegExp("\\s*"+vl(I[1])),j=new RegExp("\\s*"+vl("}"+I[1]))}O(s||nr.tags);for(var E=new No(o),k,S,x,P,A,C;!E.eos();){if(k=E.pos,x=E.scanUntil(g),x)for(var R=0,L=x.length;R<L;++R)P=x.charAt(R),lv(P)?(_.push(y.length),i+=P):(v=!0,h=!0,i+=" "),y.push(["text",P,k,k+1]),k+=1,P===`
|
|
22
|
-
`&&(p(),i="",f=0,h=!1);if(!
|
|
21
|
+
Script: ${f.substring(0,100)}...`)}})(y.template,{doc:m,schema:h}).text;if(this.utils.compile_template[y.engine]){let _=this.utils.compile_template[y.engine](y.template,{doc:m,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,m="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 p=await this.db_api.get(f._id);p.data={...i},p.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(p),await this.db_api.update(p),y.push(`new.${v}.v=${i.version}`),_=_||!0}else y.push(`${v}.v.${f.data.version}=latest`)}catch(f){if(f instanceof tn){let p=Mo.schemas[0].schema,g=this._get_blank_schema_doc("schema",p,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:m,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(Mo.schemas.map(h=>{a=a+h.version}),Mo.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(Dr.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(),m=`${h}`;return{data:{},meta:{created_on:h,tags:[],link:this.util_generate_random_link(),title:m},app:{},schema:a}}_get_blank_schema_doc(a,h,m){let y=this.util_validate_data({schema:h,data:m}),_=this._get_blank_doc(a);return _.data=y,_}async _decrypt_doc(a,h){try{for(let m of a.settings.encrypted_fields)h.data[m]=await this.utils.decrypt(h.data[m],this.encryption_key);return{...h}}catch(m){throw console.log(m),new dh([{message:m.message}])}}async _encrypt_doc(a,h){try{if(a.settings.encrypted_fields.length>0)for(let m of a.settings.encrypted_fields)h.data[m]=await this.utils.encrypt(h.data[m],this.encryption_key);return{...h}}catch(m){throw new dh([{message:m.message}])}}async _insert_pre_checks(a,h,m={},y={},_={}){let d=await this.search({selector:{schema:"schema","data.name":a}});if(d.docs.length==0)throw new Qn(`The schema "${a}" does not exists`);let v=d.docs[0].data;if(!v.active)throw new Qn(`The schema "${a}" is not active`);let i;if(a!="system_edge"&&(i=this.util_validate_data({schema:v.schema,data:h})),Object.keys(m).length>0&&(m=this.util_validate_data({schema:El,data:m})),Object.keys(y).length>0){let p={type:"object",patternProperties:{".*":{type:"object"}},additionalProperties:!1};this.util_validate_data({schema:p,data:y})}if(m.link&&(await this.search({selector:{"meta.link":m.link}})).docs.length>0)throw new Qn(`Document with the link "${m.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 p={schema:a};if(v.settings.primary_keys.map(b=>{p["data."+b]=i[b]}),(await this.search({selector:p})).docs.length>0)throw new Qn(`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 p of v.settings.encrypted_fields)i[p]=await this.utils.encrypt(i[p],this.encryption_key);let f=this._get_blank_doc(a);return f.data=i,m&&(f.meta={...f.meta,...m}),y&&(f.app=y),f}util_get_now_unix_timestamp(){return Math.floor(Date.now()/1e3)}util_check_required_fields(a,h){for(const m of a)if(!h[m])throw new Dt(`The field ${m} is required.`)}util_filter_object(a,h){return h.reduce((m,y)=>(Object.prototype.hasOwnProperty.call(a,y)&&(m[y]=a[y]),m),{})}util_validate_data(a){if(!a.schema)throw new Dt("schema is required");if(!a.data)throw new Dt("data is required");const{valid:h,validate:m,data:y}=this.utils.validate_schema(a.schema,a.data);if(h)return y;throw new Dt(m.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 m=Object.keys(a.schema.properties);if(a.settings.primary_keys.length>0&&(a.settings.primary_keys.every(_=>m.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(_=>m.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=>m.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 Dt(h)}util_generate_random_link(a={type:1}){return{0:()=>{const m=["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},()=>m[Math.floor(Math.random()*m.length)]).join("-")},1:()=>{const m=Math.floor(Math.random()*3)+6;return Math.floor(Math.random()*Math.pow(16,m)).toString(16).padStart(m,"0")}}[a.type]()}}class Dt extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let m=`Validation failed with error(s): ${h.join(",")}`;super(m),this.name="ValidationError",this.errors=a}}class Br extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let m=`Error in document update. ${h.join(",")}`;super(m),this.name="DocUpdateError",this.errors=a}}class Qn extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let m=`Error in document creation. ${h.join(",")}`;super(m),this.name="DocCreationError",this.errors=a}}class tn extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let m=`Error in fetching document. Criteria : ${h.join(",")}`;super(m),this.name="DocNotFoundError",this.errors=a}}class dh extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let m=`Error in encryption/decryption of data : ${h.join(",")}`;super(m),this.name="EncryptionError",this.errors=a}}class hv extends Error{constructor(a=[]){let h;Array.isArray(a)?h=a.map(y=>` ${(y.instancePath||" ").replace("/","")} ${y.message} `):h=[a];let m=`Error in relation of the simple digraph : ${h.join(",")}`;super(m),this.name="RelationError",this.errors=a}}var fv=Object.prototype.toString,Li=Array.isArray||function(a){return fv.call(a)==="[object Array]"};function Ol(o){return typeof o=="function"}function pv(o){return Li(o)?"array":typeof o}function xl(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hh(o,a){return o!=null&&typeof o=="object"&&a in o}function mv(o,a){return o!=null&&typeof o!="object"&&o.hasOwnProperty&&o.hasOwnProperty(a)}var yv=RegExp.prototype.test;function vv(o,a){return yv.call(o,a)}var bv=/\S/;function gv(o){return!vv(bv,o)}var _v={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function wv(o){return String(o).replace(/[&<>"'`=\/]/g,function(h){return _v[h]})}var kv=/\s*/,jv=/\s+/,fh=/\s*=/,Ev=/\s*\}/,Ov=/#|\^|\/|>|\{|&|=|!/;function xv(o,a){if(!o)return[];var h=!1,m=[],y=[],_=[],d=!1,v=!1,i="",f=0;function p(){if(d&&!v)for(;_.length;)delete y[_.pop()];else _=[];d=!1,v=!1}var g,b,k;function E(I){if(typeof I=="string"&&(I=I.split(jv,2)),!Li(I)||I.length!==2)throw new Error("Invalid tags: "+I);g=new RegExp(xl(I[0])+"\\s*"),b=new RegExp("\\s*"+xl(I[1])),k=new RegExp("\\s*"+xl("}"+I[1]))}E(a||ir.tags);for(var O=new Vo(o),j,x,S,C,L,T;!O.eos();){if(j=O.pos,S=O.scanUntil(g),S)for(var R=0,A=S.length;R<A;++R)C=S.charAt(R),gv(C)?(_.push(y.length),i+=C):(v=!0,h=!0,i+=" "),y.push(["text",C,j,j+1]),j+=1,C===`
|
|
22
|
+
`&&(p(),i="",f=0,h=!1);if(!O.scan(g))break;if(d=!0,x=O.scan(Ov)||"name",O.scan(kv),x==="="?(S=O.scanUntil(fh),O.scan(fh),O.scanUntil(b)):x==="{"?(S=O.scanUntil(k),O.scan(Ev),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==="^")m.push(L);else if(x==="/"){if(T=m.pop(),!T)throw new Error('Unopened section "'+S+'" at '+j);if(T[1]!==S)throw new Error('Unclosed section "'+T[1]+'" at '+j)}else x==="name"||x==="{"||x==="&"?v=!0:x==="="&&E(S)}if(p(),T=m.pop(),T)throw new Error('Unclosed section "'+T[1]+'" at '+O.pos);return Cv(Sv(y))}function Sv(o){for(var a=[],h,m,y=0,_=o.length;y<_;++y)h=o[y],h&&(h[0]==="text"&&m&&m[0]==="text"?(m[1]+=h[1],m[3]=h[3]):(a.push(h),m=h));return a}function Cv(o){for(var a=[],h=a,m=[],y,_,d=0,v=o.length;d<v;++d)switch(y=o[d],y[0]){case"#":case"^":h.push(y),m.push(y),h=y[4]=[];break;case"/":_=m.pop(),_[5]=y[2],h=m.length>0?m[m.length-1][4]:a;break;default:h.push(y)}return a}function Vo(o){this.string=o,this.tail=o,this.pos=0}Vo.prototype.eos=function(){return this.tail===""},Vo.prototype.scan=function(a){var h=this.tail.match(a);if(!h||h.index!==0)return"";var m=h[0];return this.tail=this.tail.substring(m.length),this.pos+=m.length,m},Vo.prototype.scanUntil=function(a){var h=this.tail.search(a),m;switch(h){case-1:m=this.tail,this.tail="";break;case 0:m="";break;default:m=this.tail.substring(0,h),this.tail=this.tail.substring(h)}return this.pos+=m.length,m};function Ai(o,a){this.view=o,this.cache={".":this.view},this.parent=a}Ai.prototype.push=function(a){return new Ai(a,this)},Ai.prototype.lookup=function(a){var h=this.cache,m;if(h.hasOwnProperty(a))m=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=hh(_,d[v])||mv(_,d[v])),_=_[d[v++]];else _=y.view[a],i=hh(y.view,a);if(i){m=_;break}y=y.parent}h[a]=m}return Ol(m)&&(m=m.call(this.view)),m};function Ht(){this.templateCache={_cache:{},set:function(a,h){this._cache[a]=h},get:function(a){return this._cache[a]},clear:function(){this._cache={}}}}Ht.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},Ht.prototype.parse=function(a,h){var m=this.templateCache,y=a+":"+(h||ir.tags).join(":"),_=typeof m<"u",d=_?m.get(y):void 0;return d==null&&(d=xv(a,h),_&&m.set(y,d)),d},Ht.prototype.render=function(a,h,m,y){var _=this.getConfigTags(y),d=this.parse(a,_),v=h instanceof Ai?h:new Ai(h,void 0);return this.renderTokens(d,v,m,a,y)},Ht.prototype.renderTokens=function(a,h,m,y,_){for(var d="",v,i,f,p=0,g=a.length;p<g;++p)f=void 0,v=a[p],i=v[0],i==="#"?f=this.renderSection(v,h,m,y,_):i==="^"?f=this.renderInverted(v,h,m,y,_):i===">"?f=this.renderPartial(v,h,m,_):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},Ht.prototype.renderSection=function(a,h,m,y,_){var d=this,v="",i=h.lookup(a[1]);function f(b){return d.render(b,h,m,_)}if(i){if(Li(i))for(var p=0,g=i.length;p<g;++p)v+=this.renderTokens(a[4],h.push(i[p]),m,y,_);else if(typeof i=="object"||typeof i=="string"||typeof i=="number")v+=this.renderTokens(a[4],h.push(i),m,y,_);else if(Ol(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,m,y,_);return v}},Ht.prototype.renderInverted=function(a,h,m,y,_){var d=h.lookup(a[1]);if(!d||Li(d)&&d.length===0)return this.renderTokens(a[4],h,m,y,_)},Ht.prototype.indentPartial=function(a,h,m){for(var y=h.replace(/[^ \t]/g,""),_=a.split(`
|
|
23
23
|
`),d=0;d<_.length;d++)_[d].length&&(d>0||!m)&&(_[d]=y+_[d]);return _.join(`
|
|
24
|
-
`)},It.prototype.renderPartial=function(s,h,m,y){if(m){var _=this.getConfigTags(y),d=yl(m)?m(s[1]):m[s[1]];if(d!=null){var v=s[6],i=s[5],f=s[4],p=d;i==0&&f&&(p=this.indentPartial(d,f,v));var g=this.parse(p,_);return this.renderTokens(g,h,m,p,y)}}},It.prototype.unescapedValue=function(s,h){var m=h.lookup(s[1]);if(m!=null)return m},It.prototype.escapedValue=function(s,h,m){var y=this.getConfigEscape(m)||nr.escape,_=h.lookup(s[1]);if(_!=null)return typeof _=="number"&&y===nr.escape?String(_):y(_)},It.prototype.rawValue=function(s){return s[1]},It.prototype.getConfigTags=function(s){return Pi(s)?s:s&&typeof s=="object"?s.tags:void 0},It.prototype.getConfigEscape=function(s){if(s&&typeof s=="object"&&!Pi(s))return s.escape};var nr={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){Do.templateCache=o},get templateCache(){return Do.templateCache}},Do=new It;nr.clearCache=function(){return Do.clearCache()},nr.parse=function(s,h){return Do.parse(s,h)},nr.render=function(s,h,m,y){if(typeof s!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+nv(s)+'" was given as the first argument for mustache#render(template, view, partials)');return Do.render(s,h,m,y)},nr.escape=uv,nr.Scanner=No,nr.Context=Ti,nr.Writer=It;function bv(o){try{const s=new URL(o),h=s.username,m=s.password;if(!h||!m)throw new Error("Username and password must be in URL (http://user:pass@host:port)");const y=`${s.protocol}//${s.host}`;return{username:h,password:m,baseUrl:y}}catch(s){throw new Error(`Invalid CouchDB URL format: ${s.message}. Use: http://user:pass@host:port`)}}const gv=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:s,password:h,baseUrl:m}=bv(o.url);let y=o.name;console.log(m);const _=o.url.match(/^(https?:\/\/[^\/]+(?:\/[^\/]+)*)\/([^\/]+)$/);_&&(_[1],y=o.name||_[2]);const d=dt.create({baseURL:`${m}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:s,password:h}}),v=dt.create({baseURL:`${m}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:s,password:h}});try{await v.get("/")}catch(p){if(p.response?.status===404)await d.put(`/${y}`),console.log(`Created database: ${y}`);else throw p}const i={db_name:"couchdb-rest",name:y,encryption_key:o.encryption_key,api:{insert:async p=>(await v.post("/",p)).data,update:async p=>{if(!p._id||!p._rev)throw new Error("Document must have _id and _rev for update");return(await v.put(`/${p._id}`,p)).data},search:async p=>(await v.post("_find",p)).data,get:async p=>(await v.get(`/${p}`)).data,createIndex:async p=>(await v.post("_index",p)).data,delete:async p=>{const g=await v.get(`/${p}`);return(await v.delete(`/${g._id}?rev=${g._rev}`)).data}},utils:{encrypt:async(p,g)=>{const b=new TextEncoder,j=b.encode(p),O=b.encode(g);if(![16,24,32].includes(O.length))throw new Error("Encryption key must be 16, 24, or 32 bytes long.");const E=await crypto.subtle.importKey("raw",O,{name:"AES-GCM"},!1,["encrypt"]),k=crypto.getRandomValues(new Uint8Array(12)),S=await crypto.subtle.encrypt({name:"AES-GCM",iv:k},E,j),x=new Uint8Array(S),P=btoa(String.fromCharCode(...x));return`${btoa(String.fromCharCode(...k))}:${P}`},decrypt:async(p,g)=>{const[b,j]=p.split(":"),O=Uint8Array.from(atob(b),A=>A.charCodeAt(0)),E=Uint8Array.from(atob(j),A=>A.charCodeAt(0)),k=new TextEncoder,S=await crypto.subtle.importKey("raw",k.encode(g),{name:"AES-GCM"},!1,["decrypt"]),x=await crypto.subtle.decrypt({name:"AES-GCM",iv:O},S,E);return new TextDecoder().decode(x)},ping:async()=>{try{return await v.get("/"),!0}catch{return!1}},validate_schema:(p,g)=>{const b=new Xy({code:{esm:!0},strict:!1,useDefaults:!0}),j={...g},O=b.compile(p);return{valid:O(j),validate:O,data:j}},compile_template:{mustache:(p,g)=>nr.render(p,g)}}};return new Tr(i)},_v="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(_v);const wv=1,kv=2,ih=4,jv=8,Ov=16,Ev=1,Sv=4,xv=8,Cv=16,Pv=1,Tv=2,oh="[",ia="[!",bl="]",Ri={},Ot=Symbol(),gl=!1;var sh=Array.isArray,Rv=Array.prototype.indexOf,oa=Array.from,sa=Object.keys,aa=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,Av=Object.prototype,Lv=Array.prototype,$v=Object.getPrototypeOf,ah=Object.isExtensible;function Iv(o){for(var s=0;s<o.length;s++)o[s]()}function lh(){var o,s,h=new Promise((m,y)=>{o=m,s=y});return{promise:h,resolve:o,reject:s}}const Et=2,la=4,ca=8,ch=1<<24,Wr=16,Zr=32,mn=64,_l=128,ir=512,Rt=1024,Nt=2048,Yr=4096,Zt=8192,Qr=16384,ua=32768,Ai=65536,uh=1<<17,dh=1<<18,Yn=1<<19,Nv=1<<20,Xr=1<<25,Qn=32768,wl=1<<21,kl=1<<22,yn=1<<23,Bo=Symbol("$state"),hh=Symbol("legacy props"),Li=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},da=3,$i=8;function Dv(o){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Bv(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Fv(o){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Mv(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qv(o){throw new Error("https://svelte.dev/e/effect_orphan")}function Vv(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function zv(){throw new Error("https://svelte.dev/e/hydration_failed")}function Hv(o){throw new Error("https://svelte.dev/e/props_invalid_value")}function Uv(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Gv(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Jv(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Kv(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ha(o){console.warn("https://svelte.dev/e/hydration_mismatch")}function Wv(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let it=!1;function en(o){it=o}let Qe;function Dt(o){if(o===null)throw ha(),Ri;return Qe=o}function fa(){return Dt(Ar(Qe))}function Yt(o){if(it){if(Ar(Qe)!==null)throw ha(),Ri;Qe=o}}function Zv(o=1){if(it){for(var s=o,h=Qe;s--;)h=Ar(h);Qe=h}}function pa(o=!0){for(var s=0,h=Qe;;){if(h.nodeType===$i){var m=h.data;if(m===bl){if(s===0)return h;s-=1}else(m===oh||m===ia)&&(s+=1)}var y=Ar(h);o&&h.remove(),h=y}}function fh(o){if(!o||o.nodeType!==$i)throw ha(),Ri;return o.data}function ph(o){return o===this.v}function Yv(o,s){return o!=o?s==s:o!==s||o!==null&&typeof o=="object"||typeof o=="function"}function mh(o){return!Yv(o,this.v)}let Qv=!1,Qt=null;function Ii(o){Qt=o}function ma(o,s=!1,h){Qt={p:Qt,i:!1,c:null,e:null,s:o,x:null,l:null}}function ya(o){var s=Qt,h=s.e;if(h!==null){s.e=null;for(var m of h)Bh(m)}return o!==void 0&&(s.x=o),s.i=!0,Qt=s.p,o??{}}function yh(){return!0}let Xn=[];function vh(){var o=Xn;Xn=[],Iv(o)}function Fo(o){if(Xn.length===0&&!Mo){var s=Xn;queueMicrotask(()=>{s===Xn&&vh()})}Xn.push(o)}function Xv(){for(;Xn.length>0;)vh()}function bh(o){var s=Xe;if(s===null)return Ue.f|=yn,o;if((s.f&ua)===0){if((s.f&_l)===0)throw o;s.b.error(o)}else Ni(o,s)}function Ni(o,s){for(;s!==null;){if((s.f&_l)!==0)try{s.b.error(o);return}catch(h){o=h}s=s.parent}throw o}const eb=-7169;function gt(o,s){o.f=o.f&eb|s}function jl(o){(o.f&ir)!==0||o.deps===null?gt(o,Rt):gt(o,Yr)}function gh(o){if(o!==null)for(const s of o)(s.f&Et)===0||(s.f&Qn)===0||(s.f^=Qn,gh(s.deps))}function _h(o,s,h){(o.f&Nt)!==0?s.add(o):(o.f&Yr)!==0&&h.add(o),gh(o.deps),gt(o,Rt)}const va=new Set;let ut=null,hr=null,or=[],ba=null,Ol=!1,Mo=!1;class fr{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#o=0;#s=null;#i=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#o>0}process(s){or=[],this.apply();var h=[],m=[];for(const y of s)this.#a(y,h,m);this.is_fork||this.#c(),this.is_deferred()?(this.#l(m),this.#l(h)):(ut=null,kh(m),kh(h),this.#s?.resolve()),hr=null}#a(s,h,m){s.f^=Rt;for(var y=s.first,_=null;y!==null;){var d=y.f,v=(d&(Zr|mn))!==0,i=v&&(d&Rt)!==0,f=i||(d&Zt)!==0||this.skipped_effects.has(y);if(!f&&y.fn!==null){v?y.f^=Rt:_!==null&&(d&(la|ca|ch))!==0?_.b.defer_effect(y):(d&la)!==0?h.push(y):zo(y)&&((d&Wr)!==0&&this.#i.add(y),Ho(y));var p=y.first;if(p!==null){y=p;continue}}var g=y.parent;for(y=y.next;y===null&&g!==null;)g===_&&(_=null),y=g.next,g=g.parent}}#l(s){for(var h=0;h<s.length;h+=1)_h(s[h],this.#i,this.#n)}capture(s,h){h!==Ot&&!this.previous.has(s)&&this.previous.set(s,h),(s.f&yn)===0&&(this.current.set(s,s.v),hr?.set(s,s.v))}activate(){ut=this,this.apply()}deactivate(){ut===this&&(ut=null,hr=null)}flush(){if(this.activate(),or.length>0){if(wh(),ut!==null&&ut!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const s of this.#t)s(this);this.#t.clear()}#c(){if(this.#o===0){for(const s of this.#e)s();this.#e.clear()}this.#r===0&&this.#u()}#u(){if(va.size>1){this.previous.clear();var s=hr,h=!0;for(const y of va){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 m=or;or=[];const v=new Set,i=new Map;for(const f of _)jh(f,d,v,i);if(or.length>0){ut=y,y.apply();for(const f of or)y.#a(f,[],[]);y.deactivate()}or=m}}ut=null,hr=s}this.committed=!0,va.delete(this)}increment(s){this.#r+=1,s&&(this.#o+=1)}decrement(s){this.#r-=1,s&&(this.#o-=1),this.revive()}revive(){for(const s of this.#i)this.#n.delete(s),gt(s,Nt),rn(s);for(const s of this.#n)gt(s,Yr),rn(s);this.flush()}oncommit(s){this.#e.add(s)}ondiscard(s){this.#t.add(s)}settled(){return(this.#s??=lh()).promise}static ensure(){if(ut===null){const s=ut=new fr;va.add(ut),Mo||fr.enqueue(()=>{ut===s&&s.flush()})}return ut}static enqueue(s){Fo(s)}apply(){}}function sr(o){var s=Mo;Mo=!0;try{for(var h;;){if(Xv(),or.length===0&&(ut?.flush(),or.length===0))return ba=null,h;wh()}}finally{Mo=s}}function wh(){var o=ni;Ol=!0;var s=null;try{var h=0;for(_a(!0);or.length>0;){var m=fr.ensure();if(h++>1e3){var y,_;tb()}m.process(or),vn.clear()}}finally{Ol=!1,_a(o),ba=null}}function tb(){try{Vv()}catch(o){Ni(o,ba)}}let tn=null;function kh(o){var s=o.length;if(s!==0){for(var h=0;h<s;){var m=o[h++];if((m.f&(Qr|Zt))===0&&zo(m)&&(tn=new Set,Ho(m),m.deps===null&&m.first===null&&m.nodes===null&&(m.teardown===null&&m.ac===null?Vh(m):m.fn=null),tn?.size>0)){vn.clear();for(const y of tn){if((y.f&(Qr|Zt))!==0)continue;const _=[y];let d=y.parent;for(;d!==null;)tn.has(d)&&(tn.delete(d),_.push(d)),d=d.parent;for(let v=_.length-1;v>=0;v--){const i=_[v];(i.f&(Qr|Zt))===0&&Ho(i)}}tn.clear()}}tn=null}}function jh(o,s,h,m){if(!h.has(o)&&(h.add(o),o.reactions!==null))for(const y of o.reactions){const _=y.f;(_&Et)!==0?jh(y,s,h,m):(_&(kl|Wr))!==0&&(_&Nt)===0&&Oh(y,s,m)&&(gt(y,Nt),rn(y))}}function Oh(o,s,h){const m=h.get(o);if(m!==void 0)return m;if(o.deps!==null)for(const y of o.deps){if(s.includes(y))return!0;if((y.f&Et)!==0&&Oh(y,s,h))return h.set(y,!0),!0}return h.set(o,!1),!1}function rn(o){for(var s=ba=o;s.parent!==null;){s=s.parent;var h=s.f;if(Ol&&s===Xe&&(h&Wr)!==0&&(h&dh)===0)return;if((h&(mn|Zr))!==0){if((h&Rt)===0)return;s.f^=Rt}}or.push(s)}function rb(o){let s=0,h=ei(0),m;return()=>{Pl()&&(Ce(h),Tl(()=>(s===0&&(m=ka(()=>o(()=>qo(h)))),s+=1,()=>{Fo(()=>{s-=1,s===0&&(m?.(),m=void 0,qo(h))})})))}}var nb=Ai|Yn|_l;function ib(o,s,h){new ob(o,s,h)}class ob{parent;is_pending=!1;#e;#t=it?Qe:null;#r;#o;#s;#i=null;#n=null;#a=null;#l=null;#c=null;#u=0;#d=0;#f=!1;#p=new Set;#m=new Set;#h=null;#_=rb(()=>(this.#h=ei(this.#u),()=>{this.#h=null}));constructor(s,h,m){this.#e=s,this.#r=h,this.#o=m,this.parent=Xe.b,this.is_pending=!!this.#r.pending,this.#s=Rl(()=>{if(Xe.b=this,it){const _=this.#t;fa(),_.nodeType===$i&&_.data===ia?this.#k():(this.#w(),this.#d===0&&(this.is_pending=!1))}else{var y=this.#b();try{this.#i=ar(()=>m(y))}catch(_){this.error(_)}this.#d>0?this.#v():this.is_pending=!1}return()=>{this.#c?.remove()}},nb),it&&(this.#e=Qe)}#w(){try{this.#i=ar(()=>this.#o(this.#e))}catch(s){this.error(s)}}#k(){const s=this.#r.pending;s&&(this.#n=ar(()=>s(this.#e)),fr.enqueue(()=>{var h=this.#b();this.#i=this.#y(()=>(fr.ensure(),ar(()=>this.#o(h)))),this.#d>0?this.#v():(ri(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var s=this.#e;return this.is_pending&&(this.#c=Jt(),this.#e.before(this.#c),s=this.#c),s}defer_effect(s){_h(s,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#y(s){var h=Xe,m=Ue,y=Qt;$r(this.#s),Kt(this.#s),Ii(this.#s.ctx);try{return s()}catch(_){return bh(_),null}finally{$r(h),Kt(m),Ii(y)}}#v(){const s=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),Uh(this.#i,this.#l)),this.#n===null&&(this.#n=ar(()=>s(this.#e)))}#g(s){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(s);return}if(this.#d+=s,this.#d===0){this.is_pending=!1;for(const h of this.#p)gt(h,Nt),rn(h);for(const h of this.#m)gt(h,Yr),rn(h);this.#p.clear(),this.#m.clear(),this.#n&&ri(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(s){this.#g(s),this.#u+=s,this.#h&&Di(this.#h,this.#u)}get_effect_pending(){return this.#_(),Ce(this.#h)}error(s){var h=this.#r.onerror;let m=this.#r.failed;if(this.#f||!h&&!m)throw s;this.#i&&(Bt(this.#i),this.#i=null),this.#n&&(Bt(this.#n),this.#n=null),this.#a&&(Bt(this.#a),this.#a=null),it&&(Dt(this.#t),Zv(),Dt(pa()));var y=!1,_=!1;const d=()=>{if(y){Wv();return}y=!0,_&&Kv(),fr.ensure(),this.#u=0,this.#a!==null&&ri(this.#a,()=>{this.#a=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#y(()=>(this.#f=!1,ar(()=>this.#o(this.#e)))),this.#d>0?this.#v():this.is_pending=!1};var v=Ue;try{Kt(null),_=!0,h?.(s,d),_=!1}catch(i){Ni(i,this.#s&&this.#s.parent)}finally{Kt(v)}m&&Fo(()=>{this.#a=this.#y(()=>{fr.ensure(),this.#f=!0;try{return ar(()=>{m(this.#e,()=>s,()=>d)})}catch(i){return Ni(i,this.#s.parent),null}finally{this.#f=!1}})})}}function sb(o,s,h,m){const y=El;if(h.length===0&&o.length===0){m(s.map(y));return}var _=ut,d=Xe,v=ab();function i(){Promise.all(h.map(f=>lb(f))).then(f=>{v();try{m([...s.map(y),...f])}catch(p){(d.f&Qr)===0&&Ni(p,d)}_?.deactivate(),ga()}).catch(f=>{Ni(f,d)})}o.length>0?Promise.all(o).then(()=>{v();try{return i()}finally{_?.deactivate(),ga()}}):i()}function ab(){var o=Xe,s=Ue,h=Qt,m=ut;return function(_=!0){$r(o),Kt(s),Ii(h),_&&m?.activate()}}function ga(){$r(null),Kt(null),Ii(null)}function El(o){var s=Et|Nt,h=Ue!==null&&(Ue.f&Et)!==0?Ue:null;return Xe!==null&&(Xe.f|=Yn),{ctx:Qt,deps:null,effects:null,equals:ph,f:s,fn:o,reactions:null,rv:0,v:Ot,wv:0,parent:h??Xe,ac:null}}function lb(o,s,h){let m=Xe;m===null&&Bv();var y=m.b,_=void 0,d=ei(Ot),v=!Ue,i=new Map;return vb(()=>{var f=lh();_=f.promise;try{Promise.resolve(o()).then(f.resolve,f.reject).then(()=>{p===ut&&p.committed&&p.deactivate(),ga()})}catch(j){f.reject(j),ga()}var p=ut;if(v){var g=y.is_rendered();y.update_pending_count(1),p.increment(g),i.get(p)?.reject(Li),i.delete(p),i.set(p,f)}const b=(j,O=void 0)=>{if(p.activate(),O)O!==Li&&(d.f|=yn,Di(d,O));else{(d.f&yn)!==0&&(d.f^=yn),Di(d,j);for(const[E,k]of i){if(i.delete(E),E===p)break;k.reject(Li)}}v&&(y.update_pending_count(-1),p.decrement(g))};f.promise.then(b,j=>b(null,j||"unknown"))}),fb(()=>{for(const f of i.values())f.reject(Li)}),new Promise(f=>{function p(g){function b(){g===_?f(d):p(_)}g.then(b,b)}p(_)})}function Eh(o){const s=El(o);return s.equals=mh,s}function Sh(o){var s=o.effects;if(s!==null){o.effects=null;for(var h=0;h<s.length;h+=1)Bt(s[h])}}function cb(o){for(var s=o.parent;s!==null;){if((s.f&Et)===0)return(s.f&Qr)===0?s:null;s=s.parent}return null}function Sl(o){var s,h=Xe;$r(cb(o));try{o.f&=~Qn,Sh(o),s=Yh(o)}finally{$r(h)}return s}function xh(o){var s=Sl(o);if(!o.equals(s)&&(o.wv=Wh(),(!ut?.is_fork||o.deps===null)&&(o.v=s,o.deps===null))){gt(o,Rt);return}_n||(hr!==null?(Pl()||ut?.is_fork)&&hr.set(o,s):jl(o))}let xl=new Set;const vn=new Map;let Ch=!1;function ei(o,s){var h={f:0,v:o,reactions:null,equals:ph,rv:0,wv:0};return h}function At(o,s){const h=ei(o);return _b(h),h}function Ph(o,s=!1,h=!0){const m=ei(o);return s||(m.equals=mh),m}function pt(o,s,h=!1){Ue!==null&&(!mr||(Ue.f&uh)!==0)&&yh()&&(Ue.f&(Et|Wr|kl|uh))!==0&&!nn?.includes(o)&&Jv();let m=h?bn(s):s;return Di(o,m)}function Di(o,s){if(!o.equals(s)){var h=o.v;_n?vn.set(o,s):vn.set(o,h),o.v=s;var m=fr.ensure();if(m.capture(o,h),(o.f&Et)!==0){const y=o;(o.f&Nt)!==0&&Sl(y),jl(y)}o.wv=Wh(),Th(o,Nt),Xe!==null&&(Xe.f&Rt)!==0&&(Xe.f&(Zr|mn))===0&&(lr===null?wb([o]):lr.push(o)),!m.is_fork&&xl.size>0&&!Ch&&ub()}return s}function ub(){Ch=!1;var o=ni;_a(!0);const s=Array.from(xl);try{for(const h of s)(h.f&Rt)!==0&>(h,Yr),zo(h)&&Ho(h)}finally{_a(o)}xl.clear()}function qo(o){pt(o,o.v+1)}function Th(o,s){var h=o.reactions;if(h!==null)for(var m=h.length,y=0;y<m;y++){var _=h[y],d=_.f,v=(d&Nt)===0;if(v&>(_,s),(d&Et)!==0){var i=_;hr?.delete(i),(d&Qn)===0&&(d&ir&&(_.f|=Qn),Th(i,Yr))}else v&&((d&Wr)!==0&&tn!==null&&tn.add(_),rn(_))}}function bn(o){if(typeof o!="object"||o===null||Bo in o)return o;const s=$v(o);if(s!==Av&&s!==Lv)return o;var h=new Map,m=sh(o),y=At(0),_=ii,d=v=>{if(ii===_)return v();var i=Ue,f=ii;Kt(null),Kh(_);var p=v();return Kt(i),Kh(f),p};return m&&h.set("length",At(o.length)),new Proxy(o,{defineProperty(v,i,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Uv();var p=h.get(i);return p===void 0?p=d(()=>{var g=At(f.value);return h.set(i,g),g}):pt(p,f.value,!0),!0},deleteProperty(v,i){var f=h.get(i);if(f===void 0){if(i in v){const p=d(()=>At(Ot));h.set(i,p),qo(y)}}else pt(f,Ot),qo(y);return!0},get(v,i,f){if(i===Bo)return o;var p=h.get(i),g=i in v;if(p===void 0&&(!g||Zn(v,i)?.writable)&&(p=d(()=>{var j=bn(g?v[i]:Ot),O=At(j);return O}),h.set(i,p)),p!==void 0){var b=Ce(p);return b===Ot?void 0:b}return Reflect.get(v,i,f)},getOwnPropertyDescriptor(v,i){var f=Reflect.getOwnPropertyDescriptor(v,i);if(f&&"value"in f){var p=h.get(i);p&&(f.value=Ce(p))}else if(f===void 0){var g=h.get(i),b=g?.v;if(g!==void 0&&b!==Ot)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return f},has(v,i){if(i===Bo)return!0;var f=h.get(i),p=f!==void 0&&f.v!==Ot||Reflect.has(v,i);if(f!==void 0||Xe!==null&&(!p||Zn(v,i)?.writable)){f===void 0&&(f=d(()=>{var b=p?bn(v[i]):Ot,j=At(b);return j}),h.set(i,f));var g=Ce(f);if(g===Ot)return!1}return p},set(v,i,f,p){var g=h.get(i),b=i in v;if(m&&i==="length")for(var j=f;j<g.v;j+=1){var O=h.get(j+"");O!==void 0?pt(O,Ot):j in v&&(O=d(()=>At(Ot)),h.set(j+"",O))}if(g===void 0)(!b||Zn(v,i)?.writable)&&(g=d(()=>At(void 0)),pt(g,bn(f)),h.set(i,g));else{b=g.v!==Ot;var E=d(()=>bn(f));pt(g,E)}var k=Reflect.getOwnPropertyDescriptor(v,i);if(k?.set&&k.set.call(p,f),!b){if(m&&typeof i=="string"){var S=h.get("length"),x=Number(i);Number.isInteger(x)&&x>=S.v&&pt(S,x+1)}qo(y)}return!0},ownKeys(v){Ce(y);var i=Reflect.ownKeys(v).filter(g=>{var b=h.get(g);return b===void 0||b.v!==Ot});for(var[f,p]of h)p.v!==Ot&&!(f in v)&&i.push(f);return i},setPrototypeOf(){Gv()}})}var Rh,Ah,Lh,$h;function Cl(){if(Rh===void 0){Rh=window,Ah=/Firefox/.test(navigator.userAgent);var o=Element.prototype,s=Node.prototype,h=Text.prototype;Lh=Zn(s,"firstChild").get,$h=Zn(s,"nextSibling").get,ah(o)&&(o.__click=void 0,o.__className=void 0,o.__attributes=null,o.__style=void 0,o.__e=void 0),ah(h)&&(h.__t=void 0)}}function Jt(o=""){return document.createTextNode(o)}function ti(o){return Lh.call(o)}function Ar(o){return $h.call(o)}function pr(o,s){if(!it)return ti(o);var h=ti(Qe);if(h===null)h=Qe.appendChild(Jt());else if(s&&h.nodeType!==da){var m=Jt();return h?.before(m),Dt(m),m}return Dt(h),h}function gn(o,s=!1){if(!it){var h=ti(o);return h instanceof Comment&&h.data===""?Ar(h):h}if(s&&Qe?.nodeType!==da){var m=Jt();return Qe?.before(m),Dt(m),m}return Qe}function Xt(o,s=1,h=!1){let m=it?Qe:o;for(var y;s--;)y=m,m=Ar(m);if(!it)return m;if(h&&m?.nodeType!==da){var _=Jt();return m===null?y?.after(_):m.before(_),Dt(_),_}return Dt(m),m}function Ih(o){o.textContent=""}function Nh(){return!1}function Dh(o){var s=Ue,h=Xe;Kt(null),$r(null);try{return o()}finally{Kt(s),$r(h)}}function db(o){Xe===null&&(Ue===null&&qv(),Mv()),_n&&Fv()}function hb(o,s){var h=s.last;h===null?s.last=s.first=o:(h.next=o,o.prev=h,s.last=o)}function Lr(o,s,h){var m=Xe;m!==null&&(m.f&Zt)!==0&&(o|=Zt);var y={ctx:Qt,deps:null,nodes:null,f:o|Nt|ir,first:null,fn:s,last:null,next:null,parent:m,b:m&&m.b,prev:null,teardown:null,wv:0,ac:null};if(h)try{Ho(y),y.f|=ua}catch(v){throw Bt(y),v}else s!==null&&rn(y);var _=y;if(h&&_.deps===null&&_.teardown===null&&_.nodes===null&&_.first===_.last&&(_.f&Yn)===0&&(_=_.first,(o&Wr)!==0&&(o&Ai)!==0&&_!==null&&(_.f|=Ai)),_!==null&&(_.parent=m,m!==null&&hb(_,m),Ue!==null&&(Ue.f&Et)!==0&&(o&mn)===0)){var d=Ue;(d.effects??=[]).push(_)}return y}function Pl(){return Ue!==null&&!mr}function fb(o){const s=Lr(ca,null,!1);return gt(s,Rt),s.teardown=o,s}function pb(o){db();var s=Xe.f,h=!Ue&&(s&Zr)!==0&&(s&ua)===0;if(h){var m=Qt;(m.e??=[]).push(o)}else return Bh(o)}function Bh(o){return Lr(la|Nv,o,!1)}function mb(o){fr.ensure();const s=Lr(mn|Yn,o,!0);return()=>{Bt(s)}}function yb(o){fr.ensure();const s=Lr(mn|Yn,o,!0);return(h={})=>new Promise(m=>{h.outro?ri(s,()=>{Bt(s),m(void 0)}):(Bt(s),m(void 0))})}function Fh(o){return Lr(la,o,!1)}function vb(o){return Lr(kl|Yn,o,!0)}function Tl(o,s=0){return Lr(ca|s,o,!0)}function Bi(o,s=[],h=[],m=[]){sb(m,s,h,y=>{Lr(ca,()=>o(...y.map(Ce)),!0)})}function Rl(o,s=0){var h=Lr(Wr|s,o,!0);return h}function ar(o){return Lr(Zr|Yn,o,!0)}function Mh(o){var s=o.teardown;if(s!==null){const h=_n,m=Ue;Gh(!0),Kt(null);try{s.call(null)}finally{Gh(h),Kt(m)}}}function qh(o,s=!1){var h=o.first;for(o.first=o.last=null;h!==null;){const y=h.ac;y!==null&&Dh(()=>{y.abort(Li)});var m=h.next;(h.f&mn)!==0?h.parent=null:Bt(h,s),h=m}}function bb(o){for(var s=o.first;s!==null;){var h=s.next;(s.f&Zr)===0&&Bt(s),s=h}}function Bt(o,s=!0){var h=!1;(s||(o.f&dh)!==0)&&o.nodes!==null&&o.nodes.end!==null&&(gb(o.nodes.start,o.nodes.end),h=!0),qh(o,s&&!h),wa(o,0),gt(o,Qr);var m=o.nodes&&o.nodes.t;if(m!==null)for(const _ of m)_.stop();Mh(o);var y=o.parent;y!==null&&y.first!==null&&Vh(o),o.next=o.prev=o.teardown=o.ctx=o.deps=o.fn=o.nodes=o.ac=null}function gb(o,s){for(;o!==null;){var h=o===s?null:Ar(o);o.remove(),o=h}}function Vh(o){var s=o.parent,h=o.prev,m=o.next;h!==null&&(h.next=m),m!==null&&(m.prev=h),s!==null&&(s.first===o&&(s.first=m),s.last===o&&(s.last=h))}function ri(o,s,h=!0){var m=[];zh(o,m,!0);var y=()=>{h&&Bt(o),s&&s()},_=m.length;if(_>0){var d=()=>--_||y();for(var v of m)v.out(d)}else y()}function zh(o,s,h){if((o.f&Zt)===0){o.f^=Zt;var m=o.nodes&&o.nodes.t;if(m!==null)for(const v of m)(v.is_global||h)&&s.push(v);for(var y=o.first;y!==null;){var _=y.next,d=(y.f&Ai)!==0||(y.f&Zr)!==0&&(o.f&Wr)!==0;zh(y,s,d?h:!1),y=_}}}function Al(o){Hh(o,!0)}function Hh(o,s){if((o.f&Zt)!==0){o.f^=Zt,(o.f&Rt)===0&&(gt(o,Nt),rn(o));for(var h=o.first;h!==null;){var m=h.next,y=(h.f&Ai)!==0||(h.f&Zr)!==0;Hh(h,y?s:!1),h=m}var _=o.nodes&&o.nodes.t;if(_!==null)for(const d of _)(d.is_global||s)&&d.in()}}function Uh(o,s){if(o.nodes)for(var h=o.nodes.start,m=o.nodes.end;h!==null;){var y=h===m?null:Ar(h);s.append(h),h=y}}let ni=!1;function _a(o){ni=o}let _n=!1;function Gh(o){_n=o}let Ue=null,mr=!1;function Kt(o){Ue=o}let Xe=null;function $r(o){Xe=o}let nn=null;function _b(o){Ue!==null&&(nn===null?nn=[o]:nn.push(o))}let Ft=null,er=0,lr=null;function wb(o){lr=o}let Jh=1,Vo=0,ii=Vo;function Kh(o){ii=o}function Wh(){return++Jh}function zo(o){var s=o.f;if((s&Nt)!==0)return!0;if(s&Et&&(o.f&=~Qn),(s&Yr)!==0){for(var h=o.deps,m=h.length,y=0;y<m;y++){var _=h[y];if(zo(_)&&xh(_),_.wv>o.wv)return!0}(s&ir)!==0&&hr===null&>(o,Rt)}return!1}function Zh(o,s,h=!0){var m=o.reactions;if(m!==null&&!nn?.includes(o))for(var y=0;y<m.length;y++){var _=m[y];(_.f&Et)!==0?Zh(_,s,!1):s===_&&(h?gt(_,Nt):(_.f&Rt)!==0&>(_,Yr),rn(_))}}function Yh(o){var s=Ft,h=er,m=lr,y=Ue,_=nn,d=Qt,v=mr,i=ii,f=o.f;Ft=null,er=0,lr=null,Ue=(f&(Zr|mn))===0?o:null,nn=null,Ii(o.ctx),mr=!1,ii=++Vo,o.ac!==null&&(Dh(()=>{o.ac.abort(Li)}),o.ac=null);try{o.f|=wl;var p=o.fn,g=p(),b=o.deps;if(Ft!==null){var j;if(wa(o,er),b!==null&&er>0)for(b.length=er+Ft.length,j=0;j<Ft.length;j++)b[er+j]=Ft[j];else o.deps=b=Ft;if(Pl()&&(o.f&ir)!==0)for(j=er;j<b.length;j++)(b[j].reactions??=[]).push(o)}else b!==null&&er<b.length&&(wa(o,er),b.length=er);if(yh()&&lr!==null&&!mr&&b!==null&&(o.f&(Et|Yr|Nt))===0)for(j=0;j<lr.length;j++)Zh(lr[j],o);return y!==null&&y!==o&&(Vo++,lr!==null&&(m===null?m=lr:m.push(...lr))),(o.f&yn)!==0&&(o.f^=yn),g}catch(O){return bh(O)}finally{o.f^=wl,Ft=s,er=h,lr=m,Ue=y,nn=_,Ii(d),mr=v,ii=i}}function kb(o,s){let h=s.reactions;if(h!==null){var m=Rv.call(h,o);if(m!==-1){var y=h.length-1;y===0?h=s.reactions=null:(h[m]=h[y],h.pop())}}if(h===null&&(s.f&Et)!==0&&(Ft===null||!Ft.includes(s))){var _=s;(_.f&ir)!==0&&(_.f^=ir,_.f&=~Qn),jl(_),Sh(_),wa(_,0)}}function wa(o,s){var h=o.deps;if(h!==null)for(var m=s;m<h.length;m++)kb(o,h[m])}function Ho(o){var s=o.f;if((s&Qr)===0){gt(o,Rt);var h=Xe,m=ni;Xe=o,ni=!0;try{(s&(Wr|ch))!==0?bb(o):qh(o),Mh(o);var y=Yh(o);o.teardown=typeof y=="function"?y:null,o.wv=Jh;var _;gl&&Qv&&(o.f&Nt)!==0&&o.deps}finally{ni=m,Xe=h}}}function Ce(o){var s=o.f,h=(s&Et)!==0;if(Ue!==null&&!mr){var m=Xe!==null&&(Xe.f&Qr)!==0;if(!m&&!nn?.includes(o)){var y=Ue.deps;if((Ue.f&wl)!==0)o.rv<Vo&&(o.rv=Vo,Ft===null&&y!==null&&y[er]===o?er++:Ft===null?Ft=[o]:Ft.includes(o)||Ft.push(o));else{(Ue.deps??=[]).push(o);var _=o.reactions;_===null?o.reactions=[Ue]:_.includes(Ue)||_.push(Ue)}}}if(_n&&vn.has(o))return vn.get(o);if(h){var d=o;if(_n){var v=d.v;return((d.f&Rt)===0&&d.reactions!==null||Xh(d))&&(v=Sl(d)),vn.set(d,v),v}var i=(d.f&ir)===0&&!mr&&Ue!==null&&(ni||(Ue.f&ir)!==0),f=d.deps===null;zo(d)&&(i&&(d.f|=ir),xh(d)),i&&!f&&Qh(d)}if(hr?.has(o))return hr.get(o);if((o.f&yn)!==0)throw o.v;return o.v}function Qh(o){if(o.deps!==null){o.f|=ir;for(const s of o.deps)(s.reactions??=[]).push(o),(s.f&Et)!==0&&(s.f&ir)===0&&Qh(s)}}function Xh(o){if(o.v===Ot)return!0;if(o.deps===null)return!1;for(const s of o.deps)if(vn.has(s)||(s.f&Et)!==0&&Xh(s))return!0;return!1}function ka(o){var s=mr;try{return mr=!0,o()}finally{mr=s}}const ef=new Set,Ll=new Set;function tf(o){for(var s=0;s<o.length;s++)ef.add(o[s]);for(var h of Ll)h(o)}let rf=null;function ja(o){var s=this,h=s.ownerDocument,m=o.type,y=o.composedPath?.()||[],_=y[0]||o.target;rf=o;var d=0,v=rf===o&&o.__root;if(v){var i=y.indexOf(v);if(i!==-1&&(s===document||s===window)){o.__root=s;return}var f=y.indexOf(s);if(f===-1)return;i<=f&&(d=i)}if(_=y[d]||o.target,_!==s){aa(o,"currentTarget",{configurable:!0,get(){return _||h}});var p=Ue,g=Xe;Kt(null),$r(null);try{for(var b,j=[];_!==null;){var O=_.assignedSlot||_.parentNode||_.host||null;try{var E=_["__"+m];E!=null&&(!_.disabled||o.target===_)&&E.call(_,o)}catch(k){b?j.push(k):b=k}if(o.cancelBubble||O===s||O===null)break;_=O}if(b){for(let k of j)queueMicrotask(()=>{throw k});throw b}}finally{o.__root=s,delete o.currentTarget,Kt(p),$r(g)}}}function jb(o){var s=document.createElement("template");return s.innerHTML=o.replaceAll("<!>","<!---->"),s.content}function wn(o,s){var h=Xe;h.nodes===null&&(h.nodes={start:o,end:s,a:null,t:null})}function Mt(o,s){var h=(s&Pv)!==0,m=(s&Tv)!==0,y,_=!o.startsWith("<!>");return()=>{if(it)return wn(Qe,null),Qe;y===void 0&&(y=jb(_?o:"<!>"+o),h||(y=ti(y)));var d=m||Ah?document.importNode(y,!0):y.cloneNode(!0);if(h){var v=ti(d),i=d.lastChild;wn(v,i)}else wn(d,d);return d}}function nf(o=""){if(!it){var s=Jt(o+"");return wn(s,s),s}var h=Qe;return h.nodeType!==da&&(h.before(h=Jt()),Dt(h)),wn(h,h),h}function Ob(){if(it)return wn(Qe,null),Qe;var o=document.createDocumentFragment(),s=document.createComment(""),h=Jt();return o.append(s,h),wn(s,h),o}function vt(o,s){if(it){var h=Xe;((h.f&ua)===0||h.nodes.end===null)&&(h.nodes.end=Qe),fa();return}o!==null&&o.before(s)}const Eb=["touchstart","touchmove"];function Sb(o){return Eb.includes(o)}function oi(o,s){var h=s==null?"":typeof s=="object"?s+"":s;h!==(o.__t??=o.nodeValue)&&(o.__t=h,o.nodeValue=h+"")}function of(o,s){return sf(o,s)}function xb(o,s){Cl(),s.intro=s.intro??!1;const h=s.target,m=it,y=Qe;try{for(var _=ti(h);_&&(_.nodeType!==$i||_.data!==oh);)_=Ar(_);if(!_)throw Ri;en(!0),Dt(_);const d=sf(o,{...s,anchor:_});return en(!1),d}catch(d){if(d instanceof Error&&d.message.split(`
|
|
25
|
-
`).some(v=>v.startsWith("https://svelte.dev/e/")))throw d;return d!==Ri&&console.warn("Failed to hydrate: ",d),s.recover===!1&&zv(),Cl(),Ih(h),en(!1),of(o,s)}finally{en(m),Dt(y)}}const Fi=new Map;function sf(o,{target:s,anchor:h,props:m={},events:y,context:_,intro:d=!0}){Cl();var v=new Set,i=g=>{for(var b=0;b<g.length;b++){var j=g[b];if(!v.has(j)){v.add(j);var O=Sb(j);s.addEventListener(j,ja,{passive:O});var E=Fi.get(j);E===void 0?(document.addEventListener(j,ja,{passive:O}),Fi.set(j,1)):Fi.set(j,E+1)}}};i(oa(ef)),Ll.add(i);var f=void 0,p=yb(()=>{var g=h??s.appendChild(Jt());return ib(g,{pending:()=>{}},b=>{if(_){ma({});var j=Qt;j.c=_}if(y&&(m.$$events=y),it&&wn(b,null),f=o(b,m)||{},it&&(Xe.nodes.end=Qe,Qe===null||Qe.nodeType!==$i||Qe.data!==bl))throw ha(),Ri;_&&ya()}),()=>{for(var b of v){s.removeEventListener(b,ja);var j=Fi.get(b);--j===0?(document.removeEventListener(b,ja),Fi.delete(b)):Fi.set(b,j)}Ll.delete(i),g!==h&&g.parentNode?.removeChild(g)}});return $l.set(f,p),f}let $l=new WeakMap;function Cb(o,s){const h=$l.get(o);return h?($l.delete(o),h(s)):Promise.resolve()}class Pb{anchor;#e=new Map;#t=new Map;#r=new Map;#o=new Set;#s=!0;constructor(s,h=!0){this.anchor=s,this.#s=h}#i=()=>{var s=ut;if(this.#e.has(s)){var h=this.#e.get(s),m=this.#t.get(h);if(m)Al(m),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),m=y.effect)}for(const[_,d]of this.#e){if(this.#e.delete(_),_===s)break;const v=this.#r.get(d);v&&(Bt(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();Uh(d,f),f.append(Jt()),this.#r.set(_,{effect:d,fragment:f})}else Bt(d);this.#o.delete(_),this.#t.delete(_)};this.#s||!m?(this.#o.add(_),ri(d,v,!1)):v()}}};#n=s=>{this.#e.delete(s);const h=Array.from(this.#e.values());for(const[m,y]of this.#r)h.includes(m)||(Bt(y.effect),this.#r.delete(m))};ensure(s,h){var m=ut,y=Nh();if(h&&!this.#t.has(s)&&!this.#r.has(s))if(y){var _=document.createDocumentFragment(),d=Jt();_.append(d),this.#r.set(s,{effect:ar(()=>h(d)),fragment:_})}else this.#t.set(s,ar(()=>h(this.anchor)));if(this.#e.set(m,s),y){for(const[v,i]of this.#t)v===s?m.skipped_effects.delete(i):m.skipped_effects.add(i);for(const[v,i]of this.#r)v===s?m.skipped_effects.delete(i.effect):m.skipped_effects.add(i.effect);m.oncommit(this.#i),m.ondiscard(this.#n)}else it&&(this.anchor=Qe),this.#i()}}function Il(o){Qt===null&&Dv(),pb(()=>{const s=ka(o);if(typeof s=="function")return s})}function kn(o,s,h=!1){it&&fa();var m=new Pb(o),y=h?Ai:0;function _(d,v){if(it){const f=fh(o)===ia;if(d===f){var i=pa();Dt(i),m.anchor=i,en(!1),m.ensure(d,v),en(!0);return}}m.ensure(d,v)}Rl(()=>{var d=!1;s((v,i=!0)=>{d=!0,_(i,v)}),d||_(!1,null)},y)}function Nl(o,s){return s}function Tb(o,s,h){for(var m=[],y=s.length,_,d=s.length,v=0;v<y;v++){let g=s[v];ri(g,()=>{if(_){if(_.pending.delete(g),_.done.add(g),_.pending.size===0){var b=o.outrogroups;Dl(oa(_.done)),b.delete(_),b.size===0&&(o.outrogroups=null)}}else d-=1},!1)}if(d===0){var i=m.length===0&&h!==null;if(i){var f=h,p=f.parentNode;Ih(p),p.append(f),o.items.clear()}Dl(s,!i)}else _={pending:new Set(s),done:new Set},(o.outrogroups??=new Set).add(_)}function Dl(o,s=!0){for(var h=0;h<o.length;h++)Bt(o[h],s)}var af;function Bl(o,s,h,m,y,_=null){var d=o,v=new Map,i=(s&ih)!==0;if(i){var f=o;d=it?Dt(ti(f)):f.appendChild(Jt())}it&&fa();var p=null,g=Eh(()=>{var S=h();return sh(S)?S:S==null?[]:oa(S)}),b,j=!0;function O(){k.fallback=p,Rb(k,b,d,s,m),p!==null&&(b.length===0?(p.f&Xr)===0?Al(p):(p.f^=Xr,Uo(p,null,d)):ri(p,()=>{p=null}))}var E=Rl(()=>{b=Ce(g);var S=b.length;let x=!1;if(it){var P=fh(d)===ia;P!==(S===0)&&(d=pa(),Dt(d),en(!1),x=!0)}for(var A=new Set,C=ut,R=Nh(),L=0;L<S;L+=1){it&&Qe.nodeType===$i&&Qe.data===bl&&(d=Qe,x=!0,en(!1));var I=b[L],D=m(I,L),M=j?null:v.get(D);M?(M.v&&Di(M.v,I),M.i&&Di(M.i,L),R&&C.skipped_effects.delete(M.e)):(M=Ab(v,j?d:af??=Jt(),I,D,L,y,s,h),j||(M.e.f|=Xr),v.set(D,M)),A.add(D)}if(S===0&&_&&!p&&(j?p=ar(()=>_(d)):(p=ar(()=>_(af??=Jt())),p.f|=Xr)),it&&S>0&&Dt(pa()),!j)if(R){for(const[q,J]of v)A.has(q)||C.skipped_effects.add(J.e);C.oncommit(O),C.ondiscard(()=>{})}else O();x&&en(!0),Ce(g)}),k={effect:E,items:v,outrogroups:null,fallback:p};j=!1,it&&(d=Qe)}function Rb(o,s,h,m,y){var _=(m&jv)!==0,d=s.length,v=o.items,i=o.effect.first,f,p=null,g,b=[],j=[],O,E,k,S;if(_)for(S=0;S<d;S+=1)O=s[S],E=y(O,S),k=v.get(E).e,(k.f&Xr)===0&&(k.nodes?.a?.measure(),(g??=new Set).add(k));for(S=0;S<d;S+=1){if(O=s[S],E=y(O,S),k=v.get(E).e,o.outrogroups!==null)for(const M of o.outrogroups)M.pending.delete(k),M.done.delete(k);if((k.f&Xr)!==0)if(k.f^=Xr,k===i)Uo(k,null,h);else{var x=p?p.next:i;k===o.effect.last&&(o.effect.last=k.prev),k.prev&&(k.prev.next=k.next),k.next&&(k.next.prev=k.prev),jn(o,p,k),jn(o,k,x),Uo(k,x,h),p=k,b=[],j=[],i=p.next;continue}if((k.f&Zt)!==0&&(Al(k),_&&(k.nodes?.a?.unfix(),(g??=new Set).delete(k))),k!==i){if(f!==void 0&&f.has(k)){if(b.length<j.length){var P=j[0],A;p=P.prev;var C=b[0],R=b[b.length-1];for(A=0;A<b.length;A+=1)Uo(b[A],P,h);for(A=0;A<j.length;A+=1)f.delete(j[A]);jn(o,C.prev,R.next),jn(o,p,C),jn(o,R,P),i=P,p=R,S-=1,b=[],j=[]}else f.delete(k),Uo(k,i,h),jn(o,k.prev,k.next),jn(o,k,p===null?o.effect.first:p.next),jn(o,p,k),p=k;continue}for(b=[],j=[];i!==null&&i!==k;)(f??=new Set).add(i),j.push(i),i=i.next;if(i===null)continue}(k.f&Xr)===0&&b.push(k),p=k,i=k.next}if(o.outrogroups!==null){for(const M of o.outrogroups)M.pending.size===0&&(Dl(oa(M.done)),o.outrogroups?.delete(M));o.outrogroups.size===0&&(o.outrogroups=null)}if(i!==null||f!==void 0){var L=[];if(f!==void 0)for(k of f)(k.f&Zt)===0&&L.push(k);for(;i!==null;)(i.f&Zt)===0&&i!==o.fallback&&L.push(i),i=i.next;var I=L.length;if(I>0){var D=(m&ih)!==0&&d===0?h:null;if(_){for(S=0;S<I;S+=1)L[S].nodes?.a?.measure();for(S=0;S<I;S+=1)L[S].nodes?.a?.fix()}Tb(o,L,D)}}_&&Fo(()=>{if(g!==void 0)for(k of g)k.nodes?.a?.apply()})}function Ab(o,s,h,m,y,_,d,v){var i=(d&wv)!==0?(d&Ov)===0?Ph(h,!1,!1):ei(h):null,f=(d&kv)!==0?ei(y):null;return{v:i,i:f,e:ar(()=>(_(s,i??h,f??y,v),()=>{o.delete(m)}))}}function Uo(o,s,h){if(o.nodes)for(var m=o.nodes.start,y=o.nodes.end,_=s&&(s.f&Xr)===0?s.nodes.start:h;m!==null;){var d=Ar(m);if(_.before(m),m===y)return;m=d}}function jn(o,s,h){s===null?o.effect.first=h:s.next=h,h===null?o.effect.last=s:h.prev=s}function Lb(o,s){Fh(()=>{var h=o.getRootNode(),m=h.host?h:h.head??h.ownerDocument.head;if(!m.querySelector("#"+s.hash)){const y=document.createElement("style");y.id=s.hash,y.textContent=s.code,m.appendChild(y)}})}function lf(o,s){return o===s||o?.[Bo]===s}function $b(o={},s,h,m){return Fh(()=>{var y,_;return Tl(()=>{y=_,_=[],ka(()=>{o!==h(..._)&&(s(o,..._),y&&lf(h(...y),o)&&s(null,...y))})}),()=>{Fo(()=>{_&&lf(h(..._),o)&&s(null,..._)})}}),o}let Oa=!1;function Ib(o){var s=Oa;try{return Oa=!1,[o(),Oa]}finally{Oa=s}}function yr(o,s,h,m){var y=(h&xv)!==0,_=(h&Cv)!==0,d=m,v=!0,i=()=>(v&&(v=!1,d=_?ka(m):m),d),f;if(y){var p=Bo in o||hh in o;f=Zn(o,s)?.set??(p&&s in o?x=>o[s]=x:void 0)}var g,b=!1;y?[g,b]=Ib(()=>o[s]):g=o[s],g===void 0&&m!==void 0&&(g=i(),f&&(Hv(),f(g)));var j;if(j=()=>{var x=o[s];return x===void 0?i():(v=!0,x)},(h&Sv)===0)return j;if(f){var O=o.$$legacy;return(function(x,P){return arguments.length>0?((!P||O||b)&&f(P?j():x),x):j()})}var E=!1,k=((h&Ev)!==0?El:Eh)(()=>(E=!1,j()));y&&Ce(k);var S=Xe;return(function(x,P){if(arguments.length>0){const A=P?Ce(k):y?bn(x):x;return pt(k,A),E=!0,d!==void 0&&(d=A),x}return _n&&E||(S.f&Qr)!==0?k.v:Ce(k)})}function Nb(o){return new Db(o)}class Db{#e;#t;constructor(s){var h=new Map,m=(_,d)=>{var v=Ph(d,!1,!1);return h.set(_,v),v};const y=new Proxy({...s.props||{},$$events:{}},{get(_,d){return Ce(h.get(d)??m(d,Reflect.get(_,d)))},has(_,d){return d===hh?!0:(Ce(h.get(d)??m(d,Reflect.get(_,d))),Reflect.has(_,d))},set(_,d,v){return pt(h.get(d)??m(d,v),v),Reflect.set(_,d,v)}});this.#t=(s.hydrate?xb:of)(s.component,{target:s.target,anchor:s.anchor,props:y,context:s.context,intro:s.intro??!1,recover:s.recover}),(!s?.props?.$$host||s.sync===!1)&&sr(),this.#e=y.$$events;for(const _ of Object.keys(this.#t))_==="$set"||_==="$destroy"||_==="$on"||aa(this,_,{get(){return this.#t[_]},set(d){this.#t[_]=d},enumerable:!0});this.#t.$set=_=>{Object.assign(y,_)},this.#t.$destroy=()=>{Cb(this.#t)}}$set(s){this.#t.$set(s)}$on(s,h){this.#e[s]=this.#e[s]||[];const m=(...y)=>h.call(this,...y);return this.#e[s].push(m),()=>{this.#e[s]=this.#e[s].filter(y=>y!==m)}}$destroy(){this.#t.$destroy()}}let cf;typeof HTMLElement=="function"&&(cf=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(o,s,h){super(),this.$$ctor=o,this.$$s=s,h&&this.attachShadow({mode:"open"})}addEventListener(o,s,h){if(this.$$l[o]=this.$$l[o]||[],this.$$l[o].push(s),this.$$c){const m=this.$$c.$on(o,s);this.$$l_u.set(s,m)}super.addEventListener(o,s,h)}removeEventListener(o,s,h){if(super.removeEventListener(o,s,h),this.$$c){const m=this.$$l_u.get(s);m&&(m(),this.$$l_u.delete(s))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let o=function(m){return y=>{const _=document.createElement("slot");m!=="default"&&(_.name=m),vt(y,_)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const s={},h=Bb(this);for(const m of this.$$s)m in h&&(m==="default"&&!this.$$d.children?(this.$$d.children=o(m),s.default=!0):s[m]=o(m));for(const m of this.attributes){const y=this.$$g_p(m.name);y in this.$$d||(this.$$d[y]=Ea(y,m.value,this.$$p_d,"toProp"))}for(const m in this.$$p_d)!(m in this.$$d)&&this[m]!==void 0&&(this.$$d[m]=this[m],delete this[m]);this.$$c=Nb({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:s,$$host:this}}),this.$$me=mb(()=>{Tl(()=>{this.$$r=!0;for(const m of sa(this.$$c)){if(!this.$$p_d[m]?.reflect)continue;this.$$d[m]=this.$$c[m];const y=Ea(m,this.$$d[m],this.$$p_d,"toAttribute");y==null?this.removeAttribute(this.$$p_d[m].attribute||m):this.setAttribute(this.$$p_d[m].attribute||m,y)}this.$$r=!1})});for(const m in this.$$l)for(const y of this.$$l[m]){const _=this.$$c.$on(m,y);this.$$l_u.set(y,_)}this.$$l={}}}attributeChangedCallback(o,s,h){this.$$r||(o=this.$$g_p(o),this.$$d[o]=Ea(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 sa(this.$$p_d).find(s=>this.$$p_d[s].attribute===o||!this.$$p_d[s].attribute&&s.toLowerCase()===o)||o}});function Ea(o,s,h,m){const y=h[o]?.type;if(s=y==="Boolean"&&typeof s!="boolean"?s!=null:s,!m||!h[o])return s;if(m==="toAttribute")switch(y){case"Object":case"Array":return s==null?null:JSON.stringify(s);case"Boolean":return s?"":null;case"Number":return s??null;default:return s}else switch(y){case"Object":case"Array":return s&&JSON.parse(s);case"Boolean":return s;case"Number":return s!=null?+s:s;default:return s}}function Bb(o){const s={};return o.childNodes.forEach(h=>{s[h.slot||"default"]=!0}),s}function Fl(o,s,h,m,y,_){let d=class extends cf{constructor(){super(o,h,y),this.$$p_d=s}static get observedAttributes(){return sa(s).map(v=>(s[v].attribute||v).toLowerCase())}};return sa(s).forEach(v=>{aa(d.prototype,v,{get(){return this.$$c&&v in this.$$c?this.$$c[v]:this.$$d[v]},set(i){i=Ea(v,i,s),this.$$d[v]=i;var f=this.$$c;if(f){var p=Zn(f,v)?.get;p?f[v]=i:f.$set({[v]:i})}}})}),m.forEach(v=>{aa(d.prototype,v,{get(){return this.$$c?.[v]}})}),o.element=d,d}var Ml={exports:{}};var uf;function Fb(){return uf||(uf=1,(function(o,s){(function(h,m){o.exports=m()})(self,(()=>(()=>{var h={9306:(d,v,i)=>{var f=i(4901),p=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(p(b)+" is not a function")}},5548:(d,v,i)=>{var f=i(3517),p=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(p(b)+" is not a constructor")}},3506:(d,v,i)=>{var f=i(3925),p=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g("Can't set "+p(b)+" as a prototype")}},6469:(d,v,i)=>{var f=i(8227),p=i(2360),g=i(4913).f,b=f("unscopables"),j=Array.prototype;j[b]===void 0&&g(j,b,{configurable:!0,value:p(null)}),d.exports=function(O){j[b][O]=!0}},7829:(d,v,i)=>{var f=i(8183).charAt;d.exports=function(p,g,b){return g+(b?f(p,g).length:1)}},679:(d,v,i)=>{var f=i(1625),p=TypeError;d.exports=function(g,b){if(f(b,g))return g;throw new p("Incorrect invocation")}},8551:(d,v,i)=>{var f=i(34),p=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(p(b)+" is not an object")}},235:(d,v,i)=>{var f=i(9213).forEach,p=i(4598)("forEach");d.exports=p?[].forEach:function(g){return f(this,g,arguments.length>1?arguments[1]:void 0)}},7916:(d,v,i)=>{var f=i(6080),p=i(9565),g=i(8981),b=i(6319),j=i(4209),O=i(3517),E=i(6198),k=i(4659),S=i(81),x=i(851),P=Array;d.exports=function(A){var C=g(A),R=O(this),L=arguments.length,I=L>1?arguments[1]:void 0,D=I!==void 0;D&&(I=f(I,L>2?arguments[2]:void 0));var M,q,J,G,Y,ae,ce=x(C),de=0;if(!ce||this===P&&j(ce))for(M=E(C),q=R?new this(M):P(M);M>de;de++)ae=D?I(C[de],de):C[de],k(q,de,ae);else for(q=R?new this:[],Y=(G=S(C,ce)).next;!(J=p(Y,G)).done;de++)ae=D?b(G,I,[J.value,de],!0):J.value,k(q,de,ae);return q.length=de,q}},9617:(d,v,i)=>{var f=i(5397),p=i(5610),g=i(6198),b=function(j){return function(O,E,k){var S=f(O),x=g(S);if(x===0)return!j&&-1;var P,A=p(k,x);if(j&&E!=E){for(;x>A;)if((P=S[A++])!=P)return!0}else for(;x>A;A++)if((j||A in S)&&S[A]===E)return j||A||0;return!j&&-1}};d.exports={includes:b(!0),indexOf:b(!1)}},9213:(d,v,i)=>{var f=i(6080),p=i(9504),g=i(7055),b=i(8981),j=i(6198),O=i(1469),E=p([].push),k=function(S){var x=S===1,P=S===2,A=S===3,C=S===4,R=S===6,L=S===7,I=S===5||R;return function(D,M,q,J){for(var G,Y,ae=b(D),ce=g(ae),de=j(ce),ue=f(M,q),pe=0,ie=J||O,H=x?ie(D,de):P||L?ie(D,0):void 0;de>pe;pe++)if((I||pe in ce)&&(Y=ue(G=ce[pe],pe,ae),S))if(x)H[pe]=Y;else if(Y)switch(S){case 3:return!0;case 5:return G;case 6:return pe;case 2:E(H,G)}else switch(S){case 4:return!1;case 7:E(H,G)}return R?-1:A||C?C:H}};d.exports={forEach:k(0),map:k(1),filter:k(2),some:k(3),every:k(4),find:k(5),findIndex:k(6),filterReject:k(7)}},597:(d,v,i)=>{var f=i(9039),p=i(8227),g=i(7388),b=p("species");d.exports=function(j){return g>=51||!f((function(){var O=[];return(O.constructor={})[b]=function(){return{foo:1}},O[j](Boolean).foo!==1}))}},4598:(d,v,i)=>{var f=i(9039);d.exports=function(p,g){var b=[][p];return!!b&&f((function(){b.call(null,g||function(){return 1},1)}))}},926:(d,v,i)=>{var f=i(9306),p=i(8981),g=i(7055),b=i(6198),j=TypeError,O="Reduce of empty array with no initial value",E=function(k){return function(S,x,P,A){var C=p(S),R=g(C),L=b(C);if(f(x),L===0&&P<2)throw new j(O);var I=k?L-1:0,D=k?-1:1;if(P<2)for(;;){if(I in R){A=R[I],I+=D;break}if(I+=D,k?I<0:L<=I)throw new j(O)}for(;k?I>=0:L>I;I+=D)I in R&&(A=x(A,R[I],I,C));return A}};d.exports={left:E(!1),right:E(!0)}},4527:(d,v,i)=>{var f=i(3724),p=i(4376),g=TypeError,b=Object.getOwnPropertyDescriptor,j=f&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(O){return O instanceof TypeError}})();d.exports=j?function(O,E){if(p(O)&&!b(O,"length").writable)throw new g("Cannot set read only .length");return O.length=E}:function(O,E){return O.length=E}},7680:(d,v,i)=>{var f=i(9504);d.exports=f([].slice)},4488:(d,v,i)=>{var f=i(7680),p=Math.floor,g=function(b,j){var O=b.length;if(O<8)for(var E,k,S=1;S<O;){for(k=S,E=b[S];k&&j(b[k-1],E)>0;)b[k]=b[--k];k!==S++&&(b[k]=E)}else for(var x=p(O/2),P=g(f(b,0,x),j),A=g(f(b,x),j),C=P.length,R=A.length,L=0,I=0;L<C||I<R;)b[L+I]=L<C&&I<R?j(P[L],A[I])<=0?P[L++]:A[I++]:L<C?P[L++]:A[I++];return b};d.exports=g},7433:(d,v,i)=>{var f=i(4376),p=i(3517),g=i(34),b=i(8227)("species"),j=Array;d.exports=function(O){var E;return f(O)&&(E=O.constructor,(p(E)&&(E===j||f(E.prototype))||g(E)&&(E=E[b])===null)&&(E=void 0)),E===void 0?j:E}},1469:(d,v,i)=>{var f=i(7433);d.exports=function(p,g){return new(f(p))(g===0?0:g)}},6319:(d,v,i)=>{var f=i(8551),p=i(9539);d.exports=function(g,b,j,O){try{return O?b(f(j)[0],j[1]):b(j)}catch(E){p(g,"throw",E)}}},4428:(d,v,i)=>{var f=i(8227)("iterator"),p=!1;try{var g=0,b={next:function(){return{done:!!g++}},return:function(){p=!0}};b[f]=function(){return this},Array.from(b,(function(){throw 2}))}catch{}d.exports=function(j,O){try{if(!O&&!p)return!1}catch{return!1}var E=!1;try{var k={};k[f]=function(){return{next:function(){return{done:E=!0}}}},j(k)}catch{}return E}},4576:(d,v,i)=>{var f=i(9504),p=f({}.toString),g=f("".slice);d.exports=function(b){return g(p(b),8,-1)}},6955:(d,v,i)=>{var f=i(2140),p=i(4901),g=i(4576),b=i(8227)("toStringTag"),j=Object,O=g((function(){return arguments})())==="Arguments";d.exports=f?g:function(E){var k,S,x;return E===void 0?"Undefined":E===null?"Null":typeof(S=(function(P,A){try{return P[A]}catch{}})(k=j(E),b))=="string"?S:O?g(k):(x=g(k))==="Object"&&p(k.callee)?"Arguments":x}},7740:(d,v,i)=>{var f=i(9297),p=i(5031),g=i(7347),b=i(4913);d.exports=function(j,O,E){for(var k=p(O),S=b.f,x=g.f,P=0;P<k.length;P++){var A=k[P];f(j,A)||E&&f(E,A)||S(j,A,x(O,A))}}},1436:(d,v,i)=>{var f=i(8227)("match");d.exports=function(p){var g=/./;try{"/./"[p](g)}catch{try{return g[f]=!1,"/./"[p](g)}catch{}}return!1}},2211:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype}))},2529:d=>{d.exports=function(v,i){return{value:v,done:i}}},6699:(d,v,i)=>{var f=i(3724),p=i(4913),g=i(6980);d.exports=f?function(b,j,O){return p.f(b,j,g(1,O))}:function(b,j,O){return b[j]=O,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),p=i(4913),g=i(6980);d.exports=function(b,j,O){f?p.f(b,j,g(0,O)):b[j]=O}},380:(d,v,i)=>{var f=i(9504),p=i(9039),g=i(533).start,b=RangeError,j=isFinite,O=Math.abs,E=Date.prototype,k=E.toISOString,S=f(E.getTime),x=f(E.getUTCDate),P=f(E.getUTCFullYear),A=f(E.getUTCHours),C=f(E.getUTCMilliseconds),R=f(E.getUTCMinutes),L=f(E.getUTCMonth),I=f(E.getUTCSeconds);d.exports=p((function(){return k.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"}))||!p((function(){k.call(new Date(NaN))}))?function(){if(!j(S(this)))throw new b("Invalid time value");var D=this,M=P(D),q=C(D),J=M<0?"-":M>9999?"+":"";return J+g(O(M),J?6:4,0)+"-"+g(L(D)+1,2,0)+"-"+g(x(D),2,0)+"T"+g(A(D),2,0)+":"+g(R(D),2,0)+":"+g(I(D),2,0)+"."+g(q,3,0)+"Z"}:k},3640:(d,v,i)=>{var f=i(8551),p=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 p(this,b)}},2106:(d,v,i)=>{var f=i(283),p=i(4913);d.exports=function(g,b,j){return j.get&&f(j.get,b,{getter:!0}),j.set&&f(j.set,b,{setter:!0}),p.f(g,b,j)}},6840:(d,v,i)=>{var f=i(4901),p=i(4913),g=i(283),b=i(9433);d.exports=function(j,O,E,k){k||(k={});var S=k.enumerable,x=k.name!==void 0?k.name:O;if(f(E)&&g(E,x,k),k.global)S?j[O]=E:b(O,E);else{try{k.unsafe?j[O]&&(S=!0):delete j[O]}catch{}S?j[O]=E:p.f(j,O,{value:E,enumerable:!1,configurable:!k.nonConfigurable,writable:!k.nonWritable})}return j}},9433:(d,v,i)=>{var f=i(4475),p=Object.defineProperty;d.exports=function(g,b){try{p(f,g,{value:b,configurable:!0,writable:!0})}catch{f[g]=b}return b}},4606:(d,v,i)=>{var f=i(6823),p=TypeError;d.exports=function(g,b){if(!delete g[b])throw new p("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),p=i(34),g=f.document,b=p(g)&&p(g.createElement);d.exports=function(j){return b?g.createElement(j):{}}},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,p=f&&f.constructor&&f.constructor.prototype;d.exports=p===Object.prototype?void 0:p},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),p=i(9088);d.exports=!f&&!p&&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),p=i(4576);d.exports=p(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,p,g=i(4475),b=i(9392),j=g.process,O=g.Deno,E=j&&j.versions||O&&O.version,k=E&&E.v8;k&&(p=(f=k.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!p&&b&&(!(f=b.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=b.match(/Chrome\/(\d+)/))&&(p=+f[1]),d.exports=p},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),p=i(7347).f,g=i(6699),b=i(6840),j=i(9433),O=i(7740),E=i(2796);d.exports=function(k,S){var x,P,A,C,R,L=k.target,I=k.global,D=k.stat;if(x=I?f:D?f[L]||j(L,{}):f[L]&&f[L].prototype)for(P in S){if(C=S[P],A=k.dontCallGetSet?(R=p(x,P))&&R.value:x[P],!E(I?P:L+(D?".":"#")+P,k.forced)&&A!==void 0){if(typeof C==typeof A)continue;O(C,A)}(k.sham||A&&A.sham)&&g(C,"sham",!0),b(x,P,C,k)}}},9039:d=>{d.exports=function(v){try{return!!v()}catch{return!0}}},9228:(d,v,i)=>{i(7495);var f=i(9565),p=i(6840),g=i(7323),b=i(9039),j=i(8227),O=i(6699),E=j("species"),k=RegExp.prototype;d.exports=function(S,x,P,A){var C=j(S),R=!b((function(){var M={};return M[C]=function(){return 7},""[S](M)!==7})),L=R&&!b((function(){var M=!1,q=/a/;return S==="split"&&((q={}).constructor={},q.constructor[E]=function(){return q},q.flags="",q[C]=/./[C]),q.exec=function(){return M=!0,null},q[C](""),!M}));if(!R||!L||P){var I=/./[C],D=x(C,""[S],(function(M,q,J,G,Y){var ae=q.exec;return ae===g||ae===k.exec?R&&!Y?{done:!0,value:f(I,q,J,G)}:{done:!0,value:f(M,J,q,G)}:{done:!1}}));p(String.prototype,S,D[0]),p(k,C,D[1])}A&&O(k[C],"sham",!0)}},8745:(d,v,i)=>{var f=i(616),p=Function.prototype,g=p.apply,b=p.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),p=i(9306),g=i(616),b=f(f.bind);d.exports=function(j,O){return p(j),O===void 0?j:g?b(j,O):function(){return j.apply(O,arguments)}}},616:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")}))},566:(d,v,i)=>{var f=i(9504),p=i(9306),g=i(34),b=i(9297),j=i(7680),O=i(616),E=Function,k=f([].concat),S=f([].join),x={};d.exports=O?E.bind:function(P){var A=p(this),C=A.prototype,R=j(arguments,1),L=function(){var I=k(R,j(arguments));return this instanceof L?(function(D,M,q){if(!b(x,M)){for(var J=[],G=0;G<M;G++)J[G]="a["+G+"]";x[M]=E("C,a","return new C("+S(J,",")+")")}return x[M](D,q)})(A,I.length,I):A.apply(P,I)};return g(C)&&(L.prototype=C),L}},9565:(d,v,i)=>{var f=i(616),p=Function.prototype.call;d.exports=f?p.bind(p):function(){return p.apply(p,arguments)}},350:(d,v,i)=>{var f=i(3724),p=i(9297),g=Function.prototype,b=f&&Object.getOwnPropertyDescriptor,j=p(g,"name"),O=j&&(function(){}).name==="something",E=j&&(!f||f&&b(g,"name").configurable);d.exports={EXISTS:j,PROPER:O,CONFIGURABLE:E}},6706:(d,v,i)=>{var f=i(9504),p=i(9306);d.exports=function(g,b,j){try{return f(p(Object.getOwnPropertyDescriptor(g,b)[j]))}catch{}}},7476:(d,v,i)=>{var f=i(4576),p=i(9504);d.exports=function(g){if(f(g)==="Function")return p(g)}},9504:(d,v,i)=>{var f=i(616),p=Function.prototype,g=p.call,b=f&&p.bind.bind(g,g);d.exports=f?b:function(j){return function(){return g.apply(j,arguments)}}},7751:(d,v,i)=>{var f=i(4475),p=i(4901);d.exports=function(g,b){return arguments.length<2?(j=f[g],p(j)?j:void 0):f[g]&&f[g][b];var j}},851:(d,v,i)=>{var f=i(6955),p=i(5966),g=i(4117),b=i(6269),j=i(8227)("iterator");d.exports=function(O){if(!g(O))return p(O,j)||p(O,"@@iterator")||b[f(O)]}},81:(d,v,i)=>{var f=i(9565),p=i(9306),g=i(8551),b=i(6823),j=i(851),O=TypeError;d.exports=function(E,k){var S=arguments.length<2?j(E):k;if(p(S))return g(f(S,E));throw new O(b(E)+" is not iterable")}},6933:(d,v,i)=>{var f=i(9504),p=i(4376),g=i(4901),b=i(4576),j=i(655),O=f([].push);d.exports=function(E){if(g(E))return E;if(p(E)){for(var k=E.length,S=[],x=0;x<k;x++){var P=E[x];typeof P=="string"?O(S,P):typeof P!="number"&&b(P)!=="Number"&&b(P)!=="String"||O(S,j(P))}var A=S.length,C=!0;return function(R,L){if(C)return C=!1,L;if(p(this))return L;for(var I=0;I<A;I++)if(S[I]===R)return L}}}},5966:(d,v,i)=>{var f=i(9306),p=i(4117);d.exports=function(g,b){var j=g[b];return p(j)?void 0:f(j)}},2478:(d,v,i)=>{var f=i(9504),p=i(8981),g=Math.floor,b=f("".charAt),j=f("".replace),O=f("".slice),E=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,k=/\$([$&'`]|\d{1,2})/g;d.exports=function(S,x,P,A,C,R){var L=P+S.length,I=A.length,D=k;return C!==void 0&&(C=p(C),D=E),j(R,D,(function(M,q){var J;switch(b(q,0)){case"$":return"$";case"&":return S;case"`":return O(x,0,P);case"'":return O(x,L);case"<":J=C[O(q,1,-1)];break;default:var G=+q;if(G===0)return M;if(G>I){var Y=g(G/10);return Y===0?M:Y<=I?A[Y-1]===void 0?b(q,1):A[Y-1]+b(q,1):M}J=A[G-1]}return J===void 0?"":J}))}},4475:function(d,v,i){var f=function(p){return p&&p.Math===Math&&p};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),p=i(8981),g=f({}.hasOwnProperty);d.exports=Object.hasOwn||function(b,j){return g(p(b),j)}},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),p=i(9039),g=i(4055);d.exports=!f&&!p((function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7}))},7055:(d,v,i)=>{var f=i(9504),p=i(9039),g=i(4576),b=Object,j=f("".split);d.exports=p((function(){return!b("z").propertyIsEnumerable(0)}))?function(O){return g(O)==="String"?j(O,""):b(O)}:b},3167:(d,v,i)=>{var f=i(4901),p=i(34),g=i(2967);d.exports=function(b,j,O){var E,k;return g&&f(E=j.constructor)&&E!==O&&p(k=E.prototype)&&k!==O.prototype&&g(b,k),b}},3706:(d,v,i)=>{var f=i(9504),p=i(4901),g=i(7629),b=f(Function.toString);p(g.inspectSource)||(g.inspectSource=function(j){return b(j)}),d.exports=g.inspectSource},1181:(d,v,i)=>{var f,p,g,b=i(8622),j=i(4475),O=i(34),E=i(6699),k=i(9297),S=i(7629),x=i(6119),P=i(421),A="Object already initialized",C=j.TypeError,R=j.WeakMap;if(b||S.state){var L=S.state||(S.state=new R);L.get=L.get,L.has=L.has,L.set=L.set,f=function(D,M){if(L.has(D))throw new C(A);return M.facade=D,L.set(D,M),M},p=function(D){return L.get(D)||{}},g=function(D){return L.has(D)}}else{var I=x("state");P[I]=!0,f=function(D,M){if(k(D,I))throw new C(A);return M.facade=D,E(D,I,M),M},p=function(D){return k(D,I)?D[I]:{}},g=function(D){return k(D,I)}}d.exports={set:f,get:p,has:g,enforce:function(D){return g(D)?p(D):f(D,{})},getterFor:function(D){return function(M){var q;if(!O(M)||(q=p(M)).type!==D)throw new C("Incompatible receiver, "+D+" required");return q}}}},4209:(d,v,i)=>{var f=i(8227),p=i(6269),g=f("iterator"),b=Array.prototype;d.exports=function(j){return j!==void 0&&(p.Array===j||b[g]===j)}},4376:(d,v,i)=>{var f=i(4576);d.exports=Array.isArray||function(p){return f(p)==="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),p=i(9039),g=i(4901),b=i(6955),j=i(7751),O=i(3706),E=function(){},k=j("Reflect","construct"),S=/^\s*(?:class|function)\b/,x=f(S.exec),P=!S.test(E),A=function(R){if(!g(R))return!1;try{return k(E,[],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||!!x(S,O(R))}catch{return!0}};C.sham=!0,d.exports=!k||p((function(){var R;return A(A.call)||!A(Object)||!A((function(){R=!0}))||R}))?C:A},6575:(d,v,i)=>{var f=i(9297);d.exports=function(p){return p!==void 0&&(f(p,"value")||f(p,"writable"))}},2796:(d,v,i)=>{var f=i(9039),p=i(4901),g=/#|\.prototype\./,b=function(S,x){var P=O[j(S)];return P===k||P!==E&&(p(x)?f(x):!!x)},j=b.normalize=function(S){return String(S).replace(g,".").toLowerCase()},O=b.data={},E=b.NATIVE="N",k=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(p){return typeof p=="object"?p!==null:f(p)}},3925:(d,v,i)=>{var f=i(34);d.exports=function(p){return f(p)||p===null}},6395:d=>{d.exports=!1},788:(d,v,i)=>{var f=i(34),p=i(4576),g=i(8227)("match");d.exports=function(b){var j;return f(b)&&((j=b[g])!==void 0?!!j:p(b)==="RegExp")}},757:(d,v,i)=>{var f=i(7751),p=i(4901),g=i(1625),b=i(7040),j=Object;d.exports=b?function(O){return typeof O=="symbol"}:function(O){var E=f("Symbol");return p(E)&&g(E.prototype,j(O))}},2652:(d,v,i)=>{var f=i(6080),p=i(9565),g=i(8551),b=i(6823),j=i(4209),O=i(6198),E=i(1625),k=i(81),S=i(851),x=i(9539),P=TypeError,A=function(R,L){this.stopped=R,this.result=L},C=A.prototype;d.exports=function(R,L,I){var D,M,q,J,G,Y,ae,ce=I&&I.that,de=!(!I||!I.AS_ENTRIES),ue=!(!I||!I.IS_RECORD),pe=!(!I||!I.IS_ITERATOR),ie=!(!I||!I.INTERRUPTED),H=f(L,ce),ee=function(N){return D&&x(D,"normal",N),new A(!0,N)},V=function(N){return de?(g(N),ie?H(N[0],N[1],ee):H(N[0],N[1])):ie?H(N,ee):H(N)};if(ue)D=R.iterator;else if(pe)D=R;else{if(!(M=S(R)))throw new P(b(R)+" is not iterable");if(j(M)){for(q=0,J=O(R);J>q;q++)if((G=V(R[q]))&&E(C,G))return G;return new A(!1)}D=k(R,M)}for(Y=ue?R.next:D.next;!(ae=p(Y,D)).done;){try{G=V(ae.value)}catch(N){x(D,"throw",N)}if(typeof G=="object"&&G&&E(C,G))return G}return new A(!1)}},9539:(d,v,i)=>{var f=i(9565),p=i(8551),g=i(5966);d.exports=function(b,j,O){var E,k;p(b);try{if(!(E=g(b,"return"))){if(j==="throw")throw O;return O}E=f(E,b)}catch(S){k=!0,E=S}if(j==="throw")throw O;if(k)throw E;return p(E),O}},3994:(d,v,i)=>{var f=i(7657).IteratorPrototype,p=i(2360),g=i(6980),b=i(687),j=i(6269),O=function(){return this};d.exports=function(E,k,S,x){var P=k+" Iterator";return E.prototype=p(f,{next:g(+!x,S)}),b(E,P,!1,!0),j[P]=O,E}},1088:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(6395),b=i(350),j=i(4901),O=i(3994),E=i(2787),k=i(2967),S=i(687),x=i(6699),P=i(6840),A=i(8227),C=i(6269),R=i(7657),L=b.PROPER,I=b.CONFIGURABLE,D=R.IteratorPrototype,M=R.BUGGY_SAFARI_ITERATORS,q=A("iterator"),J="keys",G="values",Y="entries",ae=function(){return this};d.exports=function(ce,de,ue,pe,ie,H,ee){O(ue,de,pe);var V,N,F,te=function(re){if(re===ie&&U)return U;if(!M&&re&&re in Oe)return Oe[re];switch(re){case J:case G:case Y:return function(){return new ue(this,re)}}return function(){return new ue(this)}},ge=de+" Iterator",be=!1,Oe=ce.prototype,ve=Oe[q]||Oe["@@iterator"]||ie&&Oe[ie],U=!M&&ve||te(ie),Z=de==="Array"&&Oe.entries||ve;if(Z&&(V=E(Z.call(new ce)))!==Object.prototype&&V.next&&(g||E(V)===D||(k?k(V,D):j(V[q])||P(V,q,ae)),S(V,ge,!0,!0),g&&(C[ge]=ae)),L&&ie===G&&ve&&ve.name!==G&&(!g&&I?x(Oe,"name",G):(be=!0,U=function(){return p(ve,this)})),ie)if(N={values:te(G),keys:H?U:te(J),entries:te(Y)},ee)for(F in N)(M||be||!(F in Oe))&&P(Oe,F,N[F]);else f({target:de,proto:!0,forced:M||be},N);return g&&!ee||Oe[q]===U||P(Oe,q,U,{name:ie}),C[de]=U,N}},7657:(d,v,i)=>{var f,p,g,b=i(9039),j=i(4901),O=i(34),E=i(2360),k=i(2787),S=i(6840),x=i(8227),P=i(6395),A=x("iterator"),C=!1;[].keys&&("next"in(g=[].keys())?(p=k(k(g)))!==Object.prototype&&(f=p):C=!0),!O(f)||b((function(){var R={};return f[A].call(R)!==R}))?f={}:P&&(f=E(f)),j(f[A])||S(f,A,(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(p){return f(p.length)}},283:(d,v,i)=>{var f=i(9504),p=i(9039),g=i(4901),b=i(9297),j=i(3724),O=i(350).CONFIGURABLE,E=i(3706),k=i(1181),S=k.enforce,x=k.get,P=String,A=Object.defineProperty,C=f("".slice),R=f("".replace),L=f([].join),I=j&&!p((function(){return A((function(){}),"length",{value:8}).length!==8})),D=String(String).split("String"),M=d.exports=function(q,J,G){C(P(J),0,7)==="Symbol("&&(J="["+R(P(J),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),G&&G.getter&&(J="get "+J),G&&G.setter&&(J="set "+J),(!b(q,"name")||O&&q.name!==J)&&(j?A(q,"name",{value:J,configurable:!0}):q.name=J),I&&G&&b(G,"arity")&&q.length!==G.arity&&A(q,"length",{value:G.arity});try{G&&b(G,"constructor")&&G.constructor?j&&A(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var Y=S(q);return b(Y,"source")||(Y.source=L(D,typeof J=="string"?J:"")),q};Function.prototype.toString=M((function(){return g(this)&&x(this).source||E(this)}),"toString")},741:d=>{var v=Math.ceil,i=Math.floor;d.exports=Math.trunc||function(f){var p=+f;return(p>0?i:v)(p)}},1955:(d,v,i)=>{var f,p,g,b,j,O=i(4475),E=i(3389),k=i(6080),S=i(9225).set,x=i(8265),P=i(8119),A=i(28),C=i(6765),R=i(9088),L=O.MutationObserver||O.WebKitMutationObserver,I=O.document,D=O.process,M=O.Promise,q=E("queueMicrotask");if(!q){var J=new x,G=function(){var Y,ae;for(R&&(Y=D.domain)&&Y.exit();ae=J.get();)try{ae()}catch(ce){throw J.head&&f(),ce}Y&&Y.enter()};P||R||C||!L||!I?!A&&M&&M.resolve?((b=M.resolve(void 0)).constructor=M,j=k(b.then,b),f=function(){j(G)}):R?f=function(){D.nextTick(G)}:(S=k(S,O),f=function(){S(G)}):(p=!0,g=I.createTextNode(""),new L(G).observe(g,{characterData:!0}),f=function(){g.data=p=!p}),q=function(Y){J.head||f(),J.add(Y)}}d.exports=q},6043:(d,v,i)=>{var f=i(9306),p=TypeError,g=function(b){var j,O;this.promise=new b((function(E,k){if(j!==void 0||O!==void 0)throw new p("Bad Promise constructor");j=E,O=k})),this.resolve=f(j),this.reject=f(O)};d.exports.f=function(b){return new g(b)}},5749:(d,v,i)=>{var f=i(788),p=TypeError;d.exports=function(g){if(f(g))throw new p("The method doesn't accept regular expressions");return g}},3904:(d,v,i)=>{var f=i(4475),p=i(9039),g=i(9504),b=i(655),j=i(3802).trim,O=i(7452),E=g("".charAt),k=f.parseFloat,S=f.Symbol,x=S&&S.iterator,P=1/k(O+"-0")!=-1/0||x&&!p((function(){k(Object(x))}));d.exports=P?function(A){var C=j(b(A)),R=k(C);return R===0&&E(C,0)==="-"?-0:R}:k},2703:(d,v,i)=>{var f=i(4475),p=i(9039),g=i(9504),b=i(655),j=i(3802).trim,O=i(7452),E=f.parseInt,k=f.Symbol,S=k&&k.iterator,x=/^[+-]?0x/i,P=g(x.exec),A=E(O+"08")!==8||E(O+"0x16")!==22||S&&!p((function(){E(Object(S))}));d.exports=A?function(C,R){var L=j(b(C));return E(L,R>>>0||(P(x,L)?16:10))}:E},4213:(d,v,i)=>{var f=i(3724),p=i(9504),g=i(9565),b=i(9039),j=i(1072),O=i(3717),E=i(8773),k=i(8981),S=i(7055),x=Object.assign,P=Object.defineProperty,A=p([].concat);d.exports=!x||b((function(){if(f&&x({b:1},x(P({},"a",{enumerable:!0,get:function(){P(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var C={},R={},L=Symbol("assign detection"),I="abcdefghijklmnopqrst";return C[L]=7,I.split("").forEach((function(D){R[D]=D})),x({},C)[L]!==7||j(x({},R)).join("")!==I}))?function(C,R){for(var L=k(C),I=arguments.length,D=1,M=O.f,q=E.f;I>D;)for(var J,G=S(arguments[D++]),Y=M?A(j(G),M(G)):j(G),ae=Y.length,ce=0;ae>ce;)J=Y[ce++],f&&!g(q,G,J)||(L[J]=G[J]);return L}:x},2360:(d,v,i)=>{var f,p=i(8551),g=i(6801),b=i(8727),j=i(421),O=i(397),E=i(4055),k=i(6119),S="prototype",x="script",P=k("IE_PROTO"),A=function(){},C=function(I){return"<"+x+">"+I+"</"+x+">"},R=function(I){I.write(C("")),I.close();var D=I.parentWindow.Object;return I=null,D},L=function(){try{f=new ActiveXObject("htmlfile")}catch{}var I,D,M;L=typeof document<"u"?document.domain&&f?R(f):(D=E("iframe"),M="java"+x+":",D.style.display="none",O.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 q=b.length;q--;)delete L[S][b[q]];return L()};j[P]=!0,d.exports=Object.create||function(I,D){var M;return I!==null?(A[S]=p(I),M=new A,A[S]=null,M[P]=I):M=L(),D===void 0?M:g.f(M,D)}},6801:(d,v,i)=>{var f=i(3724),p=i(8686),g=i(4913),b=i(8551),j=i(5397),O=i(1072);v.f=f&&!p?Object.defineProperties:function(E,k){b(E);for(var S,x=j(k),P=O(k),A=P.length,C=0;A>C;)g.f(E,S=P[C++],x[S]);return E}},4913:(d,v,i)=>{var f=i(3724),p=i(5917),g=i(8686),b=i(8551),j=i(6969),O=TypeError,E=Object.defineProperty,k=Object.getOwnPropertyDescriptor,S="enumerable",x="configurable",P="writable";v.f=f?g?function(A,C,R){if(b(A),C=j(C),b(R),typeof A=="function"&&C==="prototype"&&"value"in R&&P in R&&!R[P]){var L=k(A,C);L&&L[P]&&(A[C]=R.value,R={configurable:x in R?R[x]:L[x],enumerable:S in R?R[S]:L[S],writable:!1})}return E(A,C,R)}:E:function(A,C,R){if(b(A),C=j(C),b(R),p)try{return E(A,C,R)}catch{}if("get"in R||"set"in R)throw new O("Accessors not supported");return"value"in R&&(A[C]=R.value),A}},7347:(d,v,i)=>{var f=i(3724),p=i(9565),g=i(8773),b=i(6980),j=i(5397),O=i(6969),E=i(9297),k=i(5917),S=Object.getOwnPropertyDescriptor;v.f=f?S:function(x,P){if(x=j(x),P=O(P),k)try{return S(x,P)}catch{}if(E(x,P))return b(!p(g.f,x,P),x[P])}},298:(d,v,i)=>{var f=i(4576),p=i(5397),g=i(8480).f,b=i(7680),j=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(O){return j&&f(O)==="Window"?(function(E){try{return g(E)}catch{return b(j)}})(O):g(p(O))}},8480:(d,v,i)=>{var f=i(1828),p=i(8727).concat("length","prototype");v.f=Object.getOwnPropertyNames||function(g){return f(g,p)}},3717:(d,v)=>{v.f=Object.getOwnPropertySymbols},2787:(d,v,i)=>{var f=i(9297),p=i(4901),g=i(8981),b=i(6119),j=i(2211),O=b("IE_PROTO"),E=Object,k=E.prototype;d.exports=j?E.getPrototypeOf:function(S){var x=g(S);if(f(x,O))return x[O];var P=x.constructor;return p(P)&&x instanceof P?P.prototype:x instanceof E?k:null}},1625:(d,v,i)=>{var f=i(9504);d.exports=f({}.isPrototypeOf)},1828:(d,v,i)=>{var f=i(9504),p=i(9297),g=i(5397),b=i(9617).indexOf,j=i(421),O=f([].push);d.exports=function(E,k){var S,x=g(E),P=0,A=[];for(S in x)!p(j,S)&&p(x,S)&&O(A,S);for(;k.length>P;)p(x,S=k[P++])&&(~b(A,S)||O(A,S));return A}},1072:(d,v,i)=>{var f=i(1828),p=i(8727);d.exports=Object.keys||function(g){return f(g,p)}},8773:(d,v)=>{var i={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,p=f&&!i.call({1:2},1);v.f=p?function(g){var b=f(this,g);return!!b&&b.enumerable}:i},2967:(d,v,i)=>{var f=i(6706),p=i(34),g=i(7750),b=i(3506);d.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var j,O=!1,E={};try{(j=f(Object.prototype,"__proto__","set"))(E,[]),O=E instanceof Array}catch{}return function(k,S){return g(k),b(S),p(k)&&(O?j(k,S):k.__proto__=S),k}})():void 0)},2357:(d,v,i)=>{var f=i(3724),p=i(9039),g=i(9504),b=i(2787),j=i(1072),O=i(5397),E=g(i(8773).f),k=g([].push),S=f&&p((function(){var P=Object.create(null);return P[2]=2,!E(P,2)})),x=function(P){return function(A){for(var C,R=O(A),L=j(R),I=S&&b(R)===null,D=L.length,M=0,q=[];D>M;)C=L[M++],f&&!(I?C in R:E(R,C))||k(q,P?[C,R[C]]:R[C]);return q}};d.exports={entries:x(!0),values:x(!1)}},3179:(d,v,i)=>{var f=i(2140),p=i(6955);d.exports=f?{}.toString:function(){return"[object "+p(this)+"]"}},4270:(d,v,i)=>{var f=i(9565),p=i(4901),g=i(34),b=TypeError;d.exports=function(j,O){var E,k;if(O==="string"&&p(E=j.toString)&&!g(k=f(E,j))||p(E=j.valueOf)&&!g(k=f(E,j))||O!=="string"&&p(E=j.toString)&&!g(k=f(E,j)))return k;throw new b("Can't convert object to primitive value")}},5031:(d,v,i)=>{var f=i(7751),p=i(9504),g=i(8480),b=i(3717),j=i(8551),O=p([].concat);d.exports=f("Reflect","ownKeys")||function(E){var k=g.f(j(E)),S=b.f;return S?O(k,S(E)):k}},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),p=i(550),g=i(4901),b=i(2796),j=i(3706),O=i(8227),E=i(7290),k=i(516),S=i(6395),x=i(7388),P=p&&p.prototype,A=O("species"),C=!1,R=g(f.PromiseRejectionEvent),L=b("Promise",(function(){var I=j(p),D=I!==String(p);if(!D&&x===66||S&&(!P.catch||!P.finally))return!0;if(!x||x<51||!/native code/.test(I)){var M=new p((function(J){J(1)})),q=function(J){J((function(){}),(function(){}))};if((M.constructor={})[A]=q,!(C=M.then((function(){}))instanceof q))return!0}return!D&&(E||k)&&!R}));d.exports={CONSTRUCTOR:L,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),p=i(34),g=i(6043);d.exports=function(b,j){if(f(b),p(j)&&j.constructor===b)return j;var O=g.f(b);return(0,O.resolve)(j),O.promise}},537:(d,v,i)=>{var f=i(550),p=i(4428),g=i(916).CONSTRUCTOR;d.exports=g||!p((function(b){f.all(b).then(void 0,(function(){}))}))},1056:(d,v,i)=>{var f=i(4913).f;d.exports=function(p,g,b){b in p||f(p,b,{configurable:!0,get:function(){return g[b]},set:function(j){g[b]=j}})}},8265:d=>{var v=function(){this.head=null,this.tail=null};v.prototype={add:function(i){var f={item:i,next:null},p=this.tail;p?p.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),p=i(8551),g=i(4901),b=i(4576),j=i(7323),O=TypeError;d.exports=function(E,k){var S=E.exec;if(g(S)){var x=f(S,E,k);return x!==null&&p(x),x}if(b(E)==="RegExp")return f(j,E,k);throw new O("RegExp#exec called on incompatible receiver")}},7323:(d,v,i)=>{var f,p,g=i(9565),b=i(9504),j=i(655),O=i(7979),E=i(8429),k=i(5745),S=i(2360),x=i(1181).get,P=i(3635),A=i(8814),C=k("native-string-replace",String.prototype.replace),R=RegExp.prototype.exec,L=R,I=b("".charAt),D=b("".indexOf),M=b("".replace),q=b("".slice),J=(p=/b*/g,g(R,f=/a/,"a"),g(R,p,"a"),f.lastIndex!==0||p.lastIndex!==0),G=E.BROKEN_CARET,Y=/()??/.exec("")[1]!==void 0;(J||Y||G||P||A)&&(L=function(ae){var ce,de,ue,pe,ie,H,ee,V=this,N=x(V),F=j(ae),te=N.raw;if(te)return te.lastIndex=V.lastIndex,ce=g(L,te,F),V.lastIndex=te.lastIndex,ce;var ge=N.groups,be=G&&V.sticky,Oe=g(O,V),ve=V.source,U=0,Z=F;if(be&&(Oe=M(Oe,"y",""),D(Oe,"g")===-1&&(Oe+="g"),Z=q(F,V.lastIndex),V.lastIndex>0&&(!V.multiline||V.multiline&&I(F,V.lastIndex-1)!==`
|
|
26
|
-
`)&&(
|
|
27
|
-
`)&&g.flags==="s")}))},8814:(d,v,i)=>{var f=i(9039),p=i(4475).RegExp;d.exports=f((function(){var g=p("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"}))},7750:(d,v,i)=>{var f=i(4117),p=TypeError;d.exports=function(g){if(f(g))throw new p("Can't call method on "+g);return g}},3389:(d,v,i)=>{var f=i(4475),p=i(3724),g=Object.getOwnPropertyDescriptor;d.exports=function(b){if(!p)return f[b];var
|
|
28
|
-
\v\f\r \u2028\u2029\uFEFF`},8706:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(4376),b=i(34),j=i(8981),O=i(6198),E=i(6837),k=i(4659),S=i(1469),x=i(597),P=i(8227),A=i(7388),C=P("isConcatSpreadable"),R=A>=51||!p((function(){var I=[];return I[C]=!1,I.concat()[0]!==I})),L=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||!x("concat")},{concat:function(I){var D,M,q,J,G,Y=j(this),ae=S(Y,0),ce=0;for(D=-1,q=arguments.length;D<q;D++)if(L(G=D===-1?Y:arguments[D]))for(J=O(G),E(ce+J),M=0;M<J;M++,ce++)M in G&&k(ae,ce,G[M]);else E(ce+1),k(ae,ce++,G);return ae.length=ce,ae}})},8431:(d,v,i)=>{var f=i(6518),p=i(9213).every;f({target:"Array",proto:!0,forced:!i(4598)("every")},{every:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},2008:(d,v,i)=>{var f=i(6518),p=i(9213).filter;f({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},113:(d,v,i)=>{var f=i(6518),p=i(9213).find,g=i(6469),b="find",j=!0;b in[]&&Array(1)[b]((function(){j=!1})),f({target:"Array",proto:!0,forced:j},{find:function(O){return p(this,O,arguments.length>1?arguments[1]:void 0)}}),g(b)},1629:(d,v,i)=>{var f=i(6518),p=i(235);f({target:"Array",proto:!0,forced:[].forEach!==p},{forEach:p})},3418:(d,v,i)=>{var f=i(6518),p=i(7916);f({target:"Array",stat:!0,forced:!i(4428)((function(g){Array.from(g)}))},{from:p})},4423:(d,v,i)=>{var f=i(6518),p=i(9617).includes,g=i(9039),b=i(6469);f({target:"Array",proto:!0,forced:g((function(){return!Array(1).includes()}))},{includes:function(j){return p(this,j,arguments.length>1?arguments[1]:void 0)}}),b("includes")},5276:(d,v,i)=>{var f=i(6518),p=i(7476),g=i(9617).indexOf,b=i(4598),j=p([].indexOf),O=!!j&&1/j([1],1,-0)<0;f({target:"Array",proto:!0,forced:O||!b("indexOf")},{indexOf:function(E){var k=arguments.length>1?arguments[1]:void 0;return O?j(this,E,k)||0:g(this,E,k)}})},4346:(d,v,i)=>{i(6518)({target:"Array",stat:!0},{isArray:i(4376)})},3792:(d,v,i)=>{var f=i(5397),p=i(6469),g=i(6269),b=i(1181),j=i(4913).f,O=i(1088),E=i(2529),k=i(6395),S=i(3724),x="Array Iterator",P=b.set,A=b.getterFor(x);d.exports=O(Array,"Array",(function(R,L){P(this,{type:x,target:f(R),index:0,kind:L})}),(function(){var R=A(this),L=R.target,I=R.index++;if(!L||I>=L.length)return R.target=void 0,E(void 0,!0);switch(R.kind){case"keys":return E(I,!1);case"values":return E(L[I],!1)}return E([I,L[I]],!1)}),"values");var C=g.Arguments=g.Array;if(p("keys"),p("values"),p("entries"),!k&&S&&C.name!=="values")try{j(C,"name",{value:"values"})}catch{}},8598:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(7055),b=i(5397),j=i(4598),O=p([].join);f({target:"Array",proto:!0,forced:g!==Object||!j("join",",")},{join:function(E){return O(b(this),E===void 0?",":E)}})},2062:(d,v,i)=>{var f=i(6518),p=i(9213).map;f({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:(d,v,i)=>{var f=i(6518),p=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(j){var O=arguments.length;return p(this,j,O,O>1?arguments[1]:void 0)}})},4490:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(4376),b=p([].reverse),j=[1,2];f({target:"Array",proto:!0,forced:String(j)===String(j.reverse())},{reverse:function(){return g(this)&&(this.length=this.length),b(this)}})},4782:(d,v,i)=>{var f=i(6518),p=i(4376),g=i(3517),b=i(34),j=i(5610),O=i(6198),E=i(5397),k=i(4659),S=i(8227),x=i(597),P=i(7680),A=x("slice"),C=S("species"),R=Array,L=Math.max;f({target:"Array",proto:!0,forced:!A},{slice:function(I,D){var M,q,J,G=E(this),Y=O(G),ae=j(I,Y),ce=j(D===void 0?Y:D,Y);if(p(G)&&(M=G.constructor,(g(M)&&(M===R||p(M.prototype))||b(M)&&(M=M[C])===null)&&(M=void 0),M===R||M===void 0))return P(G,ae,ce);for(q=new(M===void 0?R:M)(L(ce-ae,0)),J=0;ae<ce;ae++,J++)ae in G&&k(q,J,G[ae]);return q.length=J,q}})},5086:(d,v,i)=>{var f=i(6518),p=i(9213).some;f({target:"Array",proto:!0,forced:!i(4598)("some")},{some:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},6910:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(9306),b=i(8981),j=i(6198),O=i(4606),E=i(655),k=i(9039),S=i(4488),x=i(4598),P=i(8834),A=i(3202),C=i(7388),R=i(9160),L=[],I=p(L.sort),D=p(L.push),M=k((function(){L.sort(void 0)})),q=k((function(){L.sort(null)})),J=x("sort"),G=!k((function(){if(C)return C<70;if(!(P&&P>3)){if(A)return!0;if(R)return R<603;var Y,ae,ce,de,ue="";for(Y=65;Y<76;Y++){switch(ae=String.fromCharCode(Y),Y){case 66:case 69:case 70:case 72:ce=3;break;case 68:case 71:ce=4;break;default:ce=2}for(de=0;de<47;de++)L.push({k:ae+de,v:ce})}for(L.sort((function(pe,ie){return ie.v-pe.v})),de=0;de<L.length;de++)ae=L[de].k.charAt(0),ue.charAt(ue.length-1)!==ae&&(ue+=ae);return ue!=="DGBEFHACIJK"}}));f({target:"Array",proto:!0,forced:M||!q||!J||!G},{sort:function(Y){Y!==void 0&&g(Y);var ae=b(this);if(G)return Y===void 0?I(ae):I(ae,Y);var ce,de,ue=[],pe=j(ae);for(de=0;de<pe;de++)de in ae&&D(ue,ae[de]);for(S(ue,(function(ie){return function(H,ee){return ee===void 0?-1:H===void 0?1:ie!==void 0?+ie(H,ee)||0:E(H)>E(ee)?1:-1}})(Y)),ce=j(ue),de=0;de<ce;)ae[de]=ue[de++];for(;de<pe;)O(ae,de++);return ae}})},4554:(d,v,i)=>{var f=i(6518),p=i(8981),g=i(5610),b=i(1291),j=i(6198),O=i(4527),E=i(6837),k=i(1469),S=i(4659),x=i(4606),P=i(597)("splice"),A=Math.max,C=Math.min;f({target:"Array",proto:!0,forced:!P},{splice:function(R,L){var I,D,M,q,J,G,Y=p(this),ae=j(Y),ce=g(R,ae),de=arguments.length;for(de===0?I=D=0:de===1?(I=0,D=ae-ce):(I=de-2,D=C(A(b(L),0),ae-ce)),E(ae+I-D),M=k(Y,D),q=0;q<D;q++)(J=ce+q)in Y&&S(M,q,Y[J]);if(M.length=D,I<D){for(q=ce;q<ae-D;q++)G=q+I,(J=q+D)in Y?Y[G]=Y[J]:x(Y,G);for(q=ae;q>ae-D+I;q--)x(Y,q-1)}else if(I>D)for(q=ae-D;q>ce;q--)G=q+I-1,(J=q+D-1)in Y?Y[G]=Y[J]:x(Y,G);for(q=0;q<I;q++)Y[q+ce]=arguments[q+2];return O(Y,ae-D+I),M}})},1688:(d,v,i)=>{var f=i(6518),p=i(380);f({target:"Date",proto:!0,forced:Date.prototype.toISOString!==p},{toISOString:p})},739:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(8981),b=i(2777);f({target:"Date",proto:!0,arity:1,forced:p((function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1}))},{toJSON:function(j){var O=g(this),E=b(O,"number");return typeof E!="number"||isFinite(E)?O.toISOString():null}})},9572:(d,v,i)=>{var f=i(9297),p=i(6840),g=i(3640),b=i(8227)("toPrimitive"),j=Date.prototype;f(j,b)||p(j,b,g)},3288:(d,v,i)=>{var f=i(9504),p=i(6840),g=Date.prototype,b="Invalid Date",j="toString",O=f(g[j]),E=f(g.getTime);String(new Date(NaN))!==b&&p(g,j,(function(){var k=E(this);return k==k?O(this):b}))},4170:(d,v,i)=>{var f=i(6518),p=i(566);f({target:"Function",proto:!0,forced:Function.bind!==p},{bind:p})},2010:(d,v,i)=>{var f=i(3724),p=i(350).EXISTS,g=i(9504),b=i(2106),j=Function.prototype,O=g(j.toString),E=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,k=g(E.exec);f&&!p&&b(j,"name",{configurable:!0,get:function(){try{return k(E,O(this))[1]}catch{return""}}})},3110:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(8745),b=i(9565),j=i(9504),O=i(9039),E=i(4901),k=i(757),S=i(7680),x=i(6933),P=i(4495),A=String,C=p("JSON","stringify"),R=j(/./.exec),L=j("".charAt),I=j("".charCodeAt),D=j("".replace),M=j(1 .toString),q=/[\uD800-\uDFFF]/g,J=/^[\uD800-\uDBFF]$/,G=/^[\uDC00-\uDFFF]$/,Y=!P||O((function(){var ue=p("Symbol")("stringify detection");return C([ue])!=="[null]"||C({a:ue})!=="{}"||C(Object(ue))!=="{}"})),ae=O((function(){return C("\uDF06\uD834")!=='"\\udf06\\ud834"'||C("\uDEAD")!=='"\\udead"'})),ce=function(ue,pe){var ie=S(arguments),H=x(pe);if(E(H)||ue!==void 0&&!k(ue))return ie[1]=function(ee,V){if(E(H)&&(V=b(H,this,A(ee),V)),!k(V))return V},g(C,null,ie)},de=function(ue,pe,ie){var H=L(ie,pe-1),ee=L(ie,pe+1);return R(J,ue)&&!R(G,ee)||R(G,ue)&&!R(J,H)?"\\u"+M(I(ue,0),16):ue};C&&f({target:"JSON",stat:!0,arity:3,forced:Y||ae},{stringify:function(ue,pe,ie){var H=S(arguments),ee=g(Y?ce:C,null,H);return ae&&typeof ee=="string"?D(ee,q,de):ee}})},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),p=i(6395),g=i(3724),b=i(4475),j=i(9167),O=i(9504),E=i(2796),k=i(9297),S=i(3167),x=i(1625),P=i(757),A=i(2777),C=i(9039),R=i(8480).f,L=i(7347).f,I=i(4913).f,D=i(1240),M=i(3802).trim,q="Number",J=b[q],G=j[q],Y=J.prototype,ae=b.TypeError,ce=O("".slice),de=O("".charCodeAt),ue=E(q,!J(" 0o1")||!J("0b1")||J("+0x1")),pe=function(H){var ee,V=arguments.length<1?0:J((function(N){var F=A(N,"number");return typeof F=="bigint"?F:(function(te){var ge,be,Oe,ve,U,Z,re,le,fe=A(te,"number");if(P(fe))throw new ae("Cannot convert a Symbol value to a number");if(typeof fe=="string"&&fe.length>2){if(fe=M(fe),(ge=de(fe,0))===43||ge===45){if((be=de(fe,2))===88||be===120)return NaN}else if(ge===48){switch(de(fe,1)){case 66:case 98:Oe=2,ve=49;break;case 79:case 111:Oe=8,ve=55;break;default:return+fe}for(Z=(U=ce(fe,2)).length,re=0;re<Z;re++)if((le=de(U,re))<48||le>ve)return NaN;return parseInt(U,Oe)}}return+fe})(F)})(H));return x(Y,ee=this)&&C((function(){D(ee)}))?S(Object(V),this,pe):V};pe.prototype=Y,ue&&!p&&(Y.constructor=pe),f({global:!0,constructor:!0,wrap:!0,forced:ue},{Number:pe});var ie=function(H,ee){for(var V,N=g?R(ee):"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;N.length>F;F++)k(ee,V=N[F])&&!k(H,V)&&I(H,V,L(ee,V))};p&&G&&ie(j[q],G),(ue||p)&&ie(j[q],J)},9868:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(1291),b=i(1240),j=i(2333),O=i(9039),E=RangeError,k=String,S=Math.floor,x=p(j),P=p("".slice),A=p(1 .toFixed),C=function(D,M,q){return M===0?q:M%2==1?C(D,M-1,q*D):C(D*D,M/2,q)},R=function(D,M,q){for(var J=-1,G=q;++J<6;)G+=M*D[J],D[J]=G%1e7,G=S(G/1e7)},L=function(D,M){for(var q=6,J=0;--q>=0;)J+=D[q],D[q]=S(J/M),J=J%M*1e7},I=function(D){for(var M=6,q="";--M>=0;)if(q!==""||M===0||D[M]!==0){var J=k(D[M]);q=q===""?J:q+x("0",7-J.length)+J}return q};f({target:"Number",proto:!0,forced:O((function(){return A(8e-5,3)!=="0.000"||A(.9,0)!=="1"||A(1.255,2)!=="1.25"||A(0xde0b6b3a7640080,0)!=="1000000000000000128"}))||!O((function(){A({})}))},{toFixed:function(D){var M,q,J,G,Y=b(this),ae=g(D),ce=[0,0,0,0,0,0],de="",ue="0";if(ae<0||ae>20)throw new E("Incorrect fraction digits");if(Y!=Y)return"NaN";if(Y<=-1e21||Y>=1e21)return k(Y);if(Y<0&&(de="-",Y=-Y),Y>1e-21)if(q=(M=(function(pe){for(var ie=0,H=pe;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),q*=4503599627370496,(M=52-M)>0){for(R(ce,0,q),J=ae;J>=7;)R(ce,1e7,0),J-=7;for(R(ce,C(10,J,1),0),J=M-1;J>=23;)L(ce,8388608),J-=23;L(ce,1<<J),R(ce,1,1),L(ce,2),ue=I(ce)}else R(ce,0,q),R(ce,1<<-M,0),ue=I(ce)+x("0",ae);return ae>0?de+((G=ue.length)<=ae?"0."+x("0",ae-G)+ue:P(ue,0,G-ae)+"."+P(ue,G-ae)):de+ue}})},9085:(d,v,i)=>{var f=i(6518),p=i(4213);f({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},9904:(d,v,i)=>{i(6518)({target:"Object",stat:!0,sham:!i(3724)},{create:i(2360)})},7945:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(6801).f;f({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!p},{defineProperties:g})},4185:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(4913).f;f({target:"Object",stat:!0,forced:Object.defineProperty!==g,sham:!p},{defineProperty:g})},5506:(d,v,i)=>{var f=i(6518),p=i(2357).entries;f({target:"Object",stat:!0},{entries:function(g){return p(g)}})},3851:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(5397),b=i(7347).f,j=i(3724);f({target:"Object",stat:!0,forced:!j||p((function(){b(1)})),sham:!j},{getOwnPropertyDescriptor:function(O,E){return b(g(O),E)}})},1278:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(5031),b=i(5397),j=i(7347),O=i(4659);f({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(E){for(var k,S,x=b(E),P=j.f,A=g(x),C={},R=0;A.length>R;)(S=P(x,k=A[R++]))!==void 0&&O(C,k,S);return C}})},9773:(d,v,i)=>{var f=i(6518),p=i(4495),g=i(9039),b=i(3717),j=i(8981);f({target:"Object",stat:!0,forced:!p||g((function(){b.f(1)}))},{getOwnPropertySymbols:function(O){var E=b.f;return E?E(j(O)):[]}})},875:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(8981),b=i(2787),j=i(2211);f({target:"Object",stat:!0,forced:p((function(){b(1)})),sham:!j},{getPrototypeOf:function(O){return b(g(O))}})},9432:(d,v,i)=>{var f=i(6518),p=i(8981),g=i(1072);f({target:"Object",stat:!0,forced:i(9039)((function(){g(1)}))},{keys:function(b){return g(p(b))}})},287:(d,v,i)=>{i(6518)({target:"Object",stat:!0},{setPrototypeOf:i(2967)})},6099:(d,v,i)=>{var f=i(2140),p=i(6840),g=i(3179);f||p(Object.prototype,"toString",g,{unsafe:!0})},6034:(d,v,i)=>{var f=i(6518),p=i(2357).values;f({target:"Object",stat:!0},{values:function(g){return p(g)}})},8459:(d,v,i)=>{var f=i(6518),p=i(3904);f({global:!0,forced:parseFloat!==p},{parseFloat:p})},8940:(d,v,i)=>{var f=i(6518),p=i(2703);f({global:!0,forced:parseInt!==p},{parseInt:p})},6499:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(9306),b=i(6043),j=i(1103),O=i(2652);f({target:"Promise",stat:!0,forced:i(537)},{all:function(E){var k=this,S=b.f(k),x=S.resolve,P=S.reject,A=j((function(){var C=g(k.resolve),R=[],L=0,I=1;O(E,(function(D){var M=L++,q=!1;I++,p(C,k,D).then((function(J){q||(q=!0,R[M]=J,--I||x(R))}),P)})),--I||x(R)}));return A.error&&P(A.value),S.promise}})},2003:(d,v,i)=>{var f=i(6518),p=i(6395),g=i(916).CONSTRUCTOR,b=i(550),j=i(7751),O=i(4901),E=i(6840),k=b&&b.prototype;if(f({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(x){return this.then(void 0,x)}}),!p&&O(b)){var S=j("Promise").prototype.catch;k.catch!==S&&E(k,"catch",S,{unsafe:!0})}},436:(d,v,i)=>{var f,p,g,b=i(6518),j=i(6395),O=i(9088),E=i(4475),k=i(9565),S=i(6840),x=i(2967),P=i(687),A=i(7633),C=i(9306),R=i(4901),L=i(34),I=i(679),D=i(2293),M=i(9225).set,q=i(1955),J=i(3138),G=i(1103),Y=i(8265),ae=i(1181),ce=i(550),de=i(916),ue=i(6043),pe="Promise",ie=de.CONSTRUCTOR,H=de.REJECTION_EVENT,ee=de.SUBCLASSING,V=ae.getterFor(pe),N=ae.set,F=ce&&ce.prototype,te=ce,ge=F,be=E.TypeError,Oe=E.document,ve=E.process,U=ue.f,Z=U,re=!!(Oe&&Oe.createEvent&&E.dispatchEvent),le="unhandledrejection",fe=function(ye){var ke;return!(!L(ye)||!R(ke=ye.then))&&ke},Pe=function(ye,ke){var xe,Be,Ke,mt=ke.value,St=ke.state===1,_t=St?ye.ok:ye.fail,ht=ye.resolve,xt=ye.reject,qt=ye.domain;try{_t?(St||(ke.rejection===2&&et(ke),ke.rejection=1),_t===!0?xe=mt:(qt&&qt.enter(),xe=_t(mt),qt&&(qt.exit(),Ke=!0)),xe===ye.promise?xt(new be("Promise-chain cycle")):(Be=fe(xe))?k(Be,xe,ht,xt):ht(xe)):xt(mt)}catch(wt){qt&&!Ke&&qt.exit(),xt(wt)}},He=function(ye,ke){ye.notified||(ye.notified=!0,q((function(){for(var xe,Be=ye.reactions;xe=Be.get();)Pe(xe,ye);ye.notified=!1,ke&&!ye.rejection&&nt(ye)})))},We=function(ye,ke,xe){var Be,Ke;re?((Be=Oe.createEvent("Event")).promise=ke,Be.reason=xe,Be.initEvent(ye,!1,!0),E.dispatchEvent(Be)):Be={promise:ke,reason:xe},!H&&(Ke=E["on"+ye])?Ke(Be):ye===le&&J("Unhandled promise rejection",xe)},nt=function(ye){k(M,E,(function(){var ke,xe=ye.facade,Be=ye.value;if(Ze(ye)&&(ke=G((function(){O?ve.emit("unhandledRejection",Be,xe):We(le,xe,Be)})),ye.rejection=O||Ze(ye)?2:1,ke.error))throw ke.value}))},Ze=function(ye){return ye.rejection!==1&&!ye.parent},et=function(ye){k(M,E,(function(){var ke=ye.facade;O?ve.emit("rejectionHandled",ke):We("rejectionhandled",ke,ye.value)}))},tt=function(ye,ke,xe){return function(Be){ye(ke,Be,xe)}},Ge=function(ye,ke,xe){ye.done||(ye.done=!0,xe&&(ye=xe),ye.value=ke,ye.state=2,He(ye,!0))},ot=function(ye,ke,xe){if(!ye.done){ye.done=!0,xe&&(ye=xe);try{if(ye.facade===ke)throw new be("Promise can't be resolved itself");var Be=fe(ke);Be?q((function(){var Ke={done:!1};try{k(Be,ke,tt(ot,Ke,ye),tt(Ge,Ke,ye))}catch(mt){Ge(Ke,mt,ye)}})):(ye.value=ke,ye.state=1,He(ye,!1))}catch(Ke){Ge({done:!1},Ke,ye)}}};if(ie&&(ge=(te=function(ye){I(this,ge),C(ye),k(f,this);var ke=V(this);try{ye(tt(ot,ke),tt(Ge,ke))}catch(xe){Ge(ke,xe)}}).prototype,(f=function(ye){N(this,{type:pe,done:!1,notified:!1,parent:!1,reactions:new Y,rejection:!1,state:0,value:void 0})}).prototype=S(ge,"then",(function(ye,ke){var xe=V(this),Be=U(D(this,te));return xe.parent=!0,Be.ok=!R(ye)||ye,Be.fail=R(ke)&&ke,Be.domain=O?ve.domain:void 0,xe.state===0?xe.reactions.add(Be):q((function(){Pe(Be,xe)})),Be.promise})),p=function(){var ye=new f,ke=V(ye);this.promise=ye,this.resolve=tt(ot,ke),this.reject=tt(Ge,ke)},ue.f=U=function(ye){return ye===te||ye===void 0?new p(ye):Z(ye)},!j&&R(ce)&&F!==Object.prototype)){g=F.then,ee||S(F,"then",(function(ye,ke){var xe=this;return new te((function(Be,Ke){k(g,xe,Be,Ke)})).then(ye,ke)}),{unsafe:!0});try{delete F.constructor}catch{}x&&x(F,ge)}b({global:!0,constructor:!0,wrap:!0,forced:ie},{Promise:te}),P(te,pe,!1,!0),A(pe)},3362:(d,v,i)=>{i(436),i(6499),i(2003),i(7743),i(1481),i(280)},7743:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(9306),b=i(6043),j=i(1103),O=i(2652);f({target:"Promise",stat:!0,forced:i(537)},{race:function(E){var k=this,S=b.f(k),x=S.reject,P=j((function(){var A=g(k.resolve);O(E,(function(C){p(A,k,C).then(S.resolve,x)}))}));return P.error&&x(P.value),S.promise}})},1481:(d,v,i)=>{var f=i(6518),p=i(6043);f({target:"Promise",stat:!0,forced:i(916).CONSTRUCTOR},{reject:function(g){var b=p.f(this);return(0,b.reject)(g),b.promise}})},280:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(6395),b=i(550),j=i(916).CONSTRUCTOR,O=i(3438),E=p("Promise"),k=g&&!j;f({target:"Promise",stat:!0,forced:g||j},{resolve:function(S){return O(k&&this===E?b:this,S)}})},825:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(8745),b=i(566),j=i(5548),O=i(8551),E=i(34),k=i(2360),S=i(9039),x=p("Reflect","construct"),P=Object.prototype,A=[].push,C=S((function(){function I(){}return!(x((function(){}),[],I)instanceof I)})),R=!S((function(){x((function(){}))})),L=C||R;f({target:"Reflect",stat:!0,forced:L,sham:L},{construct:function(I,D){j(I),O(D);var M=arguments.length<3?I:j(arguments[2]);if(R&&!C)return x(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 q=[null];return g(A,q,D),new(g(b,I,q))}var J=M.prototype,G=k(E(J)?J:P),Y=g(I,G,D);return E(Y)?Y:G}})},888:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(34),b=i(8551),j=i(6575),O=i(7347),E=i(2787);f({target:"Reflect",stat:!0},{get:function k(S,x){var P,A,C=arguments.length<3?S:arguments[2];return b(S)===C?S[x]:(P=O.f(S,x))?j(P)?P.value:P.get===void 0?void 0:p(P.get,C):g(A=E(S))?k(A,x,C):void 0}})},4864:(d,v,i)=>{var f=i(3724),p=i(4475),g=i(9504),b=i(2796),j=i(3167),O=i(6699),E=i(2360),k=i(8480).f,S=i(1625),x=i(788),P=i(655),A=i(1034),C=i(8429),R=i(1056),L=i(6840),I=i(9039),D=i(9297),M=i(1181).enforce,q=i(7633),J=i(8227),G=i(3635),Y=i(8814),ae=J("match"),ce=p.RegExp,de=ce.prototype,ue=p.SyntaxError,pe=g(de.exec),ie=g("".charAt),H=g("".replace),ee=g("".indexOf),V=g("".slice),N=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,te=/a/g,ge=new ce(F)!==F,be=C.MISSED_STICKY,Oe=C.UNSUPPORTED_Y;if(b("RegExp",f&&(!ge||be||G||Y||I((function(){return te[ae]=!1,ce(F)!==F||ce(te)===te||String(ce(F,"i"))!=="/a/i"}))))){for(var ve=function(re,le){var fe,Pe,He,We,nt,Ze,et=S(de,this),tt=x(re),Ge=le===void 0,ot=[],ye=re;if(!et&&tt&&Ge&&re.constructor===ve)return re;if((tt||S(de,re))&&(re=re.source,Ge&&(le=A(ye))),re=re===void 0?"":P(re),le=le===void 0?"":P(le),ye=re,G&&"dotAll"in F&&(Pe=!!le&&ee(le,"s")>-1)&&(le=H(le,/s/g,"")),fe=le,be&&"sticky"in F&&(He=!!le&&ee(le,"y")>-1)&&Oe&&(le=H(le,/y/g,"")),Y&&(We=(function(ke){for(var xe,Be=ke.length,Ke=0,mt="",St=[],_t=E(null),ht=!1,xt=!1,qt=0,wt="";Ke<=Be;Ke++){if((xe=ie(ke,Ke))==="\\")xe+=ie(ke,++Ke);else if(xe==="]")ht=!1;else if(!ht)switch(!0){case xe==="[":ht=!0;break;case xe==="(":pe(N,V(ke,Ke+1))&&(Ke+=2,xt=!0),mt+=xe,qt++;continue;case(xe===">"&&xt):if(wt===""||D(_t,wt))throw new ue("Invalid capture group name");_t[wt]=!0,St[St.length]=[wt,qt],xt=!1,wt="";continue}xt?wt+=xe:mt+=xe}return[mt,St]})(re),re=We[0],ot=We[1]),nt=j(ce(re,le),et?this:de,ve),(Pe||He||ot.length)&&(Ze=M(nt),Pe&&(Ze.dotAll=!0,Ze.raw=ve((function(ke){for(var xe,Be=ke.length,Ke=0,mt="",St=!1;Ke<=Be;Ke++)(xe=ie(ke,Ke))!=="\\"?St||xe!=="."?(xe==="["?St=!0:xe==="]"&&(St=!1),mt+=xe):mt+="[\\s\\S]":mt+=xe+ie(ke,++Ke);return mt})(re),fe)),He&&(Ze.sticky=!0),ot.length&&(Ze.groups=ot)),re!==ye)try{O(nt,"source",ye===""?"(?:)":ye)}catch{}return nt},U=k(ce),Z=0;U.length>Z;)R(ve,ce,U[Z++]);de.constructor=ve,ve.prototype=de,L(p,"RegExp",ve,{constructor:!0})}q("RegExp")},7495:(d,v,i)=>{var f=i(6518),p=i(7323);f({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:(d,v,i)=>{var f=i(350).PROPER,p=i(6840),g=i(8551),b=i(655),j=i(9039),O=i(1034),E="toString",k=RegExp.prototype,S=k[E],x=j((function(){return S.call({source:"a",flags:"b"})!=="/a/b"})),P=f&&S.name!==E;(x||P)&&p(k,E,(function(){var A=g(this);return"/"+b(A.source)+"/"+b(O(A))}),{unsafe:!0})},1699:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(5749),b=i(7750),j=i(655),O=i(1436),E=p("".indexOf);f({target:"String",proto:!0,forced:!O("includes")},{includes:function(k){return!!~E(j(b(this)),j(g(k)),arguments.length>1?arguments[1]:void 0)}})},7764:(d,v,i)=>{var f=i(8183).charAt,p=i(655),g=i(1181),b=i(1088),j=i(2529),O="String Iterator",E=g.set,k=g.getterFor(O);b(String,"String",(function(S){E(this,{type:O,string:p(S),index:0})}),(function(){var S,x=k(this),P=x.string,A=x.index;return A>=P.length?j(void 0,!0):(S=f(P,A),x.index+=S.length,j(S,!1))}))},1761:(d,v,i)=>{var f=i(9565),p=i(9228),g=i(8551),b=i(4117),j=i(8014),O=i(655),E=i(7750),k=i(5966),S=i(7829),x=i(6682);p("match",(function(P,A,C){return[function(R){var L=E(this),I=b(R)?void 0:k(R,P);return I?f(I,R,L):new RegExp(R)[P](O(L))},function(R){var L=g(this),I=O(R),D=C(A,L,I);if(D.done)return D.value;if(!L.global)return x(L,I);var M=L.unicode;L.lastIndex=0;for(var q,J=[],G=0;(q=x(L,I))!==null;){var Y=O(q[0]);J[G]=Y,Y===""&&(L.lastIndex=S(I,j(L.lastIndex),M)),G++}return G===0?null:J}]}))},5440:(d,v,i)=>{var f=i(8745),p=i(9565),g=i(9504),b=i(9228),j=i(9039),O=i(8551),E=i(4901),k=i(4117),S=i(1291),x=i(8014),P=i(655),A=i(7750),C=i(7829),R=i(5966),L=i(2478),I=i(6682),D=i(8227)("replace"),M=Math.max,q=Math.min,J=g([].concat),G=g([].push),Y=g("".indexOf),ae=g("".slice),ce="a".replace(/./,"$0")==="$0",de=!!/./[D]&&/./[D]("a","$0")==="";b("replace",(function(ue,pe,ie){var H=de?"$":"$0";return[function(ee,V){var N=A(this),F=k(ee)?void 0:R(ee,D);return F?p(F,ee,N,V):p(pe,P(N),ee,V)},function(ee,V){var N=O(this),F=P(ee);if(typeof V=="string"&&Y(V,H)===-1&&Y(V,"$<")===-1){var te=ie(pe,N,F,V);if(te.done)return te.value}var ge=E(V);ge||(V=P(V));var be,Oe=N.global;Oe&&(be=N.unicode,N.lastIndex=0);for(var ve,U=[];(ve=I(N,F))!==null&&(G(U,ve),Oe);)P(ve[0])===""&&(N.lastIndex=C(F,x(N.lastIndex),be));for(var Z,re="",le=0,fe=0;fe<U.length;fe++){for(var Pe,He=P((ve=U[fe])[0]),We=M(q(S(ve.index),F.length),0),nt=[],Ze=1;Ze<ve.length;Ze++)G(nt,(Z=ve[Ze])===void 0?Z:String(Z));var et=ve.groups;if(ge){var tt=J([He],nt,We,F);et!==void 0&&G(tt,et),Pe=P(f(V,void 0,tt))}else Pe=L(He,F,We,nt,et,V);We>=le&&(re+=ae(F,le,We)+Pe,le=We+He.length)}return re+ae(F,le)}]}),!!j((function(){var ue=/./;return ue.exec=function(){var pe=[];return pe.groups={a:"7"},pe},"".replace(ue,"$<a>")!=="7"}))||!ce||de)},1392:(d,v,i)=>{var f,p=i(6518),g=i(7476),b=i(7347).f,j=i(8014),O=i(655),E=i(5749),k=i(7750),S=i(1436),x=i(6395),P=g("".slice),A=Math.min,C=S("startsWith");p({target:"String",proto:!0,forced:!(!x&&!C&&(f=b(String.prototype,"startsWith"),f&&!f.writable)||C)},{startsWith:function(R){var L=O(k(this));E(R);var I=j(A(arguments.length>1?arguments[1]:void 0,L.length)),D=O(R);return P(L,I,I+D.length)===D}})},2762:(d,v,i)=>{var f=i(6518),p=i(3802).trim;f({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return p(this)}})},6412:(d,v,i)=>{i(511)("asyncIterator")},6761:(d,v,i)=>{var f=i(6518),p=i(4475),g=i(9565),b=i(9504),j=i(6395),O=i(3724),E=i(4495),k=i(9039),S=i(9297),x=i(1625),P=i(8551),A=i(5397),C=i(6969),R=i(655),L=i(6980),I=i(2360),D=i(1072),M=i(8480),q=i(298),J=i(3717),G=i(7347),Y=i(4913),ae=i(6801),ce=i(8773),de=i(6840),ue=i(2106),pe=i(5745),ie=i(6119),H=i(421),ee=i(3392),V=i(8227),N=i(1951),F=i(511),te=i(8242),ge=i(687),be=i(1181),Oe=i(9213).forEach,ve=ie("hidden"),U="Symbol",Z="prototype",re=be.set,le=be.getterFor(U),fe=Object[Z],Pe=p.Symbol,He=Pe&&Pe[Z],We=p.RangeError,nt=p.TypeError,Ze=p.QObject,et=G.f,tt=Y.f,Ge=q.f,ot=ce.f,ye=b([].push),ke=pe("symbols"),xe=pe("op-symbols"),Be=pe("wks"),Ke=!Ze||!Ze[Z]||!Ze[Z].findChild,mt=function(Le,Fe,Ie){var Me=et(fe,Fe);Me&&delete fe[Fe],tt(Le,Fe,Ie),Me&&Le!==fe&&tt(fe,Fe,Me)},St=O&&k((function(){return I(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a!==7}))?mt:tt,_t=function(Le,Fe){var Ie=ke[Le]=I(He);return re(Ie,{type:U,tag:Le,description:Fe}),O||(Ie.description=Fe),Ie},ht=function(Le,Fe,Ie){Le===fe&&ht(xe,Fe,Ie),P(Le);var Me=C(Fe);return P(Ie),S(ke,Me)?(Ie.enumerable?(S(Le,ve)&&Le[ve][Me]&&(Le[ve][Me]=!1),Ie=I(Ie,{enumerable:L(0,!1)})):(S(Le,ve)||tt(Le,ve,L(1,I(null))),Le[ve][Me]=!0),St(Le,Me,Ie)):tt(Le,Me,Ie)},xt=function(Le,Fe){P(Le);var Ie=A(Fe),Me=D(Ie).concat(xa(Ie));return Oe(Me,(function(ft){O&&!g(qt,Ie,ft)||ht(Le,ft,Ie[ft])})),Le},qt=function(Le){var Fe=C(Le),Ie=g(ot,this,Fe);return!(this===fe&&S(ke,Fe)&&!S(xe,Fe))&&(!(Ie||!S(this,Fe)||!S(ke,Fe)||S(this,ve)&&this[ve][Fe])||Ie)},wt=function(Le,Fe){var Ie=A(Le),Me=C(Fe);if(Ie!==fe||!S(ke,Me)||S(xe,Me)){var ft=et(Ie,Me);return!ft||!S(ke,Me)||S(Ie,ve)&&Ie[ve][Me]||(ft.enumerable=!0),ft}},Sa=function(Le){var Fe=Ge(A(Le)),Ie=[];return Oe(Fe,(function(Me){S(ke,Me)||S(H,Me)||ye(Ie,Me)})),Ie},xa=function(Le){var Fe=Le===fe,Ie=Ge(Fe?xe:A(Le)),Me=[];return Oe(Ie,(function(ft){!S(ke,ft)||Fe&&!S(fe,ft)||ye(Me,ke[ft])})),Me};E||(de(He=(Pe=function(){if(x(He,this))throw new nt("Symbol is not a constructor");var Le=arguments.length&&arguments[0]!==void 0?R(arguments[0]):void 0,Fe=ee(Le),Ie=function(Me){var ft=this===void 0?p:this;ft===fe&&g(Ie,xe,Me),S(ft,ve)&&S(ft[ve],Fe)&&(ft[ve][Fe]=!1);var Ca=L(1,Me);try{St(ft,Fe,Ca)}catch(on){if(!(on instanceof We))throw on;mt(ft,Fe,Ca)}};return O&&Ke&&St(fe,Fe,{configurable:!0,set:Ie}),_t(Fe,Le)})[Z],"toString",(function(){return le(this).tag})),de(Pe,"withoutSetter",(function(Le){return _t(ee(Le),Le)})),ce.f=qt,Y.f=ht,ae.f=xt,G.f=wt,M.f=q.f=Sa,J.f=xa,N.f=function(Le){return _t(V(Le),Le)},O&&(ue(He,"description",{configurable:!0,get:function(){return le(this).description}}),j||de(fe,"propertyIsEnumerable",qt,{unsafe:!0}))),f({global:!0,constructor:!0,wrap:!0,forced:!E,sham:!E},{Symbol:Pe}),Oe(D(Be),(function(Le){F(Le)})),f({target:U,stat:!0,forced:!E},{useSetter:function(){Ke=!0},useSimple:function(){Ke=!1}}),f({target:"Object",stat:!0,forced:!E,sham:!O},{create:function(Le,Fe){return Fe===void 0?I(Le):xt(I(Le),Fe)},defineProperty:ht,defineProperties:xt,getOwnPropertyDescriptor:wt}),f({target:"Object",stat:!0,forced:!E},{getOwnPropertyNames:Sa}),te(),ge(Pe,U),H[ve]=!0},9463:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(4475),b=i(9504),j=i(9297),O=i(4901),E=i(1625),k=i(655),S=i(2106),x=i(7740),P=g.Symbol,A=P&&P.prototype;if(p&&O(P)&&(!("description"in A)||P().description!==void 0)){var C={},R=function(){var G=arguments.length<1||arguments[0]===void 0?void 0:k(arguments[0]),Y=E(A,this)?new P(G):G===void 0?P():P(G);return G===""&&(C[Y]=!0),Y};x(R,P),R.prototype=A,A.constructor=R;var L=String(P("description detection"))==="Symbol(description detection)",I=b(A.valueOf),D=b(A.toString),M=/^Symbol\((.*)\)[^)]+$/,q=b("".replace),J=b("".slice);S(A,"description",{configurable:!0,get:function(){var G=I(this);if(j(C,G))return"";var Y=D(G),ae=L?J(Y,7,-1):q(Y,M,"$1");return ae===""?void 0:ae}}),f({global:!0,constructor:!0,forced:!0},{Symbol:R})}},1510:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(9297),b=i(655),j=i(5745),O=i(1296),E=j("string-to-symbol-registry"),k=j("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!O},{for:function(S){var x=b(S);if(g(E,x))return E[x];var P=p("Symbol")(x);return E[x]=P,k[P]=x,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),p=i(9297),g=i(757),b=i(6823),j=i(5745),O=i(1296),E=j("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!O},{keyFor:function(k){if(!g(k))throw new TypeError(b(k)+" is not a symbol");if(p(E,k))return E[k]}})},5700:(d,v,i)=>{var f=i(511),p=i(8242);f("toPrimitive"),p()},8125:(d,v,i)=>{var f=i(7751),p=i(511),g=i(687);p("toStringTag"),g(f("Symbol"),"Symbol")},3500:(d,v,i)=>{var f=i(4475),p=i(7400),g=i(9296),b=i(235),j=i(6699),O=function(k){if(k&&k.forEach!==b)try{j(k,"forEach",b)}catch{k.forEach=b}};for(var E in p)p[E]&&O(f[E]&&f[E].prototype);O(g)},2953:(d,v,i)=>{var f=i(4475),p=i(7400),g=i(9296),b=i(3792),j=i(6699),O=i(687),E=i(8227)("iterator"),k=b.values,S=function(P,A){if(P){if(P[E]!==k)try{j(P,E,k)}catch{P[E]=k}if(O(P,A,!0),p[A]){for(var C in b)if(P[C]!==b[C])try{j(P,C,b[C])}catch{P[C]=b[C]}}}};for(var x in p)S(f[x]&&f[x].prototype,x);S(g,"DOMTokenList")},5575:(d,v,i)=>{var f=i(6518),p=i(4475),g=i(9472)(p.setInterval,!0);f({global:!0,bind:!0,forced:p.setInterval!==g},{setInterval:g})},4599:(d,v,i)=>{var f=i(6518),p=i(4475),g=i(9472)(p.setTimeout,!0);f({global:!0,bind:!0,forced:p.setTimeout!==g},{setTimeout:g})},6031:(d,v,i)=>{i(5575),i(4599)}},m={};function y(d){var v=m[d];if(v!==void 0)return v.exports;var i=m[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:()=>dn}),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 a=e[Symbol.toPrimitive];if(a!==void 0){var u=a.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 p(l){return!(l===null||f(l)!=="object"||l.nodeType||l===l.window||l.constructor&&!E(l.constructor.prototype,"isPrototypeOf"))}function g(l){return p(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]&&p(e[t])?(E(l,t)||(l[t]={}),b(l[t],e[t])):Array.isArray(e[t])?l[t]=g(e[t]):l[t]=e[t]}))})),l}function j(l,r){var n=document.createEvent("HTMLEvents");n.initEvent(r,!0,!0),l.dispatchEvent(n)}function O(l){return l&&(l.toString()==="[object ShadowRoot]"?l:O(l.parentNode))}function E(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 k=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,S=/^\s*(-|\+)?(\d+)\s*$/;function x(){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 A(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,{})),A(l[t],e[t])):Object.assign(l,i({},t,e[t]));return A.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 L(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,a;(function(u,w){if(!(u instanceof w))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=(a=this.options.opt_in_widget)!==null&&a!==void 0?a: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 w;u.startsWith(n.jsoneditor.root.path)?w=u:((w=n.path.split("."))[w.length-1]=u,w=w.join("."));var T=e[u];n.checkDependency(w,T)})),this.dependenciesFulfilled!==t&&this.notify();var a=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(a="none"),c.tagName==="TD"?Object.keys(c.childNodes).forEach((function(u){return c.childNodes[u].style.display=a})):c.style.display=a}}}},{key:"checkDependency",value:function(n,c){var e=this;if(this.path!==n&&this.jsoneditor!==null){var t=this.jsoneditor.getEditor(n),a=t?t.getValue():void 0;t&&t.dependenciesFulfilled&&a?Array.isArray(c)?this.dependenciesFulfilled=c.some((function(u){if(JSON.stringify(a)===JSON.stringify(u))return!0})):R(c)==="object"?R(a)!=="object"?this.dependenciesFulfilled=c===a:Object.keys(c).some((function(u){return!!E(c,u)&&(E(a,u)&&c[u]===a[u]?void 0:(e.dependenciesFulfilled=!1,!0))})):typeof c=="string"||typeof c=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&a===c:typeof c=="boolean"&&(this.dependenciesFulfilled=c?this.dependenciesFulfilled&&(a||a.length>0):this.dependenciesFulfilled&&(!a||a.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,a=t&&this.parent.options.show_opt_in===!0,u=t&&this.parent.options.show_opt_in===!1;(a||!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()},E(this.schema,"watch")){var c,e,t,a,u,w=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),!(a=n.theme.closest(n.container,'[data-schemaid="'.concat(t,'"]'))))throw new Error("Could not find ancestor node with id ".concat(t));u="".concat(a.getAttribute("data-schemapath"),".").concat(e.join(".")),w.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]:[],a="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(a),u}},{key:"setButtonText",value:function(n,c,e,t){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return e=this.iconlib?this.iconlib.getIcon(e):null,c=this.translate(c,a),t=this.translate(t,a),!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],a=this.jsoneditor.compileTemplate(n.href,this.template_engine),u=this.jsoneditor.compileTemplate(n.rel?n.rel:n.href,this.template_engine),w=null;if(n.download&&(w=n.download),w&&w!==!0&&(w=this.jsoneditor.compileTemplate(w,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 z=a(B),Q=u(B);e.setAttribute("href",z),e.setAttribute("title",Q||z),T.setAttribute("src",z)}))}else if(["audio","video"].includes(t)){c=this.theme.getBlockLinkHolder(),(e=this.theme.getBlockLink()).setAttribute("target","_blank");var $=document.createElement(t);$.setAttribute("controls","controls"),this.theme.createMediaLink(c,e,$),this.link_watchers.push((function(B){var z=a(B),Q=u(B);e.setAttribute("href",z),e.textContent=Q||z,$.setAttribute("src",z)}))}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 z=a(B),Q=u(B);z&&(c.style.display=""),c.setAttribute("href",z),c.textContent=Q||z}));return w&&e&&(w===!0?e.setAttribute("download",""):this.link_watchers.push((function(B){e.setAttribute("download",w(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 a=n.jsoneditor.getEditor(n.watched[t]),u=a?a.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(a){var u=c.editors[a];if(u.schema&&u.schema.enum&&u.schema.options&&u.schema.options.enum_titles){var w=u.schema.enum.indexOf(u.value),T=u.options.enum_titles[w];n.properties[a]={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(a){a.title&&(e[a.title]=e[a.title]||0,e[a.title]++),a.description&&(e[a.description]=e[a.description]||0,e[a.description]++),a.format&&(e[a.format]=e[a.format]||0,e[a.format]++),a.type&&(e[a.type]=e[a.type]||0,e[a.type]++)})),n.forEach((function(a){var u;u=typeof a=="string"?a:a.title&&e[a.title]<=1?a.title:a.format&&e[a.format]<=1?a.format:a.type&&e[a.type]<=1?a.type:a.description&&e[a.description]<=1?a.description:a.title?a.title:a.format?a.format:a.type?a.type:a.description?a.description:JSON.stringify(a).length<500?JSON.stringify(a):"type",c.push(u)}));var t={};return c.forEach((function(a,u){t[a]=t[a]||0,t[a]++,e[a]>1&&(c[u]="".concat(a," ").concat(t[a]))})),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),a=c||this.input;Object.keys(e).forEach((function(u){t.includes(u.toLowerCase())||a.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(a){var u,w,T=(w=2,(function(z){if(Array.isArray(z))return z})(u=a)||(function(z,Q){var X=z==null?null:typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(X!=null){var se,me,je,Se,Ae=[],Ne=!0,Ve=!1;try{if(je=(X=X.call(z)).next,Q===0){if(Object(X)!==X)return;Ne=!1}else for(;!(Ne=(se=je.call(X)).done)&&(Ae.push(se.value),Ae.length!==Q);Ne=!0);}catch(_e){Ve=!0,me=_e}finally{try{if(!Ne&&X.return!=null&&(Se=X.return(),Object(Se)!==Se))return}finally{if(Ve)throw me}}return Ae}})(u,w)||(function(z,Q){if(z){if(typeof z=="string")return C(z,Q);var X=Object.prototype.toString.call(z).slice(8,-1);return X==="Object"&&z.constructor&&(X=z.constructor.name),X==="Map"||X==="Set"?Array.from(z):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?C(z,Q):void 0}})(u,w)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),$=T[0],B=T[1];B===Object(B)?c[$]=e.expandCallbacks(n,B):typeof B=="string"&&R(t)==="object"&&typeof t[B]=="function"&&(c[$]=t[B].bind(null,e))})),c}},{key:"showValidationErrors",value:function(n){}}],r&&L(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 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,J(c.key),c)}}function J(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 G(l,r,n){return r=ce(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||[],ce(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 ae(){return ae=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},ae.apply(this,arguments)}function ce(l){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ce(l)}function de(l,r){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},de(l,r)}var ue=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),G(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&&de(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){ae(ce(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){ae(ce(r.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(e,t,a){if(e=this.applyConstFilter(e),(!this.template||a)&&(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 w=this.control.querySelector("output");w&&(w.value=u)}var T=a||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,a),{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 a=this.schema.minimum||0,u=this.schema.maximum||Math.max(100,a+1),w=1;this.schema.multipleOf&&(a%this.schema.multipleOf&&(a=Math.ceil(a/this.schema.multipleOf)*this.schema.multipleOf),u%this.schema.multipleOf&&(u=Math.floor(u/this.schema.multipleOf)*this.schema.multipleOf),w=this.schema.multipleOf),this.input=this.theme.getRangeInput(a,u,w,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,se=t.sanitize(X);X!==se&&(Q.currentTarget.value=se),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,se=Q.offsetHeight;if(Q.offsetHeight<Q.scrollHeight)for(X=0;Q.offsetHeight<Q.scrollHeight+3&&!(X>100);)X++,se++,Q.style.height="".concat(se,"px");else{for(X=0;Q.offsetHeight>=Q.scrollHeight+3&&!(X>100);)X++,se--,Q.style.height="".concat(se,"px");Q.style.height="".concat(se+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,$=this.schema.maxLength!==void 0;T&&$&&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 z=this.expandCallbacks("template",{template:this.schema.template});typeof z.template=="function"?this.template=z.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(a){if(e[a]===Object(e[a]))e[a]=t.ajustIMaskOptions(e[a]);else if(a==="mask")if(e[a].substr(0,6)==="regex:"){var u=e[a].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(u!==null)try{e[a]=new RegExp(u[1],u[2])}catch{}}else e[a]=t.getGlobalPropertyFromString(e[a])})),e}},{key:"getGlobalPropertyFromString",value:function(e){if(e.includes(".")){var t=e.split("."),a=t[0],u=t[1];if(window[a]!==void 0&&window[a][u]!==void 0)return window[a][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:ae(ce(r.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,ae(ce(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,ae(ce(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),ae(ce(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)),ae(ce(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 a=e.reduce((function(u,w){return w.path===t.path&&u.push(w.message),u}),[]);a.length?this.theme.addInputError(this.input,"".concat(a.join(". "),".")):this.theme.removeInputError(this.input)}}])&&q(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function pe(l){return pe=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},pe(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(pe(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(pe(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return pe(r)=="symbol"?r:r+""}function ee(l,r,n){return r=F(r),(function(c,e){if(e&&(pe(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,V()?Reflect.construct(r,n||[],F(l).constructor):r.apply(l,n))}function V(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(V=function(){return!!l})()}function N(){return N=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},N.apply(this,arguments)}function F(l){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(l)}function te(l,r){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},te(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),ee(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&&te(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,a){e=this.applyConstFilter(e);var u=N(F(r.prototype),"setValue",this).call(this,e,t,a);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",N(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 a=this.input_type;a!=="cpp"&&a!=="c++"&&a!=="c"||(a="c_cpp"),e=this.expandCallbacks("ace",b({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(a)})),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 N(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),N(F(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),N(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),N(F(r.prototype),"destroy",this).call(this)}}])&&ie(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);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 Oe(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(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 U(l,r,n){return r=le(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||[],le(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 re(){return re=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=le(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}},re.apply(this,arguments)}function le(l){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},le(l)}function fe(l,r){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},fe(l,r)}y(2008),y(4554);var Pe=(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&&fe(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(){re(le(r.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){re(le(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)})),re(le(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(a){a.disable(e),t.setAvailability(a,!0)})),re(le(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(){re(le(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(){re(le(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,re(le(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 a=JSON.stringify(t);return this.item_info[a]!==void 0||(t=this.jsoneditor.expandRefs(t),this.item_info[a]={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[a]}},{key:"getElementEditor",value:function(e){var t=this.getItemInfo(e),a=this.getItemSchema(e);(a=this.jsoneditor.expandRefs(a)).title="".concat(t.title," ").concat(e+1);var u,w=this.jsoneditor.getEditorClass(a);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(w,{jsoneditor:this.jsoneditor,schema:a,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,re(le(r.prototype),"destroy",this).call(this)}},{key:"empty",value:function(e){var t=this;if(this.rows!==null){if(this.rows.forEach((function(u,w){e&&(t.checkParent(u.tab)&&u.tab.parentNode.removeChild(u.tab),t.destroyRow(u,!0),t.row_cache[w]=null),t.rows[w]=null})),e)for(var a=this.rows.length;a<this.row_cache.length;a++)this.destroyRow(this.row_cache[a],!0),this.row_cache[a]=null;this.rows=[],e&&(this.row_cache=[])}}},{key:"destroyRow",value:function(e,t){var a=e.container;t?(e.destroy(),a.parentNode&&a.parentNode.removeChild(a),this.checkParent(e.tab)&&e.tab.parentNode.removeChild(e.tab)):(e.tab&&(e.tab.style.display="none"),a.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(a){a.tab&&(e?a.tab_text.textContent=a.getHeaderText():a.tab===t.active_tab?t.theme.markTabActive(a):t.theme.markTabInactive(a))}))}},{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]:[],a=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){t.forEach((function($,B){if(e.rows[B])e.rows[B].setValue($,a);else if(e.row_cache[B])e.rows[B]=e.row_cache[B],e.rows[B].setValue($,a),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 z=e.addRow($,a);e.jsoneditor.trigger("addRow",z)}}));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 w=this.rows.find((function($){return $.tab===e.active_tab})),T=w!==void 0?w.tab:null;!T&&this.rows.length&&(T=this.rows[0].tab),this.active_tab=T,this.refreshValue(a),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}else a&&this.refreshValue(a)}},{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 a=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,a),t.push(a)}else{var u=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,u),t.push(u);var w=!(e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,w),t.push(w)}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($){return $}))}},{key:"refreshValue",value:function(e){var t=this,a=this.value?this.value.length:0;if(this.value=this.rows.map((function(w){return w.getValue()})),a!==this.value.length||e){var u=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(w,T){if(w.movedown_button){var $=T!==t.rows.length-1;t.setButtonState(w.movedown_button,$)}w.delete_button&&t.setButtonState(w.delete_button,!u),t.value[T]=w.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 a=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){a.active_tab=a.rows[u].tab,a.refreshTabs(),T.preventDefault(),T.stopPropagation()})),this._supportDragDrop(this.rows[u].tab)):this._supportDragDrop(this.rows[u].container,!0);var w=this.rows[u].title_controls||this.rows[u].array_controls;return this.hide_delete_buttons||(this.rows[u].delete_button=this._createDeleteButton(u,w)),this.show_copy_button&&(this.rows[u].copy_button=this._createCopyButton(u,w)),u&&!this.hide_move_buttons&&(this.rows[u].moveup_button=this._createMoveUpButton(u,w)),this.hide_move_buttons||(this.rows[u].movedown_button=this._createMoveDownButton(u,w)),e!==void 0&&this.rows[u].setValue(e,t),this.refreshTabs(),this.rows[u]}},{key:"_createDeleteButton",value:function(e,t){var a=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(w){if(w.preventDefault(),w.stopPropagation(),!a.askConfirmation())return!1;var T=1*w.currentTarget.getAttribute("data-i"),$=a.getValue().filter((function(Q,X){return X!==T})),B=null,z=a.rows[T].getValue();a.setValue($),a.rows[T]?B=a.rows[T].tab:a.rows[T-1]&&(B=a.rows[T-1].tab),B&&(a.active_tab=B,a.refreshTabs()),a.onChange(!0),a.jsoneditor.trigger("deleteRow",z)})),t&&t.appendChild(u),u}},{key:"_createCopyButton",value:function(e,t){var a=this,u=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),w=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(T){var $=a.getValue();T.preventDefault(),T.stopPropagation();var B=1*T.currentTarget.getAttribute("data-i");$.forEach((function(z,Q){if(Q===B){if(w.items.type==="string"&&w.items.format==="uuid")z=x();else if(w.items.type==="object"&&w.items.properties)for(var X=0,se=Object.keys(z);X<se.length;X++){var me=se[X];w.items.properties&&w.items.properties[me]&&w.items.properties[me].format==="uuid"&&(z[me]=x())}$.push(z)}})),a.setValue($),a.refreshValue(!0),a.onChange(!0),a.jsoneditor.trigger("copyRow",a.rows[B-1])})),t.appendChild(u),u}},{key:"_createMoveUpButton",value:function(e,t){var a=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(w){w.preventDefault(),w.stopPropagation();var T=1*w.currentTarget.getAttribute("data-i");if(!(T<=0)){var $=a.getValue(),B=$[T-1];$[T-1]=$[T],$[T]=B,a.setValue($),a.active_tab=a.rows[T-1].tab,a.refreshTabs(),a.onChange(!0),a.jsoneditor.trigger("moveRow",a.rows[T-1])}})),t&&t.appendChild(u),u}},{key:"_createMoveDownButton",value:function(e,t){var a=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(w){w.preventDefault(),w.stopPropagation();var T=1*w.currentTarget.getAttribute("data-i"),$=a.getValue();if(!(T>=$.length-1)){var B=$[T+1];$[T+1]=$[T],$[T]=B,a.setValue($),a.active_tab=a.rows[T+1].tab,a.refreshTabs(),a.onChange(!0),a.jsoneditor.trigger("moveRow",a.rows[T+1])}})),t&&t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e,t){var a=this;He(e,(function(u,w){var T=a.getValue(),$=T[u];T.splice(u,1),T.splice(w,0,$),a.setValue(T),a.active_tab=a.rows[w].tab,a.refreshTabs(),a.onChange(!0),a.jsoneditor.trigger("moveRow",a.rows[w])}),{useTrigger:t})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var e=this,t=this.getButton("","collapse","button_collapse");t.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(t,this.title.childNodes[0]);var a=this.row_holder.style.display,u=this.controls.style.display;return t.addEventListener("click",(function(w){w.preventDefault(),w.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=a,e.controls.style.display=u,e.setButtonText(w.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.row_holder.style.display="none",e.controls.style.display="none",e.setButtonText(w.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(a){a.preventDefault(),a.stopPropagation();var u,w=e.rows.length;e.row_cache[w]?(u=e.rows[w]=e.row_cache[w],e.rows[w].setValue(e.rows[w].getDefault(),!0),typeof e.rows[w].deactivateNonRequiredProperties=="function"&&e.rows[w].deactivateNonRequiredProperties(!0),e.rows[w].container.style.display="",e.rows[w].tab&&(e.rows[w].tab.style.display=""),e.rows[w].register()):u=e.addRow(),e.active_tab=e.rows[w].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(a){if(a.preventDefault(),a.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue(),w=null,T=u.pop();e.setValue(u),e.rows[e.rows.length-1]&&(w=e.rows[e.rows.length-1].tab),w&&(e.active_tab=w,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(a){if(a.preventDefault(),a.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,a=[],u=[];e.forEach((function(w){w.path===t.path?a.push(w):u.push(w)})),this.error_holder&&(a.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",a.forEach((function(w){t.error_holder.appendChild(t.theme.getErrorMessage(w.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(w){return w.showValidationErrors(u)}))}}],c&&Oe(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function He(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(a){for(var u=0,w=a.parentElement.firstElementChild;w!==a&&w!==null;)w=w.nextSibling,++u;return u},e=c(window.curDrag),t=c(l);r(e,t,window.curDrag,l),window.curDrag=null}}))}function We(l){return We=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},We(l)}function nt(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,Ze(c.key),c)}}function Ze(l){var r=(function(n,c){if(We(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(We(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return We(r)=="symbol"?r:r+""}function et(l,r,n){return r=ot(r),(function(c,e){if(e&&(We(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,tt()?Reflect.construct(r,n||[],ot(l).constructor):r.apply(l,n))}function tt(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tt=function(){return!!l})()}function Ge(){return Ge=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=ot(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}},Ge.apply(this,arguments)}function ot(l){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ot(l)}function ye(l,r){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ye(l,r)}Pe.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var ke=(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&&ye(e,t)})(r,l),n=r,(c=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){Ge(ot(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Ge(ot(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(a){return t=Math.max(t,"".concat(e.select_values[a]).length+4)})),Math.min(12,Math.max(t/7,2))}},{key:"preBuild",value:function(){var e;Ge(ot(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||{}),a=t.enum||[],u=t.options&&t.options.enum||[],w=t.options&&t.options.enum_titles||[];for(e=0;e<a.length;e++)if(this.sanitize(a[e])===a[e]){var T=u[e]||{};"title"in T||(T.title="".concat(w[e]||a[e])),this.option_keys.push("".concat(a[e])),this.option_enum.push(T),this.select_values["".concat(a[e])]=a[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 a=this.formname+e.toString();this.inputs[this.option_keys[e]]=this.theme.getCheckbox(),this.inputs[this.option_keys[e]].id=a,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=a,this.option_enum[e].infoText){var w=this.theme.getInfoButton(this.translateProperty(this.option_enum[e].infoText));u.appendChild(w)}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 $=[];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)&&$.push(t.select_values[t.option_keys[e]]);t.updateValue($),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"postBuild",value:function(){Ge(ot(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(e,t){var a=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){a.select_options[u][a.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,a=[],u=0;u<e.length;u++)if(this.select_options["".concat(e[u])]){var w=this.sanitize(this.select_values[e[u]]);a.push(w),w!==e[u]&&(t=!0)}else t=!0;return this.value=a,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})),Ge(ot(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(a){return t.inputs[a].disabled=!0})),Ge(ot(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){Ge(ot(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+)?$")),a=e.reduce((function(u,w){return w.path.match(t)&&u.push(w.message),u}),[]);a.length?this.theme.addInputError(this.input||this.inputs,"".concat(a.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&nt(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function xe(l){return xe=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},xe(l)}function Be(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,Ke(c.key),c)}}function Ke(l){var r=(function(n,c){if(xe(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(xe(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return xe(r)=="symbol"?r:r+""}function mt(l,r,n){return r=ht(r),(function(c,e){if(e&&(xe(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,St()?Reflect.construct(r,n||[],ht(l).constructor):r.apply(l,n))}function St(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(St=function(){return!!l})()}function _t(){return _t=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=ht(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}},_t.apply(this,arguments)}function ht(l){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ht(l)}function xt(l,r){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},xt(l,r)}var qt=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),mt(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&&xt(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(a){return"".concat(a)})),this.updateValue(e),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):_t(ht(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(a){var u=e.choices_instance.getValue(!0);e.updateValue(u),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}_t(ht(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,a=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var w=this.sanitize(this.select_values[e[u]]);a.push(w),w!==e[u]&&(t=!0)}return this.value=a,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(),_t(ht(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),_t(ht(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),_t(ht(r.prototype),"destroy",this).call(this)}}])&&Be(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ke);function wt(l){return wt=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},wt(l)}function Sa(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,xa(c.key),c)}}function xa(l){var r=(function(n,c){if(wt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(wt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return wt(r)=="symbol"?r:r+""}function Le(l,r,n){return r=Me(r),(function(c,e){if(e&&(wt(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,Fe()?Reflect.construct(r,n||[],Me(l).constructor):r.apply(l,n))}function Fe(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fe=function(){return!!l})()}function Ie(){return Ie=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Me(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}},Ie.apply(this,arguments)}function Me(l){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Me(l)}function ft(l,r){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ft(l,r)}var Ca=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Le(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&&ft(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(a){return"".concat(a)})),this.updateValue(e),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Ie(Me(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=E(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var a=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(a),t.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Ie(Me(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,a=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var w=this.sanitize(this.select_values[e[u]]);a.push(w),w!==e[u]&&(t=!0)}return this.value=a,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)),Ie(Me(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)),Ie(Me(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ie(Me(r.prototype),"destroy",this).call(this)}}])&&Sa(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ke);function on(l){return on=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},on(l)}function ig(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,og(c.key),c)}}function og(l){var r=(function(n,c){if(on(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(on(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return on(r)=="symbol"?r:r+""}function sg(l,r,n){return r=Ir(r),(function(c,e){if(e&&(on(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,ff()?Reflect.construct(r,n||[],Ir(l).constructor):r.apply(l,n))}function ff(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ff=function(){return!!l})()}function si(){return si=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},si.apply(this,arguments)}function Ir(l){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ir(l)}function Vl(l,r){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Vl(l,r)}var ag=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),sg(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&&Vl(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(a){return"".concat(a)})),this.updateValue(e),this.selectize_instance.setValue(this.value),this.onChange(!0)):si(Ir(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 $=t.selectize_instance.getValue();t.updateValue($),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);var a=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),a.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(a,this.input);var u=this.selectize_instance.$control[0];if(u){var w=this.theme.getHiddenLabel(this.formname);w.setAttribute("for",this.formname+"-selectized"),u.appendChild(w)}}si(Ir(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,a=[],u=0;u<e.length;u++)if(!(!this.select_values["".concat(e[u])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[u])))){var w=this.sanitize(this.select_values[e[u]]);a.push(w),w!==e[u]&&(t=!0)}return this.value=a,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(),si(Ir(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),si(Ir(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),si(Ir(r.prototype),"destroy",this).call(this)}}])&&ig(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ke);function Mi(l){return Mi=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},Mi(l)}function lg(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,cg(c.key),c)}}function cg(l){var r=(function(n,c){if(Mi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Mi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Mi(r)=="symbol"?r:r+""}function ug(l,r,n){return r=On(r),(function(c,e){if(e&&(Mi(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,pf()?Reflect.construct(r,n||[],On(l).constructor):r.apply(l,n))}function pf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(pf=function(){return!!l})()}function Go(){return Go=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Go.apply(this,arguments)}function On(l){return On=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},On(l)}function zl(l,r){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},zl(l,r)}var dg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ug(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&&zl(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)),Go(On(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(a){return console.log('No "search" callback defined for autocomplete in property "'.concat(a.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)),Go(On(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),Go(On(r.prototype),"destroy",this).call(this)}}])&&lg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);function qi(l){return qi=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},qi(l)}function hg(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,fg(c.key),c)}}function fg(l){var r=(function(n,c){if(qi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(qi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return qi(r)=="symbol"?r:r+""}function pg(l,r,n){return r=En(r),(function(c,e){if(e&&(qi(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,mf()?Reflect.construct(r,n||[],En(l).constructor):r.apply(l,n))}function mf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(mf=function(){return!!l})()}function Jo(){return Jo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Jo.apply(this,arguments)}function En(l){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},En(l)}function Hl(l,r){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Hl(l,r)}var mg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),pg(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&&Hl(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(a){if(t.count===t.current_item_index)t.value[t.count][t.key]=a.target.result;else{var u={};for(var w in t.parent.schema.properties)u[w]="";u[t.key]=a.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(a){if(a.preventDefault(),a.stopPropagation(),a.currentTarget.files&&a.currentTarget.files.length)if(a.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=a.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 w=new FileReader;e.setFileReaderListener(w),w.readAsDataURL(a.currentTarget.files[u])}}else{var T=new FileReader;T.onload=function($){e.value=$.target.result,e.refreshPreview(),e.onChange(!0),T=null},T.readAsDataURL(a.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),Jo(En(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Jo(En(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),Jo(En(r.prototype),"destroy",this).call(this)}}])&&hg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);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 yg(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,vg(c.key),c)}}function vg(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+""}function bg(l,r,n){return r=Sn(r),(function(c,e){if(e&&(Vi(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||[],Sn(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 Ko(){return Ko=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Ko.apply(this,arguments)}function Sn(l){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sn(l)}function Ul(l,r){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ul(l,r)}var vf=(function(l){function r(e,t){var a;return(function(u,w){if(!(u instanceof w))throw new TypeError("Cannot call a class as a function")})(this,r),(a=bg(this,r,[e,t])).active=!1,a.isUiOnly=!0,a.parent&&a.parent.schema&&(Array.isArray(a.parent.schema.required)?a.parent.schema.required.includes(a.key)||a.parent.schema.required.push(a.key):a.parent.schema.required=[a.key]),a}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&&Ul(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,w){window.alert('No button action defined for "'.concat(u.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),a=this.translateProperty(t.text||this.schema.title)||this.key;this.input=this.getButton(a,t.icon,a),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,Ko(Sn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,Ko(Sn(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,Ko(Sn(r.prototype),"destroy",this).call(this)}}])&&yg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function zi(l){return zi=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},zi(l)}function gg(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(zi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(zi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return zi(r)=="symbol"?r:r+""}function wg(l,r,n){return r=vr(r),(function(c,e){if(e&&(zi(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,bf()?Reflect.construct(r,n||[],vr(l).constructor):r.apply(l,n))}function bf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(bf=function(){return!!l})()}function xn(){return xn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},xn.apply(this,arguments)}function vr(l){return vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vr(l)}function Gl(l,r){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Gl(l,r)}var kg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),wg(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&&Gl(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=!!(e=this.applyConstFilter(e));var a=this.getValue()!==e;this.value=e,this.input.checked=this.value,t||(this.is_dirty=!0),this.onChange(a)}},{key:"register",value:function(){xn(vr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){xn(vr(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(){xn(vr(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,xn(vr(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,xn(vr(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),xn(vr(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,a=this.jsoneditor.options.show_errors,u=a==="change"||a==="interaction";if((a!=="never"||this.is_dirty)&&(!u||this.is_dirty)){var w=e.reduce((function(T,$){return $.path===t.path&&T.push($.message),T}),[]);this.input.controlgroup=this.control,w.length?this.theme.addInputError(this.input,"".concat(w.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&gg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Hi(l){return Hi=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},Hi(l)}function jg(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,Og(c.key),c)}}function Og(l){var r=(function(n,c){if(Hi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Hi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Hi(r)=="symbol"?r:r+""}function Eg(l,r,n){return r=br(r),(function(c,e){if(e&&(Hi(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||[],br(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 Cn(){return Cn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Cn.apply(this,arguments)}function br(l){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},br(l)}function Jl(l,r){return Jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Jl(l,r)}y(6910);var Wo=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Eg(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&&Jl(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e);var a=this.typecast(e),u=this.enum_options.length>0&&this.enum_values.includes(a),w=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;if(this.hasPlaceholderOption||u&&(!t||this.isRequired()||w)||(a=this.enum_values[0]),this.value!==a){var T=this.enum_values.indexOf(a);u&&T!==-1?this.input.value=this.enum_options[T]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=a,this.value=a,t||(this.is_dirty=!0),this.onChange(),this.change()}}},{key:"register",value:function(){Cn(br(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Cn(br(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,a,u,w=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 $=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(B,z){w.enum_options[z]="".concat(B),w.enum_display[z]="".concat(w.translateProperty($[z])||B),w.enum_values[z]=w.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(a=0;a<this.schema.enumSource.length;a++)typeof this.schema.enumSource[a]=="string"?this.enumSource[a]={source:this.schema.enumSource[a]}:Array.isArray(this.schema.enumSource[a])?this.enumSource[a]=this.schema.enumSource[a]:this.enumSource[a]=b({},this.schema.enumSource[a]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(a=0;a<this.enumSource.length;a++)this.enumSource[a].value&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[a].value})).template=="function"?this.enumSource[a].value=u.template:this.enumSource[a].value=this.jsoneditor.compileTemplate(this.enumSource[a].value,this.template_engine)),this.enumSource[a].title&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[a].title})).template=="function"?this.enumSource[a].title=u.template:this.enumSource[a].title=this.jsoneditor.compileTemplate(this.enumSource[a].title,this.template_engine)),this.enumSource[a].filter&&this.enumSource[a].value&&(typeof(u=this.expandCallbacks("template",{template:this.enumSource[a].filter})).template=="function"?this.enumSource[a].filter=u.template:this.enumSource[a].filter=this.jsoneditor.compileTemplate(this.enumSource[a].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,a=[],u=[];if(this.enumSource){e=this.getWatchedFieldValues();for(var w=0;w<this.enumSource.length;w++)if(Array.isArray(this.enumSource[w]))a=a.concat(this.enumSource[w]),u=u.concat(this.enumSource[w]);else{var T=[];if(T=Array.isArray(this.enumSource[w].source)?this.enumSource[w].source:e[this.enumSource[w].source]){if(this.enumSource[w].slice&&(T=Array.prototype.slice.apply(T,this.enumSource[w].slice)),this.enumSource[w].filter){var $=[];for(t=0;t<T.length;t++)this.enumSource[w].filter({i:t,item:T[t],watched:e})&&$.push(T[t]);T=$}var B=[],z=[];for(t=0;t<T.length;t++){var Q=T[t];this.enumSource[w].value?z[t]=this.typecast(this.enumSource[w].value({i:t,item:Q})):z[t]=T[t],this.enumSource[w].title?B[t]=this.enumSource[w].title({i:t,item:Q}):B[t]=z[t]}this.enumSource[w].sort&&(function(se,me,je){se.map((function(Se,Ae){return{v:Se,t:me[Ae]}})).sort((function(Se,Ae){return Se.v<Ae.v?-je:Se.v===Ae.v?0:je})).forEach((function(Se,Ae){se[Ae]=Se.v,me[Ae]=Se.t}))}).bind(null,z,B,this.enumSource[w].sort==="desc"?1:-1)(),a=a.concat(z),u=u.concat(B)}}var X=this.value;this.theme.setSelectOptions(this.input,a,u),this.enum_options=a,this.enum_display=u,this.enum_values=a,a.includes(X)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=X,this.value=X):(this.input.value=a[0],this.value=this.typecast(a[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}Cn(br(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Cn(br(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,Cn(br(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),Cn(br(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,a=this.jsoneditor.options.show_errors,u=a==="change"||a==="interaction";if((a!=="never"||this.is_dirty)&&(!u||this.is_dirty)){var w=e.reduce((function(T,$){return $.path===t.path&&T.push($.message),T}),[]);w.length?this.theme.addInputError(this.input,"".concat(w.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&jg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ui(l){return Ui=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},Ui(l)}function Sg(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,xg(c.key),c)}}function xg(l){var r=(function(n,c){if(Ui(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ui(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ui(r)=="symbol"?r:r+""}function Cg(l,r,n){return r=gr(r),(function(c,e){if(e&&(Ui(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,_f()?Reflect.construct(r,n||[],gr(l).constructor):r.apply(l,n))}function _f(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(_f=function(){return!!l})()}function Pn(){return Pn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=gr(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}},Pn.apply(this,arguments)}function gr(l){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gr(l)}function Kl(l,r){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Kl(l,r)}var wf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Cg(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&&Kl(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.choices_instance){var a=this.typecast(e||"");if(this.enum_values.includes(a)||(a=this.enum_values[0]),this.value===a)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(a)],this.choices_instance.setChoiceByValue(this.input.value),this.value=a,this.onChange()}else Pn(gr(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)}Pn(gr(r.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var e=this;if(Pn(gr(r.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var t=this.enum_options.map((function(a,u){return{value:a,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(),Pn(gr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),Pn(gr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Pn(gr(r.prototype),"destroy",this).call(this)}}])&&Sg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Wo);function ai(l){return ai=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},ai(l)}function Pg(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,Tg(c.key),c)}}function Tg(l){var r=(function(n,c){if(ai(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ai(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ai(r)=="symbol"?r:r+""}function Rg(l,r,n){return r=Tn(r),(function(c,e){if(e&&(ai(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,kf()?Reflect.construct(r,n||[],Tn(l).constructor):r.apply(l,n))}function kf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(kf=function(){return!!l})()}function Zo(){return Zo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Zo.apply(this,arguments)}function Tn(l){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tn(l)}function Wl(l,r){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Wl(l,r)}wf.rules={".choices > *":"box-sizing:border-box"};var Ag=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Rg(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&&Wl(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(Zo(Tn(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&&ai(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 a=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");a.setAttribute("data-toggle",""),t.push(a)}if(this.options.flatpickr.showClearButton!==!1){var u=this.getButton("","clear","flatpickr_clear_button");u.setAttribute("data-clear",""),t.push(u)}var w=this.input.parentNode,T=this.input.nextSibling,$=this.theme.getInputGroup(this.input,t);$!==void 0?(this.options.flatpickr.inline=!1,w.insertBefore($,T),e=$):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,a){if(e=this.applyConstFilter(e),this.schema.type==="string")Zo(Tn(r.prototype),"setValue",this).call(this,e,t,a),this.flatpickr&&this.flatpickr.setDate(e);else if(e>0){var u=new Date(1e3*e),w=u.getFullYear(),T=this.zeroPad(u.getMonth()+1),$=this.zeroPad(u.getDate()),B=this.zeroPad(u.getHours()),z=this.zeroPad(u.getMinutes()),Q=this.zeroPad(u.getSeconds()),X=[w,T,$].join("-"),se=[B,z,Q].join(":"),me="".concat(X,"T").concat(se);this.schema.format==="date"?me=X:this.schema.format==="time"&&(me=se),this.input.value=me,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(me)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Zo(Tn(r.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(e){return"0".concat(e).slice(-2)}}])&&Pg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);function Gi(l){return Gi=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},Gi(l)}function Lg(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(Gi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Gi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Gi(r)=="symbol"?r:r+""}function Ig(l,r,n){return r=_r(r),(function(c,e){if(e&&(Gi(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||[],_r(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 Rn(){return Rn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Rn.apply(this,arguments)}function _r(l){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_r(l)}function Zl(l,r){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Zl(l,r)}var Ng=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Ig(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&&Zl(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()}Rn(_r(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Rn(_r(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();Rn(_r(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();Rn(_r(r.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var e=this,t=this.getWatchedFieldValues();if(t){var a=document.location.origin+document.location.pathname+this.template(t);this.editors[this.refs[a]]||this.buildChildEditor(a),this.currentEditor=this.refs[a],this.register(),this.editors.forEach((function(u,w){u&&(e.currentEditor===w?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 a=b({},this.schema,this.jsoneditor.refs[e]),u=this.jsoneditor.getEditorClass(a,this.jsoneditor),w=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:a,container:t,path:this.path,parent:this,required:!0});this.editors.push(w),w.preBuild(),w.build(),w.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(),Rn(_r(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),Rn(_r(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){this.editors.forEach((function(t){t&&t.showValidationErrors(e)}))}}])&&Lg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function li(l){return li=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},li(l)}function Of(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 Dg(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,Bg(c.key),c)}}function Bg(l){var r=(function(n,c){if(li(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(li(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return li(r)=="symbol"?r:r+""}function Fg(l,r,n){return r=An(r),(function(c,e){if(e&&(li(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,Ef()?Reflect.construct(r,n||[],An(l).constructor):r.apply(l,n))}function Ef(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ef=function(){return!!l})()}function Yo(){return Yo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Yo.apply(this,arguments)}function An(l){return An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},An(l)}function Yl(l,r){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Yl(l,r)}var Mg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Fg(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&&Yl(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(a){e.selected=e.select_options.indexOf(a.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(a,u){if(t===JSON.stringify(a))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,Yo(An(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.switcher.disabled=!0,Yo(An(r.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(e){var t,a,u=this;if(e===null)return"<em>null</em>";if(li(e)==="object"){var w="";return t=e,a=function(T,$){var B=u.getHTML($);Array.isArray(e)||(B="<div><em>".concat(T,"</em>: ").concat(B,"</div>")),w+="<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,$){return a($,T)})):Object.entries(t).forEach((function(T){var $,B,z=(B=2,(function(se){if(Array.isArray(se))return se})($=T)||(function(se,me){var je=se==null?null:typeof Symbol<"u"&&se[Symbol.iterator]||se["@@iterator"];if(je!=null){var Se,Ae,Ne,Ve,_e=[],Ee=!0,Je=!1;try{if(Ne=(je=je.call(se)).next,me===0){if(Object(je)!==je)return;Ee=!1}else for(;!(Ee=(Se=Ne.call(je)).done)&&(_e.push(Se.value),_e.length!==me);Ee=!0);}catch(st){Je=!0,Ae=st}finally{try{if(!Ee&&je.return!=null&&(Ve=je.return(),Object(Ve)!==Ve))return}finally{if(Je)throw Ae}}return _e}})($,B)||(function(se,me){if(se){if(typeof se=="string")return Of(se,me);var je=Object.prototype.toString.call(se).slice(8,-1);return je==="Object"&&se.constructor&&(je=se.constructor.name),je==="Map"||je==="Set"?Array.from(se):je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(je)?Of(se,me):void 0}})($,B)||(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.`)})()),Q=z[0],X=z[1];return a(Q,X)})),w=Array.isArray(e)?"<ol>".concat(w,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(w,"</ul>")}return typeof e=="boolean"?e?"true":"false":typeof e=="string"?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):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),Yo(An(r.prototype),"destroy",this).call(this)}}])&&Dg(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 qg(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,Vg(c.key),c)}}function Vg(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 zg(l,r,n){return r=wr(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,Sf()?Reflect.construct(r,n||[],wr(l).constructor):r.apply(l,n))}function Sf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Sf=function(){return!!l})()}function Ln(){return Ln=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=wr(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}},Ln.apply(this,arguments)}function wr(l){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wr(l)}function Ql(l,r){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ql(l,r)}var Hg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),zg(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&&Ql(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){Ln(wr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Ln(wr(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(e,t,a){if(e=this.applyConstFilter(e),(!this.template||a)&&(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 w=a||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(w)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Ln(wr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Ln(wr(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),Ln(wr(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)),Ln(wr(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()}}])&&qg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ji(l){return Ji=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},Ji(l)}function Ug(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,Gg(c.key),c)}}function Gg(l){var r=(function(n,c){if(Ji(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ji(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ji(r)=="symbol"?r:r+""}function Jg(l,r,n){return r=Pa(r),(function(c,e){if(e&&(Ji(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||[],Pa(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 Pa(l){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pa(l)}function Xl(l,r){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Xl(l,r)}var Kg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Jg(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&&Xl(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}}])&&Ug(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(vf);function Ki(l){return Ki=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},Ki(l)}function Wg(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,Zg(c.key),c)}}function Zg(l){var r=(function(n,c){if(Ki(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ki(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ki(r)=="symbol"?r:r+""}function Yg(l,r,n){return r=Wi(r),(function(c,e){if(e&&(Ki(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,Cf()?Reflect.construct(r,n||[],Wi(l).constructor):r.apply(l,n))}function Cf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Cf=function(){return!!l})()}function ec(){return ec=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Wi(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}},ec.apply(this,arguments)}function Wi(l){return Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wi(l)}function tc(l,r){return tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},tc(l,r)}var Pf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Yg(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&&tc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(ec(Wi(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 a=this.schema.step||1;this.input.setAttribute("step",a)}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(k),a=parseFloat(e);return t!==null&&!isNaN(a)&&isFinite(a)})(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&Wg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);function Zi(l){return Zi=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},Zi(l)}function Qg(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,Xg(c.key),c)}}function Xg(l){var r=(function(n,c){if(Zi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Zi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Zi(r)=="symbol"?r:r+""}function e_(l,r,n){return r=Ta(r),(function(c,e){if(e&&(Zi(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,Tf()?Reflect.construct(r,n||[],Ta(l).constructor):r.apply(l,n))}function Tf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Tf=function(){return!!l})()}function Ta(l){return Ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ta(l)}function rc(l,r){return rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},rc(l,r)}var Rf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),e_(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:"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(S),a=parseInt(e);return t!==null&&!isNaN(a)&&isFinite(a)})(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&Qg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Pf);function Yi(l){return Yi=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},Yi(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(Yi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Yi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Yi(r)=="symbol"?r:r+""}function n_(l,r,n){return r=Qi(r),(function(c,e){if(e&&(Yi(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,Af()?Reflect.construct(r,n||[],Qi(l).constructor):r.apply(l,n))}function Af(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Af=function(){return!!l})()}function nc(){return nc=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Qi(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}},nc.apply(this,arguments)}function Qi(l){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qi(l)}function ic(l,r){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ic(l,r)}var i_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),n_(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:"preBuild",value:function(){if(nc(Qi(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||{})}}])&&t_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);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 o_(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 a_(l,r,n){return r=kr(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,Lf()?Reflect.construct(r,n||[],kr(l).constructor):r.apply(l,n))}function Lf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Lf=function(){return!!l})()}function $n(){return $n=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=kr(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}},$n.apply(this,arguments)}function kr(l){return kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kr(l)}function oc(l,r){return oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},oc(l,r)}var l_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),a_(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:"setValue",value:function(e,t,a){e=this.applyConstFilter(e);var u=$n(kr(r.prototype),"setValue",this).call(this,e,t,a);u!==void 0&&u.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(u.value)}},{key:"build",value:function(){this.options.format="textarea",$n(kr(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)):$n(kr(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),$n(kr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),$n(kr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),$n(kr(r.prototype),"destroy",this).call(this)}}])&&o_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);function c_(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(a){if(isNaN(+a)||+a<0||+a>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 $f(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 u_(l,r,n){return(r=If(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function jr(l){return jr=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},jr(l)}function Qo(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,a,u,w,T=[],$=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!($=(t=u.call(e)).done)&&(T.push(t.value),T.length!==c);$=!0);}catch(z){B=!0,a=z}finally{try{if(!$&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(B)throw a}}return T}})(l,r)||sc(l,r)||(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.`)})()}function
|
|
32
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function sc(l,r){if(l){if(typeof l=="string")return ac(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)?ac(l,r):void 0}}function ac(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 d_(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,If(c.key),c)}}function If(l){var r=(function(n,c){if(jr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(jr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return jr(r)=="symbol"?r:r+""}y(8431),y(7945),y(1278);var Nf=(function(){return l=function n(c,e,t,a){(function(u,w){if(!(u instanceof w))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||a.translate,this.translateProperty=this.jsoneditor.translateProperty||a.translateProperty,this.defaults=a,this._validateSubSchema={dependentRequired:function(u,w,T){var $=[];if(u.dependentRequired!==void 0){var B=[];Object.keys(u.dependentRequired).forEach((function(z){if(w[z]!==void 0){var Q=u.dependentRequired[z];B=Q.filter((function(X){return!E(w,X)}))}})),B.length>0&&$.push({message:"Must have the required properties: "+B.join(", "),path:T})}return $},dependentSchemas:function(u,w,T){var $=this,B=[];return Object.keys(u.dependentSchemas).forEach((function(z){if(w[z]!==void 0){var Q=u.dependentSchemas[z],X=$._validateSchema(Q,w,T);B=[].concat(ct(B),ct(X))}})),B},contains:function(u,w,T){var $=this,B=[],z=0;w.forEach((function(X){$._validateSchema(u.contains,X,T).length===0&&z++}));var Q=z===0;return u.minContains!==void 0?z<u.minContains&&B.push({message:this.translate("error_minContains",[z,u.minContains],u),path:T}):Q&&B.push({message:this.translate("error_contains",null,u),path:T}),u.maxContains!==void 0&&z>u.maxContains&&B.push({message:this.translate("error_maxContains",[z,u.maxContains],u),path:T}),B},if:function(u,w,T){if(u.then===void 0&&u.else===void 0)return[];var $=this._validateSchema(u.if,w,T),B=[],z=[];return u.then!==void 0&&(B=this._validateSchema(u.then,w,T)),u.else!==void 0&&(z=this._validateSchema(u.else,w,T)),u.if===!0?B:u.if===!1?z:$.length===0?B:$.length>0?z:[]},const:function(u,w,T){return JSON.stringify(u.const)===JSON.stringify(w)?[]:[{path:T,property:"const",message:this.translate("error_const",null,u)}]},enum:function(u,w,T){var $=JSON.stringify(w);return u.enum.some((function(B){return $===JSON.stringify(B)}))?[]:[{path:T,property:"enum",message:this.translate("error_enum",null,u)}]},extends:function(u,w,T){var $=this;return u.extends.reduce((function(B,z){return B.push.apply(B,ct($._validateSchema(z,w,T))),B}),[])},allOf:function(u,w,T){var $=this;return u.allOf.reduce((function(B,z){return B.push.apply(B,ct($._validateSchema(z,w,T))),B}),[])},anyOf:function(u,w,T){var $=this;return u.anyOf.some((function(B){return!$._validateSchema(B,w,T).length}))?[]:[{path:T,property:"anyOf",message:this.translate("error_anyOf",null,u)}]},oneOf:function(u,w,T){var $=this,B=0,z=[];u.oneOf.forEach((function(X,se){var me=$._validateSchema(X,w,T);me.length||B++,me.forEach((function(je){je.path="".concat(T,".oneOf[").concat(se,"]").concat(je.path.substr(T.length))})),z.push.apply(z,ct(me))}));var Q=[];return B!==1&&(Q.push({path:T,property:"oneOf",message:this.translate("error_oneOf",[B],u)}),Q.push.apply(Q,z)),Q},not:function(u,w,T){return this._validateSchema(u.not,w,T).length?[]:[{path:T,property:"not",message:this.translate("error_not",null,u)}]},type:function(u,w,T){var $=this;if(Array.isArray(u.type)){if(!u.type.some((function(B){return $._checkType(B,w)})))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(w)))return[{path:T,property:"type",message:this.translate("error_type",[u.format],u)}]}else if(!this._checkType(u.type,w))return[{path:T,property:"type",message:this.translate("error_type",[u.type],u)}];return[]},disallow:function(u,w,T){var $=this;if(Array.isArray(u.disallow)){if(u.disallow.some((function(B){return $._checkType(B,w)})))return[{path:T,property:"disallow",message:this.translate("error_disallow_union",null,u)}]}else if(this._checkType(u.disallow,w))return[{path:T,property:"disallow",message:this.translate("error_disallow",[u.disallow],u)}];return[]}},this._validateNumberSubSchema={multipleOf:function(u,w,T){return this._validateNumberSubSchemaMultipleDivisible(u,w,T)},divisibleBy:function(u,w,T){return this._validateNumberSubSchemaMultipleDivisible(u,w,T)},maximum:function(u,w,T){var $=u.exclusiveMaximum?w<u.maximum:w<=u.maximum;return window.math?$=window.math[u.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(w),window.math.bignumber(u.maximum)):window.Decimal&&($=new window.Decimal(w)[u.exclusiveMaximum?"lt":"lte"](new window.Decimal(u.maximum))),$?[]:[{path:T,property:"maximum",message:this.translate(u.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[u.maximum],u)}]},minimum:function(u,w,T){var $=u.exclusiveMinimum?w>u.minimum:w>=u.minimum;return window.math?$=window.math[u.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(w),window.math.bignumber(u.minimum)):window.Decimal&&($=new window.Decimal(w)[u.exclusiveMinimum?"gt":"gte"](new window.Decimal(u.minimum))),$?[]:[{path:T,property:"minimum",message:this.translate(u.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[u.minimum],u)}]}},this._validateStringSubSchema={maxLength:function(u,w,T){var $=[];return"".concat(w).length>u.maxLength&&$.push({path:T,property:"maxLength",message:this.translate("error_maxLength",[u.maxLength],u)}),$},minLength:function(u,w,T){return"".concat(w).length<u.minLength?[{path:T,property:"minLength",message:this.translate(u.minLength===1?"error_notempty":"error_minLength",[u.minLength],u)}]:[]},pattern:function(u,w,T){return new RegExp(u.pattern).test(w)?[]:[{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,w,T){var $=this,B=[];if(Array.isArray(u.items))for(var z=0;z<w.length;z++)if(u.items[z])B.push.apply(B,ct(this._validateSchema(u.items[z],w[z],"".concat(T,".").concat(z))));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,ct(this._validateSchema(u.additionalItems,w[z],"".concat(T,".").concat(z))))}else w.forEach((function(Q,X){B.push.apply(B,ct($._validateSchema(u.items,Q,"".concat(T,".").concat(X))))}));return B},maxItems:function(u,w,T){return w.length>u.maxItems?[{path:T,property:"maxItems",message:this.translate("error_maxItems",[u.maxItems],u)}]:[]},minItems:function(u,w,T){return w.length<u.minItems?[{path:T,property:"minItems",message:this.translate("error_minItems",[u.minItems],u)}]:[]},uniqueItems:function(u,w,T){for(var $={},B=0;B<w.length;B++){var z=JSON.stringify(w[B]);if($[z])return[{path:T,property:"uniqueItems",message:this.translate("error_uniqueItems",null,u)}];$[z]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(u,w,T){return Object.keys(w).length>u.maxProperties?[{path:T,property:"maxProperties",message:this.translate("error_maxProperties",[u.maxProperties],u)}]:[]},minProperties:function(u,w,T){return Object.keys(w).length<u.minProperties?[{path:T,property:"minProperties",message:this.translate("error_minProperties",[u.minProperties],u)}]:[]},required:function(u,w,T){var $=this,B=[];return Array.isArray(u.required)&&u.required.forEach((function(z){if(w[z]===void 0){var Q=$.jsoneditor.getEditor("".concat(T,".").concat(z));Q&&Q.dependenciesFulfilled===!1||Q&&["button","info"].includes(Q.schema.format||Q.schema.type)||B.push({path:T,property:"required",message:$.translate("error_required",[u&&u.properties&&u.properties[z]&&u.properties[z].title?u.properties[z].title:z],u)})}})),B},properties:function(u,w,T,$){var B=this,z=[];return Object.entries(u.properties).forEach((function(Q){var X=Qo(Q,2),se=X[0],me=X[1];$[se]=!0,z.push.apply(z,ct(B._validateSchema(me,w[se],"".concat(T,".").concat(se))))})),z},patternProperties:function(u,w,T,$){var B=this,z=[];return Object.entries(u.patternProperties).forEach((function(Q){var X=Qo(Q,2),se=X[0],me=X[1],je=new RegExp(se);Object.entries(w).forEach((function(Se){var Ae=Qo(Se,2),Ne=Ae[0],Ve=Ae[1];je.test(Ne)&&($[Ne]=!0,z.push.apply(z,ct(B._validateSchema(me,Ve,"".concat(T,".").concat(Ne)))))}))})),z}},this._validateObjectSubSchema2={propertyNames:function(u,w,T,$){for(var B,z=this,Q=[],X=Object.keys(w),se=null,me=function(){var Se="";return se=X[je],typeof u.propertyNames=="boolean"?u.propertyNames===!0?0:(Q.push({path:T,property:"propertyNames",message:z.translate("error_property_names_false",[se],u)}),1):Object.entries(u.propertyNames).every((function(Ae){var Ne=Qo(Ae,2),Ve=Ne[0],_e=Ne[1],Ee=!1;switch(Ve){case"maxLength":if(typeof _e!="number"){Se="error_property_names_maxlength";break}if(se.length>_e){Se="error_property_names_exceeds_maxlength";break}return!0;case"const":if(_e!==se){Se="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(_e)){Se="error_property_names_enum";break}if(_e.forEach((function(Je){Je===se&&(Ee=!0)})),!Ee){Se="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof _e!="string"){Se="error_property_names_pattern";break}if(!new RegExp(_e).test(se)){Se="error_property_names_pattern_mismatch";break}return!0;default:return Q.push({path:T,property:"propertyNames",message:z.translate("error_property_names_unsupported",[Ve],u)}),!1}return Q.push({path:T,property:"propertyNames",message:z.translate(Se,[se],u)}),!1}))?void 0:1},je=0;je<X.length&&((B=me())===0||B!==1);je++);return Q},additionalProperties:function(u,w,T,$){for(var B=[],z=Object.keys(w),Q=0;Q<z.length;Q++){var X=z[Q];if(!$[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,ct(this._validateSchema(u.additionalProperties,w[X],"".concat(T,".").concat(X))))}}return B},dependencies:function(u,w,T){var $=this,B=[];return Object.entries(u.dependencies).forEach((function(z){var Q=Qo(z,2),X=Q[0],se=Q[1];w[X]!==void 0&&(Array.isArray(se)?se.forEach((function(me){w[me]===void 0&&B.push({path:T,property:"dependencies",message:$.translate("error_dependency",[me],u)})})):B.push.apply(B,ct($._validateSchema(se,w,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(jr(n)==="object"&&n!==null){var a=this._getSchema(c);if(a.anyOf){var u,w=(function(se){for(var me=1;me<arguments.length;me++){var je=arguments[me]!=null?arguments[me]:{};me%2?$f(Object(je),!0).forEach((function(Se){u_(se,Se,je[Se])})):Object.getOwnPropertyDescriptors?Object.defineProperties(se,Object.getOwnPropertyDescriptors(je)):$f(Object(je)).forEach((function(Se){Object.defineProperty(se,Se,Object.getOwnPropertyDescriptor(je,Se))}))}return se})({},t),T=(function(se,me){var je=typeof Symbol<"u"&&se[Symbol.iterator]||se["@@iterator"];if(!je){if(Array.isArray(se)||(je=sc(se))){je&&(se=je);var Se=0,Ae=function(){};return{s:Ae,n:function(){return Se>=se.length?{done:!0}:{done:!1,value:se[Se++]}},e:function(Ee){throw Ee},f:Ae}}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.`)}var Ne,Ve=!0,_e=!1;return{s:function(){je=je.call(se)},n:function(){var Ee=je.next();return Ve=Ee.done,Ee},e:function(Ee){_e=!0,Ne=Ee},f:function(){try{Ve||je.return==null||je.return()}finally{if(_e)throw Ne}}}})(a.anyOf);try{for(T.s();!(u=T.n()).done;){var $=u.value,B=this.fitTest(n,$,e);(B.match>w.match||B.match===w.match&&B.extra<w.extra)&&(w=B)}}catch(se){T.e(se)}finally{T.f()}return w}var z=this._getSchema(c).properties;for(var Q in z)if(E(z,Q)){if(jr(n[Q])==="object"&&jr(z[Q])==="object"&&jr(z[Q].properties)==="object"){var X=this.fitTest(n[Q],z[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,a=[];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]&&a.push.apply(a,ct(t._validateSubSchema[u].call(t,n,c,e)))})),a.push.apply(a,ct(this._validateByValueType(n,c,e))),n.links&&n.links.forEach((function(u,w){u.rel&&u.rel.toLowerCase()==="describedby"&&(n=t._expandSchemaLink(n,w),a.push.apply(a,ct(t._validateSchema(n,c,e,t.translate))))})),["date","time","datetime-local"].includes(n.format)&&a.push.apply(a,ct(this._validateDateTimeSubSchema(n,c,e))),["uuid"].includes(n.format)&&a.push.apply(a,ct(this._validateUUIDSchema(n,c,e))),a.push.apply(a,ct(this._validateCustomValidator(n,c,e))),this._removeDuplicateErrors(a))}},{key:"_expandSchemaLink",value:function(n,c){var e=n.links[c].href,t=this.jsoneditor.root.getValue(),a=this.jsoneditor.compileTemplate(e,this.jsoneditor.template),u=document.location.origin+document.location.pathname+a(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,a=[];if(c===null)return a;if(typeof c=="number")Object.keys(n).forEach((function(w){t._validateNumberSubSchema[w]&&a.push.apply(a,ct(t._validateNumberSubSchema[w].call(t,n,c,e)))}));else if(typeof c=="string")Object.keys(n).forEach((function(w){t._validateStringSubSchema[w]&&a.push.apply(a,ct(t._validateStringSubSchema[w].call(t,n,c,e)))}));else if(Array.isArray(c))Object.keys(n).forEach((function(w){t._validateArraySubSchema[w]&&a.push.apply(a,ct(t._validateArraySubSchema[w].call(t,n,c,e)))}));else if(jr(c)==="object"){var u={};Object.keys(n).forEach((function(w){t._validateObjectSubSchema[w]&&a.push.apply(a,ct(t._validateObjectSubSchema[w].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(w){t._validateObjectSubSchema2[w]!==void 0&&a.push.apply(a,ct(t._validateObjectSubSchema2[w].call(t,n,c,e,u)))}))}return a}},{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,a=c/t===Math.floor(c/t);return window.math?a=window.math.mod(window.math.bignumber(c),window.math.bignumber(t)).equals(0):window.Decimal&&(a=new window.Decimal(c).mod(new window.Decimal(t)).equals(0)),a?[]:[{path:e,property:n.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[t],n)}]}},{key:"_validateDateTimeSubSchema",value:function(n,c,e){var t=this,a=this.jsoneditor.getEditor(e),u=a&&a.flatpickr?a.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(w,T,$){return 1*T<1?[{path:$,property:"format",message:t.translate("error_invalid_epoch",null,w)}]:T!==Math.abs(parseInt(T))?[{path:$,property:"format",message:t.translate("error_".concat(w.format.replace(/-/g,"_")),[u],w)}]:[]})(n,c,e);if(a&&a.flatpickr){if(a)return(function(w,T,$,B){if(T!==""){var z;if(B.flatpickr.config.mode!=="single"){var Q=B.flatpickr.config.mode==="range"?B.flatpickr.l10n.rangeSeparator:", ";z=B.flatpickr.selectedDates.map((function(se){return B.flatpickr.formatDate(se,B.flatpickr.config.dateFormat)})).join(Q)}try{if(z){if(z!==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:$,property:"format",message:t.translate("error_".concat(B.format.replace(/-/g,"_")),[X],w)}]}}return[]})(n,c,e,a)}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,a=[];a.push.apply(a,ct(c_.call(this,n,c,e,this.translate)));var u=function(w){a.push.apply(a,ct(w.call(t,n,c,e)))};return this.defaults.custom_validators.forEach(u),this.options.custom_validators&&this.options.custom_validators.forEach(u),a}},{key:"_removeDuplicateErrors",value:function(n){return n.reduce((function(c,e){var t=!0;return c||(c=[]),c.forEach((function(a){a.message===e.message&&a.path===e.path&&a.property===e.property&&(a.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)&&jr(t)==="object"},null:function(t){return t===null}};return typeof n=="string"?!e[n]||e[n](c):!this._validateSchema(n,c).length}}],r&&d_(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function ui(l){return ui=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},ui(l)}function h_(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(ui(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ui(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ui(r)=="symbol"?r:r+""}function p_(l,r,n){return r=Or(r),(function(c,e){if(e&&(ui(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,Df()?Reflect.construct(r,n||[],Or(l).constructor):r.apply(l,n))}function Df(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Df=function(){return!!l})()}function In(){return In=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Or(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}},In.apply(this,arguments)}function Or(l){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Or(l)}function lc(l,r){return lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},lc(l,r)}var m_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),p_(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:"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()}In(Or(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(In(Or(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,In(Or(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,In(Or(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 a=this.getValue();this.type=e,this.register(),this.editors.forEach((function(u,w){var T,$;u&&(t.type===w?(t.keep_only_existing_values&&(T=u.getValue(),$=a,Object.keys($).forEach((function(B){B in T&&(T[B]=$[B])})),a=T),(t.keep_values||t.if)&&u.setValue(a,!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,a,u=this,w=this.types[e],T=this.theme.getChildEditorHolder();this.editor_holder.appendChild(T),typeof w=="string"?(a=b({},this.schema)).type=w:(a=b({},this.schema,w),a=this.jsoneditor.expandRefs(a),w&&w.required&&Array.isArray(w.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(a.required=this.schema.required.concat(w.required))),(t=a)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies&&delete a.options.dependencies;var $=this.jsoneditor.getEditorClass(a);this.editors[e]=this.jsoneditor.createEditor($,{jsoneditor:this.jsoneditor,schema:a,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&&A(this.thenSchema,this.schema,this.schema.then),this.schema.else&&A(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach((function(a){delete a.if,delete a.then,delete a.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;ui(e)==="object"&&Array.isArray(e)||(e=[e]);var t=[];this.types.forEach((function(a){e.includes(a)||t.push(a)})),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 a={};this.jsoneditor.options.custom_validators&&(a.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((function(u,w){var T;e.editors[w]=!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[w]=new Nf(e.jsoneditor,T,a,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()),In(Or(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,a){t.textContent=e[a]}))}},{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 a=this;e=this.applyConstFilter(e);var u=this.type,w={match:0,extra:0,i:this.type},T={match:0,i:null};this.validators.forEach((function(z,Q){var X=null;a.anyOf!==void 0&&a.anyOf&&(X=z.fitTest(e),(w.match<X.match||w.match===X.match&&w.extra>X.extra)&&((w=X).i=Q)),z.validate(e).length||T.i!==null?w=T:(T.i=Q,X!==null&&(T.match=X.match))}));var $=T.i;this.anyOf!==void 0&&this.anyOf&&T.match<w.match&&($=w.i),this.if&&($=this.getIfType(e)),$===null&&($=this.type),this.type=$,this.switcher.value=this.display_text[$];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),In(Or(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this;if(this.oneOf||this.anyOf){var a=this.oneOf?"oneOf":"anyOf";this.editors.forEach((function(u,w){if(u){var T="".concat(t.path,".").concat(a,"[").concat(w,"]");u.showValidationErrors(e.reduce((function($,B){if(B.path.startsWith(T)||B.path===T.substr(0,B.path.length)){var z=b({},B);B.path.startsWith(T)&&(z.path=t.path+z.path.substr(T.length)),$.push(z)}return $}),[]))}}))}else this.editors.forEach((function(u){u&&u.showValidationErrors(e)}))}},{key:"addLinks",value:function(){}}])&&h_(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 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(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 b_(l,r,n){return r=Ra(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,Bf()?Reflect.construct(r,n||[],Ra(l).constructor):r.apply(l,n))}function Bf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Bf=function(){return!!l})()}function Ra(l){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ra(l)}function cc(l,r){return cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},cc(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&&cc(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}}])&&y_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ff(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 to(l){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ff(Object(n),!0).forEach((function(c){Aa(l,c,n[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(n)):Ff(Object(n)).forEach((function(c){Object.defineProperty(l,c,Object.getOwnPropertyDescriptor(n,c))}))}return l}function Aa(l,r,n){return(r=qf(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function ro(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,a,u,w,T=[],$=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!($=(t=u.call(e)).done)&&(T.push(t.value),T.length!==c);$=!0);}catch(z){B=!0,a=z}finally{try{if(!$&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(B)throw a}}return T}})(l,r)||(function(n,c){if(n){if(typeof n=="string")return Mf(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)?Mf(n,c):void 0}})(l,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
34
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Mf(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 sn(l){return sn=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},sn(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,qf(c.key),c)}}function qf(l){var r=(function(n,c){if(sn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(sn(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return sn(r)=="symbol"?r:r+""}function w_(l,r,n){return r=tr(r),(function(c,e){if(e&&(sn(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,Vf()?Reflect.construct(r,n||[],tr(l).constructor):r.apply(l,n))}function Vf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Vf=function(){return!!l})()}function Nr(){return Nr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=tr(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}},Nr.apply(this,arguments)}function tr(l){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tr(l)}function uc(l,r){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},uc(l,r)}var zf=(function(l){function r(e,t,a){var u;return(function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")})(this,r),(u=w_(this,r,[e,t])).currentDepth=a,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&&uc(e,t)})(r,l),n=r,(c=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Nr(tr(r.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){Nr(tr(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),Nr(tr(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(),Nr(tr(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,a=this;if(this.row_container){var u;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(Ve,_e){var Ee=a.editors[Ve].schema.propertyOrder,Je=a.editors[_e].schema.propertyOrder;return typeof Ee!="number"&&(Ee=1e3),typeof Je!="number"&&(Je=1e3),Ee-Je}));var w,T=this.format==="categories",$=[],B=null,z=null;if(this.format==="grid-strict"){var Q=0;if(w=[],this.property_order.forEach((function(Ve){var _e=a.editors[Ve];if(!_e.property_removed){var Ee=_e.options.hidden?0:_e.options.grid_columns||_e.getNumColumns(),Je=_e.options.hidden?0:_e.options.grid_offset||0,st=!_e.options.hidden&&(_e.options.grid_break||!1),Vt={key:Ve,width:Ee,offset:Je,height:_e.options.hidden?0:_e.container.offsetHeight};w.push(Vt),$[Q]=w,st&&(Q++,w=[])}})),this.layout===JSON.stringify($))return!1;for(this.layout=JSON.stringify($),u=document.createElement("div"),e=0;e<$.length;e++)for(w=this.theme.getGridRow(),u.appendChild(w),t=0;t<$[e].length;t++)B=$[e][t].key,(z=this.editors[B]).options.hidden?z.container.style.display="none":this.theme.setGridColumnSize(z.container,$[e][t].width,$[e][t].offset),w.appendChild(z.container)}else if(this.format==="grid"){for(this.property_order.forEach((function(Ve){var _e=a.editors[Ve];if(!_e.property_removed){for(var Ee=!1,Je=_e.options.hidden?0:_e.options.grid_columns||_e.getNumColumns(),st=_e.options.hidden?0:_e.container.offsetHeight,Vt=0;Vt<$.length;Vt++)$[Vt].width+Je<=12&&(!st||.5*$[Vt].minh<st&&2*$[Vt].maxh>st)&&(Ee=Vt);Ee===!1&&($.push({width:0,minh:999999,maxh:0,editors:[]}),Ee=$.length-1),$[Ee].editors.push({key:Ve,width:Je,height:st}),$[Ee].width+=Je,$[Ee].minh=Math.min($[Ee].minh,st),$[Ee].maxh=Math.max($[Ee].maxh,st)}})),e=0;e<$.length;e++)if($[e].width<12){var X=!1,se=0;for(t=0;t<$[e].editors.length;t++)(X===!1||$[e].editors[t].width>$[e].editors[X].width)&&(X=t),$[e].editors[t].width*=12/$[e].width,$[e].editors[t].width=Math.floor($[e].editors[t].width),se+=$[e].editors[t].width;se<12&&($[e].editors[X].width+=12-se),$[e].width=12}if(this.layout===JSON.stringify($))return!1;for(this.layout=JSON.stringify($),u=document.createElement("div"),e=0;e<$.length;e++)for(w=this.theme.getGridRow(),u.appendChild(w),t=0;t<$[e].editors.length;t++)B=$[e].editors[t].key,(z=this.editors[B]).options.hidden?z.container.style.display="none":this.theme.setGridColumnSize(z.container,$[e].editors[t].width),w.appendChild(z.container)}else{if(u=document.createElement("div"),T){var me=document.createElement("div"),je=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Se=this.theme.getTopTabContentHolder(je);for(this.property_order.forEach((function(Ve){var _e=a.editors[Ve];if(!_e.property_removed){var Ee=a.theme.getTabContent(),Je=_e.schema&&(_e.schema.type==="object"||_e.schema.type==="array");Ee.isObjOrArray=Je;var st=a.theme.getGridRow();_e.tab||(a.basicPane===void 0?a.addRow(_e,je,Ee):a.addRow(_e,je,a.basicPane)),Ee.id=a.getValidId(_e.tab_text.textContent),Je?(Ee.appendChild(st),Se.appendChild(Ee),a.theme.addTopTab(je,_e.tab)):(me.appendChild(st),Se.childElementCount>0?Se.firstChild.isObjOrArray&&(Ee.appendChild(me),Se.insertBefore(Ee,Se.firstChild),a.theme.insertBasicTopTab(_e.tab,je),_e.basicPane=Ee):(Ee.appendChild(me),Se.appendChild(Ee),a.theme.addTopTab(je,_e.tab),_e.basicPane=Ee)),_e.options.hidden?_e.container.style.display="none":a.theme.setGridColumnSize(_e.container,12),st.appendChild(_e.container),_e.rowPane=Ee}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var Ae=this.tabs_holder.parentNode;Ae.removeChild(Ae.firstChild),Ae.appendChild(je),this.tabPanesContainer=Se,this.tabs_holder=je;var Ne=this.theme.getFirstTab(this.tabs_holder);return void(Ne&&j(Ne,"click"))}this.property_order.forEach((function(Ve){var _e=a.editors[Ve];_e.property_removed||(w=a.theme.getGridRow(),u.appendChild(w),_e.options.hidden?_e.container.style.display="none":a.theme.setGridColumnSize(_e.container,12),w.appendChild(_e.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,a=this.schema.properties[e]||{};a=b({},a);var u=!!this.schema.properties[e];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(w){new RegExp(w).test(e)&&(a.allOf=a.allOf||[],a.allOf.push(t.schema.patternProperties[w]),u=!0)})),!u&&this.schema.additionalProperties&&sn(this.schema.additionalProperties)==="object"&&(a=b({},this.schema.additionalProperties)),a}},{key:"preBuild",value:function(){var e=this;if(Nr(tr(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 a=ro(t,2),u=a[0],w=a[1],T=e.jsoneditor.getEditorClass(w);e.editors[u]=e.jsoneditor.createEditor(T,{jsoneditor:e.jsoneditor,schema:w,path:"".concat(e.path,".").concat(u),parent:e,compact:!0,required:!0},e.currentDepth+1),e.editors[u].preBuild();var $=e.editors[u].options.hidden?0:e.editors[u].options.grid_columns||e.editors[u].getNumColumns();e.minwidth+=$,e.maxwidth+=$})),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,a){var u=e.editors[t].schema.propertyOrder,w=e.editors[a].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof w!="number"&&(w=1e3),u-w}))}},{key:"addTab",value:function(e){var t=this,a=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=a?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,a){var u=this.rows.length,w=e.schema.type==="object"||e.schema.type==="array";this.rows[u]=e,this.rows[u].rowPane=a,w?(this.addTab(u),this.theme.addTopTab(t,this.rows[u].tab)):this.basicTab===void 0?(this.addTab(u),this.basicTab=u,this.basicPane=a,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,a=this.basicTab!==void 0,u=!1;this.rows.forEach((function(w){w.tab&&w.rowPane&&w.rowPane.parentNode&&(a&&w.tab===t.rows[t.basicTab].tab&&u||(e?w.tab_text.textContent=w.getHeaderText():(a&&w.tab===t.rows[t.basicTab].tab&&(u=!0),w.tab===t.active_tab?t.theme.markTabActive(w):t.theme.markTabInactive(w))))}))}},{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 w=ro(u,2),T=w[0],$=w[1],B=e.theme.getTableCell();e.editor_holder.appendChild(B),$.setContainer(B),$.build(),$.postBuild(),$.setOptInCheckbox($.header),$.setValue($.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 w=e.editors[e.addproperty_input.value].key,T=e.editors[e.addproperty_input.value].type,$=e.editors[e.addproperty_input.value].path;e.onChange(!0,!1,{event:"add",data:{key:w,type:T,path:$}})}})),this.addproperty_input.addEventListener("input",(function(u){u.target.previousSibling.previousSibling.childNodes.forEach((function(w){var T=w.innerText,$=u.target.value;e.options.case_sensitive_property_search||e.jsoneditor.options.case_sensitive_property_search||(T=T.toLowerCase(),$=$.toLowerCase()),T.includes($)?w.style.display="":w.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 a=document.createElement("div");a.style.clear="both",this.addproperty_holder.appendChild(a),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 w=e.theme.getTabContent(),T=e.theme.getGridColumn(),$=!(!u.schema||u.schema.type!=="object"&&u.schema.type!=="array");if(w.isObjOrArray=$,t){if($){var B=e.theme.getGridContainer();B.appendChild(T),w.appendChild(B),e.tabPanesContainer.appendChild(w),e.row_container=B}else e.row_container_basic===void 0&&(e.row_container_basic=e.theme.getGridContainer(),w.appendChild(e.row_container_basic),e.tabPanesContainer.childElementCount===0?e.tabPanesContainer.appendChild(w):e.tabPanesContainer.insertBefore(w,e.tabPanesContainer.childNodes[1])),e.row_container_basic.appendChild(T);e.addRow(u,e.tabs_holder,w),w.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]&&j(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",(function(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&&j(this.collapse_control,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",(function(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,a=this.jsoneditor.options.show_opt_in,u=this.options.show_opt_in!==void 0,w=u&&this.options.show_opt_in===!0,T=u&&this.options.show_opt_in===!1;(w||!T&&a||!u&&a)&&Object.entries(this.editors).forEach((function($){var B=ro($,2),z=B[0],Q=B[1];t.isRequiredObject(Q)||t.editors[z].deactivate(),e&&typeof t.editors[z].deactivateNonRequiredProperties=="function"&&t.editors[z].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,a){var u;this.schema.properties[e]&&(u=this.schema.properties[e].propertyOrder),typeof u!="number"&&(u=1e3),t.propertyOrder=u;for(var w=0;w<a.childNodes.length;w++){var T=a.childNodes[w];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,a=this,u=this.theme.getCheckbox();t=this.schema.properties[e]&&this.schema.properties[e].title?this.schema.properties[e].title:e;var w=this.theme.getCheckboxLabel(t),T=this.theme.getFormControl(w,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?a.addObjectProperty(e):a.removeObjectProperty(e),a.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,a){switch(a){case"$ref":return t;case"properties":case"items":return to(to({},t),{},Aa({},a,{}));case"additionalProperties":case"propertyNames":return to(to({},t),{},Aa({},a,!0));default:return to(to({},t),{},Aa({},a,e[a]))}}),{})}},{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($){return new RegExp($).test(e)}))))return;var a=this.getPropertySchema(e);typeof a.propertyOrder!="number"&&(a.propertyOrder=Object.keys(this.editors).length+1e3);var u=this.jsoneditor.getEditorClass(a),w=this.jsoneditor.options.max_depth;if(this.editors[e]=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:w&&this.currentDepth>=w?this.getSchemaOnMaxDepth(a):a,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(),Nr(tr(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:sn(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),Nr(tr(r.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var e=Nr(tr(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 a;((a=e[t])===void 0||a===""||a===Object(a)&&Object.keys(a).length===0&&a.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(a){var u;Object.entries(t.cached_editors).forEach((function(w){var T=ro(w,2),$=(T[0],T[1]);$.key===a&&(u=$)})),u&&!u.isActive()&&u.activate()}))}},{key:"getDependentRequired",value:function(e){return this.schema.dependentRequired&&E(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,a=0,u=!1;Object.keys(this.editors).forEach((function(w){return a++})),t=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&a>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(w){e.addPropertyCheckbox(w),e.isRequiredObject(e.cached_editors[w])&&w in e.editors&&(e.addproperty_checkboxes[w].disabled=!0),e.schema.minProperties!==void 0&&a<=e.schema.minProperties?(e.addproperty_checkboxes[w].disabled=e.addproperty_checkboxes[w].checked,e.addproperty_checkboxes[w].checked||(u=!0)):w in e.editors?u=!0:t||E(e.schema.properties,w)?(e.addproperty_checkboxes[w].disabled=!1,u=!0):e.addproperty_checkboxes[w].disabled=!0})),this.canHaveAdditionalProperties()&&(u=!0),Object.keys(this.schema.properties).forEach((function(w){e.cached_editors[w]||(u=!0,e.addPropertyCheckbox(w))})),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 a=this;(sn(e=(e=this.applyConstFilter(e))||{})!=="object"||Array.isArray(e))&&(e={}),Object.entries(this.cached_editors).forEach((function(u){var w=ro(u,2),T=w[0],$=w[1];e[T]!==void 0?(a.addObjectProperty(T),$.setValue(e[T],t),$.activate(),a.disabled&&$.disable()):t||a.isRequiredObject($)?$.setValue($.getDefault(),t):a.jsoneditor.options.show_opt_in||a.options.show_opt_in?$.deactivate():a.removeObjectProperty(T)})),Object.entries(e).forEach((function(u){var w=ro(u,2),T=w[0],$=w[1];a.cached_editors[T]||(a.addObjectProperty(T),a.editors[T]&&a.editors[T].setValue($,t,!!a.editors[T].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(e){var t=this,a=[],u=[];e.forEach((function(w){w.path===t.path?a.push(w):u.push(w)})),this.error_holder&&(a.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",a.forEach((function(w){w.errorcount&&w.errorcount>1&&(w.message+=" (".concat(w.errorcount," errors)")),t.error_holder.appendChild(t.theme.getErrorMessage(w.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(a.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(w){w.showValidationErrors(u)}))}}])&&__(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);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 k_(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(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 O_(l,r,n){return r=an(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,Hf()?Reflect.construct(r,n||[],an(l).constructor):r.apply(l,n))}function Hf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Hf=function(){return!!l})()}function io(){return io=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},io.apply(this,arguments)}function an(l){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},an(l)}function dc(l,r){return dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},dc(l,r)}zf.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 E_=(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&&dc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){io(an(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(z){e.setValue(z.currentTarget.value),e.onChange(!0),e.radioGroup.forEach((function(Q){Q.checked=Q.value===e.getValue()}))},a=0;a<this.enum_values.length;a++){var u={id:"".concat(this.formname,"[").concat(a,"]"),value:this.enum_values[a]};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 w=this.theme.getFormRadioLabel(this.enum_display[a]);w.htmlFor=this.input.id;var T=this.theme.getFormRadioControl(w,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 $=0;$<this.radioGroup.length;$++)this.radioGroup[$].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"),io(an(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"),io(an(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),io(an(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()}}])&&k_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Wo);function oo(l){return oo=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},oo(l)}function S_(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(oo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(oo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return oo(r)=="symbol"?r:r+""}function C_(l,r,n){return r=Er(r),(function(c,e){if(e&&(oo(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,Uf()?Reflect.construct(r,n||[],Er(l).constructor):r.apply(l,n))}function Uf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Uf=function(){return!!l})()}function Nn(){return Nn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Er(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}},Nn.apply(this,arguments)}function Er(l){return Er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Er(l)}function hc(l,r){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},hc(l,r)}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&&hc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,a){e=this.applyConstFilter(e);var u=Nn(Er(r.prototype),"setValue",this).call(this,e,t,a);u!==void 0&&u.changed&&this.sceditor_instance&&this.sceditor_instance.val(u.value)}},{key:"build",value:function(){this.options.format="textarea",Nn(Er(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})),a=window.sceditor.instance(this.input);a===void 0&&window.sceditor.create(this.input,t),this.sceditor_instance=a||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 Nn(Er(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),Nn(Er(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Nn(Er(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Nn(Er(r.prototype),"destroy",this).call(this)}}])&&S_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);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 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(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 A_(l,r,n){return r=Dr(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,Gf()?Reflect.construct(r,n||[],Dr(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 di(){return di=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},di.apply(this,arguments)}function Dr(l){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dr(l)}function fc(l,r){return fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},fc(l,r)}var L_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),A_(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){if(e=this.applyConstFilter(e),this.select2_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var a=this.updateValue(e);this.input.value=a,this.select2v4?this.select2_instance.val(a).trigger("change"):this.select2_instance.select2("val",a),this.onChange(!0)}else di(Dr(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=E(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var a=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(a),e.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}di(Dr(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,a=this.typecast(e),u=!1;return this.enum_values.includes(a)||a===""||(this.enum_options.push("".concat(a)),this.enum_display.push("".concat(a)),this.enum_values.push(a),this.schema.enum.push(a),(t=this.input.querySelector('option[value="'.concat(a,'"]')))?t.removeAttribute("data-select2-tag"):this.select2_instance.append(new Option(a,a,!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)),di(Dr(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)),di(Dr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),di(Dr(r.prototype),"destroy",this).call(this)}}])&&T_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Wo);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 $_(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(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 N_(l,r,n){return r=Sr(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,Jf()?Reflect.construct(r,n||[],Sr(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 Dn(){return Dn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Sr(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}},Dn.apply(this,arguments)}function Sr(l){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sr(l)}function pc(l,r){return pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},pc(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),N_(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:"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 a=this.updateValue(e);this.input.value=a,this.selectize_instance.clear(!0),this.selectize_instance.setValue(a),this.onChange(!0)}else Dn(Sr(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(a){e.updateValue(a),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Dn(Sr(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),a=!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),a=!0),a}},{key:"onWatchedFieldChange",value:function(){var e=this;Dn(Sr(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,a){e.selectize_instance.addOption({value:t,text:e.enum_display[a]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Dn(Sr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),Dn(Sr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Dn(Sr(r.prototype),"destroy",this).call(this)}}])&&$_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Wo);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 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(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=La(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,Kf()?Reflect.construct(r,n||[],La(l).constructor):r.apply(l,n))}function Kf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Kf=function(){return!!l})()}function La(l){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},La(l)}function mc(l,r){return mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},mc(l,r)}var q_=(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&&mc(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 a=document.createElement("div");a.classList.add("signature-container");var u=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&u.setAttribute("name",t),u.classList.add("signature"),a.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 w=document.createElement("div"),T=document.createElement("button");T.classList.add("tiny","button"),T.innerHTML="Clear signature",w.appendChild(T),a.appendChild(w),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,a,this.description),this.container.appendChild(this.control),this.refreshValue(),u.width=a.offsetWidth,this.options&&this.options.canvas_height?u.height=this.options.canvas_height:u.height="300"}else{var $=document.createElement("p");$.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild($)}}},{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}}])&&B_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);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 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,z_(c.key),c)}}function z_(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 H_(l,r,n){return r=xr(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||[],xr(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 Bn(){return Bn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Bn.apply(this,arguments)}function xr(l){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xr(l)}function yc(l,r){return yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},yc(l,r)}y(6031);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&&yc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,a){e=this.applyConstFilter(e);var u=Bn(xr(r.prototype),"setValue",this).call(this,e,t,a);u!==void 0&&u.changed&&this.simplemde_instance&&this.simplemde_instance.value(u.value)}},{key:"build",value:function(){this.options.format="textarea",Bn(xr(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)):Bn(xr(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),Bn(xr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Bn(xr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Bn(xr(r.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(e,t){var a=this,u=function w(){e.display.wrapper.offsetHeight?(a.stopListening(e,t),e.display.lastWrapHeight!==e.display.wrapper.clientHeight&&e.refresh()):t.timeout=window.setTimeout(w,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)}}])&&V_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);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 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(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=hi(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||[],hi(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 $a(){return $a=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=hi(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 hi(l){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hi(l)}function vc(l,r){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},vc(l,r)}var Yf=(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&&vc(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 a=0;a<t;a++)this.enum_values.push(a+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var u=function(se){se.preventDefault(),se.stopPropagation(),e.setValue(se.currentTarget.value),e.onChange(!0)},w=this.enum_values.length-1;w>-1;w--){var T=this.formname+(w+1),$=this.theme.getFormInputField("radio");$.name="".concat(this.formname,"[starrating]"),$.value=this.enum_values[w],$.id=T,$.addEventListener("change",u,!1),this.radioGroup.push($);var B=document.createElement("label");B.htmlFor=T,B.title=this.enum_values[w],this.options.displayValue&&B.classList.add("starrating-display-enabled");var z=this.theme.getHiddenText("label");z.textContent=w,B.appendChild(z),this.ratingContainer.appendChild($),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),$a(hi(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}$a(hi(r.prototype),"setValue",this).call(this,this.value)}}])&&G_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue);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 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(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 Y_(l,r,n){return r=Fn(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,Qf()?Reflect.construct(r,n||[],Fn(l).constructor):r.apply(l,n))}function Qf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qf=function(){return!!l})()}function Xo(){return Xo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Fn(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}},Xo.apply(this,arguments)}function Fn(l){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fn(l)}function bc(l,r){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},bc(l,r)}Yf.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 Q_=(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&&bc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){Xo(Fn(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(){Xo(Fn(r.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){Xo(Fn(r.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&W_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Rf);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 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,e0(c.key),c)}}function e0(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 t0(l,r,n){return r=Br(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,Xf()?Reflect.construct(r,n||[],Br(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 fi(){return fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},fi.apply(this,arguments)}function Br(l){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Br(l)}function gc(l,r){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},gc(l,r)}var r0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),t0(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(fi(Br(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(fi(Br(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,fi(Br(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(),a=e.property_order||Object.keys(t),u=0;u<a.length;u++){var w=this.theme.getTableHeaderCell(t[a[u]].getTitle());t[a[u]].options.hidden&&(w.style.display="none"),this.header_row.appendChild(w)}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(),fi(Br(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 a=b({},this.schema.items),u=this.jsoneditor.getEditorClass(a,this.jsoneditor),w=this.row_holder.appendChild(this.theme.getTableRow()),T=w;this.item_has_child_editors||(T=this.theme.getTableCell(),w.appendChild(T));var $=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:a,container:T,path:"".concat(this.path,".").concat(e),parent:this,compact:!0,table_row:!0});return $.preBuild(),t||($.build(),$.postBuild(),$.controls_cell=w.appendChild(this.theme.getTableCell()),$.row=w,$.table_controls=this.theme.getButtonHolder(),$.controls_cell.appendChild($.table_controls),$.table_controls.style.margin=0,$.table_controls.style.padding=0),$}},{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,fi(Br(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]:[],a=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($,B){e.rows[B]?e.rows[B].setValue($):(e.addRow($),u=!0)}));for(var w=t.length;w<this.rows.length;w++){var T=this.rows[w].container;this.item_has_child_editors||this.rows[w].row.parentNode.removeChild(this.rows[w].row),this.rows[w].destroy(),T.parentNode&&T.parentNode.removeChild(T),this.rows[w]=null,u=!0}this.rows=this.rows.slice(0,t.length),this.refreshValue(),(u||a)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var e=this,t=this.schema.minItems&&this.schema.minItems>=this.rows.length,a=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,u=[];this.rows.forEach((function(Q,X){if(Q.delete_button){var se=!t;e.setButtonState(Q.delete_button,se),u.push(se)}if(Q.copy_button){var me=!a;e.setButtonState(Q.copy_button,me),u.push(me)}if(Q.moveup_button){var je=X!==0;e.setButtonState(Q.moveup_button,je),u.push(je)}if(Q.movedown_button){var Se=X!==e.rows.length-1;e.setButtonState(Q.movedown_button,Se),u.push(Se)}}));var w=u.some((function(Q){return Q}));this.rows.forEach((function(Q){return e.setButtonState(Q.controls_cell,w)})),this.setButtonState(this.controls_header_cell,w),this.setButtonState(this.table,this.value.length);var T=!(a||this.hide_add_button);this.setButtonState(this.add_row_button,T);var $=!(!this.value.length||t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,$);var B=!(this.value.length<=1||t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,B);var z=T||$||B;this.setButtonState(this.controls,z)}},{key:"refreshValue",value:function(){var e=this;this.value=[],this.rows.forEach((function(t,a){e.value[a]=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 a=this.rows[t].table_controls;return this.hide_delete_buttons||(this.rows[t].delete_button=this._createDeleteButton(t,a)),this.show_copy_button&&(this.rows[t].copy_button=this._createCopyButton(t,a)),this.hide_move_buttons||(this.rows[t].moveup_button=this._createMoveUpButton(t,a)),this.hide_move_buttons||(this.rows[t].movedown_button=this._createMoveDownButton(t,a)),this._supportDragDrop(this.rows[t].row),e!==void 0&&this.rows[t].setValue(e),this.rows[t]}},{key:"_createDeleteButton",value:function(e,t){var a=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(w){if(w.preventDefault(),w.stopPropagation(),!a.askConfirmation())return!1;var T=1*w.currentTarget.getAttribute("data-i"),$=a.getValue(),B=a.getValue()[T];$.splice(T,1),a.setValue($),a.onChange(!0),a.jsoneditor.trigger("deleteRow",B)})),t.appendChild(u),u}},{key:"_createCopyButton",value:function(e,t){var a=this,u=this.getButton("","copy","button_copy_row_title_short"),w=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 $=1*T.currentTarget.getAttribute("data-i"),B=a.getValue(),z=B[$];w.items.type==="string"&&w.items.format==="uuid"?z=x():w.items.type==="object"&&w.items.properties&&B.forEach((function(Q,X){if($===X)for(var se=0,me=Object.keys(Q);se<me.length;se++){var je=me[se];w.items.properties&&w.items.properties[je]&&w.items.properties[je].format==="uuid"&&((z=Object.assign({},B[$]))[je]=x())}})),B.splice($+1,0,z),a.setValue(B),a.onChange(!0),a.jsoneditor.trigger("copyRow",a.rows[$+1])})),t.appendChild(u),u}},{key:"_createMoveUpButton",value:function(e,t){var a=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(w){w.preventDefault(),w.stopPropagation();var T=1*w.currentTarget.getAttribute("data-i"),$=a.getValue();$.splice(T-1,0,$.splice(T,1)[0]),a.setValue($),a.onChange(!0),a.jsoneditor.trigger("moveRow",a.rows[T-1])})),t.appendChild(u),u}},{key:"_createMoveDownButton",value:function(e,t){var a=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(w){w.preventDefault(),w.stopPropagation();var T=1*w.currentTarget.getAttribute("data-i"),$=a.getValue();$.splice(T+1,0,$.splice(T,1)[0]),a.setValue($),a.onChange(!0),a.jsoneditor.trigger("moveRow",a.rows[T+1])})),t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e){var t=this;He(e,(function(a,u){var w=t.getValue(),T=w[a];w.splice(a,1),w.splice(u,0,T),t.setValue(w),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&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var 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(a){a.preventDefault(),a.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(a){if(a.preventDefault(),a.stopPropagation(),!e.askConfirmation())return!1;var u=e.getValue(),w=u.pop();e.setValue(u),e.onChange(!0),e.jsoneditor.trigger("deleteRow",w)})),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(a){if(a.preventDefault(),a.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&&X_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Pe);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 o0(l,r,n){return r=Mn(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,ep()?Reflect.construct(r,n||[],Mn(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 es(){return es=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},es.apply(this,arguments)}function Mn(l){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mn(l)}function _c(l,r){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},_c(l,r)}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 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,a0(c.key),c)}}function a0(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 l0(l,r,n){return r=qn(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,tp()?Reflect.construct(r,n||[],qn(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 ts(){return ts=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=qn(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}},ts.apply(this,arguments)}function qn(l){return qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qn(l)}function wc(l,r){return wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wc(l,r)}function yo(l){return yo=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},yo(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(yo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(yo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return yo(r)=="symbol"?r:r+""}function d0(l,r,n){return r=Fr(r),(function(c,e){if(e&&(yo(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||[],Fr(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 pi(){return pi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=Fr(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}},pi.apply(this,arguments)}function Fr(l){return Fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fr(l)}function kc(l,r){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},kc(l,r)}y(9868);var Ia={ace:ge,array:Pe,arrayChoices:qt,arraySelect2:Ca,arraySelectize:ag,autocomplete:dg,base64:mg,button:vf,checkbox:kg,choices:wf,datetime:Ag,describedBy:Ng,enum:Mg,hidden:Hg,info:Kg,integer:Rf,ip:i_,jodit:l_,multiple:m_,multiselect:ke,null:g_,number:Pf,object:zf,radio:E_,sceditor:P_,select:Wo,select2:L_,selectize:D_,signature:q_,simplemde:U_,starrating:Yf,stepper:Q_,string:ue,table:r0,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),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&&_c(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,w,T,$){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 w=u.target.files||u.dataTransfer.files;if(w&&w.length)if(e.options.max_upload_size!==0&&w[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(w[0].type,e.options.mime_type)){e.fileDisplay&&(e.fileDisplay.value=w[0].name);var T=new window.FileReader;T.onload=function($){e.preview_value=$.target.result,e.refreshPreview(w),e.onChange(!0),T=null},T.readAsDataURL(w[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 w=u.dataTransfer.items||u.dataTransfer.files,T=w&&w.length&&(e.options.mime_type.length===0||e.isValidMimeType(w[0].type,e.options.mime_type)),$=u.currentTarget.classList&&u.currentTarget.classList.contains("upload-dropzone")&&T;switch((u.currentTarget===window?"w_":"e_")+u.type){case"w_drop":case"w_dragover":$||(u.dataTransfer.dropEffect="none");break;case"e_dragenter":$?(e.dropZone.classList.add("valid-dropzone"),u.dataTransfer.dropEffect="copy"):e.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":$&&(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"),$&&e.uploadHandler(u)}$||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,a=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&a.appendChild(this.dropZone),this.fileUploadGroup&&a.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&a.appendChild(this.dropZone),a.appendChild(this.preview),t.parentNode.insertBefore(a,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(a){e.preview.appendChild(t)},t.onerror=function(a){console.error("upload error",a,a.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 a=e[0],u=this.preview_value.match(/^data:([^;,]+)[;,]/);if(a.mimeType=u?u[1]:"unknown",a.size>0){var w=Math.floor(Math.log(a.size)/Math.log(1024));a.formattedSize="".concat(parseFloat((a.size/Math.pow(1024,w)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][w])}else a.formattedSize="0 Bytes";var T=this.getButton("button_upload","upload","button_upload");T.addEventListener("click",(function($){$.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,a,{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(a,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),es(Mn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),es(Mn(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),es(Mn(r.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(e,t){return t.reduce((function(a,u){return a||new RegExp(u.replace(/\*/g,".*"),"gi").test(e)}),!1)}}])&&n0(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),l0(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:"preBuild",value:function(){ts(qn(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(){ts(qn(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,a){e=this.applyConstFilter(e),this.testUuid(e)||(e=this.uuid),this.uuid=e,ts(qn(r.prototype),"setValue",this).call(this,e,t,a)}},{key:"getUuid",value:function(){return x()}},{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)}}])&&s0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue),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),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&&kc(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,a){e=this.applyConstFilter(e);var u=pi(Fr(r.prototype),"setValue",this).call(this,e,t,a);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(){pi(Fr(r.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(pi(Fr(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(pi(Fr(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),pi(Fr(r.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(e){var t=this;if(e){if(window.Picker&&!this.picker_instance){var a=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(w){var T=t.picker_instance.settings.editorFormat,$=t.picker_instance.settings.alpha;t.setValue(T==="hex"?$?w.hex:w.hex.slice(0,7):w["".concat(T+($?"a":""),"String")])};a.popup||typeof a.onChange=="function"?a.popup&&typeof a.onDone!="function"&&(a.onDone=u):a.onChange=u,this.picker_instance=new window.Picker(a),a.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="")}}])&&c0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ue)};function np(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 ip={},jc="en",h0=jc;ip.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(Ia).forEach((function(l){var r=(function(e,t){return(function(a){if(Array.isArray(a))return a})(e)||(function(a,u){var w=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(w!=null){var T,$,B,z,Q=[],X=!0,se=!1;try{if(B=(w=w.call(a)).next,u!==0)for(;!(X=(T=B.call(w)).done)&&(Q.push(T.value),Q.length!==u);X=!0);}catch(me){se=!0,$=me}finally{try{if(!X&&w.return!=null&&(z=w.return(),Object(z)!==z))return}finally{if(se)throw $}}return Q}})(e,t)||(function(a,u){if(a){if(typeof a=="string")return np(a,u);var w=Object.prototype.toString.call(a).slice(8,-1);return w==="Object"&&a.constructor&&(w=a.constructor.name),w==="Map"||w==="Set"?Array.from(a):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?np(a,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.`)})()})(l,2),n=r[0],c=r[1];
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ap(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 kt(l){return kt=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},kt(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(kt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(kt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return kt(r)=="symbol"?r:r+""}y(1688);var m0=(function(){return l=function e(t){(function(a,u){if(!(a 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(a){kt(a.type)==="object"&&(a.type=this._expandSubSchema(a.type))},disallow:function(a){kt(a.disallow)==="object"&&(a.disallow=this._expandSubSchema(a.disallow))},anyOf:function(a){var u=this;Object.entries(a.anyOf).forEach((function(w){var T=vi(w,2),$=T[0],B=T[1];a.anyOf[$]=u.expandSchema(B)}))},dependencies:function(a){var u=this;Object.entries(a.dependencies).forEach((function(w){var T=vi(w,2),$=T[0],B=T[1];kt(B)!=="object"||Array.isArray(B)||(a.dependencies[$]=u.expandSchema(B))}))},not:function(a){a.not=this.expandSchema(a.not)}},this._subSchema2={allOf:function(a,u){var w=this,T=b({},u);return Object.entries(a.allOf).forEach((function($){var B=vi($,2),z=B[0],Q=B[1];a.allOf[z]=w.expandRefs(Q,!0),T=w.extendSchemas(T,w.expandSchema(Q))})),delete T.allOf,T},extends:function(a,u){var w,T=this;return delete(w=Array.isArray(a.extends)?a.extends.reduce((function($,B,z){return T.extendSchemas($,T.expandSchema(B))}),u):this.extendSchemas(u,this.expandSchema(a.extends))).extends,w},oneOf:function(a,u){var w=this,T=b({},u);return delete T.oneOf,a.oneOf.reduce((function($,B,z){return $.oneOf[z]=w.extendSchemas(w.expandSchema(B),T),$}),u),u}}},r=[{key:"load",value:(c=sp(yi().mark((function e(t,a,u){return yi().wrap((function(w){for(;;)switch(w.prev=w.next){case 0:return this.schema=t,w.next=3,this._asyncloadExternalRefs(t,a,this._getFileBase(u),!0);case 3:return w.abrupt("return",this.expandRefs(t));case 4:case"end":return w.stop()}}),e,this)}))),function(e,t,a){return c.apply(this,arguments)})},{key:"expandRefs",value:function(e,t){var a=this,u=b({},e);if(!u.$ref)return u;var w=u.$ref.split("#");if(w.length===2&&!this.refs_with_info[u.$ref]){var T=this.expandRecursivePointer(this.schema,w[1]),$=this.extendSchemas(u,this.expandSchema(T));return delete $.$ref,$}var B=w.length>2?this.refs_with_info["#"+w[1]]:this.refs_with_info[u.$ref];delete u.$ref;var z=B.$ref.startsWith("#")?B.fetchUrl:"",Q=this._getRef(z,B);if(this.refs[Q]){if(t&&E(this.refs[Q],"allOf")){var X=this.refs[Q].allOf;Object.keys(X).forEach((function(se){X[se]=a.expandRefs(X[se],!0)}))}}else console.warn("reference:'".concat(Q,"' not found!"));return w.length>2?this.extendSchemas(u,this.expandSchema(this.expandRecursivePointer(this.refs[Q],w[2]))):this.extendSchemas(u,this.expandSchema(this.refs[Q]))}},{key:"expandRecursivePointer",value:function(e,t){var a=e;return t.split("/").slice(1).forEach((function(u){a[u]&&(a=a[u])})),a.$refs&&a.$refs.startsWith("#")?this.expandRecursivePointer(e,a.$refs):a}},{key:"expandSchema",value:function(e){var t=this;Object.entries(this._subSchema1).forEach((function(u){var w=vi(u,2),T=w[0],$=w[1];e[T]&&$.call(t,e)}));var a=b({},e);return Object.entries(this._subSchema2).forEach((function(u){var w=vi(u,2),T=w[0],$=w[1];e[T]&&(a=$.call(t,e,a))})),this.expandRefs(a)}},{key:"_getRef",value:function(e,t){var a=e+t;return this.refs[a]?a:e+decodeURIComponent(t.$ref)}},{key:"_expandSubSchema",value:function(e){var t=this;return Array.isArray(e)?e.map((function(a){return kt(a)==="object"?t.expandSchema(a):a})):this.expandSchema(e)}},{key:"_manageRecursivePointer",value:function(e,t){Object.keys(e).forEach((function(a){e[a]!==null&&e[a].$ref&&e[a].$ref.indexOf("#")===0&&(e[a].$ref=t+e[a].$ref)}))}},{key:"_getExternalRefs",value:function(e,t){var a=this,u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u||this._manageRecursivePointer(e,t);var w={},T=function(X){return Object.keys(X).forEach((function(se){w[se]=!0}))};if(e.$ref&&kt(e.$ref)!=="object"&&(e.$ref.indexOf("#")!==0||!u)){var $=e.$ref,B="";$.indexOf("#")>0&&($=$.substr(0,$.indexOf("#"))),$!==e.$ref&&(B=e.$ref.substr(e.$ref.indexOf("#")));var z=this.refs_prefix+this.refs_counter++,Q=z+B;e.$ref.substr(0,1)==="#"||this.refs[e.$ref]||(w[$]=!0),this.refs_with_info[z]={fetchUrl:t,$ref:$},e.$ref=Q}return Object.values(e).forEach((function(X){X&&kt(X)==="object"&&(Array.isArray(X)?Object.values(X).forEach((function(se){se&&kt(se)==="object"&&T(a._getExternalRefs(se,t,u))})):X.$ref&&typeof X.$ref=="string"&&X.$ref.startsWith("#")||T(a._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),w}},{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 a=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)!=="/"&&(a=t+e),a.indexOf("#")>0&&(a=a.substr(0,a.indexOf("#"))),a}},{key:"_isUniformResourceName",value:function(e){return e.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(n=sp(yi().mark((function e(t,a,u){var w,T,$,B,z,Q,X=this,se=arguments;return yi().wrap((function(me){for(;;)switch(me.prev=me.next){case 0:w=se.length>3&&se[3]!==void 0&&se[3],T=this._getExternalRefs(t,a,w),$=0,B=yi().mark((function je(){var Se,Ae,Ne,Ve,_e,Ee,Je,st,Vt,Vn,So;return yi().wrap((function(Re){for(;;)switch(Re.prev=Re.next){case 0:if((Se=Q[z])!==void 0){Re.next=3;break}return Re.abrupt("return",0);case 3:if(!X.refs[Se]){Re.next=5;break}return Re.abrupt("return",0);case 5:if(!X._isUniformResourceName(Se)){Re.next=40;break}if(X.refs[Se]="loading",$++,Ae=X.options.urn_resolver,Ne=Se,typeof Ae=="function"){Re.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Ne,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Ne));case 13:return Ne.indexOf("#")>0&&(Ne=Ne.substr(0,Ne.indexOf("#"))),Re.prev=14,Re.next=17,Ae(Ne);case 17:Ve=Re.sent,Re.prev=18,_e=JSON.parse(Ve),Re.next=26;break;case 22:throw Re.prev=22,Re.t0=Re.catch(18),console.log(Re.t0),new Error("Failed to parse external ref ".concat(Ne));case 26:if(!(typeof _e!="boolean"&&kt(_e)!=="object"||_e===null||Array.isArray(_e))){Re.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Ne));case 28:return X.refs[Se]=_e,Re.next=31,X._asyncloadExternalRefs(_e,Se,u);case 31:Re.next=37;break;case 33:throw Re.prev=33,Re.t1=Re.catch(14),console.log(Re.t1),new Error("Failed to parse external ref ".concat(Ne));case 37:if(typeof Ve!="boolean"){Re.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Ne));case 39:return Re.abrupt("return",0);case 40:if(X.options.ajax){Re.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(Se));case 42:if($++,Ee=X._joinUrl(Se,u),X.options.ajax_cache_responses&&(st=X.cacheGet(Ee))&&(Je=st),Je){Re.next=61;break}return Re.next=48,new Promise((function(Hr){var zt=new XMLHttpRequest;X.options.ajaxCredentials&&(zt.withCredentials=X.options.ajaxCredentials),zt.overrideMimeType("application/json"),zt.open("GET",Ee,!0),zt.onload=function(){Hr(zt)},zt.onerror=function(W){Hr(void 0)},zt.send()}));case 48:if((Vt=Re.sent)!==void 0){Re.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(Se));case 51:Re.prev=51,Je=JSON.parse(Vt.responseText),X.onSchemaLoaded({schema:Je,schemaUrl:Ee}),X.options.ajax_cache_responses&&X.cacheSet(Ee,Je),Re.next=61;break;case 57:throw Re.prev=57,Re.t2=Re.catch(51),console.log(Re.t2),new Error("Failed to parse external ref ".concat(Ee));case 61:if(!(typeof Je!="boolean"&&kt(Je)!=="object"||Je===null||Array.isArray(Je))){Re.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Ee));case 63:return X.refs[Se]=Je,Vn=X._getFileBaseFromFileLocation(Ee),Ee!==Se&&(So=Ee.split("/"),Ee=(Se.substr(0,1)==="/"?"/":"")+So.pop()),Re.next=68,X._asyncloadExternalRefs(Je,Ee,Vn);case 68:case"end":return Re.stop()}}),je,null,[[14,33],[18,22],[51,57]])})),z=0,Q=Object.keys(T);case 5:if(!(z<Q.length)){me.next=13;break}return me.delegateYield(B(),"t0",7);case 7:if(me.t0!==0){me.next=10;break}return me.abrupt("continue",10);case 10:z++,me.next=5;break;case 13:if($){me.next=15;break}return me.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return me.stop()}}),e,this)}))),function(e,t,a){return n.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(e){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(e,t){var a=this;e=b({},e),t=b({},t);var u={},w=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($){return t.type.includes($)})):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 $=vi(T,2),B=$[0],z=$[1];t[B]!==void 0?(function(Q,X){(function(se,me){return(se==="required"||se==="defaultProperties")&&kt(me)==="object"&&Array.isArray(me)})(Q,X)?u[Q]=X.concat(t[Q]).reduce((function(se,me){return se.includes(me)||se.push(me),se}),[]):Q!=="type"||typeof X!="string"&&!Array.isArray(X)?kt(X)!=="object"||Array.isArray(X)||X===null?u[Q]=X:u[Q]=a.extendSchemas(X,t[Q]):w(X)})(B,z):u[B]=z})),Object.entries(t).forEach((function(T){var $=vi(T,2),B=$[0],z=$[1];e[B]===void 0&&(u[B]=z)})),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(a){console.error(a)}}},{key:"cacheGet",value:function(e){try{var t=window.localStorage.getItem(this.getCacheKey(e));if(t){var a=JSON.parse(t);if(a.cacheBuster&&a.schema&&a.cacheBuster===this.getCacheBuster())return a.schema;this.cacheDelete(e)}}catch(u){console.error(u)}}},{key:"cacheDelete",value:function(e){window.localStorage.removeItem(this.getCacheKey(e))}}],r&&f0(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r,n,c})(),y0=(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(a){var u,w,T=r[a].replace(/[{}]+/g,"").trim().split("."),$=T.length;$>1?u=function(B){for(w=B,a=0;a<$&&(w=w[T[a]]);a++);return w}:(T=T[0],u=function(B){return B[T]}),c.push({s:r[a],r:u})},t=0;t<n;t++)e(t);return function(a){for(var u,w="".concat(l),T=0;T<n;T++)u=c[T],w=w.replace(u.s,u.r(a));return w}}}},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 rs(l){return rs=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},rs(l)}function Oc(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 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,b0(c.key),c)}}function b0(l){var r=(function(n,c){if(rs(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(rs(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return rs(r)=="symbol"?r:r+""}var g0={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},ln=(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]:g0;(function(t,a){if(!(t instanceof a))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,a=document.createElement("i");return(c=a.classList).add.apply(c,(function(u){if(Array.isArray(u))return Oc(u)})(t=e.split(" "))||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(t)||(function(u,w){if(u){if(typeof u=="string")return Oc(u,w);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)?Oc(u,w):void 0}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),a}}])&&v0(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Ec(l){return Ec=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},Ec(l)}function _0(l,r,n){return r=Na(r),(function(c,e){if(e&&(Ec(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||[],Na(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 Na(l){return Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Na(l)}function Sc(l,r){return Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Sc(l,r)}var w0={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"},k0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),_0(this,r,["glyphicon glyphicon-",w0])}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&&Sc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function xc(l){return xc=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},xc(l)}function j0(l,r,n){return r=Da(r),(function(c,e){if(e&&(xc(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||[],Da(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 Da(l){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Da(l)}function Cc(l,r){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Cc(l,r)}var O0={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"},E0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),j0(this,r,["icon-",O0])}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&&Cc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function Pc(l){return Pc=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},Pc(l)}function S0(l,r,n){return r=Ba(r),(function(c,e){if(e&&(Pc(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||[],Ba(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 Ba(l){return Ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ba(l)}function Tc(l,r){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Tc(l,r)}var x0={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"},C0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),S0(this,r,["fa fa-",x0])}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&&Tc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function Rc(l){return Rc=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},Rc(l)}function P0(l,r,n){return r=Fa(r),(function(c,e){if(e&&(Rc(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,dp()?Reflect.construct(r,n||[],Fa(l).constructor):r.apply(l,n))}function dp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(dp=function(){return!!l})()}function Fa(l){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fa(l)}function Ac(l,r){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ac(l,r)}var T0={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"},R0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),P0(this,r,["fas fa-",T0])}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&&Ac(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function Lc(l){return Lc=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},Lc(l)}function A0(l,r,n){return r=Ma(r),(function(c,e){if(e&&(Lc(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||[],Ma(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 Ma(l){return Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ma(l)}function $c(l,r){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},$c(l,r)}var L0={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"},$0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),A0(this,r,["ui-icon ui-icon-",L0])}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&&$c(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function Ic(l){return Ic=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},Ic(l)}function I0(l,r,n){return r=qa(r),(function(c,e){if(e&&(Ic(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||[],qa(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 qa(l){return qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qa(l)}function Nc(l,r){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Nc(l,r)}var N0={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"},D0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),I0(this,r,["oi oi-",N0])}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&&Nc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function Dc(l){return Dc=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},Dc(l)}function B0(l,r,n){return r=Va(r),(function(c,e){if(e&&(Dc(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||[],Va(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 Va(l){return Va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Va(l)}function Bc(l,r){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Bc(l,r)}var F0={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"},M0=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),B0(this,r,["icon icon-",F0])}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&&Bc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln);function Fc(l){return Fc=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},Fc(l)}function q0(l,r,n){return r=za(r),(function(c,e){if(e&&(Fc(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||[],za(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 za(l){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},za(l)}function Mc(l,r){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Mc(l,r)}var V0={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"},z0={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),q0(this,r,["bi bi-",V0])}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&&Mc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(ln),bootstrap3:k0,fontawesome3:E0,fontawesome4:C0,fontawesome5:R0,jqueryui:$0,openiconic:D0,spectre:M0};function ns(l){return ns=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},ns(l)}function H0(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(ns(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ns(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ns(r)=="symbol"?r:r+""}var yp=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(l){return l in document.documentElement})),cn=(function(){return l=function n(c){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(t,a){if(!(t instanceof a))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 a=document.createElement("div");return a.classList.add("control-group"),c&&(c.style.display="block",a.appendChild(c),t&&c.appendChild(t)),Object.values(n).forEach((function(u){u.style.display="inline-block",u.style.marginRight="20px",a.appendChild(u)})),e&&a.appendChild(e),a}},{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 a=document.createElement("div");return a.appendChild(n),c.style.width="auto",n.insertBefore(c,n.firstChild),e&&a.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)),a}},{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],a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:" ";if(n.innerHTML="",t){var u=document.createElement("option");u.setAttribute("value","_placeholder_"),u.textContent=a,u.setAttribute("disabled",""),u.setAttribute("hidden",""),n.appendChild(u)}for(var w=0;w<c.length;w++){var T=document.createElement("option");T.setAttribute("value",c[w]),T.textContent=e[w]||c[w],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,a){var u=this.getFormInputField("range");return u.setAttribute("min",n),u.setAttribute("max",c),u.setAttribute("step",e),t&&(t.setAttribute("id",a+"-description"),u.setAttribute("aria-describedby",a+"-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 a=function(T,$){T.value=Number($||T.value),T.setAttribute("initialized","1")},u=n.getAttribute("min"),w=n.getAttribute("max");return e.addEventListener("click",(function(){n.getAttribute("initialized")?u?Number(n.value)>Number(u)&&n.stepDown():n.stepDown():a(n,u),j(n,"change")})),t.addEventListener("click",(function(){n.getAttribute("initialized")?w?Number(n.value)<Number(w)&&n.stepUp():n.stepUp():a(n,u),j(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,a){var u=document.createElement("div");return u.classList.add("form-control"),n&&(u.appendChild(n),a&&n.setAttribute("for",a)),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&&a&&(n.setAttribute("for",a),c.setAttribute("id",a)),c.tagName.toLowerCase()!=="div"&&c&&e&&(e.setAttribute("id",a+"-description"),c.setAttribute("aria-describedby",a+"-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 a=document.createElement("span");a.appendChild(document.createTextNode(c)),n.appendChild(a)}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[yp])return!1;if(n[yp](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 a=document.createElement("img");a.src=e,t.appendChild(a)}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 w=document.createElement("div");return w.style.clear="left",t.appendChild(w),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&&H0(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();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 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(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 K0(l,r,n){return r=Mr(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,vp()?Reflect.construct(r,n||[],Mr(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 bi(){return bi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},bi.apply(this,arguments)}function Mr(l){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mr(l)}function qc(l,r){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},qc(l,r)}var bp=(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&&qc(e,t)})(r,l),n=r,(c=[{key:"getFormInputLabel",value:function(e,t){var a=bi(Mr(r.prototype),"getFormInputLabel",this).call(this,e,t);return a.classList.add("je-form-input-label"),a}},{key:"getFormInputDescription",value:function(e){var t=bi(Mr(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-form-input-label"),t}},{key:"getIndentedPanel",value:function(){var e=bi(Mr(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=bi(Mr(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=bi(Mr(r.prototype),"getTable",this).call(this);return e.classList.add("je-table"),e}},{key:"addInputError",value:function(e,t){var a=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",a.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")}}])&&G0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);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 W0(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,Z0(c.key),c)}}function Z0(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 Y0(l,r,n){return r=qr(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,gp()?Reflect.construct(r,n||[],qr(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 gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},gi.apply(this,arguments)}function qr(l){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qr(l)}function Vc(l,r){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Vc(l,r)}bp.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 _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),Y0(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:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var a=document.createElement("label");a.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 w=document.createElement("span");w.classList.add("switch-slider");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",a.appendChild(T),a.appendChild(u),a.appendChild(w),{label:t,checkbox:u,container:a}}},{key:"getSelectInput",value:function(e,t){var a=gi(qr(r.prototype),"getSelectInput",this).call(this,e);return a.classList.add("form-control"),a}},{key:"setGridColumnSize",value:function(e,t,a){e.classList.add("col-md-".concat(t)),a&&e.classList.add("col-md-offset-".concat(a))}},{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,a,u,w){return gi(qr(r.prototype),"getRangeInput",this).call(this,e,t,a,u,w)}},{key:"getFormInputField",value:function(e){var t=gi(qr(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,a,u,w){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)),a&&T.appendChild(a),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&a&&(a.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-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 a=document.createElement("span");return a.style["font-family"]="sans-serif",a.style.visibility="hidden",a.style["background-color"]="rgba(50, 50, 50, .75)",a.style.margin="0 .25rem",a.style.color="#FAFAFA",a.style.padding=".5rem 1rem",a.style["border-radius"]=".25rem",a.style.width="25rem",a.style.position="absolute",a.innerText=e,t.onmouseover=function(){a.style.visibility="visible"},t.onmouseleave=function(){a.style.visibility="hidden"},t.appendChild(a),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 a=document.createElement("span");return a.classList.add("h3"),typeof e=="string"?a.textContent=e:a.appendChild(e),a}},{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,a){var u=gi(qr(r.prototype),"getButton",this).call(this,e,t,a);return u.classList.add("btn","btn-default"),u}},{key:"getTableContainer",value:function(){var e=gi(qr(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,a=document.createElement("div");return a.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>"),a}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,a=document.createElement("div");return a.innerHTML="<ul class='nav nav-tabs' id='".concat(t,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(t,"'></div>"),a}},{key:"getTab",value:function(e,t){var a=document.createElement("li");a.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"),a.appendChild(u),a}},{key:"getTopTab",value:function(e,t){var a=document.createElement("li");a.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"),a.appendChild(u),a}},{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 a=e.firstChild,u="".concat(t,"%");a.setAttribute("aria-valuenow",t),a.style.width=u,a.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 a=document.createElement("div");a.classList.add("input-group"),a.appendChild(e);var u=document.createElement("div");u.classList.add("input-group-btn"),a.appendChild(u);for(var w=0;w<t.length;w++)u.appendChild(t[w]);return a}}}])&&W0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);function go(l){return go=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},go(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,X0(c.key),c)}}function X0(l){var r=(function(n,c){if(go(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(go(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return go(r)=="symbol"?r:r+""}function ew(l,r,n){return r=Vr(r),(function(c,e){if(e&&(go(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||[],Vr(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 _i(){return _i=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},_i.apply(this,arguments)}function Vr(l){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vr(l)}function zc(l,r){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},zc(l,r)}_p.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 tw={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"},kp=(function(l){function r(e){return(function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")})(this,r),ew(this,r,[e,tw])}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:"getSelectInput",value:function(e,t){var a=_i(Vr(r.prototype),"getSelectInput",this).call(this,e);return a.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&a.classList.add("form-control-sm"),this.options.input_size==="large"&&a.classList.add("form-control-lg")):(a.classList.remove("form-control"),a.classList.add("custom-select"),this.options.input_size==="small"&&a.classList.add("custom-select-sm"),this.options.input_size==="large"&&a.classList.add("custom-select-lg")),a}},{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 a=document.createElement("div");a.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 w=document.createElement("label");w.setAttribute("for",e+"-opt-in"),w.classList.add("custom-control-label");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",w.appendChild(T),a.appendChild(u),a.appendChild(w),{label:t,checkbox:u,container:a}}},{key:"setGridColumnSize",value:function(e,t,a){e.classList.add("col-md-".concat(t)),a&&e.classList.add("offset-md-".concat(a))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var a=e.parentNode.parentNode.getElementsByTagName("label")[0];a&&(a.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,a,u,w){var T=_i(Vr(r.prototype),"getRangeInput",this).call(this,e,t,a,u,w);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"),a=document.createElement("div"),u=document.createElement("div"),w=document.createElement("button");w.setAttribute("type","button");var T=document.createElement("button");T.setAttribute("type","button"),t.appendChild(a),t.appendChild(e),t.appendChild(u),a.appendChild(w),u.appendChild(T),t.classList.add("input-group"),a.classList.add("input-group-prepend"),u.classList.add("input-group-append"),w.classList.add("btn"),w.classList.add("btn-secondary"),w.classList.add("stepper-down"),T.classList.add("btn"),T.classList.add("btn-secondary"),T.classList.add("stepper-up"),e.getAttribute("readonly")&&(w.setAttribute("disabled",!0),T.setAttribute("disabled",!0)),w.textContent="-",T.textContent="+";var $=function(Q,X){Q.value=Number(X||Q.value),Q.setAttribute("initialized","1")},B=e.getAttribute("min"),z=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),w.addEventListener("click",(function(){e.getAttribute("initialized")?B?Number(e.value)>Number(B)&&e.stepDown():e.stepDown():$(e,B),j(e,"change")})),T.addEventListener("click",(function(){e.getAttribute("initialized")?z?Number(e.value)<Number(z)&&e.stepUp():e.stepUp():$(e,B),j(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=_i(Vr(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,a,u,w){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 $=document.createElement("div");this.options.custom_forms===!1?($.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label")):($.classList.add("custom-control"),t.classList.add("custom-control-input"),e.classList.add("custom-control-label"),t.type==="checkbox"?$.classList.add("custom-checkbox"):$.classList.add("custom-radio")),$.appendChild(t),$.appendChild(e),u&&$.appendChild(u),T.appendChild($)}return a&&T.appendChild(a),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&a&&(a.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-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 a=document.createTextNode("ⓘ");return t.appendChild(a),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,a,u){var w=document.createElement("div");w.classList.add("form-group"),t&&(w.appendChild(t),u&&t.appendChild(u));var T=document.createElement("div");return Object.values(e).forEach((function($){var B=$.firstChild;T.appendChild(B)})),w.appendChild(T),a&&w.appendChild(a),w}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var a in e)t.setAttribute(a,e[a]);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 a=document.createElement("label");return this.options.custom_forms===!1?a.classList.add("form-check-label"):a.classList.add("custom-control-label"),a.appendChild(document.createTextNode(e)),a}},{key:"getFormRadioControl",value:function(e,t,a){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),a&&(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 a=document.createElement("span");return a.classList.add("h3"),a.classList.add("card-title"),a.classList.add("level-"+t),typeof e=="string"?a.textContent=e:a.appendChild(e),a.style.display="inline-block",a}},{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,a){var u=_i(Vr(r.prototype),"getButton",this).call(this,e,t,a);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var e=_i(Vr(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"),a=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(a,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(a,"'></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,a=document.createElement("div");return a.classList.add("card"),a.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>"),a}},{key:"getTab",value:function(e,t){var a=document.createElement("li");a.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),a.appendChild(u),a}},{key:"getTopTab",value:function(e,t){var a=document.createElement("li");a.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),a.appendChild(u),a}},{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 a=e.firstChild,u="".concat(t,"%");a.setAttribute("aria-valuenow",t),a.style.width=u,a.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 a=document.createElement("div");a.classList.add("input-group"),a.appendChild(e);var u=document.createElement("div");u.classList.add("input-group-append"),a.appendChild(u);for(var w=0;w<t.length;w++)t[w].classList.remove("mr-2","btn-secondary"),t[w].classList.add("btn-outline-secondary"),u.appendChild(t[w]);return a}}}])&&Q0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);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 rw(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,nw(c.key),c)}}function nw(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 iw(l,r,n){return r=zr(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,jp()?Reflect.construct(r,n||[],zr(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 wi(){return wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},wi.apply(this,arguments)}function zr(l){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zr(l)}function Hc(l,r){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Hc(l,r)}kp.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 ow={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Op=(function(l){function r(e){return(function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")})(this,r),iw(this,r,[e,ow])}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:"getSelectInput",value:function(e,t){var a=wi(zr(r.prototype),"getSelectInput",this).call(this,e);return a.classList.add("form-control"),a.classList.add("form-select"),this.options.input_size==="small"&&a.classList.add("form-control-sm"),this.options.input_size==="large"&&a.classList.add("form-control-lg"),a}},{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 a=document.createElement("div");a.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 w=document.createElement("label");w.setAttribute("for",e+"-opt-in"),w.classList.add("form-check-label");var T=document.createElement("span");return T.classList.add("visually-hidden"),T.textContent=e+"-opt-in",w.appendChild(T),a.appendChild(u),a.appendChild(w),{label:t,checkbox:u,container:a}}},{key:"setGridColumnSize",value:function(e,t,a){e.classList.add("col-md-".concat(t)),a&&e.classList.add("offset-md-".concat(a))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var a=e.parentNode.parentNode.getElementsByTagName("label")[0];a&&(a.classList.add("form-label"),a.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,a,u,w){var T=wi(zr(r.prototype),"getRangeInput",this).call(this,e,t,a,u,w);return T.classList.remove("form-control"),T.classList.add("form-range"),T}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),a=document.createElement("button");a.setAttribute("type","button");var u=document.createElement("button");u.setAttribute("type","button"),t.appendChild(a),t.appendChild(e),t.appendChild(u),t.classList.add("input-group"),a.classList.add("btn"),a.classList.add("btn-secondary"),a.classList.add("stepper-down"),u.classList.add("btn"),u.classList.add("btn-secondary"),u.classList.add("stepper-up"),e.getAttribute("readonly")&&(a.setAttribute("disabled",!0),u.setAttribute("disabled",!0)),a.textContent="-",u.textContent="+";var w=function(B,z){B.value=Number(z||B.value),B.setAttribute("initialized","1")},T=e.getAttribute("min"),$=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),a.addEventListener("click",(function(){e.getAttribute("initialized")?T?Number(e.value)>Number(T)&&e.stepDown():e.stepDown():w(e,T),j(e,"change")})),u.addEventListener("click",(function(){e.getAttribute("initialized")?$?Number(e.value)<Number($)&&e.stepUp():e.stepUp():w(e,T),j(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=wi(zr(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,a,u,w){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 $=document.createElement("div");$.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label"),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&a&&(a.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-description")),$.appendChild(t),$.appendChild(e),u&&$.appendChild(u),T.appendChild($)}return a&&T.appendChild(a),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 a=document.createTextNode("ⓘ");return t.appendChild(a),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,a,u){var w=document.createElement("div");w.classList.add("form-group"),t&&(w.appendChild(t),u&&t.appendChild(u));var T=document.createElement("div");return Object.values(e).forEach((function($){var B=$.firstChild;T.appendChild(B)})),w.appendChild(T),a&&w.appendChild(a),w}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var a in e)t.setAttribute(a,e[a]);return t.classList.add("form-check-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var a=document.createElement("label");return a.classList.add("form-check-label"),a.appendChild(document.createTextNode(e)),a}},{key:"getFormRadioControl",value:function(e,t,a){var u=document.createElement("div");return u.classList.add("form-check"),u.appendChild(t),u.appendChild(e),a&&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 a=document.createElement("span");return a.classList.add("h3"),a.classList.add("card-title"),a.classList.add("level-"+t),typeof e=="string"?a.textContent=e:a.appendChild(e),a.style.display="inline-block",a}},{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,a){var u=wi(zr(r.prototype),"getButton",this).call(this,e,t,a);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var e=wi(zr(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"),a=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(a,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(a,"'></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,a=document.createElement("div");return a.classList.add("card"),a.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>"),a}},{key:"getTab",value:function(e,t){var a=document.createElement("li");a.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),a.appendChild(u),a}},{key:"getTopTab",value:function(e,t){var a=document.createElement("li");a.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),a.appendChild(u),a}},{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 a=e.firstChild,u="".concat(t,"%");a.setAttribute("aria-valuenow",t),a.style.width=u,a.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 a=document.createElement("div");a.classList.add("input-group"),a.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"),a.appendChild(t[u]);return a}}}])&&rw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);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 sw(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,aw(c.key),c)}}function aw(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 lw(l,r,n){return r=un(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,Ep()?Reflect.construct(r,n||[],un(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 ko(){return ko=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},ko.apply(this,arguments)}function un(l){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},un(l)}function Uc(l,r){return Uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Uc(l,r)}Op.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 Sp=(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&&Uc(e,t)})(r,l),n=r,(c=[{key:"getTable",value:function(){var e=ko(un(r.prototype),"getTable",this).call(this);return e.setAttribute("cellpadding",5),e.setAttribute("cellspacing",0),e}},{key:"getTableHeaderCell",value:function(e){var t=ko(un(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=ko(un(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,a,u){var w=ko(un(r.prototype),"getFormControl",this).call(this,e,t,a,u);return t.type==="checkbox"?(w.style.lineHeight="25px",w.style.padding="3px 0"):w.style.padding="4px 0 8px 0",w}},{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 a=document.createElement("label");return a.style.fontWeight="bold",a.style.display="block",a.textContent=e,t&&a.classList.add("required"),a}},{key:"getButton",value:function(e,t,a){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 w=document.createElement("span");return w.classList.add("ui-button-text"),w.textContent=e||a||".",u.appendChild(w),u.setAttribute("title",a),u}},{key:"setButtonText",value:function(e,t,a,u){e.innerHTML="",e.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),a&&!t?(e.classList.add("ui-button-icon-only"),a.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(a)):a?(e.classList.add("ui-button-text-icon-primary"),a.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(a)):e.classList.add("ui-button-text-only");var w=document.createElement("span");w.classList.add("ui-button-text"),w.textContent=t||u||".",e.appendChild(w),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"}}])&&sw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);function jo(l){return jo=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},jo(l)}function cw(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,uw(c.key),c)}}function uw(l){var r=(function(n,c){if(jo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(jo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return jo(r)=="symbol"?r:r+""}function dw(l,r,n){return r=Ha(r),(function(c,e){if(e&&(jo(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||[],Ha(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 Ha(l){return Ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ha(l)}function Gc(l,r){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Gc(l,r)}Sp.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 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),dw(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:"addInputError",value:function(e,t){if(e.errmsg)e.errmsg.style.display="block";else{var a=this.closest(e,".form-control");e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),a.nodeName&&a.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")}}])&&cw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);function Oo(l){return Oo=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},Oo(l)}function hw(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,fw(c.key),c)}}function fw(l){var r=(function(n,c){if(Oo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Oo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Oo(r)=="symbol"?r:r+""}function pw(l,r,n){return r=yt(r),(function(c,e){if(e&&(Oo(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||[],yt(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 Ct(){return Ct=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(t=yt(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}},Ct.apply(this,arguments)}function yt(l){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yt(l)}function Jc(l,r){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Jc(l,r)}Cp.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 mw={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"},Tp=(function(l){function r(e){return(function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")})(this,r),pw(this,r,[e,mw])}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:"getOptInSwitch",value:function(e){var t=document.createElement("span");t.classList.add("form-group");var a=document.createElement("label");a.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 w=document.createElement("i");w.classList.add("form-icon");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",a.appendChild(T),a.appendChild(u),a.appendChild(w),t.appendChild(a),{label:a,checkbox:u,container:t}}},{key:"setGridColumnSize",value:function(e,t,a){e.classList.add("col-".concat(t)),a&&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=Ct(yt(r.prototype),"getButtonHolder",this).call(this);return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=Ct(yt(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,a){var u=Ct(yt(r.prototype),"getFormButton",this).call(this,e,t,a);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,a){var u=Ct(yt(r.prototype),"getButton",this).call(this,e,t,a);return u.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),u}},{key:"getHeader",value:function(e,t){var a=document.createElement("span");return typeof e=="string"?a.textContent=e:a.appendChild(e),a.style.display="inline-block",a}},{key:"getFormInputDescription",value:function(e){var t=Ct(yt(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-desc","hide-sm"),t}},{key:"getFormInputLabel",value:function(e,t){var a=Ct(yt(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold&&a.classList.add("je-label"),a}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(e,t){var a=Ct(yt(r.prototype),"getCheckboxLabel",this).call(this,e,t),u=document.createElement("i");return u.classList.add("form-icon"),a.classList.add("form-checkbox","pr-0"),a.insertBefore(u,a.firstChild),a}},{key:"getFormCheckboxControl",value:function(e,t,a){return e.insertBefore(t,e.firstChild),a&&e.classList.add("form-inline"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,a,u){return Ct(yt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,a,u)}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var a in e)t.setAttribute(a,e[a]);return t}},{key:"getFormRadioLabel",value:function(e,t){var a=Ct(yt(r.prototype),"getFormRadioLabel",this).call(this,e,t),u=document.createElement("i");return u.classList.add("form-icon"),a.classList.add("form-radio"),a.insertBefore(u,a.firstChild),a}},{key:"getFormRadioControl",value:function(e,t,a){return e.insertBefore(t,e.firstChild),a&&e.classList.add("form-inline"),e}},{key:"getFormInputField",value:function(e){var t=Ct(yt(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("form-input"),t}},{key:"getRangeInput",value:function(e,t,a,u,w){var T=Ct(yt(r.prototype),"getRangeInput",this).call(this,e,t,a,u,w);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 a=Ct(yt(r.prototype),"getRangeControl",this).call(this,e,t);return a.classList.add("text-center"),a}},{key:"getSelectInput",value:function(e,t){var a=Ct(yt(r.prototype),"getSelectInput",this).call(this,e);return a.classList.add("form-select"),a}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-input"),e}},{key:"getFormControl",value:function(e,t,a,u,w){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),a&&T.appendChild(a),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&a&&(a.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-description")),T}},{key:"getInputGroup",value:function(e,t){if(e){var a=document.createElement("div");a.classList.add("input-group"),a.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"),a.appendChild(t[u]);return a}}},{key:"getInfoButton",value:function(e){var t=document.createElement("div");t.classList.add("popover","popover-left","float-right");var a=document.createElement("button");a.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),a.setAttribute("tabindex","-1"),t.appendChild(a);var u=document.createTextNode("I");a.appendChild(u);var w=document.createElement("div");w.classList.add("popover-container"),t.appendChild(w);var T=document.createElement("div");T.classList.add("card"),w.appendChild(T);var $=document.createElement("div");return $.classList.add("card-body"),$.innerHTML=e,T.appendChild($),t}},{key:"getTable",value:function(){var e=Ct(yt(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=Ct(yt(r.prototype),"getProgressBar",this).call(this);return e.classList.add("progress"),e}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,a=document.createElement("div");return a.classList.add("columns"),a.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(t,'"></div>'),a}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,a=document.createElement("div");return a.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(t,'"></div>'),a}},{key:"getTab",value:function(e,t){var a=document.createElement("a");return a.classList.add("btn","btn-secondary","btn-block"),a.setAttribute("href","#".concat(t)),a.appendChild(e),a}},{key:"getTopTab",value:function(e,t){var a=document.createElement("li");a.id=t,a.classList.add("tab-item");var u=document.createElement("a");return u.setAttribute("href","#".concat(t)),u.appendChild(e),a.appendChild(u),a}},{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 a=e.nextSibling;a&&a.querySelector(".select2-selection--single")&&a.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"))}}])&&hw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);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 yw(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,vw(c.key),c)}}function vw(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 bw(l,r,n){return r=bt(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,Rp()?Reflect.construct(r,n||[],bt(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 Lt(){return Lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,r,n){var c=(function(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&(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}},Lt.apply(this,arguments)}function bt(l){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bt(l)}function Kc(l,r){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Kc(l,r)}Tp.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 gw={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},Ap=(function(l){function r(e){return(function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")})(this,r),bw(this,r,[e,gw])}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:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var a=document.createElement("label");a.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 w=document.createElement("span");w.classList.add("switch-slider","round");var T=document.createElement("span");return T.classList.add("sr-only"),T.textContent=e+"-opt-in",a.appendChild(T),a.appendChild(u),a.appendChild(w),{label:t,checkbox:u,container:a}}},{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,a){t>0&&t<12?e.classList.add("w-".concat(t,"/12"),"px-1"):e.classList.add("w-full","px-1"),a&&(e.style.marginLeft="".concat(100/12*a,"%"))}},{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 a=Lt(bt(r.prototype),"getSelectInput",this).call(this,e);return t?a.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"):a.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&&a.classList.add("compact"),a}},{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=Lt(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,a){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",a),u}},{key:"getRangeControl",value:function(e,t){var a=Lt(bt(r.prototype),"getRangeControl",this).call(this,e,t);return a.classList.add("text-center","text-black"),a}},{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 a=Lt(bt(r.prototype),"getCheckboxLabel",this).call(this,e,t);return a.classList.add("inline-flex","items-center"),a}},{key:"getFormCheckboxControl",value:function(e,t,a){return e.insertBefore(t,e.firstChild),a&&e.classList.add("inline-flex flex-row"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,a,u){var w=Lt(bt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,a,u);return w.classList.add("inline-flex","flex-col"),w}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var a in t.classList.add("form-radio","text-red-600"),e)t.setAttribute(a,e[a]);return t}},{key:"getFormRadioLabel",value:function(e,t){var a=Lt(bt(r.prototype),"getFormRadioLabel",this).call(this,e,t);return a.classList.add("inline-flex","items-center","mr-2"),a}},{key:"getFormRadioControl",value:function(e,t,a){return e.insertBefore(t,e.firstChild),a&&e.classList.add("form-radio"),e}},{key:"getRadioHolder",value:function(e,t,a,u,w){var T=Lt(bt(r.prototype),"getRadioHolder",this).call(this,t,a,u,w);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 a=Lt(bt(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold?a.classList.add("font-bold"):a.classList.add("required"),a}},{key:"getFormInputField",value:function(e){var t=Lt(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,a,u){var w=document.createElement("div");return w.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)),w.appendChild(e),!["checkbox","radio"].includes(t.type)&&u&&w.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"),w.appendChild(t)),a&&w.appendChild(a),w}},{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,a){var u=Lt(bt(r.prototype),"getButton",this).call(this,e,t,a);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 a=document.createElement("span");return a.innerHTML=e,t.appendChild(a),t}},{key:"getTable",value:function(){var e=Lt(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=Lt(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=Lt(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=Lt(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"),a=e===void 0?"":e;return t.innerHTML="<div class='w-2/12' id='".concat(a,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(a,"'></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,a=document.createElement("div");return a.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>"),a}},{key:"getTab",value:function(e,t){var a=document.createElement("li");a.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),a.appendChild(u),a}},{key:"getTopTab",value:function(e,t){var a=document.createElement("li");a.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),a.appendChild(u),a}},{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 a=e.firstChild,u="".concat(t,"%");a.setAttribute("aria-valuenow",t),a.style.width=u,a.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 a=document.createElement("div");a.classList.add("relative","items-stretch","w-full"),a.appendChild(e);var u=document.createElement("div");u.classList.add("-mr-1"),a.appendChild(u);for(var w=0;w<t.length;w++)u.appendChild(t[w]);return a}}}])&&yw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(cn);Ap.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 _w={html:bp,bootstrap3:_p,bootstrap4:kp,bootstrap5:Op,jqueryui:Sp,barebones:Cp,spectre:Tp,tailwind:Ap};const ww={".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 ki(l){return ki=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},ki(l)}function Wc(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 Zc(){Zc=function(){return r};var l,r={},n=Object.prototype,c=n.hasOwnProperty,e=Object.defineProperty||function(W,K,ne){W[K]=ne.value},t=typeof Symbol=="function"?Symbol:{},a=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",w=t.toStringTag||"@@toStringTag";function T(W,K,ne){return Object.defineProperty(W,K,{value:ne,enumerable:!0,configurable:!0,writable:!0}),W[K]}try{T({},"")}catch{T=function(K,ne,we){return K[ne]=we}}function $(W,K,ne,we){var he=K&&K.prototype instanceof je?K:je,Te=Object.create(he.prototype),qe=new Hr(we||[]);return e(Te,"_invoke",{value:Vt(W,ne,qe)}),Te}function B(W,K,ne){try{return{type:"normal",arg:W.call(K,ne)}}catch(we){return{type:"throw",arg:we}}}r.wrap=$;var z="suspendedStart",Q="suspendedYield",X="executing",se="completed",me={};function je(){}function Se(){}function Ae(){}var Ne={};T(Ne,a,(function(){return this}));var Ve=Object.getPrototypeOf,_e=Ve&&Ve(Ve(zt([])));_e&&_e!==n&&c.call(_e,a)&&(Ne=_e);var Ee=Ae.prototype=je.prototype=Object.create(Ne);function Je(W){["next","throw","return"].forEach((function(K){T(W,K,(function(ne){return this._invoke(K,ne)}))}))}function st(W,K){function ne(he,Te,qe,at){var lt=B(W[he],W,Te);if(lt.type!=="throw"){var rr=lt.arg,Cr=rr.value;return Cr&&ki(Cr)=="object"&&c.call(Cr,"__await")?K.resolve(Cr.__await).then((function(Ht){ne("next",Ht,qe,at)}),(function(Ht){ne("throw",Ht,qe,at)})):K.resolve(Cr).then((function(Ht){rr.value=Ht,qe(rr)}),(function(Ht){return ne("throw",Ht,qe,at)}))}at(lt.arg)}var we;e(this,"_invoke",{value:function(he,Te){function qe(){return new K((function(at,lt){ne(he,Te,at,lt)}))}return we=we?we.then(qe,qe):qe()}})}function Vt(W,K,ne){var we=z;return function(he,Te){if(we===X)throw Error("Generator is already running");if(we===se){if(he==="throw")throw Te;return{value:l,done:!0}}for(ne.method=he,ne.arg=Te;;){var qe=ne.delegate;if(qe){var at=Vn(qe,ne);if(at){if(at===me)continue;return at}}if(ne.method==="next")ne.sent=ne._sent=ne.arg;else if(ne.method==="throw"){if(we===z)throw we=se,ne.arg;ne.dispatchException(ne.arg)}else ne.method==="return"&&ne.abrupt("return",ne.arg);we=X;var lt=B(W,K,ne);if(lt.type==="normal"){if(we=ne.done?se:Q,lt.arg===me)continue;return{value:lt.arg,done:ne.done}}lt.type==="throw"&&(we=se,ne.method="throw",ne.arg=lt.arg)}}}function Vn(W,K){var ne=K.method,we=W.iterator[ne];if(we===l)return K.delegate=null,ne==="throw"&&W.iterator.return&&(K.method="return",K.arg=l,Vn(W,K),K.method==="throw")||ne!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+ne+"' method")),me;var he=B(we,W.iterator,K.arg);if(he.type==="throw")return K.method="throw",K.arg=he.arg,K.delegate=null,me;var Te=he.arg;return Te?Te.done?(K[W.resultName]=Te.value,K.next=W.nextLoc,K.method!=="return"&&(K.method="next",K.arg=l),K.delegate=null,me):Te:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,me)}function So(W){var K={tryLoc:W[0]};1 in W&&(K.catchLoc=W[1]),2 in W&&(K.finallyLoc=W[2],K.afterLoc=W[3]),this.tryEntries.push(K)}function Re(W){var K=W.completion||{};K.type="normal",delete K.arg,W.completion=K}function Hr(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(So,this),this.reset(!0)}function zt(W){if(W||W===""){var K=W[a];if(K)return K.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var ne=-1,we=function he(){for(;++ne<W.length;)if(c.call(W,ne))return he.value=W[ne],he.done=!1,he;return he.value=l,he.done=!0,he};return we.next=we}}throw new TypeError(ki(W)+" is not iterable")}return Se.prototype=Ae,e(Ee,"constructor",{value:Ae,configurable:!0}),e(Ae,"constructor",{value:Se,configurable:!0}),Se.displayName=T(Ae,w,"GeneratorFunction"),r.isGeneratorFunction=function(W){var K=typeof W=="function"&&W.constructor;return!!K&&(K===Se||(K.displayName||K.name)==="GeneratorFunction")},r.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,Ae):(W.__proto__=Ae,T(W,w,"GeneratorFunction")),W.prototype=Object.create(Ee),W},r.awrap=function(W){return{__await:W}},Je(st.prototype),T(st.prototype,u,(function(){return this})),r.AsyncIterator=st,r.async=function(W,K,ne,we,he){he===void 0&&(he=Promise);var Te=new st($(W,K,ne,we),he);return r.isGeneratorFunction(K)?Te:Te.next().then((function(qe){return qe.done?qe.value:Te.next()}))},Je(Ee),T(Ee,w,"Generator"),T(Ee,a,(function(){return this})),T(Ee,"toString",(function(){return"[object Generator]"})),r.keys=function(W){var K=Object(W),ne=[];for(var we in K)ne.push(we);return ne.reverse(),function he(){for(;ne.length;){var Te=ne.pop();if(Te in K)return he.value=Te,he.done=!1,he}return he.done=!0,he}},r.values=zt,Hr.prototype={constructor:Hr,reset:function(W){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(Re),!W)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 W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var K=this;function ne(lt,rr){return Te.type="throw",Te.arg=W,K.next=lt,rr&&(K.method="next",K.arg=l),!!rr}for(var we=this.tryEntries.length-1;we>=0;--we){var he=this.tryEntries[we],Te=he.completion;if(he.tryLoc==="root")return ne("end");if(he.tryLoc<=this.prev){var qe=c.call(he,"catchLoc"),at=c.call(he,"finallyLoc");if(qe&&at){if(this.prev<he.catchLoc)return ne(he.catchLoc,!0);if(this.prev<he.finallyLoc)return ne(he.finallyLoc)}else if(qe){if(this.prev<he.catchLoc)return ne(he.catchLoc,!0)}else{if(!at)throw Error("try statement without catch or finally");if(this.prev<he.finallyLoc)return ne(he.finallyLoc)}}}},abrupt:function(W,K){for(var ne=this.tryEntries.length-1;ne>=0;--ne){var we=this.tryEntries[ne];if(we.tryLoc<=this.prev&&c.call(we,"finallyLoc")&&this.prev<we.finallyLoc){var he=we;break}}he&&(W==="break"||W==="continue")&&he.tryLoc<=K&&K<=he.finallyLoc&&(he=null);var Te=he?he.completion:{};return Te.type=W,Te.arg=K,he?(this.method="next",this.next=he.finallyLoc,me):this.complete(Te)},complete:function(W,K){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&K&&(this.next=K),me},finish:function(W){for(var K=this.tryEntries.length-1;K>=0;--K){var ne=this.tryEntries[K];if(ne.finallyLoc===W)return this.complete(ne.completion,ne.afterLoc),Re(ne),me}},catch:function(W){for(var K=this.tryEntries.length-1;K>=0;--K){var ne=this.tryEntries[K];if(ne.tryLoc===W){var we=ne.completion;if(we.type==="throw"){var he=we.arg;Re(ne)}return he}}throw Error("illegal catch attempt")},delegateYield:function(W,K,ne){return this.delegate={iterator:zt(W),resultName:K,nextLoc:ne},this.method==="next"&&(this.arg=l),me}},r}function Lp(l,r,n,c,e,t,a){try{var u=l[t](a),w=u.value}catch(T){return void n(T)}u.done?r(w):Promise.resolve(w).then(c,e)}function kw(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(ki(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ki(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ki(r)=="symbol"?r:r+""}var dn=(function(){function l(t){var a=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((function(X,se){if(!(X instanceof se))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 w=this.options.theme||l.defaults.theme,T=l.defaults.themes[w];if(!T)throw new Error("Unknown theme ".concat(w));this.element.setAttribute("data-theme",w),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new T(this);var $=b(ww,this.getEditorsRules()),B=function(X,se,me){return me?a.addNewStyleRulesToShadowRoot(X,se,me):a.addNewStyleRules(X,se)};if(!this.theme.options.disable_theme_rules){var z=O(this.element);B("default",$,z),T.rules!==void 0&&B(w,T.rules,z)}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=Zc().mark((function t(){var a,u,w,T,$,B,z=this;return Zc().wrap((function(Q){for(;;)switch(Q.prev=Q.next){case 0:return a=document.location.origin+document.location.pathname.toString(),(u=new m0(this.options)).onSchemaLoaded=function(X){z.trigger("schemaLoaded",X)},u.onAllSchemasLoaded=function(){z.trigger("allSchemasLoaded")},this.expandSchema=function(X){return u.expandSchema(X)},this.expandRefs=function(X,se){return u.expandRefs(X,se)},w=document.location.toString(),Q.next=9,u.load(this.schema,a,w);case 9:T=Q.sent,$=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Nf(this,null,$,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(),E(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame((function(){z.ready&&(z.validation_results=z.validator.validate(z.root.getValue()),z.root.showValidationErrors(z.validation_results),z.trigger("ready"),z.trigger("change"))}));case 24:case"end":return Q.stop()}}),t,this)})),e=function(){var t=this,a=arguments;return new Promise((function(u,w){var T=c.apply(t,a);function $(z){Lp(T,u,w,$,B,"next",z)}function B(z){Lp(T,u,w,$,B,"throw",z)}$(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,a){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(a),this}},{key:"off",value:function(t,a){if(t&&a){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var u=[],w=0;w<this.callbacks[t].length;w++)this.callbacks[t][w]!==a&&u.push(this.callbacks[t][w]);this.callbacks[t]=u}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,a){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,[a]);return this}},{key:"setOption",value:function(t,a){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=a,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(l.defaults.editors).reduce((function(t,a){return a.rules?b(t,a.rules):t}),{})}},{key:"getEditorClass",value:function(t){var a,u=this;if(t=this.expandSchema(t),l.defaults.resolvers.find((function(w){return(a=w(t,u))&&l.defaults.editors[a]})),!a)throw new Error("Unknown editor for schema ".concat(JSON.stringify(t)));if(!l.defaults.editors[a])throw new Error("Unknown editor ".concat(a));return l.defaults.editors[a]}},{key:"createEditor",value:function(t,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new t(a=b({},t.options||{},a),l.defaults,u)}},{key:"onChange",value:function(t){var a=this;if(this.ready&&(t&&this.trigger(t.event,t.data),!this.firing_change))return this.firing_change=!0,window.requestAnimationFrame((function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.options.show_errors!=="never"?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))})),this}},{key:"compileTemplate",value:function(t){var a,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(!(a=l.defaults.templates[u]()))throw new Error("Template engine ".concat(u," missing required library."))}else a=u;if(!a)throw new Error("No template engine set");if(!a.compile)throw new Error("Invalid template engine set");return a.compile(t)}},{key:"_data",value:function(t,a,u){if(arguments.length!==3)return t.hasAttribute("data-jsoneditor-".concat(a))?this.__data[t.getAttribute("data-jsoneditor-".concat(a))]:null;var w;t.hasAttribute("data-jsoneditor-".concat(a))?w=t.getAttribute("data-jsoneditor-".concat(a)):(w=this.uuid++,t.setAttribute("data-jsoneditor-".concat(a),w)),this.__data[w]=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,a){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(a),this}},{key:"unwatch",value:function(t,a){if(!this.watchlist||!this.watchlist[t])return this;if(!a)return this.watchlist[t]=null,this;for(var u=[],w=0;w<this.watchlist[t].length;w++)this.watchlist[t][w]!==a&&u.push(this.watchlist[t][w]);return this.watchlist[t]=u.length?u:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var a=0;a<this.watchlist[t].length;a++)this.watchlist[t][a]()}},{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,a){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 w=u.sheet?u.sheet:u.styleSheet,T=this.element.nodeName.toLowerCase();w.cssRules.length>0;)w.deleteRule(0);Object.keys(a).forEach((function($){var B=t==="default"?$:"".concat(T,'[data-theme="').concat(t,'"] ').concat($);w.insertRule?w.insertRule(B+" {"+decodeURIComponent(a[$])+"}",0):w.addRule&&w.addRule(B,decodeURIComponent(a[$]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,a,u){var w=this.element.nodeName.toLowerCase(),T="";Object.keys(a).forEach((function(z){var Q=t==="default"?z:"".concat(w,'[data-theme="').concat(t,'"] ').concat(z);T+=Q+" {"+decodeURIComponent(a[z])+`}
|
|
38
|
-
`}));var $,B=new CSSStyleSheet;B.replaceSync(
|
|
39
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(),[B])}},{key:"showValidationErrors",value:function(t){var
|
|
24
|
+
`)},Ht.prototype.renderPartial=function(a,h,m,y){if(m){var _=this.getConfigTags(y),d=Ol(m)?m(a[1]):m[a[1]];if(d!=null){var v=a[6],i=a[5],f=a[4],p=d;i==0&&f&&(p=this.indentPartial(d,f,v));var g=this.parse(p,_);return this.renderTokens(g,h,m,p,y)}}},Ht.prototype.unescapedValue=function(a,h){var m=h.lookup(a[1]);if(m!=null)return m},Ht.prototype.escapedValue=function(a,h,m){var y=this.getConfigEscape(m)||ir.escape,_=h.lookup(a[1]);if(_!=null)return typeof _=="number"&&y===ir.escape?String(_):y(_)},Ht.prototype.rawValue=function(a){return a[1]},Ht.prototype.getConfigTags=function(a){return Li(a)?a:a&&typeof a=="object"?a.tags:void 0},Ht.prototype.getConfigEscape=function(a){if(a&&typeof a=="object"&&!Li(a))return a.escape};var ir={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){qo.templateCache=o},get templateCache(){return qo.templateCache}},qo=new Ht;ir.clearCache=function(){return qo.clearCache()},ir.parse=function(a,h){return qo.parse(a,h)},ir.render=function(a,h,m,y){if(typeof a!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+pv(a)+'" was given as the first argument for mustache#render(template, view, partials)');return qo.render(a,h,m,y)},ir.escape=wv,ir.Scanner=Vo,ir.Context=Ai,ir.Writer=Ht;function Pv(o){try{const a=new URL(o),h=a.username,m=a.password;if(!h||!m)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:m,baseUrl:y}}catch(a){throw new Error(`Invalid CouchDB URL format: ${a.message}. Use: http://user:pass@host:port`)}}const Tv=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:m}=Pv(o.url);let y=o.name;console.log(m);const _=o.url.match(/^(https?:\/\/[^\/]+(?:\/[^\/]+)*)\/([^\/]+)$/);_&&(_[1],y=o.name||_[2]);const d=kt.create({baseURL:`${m}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:a,password:h}}),v=kt.create({baseURL:`${m}/${y}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:a,password:h}});try{await v.get("/")}catch(p){if(p.response?.status===404)await d.put(`/${y}`),console.log(`Created database: ${y}`);else throw p}const i={db_name:"couchdb-rest",name:y,encryption_key:o.encryption_key,api:{insert:async p=>(await v.post("/",p)).data,update:async p=>{if(!p._id||!p._rev)throw new Error("Document must have _id and _rev for update");return(await v.put(`/${p._id}`,p)).data},search:async p=>(await v.post("_find",p)).data,get:async p=>(await v.get(`/${p}`)).data,createIndex:async p=>(await v.post("_index",p)).data,delete:async p=>{const g=await v.get(`/${p}`);return(await v.delete(`/${g._id}?rev=${g._rev}`)).data}},utils:{encrypt:async(p,g)=>{const b=new TextEncoder,k=b.encode(p),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,k),S=new Uint8Array(x),C=btoa(String.fromCharCode(...S));return`${btoa(String.fromCharCode(...j))}:${C}`},decrypt:async(p,g)=>{const[b,k]=p.split(":"),E=Uint8Array.from(atob(b),L=>L.charCodeAt(0)),O=Uint8Array.from(atob(k),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:(p,g)=>{const b=new uv({code:{esm:!0},strict:!1,useDefaults:!0}),k={...g},E=b.compile(p);return{valid:E(k),validate:E,data:k}},compile_template:{mustache:(p,g)=>ir.render(p,g)}}};return new Dr(i)},Rv="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Rv);const Lv=1,Av=2,ph=4,$v=8,Iv=16,Nv=1,Dv=2,Bv=4,Fv=8,Mv=16,Vv=1,qv=2,mh="[",fs="[!",Sl="]",Xn={},Lt=Symbol(),zv="http://www.w3.org/1999/xhtml",Cl=!1;var yh=Array.isArray,Hv=Array.prototype.indexOf,ps=Array.from,ms=Object.keys,ys=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,Uv=Object.prototype,Gv=Array.prototype,Jv=Object.getPrototypeOf,vh=Object.isExtensible;function Kv(o){for(var a=0;a<o.length;a++)o[a]()}function bh(){var o,a,h=new Promise((m,y)=>{o=m,a=y});return{promise:h,resolve:o,reject:a}}const At=2,vs=4,bs=8,gh=1<<24,rn=16,nn=32,kn=64,Pl=128,ur=512,Bt=1024,Ut=2048,on=4096,or=8192,an=16384,gs=32768,$i=65536,_h=1<<17,wh=1<<18,ti=1<<19,Wv=1<<20,sn=1<<25,ri=32768,Tl=1<<21,Rl=1<<22,jn=1<<23,zo=Symbol("$state"),kh=Symbol("legacy props"),Zv=Symbol(""),Ii=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},_s=3,ni=8;function Yv(o){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qv(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xv(o){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eb(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function tb(o){throw new Error("https://svelte.dev/e/effect_orphan")}function rb(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function nb(){throw new Error("https://svelte.dev/e/hydration_failed")}function ib(o){throw new Error("https://svelte.dev/e/props_invalid_value")}function ob(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ab(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function sb(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function lb(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Ho(o){console.warn("https://svelte.dev/e/hydration_mismatch")}function cb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let rt=!1;function ln(o){rt=o}let Qe;function Ft(o){if(o===null)throw Ho(),Xn;return Qe=o}function Ni(){return Ft(kr(Qe))}function ot(o){if(rt){if(kr(Qe)!==null)throw Ho(),Xn;Qe=o}}function ub(o=1){if(rt){for(var a=o,h=Qe;a--;)h=kr(h);Qe=h}}function ws(o=!0){for(var a=0,h=Qe;;){if(h.nodeType===ni){var m=h.data;if(m===Sl){if(a===0)return h;a-=1}else(m===mh||m===fs)&&(a+=1)}var y=kr(h);o&&h.remove(),h=y}}function jh(o){if(!o||o.nodeType!==ni)throw Ho(),Xn;return o.data}function Eh(o){return o===this.v}function db(o,a){return o!=o?a==a:o!==a||o!==null&&typeof o=="object"||typeof o=="function"}function Oh(o){return!db(o,this.v)}let Di=!1,hb=!1;function fb(){Di=!0}let Et=null;function Bi(o){Et=o}function Uo(o,a=!1,h){Et={p:Et,i:!1,c:null,e:null,s:o,x:null,l:Di&&!a?{s:null,u:null,$:[]}:null}}function Go(o){var a=Et,h=a.e;if(h!==null){a.e=null;for(var m of h)Jh(m)}return o!==void 0&&(a.x=o),a.i=!0,Et=a.p,o??{}}function Jo(){return!Di||Et!==null&&Et.l===null}let ii=[];function xh(){var o=ii;ii=[],Kv(o)}function Fi(o){if(ii.length===0&&!Ko){var a=ii;queueMicrotask(()=>{a===ii&&xh()})}ii.push(o)}function pb(){for(;ii.length>0;)xh()}function Sh(o){var a=Xe;if(a===null)return Ze.f|=jn,o;if((a.f&gs)===0){if((a.f&Pl)===0)throw o;a.b.error(o)}else Mi(o,a)}function Mi(o,a){for(;a!==null;){if((a.f&Pl)!==0)try{a.b.error(o);return}catch(h){o=h}a=a.parent}throw o}const mb=-7169;function St(o,a){o.f=o.f&mb|a}function Ll(o){(o.f&ur)!==0||o.deps===null?St(o,Bt):St(o,on)}function Ch(o){if(o!==null)for(const a of o)(a.f&At)===0||(a.f&ri)===0||(a.f^=ri,Ch(a.deps))}function Ph(o,a,h){(o.f&Ut)!==0?a.add(o):(o.f&on)!==0&&h.add(o),Ch(o.deps),St(o,Bt)}const ks=new Set;let ht=null,js=null,br=null,dr=[],Es=null,Al=!1,Ko=!1;class gr{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){dr=[],js=null,this.apply();var h=[],m=[];for(const y of a)this.#s(y,h,m);this.is_fork||this.#c(),this.is_deferred()?(this.#l(m),this.#l(h)):(js=this,ht=null,Rh(m),Rh(h),js=null,this.#a?.resolve()),br=null}#s(a,h,m){a.f^=Bt;for(var y=a.first,_=null;y!==null;){var d=y.f,v=(d&(nn|kn))!==0,i=v&&(d&Bt)!==0,f=i||(d&or)!==0||this.skipped_effects.has(y);if(!f&&y.fn!==null){v?y.f^=Bt:_!==null&&(d&(vs|bs|gh))!==0?_.b.defer_effect(y):(d&vs)!==0?h.push(y):Yo(y)&&((d&rn)!==0&&this.#i.add(y),Qo(y));var p=y.first;if(p!==null){y=p;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)Ph(a[h],this.#i,this.#n)}capture(a,h){h!==Lt&&!this.previous.has(a)&&this.previous.set(a,h),(a.f&jn)===0&&(this.current.set(a,a.v),br?.set(a,a.v))}activate(){ht=this,this.apply()}deactivate(){ht===this&&(ht=null,br=null)}flush(){if(this.activate(),dr.length>0){if(Th(),ht!==null&&ht!==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(ks.size>1){this.previous.clear();var a=br,h=!0;for(const y of ks){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 m=dr;dr=[];const v=new Set,i=new Map;for(const f of _)Lh(f,d,v,i);if(dr.length>0){ht=y,y.apply();for(const f of dr)y.#s(f,[],[]);y.deactivate()}dr=m}}ht=null,br=a}this.committed=!0,ks.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),St(a,Ut),un(a);for(const a of this.#n)St(a,on),un(a);this.flush()}oncommit(a){this.#e.add(a)}ondiscard(a){this.#t.add(a)}settled(){return(this.#a??=bh()).promise}static ensure(){if(ht===null){const a=ht=new gr;ks.add(ht),Ko||gr.enqueue(()=>{ht===a&&a.flush()})}return ht}static enqueue(a){Fi(a)}apply(){}}function Ct(o){var a=Ko;Ko=!0;try{for(var h;;){if(pb(),dr.length===0&&(ht?.flush(),dr.length===0))return Es=null,h;Th()}}finally{Ko=a}}function Th(){var o=si;Al=!0;var a=null;try{var h=0;for(Ss(!0);dr.length>0;){var m=gr.ensure();if(h++>1e3){var y,_;yb()}m.process(dr),En.clear()}}finally{Al=!1,Ss(o),Es=null}}function yb(){try{rb()}catch(o){Mi(o,Es)}}let cn=null;function Rh(o){var a=o.length;if(a!==0){for(var h=0;h<a;){var m=o[h++];if((m.f&(an|or))===0&&Yo(m)&&(cn=new Set,Qo(m),m.deps===null&&m.first===null&&m.nodes===null&&(m.teardown===null&&m.ac===null?Qh(m):m.fn=null),cn?.size>0)){En.clear();for(const y of cn){if((y.f&(an|or))!==0)continue;const _=[y];let d=y.parent;for(;d!==null;)cn.has(d)&&(cn.delete(d),_.push(d)),d=d.parent;for(let v=_.length-1;v>=0;v--){const i=_[v];(i.f&(an|or))===0&&Qo(i)}}cn.clear()}}cn=null}}function Lh(o,a,h,m){if(!h.has(o)&&(h.add(o),o.reactions!==null))for(const y of o.reactions){const _=y.f;(_&At)!==0?Lh(y,a,h,m):(_&(Rl|rn))!==0&&(_&Ut)===0&&Ah(y,a,m)&&(St(y,Ut),un(y))}}function Ah(o,a,h){const m=h.get(o);if(m!==void 0)return m;if(o.deps!==null)for(const y of o.deps){if(a.includes(y))return!0;if((y.f&At)!==0&&Ah(y,a,h))return h.set(y,!0),!0}return h.set(o,!1),!1}function un(o){for(var a=Es=o;a.parent!==null;){a=a.parent;var h=a.f;if(Al&&a===Xe&&(h&rn)!==0&&(h&wh)===0)return;if((h&(kn|nn))!==0){if((h&Bt)===0)return;a.f^=Bt}}dr.push(a)}function vb(o){let a=0,h=oi(0),m;return()=>{Ml()&&(he(h),xs(()=>(a===0&&(m=Xo(()=>o(()=>Wo(h)))),a+=1,()=>{Fi(()=>{a-=1,a===0&&(m?.(),m=void 0,Wo(h))})})))}}var bb=$i|ti|Pl;function gb(o,a,h){new _b(o,a,h)}class _b{parent;is_pending=!1;#e;#t=rt?Qe: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;#_=vb(()=>(this.#h=oi(this.#u),()=>{this.#h=null}));constructor(a,h,m){this.#e=a,this.#r=h,this.#o=m,this.parent=Xe.b,this.is_pending=!!this.#r.pending,this.#a=Vl(()=>{if(Xe.b=this,rt){const _=this.#t;Ni(),_.nodeType===ni&&_.data===fs?this.#k():(this.#w(),this.#d===0&&(this.is_pending=!1))}else{var y=this.#b();try{this.#i=fr(()=>m(y))}catch(_){this.error(_)}this.#d>0?this.#v():this.is_pending=!1}return()=>{this.#c?.remove()}},bb),rt&&(this.#e=Qe)}#w(){try{this.#i=fr(()=>this.#o(this.#e))}catch(a){this.error(a)}}#k(){const a=this.#r.pending;a&&(this.#n=fr(()=>a(this.#e)),gr.enqueue(()=>{var h=this.#b();this.#i=this.#y(()=>(gr.ensure(),fr(()=>this.#o(h)))),this.#d>0?this.#v():(ai(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var a=this.#e;return this.is_pending&&(this.#c=er(),this.#e.before(this.#c),a=this.#c),a}defer_effect(a){Ph(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=Xe,m=Ze,y=Et;Mr(this.#a),tr(this.#a),Bi(this.#a.ctx);try{return a()}catch(_){return Sh(_),null}finally{Mr(h),tr(m),Bi(y)}}#v(){const a=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),tf(this.#i,this.#l)),this.#n===null&&(this.#n=fr(()=>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)St(h,Ut),un(h);for(const h of this.#m)St(h,on),un(h);this.#p.clear(),this.#m.clear(),this.#n&&ai(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&&Vi(this.#h,this.#u)}get_effect_pending(){return this.#_(),he(this.#h)}error(a){var h=this.#r.onerror;let m=this.#r.failed;if(this.#f||!h&&!m)throw a;this.#i&&(Gt(this.#i),this.#i=null),this.#n&&(Gt(this.#n),this.#n=null),this.#s&&(Gt(this.#s),this.#s=null),rt&&(Ft(this.#t),ub(),Ft(ws()));var y=!1,_=!1;const d=()=>{if(y){cb();return}y=!0,_&&lb(),gr.ensure(),this.#u=0,this.#s!==null&&ai(this.#s,()=>{this.#s=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#y(()=>(this.#f=!1,fr(()=>this.#o(this.#e)))),this.#d>0?this.#v():this.is_pending=!1};var v=Ze;try{tr(null),_=!0,h?.(a,d),_=!1}catch(i){Mi(i,this.#a&&this.#a.parent)}finally{tr(v)}m&&Fi(()=>{this.#s=this.#y(()=>{gr.ensure(),this.#f=!0;try{return fr(()=>{m(this.#e,()=>a,()=>d)})}catch(i){return Mi(i,this.#a.parent),null}finally{this.#f=!1}})})}}function wb(o,a,h,m){const y=Jo()?$l:Il;if(h.length===0&&o.length===0){m(a.map(y));return}var _=ht,d=Xe,v=kb();function i(){Promise.all(h.map(f=>jb(f))).then(f=>{v();try{m([...a.map(y),...f])}catch(p){(d.f&an)===0&&Mi(p,d)}_?.deactivate(),Os()}).catch(f=>{Mi(f,d)})}o.length>0?Promise.all(o).then(()=>{v();try{return i()}finally{_?.deactivate(),Os()}}):i()}function kb(){var o=Xe,a=Ze,h=Et,m=ht;return function(_=!0){Mr(o),tr(a),Bi(h),_&&m?.activate()}}function Os(){Mr(null),tr(null),Bi(null)}function $l(o){var a=At|Ut,h=Ze!==null&&(Ze.f&At)!==0?Ze:null;return Xe!==null&&(Xe.f|=ti),{ctx:Et,deps:null,effects:null,equals:Eh,f:a,fn:o,reactions:null,rv:0,v:Lt,wv:0,parent:h??Xe,ac:null}}function jb(o,a,h){let m=Xe;m===null&&Qv();var y=m.b,_=void 0,d=oi(Lt),v=!Ze,i=new Map;return Ab(()=>{var f=bh();_=f.promise;try{Promise.resolve(o()).then(f.resolve,f.reject).then(()=>{p===ht&&p.committed&&p.deactivate(),Os()})}catch(k){f.reject(k),Os()}var p=ht;if(v){var g=y.is_rendered();y.update_pending_count(1),p.increment(g),i.get(p)?.reject(Ii),i.delete(p),i.set(p,f)}const b=(k,E=void 0)=>{if(p.activate(),E)E!==Ii&&(d.f|=jn,Vi(d,E));else{(d.f&jn)!==0&&(d.f^=jn),Vi(d,k);for(const[O,j]of i){if(i.delete(O),O===p)break;j.reject(Ii)}}v&&(y.update_pending_count(-1),p.decrement(g))};f.promise.then(b,k=>b(null,k||"unknown"))}),Pb(()=>{for(const f of i.values())f.reject(Ii)}),new Promise(f=>{function p(g){function b(){g===_?f(d):p(_)}g.then(b,b)}p(_)})}function Il(o){const a=$l(o);return a.equals=Oh,a}function $h(o){var a=o.effects;if(a!==null){o.effects=null;for(var h=0;h<a.length;h+=1)Gt(a[h])}}function Eb(o){for(var a=o.parent;a!==null;){if((a.f&At)===0)return(a.f&an)===0?a:null;a=a.parent}return null}function Nl(o){var a,h=Xe;Mr(Eb(o));try{o.f&=~ri,$h(o),a=lf(o)}finally{Mr(h)}return a}function Ih(o){var a=Nl(o);if(!o.equals(a)&&(o.wv=af(),(!ht?.is_fork||o.deps===null)&&(o.v=a,o.deps===null))){St(o,Bt);return}On||(br!==null?(Ml()||ht?.is_fork)&&br.set(o,a):Ll(o))}let Dl=new Set;const En=new Map;let Nh=!1;function oi(o,a){var h={f:0,v:o,reactions:null,equals:Eh,rv:0,wv:0};return h}function _t(o,a){const h=oi(o);return Ib(h),h}function Dh(o,a=!1,h=!0){const m=oi(o);return a||(m.equals=Oh),Di&&h&&Et!==null&&Et.l!==null&&(Et.l.s??=[]).push(m),m}function st(o,a,h=!1){Ze!==null&&(!jr||(Ze.f&_h)!==0)&&Jo()&&(Ze.f&(At|rn|Rl|_h))!==0&&!dn?.includes(o)&&sb();let m=h?_r(a):a;return Vi(o,m)}function Vi(o,a){if(!o.equals(a)){var h=o.v;On?En.set(o,a):En.set(o,h),o.v=a;var m=gr.ensure();if(m.capture(o,h),(o.f&At)!==0){const y=o;(o.f&Ut)!==0&&Nl(y),Ll(y)}o.wv=af(),Bh(o,Ut),Jo()&&Xe!==null&&(Xe.f&Bt)!==0&&(Xe.f&(nn|kn))===0&&(pr===null?Nb([o]):pr.push(o)),!m.is_fork&&Dl.size>0&&!Nh&&Ob()}return a}function Ob(){Nh=!1;var o=si;Ss(!0);const a=Array.from(Dl);try{for(const h of a)(h.f&Bt)!==0&&St(h,on),Yo(h)&&Qo(h)}finally{Ss(o)}Dl.clear()}function Wo(o){st(o,o.v+1)}function Bh(o,a){var h=o.reactions;if(h!==null)for(var m=Jo(),y=h.length,_=0;_<y;_++){var d=h[_],v=d.f;if(!(!m&&d===Xe)){var i=(v&Ut)===0;if(i&&St(d,a),(v&At)!==0){var f=d;br?.delete(f),(v&ri)===0&&(v&ur&&(d.f|=ri),Bh(f,on))}else i&&((v&rn)!==0&&cn!==null&&cn.add(d),un(d))}}}function _r(o){if(typeof o!="object"||o===null||zo in o)return o;const a=Jv(o);if(a!==Uv&&a!==Gv)return o;var h=new Map,m=yh(o),y=_t(0),_=li,d=v=>{if(li===_)return v();var i=Ze,f=li;tr(null),of(_);var p=v();return tr(i),of(f),p};return m&&h.set("length",_t(o.length)),new Proxy(o,{defineProperty(v,i,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&ob();var p=h.get(i);return p===void 0?p=d(()=>{var g=_t(f.value);return h.set(i,g),g}):st(p,f.value,!0),!0},deleteProperty(v,i){var f=h.get(i);if(f===void 0){if(i in v){const p=d(()=>_t(Lt));h.set(i,p),Wo(y)}}else st(f,Lt),Wo(y);return!0},get(v,i,f){if(i===zo)return o;var p=h.get(i),g=i in v;if(p===void 0&&(!g||ei(v,i)?.writable)&&(p=d(()=>{var k=_r(g?v[i]:Lt),E=_t(k);return E}),h.set(i,p)),p!==void 0){var b=he(p);return b===Lt?void 0:b}return Reflect.get(v,i,f)},getOwnPropertyDescriptor(v,i){var f=Reflect.getOwnPropertyDescriptor(v,i);if(f&&"value"in f){var p=h.get(i);p&&(f.value=he(p))}else if(f===void 0){var g=h.get(i),b=g?.v;if(g!==void 0&&b!==Lt)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return f},has(v,i){if(i===zo)return!0;var f=h.get(i),p=f!==void 0&&f.v!==Lt||Reflect.has(v,i);if(f!==void 0||Xe!==null&&(!p||ei(v,i)?.writable)){f===void 0&&(f=d(()=>{var b=p?_r(v[i]):Lt,k=_t(b);return k}),h.set(i,f));var g=he(f);if(g===Lt)return!1}return p},set(v,i,f,p){var g=h.get(i),b=i in v;if(m&&i==="length")for(var k=f;k<g.v;k+=1){var E=h.get(k+"");E!==void 0?st(E,Lt):k in v&&(E=d(()=>_t(Lt)),h.set(k+"",E))}if(g===void 0)(!b||ei(v,i)?.writable)&&(g=d(()=>_t(void 0)),st(g,_r(f)),h.set(i,g));else{b=g.v!==Lt;var O=d(()=>_r(f));st(g,O)}var j=Reflect.getOwnPropertyDescriptor(v,i);if(j?.set&&j.set.call(p,f),!b){if(m&&typeof i=="string"){var x=h.get("length"),S=Number(i);Number.isInteger(S)&&S>=x.v&&st(x,S+1)}Wo(y)}return!0},ownKeys(v){he(y);var i=Reflect.ownKeys(v).filter(g=>{var b=h.get(g);return b===void 0||b.v!==Lt});for(var[f,p]of h)p.v!==Lt&&!(f in v)&&i.push(f);return i},setPrototypeOf(){ab()}})}var Fh,Mh,Vh,qh;function Bl(){if(Fh===void 0){Fh=window,Mh=/Firefox/.test(navigator.userAgent);var o=Element.prototype,a=Node.prototype,h=Text.prototype;Vh=ei(a,"firstChild").get,qh=ei(a,"nextSibling").get,vh(o)&&(o.__click=void 0,o.__className=void 0,o.__attributes=null,o.__style=void 0,o.__e=void 0),vh(h)&&(h.__t=void 0)}}function er(o=""){return document.createTextNode(o)}function wr(o){return Vh.call(o)}function kr(o){return qh.call(o)}function ut(o,a){if(!rt)return wr(o);var h=wr(Qe);if(h===null)h=Qe.appendChild(er());else if(a&&h.nodeType!==_s){var m=er();return h?.before(m),Ft(m),m}return Ft(h),h}function Mt(o,a=!1){if(!rt){var h=wr(o);return h instanceof Comment&&h.data===""?kr(h):h}if(a&&Qe?.nodeType!==_s){var m=er();return Qe?.before(m),Ft(m),m}return Qe}function ft(o,a=1,h=!1){let m=rt?Qe:o;for(var y;a--;)y=m,m=kr(m);if(!rt)return m;if(h&&m?.nodeType!==_s){var _=er();return m===null?y?.after(_):m.before(_),Ft(_),_}return Ft(m),m}function zh(o){o.textContent=""}function Hh(){return!1}let Uh=!1;function Gh(){Uh||(Uh=!0,document.addEventListener("reset",o=>{Promise.resolve().then(()=>{if(!o.defaultPrevented)for(const a of o.target.elements)a.__on_r?.()})},{capture:!0}))}function Fl(o){var a=Ze,h=Xe;tr(null),Mr(null);try{return o()}finally{tr(a),Mr(h)}}function xb(o,a,h,m=h){o.addEventListener(a,()=>Fl(h));const y=o.__on_r;y?o.__on_r=()=>{y(),m(!0)}:o.__on_r=()=>m(!0),Gh()}function Sb(o){Xe===null&&(Ze===null&&tb(),eb()),On&&Xv()}function Cb(o,a){var h=a.last;h===null?a.last=a.first=o:(h.next=o,o.prev=h,a.last=o)}function Fr(o,a,h){var m=Xe;m!==null&&(m.f&or)!==0&&(o|=or);var y={ctx:Et,deps:null,nodes:null,f:o|Ut|ur,first:null,fn:a,last:null,next:null,parent:m,b:m&&m.b,prev:null,teardown:null,wv:0,ac:null};if(h)try{Qo(y),y.f|=gs}catch(v){throw Gt(y),v}else a!==null&&un(y);var _=y;if(h&&_.deps===null&&_.teardown===null&&_.nodes===null&&_.first===_.last&&(_.f&ti)===0&&(_=_.first,(o&rn)!==0&&(o&$i)!==0&&_!==null&&(_.f|=$i)),_!==null&&(_.parent=m,m!==null&&Cb(_,m),Ze!==null&&(Ze.f&At)!==0&&(o&kn)===0)){var d=Ze;(d.effects??=[]).push(_)}return y}function Ml(){return Ze!==null&&!jr}function Pb(o){const a=Fr(bs,null,!1);return St(a,Bt),a.teardown=o,a}function Tb(o){Sb();var a=Xe.f,h=!Ze&&(a&nn)!==0&&(a&gs)===0;if(h){var m=Et;(m.e??=[]).push(o)}else return Jh(o)}function Jh(o){return Fr(vs|Wv,o,!1)}function Rb(o){gr.ensure();const a=Fr(kn|ti,o,!0);return()=>{Gt(a)}}function Lb(o){gr.ensure();const a=Fr(kn|ti,o,!0);return(h={})=>new Promise(m=>{h.outro?ai(a,()=>{Gt(a),m(void 0)}):(Gt(a),m(void 0))})}function Kh(o){return Fr(vs,o,!1)}function Ab(o){return Fr(Rl|ti,o,!0)}function xs(o,a=0){return Fr(bs|a,o,!0)}function hr(o,a=[],h=[],m=[]){wb(m,a,h,y=>{Fr(bs,()=>o(...y.map(he)),!0)})}function Vl(o,a=0){var h=Fr(rn|a,o,!0);return h}function fr(o){return Fr(nn|ti,o,!0)}function Wh(o){var a=o.teardown;if(a!==null){const h=On,m=Ze;rf(!0),tr(null);try{a.call(null)}finally{rf(h),tr(m)}}}function Zh(o,a=!1){var h=o.first;for(o.first=o.last=null;h!==null;){const y=h.ac;y!==null&&Fl(()=>{y.abort(Ii)});var m=h.next;(h.f&kn)!==0?h.parent=null:Gt(h,a),h=m}}function $b(o){for(var a=o.first;a!==null;){var h=a.next;(a.f&nn)===0&&Gt(a),a=h}}function Gt(o,a=!0){var h=!1;(a||(o.f&wh)!==0)&&o.nodes!==null&&o.nodes.end!==null&&(Yh(o.nodes.start,o.nodes.end),h=!0),Zh(o,a&&!h),Cs(o,0),St(o,an);var m=o.nodes&&o.nodes.t;if(m!==null)for(const _ of m)_.stop();Wh(o);var y=o.parent;y!==null&&y.first!==null&&Qh(o),o.next=o.prev=o.teardown=o.ctx=o.deps=o.fn=o.nodes=o.ac=null}function Yh(o,a){for(;o!==null;){var h=o===a?null:kr(o);o.remove(),o=h}}function Qh(o){var a=o.parent,h=o.prev,m=o.next;h!==null&&(h.next=m),m!==null&&(m.prev=h),a!==null&&(a.first===o&&(a.first=m),a.last===o&&(a.last=h))}function ai(o,a,h=!0){var m=[];Xh(o,m,!0);var y=()=>{h&&Gt(o),a&&a()},_=m.length;if(_>0){var d=()=>--_||y();for(var v of m)v.out(d)}else y()}function Xh(o,a,h){if((o.f&or)===0){o.f^=or;var m=o.nodes&&o.nodes.t;if(m!==null)for(const v of m)(v.is_global||h)&&a.push(v);for(var y=o.first;y!==null;){var _=y.next,d=(y.f&$i)!==0||(y.f&nn)!==0&&(o.f&rn)!==0;Xh(y,a,d?h:!1),y=_}}}function ql(o){ef(o,!0)}function ef(o,a){if((o.f&or)!==0){o.f^=or,(o.f&Bt)===0&&(St(o,Ut),un(o));for(var h=o.first;h!==null;){var m=h.next,y=(h.f&$i)!==0||(h.f&nn)!==0;ef(h,y?a:!1),h=m}var _=o.nodes&&o.nodes.t;if(_!==null)for(const d of _)(d.is_global||a)&&d.in()}}function tf(o,a){if(o.nodes)for(var h=o.nodes.start,m=o.nodes.end;h!==null;){var y=h===m?null:kr(h);a.append(h),h=y}}let si=!1;function Ss(o){si=o}let On=!1;function rf(o){On=o}let Ze=null,jr=!1;function tr(o){Ze=o}let Xe=null;function Mr(o){Xe=o}let dn=null;function Ib(o){Ze!==null&&(dn===null?dn=[o]:dn.push(o))}let Jt=null,ar=0,pr=null;function Nb(o){pr=o}let nf=1,Zo=0,li=Zo;function of(o){li=o}function af(){return++nf}function Yo(o){var a=o.f;if((a&Ut)!==0)return!0;if(a&At&&(o.f&=~ri),(a&on)!==0){for(var h=o.deps,m=h.length,y=0;y<m;y++){var _=h[y];if(Yo(_)&&Ih(_),_.wv>o.wv)return!0}(a&ur)!==0&&br===null&&St(o,Bt)}return!1}function sf(o,a,h=!0){var m=o.reactions;if(m!==null&&!dn?.includes(o))for(var y=0;y<m.length;y++){var _=m[y];(_.f&At)!==0?sf(_,a,!1):a===_&&(h?St(_,Ut):(_.f&Bt)!==0&&St(_,on),un(_))}}function lf(o){var a=Jt,h=ar,m=pr,y=Ze,_=dn,d=Et,v=jr,i=li,f=o.f;Jt=null,ar=0,pr=null,Ze=(f&(nn|kn))===0?o:null,dn=null,Bi(o.ctx),jr=!1,li=++Zo,o.ac!==null&&(Fl(()=>{o.ac.abort(Ii)}),o.ac=null);try{o.f|=Tl;var p=o.fn,g=p(),b=o.deps;if(Jt!==null){var k;if(Cs(o,ar),b!==null&&ar>0)for(b.length=ar+Jt.length,k=0;k<Jt.length;k++)b[ar+k]=Jt[k];else o.deps=b=Jt;if(Ml()&&(o.f&ur)!==0)for(k=ar;k<b.length;k++)(b[k].reactions??=[]).push(o)}else b!==null&&ar<b.length&&(Cs(o,ar),b.length=ar);if(Jo()&&pr!==null&&!jr&&b!==null&&(o.f&(At|on|Ut))===0)for(k=0;k<pr.length;k++)sf(pr[k],o);return y!==null&&y!==o&&(Zo++,pr!==null&&(m===null?m=pr:m.push(...pr))),(o.f&jn)!==0&&(o.f^=jn),g}catch(E){return Sh(E)}finally{o.f^=Tl,Jt=a,ar=h,pr=m,Ze=y,dn=_,Bi(d),jr=v,li=i}}function Db(o,a){let h=a.reactions;if(h!==null){var m=Hv.call(h,o);if(m!==-1){var y=h.length-1;y===0?h=a.reactions=null:(h[m]=h[y],h.pop())}}if(h===null&&(a.f&At)!==0&&(Jt===null||!Jt.includes(a))){var _=a;(_.f&ur)!==0&&(_.f^=ur,_.f&=~ri),Ll(_),$h(_),Cs(_,0)}}function Cs(o,a){var h=o.deps;if(h!==null)for(var m=a;m<h.length;m++)Db(o,h[m])}function Qo(o){var a=o.f;if((a&an)===0){St(o,Bt);var h=Xe,m=si;Xe=o,si=!0;try{(a&(rn|gh))!==0?$b(o):Zh(o),Wh(o);var y=lf(o);o.teardown=typeof y=="function"?y:null,o.wv=nf;var _;Cl&&hb&&(o.f&Ut)!==0&&o.deps}finally{si=m,Xe=h}}}async function Bb(){await Promise.resolve(),Ct()}function he(o){var a=o.f,h=(a&At)!==0;if(Ze!==null&&!jr){var m=Xe!==null&&(Xe.f&an)!==0;if(!m&&!dn?.includes(o)){var y=Ze.deps;if((Ze.f&Tl)!==0)o.rv<Zo&&(o.rv=Zo,Jt===null&&y!==null&&y[ar]===o?ar++:Jt===null?Jt=[o]:Jt.includes(o)||Jt.push(o));else{(Ze.deps??=[]).push(o);var _=o.reactions;_===null?o.reactions=[Ze]:_.includes(Ze)||_.push(Ze)}}}if(On&&En.has(o))return En.get(o);if(h){var d=o;if(On){var v=d.v;return((d.f&Bt)===0&&d.reactions!==null||uf(d))&&(v=Nl(d)),En.set(d,v),v}var i=(d.f&ur)===0&&!jr&&Ze!==null&&(si||(Ze.f&ur)!==0),f=d.deps===null;Yo(d)&&(i&&(d.f|=ur),Ih(d)),i&&!f&&cf(d)}if(br?.has(o))return br.get(o);if((o.f&jn)!==0)throw o.v;return o.v}function cf(o){if(o.deps!==null){o.f|=ur;for(const a of o.deps)(a.reactions??=[]).push(o),(a.f&At)!==0&&(a.f&ur)===0&&cf(a)}}function uf(o){if(o.v===Lt)return!0;if(o.deps===null)return!1;for(const a of o.deps)if(En.has(a)||(a.f&At)!==0&&uf(a))return!0;return!1}function Xo(o){var a=jr;try{return jr=!0,o()}finally{jr=a}}const df=new Set,zl=new Set;function Hl(o){for(var a=0;a<o.length;a++)df.add(o[a]);for(var h of zl)h(o)}let hf=null;function Ps(o){var a=this,h=a.ownerDocument,m=o.type,y=o.composedPath?.()||[],_=y[0]||o.target;hf=o;var d=0,v=hf===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){ys(o,"currentTarget",{configurable:!0,get(){return _||h}});var p=Ze,g=Xe;tr(null),Mr(null);try{for(var b,k=[];_!==null;){var E=_.assignedSlot||_.parentNode||_.host||null;try{var O=_["__"+m];O!=null&&(!_.disabled||o.target===_)&&O.call(_,o)}catch(j){b?k.push(j):b=j}if(o.cancelBubble||E===a||E===null)break;_=E}if(b){for(let j of k)queueMicrotask(()=>{throw j});throw b}}finally{o.__root=a,delete o.currentTarget,tr(p),Mr(g)}}}function ff(o){var a=document.createElement("template");return a.innerHTML=o.replaceAll("<!>","<!---->"),a.content}function Vr(o,a){var h=Xe;h.nodes===null&&(h.nodes={start:o,end:a,a:null,t:null})}function wt(o,a){var h=(a&Vv)!==0,m=(a&qv)!==0,y,_=!o.startsWith("<!>");return()=>{if(rt)return Vr(Qe,null),Qe;y===void 0&&(y=ff(_?o:"<!>"+o),h||(y=wr(y)));var d=m||Mh?document.importNode(y,!0):y.cloneNode(!0);if(h){var v=wr(d),i=d.lastChild;Vr(v,i)}else Vr(d,d);return d}}function Fb(o=""){if(!rt){var a=er(o+"");return Vr(a,a),a}var h=Qe;return h.nodeType!==_s&&(h.before(h=er()),Ft(h)),Vr(h,h),h}function qi(){if(rt)return Vr(Qe,null),Qe;var o=document.createDocumentFragment(),a=document.createComment(""),h=er();return o.append(a,h),Vr(a,h),o}function at(o,a){if(rt){var h=Xe;((h.f&gs)===0||h.nodes.end===null)&&(h.nodes.end=Qe),Ni();return}o!==null&&o.before(a)}const Mb=["touchstart","touchmove"];function Vb(o){return Mb.includes(o)}function sr(o,a){var h=a==null?"":typeof a=="object"?a+"":a;h!==(o.__t??=o.nodeValue)&&(o.__t=h,o.nodeValue=h+"")}function pf(o,a){return mf(o,a)}function qb(o,a){Bl(),a.intro=a.intro??!1;const h=a.target,m=rt,y=Qe;try{for(var _=wr(h);_&&(_.nodeType!==ni||_.data!==mh);)_=kr(_);if(!_)throw Xn;ln(!0),Ft(_);const d=mf(o,{...a,anchor:_});return ln(!1),d}catch(d){if(d instanceof Error&&d.message.split(`
|
|
25
|
+
`).some(v=>v.startsWith("https://svelte.dev/e/")))throw d;return d!==Xn&&console.warn("Failed to hydrate: ",d),a.recover===!1&&nb(),Bl(),zh(h),ln(!1),pf(o,a)}finally{ln(m),Ft(y)}}const zi=new Map;function mf(o,{target:a,anchor:h,props:m={},events:y,context:_,intro:d=!0}){Bl();var v=new Set,i=g=>{for(var b=0;b<g.length;b++){var k=g[b];if(!v.has(k)){v.add(k);var E=Vb(k);a.addEventListener(k,Ps,{passive:E});var O=zi.get(k);O===void 0?(document.addEventListener(k,Ps,{passive:E}),zi.set(k,1)):zi.set(k,O+1)}}};i(ps(df)),zl.add(i);var f=void 0,p=Lb(()=>{var g=h??a.appendChild(er());return gb(g,{pending:()=>{}},b=>{if(_){Uo({});var k=Et;k.c=_}if(y&&(m.$$events=y),rt&&Vr(b,null),f=o(b,m)||{},rt&&(Xe.nodes.end=Qe,Qe===null||Qe.nodeType!==ni||Qe.data!==Sl))throw Ho(),Xn;_&&Go()}),()=>{for(var b of v){a.removeEventListener(b,Ps);var k=zi.get(b);--k===0?(document.removeEventListener(b,Ps),zi.delete(b)):zi.set(b,k)}zl.delete(i),g!==h&&g.parentNode?.removeChild(g)}});return Ul.set(f,p),f}let Ul=new WeakMap;function zb(o,a){const h=Ul.get(o);return h?(Ul.delete(o),h(a)):Promise.resolve()}class Hb{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=ht;if(this.#e.has(a)){var h=this.#e.get(a),m=this.#t.get(h);if(m)ql(m),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),m=y.effect)}for(const[_,d]of this.#e){if(this.#e.delete(_),_===a)break;const v=this.#r.get(d);v&&(Gt(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();tf(d,f),f.append(er()),this.#r.set(_,{effect:d,fragment:f})}else Gt(d);this.#o.delete(_),this.#t.delete(_)};this.#a||!m?(this.#o.add(_),ai(d,v,!1)):v()}}};#n=a=>{this.#e.delete(a);const h=Array.from(this.#e.values());for(const[m,y]of this.#r)h.includes(m)||(Gt(y.effect),this.#r.delete(m))};ensure(a,h){var m=ht,y=Hh();if(h&&!this.#t.has(a)&&!this.#r.has(a))if(y){var _=document.createDocumentFragment(),d=er();_.append(d),this.#r.set(a,{effect:fr(()=>h(d)),fragment:_})}else this.#t.set(a,fr(()=>h(this.anchor)));if(this.#e.set(m,a),y){for(const[v,i]of this.#t)v===a?m.skipped_effects.delete(i):m.skipped_effects.add(i);for(const[v,i]of this.#r)v===a?m.skipped_effects.delete(i.effect):m.skipped_effects.add(i.effect);m.oncommit(this.#i),m.ondiscard(this.#n)}else rt&&(this.anchor=Qe),this.#i()}}function Gl(o){Et===null&&Yv(),Di&&Et.l!==null?Ub(Et).m.push(o):Tb(()=>{const a=Xo(o);if(typeof a=="function")return a})}function Ub(o){var a=o.l;return a.u??={a:[],b:[],m:[]}}function rr(o,a,h=!1){rt&&Ni();var m=new Hb(o),y=h?$i:0;function _(d,v){if(rt){const f=jh(o)===fs;if(d===f){var i=ws();Ft(i),m.anchor=i,ln(!1),m.ensure(d,v),ln(!0);return}}m.ensure(d,v)}Vl(()=>{var d=!1;a((v,i=!0)=>{d=!0,_(i,v)}),d||_(!1,null)},y)}function Ts(o,a){return a}function Gb(o,a,h){for(var m=[],y=a.length,_,d=a.length,v=0;v<y;v++){let g=a[v];ai(g,()=>{if(_){if(_.pending.delete(g),_.done.add(g),_.pending.size===0){var b=o.outrogroups;Jl(ps(_.done)),b.delete(_),b.size===0&&(o.outrogroups=null)}}else d-=1},!1)}if(d===0){var i=m.length===0&&h!==null;if(i){var f=h,p=f.parentNode;zh(p),p.append(f),o.items.clear()}Jl(a,!i)}else _={pending:new Set(a),done:new Set},(o.outrogroups??=new Set).add(_)}function Jl(o,a=!0){for(var h=0;h<o.length;h++)Gt(o[h],a)}var yf;function Rs(o,a,h,m,y,_=null){var d=o,v=new Map,i=(a&ph)!==0;if(i){var f=o;d=rt?Ft(wr(f)):f.appendChild(er())}rt&&Ni();var p=null,g=Il(()=>{var x=h();return yh(x)?x:x==null?[]:ps(x)}),b,k=!0;function E(){j.fallback=p,Jb(j,b,d,a,m),p!==null&&(b.length===0?(p.f&sn)===0?ql(p):(p.f^=sn,ea(p,null,d)):ai(p,()=>{p=null}))}var O=Vl(()=>{b=he(g);var x=b.length;let S=!1;if(rt){var C=jh(d)===fs;C!==(x===0)&&(d=ws(),Ft(d),ln(!1),S=!0)}for(var L=new Set,T=ht,R=Hh(),A=0;A<x;A+=1){rt&&Qe.nodeType===ni&&Qe.data===Sl&&(d=Qe,S=!0,ln(!1));var I=b[A],D=m(I,A),M=k?null:v.get(D);M?(M.v&&Vi(M.v,I),M.i&&Vi(M.i,A),R&&T.skipped_effects.delete(M.e)):(M=Kb(v,k?d:yf??=er(),I,D,A,y,a,h),k||(M.e.f|=sn),v.set(D,M)),L.add(D)}if(x===0&&_&&!p&&(k?p=fr(()=>_(d)):(p=fr(()=>_(yf??=er())),p.f|=sn)),rt&&x>0&&Ft(ws()),!k)if(R){for(const[V,G]of v)L.has(V)||T.skipped_effects.add(G.e);T.oncommit(E),T.ondiscard(()=>{})}else E();S&&ln(!0),he(g)}),j={effect:O,items:v,outrogroups:null,fallback:p};k=!1,rt&&(d=Qe)}function Jb(o,a,h,m,y){var _=(m&$v)!==0,d=a.length,v=o.items,i=o.effect.first,f,p=null,g,b=[],k=[],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&sn)===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&sn)!==0)if(j.f^=sn,j===i)ea(j,null,h);else{var S=p?p.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),xn(o,p,j),xn(o,j,S),ea(j,S,h),p=j,b=[],k=[],i=p.next;continue}if((j.f&or)!==0&&(ql(j),_&&(j.nodes?.a?.unfix(),(g??=new Set).delete(j))),j!==i){if(f!==void 0&&f.has(j)){if(b.length<k.length){var C=k[0],L;p=C.prev;var T=b[0],R=b[b.length-1];for(L=0;L<b.length;L+=1)ea(b[L],C,h);for(L=0;L<k.length;L+=1)f.delete(k[L]);xn(o,T.prev,R.next),xn(o,p,T),xn(o,R,C),i=C,p=R,x-=1,b=[],k=[]}else f.delete(j),ea(j,i,h),xn(o,j.prev,j.next),xn(o,j,p===null?o.effect.first:p.next),xn(o,p,j),p=j;continue}for(b=[],k=[];i!==null&&i!==j;)(f??=new Set).add(i),k.push(i),i=i.next;if(i===null)continue}(j.f&sn)===0&&b.push(j),p=j,i=j.next}if(o.outrogroups!==null){for(const M of o.outrogroups)M.pending.size===0&&(Jl(ps(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&or)===0&&A.push(j);for(;i!==null;)(i.f&or)===0&&i!==o.fallback&&A.push(i),i=i.next;var I=A.length;if(I>0){var D=(m&ph)!==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()}Gb(o,A,D)}}_&&Fi(()=>{if(g!==void 0)for(j of g)j.nodes?.a?.apply()})}function Kb(o,a,h,m,y,_,d,v){var i=(d&Lv)!==0?(d&Iv)===0?Dh(h,!1,!1):oi(h):null,f=(d&Av)!==0?oi(y):null;return{v:i,i:f,e:fr(()=>(_(a,i??h,f??y,v),()=>{o.delete(m)}))}}function ea(o,a,h){if(o.nodes)for(var m=o.nodes.start,y=o.nodes.end,_=a&&(a.f&sn)===0?a.nodes.start:h;m!==null;){var d=kr(m);if(_.before(m),m===y)return;m=d}}function xn(o,a,h){a===null?o.effect.first=h:a.next=h,h===null?o.effect.last=a:h.prev=a}function Wb(o,a,h=!1,m=!1,y=!1){var _=o,d="";hr(()=>{var v=Xe;if(d===(d=a()??"")){rt&&Ni();return}if(v.nodes!==null&&(Yh(v.nodes.start,v.nodes.end),v.nodes=null),d!==""){if(rt){Qe.data;for(var i=Ni(),f=i;i!==null&&(i.nodeType!==ni||i.data!=="");)f=i,i=kr(i);if(i===null)throw Ho(),Xn;Vr(Qe,f),_=Ft(i);return}var p=d+"";h?p=`<svg>${p}</svg>`:m&&(p=`<math>${p}</math>`);var g=ff(p);if((h||m)&&(g=wr(g)),Vr(wr(g),g.lastChild),h||m)for(;wr(g);)_.before(wr(g));else _.before(g)}})}function Kl(o,a){Kh(()=>{var h=o.getRootNode(),m=h.host?h:h.head??h.ownerDocument.head;if(!m.querySelector("#"+a.hash)){const y=document.createElement("style");y.id=a.hash,y.textContent=a.code,m.appendChild(y)}})}const Zb=Symbol("is custom element"),Yb=Symbol("is html");function Qb(o){if(rt){var a=!1,h=()=>{if(!a){if(a=!0,o.hasAttribute("value")){var m=o.value;vf(o,"value",null),o.value=m}if(o.hasAttribute("checked")){var y=o.checked;vf(o,"checked",null),o.checked=y}}};o.__on_r=h,Fi(h),Gh()}}function vf(o,a,h,m){var y=Xb(o);rt&&(y[a]=o.getAttribute(a),a==="src"||a==="srcset"||a==="href"&&o.nodeName==="LINK")||y[a]!==(y[a]=h)&&(a==="loading"&&(o[Zv]=h),o.removeAttribute(a))}function Xb(o){return o.__attributes??={[Zb]:o.nodeName.includes("-"),[Yb]:o.namespaceURI===zv}}function eg(o,a,h=a){var m=new WeakSet;xb(o,"input",async y=>{var _=y?o.defaultValue:o.value;if(_=Wl(o)?Zl(_):_,h(_),ht!==null&&m.add(ht),await Bb(),_!==(_=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))}}}),(rt&&o.defaultValue!==o.value||Xo(a)==null&&o.value)&&(h(Wl(o)?Zl(o.value):o.value),ht!==null&&m.add(ht)),xs(()=>{var y=a();if(o===document.activeElement){var _=js??ht;if(m.has(_))return}Wl(o)&&y===Zl(o.value)||o.type==="date"&&!y&&!o.value||y!==o.value&&(o.value=y??"")})}function Wl(o){var a=o.type;return a==="number"||a==="range"}function Zl(o){return o===""?null:+o}function bf(o,a){return o===a||o?.[zo]===a}function tg(o={},a,h,m){return Kh(()=>{var y,_;return xs(()=>{y=_,_=[],Xo(()=>{o!==h(..._)&&(a(o,..._),y&&bf(h(...y),o)&&a(null,...y))})}),()=>{Fi(()=>{_&&bf(h(..._),o)&&a(null,..._)})}}),o}let Ls=!1;function rg(o){var a=Ls;try{return Ls=!1,[o(),Ls]}finally{Ls=a}}function Vt(o,a,h,m){var y=!Di||(h&Dv)!==0,_=(h&Fv)!==0,d=(h&Mv)!==0,v=m,i=!0,f=()=>(i&&(i=!1,v=d?Xo(m):m),v),p;if(_){var g=zo in o||kh in o;p=ei(o,a)?.set??(g&&a in o?C=>o[a]=C:void 0)}var b,k=!1;_?[b,k]=rg(()=>o[a]):b=o[a],b===void 0&&m!==void 0&&(b=f(),p&&(y&&ib(),p(b)));var E;if(y?E=()=>{var C=o[a];return C===void 0?f():(i=!0,C)}:E=()=>{var C=o[a];return C!==void 0&&(v=void 0),C===void 0?v:C},y&&(h&Bv)===0)return E;if(p){var O=o.$$legacy;return(function(C,L){return arguments.length>0?((!y||!L||O||k)&&p(L?E():C),C):E()})}var j=!1,x=((h&Nv)!==0?$l:Il)(()=>(j=!1,E()));_&&he(x);var S=Xe;return(function(C,L){if(arguments.length>0){const T=L?he(x):y&&_?_r(C):C;return st(x,T),j=!0,v!==void 0&&(v=T),C}return On&&j||(S.f&an)!==0?x.v:he(x)})}function ng(o){return new ig(o)}class ig{#e;#t;constructor(a){var h=new Map,m=(_,d)=>{var v=Dh(d,!1,!1);return h.set(_,v),v};const y=new Proxy({...a.props||{},$$events:{}},{get(_,d){return he(h.get(d)??m(d,Reflect.get(_,d)))},has(_,d){return d===kh?!0:(he(h.get(d)??m(d,Reflect.get(_,d))),Reflect.has(_,d))},set(_,d,v){return st(h.get(d)??m(d,v),v),Reflect.set(_,d,v)}});this.#t=(a.hydrate?qb:pf)(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)&&Ct(),this.#e=y.$$events;for(const _ of Object.keys(this.#t))_==="$set"||_==="$destroy"||_==="$on"||ys(this,_,{get(){return this.#t[_]},set(d){this.#t[_]=d},enumerable:!0});this.#t.$set=_=>{Object.assign(y,_)},this.#t.$destroy=()=>{zb(this.#t)}}$set(a){this.#t.$set(a)}$on(a,h){this.#e[a]=this.#e[a]||[];const m=(...y)=>h.call(this,...y);return this.#e[a].push(m),()=>{this.#e[a]=this.#e[a].filter(y=>y!==m)}}$destroy(){this.#t.$destroy()}}let gf;typeof HTMLElement=="function"&&(gf=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 m=this.$$c.$on(o,a);this.$$l_u.set(a,m)}super.addEventListener(o,a,h)}removeEventListener(o,a,h){if(super.removeEventListener(o,a,h),this.$$c){const m=this.$$l_u.get(a);m&&(m(),this.$$l_u.delete(a))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let o=function(m){return y=>{const _=document.createElement("slot");m!=="default"&&(_.name=m),at(y,_)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const a={},h=og(this);for(const m of this.$$s)m in h&&(m==="default"&&!this.$$d.children?(this.$$d.children=o(m),a.default=!0):a[m]=o(m));for(const m of this.attributes){const y=this.$$g_p(m.name);y in this.$$d||(this.$$d[y]=As(y,m.value,this.$$p_d,"toProp"))}for(const m in this.$$p_d)!(m in this.$$d)&&this[m]!==void 0&&(this.$$d[m]=this[m],delete this[m]);this.$$c=ng({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:a,$$host:this}}),this.$$me=Rb(()=>{xs(()=>{this.$$r=!0;for(const m of ms(this.$$c)){if(!this.$$p_d[m]?.reflect)continue;this.$$d[m]=this.$$c[m];const y=As(m,this.$$d[m],this.$$p_d,"toAttribute");y==null?this.removeAttribute(this.$$p_d[m].attribute||m):this.setAttribute(this.$$p_d[m].attribute||m,y)}this.$$r=!1})});for(const m in this.$$l)for(const y of this.$$l[m]){const _=this.$$c.$on(m,y);this.$$l_u.set(y,_)}this.$$l={}}}attributeChangedCallback(o,a,h){this.$$r||(o=this.$$g_p(o),this.$$d[o]=As(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 ms(this.$$p_d).find(a=>this.$$p_d[a].attribute===o||!this.$$p_d[a].attribute&&a.toLowerCase()===o)||o}});function As(o,a,h,m){const y=h[o]?.type;if(a=y==="Boolean"&&typeof a!="boolean"?a!=null:a,!m||!h[o])return a;if(m==="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 og(o){const a={};return o.childNodes.forEach(h=>{a[h.slot||"default"]=!0}),a}function Hi(o,a,h,m,y,_){let d=class extends gf{constructor(){super(o,h,y),this.$$p_d=a}static get observedAttributes(){return ms(a).map(v=>(a[v].attribute||v).toLowerCase())}};return ms(a).forEach(v=>{ys(d.prototype,v,{get(){return this.$$c&&v in this.$$c?this.$$c[v]:this.$$d[v]},set(i){i=As(v,i,a),this.$$d[v]=i;var f=this.$$c;if(f){var p=ei(f,v)?.get;p?f[v]=i:f.$set({[v]:i})}}})}),m.forEach(v=>{ys(d.prototype,v,{get(){return this.$$c?.[v]}})}),o.element=d,d}var Yl={exports:{}};var _f;function ag(){return _f||(_f=1,(function(o,a){(function(h,m){o.exports=m()})(self,(()=>(()=>{var h={9306:(d,v,i)=>{var f=i(4901),p=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(p(b)+" is not a function")}},5548:(d,v,i)=>{var f=i(3517),p=i(6823),g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(p(b)+" is not a constructor")}},3506:(d,v,i)=>{var f=i(3925),p=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g("Can't set "+p(b)+" as a prototype")}},6469:(d,v,i)=>{var f=i(8227),p=i(2360),g=i(4913).f,b=f("unscopables"),k=Array.prototype;k[b]===void 0&&g(k,b,{configurable:!0,value:p(null)}),d.exports=function(E){k[b][E]=!0}},7829:(d,v,i)=>{var f=i(8183).charAt;d.exports=function(p,g,b){return g+(b?f(p,g).length:1)}},679:(d,v,i)=>{var f=i(1625),p=TypeError;d.exports=function(g,b){if(f(b,g))return g;throw new p("Incorrect invocation")}},8551:(d,v,i)=>{var f=i(34),p=String,g=TypeError;d.exports=function(b){if(f(b))return b;throw new g(p(b)+" is not an object")}},235:(d,v,i)=>{var f=i(9213).forEach,p=i(4598)("forEach");d.exports=p?[].forEach:function(g){return f(this,g,arguments.length>1?arguments[1]:void 0)}},7916:(d,v,i)=>{var f=i(6080),p=i(9565),g=i(8981),b=i(6319),k=i(4209),E=i(3517),O=i(6198),j=i(4659),x=i(81),S=i(851),C=Array;d.exports=function(L){var T=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,ce,ue=S(T),fe=0;if(!ue||this===C&&k(ue))for(M=O(T),V=R?new this(M):C(M);M>fe;fe++)ce=D?I(T[fe],fe):T[fe],j(V,fe,ce);else for(V=R?new this:[],Y=(J=x(T,ue)).next;!(G=p(Y,J)).done;fe++)ce=D?b(J,I,[G.value,fe],!0):G.value,j(V,fe,ce);return V.length=fe,V}},9617:(d,v,i)=>{var f=i(5397),p=i(5610),g=i(6198),b=function(k){return function(E,O,j){var x=f(E),S=g(x);if(S===0)return!k&&-1;var C,L=p(j,S);if(k&&O!=O){for(;S>L;)if((C=x[L++])!=C)return!0}else for(;S>L;L++)if((k||L in x)&&x[L]===O)return k||L||0;return!k&&-1}};d.exports={includes:b(!0),indexOf:b(!1)}},9213:(d,v,i)=>{var f=i(6080),p=i(9504),g=i(7055),b=i(8981),k=i(6198),E=i(1469),O=p([].push),j=function(x){var S=x===1,C=x===2,L=x===3,T=x===4,R=x===6,A=x===7,I=x===5||R;return function(D,M,V,G){for(var J,Y,ce=b(D),ue=g(ce),fe=k(ue),X=f(M,V),pe=0,re=G||E,U=S?re(D,fe):C||A?re(D,0):void 0;fe>pe;pe++)if((I||pe in ue)&&(Y=X(J=ue[pe],pe,ce),x))if(S)U[pe]=Y;else if(Y)switch(x){case 3:return!0;case 5:return J;case 6:return pe;case 2:O(U,J)}else switch(x){case 4:return!1;case 7:O(U,J)}return R?-1:L||T?T:U}};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),p=i(8227),g=i(7388),b=p("species");d.exports=function(k){return g>=51||!f((function(){var E=[];return(E.constructor={})[b]=function(){return{foo:1}},E[k](Boolean).foo!==1}))}},4598:(d,v,i)=>{var f=i(9039);d.exports=function(p,g){var b=[][p];return!!b&&f((function(){b.call(null,g||function(){return 1},1)}))}},926:(d,v,i)=>{var f=i(9306),p=i(8981),g=i(7055),b=i(6198),k=TypeError,E="Reduce of empty array with no initial value",O=function(j){return function(x,S,C,L){var T=p(x),R=g(T),A=b(T);if(f(S),A===0&&C<2)throw new k(E);var I=j?A-1:0,D=j?-1:1;if(C<2)for(;;){if(I in R){L=R[I],I+=D;break}if(I+=D,j?I<0:A<=I)throw new k(E)}for(;j?I>=0:A>I;I+=D)I in R&&(L=S(L,R[I],I,T));return L}};d.exports={left:O(!1),right:O(!0)}},4527:(d,v,i)=>{var f=i(3724),p=i(4376),g=TypeError,b=Object.getOwnPropertyDescriptor,k=f&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}})();d.exports=k?function(E,O){if(p(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),p=Math.floor,g=function(b,k){var E=b.length;if(E<8)for(var O,j,x=1;x<E;){for(j=x,O=b[x];j&&k(b[j-1],O)>0;)b[j]=b[--j];j!==x++&&(b[j]=O)}else for(var S=p(E/2),C=g(f(b,0,S),k),L=g(f(b,S),k),T=C.length,R=L.length,A=0,I=0;A<T||I<R;)b[A+I]=A<T&&I<R?k(C[A],L[I])<=0?C[A++]:L[I++]:A<T?C[A++]:L[I++];return b};d.exports=g},7433:(d,v,i)=>{var f=i(4376),p=i(3517),g=i(34),b=i(8227)("species"),k=Array;d.exports=function(E){var O;return f(E)&&(O=E.constructor,(p(O)&&(O===k||f(O.prototype))||g(O)&&(O=O[b])===null)&&(O=void 0)),O===void 0?k:O}},1469:(d,v,i)=>{var f=i(7433);d.exports=function(p,g){return new(f(p))(g===0?0:g)}},6319:(d,v,i)=>{var f=i(8551),p=i(9539);d.exports=function(g,b,k,E){try{return E?b(f(k)[0],k[1]):b(k)}catch(O){p(g,"throw",O)}}},4428:(d,v,i)=>{var f=i(8227)("iterator"),p=!1;try{var g=0,b={next:function(){return{done:!!g++}},return:function(){p=!0}};b[f]=function(){return this},Array.from(b,(function(){throw 2}))}catch{}d.exports=function(k,E){try{if(!E&&!p)return!1}catch{return!1}var O=!1;try{var j={};j[f]=function(){return{next:function(){return{done:O=!0}}}},k(j)}catch{}return O}},4576:(d,v,i)=>{var f=i(9504),p=f({}.toString),g=f("".slice);d.exports=function(b){return g(p(b),8,-1)}},6955:(d,v,i)=>{var f=i(2140),p=i(4901),g=i(4576),b=i(8227)("toStringTag"),k=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(C,L){try{return C[L]}catch{}})(j=k(O),b))=="string"?x:E?g(j):(S=g(j))==="Object"&&p(j.callee)?"Arguments":S}},7740:(d,v,i)=>{var f=i(9297),p=i(5031),g=i(7347),b=i(4913);d.exports=function(k,E,O){for(var j=p(E),x=b.f,S=g.f,C=0;C<j.length;C++){var L=j[C];f(k,L)||O&&f(O,L)||x(k,L,S(E,L))}}},1436:(d,v,i)=>{var f=i(8227)("match");d.exports=function(p){var g=/./;try{"/./"[p](g)}catch{try{return g[f]=!1,"/./"[p](g)}catch{}}return!1}},2211:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype}))},2529:d=>{d.exports=function(v,i){return{value:v,done:i}}},6699:(d,v,i)=>{var f=i(3724),p=i(4913),g=i(6980);d.exports=f?function(b,k,E){return p.f(b,k,g(1,E))}:function(b,k,E){return b[k]=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),p=i(4913),g=i(6980);d.exports=function(b,k,E){f?p.f(b,k,g(0,E)):b[k]=E}},380:(d,v,i)=>{var f=i(9504),p=i(9039),g=i(533).start,b=RangeError,k=isFinite,E=Math.abs,O=Date.prototype,j=O.toISOString,x=f(O.getTime),S=f(O.getUTCDate),C=f(O.getUTCFullYear),L=f(O.getUTCHours),T=f(O.getUTCMilliseconds),R=f(O.getUTCMinutes),A=f(O.getUTCMonth),I=f(O.getUTCSeconds);d.exports=p((function(){return j.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"}))||!p((function(){j.call(new Date(NaN))}))?function(){if(!k(x(this)))throw new b("Invalid time value");var D=this,M=C(D),V=T(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),p=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 p(this,b)}},2106:(d,v,i)=>{var f=i(283),p=i(4913);d.exports=function(g,b,k){return k.get&&f(k.get,b,{getter:!0}),k.set&&f(k.set,b,{setter:!0}),p.f(g,b,k)}},6840:(d,v,i)=>{var f=i(4901),p=i(4913),g=i(283),b=i(9433);d.exports=function(k,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?k[E]=O:b(E,O);else{try{j.unsafe?k[E]&&(x=!0):delete k[E]}catch{}x?k[E]=O:p.f(k,E,{value:O,enumerable:!1,configurable:!j.nonConfigurable,writable:!j.nonWritable})}return k}},9433:(d,v,i)=>{var f=i(4475),p=Object.defineProperty;d.exports=function(g,b){try{p(f,g,{value:b,configurable:!0,writable:!0})}catch{f[g]=b}return b}},4606:(d,v,i)=>{var f=i(6823),p=TypeError;d.exports=function(g,b){if(!delete g[b])throw new p("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),p=i(34),g=f.document,b=p(g)&&p(g.createElement);d.exports=function(k){return b?g.createElement(k):{}}},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,p=f&&f.constructor&&f.constructor.prototype;d.exports=p===Object.prototype?void 0:p},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),p=i(9088);d.exports=!f&&!p&&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),p=i(4576);d.exports=p(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,p,g=i(4475),b=i(9392),k=g.process,E=g.Deno,O=k&&k.versions||E&&E.version,j=O&&O.v8;j&&(p=(f=j.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!p&&b&&(!(f=b.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=b.match(/Chrome\/(\d+)/))&&(p=+f[1]),d.exports=p},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),p=i(7347).f,g=i(6699),b=i(6840),k=i(9433),E=i(7740),O=i(2796);d.exports=function(j,x){var S,C,L,T,R,A=j.target,I=j.global,D=j.stat;if(S=I?f:D?f[A]||k(A,{}):f[A]&&f[A].prototype)for(C in x){if(T=x[C],L=j.dontCallGetSet?(R=p(S,C))&&R.value:S[C],!O(I?C:A+(D?".":"#")+C,j.forced)&&L!==void 0){if(typeof T==typeof L)continue;E(T,L)}(j.sham||L&&L.sham)&&g(T,"sham",!0),b(S,C,T,j)}}},9039:d=>{d.exports=function(v){try{return!!v()}catch{return!0}}},9228:(d,v,i)=>{i(7495);var f=i(9565),p=i(6840),g=i(7323),b=i(9039),k=i(8227),E=i(6699),O=k("species"),j=RegExp.prototype;d.exports=function(x,S,C,L){var T=k(x),R=!b((function(){var M={};return M[T]=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[T]=/./[T]),V.exec=function(){return M=!0,null},V[T](""),!M}));if(!R||!A||C){var I=/./[T],D=S(T,""[x],(function(M,V,G,J,Y){var ce=V.exec;return ce===g||ce===j.exec?R&&!Y?{done:!0,value:f(I,V,G,J)}:{done:!0,value:f(M,G,V,J)}:{done:!1}}));p(String.prototype,x,D[0]),p(j,T,D[1])}L&&E(j[T],"sham",!0)}},8745:(d,v,i)=>{var f=i(616),p=Function.prototype,g=p.apply,b=p.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),p=i(9306),g=i(616),b=f(f.bind);d.exports=function(k,E){return p(k),E===void 0?k:g?b(k,E):function(){return k.apply(E,arguments)}}},616:(d,v,i)=>{var f=i(9039);d.exports=!f((function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")}))},566:(d,v,i)=>{var f=i(9504),p=i(9306),g=i(34),b=i(9297),k=i(7680),E=i(616),O=Function,j=f([].concat),x=f([].join),S={};d.exports=E?O.bind:function(C){var L=p(this),T=L.prototype,R=k(arguments,1),A=function(){var I=j(R,k(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(C,I)};return g(T)&&(A.prototype=T),A}},9565:(d,v,i)=>{var f=i(616),p=Function.prototype.call;d.exports=f?p.bind(p):function(){return p.apply(p,arguments)}},350:(d,v,i)=>{var f=i(3724),p=i(9297),g=Function.prototype,b=f&&Object.getOwnPropertyDescriptor,k=p(g,"name"),E=k&&(function(){}).name==="something",O=k&&(!f||f&&b(g,"name").configurable);d.exports={EXISTS:k,PROPER:E,CONFIGURABLE:O}},6706:(d,v,i)=>{var f=i(9504),p=i(9306);d.exports=function(g,b,k){try{return f(p(Object.getOwnPropertyDescriptor(g,b)[k]))}catch{}}},7476:(d,v,i)=>{var f=i(4576),p=i(9504);d.exports=function(g){if(f(g)==="Function")return p(g)}},9504:(d,v,i)=>{var f=i(616),p=Function.prototype,g=p.call,b=f&&p.bind.bind(g,g);d.exports=f?b:function(k){return function(){return g.apply(k,arguments)}}},7751:(d,v,i)=>{var f=i(4475),p=i(4901);d.exports=function(g,b){return arguments.length<2?(k=f[g],p(k)?k:void 0):f[g]&&f[g][b];var k}},851:(d,v,i)=>{var f=i(6955),p=i(5966),g=i(4117),b=i(6269),k=i(8227)("iterator");d.exports=function(E){if(!g(E))return p(E,k)||p(E,"@@iterator")||b[f(E)]}},81:(d,v,i)=>{var f=i(9565),p=i(9306),g=i(8551),b=i(6823),k=i(851),E=TypeError;d.exports=function(O,j){var x=arguments.length<2?k(O):j;if(p(x))return g(f(x,O));throw new E(b(O)+" is not iterable")}},6933:(d,v,i)=>{var f=i(9504),p=i(4376),g=i(4901),b=i(4576),k=i(655),E=f([].push);d.exports=function(O){if(g(O))return O;if(p(O)){for(var j=O.length,x=[],S=0;S<j;S++){var C=O[S];typeof C=="string"?E(x,C):typeof C!="number"&&b(C)!=="Number"&&b(C)!=="String"||E(x,k(C))}var L=x.length,T=!0;return function(R,A){if(T)return T=!1,A;if(p(this))return A;for(var I=0;I<L;I++)if(x[I]===R)return A}}}},5966:(d,v,i)=>{var f=i(9306),p=i(4117);d.exports=function(g,b){var k=g[b];return p(k)?void 0:f(k)}},2478:(d,v,i)=>{var f=i(9504),p=i(8981),g=Math.floor,b=f("".charAt),k=f("".replace),E=f("".slice),O=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;d.exports=function(x,S,C,L,T,R){var A=C+x.length,I=L.length,D=j;return T!==void 0&&(T=p(T),D=O),k(R,D,(function(M,V){var G;switch(b(V,0)){case"$":return"$";case"&":return x;case"`":return E(S,0,C);case"'":return E(S,A);case"<":G=T[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(p){return p&&p.Math===Math&&p};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),p=i(8981),g=f({}.hasOwnProperty);d.exports=Object.hasOwn||function(b,k){return g(p(b),k)}},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),p=i(9039),g=i(4055);d.exports=!f&&!p((function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7}))},7055:(d,v,i)=>{var f=i(9504),p=i(9039),g=i(4576),b=Object,k=f("".split);d.exports=p((function(){return!b("z").propertyIsEnumerable(0)}))?function(E){return g(E)==="String"?k(E,""):b(E)}:b},3167:(d,v,i)=>{var f=i(4901),p=i(34),g=i(2967);d.exports=function(b,k,E){var O,j;return g&&f(O=k.constructor)&&O!==E&&p(j=O.prototype)&&j!==E.prototype&&g(b,j),b}},3706:(d,v,i)=>{var f=i(9504),p=i(4901),g=i(7629),b=f(Function.toString);p(g.inspectSource)||(g.inspectSource=function(k){return b(k)}),d.exports=g.inspectSource},1181:(d,v,i)=>{var f,p,g,b=i(8622),k=i(4475),E=i(34),O=i(6699),j=i(9297),x=i(7629),S=i(6119),C=i(421),L="Object already initialized",T=k.TypeError,R=k.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 T(L);return M.facade=D,A.set(D,M),M},p=function(D){return A.get(D)||{}},g=function(D){return A.has(D)}}else{var I=S("state");C[I]=!0,f=function(D,M){if(j(D,I))throw new T(L);return M.facade=D,O(D,I,M),M},p=function(D){return j(D,I)?D[I]:{}},g=function(D){return j(D,I)}}d.exports={set:f,get:p,has:g,enforce:function(D){return g(D)?p(D):f(D,{})},getterFor:function(D){return function(M){var V;if(!E(M)||(V=p(M)).type!==D)throw new T("Incompatible receiver, "+D+" required");return V}}}},4209:(d,v,i)=>{var f=i(8227),p=i(6269),g=f("iterator"),b=Array.prototype;d.exports=function(k){return k!==void 0&&(p.Array===k||b[g]===k)}},4376:(d,v,i)=>{var f=i(4576);d.exports=Array.isArray||function(p){return f(p)==="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),p=i(9039),g=i(4901),b=i(6955),k=i(7751),E=i(3706),O=function(){},j=k("Reflect","construct"),x=/^\s*(?:class|function)\b/,S=f(x.exec),C=!x.test(O),L=function(R){if(!g(R))return!1;try{return j(O,[],R),!0}catch{return!1}},T=function(R){if(!g(R))return!1;switch(b(R)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return C||!!S(x,E(R))}catch{return!0}};T.sham=!0,d.exports=!j||p((function(){var R;return L(L.call)||!L(Object)||!L((function(){R=!0}))||R}))?T:L},6575:(d,v,i)=>{var f=i(9297);d.exports=function(p){return p!==void 0&&(f(p,"value")||f(p,"writable"))}},2796:(d,v,i)=>{var f=i(9039),p=i(4901),g=/#|\.prototype\./,b=function(x,S){var C=E[k(x)];return C===j||C!==O&&(p(S)?f(S):!!S)},k=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(p){return typeof p=="object"?p!==null:f(p)}},3925:(d,v,i)=>{var f=i(34);d.exports=function(p){return f(p)||p===null}},6395:d=>{d.exports=!1},788:(d,v,i)=>{var f=i(34),p=i(4576),g=i(8227)("match");d.exports=function(b){var k;return f(b)&&((k=b[g])!==void 0?!!k:p(b)==="RegExp")}},757:(d,v,i)=>{var f=i(7751),p=i(4901),g=i(1625),b=i(7040),k=Object;d.exports=b?function(E){return typeof E=="symbol"}:function(E){var O=f("Symbol");return p(O)&&g(O.prototype,k(E))}},2652:(d,v,i)=>{var f=i(6080),p=i(9565),g=i(8551),b=i(6823),k=i(4209),E=i(6198),O=i(1625),j=i(81),x=i(851),S=i(9539),C=TypeError,L=function(R,A){this.stopped=R,this.result=A},T=L.prototype;d.exports=function(R,A,I){var D,M,V,G,J,Y,ce,ue=I&&I.that,fe=!(!I||!I.AS_ENTRIES),X=!(!I||!I.IS_RECORD),pe=!(!I||!I.IS_ITERATOR),re=!(!I||!I.INTERRUPTED),U=f(A,ue),ne=function(N){return D&&S(D,"normal",N),new L(!0,N)},q=function(N){return fe?(g(N),re?U(N[0],N[1],ne):U(N[0],N[1])):re?U(N,ne):U(N)};if(X)D=R.iterator;else if(pe)D=R;else{if(!(M=x(R)))throw new C(b(R)+" is not iterable");if(k(M)){for(V=0,G=E(R);G>V;V++)if((J=q(R[V]))&&O(T,J))return J;return new L(!1)}D=j(R,M)}for(Y=X?R.next:D.next;!(ce=p(Y,D)).done;){try{J=q(ce.value)}catch(N){S(D,"throw",N)}if(typeof J=="object"&&J&&O(T,J))return J}return new L(!1)}},9539:(d,v,i)=>{var f=i(9565),p=i(8551),g=i(5966);d.exports=function(b,k,E){var O,j;p(b);try{if(!(O=g(b,"return"))){if(k==="throw")throw E;return E}O=f(O,b)}catch(x){j=!0,O=x}if(k==="throw")throw E;if(j)throw O;return p(O),E}},3994:(d,v,i)=>{var f=i(7657).IteratorPrototype,p=i(2360),g=i(6980),b=i(687),k=i(6269),E=function(){return this};d.exports=function(O,j,x,S){var C=j+" Iterator";return O.prototype=p(f,{next:g(+!S,x)}),b(O,C,!1,!0),k[C]=E,O}},1088:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(6395),b=i(350),k=i(4901),E=i(3994),O=i(2787),j=i(2967),x=i(687),S=i(6699),C=i(6840),L=i(8227),T=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",ce=function(){return this};d.exports=function(ue,fe,X,pe,re,U,ne){E(X,fe,pe);var q,N,F,ie=function(te){if(te===re&&H)return H;if(!M&&te&&te in Oe)return Oe[te];switch(te){case G:case J:case Y:return function(){return new X(this,te)}}return function(){return new X(this)}},ke=fe+" Iterator",_e=!1,Oe=ue.prototype,ye=Oe[V]||Oe["@@iterator"]||re&&Oe[re],H=!M&&ye||ie(re),K=fe==="Array"&&Oe.entries||ye;if(K&&(q=O(K.call(new ue)))!==Object.prototype&&q.next&&(g||O(q)===D||(j?j(q,D):k(q[V])||C(q,V,ce)),x(q,ke,!0,!0),g&&(T[ke]=ce)),A&&re===J&&ye&&ye.name!==J&&(!g&&I?S(Oe,"name",J):(_e=!0,H=function(){return p(ye,this)})),re)if(N={values:ie(J),keys:U?H:ie(G),entries:ie(Y)},ne)for(F in N)(M||_e||!(F in Oe))&&C(Oe,F,N[F]);else f({target:fe,proto:!0,forced:M||_e},N);return g&&!ne||Oe[V]===H||C(Oe,V,H,{name:re}),T[fe]=H,N}},7657:(d,v,i)=>{var f,p,g,b=i(9039),k=i(4901),E=i(34),O=i(2360),j=i(2787),x=i(6840),S=i(8227),C=i(6395),L=S("iterator"),T=!1;[].keys&&("next"in(g=[].keys())?(p=j(j(g)))!==Object.prototype&&(f=p):T=!0),!E(f)||b((function(){var R={};return f[L].call(R)!==R}))?f={}:C&&(f=O(f)),k(f[L])||x(f,L,(function(){return this})),d.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:T}},6269:d=>{d.exports={}},6198:(d,v,i)=>{var f=i(8014);d.exports=function(p){return f(p.length)}},283:(d,v,i)=>{var f=i(9504),p=i(9039),g=i(4901),b=i(9297),k=i(3724),E=i(350).CONFIGURABLE,O=i(3706),j=i(1181),x=j.enforce,S=j.get,C=String,L=Object.defineProperty,T=f("".slice),R=f("".replace),A=f([].join),I=k&&!p((function(){return L((function(){}),"length",{value:8}).length!==8})),D=String(String).split("String"),M=d.exports=function(V,G,J){T(C(G),0,7)==="Symbol("&&(G="["+R(C(G),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),J&&J.getter&&(G="get "+G),J&&J.setter&&(G="set "+G),(!b(V,"name")||E&&V.name!==G)&&(k?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?k&&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 p=+f;return(p>0?i:v)(p)}},1955:(d,v,i)=>{var f,p,g,b,k,E=i(4475),O=i(3389),j=i(6080),x=i(9225).set,S=i(8265),C=i(8119),L=i(28),T=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,ce;for(R&&(Y=D.domain)&&Y.exit();ce=G.get();)try{ce()}catch(ue){throw G.head&&f(),ue}Y&&Y.enter()};C||R||T||!A||!I?!L&&M&&M.resolve?((b=M.resolve(void 0)).constructor=M,k=j(b.then,b),f=function(){k(J)}):R?f=function(){D.nextTick(J)}:(x=j(x,E),f=function(){x(J)}):(p=!0,g=I.createTextNode(""),new A(J).observe(g,{characterData:!0}),f=function(){g.data=p=!p}),V=function(Y){G.head||f(),G.add(Y)}}d.exports=V},6043:(d,v,i)=>{var f=i(9306),p=TypeError,g=function(b){var k,E;this.promise=new b((function(O,j){if(k!==void 0||E!==void 0)throw new p("Bad Promise constructor");k=O,E=j})),this.resolve=f(k),this.reject=f(E)};d.exports.f=function(b){return new g(b)}},5749:(d,v,i)=>{var f=i(788),p=TypeError;d.exports=function(g){if(f(g))throw new p("The method doesn't accept regular expressions");return g}},3904:(d,v,i)=>{var f=i(4475),p=i(9039),g=i(9504),b=i(655),k=i(3802).trim,E=i(7452),O=g("".charAt),j=f.parseFloat,x=f.Symbol,S=x&&x.iterator,C=1/j(E+"-0")!=-1/0||S&&!p((function(){j(Object(S))}));d.exports=C?function(L){var T=k(b(L)),R=j(T);return R===0&&O(T,0)==="-"?-0:R}:j},2703:(d,v,i)=>{var f=i(4475),p=i(9039),g=i(9504),b=i(655),k=i(3802).trim,E=i(7452),O=f.parseInt,j=f.Symbol,x=j&&j.iterator,S=/^[+-]?0x/i,C=g(S.exec),L=O(E+"08")!==8||O(E+"0x16")!==22||x&&!p((function(){O(Object(x))}));d.exports=L?function(T,R){var A=k(b(T));return O(A,R>>>0||(C(S,A)?16:10))}:O},4213:(d,v,i)=>{var f=i(3724),p=i(9504),g=i(9565),b=i(9039),k=i(1072),E=i(3717),O=i(8773),j=i(8981),x=i(7055),S=Object.assign,C=Object.defineProperty,L=p([].concat);d.exports=!S||b((function(){if(f&&S({b:1},S(C({},"a",{enumerable:!0,get:function(){C(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var T={},R={},A=Symbol("assign detection"),I="abcdefghijklmnopqrst";return T[A]=7,I.split("").forEach((function(D){R[D]=D})),S({},T)[A]!==7||k(S({},R)).join("")!==I}))?function(T,R){for(var A=j(T),I=arguments.length,D=1,M=E.f,V=O.f;I>D;)for(var G,J=x(arguments[D++]),Y=M?L(k(J),M(J)):k(J),ce=Y.length,ue=0;ce>ue;)G=Y[ue++],f&&!g(V,J,G)||(A[G]=J[G]);return A}:S},2360:(d,v,i)=>{var f,p=i(8551),g=i(6801),b=i(8727),k=i(421),E=i(397),O=i(4055),j=i(6119),x="prototype",S="script",C=j("IE_PROTO"),L=function(){},T=function(I){return"<"+S+">"+I+"</"+S+">"},R=function(I){I.write(T("")),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(T("document.F=Object")),I.close(),I.F):R(f);for(var V=b.length;V--;)delete A[x][b[V]];return A()};k[C]=!0,d.exports=Object.create||function(I,D){var M;return I!==null?(L[x]=p(I),M=new L,L[x]=null,M[C]=I):M=A(),D===void 0?M:g.f(M,D)}},6801:(d,v,i)=>{var f=i(3724),p=i(8686),g=i(4913),b=i(8551),k=i(5397),E=i(1072);v.f=f&&!p?Object.defineProperties:function(O,j){b(O);for(var x,S=k(j),C=E(j),L=C.length,T=0;L>T;)g.f(O,x=C[T++],S[x]);return O}},4913:(d,v,i)=>{var f=i(3724),p=i(5917),g=i(8686),b=i(8551),k=i(6969),E=TypeError,O=Object.defineProperty,j=Object.getOwnPropertyDescriptor,x="enumerable",S="configurable",C="writable";v.f=f?g?function(L,T,R){if(b(L),T=k(T),b(R),typeof L=="function"&&T==="prototype"&&"value"in R&&C in R&&!R[C]){var A=j(L,T);A&&A[C]&&(L[T]=R.value,R={configurable:S in R?R[S]:A[S],enumerable:x in R?R[x]:A[x],writable:!1})}return O(L,T,R)}:O:function(L,T,R){if(b(L),T=k(T),b(R),p)try{return O(L,T,R)}catch{}if("get"in R||"set"in R)throw new E("Accessors not supported");return"value"in R&&(L[T]=R.value),L}},7347:(d,v,i)=>{var f=i(3724),p=i(9565),g=i(8773),b=i(6980),k=i(5397),E=i(6969),O=i(9297),j=i(5917),x=Object.getOwnPropertyDescriptor;v.f=f?x:function(S,C){if(S=k(S),C=E(C),j)try{return x(S,C)}catch{}if(O(S,C))return b(!p(g.f,S,C),S[C])}},298:(d,v,i)=>{var f=i(4576),p=i(5397),g=i(8480).f,b=i(7680),k=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(E){return k&&f(E)==="Window"?(function(O){try{return g(O)}catch{return b(k)}})(E):g(p(E))}},8480:(d,v,i)=>{var f=i(1828),p=i(8727).concat("length","prototype");v.f=Object.getOwnPropertyNames||function(g){return f(g,p)}},3717:(d,v)=>{v.f=Object.getOwnPropertySymbols},2787:(d,v,i)=>{var f=i(9297),p=i(4901),g=i(8981),b=i(6119),k=i(2211),E=b("IE_PROTO"),O=Object,j=O.prototype;d.exports=k?O.getPrototypeOf:function(x){var S=g(x);if(f(S,E))return S[E];var C=S.constructor;return p(C)&&S instanceof C?C.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),p=i(9297),g=i(5397),b=i(9617).indexOf,k=i(421),E=f([].push);d.exports=function(O,j){var x,S=g(O),C=0,L=[];for(x in S)!p(k,x)&&p(S,x)&&E(L,x);for(;j.length>C;)p(S,x=j[C++])&&(~b(L,x)||E(L,x));return L}},1072:(d,v,i)=>{var f=i(1828),p=i(8727);d.exports=Object.keys||function(g){return f(g,p)}},8773:(d,v)=>{var i={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,p=f&&!i.call({1:2},1);v.f=p?function(g){var b=f(this,g);return!!b&&b.enumerable}:i},2967:(d,v,i)=>{var f=i(6706),p=i(34),g=i(7750),b=i(3506);d.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var k,E=!1,O={};try{(k=f(Object.prototype,"__proto__","set"))(O,[]),E=O instanceof Array}catch{}return function(j,x){return g(j),b(x),p(j)&&(E?k(j,x):j.__proto__=x),j}})():void 0)},2357:(d,v,i)=>{var f=i(3724),p=i(9039),g=i(9504),b=i(2787),k=i(1072),E=i(5397),O=g(i(8773).f),j=g([].push),x=f&&p((function(){var C=Object.create(null);return C[2]=2,!O(C,2)})),S=function(C){return function(L){for(var T,R=E(L),A=k(R),I=x&&b(R)===null,D=A.length,M=0,V=[];D>M;)T=A[M++],f&&!(I?T in R:O(R,T))||j(V,C?[T,R[T]]:R[T]);return V}};d.exports={entries:S(!0),values:S(!1)}},3179:(d,v,i)=>{var f=i(2140),p=i(6955);d.exports=f?{}.toString:function(){return"[object "+p(this)+"]"}},4270:(d,v,i)=>{var f=i(9565),p=i(4901),g=i(34),b=TypeError;d.exports=function(k,E){var O,j;if(E==="string"&&p(O=k.toString)&&!g(j=f(O,k))||p(O=k.valueOf)&&!g(j=f(O,k))||E!=="string"&&p(O=k.toString)&&!g(j=f(O,k)))return j;throw new b("Can't convert object to primitive value")}},5031:(d,v,i)=>{var f=i(7751),p=i(9504),g=i(8480),b=i(3717),k=i(8551),E=p([].concat);d.exports=f("Reflect","ownKeys")||function(O){var j=g.f(k(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),p=i(550),g=i(4901),b=i(2796),k=i(3706),E=i(8227),O=i(7290),j=i(516),x=i(6395),S=i(7388),C=p&&p.prototype,L=E("species"),T=!1,R=g(f.PromiseRejectionEvent),A=b("Promise",(function(){var I=k(p),D=I!==String(p);if(!D&&S===66||x&&(!C.catch||!C.finally))return!0;if(!S||S<51||!/native code/.test(I)){var M=new p((function(G){G(1)})),V=function(G){G((function(){}),(function(){}))};if((M.constructor={})[L]=V,!(T=M.then((function(){}))instanceof V))return!0}return!D&&(O||j)&&!R}));d.exports={CONSTRUCTOR:A,REJECTION_EVENT:R,SUBCLASSING:T}},550:(d,v,i)=>{var f=i(4475);d.exports=f.Promise},3438:(d,v,i)=>{var f=i(8551),p=i(34),g=i(6043);d.exports=function(b,k){if(f(b),p(k)&&k.constructor===b)return k;var E=g.f(b);return(0,E.resolve)(k),E.promise}},537:(d,v,i)=>{var f=i(550),p=i(4428),g=i(916).CONSTRUCTOR;d.exports=g||!p((function(b){f.all(b).then(void 0,(function(){}))}))},1056:(d,v,i)=>{var f=i(4913).f;d.exports=function(p,g,b){b in p||f(p,b,{configurable:!0,get:function(){return g[b]},set:function(k){g[b]=k}})}},8265:d=>{var v=function(){this.head=null,this.tail=null};v.prototype={add:function(i){var f={item:i,next:null},p=this.tail;p?p.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),p=i(8551),g=i(4901),b=i(4576),k=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&&p(S),S}if(b(O)==="RegExp")return f(k,O,j);throw new E("RegExp#exec called on incompatible receiver")}},7323:(d,v,i)=>{var f,p,g=i(9565),b=i(9504),k=i(655),E=i(7979),O=i(8429),j=i(5745),x=i(2360),S=i(1181).get,C=i(3635),L=i(8814),T=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=(p=/b*/g,g(R,f=/a/,"a"),g(R,p,"a"),f.lastIndex!==0||p.lastIndex!==0),J=O.BROKEN_CARET,Y=/()??/.exec("")[1]!==void 0;(G||Y||J||C||L)&&(A=function(ce){var ue,fe,X,pe,re,U,ne,q=this,N=S(q),F=k(ce),ie=N.raw;if(ie)return ie.lastIndex=q.lastIndex,ue=g(A,ie,F),q.lastIndex=ie.lastIndex,ue;var ke=N.groups,_e=J&&q.sticky,Oe=g(E,q),ye=q.source,H=0,K=F;if(_e&&(Oe=M(Oe,"y",""),D(Oe,"g")===-1&&(Oe+="g"),K=V(F,q.lastIndex),q.lastIndex>0&&(!q.multiline||q.multiline&&I(F,q.lastIndex-1)!==`
|
|
26
|
+
`)&&(ye="(?: "+ye+")",K=" "+K,H++),fe=new RegExp("^(?:"+ye+")",Oe)),Y&&(fe=new RegExp("^"+ye+"$(?!\\s)",Oe)),G&&(X=q.lastIndex),pe=g(R,_e?fe:q,K),_e?pe?(pe.input=V(pe.input,H),pe[0]=V(pe[0],H),pe.index=q.lastIndex,q.lastIndex+=pe[0].length):q.lastIndex=0:G&&pe&&(q.lastIndex=q.global?pe.index+pe[0].length:X),Y&&pe&&pe.length>1&&g(T,pe[0],fe,(function(){for(re=1;re<arguments.length-2;re++)arguments[re]===void 0&&(pe[re]=void 0)})),pe&&ke)for(pe.groups=U=x(null),re=0;re<ke.length;re++)U[(ne=ke[re])[0]]=pe[ne[1]];return pe}),d.exports=A},7979:(d,v,i)=>{var f=i(8551);d.exports=function(){var p=f(this),g="";return p.hasIndices&&(g+="d"),p.global&&(g+="g"),p.ignoreCase&&(g+="i"),p.multiline&&(g+="m"),p.dotAll&&(g+="s"),p.unicode&&(g+="u"),p.unicodeSets&&(g+="v"),p.sticky&&(g+="y"),g}},1034:(d,v,i)=>{var f=i(9565),p=i(9297),g=i(1625),b=i(7979),k=RegExp.prototype;d.exports=function(E){var O=E.flags;return O!==void 0||"flags"in k||p(E,"flags")||!g(k,E)?O:f(b,E)}},8429:(d,v,i)=>{var f=i(9039),p=i(4475).RegExp,g=f((function(){var E=p("a","y");return E.lastIndex=2,E.exec("abcd")!==null})),b=g||f((function(){return!p("a","y").sticky})),k=g||f((function(){var E=p("^r","gy");return E.lastIndex=2,E.exec("str")!==null}));d.exports={BROKEN_CARET:k,MISSED_STICKY:b,UNSUPPORTED_Y:g}},3635:(d,v,i)=>{var f=i(9039),p=i(4475).RegExp;d.exports=f((function(){var g=p(".","s");return!(g.dotAll&&g.test(`
|
|
27
|
+
`)&&g.flags==="s")}))},8814:(d,v,i)=>{var f=i(9039),p=i(4475).RegExp;d.exports=f((function(){var g=p("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"}))},7750:(d,v,i)=>{var f=i(4117),p=TypeError;d.exports=function(g){if(f(g))throw new p("Can't call method on "+g);return g}},3389:(d,v,i)=>{var f=i(4475),p=i(3724),g=Object.getOwnPropertyDescriptor;d.exports=function(b){if(!p)return f[b];var k=g(f,b);return k&&k.value}},9472:(d,v,i)=>{var f,p=i(4475),g=i(8745),b=i(4901),k=i(6763),E=i(9392),O=i(7680),j=i(2812),x=p.Function,S=/MSIE .\./.test(E)||k&&((f=p.Bun.version.split(".")).length<3||f[0]==="0"&&(f[1]<3||f[1]==="3"&&f[2]==="0"));d.exports=function(C,L){var T=L?2:1;return S?function(R,A){var I=j(arguments.length,1)>T,D=b(R)?R:x(R),M=I?O(arguments,T):[],V=I?function(){g(D,this,M)}:D;return L?C(V,A):C(V)}:C}},7633:(d,v,i)=>{var f=i(7751),p=i(2106),g=i(8227),b=i(3724),k=g("species");d.exports=function(E){var O=f(E);b&&O&&!O[k]&&p(O,k,{configurable:!0,get:function(){return this}})}},687:(d,v,i)=>{var f=i(4913).f,p=i(9297),g=i(8227)("toStringTag");d.exports=function(b,k,E){b&&!E&&(b=b.prototype),b&&!p(b,g)&&f(b,g,{configurable:!0,value:k})}},6119:(d,v,i)=>{var f=i(5745),p=i(3392),g=f("keys");d.exports=function(b){return g[b]||(g[b]=p(b))}},7629:(d,v,i)=>{var f=i(6395),p=i(4475),g=i(9433),b="__core-js_shared__",k=d.exports=p[b]||g(b,{});(k.versions||(k.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(p,g){return f[p]||(f[p]=g||{})}},2293:(d,v,i)=>{var f=i(8551),p=i(5548),g=i(4117),b=i(8227)("species");d.exports=function(k,E){var O,j=f(k).constructor;return j===void 0||g(O=f(j)[b])?E:p(O)}},8183:(d,v,i)=>{var f=i(9504),p=i(1291),g=i(655),b=i(7750),k=f("".charAt),E=f("".charCodeAt),O=f("".slice),j=function(x){return function(S,C){var L,T,R=g(b(S)),A=p(C),I=R.length;return A<0||A>=I?x?"":void 0:(L=E(R,A))<55296||L>56319||A+1===I||(T=E(R,A+1))<56320||T>57343?x?k(R,A):L:x?O(R,A,A+2):T-56320+(L-55296<<10)+65536}};d.exports={codeAt:j(!1),charAt:j(!0)}},533:(d,v,i)=>{var f=i(9504),p=i(8014),g=i(655),b=i(2333),k=i(7750),E=f(b),O=f("".slice),j=Math.ceil,x=function(S){return function(C,L,T){var R,A,I=g(k(C)),D=p(L),M=I.length,V=T===void 0?" ":g(T);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),p=i(655),g=i(7750),b=RangeError;d.exports=function(k){var E=p(g(this)),O="",j=f(k);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,p=i(9039),g=i(7452);d.exports=function(b){return p((function(){return!!g[b]()||"
"[b]()!=="
"||f&&g[b].name!==b}))}},3802:(d,v,i)=>{var f=i(9504),p=i(7750),g=i(655),b=i(7452),k=f("".replace),E=RegExp("^["+b+"]+"),O=RegExp("(^|[^"+b+"])["+b+"]+$"),j=function(x){return function(S){var C=g(p(S));return 1&x&&(C=k(C,E,"")),2&x&&(C=k(C,O,"$1")),C}};d.exports={start:j(1),end:j(2),trim:j(3)}},4495:(d,v,i)=>{var f=i(7388),p=i(9039),g=i(4475).String;d.exports=!!Object.getOwnPropertySymbols&&!p((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),p=i(7751),g=i(8227),b=i(6840);d.exports=function(){var k=p("Symbol"),E=k&&k.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,p,g,b,k=i(4475),E=i(8745),O=i(6080),j=i(4901),x=i(9297),S=i(9039),C=i(397),L=i(7680),T=i(4055),R=i(2812),A=i(8119),I=i(9088),D=k.setImmediate,M=k.clearImmediate,V=k.process,G=k.Dispatch,J=k.Function,Y=k.MessageChannel,ce=k.String,ue=0,fe={},X="onreadystatechange";S((function(){f=k.location}));var pe=function(q){if(x(fe,q)){var N=fe[q];delete fe[q],N()}},re=function(q){return function(){pe(q)}},U=function(q){pe(q.data)},ne=function(q){k.postMessage(ce(q),f.protocol+"//"+f.host)};D&&M||(D=function(q){R(arguments.length,1);var N=j(q)?q:J(q),F=L(arguments,1);return fe[++ue]=function(){E(N,void 0,F)},p(ue),ue},M=function(q){delete fe[q]},I?p=function(q){V.nextTick(re(q))}:G&&G.now?p=function(q){G.now(re(q))}:Y&&!A?(b=(g=new Y).port2,g.port1.onmessage=U,p=O(b.postMessage,b)):k.addEventListener&&j(k.postMessage)&&!k.importScripts&&f&&f.protocol!=="file:"&&!S(ne)?(p=ne,k.addEventListener("message",U,!1)):p=X in T("script")?function(q){C.appendChild(T("script"))[X]=function(){C.removeChild(this),pe(q)}}:function(q){setTimeout(re(q),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),p=Math.max,g=Math.min;d.exports=function(b,k){var E=f(b);return E<0?p(E+k,0):g(E,k)}},5397:(d,v,i)=>{var f=i(7055),p=i(7750);d.exports=function(g){return f(p(g))}},1291:(d,v,i)=>{var f=i(741);d.exports=function(p){var g=+p;return g!=g||g===0?0:f(g)}},8014:(d,v,i)=>{var f=i(1291),p=Math.min;d.exports=function(g){var b=f(g);return b>0?p(b,9007199254740991):0}},8981:(d,v,i)=>{var f=i(7750),p=Object;d.exports=function(g){return p(f(g))}},2777:(d,v,i)=>{var f=i(9565),p=i(34),g=i(757),b=i(5966),k=i(4270),E=i(8227),O=TypeError,j=E("toPrimitive");d.exports=function(x,S){if(!p(x)||g(x))return x;var C,L=b(x,j);if(L){if(S===void 0&&(S="default"),C=f(L,x,S),!p(C)||g(C))return C;throw new O("Can't convert object to primitive value")}return S===void 0&&(S="number"),k(x,S)}},6969:(d,v,i)=>{var f=i(2777),p=i(757);d.exports=function(g){var b=f(g,"string");return p(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),p=String;d.exports=function(g){if(f(g)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return p(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),p=0,g=Math.random(),b=f(1 .toString);d.exports=function(k){return"Symbol("+(k===void 0?"":k)+")_"+b(++p+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),p=i(9039);d.exports=f&&p((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),p=i(4901),g=f.WeakMap;d.exports=p(g)&&/native code/.test(String(g))},511:(d,v,i)=>{var f=i(9167),p=i(9297),g=i(1951),b=i(4913).f;d.exports=function(k){var E=f.Symbol||(f.Symbol={});p(E,k)||b(E,k,{value:g.f(k)})}},1951:(d,v,i)=>{var f=i(8227);v.f=f},8227:(d,v,i)=>{var f=i(4475),p=i(5745),g=i(9297),b=i(3392),k=i(4495),E=i(7040),O=f.Symbol,j=p("wks"),x=E?O.for||O:O&&O.withoutSetter||b;d.exports=function(S){return g(j,S)||(j[S]=k&&g(O,S)?O[S]:x("Symbol."+S)),j[S]}},7452:d=>{d.exports=`
|
|
28
|
+
\v\f\r \u2028\u2029\uFEFF`},8706:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(4376),b=i(34),k=i(8981),E=i(6198),O=i(6837),j=i(4659),x=i(1469),S=i(597),C=i(8227),L=i(7388),T=C("isConcatSpreadable"),R=L>=51||!p((function(){var I=[];return I[T]=!1,I.concat()[0]!==I})),A=function(I){if(!b(I))return!1;var D=I[T];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=k(this),ce=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(ce,ue,J[M]);else O(ue+1),j(ce,ue++,J);return ce.length=ue,ce}})},8431:(d,v,i)=>{var f=i(6518),p=i(9213).every;f({target:"Array",proto:!0,forced:!i(4598)("every")},{every:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},2008:(d,v,i)=>{var f=i(6518),p=i(9213).filter;f({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},113:(d,v,i)=>{var f=i(6518),p=i(9213).find,g=i(6469),b="find",k=!0;b in[]&&Array(1)[b]((function(){k=!1})),f({target:"Array",proto:!0,forced:k},{find:function(E){return p(this,E,arguments.length>1?arguments[1]:void 0)}}),g(b)},1629:(d,v,i)=>{var f=i(6518),p=i(235);f({target:"Array",proto:!0,forced:[].forEach!==p},{forEach:p})},3418:(d,v,i)=>{var f=i(6518),p=i(7916);f({target:"Array",stat:!0,forced:!i(4428)((function(g){Array.from(g)}))},{from:p})},4423:(d,v,i)=>{var f=i(6518),p=i(9617).includes,g=i(9039),b=i(6469);f({target:"Array",proto:!0,forced:g((function(){return!Array(1).includes()}))},{includes:function(k){return p(this,k,arguments.length>1?arguments[1]:void 0)}}),b("includes")},5276:(d,v,i)=>{var f=i(6518),p=i(7476),g=i(9617).indexOf,b=i(4598),k=p([].indexOf),E=!!k&&1/k([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?k(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),p=i(6469),g=i(6269),b=i(1181),k=i(4913).f,E=i(1088),O=i(2529),j=i(6395),x=i(3724),S="Array Iterator",C=b.set,L=b.getterFor(S);d.exports=E(Array,"Array",(function(R,A){C(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 T=g.Arguments=g.Array;if(p("keys"),p("values"),p("entries"),!j&&x&&T.name!=="values")try{k(T,"name",{value:"values"})}catch{}},8598:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(7055),b=i(5397),k=i(4598),E=p([].join);f({target:"Array",proto:!0,forced:g!==Object||!k("join",",")},{join:function(O){return E(b(this),O===void 0?",":O)}})},2062:(d,v,i)=>{var f=i(6518),p=i(9213).map;f({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:(d,v,i)=>{var f=i(6518),p=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(k){var E=arguments.length;return p(this,k,E,E>1?arguments[1]:void 0)}})},4490:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(4376),b=p([].reverse),k=[1,2];f({target:"Array",proto:!0,forced:String(k)===String(k.reverse())},{reverse:function(){return g(this)&&(this.length=this.length),b(this)}})},4782:(d,v,i)=>{var f=i(6518),p=i(4376),g=i(3517),b=i(34),k=i(5610),E=i(6198),O=i(5397),j=i(4659),x=i(8227),S=i(597),C=i(7680),L=S("slice"),T=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),ce=k(I,Y),ue=k(D===void 0?Y:D,Y);if(p(J)&&(M=J.constructor,(g(M)&&(M===R||p(M.prototype))||b(M)&&(M=M[T])===null)&&(M=void 0),M===R||M===void 0))return C(J,ce,ue);for(V=new(M===void 0?R:M)(A(ue-ce,0)),G=0;ce<ue;ce++,G++)ce in J&&j(V,G,J[ce]);return V.length=G,V}})},5086:(d,v,i)=>{var f=i(6518),p=i(9213).some;f({target:"Array",proto:!0,forced:!i(4598)("some")},{some:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},6910:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(9306),b=i(8981),k=i(6198),E=i(4606),O=i(655),j=i(9039),x=i(4488),S=i(4598),C=i(8834),L=i(3202),T=i(7388),R=i(9160),A=[],I=p(A.sort),D=p(A.push),M=j((function(){A.sort(void 0)})),V=j((function(){A.sort(null)})),G=S("sort"),J=!j((function(){if(T)return T<70;if(!(C&&C>3)){if(L)return!0;if(R)return R<603;var Y,ce,ue,fe,X="";for(Y=65;Y<76;Y++){switch(ce=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(fe=0;fe<47;fe++)A.push({k:ce+fe,v:ue})}for(A.sort((function(pe,re){return re.v-pe.v})),fe=0;fe<A.length;fe++)ce=A[fe].k.charAt(0),X.charAt(X.length-1)!==ce&&(X+=ce);return X!=="DGBEFHACIJK"}}));f({target:"Array",proto:!0,forced:M||!V||!G||!J},{sort:function(Y){Y!==void 0&&g(Y);var ce=b(this);if(J)return Y===void 0?I(ce):I(ce,Y);var ue,fe,X=[],pe=k(ce);for(fe=0;fe<pe;fe++)fe in ce&&D(X,ce[fe]);for(x(X,(function(re){return function(U,ne){return ne===void 0?-1:U===void 0?1:re!==void 0?+re(U,ne)||0:O(U)>O(ne)?1:-1}})(Y)),ue=k(X),fe=0;fe<ue;)ce[fe]=X[fe++];for(;fe<pe;)E(ce,fe++);return ce}})},4554:(d,v,i)=>{var f=i(6518),p=i(8981),g=i(5610),b=i(1291),k=i(6198),E=i(4527),O=i(6837),j=i(1469),x=i(4659),S=i(4606),C=i(597)("splice"),L=Math.max,T=Math.min;f({target:"Array",proto:!0,forced:!C},{splice:function(R,A){var I,D,M,V,G,J,Y=p(this),ce=k(Y),ue=g(R,ce),fe=arguments.length;for(fe===0?I=D=0:fe===1?(I=0,D=ce-ue):(I=fe-2,D=T(L(b(A),0),ce-ue)),O(ce+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<ce-D;V++)J=V+I,(G=V+D)in Y?Y[J]=Y[G]:S(Y,J);for(V=ce;V>ce-D+I;V--)S(Y,V-1)}else if(I>D)for(V=ce-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,ce-D+I),M}})},1688:(d,v,i)=>{var f=i(6518),p=i(380);f({target:"Date",proto:!0,forced:Date.prototype.toISOString!==p},{toISOString:p})},739:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(8981),b=i(2777);f({target:"Date",proto:!0,arity:1,forced:p((function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1}))},{toJSON:function(k){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),p=i(6840),g=i(3640),b=i(8227)("toPrimitive"),k=Date.prototype;f(k,b)||p(k,b,g)},3288:(d,v,i)=>{var f=i(9504),p=i(6840),g=Date.prototype,b="Invalid Date",k="toString",E=f(g[k]),O=f(g.getTime);String(new Date(NaN))!==b&&p(g,k,(function(){var j=O(this);return j==j?E(this):b}))},4170:(d,v,i)=>{var f=i(6518),p=i(566);f({target:"Function",proto:!0,forced:Function.bind!==p},{bind:p})},2010:(d,v,i)=>{var f=i(3724),p=i(350).EXISTS,g=i(9504),b=i(2106),k=Function.prototype,E=g(k.toString),O=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=g(O.exec);f&&!p&&b(k,"name",{configurable:!0,get:function(){try{return j(O,E(this))[1]}catch{return""}}})},3110:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(8745),b=i(9565),k=i(9504),E=i(9039),O=i(4901),j=i(757),x=i(7680),S=i(6933),C=i(4495),L=String,T=p("JSON","stringify"),R=k(/./.exec),A=k("".charAt),I=k("".charCodeAt),D=k("".replace),M=k(1 .toString),V=/[\uD800-\uDFFF]/g,G=/^[\uD800-\uDBFF]$/,J=/^[\uDC00-\uDFFF]$/,Y=!C||E((function(){var X=p("Symbol")("stringify detection");return T([X])!=="[null]"||T({a:X})!=="{}"||T(Object(X))!=="{}"})),ce=E((function(){return T("\uDF06\uD834")!=='"\\udf06\\ud834"'||T("\uDEAD")!=='"\\udead"'})),ue=function(X,pe){var re=x(arguments),U=S(pe);if(O(U)||X!==void 0&&!j(X))return re[1]=function(ne,q){if(O(U)&&(q=b(U,this,L(ne),q)),!j(q))return q},g(T,null,re)},fe=function(X,pe,re){var U=A(re,pe-1),ne=A(re,pe+1);return R(G,X)&&!R(J,ne)||R(J,X)&&!R(G,U)?"\\u"+M(I(X,0),16):X};T&&f({target:"JSON",stat:!0,arity:3,forced:Y||ce},{stringify:function(X,pe,re){var U=x(arguments),ne=g(Y?ue:T,null,U);return ce&&typeof ne=="string"?D(ne,V,fe):ne}})},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),p=i(6395),g=i(3724),b=i(4475),k=i(9167),E=i(9504),O=i(2796),j=i(9297),x=i(3167),S=i(1625),C=i(757),L=i(2777),T=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=k[V],Y=G.prototype,ce=b.TypeError,ue=E("".slice),fe=E("".charCodeAt),X=O(V,!G(" 0o1")||!G("0b1")||G("+0x1")),pe=function(U){var ne,q=arguments.length<1?0:G((function(N){var F=L(N,"number");return typeof F=="bigint"?F:(function(ie){var ke,_e,Oe,ye,H,K,te,se,de=L(ie,"number");if(C(de))throw new ce("Cannot convert a Symbol value to a number");if(typeof de=="string"&&de.length>2){if(de=M(de),(ke=fe(de,0))===43||ke===45){if((_e=fe(de,2))===88||_e===120)return NaN}else if(ke===48){switch(fe(de,1)){case 66:case 98:Oe=2,ye=49;break;case 79:case 111:Oe=8,ye=55;break;default:return+de}for(K=(H=ue(de,2)).length,te=0;te<K;te++)if((se=fe(H,te))<48||se>ye)return NaN;return parseInt(H,Oe)}}return+de})(F)})(U));return S(Y,ne=this)&&T((function(){D(ne)}))?x(Object(q),this,pe):q};pe.prototype=Y,X&&!p&&(Y.constructor=pe),f({global:!0,constructor:!0,wrap:!0,forced:X},{Number:pe});var re=function(U,ne){for(var q,N=g?R(ne):"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;N.length>F;F++)j(ne,q=N[F])&&!j(U,q)&&I(U,q,A(ne,q))};p&&J&&re(k[V],J),(X||p)&&re(k[V],G)},9868:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(1291),b=i(1240),k=i(2333),E=i(9039),O=RangeError,j=String,x=Math.floor,S=p(k),C=p("".slice),L=p(1 .toFixed),T=function(D,M,V){return M===0?V:M%2==1?T(D,M-1,V*D):T(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),ce=g(D),ue=[0,0,0,0,0,0],fe="",X="0";if(ce<0||ce>20)throw new O("Incorrect fraction digits");if(Y!=Y)return"NaN";if(Y<=-1e21||Y>=1e21)return j(Y);if(Y<0&&(fe="-",Y=-Y),Y>1e-21)if(V=(M=(function(pe){for(var re=0,U=pe;U>=4096;)re+=12,U/=4096;for(;U>=2;)re+=1,U/=2;return re})(Y*T(2,69,1))-69)<0?Y*T(2,-M,1):Y/T(2,M,1),V*=4503599627370496,(M=52-M)>0){for(R(ue,0,V),G=ce;G>=7;)R(ue,1e7,0),G-=7;for(R(ue,T(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),X=I(ue)}else R(ue,0,V),R(ue,1<<-M,0),X=I(ue)+S("0",ce);return ce>0?fe+((J=X.length)<=ce?"0."+S("0",ce-J)+X:C(X,0,J-ce)+"."+C(X,J-ce)):fe+X}})},9085:(d,v,i)=>{var f=i(6518),p=i(4213);f({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},9904:(d,v,i)=>{i(6518)({target:"Object",stat:!0,sham:!i(3724)},{create:i(2360)})},7945:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(6801).f;f({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!p},{defineProperties:g})},4185:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(4913).f;f({target:"Object",stat:!0,forced:Object.defineProperty!==g,sham:!p},{defineProperty:g})},5506:(d,v,i)=>{var f=i(6518),p=i(2357).entries;f({target:"Object",stat:!0},{entries:function(g){return p(g)}})},3851:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(5397),b=i(7347).f,k=i(3724);f({target:"Object",stat:!0,forced:!k||p((function(){b(1)})),sham:!k},{getOwnPropertyDescriptor:function(E,O){return b(g(E),O)}})},1278:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(5031),b=i(5397),k=i(7347),E=i(4659);f({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(O){for(var j,x,S=b(O),C=k.f,L=g(S),T={},R=0;L.length>R;)(x=C(S,j=L[R++]))!==void 0&&E(T,j,x);return T}})},9773:(d,v,i)=>{var f=i(6518),p=i(4495),g=i(9039),b=i(3717),k=i(8981);f({target:"Object",stat:!0,forced:!p||g((function(){b.f(1)}))},{getOwnPropertySymbols:function(E){var O=b.f;return O?O(k(E)):[]}})},875:(d,v,i)=>{var f=i(6518),p=i(9039),g=i(8981),b=i(2787),k=i(2211);f({target:"Object",stat:!0,forced:p((function(){b(1)})),sham:!k},{getPrototypeOf:function(E){return b(g(E))}})},9432:(d,v,i)=>{var f=i(6518),p=i(8981),g=i(1072);f({target:"Object",stat:!0,forced:i(9039)((function(){g(1)}))},{keys:function(b){return g(p(b))}})},287:(d,v,i)=>{i(6518)({target:"Object",stat:!0},{setPrototypeOf:i(2967)})},6099:(d,v,i)=>{var f=i(2140),p=i(6840),g=i(3179);f||p(Object.prototype,"toString",g,{unsafe:!0})},6034:(d,v,i)=>{var f=i(6518),p=i(2357).values;f({target:"Object",stat:!0},{values:function(g){return p(g)}})},8459:(d,v,i)=>{var f=i(6518),p=i(3904);f({global:!0,forced:parseFloat!==p},{parseFloat:p})},8940:(d,v,i)=>{var f=i(6518),p=i(2703);f({global:!0,forced:parseInt!==p},{parseInt:p})},6499:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(9306),b=i(6043),k=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,C=x.reject,L=k((function(){var T=g(j.resolve),R=[],A=0,I=1;E(O,(function(D){var M=A++,V=!1;I++,p(T,j,D).then((function(G){V||(V=!0,R[M]=G,--I||S(R))}),C)})),--I||S(R)}));return L.error&&C(L.value),x.promise}})},2003:(d,v,i)=>{var f=i(6518),p=i(6395),g=i(916).CONSTRUCTOR,b=i(550),k=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)}}),!p&&E(b)){var x=k("Promise").prototype.catch;j.catch!==x&&O(j,"catch",x,{unsafe:!0})}},436:(d,v,i)=>{var f,p,g,b=i(6518),k=i(6395),E=i(9088),O=i(4475),j=i(9565),x=i(6840),S=i(2967),C=i(687),L=i(7633),T=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),ce=i(1181),ue=i(550),fe=i(916),X=i(6043),pe="Promise",re=fe.CONSTRUCTOR,U=fe.REJECTION_EVENT,ne=fe.SUBCLASSING,q=ce.getterFor(pe),N=ce.set,F=ue&&ue.prototype,ie=ue,ke=F,_e=O.TypeError,Oe=O.document,ye=O.process,H=X.f,K=H,te=!!(Oe&&Oe.createEvent&&O.dispatchEvent),se="unhandledrejection",de=function(ge){var ve;return!(!A(ge)||!R(ve=ge.then))&&ve},Ce=function(ge,ve){var we,Re,Ne,it=ve.value,lt=ve.state===1,vt=lt?ge.ok:ge.fail,gt=ge.resolve,$t=ge.reject,Kt=ge.domain;try{vt?(lt||(ve.rejection===2&&et(ve),ve.rejection=1),vt===!0?we=it:(Kt&&Kt.enter(),we=vt(it),Kt&&(Kt.exit(),Ne=!0)),we===ge.promise?$t(new _e("Promise-chain cycle")):(Re=de(we))?j(Re,we,gt,$t):gt(we)):$t(it)}catch(Pt){Kt&&!Ne&&Kt.exit(),$t(Pt)}},Ae=function(ge,ve){ge.notified||(ge.notified=!0,V((function(){for(var we,Re=ge.reactions;we=Re.get();)Ce(we,ge);ge.notified=!1,ve&&!ge.rejection&&Ue(ge)})))},Fe=function(ge,ve,we){var Re,Ne;te?((Re=Oe.createEvent("Event")).promise=ve,Re.reason=we,Re.initEvent(ge,!1,!0),O.dispatchEvent(Re)):Re={promise:ve,reason:we},!U&&(Ne=O["on"+ge])?Ne(Re):ge===se&&G("Unhandled promise rejection",we)},Ue=function(ge){j(M,O,(function(){var ve,we=ge.facade,Re=ge.value;if(Ke(ge)&&(ve=J((function(){E?ye.emit("unhandledRejection",Re,we):Fe(se,we,Re)})),ge.rejection=E||Ke(ge)?2:1,ve.error))throw ve.value}))},Ke=function(ge){return ge.rejection!==1&&!ge.parent},et=function(ge){j(M,O,(function(){var ve=ge.facade;E?ye.emit("rejectionHandled",ve):Fe("rejectionhandled",ve,ge.value)}))},nt=function(ge,ve,we){return function(Re){ge(ve,Re,we)}},We=function(ge,ve,we){ge.done||(ge.done=!0,we&&(ge=we),ge.value=ve,ge.state=2,Ae(ge,!0))},dt=function(ge,ve,we){if(!ge.done){ge.done=!0,we&&(ge=we);try{if(ge.facade===ve)throw new _e("Promise can't be resolved itself");var Re=de(ve);Re?V((function(){var Ne={done:!1};try{j(Re,ve,nt(dt,Ne,ge),nt(We,Ne,ge))}catch(it){We(Ne,it,ge)}})):(ge.value=ve,ge.state=1,Ae(ge,!1))}catch(Ne){We({done:!1},Ne,ge)}}};if(re&&(ke=(ie=function(ge){I(this,ke),T(ge),j(f,this);var ve=q(this);try{ge(nt(dt,ve),nt(We,ve))}catch(we){We(ve,we)}}).prototype,(f=function(ge){N(this,{type:pe,done:!1,notified:!1,parent:!1,reactions:new Y,rejection:!1,state:0,value:void 0})}).prototype=x(ke,"then",(function(ge,ve){var we=q(this),Re=H(D(this,ie));return we.parent=!0,Re.ok=!R(ge)||ge,Re.fail=R(ve)&&ve,Re.domain=E?ye.domain:void 0,we.state===0?we.reactions.add(Re):V((function(){Ce(Re,we)})),Re.promise})),p=function(){var ge=new f,ve=q(ge);this.promise=ge,this.resolve=nt(dt,ve),this.reject=nt(We,ve)},X.f=H=function(ge){return ge===ie||ge===void 0?new p(ge):K(ge)},!k&&R(ue)&&F!==Object.prototype)){g=F.then,ne||x(F,"then",(function(ge,ve){var we=this;return new ie((function(Re,Ne){j(g,we,Re,Ne)})).then(ge,ve)}),{unsafe:!0});try{delete F.constructor}catch{}S&&S(F,ke)}b({global:!0,constructor:!0,wrap:!0,forced:re},{Promise:ie}),C(ie,pe,!1,!0),L(pe)},3362:(d,v,i)=>{i(436),i(6499),i(2003),i(7743),i(1481),i(280)},7743:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(9306),b=i(6043),k=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,C=k((function(){var L=g(j.resolve);E(O,(function(T){p(L,j,T).then(x.resolve,S)}))}));return C.error&&S(C.value),x.promise}})},1481:(d,v,i)=>{var f=i(6518),p=i(6043);f({target:"Promise",stat:!0,forced:i(916).CONSTRUCTOR},{reject:function(g){var b=p.f(this);return(0,b.reject)(g),b.promise}})},280:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(6395),b=i(550),k=i(916).CONSTRUCTOR,E=i(3438),O=p("Promise"),j=g&&!k;f({target:"Promise",stat:!0,forced:g||k},{resolve:function(x){return E(j&&this===O?b:this,x)}})},825:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(8745),b=i(566),k=i(5548),E=i(8551),O=i(34),j=i(2360),x=i(9039),S=p("Reflect","construct"),C=Object.prototype,L=[].push,T=x((function(){function I(){}return!(S((function(){}),[],I)instanceof I)})),R=!x((function(){S((function(){}))})),A=T||R;f({target:"Reflect",stat:!0,forced:A,sham:A},{construct:function(I,D){k(I),E(D);var M=arguments.length<3?I:k(arguments[2]);if(R&&!T)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:C),Y=g(I,J,D);return O(Y)?Y:J}})},888:(d,v,i)=>{var f=i(6518),p=i(9565),g=i(34),b=i(8551),k=i(6575),E=i(7347),O=i(2787);f({target:"Reflect",stat:!0},{get:function j(x,S){var C,L,T=arguments.length<3?x:arguments[2];return b(x)===T?x[S]:(C=E.f(x,S))?k(C)?C.value:C.get===void 0?void 0:p(C.get,T):g(L=O(x))?j(L,S,T):void 0}})},4864:(d,v,i)=>{var f=i(3724),p=i(4475),g=i(9504),b=i(2796),k=i(3167),E=i(6699),O=i(2360),j=i(8480).f,x=i(1625),S=i(788),C=i(655),L=i(1034),T=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),ce=G("match"),ue=p.RegExp,fe=ue.prototype,X=p.SyntaxError,pe=g(fe.exec),re=g("".charAt),U=g("".replace),ne=g("".indexOf),q=g("".slice),N=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,ie=/a/g,ke=new ue(F)!==F,_e=T.MISSED_STICKY,Oe=T.UNSUPPORTED_Y;if(b("RegExp",f&&(!ke||_e||J||Y||I((function(){return ie[ce]=!1,ue(F)!==F||ue(ie)===ie||String(ue(F,"i"))!=="/a/i"}))))){for(var ye=function(te,se){var de,Ce,Ae,Fe,Ue,Ke,et=x(fe,this),nt=S(te),We=se===void 0,dt=[],ge=te;if(!et&&nt&&We&&te.constructor===ye)return te;if((nt||x(fe,te))&&(te=te.source,We&&(se=L(ge))),te=te===void 0?"":C(te),se=se===void 0?"":C(se),ge=te,J&&"dotAll"in F&&(Ce=!!se&&ne(se,"s")>-1)&&(se=U(se,/s/g,"")),de=se,_e&&"sticky"in F&&(Ae=!!se&&ne(se,"y")>-1)&&Oe&&(se=U(se,/y/g,"")),Y&&(Fe=(function(ve){for(var we,Re=ve.length,Ne=0,it="",lt=[],vt=O(null),gt=!1,$t=!1,Kt=0,Pt="";Ne<=Re;Ne++){if((we=re(ve,Ne))==="\\")we+=re(ve,++Ne);else if(we==="]")gt=!1;else if(!gt)switch(!0){case we==="[":gt=!0;break;case we==="(":pe(N,q(ve,Ne+1))&&(Ne+=2,$t=!0),it+=we,Kt++;continue;case(we===">"&&$t):if(Pt===""||D(vt,Pt))throw new X("Invalid capture group name");vt[Pt]=!0,lt[lt.length]=[Pt,Kt],$t=!1,Pt="";continue}$t?Pt+=we:it+=we}return[it,lt]})(te),te=Fe[0],dt=Fe[1]),Ue=k(ue(te,se),et?this:fe,ye),(Ce||Ae||dt.length)&&(Ke=M(Ue),Ce&&(Ke.dotAll=!0,Ke.raw=ye((function(ve){for(var we,Re=ve.length,Ne=0,it="",lt=!1;Ne<=Re;Ne++)(we=re(ve,Ne))!=="\\"?lt||we!=="."?(we==="["?lt=!0:we==="]"&&(lt=!1),it+=we):it+="[\\s\\S]":it+=we+re(ve,++Ne);return it})(te),de)),Ae&&(Ke.sticky=!0),dt.length&&(Ke.groups=dt)),te!==ge)try{E(Ue,"source",ge===""?"(?:)":ge)}catch{}return Ue},H=j(ue),K=0;H.length>K;)R(ye,ue,H[K++]);fe.constructor=ye,ye.prototype=fe,A(p,"RegExp",ye,{constructor:!0})}V("RegExp")},7495:(d,v,i)=>{var f=i(6518),p=i(7323);f({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:(d,v,i)=>{var f=i(350).PROPER,p=i(6840),g=i(8551),b=i(655),k=i(9039),E=i(1034),O="toString",j=RegExp.prototype,x=j[O],S=k((function(){return x.call({source:"a",flags:"b"})!=="/a/b"})),C=f&&x.name!==O;(S||C)&&p(j,O,(function(){var L=g(this);return"/"+b(L.source)+"/"+b(E(L))}),{unsafe:!0})},1699:(d,v,i)=>{var f=i(6518),p=i(9504),g=i(5749),b=i(7750),k=i(655),E=i(1436),O=p("".indexOf);f({target:"String",proto:!0,forced:!E("includes")},{includes:function(j){return!!~O(k(b(this)),k(g(j)),arguments.length>1?arguments[1]:void 0)}})},7764:(d,v,i)=>{var f=i(8183).charAt,p=i(655),g=i(1181),b=i(1088),k=i(2529),E="String Iterator",O=g.set,j=g.getterFor(E);b(String,"String",(function(x){O(this,{type:E,string:p(x),index:0})}),(function(){var x,S=j(this),C=S.string,L=S.index;return L>=C.length?k(void 0,!0):(x=f(C,L),S.index+=x.length,k(x,!1))}))},1761:(d,v,i)=>{var f=i(9565),p=i(9228),g=i(8551),b=i(4117),k=i(8014),E=i(655),O=i(7750),j=i(5966),x=i(7829),S=i(6682);p("match",(function(C,L,T){return[function(R){var A=O(this),I=b(R)?void 0:j(R,C);return I?f(I,R,A):new RegExp(R)[C](E(A))},function(R){var A=g(this),I=E(R),D=T(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,k(A.lastIndex),M)),J++}return J===0?null:G}]}))},5440:(d,v,i)=>{var f=i(8745),p=i(9565),g=i(9504),b=i(9228),k=i(9039),E=i(8551),O=i(4901),j=i(4117),x=i(1291),S=i(8014),C=i(655),L=i(7750),T=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),ce=g("".slice),ue="a".replace(/./,"$0")==="$0",fe=!!/./[D]&&/./[D]("a","$0")==="";b("replace",(function(X,pe,re){var U=fe?"$":"$0";return[function(ne,q){var N=L(this),F=j(ne)?void 0:R(ne,D);return F?p(F,ne,N,q):p(pe,C(N),ne,q)},function(ne,q){var N=E(this),F=C(ne);if(typeof q=="string"&&Y(q,U)===-1&&Y(q,"$<")===-1){var ie=re(pe,N,F,q);if(ie.done)return ie.value}var ke=O(q);ke||(q=C(q));var _e,Oe=N.global;Oe&&(_e=N.unicode,N.lastIndex=0);for(var ye,H=[];(ye=I(N,F))!==null&&(J(H,ye),Oe);)C(ye[0])===""&&(N.lastIndex=T(F,S(N.lastIndex),_e));for(var K,te="",se=0,de=0;de<H.length;de++){for(var Ce,Ae=C((ye=H[de])[0]),Fe=M(V(x(ye.index),F.length),0),Ue=[],Ke=1;Ke<ye.length;Ke++)J(Ue,(K=ye[Ke])===void 0?K:String(K));var et=ye.groups;if(ke){var nt=G([Ae],Ue,Fe,F);et!==void 0&&J(nt,et),Ce=C(f(q,void 0,nt))}else Ce=A(Ae,F,Fe,Ue,et,q);Fe>=se&&(te+=ce(F,se,Fe)+Ce,se=Fe+Ae.length)}return te+ce(F,se)}]}),!!k((function(){var X=/./;return X.exec=function(){var pe=[];return pe.groups={a:"7"},pe},"".replace(X,"$<a>")!=="7"}))||!ue||fe)},1392:(d,v,i)=>{var f,p=i(6518),g=i(7476),b=i(7347).f,k=i(8014),E=i(655),O=i(5749),j=i(7750),x=i(1436),S=i(6395),C=g("".slice),L=Math.min,T=x("startsWith");p({target:"String",proto:!0,forced:!(!S&&!T&&(f=b(String.prototype,"startsWith"),f&&!f.writable)||T)},{startsWith:function(R){var A=E(j(this));O(R);var I=k(L(arguments.length>1?arguments[1]:void 0,A.length)),D=E(R);return C(A,I,I+D.length)===D}})},2762:(d,v,i)=>{var f=i(6518),p=i(3802).trim;f({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return p(this)}})},6412:(d,v,i)=>{i(511)("asyncIterator")},6761:(d,v,i)=>{var f=i(6518),p=i(4475),g=i(9565),b=i(9504),k=i(6395),E=i(3724),O=i(4495),j=i(9039),x=i(9297),S=i(1625),C=i(8551),L=i(5397),T=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),ce=i(6801),ue=i(8773),fe=i(6840),X=i(2106),pe=i(5745),re=i(6119),U=i(421),ne=i(3392),q=i(8227),N=i(1951),F=i(511),ie=i(8242),ke=i(687),_e=i(1181),Oe=i(9213).forEach,ye=re("hidden"),H="Symbol",K="prototype",te=_e.set,se=_e.getterFor(H),de=Object[K],Ce=p.Symbol,Ae=Ce&&Ce[K],Fe=p.RangeError,Ue=p.TypeError,Ke=p.QObject,et=J.f,nt=Y.f,We=V.f,dt=ue.f,ge=b([].push),ve=pe("symbols"),we=pe("op-symbols"),Re=pe("wks"),Ne=!Ke||!Ke[K]||!Ke[K].findChild,it=function(Ie,qe,Be){var ze=et(de,qe);ze&&delete de[qe],nt(Ie,qe,Be),ze&&Ie!==de&&nt(de,qe,ze)},lt=E&&j((function(){return I(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a!==7}))?it:nt,vt=function(Ie,qe){var Be=ve[Ie]=I(Ae);return te(Be,{type:H,tag:Ie,description:qe}),E||(Be.description=qe),Be},gt=function(Ie,qe,Be){Ie===de&>(we,qe,Be),C(Ie);var ze=T(qe);return C(Be),x(ve,ze)?(Be.enumerable?(x(Ie,ye)&&Ie[ye][ze]&&(Ie[ye][ze]=!1),Be=I(Be,{enumerable:A(0,!1)})):(x(Ie,ye)||nt(Ie,ye,A(1,I(null))),Ie[ye][ze]=!0),lt(Ie,ze,Be)):nt(Ie,ze,Be)},$t=function(Ie,qe){C(Ie);var Be=L(qe),ze=D(Be).concat(Ns(Be));return Oe(ze,(function(jt){E&&!g(Kt,Be,jt)||gt(Ie,jt,Be[jt])})),Ie},Kt=function(Ie){var qe=T(Ie),Be=g(dt,this,qe);return!(this===de&&x(ve,qe)&&!x(we,qe))&&(!(Be||!x(this,qe)||!x(ve,qe)||x(this,ye)&&this[ye][qe])||Be)},Pt=function(Ie,qe){var Be=L(Ie),ze=T(qe);if(Be!==de||!x(ve,ze)||x(we,ze)){var jt=et(Be,ze);return!jt||!x(ve,ze)||x(Be,ye)&&Be[ye][ze]||(jt.enumerable=!0),jt}},Is=function(Ie){var qe=We(L(Ie)),Be=[];return Oe(qe,(function(ze){x(ve,ze)||x(U,ze)||ge(Be,ze)})),Be},Ns=function(Ie){var qe=Ie===de,Be=We(qe?we:L(Ie)),ze=[];return Oe(Be,(function(jt){!x(ve,jt)||qe&&!x(de,jt)||ge(ze,ve[jt])})),ze};O||(fe(Ae=(Ce=function(){if(S(Ae,this))throw new Ue("Symbol is not a constructor");var Ie=arguments.length&&arguments[0]!==void 0?R(arguments[0]):void 0,qe=ne(Ie),Be=function(ze){var jt=this===void 0?p:this;jt===de&&g(Be,we,ze),x(jt,ye)&&x(jt[ye],qe)&&(jt[ye][qe]=!1);var Ds=A(1,ze);try{lt(jt,qe,Ds)}catch(hn){if(!(hn instanceof Fe))throw hn;it(jt,qe,Ds)}};return E&&Ne&<(de,qe,{configurable:!0,set:Be}),vt(qe,Ie)})[K],"toString",(function(){return se(this).tag})),fe(Ce,"withoutSetter",(function(Ie){return vt(ne(Ie),Ie)})),ue.f=Kt,Y.f=gt,ce.f=$t,J.f=Pt,M.f=V.f=Is,G.f=Ns,N.f=function(Ie){return vt(q(Ie),Ie)},E&&(X(Ae,"description",{configurable:!0,get:function(){return se(this).description}}),k||fe(de,"propertyIsEnumerable",Kt,{unsafe:!0}))),f({global:!0,constructor:!0,wrap:!0,forced:!O,sham:!O},{Symbol:Ce}),Oe(D(Re),(function(Ie){F(Ie)})),f({target:H,stat:!0,forced:!O},{useSetter:function(){Ne=!0},useSimple:function(){Ne=!1}}),f({target:"Object",stat:!0,forced:!O,sham:!E},{create:function(Ie,qe){return qe===void 0?I(Ie):$t(I(Ie),qe)},defineProperty:gt,defineProperties:$t,getOwnPropertyDescriptor:Pt}),f({target:"Object",stat:!0,forced:!O},{getOwnPropertyNames:Is}),ie(),ke(Ce,H),U[ye]=!0},9463:(d,v,i)=>{var f=i(6518),p=i(3724),g=i(4475),b=i(9504),k=i(9297),E=i(4901),O=i(1625),j=i(655),x=i(2106),S=i(7740),C=g.Symbol,L=C&&C.prototype;if(p&&E(C)&&(!("description"in L)||C().description!==void 0)){var T={},R=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),Y=O(L,this)?new C(J):J===void 0?C():C(J);return J===""&&(T[Y]=!0),Y};S(R,C),R.prototype=L,L.constructor=R;var A=String(C("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(k(T,J))return"";var Y=D(J),ce=A?G(Y,7,-1):V(Y,M,"$1");return ce===""?void 0:ce}}),f({global:!0,constructor:!0,forced:!0},{Symbol:R})}},1510:(d,v,i)=>{var f=i(6518),p=i(7751),g=i(9297),b=i(655),k=i(5745),E=i(1296),O=k("string-to-symbol-registry"),j=k("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 C=p("Symbol")(S);return O[S]=C,j[C]=S,C}})},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),p=i(9297),g=i(757),b=i(6823),k=i(5745),E=i(1296),O=k("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(p(O,j))return O[j]}})},5700:(d,v,i)=>{var f=i(511),p=i(8242);f("toPrimitive"),p()},8125:(d,v,i)=>{var f=i(7751),p=i(511),g=i(687);p("toStringTag"),g(f("Symbol"),"Symbol")},3500:(d,v,i)=>{var f=i(4475),p=i(7400),g=i(9296),b=i(235),k=i(6699),E=function(j){if(j&&j.forEach!==b)try{k(j,"forEach",b)}catch{j.forEach=b}};for(var O in p)p[O]&&E(f[O]&&f[O].prototype);E(g)},2953:(d,v,i)=>{var f=i(4475),p=i(7400),g=i(9296),b=i(3792),k=i(6699),E=i(687),O=i(8227)("iterator"),j=b.values,x=function(C,L){if(C){if(C[O]!==j)try{k(C,O,j)}catch{C[O]=j}if(E(C,L,!0),p[L]){for(var T in b)if(C[T]!==b[T])try{k(C,T,b[T])}catch{C[T]=b[T]}}}};for(var S in p)x(f[S]&&f[S].prototype,S);x(g,"DOMTokenList")},5575:(d,v,i)=>{var f=i(6518),p=i(4475),g=i(9472)(p.setInterval,!0);f({global:!0,bind:!0,forced:p.setInterval!==g},{setInterval:g})},4599:(d,v,i)=>{var f=i(6518),p=i(4475),g=i(9472)(p.setTimeout,!0);f({global:!0,bind:!0,forced:p.setTimeout!==g},{setTimeout:g})},6031:(d,v,i)=>{i(5575),i(4599)}},m={};function y(d){var v=m[d];if(v!==void 0)return v.exports;var i=m[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:()=>bn}),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 p(l){return!(l===null||f(l)!=="object"||l.nodeType||l===l.window||l.constructor&&!O(l.constructor.prototype,"isPrototypeOf"))}function g(l){return p(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]&&p(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 k(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 C(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(C(l)&&C(e))for(var t in e)C(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 T(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,w){if(!(u instanceof w))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 w;u.startsWith(n.jsoneditor.root.path)?w=u:((w=n.path.split("."))[w.length-1]=u,w=w.join("."));var P=e[u];n.checkDependency(w,P)})),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,w=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(P){if(c=n.schema.watch[P],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(".")),w.startsWith(u)&&(n.watchLoop=!0),n.jsoneditor.watch(u,n.watch_listener),n.watched[P]=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),w=null;if(n.download&&(w=n.download),w&&w!==!0&&(w=this.jsoneditor.compileTemplate(w,this.template_engine)),t==="image"){c=this.theme.getBlockLinkHolder(),(e=document.createElement("a")).setAttribute("target","_blank");var P=document.createElement("img");this.theme.createImageLink(c,e,P),this.link_watchers.push((function(B){var z=s(B),Q=u(B);e.setAttribute("href",z),e.setAttribute("title",Q||z),P.setAttribute("src",z)}))}else if(["audio","video"].includes(t)){c=this.theme.getBlockLinkHolder(),(e=this.theme.getBlockLink()).setAttribute("target","_blank");var $=document.createElement(t);$.setAttribute("controls","controls"),this.theme.createMediaLink(c,e,$),this.link_watchers.push((function(B){var z=s(B),Q=u(B);e.setAttribute("href",z),e.textContent=Q||z,$.setAttribute("src",z)}))}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 z=s(B),Q=u(B);z&&(c.style.display=""),c.setAttribute("href",z),c.textContent=Q||z}));return w&&e&&(w===!0?e.setAttribute("download",""):this.link_watchers.push((function(B){e.setAttribute("download",w(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 w=u.schema.enum.indexOf(u.value),P=u.options.enum_titles[w];n.properties[s]={enumTitle:P}}})));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,w,P=(w=2,(function(z){if(Array.isArray(z))return z})(u=s)||(function(z,Q){var ee=z==null?null:typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(ee!=null){var le,be,xe,Pe,$e=[],Me=!0,Ge=!1;try{if(xe=(ee=ee.call(z)).next,Q===0){if(Object(ee)!==ee)return;Me=!1}else for(;!(Me=(le=xe.call(ee)).done)&&($e.push(le.value),$e.length!==Q);Me=!0);}catch(je){Ge=!0,be=je}finally{try{if(!Me&&ee.return!=null&&(Pe=ee.return(),Object(Pe)!==Pe))return}finally{if(Ge)throw be}}return $e}})(u,w)||(function(z,Q){if(z){if(typeof z=="string")return T(z,Q);var ee=Object.prototype.toString.call(z).slice(8,-1);return ee==="Object"&&z.constructor&&(ee=z.constructor.name),ee==="Map"||ee==="Set"?Array.from(z):ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ee)?T(z,Q):void 0}})(u,w)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),$=P[0],B=P[1];B===Object(B)?c[$]=e.expandCallbacks(n,B):typeof B=="string"&&R(t)==="object"&&typeof t[B]=="function"&&(c[$]=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 ce(){return ce=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}},ce.apply(this,arguments)}function ue(l){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ue(l)}function fe(l,r){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},fe(l,r)}var X=(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&&fe(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){ce(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(){ce(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 w=this.control.querySelector("output");w&&(w.value=u)}var P=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),P&&this.onChange(!0,s),{changed:P,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),w=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),w=this.schema.multipleOf),this.input=this.theme.getRangeInput(s,u,w,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 ee=Q.currentTarget.value,le=t.sanitize(ee);ee!==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 ee,le=Q.offsetHeight;if(Q.offsetHeight<Q.scrollHeight)for(ee=0;Q.offsetHeight<Q.scrollHeight+3&&!(ee>100);)ee++,le++,Q.style.height="".concat(le,"px");else{for(ee=0;Q.offsetHeight>=Q.scrollHeight+3&&!(ee>100);)ee++,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 P=(e=this.options.prompt_paste_max_length_reached)!==null&&e!==void 0?e:this.jsoneditor.options.prompt_paste_max_length_reached,$=this.schema.maxLength!==void 0;P&&$&&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 z=this.expandCallbacks("template",{template:this.schema.template});typeof z.template=="function"?this.template=z.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:ce(ue(r.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,ce(ue(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,ce(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),ce(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)),ce(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,w){return w.path===t.path&&u.push(w.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 pe(l){return pe=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},pe(l)}function re(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,U(c.key),c)}}function U(l){var r=(function(n,c){if(pe(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(pe(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return pe(r)=="symbol"?r:r+""}function ne(l,r,n){return r=F(r),(function(c,e){if(e&&(pe(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,q()?Reflect.construct(r,n||[],F(l).constructor):r.apply(l,n))}function q(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(q=function(){return!!l})()}function N(){return N=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}},N.apply(this,arguments)}function F(l){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(l)}function ie(l,r){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ie(l,r)}var ke=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ne(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&&ie(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=N(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",N(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 N(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),N(F(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),N(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),N(F(r.prototype),"destroy",this).call(this)}}])&&re(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);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 Oe(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(_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 H(l,r,n){return r=se(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,K()?Reflect.construct(r,n||[],se(l).constructor):r.apply(l,n))}function K(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(K=function(){return!!l})()}function te(){return te=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=se(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}},te.apply(this,arguments)}function se(l){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},se(l)}function de(l,r){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},de(l,r)}y(2008),y(4554);var Ce=(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&&de(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(){te(se(r.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){te(se(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)})),te(se(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)})),te(se(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(){te(se(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(){te(se(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,te(se(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,w=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 P=this.jsoneditor.createEditor(w,{jsoneditor:this.jsoneditor,schema:s,container:u,path:"".concat(this.path,".").concat(e),parent:this,required:!0});return P.preBuild(),P.build(),P.postBuild(),P.title_controls||(P.array_controls=this.theme.getButtonHolder(),u.appendChild(P.array_controls)),P}},{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,te(se(r.prototype),"destroy",this).call(this)}},{key:"empty",value:function(e){var t=this;if(this.rows!==null){if(this.rows.forEach((function(u,w){e&&(t.checkParent(u.tab)&&u.tab.parentNode.removeChild(u.tab),t.destroyRow(u,!0),t.row_cache[w]=null),t.rows[w]=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($,B){if(e.rows[B])e.rows[B].setValue($,s);else if(e.row_cache[B])e.rows[B]=e.row_cache[B],e.rows[B].setValue($,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 z=e.addRow($,s);e.jsoneditor.trigger("addRow",z)}}));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 w=this.rows.find((function($){return $.tab===e.active_tab})),P=w!==void 0?w.tab:null;!P&&this.rows.length&&(P=this.rows[0].tab),this.active_tab=P,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 w=!(e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,w),t.push(w)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var P=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,P),t.push(P),t.some((function($){return $}))}},{key:"refreshValue",value:function(e){var t=this,s=this.value?this.value.length:0;if(this.value=this.rows.map((function(w){return w.getValue()})),s!==this.value.length||e){var u=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(w,P){if(w.movedown_button){var $=P!==t.rows.length-1;t.setButtonState(w.movedown_button,$)}w.delete_button&&t.setButtonState(w.delete_button,!u),t.value[P]=w.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(P){s.active_tab=s.rows[u].tab,s.refreshTabs(),P.preventDefault(),P.stopPropagation()})),this._supportDragDrop(this.rows[u].tab)):this._supportDragDrop(this.rows[u].container,!0);var w=this.rows[u].title_controls||this.rows[u].array_controls;return this.hide_delete_buttons||(this.rows[u].delete_button=this._createDeleteButton(u,w)),this.show_copy_button&&(this.rows[u].copy_button=this._createCopyButton(u,w)),u&&!this.hide_move_buttons&&(this.rows[u].moveup_button=this._createMoveUpButton(u,w)),this.hide_move_buttons||(this.rows[u].movedown_button=this._createMoveDownButton(u,w)),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(w){if(w.preventDefault(),w.stopPropagation(),!s.askConfirmation())return!1;var P=1*w.currentTarget.getAttribute("data-i"),$=s.getValue().filter((function(Q,ee){return ee!==P})),B=null,z=s.rows[P].getValue();s.setValue($),s.rows[P]?B=s.rows[P].tab:s.rows[P-1]&&(B=s.rows[P-1].tab),B&&(s.active_tab=B,s.refreshTabs()),s.onChange(!0),s.jsoneditor.trigger("deleteRow",z)})),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()]),w=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(P){var $=s.getValue();P.preventDefault(),P.stopPropagation();var B=1*P.currentTarget.getAttribute("data-i");$.forEach((function(z,Q){if(Q===B){if(w.items.type==="string"&&w.items.format==="uuid")z=S();else if(w.items.type==="object"&&w.items.properties)for(var ee=0,le=Object.keys(z);ee<le.length;ee++){var be=le[ee];w.items.properties&&w.items.properties[be]&&w.items.properties[be].format==="uuid"&&(z[be]=S())}$.push(z)}})),s.setValue($),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(w){w.preventDefault(),w.stopPropagation();var P=1*w.currentTarget.getAttribute("data-i");if(!(P<=0)){var $=s.getValue(),B=$[P-1];$[P-1]=$[P],$[P]=B,s.setValue($),s.active_tab=s.rows[P-1].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[P-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(w){w.preventDefault(),w.stopPropagation();var P=1*w.currentTarget.getAttribute("data-i"),$=s.getValue();if(!(P>=$.length-1)){var B=$[P+1];$[P+1]=$[P],$[P]=B,s.setValue($),s.active_tab=s.rows[P+1].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[P+1])}})),t&&t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e,t){var s=this;Ae(e,(function(u,w){var P=s.getValue(),$=P[u];P.splice(u,1),P.splice(w,0,$),s.setValue(P),s.active_tab=s.rows[w].tab,s.refreshTabs(),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[w])}),{useTrigger:t})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&k(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(w){w.preventDefault(),w.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(w.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.row_holder.style.display="none",e.controls.style.display="none",e.setButtonText(w.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,w=e.rows.length;e.row_cache[w]?(u=e.rows[w]=e.row_cache[w],e.rows[w].setValue(e.rows[w].getDefault(),!0),typeof e.rows[w].deactivateNonRequiredProperties=="function"&&e.rows[w].deactivateNonRequiredProperties(!0),e.rows[w].container.style.display="",e.rows[w].tab&&(e.rows[w].tab.style.display=""),e.rows[w].register()):u=e.addRow(),e.active_tab=e.rows[w].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(),w=null,P=u.pop();e.setValue(u),e.rows[e.rows.length-1]&&(w=e.rows[e.rows.length-1].tab),w&&(e.active_tab=w,e.refreshTabs()),e.onChange(!0),e.jsoneditor.trigger("deleteRow",P)})),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(w){w.path===t.path?s.push(w):u.push(w)})),this.error_holder&&(s.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s.forEach((function(w){t.error_holder.appendChild(t.theme.getErrorMessage(w.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(w){return w.showValidationErrors(u)}))}}],c&&Oe(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ae(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,w=s.parentElement.firstElementChild;w!==s&&w!==null;)w=w.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 Ue(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,Ke(c.key),c)}}function Ke(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 et(l,r,n){return r=dt(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,nt()?Reflect.construct(r,n||[],dt(l).constructor):r.apply(l,n))}function nt(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(nt=function(){return!!l})()}function We(){return We=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=dt(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}},We.apply(this,arguments)}function dt(l){return dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dt(l)}function ge(l,r){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ge(l,r)}Ce.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var ve=(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&&ge(e,t)})(r,l),n=r,(c=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){We(dt(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){We(dt(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;We(dt(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||[],w=t.options&&t.options.enum_titles||[];for(e=0;e<s.length;e++)if(this.sanitize(s[e])===s[e]){var P=u[e]||{};"title"in P||(P.title="".concat(w[e]||s[e])),this.option_keys.push("".concat(s[e])),this.option_enum.push(P),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 w=this.theme.getInfoButton(this.translateProperty(this.option_enum[e].infoText));u.appendChild(w)}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(P){return P.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(P){var $=[];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)&&$.push(t.select_values[t.option_keys[e]]);t.updateValue($),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"postBuild",value:function(){We(dt(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 w=this.sanitize(this.select_values[e[u]]);s.push(w),w!==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})),We(dt(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})),We(dt(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){We(dt(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,w){return w.path.match(t)&&u.push(w.message),u}),[]);s.length?this.theme.addInputError(this.input||this.inputs,"".concat(s.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&Ue(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function we(l){return we=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},we(l)}function Re(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,Ne(c.key),c)}}function Ne(l){var r=(function(n,c){if(we(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(we(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return we(r)=="symbol"?r:r+""}function it(l,r,n){return r=gt(r),(function(c,e){if(e&&(we(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,lt()?Reflect.construct(r,n||[],gt(l).constructor):r.apply(l,n))}function lt(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(lt=function(){return!!l})()}function vt(){return vt=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=gt(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}},vt.apply(this,arguments)}function gt(l){return gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gt(l)}function $t(l,r){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},$t(l,r)}var Kt=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),it(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&&$t(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)):vt(gt(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)}vt(gt(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 w=this.sanitize(this.select_values[e[u]]);s.push(w),w!==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(),vt(gt(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),vt(gt(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),vt(gt(r.prototype),"destroy",this).call(this)}}])&&Re(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ve);function Pt(l){return Pt=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},Pt(l)}function Is(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,Ns(c.key),c)}}function Ns(l){var r=(function(n,c){if(Pt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Pt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Pt(r)=="symbol"?r:r+""}function Ie(l,r,n){return r=ze(r),(function(c,e){if(e&&(Pt(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||[],ze(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 Be(){return Be=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=ze(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}},Be.apply(this,arguments)}function ze(l){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ze(l)}function jt(l,r){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},jt(l,r)}var Ds=(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&&jt(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)):Be(ze(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)),Be(ze(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 w=this.sanitize(this.select_values[e[u]]);s.push(w),w!==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)),Be(ze(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)),Be(ze(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Be(ze(r.prototype),"destroy",this).call(this)}}])&&Is(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ve);function hn(l){return hn=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},hn(l)}function Dg(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,Bg(c.key),c)}}function Bg(l){var r=(function(n,c){if(hn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(hn(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return hn(r)=="symbol"?r:r+""}function Fg(l,r,n){return r=qr(r),(function(c,e){if(e&&(hn(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,Ef()?Reflect.construct(r,n||[],qr(l).constructor):r.apply(l,n))}function Ef(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ef=function(){return!!l})()}function ci(){return ci=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}},ci.apply(this,arguments)}function qr(l){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qr(l)}function Ql(l,r){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ql(l,r)}var Mg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Fg(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&&Ql(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)):ci(qr(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(P){var $=t.selectize_instance.getValue();t.updateValue($),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 w=this.theme.getHiddenLabel(this.formname);w.setAttribute("for",this.formname+"-selectized"),u.appendChild(w)}}ci(qr(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 w=this.sanitize(this.select_values[e[u]]);s.push(w),w!==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(),ci(qr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),ci(qr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),ci(qr(r.prototype),"destroy",this).call(this)}}])&&Dg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ve);function Ui(l){return Ui=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},Ui(l)}function Vg(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,qg(c.key),c)}}function qg(l){var r=(function(n,c){if(Ui(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ui(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ui(r)=="symbol"?r:r+""}function zg(l,r,n){return r=Sn(r),(function(c,e){if(e&&(Ui(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,Of()?Reflect.construct(r,n||[],Sn(l).constructor):r.apply(l,n))}function Of(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Of=function(){return!!l})()}function ta(){return ta=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}},ta.apply(this,arguments)}function Sn(l){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sn(l)}function Xl(l,r){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Xl(l,r)}var Hg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),zg(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&&Xl(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)),ta(Sn(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)),ta(Sn(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),ta(Sn(r.prototype),"destroy",this).call(this)}}])&&Vg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);function Gi(l){return Gi=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},Gi(l)}function Ug(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,Gg(c.key),c)}}function Gg(l){var r=(function(n,c){if(Gi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Gi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Gi(r)=="symbol"?r:r+""}function Jg(l,r,n){return r=Cn(r),(function(c,e){if(e&&(Gi(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||[],Cn(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 ra(){return ra=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=Cn(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}},ra.apply(this,arguments)}function Cn(l){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cn(l)}function ec(l,r){return ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ec(l,r)}var Kg=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Jg(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:"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 w in t.parent.schema.properties)u[w]="";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 w=new FileReader;e.setFileReaderListener(w),w.readAsDataURL(s.currentTarget.files[u])}}else{var P=new FileReader;P.onload=function($){e.value=$.target.result,e.refreshPreview(),e.onChange(!0),P=null},P.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),ra(Cn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),ra(Cn(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),ra(Cn(r.prototype),"destroy",this).call(this)}}])&&Ug(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ji(l){return Ji=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},Ji(l)}function Wg(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,Zg(c.key),c)}}function Zg(l){var r=(function(n,c){if(Ji(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ji(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ji(r)=="symbol"?r:r+""}function Yg(l,r,n){return r=Pn(r),(function(c,e){if(e&&(Ji(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,Sf()?Reflect.construct(r,n||[],Pn(l).constructor):r.apply(l,n))}function Sf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Sf=function(){return!!l})()}function na(){return na=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=Pn(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}},na.apply(this,arguments)}function Pn(l){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pn(l)}function tc(l,r){return tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},tc(l,r)}var Cf=(function(l){function r(e,t){var s;return(function(u,w){if(!(u instanceof w))throw new TypeError("Cannot call a class as a function")})(this,r),(s=Yg(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&&tc(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,w){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,na(Pn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,na(Pn(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,na(Pn(r.prototype),"destroy",this).call(this)}}])&&Wg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Ki(l){return Ki=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},Ki(l)}function Qg(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,Xg(c.key),c)}}function Xg(l){var r=(function(n,c){if(Ki(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ki(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Ki(r)=="symbol"?r:r+""}function e_(l,r,n){return r=Er(r),(function(c,e){if(e&&(Ki(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,Pf()?Reflect.construct(r,n||[],Er(l).constructor):r.apply(l,n))}function Pf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Pf=function(){return!!l})()}function Tn(){return Tn=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=Er(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}},Tn.apply(this,arguments)}function Er(l){return Er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Er(l)}function rc(l,r){return rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},rc(l,r)}var t_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),e_(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:"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(){Tn(Er(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Tn(Er(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(){Tn(Er(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,Tn(Er(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,Tn(Er(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),Tn(Er(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 w=e.reduce((function(P,$){return $.path===t.path&&P.push($.message),P}),[]);this.input.controlgroup=this.control,w.length?this.theme.addInputError(this.input,"".concat(w.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&Qg(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Wi(l){return Wi=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},Wi(l)}function r_(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(Wi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Wi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Wi(r)=="symbol"?r:r+""}function i_(l,r,n){return r=Or(r),(function(c,e){if(e&&(Wi(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,Tf()?Reflect.construct(r,n||[],Or(l).constructor):r.apply(l,n))}function Tf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Tf=function(){return!!l})()}function Rn(){return Rn=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=Or(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}},Rn.apply(this,arguments)}function Or(l){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Or(l)}function nc(l,r){return nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},nc(l,r)}y(6910);var ia=(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&&nc(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),w=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;if(this.hasPlaceholderOption||u&&(!t||this.isRequired()||w)||(s=this.enum_values[0]),this.value!==s){var P=this.enum_values.indexOf(s);u&&P!==-1?this.input.value=this.enum_options[P]: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(){Rn(Or(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Rn(Or(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,w=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 P=this.schema.const;this.enum_options=["".concat(P)],this.enum_display=["".concat(this.translateProperty(P)||P)],this.enum_values=[this.typecast(P)]}else if(this.schema.enum){var $=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(B,z){w.enum_options[z]="".concat(B),w.enum_display[z]="".concat(w.translateProperty($[z])||B),w.enum_values[z]=w.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 w=0;w<this.enumSource.length;w++)if(Array.isArray(this.enumSource[w]))s=s.concat(this.enumSource[w]),u=u.concat(this.enumSource[w]);else{var P=[];if(P=Array.isArray(this.enumSource[w].source)?this.enumSource[w].source:e[this.enumSource[w].source]){if(this.enumSource[w].slice&&(P=Array.prototype.slice.apply(P,this.enumSource[w].slice)),this.enumSource[w].filter){var $=[];for(t=0;t<P.length;t++)this.enumSource[w].filter({i:t,item:P[t],watched:e})&&$.push(P[t]);P=$}var B=[],z=[];for(t=0;t<P.length;t++){var Q=P[t];this.enumSource[w].value?z[t]=this.typecast(this.enumSource[w].value({i:t,item:Q})):z[t]=P[t],this.enumSource[w].title?B[t]=this.enumSource[w].title({i:t,item:Q}):B[t]=z[t]}this.enumSource[w].sort&&(function(le,be,xe){le.map((function(Pe,$e){return{v:Pe,t:be[$e]}})).sort((function(Pe,$e){return Pe.v<$e.v?-xe:Pe.v===$e.v?0:xe})).forEach((function(Pe,$e){le[$e]=Pe.v,be[$e]=Pe.t}))}).bind(null,z,B,this.enumSource[w].sort==="desc"?1:-1)(),s=s.concat(z),u=u.concat(B)}}var ee=this.value;this.theme.setSelectOptions(this.input,s,u),this.enum_options=s,this.enum_display=u,this.enum_values=s,s.includes(ee)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=ee,this.value=ee):(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))}Rn(Or(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Rn(Or(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,Rn(Or(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),Rn(Or(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 w=e.reduce((function(P,$){return $.path===t.path&&P.push($.message),P}),[]);w.length?this.theme.addInputError(this.input,"".concat(w.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&r_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Zi(l){return Zi=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},Zi(l)}function o_(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,a_(c.key),c)}}function a_(l){var r=(function(n,c){if(Zi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Zi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Zi(r)=="symbol"?r:r+""}function s_(l,r,n){return r=xr(r),(function(c,e){if(e&&(Zi(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,Rf()?Reflect.construct(r,n||[],xr(l).constructor):r.apply(l,n))}function Rf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Rf=function(){return!!l})()}function Ln(){return Ln=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}},Ln.apply(this,arguments)}function xr(l){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xr(l)}function ic(l,r){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ic(l,r)}var Lf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),s_(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:"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 Ln(xr(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)}Ln(xr(r.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var e=this;if(Ln(xr(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(),Ln(xr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),Ln(xr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Ln(xr(r.prototype),"destroy",this).call(this)}}])&&o_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ia);function ui(l){return ui=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},ui(l)}function l_(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,c_(c.key),c)}}function c_(l){var r=(function(n,c){if(ui(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ui(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ui(r)=="symbol"?r:r+""}function u_(l,r,n){return r=An(r),(function(c,e){if(e&&(ui(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,Af()?Reflect.construct(r,n||[],An(l).constructor):r.apply(l,n))}function Af(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Af=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=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}},oa.apply(this,arguments)}function An(l){return An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},An(l)}function oc(l,r){return oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},oc(l,r)}Lf.rules={".choices > *":"box-sizing:border-box"};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),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&&oc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(oa(An(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&&ui(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 w=this.input.parentNode,P=this.input.nextSibling,$=this.theme.getInputGroup(this.input,t);$!==void 0?(this.options.flatpickr.inline=!1,w.insertBefore($,P),e=$):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")oa(An(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),w=u.getFullYear(),P=this.zeroPad(u.getMonth()+1),$=this.zeroPad(u.getDate()),B=this.zeroPad(u.getHours()),z=this.zeroPad(u.getMinutes()),Q=this.zeroPad(u.getSeconds()),ee=[w,P,$].join("-"),le=[B,z,Q].join(":"),be="".concat(ee,"T").concat(le);this.schema.format==="date"?be=ee:this.schema.format==="time"&&(be=le),this.input.value=be,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(be)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,oa(An(r.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(e){return"0".concat(e).slice(-2)}}])&&l_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);function Yi(l){return Yi=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},Yi(l)}function h_(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(Yi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Yi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Yi(r)=="symbol"?r:r+""}function p_(l,r,n){return r=Sr(r),(function(c,e){if(e&&(Yi(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,$f()?Reflect.construct(r,n||[],Sr(l).constructor):r.apply(l,n))}function $f(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($f=function(){return!!l})()}function $n(){return $n=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=Sr(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}},$n.apply(this,arguments)}function Sr(l){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sr(l)}function ac(l,r){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ac(l,r)}var m_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),p_(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&&ac(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()}$n(Sr(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if($n(Sr(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();$n(Sr(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();$n(Sr(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,w){u&&(e.currentEditor===w?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),w=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:s,container:t,path:this.path,parent:this,required:!0});this.editors.push(w),w.preBuild(),w.build(),w.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(),$n(Sr(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),$n(Sr(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){this.editors.forEach((function(t){t&&t.showValidationErrors(e)}))}}])&&h_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function di(l){return di=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},di(l)}function If(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 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(di(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(di(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return di(r)=="symbol"?r:r+""}function b_(l,r,n){return r=In(r),(function(c,e){if(e&&(di(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,Nf()?Reflect.construct(r,n||[],In(l).constructor):r.apply(l,n))}function Nf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Nf=function(){return!!l})()}function aa(){return aa=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=In(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}},aa.apply(this,arguments)}function In(l){return In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},In(l)}function sc(l,r){return sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},sc(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&&sc(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,aa(In(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.switcher.disabled=!0,aa(In(r.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(e){var t,s,u=this;if(e===null)return"<em>null</em>";if(di(e)==="object"){var w="";return t=e,s=function(P,$){var B=u.getHTML($);Array.isArray(e)||(B="<div><em>".concat(P,"</em>: ").concat(B,"</div>")),w+="<li>".concat(B,"</li>")},Array.isArray(t)||typeof t.length=="number"&&t.length>0&&t.length-1 in t?Array.from(t).forEach((function(P,$){return s($,P)})):Object.entries(t).forEach((function(P){var $,B,z=(B=2,(function(le){if(Array.isArray(le))return le})($=P)||(function(le,be){var xe=le==null?null:typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(xe!=null){var Pe,$e,Me,Ge,je=[],Se=!0,Ye=!1;try{if(Me=(xe=xe.call(le)).next,be===0){if(Object(xe)!==xe)return;Se=!1}else for(;!(Se=(Pe=Me.call(xe)).done)&&(je.push(Pe.value),je.length!==be);Se=!0);}catch(pt){Ye=!0,$e=pt}finally{try{if(!Se&&xe.return!=null&&(Ge=xe.return(),Object(Ge)!==Ge))return}finally{if(Ye)throw $e}}return je}})($,B)||(function(le,be){if(le){if(typeof le=="string")return If(le,be);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)?If(le,be):void 0}})($,B)||(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.`)})()),Q=z[0],ee=z[1];return s(Q,ee)})),w=Array.isArray(e)?"<ol>".concat(w,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(w,"</ul>")}return typeof e=="boolean"?e?"true":"false":typeof e=="string"?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):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),aa(In(r.prototype),"destroy",this).call(this)}}])&&y_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function hi(l){return hi=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},hi(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(hi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(hi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return hi(r)=="symbol"?r:r+""}function k_(l,r,n){return r=Cr(r),(function(c,e){if(e&&(hi(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,Df()?Reflect.construct(r,n||[],Cr(l).constructor):r.apply(l,n))}function Df(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Df=function(){return!!l})()}function Nn(){return Nn=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=Cr(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}},Nn.apply(this,arguments)}function Cr(l){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cr(l)}function lc(l,r){return lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},lc(l,r)}var j_=(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&&lc(e,t)})(r,l),n=r,(c=[{key:"register",value:function(){Nn(Cr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Nn(Cr(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="":hi(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 w=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(w)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Nn(Cr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Nn(Cr(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),Nn(Cr(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)),Nn(Cr(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()}}])&&__(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Qi(l){return Qi=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},Qi(l)}function E_(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,O_(c.key),c)}}function O_(l){var r=(function(n,c){if(Qi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Qi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Qi(r)=="symbol"?r:r+""}function x_(l,r,n){return r=Bs(r),(function(c,e){if(e&&(Qi(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,Bf()?Reflect.construct(r,n||[],Bs(l).constructor):r.apply(l,n))}function Bf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Bf=function(){return!!l})()}function Bs(l){return Bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bs(l)}function cc(l,r){return cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},cc(l,r)}var S_=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),x_(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(){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}}])&&E_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Cf);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 C_(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(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 T_(l,r,n){return r=eo(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,Ff()?Reflect.construct(r,n||[],eo(l).constructor):r.apply(l,n))}function Ff(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ff=function(){return!!l})()}function uc(){return uc=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=eo(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}},uc.apply(this,arguments)}function eo(l){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eo(l)}function dc(l,r){return dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},dc(l,r)}var Mf=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),T_(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&&dc(e,t)})(r,l),n=r,(c=[{key:"build",value:function(){if(uc(eo(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=""))}}])&&C_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);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 R_(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,L_(c.key),c)}}function L_(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 A_(l,r,n){return r=Fs(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,Vf()?Reflect.construct(r,n||[],Fs(l).constructor):r.apply(l,n))}function Vf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Vf=function(){return!!l})()}function Fs(l){return Fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fs(l)}function hc(l,r){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},hc(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),A_(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:"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()}}])&&R_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Mf);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 $_(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(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 N_(l,r,n){return r=no(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,zf()?Reflect.construct(r,n||[],no(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 fc(){return fc=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=no(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}},fc.apply(this,arguments)}function no(l){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(l)}function pc(l,r){return pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},pc(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),N_(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:"preBuild",value:function(){if(fc(no(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||{})}}])&&$_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);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 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(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 M_(l,r,n){return r=Pr(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,Hf()?Reflect.construct(r,n||[],Pr(l).constructor):r.apply(l,n))}function Hf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Hf=function(){return!!l})()}function Dn(){return Dn=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=Pr(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}},Dn.apply(this,arguments)}function Pr(l){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pr(l)}function mc(l,r){return mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},mc(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&&mc(e,t)})(r,l),n=r,(c=[{key:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Dn(Pr(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",Dn(Pr(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)):Dn(Pr(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),Dn(Pr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Dn(Pr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Dn(Pr(r.prototype),"destroy",this).call(this)}}])&&B_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);function q_(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 Uf(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 z_(l,r,n){return(r=Gf(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function Tr(l){return Tr=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},Tr(l)}function sa(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,w,P=[],$=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!($=(t=u.call(e)).done)&&(P.push(t.value),P.length!==c);$=!0);}catch(z){B=!0,s=z}finally{try{if(!$&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(B)throw s}}return P}})(l,r)||yc(l,r)||(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.`)})()}function bt(l){return(function(r){if(Array.isArray(r))return vc(r)})(l)||(function(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)})(l)||yc(l)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function yc(l,r){if(l){if(typeof l=="string")return vc(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)?vc(l,r):void 0}}function vc(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 H_(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,Gf(c.key),c)}}function Gf(l){var r=(function(n,c){if(Tr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Tr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Tr(r)=="symbol"?r:r+""}y(8431),y(7945),y(1278);var Jf=(function(){return l=function n(c,e,t,s){(function(u,w){if(!(u instanceof w))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,w,P){var $=[];if(u.dependentRequired!==void 0){var B=[];Object.keys(u.dependentRequired).forEach((function(z){if(w[z]!==void 0){var Q=u.dependentRequired[z];B=Q.filter((function(ee){return!O(w,ee)}))}})),B.length>0&&$.push({message:"Must have the required properties: "+B.join(", "),path:P})}return $},dependentSchemas:function(u,w,P){var $=this,B=[];return Object.keys(u.dependentSchemas).forEach((function(z){if(w[z]!==void 0){var Q=u.dependentSchemas[z],ee=$._validateSchema(Q,w,P);B=[].concat(bt(B),bt(ee))}})),B},contains:function(u,w,P){var $=this,B=[],z=0;w.forEach((function(ee){$._validateSchema(u.contains,ee,P).length===0&&z++}));var Q=z===0;return u.minContains!==void 0?z<u.minContains&&B.push({message:this.translate("error_minContains",[z,u.minContains],u),path:P}):Q&&B.push({message:this.translate("error_contains",null,u),path:P}),u.maxContains!==void 0&&z>u.maxContains&&B.push({message:this.translate("error_maxContains",[z,u.maxContains],u),path:P}),B},if:function(u,w,P){if(u.then===void 0&&u.else===void 0)return[];var $=this._validateSchema(u.if,w,P),B=[],z=[];return u.then!==void 0&&(B=this._validateSchema(u.then,w,P)),u.else!==void 0&&(z=this._validateSchema(u.else,w,P)),u.if===!0?B:u.if===!1?z:$.length===0?B:$.length>0?z:[]},const:function(u,w,P){return JSON.stringify(u.const)===JSON.stringify(w)?[]:[{path:P,property:"const",message:this.translate("error_const",null,u)}]},enum:function(u,w,P){var $=JSON.stringify(w);return u.enum.some((function(B){return $===JSON.stringify(B)}))?[]:[{path:P,property:"enum",message:this.translate("error_enum",null,u)}]},extends:function(u,w,P){var $=this;return u.extends.reduce((function(B,z){return B.push.apply(B,bt($._validateSchema(z,w,P))),B}),[])},allOf:function(u,w,P){var $=this;return u.allOf.reduce((function(B,z){return B.push.apply(B,bt($._validateSchema(z,w,P))),B}),[])},anyOf:function(u,w,P){var $=this;return u.anyOf.some((function(B){return!$._validateSchema(B,w,P).length}))?[]:[{path:P,property:"anyOf",message:this.translate("error_anyOf",null,u)}]},oneOf:function(u,w,P){var $=this,B=0,z=[];u.oneOf.forEach((function(ee,le){var be=$._validateSchema(ee,w,P);be.length||B++,be.forEach((function(xe){xe.path="".concat(P,".oneOf[").concat(le,"]").concat(xe.path.substr(P.length))})),z.push.apply(z,bt(be))}));var Q=[];return B!==1&&(Q.push({path:P,property:"oneOf",message:this.translate("error_oneOf",[B],u)}),Q.push.apply(Q,z)),Q},not:function(u,w,P){return this._validateSchema(u.not,w,P).length?[]:[{path:P,property:"not",message:this.translate("error_not",null,u)}]},type:function(u,w,P){var $=this;if(Array.isArray(u.type)){if(!u.type.some((function(B){return $._checkType(B,w)})))return[{path:P,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(w)))return[{path:P,property:"type",message:this.translate("error_type",[u.format],u)}]}else if(!this._checkType(u.type,w))return[{path:P,property:"type",message:this.translate("error_type",[u.type],u)}];return[]},disallow:function(u,w,P){var $=this;if(Array.isArray(u.disallow)){if(u.disallow.some((function(B){return $._checkType(B,w)})))return[{path:P,property:"disallow",message:this.translate("error_disallow_union",null,u)}]}else if(this._checkType(u.disallow,w))return[{path:P,property:"disallow",message:this.translate("error_disallow",[u.disallow],u)}];return[]}},this._validateNumberSubSchema={multipleOf:function(u,w,P){return this._validateNumberSubSchemaMultipleDivisible(u,w,P)},divisibleBy:function(u,w,P){return this._validateNumberSubSchemaMultipleDivisible(u,w,P)},maximum:function(u,w,P){var $=u.exclusiveMaximum?w<u.maximum:w<=u.maximum;return window.math?$=window.math[u.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(w),window.math.bignumber(u.maximum)):window.Decimal&&($=new window.Decimal(w)[u.exclusiveMaximum?"lt":"lte"](new window.Decimal(u.maximum))),$?[]:[{path:P,property:"maximum",message:this.translate(u.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[u.maximum],u)}]},minimum:function(u,w,P){var $=u.exclusiveMinimum?w>u.minimum:w>=u.minimum;return window.math?$=window.math[u.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(w),window.math.bignumber(u.minimum)):window.Decimal&&($=new window.Decimal(w)[u.exclusiveMinimum?"gt":"gte"](new window.Decimal(u.minimum))),$?[]:[{path:P,property:"minimum",message:this.translate(u.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[u.minimum],u)}]}},this._validateStringSubSchema={maxLength:function(u,w,P){var $=[];return"".concat(w).length>u.maxLength&&$.push({path:P,property:"maxLength",message:this.translate("error_maxLength",[u.maxLength],u)}),$},minLength:function(u,w,P){return"".concat(w).length<u.minLength?[{path:P,property:"minLength",message:this.translate(u.minLength===1?"error_notempty":"error_minLength",[u.minLength],u)}]:[]},pattern:function(u,w,P){return new RegExp(u.pattern).test(w)?[]:[{path:P,property:"pattern",message:u.options&&u.options.patternmessage?u.options.patternmessage:this.translate("error_pattern",[u.pattern],u)}]}},this._validateArraySubSchema={items:function(u,w,P){var $=this,B=[];if(Array.isArray(u.items))for(var z=0;z<w.length;z++)if(u.items[z])B.push.apply(B,bt(this._validateSchema(u.items[z],w[z],"".concat(P,".").concat(z))));else{if(u.additionalItems===!0)break;if(!u.additionalItems){if(u.additionalItems===!1){B.push({path:P,property:"additionalItems",message:this.translate("error_additionalItems",null,u)});break}break}B.push.apply(B,bt(this._validateSchema(u.additionalItems,w[z],"".concat(P,".").concat(z))))}else w.forEach((function(Q,ee){B.push.apply(B,bt($._validateSchema(u.items,Q,"".concat(P,".").concat(ee))))}));return B},maxItems:function(u,w,P){return w.length>u.maxItems?[{path:P,property:"maxItems",message:this.translate("error_maxItems",[u.maxItems],u)}]:[]},minItems:function(u,w,P){return w.length<u.minItems?[{path:P,property:"minItems",message:this.translate("error_minItems",[u.minItems],u)}]:[]},uniqueItems:function(u,w,P){for(var $={},B=0;B<w.length;B++){var z=JSON.stringify(w[B]);if($[z])return[{path:P,property:"uniqueItems",message:this.translate("error_uniqueItems",null,u)}];$[z]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(u,w,P){return Object.keys(w).length>u.maxProperties?[{path:P,property:"maxProperties",message:this.translate("error_maxProperties",[u.maxProperties],u)}]:[]},minProperties:function(u,w,P){return Object.keys(w).length<u.minProperties?[{path:P,property:"minProperties",message:this.translate("error_minProperties",[u.minProperties],u)}]:[]},required:function(u,w,P){var $=this,B=[];return Array.isArray(u.required)&&u.required.forEach((function(z){if(w[z]===void 0){var Q=$.jsoneditor.getEditor("".concat(P,".").concat(z));Q&&Q.dependenciesFulfilled===!1||Q&&["button","info"].includes(Q.schema.format||Q.schema.type)||B.push({path:P,property:"required",message:$.translate("error_required",[u&&u.properties&&u.properties[z]&&u.properties[z].title?u.properties[z].title:z],u)})}})),B},properties:function(u,w,P,$){var B=this,z=[];return Object.entries(u.properties).forEach((function(Q){var ee=sa(Q,2),le=ee[0],be=ee[1];$[le]=!0,z.push.apply(z,bt(B._validateSchema(be,w[le],"".concat(P,".").concat(le))))})),z},patternProperties:function(u,w,P,$){var B=this,z=[];return Object.entries(u.patternProperties).forEach((function(Q){var ee=sa(Q,2),le=ee[0],be=ee[1],xe=new RegExp(le);Object.entries(w).forEach((function(Pe){var $e=sa(Pe,2),Me=$e[0],Ge=$e[1];xe.test(Me)&&($[Me]=!0,z.push.apply(z,bt(B._validateSchema(be,Ge,"".concat(P,".").concat(Me)))))}))})),z}},this._validateObjectSubSchema2={propertyNames:function(u,w,P,$){for(var B,z=this,Q=[],ee=Object.keys(w),le=null,be=function(){var Pe="";return le=ee[xe],typeof u.propertyNames=="boolean"?u.propertyNames===!0?0:(Q.push({path:P,property:"propertyNames",message:z.translate("error_property_names_false",[le],u)}),1):Object.entries(u.propertyNames).every((function($e){var Me=sa($e,2),Ge=Me[0],je=Me[1],Se=!1;switch(Ge){case"maxLength":if(typeof je!="number"){Pe="error_property_names_maxlength";break}if(le.length>je){Pe="error_property_names_exceeds_maxlength";break}return!0;case"const":if(je!==le){Pe="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(je)){Pe="error_property_names_enum";break}if(je.forEach((function(Ye){Ye===le&&(Se=!0)})),!Se){Pe="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof je!="string"){Pe="error_property_names_pattern";break}if(!new RegExp(je).test(le)){Pe="error_property_names_pattern_mismatch";break}return!0;default:return Q.push({path:P,property:"propertyNames",message:z.translate("error_property_names_unsupported",[Ge],u)}),!1}return Q.push({path:P,property:"propertyNames",message:z.translate(Pe,[le],u)}),!1}))?void 0:1},xe=0;xe<ee.length&&((B=be())===0||B!==1);xe++);return Q},additionalProperties:function(u,w,P,$){for(var B=[],z=Object.keys(w),Q=0;Q<z.length;Q++){var ee=z[Q];if(!$[ee]){if(!u.additionalProperties){B.push({path:P,property:"additionalProperties",message:this.translate("error_additional_properties",[ee],u)});break}if(u.additionalProperties===!0)break;B.push.apply(B,bt(this._validateSchema(u.additionalProperties,w[ee],"".concat(P,".").concat(ee))))}}return B},dependencies:function(u,w,P){var $=this,B=[];return Object.entries(u.dependencies).forEach((function(z){var Q=sa(z,2),ee=Q[0],le=Q[1];w[ee]!==void 0&&(Array.isArray(le)?le.forEach((function(be){w[be]===void 0&&B.push({path:P,property:"dependencies",message:$.translate("error_dependency",[be],u)})})):B.push.apply(B,bt($._validateSchema(le,w,P))))})),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(Tr(n)==="object"&&n!==null){var s=this._getSchema(c);if(s.anyOf){var u,w=(function(le){for(var be=1;be<arguments.length;be++){var xe=arguments[be]!=null?arguments[be]:{};be%2?Uf(Object(xe),!0).forEach((function(Pe){z_(le,Pe,xe[Pe])})):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(xe)):Uf(Object(xe)).forEach((function(Pe){Object.defineProperty(le,Pe,Object.getOwnPropertyDescriptor(xe,Pe))}))}return le})({},t),P=(function(le,be){var xe=typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(!xe){if(Array.isArray(le)||(xe=yc(le))){xe&&(le=xe);var Pe=0,$e=function(){};return{s:$e,n:function(){return Pe>=le.length?{done:!0}:{done:!1,value:le[Pe++]}},e:function(Se){throw Se},f:$e}}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.`)}var Me,Ge=!0,je=!1;return{s:function(){xe=xe.call(le)},n:function(){var Se=xe.next();return Ge=Se.done,Se},e:function(Se){je=!0,Me=Se},f:function(){try{Ge||xe.return==null||xe.return()}finally{if(je)throw Me}}}})(s.anyOf);try{for(P.s();!(u=P.n()).done;){var $=u.value,B=this.fitTest(n,$,e);(B.match>w.match||B.match===w.match&&B.extra<w.extra)&&(w=B)}}catch(le){P.e(le)}finally{P.f()}return w}var z=this._getSchema(c).properties;for(var Q in z)if(O(z,Q)){if(Tr(n[Q])==="object"&&Tr(z[Q])==="object"&&Tr(z[Q].properties)==="object"){var ee=this.fitTest(n[Q],z[Q],e/100);t.match+=ee.match,t.extra+=ee.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,bt(t._validateSubSchema[u].call(t,n,c,e)))})),s.push.apply(s,bt(this._validateByValueType(n,c,e))),n.links&&n.links.forEach((function(u,w){u.rel&&u.rel.toLowerCase()==="describedby"&&(n=t._expandSchemaLink(n,w),s.push.apply(s,bt(t._validateSchema(n,c,e,t.translate))))})),["date","time","datetime-local"].includes(n.format)&&s.push.apply(s,bt(this._validateDateTimeSubSchema(n,c,e))),["uuid"].includes(n.format)&&s.push.apply(s,bt(this._validateUUIDSchema(n,c,e))),s.push.apply(s,bt(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(w){t._validateNumberSubSchema[w]&&s.push.apply(s,bt(t._validateNumberSubSchema[w].call(t,n,c,e)))}));else if(typeof c=="string")Object.keys(n).forEach((function(w){t._validateStringSubSchema[w]&&s.push.apply(s,bt(t._validateStringSubSchema[w].call(t,n,c,e)))}));else if(Array.isArray(c))Object.keys(n).forEach((function(w){t._validateArraySubSchema[w]&&s.push.apply(s,bt(t._validateArraySubSchema[w].call(t,n,c,e)))}));else if(Tr(c)==="object"){var u={};Object.keys(n).forEach((function(w){t._validateObjectSubSchema[w]&&s.push.apply(s,bt(t._validateObjectSubSchema[w].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(w){t._validateObjectSubSchema2[w]!==void 0&&s.push.apply(s,bt(t._validateObjectSubSchema2[w].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(w,P,$){return 1*P<1?[{path:$,property:"format",message:t.translate("error_invalid_epoch",null,w)}]:P!==Math.abs(parseInt(P))?[{path:$,property:"format",message:t.translate("error_".concat(w.format.replace(/-/g,"_")),[u],w)}]:[]})(n,c,e);if(s&&s.flatpickr){if(s)return(function(w,P,$,B){if(P!==""){var z;if(B.flatpickr.config.mode!=="single"){var Q=B.flatpickr.config.mode==="range"?B.flatpickr.l10n.rangeSeparator:", ";z=B.flatpickr.selectedDates.map((function(le){return B.flatpickr.formatDate(le,B.flatpickr.config.dateFormat)})).join(Q)}try{if(z){if(z!==P)throw new Error("".concat(B.flatpickr.config.mode," mismatch"))}else if(B.flatpickr.formatDate(B.flatpickr.parseDate(P,B.flatpickr.config.dateFormat),B.flatpickr.config.dateFormat)!==P)throw new Error("mismatch")}catch{var ee=B.flatpickr.config.errorDateFormat!==void 0?B.flatpickr.config.errorDateFormat:B.flatpickr.config.dateFormat;return[{path:$,property:"format",message:t.translate("error_".concat(B.format.replace(/-/g,"_")),[ee],w)}]}}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,bt(q_.call(this,n,c,e,this.translate)));var u=function(w){s.push.apply(s,bt(w.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)&&Tr(t)==="object"},null:function(t){return t===null}};return typeof n=="string"?!e[n]||e[n](c):!this._validateSchema(n,c).length}}],r&&H_(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function fi(l){return fi=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},fi(l)}function U_(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(fi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(fi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return fi(r)=="symbol"?r:r+""}function J_(l,r,n){return r=Rr(r),(function(c,e){if(e&&(fi(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,Kf()?Reflect.construct(r,n||[],Rr(l).constructor):r.apply(l,n))}function Kf(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Kf=function(){return!!l})()}function Bn(){return Bn=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=Rr(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}},Bn.apply(this,arguments)}function Rr(l){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rr(l)}function bc(l,r){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},bc(l,r)}var K_=(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&&bc(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()}Bn(Rr(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Bn(Rr(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,Bn(Rr(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,Bn(Rr(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,w){var P,$;u&&(t.type===w?(t.keep_only_existing_values&&(P=u.getValue(),$=s,Object.keys($).forEach((function(B){B in P&&(P[B]=$[B])})),s=P),(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,w=this.types[e],P=this.theme.getChildEditorHolder();this.editor_holder.appendChild(P),typeof w=="string"?(s=b({},this.schema)).type=w:(s=b({},this.schema,w),s=this.jsoneditor.expandRefs(s),w&&w.required&&Array.isArray(w.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(s.required=this.schema.required.concat(w.required))),(t=s)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies&&delete s.options.dependencies;var $=this.jsoneditor.getEditorClass(s);this.editors[e]=this.jsoneditor.createEditor($,{jsoneditor:this.jsoneditor,schema:s,container:P,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],P.addEventListener("change_header_text",(function(){u.refreshHeaderText()})),e!==this.type&&(P.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;fi(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,w){var P;e.editors[w]=!1,typeof u=="string"?(P=b({},e.schema)).type=u:(P=b({},e.schema,u),u.required&&Array.isArray(u.required)&&e.schema.required&&Array.isArray(e.schema.required)&&(P.required=e.schema.required.concat(u.required))),e.validators[w]=new Jf(e.jsoneditor,P,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()),Bn(Rr(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,w={match:0,extra:0,i:this.type},P={match:0,i:null};this.validators.forEach((function(z,Q){var ee=null;s.anyOf!==void 0&&s.anyOf&&(ee=z.fitTest(e),(w.match<ee.match||w.match===ee.match&&w.extra>ee.extra)&&((w=ee).i=Q)),z.validate(e).length||P.i!==null?w=P:(P.i=Q,ee!==null&&(P.match=ee.match))}));var $=P.i;this.anyOf!==void 0&&this.anyOf&&P.match<w.match&&($=w.i),this.if&&($=this.getIfType(e)),$===null&&($=this.type),this.type=$,this.switcher.value=this.display_text[$];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),Bn(Rr(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,w){if(u){var P="".concat(t.path,".").concat(s,"[").concat(w,"]");u.showValidationErrors(e.reduce((function($,B){if(B.path.startsWith(P)||B.path===P.substr(0,B.path.length)){var z=b({},B);B.path.startsWith(P)&&(z.path=t.path+z.path.substr(P.length)),$.push(z)}return $}),[]))}}))}else this.editors.forEach((function(u){u&&u.showValidationErrors(e)}))}},{key:"addLinks",value:function(){}}])&&U_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function oo(l){return oo=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},oo(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(oo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(oo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return oo(r)=="symbol"?r:r+""}function Y_(l,r,n){return r=Ms(r),(function(c,e){if(e&&(oo(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||[],Ms(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 Ms(l){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ms(l)}function gc(l,r){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},gc(l,r)}var Q_=(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&&gc(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}}])&&W_(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(D);function Zf(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 ao(l){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Zf(Object(n),!0).forEach((function(c){Vs(l,c,n[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(n)):Zf(Object(n)).forEach((function(c){Object.defineProperty(l,c,Object.getOwnPropertyDescriptor(n,c))}))}return l}function Vs(l,r,n){return(r=Qf(r))in l?Object.defineProperty(l,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[r]=n,l}function so(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,w,P=[],$=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!($=(t=u.call(e)).done)&&(P.push(t.value),P.length!==c);$=!0);}catch(z){B=!0,s=z}finally{try{if(!$&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(B)throw s}}return P}})(l,r)||(function(n,c){if(n){if(typeof n=="string")return Yf(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)?Yf(n,c):void 0}})(l,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
34
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Yf(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 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 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,Qf(c.key),c)}}function Qf(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 e0(l,r,n){return r=lr(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,Xf()?Reflect.construct(r,n||[],lr(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 zr(){return zr=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=lr(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}},zr.apply(this,arguments)}function lr(l){return lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lr(l)}function _c(l,r){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},_c(l,r)}var ep=(function(l){function r(e,t,s){var u;return(function(w,P){if(!(w instanceof P))throw new TypeError("Cannot call a class as a function")})(this,r),(u=e0(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&&_c(e,t)})(r,l),n=r,(c=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){zr(lr(r.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){zr(lr(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),zr(lr(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(),zr(lr(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(Ge,je){var Se=s.editors[Ge].schema.propertyOrder,Ye=s.editors[je].schema.propertyOrder;return typeof Se!="number"&&(Se=1e3),typeof Ye!="number"&&(Ye=1e3),Se-Ye}));var w,P=this.format==="categories",$=[],B=null,z=null;if(this.format==="grid-strict"){var Q=0;if(w=[],this.property_order.forEach((function(Ge){var je=s.editors[Ge];if(!je.property_removed){var Se=je.options.hidden?0:je.options.grid_columns||je.getNumColumns(),Ye=je.options.hidden?0:je.options.grid_offset||0,pt=!je.options.hidden&&(je.options.grid_break||!1),Wt={key:Ge,width:Se,offset:Ye,height:je.options.hidden?0:je.container.offsetHeight};w.push(Wt),$[Q]=w,pt&&(Q++,w=[])}})),this.layout===JSON.stringify($))return!1;for(this.layout=JSON.stringify($),u=document.createElement("div"),e=0;e<$.length;e++)for(w=this.theme.getGridRow(),u.appendChild(w),t=0;t<$[e].length;t++)B=$[e][t].key,(z=this.editors[B]).options.hidden?z.container.style.display="none":this.theme.setGridColumnSize(z.container,$[e][t].width,$[e][t].offset),w.appendChild(z.container)}else if(this.format==="grid"){for(this.property_order.forEach((function(Ge){var je=s.editors[Ge];if(!je.property_removed){for(var Se=!1,Ye=je.options.hidden?0:je.options.grid_columns||je.getNumColumns(),pt=je.options.hidden?0:je.container.offsetHeight,Wt=0;Wt<$.length;Wt++)$[Wt].width+Ye<=12&&(!pt||.5*$[Wt].minh<pt&&2*$[Wt].maxh>pt)&&(Se=Wt);Se===!1&&($.push({width:0,minh:999999,maxh:0,editors:[]}),Se=$.length-1),$[Se].editors.push({key:Ge,width:Ye,height:pt}),$[Se].width+=Ye,$[Se].minh=Math.min($[Se].minh,pt),$[Se].maxh=Math.max($[Se].maxh,pt)}})),e=0;e<$.length;e++)if($[e].width<12){var ee=!1,le=0;for(t=0;t<$[e].editors.length;t++)(ee===!1||$[e].editors[t].width>$[e].editors[ee].width)&&(ee=t),$[e].editors[t].width*=12/$[e].width,$[e].editors[t].width=Math.floor($[e].editors[t].width),le+=$[e].editors[t].width;le<12&&($[e].editors[ee].width+=12-le),$[e].width=12}if(this.layout===JSON.stringify($))return!1;for(this.layout=JSON.stringify($),u=document.createElement("div"),e=0;e<$.length;e++)for(w=this.theme.getGridRow(),u.appendChild(w),t=0;t<$[e].editors.length;t++)B=$[e].editors[t].key,(z=this.editors[B]).options.hidden?z.container.style.display="none":this.theme.setGridColumnSize(z.container,$[e].editors[t].width),w.appendChild(z.container)}else{if(u=document.createElement("div"),P){var be=document.createElement("div"),xe=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Pe=this.theme.getTopTabContentHolder(xe);for(this.property_order.forEach((function(Ge){var je=s.editors[Ge];if(!je.property_removed){var Se=s.theme.getTabContent(),Ye=je.schema&&(je.schema.type==="object"||je.schema.type==="array");Se.isObjOrArray=Ye;var pt=s.theme.getGridRow();je.tab||(s.basicPane===void 0?s.addRow(je,xe,Se):s.addRow(je,xe,s.basicPane)),Se.id=s.getValidId(je.tab_text.textContent),Ye?(Se.appendChild(pt),Pe.appendChild(Se),s.theme.addTopTab(xe,je.tab)):(be.appendChild(pt),Pe.childElementCount>0?Pe.firstChild.isObjOrArray&&(Se.appendChild(be),Pe.insertBefore(Se,Pe.firstChild),s.theme.insertBasicTopTab(je.tab,xe),je.basicPane=Se):(Se.appendChild(be),Pe.appendChild(Se),s.theme.addTopTab(xe,je.tab),je.basicPane=Se)),je.options.hidden?je.container.style.display="none":s.theme.setGridColumnSize(je.container,12),pt.appendChild(je.container),je.rowPane=Se}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var $e=this.tabs_holder.parentNode;$e.removeChild($e.firstChild),$e.appendChild(xe),this.tabPanesContainer=Pe,this.tabs_holder=xe;var Me=this.theme.getFirstTab(this.tabs_holder);return void(Me&&k(Me,"click"))}this.property_order.forEach((function(Ge){var je=s.editors[Ge];je.property_removed||(w=s.theme.getGridRow(),u.appendChild(w),je.options.hidden?je.container.style.display="none":s.theme.setGridColumnSize(je.container,12),w.appendChild(je.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(w){new RegExp(w).test(e)&&(s.allOf=s.allOf||[],s.allOf.push(t.schema.patternProperties[w]),u=!0)})),!u&&this.schema.additionalProperties&&fn(this.schema.additionalProperties)==="object"&&(s=b({},this.schema.additionalProperties)),s}},{key:"preBuild",value:function(){var e=this;if(zr(lr(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=so(t,2),u=s[0],w=s[1],P=e.jsoneditor.getEditorClass(w);e.editors[u]=e.jsoneditor.createEditor(P,{jsoneditor:e.jsoneditor,schema:w,path:"".concat(e.path,".").concat(u),parent:e,compact:!0,required:!0},e.currentDepth+1),e.editors[u].preBuild();var $=e.editors[u].options.hidden?0:e.editors[u].options.grid_columns||e.editors[u].getNumColumns();e.minwidth+=$,e.maxwidth+=$})),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,w=e.editors[s].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof w!="number"&&(w=1e3),u-w}))}},{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,w=e.schema.type==="object"||e.schema.type==="array";this.rows[u]=e,this.rows[u].rowPane=s,w?(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(w){w.tab&&w.rowPane&&w.rowPane.parentNode&&(s&&w.tab===t.rows[t.basicTab].tab&&u||(e?w.tab_text.textContent=w.getHeaderText():(s&&w.tab===t.rows[t.basicTab].tab&&(u=!0),w.tab===t.active_tab?t.theme.markTabActive(w):t.theme.markTabInactive(w))))}))}},{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 w=so(u,2),P=w[0],$=w[1],B=e.theme.getTableCell();e.editor_holder.appendChild(B),$.setContainer(B),$.build(),$.postBuild(),$.setOptInCheckbox($.header),$.setValue($.getDefault(),!0),e.editors[P].options.hidden&&(B.style.display="none"),e.editors[P].options.input_width&&(B.style.width=e.editors[P].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 w=e.editors[e.addproperty_input.value].key,P=e.editors[e.addproperty_input.value].type,$=e.editors[e.addproperty_input.value].path;e.onChange(!0,!1,{event:"add",data:{key:w,type:P,path:$}})}})),this.addproperty_input.addEventListener("input",(function(u){u.target.previousSibling.previousSibling.childNodes.forEach((function(w){var P=w.innerText,$=u.target.value;e.options.case_sensitive_property_search||e.jsoneditor.options.case_sensitive_property_search||(P=P.toLowerCase(),$=$.toLowerCase()),P.includes($)?w.style.display="":w.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 w=e.theme.getTabContent(),P=e.theme.getGridColumn(),$=!(!u.schema||u.schema.type!=="object"&&u.schema.type!=="array");if(w.isObjOrArray=$,t){if($){var B=e.theme.getGridContainer();B.appendChild(P),w.appendChild(B),e.tabPanesContainer.appendChild(w),e.row_container=B}else e.row_container_basic===void 0&&(e.row_container_basic=e.theme.getGridContainer(),w.appendChild(e.row_container_basic),e.tabPanesContainer.childElementCount===0?e.tabPanesContainer.appendChild(w):e.tabPanesContainer.insertBefore(w,e.tabPanesContainer.childNodes[1])),e.row_container_basic.appendChild(P);e.addRow(u,e.tabs_holder,w),w.id=e.getValidId(u.schema.title)}else e.row_container.appendChild(P);u.setContainer(P),u.build(),u.postBuild(),u.setOptInCheckbox(u.header)})),this.rows[0]&&k(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&&k(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,w=u&&this.options.show_opt_in===!0,P=u&&this.options.show_opt_in===!1;(w||!P&&s||!u&&s)&&Object.entries(this.editors).forEach((function($){var B=so($,2),z=B[0],Q=B[1];t.isRequiredObject(Q)||t.editors[z].deactivate(),e&&typeof t.editors[z].deactivateNonRequiredProperties=="function"&&t.editors[z].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 w=0;w<s.childNodes.length;w++){var P=s.childNodes[w];if(t.propertyOrder<P.propertyOrder){this.addproperty_list.insertBefore(t,P),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 w=this.theme.getCheckboxLabel(t),P=this.theme.getFormControl(w,u,null,null,this.path+"-"+e);return P.style.paddingBottom=P.style.marginBottom=P.style.paddingTop=P.style.marginTop=0,P.style.height="auto",this.insertPropertyControlUsingPropertyOrder(e,P,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 ao(ao({},t),{},Vs({},s,{}));case"additionalProperties":case"propertyNames":return ao(ao({},t),{},Vs({},s,!0));default:return ao(ao({},t),{},Vs({},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($){return new RegExp($).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),w=this.jsoneditor.options.max_depth;if(this.editors[e]=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:w&&this.currentDepth>=w?this.getSchemaOnMaxDepth(s):s,path:"".concat(this.path,".").concat(e),parent:this},this.currentDepth+1),this.editors[e].preBuild(),!t){var P=this.theme.getChildEditorHolder();this.editor_holder.appendChild(P),this.editors[e].setContainer(P),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(),zr(lr(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:fn(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),zr(lr(r.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var e=zr(lr(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(w){var P=so(w,2),$=(P[0],P[1]);$.key===s&&(u=$)})),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(w){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(w){e.addPropertyCheckbox(w),e.isRequiredObject(e.cached_editors[w])&&w in e.editors&&(e.addproperty_checkboxes[w].disabled=!0),e.schema.minProperties!==void 0&&s<=e.schema.minProperties?(e.addproperty_checkboxes[w].disabled=e.addproperty_checkboxes[w].checked,e.addproperty_checkboxes[w].checked||(u=!0)):w in e.editors?u=!0:t||O(e.schema.properties,w)?(e.addproperty_checkboxes[w].disabled=!1,u=!0):e.addproperty_checkboxes[w].disabled=!0})),this.canHaveAdditionalProperties()&&(u=!0),Object.keys(this.schema.properties).forEach((function(w){e.cached_editors[w]||(u=!0,e.addPropertyCheckbox(w))})),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;(fn(e=(e=this.applyConstFilter(e))||{})!=="object"||Array.isArray(e))&&(e={}),Object.entries(this.cached_editors).forEach((function(u){var w=so(u,2),P=w[0],$=w[1];e[P]!==void 0?(s.addObjectProperty(P),$.setValue(e[P],t),$.activate(),s.disabled&&$.disable()):t||s.isRequiredObject($)?$.setValue($.getDefault(),t):s.jsoneditor.options.show_opt_in||s.options.show_opt_in?$.deactivate():s.removeObjectProperty(P)})),Object.entries(e).forEach((function(u){var w=so(u,2),P=w[0],$=w[1];s.cached_editors[P]||(s.addObjectProperty(P),s.editors[P]&&s.editors[P].setValue($,t,!!s.editors[P].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(e){var t=this,s=[],u=[];e.forEach((function(w){w.path===t.path?s.push(w):u.push(w)})),this.error_holder&&(s.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s.forEach((function(w){w.errorcount&&w.errorcount>1&&(w.message+=" (".concat(w.errorcount," errors)")),t.error_holder.appendChild(t.theme.getErrorMessage(w.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(w){w.showValidationErrors(u)}))}}])&&X_(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 t0(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,r0(c.key),c)}}function r0(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 n0(l,r,n){return r=pn(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,tp()?Reflect.construct(r,n||[],pn(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 co(){return co=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=pn(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}},co.apply(this,arguments)}function pn(l){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pn(l)}function wc(l,r){return wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},wc(l,r)}ep.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 i0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),n0(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:"preBuild",value:function(){co(pn(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(z){e.setValue(z.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 w=this.theme.getFormRadioLabel(this.enum_display[s]);w.htmlFor=this.input.id;var P=this.theme.getFormRadioControl(w,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(P)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var $=0;$<this.radioGroup.length;$++)this.radioGroup[$].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"),co(pn(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"),co(pn(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),co(pn(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()}}])&&t0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ia);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 o0(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,a0(c.key),c)}}function a0(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 s0(l,r,n){return r=Lr(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,rp()?Reflect.construct(r,n||[],Lr(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 Fn(){return Fn=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=Lr(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}},Fn.apply(this,arguments)}function Lr(l){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lr(l)}function kc(l,r){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},kc(l,r)}var l0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),s0(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:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Fn(Lr(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",Fn(Lr(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 Fn(Lr(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),Fn(Lr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Fn(Lr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Fn(Lr(r.prototype),"destroy",this).call(this)}}])&&o0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);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 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(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 d0(l,r,n){return r=Hr(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,np()?Reflect.construct(r,n||[],Hr(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 pi(){return pi=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=Hr(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}},pi.apply(this,arguments)}function Hr(l){return Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hr(l)}function jc(l,r){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},jc(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&&jc(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 pi(Hr(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)}pi(Hr(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)),pi(Hr(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)),pi(Hr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),pi(Hr(r.prototype),"destroy",this).call(this)}}])&&c0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ia);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 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(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 m0(l,r,n){return r=Ar(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,ip()?Reflect.construct(r,n||[],Ar(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 Mn(){return Mn=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}},Mn.apply(this,arguments)}function Ar(l){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ar(l)}function Ec(l,r){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Ec(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&&Ec(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 Mn(Ar(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)}Mn(Ar(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;Mn(Ar(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(),Mn(Ar(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),Mn(Ar(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Mn(Ar(r.prototype),"destroy",this).call(this)}}])&&f0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(ia);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 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,b0(c.key),c)}}function b0(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 g0(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,op()?Reflect.construct(r,n||[],qs(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 qs(l){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qs(l)}function Oc(l,r){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Oc(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),g0(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:"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 w=document.createElement("div"),P=document.createElement("button");P.classList.add("tiny","button"),P.innerHTML="Clear signature",w.appendChild(P),s.appendChild(w),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}))),P.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 $=document.createElement("p");$.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild($)}}},{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}}])&&v0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);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 w0(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,k0(c.key),c)}}function k0(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 j0(l,r,n){return r=$r(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,ap()?Reflect.construct(r,n||[],$r(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 Vn(){return Vn=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}},Vn.apply(this,arguments)}function $r(l){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$r(l)}function xc(l,r){return xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},xc(l,r)}y(6031);var E0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),j0(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:"setValue",value:function(e,t,s){e=this.applyConstFilter(e);var u=Vn($r(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",Vn($r(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)):Vn($r(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),Vn($r(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Vn($r(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Vn($r(r.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(e,t){var s=this,u=function w(){e.display.wrapper.offsetHeight?(s.stopListening(e,t),e.display.lastWrapHeight!==e.display.wrapper.clientHeight&&e.refresh()):t.timeout=window.setTimeout(w,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)}}])&&w0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);function yo(l){return yo=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},yo(l)}function O0(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,x0(c.key),c)}}function x0(l){var r=(function(n,c){if(yo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(yo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return yo(r)=="symbol"?r:r+""}function S0(l,r,n){return r=mi(r),(function(c,e){if(e&&(yo(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||[],mi(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 zs(){return zs=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=mi(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}},zs.apply(this,arguments)}function mi(l){return mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mi(l)}function Sc(l,r){return Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Sc(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),S0(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&&Sc(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)},w=this.enum_values.length-1;w>-1;w--){var P=this.formname+(w+1),$=this.theme.getFormInputField("radio");$.name="".concat(this.formname,"[starrating]"),$.value=this.enum_values[w],$.id=P,$.addEventListener("change",u,!1),this.radioGroup.push($);var B=document.createElement("label");B.htmlFor=P,B.title=this.enum_values[w],this.options.displayValue&&B.classList.add("starrating-display-enabled");var z=this.theme.getHiddenText("label");z.textContent=w,B.appendChild(z),this.ratingContainer.appendChild($),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 ee=this.theme.getContainer();ee.appendChild(this.ratingContainer),this.input=ee,this.control=this.theme.getFormControl(this.label,ee,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),zs(mi(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}zs(mi(r.prototype),"setValue",this).call(this,this.value)}}])&&O0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X);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 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,P0(c.key),c)}}function P0(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 T0(l,r,n){return r=qn(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,cp()?Reflect.construct(r,n||[],qn(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 la(){return la=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=qn(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}},la.apply(this,arguments)}function qn(l){return qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qn(l)}function Cc(l,r){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Cc(l,r)}lp.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 R0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),T0(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(){la(qn(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(){la(qn(r.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){la(qn(r.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&C0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(qf);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 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,A0(c.key),c)}}function A0(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 $0(l,r,n){return r=Ur(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,up()?Reflect.construct(r,n||[],Ur(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 yi(){return yi=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=Ur(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}},yi.apply(this,arguments)}function Ur(l){return Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ur(l)}function Pc(l,r){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Pc(l,r)}var I0=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),$0(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:"register",value:function(){if(yi(Ur(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(yi(Ur(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,yi(Ur(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 w=this.theme.getTableHeaderCell(t[s[u]].getTitle());t[s[u]].options.hidden&&(w.style.display="none"),this.header_row.appendChild(w)}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(),yi(Ur(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),w=this.row_holder.appendChild(this.theme.getTableRow()),P=w;this.item_has_child_editors||(P=this.theme.getTableCell(),w.appendChild(P));var $=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:s,container:P,path:"".concat(this.path,".").concat(e),parent:this,compact:!0,table_row:!0});return $.preBuild(),t||($.build(),$.postBuild(),$.controls_cell=w.appendChild(this.theme.getTableCell()),$.row=w,$.table_controls=this.theme.getButtonHolder(),$.controls_cell.appendChild($.table_controls),$.table_controls.style.margin=0,$.table_controls.style.padding=0),$}},{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,yi(Ur(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($,B){e.rows[B]?e.rows[B].setValue($):(e.addRow($),u=!0)}));for(var w=t.length;w<this.rows.length;w++){var P=this.rows[w].container;this.item_has_child_editors||this.rows[w].row.parentNode.removeChild(this.rows[w].row),this.rows[w].destroy(),P.parentNode&&P.parentNode.removeChild(P),this.rows[w]=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,ee){if(Q.delete_button){var le=!t;e.setButtonState(Q.delete_button,le),u.push(le)}if(Q.copy_button){var be=!s;e.setButtonState(Q.copy_button,be),u.push(be)}if(Q.moveup_button){var xe=ee!==0;e.setButtonState(Q.moveup_button,xe),u.push(xe)}if(Q.movedown_button){var Pe=ee!==e.rows.length-1;e.setButtonState(Q.movedown_button,Pe),u.push(Pe)}}));var w=u.some((function(Q){return Q}));this.rows.forEach((function(Q){return e.setButtonState(Q.controls_cell,w)})),this.setButtonState(this.controls_header_cell,w),this.setButtonState(this.table,this.value.length);var P=!(s||this.hide_add_button);this.setButtonState(this.add_row_button,P);var $=!(!this.value.length||t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,$);var B=!(this.value.length<=1||t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,B);var z=P||$||B;this.setButtonState(this.controls,z)}},{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(w){if(w.preventDefault(),w.stopPropagation(),!s.askConfirmation())return!1;var P=1*w.currentTarget.getAttribute("data-i"),$=s.getValue(),B=s.getValue()[P];$.splice(P,1),s.setValue($),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"),w=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",e),u.addEventListener("click",(function(P){P.preventDefault(),P.stopPropagation();var $=1*P.currentTarget.getAttribute("data-i"),B=s.getValue(),z=B[$];w.items.type==="string"&&w.items.format==="uuid"?z=S():w.items.type==="object"&&w.items.properties&&B.forEach((function(Q,ee){if($===ee)for(var le=0,be=Object.keys(Q);le<be.length;le++){var xe=be[le];w.items.properties&&w.items.properties[xe]&&w.items.properties[xe].format==="uuid"&&((z=Object.assign({},B[$]))[xe]=S())}})),B.splice($+1,0,z),s.setValue(B),s.onChange(!0),s.jsoneditor.trigger("copyRow",s.rows[$+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(w){w.preventDefault(),w.stopPropagation();var P=1*w.currentTarget.getAttribute("data-i"),$=s.getValue();$.splice(P-1,0,$.splice(P,1)[0]),s.setValue($),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[P-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(w){w.preventDefault(),w.stopPropagation();var P=1*w.currentTarget.getAttribute("data-i"),$=s.getValue();$.splice(P+1,0,$.splice(P,1)[0]),s.setValue($),s.onChange(!0),s.jsoneditor.trigger("moveRow",s.rows[P+1])})),t.appendChild(u),u}},{key:"_supportDragDrop",value:function(e){var t=this;Ae(e,(function(s,u){var w=t.getValue(),P=w[s];w.splice(s,1),w.splice(u,0,P),t.setValue(w),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&&k(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(),w=u.pop();e.setValue(u),e.onChange(!0),e.jsoneditor.trigger("deleteRow",w)})),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&&L0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(Ce);function go(l){return go=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},go(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,D0(c.key),c)}}function D0(l){var r=(function(n,c){if(go(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(go(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return go(r)=="symbol"?r:r+""}function B0(l,r,n){return r=zn(r),(function(c,e){if(e&&(go(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,dp()?Reflect.construct(r,n||[],zn(l).constructor):r.apply(l,n))}function dp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(dp=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=zn(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 zn(l){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zn(l)}function Tc(l,r){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Tc(l,r)}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 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(_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 V0(l,r,n){return r=Hn(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,hp()?Reflect.construct(r,n||[],Hn(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 ua(){return ua=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=Hn(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}},ua.apply(this,arguments)}function Hn(l){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hn(l)}function Rc(l,r){return Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Rc(l,r)}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 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,z0(c.key),c)}}function z0(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 H0(l,r,n){return r=Gr(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,fp()?Reflect.construct(r,n||[],Gr(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 vi(){return vi=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=Gr(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}},vi.apply(this,arguments)}function Gr(l){return Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gr(l)}function Lc(l,r){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Lc(l,r)}y(9868);var Hs={ace:ke,array:Ce,arrayChoices:Kt,arraySelect2:Ds,arraySelectize:Mg,autocomplete:Hg,base64:Kg,button:Cf,checkbox:t_,choices:Lf,datetime:d_,describedBy:m_,enum:g_,hidden:j_,info:S_,integer:qf,ip:D_,jodit:V_,multiple:K_,multiselect:ve,null:Q_,number:Mf,object:ep,radio:i0,sceditor:l0,select:ia,select2:h0,selectize:y0,signature:_0,simplemde:E0,starrating:lp,stepper:R0,string:X,table:I0,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),B0(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&&Tc(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,w,P,$){window.alert('No upload_handler defined for "'.concat(u.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(typeof this.options.upload_handler!="function")throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),this.options.enable_drag_drop===!0&&this.options.hide_input===!0||(this.clickHandler=function(u){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 w=u.target.files||u.dataTransfer.files;if(w&&w.length)if(e.options.max_upload_size!==0&&w[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(w[0].type,e.options.mime_type)){e.fileDisplay&&(e.fileDisplay.value=w[0].name);var P=new window.FileReader;P.onload=function($){e.preview_value=$.target.result,e.refreshPreview(w),e.onChange(!0),P=null},P.readAsDataURL(w[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 w=u.dataTransfer.items||u.dataTransfer.files,P=w&&w.length&&(e.options.mime_type.length===0||e.isValidMimeType(w[0].type,e.options.mime_type)),$=u.currentTarget.classList&&u.currentTarget.classList.contains("upload-dropzone")&&P;switch((u.currentTarget===window?"w_":"e_")+u.type){case"w_drop":case"w_dragover":$||(u.dataTransfer.dropEffect="none");break;case"e_dragenter":$?(e.dropZone.classList.add("valid-dropzone"),u.dataTransfer.dropEffect="copy"):e.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":$&&(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"),$&&e.uploadHandler(u)}$||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 w=Math.floor(Math.log(s.size)/Math.log(1024));s.formattedSize="".concat(parseFloat((s.size/Math.pow(1024,w)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][w])}else s.formattedSize="0 Bytes";var P=this.getButton("button_upload","upload","button_upload");P.addEventListener("click",(function($){$.preventDefault(),P.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),P.removeAttribute("disabled")},failure:function(B){t.theme.addInputError(t.uploader,B),t.progressBar&&t.preview.removeChild(t.progressBar),P.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,P,this.preview_value)),this.options.auto_upload&&(P.dispatchEvent(new window.MouseEvent("click")),P.parentNode.removeChild(P))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),ca(zn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),ca(zn(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),ca(zn(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)}}])&&N0(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),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&&Rc(e,t)})(r,l),n=r,(c=[{key:"preBuild",value:function(){ua(Hn(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(){ua(Hn(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,ua(Hn(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)}}])&&F0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X),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),H0(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:"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=vi(Gr(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(){vi(Gr(r.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(vi(Gr(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(vi(Gr(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),vi(Gr(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(w){var P=t.picker_instance.settings.editorFormat,$=t.picker_instance.settings.alpha;t.setValue(P==="hex"?$?w.hex:w.hex.slice(0,7):w["".concat(P+($?"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="")}}])&&q0(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(X)};function pp(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 mp={},Ac="en",U0=Ac;mp.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(Hs).forEach((function(l){var r=(function(e,t){return(function(s){if(Array.isArray(s))return s})(e)||(function(s,u){var w=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(w!=null){var P,$,B,z,Q=[],ee=!0,le=!1;try{if(B=(w=w.call(s)).next,u!==0)for(;!(ee=(P=B.call(w)).done)&&(Q.push(P.value),Q.length!==u);ee=!0);}catch(be){le=!0,$=be}finally{try{if(!ee&&w.return!=null&&(z=w.return(),Object(z)!==z))return}finally{if(le)throw $}}return Q}})(e,t)||(function(s,u){if(s){if(typeof s=="string")return pp(s,u);var w=Object.prototype.toString.call(s).slice(8,-1);return w==="Object"&&s.constructor&&(w=s.constructor.name),w==="Map"||w==="Set"?Array.from(s):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?pp(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.`)})()})(l,2),n=r[0],c=r[1];Hs[n].options=c.options||{}}));var bi={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:Hs,languages:mp,resolvers:v,custom_validators:[],default_language:Ac,language:U0,translate:function(l,r,n){var c={};n&&n.options&&n.options.error_messages&&n.options.error_messages[bi.language]&&(c=n.options.error_messages[bi.language]);var e=bi.languages[bi.language];if(!e)throw new Error("Unknown language ".concat(bi.language));var t=c[l]||e[l]||bi.languages[Ac][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 gi(){gi=function(){return r};var l,r={},n=Object.prototype,c=n.hasOwnProperty,e=Object.defineProperty||function(Z,W,oe){Z[W]=oe.value},t=typeof Symbol=="function"?Symbol:{},s=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",w=t.toStringTag||"@@toStringTag";function P(Z,W,oe){return Object.defineProperty(Z,W,{value:oe,enumerable:!0,configurable:!0,writable:!0}),Z[W]}try{P({},"")}catch{P=function(W,oe,Ee){return W[oe]=Ee}}function $(Z,W,oe,Ee){var me=W&&W.prototype instanceof xe?W:xe,Te=Object.create(me.prototype),He=new Yr(Ee||[]);return e(Te,"_invoke",{value:Wt(Z,oe,He)}),Te}function B(Z,W,oe){try{return{type:"normal",arg:Z.call(W,oe)}}catch(Ee){return{type:"throw",arg:Ee}}}r.wrap=$;var z="suspendedStart",Q="suspendedYield",ee="executing",le="completed",be={};function xe(){}function Pe(){}function $e(){}var Me={};P(Me,s,(function(){return this}));var Ge=Object.getPrototypeOf,je=Ge&&Ge(Ge(Zt([])));je&&je!==n&&c.call(je,s)&&(Me=je);var Se=$e.prototype=xe.prototype=Object.create(Me);function Ye(Z){["next","throw","return"].forEach((function(W){P(Z,W,(function(oe){return this._invoke(W,oe)}))}))}function pt(Z,W){function oe(me,Te,He,mt){var yt=B(Z[me],Z,Te);if(yt.type!=="throw"){var cr=yt.arg,Ir=cr.value;return Ir&&Tt(Ir)=="object"&&c.call(Ir,"__await")?W.resolve(Ir.__await).then((function(Yt){oe("next",Yt,He,mt)}),(function(Yt){oe("throw",Yt,He,mt)})):W.resolve(Ir).then((function(Yt){cr.value=Yt,He(cr)}),(function(Yt){return oe("throw",Yt,He,mt)}))}mt(yt.arg)}var Ee;e(this,"_invoke",{value:function(me,Te){function He(){return new W((function(mt,yt){oe(me,Te,mt,yt)}))}return Ee=Ee?Ee.then(He,He):He()}})}function Wt(Z,W,oe){var Ee=z;return function(me,Te){if(Ee===ee)throw Error("Generator is already running");if(Ee===le){if(me==="throw")throw Te;return{value:l,done:!0}}for(oe.method=me,oe.arg=Te;;){var He=oe.delegate;if(He){var mt=Un(He,oe);if(mt){if(mt===be)continue;return mt}}if(oe.method==="next")oe.sent=oe._sent=oe.arg;else if(oe.method==="throw"){if(Ee===z)throw Ee=le,oe.arg;oe.dispatchException(oe.arg)}else oe.method==="return"&&oe.abrupt("return",oe.arg);Ee=ee;var yt=B(Z,W,oe);if(yt.type==="normal"){if(Ee=oe.done?le:Q,yt.arg===be)continue;return{value:yt.arg,done:oe.done}}yt.type==="throw"&&(Ee=le,oe.method="throw",oe.arg=yt.arg)}}}function Un(Z,W){var oe=W.method,Ee=Z.iterator[oe];if(Ee===l)return W.delegate=null,oe==="throw"&&Z.iterator.return&&(W.method="return",W.arg=l,Un(Z,W),W.method==="throw")||oe!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+oe+"' method")),be;var me=B(Ee,Z.iterator,W.arg);if(me.type==="throw")return W.method="throw",W.arg=me.arg,W.delegate=null,be;var Te=me.arg;return Te?Te.done?(W[Z.resultName]=Te.value,W.next=Z.nextLoc,W.method!=="return"&&(W.method="next",W.arg=l),W.delegate=null,be):Te:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,be)}function Ro(Z){var W={tryLoc:Z[0]};1 in Z&&(W.catchLoc=Z[1]),2 in Z&&(W.finallyLoc=Z[2],W.afterLoc=Z[3]),this.tryEntries.push(W)}function Le(Z){var W=Z.completion||{};W.type="normal",delete W.arg,Z.completion=W}function Yr(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(Ro,this),this.reset(!0)}function Zt(Z){if(Z||Z===""){var W=Z[s];if(W)return W.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var oe=-1,Ee=function me(){for(;++oe<Z.length;)if(c.call(Z,oe))return me.value=Z[oe],me.done=!1,me;return me.value=l,me.done=!0,me};return Ee.next=Ee}}throw new TypeError(Tt(Z)+" is not iterable")}return Pe.prototype=$e,e(Se,"constructor",{value:$e,configurable:!0}),e($e,"constructor",{value:Pe,configurable:!0}),Pe.displayName=P($e,w,"GeneratorFunction"),r.isGeneratorFunction=function(Z){var W=typeof Z=="function"&&Z.constructor;return!!W&&(W===Pe||(W.displayName||W.name)==="GeneratorFunction")},r.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,$e):(Z.__proto__=$e,P(Z,w,"GeneratorFunction")),Z.prototype=Object.create(Se),Z},r.awrap=function(Z){return{__await:Z}},Ye(pt.prototype),P(pt.prototype,u,(function(){return this})),r.AsyncIterator=pt,r.async=function(Z,W,oe,Ee,me){me===void 0&&(me=Promise);var Te=new pt($(Z,W,oe,Ee),me);return r.isGeneratorFunction(W)?Te:Te.next().then((function(He){return He.done?He.value:Te.next()}))},Ye(Se),P(Se,w,"Generator"),P(Se,s,(function(){return this})),P(Se,"toString",(function(){return"[object Generator]"})),r.keys=function(Z){var W=Object(Z),oe=[];for(var Ee in W)oe.push(Ee);return oe.reverse(),function me(){for(;oe.length;){var Te=oe.pop();if(Te in W)return me.value=Te,me.done=!1,me}return me.done=!0,me}},r.values=Zt,Yr.prototype={constructor:Yr,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(Le),!Z)for(var W in this)W.charAt(0)==="t"&&c.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=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 W=this;function oe(yt,cr){return Te.type="throw",Te.arg=Z,W.next=yt,cr&&(W.method="next",W.arg=l),!!cr}for(var Ee=this.tryEntries.length-1;Ee>=0;--Ee){var me=this.tryEntries[Ee],Te=me.completion;if(me.tryLoc==="root")return oe("end");if(me.tryLoc<=this.prev){var He=c.call(me,"catchLoc"),mt=c.call(me,"finallyLoc");if(He&&mt){if(this.prev<me.catchLoc)return oe(me.catchLoc,!0);if(this.prev<me.finallyLoc)return oe(me.finallyLoc)}else if(He){if(this.prev<me.catchLoc)return oe(me.catchLoc,!0)}else{if(!mt)throw Error("try statement without catch or finally");if(this.prev<me.finallyLoc)return oe(me.finallyLoc)}}}},abrupt:function(Z,W){for(var oe=this.tryEntries.length-1;oe>=0;--oe){var Ee=this.tryEntries[oe];if(Ee.tryLoc<=this.prev&&c.call(Ee,"finallyLoc")&&this.prev<Ee.finallyLoc){var me=Ee;break}}me&&(Z==="break"||Z==="continue")&&me.tryLoc<=W&&W<=me.finallyLoc&&(me=null);var Te=me?me.completion:{};return Te.type=Z,Te.arg=W,me?(this.method="next",this.next=me.finallyLoc,be):this.complete(Te)},complete:function(Z,W){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"&&W&&(this.next=W),be},finish:function(Z){for(var W=this.tryEntries.length-1;W>=0;--W){var oe=this.tryEntries[W];if(oe.finallyLoc===Z)return this.complete(oe.completion,oe.afterLoc),Le(oe),be}},catch:function(Z){for(var W=this.tryEntries.length-1;W>=0;--W){var oe=this.tryEntries[W];if(oe.tryLoc===Z){var Ee=oe.completion;if(Ee.type==="throw"){var me=Ee.arg;Le(oe)}return me}}throw Error("illegal catch attempt")},delegateYield:function(Z,W,oe){return this.delegate={iterator:Zt(Z),resultName:W,nextLoc:oe},this.method==="next"&&(this.arg=l),be}},r}function yp(l,r,n,c,e,t,s){try{var u=l[t](s),w=u.value}catch(P){return void n(P)}u.done?r(w):Promise.resolve(w).then(c,e)}function vp(l){return function(){var r=this,n=arguments;return new Promise((function(c,e){var t=l.apply(r,n);function s(w){yp(t,c,e,s,u,"next",w)}function u(w){yp(t,c,e,s,u,"throw",w)}s(void 0)}))}}function _i(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,w,P=[],$=!0,B=!1;try{if(u=(e=e.call(n)).next,c!==0)for(;!($=(t=u.call(e)).done)&&(P.push(t.value),P.length!==c);$=!0);}catch(z){B=!0,s=z}finally{try{if(!$&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(B)throw s}}return P}})(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.
|
|
36
|
+
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 Tt(l){return Tt=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},Tt(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(Tt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Tt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Tt(r)=="symbol"?r:r+""}y(1688);var K0=(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){Tt(s.type)==="object"&&(s.type=this._expandSubSchema(s.type))},disallow:function(s){Tt(s.disallow)==="object"&&(s.disallow=this._expandSubSchema(s.disallow))},anyOf:function(s){var u=this;Object.entries(s.anyOf).forEach((function(w){var P=_i(w,2),$=P[0],B=P[1];s.anyOf[$]=u.expandSchema(B)}))},dependencies:function(s){var u=this;Object.entries(s.dependencies).forEach((function(w){var P=_i(w,2),$=P[0],B=P[1];Tt(B)!=="object"||Array.isArray(B)||(s.dependencies[$]=u.expandSchema(B))}))},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,u){var w=this,P=b({},u);return Object.entries(s.allOf).forEach((function($){var B=_i($,2),z=B[0],Q=B[1];s.allOf[z]=w.expandRefs(Q,!0),P=w.extendSchemas(P,w.expandSchema(Q))})),delete P.allOf,P},extends:function(s,u){var w,P=this;return delete(w=Array.isArray(s.extends)?s.extends.reduce((function($,B,z){return P.extendSchemas($,P.expandSchema(B))}),u):this.extendSchemas(u,this.expandSchema(s.extends))).extends,w},oneOf:function(s,u){var w=this,P=b({},u);return delete P.oneOf,s.oneOf.reduce((function($,B,z){return $.oneOf[z]=w.extendSchemas(w.expandSchema(B),P),$}),u),u}}},r=[{key:"load",value:(c=vp(gi().mark((function e(t,s,u){return gi().wrap((function(w){for(;;)switch(w.prev=w.next){case 0:return this.schema=t,w.next=3,this._asyncloadExternalRefs(t,s,this._getFileBase(u),!0);case 3:return w.abrupt("return",this.expandRefs(t));case 4:case"end":return w.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 w=u.$ref.split("#");if(w.length===2&&!this.refs_with_info[u.$ref]){var P=this.expandRecursivePointer(this.schema,w[1]),$=this.extendSchemas(u,this.expandSchema(P));return delete $.$ref,$}var B=w.length>2?this.refs_with_info["#"+w[1]]:this.refs_with_info[u.$ref];delete u.$ref;var z=B.$ref.startsWith("#")?B.fetchUrl:"",Q=this._getRef(z,B);if(this.refs[Q]){if(t&&O(this.refs[Q],"allOf")){var ee=this.refs[Q].allOf;Object.keys(ee).forEach((function(le){ee[le]=s.expandRefs(ee[le],!0)}))}}else console.warn("reference:'".concat(Q,"' not found!"));return w.length>2?this.extendSchemas(u,this.expandSchema(this.expandRecursivePointer(this.refs[Q],w[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 w=_i(u,2),P=w[0],$=w[1];e[P]&&$.call(t,e)}));var s=b({},e);return Object.entries(this._subSchema2).forEach((function(u){var w=_i(u,2),P=w[0],$=w[1];e[P]&&(s=$.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 Tt(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 w={},P=function(ee){return Object.keys(ee).forEach((function(le){w[le]=!0}))};if(e.$ref&&Tt(e.$ref)!=="object"&&(e.$ref.indexOf("#")!==0||!u)){var $=e.$ref,B="";$.indexOf("#")>0&&($=$.substr(0,$.indexOf("#"))),$!==e.$ref&&(B=e.$ref.substr(e.$ref.indexOf("#")));var z=this.refs_prefix+this.refs_counter++,Q=z+B;e.$ref.substr(0,1)==="#"||this.refs[e.$ref]||(w[$]=!0),this.refs_with_info[z]={fetchUrl:t,$ref:$},e.$ref=Q}return Object.values(e).forEach((function(ee){ee&&Tt(ee)==="object"&&(Array.isArray(ee)?Object.values(ee).forEach((function(le){le&&Tt(le)==="object"&&P(s._getExternalRefs(le,t,u))})):ee.$ref&&typeof ee.$ref=="string"&&ee.$ref.startsWith("#")||P(s._getExternalRefs(ee,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),w}},{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=vp(gi().mark((function e(t,s,u){var w,P,$,B,z,Q,ee=this,le=arguments;return gi().wrap((function(be){for(;;)switch(be.prev=be.next){case 0:w=le.length>3&&le[3]!==void 0&&le[3],P=this._getExternalRefs(t,s,w),$=0,B=gi().mark((function xe(){var Pe,$e,Me,Ge,je,Se,Ye,pt,Wt,Un,Ro;return gi().wrap((function(Le){for(;;)switch(Le.prev=Le.next){case 0:if((Pe=Q[z])!==void 0){Le.next=3;break}return Le.abrupt("return",0);case 3:if(!ee.refs[Pe]){Le.next=5;break}return Le.abrupt("return",0);case 5:if(!ee._isUniformResourceName(Pe)){Le.next=40;break}if(ee.refs[Pe]="loading",$++,$e=ee.options.urn_resolver,Me=Pe,typeof $e=="function"){Le.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Me,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Me));case 13:return Me.indexOf("#")>0&&(Me=Me.substr(0,Me.indexOf("#"))),Le.prev=14,Le.next=17,$e(Me);case 17:Ge=Le.sent,Le.prev=18,je=JSON.parse(Ge),Le.next=26;break;case 22:throw Le.prev=22,Le.t0=Le.catch(18),console.log(Le.t0),new Error("Failed to parse external ref ".concat(Me));case 26:if(!(typeof je!="boolean"&&Tt(je)!=="object"||je===null||Array.isArray(je))){Le.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Me));case 28:return ee.refs[Pe]=je,Le.next=31,ee._asyncloadExternalRefs(je,Pe,u);case 31:Le.next=37;break;case 33:throw Le.prev=33,Le.t1=Le.catch(14),console.log(Le.t1),new Error("Failed to parse external ref ".concat(Me));case 37:if(typeof Ge!="boolean"){Le.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Me));case 39:return Le.abrupt("return",0);case 40:if(ee.options.ajax){Le.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(Pe));case 42:if($++,Se=ee._joinUrl(Pe,u),ee.options.ajax_cache_responses&&(pt=ee.cacheGet(Se))&&(Ye=pt),Ye){Le.next=61;break}return Le.next=48,new Promise((function(Yr){var Zt=new XMLHttpRequest;ee.options.ajaxCredentials&&(Zt.withCredentials=ee.options.ajaxCredentials),Zt.overrideMimeType("application/json"),Zt.open("GET",Se,!0),Zt.onload=function(){Yr(Zt)},Zt.onerror=function(Z){Yr(void 0)},Zt.send()}));case 48:if((Wt=Le.sent)!==void 0){Le.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(Pe));case 51:Le.prev=51,Ye=JSON.parse(Wt.responseText),ee.onSchemaLoaded({schema:Ye,schemaUrl:Se}),ee.options.ajax_cache_responses&&ee.cacheSet(Se,Ye),Le.next=61;break;case 57:throw Le.prev=57,Le.t2=Le.catch(51),console.log(Le.t2),new Error("Failed to parse external ref ".concat(Se));case 61:if(!(typeof Ye!="boolean"&&Tt(Ye)!=="object"||Ye===null||Array.isArray(Ye))){Le.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Se));case 63:return ee.refs[Pe]=Ye,Un=ee._getFileBaseFromFileLocation(Se),Se!==Pe&&(Ro=Se.split("/"),Se=(Pe.substr(0,1)==="/"?"/":"")+Ro.pop()),Le.next=68,ee._asyncloadExternalRefs(Ye,Se,Un);case 68:case"end":return Le.stop()}}),xe,null,[[14,33],[18,22],[51,57]])})),z=0,Q=Object.keys(P);case 5:if(!(z<Q.length)){be.next=13;break}return be.delegateYield(B(),"t0",7);case 7:if(be.t0!==0){be.next=10;break}return be.abrupt("continue",10);case 10:z++,be.next=5;break;case 13:if($){be.next=15;break}return be.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return be.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={},w=function(P){typeof P=="string"&&(P=[P]),typeof t.type=="string"&&(t.type=[t.type]),t.type&&t.type.length?u.type=P.filter((function($){return t.type.includes($)})):u.type=P,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(P){var $=_i(P,2),B=$[0],z=$[1];t[B]!==void 0?(function(Q,ee){(function(le,be){return(le==="required"||le==="defaultProperties")&&Tt(be)==="object"&&Array.isArray(be)})(Q,ee)?u[Q]=ee.concat(t[Q]).reduce((function(le,be){return le.includes(be)||le.push(be),le}),[]):Q!=="type"||typeof ee!="string"&&!Array.isArray(ee)?Tt(ee)!=="object"||Array.isArray(ee)||ee===null?u[Q]=ee:u[Q]=s.extendSchemas(ee,t[Q]):w(ee)})(B,z):u[B]=z})),Object.entries(t).forEach((function(P){var $=_i(P,2),B=$[0],z=$[1];e[B]===void 0&&(u[B]=z)})),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&&G0(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r,n,c})(),W0=(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,w,P=r[s].replace(/[{}]+/g,"").trim().split("."),$=P.length;$>1?u=function(B){for(w=B,s=0;s<$&&(w=w[P[s]]);s++);return w}:(P=P[0],u=function(B){return B[P]}),c.push({s:r[s],r:u})},t=0;t<n;t++)e(t);return function(s){for(var u,w="".concat(l),P=0;P<n;P++)u=c[P],w=w.replace(u.s,u.r(s));return w}}}},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 da(l){return da=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},da(l)}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 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(da(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(da(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return da(r)=="symbol"?r:r+""}var Q0={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},mn=(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]:Q0;(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 $c(u)})(t=e.split(" "))||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(t)||(function(u,w){if(u){if(typeof u=="string")return $c(u,w);var P=Object.prototype.toString.call(u).slice(8,-1);return P==="Object"&&u.constructor&&(P=u.constructor.name),P==="Map"||P==="Set"?Array.from(u):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?$c(u,w):void 0}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),s}}])&&Z0(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function Ic(l){return Ic=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},Ic(l)}function X0(l,r,n){return r=Us(r),(function(c,e){if(e&&(Ic(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||[],Us(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 Us(l){return Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Us(l)}function Nc(l,r){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Nc(l,r)}var ew={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"},tw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),X0(this,r,["glyphicon glyphicon-",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&&Nc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function Dc(l){return Dc=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},Dc(l)}function rw(l,r,n){return r=Gs(r),(function(c,e){if(e&&(Dc(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,_p()?Reflect.construct(r,n||[],Gs(l).constructor):r.apply(l,n))}function _p(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(_p=function(){return!!l})()}function Gs(l){return Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gs(l)}function Bc(l,r){return Bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Bc(l,r)}var nw={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"},iw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),rw(this,r,["icon-",nw])}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&&Bc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function Fc(l){return Fc=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},Fc(l)}function ow(l,r,n){return r=Js(r),(function(c,e){if(e&&(Fc(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||[],Js(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 Js(l){return Js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Js(l)}function Mc(l,r){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Mc(l,r)}var aw={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"},sw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),ow(this,r,["fa fa-",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&&Mc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function Vc(l){return Vc=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},Vc(l)}function lw(l,r,n){return r=Ks(r),(function(c,e){if(e&&(Vc(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||[],Ks(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 Ks(l){return Ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(l)}function qc(l,r){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},qc(l,r)}var cw={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"},uw=(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,["fas fa-",cw])}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&&qc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function zc(l){return zc=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},zc(l)}function dw(l,r,n){return r=Ws(r),(function(c,e){if(e&&(zc(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||[],Ws(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 Ws(l){return Ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ws(l)}function Hc(l,r){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Hc(l,r)}var hw={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"},fw=(function(l){function r(){return(function(c,e){if(!(c instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),dw(this,r,["ui-icon ui-icon-",hw])}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&&Hc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function Uc(l){return Uc=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},Uc(l)}function pw(l,r,n){return r=Zs(r),(function(c,e){if(e&&(Uc(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||[],Zs(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 Zs(l){return Zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zs(l)}function Gc(l,r){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Gc(l,r)}var mw={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"},yw=(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,["oi oi-",mw])}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&&Gc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function Jc(l){return Jc=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},Jc(l)}function vw(l,r,n){return r=Ys(r),(function(c,e){if(e&&(Jc(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||[],Ys(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 Ys(l){return Ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ys(l)}function Kc(l,r){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Kc(l,r)}var bw={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"},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,["icon icon-",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&&Kc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn);function Wc(l){return Wc=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},Wc(l)}function _w(l,r,n){return r=Qs(r),(function(c,e){if(e&&(Wc(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||[],Qs(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 Qs(l){return Qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qs(l)}function Zc(l,r){return Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Zc(l,r)}var ww={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"},kw={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),_w(this,r,["bi bi-",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&&Zc(c,e)})(r,l),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(mn),bootstrap3:tw,fontawesome3:iw,fontawesome4:sw,fontawesome5:uw,jqueryui:fw,openiconic:yw,spectre:gw};function ha(l){return ha=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},ha(l)}function jw(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,Ew(c.key),c)}}function Ew(l){var r=(function(n,c){if(ha(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ha(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ha(r)=="symbol"?r:r+""}var Sp=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(l){return l in document.documentElement})),yn=(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 w=0;w<c.length;w++){var P=document.createElement("option");P.setAttribute("value",c[w]),P.textContent=e[w]||c[w],n.appendChild(P)}}},{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(P,$){P.value=Number($||P.value),P.setAttribute("initialized","1")},u=n.getAttribute("min"),w=n.getAttribute("max");return e.addEventListener("click",(function(){n.getAttribute("initialized")?u?Number(n.value)>Number(u)&&n.stepDown():n.stepDown():s(n,u),k(n,"change")})),t.addEventListener("click",(function(){n.getAttribute("initialized")?w?Number(n.value)<Number(w)&&n.stepUp():n.stepUp():s(n,u),k(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[Sp])return!1;if(n[Sp](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 w=document.createElement("div");return w.style.clear="left",t.appendChild(w),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&&jw(l.prototype,r),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,r})();function ko(l){return ko=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},ko(l)}function Ow(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,xw(c.key),c)}}function xw(l){var r=(function(n,c){if(ko(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ko(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return ko(r)=="symbol"?r:r+""}function Sw(l,r,n){return r=Jr(r),(function(c,e){if(e&&(ko(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||[],Jr(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 wi(){return wi=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=Jr(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}},wi.apply(this,arguments)}function Jr(l){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jr(l)}function Yc(l,r){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Yc(l,r)}var Pp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Sw(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&&Yc(e,t)})(r,l),n=r,(c=[{key:"getFormInputLabel",value:function(e,t){var s=wi(Jr(r.prototype),"getFormInputLabel",this).call(this,e,t);return s.classList.add("je-form-input-label"),s}},{key:"getFormInputDescription",value:function(e){var t=wi(Jr(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-form-input-label"),t}},{key:"getIndentedPanel",value:function(){var e=wi(Jr(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=wi(Jr(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=wi(Jr(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")}}])&&Ow(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);function jo(l){return jo=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},jo(l)}function Cw(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,Pw(c.key),c)}}function Pw(l){var r=(function(n,c){if(jo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(jo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return jo(r)=="symbol"?r:r+""}function Tw(l,r,n){return r=Kr(r),(function(c,e){if(e&&(jo(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||[],Kr(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 ki(){return ki=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=Kr(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}},ki.apply(this,arguments)}function Kr(l){return Kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kr(l)}function Qc(l,r){return Qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Qc(l,r)}Pp.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 Rp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Tw(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:"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 w=document.createElement("span");w.classList.add("switch-slider");var P=document.createElement("span");return P.classList.add("sr-only"),P.textContent=e+"-opt-in",s.appendChild(P),s.appendChild(u),s.appendChild(w),{label:t,checkbox:u,container:s}}},{key:"getSelectInput",value:function(e,t){var s=ki(Kr(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,w){return ki(Kr(r.prototype),"getRangeInput",this).call(this,e,t,s,u,w)}},{key:"getFormInputField",value:function(e){var t=ki(Kr(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,w){var P=document.createElement("div");return!e||t.type!=="checkbox"&&t.type!=="radio"?(P.classList.add("form-group"),e&&(e.classList.add("control-label"),P.appendChild(e),u&&e.appendChild(u)),P.appendChild(t)):(P.classList.add(t.type),u&&e.appendChild(u),e.insertBefore(t,e.firstChild),P.appendChild(e)),s&&P.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-description")),P}},{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=ki(Kr(r.prototype),"getButton",this).call(this,e,t,s);return u.classList.add("btn","btn-default"),u}},{key:"getTableContainer",value:function(){var e=ki(Kr(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 w=0;w<t.length;w++)u.appendChild(t[w]);return s}}}])&&Cw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);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 Rw(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,Lw(c.key),c)}}function Lw(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 Aw(l,r,n){return r=Wr(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,Lp()?Reflect.construct(r,n||[],Wr(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 ji(){return ji=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=Wr(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}},ji.apply(this,arguments)}function Wr(l){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wr(l)}function Xc(l,r){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},Xc(l,r)}Rp.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 $w={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"},Ap=(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),Aw(this,r,[e,$w])}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:"getSelectInput",value:function(e,t){var s=ji(Wr(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 w=document.createElement("label");w.setAttribute("for",e+"-opt-in"),w.classList.add("custom-control-label");var P=document.createElement("span");return P.classList.add("sr-only"),P.textContent=e+"-opt-in",w.appendChild(P),s.appendChild(u),s.appendChild(w),{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,w){var P=ji(Wr(r.prototype),"getRangeInput",this).call(this,e,t,s,u,w);return this.options.custom_forms===!0&&(P.classList.remove("form-control"),P.classList.add("custom-range")),P}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),s=document.createElement("div"),u=document.createElement("div"),w=document.createElement("button");w.setAttribute("type","button");var P=document.createElement("button");P.setAttribute("type","button"),t.appendChild(s),t.appendChild(e),t.appendChild(u),s.appendChild(w),u.appendChild(P),t.classList.add("input-group"),s.classList.add("input-group-prepend"),u.classList.add("input-group-append"),w.classList.add("btn"),w.classList.add("btn-secondary"),w.classList.add("stepper-down"),P.classList.add("btn"),P.classList.add("btn-secondary"),P.classList.add("stepper-up"),e.getAttribute("readonly")&&(w.setAttribute("disabled",!0),P.setAttribute("disabled",!0)),w.textContent="-",P.textContent="+";var $=function(Q,ee){Q.value=Number(ee||Q.value),Q.setAttribute("initialized","1")},B=e.getAttribute("min"),z=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),w.addEventListener("click",(function(){e.getAttribute("initialized")?B?Number(e.value)>Number(B)&&e.stepDown():e.stepDown():$(e,B),k(e,"change")})),P.addEventListener("click",(function(){e.getAttribute("initialized")?z?Number(e.value)<Number(z)&&e.stepUp():e.stepUp():$(e,B),k(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=ji(Wr(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,w){var P=document.createElement("div");if(P.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(P.appendChild(e),u&&P.appendChild(u)),P.appendChild(t);else{var $=document.createElement("div");this.options.custom_forms===!1?($.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label")):($.classList.add("custom-control"),t.classList.add("custom-control-input"),e.classList.add("custom-control-label"),t.type==="checkbox"?$.classList.add("custom-checkbox"):$.classList.add("custom-radio")),$.appendChild(t),$.appendChild(e),u&&$.appendChild(u),P.appendChild($)}return s&&P.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-description")),P}},{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 w=document.createElement("div");w.classList.add("form-group"),t&&(w.appendChild(t),u&&t.appendChild(u));var P=document.createElement("div");return Object.values(e).forEach((function($){var B=$.firstChild;P.appendChild(B)})),w.appendChild(P),s&&w.appendChild(s),w}},{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=ji(Wr(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=ji(Wr(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 w=0;w<t.length;w++)t[w].classList.remove("mr-2","btn-secondary"),t[w].classList.add("btn-outline-secondary"),u.appendChild(t[w]);return s}}}])&&Rw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);function Oo(l){return Oo=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},Oo(l)}function Iw(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,Nw(c.key),c)}}function Nw(l){var r=(function(n,c){if(Oo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Oo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Oo(r)=="symbol"?r:r+""}function Dw(l,r,n){return r=Zr(r),(function(c,e){if(e&&(Oo(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,$p()?Reflect.construct(r,n||[],Zr(l).constructor):r.apply(l,n))}function $p(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($p=function(){return!!l})()}function Ei(){return Ei=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}},Ei.apply(this,arguments)}function Zr(l){return Zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zr(l)}function eu(l,r){return eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},eu(l,r)}Ap.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 Bw={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Ip=(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),Dw(this,r,[e,Bw])}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&&eu(e,t)})(r,l),n=r,(c=[{key:"getSelectInput",value:function(e,t){var s=Ei(Zr(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 w=document.createElement("label");w.setAttribute("for",e+"-opt-in"),w.classList.add("form-check-label");var P=document.createElement("span");return P.classList.add("visually-hidden"),P.textContent=e+"-opt-in",w.appendChild(P),s.appendChild(u),s.appendChild(w),{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,w){var P=Ei(Zr(r.prototype),"getRangeInput",this).call(this,e,t,s,u,w);return P.classList.remove("form-control"),P.classList.add("form-range"),P}},{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 w=function(B,z){B.value=Number(z||B.value),B.setAttribute("initialized","1")},P=e.getAttribute("min"),$=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),s.addEventListener("click",(function(){e.getAttribute("initialized")?P?Number(e.value)>Number(P)&&e.stepDown():e.stepDown():w(e,P),k(e,"change")})),u.addEventListener("click",(function(){e.getAttribute("initialized")?$?Number(e.value)<Number($)&&e.stepUp():e.stepUp():w(e,P),k(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=Ei(Zr(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,w){var P=document.createElement("div");if(P.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(e.classList.add("form-label"),P.appendChild(e),u&&P.appendChild(u)),P.appendChild(t);else{var $=document.createElement("div");$.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label"),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-description")),$.appendChild(t),$.appendChild(e),u&&$.appendChild(u),P.appendChild($)}return s&&P.appendChild(s),P}},{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 w=document.createElement("div");w.classList.add("form-group"),t&&(w.appendChild(t),u&&t.appendChild(u));var P=document.createElement("div");return Object.values(e).forEach((function($){var B=$.firstChild;P.appendChild(B)})),w.appendChild(P),s&&w.appendChild(s),w}},{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=Ei(Zr(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=Ei(Zr(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}}}])&&Iw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);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 Fw(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(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 Vw(l,r,n){return r=vn(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,Np()?Reflect.construct(r,n||[],vn(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 So(){return So=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}},So.apply(this,arguments)}function vn(l){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vn(l)}function tu(l,r){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},tu(l,r)}Ip.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 Dp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Vw(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&&tu(e,t)})(r,l),n=r,(c=[{key:"getTable",value:function(){var e=So(vn(r.prototype),"getTable",this).call(this);return e.setAttribute("cellpadding",5),e.setAttribute("cellspacing",0),e}},{key:"getTableHeaderCell",value:function(e){var t=So(vn(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=So(vn(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 w=So(vn(r.prototype),"getFormControl",this).call(this,e,t,s,u);return t.type==="checkbox"?(w.style.lineHeight="25px",w.style.padding="3px 0"):w.style.padding="4px 0 8px 0",w}},{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 w=document.createElement("span");return w.classList.add("ui-button-text"),w.textContent=e||s||".",u.appendChild(w),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 w=document.createElement("span");w.classList.add("ui-button-text"),w.textContent=t||u||".",e.appendChild(w),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"}}])&&Fw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);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 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,zw(c.key),c)}}function zw(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 Hw(l,r,n){return r=Xs(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,Bp()?Reflect.construct(r,n||[],Xs(l).constructor):r.apply(l,n))}function Bp(){try{var l=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Bp=function(){return!!l})()}function Xs(l){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(l)}function ru(l,r){return ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},ru(l,r)}Dp.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 Fp=(function(l){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Hw(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&&ru(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")}}])&&qw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);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 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,Gw(c.key),c)}}function Gw(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 Jw(l,r,n){return r=Ot(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,Mp()?Reflect.construct(r,n||[],Ot(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 It(){return It=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=Ot(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}},It.apply(this,arguments)}function Ot(l){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ot(l)}function nu(l,r){return nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},nu(l,r)}Fp.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 Kw={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"},Vp=(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),Jw(this,r,[e,Kw])}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&&nu(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 w=document.createElement("i");w.classList.add("form-icon");var P=document.createElement("span");return P.classList.add("sr-only"),P.textContent=e+"-opt-in",s.appendChild(P),s.appendChild(u),s.appendChild(w),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=It(Ot(r.prototype),"getButtonHolder",this).call(this);return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=It(Ot(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=It(Ot(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=It(Ot(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=It(Ot(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-desc","hide-sm"),t}},{key:"getFormInputLabel",value:function(e,t){var s=It(Ot(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=It(Ot(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 It(Ot(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=It(Ot(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=It(Ot(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,w){var P=It(Ot(r.prototype),"getRangeInput",this).call(this,e,t,s,u,w);return P.classList.add("slider"),P.classList.remove("form-input"),P.setAttribute("oninput",'this.setAttribute("value", this.value)'),P}},{key:"getRangeControl",value:function(e,t){var s=It(Ot(r.prototype),"getRangeControl",this).call(this,e,t);return s.classList.add("text-center"),s}},{key:"getSelectInput",value:function(e,t){var s=It(Ot(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,w){var P=document.createElement("div");return P.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio"?(e&&(e.classList.add("form-label"),P.appendChild(e),u&&e.appendChild(u)),P.appendChild(t)):(P.classList.add(t.type),u&&e.appendChild(u),e.insertBefore(t,e.firstChild),P.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"&&P.appendChild(t),s&&P.appendChild(s),t.tagName.toLowerCase()!=="div"&&t&&e&&w&&(e.setAttribute("for",w),t.setAttribute("id",w)),t.tagName.toLowerCase()!=="div"&&t&&s&&(s.setAttribute("id",w+"-description"),t.setAttribute("aria-describedby",w+"-description")),P}},{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 w=document.createElement("div");w.classList.add("popover-container"),t.appendChild(w);var P=document.createElement("div");P.classList.add("card"),w.appendChild(P);var $=document.createElement("div");return $.classList.add("card-body"),$.innerHTML=e,P.appendChild($),t}},{key:"getTable",value:function(){var e=It(Ot(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=It(Ot(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"))}}])&&Uw(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);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 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(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 Yw(l,r,n){return r=xt(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,qp()?Reflect.construct(r,n||[],xt(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 qt(){return qt=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=xt(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}},qt.apply(this,arguments)}function xt(l){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xt(l)}function iu(l,r){return iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,c){return n.__proto__=c,n},iu(l,r)}Vp.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 Qw={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},zp=(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&&iu(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 w=document.createElement("span");w.classList.add("switch-slider","round");var P=document.createElement("span");return P.classList.add("sr-only"),P.textContent=e+"-opt-in",s.appendChild(P),s.appendChild(u),s.appendChild(w),{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=qt(xt(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=qt(xt(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=qt(xt(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=qt(xt(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 w=qt(xt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,s,u);return w.classList.add("inline-flex","flex-col"),w}},{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=qt(xt(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,w){var P=qt(xt(r.prototype),"getRadioHolder",this).call(this,t,s,u,w);return e.options.layout==="h"?P.classList.add("inline-flex","flex-row"):P.classList.add("inline-flex","flex-col"),P}},{key:"getFormInputLabel",value:function(e,t){var s=qt(xt(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=qt(xt(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 w=document.createElement("div");return w.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)),w.appendChild(e),!["checkbox","radio"].includes(t.type)&&u&&w.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"),w.appendChild(t)),s&&w.appendChild(s),w}},{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=qt(xt(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=qt(xt(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=qt(xt(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=qt(xt(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=qt(xt(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 w=0;w<t.length;w++)u.appendChild(t[w]);return s}}}])&&Ww(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c})(yn);zp.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 Xw={html:Pp,bootstrap3:Rp,bootstrap4:Ap,bootstrap5:Ip,jqueryui:Dp,barebones:Fp,spectre:Vp,tailwind:zp};const e1={".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 Oi(l){return Oi=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},Oi(l)}function ou(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 au(){au=function(){return r};var l,r={},n=Object.prototype,c=n.hasOwnProperty,e=Object.defineProperty||function(Z,W,oe){Z[W]=oe.value},t=typeof Symbol=="function"?Symbol:{},s=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",w=t.toStringTag||"@@toStringTag";function P(Z,W,oe){return Object.defineProperty(Z,W,{value:oe,enumerable:!0,configurable:!0,writable:!0}),Z[W]}try{P({},"")}catch{P=function(W,oe,Ee){return W[oe]=Ee}}function $(Z,W,oe,Ee){var me=W&&W.prototype instanceof xe?W:xe,Te=Object.create(me.prototype),He=new Yr(Ee||[]);return e(Te,"_invoke",{value:Wt(Z,oe,He)}),Te}function B(Z,W,oe){try{return{type:"normal",arg:Z.call(W,oe)}}catch(Ee){return{type:"throw",arg:Ee}}}r.wrap=$;var z="suspendedStart",Q="suspendedYield",ee="executing",le="completed",be={};function xe(){}function Pe(){}function $e(){}var Me={};P(Me,s,(function(){return this}));var Ge=Object.getPrototypeOf,je=Ge&&Ge(Ge(Zt([])));je&&je!==n&&c.call(je,s)&&(Me=je);var Se=$e.prototype=xe.prototype=Object.create(Me);function Ye(Z){["next","throw","return"].forEach((function(W){P(Z,W,(function(oe){return this._invoke(W,oe)}))}))}function pt(Z,W){function oe(me,Te,He,mt){var yt=B(Z[me],Z,Te);if(yt.type!=="throw"){var cr=yt.arg,Ir=cr.value;return Ir&&Oi(Ir)=="object"&&c.call(Ir,"__await")?W.resolve(Ir.__await).then((function(Yt){oe("next",Yt,He,mt)}),(function(Yt){oe("throw",Yt,He,mt)})):W.resolve(Ir).then((function(Yt){cr.value=Yt,He(cr)}),(function(Yt){return oe("throw",Yt,He,mt)}))}mt(yt.arg)}var Ee;e(this,"_invoke",{value:function(me,Te){function He(){return new W((function(mt,yt){oe(me,Te,mt,yt)}))}return Ee=Ee?Ee.then(He,He):He()}})}function Wt(Z,W,oe){var Ee=z;return function(me,Te){if(Ee===ee)throw Error("Generator is already running");if(Ee===le){if(me==="throw")throw Te;return{value:l,done:!0}}for(oe.method=me,oe.arg=Te;;){var He=oe.delegate;if(He){var mt=Un(He,oe);if(mt){if(mt===be)continue;return mt}}if(oe.method==="next")oe.sent=oe._sent=oe.arg;else if(oe.method==="throw"){if(Ee===z)throw Ee=le,oe.arg;oe.dispatchException(oe.arg)}else oe.method==="return"&&oe.abrupt("return",oe.arg);Ee=ee;var yt=B(Z,W,oe);if(yt.type==="normal"){if(Ee=oe.done?le:Q,yt.arg===be)continue;return{value:yt.arg,done:oe.done}}yt.type==="throw"&&(Ee=le,oe.method="throw",oe.arg=yt.arg)}}}function Un(Z,W){var oe=W.method,Ee=Z.iterator[oe];if(Ee===l)return W.delegate=null,oe==="throw"&&Z.iterator.return&&(W.method="return",W.arg=l,Un(Z,W),W.method==="throw")||oe!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+oe+"' method")),be;var me=B(Ee,Z.iterator,W.arg);if(me.type==="throw")return W.method="throw",W.arg=me.arg,W.delegate=null,be;var Te=me.arg;return Te?Te.done?(W[Z.resultName]=Te.value,W.next=Z.nextLoc,W.method!=="return"&&(W.method="next",W.arg=l),W.delegate=null,be):Te:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,be)}function Ro(Z){var W={tryLoc:Z[0]};1 in Z&&(W.catchLoc=Z[1]),2 in Z&&(W.finallyLoc=Z[2],W.afterLoc=Z[3]),this.tryEntries.push(W)}function Le(Z){var W=Z.completion||{};W.type="normal",delete W.arg,Z.completion=W}function Yr(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(Ro,this),this.reset(!0)}function Zt(Z){if(Z||Z===""){var W=Z[s];if(W)return W.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var oe=-1,Ee=function me(){for(;++oe<Z.length;)if(c.call(Z,oe))return me.value=Z[oe],me.done=!1,me;return me.value=l,me.done=!0,me};return Ee.next=Ee}}throw new TypeError(Oi(Z)+" is not iterable")}return Pe.prototype=$e,e(Se,"constructor",{value:$e,configurable:!0}),e($e,"constructor",{value:Pe,configurable:!0}),Pe.displayName=P($e,w,"GeneratorFunction"),r.isGeneratorFunction=function(Z){var W=typeof Z=="function"&&Z.constructor;return!!W&&(W===Pe||(W.displayName||W.name)==="GeneratorFunction")},r.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,$e):(Z.__proto__=$e,P(Z,w,"GeneratorFunction")),Z.prototype=Object.create(Se),Z},r.awrap=function(Z){return{__await:Z}},Ye(pt.prototype),P(pt.prototype,u,(function(){return this})),r.AsyncIterator=pt,r.async=function(Z,W,oe,Ee,me){me===void 0&&(me=Promise);var Te=new pt($(Z,W,oe,Ee),me);return r.isGeneratorFunction(W)?Te:Te.next().then((function(He){return He.done?He.value:Te.next()}))},Ye(Se),P(Se,w,"Generator"),P(Se,s,(function(){return this})),P(Se,"toString",(function(){return"[object Generator]"})),r.keys=function(Z){var W=Object(Z),oe=[];for(var Ee in W)oe.push(Ee);return oe.reverse(),function me(){for(;oe.length;){var Te=oe.pop();if(Te in W)return me.value=Te,me.done=!1,me}return me.done=!0,me}},r.values=Zt,Yr.prototype={constructor:Yr,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(Le),!Z)for(var W in this)W.charAt(0)==="t"&&c.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=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 W=this;function oe(yt,cr){return Te.type="throw",Te.arg=Z,W.next=yt,cr&&(W.method="next",W.arg=l),!!cr}for(var Ee=this.tryEntries.length-1;Ee>=0;--Ee){var me=this.tryEntries[Ee],Te=me.completion;if(me.tryLoc==="root")return oe("end");if(me.tryLoc<=this.prev){var He=c.call(me,"catchLoc"),mt=c.call(me,"finallyLoc");if(He&&mt){if(this.prev<me.catchLoc)return oe(me.catchLoc,!0);if(this.prev<me.finallyLoc)return oe(me.finallyLoc)}else if(He){if(this.prev<me.catchLoc)return oe(me.catchLoc,!0)}else{if(!mt)throw Error("try statement without catch or finally");if(this.prev<me.finallyLoc)return oe(me.finallyLoc)}}}},abrupt:function(Z,W){for(var oe=this.tryEntries.length-1;oe>=0;--oe){var Ee=this.tryEntries[oe];if(Ee.tryLoc<=this.prev&&c.call(Ee,"finallyLoc")&&this.prev<Ee.finallyLoc){var me=Ee;break}}me&&(Z==="break"||Z==="continue")&&me.tryLoc<=W&&W<=me.finallyLoc&&(me=null);var Te=me?me.completion:{};return Te.type=Z,Te.arg=W,me?(this.method="next",this.next=me.finallyLoc,be):this.complete(Te)},complete:function(Z,W){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"&&W&&(this.next=W),be},finish:function(Z){for(var W=this.tryEntries.length-1;W>=0;--W){var oe=this.tryEntries[W];if(oe.finallyLoc===Z)return this.complete(oe.completion,oe.afterLoc),Le(oe),be}},catch:function(Z){for(var W=this.tryEntries.length-1;W>=0;--W){var oe=this.tryEntries[W];if(oe.tryLoc===Z){var Ee=oe.completion;if(Ee.type==="throw"){var me=Ee.arg;Le(oe)}return me}}throw Error("illegal catch attempt")},delegateYield:function(Z,W,oe){return this.delegate={iterator:Zt(Z),resultName:W,nextLoc:oe},this.method==="next"&&(this.arg=l),be}},r}function Hp(l,r,n,c,e,t,s){try{var u=l[t](s),w=u.value}catch(P){return void n(P)}u.done?r(w):Promise.resolve(w).then(c,e)}function t1(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,r1(c.key),c)}}function r1(l){var r=(function(n,c){if(Oi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Oi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(l);return Oi(r)=="symbol"?r:r+""}var bn=(function(){function l(t){var s=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((function(ee,le){if(!(ee 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 w=this.options.theme||l.defaults.theme,P=l.defaults.themes[w];if(!P)throw new Error("Unknown theme ".concat(w));this.element.setAttribute("data-theme",w),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new P(this);var $=b(e1,this.getEditorsRules()),B=function(ee,le,be){return be?s.addNewStyleRulesToShadowRoot(ee,le,be):s.addNewStyleRules(ee,le)};if(!this.theme.options.disable_theme_rules){var z=E(this.element);B("default",$,z),P.rules!==void 0&&B(w,P.rules,z)}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=au().mark((function t(){var s,u,w,P,$,B,z=this;return au().wrap((function(Q){for(;;)switch(Q.prev=Q.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(u=new K0(this.options)).onSchemaLoaded=function(ee){z.trigger("schemaLoaded",ee)},u.onAllSchemasLoaded=function(){z.trigger("allSchemasLoaded")},this.expandSchema=function(ee){return u.expandSchema(ee)},this.expandRefs=function(ee,le){return u.expandRefs(ee,le)},w=document.location.toString(),Q.next=9,u.load(this.schema,s,w);case 9:P=Q.sent,$=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Jf(this,null,$,l.defaults),B=this.getEditorClass(P),this.root=this.createEditor(B,{jsoneditor:this,schema:P,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(){z.ready&&(z.validation_results=z.validator.validate(z.root.getValue()),z.root.showValidationErrors(z.validation_results),z.trigger("ready"),z.trigger("change"))}));case 24:case"end":return Q.stop()}}),t,this)})),e=function(){var t=this,s=arguments;return new Promise((function(u,w){var P=c.apply(t,s);function $(z){Hp(P,u,w,$,B,"next",z)}function B(z){Hp(P,u,w,$,B,"throw",z)}$(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=[],w=0;w<this.callbacks[t].length;w++)this.callbacks[t][w]!==s&&u.push(this.callbacks[t][w]);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(w){return(s=w(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 w;t.hasAttribute("data-jsoneditor-".concat(s))?w=t.getAttribute("data-jsoneditor-".concat(s)):(w=this.uuid++,t.setAttribute("data-jsoneditor-".concat(s),w)),this.__data[w]=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=[],w=0;w<this.watchlist[t].length;w++)this.watchlist[t][w]!==s&&u.push(this.watchlist[t][w]);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 w=u.sheet?u.sheet:u.styleSheet,P=this.element.nodeName.toLowerCase();w.cssRules.length>0;)w.deleteRule(0);Object.keys(s).forEach((function($){var B=t==="default"?$:"".concat(P,'[data-theme="').concat(t,'"] ').concat($);w.insertRule?w.insertRule(B+" {"+decodeURIComponent(s[$])+"}",0):w.addRule&&w.addRule(B,decodeURIComponent(s[$]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,s,u){var w=this.element.nodeName.toLowerCase(),P="";Object.keys(s).forEach((function(z){var Q=t==="default"?z:"".concat(w,'[data-theme="').concat(t,'"] ').concat(z);P+=Q+" {"+decodeURIComponent(s[z])+`}
|
|
38
|
+
`}));var $,B=new CSSStyleSheet;B.replaceSync(P),u.adoptedStyleSheets=[].concat((function(z){if(Array.isArray(z))return ou(z)})($=u.adoptedStyleSheets)||(function(z){if(typeof Symbol<"u"&&z[Symbol.iterator]!=null||z["@@iterator"]!=null)return Array.from(z)})($)||(function(z,Q){if(z){if(typeof z=="string")return ou(z,Q);var ee=Object.prototype.toString.call(z).slice(8,-1);return ee==="Object"&&z.constructor&&(ee=z.constructor.name),ee==="Map"||ee==="Set"?Array.from(z):ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ee)?ou(z,Q):void 0}})($)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
39
|
+
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&&t1(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,c,e})();bn.defaults=bi,bn.AbstractEditor=D,bn.AbstractTheme=yn,bn.AbstractIconLib=mn,Object.assign(bn.defaults.themes,Xw),Object.assign(bn.defaults.editors,Hs),Object.assign(bn.defaults.templates,W0),Object.assign(bn.defaults.iconlibs,kw)})(),_})()))})(Yl)),Yl.exports}var sg=ag();fb();function lg(o){}Hi(lg,{},[],[],!0);function cg(o){}Hi(cg,{},[],[],!0);var ug=wt("<li> </li>"),dg=wt('<div class="data-error">Errors : <ul></ul></div>'),hg=wt('<div id="editor-json"></div> <!>',1),fg=wt("<p> </p>");const pg={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
|
+
:global(#editor-json .form-control textarea) {width:100% !important;flex:1;box-sizing:border-box;font-size:20px !important;}
|
|
41
|
+
|
|
42
|
+
/* Broader target with higher specificity */#editor-json input,
|
|
43
|
+
#editor-json textarea,
|
|
44
|
+
#editor-json .form-control input,
|
|
45
|
+
#editor-json .form-control textarea {width:100% !important;flex:1 !important;box-sizing:border-box !important;font-size:20px !important;font-family:inherit !important;}
|
|
46
|
+
|
|
47
|
+
/* Override inline styles if present */#editor-json input {min-height:40px !important;padding:8px 12px !important;background:transparent !important;background-color:transparent !important;border:1px solid #cccccc4f !important;}#editor-json textarea[data-schemaformat="textarea"] {min-height:300px !important;padding:8px 12px !important;background:transparent !important;background-color:transparent !important;border:1px solid #cccccc4f !important;}
|
|
48
|
+
|
|
49
|
+
/* Single/multiple select dropdowns */#editor-json select {width:100% !important;font-size:20px !important;padding:12px !important;background:transparent !important;border:1px solid #cccccc4f !important;min-height:48px !important;}
|
|
50
|
+
|
|
51
|
+
/* 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;}
|
|
52
|
+
|
|
53
|
+
/* Multi-checkbox combo */#editor-json .je-array-controls {background:transparent;}
|
|
54
|
+
|
|
55
|
+
/* Full combo integration */#editor-json input,
|
|
56
|
+
:global(#editor-json textarea) {font-size:20px !important;background:transparent !important;border:1px solid #cccccc4f !important;}
|
|
57
|
+
|
|
58
|
+
/* Generic selects inside editor */#editor-json select {width:100% !important;font-size:20px !important;padding:8px 12px !important;background:transparent !important;border:1px solid #cccccc4f !important;box-sizing:border-box !important;}
|
|
59
|
+
|
|
60
|
+
/* 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;}
|
|
61
|
+
|
|
62
|
+
/* 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 $s(o,a){Uo(a,!0),Kl(o,pg);let h=Vt(a,"schema",15),m=Vt(a,"schema_name",15),y=Vt(a,"data",15),_=Vt(a,"data_valid",15),d=Vt(a,"editor_options",23,()=>({})),v=Vt(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=_t(null),p=_t(null),g=_t(null),b=_t(!1),k=_t("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=_t(_r({new:!0,edit:!0,customEditor:!1,property_modifications:{}}));const j=()=>{if(st(p,null),he(f)){if(!h())throw new Error("No schema provided");if(i[m()]&&(console.log("should update"),st(O,i[m()],!0)),console.log(he(O)),!he(O)[v()])throw st(k,`Editing ${m()} in ${v()} mode is not supported`),st(b,!1),_(!1),new Error("Can not be loaded");let R={...h()};he(O)?.property_modifications&&Object.keys(he(O).property_modifications).map(I=>{R.properties[I]={...R.properties[I],...he(O).property_modifications[I]}});const A={...E,...d(),schema:R};st(p,new sg.JSONEditor(he(f),A),!0),he(p).on("ready",()=>{y()&&he(p).setValue(y())}),he(p).on("change",()=>{const I=he(p).validate();console.log(I),_(I.length===0),_()?(y(he(p).getValue()),st(g,null)):st(g,I,!0)})}else console.error("Container element still null")};Gl(async()=>{st(b,!0),setTimeout(j,50)});var x={get schema(){return h()},set schema(R){h(R),Ct()},get schema_name(){return m()},set schema_name(R){m(R),Ct()},get data(){return y()},set data(R){y(R),Ct()},get data_valid(){return _()},set data_valid(R){_(R),Ct()},get editor_options(){return d()},set editor_options(R={}){d(R),Ct()},get mode(){return v()},set mode(R="new"){v(R),Ct()}},S=qi(),C=Mt(S);{var L=R=>{var A=hg(),I=Mt(A);tg(I,G=>st(f,G),()=>he(f));var D=ft(I,2);{var M=G=>{var J=dg(),Y=ft(ut(J));Rs(Y,21,()=>he(g),Ts,(ce,ue)=>{var fe=ug(),X=ut(fe);ot(fe),hr(()=>sr(X,`${he(ue).path??""}:${he(ue).property??""}:${he(ue).message??""}`)),at(ce,fe)}),ot(Y),ot(J),at(G,J)},V=G=>{};rr(D,G=>{_()?G(V,!1):G(M)})}at(R,A)},T=R=>{var A=fg(),I=ut(A,!0);ot(A),hr(()=>sr(I,he(k))),at(R,A)};rr(C,R=>{he(b)?R(L):R(T,!1)})}return at(o,S),Go(x)}Hi($s,{schema:{},schema_name:{},data:{},data_valid:{},editor_options:{},mode:{}},[],[],!0);var mg=wt("<button>Save changes</button>"),yg=wt("<!> <hr/> <!>",1),vg=wt("<tr><td> </td><td> </td><td><button>Copy URL</button> <button>Copy Key</button></td></tr>"),bg=wt('<tr><td colspan="3">No databases yet</td></tr>'),gg=wt('<table border="1"><thead><tr><th>Name</th><th>About</th><th>Actions</th></tr></thead><tbody></tbody></table> <button> </button>',1);function wf(o,a){Uo(a,!0);let h=Vt(a,"mode",7,"list"),m=_t(_r([])),y=_t(!1),_=_t(!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};Gl(()=>{const O=localStorage.getItem(d);O&&st(m,JSON.parse(O),!0)});const i=()=>{localStorage.setItem(d,JSON.stringify(he(m))),st(y,!1)};function f(O){navigator.clipboard.writeText(O)}var p={get mode(){return h()},set mode(O="list"){h(O),Ct()}},g=qi(),b=Mt(g);{var k=O=>{var j=yg(),x=Mt(j);$s(x,{get schema(){return v},editor_options:{},get data(){return he(m)},set data(L){st(m,L,!0)},get data_valid(){return he(_)},set data_valid(L){st(_,L,!0)}});var S=ft(x,4);{var C=L=>{var T=mg();T.__click=()=>i(),at(L,T)};rr(S,L=>{he(_)&&L(C)})}at(O,j)},E=O=>{var j=gg(),x=Mt(j),S=ft(ut(x));Rs(S,21,()=>he(m),Ts,(T,R)=>{var A=vg(),I=ut(A),D=ut(I,!0);ot(I);var M=ft(I),V=ut(M,!0);ot(M);var G=ft(M),J=ut(G);J.__click=()=>f(he(R).url);var Y=ft(J,2);Y.__click=()=>f(he(R).encryption_key),ot(G),ot(A),hr(()=>{sr(D,he(R).name),sr(V,he(R).about)}),at(T,A)},T=>{var R=bg();at(T,R)}),ot(S),ot(x);var C=ft(x,2);C.__click=()=>st(y,!he(y));var L=ut(C,!0);ot(C),hr(()=>sr(L,he(y)?"Cancel Editor mode":"Edit List/ Add new")),at(O,j)};rr(b,O=>{he(y)?O(k):O(E,!1)})}return at(o,g),Go(p)}Hl(["click"]),customElements.define("db-list",Hi(wf,{mode:{}},[],[],!0));var _g=wt('<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>'),wg=wt('<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 kg={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
|
+
/* 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;
|
|
64
|
+
/* 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 kf(o,a){Uo(a,!0),Kl(o,kg);let h=Vt(a,"tags",15),m=Vt(a,"saveTags",7);function y(){m()?.()}function _(k){if(k.key==="Enter"&&k.target.value.trim()){const E=k.target.value.trim().toLowerCase();h().includes(E)||h([...h(),E]),k.target.value="",y()}}function d(k){h(h().filter(E=>E!==k)),y()}var v={get tags(){return h()},set tags(k){h(k),Ct()},get saveTags(){return m()},set saveTags(k){m(k),Ct()}},i=wg(),f=ut(i),p=ut(f),g=ft(ut(p),2);Rs(g,17,h,Ts,(k,E)=>{var O=_g(),j=ut(O),x=ft(j);x.__click=()=>d(he(E)),ot(O),hr(()=>sr(j,`${he(E)??""} `)),at(k,O)}),ot(p);var b=ft(p,2);return b.__keydown=_,ot(f),ot(i),at(o,i),Go(v)}Hl(["click","keydown"]),Hi(kf,{tags:{},saveTags:{}},[],[],!0);var jg=wt("<h4> </h4>"),Eg=wt("<option> </option>"),Og=wt('<h4>Create new doc</h4> <select class="dd svelte-17un9g9" aria-label="select schema" style="margin-bottom: 10px;"><option selected>Select schema</option><!></select>',1),xg=wt('<button class="submit-btn svelte-17un9g9" style="margin-top: 10px;">+ Add new</button> <pre> </pre>',1),Sg=wt("<!> <!>",1),Cg=wt("<!> <!>",1),Pg=wt('<input class="title-input svelte-17un9g9"/> <div class="edit-buttons"><button>Save</button> <button>Cancel</button></div>',1),Tg=wt('<h1 class="title svelte-17un9g9"> <button title="Edit title"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16"><path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"></path></svg></button></h1>'),Rg=wt('<button title="Edit doc"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16"><path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"></path></svg></button>'),Lg=wt('<button title="Save docs"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-floppy2" viewBox="0 0 16 16"><path d="M1.5 0h11.586a1.5 1.5 0 0 1 1.06.44l1.415 1.414A1.5 1.5 0 0 1 16 2.914V14.5a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 14.5v-13A1.5 1.5 0 0 1 1.5 0M1 1.5v13a.5.5 0 0 0 .5.5H2v-4.5A1.5 1.5 0 0 1 3.5 9h9a1.5 1.5 0 0 1 1.5 1.5V15h.5a.5.5 0 0 0 .5-.5V2.914a.5.5 0 0 0-.146-.353l-1.415-1.415A.5.5 0 0 0 13.086 1H13v3.5A1.5 1.5 0 0 1 11.5 6h-7A1.5 1.5 0 0 1 3 4.5V1H1.5a.5.5 0 0 0-.5.5m9.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"></path></svg></button> <button title="Close edit mode"><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>',1),Ag=wt("<div><!></div>"),$g=wt('<div style="padding: 5px;"><!></div> <details class="svelte-17un9g9"><summary class="svelte-17un9g9">Meta</summary> <table class="resp-table svelte-17un9g9"><tbody><tr class="svelte-17un9g9"><td class="svelte-17un9g9"> </td><td class="svelte-17un9g9"> </td></tr></tbody></table> <!></details> <details class="svelte-17un9g9"><summary class="svelte-17un9g9">Actions</summary></details> <details open class="svelte-17un9g9"><summary class="svelte-17un9g9">Doc <!></summary> <!></details>',1);const Ig={hash:"svelte-17un9g9",code:`.submit-btn.svelte-17un9g9 {padding:7px;font-size:14px;margin-top:4px;}.dd.svelte-17un9g9 {font-size:14px;padding:7px;}.title.svelte-17un9g9 {margin:0;flex:1;}.title-input.svelte-17un9g9 {flex:1;margin:0;font-size:1.7em; /* Match h1 size */width:90%;}.resp-table.svelte-17un9g9 {border-collapse:collapse;width:100%;margin:1rem 0;}
|
|
65
|
+
.resp-table.svelte-17un9g9 td:where(.svelte-17un9g9) {
|
|
66
|
+
/* border: 1px solid #ddd; */padding:0.75rem;text-align:left;}
|
|
67
|
+
|
|
68
|
+
@media screen and (max-width: 600px) {.resp-table.svelte-17un9g9 tr:where(.svelte-17un9g9) {border-bottom:3px solid #ddd;display:block;margin-bottom:0.625rem;}.resp-table.svelte-17un9g9 td:where(.svelte-17un9g9) {
|
|
69
|
+
/* border-bottom: 1px solid #ddd; */display:block;text-align:right;}.resp-table.svelte-17un9g9 td:where(.svelte-17un9g9)::before {content:attr(data-label) ": ";float:left;font-weight:bold;text-transform:uppercase;}.resp-table.svelte-17un9g9 td:where(.svelte-17un9g9):last-child {border-bottom:0;}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* details[open] summary ~ * {
|
|
73
|
+
animation: open 0.3s ease-in-out;
|
|
74
|
+
} */
|
|
75
|
+
|
|
76
|
+
/* @keyframes open {
|
|
77
|
+
0% {
|
|
78
|
+
opacity: 0;
|
|
79
|
+
}
|
|
80
|
+
100% {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
} */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;}`};function jf(o,a){Uo(a,!0),Kl(o,Ig);let h=Vt(a,"BBDB",7),m=Vt(a,"new_doc",7,!0),y=Vt(a,"search_criteria",7),_=Vt(a,"schema_name",7),d=Vt(a,"mode",7,"view"),v=Vt(a,"edit_mode",7,"internal"),i=Vt(a,"setting_schemas",23,()=>({})),f=_t("Loading...");const p=(X,pe)=>{a.$$host.dispatchEvent(new CustomEvent("action",{detail:{name:X,...pe},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=_t(_r({selected_schema:"",schema:null,list:[],doc:null,doc_valid:!1})),k=_t(_r({doc:{},schema:{},data_valid:!0})),E=_t(""),O=_t(_r({edit_title:!1}));Gl(async()=>{try{if(!h())throw new Error("No instance of BBDB provided to the component");if(m())if(_())he(b).selected_schema=_(),he(b).schema=await j(_());else{let X=await h().get({type:"schema_list"});console.log(X),he(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 C()}st(f,"")}catch(X){console.error(X),st(f,`Error loading. ${X.message}`),p("message",{type:"error",message:he(f)})}});const j=async X=>(await h().get({type:"schema",criteria:{name:X}})).data.schema,x=async X=>{console.log(X),he(b).selected_schema="",he(b).schema=null,he(b).doc={},setTimeout(async()=>{he(b).selected_schema=X,he(b).selected_schema&&(he(b).schema=await j(X))},50)},S=async()=>{try{let X=await h().create({schema:he(b).selected_schema,data:he(b).doc,meta:{}});p("message_link",{type:"success",message:"Document added.",link:`${h().meta.database_name}.link.${X.meta.link}`})}catch(X){console.log(X),p("message",{type:"error",message:`${X.message}`})}},C=async()=>{try{let X=await h().read({...y(),include_schema:!0});st(k,X,!0),console.log(he(k)),L()}catch(X){console.log(X),p("message",{type:"error",message:`${X.message}`})}},L=()=>{st(E," ");let X=he(k).doc.schema;g[X]&&(st(E,ir.render(g[X].template,he(k)),!0),console.log(he(E)))};let T=_t(!1);const R=async X=>{if(he(T))throw new Error("Update already in progress");st(T,!0);try{let pe={},re={_id:he(k).doc._id};X=="title"?pe={meta:{title:he(k).doc.meta.title}}:X=="tags"?pe={meta:{tags:he(k).doc.meta.tags}}:X=="data"&&(pe={data:he(k).doc.data}),console.log(pe);let U=await h().update({criteria:re,updates:pe});console.log(U)}catch(pe){console.log(pe)}finally{st(T,!1)}},A=async(X,pe,re)=>{X.key==="Enter"&&X.target.value.trim()&&(await R(pe),re&&re())},I=async()=>{await R("tags")},D=(X,pe)=>{{const re=new Date(Number(X)*1e3);return isNaN(re.getTime())?"Invalid date":re.toLocaleString()}},M=()=>{d()!="edit"&&d("edit")},V=()=>{d()!="view"&&(L(),d("view"))},G=async()=>{await R("data")};var J={get BBDB(){return h()},set BBDB(X){h(X),Ct()},get new_doc(){return m()},set new_doc(X=!0){m(X),Ct()},get search_criteria(){return y()},set search_criteria(X){y(X),Ct()},get schema_name(){return _()},set schema_name(X){_(X),Ct()},get mode(){return d()},set mode(X="view"){d(X),Ct()},get edit_mode(){return v()},set edit_mode(X="internal"){v(X),Ct()},get setting_schemas(){return i()},set setting_schemas(X={}){i(X),Ct()}},Y=qi(),ce=Mt(Y);{var ue=X=>{var pe=Fb();hr(()=>sr(pe,he(f))),at(X,pe)},fe=X=>{var pe=qi(),re=Mt(pe);{var U=q=>{var N=Cg(),F=Mt(N);{var ie=ye=>{var H=jg(),K=ut(H);ot(H),hr(()=>sr(K,`Create new ${_()??""} doc`)),at(ye,H)},ke=ye=>{var H=Og(),K=ft(Mt(H),2);K.__change=de=>{x(de.target.value)};var te=ut(K);te.value=te.__value="";var se=ft(te);Rs(se,17,()=>he(b).list,Ts,(de,Ce)=>{var Ae=Eg(),Fe=ut(Ae,!0);ot(Ae);var Ue={};hr(()=>{sr(Fe,he(Ce).title),Ue!==(Ue=he(Ce).name)&&(Ae.value=(Ae.__value=he(Ce).name)??"")}),at(de,Ae)}),ot(K),at(ye,H)};rr(F,ye=>{_()?ye(ie):ye(ke,!1)})}var _e=ft(F,2);{var Oe=ye=>{var H=Sg(),K=Mt(H);$s(K,{mode:"new",get schema(){return he(b).schema},set schema(de){he(b).schema=de},get schema_name(){return he(b).selected_schema},set schema_name(de){he(b).selected_schema=de},get data(){return he(b).doc},set data(de){he(b).doc=de},get data_valid(){return he(b).doc_valid},set data_valid(de){he(b).doc_valid=de}});var te=ft(K,2);{var se=de=>{var Ce=xg(),Ae=Mt(Ce);Ae.__click=()=>{S()};var Fe=ft(Ae,2),Ue=ut(Fe,!0);ot(Fe),hr(Ke=>sr(Ue,Ke),[()=>JSON.stringify(he(b).doc,null,2)]),at(de,Ce)};rr(te,de=>{he(b).doc_valid&&de(se)})}at(ye,H)};rr(_e,ye=>{he(b).selected_schema&&ye(Oe)})}at(q,N)},ne=q=>{var N=$g(),F=Mt(N),ie=ut(F);{var ke=ve=>{var we=Pg(),Re=Mt(we);Qb(Re),Re.__keydown=vt=>{A(vt,"title",()=>{he(O).edit_title=!he(O).edit_title})};var Ne=ft(Re,2),it=ut(Ne);it.__click=()=>{R("title")};var lt=ft(it,2);lt.__click=()=>{he(O).edit_title=!he(O).edit_title},ot(Ne),eg(Re,()=>he(k).doc.meta.title,vt=>he(k).doc.meta.title=vt),at(ve,we)},_e=ve=>{var we=Tg();we.__dblclick=()=>{he(O).edit_title=!0};var Re=ut(we),Ne=ft(Re);Ne.__click=()=>{he(O).edit_title=!he(O).edit_title},ot(we),hr(()=>sr(Re,`${he(k).doc.meta.title??""} `)),at(ve,we)};rr(ie,ve=>{he(O).edit_title?ve(ke):ve(_e,!1)})}ot(F);var Oe=ft(F,2),ye=ft(ut(Oe),2),H=ut(ye),K=ut(H),te=ut(K),se=ut(te);ot(te);var de=ft(te),Ce=ut(de);ot(de),ot(K),ot(H),ot(ye);var Ae=ft(ye,2);kf(Ae,{saveTags:()=>{I()},get tags(){return he(k).doc.meta.tags},set tags(ve){he(k).doc.meta.tags=ve}}),ot(Oe);var Fe=ft(Oe,4),Ue=ut(Fe),Ke=ft(ut(Ue));{var et=ve=>{var we=Rg();we.__click=()=>M(),at(ve,we)},nt=ve=>{var we=qi(),Re=Mt(we);{var Ne=it=>{var lt=Lg(),vt=Mt(lt);vt.__click=()=>G();var gt=ft(vt,2);gt.__click=()=>V(),at(it,lt)};rr(Re,it=>{d()=="edit"&&it(Ne)},!0)}at(ve,we)};rr(Ke,ve=>{d()=="view"?ve(et):ve(nt,!1)})}ot(Ue);var We=ft(Ue,2);{var dt=ve=>{var we=Ag(),Re=ut(we);Wb(Re,()=>he(E)),ot(we),at(ve,we)},ge=ve=>{var we=qi(),Re=Mt(we);{var Ne=it=>{$s(it,{mode:"edit",get schema(){return he(k).schema},set schema(lt){he(k).schema=lt},get schema_name(){return he(k).doc.schema.schema},set schema_name(lt){he(k).doc.schema.schema=lt},get data(){return he(k).doc.data},set data(lt){he(k).doc.data=lt},get data_valid(){return he(k).doc_valid},set data_valid(lt){he(k).doc_valid=lt}})};rr(Re,it=>{d()=="edit"&&it(Ne)},!0)}at(ve,we)};rr(We,ve=>{d()=="view"?ve(dt):ve(ge,!1)})}ot(Fe),hr((ve,we)=>{sr(se,`Created On : ${ve??""}`),sr(Ce,`Updated On: ${we??""}`)},[()=>D(he(k).doc.meta.created_on),()=>D(he(k).doc.meta.updated_on)]),at(q,N)};rr(re,q=>{m()?q(U):q(ne,!1)},!0)}at(X,pe)};rr(ce,X=>{he(f)?X(ue):X(fe,!1)})}return at(o,Y),Go(J)}Hl(["change","click","keydown","dblclick"]),customElements.define("bbdb-doc",Hi(jf,{BBDB:{},new_doc:{},search_criteria:{},schema_name:{},mode:{},edit_mode:{},setting_schemas:{}},[],[],!0));const Ng=Tv;gn.BBDB=Ng,gn.DBList=wf,gn.Doc=jf,Object.defineProperty(gn,Symbol.toStringTag,{value:"Module"})}));
|
|
40
84
|
//# sourceMappingURL=main.umd.cjs.map
|