function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./CoreChatbotLoader-UsRmPIx9.js","./CoreChatbotLoader-CzZ8znJ5.css","./ComponentRenderer-BRt_Me-n.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-DJcTgXDs.css","./BuilderApp-DVqlivId.js","./marked.esm-273vDTCT.js","./BuilderApp-BNvb4SKa.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();const cw="modulepreload",uw=function(e,t){return new URL(e,t).href},rp={},Jt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=Promise.all(n.map(l=>{if(l=uw(l,r),l in rp)return;rp[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!r)for(let y=o.length-1;y>=0;y--){const b=o[y];if(b.href===l&&(!c||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${u}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":cw,c||(m.as="script",m.crossOrigin=""),m.href=l,i&&m.setAttribute("nonce",i),document.head.appendChild(m),c)return new Promise((y,b)=>{m.addEventListener("load",y),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${l}`)))})}))}return a.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function dl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const bt={},po=[],Xn=()=>{},dw=()=>!1,Os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Cu=e=>e.startsWith("onUpdate:"),Ft=Object.assign,$u=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fw=Object.prototype.hasOwnProperty,kt=(e,t)=>fw.call(e,t),Ye=Array.isArray,ho=e=>ko(e)==="[object Map]",Ka=e=>ko(e)==="[object Set]",ap=e=>ko(e)==="[object Date]",pw=e=>ko(e)==="[object RegExp]",at=e=>typeof e=="function",Vt=e=>typeof e=="string",vr=e=>typeof e=="symbol",Rt=e=>e!==null&&typeof e=="object",Su=e=>(Rt(e)||at(e))&&at(e.then)&&at(e.catch),Wh=Object.prototype.toString,ko=e=>Wh.call(e),hw=e=>ko(e).slice(8,-1),fl=e=>ko(e)==="[object Object]",Iu=e=>Vt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mo=dl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),pl=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mw=/-(\w)/g,vn=pl(e=>e.replace(mw,(t,n)=>n?n.toUpperCase():"")),vw=/\B([A-Z])/g,Ln=pl(e=>e.replace(vw,"-$1").toLowerCase()),Rs=pl(e=>e.charAt(0).toUpperCase()+e.slice(1)),cs=pl(e=>e?`on${Rs(e)}`:""),Tn=(e,t)=>!Object.is(e,t),vo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},qh=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Ui=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Hi=e=>{const t=Vt(e)?Number(e):NaN;return isNaN(t)?e:t};let op;const hl=()=>op||(op=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),gw="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",yw=dl(gw);function mt(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],a=Vt(r)?Aw(r):mt(r);if(a)for(const o in a)t[o]=a[o]}return t}else if(Vt(e)||Rt(e))return e}const _w=/;(?![^(]*\))/g,bw=/:([^]+)/,ww=/\/\*[^]*?\*\//g;function Aw(e){const t={};return e.replace(ww,"").split(_w).forEach(n=>{if(n){const r=n.split(bw);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function it(e){let t="";if(Vt(e))t=e;else if(Ye(e))for(let n=0;n<e.length;n++){const r=it(e[n]);r&&(t+=r+" ")}else if(Rt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Cw(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Vt(t)&&(e.class=it(t)),n&&(e.style=mt(n)),e}const $w="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Sw=dl($w);function Gh(e){return!!e||e===""}function Iw(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=fa(e[r],t[r]);return n}function fa(e,t){if(e===t)return!0;let n=ap(e),r=ap(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=vr(e),r=vr(t),n||r)return e===t;if(n=Ye(e),r=Ye(t),n||r)return n&&r?Iw(e,t):!1;if(n=Rt(e),r=Rt(t),n||r){if(!n||!r)return!1;const a=Object.keys(e).length,o=Object.keys(t).length;if(a!==o)return!1;for(const s in e){const i=e.hasOwnProperty(s),l=t.hasOwnProperty(s);if(i&&!l||!i&&l||!fa(e[s],t[s]))return!1}}return String(e)===String(t)}function ml(e,t){return e.findIndex(n=>fa(n,t))}const Jh=e=>!!(e&&e.__v_isRef===!0),Pe=e=>Vt(e)?e:e==null?"":Ye(e)||Rt(e)&&(e.toString===Wh||!at(e.toString))?Jh(e)?Pe(e.value):JSON.stringify(e,Yh,2):String(e),Yh=(e,t)=>Jh(t)?Yh(e,t.value):ho(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,a],o)=>(n[gc(r,o)+" =>"]=a,n),{})}:Ka(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>gc(n))}:vr(t)?gc(t):Rt(t)&&!Ye(t)&&!fl(t)?String(t):t,gc=(e,t="")=>{var n;return vr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let In;class Eu{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=In,!t&&In&&(this.index=(In.scopes||(In.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=In;try{return In=this,t()}finally{In=n}}}on(){In=this}off(){In=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Ew(e){return new Eu(e)}function Qh(){return In}function kw(e,t=!1){In&&In.cleanups.push(e)}let Bt;const yc=new WeakSet;class Cs{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,In&&In.active&&In.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,yc.has(this)&&(yc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Zh(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sp(this),em(this);const t=Bt,n=pr;Bt=this,pr=!0;try{return this.fn()}finally{tm(this),Bt=t,pr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)xu(t);this.deps=this.depsTail=void 0,sp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?yc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Hc(this)&&this.run()}get dirty(){return Hc(this)}}let Xh=0,us,ds;function Zh(e,t=!1){if(e.flags|=8,t){e.next=ds,ds=e;return}e.next=us,us=e}function ku(){Xh++}function Tu(){if(--Xh>0)return;if(ds){let t=ds;for(ds=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;us;){let t=us;for(us=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function em(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function tm(e){let t,n=e.depsTail,r=n;for(;r;){const a=r.prevDep;r.version===-1?(r===n&&(n=a),xu(r),Tw(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=a}e.deps=t,e.depsTail=n}function Hc(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(nm(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function nm(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===$s))return;e.globalVersion=$s;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Hc(e)){e.flags&=-3;return}const n=Bt,r=pr;Bt=e,pr=!0;try{em(e);const a=e.fn(e._value);(t.version===0||Tn(a,e._value))&&(e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Bt=n,pr=r,tm(e),e.flags&=-3}}function xu(e,t=!1){const{dep:n,prevSub:r,nextSub:a}=e;if(r&&(r.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)xu(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Tw(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function xw(e,t){e.effect instanceof Cs&&(e=e.effect.fn);const n=new Cs(e);t&&Ft(n,t);try{n.run()}catch(a){throw n.stop(),a}const r=n.run.bind(n);return r.effect=n,r}function Pw(e){e.effect.stop()}let pr=!0;const rm=[];function _a(){rm.push(pr),pr=!1}function ba(){const e=rm.pop();pr=e===void 0?!0:e}function sp(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Bt;Bt=void 0;try{t()}finally{Bt=n}}}let $s=0;class Mw{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class vl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Bt||!pr||Bt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Bt)n=this.activeLink=new Mw(Bt,this),Bt.deps?(n.prevDep=Bt.depsTail,Bt.depsTail.nextDep=n,Bt.depsTail=n):Bt.deps=Bt.depsTail=n,am(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Bt.depsTail,n.nextDep=void 0,Bt.depsTail.nextDep=n,Bt.depsTail=n,Bt.deps===n&&(Bt.deps=r)}return n}trigger(t){this.version++,$s++,this.notify(t)}notify(t){ku();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Tu()}}}function am(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)am(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const zi=new WeakMap,Da=Symbol(""),zc=Symbol(""),Ss=Symbol("");function bn(e,t,n){if(pr&&Bt){let r=zi.get(e);r||zi.set(e,r=new Map);let a=r.get(n);a||(r.set(n,a=new vl),a.map=r,a.key=n),a.track()}}function Dr(e,t,n,r,a,o){const s=zi.get(e);if(!s){$s++;return}const i=l=>{l&&l.trigger()};if(ku(),t==="clear")s.forEach(i);else{const l=Ye(e),c=l&&Iu(n);if(l&&n==="length"){const u=Number(r);s.forEach((d,m)=>{(m==="length"||m===Ss||!vr(m)&&m>=u)&&i(d)})}else switch((n!==void 0||s.has(void 0))&&i(s.get(n)),c&&i(s.get(Ss)),t){case"add":l?c&&i(s.get("length")):(i(s.get(Da)),ho(e)&&i(s.get(zc)));break;case"delete":l||(i(s.get(Da)),ho(e)&&i(s.get(zc)));break;case"set":ho(e)&&i(s.get(Da));break}}Tu()}function Nw(e,t){const n=zi.get(e);return n&&n.get(t)}function ro(e){const t=ft(e);return t===e?t:(bn(t,"iterate",Ss),Kn(e)?t:t.map(wn))}function gl(e){return bn(e=ft(e),"iterate",Ss),e}const Ow={__proto__:null,[Symbol.iterator](){return _c(this,Symbol.iterator,wn)},concat(...e){return ro(this).concat(...e.map(t=>Ye(t)?ro(t):t))},entries(){return _c(this,"entries",e=>(e[1]=wn(e[1]),e))},every(e,t){return Or(this,"every",e,t,void 0,arguments)},filter(e,t){return Or(this,"filter",e,t,n=>n.map(wn),arguments)},find(e,t){return Or(this,"find",e,t,wn,arguments)},findIndex(e,t){return Or(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Or(this,"findLast",e,t,wn,arguments)},findLastIndex(e,t){return Or(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Or(this,"forEach",e,t,void 0,arguments)},includes(...e){return bc(this,"includes",e)},indexOf(...e){return bc(this,"indexOf",e)},join(e){return ro(this).join(e)},lastIndexOf(...e){return bc(this,"lastIndexOf",e)},map(e,t){return Or(this,"map",e,t,void 0,arguments)},pop(){return Go(this,"pop")},push(...e){return Go(this,"push",e)},reduce(e,...t){return ip(this,"reduce",e,t)},reduceRight(e,...t){return ip(this,"reduceRight",e,t)},shift(){return Go(this,"shift")},some(e,t){return Or(this,"some",e,t,void 0,arguments)},splice(...e){return Go(this,"splice",e)},toReversed(){return ro(this).toReversed()},toSorted(e){return ro(this).toSorted(e)},toSpliced(...e){return ro(this).toSpliced(...e)},unshift(...e){return Go(this,"unshift",e)},values(){return _c(this,"values",wn)}};function _c(e,t,n){const r=gl(e),a=r[t]();return r!==e&&!Kn(e)&&(a._next=a.next,a.next=()=>{const o=a._next();return o.value&&(o.value=n(o.value)),o}),a}const Rw=Array.prototype;function Or(e,t,n,r,a,o){const s=gl(e),i=s!==e&&!Kn(e),l=s[t];if(l!==Rw[t]){const d=l.apply(e,o);return i?wn(d):d}let c=n;s!==e&&(i?c=function(d,m){return n.call(this,wn(d),m,e)}:n.length>2&&(c=function(d,m){return n.call(this,d,m,e)}));const u=l.call(s,c,r);return i&&a?a(u):u}function ip(e,t,n,r){const a=gl(e);let o=n;return a!==e&&(Kn(e)?n.length>3&&(o=function(s,i,l){return n.call(this,s,i,l,e)}):o=function(s,i,l){return n.call(this,s,wn(i),l,e)}),a[t](o,...r)}function bc(e,t,n){const r=ft(e);bn(r,"iterate",Ss);const a=r[t](...n);return(a===-1||a===!1)&&wl(n[0])?(n[0]=ft(n[0]),r[t](...n)):a}function Go(e,t,n=[]){_a(),ku();const r=ft(e)[t].apply(e,n);return Tu(),ba(),r}const Lw=dl("__proto__,__v_isRef,__isVue"),om=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(vr));function Dw(e){vr(e)||(e=String(e));const t=ft(this);return bn(t,"has",e),t.hasOwnProperty(e)}class sm{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const a=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(a?o?fm:dm:o?um:cm).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=Ye(t);if(!a){let l;if(s&&(l=Ow[n]))return l;if(n==="hasOwnProperty")return Dw}const i=Reflect.get(t,n,Qt(t)?t:r);return(vr(n)?om.has(n):Lw(n))||(a||bn(t,"get",n),o)?i:Qt(i)?s&&Iu(n)?i:i.value:Rt(i)?a?En(i):_l(i):i}}class im extends sm{constructor(t=!1){super(!1,t)}set(t,n,r,a){let o=t[n];if(!this._isShallow){const l=pa(o);if(!Kn(r)&&!pa(r)&&(o=ft(o),r=ft(r)),!Ye(t)&&Qt(o)&&!Qt(r))return l?!1:(o.value=r,!0)}const s=Ye(t)&&Iu(n)?Number(n)<t.length:kt(t,n),i=Reflect.set(t,n,r,Qt(t)?t:a);return t===ft(a)&&(s?Tn(r,o)&&Dr(t,"set",n,r):Dr(t,"add",n,r)),i}deleteProperty(t,n){const r=kt(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&r&&Dr(t,"delete",n,void 0),a}has(t,n){const r=Reflect.has(t,n);return(!vr(n)||!om.has(n))&&bn(t,"has",n),r}ownKeys(t){return bn(t,"iterate",Ye(t)?"length":Da),Reflect.ownKeys(t)}}class lm extends sm{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Fw=new im,jw=new lm,Bw=new im(!0),Vw=new lm(!0),Kc=e=>e,li=e=>Reflect.getPrototypeOf(e);function Uw(e,t,n){return function(...r){const a=this.__v_raw,o=ft(a),s=ho(o),i=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=a[e](...r),u=n?Kc:t?Wc:wn;return!t&&bn(o,"iterate",l?zc:Da),{next(){const{value:d,done:m}=c.next();return m?{value:d,done:m}:{value:i?[u(d[0]),u(d[1])]:u(d),done:m}},[Symbol.iterator](){return this}}}}function ci(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hw(e,t){const n={get(a){const o=this.__v_raw,s=ft(o),i=ft(a);e||(Tn(a,i)&&bn(s,"get",a),bn(s,"get",i));const{has:l}=li(s),c=t?Kc:e?Wc:wn;if(l.call(s,a))return c(o.get(a));if(l.call(s,i))return c(o.get(i));o!==s&&o.get(a)},get size(){const a=this.__v_raw;return!e&&bn(ft(a),"iterate",Da),Reflect.get(a,"size",a)},has(a){const o=this.__v_raw,s=ft(o),i=ft(a);return e||(Tn(a,i)&&bn(s,"has",a),bn(s,"has",i)),a===i?o.has(a):o.has(a)||o.has(i)},forEach(a,o){const s=this,i=s.__v_raw,l=ft(i),c=t?Kc:e?Wc:wn;return!e&&bn(l,"iterate",Da),i.forEach((u,d)=>a.call(o,c(u),c(d),s))}};return Ft(n,e?{add:ci("add"),set:ci("set"),delete:ci("delete"),clear:ci("clear")}:{add(a){!t&&!Kn(a)&&!pa(a)&&(a=ft(a));const o=ft(this);return li(o).has.call(o,a)||(o.add(a),Dr(o,"add",a,a)),this},set(a,o){!t&&!Kn(o)&&!pa(o)&&(o=ft(o));const s=ft(this),{has:i,get:l}=li(s);let c=i.call(s,a);c||(a=ft(a),c=i.call(s,a));const u=l.call(s,a);return s.set(a,o),c?Tn(o,u)&&Dr(s,"set",a,o):Dr(s,"add",a,o),this},delete(a){const o=ft(this),{has:s,get:i}=li(o);let l=s.call(o,a);l||(a=ft(a),l=s.call(o,a)),i&&i.call(o,a);const c=o.delete(a);return l&&Dr(o,"delete",a,void 0),c},clear(){const a=ft(this),o=a.size!==0,s=a.clear();return o&&Dr(a,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=Uw(a,e,t)}),n}function yl(e,t){const n=Hw(e,t);return(r,a,o)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?r:Reflect.get(kt(n,a)&&a in r?n:r,a,o)}const zw={get:yl(!1,!1)},Kw={get:yl(!1,!0)},Ww={get:yl(!0,!1)},qw={get:yl(!0,!0)},cm=new WeakMap,um=new WeakMap,dm=new WeakMap,fm=new WeakMap;function Gw(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jw(e){return e.__v_skip||!Object.isExtensible(e)?0:Gw(hw(e))}function _l(e){return pa(e)?e:bl(e,!1,Fw,zw,cm)}function pm(e){return bl(e,!1,Bw,Kw,um)}function En(e){return bl(e,!0,jw,Ww,dm)}function Yw(e){return bl(e,!0,Vw,qw,fm)}function bl(e,t,n,r,a){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=a.get(e);if(o)return o;const s=Jw(e);if(s===0)return e;const i=new Proxy(e,s===2?r:n);return a.set(e,i),i}function la(e){return pa(e)?la(e.__v_raw):!!(e&&e.__v_isReactive)}function pa(e){return!!(e&&e.__v_isReadonly)}function Kn(e){return!!(e&&e.__v_isShallow)}function wl(e){return e?!!e.__v_raw:!1}function ft(e){const t=e&&e.__v_raw;return t?ft(t):e}function hm(e){return!kt(e,"__v_skip")&&Object.isExtensible(e)&&qh(e,"__v_skip",!0),e}const wn=e=>Rt(e)?_l(e):e,Wc=e=>Rt(e)?En(e):e;function Qt(e){return e?e.__v_isRef===!0:!1}function $e(e){return mm(e,!1)}function hr(e){return mm(e,!0)}function mm(e,t){return Qt(e)?e:new Qw(e,t)}class Qw{constructor(t,n){this.dep=new vl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ft(t),this._value=n?t:wn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Kn(t)||pa(t);t=r?t:ft(t),Tn(t,n)&&(this._rawValue=t,this._value=r?t:wn(t),this.dep.trigger())}}function Xw(e){e.dep&&e.dep.trigger()}function P(e){return Qt(e)?e.value:e}function Zw(e){return at(e)?e():P(e)}const e1={get:(e,t,n)=>t==="__v_raw"?e:P(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const a=e[t];return Qt(a)&&!Qt(n)?(a.value=n,!0):Reflect.set(e,t,n,r)}};function Pu(e){return la(e)?e:new Proxy(e,e1)}class t1{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new vl,{get:r,set:a}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=a}get value(){return this._value=this._get()}set value(t){this._set(t)}}function vm(e){return new t1(e)}function Mu(e){const t=Ye(e)?new Array(e.length):{};for(const n in e)t[n]=gm(e,n);return t}class n1{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Nw(ft(this._object),this._key)}}class r1{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ha(e,t,n){return Qt(e)?e:at(e)?new r1(e):Rt(e)&&arguments.length>1?gm(e,t,n):$e(e)}function gm(e,t,n){const r=e[t];return Qt(r)?r:new n1(e,t,n)}class a1{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new vl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$s-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Bt!==this)return Zh(this,!0),!0}get value(){const t=this.dep.track();return nm(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function o1(e,t,n=!1){let r,a;return at(e)?r=e:(r=e.get,a=e.set),new a1(r,a,n)}const s1={GET:"get",HAS:"has",ITERATE:"iterate"},i1={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},ui={},Ki=new WeakMap;let ra;function l1(){return ra}function ym(e,t=!1,n=ra){if(n){let r=Ki.get(n);r||Ki.set(n,r=[]),r.push(e)}}function c1(e,t,n=bt){const{immediate:r,deep:a,once:o,scheduler:s,augmentJob:i,call:l}=n,c=p=>a?p:Kn(p)||a===!1||a===0?Fr(p,1):Fr(p);let u,d,m,y,b=!1,v=!1;if(Qt(e)?(d=()=>e.value,b=Kn(e)):la(e)?(d=()=>c(e),b=!0):Ye(e)?(v=!0,b=e.some(p=>la(p)||Kn(p)),d=()=>e.map(p=>{if(Qt(p))return p.value;if(la(p))return c(p);if(at(p))return l?l(p,2):p()})):at(e)?t?d=l?()=>l(e,2):e:d=()=>{if(m){_a();try{m()}finally{ba()}}const p=ra;ra=u;try{return l?l(e,3,[y]):e(y)}finally{ra=p}}:d=Xn,t&&a){const p=d,w=a===!0?1/0:a;d=()=>Fr(p(),w)}const _=Qh(),A=()=>{u.stop(),_&&_.active&&$u(_.effects,u)};if(o&&t){const p=t;t=(...w)=>{p(...w),A()}}let $=v?new Array(e.length).fill(ui):ui;const g=p=>{if(!(!(u.flags&1)||!u.dirty&&!p))if(t){const w=u.run();if(a||b||(v?w.some((S,F)=>Tn(S,$[F])):Tn(w,$))){m&&m();const S=ra;ra=u;try{const F=[w,$===ui?void 0:v&&$[0]===ui?[]:$,y];l?l(t,3,F):t(...F),$=w}finally{ra=S}}}else u.run()};return i&&i(g),u=new Cs(d),u.scheduler=s?()=>s(g,!1):g,y=p=>ym(p,!1,u),m=u.onStop=()=>{const p=Ki.get(u);if(p){if(l)l(p,4);else for(const w of p)w();Ki.delete(u)}},t?r?g(!0):$=u.run():s?s(g.bind(null,!0),!0):u.run(),A.pause=u.pause.bind(u),A.resume=u.resume.bind(u),A.stop=A,A}function Fr(e,t=1/0,n){if(t<=0||!Rt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Qt(e))Fr(e.value,t,n);else if(Ye(e))for(let r=0;r<e.length;r++)Fr(e[r],t,n);else if(Ka(e)||ho(e))e.forEach(r=>{Fr(r,t,n)});else if(fl(e)){for(const r in e)Fr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Fr(e[r],t,n)}return e}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const _m=[];function u1(e){_m.push(e)}function d1(){_m.pop()}function f1(e,t){}const p1={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},h1={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function To(e,t,n,r){try{return r?e(...r):e()}catch(a){Wa(a,t,n)}}function er(e,t,n,r){if(at(e)){const a=To(e,t,n,r);return a&&Su(a)&&a.catch(o=>{Wa(o,t,n)}),a}if(Ye(e)){const a=[];for(let o=0;o<e.length;o++)a.push(er(e[o],t,n,r));return a}}function Wa(e,t,n,r=!0){const a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||bt;if(t){let i=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}i=i.parent}if(o){_a(),To(o,null,10,[e,l,c]),ba();return}}m1(e,n,a,r,s)}function m1(e,t,n,r=!0,a=!1){if(a)throw e;console.error(e)}const xn=[];let br=-1;const go=[];let aa=null,io=0;const bm=Promise.resolve();let Wi=null;function Fn(e){const t=Wi||bm;return e?t.then(this?e.bind(this):e):t}function v1(e){let t=br+1,n=xn.length;for(;t<n;){const r=t+n>>>1,a=xn[r],o=Es(a);o<e||o===e&&a.flags&2?t=r+1:n=r}return t}function Nu(e){if(!(e.flags&1)){const t=Es(e),n=xn[xn.length-1];!n||!(e.flags&2)&&t>=Es(n)?xn.push(e):xn.splice(v1(t),0,e),e.flags|=1,wm()}}function wm(){Wi||(Wi=bm.then(Am))}function Is(e){Ye(e)?go.push(...e):aa&&e.id===-1?aa.splice(io+1,0,e):e.flags&1||(go.push(e),e.flags|=1),wm()}function lp(e,t,n=br+1){for(;n<xn.length;n++){const r=xn[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;xn.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function qi(e){if(go.length){const t=[...new Set(go)].sort((n,r)=>Es(n)-Es(r));if(go.length=0,aa){aa.push(...t);return}for(aa=t,io=0;io<aa.length;io++){const n=aa[io];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}aa=null,io=0}}const Es=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Am(e){try{for(br=0;br<xn.length;br++){const t=xn[br];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),To(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;br<xn.length;br++){const t=xn[br];t&&(t.flags&=-2)}br=-1,xn.length=0,qi(),Wi=null,(xn.length||go.length)&&Am()}}let lo,di=[];function Cm(e,t){var n,r;lo=e,lo?(lo.enabled=!0,di.forEach(({event:a,args:o})=>lo.emit(a,...o)),di=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Cm(o,t)}),setTimeout(()=>{lo||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,di=[])},3e3)):di=[]}let on=null,Al=null;function ks(e){const t=on;return on=e,Al=e&&e.type.__scopeId||null,t}function g1(e){Al=e}function y1(){Al=null}const _1=e=>Ze;function Ze(e,t=on,n){if(!t||e._n)return e;const r=(...a)=>{r._d&&tu(-1);const o=ks(t);let s;try{s=e(...a)}finally{ks(o),r._d&&tu(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function sn(e,t){if(on===null)return e;const n=Fs(on),r=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[o,s,i,l=bt]=t[a];o&&(at(o)&&(o={mounted:o,updated:o}),o.deep&&Fr(s),r.push({dir:o,instance:n,value:s,oldValue:void 0,arg:i,modifiers:l}))}return e}function wr(e,t,n,r){const a=e.dirs,o=t&&t.dirs;for(let s=0;s<a.length;s++){const i=a[s];o&&(i.oldValue=o[s].value);let l=i.dir[r];l&&(_a(),er(l,n,8,[e.el,i,e,t]),ba())}}const $m=Symbol("_vte"),Sm=e=>e.__isTeleport,fs=e=>e&&(e.disabled||e.disabled===""),cp=e=>e&&(e.defer||e.defer===""),up=e=>typeof SVGElement<"u"&&e instanceof SVGElement,dp=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,qc=(e,t)=>{const n=e&&e.to;return Vt(n)?t?t(n):null:n},Im={name:"Teleport",__isTeleport:!0,process(e,t,n,r,a,o,s,i,l,c){const{mc:u,pc:d,pbc:m,o:{insert:y,querySelector:b,createText:v,createComment:_}}=c,A=fs(t.props);let{shapeFlag:$,children:g,dynamicChildren:p}=t;if(e==null){const w=t.el=v(""),S=t.anchor=v("");y(w,n,r),y(S,n,r);const F=(re,ce)=>{$&16&&(a&&a.isCE&&(a.ce._teleportTarget=re),u(g,re,ce,a,o,s,i,l))},Z=()=>{const re=t.target=qc(t.props,b),ce=Em(re,t,v,y);re&&(s!=="svg"&&up(re)?s="svg":s!=="mathml"&&dp(re)&&(s="mathml"),A||(F(re,ce),Pi(t,!1)))};A&&(F(n,S),Pi(t,!0)),cp(t.props)?nn(()=>{Z(),t.el.__isMounted=!0},o):Z()}else{if(cp(t.props)&&!e.el.__isMounted){nn(()=>{Im.process(e,t,n,r,a,o,s,i,l,c),delete e.el.__isMounted},o);return}t.el=e.el,t.targetStart=e.targetStart;const w=t.anchor=e.anchor,S=t.target=e.target,F=t.targetAnchor=e.targetAnchor,Z=fs(e.props),re=Z?n:S,ce=Z?w:F;if(s==="svg"||up(S)?s="svg":(s==="mathml"||dp(S))&&(s="mathml"),p?(m(e.dynamicChildren,p,re,a,o,s,i),Hu(e,t,!0)):l||d(e,t,re,ce,a,o,s,i,!1),A)Z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):fi(t,n,w,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Oe=t.target=qc(t.props,b);Oe&&fi(t,Oe,null,c,0)}else Z&&fi(t,S,F,c,1);Pi(t,A)}},remove(e,t,n,{um:r,o:{remove:a}},o){const{shapeFlag:s,children:i,anchor:l,targetStart:c,targetAnchor:u,target:d,props:m}=e;if(d&&(a(c),a(u)),o&&a(l),s&16){const y=o||!fs(m);for(let b=0;b<i.length;b++){const v=i[b];r(v,t,n,y,!!v.dynamicChildren)}}},move:fi,hydrate:b1};function fi(e,t,n,{o:{insert:r},m:a},o=2){o===0&&r(e.targetAnchor,t,n);const{el:s,anchor:i,shapeFlag:l,children:c,props:u}=e,d=o===2;if(d&&r(s,t,n),(!d||fs(u))&&l&16)for(let m=0;m<c.length;m++)a(c[m],t,n,2);d&&r(i,t,n)}function b1(e,t,n,r,a,o,{o:{nextSibling:s,parentNode:i,querySelector:l,insert:c,createText:u}},d){const m=t.target=qc(t.props,l);if(m){const y=fs(t.props),b=m._lpa||m.firstChild;if(t.shapeFlag&16)if(y)t.anchor=d(s(e),t,i(e),n,r,a,o),t.targetStart=b,t.targetAnchor=b&&s(b);else{t.anchor=s(e);let v=b;for(;v;){if(v&&v.nodeType===8){if(v.data==="teleport start anchor")t.targetStart=v;else if(v.data==="teleport anchor"){t.targetAnchor=v,m._lpa=t.targetAnchor&&s(t.targetAnchor);break}}v=s(v)}t.targetAnchor||Em(m,t,u,c),d(b&&s(b),t,m,n,r,a,o)}Pi(t,y)}return t.anchor&&s(t.anchor)}const w1=Im;function Pi(e,t){const n=e.ctx;if(n&&n.ut){let r,a;for(t?(r=e.el,a=e.anchor):(r=e.targetStart,a=e.targetAnchor);r&&r!==a;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Em(e,t,n,r){const a=t.targetStart=n(""),o=t.targetAnchor=n("");return a[$m]=o,e&&(r(a,e),r(o,e)),o}const oa=Symbol("_leaveCb"),pi=Symbol("_enterCb");function Ou(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Xt(()=>{e.isMounted=!0}),wa(()=>{e.isUnmounting=!0}),e}const Gn=[Function,Array],Ru={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gn,onEnter:Gn,onAfterEnter:Gn,onEnterCancelled:Gn,onBeforeLeave:Gn,onLeave:Gn,onAfterLeave:Gn,onLeaveCancelled:Gn,onBeforeAppear:Gn,onAppear:Gn,onAfterAppear:Gn,onAppearCancelled:Gn},km=e=>{const t=e.subTree;return t.component?km(t.component):t},A1={name:"BaseTransition",props:Ru,setup(e,{slots:t}){const n=nr(),r=Ou();return()=>{const a=t.default&&Cl(t.default(),!0);if(!a||!a.length)return;const o=Tm(a),s=ft(e),{mode:i}=s;if(r.isLeaving)return wc(o);const l=fp(o);if(!l)return wc(o);let c=Ao(l,s,r,n,d=>c=d);l.type!==Yt&&Ur(l,c);let u=n.subTree&&fp(n.subTree);if(u&&u.type!==Yt&&!dr(l,u)&&km(n).type!==Yt){let d=Ao(u,s,r,n);if(Ur(u,d),i==="out-in"&&l.type!==Yt)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},wc(o);i==="in-out"&&l.type!==Yt?d.delayLeave=(m,y,b)=>{const v=Pm(r,u);v[String(u.key)]=u,m[oa]=()=>{y(),m[oa]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{b(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Tm(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Yt){t=n;break}}return t}const xm=A1;function Pm(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ao(e,t,n,r,a){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:m,onLeave:y,onAfterLeave:b,onLeaveCancelled:v,onBeforeAppear:_,onAppear:A,onAfterAppear:$,onAppearCancelled:g}=t,p=String(e.key),w=Pm(n,e),S=(re,ce)=>{re&&er(re,r,9,ce)},F=(re,ce)=>{const Oe=ce[1];S(re,ce),Ye(re)?re.every(ge=>ge.length<=1)&&Oe():re.length<=1&&Oe()},Z={mode:s,persisted:i,beforeEnter(re){let ce=l;if(!n.isMounted)if(o)ce=_||l;else return;re[oa]&&re[oa](!0);const Oe=w[p];Oe&&dr(e,Oe)&&Oe.el[oa]&&Oe.el[oa](),S(ce,[re])},enter(re){let ce=c,Oe=u,ge=d;if(!n.isMounted)if(o)ce=A||c,Oe=$||u,ge=g||d;else return;let we=!1;const _e=re[pi]=Ke=>{we||(we=!0,Ke?S(ge,[re]):S(Oe,[re]),Z.delayedLeave&&Z.delayedLeave(),re[pi]=void 0)};ce?F(ce,[re,_e]):_e()},leave(re,ce){const Oe=String(e.key);if(re[pi]&&re[pi](!0),n.isUnmounting)return ce();S(m,[re]);let ge=!1;const we=re[oa]=_e=>{ge||(ge=!0,ce(),_e?S(v,[re]):S(b,[re]),re[oa]=void 0,w[Oe]===e&&delete w[Oe])};w[Oe]=e,y?F(y,[re,we]):we()},clone(re){const ce=Ao(re,t,n,r,a);return a&&a(ce),ce}};return Z}function wc(e){if(Ls(e))return e=Ir(e),e.children=null,e}function fp(e){if(!Ls(e))return Sm(e.type)&&e.children?Tm(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&at(n.default))return n.default()}}function Ur(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ur(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Cl(e,t=!1,n){let r=[],a=0;for(let o=0;o<e.length;o++){let s=e[o];const i=n==null?s.key:String(n)+String(s.key!=null?s.key:o);s.type===Ve?(s.patchFlag&128&&a++,r=r.concat(Cl(s.children,t,i))):(t||s.type!==Yt)&&r.push(i!=null?Ir(s,{key:i}):s)}if(a>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function ke(e,t){return at(e)?Ft({name:e.name},t,{setup:e}):e}function C1(){const e=nr();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Lu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function et(e){const t=nr(),n=hr(null);if(t){const a=t.refs===bt?t.refs={}:t.refs;Object.defineProperty(a,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function Ts(e,t,n,r,a=!1){if(Ye(e)){e.forEach((b,v)=>Ts(b,t&&(Ye(t)?t[v]:t),n,r,a));return}if(ca(r)&&!a){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ts(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Fs(r.component):r.el,s=a?null:o,{i,r:l}=e,c=t&&t.r,u=i.refs===bt?i.refs={}:i.refs,d=i.setupState,m=ft(d),y=d===bt?()=>!1:b=>kt(m,b);if(c!=null&&c!==l&&(Vt(c)?(u[c]=null,y(c)&&(d[c]=null)):Qt(c)&&(c.value=null)),at(l))To(l,i,12,[s,u]);else{const b=Vt(l),v=Qt(l);if(b||v){const _=()=>{if(e.f){const A=b?y(l)?d[l]:u[l]:l.value;a?Ye(A)&&$u(A,o):Ye(A)?A.includes(o)||A.push(o):b?(u[l]=[o],y(l)&&(d[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else b?(u[l]=s,y(l)&&(d[l]=s)):v&&(l.value=s,e.k&&(u[e.k]=s))};s?(_.id=-1,nn(_,n)):_()}}}let pp=!1;const ao=()=>{pp||(console.error("Hydration completed but contains mismatches."),pp=!0)},$1=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",S1=e=>e.namespaceURI.includes("MathML"),hi=e=>{if(e.nodeType===1){if($1(e))return"svg";if(S1(e))return"mathml"}},fo=e=>e.nodeType===8;function I1(e){const{mt:t,p:n,o:{patchProp:r,createText:a,nextSibling:o,parentNode:s,remove:i,insert:l,createComment:c}}=e,u=(g,p)=>{if(!p.hasChildNodes()){n(null,g,p),qi(),p._vnode=g;return}d(p.firstChild,g,null,null,null),qi(),p._vnode=g},d=(g,p,w,S,F,Z=!1)=>{Z=Z||!!p.dynamicChildren;const re=fo(g)&&g.data==="[",ce=()=>v(g,p,w,S,F,re),{type:Oe,ref:ge,shapeFlag:we,patchFlag:_e}=p;let Ke=g.nodeType;p.el=g,_e===-2&&(Z=!1,p.dynamicChildren=null);let Ee=null;switch(Oe){case ua:Ke!==3?p.children===""?(l(p.el=a(""),s(g),g),Ee=g):Ee=ce():(g.data!==p.children&&(ao(),g.data=p.children),Ee=o(g));break;case Yt:$(g)?(Ee=o(g),A(p.el=g.content.firstChild,g,w)):Ke!==8||re?Ee=ce():Ee=o(g);break;case ja:if(re&&(g=o(g),Ke=g.nodeType),Ke===1||Ke===3){Ee=g;const Ae=!p.children.length;for(let be=0;be<p.staticCount;be++)Ae&&(p.children+=Ee.nodeType===1?Ee.outerHTML:Ee.data),be===p.staticCount-1&&(p.anchor=Ee),Ee=o(Ee);return re?o(Ee):Ee}else ce();break;case Ve:re?Ee=b(g,p,w,S,F,Z):Ee=ce();break;default:if(we&1)(Ke!==1||p.type.toLowerCase()!==g.tagName.toLowerCase())&&!$(g)?Ee=ce():Ee=m(g,p,w,S,F,Z);else if(we&6){p.slotScopeIds=F;const Ae=s(g);if(re?Ee=_(g):fo(g)&&g.data==="teleport start"?Ee=_(g,g.data,"teleport end"):Ee=o(g),t(p,Ae,null,w,S,hi(Ae),Z),ca(p)&&!p.type.__asyncResolved){let be;re?(be=Ge(Ve),be.anchor=Ee?Ee.previousSibling:Ae.lastChild):be=g.nodeType===3?Dt(""):Ge("div"),be.el=g,p.component.subTree=be}}else we&64?Ke!==8?Ee=ce():Ee=p.type.hydrate(g,p,w,S,F,Z,e,y):we&128&&(Ee=p.type.hydrate(g,p,w,S,hi(s(g)),F,Z,e,d))}return ge!=null&&Ts(ge,null,S,p),Ee},m=(g,p,w,S,F,Z)=>{Z=Z||!!p.dynamicChildren;const{type:re,props:ce,patchFlag:Oe,shapeFlag:ge,dirs:we,transition:_e}=p,Ke=re==="input"||re==="option";if(Ke||Oe!==-1){we&&wr(p,null,w,"created");let Ee=!1;if($(g)){Ee=rv(null,_e)&&w&&w.vnode.props&&w.vnode.props.appear;const be=g.content.firstChild;Ee&&_e.beforeEnter(be),A(be,g,w),p.el=g=be}if(ge&16&&!(ce&&(ce.innerHTML||ce.textContent))){let be=y(g.firstChild,p,g,w,S,F,Z);for(;be;){mi(g,1)||ao();const ve=be;be=be.nextSibling,i(ve)}}else if(ge&8){let be=p.children;be[0]===`
`&&(g.tagName==="PRE"||g.tagName==="TEXTAREA")&&(be=be.slice(1)),g.textContent!==be&&(mi(g,0)||ao(),g.textContent=p.children)}if(ce){if(Ke||!Z||Oe&48){const be=g.tagName.includes("-");for(const ve in ce)(Ke&&(ve.endsWith("value")||ve==="indeterminate")||Os(ve)&&!mo(ve)||ve[0]==="."||be)&&r(g,ve,null,ce[ve],void 0,w)}else if(ce.onClick)r(g,"onClick",null,ce.onClick,void 0,w);else if(Oe&4&&la(ce.style))for(const be in ce.style)ce.style[be]}let Ae;(Ae=ce&&ce.onVnodeBeforeMount)&&Nn(Ae,w,p),we&&wr(p,null,w,"beforeMount"),((Ae=ce&&ce.onVnodeMounted)||we||Ee)&&fv(()=>{Ae&&Nn(Ae,w,p),Ee&&_e.enter(g),we&&wr(p,null,w,"mounted")},S)}return g.nextSibling},y=(g,p,w,S,F,Z,re)=>{re=re||!!p.dynamicChildren;const ce=p.children,Oe=ce.length;for(let ge=0;ge<Oe;ge++){const we=re?ce[ge]:ce[ge]=Rn(ce[ge]),_e=we.type===ua;g?(_e&&!re&&ge+1<Oe&&Rn(ce[ge+1]).type===ua&&(l(a(g.data.slice(we.children.length)),w,o(g)),g.data=we.children),g=d(g,we,S,F,Z,re)):_e&&!we.children?l(we.el=a(""),w):(mi(w,1)||ao(),n(null,we,w,null,S,F,hi(w),Z))}return g},b=(g,p,w,S,F,Z)=>{const{slotScopeIds:re}=p;re&&(F=F?F.concat(re):re);const ce=s(g),Oe=y(o(g),p,ce,w,S,F,Z);return Oe&&fo(Oe)&&Oe.data==="]"?o(p.anchor=Oe):(ao(),l(p.anchor=c("]"),ce,Oe),Oe)},v=(g,p,w,S,F,Z)=>{if(mi(g.parentElement,1)||ao(),p.el=null,Z){const Oe=_(g);for(;;){const ge=o(g);if(ge&&ge!==Oe)i(ge);else break}}const re=o(g),ce=s(g);return i(g),n(null,p,ce,re,w,S,hi(ce),F),w&&(w.vnode.el=p.el,El(w,p.el)),re},_=(g,p="[",w="]")=>{let S=0;for(;g;)if(g=o(g),g&&fo(g)&&(g.data===p&&S++,g.data===w)){if(S===0)return o(g);S--}return g},A=(g,p,w)=>{const S=p.parentNode;S&&S.replaceChild(g,p);let F=w;for(;F;)F.vnode.el===p&&(F.vnode.el=F.subTree.el=g),F=F.parent},$=g=>g.nodeType===1&&g.tagName==="TEMPLATE";return[u,d]}const hp="data-allow-mismatch",E1={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function mi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(hp);)e=e.parentElement;const n=e&&e.getAttribute(hp);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:n.split(",").includes(E1[t])}}const k1=hl().requestIdleCallback||(e=>setTimeout(e,1)),T1=hl().cancelIdleCallback||(e=>clearTimeout(e)),x1=(e=1e4)=>t=>{const n=k1(t,{timeout:e});return()=>T1(n)};function P1(e){const{top:t,left:n,bottom:r,right:a}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:s}=window;return(t>0&&t<o||r>0&&r<o)&&(n>0&&n<s||a>0&&a<s)}const M1=e=>(t,n)=>{const r=new IntersectionObserver(a=>{for(const o of a)if(o.isIntersecting){r.disconnect(),t();break}},e);return n(a=>{if(a instanceof Element){if(P1(a))return t(),r.disconnect(),!1;r.observe(a)}}),()=>r.disconnect()},N1=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},O1=(e=[])=>(t,n)=>{Vt(e)&&(e=[e]);let r=!1;const a=s=>{r||(r=!0,o(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},o=()=>{n(s=>{for(const i of e)s.removeEventListener(i,a)})};return n(s=>{for(const i of e)s.addEventListener(i,a,{once:!0})}),o};function R1(e,t){if(fo(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(fo(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const ca=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Gc(e){at(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:a=200,hydrate:o,timeout:s,suspensible:i=!0,onError:l}=e;let c=null,u,d=0;const m=()=>(d++,c=null,y()),y=()=>{let b;return c||(b=c=t().catch(v=>{if(v=v instanceof Error?v:new Error(String(v)),l)return new Promise((_,A)=>{l(v,()=>_(m()),()=>A(v),d+1)});throw v}).then(v=>b!==c&&c?c:(v&&(v.__esModule||v[Symbol.toStringTag]==="Module")&&(v=v.default),u=v,v)))};return ke({name:"AsyncComponentWrapper",__asyncLoader:y,__asyncHydrate(b,v,_){const A=o?()=>{const $=o(_,g=>R1(b,g));$&&(v.bum||(v.bum=[])).push($)}:_;u?A():y().then(()=>!v.isUnmounted&&A())},get __asyncResolved(){return u},setup(){const b=an;if(Lu(b),u)return()=>Ac(u,b);const v=g=>{c=null,Wa(g,b,13,!r)};if(i&&b.suspense||Co)return y().then(g=>()=>Ac(g,b)).catch(g=>(v(g),()=>r?Ge(r,{error:g}):null));const _=$e(!1),A=$e(),$=$e(!!a);return a&&setTimeout(()=>{$.value=!1},a),s!=null&&setTimeout(()=>{if(!_.value&&!A.value){const g=new Error(`Async component timed out after ${s}ms.`);v(g),A.value=g}},s),y().then(()=>{_.value=!0,b.parent&&Ls(b.parent.vnode)&&b.parent.update()}).catch(g=>{v(g),A.value=g}),()=>{if(_.value&&u)return Ac(u,b);if(A.value&&r)return Ge(r,{error:A.value});if(n&&!$.value)return Ge(n)}}})}function Ac(e,t){const{ref:n,props:r,children:a,ce:o}=t.vnode,s=Ge(e,r,a);return s.ref=n,s.ce=o,delete t.vnode.ce,s}const Ls=e=>e.type.__isKeepAlive,L1={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=nr(),r=n.ctx;if(!r.renderer)return()=>{const $=t.default&&t.default();return $&&$.length===1?$[0]:$};const a=new Map,o=new Set;let s=null;const i=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=r,m=d("div");r.activate=($,g,p,w,S)=>{const F=$.component;c($,g,p,0,i),l(F.vnode,$,g,p,F,i,w,$.slotScopeIds,S),nn(()=>{F.isDeactivated=!1,F.a&&vo(F.a);const Z=$.props&&$.props.onVnodeMounted;Z&&Nn(Z,F.parent,$)},i)},r.deactivate=$=>{const g=$.component;Ji(g.m),Ji(g.a),c($,m,null,1,i),nn(()=>{g.da&&vo(g.da);const p=$.props&&$.props.onVnodeUnmounted;p&&Nn(p,g.parent,$),g.isDeactivated=!0},i)};function y($){Cc($),u($,n,i,!0)}function b($){a.forEach((g,p)=>{const w=su(g.type);w&&!$(w)&&v(p)})}function v($){const g=a.get($);g&&(!s||!dr(g,s))?y(g):s&&Cc(s),a.delete($),o.delete($)}He(()=>[e.include,e.exclude],([$,g])=>{$&&b(p=>as($,p)),g&&b(p=>!as(g,p))},{flush:"post",deep:!0});let _=null;const A=()=>{_!=null&&(Yi(n.subTree.type)?nn(()=>{a.set(_,vi(n.subTree))},n.subTree.suspense):a.set(_,vi(n.subTree)))};return Xt(A),Sl(A),wa(()=>{a.forEach($=>{const{subTree:g,suspense:p}=n,w=vi(g);if($.type===w.type&&$.key===w.key){Cc(w);const S=w.component.da;S&&nn(S,p);return}y($)})}),()=>{if(_=null,!t.default)return s=null;const $=t.default(),g=$[0];if($.length>1)return s=null,$;if(!zr(g)||!(g.shapeFlag&4)&&!(g.shapeFlag&128))return s=null,g;let p=vi(g);if(p.type===Yt)return s=null,p;const w=p.type,S=su(ca(p)?p.type.__asyncResolved||{}:w),{include:F,exclude:Z,max:re}=e;if(F&&(!S||!as(F,S))||Z&&S&&as(Z,S))return p.shapeFlag&=-257,s=p,g;const ce=p.key==null?w:p.key,Oe=a.get(ce);return p.el&&(p=Ir(p),g.shapeFlag&128&&(g.ssContent=p)),_=ce,Oe?(p.el=Oe.el,p.component=Oe.component,p.transition&&Ur(p,p.transition),p.shapeFlag|=512,o.delete(ce),o.add(ce)):(o.add(ce),re&&o.size>parseInt(re,10)&&v(o.values().next().value)),p.shapeFlag|=256,s=p,Yi(g.type)?g:p}}},D1=L1;function as(e,t){return Ye(e)?e.some(n=>as(n,t)):Vt(e)?e.split(",").includes(t):pw(e)?(e.lastIndex=0,e.test(t)):!1}function Mm(e,t){Om(e,"a",t)}function Nm(e,t){Om(e,"da",t)}function Om(e,t,n=an){const r=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if($l(t,r,n),n){let a=n.parent;for(;a&&a.parent;)Ls(a.parent.vnode)&&F1(r,t,n,a),a=a.parent}}function F1(e,t,n,r){const a=$l(t,e,r,!0);tr(()=>{$u(r[t],a)},n)}function Cc(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function vi(e){return e.shapeFlag&128?e.ssContent:e}function $l(e,t,n=an,r=!1){if(n){const a=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{_a();const i=Va(n),l=er(t,n,e,s);return i(),ba(),l});return r?a.unshift(o):a.push(o),o}}const Wr=e=>(t,n=an)=>{(!Co||e==="sp")&&$l(e,(...r)=>t(...r),n)},xo=Wr("bm"),Xt=Wr("m"),Du=Wr("bu"),Sl=Wr("u"),wa=Wr("bum"),tr=Wr("um"),Rm=Wr("sp"),Lm=Wr("rtg"),Dm=Wr("rtc");function Fm(e,t=an){$l("ec",e,t)}const Fu="components",j1="directives";function B1(e,t){return ju(Fu,e,!0,t)||e}const jm=Symbol.for("v-ndc");function Po(e){return Vt(e)?ju(Fu,e,!1)||e:e||jm}function Bm(e){return ju(j1,e)}function ju(e,t,n=!0,r=!1){const a=on||an;if(a){const o=a.type;if(e===Fu){const i=su(o,!1);if(i&&(i===t||i===vn(t)||i===Rs(vn(t))))return o}const s=mp(a[e]||o[e],t)||mp(a.appContext[e],t);return!s&&r?o:s}}function mp(e,t){return e&&(e[t]||e[vn(t)]||e[Rs(vn(t))])}function It(e,t,n,r){let a;const o=n&&n[r],s=Ye(e);if(s||Vt(e)){const i=s&&la(e);let l=!1;i&&(l=!Kn(e),e=gl(e)),a=new Array(e.length);for(let c=0,u=e.length;c<u;c++)a[c]=t(l?wn(e[c]):e[c],c,void 0,o&&o[c])}else if(typeof e=="number"){a=new Array(e);for(let i=0;i<e;i++)a[i]=t(i+1,i,void 0,o&&o[i])}else if(Rt(e))if(e[Symbol.iterator])a=Array.from(e,(i,l)=>t(i,l,void 0,o&&o[l]));else{const i=Object.keys(e);a=new Array(i.length);for(let l=0,c=i.length;l<c;l++){const u=i[l];a[l]=t(e[u],u,l,o&&o[l])}}else a=[];return n&&(n[r]=a),a}function V1(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(Ye(r))for(let a=0;a<r.length;a++)e[r[a].name]=r[a].fn;else r&&(e[r.name]=r.key?(...a)=>{const o=r.fn(...a);return o&&(o.key=r.key),o}:r.fn)}return e}function Ht(e,t,n={},r,a){if(on.ce||on.parent&&ca(on.parent)&&on.parent.ce)return t!=="default"&&(n.name=t),E(),je(Ve,null,[Ge("slot",n,r&&r())],64);let o=e[t];o&&o._c&&(o._d=!1),E();const s=o&&Bu(o(n)),i=n.key||s&&s.key,l=je(Ve,{key:(i&&!vr(i)?i:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&e._===1?64:-2);return!a&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Bu(e){return e.some(t=>zr(t)?!(t.type===Yt||t.type===Ve&&!Bu(t.children)):!0)?e:null}function U1(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:cs(r)]=e[r];return n}const Jc=e=>e?yv(e)?Fs(e):Jc(e.parent):null,ps=Ft(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Jc(e.parent),$root:e=>Jc(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vu(e),$forceUpdate:e=>e.f||(e.f=()=>{Nu(e.update)}),$nextTick:e=>e.n||(e.n=Fn.bind(e.proxy)),$watch:e=>_A.bind(e)}),$c=(e,t)=>e!==bt&&!e.__isScriptSetup&&kt(e,t),Yc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:a,props:o,accessCache:s,type:i,appContext:l}=e;let c;if(t[0]!=="$"){const y=s[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else{if($c(r,t))return s[t]=1,r[t];if(a!==bt&&kt(a,t))return s[t]=2,a[t];if((c=e.propsOptions[0])&&kt(c,t))return s[t]=3,o[t];if(n!==bt&&kt(n,t))return s[t]=4,n[t];Qc&&(s[t]=0)}}const u=ps[t];let d,m;if(u)return t==="$attrs"&&bn(e.attrs,"get",""),u(e);if((d=i.__cssModules)&&(d=d[t]))return d;if(n!==bt&&kt(n,t))return s[t]=4,n[t];if(m=l.config.globalProperties,kt(m,t))return m[t]},set({_:e},t,n){const{data:r,setupState:a,ctx:o}=e;return $c(a,t)?(a[t]=n,!0):r!==bt&&kt(r,t)?(r[t]=n,!0):kt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,propsOptions:o}},s){let i;return!!n[s]||e!==bt&&kt(e,s)||$c(t,s)||(i=o[0])&&kt(i,s)||kt(r,s)||kt(ps,s)||kt(a.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:kt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},H1=Ft({},Yc,{get(e,t){if(t!==Symbol.unscopables)return Yc.get(e,t,e)},has(e,t){return t[0]!=="_"&&!yw(t)}});function z1(){return null}function K1(){return null}function W1(e){}function q1(e){}function G1(){return null}function J1(){}function Y1(e,t){return null}function Q1(){return Vm().slots}function X1(){return Vm().attrs}function Vm(){const e=nr();return e.setupContext||(e.setupContext=wv(e))}function xs(e){return Ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Z1(e,t){const n=xs(e);for(const r in t){if(r.startsWith("__skip"))continue;let a=n[r];a?Ye(a)||at(a)?a=n[r]={type:a,default:t[r]}:a.default=t[r]:a===null&&(a=n[r]={default:t[r]}),a&&t[`__skip_${r}`]&&(a.skipFactory=!0)}return n}function Hr(e,t){return!e||!t?e||t:Ye(e)&&Ye(t)?e.concat(t):Ft({},xs(e),xs(t))}function eA(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function tA(e){const t=nr();let n=e();return ru(),Su(n)&&(n=n.catch(r=>{throw Va(t),r})),[n,()=>Va(t)]}let Qc=!0;function nA(e){const t=Vu(e),n=e.proxy,r=e.ctx;Qc=!1,t.beforeCreate&&vp(t.beforeCreate,e,"bc");const{data:a,computed:o,methods:s,watch:i,provide:l,inject:c,created:u,beforeMount:d,mounted:m,beforeUpdate:y,updated:b,activated:v,deactivated:_,beforeDestroy:A,beforeUnmount:$,destroyed:g,unmounted:p,render:w,renderTracked:S,renderTriggered:F,errorCaptured:Z,serverPrefetch:re,expose:ce,inheritAttrs:Oe,components:ge,directives:we,filters:_e}=t;if(c&&rA(c,r,null),s)for(const Ae in s){const be=s[Ae];at(be)&&(r[Ae]=be.bind(n))}if(a){const Ae=a.call(n,n);Rt(Ae)&&(e.data=_l(Ae))}if(Qc=!0,o)for(const Ae in o){const be=o[Ae],ve=at(be)?be.bind(n,n):at(be.get)?be.get.bind(n,n):Xn,me=!at(be)&&at(be.set)?be.set.bind(n):Xn,O=J({get:ve,set:me});Object.defineProperty(r,Ae,{enumerable:!0,configurable:!0,get:()=>O.value,set:fe=>O.value=fe})}if(i)for(const Ae in i)Um(i[Ae],r,n,Ae);if(l){const Ae=at(l)?l.call(n):l;Reflect.ownKeys(Ae).forEach(be=>{zm(be,Ae[be])})}u&&vp(u,e,"c");function Ee(Ae,be){Ye(be)?be.forEach(ve=>Ae(ve.bind(n))):be&&Ae(be.bind(n))}if(Ee(xo,d),Ee(Xt,m),Ee(Du,y),Ee(Sl,b),Ee(Mm,v),Ee(Nm,_),Ee(Fm,Z),Ee(Dm,S),Ee(Lm,F),Ee(wa,$),Ee(tr,p),Ee(Rm,re),Ye(ce))if(ce.length){const Ae=e.exposed||(e.exposed={});ce.forEach(be=>{Object.defineProperty(Ae,be,{get:()=>n[be],set:ve=>n[be]=ve})})}else e.exposed||(e.exposed={});w&&e.render===Xn&&(e.render=w),Oe!=null&&(e.inheritAttrs=Oe),ge&&(e.components=ge),we&&(e.directives=we),re&&Lu(e)}function rA(e,t,n=Xn){Ye(e)&&(e=Xc(e));for(const r in e){const a=e[r];let o;Rt(a)?"default"in a?o=ne(a.from||r,a.default,!0):o=ne(a.from||r):o=ne(a),Qt(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[r]=o}}function vp(e,t,n){er(Ye(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Um(e,t,n,r){let a=r.includes(".")?lv(n,r):()=>n[r];if(Vt(e)){const o=t[e];at(o)&&He(a,o)}else if(at(e))He(a,e.bind(n));else if(Rt(e))if(Ye(e))e.forEach(o=>Um(o,t,n,r));else{const o=at(e.handler)?e.handler.bind(n):t[e.handler];at(o)&&He(a,o,e)}}function Vu(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:a,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,i=o.get(t);let l;return i?l=i:!a.length&&!n&&!r?l=t:(l={},a.length&&a.forEach(c=>Gi(l,c,s,!0)),Gi(l,t,s)),Rt(t)&&o.set(t,l),l}function Gi(e,t,n,r=!1){const{mixins:a,extends:o}=t;o&&Gi(e,o,n,!0),a&&a.forEach(s=>Gi(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const i=aA[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const aA={data:gp,props:yp,emits:yp,methods:os,computed:os,beforeCreate:Sn,created:Sn,beforeMount:Sn,mounted:Sn,beforeUpdate:Sn,updated:Sn,beforeDestroy:Sn,beforeUnmount:Sn,destroyed:Sn,unmounted:Sn,activated:Sn,deactivated:Sn,errorCaptured:Sn,serverPrefetch:Sn,components:os,directives:os,watch:sA,provide:gp,inject:oA};function gp(e,t){return t?e?function(){return Ft(at(e)?e.call(this,this):e,at(t)?t.call(this,this):t)}:t:e}function oA(e,t){return os(Xc(e),Xc(t))}function Xc(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Sn(e,t){return e?[...new Set([].concat(e,t))]:t}function os(e,t){return e?Ft(Object.create(null),e,t):t}function yp(e,t){return e?Ye(e)&&Ye(t)?[...new Set([...e,...t])]:Ft(Object.create(null),xs(e),xs(t??{})):t}function sA(e,t){if(!e)return t;if(!t)return e;const n=Ft(Object.create(null),e);for(const r in t)n[r]=Sn(e[r],t[r]);return n}function Hm(){return{app:null,config:{isNativeTag:dw,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let iA=0;function lA(e,t){return function(r,a=null){at(r)||(r=Ft({},r)),a!=null&&!Rt(a)&&(a=null);const o=Hm(),s=new WeakSet,i=[];let l=!1;const c=o.app={_uid:iA++,_component:r,_props:a,_container:null,_context:o,_instance:null,version:Cv,get config(){return o.config},set config(u){},use(u,...d){return s.has(u)||(u&&at(u.install)?(s.add(u),u.install(c,...d)):at(u)&&(s.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,m){if(!l){const y=c._ceVNode||Ge(r,a);return y.appContext=o,m===!0?m="svg":m===!1&&(m=void 0),d&&t?t(y,u):e(y,u,m),l=!0,c._container=u,u.__vue_app__=c,Fs(y.component)}},onUnmount(u){i.push(u)},unmount(){l&&(er(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=Fa;Fa=c;try{return u()}finally{Fa=d}}};return c}}let Fa=null;function zm(e,t){if(an){let n=an.provides;const r=an.parent&&an.parent.provides;r===n&&(n=an.provides=Object.create(r)),n[e]=t}}function ne(e,t,n=!1){const r=an||on;if(r||Fa){const a=Fa?Fa._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&at(t)?t.call(r&&r.proxy):t}}function cA(){return!!(an||on||Fa)}const Km={},Wm=()=>Object.create(Km),qm=e=>Object.getPrototypeOf(e)===Km;function uA(e,t,n,r=!1){const a={},o=Wm();e.propsDefaults=Object.create(null),Gm(e,t,a,o);for(const s in e.propsOptions[0])s in a||(a[s]=void 0);n?e.props=r?a:pm(a):e.type.props?e.props=a:e.props=o,e.attrs=o}function dA(e,t,n,r){const{props:a,attrs:o,vnode:{patchFlag:s}}=e,i=ft(a),[l]=e.propsOptions;let c=!1;if((r||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let m=u[d];if(Il(e.emitsOptions,m))continue;const y=t[m];if(l)if(kt(o,m))y!==o[m]&&(o[m]=y,c=!0);else{const b=vn(m);a[b]=Zc(l,i,b,y,e,!1)}else y!==o[m]&&(o[m]=y,c=!0)}}}else{Gm(e,t,a,o)&&(c=!0);let u;for(const d in i)(!t||!kt(t,d)&&((u=Ln(d))===d||!kt(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(a[d]=Zc(l,i,d,void 0,e,!0)):delete a[d]);if(o!==i)for(const d in o)(!t||!kt(t,d))&&(delete o[d],c=!0)}c&&Dr(e.attrs,"set","")}function Gm(e,t,n,r){const[a,o]=e.propsOptions;let s=!1,i;if(t)for(let l in t){if(mo(l))continue;const c=t[l];let u;a&&kt(a,u=vn(l))?!o||!o.includes(u)?n[u]=c:(i||(i={}))[u]=c:Il(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,s=!0)}if(o){const l=ft(n),c=i||bt;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Zc(a,l,d,c[d],e,!kt(c,d))}}return s}function Zc(e,t,n,r,a,o){const s=e[n];if(s!=null){const i=kt(s,"default");if(i&&r===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&at(l)){const{propsDefaults:c}=a;if(n in c)r=c[n];else{const u=Va(a);r=c[n]=l.call(null,t),u()}}else r=l;a.ce&&a.ce._setProp(n,r)}s[0]&&(o&&!i?r=!1:s[1]&&(r===""||r===Ln(n))&&(r=!0))}return r}const fA=new WeakMap;function Jm(e,t,n=!1){const r=n?fA:t.propsCache,a=r.get(e);if(a)return a;const o=e.props,s={},i=[];let l=!1;if(!at(e)){const u=d=>{l=!0;const[m,y]=Jm(d,t,!0);Ft(s,m),y&&i.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return Rt(e)&&r.set(e,po),po;if(Ye(o))for(let u=0;u<o.length;u++){const d=vn(o[u]);_p(d)&&(s[d]=bt)}else if(o)for(const u in o){const d=vn(u);if(_p(d)){const m=o[u],y=s[d]=Ye(m)||at(m)?{type:m}:Ft({},m),b=y.type;let v=!1,_=!0;if(Ye(b))for(let A=0;A<b.length;++A){const $=b[A],g=at($)&&$.name;if(g==="Boolean"){v=!0;break}else g==="String"&&(_=!1)}else v=at(b)&&b.name==="Boolean";y[0]=v,y[1]=_,(v||kt(y,"default"))&&i.push(d)}}const c=[s,i];return Rt(e)&&r.set(e,c),c}function _p(e){return e[0]!=="$"&&!mo(e)}const Ym=e=>e[0]==="_"||e==="$stable",Uu=e=>Ye(e)?e.map(Rn):[Rn(e)],pA=(e,t,n)=>{if(t._n)return t;const r=Ze((...a)=>Uu(t(...a)),n);return r._c=!1,r},Qm=(e,t,n)=>{const r=e._ctx;for(const a in e){if(Ym(a))continue;const o=e[a];if(at(o))t[a]=pA(a,o,r);else if(o!=null){const s=Uu(o);t[a]=()=>s}}},Xm=(e,t)=>{const n=Uu(t);e.slots.default=()=>n},Zm=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},hA=(e,t,n)=>{const r=e.slots=Wm();if(e.vnode.shapeFlag&32){const a=t._;a?(Zm(r,t,n),n&&qh(r,"_",a,!0)):Qm(t,r)}else t&&Xm(e,t)},mA=(e,t,n)=>{const{vnode:r,slots:a}=e;let o=!0,s=bt;if(r.shapeFlag&32){const i=t._;i?n&&i===1?o=!1:Zm(a,t,n):(o=!t.$stable,Qm(t,a)),s=t}else t&&(Xm(e,t),s={default:1});if(o)for(const i in a)!Ym(i)&&s[i]==null&&delete a[i]},nn=fv;function ev(e){return nv(e)}function tv(e){return nv(e,I1)}function nv(e,t){const n=hl();n.__VUE__=!0;const{insert:r,remove:a,patchProp:o,createElement:s,createText:i,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:m,setScopeId:y=Xn,insertStaticContent:b}=e,v=(k,x,le,j=null,V=null,K=null,ue=void 0,U=null,z=!!x.dynamicChildren)=>{if(k===x)return;k&&!dr(k,x)&&(j=Le(k),fe(k,V,K,!0),k=null),x.patchFlag===-2&&(z=!1,x.dynamicChildren=null);const{type:ae,ref:D,shapeFlag:Q}=x;switch(ae){case ua:_(k,x,le,j);break;case Yt:A(k,x,le,j);break;case ja:k==null&&$(x,le,j,ue);break;case Ve:ge(k,x,le,j,V,K,ue,U,z);break;default:Q&1?w(k,x,le,j,V,K,ue,U,z):Q&6?we(k,x,le,j,V,K,ue,U,z):(Q&64||Q&128)&&ae.process(k,x,le,j,V,K,ue,U,z,X)}D!=null&&V&&Ts(D,k&&k.ref,K,x||k,!x)},_=(k,x,le,j)=>{if(k==null)r(x.el=i(x.children),le,j);else{const V=x.el=k.el;x.children!==k.children&&c(V,x.children)}},A=(k,x,le,j)=>{k==null?r(x.el=l(x.children||""),le,j):x.el=k.el},$=(k,x,le,j)=>{[k.el,k.anchor]=b(k.children,x,le,j,k.el,k.anchor)},g=({el:k,anchor:x},le,j)=>{let V;for(;k&&k!==x;)V=m(k),r(k,le,j),k=V;r(x,le,j)},p=({el:k,anchor:x})=>{let le;for(;k&&k!==x;)le=m(k),a(k),k=le;a(x)},w=(k,x,le,j,V,K,ue,U,z)=>{x.type==="svg"?ue="svg":x.type==="math"&&(ue="mathml"),k==null?S(x,le,j,V,K,ue,U,z):re(k,x,V,K,ue,U,z)},S=(k,x,le,j,V,K,ue,U)=>{let z,ae;const{props:D,shapeFlag:Q,transition:de,dirs:he}=k;if(z=k.el=s(k.type,K,D&&D.is,D),Q&8?u(z,k.children):Q&16&&Z(k.children,z,null,j,V,Sc(k,K),ue,U),he&&wr(k,null,j,"created"),F(z,k,k.scopeId,ue,j),D){for(const De in D)De!=="value"&&!mo(De)&&o(z,De,null,D[De],K,j);"value"in D&&o(z,"value",null,D.value,K),(ae=D.onVnodeBeforeMount)&&Nn(ae,j,k)}he&&wr(k,null,j,"beforeMount");const Te=rv(V,de);Te&&de.beforeEnter(z),r(z,x,le),((ae=D&&D.onVnodeMounted)||Te||he)&&nn(()=>{ae&&Nn(ae,j,k),Te&&de.enter(z),he&&wr(k,null,j,"mounted")},V)},F=(k,x,le,j,V)=>{if(le&&y(k,le),j)for(let K=0;K<j.length;K++)y(k,j[K]);if(V){let K=V.subTree;if(x===K||Yi(K.type)&&(K.ssContent===x||K.ssFallback===x)){const ue=V.vnode;F(k,ue,ue.scopeId,ue.slotScopeIds,V.parent)}}},Z=(k,x,le,j,V,K,ue,U,z=0)=>{for(let ae=z;ae<k.length;ae++){const D=k[ae]=U?sa(k[ae]):Rn(k[ae]);v(null,D,x,le,j,V,K,ue,U)}},re=(k,x,le,j,V,K,ue)=>{const U=x.el=k.el;let{patchFlag:z,dynamicChildren:ae,dirs:D}=x;z|=k.patchFlag&16;const Q=k.props||bt,de=x.props||bt;let he;if(le&&Ta(le,!1),(he=de.onVnodeBeforeUpdate)&&Nn(he,le,x,k),D&&wr(x,k,le,"beforeUpdate"),le&&Ta(le,!0),(Q.innerHTML&&de.innerHTML==null||Q.textContent&&de.textContent==null)&&u(U,""),ae?ce(k.dynamicChildren,ae,U,le,j,Sc(x,V),K):ue||be(k,x,U,null,le,j,Sc(x,V),K,!1),z>0){if(z&16)Oe(U,Q,de,le,V);else if(z&2&&Q.class!==de.class&&o(U,"class",null,de.class,V),z&4&&o(U,"style",Q.style,de.style,V),z&8){const Te=x.dynamicProps;for(let De=0;De<Te.length;De++){const Be=Te[De],st=Q[Be],rt=de[Be];(rt!==st||Be==="value")&&o(U,Be,st,rt,V,le)}}z&1&&k.children!==x.children&&u(U,x.children)}else!ue&&ae==null&&Oe(U,Q,de,le,V);((he=de.onVnodeUpdated)||D)&&nn(()=>{he&&Nn(he,le,x,k),D&&wr(x,k,le,"updated")},j)},ce=(k,x,le,j,V,K,ue)=>{for(let U=0;U<x.length;U++){const z=k[U],ae=x[U],D=z.el&&(z.type===Ve||!dr(z,ae)||z.shapeFlag&70)?d(z.el):le;v(z,ae,D,null,j,V,K,ue,!0)}},Oe=(k,x,le,j,V)=>{if(x!==le){if(x!==bt)for(const K in x)!mo(K)&&!(K in le)&&o(k,K,x[K],null,V,j);for(const K in le){if(mo(K))continue;const ue=le[K],U=x[K];ue!==U&&K!=="value"&&o(k,K,U,ue,V,j)}"value"in le&&o(k,"value",x.value,le.value,V)}},ge=(k,x,le,j,V,K,ue,U,z)=>{const ae=x.el=k?k.el:i(""),D=x.anchor=k?k.anchor:i("");let{patchFlag:Q,dynamicChildren:de,slotScopeIds:he}=x;he&&(U=U?U.concat(he):he),k==null?(r(ae,le,j),r(D,le,j),Z(x.children||[],le,D,V,K,ue,U,z)):Q>0&&Q&64&&de&&k.dynamicChildren?(ce(k.dynamicChildren,de,le,V,K,ue,U),(x.key!=null||V&&x===V.subTree)&&Hu(k,x,!0)):be(k,x,le,D,V,K,ue,U,z)},we=(k,x,le,j,V,K,ue,U,z)=>{x.slotScopeIds=U,k==null?x.shapeFlag&512?V.ctx.activate(x,le,j,ue,z):_e(x,le,j,V,K,ue,z):Ke(k,x,z)},_e=(k,x,le,j,V,K,ue)=>{const U=k.component=gv(k,j,V);if(Ls(k)&&(U.ctx.renderer=X),_v(U,!1,ue),U.asyncDep){if(V&&V.registerDep(U,Ee,ue),!k.el){const z=U.subTree=Ge(Yt);A(null,z,x,le)}}else Ee(U,k,x,le,V,K,ue)},Ke=(k,x,le)=>{const j=x.component=k.component;if($A(k,x,le))if(j.asyncDep&&!j.asyncResolved){Ae(j,x,le);return}else j.next=x,j.update();else x.el=k.el,j.vnode=x},Ee=(k,x,le,j,V,K,ue)=>{const U=()=>{if(k.isMounted){let{next:Q,bu:de,u:he,parent:Te,vnode:De}=k;{const wt=av(k);if(wt){Q&&(Q.el=De.el,Ae(k,Q,ue)),wt.asyncDep.then(()=>{k.isUnmounted||U()});return}}let Be=Q,st;Ta(k,!1),Q?(Q.el=De.el,Ae(k,Q,ue)):Q=De,de&&vo(de),(st=Q.props&&Q.props.onVnodeBeforeUpdate)&&Nn(st,Te,Q,De),Ta(k,!0);const rt=Mi(k),ct=k.subTree;k.subTree=rt,v(ct,rt,d(ct.el),Le(ct),k,V,K),Q.el=rt.el,Be===null&&El(k,rt.el),he&&nn(he,V),(st=Q.props&&Q.props.onVnodeUpdated)&&nn(()=>Nn(st,Te,Q,De),V)}else{let Q;const{el:de,props:he}=x,{bm:Te,m:De,parent:Be,root:st,type:rt}=k,ct=ca(x);if(Ta(k,!1),Te&&vo(Te),!ct&&(Q=he&&he.onVnodeBeforeMount)&&Nn(Q,Be,x),Ta(k,!0),de&&Ie){const wt=()=>{k.subTree=Mi(k),Ie(de,k.subTree,k,V,null)};ct&&rt.__asyncHydrate?rt.__asyncHydrate(de,k,wt):wt()}else{st.ce&&st.ce._injectChildStyle(rt);const wt=k.subTree=Mi(k);v(null,wt,le,j,k,V,K),x.el=wt.el}if(De&&nn(De,V),!ct&&(Q=he&&he.onVnodeMounted)){const wt=x;nn(()=>Nn(Q,Be,wt),V)}(x.shapeFlag&256||Be&&ca(Be.vnode)&&Be.vnode.shapeFlag&256)&&k.a&&nn(k.a,V),k.isMounted=!0,x=le=j=null}};k.scope.on();const z=k.effect=new Cs(U);k.scope.off();const ae=k.update=z.run.bind(z),D=k.job=z.runIfDirty.bind(z);D.i=k,D.id=k.uid,z.scheduler=()=>Nu(D),Ta(k,!0),ae()},Ae=(k,x,le)=>{x.component=k;const j=k.vnode.props;k.vnode=x,k.next=null,dA(k,x.props,j,le),mA(k,x.children,le),_a(),lp(k),ba()},be=(k,x,le,j,V,K,ue,U,z=!1)=>{const ae=k&&k.children,D=k?k.shapeFlag:0,Q=x.children,{patchFlag:de,shapeFlag:he}=x;if(de>0){if(de&128){me(ae,Q,le,j,V,K,ue,U,z);return}else if(de&256){ve(ae,Q,le,j,V,K,ue,U,z);return}}he&8?(D&16&&pe(ae,V,K),Q!==ae&&u(le,Q)):D&16?he&16?me(ae,Q,le,j,V,K,ue,U,z):pe(ae,V,K,!0):(D&8&&u(le,""),he&16&&Z(Q,le,j,V,K,ue,U,z))},ve=(k,x,le,j,V,K,ue,U,z)=>{k=k||po,x=x||po;const ae=k.length,D=x.length,Q=Math.min(ae,D);let de;for(de=0;de<Q;de++){const he=x[de]=z?sa(x[de]):Rn(x[de]);v(k[de],he,le,null,V,K,ue,U,z)}ae>D?pe(k,V,K,!0,!1,Q):Z(x,le,j,V,K,ue,U,z,Q)},me=(k,x,le,j,V,K,ue,U,z)=>{let ae=0;const D=x.length;let Q=k.length-1,de=D-1;for(;ae<=Q&&ae<=de;){const he=k[ae],Te=x[ae]=z?sa(x[ae]):Rn(x[ae]);if(dr(he,Te))v(he,Te,le,null,V,K,ue,U,z);else break;ae++}for(;ae<=Q&&ae<=de;){const he=k[Q],Te=x[de]=z?sa(x[de]):Rn(x[de]);if(dr(he,Te))v(he,Te,le,null,V,K,ue,U,z);else break;Q--,de--}if(ae>Q){if(ae<=de){const he=de+1,Te=he<D?x[he].el:j;for(;ae<=de;)v(null,x[ae]=z?sa(x[ae]):Rn(x[ae]),le,Te,V,K,ue,U,z),ae++}}else if(ae>de)for(;ae<=Q;)fe(k[ae],V,K,!0),ae++;else{const he=ae,Te=ae,De=new Map;for(ae=Te;ae<=de;ae++){const Pt=x[ae]=z?sa(x[ae]):Rn(x[ae]);Pt.key!=null&&De.set(Pt.key,ae)}let Be,st=0;const rt=de-Te+1;let ct=!1,wt=0;const Nt=new Array(rt);for(ae=0;ae<rt;ae++)Nt[ae]=0;for(ae=he;ae<=Q;ae++){const Pt=k[ae];if(st>=rt){fe(Pt,V,K,!0);continue}let $n;if(Pt.key!=null)$n=De.get(Pt.key);else for(Be=Te;Be<=de;Be++)if(Nt[Be-Te]===0&&dr(Pt,x[Be])){$n=Be;break}$n===void 0?fe(Pt,V,K,!0):(Nt[$n-Te]=ae+1,$n>=wt?wt=$n:ct=!0,v(Pt,x[$n],le,null,V,K,ue,U,z),st++)}const Kt=ct?vA(Nt):po;for(Be=Kt.length-1,ae=rt-1;ae>=0;ae--){const Pt=Te+ae,$n=x[Pt],Ca=Pt+1<D?x[Pt+1].el:j;Nt[ae]===0?v(null,$n,le,Ca,V,K,ue,U,z):ct&&(Be<0||ae!==Kt[Be]?O($n,le,Ca,2):Be--)}}},O=(k,x,le,j,V=null)=>{const{el:K,type:ue,transition:U,children:z,shapeFlag:ae}=k;if(ae&6){O(k.component.subTree,x,le,j);return}if(ae&128){k.suspense.move(x,le,j);return}if(ae&64){ue.move(k,x,le,X);return}if(ue===Ve){r(K,x,le);for(let Q=0;Q<z.length;Q++)O(z[Q],x,le,j);r(k.anchor,x,le);return}if(ue===ja){g(k,x,le);return}if(j!==2&&ae&1&&U)if(j===0)U.beforeEnter(K),r(K,x,le),nn(()=>U.enter(K),V);else{const{leave:Q,delayLeave:de,afterLeave:he}=U,Te=()=>r(K,x,le),De=()=>{Q(K,()=>{Te(),he&&he()})};de?de(K,Te,De):De()}else r(K,x,le)},fe=(k,x,le,j=!1,V=!1)=>{const{type:K,props:ue,ref:U,children:z,dynamicChildren:ae,shapeFlag:D,patchFlag:Q,dirs:de,cacheIndex:he}=k;if(Q===-2&&(V=!1),U!=null&&Ts(U,null,le,k,!0),he!=null&&(x.renderCache[he]=void 0),D&256){x.ctx.deactivate(k);return}const Te=D&1&&de,De=!ca(k);let Be;if(De&&(Be=ue&&ue.onVnodeBeforeUnmount)&&Nn(Be,x,k),D&6)R(k.component,le,j);else{if(D&128){k.suspense.unmount(le,j);return}Te&&wr(k,null,x,"beforeUnmount"),D&64?k.type.remove(k,x,le,X,j):ae&&!ae.hasOnce&&(K!==Ve||Q>0&&Q&64)?pe(ae,x,le,!1,!0):(K===Ve&&Q&384||!V&&D&16)&&pe(z,x,le),j&&q(k)}(De&&(Be=ue&&ue.onVnodeUnmounted)||Te)&&nn(()=>{Be&&Nn(Be,x,k),Te&&wr(k,null,x,"unmounted")},le)},q=k=>{const{type:x,el:le,anchor:j,transition:V}=k;if(x===Ve){I(le,j);return}if(x===ja){p(k);return}const K=()=>{a(le),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(k.shapeFlag&1&&V&&!V.persisted){const{leave:ue,delayLeave:U}=V,z=()=>ue(le,K);U?U(k.el,K,z):z()}else K()},I=(k,x)=>{let le;for(;k!==x;)le=m(k),a(k),k=le;a(x)},R=(k,x,le)=>{const{bum:j,scope:V,job:K,subTree:ue,um:U,m:z,a:ae}=k;Ji(z),Ji(ae),j&&vo(j),V.stop(),K&&(K.flags|=8,fe(ue,k,x,le)),U&&nn(U,x),nn(()=>{k.isUnmounted=!0},x),x&&x.pendingBranch&&!x.isUnmounted&&k.asyncDep&&!k.asyncResolved&&k.suspenseId===x.pendingId&&(x.deps--,x.deps===0&&x.resolve())},pe=(k,x,le,j=!1,V=!1,K=0)=>{for(let ue=K;ue<k.length;ue++)fe(k[ue],x,le,j,V)},Le=k=>{if(k.shapeFlag&6)return Le(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const x=m(k.anchor||k.el),le=x&&x[$m];return le?m(le):x};let B=!1;const ee=(k,x,le)=>{k==null?x._vnode&&fe(x._vnode,null,null,!0):v(x._vnode||null,k,x,null,null,null,le),x._vnode=k,B||(B=!0,lp(),qi(),B=!1)},X={p:v,um:fe,m:O,r:q,mt:_e,mc:Z,pc:be,pbc:ce,n:Le,o:e};let ie,Ie;return t&&([ie,Ie]=t(X)),{render:ee,hydrate:ie,createApp:lA(ee,ie)}}function Sc({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ta({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Hu(e,t,n=!1){const r=e.children,a=t.children;if(Ye(r)&&Ye(a))for(let o=0;o<r.length;o++){const s=r[o];let i=a[o];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=a[o]=sa(a[o]),i.el=s.el),!n&&i.patchFlag!==-2&&Hu(s,i)),i.type===ua&&(i.el=s.el)}}function vA(e){const t=e.slice(),n=[0];let r,a,o,s,i;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(a=n[n.length-1],e[a]<c){t[r]=a,n.push(r);continue}for(o=0,s=n.length-1;o<s;)i=o+s>>1,e[n[i]]<c?o=i+1:s=i;c<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}function av(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:av(t)}function Ji(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const ov=Symbol.for("v-scx"),sv=()=>ne(ov);function gA(e,t){return Ds(e,null,t)}function yA(e,t){return Ds(e,null,{flush:"post"})}function iv(e,t){return Ds(e,null,{flush:"sync"})}function He(e,t,n){return Ds(e,t,n)}function Ds(e,t,n=bt){const{immediate:r,deep:a,flush:o,once:s}=n,i=Ft({},n),l=t&&r||!t&&o!=="post";let c;if(Co){if(o==="sync"){const y=sv();c=y.__watcherHandles||(y.__watcherHandles=[])}else if(!l){const y=()=>{};return y.stop=Xn,y.resume=Xn,y.pause=Xn,y}}const u=an;i.call=(y,b,v)=>er(y,u,b,v);let d=!1;o==="post"?i.scheduler=y=>{nn(y,u&&u.suspense)}:o!=="sync"&&(d=!0,i.scheduler=(y,b)=>{b?y():Nu(y)}),i.augmentJob=y=>{t&&(y.flags|=4),d&&(y.flags|=2,u&&(y.id=u.uid,y.i=u))};const m=c1(e,t,i);return Co&&(c?c.push(m):l&&m()),m}function _A(e,t,n){const r=this.proxy,a=Vt(e)?e.includes(".")?lv(r,e):()=>r[e]:e.bind(r,r);let o;at(t)?o=t:(o=t.handler,n=t);const s=Va(this),i=Ds(a,o.bind(r),n);return s(),i}function lv(e,t){const n=t.split(".");return()=>{let r=e;for(let a=0;a<n.length&&r;a++)r=r[n[a]];return r}}function qr(e,t,n=bt){const r=nr(),a=vn(t),o=Ln(t),s=cv(e,a),i=vm((l,c)=>{let u,d=bt,m;return iv(()=>{const y=e[a];Tn(u,y)&&(u=y,c())}),{get(){return l(),n.get?n.get(u):u},set(y){const b=n.set?n.set(y):y;if(!Tn(b,u)&&!(d!==bt&&Tn(y,d)))return;const v=r.vnode.props;v&&(t in v||a in v||o in v)&&(`onUpdate:${t}`in v||`onUpdate:${a}`in v||`onUpdate:${o}`in v)||(u=y,c()),r.emit(`update:${t}`,b),Tn(y,b)&&Tn(y,d)&&!Tn(b,m)&&c(),d=y,m=b}}});return i[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||bt:i,done:!1}:{done:!0}}}},i}const cv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${vn(t)}Modifiers`]||e[`${Ln(t)}Modifiers`];function bA(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||bt;let a=n;const o=t.startsWith("update:"),s=o&&cv(r,t.slice(7));s&&(s.trim&&(a=n.map(u=>Vt(u)?u.trim():u)),s.number&&(a=n.map(Ui)));let i,l=r[i=cs(t)]||r[i=cs(vn(t))];!l&&o&&(l=r[i=cs(Ln(t))]),l&&er(l,e,6,a);const c=r[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,er(c,e,6,a)}}function uv(e,t,n=!1){const r=t.emitsCache,a=r.get(e);if(a!==void 0)return a;const o=e.emits;let s={},i=!1;if(!at(e)){const l=c=>{const u=uv(c,t,!0);u&&(i=!0,Ft(s,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!i?(Rt(e)&&r.set(e,null),null):(Ye(o)?o.forEach(l=>s[l]=null):Ft(s,o),Rt(e)&&r.set(e,s),s)}function Il(e,t){return!e||!Os(t)?!1:(t=t.slice(2).replace(/Once$/,""),kt(e,t[0].toLowerCase()+t.slice(1))||kt(e,Ln(t))||kt(e,t))}function Mi(e){const{type:t,vnode:n,proxy:r,withProxy:a,propsOptions:[o],slots:s,attrs:i,emit:l,render:c,renderCache:u,props:d,data:m,setupState:y,ctx:b,inheritAttrs:v}=e,_=ks(e);let A,$;try{if(n.shapeFlag&4){const p=a||r,w=p;A=Rn(c.call(w,p,u,d,y,m,b)),$=i}else{const p=t;A=Rn(p.length>1?p(d,{attrs:i,slots:s,emit:l}):p(d,null)),$=t.props?i:AA(i)}}catch(p){hs.length=0,Wa(p,e,1),A=Ge(Yt)}let g=A;if($&&v!==!1){const p=Object.keys($),{shapeFlag:w}=g;p.length&&w&7&&(o&&p.some(Cu)&&($=CA($,o)),g=Ir(g,$,!1,!0))}return n.dirs&&(g=Ir(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&Ur(g,n.transition),A=g,ks(_),A}function wA(e,t=!0){let n;for(let r=0;r<e.length;r++){const a=e[r];if(zr(a)){if(a.type!==Yt||a.children==="v-if"){if(n)return;n=a}}else return}return n}const AA=e=>{let t;for(const n in e)(n==="class"||n==="style"||Os(n))&&((t||(t={}))[n]=e[n]);return t},CA=(e,t)=>{const n={};for(const r in e)(!Cu(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function $A(e,t,n){const{props:r,children:a,component:o}=e,{props:s,children:i,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?bp(r,s,c):!!s;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const m=u[d];if(s[m]!==r[m]&&!Il(c,m))return!0}}}else return(a||i)&&(!i||!i.$stable)?!0:r===s?!1:r?s?bp(r,s,c):!0:!!s;return!1}function bp(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let a=0;a<r.length;a++){const o=r[a];if(t[o]!==e[o]&&!Il(n,o))return!0}return!1}function El({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Yi=e=>e.__isSuspense;let eu=0;const SA={name:"Suspense",__isSuspense:!0,process(e,t,n,r,a,o,s,i,l,c){if(e==null)EA(t,n,r,a,o,s,i,l,c);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}kA(e,t,n,r,a,s,i,l,c)}},hydrate:TA,normalize:xA},IA=SA;function Ps(e,t){const n=e.props&&e.props[t];at(n)&&n()}function EA(e,t,n,r,a,o,s,i,l){const{p:c,o:{createElement:u}}=l,d=u("div"),m=e.suspense=dv(e,a,r,t,d,n,o,s,i,l);c(null,m.pendingBranch=e.ssContent,d,null,r,m,o,s),m.deps>0?(Ps(e,"onPending"),Ps(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,o,s),yo(m,e.ssFallback)):m.resolve(!1,!0)}function kA(e,t,n,r,a,o,s,i,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const m=t.ssContent,y=t.ssFallback,{activeBranch:b,pendingBranch:v,isInFallback:_,isHydrating:A}=d;if(v)d.pendingBranch=m,dr(m,v)?(l(v,m,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0?d.resolve():_&&(A||(l(b,y,n,r,a,null,o,s,i),yo(d,y)))):(d.pendingId=eu++,A?(d.isHydrating=!1,d.activeBranch=v):c(v,a,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),_?(l(null,m,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0?d.resolve():(l(b,y,n,r,a,null,o,s,i),yo(d,y))):b&&dr(m,b)?(l(b,m,n,r,a,d,o,s,i),d.resolve(!0)):(l(null,m,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0&&d.resolve()));else if(b&&dr(m,b))l(b,m,n,r,a,d,o,s,i),yo(d,m);else if(Ps(t,"onPending"),d.pendingBranch=m,m.shapeFlag&512?d.pendingId=m.component.suspenseId:d.pendingId=eu++,l(null,m,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0)d.resolve();else{const{timeout:$,pendingId:g}=d;$>0?setTimeout(()=>{d.pendingId===g&&d.fallback(y)},$):$===0&&d.fallback(y)}}function dv(e,t,n,r,a,o,s,i,l,c,u=!1){const{p:d,m,um:y,n:b,o:{parentNode:v,remove:_}}=c;let A;const $=PA(e);$&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const g=e.props?Hi(e.props.timeout):void 0,p=o,w={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:a,deps:0,pendingId:eu++,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,F=!1){const{vnode:Z,activeBranch:re,pendingBranch:ce,pendingId:Oe,effects:ge,parentComponent:we,container:_e}=w;let Ke=!1;w.isHydrating?w.isHydrating=!1:S||(Ke=re&&ce.transition&&ce.transition.mode==="out-in",Ke&&(re.transition.afterLeave=()=>{Oe===w.pendingId&&(m(ce,_e,o===p?b(re):o,0),Is(ge))}),re&&(v(re.el)===_e&&(o=b(re)),y(re,we,w,!0)),Ke||m(ce,_e,o,0)),yo(w,ce),w.pendingBranch=null,w.isInFallback=!1;let Ee=w.parent,Ae=!1;for(;Ee;){if(Ee.pendingBranch){Ee.effects.push(...ge),Ae=!0;break}Ee=Ee.parent}!Ae&&!Ke&&Is(ge),w.effects=[],$&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!F&&t.resolve()),Ps(Z,"onResolve")},fallback(S){if(!w.pendingBranch)return;const{vnode:F,activeBranch:Z,parentComponent:re,container:ce,namespace:Oe}=w;Ps(F,"onFallback");const ge=b(Z),we=()=>{w.isInFallback&&(d(null,S,ce,ge,re,null,Oe,i,l),yo(w,S))},_e=S.transition&&S.transition.mode==="out-in";_e&&(Z.transition.afterLeave=we),w.isInFallback=!0,y(Z,re,null,!0),_e||we()},move(S,F,Z){w.activeBranch&&m(w.activeBranch,S,F,Z),w.container=S},next(){return w.activeBranch&&b(w.activeBranch)},registerDep(S,F,Z){const re=!!w.pendingBranch;re&&w.deps++;const ce=S.vnode.el;S.asyncDep.catch(Oe=>{Wa(Oe,S,0)}).then(Oe=>{if(S.isUnmounted||w.isUnmounted||w.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:ge}=S;au(S,Oe,!1),ce&&(ge.el=ce);const we=!ce&&S.subTree.el;F(S,ge,v(ce||S.subTree.el),ce?null:b(S.subTree),w,s,Z),we&&_(we),El(S,ge.el),re&&--w.deps===0&&w.resolve()})},unmount(S,F){w.isUnmounted=!0,w.activeBranch&&y(w.activeBranch,n,S,F),w.pendingBranch&&y(w.pendingBranch,n,S,F)}};return w}function TA(e,t,n,r,a,o,s,i,l){const c=t.suspense=dv(t,r,n,e.parentNode,document.createElement("div"),null,a,o,s,i,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,o,s);return c.deps===0&&c.resolve(!1,!0),u}function xA(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=wp(r?n.default:n),e.ssFallback=r?wp(n.fallback):Ge(Yt)}function wp(e){let t;if(at(e)){const n=Ba&&e._c;n&&(e._d=!1,E()),e=e(),n&&(e._d=!0,t=An,pv())}return Ye(e)&&(e=wA(e)),e=Rn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function fv(e,t){t&&t.pendingBranch?Ye(e)?t.effects.push(...e):t.effects.push(e):Is(e)}function yo(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;n.el=a,r&&r.subTree===n&&(r.vnode.el=a,El(r,a))}function PA(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ve=Symbol.for("v-fgt"),ua=Symbol.for("v-txt"),Yt=Symbol.for("v-cmt"),ja=Symbol.for("v-stc"),hs=[];let An=null;function E(e=!1){hs.push(An=e?null:[])}function pv(){hs.pop(),An=hs[hs.length-1]||null}let Ba=1;function tu(e,t=!1){Ba+=e,e<0&&An&&t&&(An.hasOnce=!0)}function hv(e){return e.dynamicChildren=Ba>0?An||po:null,pv(),Ba>0&&An&&An.push(e),e}function M(e,t,n,r,a,o){return hv(W(e,t,n,r,a,o,!0))}function je(e,t,n,r,a){return hv(Ge(e,t,n,r,a,!0))}function zr(e){return e?e.__v_isVNode===!0:!1}function dr(e,t){return e.type===t.type&&e.key===t.key}function MA(e){}const mv=({key:e})=>e??null,Ni=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Vt(e)||Qt(e)||at(e)?{i:on,r:e,k:t,f:!!n}:e:null);function W(e,t=null,n=null,r=0,a=null,o=e===Ve?0:1,s=!1,i=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mv(t),ref:t&&Ni(t),scopeId:Al,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:on};return i?(zu(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Vt(n)?8:16),Ba>0&&!s&&An&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&An.push(l),l}const Ge=NA;function NA(e,t=null,n=null,r=0,a=null,o=!1){if((!e||e===jm)&&(e=Yt),zr(e)){const i=Ir(e,t,!0);return n&&zu(i,n),Ba>0&&!o&&An&&(i.shapeFlag&6?An[An.indexOf(e)]=i:An.push(i)),i.patchFlag=-2,i}if(VA(e)&&(e=e.__vccOpts),t){t=vv(t);let{class:i,style:l}=t;i&&!Vt(i)&&(t.class=it(i)),Rt(l)&&(wl(l)&&!Ye(l)&&(l=Ft({},l)),t.style=mt(l))}const s=Vt(e)?1:Yi(e)?128:Sm(e)?64:Rt(e)?4:at(e)?2:0;return W(e,t,n,r,a,s,o,!0)}function vv(e){return e?wl(e)||qm(e)?Ft({},e):e:null}function Ir(e,t,n=!1,r=!1){const{props:a,ref:o,patchFlag:s,children:i,transition:l}=e,c=t?_o(a||{},t):a,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&mv(c),ref:t&&t.ref?n&&o?Ye(o)?o.concat(Ni(t)):[o,Ni(t)]:Ni(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ve?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ir(e.ssContent),ssFallback:e.ssFallback&&Ir(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Ur(u,l.clone(u)),u}function Dt(e=" ",t=0){return Ge(ua,null,e,t)}function OA(e,t){const n=Ge(ja,null,e);return n.staticCount=t,n}function Se(e="",t=!1){return t?(E(),je(Yt,null,e)):Ge(Yt,null,e)}function Rn(e){return e==null||typeof e=="boolean"?Ge(Yt):Ye(e)?Ge(Ve,null,e.slice()):zr(e)?sa(e):Ge(ua,null,String(e))}function sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ir(e)}function zu(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ye(t))n=16;else if(typeof t=="object")if(r&65){const a=t.default;a&&(a._c&&(a._d=!1),zu(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!qm(t)?t._ctx=on:a===3&&on&&(on.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else at(t)?(t={default:t,_ctx:on},n=32):(t=String(t),r&64?(n=16,t=[Dt(t)]):n=8);e.children=t,e.shapeFlag|=n}function _o(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const a in r)if(a==="class")t.class!==r.class&&(t.class=it([t.class,r.class]));else if(a==="style")t.style=mt([t.style,r.style]);else if(Os(a)){const o=t[a],s=r[a];s&&o!==s&&!(Ye(o)&&o.includes(s))&&(t[a]=o?[].concat(o,s):s)}else a!==""&&(t[a]=r[a])}return t}function Nn(e,t,n,r=null){er(e,t,7,[n,r])}const RA=Hm();let LA=0;function gv(e,t,n){const r=e.type,a=(t?t.appContext:e.appContext)||RA,o={uid:LA++,vnode:e,type:r,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Eu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Jm(r,a),emitsOptions:uv(r,a),emit:null,emitted:null,propsDefaults:bt,inheritAttrs:r.inheritAttrs,ctx:bt,data:bt,props:bt,attrs:bt,slots:bt,refs:bt,setupState:bt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=bA.bind(null,o),e.ce&&e.ce(o),o}let an=null;const nr=()=>an||on;let Qi,nu;{const e=hl(),t=(n,r)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(r),o=>{a.length>1?a.forEach(s=>s(o)):a[0](o)}};Qi=t("__VUE_INSTANCE_SETTERS__",n=>an=n),nu=t("__VUE_SSR_SETTERS__",n=>Co=n)}const Va=e=>{const t=an;return Qi(e),e.scope.on(),()=>{e.scope.off(),Qi(t)}},ru=()=>{an&&an.scope.off(),Qi(null)};function yv(e){return e.vnode.shapeFlag&4}let Co=!1;function _v(e,t=!1,n=!1){t&&nu(t);const{props:r,children:a}=e.vnode,o=yv(e);uA(e,r,o,t),hA(e,a,n);const s=o?DA(e,t):void 0;return t&&nu(!1),s}function DA(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Yc);const{setup:r}=n;if(r){_a();const a=e.setupContext=r.length>1?wv(e):null,o=Va(e),s=To(r,e,0,[e.props,a]),i=Su(s);if(ba(),o(),(i||e.sp)&&!ca(e)&&Lu(e),i){if(s.then(ru,ru),t)return s.then(l=>{au(e,l,t)}).catch(l=>{Wa(l,e,0)});e.asyncDep=s}else au(e,s,t)}else bv(e,t)}function au(e,t,n){at(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=Pu(t)),bv(e,n)}let Xi,ou;function FA(e){Xi=e,ou=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,H1))}}const jA=()=>!Xi;function bv(e,t,n){const r=e.type;if(!e.render){if(!t&&Xi&&!r.render){const a=r.template||Vu(e).template;if(a){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:i,compilerOptions:l}=r,c=Ft(Ft({isCustomElement:o,delimiters:i},s),l);r.render=Xi(a,c)}}e.render=r.render||Xn,ou&&ou(e)}{const a=Va(e);_a();try{nA(e)}finally{ba(),a()}}}const BA={get(e,t){return bn(e,"get",""),e[t]}};function wv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,BA),slots:e.slots,emit:e.emit,expose:t}}function Fs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Pu(hm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ps)return ps[n](e)},has(t,n){return n in t||n in ps}})):e.proxy}function su(e,t=!0){return at(e)?e.displayName||e.name:e.name||t&&e.__name}function VA(e){return at(e)&&"__vccOpts"in e}const J=(e,t)=>o1(e,t,Co);function ma(e,t,n){const r=arguments.length;return r===2?Rt(t)&&!Ye(t)?zr(t)?Ge(e,null,[t]):Ge(e,t):Ge(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&zr(n)&&(n=[n]),Ge(e,t,n))}function UA(){}function HA(e,t,n,r){const a=n[r];if(a&&Av(a,e))return a;const o=t();return o.memo=e.slice(),o.cacheIndex=r,n[r]=o}function Av(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Tn(n[r],t[r]))return!1;return Ba>0&&An&&An.push(e),!0}const Cv="3.5.13",zA=Xn,KA=h1,WA=lo,qA=Cm,GA={createComponentInstance:gv,setupComponent:_v,renderComponentRoot:Mi,setCurrentRenderingInstance:ks,isVNode:zr,normalizeVNode:Rn,getComponentPublicInstance:Fs,ensureValidVNode:Bu,pushWarningContext:u1,popWarningContext:d1},JA=GA,YA=null,QA=null,XA=null;/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let iu;const Ap=typeof window<"u"&&window.trustedTypes;if(Ap)try{iu=Ap.createPolicy("vue",{createHTML:e=>e})}catch{}const $v=iu?e=>iu.createHTML(e):e=>e,ZA="http://www.w3.org/2000/svg",eC="http://www.w3.org/1998/Math/MathML",Lr=typeof document<"u"?document:null,Cp=Lr&&Lr.createElement("template"),tC={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const a=t==="svg"?Lr.createElementNS(ZA,e):t==="mathml"?Lr.createElementNS(eC,e):n?Lr.createElement(e,{is:n}):Lr.createElement(e);return e==="select"&&r&&r.multiple!=null&&a.setAttribute("multiple",r.multiple),a},createText:e=>Lr.createTextNode(e),createComment:e=>Lr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Lr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,a,o){const s=n?n.previousSibling:t.lastChild;if(a&&(a===o||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===o||!(a=a.nextSibling)););else{Cp.innerHTML=$v(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const i=Cp.content;if(r==="svg"||r==="mathml"){const l=i.firstChild;for(;l.firstChild;)i.appendChild(l.firstChild);i.removeChild(l)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zr="transition",Jo="animation",$o=Symbol("_vtc"),Sv={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Iv=Ft({},Ru,Sv),nC=e=>(e.displayName="Transition",e.props=Iv,e),Ev=nC((e,{slots:t})=>ma(xm,kv(e),t)),xa=(e,t=[])=>{Ye(e)?e.forEach(n=>n(...t)):e&&e(...t)},$p=e=>e?Ye(e)?e.some(t=>t.length>1):e.length>1:!1;function kv(e){const t={};for(const ge in e)ge in Sv||(t[ge]=e[ge]);if(e.css===!1)return t;const{name:n="v",type:r,duration:a,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=s,appearToClass:u=i,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,b=rC(a),v=b&&b[0],_=b&&b[1],{onBeforeEnter:A,onEnter:$,onEnterCancelled:g,onLeave:p,onLeaveCancelled:w,onBeforeAppear:S=A,onAppear:F=$,onAppearCancelled:Z=g}=t,re=(ge,we,_e,Ke)=>{ge._enterCancelled=Ke,na(ge,we?u:i),na(ge,we?c:s),_e&&_e()},ce=(ge,we)=>{ge._isLeaving=!1,na(ge,d),na(ge,y),na(ge,m),we&&we()},Oe=ge=>(we,_e)=>{const Ke=ge?F:$,Ee=()=>re(we,ge,_e);xa(Ke,[we,Ee]),Sp(()=>{na(we,ge?l:o),_r(we,ge?u:i),$p(Ke)||Ip(we,r,v,Ee)})};return Ft(t,{onBeforeEnter(ge){xa(A,[ge]),_r(ge,o),_r(ge,s)},onBeforeAppear(ge){xa(S,[ge]),_r(ge,l),_r(ge,c)},onEnter:Oe(!1),onAppear:Oe(!0),onLeave(ge,we){ge._isLeaving=!0;const _e=()=>ce(ge,we);_r(ge,d),ge._enterCancelled?(_r(ge,m),lu()):(lu(),_r(ge,m)),Sp(()=>{ge._isLeaving&&(na(ge,d),_r(ge,y),$p(p)||Ip(ge,r,_,_e))}),xa(p,[ge,_e])},onEnterCancelled(ge){re(ge,!1,void 0,!0),xa(g,[ge])},onAppearCancelled(ge){re(ge,!0,void 0,!0),xa(Z,[ge])},onLeaveCancelled(ge){ce(ge),xa(w,[ge])}})}function rC(e){if(e==null)return null;if(Rt(e))return[Ic(e.enter),Ic(e.leave)];{const t=Ic(e);return[t,t]}}function Ic(e){return Hi(e)}function _r(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[$o]||(e[$o]=new Set)).add(t)}function na(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[$o];n&&(n.delete(t),n.size||(e[$o]=void 0))}function Sp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let aC=0;function Ip(e,t,n,r){const a=e._endId=++aC,o=()=>{a===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:s,timeout:i,propCount:l}=Tv(e,t);if(!s)return r();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,m),o()},m=y=>{y.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},i+1),e.addEventListener(c,m)}function Tv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),a=r(`${Zr}Delay`),o=r(`${Zr}Duration`),s=Ep(a,o),i=r(`${Jo}Delay`),l=r(`${Jo}Duration`),c=Ep(i,l);let u=null,d=0,m=0;t===Zr?s>0&&(u=Zr,d=s,m=o.length):t===Jo?c>0&&(u=Jo,d=c,m=l.length):(d=Math.max(s,c),u=d>0?s>c?Zr:Jo:null,m=u?u===Zr?o.length:l.length:0);const y=u===Zr&&/\b(transform|all)(,|$)/.test(r(`${Zr}Property`).toString());return{type:u,timeout:d,propCount:m,hasTransform:y}}function Ep(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>kp(n)+kp(e[r])))}function kp(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function lu(){return document.body.offsetHeight}function oC(e,t,n){const r=e[$o];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zi=Symbol("_vod"),xv=Symbol("_vsh"),Wn={beforeMount(e,{value:t},{transition:n}){e[Zi]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Yo(e,!0),r.enter(e)):r.leave(e,()=>{Yo(e,!1)}):Yo(e,t))},beforeUnmount(e,{value:t}){Yo(e,t)}};function Yo(e,t){e.style.display=t?e[Zi]:"none",e[xv]=!t}function sC(){Wn.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Pv=Symbol("");function Mo(e){const t=nr();if(!t)return;const n=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>el(o,a))},r=()=>{const a=e(t.proxy);t.ce?el(t.ce,a):cu(t.subTree,a),n(a)};Du(()=>{Is(r)}),Xt(()=>{He(r,Xn,{flush:"post"});const a=new MutationObserver(r);a.observe(t.subTree.el.parentNode,{childList:!0}),tr(()=>a.disconnect())})}function cu(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{cu(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)el(e.el,t);else if(e.type===Ve)e.children.forEach(n=>cu(n,t));else if(e.type===ja){let{el:n,anchor:r}=e;for(;n&&(el(n,t),n!==r);)n=n.nextSibling}}function el(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const a in t)n.setProperty(`--${a}`,t[a]),r+=`--${a}: ${t[a]};`;n[Pv]=r}}const iC=/(^|;)\s*display\s*:/;function lC(e,t,n){const r=e.style,a=Vt(n);let o=!1;if(n&&!a){if(t)if(Vt(t))for(const s of t.split(";")){const i=s.slice(0,s.indexOf(":")).trim();n[i]==null&&Oi(r,i,"")}else for(const s in t)n[s]==null&&Oi(r,s,"");for(const s in n)s==="display"&&(o=!0),Oi(r,s,n[s])}else if(a){if(t!==n){const s=r[Pv];s&&(n+=";"+s),r.cssText=n,o=iC.test(n)}}else t&&e.removeAttribute("style");Zi in e&&(e[Zi]=o?r.display:"",e[xv]&&(r.display="none"))}const Tp=/\s*!important$/;function Oi(e,t,n){if(Ye(n))n.forEach(r=>Oi(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=cC(e,t);Tp.test(n)?e.setProperty(Ln(r),n.replace(Tp,""),"important"):e[r]=n}}const xp=["Webkit","Moz","ms"],Ec={};function cC(e,t){const n=Ec[t];if(n)return n;let r=vn(t);if(r!=="filter"&&r in e)return Ec[t]=r;r=Rs(r);for(let a=0;a<xp.length;a++){const o=xp[a]+r;if(o in e)return Ec[t]=o}return t}const Pp="http://www.w3.org/1999/xlink";function Mp(e,t,n,r,a,o=Sw(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Pp,t.slice(6,t.length)):e.setAttributeNS(Pp,t,n):n==null||o&&!Gh(n)?e.removeAttribute(t):e.setAttribute(t,o?"":vr(n)?String(n):n)}function Np(e,t,n,r,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?$v(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(i!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Gh(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(a||t)}function jr(e,t,n,r){e.addEventListener(t,n,r)}function uC(e,t,n,r){e.removeEventListener(t,n,r)}const Op=Symbol("_vei");function dC(e,t,n,r,a=null){const o=e[Op]||(e[Op]={}),s=o[t];if(r&&s)s.value=r;else{const[i,l]=fC(t);if(r){const c=o[t]=mC(r,a);jr(e,i,c,l)}else s&&(uC(e,i,s,l),o[t]=void 0)}}const Rp=/(?:Once|Passive|Capture)$/;function fC(e){let t;if(Rp.test(e)){t={};let r;for(;r=e.match(Rp);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ln(e.slice(2)),t]}let kc=0;const pC=Promise.resolve(),hC=()=>kc||(pC.then(()=>kc=0),kc=Date.now());function mC(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;er(vC(r,n.value),t,5,[r])};return n.value=e,n.attached=hC(),n}function vC(e,t){if(Ye(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>a=>!a._stopped&&r&&r(a))}else return t}const Lp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,gC=(e,t,n,r,a,o)=>{const s=a==="svg";t==="class"?oC(e,r,s):t==="style"?lC(e,n,r):Os(t)?Cu(t)||dC(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):yC(e,t,r,s))?(Np(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Mp(e,t,r,s,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Vt(r))?Np(e,vn(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Mp(e,t,r,s))};function yC(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Lp(t)&&at(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Lp(t)&&Vt(n)?!1:t in e}const Dp={};/*! #__NO_SIDE_EFFECTS__ */function Mv(e,t,n){const r=ke(e,t);fl(r)&&Ft(r,t);class a extends kl{constructor(s){super(r,s,n)}}return a.def=r,a}/*! #__NO_SIDE_EFFECTS__ */const _C=(e,t)=>Mv(e,t,Uv),bC=typeof HTMLElement<"u"?HTMLElement:class{};class kl extends bC{constructor(t,n={},r=rl){super(),this._def=t,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==rl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof kl){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,Fn(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const a of r)this._setAttr(a.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:s}=r;let i;if(o&&!Ye(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Hi(this._props[l])),(i||(i=Object.create(null)))[vn(l)]=!0)}this._numberProps=i,a&&this._resolveProps(r),this.shadowRoot&&this._applyStyles(s),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>t(this._def=r,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)kt(this,r)||Object.defineProperty(this,r,{get:()=>P(n[r])})}_resolveProps(t){const{props:n}=t,r=Ye(n)?n:Object.keys(n||{});for(const a of Object.keys(this))a[0]!=="_"&&r.includes(a)&&this._setProp(a,this[a]);for(const a of r.map(vn))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(o){this._setProp(a,o,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let r=n?this.getAttribute(t):Dp;const a=vn(t);n&&this._numberProps&&this._numberProps[a]&&(r=Hi(r)),this._setProp(a,r,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,a=!1){if(n!==this._props[t]&&(n===Dp?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),a&&this._instance&&this._update(),r)){const o=this._ob;o&&o.disconnect(),n===!0?this.setAttribute(Ln(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ln(t),n+""):n||this.removeAttribute(Ln(t)),o&&o.observe(this,{attributes:!0})}}_update(){Vv(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Ge(this._def,Ft(t,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const a=(o,s)=>{this.dispatchEvent(new CustomEvent(o,fl(s[0])?Ft({detail:s},s[0]):{detail:s}))};r.emit=(o,...s)=>{a(o,s),Ln(o)!==o&&a(Ln(o),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let a=t.length-1;a>=0;a--){const o=document.createElement("style");r&&o.setAttribute("nonce",r),o.textContent=t[a],this.shadowRoot.prepend(o)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(t[r]||(t[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let r=0;r<t.length;r++){const a=t[r],o=a.getAttribute("name")||"default",s=this._slots[o],i=a.parentNode;if(s)for(const l of s){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}i.insertBefore(l,a)}else for(;a.firstChild;)i.insertBefore(a.firstChild,a);i.removeChild(a)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function Nv(e){const t=nr(),n=t&&t.ce;return n||null}function wC(){const e=Nv();return e&&e.shadowRoot}function AC(e="$style"){{const t=nr();if(!t)return bt;const n=t.type.__cssModules;if(!n)return bt;const r=n[e];return r||bt}}const Ov=new WeakMap,Rv=new WeakMap,tl=Symbol("_moveCb"),Fp=Symbol("_enterCb"),CC=e=>(delete e.props.mode,e),$C=CC({name:"TransitionGroup",props:Ft({},Iv,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=nr(),r=Ou();let a,o;return Sl(()=>{if(!a.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!TC(a[0].el,n.vnode.el,s))return;a.forEach(IC),a.forEach(EC);const i=a.filter(kC);lu(),i.forEach(l=>{const c=l.el,u=c.style;_r(c,s),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[tl]=m=>{m&&m.target!==c||(!m||/transform$/.test(m.propertyName))&&(c.removeEventListener("transitionend",d),c[tl]=null,na(c,s))};c.addEventListener("transitionend",d)})}),()=>{const s=ft(e),i=kv(s);let l=s.tag||Ve;if(a=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(a.push(u),Ur(u,Ao(u,i,r,n)),Ov.set(u,u.el.getBoundingClientRect()))}o=t.default?Cl(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&Ur(u,Ao(u,i,r,n))}return Ge(l,null,o)}}}),SC=$C;function IC(e){const t=e.el;t[tl]&&t[tl](),t[Fp]&&t[Fp]()}function EC(e){Rv.set(e,e.el.getBoundingClientRect())}function kC(e){const t=Ov.get(e),n=Rv.get(e),r=t.left-n.left,a=t.top-n.top;if(r||a){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${a}px)`,o.transitionDuration="0s",e}}function TC(e,t,n){const r=e.cloneNode(),a=e[$o];a&&a.forEach(i=>{i.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=Tv(r);return o.removeChild(r),s}const va=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ye(t)?n=>vo(t,n):t};function xC(e){e.target.composing=!0}function jp(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Zn=Symbol("_assign"),Ua={created(e,{modifiers:{lazy:t,trim:n,number:r}},a){e[Zn]=va(a);const o=r||a.props&&a.props.type==="number";jr(e,t?"change":"input",s=>{if(s.target.composing)return;let i=e.value;n&&(i=i.trim()),o&&(i=Ui(i)),e[Zn](i)}),n&&jr(e,"change",()=>{e.value=e.value.trim()}),t||(jr(e,"compositionstart",xC),jr(e,"compositionend",jp),jr(e,"change",jp))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:a,number:o}},s){if(e[Zn]=va(s),e.composing)return;const i=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ui(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||a&&e.value.trim()===l)||(e.value=l))}},Ku={deep:!0,created(e,t,n){e[Zn]=va(n),jr(e,"change",()=>{const r=e._modelValue,a=So(e),o=e.checked,s=e[Zn];if(Ye(r)){const i=ml(r,a),l=i!==-1;if(o&&!l)s(r.concat(a));else if(!o&&l){const c=[...r];c.splice(i,1),s(c)}}else if(Ka(r)){const i=new Set(r);o?i.add(a):i.delete(a),s(i)}else s(Lv(e,o))})},mounted:Bp,beforeUpdate(e,t,n){e[Zn]=va(n),Bp(e,t,n)}};function Bp(e,{value:t,oldValue:n},r){e._modelValue=t;let a;if(Ye(t))a=ml(t,r.props.value)>-1;else if(Ka(t))a=t.has(r.props.value);else{if(t===n)return;a=fa(t,Lv(e,!0))}e.checked!==a&&(e.checked=a)}const Wu={created(e,{value:t},n){e.checked=fa(t,n.props.value),e[Zn]=va(n),jr(e,"change",()=>{e[Zn](So(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Zn]=va(r),t!==n&&(e.checked=fa(t,r.props.value))}},qu={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const a=Ka(t);jr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?Ui(So(s)):So(s));e[Zn](e.multiple?a?new Set(o):o:o[0]),e._assigning=!0,Fn(()=>{e._assigning=!1})}),e[Zn]=va(r)},mounted(e,{value:t}){Vp(e,t)},beforeUpdate(e,t,n){e[Zn]=va(n)},updated(e,{value:t}){e._assigning||Vp(e,t)}};function Vp(e,t){const n=e.multiple,r=Ye(t);if(!(n&&!r&&!Ka(t))){for(let a=0,o=e.options.length;a<o;a++){const s=e.options[a],i=So(s);if(n)if(r){const l=typeof i;l==="string"||l==="number"?s.selected=t.some(c=>String(c)===String(i)):s.selected=ml(t,i)>-1}else s.selected=t.has(i);else if(fa(So(s),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function So(e){return"_value"in e?e._value:e.value}function Lv(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const nl={created(e,t,n){gi(e,t,n,null,"created")},mounted(e,t,n){gi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){gi(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){gi(e,t,n,r,"updated")}};function Dv(e,t){switch(e){case"SELECT":return qu;case"TEXTAREA":return Ua;default:switch(t){case"checkbox":return Ku;case"radio":return Wu;default:return Ua}}}function gi(e,t,n,r,a){const s=Dv(e.tagName,n.props&&n.props.type)[a];s&&s(e,t,n,r)}function PC(){Ua.getSSRProps=({value:e})=>({value:e}),Wu.getSSRProps=({value:e},t)=>{if(t.props&&fa(t.props.value,e))return{checked:!0}},Ku.getSSRProps=({value:e},t)=>{if(Ye(e)){if(t.props&&ml(e,t.props.value)>-1)return{checked:!0}}else if(Ka(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},nl.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Dv(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const MC=["ctrl","shift","alt","meta"],NC={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>MC.some(n=>e[`${n}Key`]&&!t.includes(n))},Cr=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(a,...o)=>{for(let s=0;s<t.length;s++){const i=NC[t[s]];if(i&&i(a,t))return}return e(a,...o)})},OC={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ga=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=a=>{if(!("key"in a))return;const o=Ln(a.key);if(t.some(s=>s===o||OC[s]===o))return e(a)})},Fv=Ft({patchProp:gC},tC);let ms,Up=!1;function jv(){return ms||(ms=ev(Fv))}function Bv(){return ms=Up?ms:tv(Fv),Up=!0,ms}const Vv=(...e)=>{jv().render(...e)},RC=(...e)=>{Bv().hydrate(...e)},rl=(...e)=>{const t=jv().createApp(...e),{mount:n}=t;return t.mount=r=>{const a=zv(r);if(!a)return;const o=t._component;!at(o)&&!o.render&&!o.template&&(o.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const s=n(a,!1,Hv(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),s},t},Uv=(...e)=>{const t=Bv().createApp(...e),{mount:n}=t;return t.mount=r=>{const a=zv(r);if(a)return n(a,!0,Hv(a))},t};function Hv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function zv(e){return Vt(e)?document.querySelector(e):e}let Hp=!1;const LC=()=>{Hp||(Hp=!0,PC(),sC())};/**
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const DC=()=>{},FC=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:xm,BaseTransitionPropsValidators:Ru,Comment:Yt,DeprecationTypes:XA,EffectScope:Eu,ErrorCodes:p1,ErrorTypeStrings:KA,Fragment:Ve,KeepAlive:D1,ReactiveEffect:Cs,Static:ja,Suspense:IA,Teleport:w1,Text:ua,TrackOpTypes:s1,Transition:Ev,TransitionGroup:SC,TriggerOpTypes:i1,VueElement:kl,assertNumber:f1,callWithAsyncErrorHandling:er,callWithErrorHandling:To,camelize:vn,capitalize:Rs,cloneVNode:Ir,compatUtils:QA,compile:DC,computed:J,createApp:rl,createBlock:je,createCommentVNode:Se,createElementBlock:M,createElementVNode:W,createHydrationRenderer:tv,createPropsRestProxy:eA,createRenderer:ev,createSSRApp:Uv,createSlots:V1,createStaticVNode:OA,createTextVNode:Dt,createVNode:Ge,customRef:vm,defineAsyncComponent:Gc,defineComponent:ke,defineCustomElement:Mv,defineEmits:K1,defineExpose:W1,defineModel:J1,defineOptions:q1,defineProps:z1,defineSSRCustomElement:_C,defineSlots:G1,devtools:WA,effect:xw,effectScope:Ew,getCurrentInstance:nr,getCurrentScope:Qh,getCurrentWatcher:l1,getTransitionRawChildren:Cl,guardReactiveProps:vv,h:ma,handleError:Wa,hasInjectionContext:cA,hydrate:RC,hydrateOnIdle:x1,hydrateOnInteraction:O1,hydrateOnMediaQuery:N1,hydrateOnVisible:M1,initCustomFormatter:UA,initDirectivesForSSR:LC,inject:ne,isMemoSame:Av,isProxy:wl,isReactive:la,isReadonly:pa,isRef:Qt,isRuntimeOnly:jA,isShallow:Kn,isVNode:zr,markRaw:hm,mergeDefaults:Z1,mergeModels:Hr,mergeProps:_o,nextTick:Fn,normalizeClass:it,normalizeProps:Cw,normalizeStyle:mt,onActivated:Mm,onBeforeMount:xo,onBeforeUnmount:wa,onBeforeUpdate:Du,onDeactivated:Nm,onErrorCaptured:Fm,onMounted:Xt,onRenderTracked:Dm,onRenderTriggered:Lm,onScopeDispose:kw,onServerPrefetch:Rm,onUnmounted:tr,onUpdated:Sl,onWatcherCleanup:ym,openBlock:E,popScopeId:y1,provide:zm,proxyRefs:Pu,pushScopeId:g1,queuePostFlushCb:Is,reactive:_l,readonly:En,ref:$e,registerRuntimeCompiler:FA,render:Vv,renderList:It,renderSlot:Ht,resolveComponent:B1,resolveDirective:Bm,resolveDynamicComponent:Po,resolveFilter:YA,resolveTransitionHooks:Ao,setBlockTracking:tu,setDevtoolsHook:qA,setTransitionHooks:Ur,shallowReactive:pm,shallowReadonly:Yw,shallowRef:hr,ssrContextKey:ov,ssrUtils:JA,stop:Pw,toDisplayString:Pe,toHandlerKey:cs,toHandlers:U1,toRaw:ft,toRef:ha,toRefs:Mu,toValue:Zw,transformVNodeArgs:MA,triggerRef:Xw,unref:P,useAttrs:X1,useCssModule:AC,useCssVars:Mo,useHost:Nv,useId:C1,useModel:qr,useSSRContext:sv,useShadowRoot:wC,useSlots:Q1,useTemplateRef:et,useTransitionState:Ou,vModelCheckbox:Ku,vModelDynamic:nl,vModelRadio:Wu,vModelSelect:qu,vModelText:Ua,vShow:Wn,version:Cv,warn:zA,watch:He,watchEffect:gA,watchPostEffect:yA,watchSyncEffect:iv,withAsyncContext:tA,withCtx:Ze,withDefaults:Y1,withDirectives:sn,withKeys:ga,withMemo:HA,withModifiers:Cr,withScopeId:_1},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:Kv,setPrototypeOf:zp,isFrozen:jC,getPrototypeOf:BC,getOwnPropertyDescriptor:VC}=Object;let{freeze:Pn,seal:gr,create:Wv}=Object,{apply:uu,construct:du}=typeof Reflect<"u"&&Reflect;Pn||(Pn=function(t){return t});gr||(gr=function(t){return t});uu||(uu=function(t,n,r){return t.apply(n,r)});du||(du=function(t,n){return new t(...n)});const yi=qn(Array.prototype.forEach),Kp=qn(Array.prototype.pop),Qo=qn(Array.prototype.push),Ri=qn(String.prototype.toLowerCase),Tc=qn(String.prototype.toString),UC=qn(String.prototype.match),Xo=qn(String.prototype.replace),HC=qn(String.prototype.indexOf),zC=qn(String.prototype.trim),cr=qn(Object.prototype.hasOwnProperty),zn=qn(RegExp.prototype.test),Zo=KC(TypeError);function qn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return uu(e,t,r)}}function KC(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return du(e,n)}}function yt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ri;zp&&zp(e,null);let r=t.length;for(;r--;){let a=t[r];if(typeof a=="string"){const o=n(a);o!==a&&(jC(t)||(t[r]=o),a=o)}e[a]=!0}return e}function WC(e){for(let t=0;t<e.length;t++)cr(e,t)||(e[t]=null);return e}function Ma(e){const t=Wv(null);for(const[n,r]of Kv(e))cr(e,n)&&(Array.isArray(r)?t[n]=WC(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Ma(r):t[n]=r);return t}function _i(e,t){for(;e!==null;){const r=VC(e,t);if(r){if(r.get)return qn(r.get);if(typeof r.value=="function")return qn(r.value)}e=BC(e)}function n(){return null}return n}const Wp=Pn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xc=Pn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pc=Pn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),qC=Pn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mc=Pn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),GC=Pn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qp=Pn(["#text"]),Gp=Pn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Nc=Pn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jp=Pn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),bi=Pn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),JC=gr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),YC=gr(/<%[\w\W]*|[\w\W]*%>/gm),QC=gr(/\${[\w\W]*}/gm),XC=gr(/^data-[\-\w.\u00B7-\uFFFF]/),ZC=gr(/^aria-[\-\w]+$/),qv=gr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),e$=gr(/^(?:\w+script|data):/i),t$=gr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gv=gr(/^html$/i);var Yp=Object.freeze({__proto__:null,MUSTACHE_EXPR:JC,ERB_EXPR:YC,TMPLIT_EXPR:QC,DATA_ATTR:XC,ARIA_ATTR:ZC,IS_ALLOWED_URI:qv,IS_SCRIPT_OR_DATA:e$,ATTR_WHITESPACE:t$,DOCTYPE_NAME:Gv});const n$=function(){return typeof window>"u"?null:window},r$=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Jv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n$();const t=Qe=>Jv(Qe);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,a=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:i,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:m,trustedTypes:y}=e,b=l.prototype,v=_i(b,"cloneNode"),_=_i(b,"nextSibling"),A=_i(b,"childNodes"),$=_i(b,"parentNode");if(typeof s=="function"){const Qe=n.createElement("template");Qe.content&&Qe.content.ownerDocument&&(n=Qe.content.ownerDocument)}let g,p="";const{implementation:w,createNodeIterator:S,createDocumentFragment:F,getElementsByTagName:Z}=n,{importNode:re}=r;let ce={};t.isSupported=typeof Kv=="function"&&typeof $=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Oe,ERB_EXPR:ge,TMPLIT_EXPR:we,DATA_ATTR:_e,ARIA_ATTR:Ke,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Ae}=Yp;let{IS_ALLOWED_URI:be}=Yp,ve=null;const me=yt({},[...Wp,...xc,...Pc,...Mc,...qp]);let O=null;const fe=yt({},[...Gp,...Nc,...Jp,...bi]);let q=Object.seal(Wv(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),I=null,R=null,pe=!0,Le=!0,B=!1,ee=!0,X=!1,ie=!1,Ie=!1,k=!1,x=!1,le=!1,j=!1,V=!0,K=!1;const ue="user-content-";let U=!0,z=!1,ae={},D=null;const Q=yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const he=yt({},["audio","video","img","source","image","track"]);let Te=null;const De=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Be="http://www.w3.org/1998/Math/MathML",st="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml";let ct=rt,wt=!1,Nt=null;const Kt=yt({},[Be,st,rt],Tc);let Pt=null;const $n=["application/xhtml+xml","text/html"],Ca="text/html";let qt=null,Gr=null;const jl=n.createElement("form"),zs=function(Y){return Y instanceof RegExp||Y instanceof Function},Bo=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Gr&&Gr===Y)){if((!Y||typeof Y!="object")&&(Y={}),Y=Ma(Y),Pt=$n.indexOf(Y.PARSER_MEDIA_TYPE)===-1?Ca:Y.PARSER_MEDIA_TYPE,qt=Pt==="application/xhtml+xml"?Tc:Ri,ve=cr(Y,"ALLOWED_TAGS")?yt({},Y.ALLOWED_TAGS,qt):me,O=cr(Y,"ALLOWED_ATTR")?yt({},Y.ALLOWED_ATTR,qt):fe,Nt=cr(Y,"ALLOWED_NAMESPACES")?yt({},Y.ALLOWED_NAMESPACES,Tc):Kt,Te=cr(Y,"ADD_URI_SAFE_ATTR")?yt(Ma(De),Y.ADD_URI_SAFE_ATTR,qt):De,de=cr(Y,"ADD_DATA_URI_TAGS")?yt(Ma(he),Y.ADD_DATA_URI_TAGS,qt):he,D=cr(Y,"FORBID_CONTENTS")?yt({},Y.FORBID_CONTENTS,qt):Q,I=cr(Y,"FORBID_TAGS")?yt({},Y.FORBID_TAGS,qt):{},R=cr(Y,"FORBID_ATTR")?yt({},Y.FORBID_ATTR,qt):{},ae=cr(Y,"USE_PROFILES")?Y.USE_PROFILES:!1,pe=Y.ALLOW_ARIA_ATTR!==!1,Le=Y.ALLOW_DATA_ATTR!==!1,B=Y.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=Y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=Y.SAFE_FOR_TEMPLATES||!1,ie=Y.WHOLE_DOCUMENT||!1,x=Y.RETURN_DOM||!1,le=Y.RETURN_DOM_FRAGMENT||!1,j=Y.RETURN_TRUSTED_TYPE||!1,k=Y.FORCE_BODY||!1,V=Y.SANITIZE_DOM!==!1,K=Y.SANITIZE_NAMED_PROPS||!1,U=Y.KEEP_CONTENT!==!1,z=Y.IN_PLACE||!1,be=Y.ALLOWED_URI_REGEXP||qv,ct=Y.NAMESPACE||rt,q=Y.CUSTOM_ELEMENT_HANDLING||{},Y.CUSTOM_ELEMENT_HANDLING&&zs(Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Y.CUSTOM_ELEMENT_HANDLING&&zs(Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Y.CUSTOM_ELEMENT_HANDLING&&typeof Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(q.allowCustomizedBuiltInElements=Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Le=!1),le&&(x=!0),ae&&(ve=yt({},qp),O=[],ae.html===!0&&(yt(ve,Wp),yt(O,Gp)),ae.svg===!0&&(yt(ve,xc),yt(O,Nc),yt(O,bi)),ae.svgFilters===!0&&(yt(ve,Pc),yt(O,Nc),yt(O,bi)),ae.mathMl===!0&&(yt(ve,Mc),yt(O,Jp),yt(O,bi))),Y.ADD_TAGS&&(ve===me&&(ve=Ma(ve)),yt(ve,Y.ADD_TAGS,qt)),Y.ADD_ATTR&&(O===fe&&(O=Ma(O)),yt(O,Y.ADD_ATTR,qt)),Y.ADD_URI_SAFE_ATTR&&yt(Te,Y.ADD_URI_SAFE_ATTR,qt),Y.FORBID_CONTENTS&&(D===Q&&(D=Ma(D)),yt(D,Y.FORBID_CONTENTS,qt)),U&&(ve["#text"]=!0),ie&&yt(ve,["html","head","body"]),ve.table&&(yt(ve,["tbody"]),delete I.tbody),Y.TRUSTED_TYPES_POLICY){if(typeof Y.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Y.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=Y.TRUSTED_TYPES_POLICY,p=g.createHTML("")}else g===void 0&&(g=r$(y,a)),g!==null&&typeof p=="string"&&(p=g.createHTML(""));Pn&&Pn(Y),Gr=Y}},Ks=yt({},["mi","mo","mn","ms","mtext"]),Ws=yt({},["foreignobject","desc","title","annotation-xml"]),Bl=yt({},["title","style","font","a","script"]),qs=yt({},[...xc,...Pc,...qC]),Gs=yt({},[...Mc,...GC]),Vl=function(Y){let Re=$(Y);(!Re||!Re.tagName)&&(Re={namespaceURI:ct,tagName:"template"});const Je=Ri(Y.tagName),Ot=Ri(Re.tagName);return Nt[Y.namespaceURI]?Y.namespaceURI===st?Re.namespaceURI===rt?Je==="svg":Re.namespaceURI===Be?Je==="svg"&&(Ot==="annotation-xml"||Ks[Ot]):!!qs[Je]:Y.namespaceURI===Be?Re.namespaceURI===rt?Je==="math":Re.namespaceURI===st?Je==="math"&&Ws[Ot]:!!Gs[Je]:Y.namespaceURI===rt?Re.namespaceURI===st&&!Ws[Ot]||Re.namespaceURI===Be&&!Ks[Ot]?!1:!Gs[Je]&&(Bl[Je]||!qs[Je]):!!(Pt==="application/xhtml+xml"&&Nt[Y.namespaceURI]):!1},Pr=function(Y){Qo(t.removed,{element:Y});try{Y.parentNode.removeChild(Y)}catch{Y.remove()}},Vo=function(Y,Re){try{Qo(t.removed,{attribute:Re.getAttributeNode(Y),from:Re})}catch{Qo(t.removed,{attribute:null,from:Re})}if(Re.removeAttribute(Y),Y==="is"&&!O[Y])if(x||le)try{Pr(Re)}catch{}else try{Re.setAttribute(Y,"")}catch{}},Uo=function(Y){let Re=null,Je=null;if(k)Y="<remove></remove>"+Y;else{const ln=UC(Y,/^[\r\n\t ]+/);Je=ln&&ln[0]}Pt==="application/xhtml+xml"&&ct===rt&&(Y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Y+"</body></html>");const Ot=g?g.createHTML(Y):Y;if(ct===rt)try{Re=new m().parseFromString(Ot,Pt)}catch{}if(!Re||!Re.documentElement){Re=w.createDocument(ct,"template",null);try{Re.documentElement.innerHTML=wt?p:Ot}catch{}}const tn=Re.body||Re.documentElement;return Y&&Je&&tn.insertBefore(n.createTextNode(Je),tn.childNodes[0]||null),ct===rt?Z.call(Re,ie?"html":"body")[0]:ie?Re.documentElement:tn},Ho=function(Y){return S.call(Y.ownerDocument||Y,Y,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},Ul=function(Y){return Y instanceof d&&(typeof Y.nodeName!="string"||typeof Y.textContent!="string"||typeof Y.removeChild!="function"||!(Y.attributes instanceof u)||typeof Y.removeAttribute!="function"||typeof Y.setAttribute!="function"||typeof Y.namespaceURI!="string"||typeof Y.insertBefore!="function"||typeof Y.hasChildNodes!="function")},Js=function(Y){return typeof i=="function"&&Y instanceof i},rr=function(Y,Re,Je){ce[Y]&&yi(ce[Y],Ot=>{Ot.call(t,Re,Je,Gr)})},$a=function(Y){let Re=null;if(rr("beforeSanitizeElements",Y,null),Ul(Y))return Pr(Y),!0;const Je=qt(Y.nodeName);if(rr("uponSanitizeElement",Y,{tagName:Je,allowedTags:ve}),Y.hasChildNodes()&&!Js(Y.firstElementChild)&&zn(/<[/\w]/g,Y.innerHTML)&&zn(/<[/\w]/g,Y.textContent))return Pr(Y),!0;if(!ve[Je]||I[Je]){if(!I[Je]&&zo(Je)&&(q.tagNameCheck instanceof RegExp&&zn(q.tagNameCheck,Je)||q.tagNameCheck instanceof Function&&q.tagNameCheck(Je)))return!1;if(U&&!D[Je]){const Ot=$(Y)||Y.parentNode,tn=A(Y)||Y.childNodes;if(tn&&Ot){const ln=tn.length;for(let gn=ln-1;gn>=0;--gn)Ot.insertBefore(v(tn[gn],!0),_(Y))}}return Pr(Y),!0}return Y instanceof l&&!Vl(Y)||(Je==="noscript"||Je==="noembed"||Je==="noframes")&&zn(/<\/no(script|embed|frames)/i,Y.innerHTML)?(Pr(Y),!0):(X&&Y.nodeType===3&&(Re=Y.textContent,yi([Oe,ge,we],Ot=>{Re=Xo(Re,Ot," ")}),Y.textContent!==Re&&(Qo(t.removed,{element:Y.cloneNode()}),Y.textContent=Re)),rr("afterSanitizeElements",Y,null),!1)},Ys=function(Y,Re,Je){if(V&&(Re==="id"||Re==="name")&&(Je in n||Je in jl))return!1;if(!(Le&&!R[Re]&&zn(_e,Re))){if(!(pe&&zn(Ke,Re))){if(!O[Re]||R[Re]){if(!(zo(Y)&&(q.tagNameCheck instanceof RegExp&&zn(q.tagNameCheck,Y)||q.tagNameCheck instanceof Function&&q.tagNameCheck(Y))&&(q.attributeNameCheck instanceof RegExp&&zn(q.attributeNameCheck,Re)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(Re))||Re==="is"&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&zn(q.tagNameCheck,Je)||q.tagNameCheck instanceof Function&&q.tagNameCheck(Je))))return!1}else if(!Te[Re]){if(!zn(be,Xo(Je,Ae,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&Y!=="script"&&HC(Je,"data:")===0&&de[Y])){if(!(B&&!zn(Ee,Xo(Je,Ae,"")))){if(Je)return!1}}}}}}return!0},zo=function(Y){return Y!=="annotation-xml"&&Y.indexOf("-")>0},Qs=function(Y){rr("beforeSanitizeAttributes",Y,null);const{attributes:Re}=Y;if(!Re)return;const Je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O};let Ot=Re.length;for(;Ot--;){const tn=Re[Ot],{name:ln,namespaceURI:gn,value:yr}=tn,Sa=qt(ln);let yn=ln==="value"?yr:zC(yr);if(Je.attrName=Sa,Je.attrValue=yn,Je.keepAttr=!0,Je.forceKeepAttr=void 0,rr("uponSanitizeAttribute",Y,Je),yn=Je.attrValue,Je.forceKeepAttr||(Vo(ln,Y),!Je.keepAttr))continue;if(!ee&&zn(/\/>/i,yn)){Vo(ln,Y);continue}X&&yi([Oe,ge,we],Zs=>{yn=Xo(yn,Zs," ")});const Xs=qt(Y.nodeName);if(Ys(Xs,Sa,yn)){if(K&&(Sa==="id"||Sa==="name")&&(Vo(ln,Y),yn=ue+yn),g&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!gn)switch(y.getAttributeType(Xs,Sa)){case"TrustedHTML":{yn=g.createHTML(yn);break}case"TrustedScriptURL":{yn=g.createScriptURL(yn);break}}try{gn?Y.setAttributeNS(gn,ln,yn):Y.setAttribute(ln,yn),Kp(t.removed)}catch{}}}rr("afterSanitizeAttributes",Y,null)},Hl=function Qe(Y){let Re=null;const Je=Ho(Y);for(rr("beforeSanitizeShadowDOM",Y,null);Re=Je.nextNode();)rr("uponSanitizeShadowNode",Re,null),!$a(Re)&&(Re.content instanceof o&&Qe(Re.content),Qs(Re));rr("afterSanitizeShadowDOM",Y,null)};return t.sanitize=function(Qe){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re=null,Je=null,Ot=null,tn=null;if(wt=!Qe,wt&&(Qe="<!-->"),typeof Qe!="string"&&!Js(Qe))if(typeof Qe.toString=="function"){if(Qe=Qe.toString(),typeof Qe!="string")throw Zo("dirty is not a string, aborting")}else throw Zo("toString is not a function");if(!t.isSupported)return Qe;if(Ie||Bo(Y),t.removed=[],typeof Qe=="string"&&(z=!1),z){if(Qe.nodeName){const yr=qt(Qe.nodeName);if(!ve[yr]||I[yr])throw Zo("root node is forbidden and cannot be sanitized in-place")}}else if(Qe instanceof i)Re=Uo("<!---->"),Je=Re.ownerDocument.importNode(Qe,!0),Je.nodeType===1&&Je.nodeName==="BODY"||Je.nodeName==="HTML"?Re=Je:Re.appendChild(Je);else{if(!x&&!X&&!ie&&Qe.indexOf("<")===-1)return g&&j?g.createHTML(Qe):Qe;if(Re=Uo(Qe),!Re)return x?null:j?p:""}Re&&k&&Pr(Re.firstChild);const ln=Ho(z?Qe:Re);for(;Ot=ln.nextNode();)$a(Ot)||(Ot.content instanceof o&&Hl(Ot.content),Qs(Ot));if(z)return Qe;if(x){if(le)for(tn=F.call(Re.ownerDocument);Re.firstChild;)tn.appendChild(Re.firstChild);else tn=Re;return(O.shadowroot||O.shadowrootmode)&&(tn=re.call(r,tn,!0)),tn}let gn=ie?Re.outerHTML:Re.innerHTML;return ie&&ve["!doctype"]&&Re.ownerDocument&&Re.ownerDocument.doctype&&Re.ownerDocument.doctype.name&&zn(Gv,Re.ownerDocument.doctype.name)&&(gn="<!DOCTYPE "+Re.ownerDocument.doctype.name+`>
`+gn),X&&yi([Oe,ge,we],yr=>{gn=Xo(gn,yr," ")}),g&&j?g.createHTML(gn):gn},t.setConfig=function(){let Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Bo(Qe),Ie=!0},t.clearConfig=function(){Gr=null,Ie=!1},t.isValidAttribute=function(Qe,Y,Re){Gr||Bo({});const Je=qt(Qe),Ot=qt(Y);return Ys(Je,Ot,Re)},t.addHook=function(Qe,Y){typeof Y=="function"&&(ce[Qe]=ce[Qe]||[],Qo(ce[Qe],Y))},t.removeHook=function(Qe){if(ce[Qe])return Kp(ce[Qe])},t.removeHooks=function(Qe){ce[Qe]&&(ce[Qe]=[])},t.removeAllHooks=function(){ce={}},t}var a$=Jv();function o$(e,t){const n=e.hooks??{};let r;for(r in n){const a=n[r];a!==void 0&&t.addHook(r,a)}}function Yv(){return a$()}function s$(e={},t=Yv){const n=t();o$(e,n);const r=function(a,o){const s=o.value;if(o.oldValue===s)return;const i=`${s}`,l=o.arg,c=e.namedConfigurations,u=e.default??{};if(c&&l!==void 0){a.innerHTML=n.sanitize(i,c[l]??u);return}a.innerHTML=n.sanitize(i,u)};return{mounted:r,updated:r}}const i$={install(e,t={},n=Yv){e.directive("dompurify-html",s$(t,n))}};function l$(e,t){return J({get(){const n=localStorage.getItem(e);if(n)try{const r=JSON.parse(n);if((t==null?void 0:t(r))===!1){localStorage.removeItem(e);return}return r}catch{localStorage.removeItem(e);return}},set(n){n===void 0?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(n))}})}const c$=1500,u$=1e3,d$=100;var f$=(e=>(e[e.None=0]="None",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e))(f$||{});function p$(){const e=l$("generateBuilderManager__mode"),t={mode:e.value??"ui",selection:[],clipboard:null,mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]},n=$e(t);let r=null,a=0;const o=[],s=ve=>{l.value=ve},i=()=>n.value.mode,l=J({get:()=>n.value.mode,set(ve){n.value.mode=ve,e.value=ve}}),c=J(()=>l.value=="workflows"?"workflows_root":"root"),u=(ve,me,O)=>{if(ve===null){n.value.selection=[];return}n.value.selection.length!==0&&(n.value.selection=[]),d(ve,me,O)},d=(ve,me,O)=>{let fe=me;if(typeof fe>"u"){const q=document.querySelector(`.ComponentRenderer [data-writer-id="${ve}"]`);fe=q==null?void 0:q.dataset.writerInstancePath}n.value.selection.push({componentId:ve,instancePath:fe,source:O})},m=(ve,me,O,fe)=>{if(!ve.shiftKey&&!ve.ctrlKey&&!ve.metaKey)return u(me,O,fe);y(me)?b(me):d(me,O,fe)},y=ve=>n.value.selection.some(me=>me.componentId===ve),b=ve=>{const me=n.value.selection.filter(O=>O.componentId!==ve);me.length!==n.value.selection.length&&(n.value.selection=me)},v=J(()=>n.value.selection.length===0?0:n.value.selection.length===1?1:2),_=J(()=>v.value===1),A=J(()=>n.value.selection[0]),$=J(()=>{var ve;return(ve=n.value.selection[0])==null?void 0:ve.componentId}),g=ve=>{n.value.clipboard=ve},p=()=>n.value.clipboard,w=(ve,me,O=!1)=>{if(r!==null)return;a<0&&(o.splice(a),a=0);const fe=o[o.length-1],q=Date.now()-(fe==null?void 0:fe.timestamp);if(fe!=null&&fe.enableDebounce&&(fe==null?void 0:fe.id)==ve&&q<u$){r=o.pop();return}r={id:ve,desc:me,timestamp:null,enableDebounce:O,mutations:{}}},S=ve=>{r.mutations[ve.id]||(r.mutations[ve.id]={jsonPre:ve?JSON.stringify(ve):void 0})},F=ve=>{r.mutations[ve.id]||(r.mutations[ve.id]={}),r.mutations[ve.id].jsonPost=ve?JSON.stringify(ve):void 0},Z=ve=>{r.id===ve&&(r.timestamp=Date.now(),o.push(r),r=null,Oe())},re=()=>{const ve=o.length-1+a,me=o[ve];return me&&a--,Oe(),me},ce=()=>{const ve=o.length+a,me=o[ve];return me&&a++,Oe(),me},Oe=()=>{const ve=o.length-1+a,me=o[ve],O=o.length+a,fe=o[O];n.value.mutationTransactionsSnapshot={undo:me,redo:fe}},ge=()=>n.value.mutationTransactionsSnapshot;async function we(ve){const me=JSON.stringify(ve);let O=5981;for(let q=0;q<me.length;q++)O=(O<<5)+O+me.charCodeAt(q);return O.toString(16).padStart(2,"0")}const _e=async ve=>{const{type:me,title:O,message:fe,code:q,workflowExecution:I,id:R}=ve,pe=await we(ve);if(R){const Le=n.value.logEntries.findIndex(B=>B.id===R);Le!==-1&&n.value.logEntries.splice(Le,1)}else{const Le=n.value.logEntries.find(B=>B.fingerprint===pe);if(Le){Le.repeated++,Le.timestampReceived=new Date,n.value.logEntries.sort((B,ee)=>B.timestampReceived<ee.timestampReceived?1:-1);return}}n.value.logEntries.unshift({id:R,type:me,title:O,message:fe,code:q,workflowExecution:I,timestampReceived:new Date,fingerprint:pe,repeated:0}),n.value.logEntries.splice(d$)},Ke=()=>n.value.logEntries.length,Ee=()=>{n.value.logEntries=[]},Ae=()=>n.value.logEntries;return{setMode:s,getMode:i,mode:l,activeRootId:c,openPanels:$e(new Set),isSettingsBarCollapsed:$e(!1),isComponentIdSelected:y,selectionStatus:v,isSingleSelectionActive:_,firstSelectedId:$,firstSelectedItem:A,removeSelectedComponentId:b,setSelection:u,appendSelection:d,handleSelectionFromEvent:m,selection:J(()=>n.value.selection),setClipboard:g,getClipboard:p,openMutationTransaction:w,registerPreMutation:S,registerPostMutation:F,closeMutationTransaction:Z,consumeUndoTransaction:re,consumeRedoTransaction:ce,getMutationTransactionsSnapshot:ge,handleLogEntry:_e,getLogEntryCount:Ke,clearLogEntries:Ee,getLogEntries:Ae}}const oe={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};var co=(e=>(e.Cut="cut",e.Copy="copy",e))(co||{}),G=(e=>(e.Text="Text",e.Boolean="Boolean",e.KeyValue="Key-Value",e.Color="Color",e.Shadow="Shadow",e.Number="Number",e.Object="Object",e.IdKey="Identifying Key",e.Width="Width",e.HAlign="Align (H)",e.VAlign="Align (V)",e.Padding="Padding",e.Tools="Tools",e.ComponentPicker="Component",e.Code="Code",e.WorkflowKey="Workflow Key",e.Handler="Handler",e.WriterGraphId="Graph Id",e.WriterAppId="App Id",e))(G||{}),ze=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(ze||{}),Tl=(e=>(e.Text="Text",e.Textarea="Textarea",e))(Tl||{});const h$={class:"WdsNumberInput__right"},m$=ke({inheritAttrs:!1,__name:"WdsNumberInput",props:Hr({step:{type:Number,default:1},class:{type:String,default:void 0}},{modelValue:{type:Number,required:!1,default:void 0},modelModifiers:{}}),emits:Hr({focusout:e=>typeof e=="number"},["update:modelValue"]),setup(e,{expose:t}){const n=qr(e,"modelValue"),r=e;t({focus:s});const a=$e();function o(i){n.value=(n.value??0)+i,s()}function s(){var i;(i=a.value)==null||i.focus()}return(i,l)=>(E(),M("div",{class:it(["WdsNumberInput colorTransformer",r.class])},[sn(W("input",_o({ref_key:"input",ref:a,"onUpdate:modelValue":l[0]||(l[0]=c=>n.value=c),class:"WdsNumberInput__input"},i.$attrs,{type:"number",onFocusout:l[1]||(l[1]=c=>i.$emit("focusout",n.value))}),null,16),[[Ua,n.value]]),W("div",h$,[W("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[2]||(l[2]=Cr(c=>o(e.step),["prevent"])),onPointerdown:l[3]||(l[3]=Cr(()=>{},["prevent"]))},l[6]||(l[6]=[W("span",{class:"WdsNumberInput__right__arrow__up"},null,-1)]),32),W("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[4]||(l[4]=Cr(c=>o(-e.step),["prevent"])),onPointerdown:l[5]||(l[5]=Cr(()=>{},["prevent"]))},l[7]||(l[7]=[W("span",{class:"WdsNumberInput__right__arrow__down"},null,-1)]),32)])],2))}}),Ne=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},v$=Ne(m$,[["__scopeId","data-v-e225ba84"]]),g$={key:1,class:"CoreDataframeCellNumber--text"},y$=ke({__name:"CoreDataframeCellNumber",props:{value:{validator:e=>typeof e=="number"||typeof e=="bigint",required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="number"},setup(e,{emit:t}){const n=e,r=t;function a(o){o!==n.value&&r("change",o)}return(o,s)=>e.editable?(E(),je(v$,{key:0,class:"CoreDataframeCellNumber--input","model-value":Number(e.value),onFocusout:s[0]||(s[0]=i=>a(i))},null,8,["model-value"])):(E(),M("div",g$,Pe(e.value),1))}}),_$=Ne(y$,[["__scopeId","data-v-76f0032c"]]),b$={class:"markdown"},w$=ke({__name:"BaseMarkdownRaw",props:{rawMarkdown:{type:String,required:!0}},setup(e){return(t,n)=>{const r=Bm("dompurify-html");return sn((E(),M("div",b$,null,512)),[[r,e.rawMarkdown]])}}}),Qv=Ne(w$,[["__scopeId","data-v-2220bc7a"]]),Xv=ke({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=$e(!1),r=e;return xo(async()=>{t=await Jt(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(a,o)=>n.value?(E(),je(Qv,{key:0,"raw-markdown":String(P(t).parse(r.rawText)).trim(),class:"BaseMarkdown"},null,8,["raw-markdown"])):Se("",!0)}}),A$=["aria-invalid"],C$=ke({__name:"WdsTextareaInput",props:Hr({invalid:{type:Boolean,required:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=qr(e,"modelValue");t({focus:i,getSelection:s,value:n,setSelectionEnd:o,setSelectionStart:a});const r=et("input");function a(l){r.value&&(r.value.selectionStart=l)}function o(l){r.value&&(r.value.selectionEnd=l)}function s(){var l,c;return{selectionStart:(l=r.value)==null?void 0:l.selectionStart,selectionEnd:(c=r.value)==null?void 0:c.selectionEnd}}function i(){var l;(l=r.value)==null||l.focus()}return(l,c)=>sn((E(),M("textarea",{ref_key:"input",ref:r,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),"aria-invalid":e.invalid},null,8,A$)),[[Ua,n.value]])}}),Zv=Ne(C$,[["__scopeId","data-v-4c9293dd"]]),$$={key:2,class:"CoreDataframeCellText--text"},S$=ke({__name:"CoreDataframeCellText",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,a=et("textarea");function o(){a.value.value!==n.value&&r("change",a.value.value)}return(s,i)=>e.editable?(E(),je(Zv,{key:0,ref_key:"textarea",ref:a,class:"CoreDataframeCellText--textarea",rows:"1","model-value":String(e.value),onFocusout:o},null,8,["model-value"])):e.useMarkdown?(E(),je(Xv,{key:1,"raw-text":String(e.value)},null,8,["raw-text"])):(E(),M("div",$$,[W("p",{class:it({"CoreDataframeCellText__content--noWrap":!e.wrapText})},Pe(e.value),3)]))}}),I$=Ne(S$,[["__scopeId","data-v-992ae253"]]),E$=["checked","readonly","tabindex"],k$=ke({__name:"CoreDataframeCellBoolean",props:{value:{type:Boolean,required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t;function a(o){if(!n.editable){o.preventDefault(),o.stopPropagation();return}r("change",o.target.checked)}return(o,s)=>(E(),M("div",{class:it(["CoreDataframeCellBoolean",{"CoreDataframeCellBoolean--disabled":!e.editable}])},[W("input",{type:"checkbox",checked:e.value,readonly:!e.editable,tabindex:e.editable?0:-1,onChange:a},null,40,E$)],2))}}),T$=Ne(k$,[["__scopeId","data-v-2d30bc74"]]);function eg(e,t){return typeof t=="bigint"?t.toString()+"n":t}const x$={class:"CoreDataframeCellUnknown"},P$=ke({__name:"CoreDataframeCellUnknown",props:{value:{validator:()=>!0,required:!0},wrapText:{type:Boolean,required:!1}},setup(e){const t=e,n=J(()=>JSON.stringify(t.value,eg));return(r,a)=>(E(),M("div",x$,[W("p",{class:it({"CoreDataframeCellUnknown__content--noWrap":!e.wrapText})},Pe(n.value),3)]))}}),M$=Ne(P$,[["__scopeId","data-v-06d2511b"]]),N$=ke({__name:"CoreDataframeCell",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>e!==void 0},setup(e){const t=e,n=J(()=>{switch(typeof t.value){case"number":case"bigint":return _$;case"boolean":return T$;case"string":return I$;default:return M$}});return(r,a)=>(E(),je(Po(n.value),{value:e.value,"use-markdown":e.useMarkdown,editable:e.editable,"wrap-text":e.wrapText,onChange:a[0]||(a[0]=o=>r.$emit("change",o))},null,40,["value","use-markdown","editable","wrap-text"]))}});function tg(e){const t=$e(!1);function n(){t.value=!0}function r(a){const o=a.currentTarget;document.hasFocus()?o.contains(a.relatedTarget)||(t.value=!1):window.addEventListener("focus",function s(){window.removeEventListener("focus",s),o.isConnected&&!o.contains(document.activeElement)&&(t.value=!1)})}return He(e,(a,o)=>{o&&(o.removeEventListener("focusin",n),o.removeEventListener("focusout",r)),e&&(e.value.addEventListener("focusin",n),e.value.addEventListener("focusout",r))}),wa(()=>{e.value.removeEventListener("focusin",n),e.value.removeEventListener("focusout",r)}),En(t)}const O$=["onClickCapture"],R$=ke({__name:"BaseDropdown",props:{options:{type:Object,required:!0}},emits:{selected:e=>typeof e=="string"},setup(e,{emit:t}){const n=t,r=et("root"),a=et("trigger"),o=$e(!1),s=$e("unset"),i=$e("unset"),l=tg(r);He(l,()=>{l.value||c()});function c(){o.value=!1}function u(){if(!a.value)return;const m=a.value.getBoundingClientRect();s.value=`${m.top+m.height+4+window.pageYOffset}px`,i.value=`${m.left+window.pageXOffset}px`,o.value=!0}function d(m){n("selected",m),c()}return Xt(()=>window.addEventListener("scroll",c)),tr(()=>window.removeEventListener("scroll",c)),(m,y)=>(E(),M("div",{ref_key:"root",ref:r,class:"BaseDropdown"},[W("button",{ref_key:"trigger",ref:a,class:"BaseDropdown__trigger",onClick:u},y[0]||(y[0]=[W("i",{class:"material-symbols-outlined"},"more_horiz",-1)]),512),o.value?(E(),M("div",{key:0,class:"BaseDropdown__dropdown",style:mt({top:s.value,left:i.value})},[(E(!0),M(Ve,null,It(Object.entries(e.options),([b,v])=>(E(),M("button",{key:b,class:"BaseDropdown__dropdown_item",tabindex:"1",onClickCapture:_=>d(b)},Pe(v),41,O$))),128))],4)):Se("",!0)],512))}}),L$=Ne(R$,[["__scopeId","data-v-ff44e553"]]),Qn="__internal_arquero_id",D$="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",ng=/^__index_level_[0-9]+__$/,F$={key:0,class:"CoreDataframeRow__cell CoreDataframeRow__cell--index"},j$={class:"CoreDataframeRow__options__wrapper"},B$=ke({__name:"CoreDataframeRow",props:{showIndex:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1},indexText:{type:[Number,String],required:!0},columns:{type:Array,required:!0},row:{type:Object,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},actions:{type:Object,required:!0},displayShadowOnSticky:{type:Boolean}},emits:{change:(e,t,n)=>typeof e=="string"&&typeof t=="number"&&n!==void 0,action:(e,t)=>typeof t=="number"&&typeof e=="string"},setup(e){const t=e,n=$e(),r=tg(n),a=$e(!1),o=J(()=>Object.keys(t.actions||{}).length>0);return(s,i)=>(E(),M("div",{ref_key:"root",ref:n,class:"CoreDataframeRow",tabindex:"0",onMouseover:i[1]||(i[1]=l=>a.value=!0),onMouseleave:i[2]||(i[2]=l=>a.value=!1),onFocusin:i[3]||(i[3]=l=>a.value=!0)},[i[4]||(i[4]=W("div",{class:"CoreDataframeRow__spacer"},null,-1)),e.showIndex?(E(),M("div",F$,Pe(e.indexText),1)):Se("",!0),(E(!0),M(Ve,null,It(e.columns,l=>(E(),M("div",{key:`${e.row[P(Qn)]}_${l}`,class:"CoreDataframeRow__cell"},[Ge(N$,{value:e.row[l],"use-markdown":e.useMarkdown,editable:e.editable&&(a.value||P(r)),"wrap-text":e.wrapText,class:"CoreDataframeRow__cell__content",onChange:c=>s.$emit("change",l,e.row[P(Qn)],c)},null,8,["value","use-markdown","editable","wrap-text","onChange"])]))),128)),o.value?(E(),M("div",{key:1,class:it(["CoreDataframeRow__options",{"CoreDataframeRow__options--shadow":e.displayShadowOnSticky}])},[W("div",j$,[Ge(L$,{options:e.actions,onSelected:i[0]||(i[0]=l=>s.$emit("action",l,e.row[P(Qn)]))},null,8,["options"])])],2)):Se("",!0)],544))}}),V$=Ne(B$,[["__scopeId","data-v-e7ab5380"]]);var U$=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function X5(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var fu={exports:{}},ag={},mr={},Io={},js={},vt={},Ms={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((g,p)=>`${g}${p}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((g,p)=>(p instanceof n&&(g[p.str]=(g[p.str]||0)+1),g),{})}}e._Code=r,e.nil=new r("");function a(A,...$){const g=[A[0]];let p=0;for(;p<$.length;)i(g,$[p]),g.push(A[++p]);return new r(g)}e._=a;const o=new r("+");function s(A,...$){const g=[y(A[0])];let p=0;for(;p<$.length;)g.push(o),i(g,$[p]),g.push(o,y(A[++p]));return l(g),new r(g)}e.str=s;function i(A,$){$ instanceof r?A.push(...$._items):$ instanceof n?A.push($):A.push(d($))}e.addCodeArg=i;function l(A){let $=1;for(;$<A.length-1;){if(A[$]===o){const g=c(A[$-1],A[$+1]);if(g!==void 0){A.splice($-1,3,g);continue}A[$++]="+"}$++}}function c(A,$){if($==='""')return A;if(A==='""')return $;if(typeof A=="string")return $ instanceof n||A[A.length-1]!=='"'?void 0:typeof $!="string"?`${A.slice(0,-1)}${$}"`:$[0]==='"'?A.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(A instanceof n))return`"${A}${$.slice(1)}`}function u(A,$){return $.emptyStr()?A:A.emptyStr()?$:s`${A}${$}`}e.strConcat=u;function d(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:y(Array.isArray(A)?A.join(","):A)}function m(A){return new r(y(A))}e.stringify=m;function y(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function b(A){return typeof A=="string"&&e.IDENTIFIER.test(A)?new r(`.${A}`):a`[${A}]`}e.getProperty=b;function v(A){if(typeof A=="string"&&e.IDENTIFIER.test(A))return new r(`${A}`);throw new Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}e.getEsmExportName=v;function _(A){return new r(A.toString())}e.regexpCode=_})(Ms);var pu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ms;class n extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var r;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=a;class o extends t.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class i extends a{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil}}get(){return this._scope}name(c){return new o(c,this._newName(c))}value(c,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(c),{prefix:y}=m,b=(d=u.key)!==null&&d!==void 0?d:u.ref;let v=this._values[y];if(v){const $=v.get(b);if($)return $}else v=this._values[y]=new Map;v.set(b,m);const _=this._scope[y]||(this._scope[y]=[]),A=_.length;return _[A]=u.ref,m.setValue(u,{property:y,itemIndex:A}),m}getValue(c,u){const d=this._values[c];if(d)return d.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${c}${d.scopePath}`})}scopeCode(c=this._values,u,d){return this._reduceValues(c,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,d)}_reduceValues(c,u,d={},m){let y=t.nil;for(const b in c){const v=c[b];if(!v)continue;const _=d[b]=d[b]||new Map;v.forEach(A=>{if(_.has(A))return;_.set(A,r.Started);let $=u(A);if($){const g=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${g} ${A} = ${$};${this.opts._n}`}else if($=m==null?void 0:m(A))y=(0,t._)`${y}${$}${this.opts._n}`;else throw new n(A);_.set(A,r.Completed)})}return y}}e.ValueScope=i})(pu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Ms,n=pu;var r=Ms;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=pu;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(I,R){return this}}class s extends o{constructor(I,R,pe){super(),this.varKind=I,this.name=R,this.rhs=pe}render({es5:I,_n:R}){const pe=I?n.varKinds.var:this.varKind,Le=this.rhs===void 0?"":` = ${this.rhs}`;return`${pe} ${this.name}${Le};`+R}optimizeNames(I,R){if(I[this.name.str])return this.rhs&&(this.rhs=_e(this.rhs,I,R)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(I,R,pe){super(),this.lhs=I,this.rhs=R,this.sideEffects=pe}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,R){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=_e(this.rhs,I,R),this}get names(){const I=this.lhs instanceof t.Name?{}:{...this.lhs.names};return we(I,this.rhs)}}class l extends i{constructor(I,R,pe,Le){super(I,pe,Le),this.op=R}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}}class c extends o{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}}class u extends o{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}}class d extends o{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}}class m extends o{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,R){return this.code=_e(this.code,I,R),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends o{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((R,pe)=>R+pe.render(I),"")}optimizeNodes(){const{nodes:I}=this;let R=I.length;for(;R--;){const pe=I[R].optimizeNodes();Array.isArray(pe)?I.splice(R,1,...pe):pe?I[R]=pe:I.splice(R,1)}return I.length>0?this:void 0}optimizeNames(I,R){const{nodes:pe}=this;let Le=pe.length;for(;Le--;){const B=pe[Le];B.optimizeNames(I,R)||(Ke(I,B.names),pe.splice(Le,1))}return pe.length>0?this:void 0}get names(){return this.nodes.reduce((I,R)=>ge(I,R.names),{})}}class b extends y{render(I){return"{"+I._n+super.render(I)+"}"+I._n}}class v extends y{}class _ extends b{}_.kind="else";class A extends b{constructor(I,R){super(R),this.condition=I}render(I){let R=`if(${this.condition})`+super.render(I);return this.else&&(R+="else "+this.else.render(I)),R}optimizeNodes(){super.optimizeNodes();const I=this.condition;if(I===!0)return this.nodes;let R=this.else;if(R){const pe=R.optimizeNodes();R=this.else=Array.isArray(pe)?new _(pe):pe}if(R)return I===!1?R instanceof A?R:R.nodes:this.nodes.length?this:new A(Ee(I),R instanceof A?[R]:R.nodes);if(!(I===!1||!this.nodes.length))return this}optimizeNames(I,R){var pe;if(this.else=(pe=this.else)===null||pe===void 0?void 0:pe.optimizeNames(I,R),!!(super.optimizeNames(I,R)||this.else))return this.condition=_e(this.condition,I,R),this}get names(){const I=super.names;return we(I,this.condition),this.else&&ge(I,this.else.names),I}}A.kind="if";class $ extends b{}$.kind="for";class g extends ${constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,R){if(super.optimizeNames(I,R))return this.iteration=_e(this.iteration,I,R),this}get names(){return ge(super.names,this.iteration.names)}}class p extends ${constructor(I,R,pe,Le){super(),this.varKind=I,this.name=R,this.from=pe,this.to=Le}render(I){const R=I.es5?n.varKinds.var:this.varKind,{name:pe,from:Le,to:B}=this;return`for(${R} ${pe}=${Le}; ${pe}<${B}; ${pe}++)`+super.render(I)}get names(){const I=we(super.names,this.from);return we(I,this.to)}}class w extends ${constructor(I,R,pe,Le){super(),this.loop=I,this.varKind=R,this.name=pe,this.iterable=Le}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,R){if(super.optimizeNames(I,R))return this.iterable=_e(this.iterable,I,R),this}get names(){return ge(super.names,this.iterable.names)}}class S extends b{constructor(I,R,pe){super(),this.name=I,this.args=R,this.async=pe}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}}S.kind="func";class F extends y{render(I){return"return "+super.render(I)}}F.kind="return";class Z extends b{render(I){let R="try"+super.render(I);return this.catch&&(R+=this.catch.render(I)),this.finally&&(R+=this.finally.render(I)),R}optimizeNodes(){var I,R;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(I,R){var pe,Le;return super.optimizeNames(I,R),(pe=this.catch)===null||pe===void 0||pe.optimizeNames(I,R),(Le=this.finally)===null||Le===void 0||Le.optimizeNames(I,R),this}get names(){const I=super.names;return this.catch&&ge(I,this.catch.names),this.finally&&ge(I,this.finally.names),I}}class re extends b{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}}re.kind="catch";class ce extends b{render(I){return"finally"+super.render(I)}}ce.kind="finally";class Oe{constructor(I,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
`:""},this._extScope=I,this._scope=new n.Scope({parent:I}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,R){const pe=this._extScope.value(I,R);return(this._values[pe.prefix]||(this._values[pe.prefix]=new Set)).add(pe),pe}getScopeValue(I,R){return this._extScope.getValue(I,R)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,R,pe,Le){const B=this._scope.toName(R);return pe!==void 0&&Le&&(this._constants[B.str]=pe),this._leafNode(new s(I,B,pe)),B}const(I,R,pe){return this._def(n.varKinds.const,I,R,pe)}let(I,R,pe){return this._def(n.varKinds.let,I,R,pe)}var(I,R,pe){return this._def(n.varKinds.var,I,R,pe)}assign(I,R,pe){return this._leafNode(new i(I,R,pe))}add(I,R){return this._leafNode(new l(I,e.operators.ADD,R))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new m(I)),this}object(...I){const R=["{"];for(const[pe,Le]of I)R.length>1&&R.push(","),R.push(pe),(pe!==Le||this.opts.es5)&&(R.push(":"),(0,t.addCodeArg)(R,Le));return R.push("}"),new t._Code(R)}if(I,R,pe){if(this._blockNode(new A(I)),R&&pe)this.code(R).else().code(pe).endIf();else if(R)this.code(R).endIf();else if(pe)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new A(I))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(A,_)}_for(I,R){return this._blockNode(I),R&&this.code(R).endFor(),this}for(I,R){return this._for(new g(I),R)}forRange(I,R,pe,Le,B=this.opts.es5?n.varKinds.var:n.varKinds.let){const ee=this._scope.toName(I);return this._for(new p(B,ee,R,pe),()=>Le(ee))}forOf(I,R,pe,Le=n.varKinds.const){const B=this._scope.toName(I);if(this.opts.es5){const ee=R instanceof t.Name?R:this.var("_arr",R);return this.forRange("_i",0,(0,t._)`${ee}.length`,X=>{this.var(B,(0,t._)`${ee}[${X}]`),pe(B)})}return this._for(new w("of",Le,B,R),()=>pe(B))}forIn(I,R,pe,Le=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${R})`,pe);const B=this._scope.toName(I);return this._for(new w("in",Le,B,R),()=>pe(B))}endFor(){return this._endBlockNode($)}label(I){return this._leafNode(new c(I))}break(I){return this._leafNode(new u(I))}return(I){const R=new F;if(this._blockNode(R),this.code(I),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(F)}try(I,R,pe){if(!R&&!pe)throw new Error('CodeGen: "try" without "catch" and "finally"');const Le=new Z;if(this._blockNode(Le),this.code(I),R){const B=this.name("e");this._currNode=Le.catch=new re(B),R(B)}return pe&&(this._currNode=Le.finally=new ce,this.code(pe)),this._endBlockNode(re,ce)}throw(I){return this._leafNode(new d(I))}block(I,R){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(R),this}endBlock(I){const R=this._blockStarts.pop();if(R===void 0)throw new Error("CodeGen: not in self-balancing block");const pe=this._nodes.length-R;if(pe<0||I!==void 0&&pe!==I)throw new Error(`CodeGen: wrong number of nodes: ${pe} vs ${I} expected`);return this._nodes.length=R,this}func(I,R=t.nil,pe,Le){return this._blockNode(new S(I,R,pe)),Le&&this.code(Le).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,R){const pe=this._currNode;if(pe instanceof I||R&&pe instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${I.kind}/${R.kind}`:I.kind}"`)}_elseNode(I){const R=this._currNode;if(!(R instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=I,this}get _root(){return this._nodes[0]}get _currNode(){const I=this._nodes;return I[I.length-1]}set _currNode(I){const R=this._nodes;R[R.length-1]=I}}e.CodeGen=Oe;function ge(q,I){for(const R in I)q[R]=(q[R]||0)+(I[R]||0);return q}function we(q,I){return I instanceof t._CodeOrName?ge(q,I.names):q}function _e(q,I,R){if(q instanceof t.Name)return pe(q);if(!Le(q))return q;return new t._Code(q._items.reduce((B,ee)=>(ee instanceof t.Name&&(ee=pe(ee)),ee instanceof t._Code?B.push(...ee._items):B.push(ee),B),[]));function pe(B){const ee=R[B.str];return ee===void 0||I[B.str]!==1?B:(delete I[B.str],ee)}function Le(B){return B instanceof t._Code&&B._items.some(ee=>ee instanceof t.Name&&I[ee.str]===1&&R[ee.str]!==void 0)}}function Ke(q,I){for(const R in I)q[R]=(q[R]||0)-(I[R]||0)}function Ee(q){return typeof q=="boolean"||typeof q=="number"||q===null?!q:(0,t._)`!${fe(q)}`}e.not=Ee;const Ae=O(e.operators.AND);function be(...q){return q.reduce(Ae)}e.and=be;const ve=O(e.operators.OR);function me(...q){return q.reduce(ve)}e.or=me;function O(q){return(I,R)=>I===t.nil?R:R===t.nil?I:(0,t._)`${fe(I)} ${q} ${fe(R)}`}function fe(q){return q instanceof t.Name?q:(0,t._)`(${q})`}})(vt);var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.checkStrictMode=Ue.getErrorPath=Ue.Type=Ue.useFunc=Ue.setEvaluated=Ue.evaluatedPropsToName=Ue.mergeEvaluated=Ue.eachItem=Ue.unescapeJsonPointer=Ue.escapeJsonPointer=Ue.escapeFragment=Ue.unescapeFragment=Ue.schemaRefOrVal=Ue.schemaHasRulesButRef=Ue.schemaHasRules=Ue.checkUnknownRules=Ue.alwaysValidSchema=Ue.toHash=void 0;const Lt=vt,H$=Ms;function z$(e){const t={};for(const n of e)t[n]=!0;return t}Ue.toHash=z$;function K$(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(og(e,t),!sg(t,e.self.RULES.all))}Ue.alwaysValidSchema=K$;function og(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema||typeof t=="boolean")return;const a=r.RULES.keywords;for(const o in t)a[o]||cg(e,`unknown keyword: "${o}"`)}Ue.checkUnknownRules=og;function sg(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(t[n])return!0;return!1}Ue.schemaHasRules=sg;function W$(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Ue.schemaHasRulesButRef=W$;function q$({topSchemaRef:e,schemaPath:t},n,r,a){if(!a){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Lt._)`${n}`}return(0,Lt._)`${e}${t}${(0,Lt.getProperty)(r)}`}Ue.schemaRefOrVal=q$;function G$(e){return ig(decodeURIComponent(e))}Ue.unescapeFragment=G$;function J$(e){return encodeURIComponent(Gu(e))}Ue.escapeFragment=J$;function Gu(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ue.escapeJsonPointer=Gu;function ig(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ue.unescapeJsonPointer=ig;function Y$(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)}Ue.eachItem=Y$;function Qp({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(a,o,s,i)=>{const l=s===void 0?o:s instanceof Lt.Name?(o instanceof Lt.Name?e(a,o,s):t(a,o,s),s):o instanceof Lt.Name?(t(a,s,o),o):n(o,s);return i===Lt.Name&&!(l instanceof Lt.Name)?r(a,l):l}}Ue.mergeEvaluated={props:Qp({mergeNames:(e,t,n)=>e.if((0,Lt._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Lt._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Lt._)`${n} || {}`).code((0,Lt._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Lt._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Lt._)`${n} || {}`),Ju(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:lg}),items:Qp({mergeNames:(e,t,n)=>e.if((0,Lt._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Lt._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Lt._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Lt._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function lg(e,t){if(t===!0)return e.var("props",!0);const n=e.var("props",(0,Lt._)`{}`);return t!==void 0&&Ju(e,n,t),n}Ue.evaluatedPropsToName=lg;function Ju(e,t,n){Object.keys(n).forEach(r=>e.assign((0,Lt._)`${t}${(0,Lt.getProperty)(r)}`,!0))}Ue.setEvaluated=Ju;const Xp={};function Q$(e,t){return e.scopeValue("func",{ref:t,code:Xp[t.code]||(Xp[t.code]=new H$._Code(t.code))})}Ue.useFunc=Q$;var hu;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(hu||(Ue.Type=hu={}));function X$(e,t,n){if(e instanceof Lt.Name){const r=t===hu.Num;return n?r?(0,Lt._)`"[" + ${e} + "]"`:(0,Lt._)`"['" + ${e} + "']"`:r?(0,Lt._)`"/" + ${e}`:(0,Lt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Lt.getProperty)(e).toString():"/"+Gu(e)}Ue.getErrorPath=X$;function cg(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}Ue.checkStrictMode=cg;var Er={};Object.defineProperty(Er,"__esModule",{value:!0});const _n=vt,Z$={data:new _n.Name("data"),valCxt:new _n.Name("valCxt"),instancePath:new _n.Name("instancePath"),parentData:new _n.Name("parentData"),parentDataProperty:new _n.Name("parentDataProperty"),rootData:new _n.Name("rootData"),dynamicAnchors:new _n.Name("dynamicAnchors"),vErrors:new _n.Name("vErrors"),errors:new _n.Name("errors"),this:new _n.Name("this"),self:new _n.Name("self"),scope:new _n.Name("scope"),json:new _n.Name("json"),jsonPos:new _n.Name("jsonPos"),jsonLen:new _n.Name("jsonLen"),jsonPart:new _n.Name("jsonPart")};Er.default=Z$;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=vt,n=Ue,r=Er;e.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},e.keyword$DataError={message:({keyword:_,schemaType:A})=>A?(0,t.str)`"${_}" keyword must be ${A} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function a(_,A=e.keywordError,$,g){const{it:p}=_,{gen:w,compositeRule:S,allErrors:F}=p,Z=d(_,A,$);g??(S||F)?l(w,Z):c(p,(0,t._)`[${Z}]`)}e.reportError=a;function o(_,A=e.keywordError,$){const{it:g}=_,{gen:p,compositeRule:w,allErrors:S}=g,F=d(_,A,$);l(p,F),w||S||c(g,r.default.vErrors)}e.reportExtraError=o;function s(_,A){_.assign(r.default.errors,A),_.if((0,t._)`${r.default.vErrors} !== null`,()=>_.if(A,()=>_.assign((0,t._)`${r.default.vErrors}.length`,A),()=>_.assign(r.default.vErrors,null)))}e.resetErrorsCount=s;function i({gen:_,keyword:A,schemaValue:$,data:g,errsCount:p,it:w}){if(p===void 0)throw new Error("ajv implementation error");const S=_.name("err");_.forRange("i",p,r.default.errors,F=>{_.const(S,(0,t._)`${r.default.vErrors}[${F}]`),_.if((0,t._)`${S}.instancePath === undefined`,()=>_.assign((0,t._)`${S}.instancePath`,(0,t.strConcat)(r.default.instancePath,w.errorPath))),_.assign((0,t._)`${S}.schemaPath`,(0,t.str)`${w.errSchemaPath}/${A}`),w.opts.verbose&&(_.assign((0,t._)`${S}.schema`,$),_.assign((0,t._)`${S}.data`,g))})}e.extendErrors=i;function l(_,A){const $=_.const("err",A);_.if((0,t._)`${r.default.vErrors} === null`,()=>_.assign(r.default.vErrors,(0,t._)`[${$}]`),(0,t._)`${r.default.vErrors}.push(${$})`),_.code((0,t._)`${r.default.errors}++`)}function c(_,A){const{gen:$,validateName:g,schemaEnv:p}=_;p.$async?$.throw((0,t._)`new ${_.ValidationError}(${A})`):($.assign((0,t._)`${g}.errors`,A),$.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(_,A,$){const{createErrors:g}=_.it;return g===!1?(0,t._)`{}`:m(_,A,$)}function m(_,A,$={}){const{gen:g,it:p}=_,w=[y(p,$),b(_,$)];return v(_,A,w),g.object(...w)}function y({errorPath:_},{instancePath:A}){const $=A?(0,t.str)`${_}${(0,n.getErrorPath)(A,n.Type.Str)}`:_;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,$)]}function b({keyword:_,it:{errSchemaPath:A}},{schemaPath:$,parentSchema:g}){let p=g?A:(0,t.str)`${A}/${_}`;return $&&(p=(0,t.str)`${p}${(0,n.getErrorPath)($,n.Type.Str)}`),[u.schemaPath,p]}function v(_,{params:A,message:$},g){const{keyword:p,data:w,schemaValue:S,it:F}=_,{opts:Z,propertyName:re,topSchemaRef:ce,schemaPath:Oe}=F;g.push([u.keyword,p],[u.params,typeof A=="function"?A(_):A||(0,t._)`{}`]),Z.messages&&g.push([u.message,typeof $=="function"?$(_):$]),Z.verbose&&g.push([u.schema,S],[u.parentSchema,(0,t._)`${ce}${Oe}`],[r.default.data,w]),re&&g.push([u.propertyName,re])}})(js);Object.defineProperty(Io,"__esModule",{value:!0});Io.boolOrEmptySchema=Io.topBoolOrEmptySchema=void 0;const eS=js,tS=vt,nS=Er,rS={message:"boolean schema is false"};function aS(e){const{gen:t,schema:n,validateName:r}=e;n===!1?ug(e,!1):typeof n=="object"&&n.$async===!0?t.return(nS.default.data):(t.assign((0,tS._)`${r}.errors`,null),t.return(!0))}Io.topBoolOrEmptySchema=aS;function oS(e,t){const{gen:n,schema:r}=e;r===!1?(n.var(t,!1),ug(e)):n.var(t,!0)}Io.boolOrEmptySchema=oS;function ug(e,t){const{gen:n,data:r}=e,a={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,eS.reportError)(a,rS,void 0,t)}var rn={},Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.getRules=Ha.isJSONType=void 0;const sS=["string","number","integer","boolean","null","object","array"],iS=new Set(sS);function lS(e){return typeof e=="string"&&iS.has(e)}Ha.isJSONType=lS;function cS(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Ha.getRules=cS;var Br={};Object.defineProperty(Br,"__esModule",{value:!0});Br.shouldUseRule=Br.shouldUseGroup=Br.schemaHasRulesForType=void 0;function uS({schema:e,self:t},n){const r=t.RULES.types[n];return r&&r!==!0&&dg(e,r)}Br.schemaHasRulesForType=uS;function dg(e,t){return t.rules.some(n=>fg(e,n))}Br.shouldUseGroup=dg;function fg(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(r=>e[r]!==void 0))}Br.shouldUseRule=fg;Object.defineProperty(rn,"__esModule",{value:!0});rn.reportTypeError=rn.checkDataTypes=rn.checkDataType=rn.coerceAndCheckDataType=rn.getJSONTypes=rn.getSchemaTypes=rn.DataType=void 0;const dS=Ha,fS=Br,pS=js,lt=vt,pg=Ue;var bo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(bo||(rn.DataType=bo={}));function hS(e){const t=hg(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}rn.getSchemaTypes=hS;function hg(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(dS.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}rn.getJSONTypes=hg;function mS(e,t){const{gen:n,data:r,opts:a}=e,o=vS(t,a.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,fS.schemaHasRulesForType)(e,t[0]));if(s){const i=Yu(t,r,a.strictNumbers,bo.Wrong);n.if(i,()=>{o.length?gS(e,t,o):Qu(e)})}return s}rn.coerceAndCheckDataType=mS;const mg=new Set(["string","number","integer","boolean","null"]);function vS(e,t){return t?e.filter(n=>mg.has(n)||t==="array"&&n==="array"):[]}function gS(e,t,n){const{gen:r,data:a,opts:o}=e,s=r.let("dataType",(0,lt._)`typeof ${a}`),i=r.let("coerced",(0,lt._)`undefined`);o.coerceTypes==="array"&&r.if((0,lt._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,lt._)`${a}[0]`).assign(s,(0,lt._)`typeof ${a}`).if(Yu(t,a,o.strictNumbers),()=>r.assign(i,a))),r.if((0,lt._)`${i} !== undefined`);for(const c of n)(mg.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);r.else(),Qu(e),r.endIf(),r.if((0,lt._)`${i} !== undefined`,()=>{r.assign(a,i),yS(e,i)});function l(c){switch(c){case"string":r.elseIf((0,lt._)`${s} == "number" || ${s} == "boolean"`).assign(i,(0,lt._)`"" + ${a}`).elseIf((0,lt._)`${a} === null`).assign(i,(0,lt._)`""`);return;case"number":r.elseIf((0,lt._)`${s} == "boolean" || ${a} === null
              || (${s} == "string" && ${a} && ${a} == +${a})`).assign(i,(0,lt._)`+${a}`);return;case"integer":r.elseIf((0,lt._)`${s} === "boolean" || ${a} === null
              || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(i,(0,lt._)`+${a}`);return;case"boolean":r.elseIf((0,lt._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(i,!1).elseIf((0,lt._)`${a} === "true" || ${a} === 1`).assign(i,!0);return;case"null":r.elseIf((0,lt._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(i,null);return;case"array":r.elseIf((0,lt._)`${s} === "string" || ${s} === "number"
              || ${s} === "boolean" || ${a} === null`).assign(i,(0,lt._)`[${a}]`)}}}function yS({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,lt._)`${t} !== undefined`,()=>e.assign((0,lt._)`${t}[${n}]`,r))}function mu(e,t,n,r=bo.Correct){const a=r===bo.Correct?lt.operators.EQ:lt.operators.NEQ;let o;switch(e){case"null":return(0,lt._)`${t} ${a} null`;case"array":o=(0,lt._)`Array.isArray(${t})`;break;case"object":o=(0,lt._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s((0,lt._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return(0,lt._)`typeof ${t} ${a} ${e}`}return r===bo.Correct?o:(0,lt.not)(o);function s(i=lt.nil){return(0,lt.and)((0,lt._)`typeof ${t} == "number"`,i,n?(0,lt._)`isFinite(${t})`:lt.nil)}}rn.checkDataType=mu;function Yu(e,t,n,r){if(e.length===1)return mu(e[0],t,n,r);let a;const o=(0,pg.toHash)(e);if(o.array&&o.object){const s=(0,lt._)`typeof ${t} != "object"`;a=o.null?s:(0,lt._)`!${t} || ${s}`,delete o.null,delete o.array,delete o.object}else a=lt.nil;o.number&&delete o.integer;for(const s in o)a=(0,lt.and)(a,mu(s,t,n,r));return a}rn.checkDataTypes=Yu;const _S={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,lt._)`{type: ${e}}`:(0,lt._)`{type: ${t}}`};function Qu(e){const t=bS(e);(0,pS.reportError)(t,_S)}rn.reportTypeError=Qu;function bS(e){const{gen:t,data:n,schema:r}=e,a=(0,pg.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:a,schemaValue:a,parentSchema:r,params:{},it:e}}var xl={};Object.defineProperty(xl,"__esModule",{value:!0});xl.assignDefaults=void 0;const oo=vt,wS=Ue;function AS(e,t){const{properties:n,items:r}=e.schema;if(t==="object"&&n)for(const a in n)Zp(e,a,n[a].default);else t==="array"&&Array.isArray(r)&&r.forEach((a,o)=>Zp(e,o,a.default))}xl.assignDefaults=AS;function Zp(e,t,n){const{gen:r,compositeRule:a,data:o,opts:s}=e;if(n===void 0)return;const i=(0,oo._)`${o}${(0,oo.getProperty)(t)}`;if(a){(0,wS.checkStrictMode)(e,`default is ignored for: ${i}`);return}let l=(0,oo._)`${i} === undefined`;s.useDefaults==="empty"&&(l=(0,oo._)`${l} || ${i} === null || ${i} === ""`),r.if(l,(0,oo._)`${i} = ${(0,oo.stringify)(n)}`)}var $r={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.validateUnion=ht.validateArray=ht.usePattern=ht.callValidateCode=ht.schemaProperties=ht.allSchemaProperties=ht.noPropertyInData=ht.propertyInData=ht.isOwnProperty=ht.hasPropFunc=ht.reportMissingProp=ht.checkMissingProp=ht.checkReportMissingProp=void 0;const Ut=vt,Xu=Ue,ea=Er,CS=Ue;function $S(e,t){const{gen:n,data:r,it:a}=e;n.if(ed(n,r,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ut._)`${t}`},!0),e.error()})}ht.checkReportMissingProp=$S;function SS({gen:e,data:t,it:{opts:n}},r,a){return(0,Ut.or)(...r.map(o=>(0,Ut.and)(ed(e,t,o,n.ownProperties),(0,Ut._)`${a} = ${o}`)))}ht.checkMissingProp=SS;function IS(e,t){e.setParams({missingProperty:t},!0),e.error()}ht.reportMissingProp=IS;function vg(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ut._)`Object.prototype.hasOwnProperty`})}ht.hasPropFunc=vg;function Zu(e,t,n){return(0,Ut._)`${vg(e)}.call(${t}, ${n})`}ht.isOwnProperty=Zu;function ES(e,t,n,r){const a=(0,Ut._)`${t}${(0,Ut.getProperty)(n)} !== undefined`;return r?(0,Ut._)`${a} && ${Zu(e,t,n)}`:a}ht.propertyInData=ES;function ed(e,t,n,r){const a=(0,Ut._)`${t}${(0,Ut.getProperty)(n)} === undefined`;return r?(0,Ut.or)(a,(0,Ut.not)(Zu(e,t,n))):a}ht.noPropertyInData=ed;function gg(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ht.allSchemaProperties=gg;function kS(e,t){return gg(t).filter(n=>!(0,Xu.alwaysValidSchema)(e,t[n]))}ht.schemaProperties=kS;function TS({schemaCode:e,data:t,it:{gen:n,topSchemaRef:r,schemaPath:a,errorPath:o},it:s},i,l,c){const u=c?(0,Ut._)`${e}, ${t}, ${r}${a}`:t,d=[[ea.default.instancePath,(0,Ut.strConcat)(ea.default.instancePath,o)],[ea.default.parentData,s.parentData],[ea.default.parentDataProperty,s.parentDataProperty],[ea.default.rootData,ea.default.rootData]];s.opts.dynamicRef&&d.push([ea.default.dynamicAnchors,ea.default.dynamicAnchors]);const m=(0,Ut._)`${u}, ${n.object(...d)}`;return l!==Ut.nil?(0,Ut._)`${i}.call(${l}, ${m})`:(0,Ut._)`${i}(${m})`}ht.callValidateCode=TS;const xS=(0,Ut._)`new RegExp`;function PS({gen:e,it:{opts:t}},n){const r=t.unicodeRegExp?"u":"",{regExp:a}=t.code,o=a(n,r);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Ut._)`${a.code==="new RegExp"?xS:(0,CS.useFunc)(e,a)}(${n}, ${r})`})}ht.usePattern=PS;function MS(e){const{gen:t,data:n,keyword:r,it:a}=e,o=t.name("valid");if(a.allErrors){const i=t.let("valid",!0);return s(()=>t.assign(i,!1)),i}return t.var(o,!0),s(()=>t.break()),o;function s(i){const l=t.const("len",(0,Ut._)`${n}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:r,dataProp:c,dataPropType:Xu.Type.Num},o),t.if((0,Ut.not)(o),i)})}}ht.validateArray=MS;function NS(e){const{gen:t,schema:n,keyword:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Xu.alwaysValidSchema)(a,l))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block(()=>n.forEach((l,c)=>{const u=e.subschema({keyword:r,schemaProp:c,compositeRule:!0},i);t.assign(s,(0,Ut._)`${s} || ${i}`),e.mergeValidEvaluated(u,i)||t.if((0,Ut.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}ht.validateUnion=NS;Object.defineProperty($r,"__esModule",{value:!0});$r.validateKeywordUsage=$r.validSchemaType=$r.funcKeywordCode=$r.macroKeywordCode=void 0;const kn=vt,Na=Er,OS=ht,RS=js;function LS(e,t){const{gen:n,keyword:r,schema:a,parentSchema:o,it:s}=e,i=t.macro.call(s.self,a,o,s),l=yg(n,r,i);s.opts.validateSchema!==!1&&s.self.validateSchema(i,!0);const c=n.name("valid");e.subschema({schema:i,schemaPath:kn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}$r.macroKeywordCode=LS;function DS(e,t){var n;const{gen:r,keyword:a,schema:o,parentSchema:s,$data:i,it:l}=e;jS(l,t);const c=!i&&t.compile?t.compile.call(l.self,o,s,l):t.validate,u=yg(r,a,c),d=r.let("valid");e.block$data(d,m),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function m(){if(t.errors===!1)v(),t.modifying&&eh(e),_(()=>e.error());else{const A=t.async?y():b();t.modifying&&eh(e),_(()=>FS(e,A))}}function y(){const A=r.let("ruleErrs",null);return r.try(()=>v((0,kn._)`await `),$=>r.assign(d,!1).if((0,kn._)`${$} instanceof ${l.ValidationError}`,()=>r.assign(A,(0,kn._)`${$}.errors`),()=>r.throw($))),A}function b(){const A=(0,kn._)`${u}.errors`;return r.assign(A,null),v(kn.nil),A}function v(A=t.async?(0,kn._)`await `:kn.nil){const $=l.opts.passContext?Na.default.this:Na.default.self,g=!("compile"in t&&!i||t.schema===!1);r.assign(d,(0,kn._)`${A}${(0,OS.callValidateCode)(e,u,$,g)}`,t.modifying)}function _(A){var $;r.if((0,kn.not)(($=t.valid)!==null&&$!==void 0?$:d),A)}}$r.funcKeywordCode=DS;function eh(e){const{gen:t,data:n,it:r}=e;t.if(r.parentData,()=>t.assign(n,(0,kn._)`${r.parentData}[${r.parentDataProperty}]`))}function FS(e,t){const{gen:n}=e;n.if((0,kn._)`Array.isArray(${t})`,()=>{n.assign(Na.default.vErrors,(0,kn._)`${Na.default.vErrors} === null ? ${t} : ${Na.default.vErrors}.concat(${t})`).assign(Na.default.errors,(0,kn._)`${Na.default.vErrors}.length`),(0,RS.extendErrors)(e)},()=>e.error())}function jS({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function yg(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,kn.stringify)(n)})}function BS(e,t,n=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(e):r==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==r||n&&typeof e>"u")}$r.validSchemaType=BS;function VS({schema:e,opts:t,self:n,errSchemaPath:r},a,o){if(Array.isArray(a.keyword)?!a.keyword.includes(o):a.keyword!==o)throw new Error("ajv implementation error");const s=a.dependencies;if(s!=null&&s.some(i=>!Object.prototype.hasOwnProperty.call(e,i)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[o])){const l=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}$r.validateKeywordUsage=VS;var da={};Object.defineProperty(da,"__esModule",{value:!0});da.extendSubschemaMode=da.extendSubschemaData=da.getSubschema=void 0;const Ar=vt,_g=Ue;function US(e,{keyword:t,schemaProp:n,schema:r,schemaPath:a,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const i=e.schema[t];return n===void 0?{schema:i,schemaPath:(0,Ar._)`${e.schemaPath}${(0,Ar.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:(0,Ar._)`${e.schemaPath}${(0,Ar.getProperty)(t)}${(0,Ar.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,_g.escapeFragment)(n)}`}}if(r!==void 0){if(a===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:a,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}da.getSubschema=US;function HS(e,t,{dataProp:n,dataPropType:r,data:a,dataTypes:o,propertyName:s}){if(a!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(n!==void 0){const{errorPath:c,dataPathArr:u,opts:d}=t,m=i.let("data",(0,Ar._)`${t.data}${(0,Ar.getProperty)(n)}`,!0);l(m),e.errorPath=(0,Ar.str)`${c}${(0,_g.getErrorPath)(n,r,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Ar._)`${n}`,e.dataPathArr=[...u,e.parentDataProperty]}if(a!==void 0){const c=a instanceof Ar.Name?a:i.let("data",a,!0);l(c),s!==void 0&&(e.propertyName=s)}o&&(e.dataTypes=o);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}da.extendSubschemaData=HS;function zS(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:a,allErrors:o}){r!==void 0&&(e.compositeRule=r),a!==void 0&&(e.createErrors=a),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}da.extendSubschemaMode=zS;var mn={},bg=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,a,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;a--!==0;){var s=o[a];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},wg={exports:{}},ia=wg.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var r=typeof n=="function"?n:n.pre||function(){},a=n.post||function(){};Li(t,r,a,e,"",e)};ia.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ia.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ia.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ia.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 Li(e,t,n,r,a,o,s,i,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,a,o,s,i,l,c);for(var u in r){var d=r[u];if(Array.isArray(d)){if(u in ia.arrayKeywords)for(var m=0;m<d.length;m++)Li(e,t,n,d[m],a+"/"+u+"/"+m,o,a,u,r,m)}else if(u in ia.propsKeywords){if(d&&typeof d=="object")for(var y in d)Li(e,t,n,d[y],a+"/"+u+"/"+KS(y),o,a,u,r,y)}else(u in ia.keywords||e.allKeys&&!(u in ia.skipKeywords))&&Li(e,t,n,d,a+"/"+u,o,a,u,r)}n(r,a,o,s,i,l,c)}}function KS(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var WS=wg.exports;Object.defineProperty(mn,"__esModule",{value:!0});mn.getSchemaRefs=mn.resolveUrl=mn.normalizeId=mn._getFullPath=mn.getFullPath=mn.inlineRef=void 0;const qS=Ue,GS=bg,JS=WS,YS=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function QS(e,t=!0){return typeof e=="boolean"?!0:t===!0?!vu(e):t?Ag(e)<=t:!1}mn.inlineRef=QS;const XS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function vu(e){for(const t in e){if(XS.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(vu)||typeof n=="object"&&vu(n))return!0}return!1}function Ag(e){let t=0;for(const n in e){if(n==="$ref")return 1/0;if(t++,!YS.has(n)&&(typeof e[n]=="object"&&(0,qS.eachItem)(e[n],r=>t+=Ag(r)),t===1/0))return 1/0}return t}function Cg(e,t="",n){n!==!1&&(t=wo(t));const r=e.parse(t);return $g(e,r)}mn.getFullPath=Cg;function $g(e,t){return e.serialize(t).split("#")[0]+"#"}mn._getFullPath=$g;const ZS=/#\/?$/;function wo(e){return e?e.replace(ZS,""):""}mn.normalizeId=wo;function eI(e,t,n){return n=wo(n),e.resolve(t,n)}mn.resolveUrl=eI;const tI=/^[a-z_][-a-z0-9._]*$/i;function nI(e,t){if(typeof e=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,a=wo(e[n]||t),o={"":a},s=Cg(r,a,!1),i={},l=new Set;return JS(e,{allKeys:!0},(d,m,y,b)=>{if(b===void 0)return;const v=s+m;let _=o[b];typeof d[n]=="string"&&(_=A.call(this,d[n])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),o[m]=_;function A(g){const p=this.opts.uriResolver.resolve;if(g=wo(_?p(_,g):g),l.has(g))throw u(g);l.add(g);let w=this.refs[g];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?c(d,w.schema,g):g!==wo(v)&&(g[0]==="#"?(c(d,i[g],g),i[g]=d):this.refs[g]=v),g}function $(g){if(typeof g=="string"){if(!tI.test(g))throw new Error(`invalid anchor "${g}"`);A.call(this,`#${g}`)}}}),i;function c(d,m,y){if(m!==void 0&&!GS(d,m))throw u(y)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}mn.getSchemaRefs=nI;Object.defineProperty(mr,"__esModule",{value:!0});mr.getData=mr.KeywordCxt=mr.validateFunctionCode=void 0;const Sg=Io,th=rn,td=Br,al=rn,rI=xl,vs=$r,Oc=da,Xe=vt,ot=Er,aI=mn,Vr=Ue,es=js;function oI(e){if(kg(e)&&(Tg(e),Eg(e))){lI(e);return}Ig(e,()=>(0,Sg.topBoolOrEmptySchema)(e))}mr.validateFunctionCode=oI;function Ig({gen:e,validateName:t,schema:n,schemaEnv:r,opts:a},o){a.code.es5?e.func(t,(0,Xe._)`${ot.default.data}, ${ot.default.valCxt}`,r.$async,()=>{e.code((0,Xe._)`"use strict"; ${nh(n,a)}`),iI(e,a),e.code(o)}):e.func(t,(0,Xe._)`${ot.default.data}, ${sI(a)}`,r.$async,()=>e.code(nh(n,a)).code(o))}function sI(e){return(0,Xe._)`{${ot.default.instancePath}="", ${ot.default.parentData}, ${ot.default.parentDataProperty}, ${ot.default.rootData}=${ot.default.data}${e.dynamicRef?(0,Xe._)`, ${ot.default.dynamicAnchors}={}`:Xe.nil}}={}`}function iI(e,t){e.if(ot.default.valCxt,()=>{e.var(ot.default.instancePath,(0,Xe._)`${ot.default.valCxt}.${ot.default.instancePath}`),e.var(ot.default.parentData,(0,Xe._)`${ot.default.valCxt}.${ot.default.parentData}`),e.var(ot.default.parentDataProperty,(0,Xe._)`${ot.default.valCxt}.${ot.default.parentDataProperty}`),e.var(ot.default.rootData,(0,Xe._)`${ot.default.valCxt}.${ot.default.rootData}`),t.dynamicRef&&e.var(ot.default.dynamicAnchors,(0,Xe._)`${ot.default.valCxt}.${ot.default.dynamicAnchors}`)},()=>{e.var(ot.default.instancePath,(0,Xe._)`""`),e.var(ot.default.parentData,(0,Xe._)`undefined`),e.var(ot.default.parentDataProperty,(0,Xe._)`undefined`),e.var(ot.default.rootData,ot.default.data),t.dynamicRef&&e.var(ot.default.dynamicAnchors,(0,Xe._)`{}`)})}function lI(e){const{schema:t,opts:n,gen:r}=e;Ig(e,()=>{n.$comment&&t.$comment&&Pg(e),pI(e),r.let(ot.default.vErrors,null),r.let(ot.default.errors,0),n.unevaluated&&cI(e),xg(e),vI(e)})}function cI(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,Xe._)`${n}.evaluated`),t.if((0,Xe._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Xe._)`${e.evaluated}.props`,(0,Xe._)`undefined`)),t.if((0,Xe._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Xe._)`${e.evaluated}.items`,(0,Xe._)`undefined`))}function nh(e,t){const n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,Xe._)`/*# sourceURL=${n} */`:Xe.nil}function uI(e,t){if(kg(e)&&(Tg(e),Eg(e))){dI(e,t);return}(0,Sg.boolOrEmptySchema)(e,t)}function Eg({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function kg(e){return typeof e.schema!="boolean"}function dI(e,t){const{schema:n,gen:r,opts:a}=e;a.$comment&&n.$comment&&Pg(e),hI(e),mI(e);const o=r.const("_errs",ot.default.errors);xg(e,o),r.var(t,(0,Xe._)`${o} === ${ot.default.errors}`)}function Tg(e){(0,Vr.checkUnknownRules)(e),fI(e)}function xg(e,t){if(e.opts.jtd)return rh(e,[],!1,t);const n=(0,th.getSchemaTypes)(e.schema),r=(0,th.coerceAndCheckDataType)(e,n);rh(e,n,!r,t)}function fI(e){const{schema:t,errSchemaPath:n,opts:r,self:a}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,Vr.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function pI(e){const{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Vr.checkStrictMode)(e,"default is ignored in the schema root")}function hI(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,aI.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function mI(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Pg({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:a}){const o=n.$comment;if(a.$comment===!0)e.code((0,Xe._)`${ot.default.self}.logger.log(${o})`);else if(typeof a.$comment=="function"){const s=(0,Xe.str)`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,Xe._)`${ot.default.self}.opts.$comment(${o}, ${s}, ${i}.schema)`)}}function vI(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:a,opts:o}=e;n.$async?t.if((0,Xe._)`${ot.default.errors} === 0`,()=>t.return(ot.default.data),()=>t.throw((0,Xe._)`new ${a}(${ot.default.vErrors})`)):(t.assign((0,Xe._)`${r}.errors`,ot.default.vErrors),o.unevaluated&&gI(e),t.return((0,Xe._)`${ot.default.errors} === 0`))}function gI({gen:e,evaluated:t,props:n,items:r}){n instanceof Xe.Name&&e.assign((0,Xe._)`${t}.props`,n),r instanceof Xe.Name&&e.assign((0,Xe._)`${t}.items`,r)}function rh(e,t,n,r){const{gen:a,schema:o,data:s,allErrors:i,opts:l,self:c}=e,{RULES:u}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Vr.schemaHasRulesButRef)(o,u))){a.block(()=>Og(e,"$ref",u.all.$ref.definition));return}l.jtd||yI(e,t),a.block(()=>{for(const m of u.rules)d(m);d(u.post)});function d(m){(0,td.shouldUseGroup)(o,m)&&(m.type?(a.if((0,al.checkDataType)(m.type,s,l.strictNumbers)),ah(e,m),t.length===1&&t[0]===m.type&&n&&(a.else(),(0,al.reportTypeError)(e)),a.endIf()):ah(e,m),i||a.if((0,Xe._)`${ot.default.errors} === ${r||0}`))}}function ah(e,t){const{gen:n,schema:r,opts:{useDefaults:a}}=e;a&&(0,rI.assignDefaults)(e,t.type),n.block(()=>{for(const o of t.rules)(0,td.shouldUseRule)(r,o)&&Og(e,o.keyword,o.definition,t.type)})}function yI(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(_I(e,t),e.opts.allowUnionTypes||bI(e,t),wI(e,e.dataTypes))}function _I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{Mg(e.dataTypes,n)||nd(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),CI(e,t)}}function bI(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&nd(e,"use allowUnionTypes to allow union type keyword")}function wI(e,t){const n=e.self.RULES.all;for(const r in n){const a=n[r];if(typeof a=="object"&&(0,td.shouldUseRule)(e.schema,a)){const{type:o}=a.definition;o.length&&!o.some(s=>AI(t,s))&&nd(e,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function AI(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Mg(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function CI(e,t){const n=[];for(const r of e.dataTypes)Mg(t,r)?n.push(r):t.includes("integer")&&r==="number"&&n.push("integer");e.dataTypes=n}function nd(e,t){const n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,Vr.checkStrictMode)(e,t,e.opts.strictTypes)}class Ng{constructor(t,n,r){if((0,vs.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Vr.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",Rg(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,vs.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ot.default.errors))}result(t,n,r){this.failResult((0,Xe.not)(t),n,r)}failResult(t,n,r){this.gen.if(t),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,Xe.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:n}=this;this.fail((0,Xe._)`${n} !== undefined && (${(0,Xe.or)(this.invalid$data(),t)})`)}error(t,n,r){if(n){this.setParams(n),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,n){(t?es.reportExtraError:es.reportError)(this,this.def.error,n)}$dataError(){(0,es.reportError)(this,this.def.$dataError||es.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,es.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,r=Xe.nil){this.gen.block(()=>{this.check$data(t,r),n()})}check$data(t=Xe.nil,n=Xe.nil){if(!this.$data)return;const{gen:r,schemaCode:a,schemaType:o,def:s}=this;r.if((0,Xe.or)((0,Xe._)`${a} === undefined`,n)),t!==Xe.nil&&r.assign(t,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==Xe.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:n,schemaType:r,def:a,it:o}=this;return(0,Xe.or)(s(),i());function s(){if(r.length){if(!(n instanceof Xe.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,Xe._)`${(0,al.checkDataTypes)(l,n,o.opts.strictNumbers,al.DataType.Wrong)}`}return Xe.nil}function i(){if(a.validateSchema){const l=t.scopeValue("validate$data",{ref:a.validateSchema});return(0,Xe._)`!${l}(${n})`}return Xe.nil}}subschema(t,n){const r=(0,Oc.getSubschema)(this.it,t);(0,Oc.extendSubschemaData)(r,this.it,t),(0,Oc.extendSubschemaMode)(r,t);const a={...this.it,...r,items:void 0,props:void 0};return uI(a,n),a}mergeEvaluated(t,n){const{it:r,gen:a}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=Vr.mergeEvaluated.props(a,t.props,r.props,n)),r.items!==!0&&t.items!==void 0&&(r.items=Vr.mergeEvaluated.items(a,t.items,r.items,n)))}mergeValidEvaluated(t,n){const{it:r,gen:a}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return a.if(n,()=>this.mergeEvaluated(t,Xe.Name)),!0}}mr.KeywordCxt=Ng;function Og(e,t,n,r){const a=new Ng(e,n,t);"code"in n?n.code(a,r):a.$data&&n.validate?(0,vs.funcKeywordCode)(a,n):"macro"in n?(0,vs.macroKeywordCode)(a,n):(n.compile||n.validate)&&(0,vs.funcKeywordCode)(a,n)}const $I=/^\/(?:[^~]|~0|~1)*$/,SI=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Rg(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let a,o;if(e==="")return ot.default.rootData;if(e[0]==="/"){if(!$I.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,o=ot.default.rootData}else{const c=SI.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const u=+c[1];if(a=c[2],a==="#"){if(u>=t)throw new Error(l("property/index",u));return r[t-u]}if(u>t)throw new Error(l("data",u));if(o=n[t-u],!a)return o}let s=o;const i=a.split("/");for(const c of i)c&&(o=(0,Xe._)`${o}${(0,Xe.getProperty)((0,Vr.unescapeJsonPointer)(c))}`,s=(0,Xe._)`${s} && ${o}`);return s;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${t}`}}mr.getData=Rg;var Bs={};Object.defineProperty(Bs,"__esModule",{value:!0});class II extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Bs.default=II;var No={};Object.defineProperty(No,"__esModule",{value:!0});const Rc=mn;class EI extends Error{constructor(t,n,r,a){super(a||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Rc.resolveUrl)(t,n,r),this.missingSchema=(0,Rc.normalizeId)((0,Rc.getFullPath)(t,this.missingRef))}}No.default=EI;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.resolveSchema=Dn.getCompilingSchema=Dn.resolveRef=Dn.compileSchema=Dn.SchemaEnv=void 0;const ir=vt,kI=Bs,Pa=Er,fr=mn,oh=Ue,TI=mr;class Pl{constructor(t){var n;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,fr.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Dn.SchemaEnv=Pl;function rd(e){const t=Lg.call(this,e);if(t)return t;const n=(0,fr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:r,lines:a}=this.opts.code,{ownProperties:o}=this.opts,s=new ir.CodeGen(this.scope,{es5:r,lines:a,ownProperties:o});let i;e.$async&&(i=s.scopeValue("Error",{ref:kI.default,code:(0,ir._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");e.validateName=l;const c={gen:s,allErrors:this.opts.allErrors,data:Pa.default.data,parentData:Pa.default.parentData,parentDataProperty:Pa.default.parentDataProperty,dataNames:[Pa.default.data],dataPathArr:[ir.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,ir.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:i,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:ir.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ir._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,TI.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);const d=s.toString();u=`${s.scopeRefs(Pa.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const y=new Function(`${Pa.default.self}`,`${Pa.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:y}),y.errors=null,y.schema=e.schema,y.schemaEnv=e,e.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:l,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){const{props:b,items:v}=c;y.evaluated={props:b instanceof ir.Name?void 0:b,items:v instanceof ir.Name?void 0:v,dynamicProps:b instanceof ir.Name,dynamicItems:v instanceof ir.Name},y.source&&(y.source.evaluated=(0,ir.stringify)(y.evaluated))}return e.validate=y,e}catch(d){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(e)}}Dn.compileSchema=rd;function xI(e,t,n){var r;n=(0,fr.resolveUrl)(this.opts.uriResolver,t,n);const a=e.refs[n];if(a)return a;let o=NI.call(this,e,n);if(o===void 0){const s=(r=e.localRefs)===null||r===void 0?void 0:r[n],{schemaId:i}=this.opts;s&&(o=new Pl({schema:s,schemaId:i,root:e,baseId:t}))}if(o!==void 0)return e.refs[n]=PI.call(this,o)}Dn.resolveRef=xI;function PI(e){return(0,fr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:rd.call(this,e)}function Lg(e){for(const t of this._compilations)if(MI(t,e))return t}Dn.getCompilingSchema=Lg;function MI(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function NI(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||Ml.call(this,e,t)}function Ml(e,t){const n=this.opts.uriResolver.parse(t),r=(0,fr._getFullPath)(this.opts.uriResolver,n);let a=(0,fr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return Lc.call(this,n,e);const o=(0,fr.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){const i=Ml.call(this,e,s);return typeof(i==null?void 0:i.schema)!="object"?void 0:Lc.call(this,n,i)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||rd.call(this,s),o===(0,fr.normalizeId)(t)){const{schema:i}=s,{schemaId:l}=this.opts,c=i[l];return c&&(a=(0,fr.resolveUrl)(this.opts.uriResolver,a,c)),new Pl({schema:i,schemaId:l,root:e,baseId:a})}return Lc.call(this,n,s)}}Dn.resolveSchema=Ml;const OI=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Lc(e,{baseId:t,schema:n,root:r}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const i of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,oh.unescapeFragment)(i)];if(l===void 0)return;n=l;const c=typeof n=="object"&&n[this.opts.schemaId];!OI.has(i)&&c&&(t=(0,fr.resolveUrl)(this.opts.uriResolver,t,c))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,oh.schemaHasRulesButRef)(n,this.RULES)){const i=(0,fr.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=Ml.call(this,r,i)}const{schemaId:s}=this.opts;if(o=o||new Pl({schema:n,schemaId:s,root:r,baseId:t}),o.schema!==o.root.schema)return o}const RI="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",LI="Meta-schema for $data reference (JSON AnySchema extension proposal)",DI="object",FI=["$data"],jI={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},BI=!1,VI={$id:RI,description:LI,type:DI,required:FI,properties:jI,additionalProperties:BI};var ad={},Nl={exports:{}};const UI={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var HI={HEX:UI};const{HEX:zI}=HI;function Dg(e){if(jg(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:WI(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function gu(e,t=!1){let n="",r=!0;for(const a of e){if(zI[a]===void 0)return;a!=="0"&&r===!0&&(r=!1),r||(n+=a)}return t&&n.length===0&&(n="0"),n}function KI(e){let t=0;const n={error:!1,address:"",zone:""},r=[],a=[];let o=!1,s=!1,i=!1;function l(){if(a.length){if(o===!1){const c=gu(a);if(c!==void 0)r.push(c);else return n.error=!0,!1}a.length=0}return!0}for(let c=0;c<e.length;c++){const u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(s===!0&&(i=!0),!l())break;if(t++,r.push(":"),t>7){n.error=!0;break}c-1>=0&&e[c-1]===":"&&(s=!0);continue}else if(u==="%"){if(!l())break;o=!0}else{a.push(u);continue}}return a.length&&(o?n.zone=a.join(""):i?r.push(a.join("")):r.push(gu(a))),n.address=r.join(""),n}function Fg(e,t={}){if(jg(e,":")<2)return{host:e,isIPV6:!1};const n=KI(e);if(n.error)return{host:e,isIPV6:!1};{let r=n.address,a=n.address;return n.zone&&(r+="%"+n.zone,a+="%25"+n.zone),{host:r,escapedHost:a,isIPV6:!0}}}function WI(e,t){let n="",r=!0;const a=e.length;for(let o=0;o<a;o++){const s=e[o];s==="0"&&r?(o+1<=a&&e[o+1]===t||o+1===a)&&(n+=s,r=!1):(s===t?r=!0:r=!1,n+=s)}return n}function jg(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}const sh=/^\.\.?\//u,ih=/^\/\.(?:\/|$)/u,lh=/^\/\.\.(?:\/|$)/u,qI=/^\/?(?:.|\n)*?(?=\/|$)/u;function GI(e){const t=[];for(;e.length;)if(e.match(sh))e=e.replace(sh,"");else if(e.match(ih))e=e.replace(ih,"/");else if(e.match(lh))e=e.replace(lh,"/"),t.pop();else if(e==="."||e==="..")e="";else{const n=e.match(qI);if(n){const r=n[0];e=e.slice(r.length),t.push(r)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function JI(e,t){const n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function YI(e,t){const n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push("@")),e.host!==void 0){let r=unescape(e.host);const a=Dg(r);if(a.isIPV4)r=a.host;else{const o=Fg(a.host,{isIPV4:!1});o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}n.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var QI={recomposeAuthority:YI,normalizeComponentEncoding:JI,removeDotSegments:GI,normalizeIPv4:Dg,normalizeIPv6:Fg,stringArrayToHexStripped:gu};const XI=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,ZI=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Bg(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function Vg(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Ug(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function eE(e){return e.secure=Bg(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function tE(e){if((e.port===(Bg(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function nE(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(ZI);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const a=`${r}:${t.nid||e.nid}`,o=od[a];e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function rE(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),a=`${n}:${t.nid||r}`,o=od[a];o&&(e=o.serialize(e,t));const s=e,i=e.nss;return s.path=`${r||t.nid}:${i}`,t.skipEscape=!0,s}function aE(e,t){const n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!XI.test(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function oE(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Hg={scheme:"http",domainHost:!0,parse:Vg,serialize:Ug},sE={scheme:"https",domainHost:Hg.domainHost,parse:Vg,serialize:Ug},Di={scheme:"ws",domainHost:!0,parse:eE,serialize:tE},iE={scheme:"wss",domainHost:Di.domainHost,parse:Di.parse,serialize:Di.serialize},lE={scheme:"urn",parse:nE,serialize:rE,skipNormalize:!0},cE={scheme:"urn:uuid",parse:aE,serialize:oE,skipNormalize:!0},od={http:Hg,https:sE,ws:Di,wss:iE,urn:lE,"urn:uuid":cE};var uE=od;const{normalizeIPv6:dE,normalizeIPv4:fE,removeDotSegments:ss,recomposeAuthority:pE,normalizeComponentEncoding:wi}=QI,sd=uE;function hE(e,t){return typeof e=="string"?e=Sr(Kr(e,t),t):typeof e=="object"&&(e=Kr(Sr(e,t),t)),e}function mE(e,t,n){const r=Object.assign({scheme:"null"},n),a=zg(Kr(e,r),Kr(t,r),r,!0);return Sr(a,{...r,skipEscape:!0})}function zg(e,t,n,r){const a={};return r||(e=Kr(Sr(e,n),n),t=Kr(Sr(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=ss(t.path||""),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=ss(t.path||""),a.query=t.query):(t.path?(t.path.charAt(0)==="/"?a.path=ss(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path="/"+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path,a.path=ss(a.path)),a.query=t.query):(a.path=e.path,t.query!==void 0?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function vE(e,t,n){return typeof e=="string"?(e=unescape(e),e=Sr(wi(Kr(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Sr(wi(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Sr(wi(Kr(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Sr(wi(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Sr(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),a=[],o=sd[(r.scheme||n.scheme||"").toLowerCase()];o&&o.serialize&&o.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&a.push(n.scheme,":");const s=pE(n,r);if(s!==void 0&&(r.reference!=="suffix"&&a.push("//"),a.push(s),n.path&&n.path.charAt(0)!=="/"&&a.push("/")),n.path!==void 0){let i=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(i=ss(i)),s===void 0&&(i=i.replace(/^\/\//u,"/%2F")),a.push(i)}return n.query!==void 0&&a.push("?",n.query),n.fragment!==void 0&&a.push("#",n.fragment),a.join("")}const gE=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function yE(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||gE[t])return!0;return!1}const _E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Kr(e,t){const n=Object.assign({},t),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=e.indexOf("%")!==-1;let o=!1;n.reference==="suffix"&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const s=e.match(_E);if(s){if(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]),r.host){const l=fE(r.host);if(l.isIPV4===!1){const c=dE(l.host,{isIPV4:!1});r.host=c.host.toLowerCase(),o=c.isIPV6}else r.host=l.host,o=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&!r.path&&r.query===void 0?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const i=sd[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!i||!i.unicodeSupport)&&r.host&&(n.domainHost||i&&i.domainHost)&&o===!1&&yE(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!i||i&&!i.skipNormalize)&&(a&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),a&&r.host!==void 0&&(r.host=unescape(r.host)),r.path!==void 0&&r.path.length&&(r.path=escape(unescape(r.path))),r.fragment!==void 0&&r.fragment.length&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),i&&i.parse&&i.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const id={SCHEMES:sd,normalize:hE,resolve:mE,resolveComponents:zg,equal:vE,serialize:Sr,parse:Kr};Nl.exports=id;Nl.exports.default=id;Nl.exports.fastUri=id;var bE=Nl.exports;Object.defineProperty(ad,"__esModule",{value:!0});const Kg=bE;Kg.code='require("ajv/dist/runtime/uri").default';ad.default=Kg;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=mr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=vt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=Bs,a=No,o=Ha,s=Dn,i=vt,l=mn,c=rn,u=Ue,d=VI,m=ad,y=(me,O)=>new RegExp(me,O);y.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={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."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function g(me){var O,fe,q,I,R,pe,Le,B,ee,X,ie,Ie,k,x,le,j,V,K,ue,U,z,ae,D,Q,de;const he=me.strict,Te=(O=me.code)===null||O===void 0?void 0:O.optimize,De=Te===!0||Te===void 0?1:Te||0,Be=(q=(fe=me.code)===null||fe===void 0?void 0:fe.regExp)!==null&&q!==void 0?q:y,st=(I=me.uriResolver)!==null&&I!==void 0?I:m.default;return{strictSchema:(pe=(R=me.strictSchema)!==null&&R!==void 0?R:he)!==null&&pe!==void 0?pe:!0,strictNumbers:(B=(Le=me.strictNumbers)!==null&&Le!==void 0?Le:he)!==null&&B!==void 0?B:!0,strictTypes:(X=(ee=me.strictTypes)!==null&&ee!==void 0?ee:he)!==null&&X!==void 0?X:"log",strictTuples:(Ie=(ie=me.strictTuples)!==null&&ie!==void 0?ie:he)!==null&&Ie!==void 0?Ie:"log",strictRequired:(x=(k=me.strictRequired)!==null&&k!==void 0?k:he)!==null&&x!==void 0?x:!1,code:me.code?{...me.code,optimize:De,regExp:Be}:{optimize:De,regExp:Be},loopRequired:(le=me.loopRequired)!==null&&le!==void 0?le:$,loopEnum:(j=me.loopEnum)!==null&&j!==void 0?j:$,meta:(V=me.meta)!==null&&V!==void 0?V:!0,messages:(K=me.messages)!==null&&K!==void 0?K:!0,inlineRefs:(ue=me.inlineRefs)!==null&&ue!==void 0?ue:!0,schemaId:(U=me.schemaId)!==null&&U!==void 0?U:"$id",addUsedSchema:(z=me.addUsedSchema)!==null&&z!==void 0?z:!0,validateSchema:(ae=me.validateSchema)!==null&&ae!==void 0?ae:!0,validateFormats:(D=me.validateFormats)!==null&&D!==void 0?D:!0,unicodeRegExp:(Q=me.unicodeRegExp)!==null&&Q!==void 0?Q:!0,int32range:(de=me.int32range)!==null&&de!==void 0?de:!0,uriResolver:st}}class p{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...g(O)};const{es5:fe,lines:q}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:v,es5:fe,lines:q}),this.logger=ge(O.logger);const I=O.validateFormats;O.validateFormats=!1,this.RULES=(0,o.getRules)(),w.call(this,_,O,"NOT SUPPORTED"),w.call(this,A,O,"DEPRECATED","warn"),this._metaOpts=ce.call(this),O.formats&&Z.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&re.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),F.call(this),O.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:fe,schemaId:q}=this.opts;let I=d;q==="id"&&(I={...d},I.id=I.$id,delete I.$id),fe&&O&&this.addMetaSchema(I,I[q],!1)}defaultMeta(){const{meta:O,schemaId:fe}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[fe]||O:void 0}validate(O,fe){let q;if(typeof O=="string"){if(q=this.getSchema(O),!q)throw new Error(`no schema with key or ref "${O}"`)}else q=this.compile(O);const I=q(fe);return"$async"in q||(this.errors=q.errors),I}compile(O,fe){const q=this._addSchema(O,fe);return q.validate||this._compileSchemaEnv(q)}compileAsync(O,fe){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:q}=this.opts;return I.call(this,O,fe);async function I(X,ie){await R.call(this,X.$schema);const Ie=this._addSchema(X,ie);return Ie.validate||pe.call(this,Ie)}async function R(X){X&&!this.getSchema(X)&&await I.call(this,{$ref:X},!0)}async function pe(X){try{return this._compileSchemaEnv(X)}catch(ie){if(!(ie instanceof a.default))throw ie;return Le.call(this,ie),await B.call(this,ie.missingSchema),pe.call(this,X)}}function Le({missingSchema:X,missingRef:ie}){if(this.refs[X])throw new Error(`AnySchema ${X} is loaded but ${ie} cannot be resolved`)}async function B(X){const ie=await ee.call(this,X);this.refs[X]||await R.call(this,ie.$schema),this.refs[X]||this.addSchema(ie,X,fe)}async function ee(X){const ie=this._loading[X];if(ie)return ie;try{return await(this._loading[X]=q(X))}finally{delete this._loading[X]}}}addSchema(O,fe,q,I=this.opts.validateSchema){if(Array.isArray(O)){for(const pe of O)this.addSchema(pe,void 0,q,I);return this}let R;if(typeof O=="object"){const{schemaId:pe}=this.opts;if(R=O[pe],R!==void 0&&typeof R!="string")throw new Error(`schema ${pe} must be string`)}return fe=(0,l.normalizeId)(fe||R),this._checkUnique(fe),this.schemas[fe]=this._addSchema(O,q,fe,I,!0),this}addMetaSchema(O,fe,q=this.opts.validateSchema){return this.addSchema(O,fe,!0,q),this}validateSchema(O,fe){if(typeof O=="boolean")return!0;let q;if(q=O.$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 I=this.validate(q,O);if(!I&&fe){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return I}getSchema(O){let fe;for(;typeof(fe=S.call(this,O))=="string";)O=fe;if(fe===void 0){const{schemaId:q}=this.opts,I=new s.SchemaEnv({schema:{},schemaId:q});if(fe=s.resolveSchema.call(this,I,O),!fe)return;this.refs[O]=fe}return fe.validate||this._compileSchemaEnv(fe)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const fe=S.call(this,O);return typeof fe=="object"&&this._cache.delete(fe.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const fe=O;this._cache.delete(fe);let q=O[this.opts.schemaId];return q&&(q=(0,l.normalizeId)(q),delete this.schemas[q],delete this.refs[q]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const fe of O)this.addKeyword(fe);return this}addKeyword(O,fe){let q;if(typeof O=="string")q=O,typeof fe=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),fe.keyword=q);else if(typeof O=="object"&&fe===void 0){if(fe=O,q=fe.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(_e.call(this,q,fe),!fe)return(0,u.eachItem)(q,R=>Ke.call(this,R)),this;Ae.call(this,fe);const I={...fe,type:(0,c.getJSONTypes)(fe.type),schemaType:(0,c.getJSONTypes)(fe.schemaType)};return(0,u.eachItem)(q,I.type.length===0?R=>Ke.call(this,R,I):R=>I.type.forEach(pe=>Ke.call(this,R,I,pe))),this}getKeyword(O){const fe=this.RULES.all[O];return typeof fe=="object"?fe.definition:!!fe}removeKeyword(O){const{RULES:fe}=this;delete fe.keywords[O],delete fe.all[O];for(const q of fe.rules){const I=q.rules.findIndex(R=>R.keyword===O);I>=0&&q.rules.splice(I,1)}return this}addFormat(O,fe){return typeof fe=="string"&&(fe=new RegExp(fe)),this.formats[O]=fe,this}errorsText(O=this.errors,{separator:fe=", ",dataVar:q="data"}={}){return!O||O.length===0?"No errors":O.map(I=>`${q}${I.instancePath} ${I.message}`).reduce((I,R)=>I+fe+R)}$dataMetaSchema(O,fe){const q=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const I of fe){const R=I.split("/").slice(1);let pe=O;for(const Le of R)pe=pe[Le];for(const Le in q){const B=q[Le];if(typeof B!="object")continue;const{$data:ee}=B.definition,X=pe[Le];ee&&X&&(pe[Le]=ve(X))}}return O}_removeAllSchemas(O,fe){for(const q in O){const I=O[q];(!fe||fe.test(q))&&(typeof I=="string"?delete O[q]:I&&!I.meta&&(this._cache.delete(I.schema),delete O[q]))}}_addSchema(O,fe,q,I=this.opts.validateSchema,R=this.opts.addUsedSchema){let pe;const{schemaId:Le}=this.opts;if(typeof O=="object")pe=O[Le];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let B=this._cache.get(O);if(B!==void 0)return B;q=(0,l.normalizeId)(pe||q);const ee=l.getSchemaRefs.call(this,O,q);return B=new s.SchemaEnv({schema:O,schemaId:Le,meta:fe,baseId:q,localRefs:ee}),this._cache.set(B.schema,B),R&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=B),I&&this.validateSchema(O,!0),B}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):s.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const fe=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,O)}finally{this.opts=fe}}}p.ValidationError=r.default,p.MissingRefError=a.default,e.default=p;function w(me,O,fe,q="error"){for(const I in me){const R=I;R in O&&this.logger[q](`${fe}: option ${I}. ${me[R]}`)}}function S(me){return me=(0,l.normalizeId)(me),this.schemas[me]||this.refs[me]}function F(){const me=this.opts.schemas;if(me)if(Array.isArray(me))this.addSchema(me);else for(const O in me)this.addSchema(me[O],O)}function Z(){for(const me in this.opts.formats){const O=this.opts.formats[me];O&&this.addFormat(me,O)}}function re(me){if(Array.isArray(me)){this.addVocabulary(me);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in me){const fe=me[O];fe.keyword||(fe.keyword=O),this.addKeyword(fe)}}function ce(){const me={...this.opts};for(const O of b)delete me[O];return me}const Oe={log(){},warn(){},error(){}};function ge(me){if(me===!1)return Oe;if(me===void 0)return console;if(me.log&&me.warn&&me.error)return me;throw new Error("logger must implement log, warn and error methods")}const we=/^[a-z_$][a-z0-9_$:-]*$/i;function _e(me,O){const{RULES:fe}=this;if((0,u.eachItem)(me,q=>{if(fe.keywords[q])throw new Error(`Keyword ${q} is already defined`);if(!we.test(q))throw new Error(`Keyword ${q} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function Ke(me,O,fe){var q;const I=O==null?void 0:O.post;if(fe&&I)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:R}=this;let pe=I?R.post:R.rules.find(({type:B})=>B===fe);if(pe||(pe={type:fe,rules:[]},R.rules.push(pe)),R.keywords[me]=!0,!O)return;const Le={keyword:me,definition:{...O,type:(0,c.getJSONTypes)(O.type),schemaType:(0,c.getJSONTypes)(O.schemaType)}};O.before?Ee.call(this,pe,Le,O.before):pe.rules.push(Le),R.all[me]=Le,(q=O.implements)===null||q===void 0||q.forEach(B=>this.addKeyword(B))}function Ee(me,O,fe){const q=me.rules.findIndex(I=>I.keyword===fe);q>=0?me.rules.splice(q,0,O):(me.rules.push(O),this.logger.warn(`rule ${fe} is not defined`))}function Ae(me){let{metaSchema:O}=me;O!==void 0&&(me.$data&&this.opts.$data&&(O=ve(O)),me.validateSchema=this.compile(O,!0))}const be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ve(me){return{anyOf:[me,be]}}})(ag);var ld={},cd={},ud={};Object.defineProperty(ud,"__esModule",{value:!0});const wE={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ud.default=wE;var za={};Object.defineProperty(za,"__esModule",{value:!0});za.callRef=za.getValidate=void 0;const AE=No,ch=ht,On=vt,so=Er,uh=Dn,Ai=Ue,CE={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:r}=e,{baseId:a,schemaEnv:o,validateName:s,opts:i,self:l}=r,{root:c}=o;if((n==="#"||n==="#/")&&a===c.baseId)return d();const u=uh.resolveRef.call(l,c,a,n);if(u===void 0)throw new AE.default(r.opts.uriResolver,a,n);if(u instanceof uh.SchemaEnv)return m(u);return y(u);function d(){if(o===c)return Fi(e,s,o,o.$async);const b=t.scopeValue("root",{ref:c});return Fi(e,(0,On._)`${b}.validate`,c,c.$async)}function m(b){const v=Wg(e,b);Fi(e,v,b,b.$async)}function y(b){const v=t.scopeValue("schema",i.code.source===!0?{ref:b,code:(0,On.stringify)(b)}:{ref:b}),_=t.name("valid"),A=e.subschema({schema:b,dataTypes:[],schemaPath:On.nil,topSchemaRef:v,errSchemaPath:n},_);e.mergeEvaluated(A),e.ok(_)}}};function Wg(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,On._)`${n.scopeValue("wrapper",{ref:t})}.validate`}za.getValidate=Wg;function Fi(e,t,n,r){const{gen:a,it:o}=e,{allErrors:s,schemaEnv:i,opts:l}=o,c=l.passContext?so.default.this:On.nil;r?u():d();function u(){if(!i.$async)throw new Error("async schema referenced by sync schema");const b=a.let("valid");a.try(()=>{a.code((0,On._)`await ${(0,ch.callValidateCode)(e,t,c)}`),y(t),s||a.assign(b,!0)},v=>{a.if((0,On._)`!(${v} instanceof ${o.ValidationError})`,()=>a.throw(v)),m(v),s||a.assign(b,!1)}),e.ok(b)}function d(){e.result((0,ch.callValidateCode)(e,t,c),()=>y(t),()=>m(t))}function m(b){const v=(0,On._)`${b}.errors`;a.assign(so.default.vErrors,(0,On._)`${so.default.vErrors} === null ? ${v} : ${so.default.vErrors}.concat(${v})`),a.assign(so.default.errors,(0,On._)`${so.default.vErrors}.length`)}function y(b){var v;if(!o.opts.unevaluated)return;const _=(v=n==null?void 0:n.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(o.props=Ai.mergeEvaluated.props(a,_.props,o.props));else{const A=a.var("props",(0,On._)`${b}.evaluated.props`);o.props=Ai.mergeEvaluated.props(a,A,o.props,On.Name)}if(o.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(o.items=Ai.mergeEvaluated.items(a,_.items,o.items));else{const A=a.var("items",(0,On._)`${b}.evaluated.items`);o.items=Ai.mergeEvaluated.items(a,A,o.items,On.Name)}}}za.callRef=Fi;za.default=CE;Object.defineProperty(cd,"__esModule",{value:!0});const $E=ud,SE=za,IE=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$E.default,SE.default];cd.default=IE;var dd={},fd={};Object.defineProperty(fd,"__esModule",{value:!0});const ol=vt,ta=ol.operators,sl={maximum:{okStr:"<=",ok:ta.LTE,fail:ta.GT},minimum:{okStr:">=",ok:ta.GTE,fail:ta.LT},exclusiveMaximum:{okStr:"<",ok:ta.LT,fail:ta.GTE},exclusiveMinimum:{okStr:">",ok:ta.GT,fail:ta.LTE}},EE={message:({keyword:e,schemaCode:t})=>(0,ol.str)`must be ${sl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ol._)`{comparison: ${sl[e].okStr}, limit: ${t}}`},kE={keyword:Object.keys(sl),type:"number",schemaType:"number",$data:!0,error:EE,code(e){const{keyword:t,data:n,schemaCode:r}=e;e.fail$data((0,ol._)`${n} ${sl[t].fail} ${r} || isNaN(${n})`)}};fd.default=kE;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});const gs=vt,TE={message:({schemaCode:e})=>(0,gs.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,gs._)`{multipleOf: ${e}}`},xE={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:TE,code(e){const{gen:t,data:n,schemaCode:r,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),i=o?(0,gs._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,gs._)`${s} !== parseInt(${s})`;e.fail$data((0,gs._)`(${r} === 0 || (${s} = ${n}/${r}, ${i}))`)}};pd.default=xE;var hd={},md={};Object.defineProperty(md,"__esModule",{value:!0});function qg(e){const t=e.length;let n=0,r=0,a;for(;r<t;)n++,a=e.charCodeAt(r++),a>=55296&&a<=56319&&r<t&&(a=e.charCodeAt(r),(a&64512)===56320&&r++);return n}md.default=qg;qg.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(hd,"__esModule",{value:!0});const Oa=vt,PE=Ue,ME=md,NE={message({keyword:e,schemaCode:t}){const n=e==="maxLength"?"more":"fewer";return(0,Oa.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,Oa._)`{limit: ${e}}`},OE={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:NE,code(e){const{keyword:t,data:n,schemaCode:r,it:a}=e,o=t==="maxLength"?Oa.operators.GT:Oa.operators.LT,s=a.opts.unicode===!1?(0,Oa._)`${n}.length`:(0,Oa._)`${(0,PE.useFunc)(e.gen,ME.default)}(${n})`;e.fail$data((0,Oa._)`${s} ${o} ${r}`)}};hd.default=OE;var vd={};Object.defineProperty(vd,"__esModule",{value:!0});const RE=ht,il=vt,LE={message:({schemaCode:e})=>(0,il.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,il._)`{pattern: ${e}}`},DE={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:LE,code(e){const{data:t,$data:n,schema:r,schemaCode:a,it:o}=e,s=o.opts.unicodeRegExp?"u":"",i=n?(0,il._)`(new RegExp(${a}, ${s}))`:(0,RE.usePattern)(e,r);e.fail$data((0,il._)`!${i}.test(${t})`)}};vd.default=DE;var gd={};Object.defineProperty(gd,"__esModule",{value:!0});const ys=vt,FE={message({keyword:e,schemaCode:t}){const n=e==="maxProperties"?"more":"fewer";return(0,ys.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,ys._)`{limit: ${e}}`},jE={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:FE,code(e){const{keyword:t,data:n,schemaCode:r}=e,a=t==="maxProperties"?ys.operators.GT:ys.operators.LT;e.fail$data((0,ys._)`Object.keys(${n}).length ${a} ${r}`)}};gd.default=jE;var yd={};Object.defineProperty(yd,"__esModule",{value:!0});const ts=ht,_s=vt,BE=Ue,VE={message:({params:{missingProperty:e}})=>(0,_s.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,_s._)`{missingProperty: ${e}}`},UE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:VE,code(e){const{gen:t,schema:n,schemaCode:r,data:a,$data:o,it:s}=e,{opts:i}=s;if(!o&&n.length===0)return;const l=n.length>=i.loopRequired;if(s.allErrors?c():u(),i.strictRequired){const y=e.parentSchema.properties,{definedProperties:b}=e.it;for(const v of n)if((y==null?void 0:y[v])===void 0&&!b.has(v)){const _=s.schemaEnv.baseId+s.errSchemaPath,A=`required property "${v}" is not defined at "${_}" (strictRequired)`;(0,BE.checkStrictMode)(s,A,s.opts.strictRequired)}}function c(){if(l||o)e.block$data(_s.nil,d);else for(const y of n)(0,ts.checkReportMissingProp)(e,y)}function u(){const y=t.let("missing");if(l||o){const b=t.let("valid",!0);e.block$data(b,()=>m(y,b)),e.ok(b)}else t.if((0,ts.checkMissingProp)(e,n,y)),(0,ts.reportMissingProp)(e,y),t.else()}function d(){t.forOf("prop",r,y=>{e.setParams({missingProperty:y}),t.if((0,ts.noPropertyInData)(t,a,y,i.ownProperties),()=>e.error())})}function m(y,b){e.setParams({missingProperty:y}),t.forOf(y,r,()=>{t.assign(b,(0,ts.propertyInData)(t,a,y,i.ownProperties)),t.if((0,_s.not)(b),()=>{e.error(),t.break()})},_s.nil)}}};yd.default=UE;var _d={};Object.defineProperty(_d,"__esModule",{value:!0});const bs=vt,HE={message({keyword:e,schemaCode:t}){const n=e==="maxItems"?"more":"fewer";return(0,bs.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,bs._)`{limit: ${e}}`},zE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:HE,code(e){const{keyword:t,data:n,schemaCode:r}=e,a=t==="maxItems"?bs.operators.GT:bs.operators.LT;e.fail$data((0,bs._)`${n}.length ${a} ${r}`)}};_d.default=zE;var bd={},Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});const Gg=bg;Gg.code='require("ajv/dist/runtime/equal").default';Vs.default=Gg;Object.defineProperty(bd,"__esModule",{value:!0});const Dc=rn,hn=vt,KE=Ue,WE=Vs,qE={message:({params:{i:e,j:t}})=>(0,hn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,hn._)`{i: ${e}, j: ${t}}`},GE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:qE,code(e){const{gen:t,data:n,$data:r,schema:a,parentSchema:o,schemaCode:s,it:i}=e;if(!r&&!a)return;const l=t.let("valid"),c=o.items?(0,Dc.getSchemaTypes)(o.items):[];e.block$data(l,u,(0,hn._)`${s} === false`),e.ok(l);function u(){const b=t.let("i",(0,hn._)`${n}.length`),v=t.let("j");e.setParams({i:b,j:v}),t.assign(l,!0),t.if((0,hn._)`${b} > 1`,()=>(d()?m:y)(b,v))}function d(){return c.length>0&&!c.some(b=>b==="object"||b==="array")}function m(b,v){const _=t.name("item"),A=(0,Dc.checkDataTypes)(c,_,i.opts.strictNumbers,Dc.DataType.Wrong),$=t.const("indices",(0,hn._)`{}`);t.for((0,hn._)`;${b}--;`,()=>{t.let(_,(0,hn._)`${n}[${b}]`),t.if(A,(0,hn._)`continue`),c.length>1&&t.if((0,hn._)`typeof ${_} == "string"`,(0,hn._)`${_} += "_"`),t.if((0,hn._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(v,(0,hn._)`${$}[${_}]`),e.error(),t.assign(l,!1).break()}).code((0,hn._)`${$}[${_}] = ${b}`)})}function y(b,v){const _=(0,KE.useFunc)(t,WE.default),A=t.name("outer");t.label(A).for((0,hn._)`;${b}--;`,()=>t.for((0,hn._)`${v} = ${b}; ${v}--;`,()=>t.if((0,hn._)`${_}(${n}[${b}], ${n}[${v}])`,()=>{e.error(),t.assign(l,!1).break(A)})))}}};bd.default=GE;var wd={};Object.defineProperty(wd,"__esModule",{value:!0});const yu=vt,JE=Ue,YE=Vs,QE={message:"must be equal to constant",params:({schemaCode:e})=>(0,yu._)`{allowedValue: ${e}}`},XE={keyword:"const",$data:!0,error:QE,code(e){const{gen:t,data:n,$data:r,schemaCode:a,schema:o}=e;r||o&&typeof o=="object"?e.fail$data((0,yu._)`!${(0,JE.useFunc)(t,YE.default)}(${n}, ${a})`):e.fail((0,yu._)`${o} !== ${n}`)}};wd.default=XE;var Ad={};Object.defineProperty(Ad,"__esModule",{value:!0});const is=vt,ZE=Ue,ek=Vs,tk={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,is._)`{allowedValues: ${e}}`},nk={keyword:"enum",schemaType:"array",$data:!0,error:tk,code(e){const{gen:t,data:n,$data:r,schema:a,schemaCode:o,it:s}=e;if(!r&&a.length===0)throw new Error("enum must have non-empty array");const i=a.length>=s.opts.loopEnum;let l;const c=()=>l??(l=(0,ZE.useFunc)(t,ek.default));let u;if(i||r)u=t.let("valid"),e.block$data(u,d);else{if(!Array.isArray(a))throw new Error("ajv implementation error");const y=t.const("vSchema",o);u=(0,is.or)(...a.map((b,v)=>m(y,v)))}e.pass(u);function d(){t.assign(u,!1),t.forOf("v",o,y=>t.if((0,is._)`${c()}(${n}, ${y})`,()=>t.assign(u,!0).break()))}function m(y,b){const v=a[b];return typeof v=="object"&&v!==null?(0,is._)`${c()}(${n}, ${y}[${b}])`:(0,is._)`${n} === ${v}`}}};Ad.default=nk;Object.defineProperty(dd,"__esModule",{value:!0});const rk=fd,ak=pd,ok=hd,sk=vd,ik=gd,lk=yd,ck=_d,uk=bd,dk=wd,fk=Ad,pk=[rk.default,ak.default,ok.default,sk.default,ik.default,lk.default,ck.default,uk.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},dk.default,fk.default];dd.default=pk;var Cd={},Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.validateAdditionalItems=void 0;const Ra=vt,_u=Ue,hk={message:({params:{len:e}})=>(0,Ra.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ra._)`{limit: ${e}}`},mk={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:hk,code(e){const{parentSchema:t,it:n}=e,{items:r}=t;if(!Array.isArray(r)){(0,_u.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}Jg(e,r)}};function Jg(e,t){const{gen:n,schema:r,data:a,keyword:o,it:s}=e;s.items=!0;const i=n.const("len",(0,Ra._)`${a}.length`);if(r===!1)e.setParams({len:t.length}),e.pass((0,Ra._)`${i} <= ${t.length}`);else if(typeof r=="object"&&!(0,_u.alwaysValidSchema)(s,r)){const c=n.var("valid",(0,Ra._)`${i} <= ${t.length}`);n.if((0,Ra.not)(c),()=>l(c)),e.ok(c)}function l(c){n.forRange("i",t.length,i,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:_u.Type.Num},c),s.allErrors||n.if((0,Ra.not)(c),()=>n.break())})}}Oo.validateAdditionalItems=Jg;Oo.default=mk;var $d={},Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});Ro.validateTuple=void 0;const dh=vt,ji=Ue,vk=ht,gk={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return Yg(e,"additionalItems",t);n.items=!0,!(0,ji.alwaysValidSchema)(n,t)&&e.ok((0,vk.validateArray)(e))}};function Yg(e,t,n=e.schema){const{gen:r,parentSchema:a,data:o,keyword:s,it:i}=e;u(a),i.opts.unevaluated&&n.length&&i.items!==!0&&(i.items=ji.mergeEvaluated.items(r,n.length,i.items));const l=r.name("valid"),c=r.const("len",(0,dh._)`${o}.length`);n.forEach((d,m)=>{(0,ji.alwaysValidSchema)(i,d)||(r.if((0,dh._)`${c} > ${m}`,()=>e.subschema({keyword:s,schemaProp:m,dataProp:m},l)),e.ok(l))});function u(d){const{opts:m,errSchemaPath:y}=i,b=n.length,v=b===d.minItems&&(b===d.maxItems||d[t]===!1);if(m.strictTuples&&!v){const _=`"${s}" is ${b}-tuple, but minItems or maxItems/${t} are not specified or different at path "${y}"`;(0,ji.checkStrictMode)(i,_,m.strictTuples)}}}Ro.validateTuple=Yg;Ro.default=gk;Object.defineProperty($d,"__esModule",{value:!0});const yk=Ro,_k={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,yk.validateTuple)(e,"items")};$d.default=_k;var Sd={};Object.defineProperty(Sd,"__esModule",{value:!0});const fh=vt,bk=Ue,wk=ht,Ak=Oo,Ck={message:({params:{len:e}})=>(0,fh.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fh._)`{limit: ${e}}`},$k={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Ck,code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,!(0,bk.alwaysValidSchema)(r,t)&&(a?(0,Ak.validateAdditionalItems)(e,a):e.ok((0,wk.validateArray)(e)))}};Sd.default=$k;var Id={};Object.defineProperty(Id,"__esModule",{value:!0});const Jn=vt,Ci=Ue,Sk={message:({params:{min:e,max:t}})=>t===void 0?(0,Jn.str)`must contain at least ${e} valid item(s)`:(0,Jn.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Jn._)`{minContains: ${e}}`:(0,Jn._)`{minContains: ${e}, maxContains: ${t}}`},Ik={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Sk,code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;let s,i;const{minContains:l,maxContains:c}=r;o.opts.next?(s=l===void 0?1:l,i=c):s=1;const u=t.const("len",(0,Jn._)`${a}.length`);if(e.setParams({min:s,max:i}),i===void 0&&s===0){(0,Ci.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(i!==void 0&&s>i){(0,Ci.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Ci.alwaysValidSchema)(o,n)){let v=(0,Jn._)`${u} >= ${s}`;i!==void 0&&(v=(0,Jn._)`${v} && ${u} <= ${i}`),e.pass(v);return}o.items=!0;const d=t.name("valid");i===void 0&&s===1?y(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),i!==void 0&&t.if((0,Jn._)`${a}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){const v=t.name("_valid"),_=t.let("count",0);y(v,()=>t.if(v,()=>b(_)))}function y(v,_){t.forRange("i",0,u,A=>{e.subschema({keyword:"contains",dataProp:A,dataPropType:Ci.Type.Num,compositeRule:!0},v),_()})}function b(v){t.code((0,Jn._)`${v}++`),i===void 0?t.if((0,Jn._)`${v} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Jn._)`${v} > ${i}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Jn._)`${v} >= ${s}`,()=>t.assign(d,!0)))}}};Id.default=Ik;var Qg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=vt,n=Ue,r=ht;e.error={message:({params:{property:l,depsCount:c,deps:u}})=>{const d=c===1?"property":"properties";return(0,t.str)`must have ${d} ${u} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:u,missingProperty:d}})=>(0,t._)`{property: ${l},
    missingProperty: ${d},
    depsCount: ${c},
    deps: ${u}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,u]=o(l);s(l,c),i(l,u)}};function o({schema:l}){const c={},u={};for(const d in l){if(d==="__proto__")continue;const m=Array.isArray(l[d])?c:u;m[d]=l[d]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:d,it:m}=l;if(Object.keys(c).length===0)return;const y=u.let("missing");for(const b in c){const v=c[b];if(v.length===0)continue;const _=(0,r.propertyInData)(u,d,b,m.opts.ownProperties);l.setParams({property:b,depsCount:v.length,deps:v.join(", ")}),m.allErrors?u.if(_,()=>{for(const A of v)(0,r.checkReportMissingProp)(l,A)}):(u.if((0,t._)`${_} && (${(0,r.checkMissingProp)(l,v,y)})`),(0,r.reportMissingProp)(l,y),u.else())}}e.validatePropertyDeps=s;function i(l,c=l.schema){const{gen:u,data:d,keyword:m,it:y}=l,b=u.name("valid");for(const v in c)(0,n.alwaysValidSchema)(y,c[v])||(u.if((0,r.propertyInData)(u,d,v,y.opts.ownProperties),()=>{const _=l.subschema({keyword:m,schemaProp:v},b);l.mergeValidEvaluated(_,b)},()=>u.var(b,!0)),l.ok(b))}e.validateSchemaDeps=i,e.default=a})(Qg);var Ed={};Object.defineProperty(Ed,"__esModule",{value:!0});const Xg=vt,Ek=Ue,kk={message:"property name must be valid",params:({params:e})=>(0,Xg._)`{propertyName: ${e.propertyName}}`},Tk={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:kk,code(e){const{gen:t,schema:n,data:r,it:a}=e;if((0,Ek.alwaysValidSchema)(a,n))return;const o=t.name("valid");t.forIn("key",r,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,Xg.not)(o),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(o)}};Ed.default=Tk;var Ol={};Object.defineProperty(Ol,"__esModule",{value:!0});const $i=ht,lr=vt,xk=Er,Si=Ue,Pk={message:"must NOT have additional properties",params:({params:e})=>(0,lr._)`{additionalProperty: ${e.additionalProperty}}`},Mk={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Pk,code(e){const{gen:t,schema:n,parentSchema:r,data:a,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,Si.alwaysValidSchema)(s,n))return;const c=(0,$i.allSchemaProperties)(r.properties),u=(0,$i.allSchemaProperties)(r.patternProperties);d(),e.ok((0,lr._)`${o} === ${xk.default.errors}`);function d(){t.forIn("key",a,_=>{!c.length&&!u.length?b(_):t.if(m(_),()=>b(_))})}function m(_){let A;if(c.length>8){const $=(0,Si.schemaRefOrVal)(s,r.properties,"properties");A=(0,$i.isOwnProperty)(t,$,_)}else c.length?A=(0,lr.or)(...c.map($=>(0,lr._)`${_} === ${$}`)):A=lr.nil;return u.length&&(A=(0,lr.or)(A,...u.map($=>(0,lr._)`${(0,$i.usePattern)(e,$)}.test(${_})`))),(0,lr.not)(A)}function y(_){t.code((0,lr._)`delete ${a}[${_}]`)}function b(_){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){y(_);return}if(n===!1){e.setParams({additionalProperty:_}),e.error(),i||t.break();return}if(typeof n=="object"&&!(0,Si.alwaysValidSchema)(s,n)){const A=t.name("valid");l.removeAdditional==="failing"?(v(_,A,!1),t.if((0,lr.not)(A),()=>{e.reset(),y(_)})):(v(_,A),i||t.if((0,lr.not)(A),()=>t.break()))}}function v(_,A,$){const g={keyword:"additionalProperties",dataProp:_,dataPropType:Si.Type.Str};$===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(g,A)}}};Ol.default=Mk;var kd={};Object.defineProperty(kd,"__esModule",{value:!0});const Nk=mr,ph=ht,Fc=Ue,hh=Ol,Ok={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&hh.default.code(new Nk.KeywordCxt(o,hh.default,"additionalProperties"));const s=(0,ph.allSchemaProperties)(n);for(const d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Fc.mergeEvaluated.props(t,(0,Fc.toHash)(s),o.props));const i=s.filter(d=>!(0,Fc.alwaysValidSchema)(o,n[d]));if(i.length===0)return;const l=t.name("valid");for(const d of i)c(d)?u(d):(t.if((0,ph.propertyInData)(t,a,d,o.opts.ownProperties)),u(d),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function u(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};kd.default=Ok;var Td={};Object.defineProperty(Td,"__esModule",{value:!0});const mh=ht,Ii=vt,vh=Ue,gh=Ue,Rk={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:a,it:o}=e,{opts:s}=o,i=(0,mh.allSchemaProperties)(n),l=i.filter(v=>(0,vh.alwaysValidSchema)(o,n[v]));if(i.length===0||l.length===i.length&&(!o.opts.unevaluated||o.props===!0))return;const c=s.strictSchema&&!s.allowMatchingProperties&&a.properties,u=t.name("valid");o.props!==!0&&!(o.props instanceof Ii.Name)&&(o.props=(0,gh.evaluatedPropsToName)(t,o.props));const{props:d}=o;m();function m(){for(const v of i)c&&y(v),o.allErrors?b(v):(t.var(u,!0),b(v),t.if(u))}function y(v){for(const _ in c)new RegExp(v).test(_)&&(0,vh.checkStrictMode)(o,`property ${_} matches pattern ${v} (use allowMatchingProperties)`)}function b(v){t.forIn("key",r,_=>{t.if((0,Ii._)`${(0,mh.usePattern)(e,v)}.test(${_})`,()=>{const A=l.includes(v);A||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:_,dataPropType:gh.Type.Str},u),o.opts.unevaluated&&d!==!0?t.assign((0,Ii._)`${d}[${_}]`,!0):!A&&!o.allErrors&&t.if((0,Ii.not)(u),()=>t.break())})})}}};Td.default=Rk;var xd={};Object.defineProperty(xd,"__esModule",{value:!0});const Lk=Ue,Dk={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,Lk.alwaysValidSchema)(r,n)){e.fail();return}const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};xd.default=Dk;var Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});const Fk=ht,jk={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Fk.validateUnion,error:{message:"must match a schema in anyOf"}};Pd.default=jk;var Md={};Object.defineProperty(Md,"__esModule",{value:!0});const Bi=vt,Bk=Ue,Vk={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Bi._)`{passingSchemas: ${e.passing}}`},Uk={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Vk,code(e){const{gen:t,schema:n,parentSchema:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&r.discriminator)return;const o=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block(c),e.result(s,()=>e.reset(),()=>e.error(!0));function c(){o.forEach((u,d)=>{let m;(0,Bk.alwaysValidSchema)(a,u)?t.var(l,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,Bi._)`${l} && ${s}`).assign(s,!1).assign(i,(0,Bi._)`[${i}, ${d}]`).else(),t.if(l,()=>{t.assign(s,!0),t.assign(i,d),m&&e.mergeEvaluated(m,Bi.Name)})})}}};Md.default=Uk;var Nd={};Object.defineProperty(Nd,"__esModule",{value:!0});const Hk=Ue,zk={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach((o,s)=>{if((0,Hk.alwaysValidSchema)(r,o))return;const i=e.subschema({keyword:"allOf",schemaProp:s},a);e.ok(a),e.mergeEvaluated(i)})}};Nd.default=zk;var Od={};Object.defineProperty(Od,"__esModule",{value:!0});const ll=vt,Zg=Ue,Kk={message:({params:e})=>(0,ll.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,ll._)`{failingKeyword: ${e.ifClause}}`},Wk={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Kk,code(e){const{gen:t,parentSchema:n,it:r}=e;n.then===void 0&&n.else===void 0&&(0,Zg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const a=yh(r,"then"),o=yh(r,"else");if(!a&&!o)return;const s=t.let("valid",!0),i=t.name("_valid");if(l(),e.reset(),a&&o){const u=t.let("ifClause");e.setParams({ifClause:u}),t.if(i,c("then",u),c("else",u))}else a?t.if(i,c("then")):t.if((0,ll.not)(i),c("else"));e.pass(s,()=>e.error(!0));function l(){const u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(u)}function c(u,d){return()=>{const m=e.subschema({keyword:u},i);t.assign(s,i),e.mergeValidEvaluated(m,s),d?t.assign(d,(0,ll._)`${u}`):e.setParams({ifClause:u})}}}};function yh(e,t){const n=e.schema[t];return n!==void 0&&!(0,Zg.alwaysValidSchema)(e,n)}Od.default=Wk;var Rd={};Object.defineProperty(Rd,"__esModule",{value:!0});const qk=Ue,Gk={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,qk.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Rd.default=Gk;Object.defineProperty(Cd,"__esModule",{value:!0});const Jk=Oo,Yk=$d,Qk=Ro,Xk=Sd,Zk=Id,eT=Qg,tT=Ed,nT=Ol,rT=kd,aT=Td,oT=xd,sT=Pd,iT=Md,lT=Nd,cT=Od,uT=Rd;function dT(e=!1){const t=[oT.default,sT.default,iT.default,lT.default,cT.default,uT.default,tT.default,nT.default,eT.default,rT.default,aT.default];return e?t.push(Yk.default,Xk.default):t.push(Jk.default,Qk.default),t.push(Zk.default),t}Cd.default=dT;var Ld={},Dd={};Object.defineProperty(Dd,"__esModule",{value:!0});const Wt=vt,fT={message:({schemaCode:e})=>(0,Wt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Wt._)`{format: ${e}}`},pT={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:fT,code(e,t){const{gen:n,data:r,$data:a,schema:o,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=i;if(!l.validateFormats)return;a?m():y();function m(){const b=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),v=n.const("fDef",(0,Wt._)`${b}[${s}]`),_=n.let("fType"),A=n.let("format");n.if((0,Wt._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>n.assign(_,(0,Wt._)`${v}.type || "string"`).assign(A,(0,Wt._)`${v}.validate`),()=>n.assign(_,(0,Wt._)`"string"`).assign(A,v)),e.fail$data((0,Wt.or)($(),g()));function $(){return l.strictSchema===!1?Wt.nil:(0,Wt._)`${s} && !${A}`}function g(){const p=u.$async?(0,Wt._)`(${v}.async ? await ${A}(${r}) : ${A}(${r}))`:(0,Wt._)`${A}(${r})`,w=(0,Wt._)`(typeof ${A} == "function" ? ${p} : ${A}.test(${r}))`;return(0,Wt._)`${A} && ${A} !== true && ${_} === ${t} && !${w}`}}function y(){const b=d.formats[o];if(!b){$();return}if(b===!0)return;const[v,_,A]=g(b);v===t&&e.pass(p());function $(){if(l.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function g(w){const S=w instanceof RegExp?(0,Wt.regexpCode)(w):l.code.formats?(0,Wt._)`${l.code.formats}${(0,Wt.getProperty)(o)}`:void 0,F=n.scopeValue("formats",{key:o,ref:w,code:S});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Wt._)`${F}.validate`]:["string",w,F]}function p(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Wt._)`await ${A}(${r})`}return typeof _=="function"?(0,Wt._)`${A}(${r})`:(0,Wt._)`${A}.test(${r})`}}}};Dd.default=pT;Object.defineProperty(Ld,"__esModule",{value:!0});const hT=Dd,mT=[hT.default];Ld.default=mT;var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.contentVocabulary=Eo.metadataVocabulary=void 0;Eo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Eo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(ld,"__esModule",{value:!0});const vT=cd,gT=dd,yT=Cd,_T=Ld,_h=Eo,bT=[vT.default,gT.default,(0,yT.default)(),_T.default,_h.metadataVocabulary,_h.contentVocabulary];ld.default=bT;var Fd={},Rl={};Object.defineProperty(Rl,"__esModule",{value:!0});Rl.DiscrError=void 0;var bh;(function(e){e.Tag="tag",e.Mapping="mapping"})(bh||(Rl.DiscrError=bh={}));Object.defineProperty(Fd,"__esModule",{value:!0});const uo=vt,bu=Rl,wh=Dn,wT=No,AT=Ue,CT={message:({params:{discrError:e,tagName:t}})=>e===bu.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,uo._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},$T={keyword:"discriminator",type:"object",schemaType:"object",error:CT,code(e){const{gen:t,data:n,schema:r,parentSchema:a,it:o}=e,{oneOf:s}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",(0,uo._)`${n}${(0,uo.getProperty)(i)}`);t.if((0,uo._)`typeof ${c} == "string"`,()=>u(),()=>e.error(!1,{discrError:bu.DiscrError.Tag,tag:c,tagName:i})),e.ok(l);function u(){const y=m();t.if(!1);for(const b in y)t.elseIf((0,uo._)`${c} === ${b}`),t.assign(l,d(y[b]));t.else(),e.error(!1,{discrError:bu.DiscrError.Mapping,tag:c,tagName:i}),t.endIf()}function d(y){const b=t.name("valid"),v=e.subschema({keyword:"oneOf",schemaProp:y},b);return e.mergeEvaluated(v,uo.Name),b}function m(){var y;const b={},v=A(a);let _=!0;for(let p=0;p<s.length;p++){let w=s[p];if(w!=null&&w.$ref&&!(0,AT.schemaHasRulesButRef)(w,o.self.RULES)){const F=w.$ref;if(w=wh.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,F),w instanceof wh.SchemaEnv&&(w=w.schema),w===void 0)throw new wT.default(o.opts.uriResolver,o.baseId,F)}const S=(y=w==null?void 0:w.properties)===null||y===void 0?void 0:y[i];if(typeof S!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);_=_&&(v||A(w)),$(S,p)}if(!_)throw new Error(`discriminator: "${i}" must be required`);return b;function A({required:p}){return Array.isArray(p)&&p.includes(i)}function $(p,w){if(p.const)g(p.const,w);else if(p.enum)for(const S of p.enum)g(S,w);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function g(p,w){if(typeof p!="string"||p in b)throw new Error(`discriminator: "${i}" values must be unique strings`);b[p]=w}}}};Fd.default=$T;const ST="http://json-schema.org/draft-07/schema#",IT="http://json-schema.org/draft-07/schema#",ET="Core schema meta-schema",kT={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:[]}},TT=["object","boolean"],xT={$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:"#"}},PT={$schema:ST,$id:IT,title:ET,definitions:kT,type:TT,properties:xT,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=ag,r=ld,a=Fd,o=PT,s=["/properties"],i="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=mr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=vt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=Bs;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=No;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(fu,fu.exports);var MT=fu.exports;const NT=rg(MT);var OT=(e=>(e.WriterWorkflowKey="writer#workflowKey",e.CssClassnames="cssClassnames",e.CssSize="cssSize",e.Uri="uri",e.Uuid="uuid",e))(OT||{});function Vn(e){return`https://dev.writer.com/framework/${encodeURIComponent(e)}.json`}function Z5(e){return{$id:Vn(e.join(",")),type:"string",enum:e}}function ws(e,t){return{$id:Vn(`between-${e}-${t}`),type:"number",minimum:e,maximum:t}}const RT={$id:Vn("cssClassname"),type:"string",format:"cssClassnames"},ey={$id:Vn("cssSize"),type:"string",format:"cssSize"},ty={$id:Vn("arrayOfString"),type:"array",items:{type:"string"}},jd=ws(-90,90),Bd=ws(-180,180),LT={$id:Vn("gpsMarker"),type:"object",properties:{name:{type:"string"},lat:jd,lng:Bd},required:["lat","lng","name"],additionalProperties:!1},ny={$id:Vn("gpsMarkers"),type:"array",items:LT},ya={$id:Vn("objectRecordNotNested"),type:"object",patternProperties:{"^.*$":{type:["string","number","boolean"]}},additionalProperties:!0},DT={$id:Vn("anotatedText"),type:"array",items:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},FT={$id:Vn("repeaterObject"),oneOf:[{type:"object",patternProperties:{"^.*$":{type:"object"}},additionalProperties:!0},{type:"array",items:{type:"object"}}]},jT={$id:Vn("chatBotMessage"),type:"object",properties:{role:{type:"string"},content:{type:"string"},tools:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},required:["role"],additionalProperties:!0},BT={$id:Vn("chatBotMessages"),type:"array",items:jT},jn={$id:Vn("positiveNumber"),type:"number",minimum:0},ry={$id:Vn("uri"),type:"string",format:"uri"},Vi=new NT({strict:!0,allowUnionTypes:!0});function e3(e){return(e==null?void 0:e.$id)===void 0?Vi.compile(e):Vi.getSchema(e.$id)||Vi.compile(e)}const VT={uri:{format:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,errorMessage:"must be a valid URL"},uuid:{format:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,errorMessage:"must be a valid UUID"},cssClassnames:{format:/(^\s*[a-zA-Z_][-\w]*(\s+[a-zA-Z_][-\w]*)*\s*$)|(^$)/,errorMessage:"must be a valid list of CSS classes separated by spaces"},cssSize:{format:/(^([+-]?\d*\.?\d+)(px|em|%|vh|vw|rem|pt|pc|in|cm|mm|ex|ch|vmin|vmax|fr)$)|(^$)/,errorMessage:"must be a valid CSS size"},"writer#workflowKey":{format:{type:"string",validate:e=>{const t=ne(oe.core);return t?t.getComponents().filter(r=>r.type==="workflows_workflow").map(r=>r.content.key).includes(e):!0}},errorMessage:"must correspond to an existing workflow key"}};Object.entries(VT).map(([e,t])=>Vi.addFormat(e,t.format));const Zt={name:"Accent",type:G.Color,category:ze.Style,applyStyleVariable:!0},zt={name:"Primary text",type:G.Color,category:ze.Style,applyStyleVariable:!0},Un={name:"Secondary text",type:G.Color,category:ze.Style,applyStyleVariable:!0},ay={name:"Emptiness",desc:"Page background color",type:G.Color,category:ze.Style,applyStyleVariable:!0},kr={name:"Container background",type:G.Color,category:ze.Style,applyStyleVariable:!0},Lo={name:"Container shadow",type:G.Shadow,category:ze.Style,applyStyleVariable:!0},en={name:"Separator",type:G.Color,category:ze.Style,applyStyleVariable:!0},Tr={name:"Button",type:G.Color,category:ze.Style,applyStyleVariable:!0},xr={name:"Button text",type:G.Color,category:ze.Style,applyStyleVariable:!0},Aa={name:"Button shadow",type:G.Shadow,category:ze.Style,applyStyleVariable:!0},tt={name:"Custom CSS classes",type:G.Text,category:ze.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets.",validator:RT},UT={name:"Content width",type:G.Width,default:"100%",category:ze.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc.",validator:ey},Do={name:"Content alignment (H)",type:G.HAlign,default:"unset",category:ze.Style},Vd={name:"Content alignment (V)",type:G.VAlign,default:"unset",category:ze.Style},Fo={name:"Padding",type:G.Padding,default:"0",category:ze.Style},$t=Object.freeze({type:G.Boolean,options:{yes:"Yes",no:"No"},validator:{type:"boolean"}}),Ud={...$t,name:"Collapsible",default:"no",category:ze.Style},Ll={...$t,name:"Start collapsed",category:ze.Style,default:"no",desc:"Only applied when the component is collapsible."},HT=Object.freeze(Object.defineProperty({__proto__:null,accentColor:Zt,baseYesNoField:$t,buttonColor:Tr,buttonShadow:Aa,buttonTextColor:xr,containerBackgroundColor:kr,containerShadow:Lo,contentHAlign:Do,contentPadding:Fo,contentVAlign:Vd,contentWidth:UT,cssClasses:tt,emptinessColor:ay,isCollapsible:Ud,primaryTextColor:zt,secondaryTextColor:Un,separatorColor:en,startCollapsed:Ll},Symbol.toStringTag,{value:"Module"})),zT=["aria-invalid"],KT={key:0,class:"material-symbols-outlined"},WT={key:1,class:"WdsTextInput__rightText"},qT=["aria-invalid"],GT=ke({inheritAttrs:!1,__name:"WdsTextInput",props:Hr({leftIcon:{type:String,required:!1,default:void 0},invalid:{type:Boolean,required:!1},variant:{type:String,default:void 0},enableClearButton:{type:Boolean,required:!1},rightText:{type:String,required:!1,default:""}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=qr(e,"modelValue"),r=e;t({focus:c,getSelection:l,value:n,setSelectionEnd:i,setSelectionStart:s});const a=et("input"),o=J(()=>[r.leftIcon?"auto":void 0,"1fr",r.rightText?"auto":void 0,r.enableClearButton?"auto":void 0].filter(Boolean).join(" "));function s(u){a.value&&(a.value.selectionStart=u)}function i(u){a.value&&(a.value.selectionEnd=u)}function l(){var u,d;return{selectionStart:(u=a.value)==null?void 0:u.selectionStart,selectionEnd:(d=a.value)==null?void 0:d.selectionEnd}}function c(){var u;(u=a.value)==null||u.focus()}return(u,d)=>e.leftIcon||e.enableClearButton?(E(),M("div",_o({key:0,class:["WdsTextInput WdsTextInput--leftIcon colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]},u.$attrs,{"aria-invalid":e.invalid,style:{gridTemplateColumns:o.value},onClick:c}),[e.leftIcon?(E(),M("i",KT,Pe(e.leftIcon),1)):Se("",!0),sn(W("input",_o({ref_key:"input",ref:a,"onUpdate:modelValue":d[0]||(d[0]=m=>n.value=m)},u.$attrs),null,16),[[nl,n.value]]),e.rightText?(E(),M("p",WT,Pe(e.rightText),1)):Se("",!0),e.enableClearButton&&n.value?(E(),M("button",{key:2,class:"WdsTextInput__clearBtn",type:"button",onClick:d[1]||(d[1]=m=>n.value="")},d[3]||(d[3]=[W("i",{class:"material-symbols-outlined"},"close",-1)]))):Se("",!0)],16,zT)):sn((E(),M("input",_o({key:1},u.$attrs,{ref_key:"input",ref:a,"onUpdate:modelValue":d[2]||(d[2]=m=>n.value=m),"aria-invalid":e.invalid,class:["WdsTextInput colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]}),null,16,qT)),[[nl,n.value]])}}),oy=Ne(GT,[["__scopeId","data-v-ffc64901"]]),JT={};function YT(e,t){return E(),M("button",null,[Ht(e.$slots,"default",{},void 0,!0)])}const ur=Ne(JT,[["render",YT],["__scopeId","data-v-75345289"]]);function Bn(){return{log:console.log,warn:console.warn,info:console.info,error:console.error}}function QT(e){const t=hr([]),n=$e(!1),r=Bn();async function a(){if(!n.value){for(n.value=!0;t.value.length;){const[s,...i]=t.value;try{await e(s)}catch(l){r.error("Error during handling job",s,l)}finally{t.value=i}}n.value=!1}}function o(s){if(t.value=[...t.value,s],!n.value)return a()}return{push:o,isBusy:En(n)}}function XT(e,t,n,r){const a=t.at(-1).componentId,o=J(()=>e.getComponentById(a)),{push:s,isBusy:i}=QT(l);async function l(b){switch(b.eventType){case"wf-dataframe-add":await c(...b.payload);break;case"wf-dataframe-update":await d(...b.payload);break;case"wf-dataframe-action":await u(...b.payload);break}}async function c(){const b="wf-dataframe-add",v=r.value.numRows(),_=await Jt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),A=_.escape(w=>w[Qn]===v),$=r.value.filter(A).object();if(!$)throw Error("Could not find record");const g=tx($),p=_.from([g]);if(r.value=r.value.concat(p).derive({[Qn]:()=>_.op.row_number()}),!!m(b))return new Promise(w=>{const S=new CustomEvent(b,{detail:{payload:{record:g,record_index:v},callback:w}});y(S)})}async function u(b,v){const _="wf-dataframe-action";if(!r.value)throw Error("Table is not ready");if(!m(_))return;const A=v-1;return new Promise($=>{const g=new CustomEvent(_,{detail:{payload:{action:b,record_index:A},callback:$}});y(g)})}async function d(b,v,_){if(!r.value)throw Error("Table is not ready");if(v===void 0)throw Error("Must specify the index to update a row");const A="wf-dataframe-update",$=v-1,g=await Jt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),p=g.escape(ce=>ce[Qn]===v),w=r.value.filter(p).object();if(!w)throw Error("Could not find record");const S=w[b],F=ZT(S,_),Z=g.escape(ce=>ce[Qn]===v?F:ce[b]);if(r.value=r.value.derive({[b]:Z}),!m(A))return;const re=ex(r.value.filter(p).object());return new Promise(ce=>{const Oe=new CustomEvent(A,{detail:{payload:{record:re,record_index:$},callback:ce}});y(Oe)})}function m(b){var A,$;const v=(A=o.value.handlers)==null?void 0:A[b],_=(($=o.value.binding)==null?void 0:$.eventType)==b;return!!(v||_)}function y(b){n.value instanceof HTMLElement?n.value.dispatchEvent(b):n.value.$el.dispatchEvent(b)}return{isBusy:i,handleUpdateCell:(...b)=>s({eventType:"wf-dataframe-update",payload:b}),handleAddRow:(...b)=>s({eventType:"wf-dataframe-add",payload:b}),handleActionRow:(...b)=>s({eventType:"wf-dataframe-action",payload:b})}}function ZT(e,t){switch(typeof e){case"number":return Number(t);case"string":return String(t);case"boolean":return!!t;case"bigint":return BigInt(String(t));default:throw Error(`Could not update a field of type ${typeof e}`)}}function sy(e){return e===Qn||ng.test(e)}function ex(e){return Object.entries(e).filter(([t])=>!sy(t)).reduce((t,[n,r])=>(t[n]=r,t),{})}function tx(e){return Object.entries(e).filter(([t])=>!sy(t)).reduce((t,[n,r])=>(t[n]=nx(r),t),{})}function nx(e){switch(typeof e){case"number":return 0;case"string":return"";case"boolean":return!1;case"bigint":return BigInt(0);case"object":return{};default:throw Error(`Could not get default value a field of type ${typeof e}`)}}const rx=ke({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"},customSize:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=J(()=>{if(t.customSize)return{width:t.customSize,height:t.customSize}}),r=J(()=>["WdsButton",`WdsButton--${t.variant}`,t.customSize?void 0:`WdsButton--${t.size}`]);return(a,o)=>(E(),M("button",{class:it(["WdsButton colorTransformer",r.value]),role:"button",style:mt(n.value)},[Ht(a.$slots,"default",{},void 0,!0)],6))}}),Yn=Ne(rx,[["__scopeId","data-v-51305c86"]]);var St=(e=>(e.White="#ffffff",e.Black="#000000",e.Blue1="#f3f5ff",e.Blue2="#e4e9ff",e.Blue3="#bfcbff",e.Blue4="#6985ff",e.Blue5="#5551ff",e.Blue6="#4a46da",e.Gray0="#fbfbfd",e.Gray1="#f5f5f9",e.Gray2="#e4e7ed",e.Gray3="#d2d4d7",e.Gray4="#828282",e.Gray5="#4f4f4f",e.Gray6="#333333",e.Purple1="#f6effd",e.Purple2="#ede2ff",e.Purple3="#d4b2f7",e.Purple4="#a95ef8",e.Purple5="#721cc9",e.Orange1="#fff4f1",e.Orange2="#ffcfc2",e.Orange4="#ff8866",e.Orange5="#ff643c",e.Green1="#f2fffb",e.Green2="#d4fff2",e.Green3="#a9f9e1",e.Green5="#3bdcab",e.Green6="#078660",e))(St||{}),iy=(e=>(e.Box="0px 2px 0px 0px #f3f3f3",e.Menu="0px 1px 8px 0px #bfcbff40",e.Large="0px 3px 40px 0px #acb9dc66",e))(iy||{});const t3=Object.freeze(Object.fromEntries([...Object.entries(St).map(([e,t])=>[`--wdsColor${e}`,t]),...Object.entries(iy).map(([e,t])=>[`--wdsShadow${e}`,t])])),ax=["aria-busy"],ox={key:0},sx={class:"CoreDataframe__table__row CoreDataframe__table__row--head"},ix={key:0,"data-writer-grid-col":"0",class:"CoreDataframe__table__th CoreDataframe__table__th--index"},lx=["data-writer-grid-col"],cx=["onClick"],ux={key:0,class:"CoreDataframe__table__th__icon material-symbols-outlined"},dx={key:1,class:"CoreDataframe__table__th CoreDataframe__table__th--stickyRight"},fx={key:0,class:"CoreDataframe__newRow"},px="A component to display Pandas DataFrames.",hx=`
# Subscribe this event handler to the \`wf-dataframe-update\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_change(state, payload):
    state['mydf'].record_update(payload) # should contain an EditableDataFrame instance`,mx=`
# Subscribe this event handler to the \`wf-dataframe-add\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_add(state, payload):
	payload['record']['sales'] = 0 # default value inside the dataframe
	state['mydf'].record_add(payload) # should contain an EditableDataFrame instance`,vx=`
# Subscribe this event handler to the \`wf-dataframe-action\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_action(state, payload):
	# state['mydf'] should contains an EditableDataFrame instance
	record_index = payload['record_index']
	if payload['action'] == 'remove':
		state['mydf'].record_remove(payload) # should contain an EditableDataFrame instance
	if payload['action'] == 'open':
		state['record'] = state['mydf'].record(record_index) # dict representation of record`,gx={writer:{name:"DataFrame",description:px,category:"Content",events:{"wf-dataframe-add":{desc:"Capture adding a row.",stub:mx.trim()},"wf-dataframe-update":{desc:"Capture a cell change.",stub:hx.trim()},"wf-dataframe-action":{desc:"Remove or open a row.",stub:vx.trim()}},fields:{dataframe:{name:"Data",desc:"Must be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.",type:G.Text,default:D$},showIndex:{...$t,name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",default:"yes"},enableSearch:{...$t,name:"Enable search",default:"no"},enableRecordAdd:{...$t,name:"Enable adding a record",default:"no"},enableRecordUpdate:{...$t,name:"Enable updating a record",default:"no"},enableDownload:{...$t,name:"Enable download",desc:"Allows the user to download the data as CSV.",default:"no"},actions:{name:"Actions",desc:"Define rows actions",type:G.KeyValue,default:JSON.stringify({remove:"Remove",open:"Open"}),validator:ya},useMarkdown:{...$t,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},displayRowCount:{name:"Display row count",desc:"Specifies how many rows to show simultaneously.",type:G.Number,category:ze.Style,default:"10",validator:jn},wrapText:{...$t,name:"Wrap text",category:ze.Style,desc:"Not wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.",default:"no"},primaryTextColor:zt,secondaryTextColor:Un,accentColor:Zt,separatorColor:en,dataframeBackgroundColor:{name:"Background",type:G.Color,category:ze.Style,default:St.White,applyStyleVariable:!0},fontStyle:{name:"Font style",type:G.Text,category:ze.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:tt}}},yx=ke({...gx,__name:"CoreDataframe",setup(e){const o=ne(oe.evaluatedFields),s=et("rootEl"),i=et("toolsEl"),l=et("gridContainerEl");let c=null;const u=hr(null),d=hr([]),m=J(()=>o.showIndex.value=="yes"),y=J(()=>o.actions.value),b=hr(null),v=$e(0),_=$e([]);let A=null;const $=ne(oe.core),g=ne(oe.instancePath),{handleUpdateCell:p,handleAddRow:w,handleActionRow:S,isBusy:F}=XT($,g,s,u);async function Z(){await w(),l.value.scrollTo({behavior:"smooth",top:48*_e.value})}const re=J(()=>x.value||F.value),ce=J(()=>{var U;return u.value?(U=u.value)==null?void 0:U.columnNames():[]}),Oe=J(()=>ce.value.filter(U=>d.value.includes(U))),ge=J(()=>ce.value.filter(z=>{if(z===Qn)return!1;const ae=d.value.includes(z),D=ng.test(z);return!(ae&&D)})),we=J(()=>(m.value?1:0)+ge.value.length),_e=J(()=>{var U;return((U=u.value)==null?void 0:U.numRows())??0}),Ke=J(()=>_e.value>1e3),Ee=J(()=>Math.min(o.displayRowCount.value,_e.value)),Ae=J(()=>Object.keys(o.actions.value||{}).length>0),be=J(()=>!!o.useMarkdown.value),ve=J(()=>!!o.enableRecordUpdate.value),me=J(()=>!!o.enableRecordAdd.value),O=J(()=>!!o.wrapText.value),fe=J(()=>{let U;return O.value?U=_e.value-1:U=_e.value-Ee.value,Math.min(Math.ceil(v.value*U),U)}),q=J(()=>{if(!u.value)return null;const U=Ke.value?fe.value:0,z=Ke.value?Ee.value:1e3,ae=u.value.objects({offset:U,limit:z}),D=u.value.indices().slice(U,fe.value+Ee.value);return{data:ae,indices:D}}),I=J(()=>{let U="16px ";return _.value.length==0?(m.value&&(U+="75px "),U+=`repeat(${ge.value.length}, minmax(min-content, 1fr)) `):U+=_.value.map(z=>`${Math.max(z,80)}px `).join(" "),Ae.value&&(U+="40px "),U}),R=J(()=>{const U=o.fontStyle.value,z=`${(1+o.displayRowCount.value)*48}px`;return{position:Ke.value?"sticky":"unset","min-height":"48px","max-height":z,"font-family":U=="monospace"?"monospace":void 0,"grid-template-rows":`48px repeat(${Ee.value}, min-content)`,"grid-template-columns":I.value}}),pe=J(()=>({top:`${48*_e.value}px`})),Le=$e(!1);function B(){if(!(l.value.scrollWidth>l.value.clientWidth)){Le.value=!1;return}const z=l.value.scrollLeft+l.value.clientWidth>=l.value.scrollWidth;Le.value=!z}He(_,B);function ee(){const U=l.value.scrollTop;v.value=U/(l.value.scrollHeight-l.value.clientHeight),B()}function X(){l.value.scrollTop=0}async function ie(){var ae;_.value=[],await Fn();const U=(ae=l.value)==null?void 0:ae.querySelectorAll("[data-writer-grid-col]"),z=[];U==null||U.forEach(D=>{const Q=D,de=Q.dataset.writerGridCol,{width:he}=Q.getBoundingClientRect(),Te=Math.min(he,300);z[de]=Te}),_.value=z}function Ie(U,z){var de,he;if(U.target.classList.contains("widthAdjuster"))return;if(((de=b.value)==null?void 0:de.columnName)!==z){b.value={columnName:z,descending:!1};return}if((he=b.value)==null?void 0:he.descending){b.value=null;return}b.value={columnName:z,descending:!b.value.descending}}function k(U){const z=U.schema.metadata.get("pandas");return z?JSON.parse(z).index_columns:[]}const x=$e(!1);async function le(){x.value=!0;const U=await Jt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),{tableFromIPC:z}=await Jt(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([2,1]),import.meta.url),ae=o.dataframe.value;try{const de=await(await(await fetch(ae)).blob()).arrayBuffer(),he=z(de);d.value=k(he),c=U.fromArrow(he),u.value=c.derive({[Qn]:()=>U.op.row_number()})}catch(D){Bn().error("Couldn't load dataframe from Arrow URL.",D)}finally{x.value=!1}}async function j(){const U=await Jt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),z=u.value.select(U.not(Qn)).toCSV(),ae=document.createElement("a"),D=new Blob([z],{type:"text/csv"}),Q=URL.createObjectURL(D);ae.href=Q,ae.download="data.csv",ae.click(),URL.revokeObjectURL(Q)}async function V(){const U=await Jt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url);if(b.value===null){u.value=u.value.unorder();return}let z;b.value.descending?z=U.desc(b.value.columnName):z=b.value.columnName,u.value=u.value.orderby(z)}async function K(U){const z=U.target.value;if(!z)u.value=c;else{const ae=new RegExp(z,"i"),Q="(d, $) => "+c.columnNames().map(he=>`aq.op.match(d.${he}, $.pattern) !== null`).join(" || "),de=await Jt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url);u.value=c.params({pattern:ae,filterS:Q}).filter(Q).derive({[Qn]:()=>de.op.row_number()})}await Fn(),X()}async function ue(U){if(U.buttons!==1){A=null;return}const z=U.target;if(!s.value.contains(z))return;if(A===null&&z.classList.contains("widthAdjuster")){const he=z.closest(".CoreDataframe__table__th");A=parseInt(he.dataset.writerGridCol)}else if(A===null)return;const ae=l.value.querySelector(`[data-writer-grid-col="${A}"]`),{left:D}=ae.getBoundingClientRect(),de=U.clientX-D;_.value[A]=de}return He(o.dataframe,()=>{le()}),He(b,async()=>{await V()}),He(we,()=>{ie()}),He(O,()=>{ie()}),Xt(async()=>{await le(),document.addEventListener("mousemove",ue),i.value&&new ResizeObserver(ie).observe(i.value,{box:"border-box"})}),tr(()=>{document.removeEventListener("mousemove",ue)}),(U,z)=>{var ae;return E(),M("div",{ref_key:"rootEl",ref:s,class:"CoreDataframe","aria-busy":re.value},[W("div",{ref_key:"toolsEl",ref:i,class:"tools"},[P(o).enableSearch.value==="yes"?(E(),M("div",ox,[Ge(oy,{class:"search",placeholder:"Search","left-icon":"search",onChange:K})])):Se("",!0),P(o).enableDownload.value?(E(),je(ur,{key:1,title:"Download",class:"download",onClick:j},{default:Ze(()=>z[0]||(z[0]=[W("i",{class:"material-symbols-outlined"},"download",-1)])),_:1})):Se("",!0)],512),W("div",{ref_key:"gridContainerEl",ref:l,class:"CoreDataframe__tableWrapper",onScroll:ee},[W("div",{class:it(["CoreDataframe__table",{scrolled:fe.value>0,wrapText:O.value}]),style:mt(R.value)},[W("div",sx,[z[3]||(z[3]=W("div",{class:"CoreDataframe__table__th CoreDataframeRow__spacer"},null,-1)),m.value?(E(),M("div",ix,z[1]||(z[1]=[W("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1)]))):Se("",!0),(E(!0),M(Ve,null,It(ge.value,(D,Q)=>{var de,he;return E(),M("div",{key:D,"data-writer-grid-col":Q+(m.value?1:0),class:"CoreDataframe__table__th"},[W("button",{type:"button",class:"CoreDataframe__table__th__name",onClick:Te=>Ie(Te,D)},Pe(D),9,cx),((de=b.value)==null?void 0:de.columnName)==D?(E(),M("span",ux,Pe((he=b.value)!=null&&he.descending?"arrow_drop_up":"arrow_drop_down"),1)):Se("",!0),z[2]||(z[2]=W("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1))],8,lx)}),128)),Ae.value?(E(),M("div",dx)):Se("",!0)]),(E(!0),M(Ve,null,It((ae=q.value)==null?void 0:ae.data,(D,Q)=>(E(),je(V$,{key:Q,class:"CoreDataframe__table__row",row:D,actions:y.value,"use-markdown":be.value,editable:ve.value&&!re.value,columns:ge.value,"show-index":m.value,"index-text":q.value.indices[Q]??Oe.value.map(de=>D[de]).join(", "),"display-shadow-on-sticky":Le.value,"wrap-text":O.value,onAction:P(S),onChange:P(p)},null,8,["row","actions","use-markdown","editable","columns","show-index","index-text","display-shadow-on-sticky","wrap-text","onAction","onChange"]))),128))],6),Ke.value?(E(),M("div",{key:0,class:"endpoint",style:mt(pe.value)},null,4)):Se("",!0)],544),me.value?(E(),M("div",fx,[Ge(Yn,{"aria-label":"Create a new row at the end",size:"small",variant:"tertiary",onClick:Z},{default:Ze(()=>z[4]||(z[4]=[W("i",{class:"material-symbols-outlined"},"add",-1),Dt(" Add a row ")])),_:1})])):Se("",!0)],8,ax)}}}),_x=Ne(yx,[["__scopeId","data-v-d3ff45f4"]]),bx={key:0},wx={key:1},Ax={key:2},Cx={key:3},$x="A text component used to display headings or titles in different sizes and styles.",Sx={writer:{name:"Heading",description:$x,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:G.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:G.Text,category:ze.Style},alignment:{name:"Alignment",default:"left",type:G.Text,category:ze.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:zt,cssClasses:tt},previewField:"text"}},Ix=ke({...Sx,__name:"CoreHeading",setup(e){const t=ne(oe.evaluatedFields);return(n,r)=>(E(),M("div",{class:"CoreHeading",style:mt({"text-align":P(t).alignment.value})},[P(t).headingType.value=="h1"?(E(),M("h1",bx,Pe(P(t).text.value),1)):P(t).headingType.value=="h3"?(E(),M("h3",wx,Pe(P(t).text.value),1)):P(t).headingType.value=="h4"?(E(),M("h4",Ax,Pe(P(t).text.value),1)):(E(),M("h2",Cx,Pe(P(t).text.value),1))],4))}}),Ex=Ne(Ix,[["__scopeId","data-v-a24181bd"]]),kx={class:"icon"},Tx={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:G.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:ze.Style,default:"arrow_forward"},size:{name:"Icon size",type:G.Number,desc:"Icon size in px",category:ze.Style,default:"14",validator:jn},color:{name:"Icon color",type:G.Color,category:ze.Style},cssClasses:tt},previewField:"icon"}},ly=ke({...Tx,__name:"CoreIcon",setup(e){const t=ne(oe.evaluatedFields);return(n,r)=>(E(),M("div",kx,[P(t).icon.value?(E(),M("span",{key:0,class:"material-symbols-outlined",style:mt({fontSize:`${P(t).size.value}px`,color:P(t).color.value})},Pe(P(t).icon.value),5)):Se("",!0)]))}}),Ah=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Icon.")};typeof Ah=="function"&&Ah(ly);const xx=Ne(ly,[["__scopeId","data-v-983dfef2"]]);function Us(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function Px(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const Mx=["src","alt"],Nx={key:0,class:"captionContainer"},Ox="A component to display images.",Rx=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,Lx={writer:{name:"Image",description:Ox,category:"Content",fields:{src:{name:"Source",default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQoAAAEKCAYAAADqyxvJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAemSURBVHgB7d3baltHGIZhJd5DW3pS2vu/tkKgEFragiXLjuvVkpOS5PMa6Z8ZWc8DPXPBJNGrpX82evfrh4/PG4BveL8BCIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiC43HN3PP/24ubyoafCnT8+bD7/9vur/+f67u80PL/9V+fjHX5vtdv/qn794+bP55eXPaJbfh8wTRYGHh7p/pO/fv/v3hbZG5e+zuLm+WvXzT0+fNo8v/1XZ7582HJdQFKj+h3p7c73q5/ePTy9PInUvzOuVoVhUxWsJ0FNhhM6VUBS43z1sKl1fXaz6+eXjyv6xMBSXF5t3L086a+weHjcVqp+ezpVQFFje0Srfwdc+USz2jzUvzM+WWKyxK3pB74SihFAU2e7mmlNst7VPObe36+JVFdOqJ5VzJxRFqucUaweIy5yi0tXl+gW0Y8fUfKKOUBTZla80rHth/jenqIvFVcOc4tgx3e89TVQRiiLVKw03DSsNu+Jl29Fzim3xEPmcCUWhh8LPy8uMYu07+EPx5/frho9Dx4yp/RN1hKJQ9WDtbuXqx26yjVeLY8Wr+qPVuROKQtVLklcN+ykqd0RerfzosThWTC2L1hKKQsuLoHJOcdewn6Lyc/wyp1g7ZD3WC9yyaC2hKFa5I7JlTlH9Of5y5TLpseYUdmTWEopi1Rud1r6DV68MrP19FofG1HyinlAUq55TrB0gVs8pWgaah8ZUJOoJRbFzOrm5WOYUa4eah8b0fmv/RDWhKHZOJzc/672f4vHRILOaUHRwLic3P2vbXt4eCise9YSigxlPbs42p2iNl0j0IRQdzHhy861c12ejVR9C0cHyaF35zrc86s+2n6Llur4W9k/0IRSdzDanmPG6vpaY+ujRh1B0MtvJzerr+lrmFGtjKhL9CEUnb/nk5pcsM4r1c4p1v8/esmg3QtFJjxum1qp+R14br7Ux3dpo1Y1QdFR9w9Sok5tfU31d34Ot290IRUdv9eTm11Tup1gi8fwSFvoQio6qT27e3bZ838dcx+BfO6ewLNqXUHQ04w1T1Z/zq67rs9GqL6Ho7K2d3EyqruuzNNqXUHQ228nN6uv6Wo7Bp49o5hP9CUVns600LGY7Bp+Gvo++6Kc7oejsLZ3cfK1jL9ve+6Kf7oRigLdycvO1bhq2l38rpr7opz+hGGDGk5uVc4pjHoP3RcRjCMUAM57crJxTtByD/9rQ1/6JMYRigOqTm7c3LRuvTuO6PvsnxhCKQba7ueYUM17X96WY2j8xhlAMUj2nuGm4CbtSy5zi/zE1nxhHKAY59ZOba10dYT/F3v6JYYRikFM+udli+Th06Jxia//EMEIxUPUNU1UnN1sd+sVA9k+MIxQDVQ/mqk5utjrkuj5fRDyWUAx0qic3Wx1yXZ9l0bGEYqDqk5t3DfspKucAh1zXZ1l0LKEYbLYbpma9rs+OzLGEYrDZlkmrVxZajsEvcwrzibGEYrDZTm5WzylaBpp//n2/YSyhGKx6P8V100rDbNf1eZoYTSgGqz652XLD1GzX9TGeUEzgVE5uHsvaY/CMJxQTmPHkZuWcouUYPGMJxQRmPLk523V9jOVvawLLnKJyLtByw9Rs1/UxllBMYrY5xWzX9TGWUExitpOb1df13Vj5OClCMYmZT25WWGYU5hSnw9/UJHrcMLVW9X4KTxWnQygmUn3D1LG/setQLec+GEMoJjLryc0qnihOh1BMpPrk5t1ty/d9zHUMnjGEYiIz3jBVvWv0zn6KkyAUk5nv5OZc1/UxhlBMZraTm9XX9TlJehqEYjIzrjTMdgye/oRiMtUnN2f7YqCFZdL5CcWEZju5Odt1ffT37tcPH583AN/giQKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKI/gE7SXVdY25ypwAAAABJRU5ErkJggg==",desc:"A valid URL. Alternatively, you can provide a state reference to a Matplotlib figure or a packed file.",type:G.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:G.Text},maxWidth:{name:"Max width (px)",type:G.Number,default:"-1",category:ze.Style},maxHeight:{name:"Max height (px)",type:G.Number,default:"-1",category:ze.Style},secondaryTextColor:Un,cssClasses:tt},events:{"wf-click":{desc:"Capture single clicks.",stub:Rx.trim()}},previewField:"caption"}},cy=ke({...Lx,__name:"CoreImage",setup(e){const t=et("rootEl"),n=ne(oe.core),r=ne(oe.evaluatedFields),a=ne(oe.componentId),o=J(()=>{var u;return{cursor:typeof((u=n.getComponentById(a).handlers)==null?void 0:u["wf-click"])<"u"?"pointer":"unset"}}),s=J(()=>{const l=r.maxWidth.value,c=r.maxHeight.value;return{"max-width":l!==-1?`${l}px`:void 0,"max-height":c!==-1?`${c}px`:void 0}});function i(l){const c=Us(l);t.value.dispatchEvent(c)}return(l,c)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:mt(o.value),onClick:i},[W("img",{src:P(r).src.value,alt:P(r).caption.value,draggable:"false",style:mt(s.value)},null,12,Mx),P(r).caption.value||P(r).caption.value===0?(E(),M("div",Nx,Pe(P(r).caption.value),1)):Se("",!0)],4))}}),Ch=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve images directly. For example, \`static/my_image.png\`.

Alternatively, pass a Matplotlib figure via state.

\`state["my_fig"] = fig\` and then setting the _Image_ source to \`@{fig}\`

You can also use packed files or bytes:

\`state["img_b"] = wf.pack_bytes(img_bytes, "image/png")\`

\`state["img_f"] = wf.pack_file(img_file, "image/png")\``)};typeof Ch=="function"&&Ch(cy);const Dx=Ne(cy,[["__scopeId","data-v-88b01ba2"]]),Fx={},jx={class:"LoadingSymbol"};function Bx(e,t){return E(),M("div",jx,t[0]||(t[0]=[W("div",null,null,-1)]))}const uy=Ne(Fx,[["render",Bx],["__scopeId","data-v-5a38f374"]]),Vx={class:"BaseEmptiness"},Ux={class:"content"},Hx={class:"title"},zx={key:0,class:"message"},Kx=ke({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=ne(oe.core),r=J(()=>n.getComponentById(t.componentId)),a=J(()=>n.getComponentDefinition(r.value.type));return(o,s)=>(E(),M("div",Vx,[W("div",Ux,[W("div",Hx,[W("h3",null,"Empty "+Pe(a.value.name),1)]),e.message?(E(),M("div",zx,Pe(e.message),1)):Se("",!0)])]))}}),Hd=Ne(Kx,[["__scopeId","data-v-8c972dbe"]]),Wx={key:0,class:"message"},qx="A component that displays a message in various styles, including success, error, warning, and informational.",Gx={writer:{name:"Message",description:qx,category:"Content",fields:{message:{name:"Message",type:G.Text,desc:"Prefix with '+' for a success message, with '-' for error, '!' for warning, '%' for loading. No prefix for info. Leave empty to hide."},successColor:{name:"Success",default:St.Green3,type:G.Color,category:ze.Style},errorColor:{name:"Error",default:St.Orange2,type:G.Color,category:ze.Style},warningColor:{name:"Warning",default:"#FFE999",type:G.Color,category:ze.Style},infoColor:{name:"Info",default:St.Blue2,type:G.Color,category:ze.Style},loadingColor:{name:"Loading",default:St.Blue2,type:G.Color,category:ze.Style},primaryTextColor:zt,cssClasses:tt},previewField:"name"}},dy=ke({...Gx,__name:"CoreMessage",setup(e){const t=ne(oe.componentId),n=ne(oe.evaluatedFields),r=ne(oe.isBeingEdited),a=J(()=>{const i=n.message.value;if(!i)return"neutral";const l=i.charAt(0);return l=="+"?"success":l=="-"?"error":l=="!"?"warning":l=="%"?"loading":"info"}),o=J(()=>{const i=n.message.value;if(!i)return;const l=i.charAt(0);return l=="+"||l=="-"||l=="!"||l=="%"?i.substring(1).trim():i}),s=J(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[a.value]}));return(i,l)=>o.value||P(r)?(E(),M("div",{key:0,class:it(["CoreMessage",a.value]),style:mt(s.value)},[o.value?(E(),M("div",Wx,[a.value=="loading"?(E(),je(uy,{key:0,class:"loadingSymbol"})):Se("",!0),W("span",null,Pe(o.value),1)])):(E(),je(Hd,{key:1,"component-id":P(t)},null,8,["component-id"]))],6)):Se("",!0)}}),$h=e=>{e.writer&&(e.writer.docs=`When working with operations that can succeed or fail, _Message_ can be useful. You can reserve a state element to be used for the outcome of the operation; empty messages aren't shown, so you can initialise it empty.
Then, assign a message when the operation is completed.

\`\`\`python
state["msg"] = ""

if is_ok:
  state["msg"] = "+It worked!"
else:
  state["msg"] = "-It failed"
\`\`\``)};typeof $h=="function"&&$h(dy);const Jx=Ne(dy,[["__scopeId","data-v-4e7d44c6"]]),Yx={key:0,class:"name"},Qx={key:1,class:"description"},Xx={class:"value"},Zx={key:2,class:"note"},eP="A component that prominently displays a metric value and associated information.",tP={writer:{name:"Metric",description:eP,category:"Content",fields:{name:{name:"Name",init:"Metric",type:G.Text},metricValue:{name:"Value",default:"0",type:G.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:G.Text},note:{name:"Note",init:"+Pass",type:G.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:zt,secondaryTextColor:Un,positiveColor:{name:"Positive",default:St.Green3,type:G.Color,category:ze.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:G.Color,category:ze.Style},negativeColor:{name:"Negative",default:St.Orange2,type:G.Color,category:ze.Style},cssClasses:tt},previewField:"name"}},nP=ke({...tP,__name:"CoreMetric",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>{const o=t.note.value;if(!o)return"neutral";const s=o.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),r=J(()=>{const o=t.note.value;if(!o)return;const s=o.charAt(0);return s=="+"||s=="-"?o.substring(1):o}),a=J(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(o,s)=>(E(),M("div",{class:"CoreMetric",style:mt(a.value)},[P(t).name.value?(E(),M("div",Yx,Pe(P(t).name.value),1)):Se("",!0),P(t).description.value?(E(),M("div",Qx,Pe(P(t).description.value),1)):Se("",!0),W("h2",Xx,Pe(P(t).metricValue.value),1),r.value?(E(),M("div",Zx,Pe(r.value),1)):Se("",!0)],4))}}),rP=Ne(nP,[["__scopeId","data-v-bc5826e1"]]),aP="A component that displays Plotly graphs.",oP={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},sP={writer:{name:"Plotly Graph",description:aP,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(oP,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:G.Object},cssClasses:tt},events:{"plotly-click":{desc:"Sends a list with the clicked points."},"plotly-selected":{desc:"Sends a list with the selected points."},"plotly-deselect":{desc:"Triggered when points are deselected."}}}},fy=ke({...sP,__name:"CorePlotlyGraph",setup(e){const t=et("rootEl"),n=et("chartTargetEl"),r=ne(oe.evaluatedFields),a=J(()=>r.spec.value),o={paper_bgcolor:St.White,plot_bgcolor:St.Gray1,colorway:[St.Blue4,St.Blue4,St.Orange4,St.Green5],font:{family:"Poppins, sans-serif",size:12,color:St.Black},hoverlabel:{color:St.White,bgcolor:St.Black}},s=async()=>{var y,b,v;if(!a.value||!n.value)return;const d=await Jt(()=>import("./plotly.min-DoZqM8NA.js").then(_=>_.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const m={...a.value,layout:{...o,...(y=a.value)==null?void 0:y.layout}};d.newPlot(n.value,m),l(),(v=(b=a.value)==null?void 0:b.layout)!=null&&v.autosize&&i()};function i(){const d=t.value.parentElement;d!=null&&d.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function l(){n.value.on("plotly_click",u("plotly-click")),n.value.on("plotly_selected",u("plotly-selected")),n.value.on("plotly_deselect",u("plotly-deselect"))}function c(d){var m,y;return{curveNumber:d.curveNumber,pointNumber:d.pointNumber,pointNumbers:d.pointNumbers,x:d.x,y:d.y,z:d.z,label:d.label,lat:d.lat,lon:d.lon,xaxis:{anchor:(m=d.xaxis)==null?void 0:m.anchor},yaxis:{anchor:(y=d.yaxis)==null?void 0:y.anchor}}}function u(d){return m=>{var b;const y=new CustomEvent(d,{detail:{payload:(b=m==null?void 0:m.points)==null?void 0:b.map(v=>c(v))}});t.value.dispatchEvent(y)}}return He(a,d=>{d&&s()}),Xt(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(d,m)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[W("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),m[0]||(m[0]=W("div",{class:"mask"},null,-1))],512))}}),Sh=e=>{e.writer&&(e.writer.docs=`You can listen to events triggered by Plotly.js and add interactivity to your charts.
For example, implement cross-filtering.`)};typeof Sh=="function"&&Sh(fy);const iP=Ne(fy,[["__scopeId","data-v-db27aa15"]]),lP=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,cP="A component to display plain text or formatted text using Markdown syntax.",uP={writer:{name:"Text",description:cP,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:G.Text,control:Tl.Textarea},useMarkdown:{...$t,name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no"},alignment:{name:"Alignment",default:"left",type:G.Text,options:{left:"Left",center:"Center",right:"Right"},category:ze.Style},primaryTextColor:zt,cssClasses:tt},events:{"wf-click":{desc:"Capture single clicks.",stub:lP.trim()}},previewField:"text"}},dP=ke({...uP,__name:"CoreText",setup(e){const t=et("rootEl"),n=ne(oe.evaluatedFields),r=ne(oe.componentId),a=ne(oe.core),o=ne(oe.isBeingEdited),s=J(()=>!n.text.value),i=J(()=>!s.value||o.value),l=J(()=>{var y;return{cursor:typeof((y=a.getComponentById(r).handlers)==null?void 0:y["wf-click"])<"u"?"pointer":"unset"}}),c=J(()=>({"text-align":n.alignment.value}));function u(d){const m=Us(d);t.value.dispatchEvent(m)}return(d,m)=>i.value?(E(),M("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:mt(l.value),onClick:u},[s.value?(E(),je(Hd,{key:0,"component-id":P(r)},null,8,["component-id"])):(E(),M(Ve,{key:1},[P(n).useMarkdown.value?(E(),je(Xv,{key:0,"raw-text":P(n).text.value,style:mt(c.value)},null,8,["raw-text","style"])):(E(),M("div",{key:1,class:"plainText",style:mt(c.value)},Pe(P(n).text.value),5))],64))],4)):Se("",!0)}}),fP=Ne(dP,[["__scopeId","data-v-3198f029"]]),py="A component that displays Vega-Lite/Altair charts.",pP={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:py,data:{values:[{a:"A",b:100},{a:"B",b:200},{a:"C",b:150},{a:"D",b:300}]},mark:"bar",encoding:{x:{field:"a",type:"nominal"},y:{field:"b",type:"quantitative"}}},hP={writer:{name:"Vega Lite Chart",description:py,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(pP,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:G.Object},cssClasses:tt}}},hy=ke({...hP,__name:"CoreVegaLiteChart",setup(e){const t=et("rootEl"),n=et("chartTargetEl"),r=ne(oe.evaluatedFields),a=async()=>{if(!r.spec.value||!n.value)return;const{default:o}=await Jt(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await o(n.value,r.spec.value)};return He(()=>r.spec.value,o=>{o&&a()}),Xt(()=>{a(),new ResizeObserver(a).observe(t.value,{box:"border-box"})}),(o,s)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[W("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),Ih=e=>{e.writer&&(e.writer.docs=`Generate a chart using Altair and pass it via state; it'll be converted to Vega-Lite specification.

\`state["my_chart"] = chart\`

Afterwards, you can reference the chart in the specification using the syntax \`@{my_chart}\`.

Alternatively, you can work with Vega-Lite directly.`)};typeof Ih=="function"&&Ih(hy);const mP=Ne(hy,[["__scopeId","data-v-c7c1318d"]]),vP={class:"CoreVideoPlayer"},gP=["src","controls","autoplay","loop","muted"],yP="A video player component that can play various video formats.",_P={writer:{name:"Video Player",description:yP,category:"Content",fields:{src:{name:"Source",desc:"The URL of the video file. Alternatively, you can pass a file via state.",default:"",type:G.Text,validator:ry},controls:{...$t,name:"Controls",desc:"Display video player controls.",default:"yes"},autoplay:{...$t,name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no"},loop:{...$t,name:"Loop",desc:"Loop the video when it reaches the end.",default:"no"},muted:{...$t,name:"Muted",desc:"Mute the video by default.",default:"no"},cssClasses:tt}}},my=ke({..._P,__name:"CoreVideoPlayer",setup(e){const t=ne(oe.evaluatedFields);return(n,r)=>(E(),M("div",vP,[W("video",{src:P(t).src.value,controls:P(t).controls.value,autoplay:P(t).autoplay.value,loop:P(t).loop.value,muted:P(t).muted.value},null,8,gP),r[0]||(r[0]=W("div",{class:"mask"},null,-1))]))}}),Eh=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve videos directly. For example, \`static/my_video.mp4\`.

Alternatively, you can pack bytes or files in state:

\`state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")\`

\`state["vid_f"] = wf.pack_file(vid_file, "video/mp4")\`

Afterwards, you can reference the video using the syntax \`@{vid_f}\`.`)};typeof Eh=="function"&&Eh(my);const bP=Ne(my,[["__scopeId","data-v-80b03e78"]]),wP={class:"CoreLink"},AP=["href","target","rel"],CP={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:G.Text,default:"https://writer.com",desc:"Specify a URL or choose a page. Keep in mind that you can only link to pages for which a key has been specified.",options:e=>Object.fromEntries(e.getComponents("root",{sortedByPosition:!0}).map(t=>t.content.key).filter(t=>!!t).map(t=>[`#${t}`,`Page with key: ${t}`]))},target:{name:"Target",type:G.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:G.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:G.Text,desc:"The text to display in the link."},primaryTextColor:zt,cssClasses:tt}}},$P=ke({...CP,__name:"CoreLink",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>t.text.value||t.url.value);return(r,a)=>(E(),M("div",wP,[W("a",{href:P(t).url.value,target:P(t).target.value,rel:P(t).rel.value},Pe(n.value),9,AP)]))}}),SP=Ne($P,[["__scopeId","data-v-9c5e1448"]]),IP={},EP={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kP(e,t){return E(),M("svg",EP,t[0]||(t[0]=[W("path",{d:"M14.0712 4.50295C14.2882 4.72002 14.2882 5.07197 14.0712 5.28905L10.5337 8.8265C10.3166 9.04357 9.96468 9.04357 9.7476 8.8265C9.53052 8.60942 9.53052 8.25747 9.7476 8.0404L12.892 4.896L9.7476 1.7516C9.53052 1.53452 9.53052 1.18257 9.7476 0.965495C9.96467 0.74842 10.3166 0.74842 10.5337 0.965495L14.0712 4.50295ZM13.6781 5.45185L3.67268 5.45185L3.67268 4.34014L13.6781 4.34014L13.6781 5.45185ZM2.00511 7.11942L2.00511 8.23114L0.893394 8.23114L0.893394 7.11942L2.00511 7.11942ZM3.67268 9.89871L5.52553 9.89871L5.52553 11.0104L3.67268 11.0104L3.67268 9.89871ZM2.00511 8.23114C2.00511 9.15211 2.7517 9.89871 3.67268 9.89871L3.67268 11.0104C2.13772 11.0104 0.893394 9.76609 0.893394 8.23114L2.00511 8.23114ZM3.67268 5.45185C2.7517 5.45185 2.00511 6.19845 2.00511 7.11942L0.893394 7.11942C0.893394 5.58447 2.13772 4.34014 3.67268 4.34014L3.67268 5.45185Z",fill:"currentColor"},null,-1)]))}const TP=Ne(IP,[["render",kP]]),xP={class:"CoreChatbotAvatar"},PP=ke({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(E(),M("div",xP,Pe(e.initials),1))}}),MP=Ne(PP,[["__scopeId","data-v-ce5bb453"]]),NP=["aria-busy"],OP={key:1,class:"CoreChatbotMessage__content__text"},RP={key:2,class:"CoreChatbotMessage__content__actions"},LP=["onClick"],DP={key:0,class:"subheading"},FP={class:"name"},jP={key:1,class:"desc"},BP=ke({__name:"CoreChatbotMessage",props:{initials:{type:String,required:!0},useMarkdown:{type:Boolean,required:!1},message:{type:Object,required:!1,default:void 0},assistantRoleColor:{type:String,required:!1,default:""},isLoading:{type:Boolean,required:!1}},emits:{actionClick:e=>typeof e=="object"&&e!==null},setup(e){const t=Gc(()=>Jt(()=>import("./BaseMarkdown-BIAjb2ks.js"),[],import.meta.url)),n=Gc(()=>Jt(()=>import("./CoreChatbotLoader-UsRmPIx9.js"),__vite__mapDeps([3,4]),import.meta.url)),r=e,a=J(()=>{var c;return((c=r.message)==null?void 0:c.actions)??[]}),o=J(()=>r.isLoading&&!i.value),s=J(()=>{var c;return r.isLoading?"assistant":((c=r.message)==null?void 0:c.role)??""}),i=J(()=>{var c;return((c=r.message)==null?void 0:c.content.trim())??""}),l=J(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return r.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(c,u)=>(E(),M("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[Ge(MP,{initials:e.initials},null,8,["initials"]),W("div",{class:"CoreChatbotMessage__content",style:mt({background:l.value})},[o.value?(E(),je(P(n),{key:0})):(E(),M("div",OP,[e.useMarkdown?(E(),je(P(t),{key:0,"raw-text":i.value},null,8,["raw-text"])):(E(),M(Ve,{key:1},[Dt(Pe(i.value),1)],64))])),a.value.length?(E(),M("div",RP,[(E(!0),M(Ve,null,It(a.value,(d,m)=>(E(),M("button",{key:m,class:"action",onClick:y=>c.$emit("actionClick",d)},[d.subheading?(E(),M("div",DP,Pe(d.subheading),1)):Se("",!0),W("h3",FP,Pe(d.name),1),d.desc?(E(),M("div",jP,Pe(d.desc),1)):Se("",!0)],8,LP))),128))])):Se("",!0)],4)],8,NP))}}),kh=Ne(BP,[["__scopeId","data-v-54e985f1"]]),VP=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],UP=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],HP=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],zP=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Th=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function xh(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?zP:HP:t.binary?UP:VP,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const a=e<0,o=a?"-":t.signed?"+":"";a&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Th(e,t.locale,s);return o+u+r+n[0]}const i=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**i,s||(e=e.toPrecision(3));const l=Th(Number(e),t.locale,s),c=n[i];return o+l+r+c}const KP={class:"filesArea"},WP={key:1,class:"list"},qP=["title"],GP={class:"size"},JP={class:"filesButtons"},YP={key:1,class:"sizeExceededMessage"},QP={class:"inputArea"},XP={class:"inputButtons"},jc=200*1024*1024,ZP="A chatbot component to build human-to-AI interactions.",eM=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,tM=`
def handle_message_simple(payload, state):

	# payload contains a dict in the form { "role": "user", "message": "hello"}

	state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "Hello human" if payload == "Hello" else "I don't understand"
    }]

    # Handle streaming by appending to the last message

    import time
    for i in range(10):
        conv = state["conversation"]
        conv[-1]["content"] += f" {i}"
        state["conversation"] = conv
        time.sleep(0.5)
`.trim(),nM=`
def handle_action_simple(payload, state):

    # payload contains the "data" property of the action

    if payload == "change_title":
        state["app_background_color"] = "red"

# Make an action available when adding a message

def handle_message_with_action(payload, state):
    state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "I don't know, but check this out.",
        "actions": [{
            "subheading": "Resource",
            "name": "Surprise",
            "desc": "Click to be surprised",
            "data": "change_title"
        }]
    }]
`.trim(),rM=`
def handle_file_upload(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
        name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)
`.trim(),aM={writer:{name:"Chatbot",description:ZP,category:"Content",fields:{conversation:{name:"Conversation",init:eM,desc:"An array with messages or a writer.ai.Conversation object.",type:G.Object,validator:BT},assistantInitials:{name:"Assistant initials",default:"AI",type:G.Text},userInitials:{name:"User initials",default:"YOU",type:G.Text},useMarkdown:{...$t,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},enableFileUpload:{name:"Enable file upload",default:"no",type:G.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:G.Text},assistantRoleColor:{name:"Assistant role",type:G.Color,category:ze.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:St.Gray1,type:G.Color,category:ze.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:St.Gray6,type:G.Color,category:ze.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:St.White,type:G.Color,category:ze.Style,applyStyleVariable:!0},accentColor:Zt,containerBackgroundColor:kr,primaryTextColor:zt,secondaryTextColor:Un,separatorColor:en,buttonColor:{...Tr,default:St.Black},buttonTextColor:{...xr,default:St.White},cssClasses:tt},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:tM},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:nM},"wf-file-change":{desc:"Triggered when files are uploaded",stub:rM}}}},vy=ke({...aM,__name:"CoreChatbot",setup(e){const t=et("rootEl"),n=et("messageAreaEl"),r=et("messagesEl"),a=$e(void 0),o=ne(oe.evaluatedFields),s=hr([]),i=$e(!1);let l;const c=J(()=>{var p;return((p=o.conversation)==null?void 0:p.value)??[]}),u=$e(""),d=J(()=>{let p=0;return Array.from(s.value).forEach(w=>{p+=w.size}),p>=jc}),m=J(()=>a.value===void 0?!1:a.value>=c.value.length);function y(){if(a.value)return;a.value=c.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:u.value},callback:()=>{a.value=void 0}}});t.value.dispatchEvent(p),u.value=""}function b(p){const{data:w}=p,S=new CustomEvent("wf-chatbot-action-click",{detail:{payload:w}});t.value.dispatchEvent(S)}function v(){const p=document.createElement("input");p.type="file",o.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let w;o.enableFileUpload.value=="multiple"?w=[...s.value]:w=[],Array.from(p.files).forEach(S=>{w.push(S)}),s.value=w}),p.dispatchEvent(new MouseEvent("click"))}function _(p){const w=s.value.toSpliced(p,1);s.value=w}function A(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const $=async p=>{const w=new FileReader;return w.readAsDataURL(p),new Promise((S,F)=>{w.onload=()=>S(w.result),w.onerror=()=>F(w.error)})};async function g(){if(s.value.length==0||i.value)return;i.value=!0;const w=await(async()=>{let F=0;const Z=Promise.all(Array.from(s.value).map(async re=>(F+=re.size,{name:re.name,type:re.type,data:await $(re)})));if(F>jc){alert("Size limit exceeded.");return}return Z})();if(!w){i.value=!1;return}const S=new CustomEvent("wf-file-change",{detail:{payload:w,callback:()=>{i.value=!1,s.value=[]}}});t.value.dispatchEvent(S)}return Xt(()=>{l=new ResizeObserver(()=>{A()}),l.observe(r.value)}),wa(()=>{l.unobserve(r.value)}),(p,w)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[W("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[W("div",{ref_key:"messagesEl",ref:r,class:"messages"},[(E(!0),M(Ve,null,It(c.value,(S,F)=>(E(),je(kh,{key:F,message:S,"use-markdown":P(o).useMarkdown.value,"assistant-role-color":P(o).assistantRoleColor.value,initials:S.role==="assistant"?P(o).assistantInitials.value:P(o).userInitials.value,onActionClick:w[0]||(w[0]=Z=>b(Z))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),m.value?(E(),je(kh,{key:0,"is-loading":"",initials:P(o).assistantInitials.value},null,8,["initials"])):Se("",!0)],512)],512),s.value.length>0?(E(),M(Ve,{key:0},[W("div",KP,[i.value?(E(),M(Ve,{key:0},[Dt(" Uploading... ")],64)):Se("",!0),i.value?Se("",!0):(E(),M("div",WP,[(E(!0),M(Ve,null,It(s.value,(S,F)=>(E(),M("div",{key:F,class:"file"},[W("div",null,[W("div",{class:"name",title:S.name},Pe(S.name),9,qP),W("div",GP,Pe(P(xh)(S.size)),1)]),Ge(ur,{onClick:Z=>_(F)},{default:Ze(()=>w[2]||(w[2]=[W("i",{class:"material-symbols-outlined"}," delete ",-1)])),_:2},1032,["onClick"])]))),128))]))]),W("div",JP,[!d.value&&!i.value?(E(),je(ur,{key:0,title:"Upload",onClick:g},{default:Ze(()=>w[3]||(w[3]=[W("i",{class:"material-symbols-outlined"},"upload",-1)])),_:1})):Se("",!0),d.value?(E(),M("div",YP,[w[4]||(w[4]=W("i",{class:"material-symbols-outlined"},"warning",-1)),Dt(" Size limit of "+Pe(P(xh)(jc))+" exceeded. ",1)])):Se("",!0)])],64)):Se("",!0),W("div",QP,[Ge(Zv,{modelValue:u.value,"onUpdate:modelValue":w[1]||(w[1]=S=>u.value=S),placeholder:P(o).placeholder.value,onKeydown:ga(Cr(y,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),W("div",XP,[Ge(ur,{class:"send action",title:"Send message",onClick:y},{default:Ze(()=>[Ge(TP)]),_:1}),P(o).enableFileUpload.value!="no"?(E(),je(ur,{key:0,class:"action",title:"Attach files",onClick:v},{default:Ze(()=>w[5]||(w[5]=[W("i",{class:"material-symbols-outlined"},"attach_file",-1)])),_:1})):Se("",!0)])],512))}}),Ph=e=>{e.writer&&(e.writer.docs="Connect it to an LLM by handling the `wf-chatbot-message` event, which is triggered every time the user sends a message.\n\nYou can add `actions` to messages, which are buttons that trigger the `wf-chatbot-action-click`.\n\nSee the stubs for more details.")};typeof Ph=="function"&&Ph(vy);const oM=Ne(vy,[["__scopeId","data-v-1ebecb4f"]]);var gy={exports:{}};/**
 * chroma.js - JavaScript library for color conversions
 *
 * Copyright (c) 2011-2019, Gregor Aisch
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name Gregor Aisch may not be used to endorse or promote products
 * derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * -------------------------------------------------------
 *
 * chroma.js includes colors from colorbrewer2.org, which are released under
 * the following license:
 *
 * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
 * and The Pennsylvania State University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * ------------------------------------------------------
 *
 * Named colors are taken from X11 Color Names.
 * http://www.w3.org/TR/css3-color/#svg-color
 *
 * @preserve
 */(function(e,t){(function(n,r){e.exports=r()})(U$,function(){for(var n=function(f,h,C){return h===void 0&&(h=0),C===void 0&&(C=1),f<h?h:f>C?C:f},r=n,a=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var h=0;h<=3;h++)h<3?((f[h]<0||f[h]>255)&&(f._clipped=!0),f[h]=r(f[h],0,255)):h===3&&(f[h]=r(f[h],0,1));return f},o={},s=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<i.length;s+=1){var l=i[s];o["[object "+l+"]"]=l.toLowerCase()}var c=function(f){return o[Object.prototype.toString.call(f)]||"object"},u=c,d=function(f,h){return h===void 0&&(h=null),f.length>=3?Array.prototype.slice.call(f):u(f[0])=="object"&&h?h.split("").filter(function(C){return f[0][C]!==void 0}).map(function(C){return f[0][C]}):f[0]},m=c,y=function(f){if(f.length<2)return null;var h=f.length-1;return m(f[h])=="string"?f[h].toLowerCase():null},b=Math.PI,v={clip_rgb:a,limit:n,type:c,unpack:d,last:y,PI:b,TWOPI:b*2,PITHIRD:b/3,DEG2RAD:b/180,RAD2DEG:180/b},_={format:{},autodetect:[]},A=v.last,$=v.clip_rgb,g=v.type,p=_,w=function(){for(var h=[],C=arguments.length;C--;)h[C]=arguments[C];var T=this;if(g(h[0])==="object"&&h[0].constructor&&h[0].constructor===this.constructor)return h[0];var L=A(h),H=!1;if(!L){H=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(Ce,Fe){return Fe.p-Ce.p}),p.sorted=!0);for(var N=0,te=p.autodetect;N<te.length;N+=1){var se=te[N];if(L=se.test.apply(se,h),L)break}}if(p.format[L]){var ye=p.format[L].apply(null,H?h:h.slice(0,-1));T._rgb=$(ye)}else throw new Error("unknown format: "+h);T._rgb.length===3&&T._rgb.push(1)};w.prototype.toString=function(){return g(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var S=w,F=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(F.Color,[null].concat(f)))};F.Color=S,F.version="2.4.2";var Z=F,re=v.unpack,ce=Math.max,Oe=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=re(f,"rgb"),T=C[0],L=C[1],H=C[2];T=T/255,L=L/255,H=H/255;var N=1-ce(T,ce(L,H)),te=N<1?1/(1-N):0,se=(1-T-N)*te,ye=(1-L-N)*te,Ce=(1-H-N)*te;return[se,ye,Ce,N]},ge=Oe,we=v.unpack,_e=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=we(f,"cmyk");var C=f[0],T=f[1],L=f[2],H=f[3],N=f.length>4?f[4]:1;return H===1?[0,0,0,N]:[C>=1?0:255*(1-C)*(1-H),T>=1?0:255*(1-T)*(1-H),L>=1?0:255*(1-L)*(1-H),N]},Ke=_e,Ee=Z,Ae=S,be=_,ve=v.unpack,me=v.type,O=ge;Ae.prototype.cmyk=function(){return O(this._rgb)},Ee.cmyk=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Ae,[null].concat(f,["cmyk"])))},be.format.cmyk=Ke,be.autodetect.push({p:2,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=ve(f,"cmyk"),me(f)==="array"&&f.length===4)return"cmyk"}});var fe=v.unpack,q=v.last,I=function(f){return Math.round(f*100)/100},R=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=fe(f,"hsla"),T=q(f)||"lsa";return C[0]=I(C[0]||0),C[1]=I(C[1]*100)+"%",C[2]=I(C[2]*100)+"%",T==="hsla"||C.length>3&&C[3]<1?(C[3]=C.length>3?C[3]:1,T="hsla"):C.length=3,T+"("+C.join(",")+")"},pe=R,Le=v.unpack,B=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=Le(f,"rgba");var C=f[0],T=f[1],L=f[2];C/=255,T/=255,L/=255;var H=Math.min(C,T,L),N=Math.max(C,T,L),te=(N+H)/2,se,ye;return N===H?(se=0,ye=Number.NaN):se=te<.5?(N-H)/(N+H):(N-H)/(2-N-H),C==N?ye=(T-L)/(N-H):T==N?ye=2+(L-C)/(N-H):L==N&&(ye=4+(C-T)/(N-H)),ye*=60,ye<0&&(ye+=360),f.length>3&&f[3]!==void 0?[ye,se,te,f[3]]:[ye,se,te]},ee=B,X=v.unpack,ie=v.last,Ie=pe,k=ee,x=Math.round,le=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=X(f,"rgba"),T=ie(f)||"rgb";return T.substr(0,3)=="hsl"?Ie(k(C),T):(C[0]=x(C[0]),C[1]=x(C[1]),C[2]=x(C[2]),(T==="rgba"||C.length>3&&C[3]<1)&&(C[3]=C.length>3?C[3]:1,T="rgba"),T+"("+C.slice(0,T==="rgb"?3:4).join(",")+")")},j=le,V=v.unpack,K=Math.round,ue=function(){for(var f,h=[],C=arguments.length;C--;)h[C]=arguments[C];h=V(h,"hsl");var T=h[0],L=h[1],H=h[2],N,te,se;if(L===0)N=te=se=H*255;else{var ye=[0,0,0],Ce=[0,0,0],Fe=H<.5?H*(1+L):H+L-H*L,xe=2*H-Fe,qe=T/360;ye[0]=qe+1/3,ye[1]=qe,ye[2]=qe-1/3;for(var We=0;We<3;We++)ye[We]<0&&(ye[We]+=1),ye[We]>1&&(ye[We]-=1),6*ye[We]<1?Ce[We]=xe+(Fe-xe)*6*ye[We]:2*ye[We]<1?Ce[We]=Fe:3*ye[We]<2?Ce[We]=xe+(Fe-xe)*(2/3-ye[We])*6:Ce[We]=xe;f=[K(Ce[0]*255),K(Ce[1]*255),K(Ce[2]*255)],N=f[0],te=f[1],se=f[2]}return h.length>3?[N,te,se,h[3]]:[N,te,se,1]},U=ue,z=U,ae=_,D=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Q=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,de=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,he=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Te=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,De=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Be=Math.round,st=function(f){f=f.toLowerCase().trim();var h;if(ae.format.named)try{return ae.format.named(f)}catch{}if(h=f.match(D)){for(var C=h.slice(1,4),T=0;T<3;T++)C[T]=+C[T];return C[3]=1,C}if(h=f.match(Q)){for(var L=h.slice(1,5),H=0;H<4;H++)L[H]=+L[H];return L}if(h=f.match(de)){for(var N=h.slice(1,4),te=0;te<3;te++)N[te]=Be(N[te]*2.55);return N[3]=1,N}if(h=f.match(he)){for(var se=h.slice(1,5),ye=0;ye<3;ye++)se[ye]=Be(se[ye]*2.55);return se[3]=+se[3],se}if(h=f.match(Te)){var Ce=h.slice(1,4);Ce[1]*=.01,Ce[2]*=.01;var Fe=z(Ce);return Fe[3]=1,Fe}if(h=f.match(De)){var xe=h.slice(1,4);xe[1]*=.01,xe[2]*=.01;var qe=z(xe);return qe[3]=+h[4],qe}};st.test=function(f){return D.test(f)||Q.test(f)||de.test(f)||he.test(f)||Te.test(f)||De.test(f)};var rt=st,ct=Z,wt=S,Nt=_,Kt=v.type,Pt=j,$n=rt;wt.prototype.css=function(f){return Pt(this._rgb,f)},ct.css=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(wt,[null].concat(f,["css"])))},Nt.format.css=$n,Nt.autodetect.push({p:5,test:function(f){for(var h=[],C=arguments.length-1;C-- >0;)h[C]=arguments[C+1];if(!h.length&&Kt(f)==="string"&&$n.test(f))return"css"}});var Ca=S,qt=Z,Gr=_,jl=v.unpack;Gr.format.gl=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=jl(f,"rgba");return C[0]*=255,C[1]*=255,C[2]*=255,C},qt.gl=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Ca,[null].concat(f,["gl"])))},Ca.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var zs=v.unpack,Bo=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=zs(f,"rgb"),T=C[0],L=C[1],H=C[2],N=Math.min(T,L,H),te=Math.max(T,L,H),se=te-N,ye=se*100/255,Ce=N/(255-se)*100,Fe;return se===0?Fe=Number.NaN:(T===te&&(Fe=(L-H)/se),L===te&&(Fe=2+(H-T)/se),H===te&&(Fe=4+(T-L)/se),Fe*=60,Fe<0&&(Fe+=360)),[Fe,ye,Ce]},Ks=Bo,Ws=v.unpack,Bl=Math.floor,qs=function(){for(var f,h,C,T,L,H,N=[],te=arguments.length;te--;)N[te]=arguments[te];N=Ws(N,"hcg");var se=N[0],ye=N[1],Ce=N[2],Fe,xe,qe;Ce=Ce*255;var We=ye*255;if(ye===0)Fe=xe=qe=Ce;else{se===360&&(se=0),se>360&&(se-=360),se<0&&(se+=360),se/=60;var ut=Bl(se),gt=se-ut,At=Ce*(1-ye),Et=At+We*(1-gt),fn=At+We*gt,un=At+We;switch(ut){case 0:f=[un,fn,At],Fe=f[0],xe=f[1],qe=f[2];break;case 1:h=[Et,un,At],Fe=h[0],xe=h[1],qe=h[2];break;case 2:C=[At,un,fn],Fe=C[0],xe=C[1],qe=C[2];break;case 3:T=[At,Et,un],Fe=T[0],xe=T[1],qe=T[2];break;case 4:L=[fn,At,un],Fe=L[0],xe=L[1],qe=L[2];break;case 5:H=[un,At,Et],Fe=H[0],xe=H[1],qe=H[2];break}}return[Fe,xe,qe,N.length>3?N[3]:1]},Gs=qs,Vl=v.unpack,Pr=v.type,Vo=Z,Uo=S,Ho=_,Ul=Ks;Uo.prototype.hcg=function(){return Ul(this._rgb)},Vo.hcg=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Uo,[null].concat(f,["hcg"])))},Ho.format.hcg=Gs,Ho.autodetect.push({p:1,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=Vl(f,"hcg"),Pr(f)==="array"&&f.length===3)return"hcg"}});var Js=v.unpack,rr=v.last,$a=Math.round,Ys=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=Js(f,"rgba"),T=C[0],L=C[1],H=C[2],N=C[3],te=rr(f)||"auto";N===void 0&&(N=1),te==="auto"&&(te=N<1?"rgba":"rgb"),T=$a(T),L=$a(L),H=$a(H);var se=T<<16|L<<8|H,ye="000000"+se.toString(16);ye=ye.substr(ye.length-6);var Ce="0"+$a(N*255).toString(16);switch(Ce=Ce.substr(Ce.length-2),te.toLowerCase()){case"rgba":return"#"+ye+Ce;case"argb":return"#"+Ce+ye;default:return"#"+ye}},zo=Ys,Qs=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Hl=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Qe=function(f){if(f.match(Qs)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var h=parseInt(f,16),C=h>>16,T=h>>8&255,L=h&255;return[C,T,L,1]}if(f.match(Hl)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var H=parseInt(f,16),N=H>>24&255,te=H>>16&255,se=H>>8&255,ye=Math.round((H&255)/255*100)/100;return[N,te,se,ye]}throw new Error("unknown hex color: "+f)},Y=Qe,Re=Z,Je=S,Ot=v.type,tn=_,ln=zo;Je.prototype.hex=function(f){return ln(this._rgb,f)},Re.hex=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Je,[null].concat(f,["hex"])))},tn.format.hex=Y,tn.autodetect.push({p:4,test:function(f){for(var h=[],C=arguments.length-1;C-- >0;)h[C]=arguments[C+1];if(!h.length&&Ot(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var gn=v.unpack,yr=v.TWOPI,Sa=Math.min,yn=Math.sqrt,Xs=Math.acos,Zs=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=gn(f,"rgb"),T=C[0],L=C[1],H=C[2];T/=255,L/=255,H/=255;var N,te=Sa(T,L,H),se=(T+L+H)/3,ye=se>0?1-te/se:0;return ye===0?N=NaN:(N=(T-L+(T-H))/2,N/=yn((T-L)*(T-L)+(T-H)*(L-H)),N=Xs(N),H>L&&(N=yr-N),N/=yr),[N*360,ye,se]},Vy=Zs,Uy=v.unpack,zl=v.limit,qa=v.TWOPI,Kl=v.PITHIRD,Ga=Math.cos,Hy=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=Uy(f,"hsi");var C=f[0],T=f[1],L=f[2],H,N,te;return isNaN(C)&&(C=0),isNaN(T)&&(T=0),C>360&&(C-=360),C<0&&(C+=360),C/=360,C<1/3?(te=(1-T)/3,H=(1+T*Ga(qa*C)/Ga(Kl-qa*C))/3,N=1-(te+H)):C<2/3?(C-=1/3,H=(1-T)/3,N=(1+T*Ga(qa*C)/Ga(Kl-qa*C))/3,te=1-(H+N)):(C-=2/3,N=(1-T)/3,te=(1+T*Ga(qa*C)/Ga(Kl-qa*C))/3,H=1-(N+te)),H=zl(L*H*3),N=zl(L*N*3),te=zl(L*te*3),[H*255,N*255,te*255,f.length>3?f[3]:1]},zy=Hy,Ky=v.unpack,Wy=v.type,qy=Z,Qd=S,Xd=_,Gy=Vy;Qd.prototype.hsi=function(){return Gy(this._rgb)},qy.hsi=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Qd,[null].concat(f,["hsi"])))},Xd.format.hsi=zy,Xd.autodetect.push({p:2,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=Ky(f,"hsi"),Wy(f)==="array"&&f.length===3)return"hsi"}});var Jy=v.unpack,Yy=v.type,Qy=Z,Zd=S,ef=_,Xy=ee;Zd.prototype.hsl=function(){return Xy(this._rgb)},Qy.hsl=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Zd,[null].concat(f,["hsl"])))},ef.format.hsl=U,ef.autodetect.push({p:2,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=Jy(f,"hsl"),Yy(f)==="array"&&f.length===3)return"hsl"}});var Zy=v.unpack,e_=Math.min,t_=Math.max,n_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=Zy(f,"rgb");var C=f[0],T=f[1],L=f[2],H=e_(C,T,L),N=t_(C,T,L),te=N-H,se,ye,Ce;return Ce=N/255,N===0?(se=Number.NaN,ye=0):(ye=te/N,C===N&&(se=(T-L)/te),T===N&&(se=2+(L-C)/te),L===N&&(se=4+(C-T)/te),se*=60,se<0&&(se+=360)),[se,ye,Ce]},r_=n_,a_=v.unpack,o_=Math.floor,s_=function(){for(var f,h,C,T,L,H,N=[],te=arguments.length;te--;)N[te]=arguments[te];N=a_(N,"hsv");var se=N[0],ye=N[1],Ce=N[2],Fe,xe,qe;if(Ce*=255,ye===0)Fe=xe=qe=Ce;else{se===360&&(se=0),se>360&&(se-=360),se<0&&(se+=360),se/=60;var We=o_(se),ut=se-We,gt=Ce*(1-ye),At=Ce*(1-ye*ut),Et=Ce*(1-ye*(1-ut));switch(We){case 0:f=[Ce,Et,gt],Fe=f[0],xe=f[1],qe=f[2];break;case 1:h=[At,Ce,gt],Fe=h[0],xe=h[1],qe=h[2];break;case 2:C=[gt,Ce,Et],Fe=C[0],xe=C[1],qe=C[2];break;case 3:T=[gt,At,Ce],Fe=T[0],xe=T[1],qe=T[2];break;case 4:L=[Et,gt,Ce],Fe=L[0],xe=L[1],qe=L[2];break;case 5:H=[Ce,gt,At],Fe=H[0],xe=H[1],qe=H[2];break}}return[Fe,xe,qe,N.length>3?N[3]:1]},i_=s_,l_=v.unpack,c_=v.type,u_=Z,tf=S,nf=_,d_=r_;tf.prototype.hsv=function(){return d_(this._rgb)},u_.hsv=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(tf,[null].concat(f,["hsv"])))},nf.format.hsv=i_,nf.autodetect.push({p:2,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=l_(f,"hsv"),c_(f)==="array"&&f.length===3)return"hsv"}});var ei={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ja=ei,f_=v.unpack,rf=Math.pow,p_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=f_(f,"rgb"),T=C[0],L=C[1],H=C[2],N=h_(T,L,H),te=N[0],se=N[1],ye=N[2],Ce=116*se-16;return[Ce<0?0:Ce,500*(te-se),200*(se-ye)]},Wl=function(f){return(f/=255)<=.04045?f/12.92:rf((f+.055)/1.055,2.4)},ql=function(f){return f>Ja.t3?rf(f,1/3):f/Ja.t2+Ja.t0},h_=function(f,h,C){f=Wl(f),h=Wl(h),C=Wl(C);var T=ql((.4124564*f+.3575761*h+.1804375*C)/Ja.Xn),L=ql((.2126729*f+.7151522*h+.072175*C)/Ja.Yn),H=ql((.0193339*f+.119192*h+.9503041*C)/Ja.Zn);return[T,L,H]},af=p_,Ya=ei,m_=v.unpack,v_=Math.pow,g_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=m_(f,"lab");var C=f[0],T=f[1],L=f[2],H,N,te,se,ye,Ce;return N=(C+16)/116,H=isNaN(T)?N:N+T/500,te=isNaN(L)?N:N-L/200,N=Ya.Yn*Jl(N),H=Ya.Xn*Jl(H),te=Ya.Zn*Jl(te),se=Gl(3.2404542*H-1.5371385*N-.4985314*te),ye=Gl(-.969266*H+1.8760108*N+.041556*te),Ce=Gl(.0556434*H-.2040259*N+1.0572252*te),[se,ye,Ce,f.length>3?f[3]:1]},Gl=function(f){return 255*(f<=.00304?12.92*f:1.055*v_(f,1/2.4)-.055)},Jl=function(f){return f>Ya.t1?f*f*f:Ya.t2*(f-Ya.t0)},of=g_,y_=v.unpack,__=v.type,b_=Z,sf=S,lf=_,w_=af;sf.prototype.lab=function(){return w_(this._rgb)},b_.lab=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(sf,[null].concat(f,["lab"])))},lf.format.lab=of,lf.autodetect.push({p:2,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=y_(f,"lab"),__(f)==="array"&&f.length===3)return"lab"}});var A_=v.unpack,C_=v.RAD2DEG,$_=Math.sqrt,S_=Math.atan2,I_=Math.round,E_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=A_(f,"lab"),T=C[0],L=C[1],H=C[2],N=$_(L*L+H*H),te=(S_(H,L)*C_+360)%360;return I_(N*1e4)===0&&(te=Number.NaN),[T,N,te]},cf=E_,k_=v.unpack,T_=af,x_=cf,P_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=k_(f,"rgb"),T=C[0],L=C[1],H=C[2],N=T_(T,L,H),te=N[0],se=N[1],ye=N[2];return x_(te,se,ye)},M_=P_,N_=v.unpack,O_=v.DEG2RAD,R_=Math.sin,L_=Math.cos,D_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=N_(f,"lch"),T=C[0],L=C[1],H=C[2];return isNaN(H)&&(H=0),H=H*O_,[T,L_(H)*L,R_(H)*L]},uf=D_,F_=v.unpack,j_=uf,B_=of,V_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=F_(f,"lch");var C=f[0],T=f[1],L=f[2],H=j_(C,T,L),N=H[0],te=H[1],se=H[2],ye=B_(N,te,se),Ce=ye[0],Fe=ye[1],xe=ye[2];return[Ce,Fe,xe,f.length>3?f[3]:1]},df=V_,U_=v.unpack,H_=df,z_=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=U_(f,"hcl").reverse();return H_.apply(void 0,C)},K_=z_,W_=v.unpack,q_=v.type,ff=Z,ti=S,Yl=_,pf=M_;ti.prototype.lch=function(){return pf(this._rgb)},ti.prototype.hcl=function(){return pf(this._rgb).reverse()},ff.lch=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(ti,[null].concat(f,["lch"])))},ff.hcl=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(ti,[null].concat(f,["hcl"])))},Yl.format.lch=df,Yl.format.hcl=K_,["lch","hcl"].forEach(function(f){return Yl.autodetect.push({p:2,test:function(){for(var h=[],C=arguments.length;C--;)h[C]=arguments[C];if(h=W_(h,f),q_(h)==="array"&&h.length===3)return f}})});var G_={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},hf=G_,J_=S,mf=_,Y_=v.type,Ko=hf,Q_=Y,X_=zo;J_.prototype.name=function(){for(var f=X_(this._rgb,"rgb"),h=0,C=Object.keys(Ko);h<C.length;h+=1){var T=C[h];if(Ko[T]===f)return T.toLowerCase()}return f},mf.format.named=function(f){if(f=f.toLowerCase(),Ko[f])return Q_(Ko[f]);throw new Error("unknown color name: "+f)},mf.autodetect.push({p:5,test:function(f){for(var h=[],C=arguments.length-1;C-- >0;)h[C]=arguments[C+1];if(!h.length&&Y_(f)==="string"&&Ko[f.toLowerCase()])return"named"}});var Z_=v.unpack,eb=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=Z_(f,"rgb"),T=C[0],L=C[1],H=C[2];return(T<<16)+(L<<8)+H},tb=eb,nb=v.type,rb=function(f){if(nb(f)=="number"&&f>=0&&f<=16777215){var h=f>>16,C=f>>8&255,T=f&255;return[h,C,T,1]}throw new Error("unknown num color: "+f)},ab=rb,ob=Z,vf=S,gf=_,sb=v.type,ib=tb;vf.prototype.num=function(){return ib(this._rgb)},ob.num=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(vf,[null].concat(f,["num"])))},gf.format.num=ab,gf.autodetect.push({p:5,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f.length===1&&sb(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var lb=Z,Ql=S,yf=_,_f=v.unpack,bf=v.type,wf=Math.round;Ql.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(wf)},Ql.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(h,C){return C<3?f===!1?h:wf(h):h})},lb.rgb=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Ql,[null].concat(f,["rgb"])))},yf.format.rgb=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=_f(f,"rgba");return C[3]===void 0&&(C[3]=1),C},yf.autodetect.push({p:3,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=_f(f,"rgba"),bf(f)==="array"&&(f.length===3||f.length===4&&bf(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var ni=Math.log,cb=function(f){var h=f/100,C,T,L;return h<66?(C=255,T=h<6?0:-155.25485562709179-.44596950469579133*(T=h-2)+104.49216199393888*ni(T),L=h<20?0:-254.76935184120902+.8274096064007395*(L=h-10)+115.67994401066147*ni(L)):(C=351.97690566805693+.114206453784165*(C=h-55)-40.25366309332127*ni(C),T=325.4494125711974+.07943456536662342*(T=h-50)-28.0852963507957*ni(T),L=255),[C,T,L,1]},Af=cb,ub=Af,db=v.unpack,fb=Math.round,pb=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];for(var C=db(f,"rgb"),T=C[0],L=C[2],H=1e3,N=4e4,te=.4,se;N-H>te;){se=(N+H)*.5;var ye=ub(se);ye[2]/ye[0]>=L/T?N=se:H=se}return fb(se)},hb=pb,Xl=Z,ri=S,Zl=_,mb=hb;ri.prototype.temp=ri.prototype.kelvin=ri.prototype.temperature=function(){return mb(this._rgb)},Xl.temp=Xl.kelvin=Xl.temperature=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(ri,[null].concat(f,["temp"])))},Zl.format.temp=Zl.format.kelvin=Zl.format.temperature=Af;var vb=v.unpack,ec=Math.cbrt,gb=Math.pow,yb=Math.sign,_b=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=vb(f,"rgb"),T=C[0],L=C[1],H=C[2],N=[tc(T/255),tc(L/255),tc(H/255)],te=N[0],se=N[1],ye=N[2],Ce=ec(.4122214708*te+.5363325363*se+.0514459929*ye),Fe=ec(.2119034982*te+.6806995451*se+.1073969566*ye),xe=ec(.0883024619*te+.2817188376*se+.6299787005*ye);return[.2104542553*Ce+.793617785*Fe-.0040720468*xe,1.9779984951*Ce-2.428592205*Fe+.4505937099*xe,.0259040371*Ce+.7827717662*Fe-.808675766*xe]},Cf=_b;function tc(f){var h=Math.abs(f);return h<.04045?f/12.92:(yb(f)||1)*gb((h+.055)/1.055,2.4)}var bb=v.unpack,ai=Math.pow,wb=Math.sign,Ab=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=bb(f,"lab");var C=f[0],T=f[1],L=f[2],H=ai(C+.3963377774*T+.2158037573*L,3),N=ai(C-.1055613458*T-.0638541728*L,3),te=ai(C-.0894841775*T-1.291485548*L,3);return[255*nc(4.0767416621*H-3.3077115913*N+.2309699292*te),255*nc(-1.2684380046*H+2.6097574011*N-.3413193965*te),255*nc(-.0041960863*H-.7034186147*N+1.707614701*te),f.length>3?f[3]:1]},$f=Ab;function nc(f){var h=Math.abs(f);return h>.0031308?(wb(f)||1)*(1.055*ai(h,1/2.4)-.055):f*12.92}var Cb=v.unpack,$b=v.type,Sb=Z,Sf=S,If=_,Ib=Cf;Sf.prototype.oklab=function(){return Ib(this._rgb)},Sb.oklab=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Sf,[null].concat(f,["oklab"])))},If.format.oklab=$f,If.autodetect.push({p:3,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=Cb(f,"oklab"),$b(f)==="array"&&f.length===3)return"oklab"}});var Eb=v.unpack,kb=Cf,Tb=cf,xb=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];var C=Eb(f,"rgb"),T=C[0],L=C[1],H=C[2],N=kb(T,L,H),te=N[0],se=N[1],ye=N[2];return Tb(te,se,ye)},Pb=xb,Mb=v.unpack,Nb=uf,Ob=$f,Rb=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];f=Mb(f,"lch");var C=f[0],T=f[1],L=f[2],H=Nb(C,T,L),N=H[0],te=H[1],se=H[2],ye=Ob(N,te,se),Ce=ye[0],Fe=ye[1],xe=ye[2];return[Ce,Fe,xe,f.length>3?f[3]:1]},Lb=Rb,Db=v.unpack,Fb=v.type,jb=Z,Ef=S,kf=_,Bb=Pb;Ef.prototype.oklch=function(){return Bb(this._rgb)},jb.oklch=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];return new(Function.prototype.bind.apply(Ef,[null].concat(f,["oklch"])))},kf.format.oklch=Lb,kf.autodetect.push({p:3,test:function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];if(f=Db(f,"oklch"),Fb(f)==="array"&&f.length===3)return"oklch"}});var Tf=S,Vb=v.type;Tf.prototype.alpha=function(f,h){return h===void 0&&(h=!1),f!==void 0&&Vb(f)==="number"?h?(this._rgb[3]=f,this):new Tf([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]};var Ub=S;Ub.prototype.clipped=function(){return this._rgb._clipped||!1};var Ia=S,Hb=ei;Ia.prototype.darken=function(f){f===void 0&&(f=1);var h=this,C=h.lab();return C[0]-=Hb.Kn*f,new Ia(C,"lab").alpha(h.alpha(),!0)},Ia.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},Ia.prototype.darker=Ia.prototype.darken,Ia.prototype.brighter=Ia.prototype.brighten;var zb=S;zb.prototype.get=function(f){var h=f.split("."),C=h[0],T=h[1],L=this[C]();if(T){var H=C.indexOf(T)-(C.substr(0,2)==="ok"?2:0);if(H>-1)return L[H];throw new Error("unknown channel "+T+" in mode "+C)}else return L};var Qa=S,Kb=v.type,Wb=Math.pow,qb=1e-7,Gb=20;Qa.prototype.luminance=function(f){if(f!==void 0&&Kb(f)==="number"){if(f===0)return new Qa([0,0,0,this._rgb[3]],"rgb");if(f===1)return new Qa([255,255,255,this._rgb[3]],"rgb");var h=this.luminance(),C="rgb",T=Gb,L=function(N,te){var se=N.interpolate(te,.5,C),ye=se.luminance();return Math.abs(f-ye)<qb||!T--?se:ye>f?L(N,se):L(se,te)},H=(h>f?L(new Qa([0,0,0]),this):L(this,new Qa([255,255,255]))).rgb();return new Qa(H.concat([this._rgb[3]]))}return Jb.apply(void 0,this._rgb.slice(0,3))};var Jb=function(f,h,C){return f=rc(f),h=rc(h),C=rc(C),.2126*f+.7152*h+.0722*C},rc=function(f){return f/=255,f<=.03928?f/12.92:Wb((f+.055)/1.055,2.4)},Hn={},xf=S,Pf=v.type,oi=Hn,Mf=function(f,h,C){C===void 0&&(C=.5);for(var T=[],L=arguments.length-3;L-- >0;)T[L]=arguments[L+3];var H=T[0]||"lrgb";if(!oi[H]&&!T.length&&(H=Object.keys(oi)[0]),!oi[H])throw new Error("interpolation mode "+H+" is not defined");return Pf(f)!=="object"&&(f=new xf(f)),Pf(h)!=="object"&&(h=new xf(h)),oi[H](f,h,C).alpha(f.alpha()+C*(h.alpha()-f.alpha()))},Nf=S,Yb=Mf;Nf.prototype.mix=Nf.prototype.interpolate=function(f,h){h===void 0&&(h=.5);for(var C=[],T=arguments.length-2;T-- >0;)C[T]=arguments[T+2];return Yb.apply(void 0,[this,f,h].concat(C))};var Of=S;Of.prototype.premultiply=function(f){f===void 0&&(f=!1);var h=this._rgb,C=h[3];return f?(this._rgb=[h[0]*C,h[1]*C,h[2]*C,C],this):new Of([h[0]*C,h[1]*C,h[2]*C,C],"rgb")};var ac=S,Qb=ei;ac.prototype.saturate=function(f){f===void 0&&(f=1);var h=this,C=h.lch();return C[1]+=Qb.Kn*f,C[1]<0&&(C[1]=0),new ac(C,"lch").alpha(h.alpha(),!0)},ac.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var Rf=S,Lf=v.type;Rf.prototype.set=function(f,h,C){C===void 0&&(C=!1);var T=f.split("."),L=T[0],H=T[1],N=this[L]();if(H){var te=L.indexOf(H)-(L.substr(0,2)==="ok"?2:0);if(te>-1){if(Lf(h)=="string")switch(h.charAt(0)){case"+":N[te]+=+h;break;case"-":N[te]+=+h;break;case"*":N[te]*=+h.substr(1);break;case"/":N[te]/=+h.substr(1);break;default:N[te]=+h}else if(Lf(h)==="number")N[te]=h;else throw new Error("unsupported value for Color.set");var se=new Rf(N,L);return C?(this._rgb=se._rgb,this):se}throw new Error("unknown channel "+H+" in mode "+L)}else return N};var Xb=S,Zb=function(f,h,C){var T=f._rgb,L=h._rgb;return new Xb(T[0]+C*(L[0]-T[0]),T[1]+C*(L[1]-T[1]),T[2]+C*(L[2]-T[2]),"rgb")};Hn.rgb=Zb;var e0=S,oc=Math.sqrt,Xa=Math.pow,t0=function(f,h,C){var T=f._rgb,L=T[0],H=T[1],N=T[2],te=h._rgb,se=te[0],ye=te[1],Ce=te[2];return new e0(oc(Xa(L,2)*(1-C)+Xa(se,2)*C),oc(Xa(H,2)*(1-C)+Xa(ye,2)*C),oc(Xa(N,2)*(1-C)+Xa(Ce,2)*C),"rgb")};Hn.lrgb=t0;var n0=S,r0=function(f,h,C){var T=f.lab(),L=h.lab();return new n0(T[0]+C*(L[0]-T[0]),T[1]+C*(L[1]-T[1]),T[2]+C*(L[2]-T[2]),"lab")};Hn.lab=r0;var Df=S,Za=function(f,h,C,T){var L,H,N,te;T==="hsl"?(N=f.hsl(),te=h.hsl()):T==="hsv"?(N=f.hsv(),te=h.hsv()):T==="hcg"?(N=f.hcg(),te=h.hcg()):T==="hsi"?(N=f.hsi(),te=h.hsi()):T==="lch"||T==="hcl"?(T="hcl",N=f.hcl(),te=h.hcl()):T==="oklch"&&(N=f.oklch().reverse(),te=h.oklch().reverse());var se,ye,Ce,Fe,xe,qe;(T.substr(0,1)==="h"||T==="oklch")&&(L=N,se=L[0],Ce=L[1],xe=L[2],H=te,ye=H[0],Fe=H[1],qe=H[2]);var We,ut,gt,At;return!isNaN(se)&&!isNaN(ye)?(ye>se&&ye-se>180?At=ye-(se+360):ye<se&&se-ye>180?At=ye+360-se:At=ye-se,ut=se+C*At):isNaN(se)?isNaN(ye)?ut=Number.NaN:(ut=ye,(xe==1||xe==0)&&T!="hsv"&&(We=Fe)):(ut=se,(qe==1||qe==0)&&T!="hsv"&&(We=Ce)),We===void 0&&(We=Ce+C*(Fe-Ce)),gt=xe+C*(qe-xe),T==="oklch"?new Df([gt,We,ut],T):new Df([ut,We,gt],T)},a0=Za,Ff=function(f,h,C){return a0(f,h,C,"lch")};Hn.lch=Ff,Hn.hcl=Ff;var o0=S,s0=function(f,h,C){var T=f.num(),L=h.num();return new o0(T+C*(L-T),"num")};Hn.num=s0;var i0=Za,l0=function(f,h,C){return i0(f,h,C,"hcg")};Hn.hcg=l0;var c0=Za,u0=function(f,h,C){return c0(f,h,C,"hsi")};Hn.hsi=u0;var d0=Za,f0=function(f,h,C){return d0(f,h,C,"hsl")};Hn.hsl=f0;var p0=Za,h0=function(f,h,C){return p0(f,h,C,"hsv")};Hn.hsv=h0;var m0=S,v0=function(f,h,C){var T=f.oklab(),L=h.oklab();return new m0(T[0]+C*(L[0]-T[0]),T[1]+C*(L[1]-T[1]),T[2]+C*(L[2]-T[2]),"oklab")};Hn.oklab=v0;var g0=Za,y0=function(f,h,C){return g0(f,h,C,"oklch")};Hn.oklch=y0;var sc=S,_0=v.clip_rgb,ic=Math.pow,lc=Math.sqrt,cc=Math.PI,jf=Math.cos,Bf=Math.sin,b0=Math.atan2,w0=function(f,h,C){h===void 0&&(h="lrgb"),C===void 0&&(C=null);var T=f.length;C||(C=Array.from(new Array(T)).map(function(){return 1}));var L=T/C.reduce(function(ut,gt){return ut+gt});if(C.forEach(function(ut,gt){C[gt]*=L}),f=f.map(function(ut){return new sc(ut)}),h==="lrgb")return A0(f,C);for(var H=f.shift(),N=H.get(h),te=[],se=0,ye=0,Ce=0;Ce<N.length;Ce++)if(N[Ce]=(N[Ce]||0)*C[0],te.push(isNaN(N[Ce])?0:C[0]),h.charAt(Ce)==="h"&&!isNaN(N[Ce])){var Fe=N[Ce]/180*cc;se+=jf(Fe)*C[0],ye+=Bf(Fe)*C[0]}var xe=H.alpha()*C[0];f.forEach(function(ut,gt){var At=ut.get(h);xe+=ut.alpha()*C[gt+1];for(var Et=0;Et<N.length;Et++)if(!isNaN(At[Et]))if(te[Et]+=C[gt+1],h.charAt(Et)==="h"){var fn=At[Et]/180*cc;se+=jf(fn)*C[gt+1],ye+=Bf(fn)*C[gt+1]}else N[Et]+=At[Et]*C[gt+1]});for(var qe=0;qe<N.length;qe++)if(h.charAt(qe)==="h"){for(var We=b0(ye/te[qe],se/te[qe])/cc*180;We<0;)We+=360;for(;We>=360;)We-=360;N[qe]=We}else N[qe]=N[qe]/te[qe];return xe/=T,new sc(N,h).alpha(xe>.99999?1:xe,!0)},A0=function(f,h){for(var C=f.length,T=[0,0,0,0],L=0;L<f.length;L++){var H=f[L],N=h[L]/C,te=H._rgb;T[0]+=ic(te[0],2)*N,T[1]+=ic(te[1],2)*N,T[2]+=ic(te[2],2)*N,T[3]+=te[3]*N}return T[0]=lc(T[0]),T[1]=lc(T[1]),T[2]=lc(T[2]),T[3]>.9999999&&(T[3]=1),new sc(_0(T))},ar=Z,eo=v.type,C0=Math.pow,uc=function(f){var h="rgb",C=ar("#ccc"),T=0,L=[0,1],H=[],N=[0,0],te=!1,se=[],ye=!1,Ce=0,Fe=1,xe=!1,qe={},We=!0,ut=1,gt=function(Me){if(Me=Me||["#fff","#000"],Me&&eo(Me)==="string"&&ar.brewer&&ar.brewer[Me.toLowerCase()]&&(Me=ar.brewer[Me.toLowerCase()]),eo(Me)==="array"){Me.length===1&&(Me=[Me[0],Me[0]]),Me=Me.slice(0);for(var nt=0;nt<Me.length;nt++)Me[nt]=ar(Me[nt]);H.length=0;for(var pt=0;pt<Me.length;pt++)H.push(pt/(Me.length-1))}return Mn(),se=Me},At=function(Me){if(te!=null){for(var nt=te.length-1,pt=0;pt<nt&&Me>=te[pt];)pt++;return pt-1}return 0},Et=function(Me){return Me},fn=function(Me){return Me},un=function(Me,nt){var pt,dt;if(nt==null&&(nt=!1),isNaN(Me)||Me===null)return C;if(nt)dt=Me;else if(te&&te.length>2){var pn=At(Me);dt=pn/(te.length-2)}else Fe!==Ce?dt=(Me-Ce)/(Fe-Ce):dt=1;dt=fn(dt),nt||(dt=Et(dt)),ut!==1&&(dt=C0(dt,ut)),dt=N[0]+dt*(1-N[0]-N[1]),dt=Math.min(1,Math.max(0,dt));var jt=Math.floor(dt*1e4);if(We&&qe[jt])pt=qe[jt];else{if(eo(se)==="array")for(var Ct=0;Ct<H.length;Ct++){var Tt=H[Ct];if(dt<=Tt){pt=se[Ct];break}if(dt>=Tt&&Ct===H.length-1){pt=se[Ct];break}if(dt>Tt&&dt<H[Ct+1]){dt=(dt-Tt)/(H[Ct+1]-Tt),pt=ar.interpolate(se[Ct],se[Ct+1],dt,h);break}}else eo(se)==="function"&&(pt=se(dt));We&&(qe[jt]=pt)}return pt},Mn=function(){return qe={}};gt(f);var _t=function(Me){var nt=ar(un(Me));return ye&&nt[ye]?nt[ye]():nt};return _t.classes=function(Me){if(Me!=null){if(eo(Me)==="array")te=Me,L=[Me[0],Me[Me.length-1]];else{var nt=ar.analyze(L);Me===0?te=[nt.min,nt.max]:te=ar.limits(nt,"e",Me)}return _t}return te},_t.domain=function(Me){if(!arguments.length)return L;Ce=Me[0],Fe=Me[Me.length-1],H=[];var nt=se.length;if(Me.length===nt&&Ce!==Fe)for(var pt=0,dt=Array.from(Me);pt<dt.length;pt+=1){var pn=dt[pt];H.push((pn-Ce)/(Fe-Ce))}else{for(var jt=0;jt<nt;jt++)H.push(jt/(nt-1));if(Me.length>2){var Ct=Me.map(function(xt,Mt){return Mt/(Me.length-1)}),Tt=Me.map(function(xt){return(xt-Ce)/(Fe-Ce)});Tt.every(function(xt,Mt){return Ct[Mt]===xt})||(fn=function(xt){if(xt<=0||xt>=1)return xt;for(var Mt=0;xt>=Tt[Mt+1];)Mt++;var sr=(xt-Tt[Mt])/(Tt[Mt+1]-Tt[Mt]),Qr=Ct[Mt]+sr*(Ct[Mt+1]-Ct[Mt]);return Qr})}}return L=[Ce,Fe],_t},_t.mode=function(Me){return arguments.length?(h=Me,Mn(),_t):h},_t.range=function(Me,nt){return gt(Me),_t},_t.out=function(Me){return ye=Me,_t},_t.spread=function(Me){return arguments.length?(T=Me,_t):T},_t.correctLightness=function(Me){return Me==null&&(Me=!0),xe=Me,Mn(),xe?Et=function(nt){for(var pt=un(0,!0).lab()[0],dt=un(1,!0).lab()[0],pn=pt>dt,jt=un(nt,!0).lab()[0],Ct=pt+(dt-pt)*nt,Tt=jt-Ct,xt=0,Mt=1,sr=20;Math.abs(Tt)>.01&&sr-- >0;)(function(){return pn&&(Tt*=-1),Tt<0?(xt=nt,nt+=(Mt-nt)*.5):(Mt=nt,nt+=(xt-nt)*.5),jt=un(nt,!0).lab()[0],Tt=jt-Ct})();return nt}:Et=function(nt){return nt},_t},_t.padding=function(Me){return Me!=null?(eo(Me)==="number"&&(Me=[Me,Me]),N=Me,_t):N},_t.colors=function(Me,nt){arguments.length<2&&(nt="hex");var pt=[];if(arguments.length===0)pt=se.slice(0);else if(Me===1)pt=[_t(.5)];else if(Me>1){var dt=L[0],pn=L[1]-dt;pt=$0(0,Me,!1).map(function(Mt){return _t(dt+Mt/(Me-1)*pn)})}else{f=[];var jt=[];if(te&&te.length>2)for(var Ct=1,Tt=te.length,xt=1<=Tt;xt?Ct<Tt:Ct>Tt;xt?Ct++:Ct--)jt.push((te[Ct-1]+te[Ct])*.5);else jt=L;pt=jt.map(function(Mt){return _t(Mt)})}return ar[nt]&&(pt=pt.map(function(Mt){return Mt[nt]()})),pt},_t.cache=function(Me){return Me!=null?(We=Me,_t):We},_t.gamma=function(Me){return Me!=null?(ut=Me,_t):ut},_t.nodata=function(Me){return Me!=null?(C=ar(Me),_t):C},_t};function $0(f,h,C){for(var T=[],L=f<h,H=C?L?h+1:h-1:h,N=f;L?N<H:N>H;L?N++:N--)T.push(N);return T}var Wo=S,S0=uc,I0=function(f){for(var h=[1,1],C=1;C<f;C++){for(var T=[1],L=1;L<=h.length;L++)T[L]=(h[L]||0)+h[L-1];h=T}return h},E0=function(f){var h,C,T,L,H,N,te;if(f=f.map(function(xe){return new Wo(xe)}),f.length===2)h=f.map(function(xe){return xe.lab()}),H=h[0],N=h[1],L=function(xe){var qe=[0,1,2].map(function(We){return H[We]+xe*(N[We]-H[We])});return new Wo(qe,"lab")};else if(f.length===3)C=f.map(function(xe){return xe.lab()}),H=C[0],N=C[1],te=C[2],L=function(xe){var qe=[0,1,2].map(function(We){return(1-xe)*(1-xe)*H[We]+2*(1-xe)*xe*N[We]+xe*xe*te[We]});return new Wo(qe,"lab")};else if(f.length===4){var se;T=f.map(function(xe){return xe.lab()}),H=T[0],N=T[1],te=T[2],se=T[3],L=function(xe){var qe=[0,1,2].map(function(We){return(1-xe)*(1-xe)*(1-xe)*H[We]+3*(1-xe)*(1-xe)*xe*N[We]+3*(1-xe)*xe*xe*te[We]+xe*xe*xe*se[We]});return new Wo(qe,"lab")}}else if(f.length>=5){var ye,Ce,Fe;ye=f.map(function(xe){return xe.lab()}),Fe=f.length-1,Ce=I0(Fe),L=function(xe){var qe=1-xe,We=[0,1,2].map(function(ut){return ye.reduce(function(gt,At,Et){return gt+Ce[Et]*Math.pow(qe,Fe-Et)*Math.pow(xe,Et)*At[ut]},0)});return new Wo(We,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return L},k0=function(f){var h=E0(f);return h.scale=function(){return S0(h)},h},dc=Z,or=function(f,h,C){if(!or[C])throw new Error("unknown blend mode "+C);return or[C](f,h)},Jr=function(f){return function(h,C){var T=dc(C).rgb(),L=dc(h).rgb();return dc.rgb(f(T,L))}},Yr=function(f){return function(h,C){var T=[];return T[0]=f(h[0],C[0]),T[1]=f(h[1],C[1]),T[2]=f(h[2],C[2]),T}},T0=function(f){return f},x0=function(f,h){return f*h/255},P0=function(f,h){return f>h?h:f},M0=function(f,h){return f>h?f:h},N0=function(f,h){return 255*(1-(1-f/255)*(1-h/255))},O0=function(f,h){return h<128?2*f*h/255:255*(1-2*(1-f/255)*(1-h/255))},R0=function(f,h){return 255*(1-(1-h/255)/(f/255))},L0=function(f,h){return f===255?255:(f=255*(h/255)/(1-f/255),f>255?255:f)};or.normal=Jr(Yr(T0)),or.multiply=Jr(Yr(x0)),or.screen=Jr(Yr(N0)),or.overlay=Jr(Yr(O0)),or.darken=Jr(Yr(P0)),or.lighten=Jr(Yr(M0)),or.dodge=Jr(Yr(L0)),or.burn=Jr(Yr(R0));for(var D0=or,fc=v.type,F0=v.clip_rgb,j0=v.TWOPI,B0=Math.pow,V0=Math.sin,U0=Math.cos,Vf=Z,H0=function(f,h,C,T,L){f===void 0&&(f=300),h===void 0&&(h=-1.5),C===void 0&&(C=1),T===void 0&&(T=1),L===void 0&&(L=[0,1]);var H=0,N;fc(L)==="array"?N=L[1]-L[0]:(N=0,L=[L,L]);var te=function(se){var ye=j0*((f+120)/360+h*se),Ce=B0(L[0]+N*se,T),Fe=H!==0?C[0]+se*H:C,xe=Fe*Ce*(1-Ce)/2,qe=U0(ye),We=V0(ye),ut=Ce+xe*(-.14861*qe+1.78277*We),gt=Ce+xe*(-.29227*qe-.90649*We),At=Ce+xe*(1.97294*qe);return Vf(F0([ut*255,gt*255,At*255,1]))};return te.start=function(se){return se==null?f:(f=se,te)},te.rotations=function(se){return se==null?h:(h=se,te)},te.gamma=function(se){return se==null?T:(T=se,te)},te.hue=function(se){return se==null?C:(C=se,fc(C)==="array"?(H=C[1]-C[0],H===0&&(C=C[1])):H=0,te)},te.lightness=function(se){return se==null?L:(fc(se)==="array"?(L=se,N=se[1]-se[0]):(L=[se,se],N=0),te)},te.scale=function(){return Vf.scale(te)},te.hue(C),te},z0=S,K0="0123456789abcdef",W0=Math.floor,q0=Math.random,G0=function(){for(var f="#",h=0;h<6;h++)f+=K0.charAt(W0(q0()*16));return new z0(f,"hex")},pc=c,Uf=Math.log,J0=Math.pow,Y0=Math.floor,Q0=Math.abs,Hf=function(f,h){h===void 0&&(h=null);var C={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return pc(f)==="object"&&(f=Object.values(f)),f.forEach(function(T){h&&pc(T)==="object"&&(T=T[h]),T!=null&&!isNaN(T)&&(C.values.push(T),C.sum+=T,T<C.min&&(C.min=T),T>C.max&&(C.max=T),C.count+=1)}),C.domain=[C.min,C.max],C.limits=function(T,L){return zf(C,T,L)},C},zf=function(f,h,C){h===void 0&&(h="equal"),C===void 0&&(C=7),pc(f)=="array"&&(f=Hf(f));var T=f.min,L=f.max,H=f.values.sort(function(mc,vc){return mc-vc});if(C===1)return[T,L];var N=[];if(h.substr(0,1)==="c"&&(N.push(T),N.push(L)),h.substr(0,1)==="e"){N.push(T);for(var te=1;te<C;te++)N.push(T+te/C*(L-T));N.push(L)}else if(h.substr(0,1)==="l"){if(T<=0)throw new Error("Logarithmic scales are only possible for values > 0");var se=Math.LOG10E*Uf(T),ye=Math.LOG10E*Uf(L);N.push(T);for(var Ce=1;Ce<C;Ce++)N.push(J0(10,se+Ce/C*(ye-se)));N.push(L)}else if(h.substr(0,1)==="q"){N.push(T);for(var Fe=1;Fe<C;Fe++){var xe=(H.length-1)*Fe/C,qe=Y0(xe);if(qe===xe)N.push(H[qe]);else{var We=xe-qe;N.push(H[qe]*(1-We)+H[qe+1]*We)}}N.push(L)}else if(h.substr(0,1)==="k"){var ut,gt=H.length,At=new Array(gt),Et=new Array(C),fn=!0,un=0,Mn=null;Mn=[],Mn.push(T);for(var _t=1;_t<C;_t++)Mn.push(T+_t/C*(L-T));for(Mn.push(L);fn;){for(var Me=0;Me<C;Me++)Et[Me]=0;for(var nt=0;nt<gt;nt++)for(var pt=H[nt],dt=Number.MAX_VALUE,pn=void 0,jt=0;jt<C;jt++){var Ct=Q0(Mn[jt]-pt);Ct<dt&&(dt=Ct,pn=jt),Et[pn]++,At[nt]=pn}for(var Tt=new Array(C),xt=0;xt<C;xt++)Tt[xt]=null;for(var Mt=0;Mt<gt;Mt++)ut=At[Mt],Tt[ut]===null?Tt[ut]=H[Mt]:Tt[ut]+=H[Mt];for(var sr=0;sr<C;sr++)Tt[sr]*=1/Et[sr];fn=!1;for(var Qr=0;Qr<C;Qr++)if(Tt[Qr]!==Mn[Qr]){fn=!0;break}Mn=Tt,un++,un>200&&(fn=!1)}for(var Xr={},to=0;to<C;to++)Xr[to]=[];for(var no=0;no<gt;no++)ut=At[no],Xr[ut].push(H[no]);for(var Nr=[],Ea=0;Ea<C;Ea++)Nr.push(Xr[Ea][0]),Nr.push(Xr[Ea][Xr[Ea].length-1]);Nr=Nr.sort(function(mc,vc){return mc-vc}),N.push(Nr[0]);for(var qo=1;qo<Nr.length;qo+=2){var ka=Nr[qo];!isNaN(ka)&&N.indexOf(ka)===-1&&N.push(ka)}}return N},Kf={analyze:Hf,limits:zf},Wf=S,X0=function(f,h){f=new Wf(f),h=new Wf(h);var C=f.luminance(),T=h.luminance();return C>T?(C+.05)/(T+.05):(T+.05)/(C+.05)},qf=S,Mr=Math.sqrt,Gt=Math.pow,Z0=Math.min,ew=Math.max,Gf=Math.atan2,Jf=Math.abs,si=Math.cos,Yf=Math.sin,tw=Math.exp,Qf=Math.PI,nw=function(f,h,C,T,L){C===void 0&&(C=1),T===void 0&&(T=1),L===void 0&&(L=1);var H=function(ka){return 360*ka/(2*Qf)},N=function(ka){return 2*Qf*ka/360};f=new qf(f),h=new qf(h);var te=Array.from(f.lab()),se=te[0],ye=te[1],Ce=te[2],Fe=Array.from(h.lab()),xe=Fe[0],qe=Fe[1],We=Fe[2],ut=(se+xe)/2,gt=Mr(Gt(ye,2)+Gt(Ce,2)),At=Mr(Gt(qe,2)+Gt(We,2)),Et=(gt+At)/2,fn=.5*(1-Mr(Gt(Et,7)/(Gt(Et,7)+Gt(25,7)))),un=ye*(1+fn),Mn=qe*(1+fn),_t=Mr(Gt(un,2)+Gt(Ce,2)),Me=Mr(Gt(Mn,2)+Gt(We,2)),nt=(_t+Me)/2,pt=H(Gf(Ce,un)),dt=H(Gf(We,Mn)),pn=pt>=0?pt:pt+360,jt=dt>=0?dt:dt+360,Ct=Jf(pn-jt)>180?(pn+jt+360)/2:(pn+jt)/2,Tt=1-.17*si(N(Ct-30))+.24*si(N(2*Ct))+.32*si(N(3*Ct+6))-.2*si(N(4*Ct-63)),xt=jt-pn;xt=Jf(xt)<=180?xt:jt<=pn?xt+360:xt-360,xt=2*Mr(_t*Me)*Yf(N(xt)/2);var Mt=xe-se,sr=Me-_t,Qr=1+.015*Gt(ut-50,2)/Mr(20+Gt(ut-50,2)),Xr=1+.045*nt,to=1+.015*nt*Tt,no=30*tw(-Gt((Ct-275)/25,2)),Nr=2*Mr(Gt(nt,7)/(Gt(nt,7)+Gt(25,7))),Ea=-Nr*Yf(2*N(no)),qo=Mr(Gt(Mt/(C*Qr),2)+Gt(sr/(T*Xr),2)+Gt(xt/(L*to),2)+Ea*(sr/(T*Xr))*(xt/(L*to)));return ew(0,Z0(100,qo))},Xf=S,rw=function(f,h,C){C===void 0&&(C="lab"),f=new Xf(f),h=new Xf(h);var T=f.get(C),L=h.get(C),H=0;for(var N in T){var te=(T[N]||0)-(L[N]||0);H+=te*te}return Math.sqrt(H)},aw=S,ow=function(){for(var f=[],h=arguments.length;h--;)f[h]=arguments[h];try{return new(Function.prototype.bind.apply(aw,[null].concat(f))),!0}catch{return!1}},Zf=Z,ep=uc,sw={cool:function(){return ep([Zf.hsl(180,1,.9),Zf.hsl(250,.7,.4)])},hot:function(){return ep(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ii={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},hc=0,tp=Object.keys(ii);hc<tp.length;hc+=1){var np=tp[hc];ii[np.toLowerCase()]=ii[np]}var iw=ii,cn=Z;cn.average=w0,cn.bezier=k0,cn.blend=D0,cn.cubehelix=H0,cn.mix=cn.interpolate=Mf,cn.random=G0,cn.scale=uc,cn.analyze=Kf.analyze,cn.contrast=X0,cn.deltaE=nw,cn.distance=rw,cn.limits=Kf.limits,cn.valid=ow,cn.scales=sw,cn.colors=hf,cn.brewer=iw;var lw=cn;return lw})})(gy);var sM=gy.exports;const yy=rg(sM),iM=["onClick"],lM={key:1,class:"tag empty"},cM=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,uM="A component to display coloured tag pills.",dM={writer:{name:"Tags",description:uM,category:"Content",fields:{tags:{name:"Tags",desc:"Key-value object with tags. Must be a JSON string or a state reference to a dictionary.",type:G.KeyValue,default:"{}"},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:G.Color,default:St.Blue5,category:ze.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:G.Number,default:"1",category:ze.Style},rotateHue:{...$t,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:ze.Style},primaryTextColor:zt,cssClasses:tt},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:cM.trim()}},previewField:"text"}},fM=ke({...dM,__name:"CoreTags",setup(e){Mo(d=>({"51f8793c":i.value?"pointer":"auto"}));const t=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}],n=et("rootEl"),r=ne(oe.evaluatedFields),a=ne(oe.componentId),o=ne(oe.core),s=ne(oe.isBeingEdited),i=J(()=>{var m;return typeof((m=o.getComponentById(a).handlers)==null?void 0:m["wf-tag-click"])<"u"});function l(d){if(!r.rotateHue.value)return r.referenceColor.value;const m=yy(r.referenceColor.value),y=t[c(d)];return m.set("hsl.h",`${Math.sign(y.h)==-1?"-":"+"}${Math.abs(y.h)}`).set("hsl.s",`${Math.sign(y.s)==-1?"-":"+"}${Math.abs(y.s/100)}`).set("hsl.l",`${Math.sign(y.l)==-1?"-":"+"}${Math.abs(y.l/100)}`).css()}function c(d){let m=r.seed.value*52673&4294967295;for(let b=0;b<d.length;b++)m=(b+1)*d.charCodeAt(b)^m&4294967295;return Math.abs(m)%t.length}function u(d){const m=new CustomEvent("wf-tag-click",{detail:{payload:d}});n.value.dispatchEvent(m)}return(d,m)=>P(s)||Object.entries(P(r).tags.value??[]).length>0?(E(),M("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(P(r).tags.value??[]).length>0?(E(!0),M(Ve,{key:0},It(P(r).tags.value,(y,b)=>(E(),M("div",{key:b,class:"tag",style:mt({background:l(b)}),onClick:()=>u(b)},[W("span",null,Pe(y),1)],12,iM))),128)):(E(),M("div",lM,m[0]||(m[0]=[W("span",null,"Empty Tags",-1)])))],512)):Se("",!0)}}),pM=Ne(fM,[["__scopeId","data-v-58219433"]]),hM={key:0,class:"material-symbols-outlined"},mM={class:"info"},vM={key:1,class:"caption"},gM={class:"container","data-writer-container":""},yM=`
def handle_avatar_click():
	print("The avatar was clicked")`,_M="A component to display user avatars.",bM={writer:{name:"Avatar",description:_M,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:G.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:G.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:G.Text},size:{name:"Size",type:G.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:ze.Style},orientation:{name:"Orientation",type:G.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:ze.Style},primaryTextColor:zt,secondaryTextColor:Un,separatorColor:en,cssClasses:tt},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:yM.trim()}},previewField:"text"}},wM=ke({...bM,__name:"CoreAvatar",setup(e){Mo(l=>({84668864:o.value?"pointer":"auto"}));const t=et("rootEl"),n=ne(oe.evaluatedFields),r=ne(oe.componentId),a=ne(oe.core),o=J(()=>{var c;return typeof((c=a.getComponentById(r).handlers)==null?void 0:c["wf-click"])<"u"}),s=J(()=>({backgroundImage:n.imageSrc.value?`url(${n.imageSrc.value})`:"none",cursor:o.value?"pointer":"auto"}));function i(l){const c=Us(l);t.value.dispatchEvent(c)}return(l,c)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:it(["CoreAvatar",[P(n).size.value,P(n).orientation.value]])},[W("div",{class:"image",style:mt(s.value),onClick:i},[P(n).imageSrc.value?Se("",!0):(E(),M("i",hM," account_circle "))],4),W("div",mM,[P(n).name.value?(E(),M("div",{key:0,class:"name",onClick:i},Pe(P(n).name.value),1)):Se("",!0),P(n).caption.value?(E(),M("div",vM,Pe(P(n).caption.value),1)):Se("",!0),W("div",gM,[Ht(l.$slots,"default",{},void 0,!0)])])],2))}}),AM=Ne(wM,[["__scopeId","data-v-f433e0c3"]]),CM={class:"SharedControlBar"},$M=ke({__name:"SharedControlBar",props:{copyRawContent:{},copyStructuredContent:{}},setup(e){const t=e;function n({text:r=""}){try{navigator.clipboard.writeText(r)}catch(a){Bn().error(a)}}return(r,a)=>(E(),M("div",CM,[t.copyStructuredContent?(E(),M("button",{key:0,class:"control-button",onClick:a[0]||(a[0]=o=>n({text:t.copyStructuredContent}))}," Copy JSON ")):Se("",!0),t.copyRawContent?(E(),M("button",{key:1,class:"control-button",onClick:a[1]||(a[1]=o=>n({text:t.copyRawContent}))}," Copy ")):Se("",!0)]))}}),_y=Ne($M,[["__scopeId","data-v-bf2e0bde"]]),SM={key:0,class:"CoreAnnotatedText"},IM={key:0,class:"CoreAnnotatedText__annotation__subject"},EM={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:G.Object,desc:"Value array with text/annotations. Must be a JSON string or a state reference to an array.",init:`["This ",["is", "Verb"]," some ",["annotated", "Adjective"], ["text", "Noun"]," for those of ",["you", "Pronoun"]," who ",["like", "Verb"]," this sort of ",["thing", "Noun"],". ","And here's a ",["word", "", "#faf"]," with a fancy background but no label."]`,validator:DT},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:G.Color,default:St.Blue5,category:ze.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:G.Number,default:"1",category:ze.Style},rotateHue:{...$t,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:ze.Style},useMarkdown:{...$t,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},copyButtons:{...$t,name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",default:"no",category:ze.Style},buttonColor:Tr,buttonTextColor:xr,primaryTextColor:zt,cssClasses:tt},previewField:"data"}},kM=ke({...EM,__name:"CoreAnnotatedText",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>t.text.value??[]),r=ne(oe.isBeingEdited),a=ne(oe.componentId),o=J(()=>!t.text.value),s=J(()=>!o.value||r.value),i=J(()=>!!t.useMarkdown.value),l=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}];let c=[...l],u={},d=t.seed.value;function m(){const p=$e("");He([i,n],async()=>{if(!i.value)return p.value="";p.value=await S()},{immediate:!0});function w(F){const[Z,re]=F,ce=re?`<span class="CoreAnnotatedText__annotation__subject">${re}</span>`:"";return`<span class="CoreAnnotatedText__annotation" style="background: ${_(F)}">${Z}${ce}</span>`}async function S(){const F=n.value.reduce((re,ce)=>typeof ce=="string"?`${re} ${ce}`:Array.isArray(ce)?`${re} ${w(ce)}`:re,"");return await(await Jt(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url)).parse(F)}return En(p)}const y=m();function b(p,w){return p.set("hsl.h",`${Math.sign(w.h)==-1?"-":"+"}${Math.abs(w.h)}`).set("hsl.s",`${Math.sign(w.s)==-1?"-":"+"}${Math.abs(w.s/100)}`).set("hsl.l",`${Math.sign(w.l)==-1?"-":"+"}${Math.abs(w.l/100)}`).css()}function v(p,w=l.length){let S=t.seed.value*52673&4294967295;for(let Z=0;Z<p.length;Z++)S=(Z+1)*p.charCodeAt(Z)^S&4294967295;return Math.abs(S)%w}function _(p){return p[2]||A(p[1])}function A(p){if(!t.rotateHue.value)return t.referenceColor.value;const w=yy(t.referenceColor.value);if(d!==t.seed.value&&(c=[...l],u={},d=t.seed.value),u[p])return b(w,u[p]);c.length===0&&(c=[...l]);const S=v(p,c.length),F=c[S];return u[p]=F,c.splice(S,1),b(w,F)}const $=J(()=>n.value.reduce((p,w)=>typeof w=="string"?p+w:p+w[0],"")),g=J(()=>{try{return JSON.stringify(n.value)}catch{return n.value.join("")}});return(p,w)=>s.value?(E(),M("div",SM,[i.value?(E(),je(Qv,{key:0,"raw-markdown":P(y),class:"CoreAnnotatedText__markdown"},null,8,["raw-markdown"])):(E(),M(Ve,{key:1},[o.value?(E(),je(Hd,{key:0,"component-id":P(a)},null,8,["component-id"])):Se("",!0),(E(!0),M(Ve,null,It(n.value,(S,F)=>(E(),M("span",{key:String(S)+F},[typeof S=="string"?(E(),M(Ve,{key:0},[Dt(Pe(S),1)],64)):Se("",!0),Array.isArray(S)?(E(),M("span",{key:1,class:"CoreAnnotatedText__annotation",style:mt({backgroundColor:_(S)})},[Dt(Pe(S[0])+" ",1),S[1]?(E(),M("span",IM,Pe(S[1]),1)):Se("",!0)],4)):Se("",!0)]))),128))],64)),P(t).copyButtons.value?(E(),je(_y,{key:2,"copy-raw-content":$.value,"copy-structured-content":g.value},null,8,["copy-raw-content","copy-structured-content"])):Se("",!0)])):Se("",!0)}}),TM=Ne(kM,[["__scopeId","data-v-a82b769f"]]);function Dl(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function zd(e){return Dl(e)?!1:Array.isArray(e)}function by(e){return!zd(e)&&typeof e=="object"&&e!==null}function wy(e){return Dl(e)?1:Object.keys(e).length}function Ay(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const xM=["open","disabled"],PM={class:"SharedCollapsible__summary"},MM={key:0,class:"SharedCollapsible__summary__icon material-symbols-outlined"},NM={class:"content"},OM=ke({__name:"SharedCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},icons:{type:Object,required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t,a=$e(n.open);He(ha(n,"open"),i=>a.value=i);const o=J(()=>{if(n.icons!==void 0)return a.value?n.icons.open:n.icons.close});function s(i){const l=i.newState==="open";a.value=l,r("toggle",l)}return(i,l)=>(E(),M("details",{class:it(["SharedCollapsible",{"SharedCollapsible--customMarker":e.icons}]),open:a.value,disabled:e.disabled,onToggle:s},[W("summary",PM,[e.icons?(E(),M("span",MM,Pe(o.value),1)):Se("",!0),Ht(i.$slots,"title",{},void 0,!0)]),W("div",NM,[Ht(i.$slots,"content",{},void 0,!0)])],42,xM))}}),RM=Ne(OM,[["__scopeId","data-v-ef5bb8f8"]]),LM=ke({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=o=>`Object{${o}}`,r=o=>`Array[${o}]`,a=J(()=>{const o=wy(t.data);return o===0?n(0):zd(t.data)?r(o):by(t.data)?n(o):n(0)});return(o,s)=>(E(),M("span",null,Pe(a.value),1))}}),Cy=Ne(LM,[["__scopeId","data-v-2641ae29"]]),DM={class:"SharedJsonViewerCollapsible__title"},FM={key:0},jM={class:"SharedJsonViewerCollapsible__content"},BM=ke({__name:"SharedJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[String,Number,Boolean,Object,Array,null],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(E(),je(RM,{open:e.open,disabled:e.disabled,onToggle:n[0]||(n[0]=r=>t.$emit("toggle",r))},{title:Ze(()=>[W("div",DM,[e.title?(E(),M("span",FM,Pe(e.title),1)):Se("",!0),e.data?(E(),je(Cy,{key:1,data:e.data},null,8,["data"])):Se("",!0)])]),content:Ze(()=>[W("div",jM,[Ht(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),$y=Ne(BM,[["__scopeId","data-v-7392db61"]]),VM={class:"SharedJsonViewerValue"},UM=ke({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=J(()=>JSON.stringify(t.data));return(r,a)=>(E(),M("span",VM,Pe(n.value),1))}}),Sy=Ne(UM,[["__scopeId","data-v-496a5553"]]),HM={class:"SharedJsonViewerObject"},zM={key:0,class:"SharedJsonViewerObject__value"},KM=ke({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:Ay},setup(e,{emit:t}){const n=e,r=ha(n,"initialDepth"),a=t,o=$e([]),s=J(()=>n.path.length+1);He(r,()=>{if(r.value===0){o.value=[];return}if(!(r.value===-1||r.value>s.value))return;const u=new Set([...o.value,...Object.keys(n.data)]);o.value=Array.from(u)},{immediate:!0});function i(c,u){u?o.value=[...o.value,c]:o.value=o.value.filter(d=>d!==c),a("toggle",{open:u,path:[...n.path,c]})}function l(c){return o.value.includes(String(c))}return(c,u)=>(E(),M("div",HM,[(E(!0),M(Ve,null,It(Object.entries(e.data),([d,m],y)=>(E(),M(Ve,{key:y},[P(Dl)(m)||P(wy)(m)===0?(E(),M("div",zM,[W("span",null,Pe(d),1),u[1]||(u[1]=Dt(": ")),Ge(Sy,{data:m},null,8,["data"])])):(E(),je($y,{key:1,open:l(d),title:d,data:m,onToggle:b=>i(d,b)},{default:Ze(()=>[l(d)?(E(),je(Iy,{key:0,data:m,path:[...e.path,d],"initial-depth":r.value,onToggle:u[0]||(u[0]=b=>c.$emit("toggle",b))},null,8,["data","path","initial-depth"])):Se("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),Mh=Ne(KM,[["__scopeId","data-v-5480a807"]]),Iy=ke({__name:"SharedJsonViewer",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0},path:{type:Array,default:()=>[]},hideRoot:{type:Boolean,required:!1},initialDepth:{type:Number,default:0},enableCopyToJson:{type:Boolean,required:!1}},emits:{toggle:Ay},setup(e){const t=e,n=J(()=>t.path.length===0&&!t.hideRoot),r=J(()=>t.initialDepth===-1||t.initialDepth>0),a=J(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(o,s)=>(E(),M(Ve,null,[P(by)(e.data)||P(zd)(e.data)?(E(),M(Ve,{key:0},[n.value?(E(),je($y,{key:0,open:r.value,data:e.data,onToggle:s[1]||(s[1]=i=>o.$emit("toggle",{path:[],open:i}))},{default:Ze(()=>[Ge(Mh,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[0]||(s[0]=i=>o.$emit("toggle",i))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(E(),je(Mh,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[2]||(s[2]=i=>o.$emit("toggle",i))},null,8,["data","path","initial-depth"]))],64)):P(Dl)(e.data)?(E(),je(Sy,{key:1,data:e.data},null,8,["data"])):(E(),je(Cy,{key:2,data:{}})),e.enableCopyToJson?(E(),je(_y,{key:3,"copy-structured-content":a.value},null,8,["copy-structured-content"])):Se("",!0)],64))}}),WM={class:"CoreJsonViewer"},qM="A component to explore JSON data as a hierarchy.",GM={name:"JSON Viewer",description:"A JSON tree viewer where you can expand the keys.",sample:{description:"This sample is opened by default",bool:!0,null:null,list:[1,"two",{key:3}]},sampleClosed:{description:"This sample is not opened by default"},createdAt:new Date},JM={name:"JSON Viewer",description:qM,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(GM),type:G.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:G.Number,init:"0",validator:jn},hideRoot:{...$t,name:"Hide root",desc:"Don't show the type of the root node when it's an Object or an Array.",default:"no",category:ze.Style},copy:{...$t,name:"Copy",desc:"If active, adds a control bar with copy JSON button.",default:"no",category:ze.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:G.Width,category:ze.Style,applyStyleVariable:!0,validator:ey},accentColor:Zt,secondaryTextColor:Un,separatorColor:en,cssClasses:tt},previewField:"data"},YM={writer:JM},QM=ke({...YM,__name:"CoreJsonViewer",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>t.data.value),r=J(()=>Number(t.initialDepth.value)||0);return(a,o)=>(E(),M("div",WM,[Ge(Iy,{data:n.value??{},"initial-depth":r.value,"enable-copy-to-json":P(t).copy.value,"hide-root":P(t).hideRoot.value},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function XM(e,t={minimumFractionDigits:0,maximumFractionDigits:1}){const n=new Intl.NumberFormat(void 0,{style:"percent",...t});return J(()=>n.format(e.value))}const ZM=["aria-valuetext","aria-valuemin","aria-valuemax","aria-valuenow","aria-busy","tabindex"],e2={key:0,class:"CoreProgressBar__title"},t2={key:0,class:"CoreProgressBar__title__label"},n2={key:1,class:"CoreProgressBar__title__progress"},r2={class:"CoreProgressBar__bar"},a2=`
def handle_progress_bar_click():
	print("The progress bar was clicked")`,o2="A component to display a progression.",s2={name:"Progress Bar",description:o2,category:"Content",allowedChildrenTypes:["*"],fields:{label:{name:"Label",type:G.Text,default:""},value:{name:"Value",type:G.Number},min:{name:"Minimum value",type:G.Number,default:"0"},max:{name:"Maximum value",type:G.Number,default:"1"},displayPercentage:{...$t,name:"Display percentage",default:"no",category:ze.Style},accentColor:Zt,primaryTextColor:zt,separatorColor:en,cssClasses:tt},events:{"wf-click":{desc:"Triggered when the progress bar is clicked.",stub:a2.trim()}}},i2={writer:s2},l2=ke({...i2,__name:"CoreProgressBar",setup(e){const t=et("rootEl"),n=ne(oe.evaluatedFields),r=ne(oe.componentId),a=ne(oe.core),o=J(()=>{var v;return String((v=n.label)==null?void 0:v.value)}),s=J(()=>Number(n.value.value)),i=J(()=>Number(n.min.value)),l=J(()=>Number(n.max.value)),c=J(()=>!!n.displayPercentage.value),u=J(()=>{if(!(s.value===void 0||Number.isNaN(s.value)))return(s.value-i.value)/(l.value-i.value)}),d=XM(u),m=J(()=>({width:u.value===void 0?void 0:`${u.value*100}%`})),y=J(()=>{var _;return typeof((_=a.getComponentById(r).handlers)==null?void 0:_["wf-click"])<"u"});function b(v){if(!y.value)return;const _=Us(v);t.value.dispatchEvent(_)}return(v,_)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:it(["CoreProgressBar",{"CoreProgressBar--clickable":y.value}]),role:"progressbar","aria-valuetext":u.value===void 0?null:P(d),"aria-valuemin":i.value,"aria-valuemax":l.value,"aria-valuenow":u.value===void 0?null:s.value,"aria-busy":u.value<1||u.value===void 0,tabindex:y.value?"0":null,onKeydown:ga(b,["enter"]),onClick:b},[o.value||c.value?(E(),M("div",e2,[o.value?(E(),M("label",t2,Pe(o.value),1)):Se("",!0),c.value&&u.value!==void 0?(E(),M("span",n2,Pe(P(d)),1)):Se("",!0)])):Se("",!0),W("div",r2,[W("div",{class:it(["CoreProgressBar__bar__value",{"CoreProgressBar__bar__value--indeterminate":u.value===void 0}]),style:mt(m.value)},null,6)])],42,ZM))}}),c2=Ne(l2,[["__scopeId","data-v-873bd788"]]);function Fl(e){const t=/[\\]?@{([^}]*)}/g;function n(c,u){var v;let d=[],m="",y=0,b=0;for(;b<c.length;){const _=c.charAt(b);_=="\\"?b+1<c.length&&(m+=c.charAt(b+1),b++):_=="."?y==0?(d.push(m),m=""):m+=_:_=="["?(y==0?(d.push(m),m=""):m+=_,y++):_=="]"?(y--,y==0?m=(v=r(m,u))==null?void 0:v.toString():m+=_):m+=_,b++}return m&&d.push(m),d}function r(c,u){let m=u?a(u):void 0,y=e.userState.value;const b=n(c,u);for(let v=0;v<b.length;v++)m=m==null?void 0:m[b[v]],y=y==null?void 0:y[b[v]];return m??y}function a(c){var d,m;const u={};for(let y=0;y<c.length-1;y++){const b=c[y],{componentId:v}=b,{type:_}=e.getComponentById(v);if(_!=="repeater"||y+1>=c.length)continue;const A=c.slice(0,y+1),$=c.slice(0,y+2),{instanceNumber:g}=$.at(-1),p=i(A,"repeaterObject");if(!p)continue;const w=Object.entries(p),S=i(A,"keyVariable"),F=i(A,"valueVariable");u[S]=(d=w[g])==null?void 0:d[0],u[F]=(m=w[g])==null?void 0:m[1]}return u}function o(c,u){return c==null?"":c.replace(t,(m,y)=>{if(m.charAt(0)=="\\")return m.substring(1);const b=y.trim();if(!b)return"";const v=r(b,u);return typeof v>"u"?"":typeof v=="object"?JSON.stringify(v):v.toString()})}function s(c){const{componentId:u}=c.at(-1),d=e.getComponentById(u);if(!d)return;const m={},{fields:y}=e.getComponentDefinition(d.type);if(y)return Object.keys(y).forEach(b=>{m[b]=J(()=>i(c,b))}),m}function i(c,u){var g;const{componentId:d}=c.at(-1),m=e.getComponentById(d);if(!m)return;const{fields:y}=e.getComponentDefinition(m.type),b=(g=m.content)==null?void 0:g[u],v=y[u].default,_=o(b,c),A=y[u].type,$=typeof _>"u"||_===null||_==="";if(A==G.Object||A==G.KeyValue||A==G.Tools){if(!_)return JSON.parse(v??null);if(typeof _!="string")return _;let p;try{p=JSON.parse(_)}catch{return JSON.parse(v??null)}return p}else if(A==G.Number){const p=v===null?null:parseFloat(v);if($)return p??null;const w=parseFloat(_);return typeof w>"u"||Number.isNaN(w)?p??null:w}else if(A==G.Boolean){const p=$?v:_;return p==="yes"||p==="true"}else return A==G.IdKey?b:$?v??"":_}function l(c,u){const d=e.getComponentById(c);if(!d)return;if(typeof d.visible>"u"||d.visible.expression===!0)return!0;if(d.visible.expression===!1)return!1;const m=r(d.visible.binding,u);return d.visible.reversed===!0?!m:!!m}return{getEvaluatedFields:s,isComponentVisible:l,evaluateExpression:r}}function dn(e,t,n,r=""){const a=$e(),o=$e(!1),s=$e(null),i=t.at(-1).componentId,l=J(()=>e.getComponentById(i)),{evaluateExpression:c}=Fl(e);function u(){var y;const m=e.getComponentById(i);if((y=m==null?void 0:m.binding)!=null&&y.stateRef)return c(m.binding.stateRef,t)}function d(m,y,b){var g,p;a.value=m;const v=(g=l.value.handlers)==null?void 0:g[y],_=((p=l.value.binding)==null?void 0:p.eventType)==y;if(!v&&!_)return;if(o.value){s.value={eventValue:m,emitEventType:y};return}o.value=!0;const A=()=>{o.value=!1,s.value&&(d(s.value.eventValue,s.value.emitEventType),s.value=null),b==null||b()},$=new CustomEvent(y,{detail:{payload:m,callback:A}});n.value instanceof HTMLElement?n.value.dispatchEvent($):n.value.$el.dispatchEvent($)}return He(()=>u(),m=>{o.value||(a.value=m)},{immediate:!0}),He(a,m=>{typeof m>"u"&&(a.value=r)},{immediate:!0}),{formValue:a,handleInput:d}}const u2={key:0},d2=ke({__name:"BaseInputWrapper",props:{label:{type:String,required:!1,default:void 0},isHorizontal:{type:Boolean,required:!1}},setup(e){return(t,n)=>(E(),M("div",{ref:"rootEl",class:it(["BaseInputWrapper",{horizontal:e.isHorizontal}])},[e.label?(E(),M("label",u2,Pe(e.label),1)):Se("",!0),Ht(t.$slots,"default",{},void 0,!0)],2))}}),Cn=Ne(d2,[["__scopeId","data-v-1cbc4730"]]),f2=["checked","value"],p2=["for"],h2={a:"Option A",b:"Option B"},m2="A user input component that allows users to choose multiple values from a list of options using checkboxes.",v2=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected options.
	# The payload will be a list, as multiple options are allowed.

	state["selected"] = payload`,g2={writer:{name:"Checkbox Input",description:m2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:G.KeyValue,default:JSON.stringify(h2,null,2),validator:ya},orientation:{name:"Orientation",type:G.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:ze.Style,desc:"Specify how to lay out the options."},primaryTextColor:zt,accentColor:Zt,cssClasses:tt},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:v2.trim(),bindable:!0}}}},y2=ke({...g2,__name:"CoreCheckboxInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),o=ne(oe.flattenedInstancePath),{formValue:s,handleInput:i}=dn(r,a,n);function l(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(d=>d.checked?d.value:void 0).filter(d=>typeof d<"u"):void 0}return(c,u)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreCheckboxInput"},{default:Ze(()=>[W("div",{class:it(["options",{horizontal:P(t).orientation.value=="horizontal"}])},[(E(!0),M(Ve,null,It(P(t).options.value,(d,m)=>(E(),M("div",{key:m,class:"option"},[W("input",{type:"checkbox",checked:Array.isArray(P(s))?P(s).includes(m):!1,value:m,onInput:u[0]||(u[0]=y=>P(i)(l(),"wf-options-change"))},null,40,f2),W("label",{for:`${P(o)}-option-${m}`},Pe(d),9,p2)]))),128))],2)]),_:1},8,["label"]))}}),_2=Ne(y2,[["__scopeId","data-v-4a9ecd04"]]),b2=["value","list"],w2=["id"],A2=ke({__name:"BaseInputColor",props:{value:{type:String,required:!1,default:void 0},customColors:{type:Array,default:()=>[]}},emits:{"update:value":e=>typeof e=="string",change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,a=et("pickerEl"),o=ne(oe.flattenedInstancePath),s=J(()=>{var c;return(c=n.customColors)!=null&&c.length?`${o}_datalist`:null});function i(c){r("update:value",c.target.value)}function l(c){r("change",c.target.value)}return(c,u)=>(E(),M(Ve,null,[W("input",{ref_key:"pickerEl",ref:a,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:i,onChange:l},null,40,b2),s.value?(E(),M("datalist",{key:0,id:s.value},[(E(!0),M(Ve,null,It(e.customColors,d=>(E(),M("option",{key:d},Pe(d),1))),128))],8,w2)):Se("",!0)],64))}}),C2=Ne(A2,[["__scopeId","data-v-ba449f16"]]),$2="A user input component that allows users to select a color using a color picker interface.",Nh=`
def onchange_handler(state, payload):

	# Set the state variable "new_color" to the new value, provided as string.

	state["new_color"] = payload`,S2={name:"Color Input",description:$2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:G.Object,init:JSON.stringify([St.Blue5,St.Green5,St.Orange5,St.Gray6,St.Blue4]),validator:ty},cssClasses:tt},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Nh,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Nh}}},I2={writer:S2},E2=ke({...I2,__name:"CoreColorInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),o=J(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:i}=dn(r,a,n);return(l,c)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreColorInput"},{default:Ze(()=>[Ge(C2,{value:P(s),"custom-colors":o.value,"onUpdate:value":c[0]||(c[0]=u=>P(i)(u,"wf-change")),onChange:c[1]||(c[1]=u=>P(i)(u,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),k2=Ne(E2,[["__scopeId","data-v-e1edbdef"]]),T2=["value"],x2="A user input component that allows users to select a date using a date picker interface.",P2=`
def onchange_handler(state, payload):

	# Set the state variable "new_date" to the new value, provided as a YYYY-MM-DD string.

	state["new_date"] = payload`,M2={writer:{name:"Date Input",description:x2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},cssClasses:tt},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:P2,bindable:!0}}}},N2=ke({...M2,__name:"CoreDateInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreDateInput"},{default:Ze(()=>[W("input",{type:"date",value:P(o),onChange:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-date-change"))},null,40,T2)]),_:1},8,["label"]))}}),O2=Ne(N2,[["__scopeId","data-v-55739abe"]]),R2=ke({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=qr(e,"modelValue");return(n,r)=>sn((E(),M("select",{"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),class:"WdsDropdownInput colorTransformer"},[Ht(n.$slots,"default",{},void 0,!0)],512)),[[qu,t.value]])}}),Ey=Ne(R2,[["__scopeId","data-v-a262dc28"]]),L2=["value"],D2="A user input component that allows users to select a single value from a list of options using a dropdown menu.",F2={a:"Option A",b:"Option B"},j2=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,B2={writer:{name:"Dropdown Input",description:D2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:G.KeyValue,default:JSON.stringify(F2,null,2),validator:ya},cssClasses:tt},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:j2.trim(),bindable:!0}}}},V2=ke({...B2,__name:"CoreDropdownInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreDropdownInput"},{default:Ze(()=>[Ge(Ey,{modelValue:P(o),"onUpdate:modelValue":l[0]||(l[0]=c=>Qt(o)?o.value=c:null),onInput:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-option-change"))},{default:Ze(()=>[(E(!0),M(Ve,null,It(P(t).options.value,(c,u)=>(E(),M("option",{key:u,value:u},Pe(c),9,L2))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),U2=Ne(V2,[["__scopeId","data-v-82948749"]]),H2={class:"main"},z2={key:0,class:"file-input"},K2=["multiple","accept"],W2={key:0,class:"file-input__files"},q2=["onClick"],G2={key:1},J2={key:1,class:"status"},Y2={key:1},Q2={key:2},Oh=200*1024*1024,X2="A user input component that allows users to upload files.",Z2=`
def onchange_handler(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
		name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)`.trim(),eN={writer:{name:"File Input",description:X2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},allowFileTypes:{name:"Allowed file types",type:G.Text,init:[".pdf",".txt",".doc","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].join(", "),desc:"Provides hints for browsers to select the correct file types. You can specify extensions and MIME types separated by comma, or leave empty to accept any file."},allowMultipleFiles:{...$t,name:"Allow multiple files",default:"no"},cssClasses:tt},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:Z2,bindable:!0}}}},tN=ke({...eN,__name:"CoreFileInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=et("fileEl"),a=$e(null),o=ne(oe.core),s=ne(oe.instancePath),i=$e(null),{formValue:l,handleInput:c}=dn(o,s,n),u=J(()=>Array.isArray(l.value)?l.value:[]),d=J(()=>{var g;return((g=t.allowFileTypes)==null?void 0:g.value)??""}),m=J(()=>t.allowMultipleFiles.value||void 0),y=async g=>{const p=new FileReader;return p.readAsDataURL(g),new Promise((w,S)=>{p.onload=()=>w(p.result),p.onerror=()=>S(p.error)})},b=async g=>{const p=g.target;if(!p.files||p.files.length==0)return;const w=async()=>{let F=0;a.value=null;const Z=Promise.all(Array.from(p.files).map(async re=>(F+=re.size,{name:re.name,type:re.type,data:await y(re)})));return F>Oh?(a.value=`Files are too big. Total size limit is ${Math.floor(Oh/Math.pow(1024,2))}mb.`,[]):Z};i.value=Array.from(p.files).map(F=>F.name),l.value=w();const S=()=>{i.value=null};c(w(),"wf-file-change",S)};He(l,g=>{typeof g>"u"&&r.value&&(r.value.value="")});function v(g){const p=document.createElement("a");p.href=String(g.data),p.download=g.name,p.click(),p.remove()}const _=J(()=>m.value?"files":"file"),A=J(()=>`Browse ${_.value}`),$=J(()=>`No ${_.value} selected`);return(g,p)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:i.value?"":P(t).label.value,class:"CoreFileInput"},{default:Ze(()=>[W("div",H2,[i.value?Se("",!0):(E(),M("div",z2,[sn(W("input",{ref_key:"fileEl",ref:r,type:"file",multiple:m.value,accept:d.value,onChange:p[0]||(p[0]=w=>b(w))},null,40,K2),[[Wn,!1]]),W("div",null,[Ge(Yn,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=w=>P(r).click())},{default:Ze(()=>[Dt(Pe(A.value),1)]),_:1})]),u.value?(E(),M("ul",W2,[(E(!0),M(Ve,null,It(u.value,(w,S)=>(E(),M("li",{key:S},[W("a",{href:"#",onClick:F=>v(w)},Pe(w.name),9,q2)]))),128))])):(E(),M("p",G2,Pe($.value),1))])),a.value||i.value?(E(),M("div",J2,[i.value?(E(),je(uy,{key:0,class:"loadingSymbol"})):Se("",!0),i.value?(E(),M("span",Y2,"Processing "+Pe(i.value.join(", "))+"...",1)):Se("",!0),a.value?(E(),M("span",Q2,Pe(a.value),1)):Se("",!0)])):Se("",!0)])]),_:1},8,["label"]))}}),nN=Ne(tN,[["__scopeId","data-v-3639af08"]]),rN=["id","data-mode","data-list-position","aria-activedescendant"],aN={class:"placeholder"},oN={key:0,class:"desc",role:"option"},sN={key:1,class:"desc",role:"option"},iN=["onClick"],lN=["id","data-list-offset","onMousemove","onClick"],cN={key:0,class:"empty"},Rh=200,uN=ke({__name:"BaseSelect",props:{baseId:{type:String,required:!0},activeValue:{type:[Array,String],required:!0},options:{type:Object,required:!0},maximumCount:{type:Number,required:!0},mode:{type:String,required:!0},placeholder:{type:String,required:!1,default:void 0}},emits:["change"],setup(e,{emit:t}){Mo(Ae=>({"288cacf2":`${Rh}px`}));const n=t,r=e,{baseId:a,options:o,maximumCount:s,mode:i,placeholder:l}=Mu(r),c=J(()=>typeof r.activeValue=="string"?[r.activeValue]:r.activeValue),u=et("rootEl"),d=et("inputEl"),m=et("selectedOptionsEl"),y=et("listEl"),b=$e(""),v=$e(null),_=$e([]),A=$e("hidden"),$=J(()=>{if(i.value=="multiple"&&g.value)return{};const Ae={};return Object.entries(o.value).forEach(([be,ve])=>{i.value=="multiple"&&_.value.includes(be)||String(ve).toLocaleLowerCase().includes(b.value.toLocaleLowerCase())&&(Ae[be]=ve)}),Ae}),g=J(()=>!(s.value<=0||_.value.length<s.value));He(c,()=>{_.value=c.value.filter(Ae=>o.value[Ae]!==void 0)},{immediate:!0}),He($,()=>{p()});function p(){if(v.value<=0){v.value=0;return}const Ae=Object.keys($.value).length-1;v.value>=Ae&&(v.value=Ae)}He(v,()=>{var be;if(v.value===null)return;const Ae=(be=u.value)==null?void 0:be.querySelector(`[data-list-offset="${v.value}"]`);Ae&&Ae.scrollIntoView({block:"nearest",inline:"nearest"})});function w(){const Ae=Object.keys(o.value),be=_.value.filter(ve=>Ae.includes(ve));n("change",be)}function S(Ae){const be=_.value.indexOf(Ae);be!==-1&&(_.value.splice(be,1),v.value=null),w()}function F(){_.value.pop(),w()}async function Z(Ae=!1){A.value="hidden",b.value="",Ae&&(await Fn(),u.value&&(u.value.tabIndex=0,u.value.focus()))}function re(Ae){const be=Ae.key;if(be=="Escape"){Ae.preventDefault(),Z(!0);return}if(be!=="Tab"&&be!=="Shift"&&A.value=="hidden"){Ke();return}if(be=="Enter"){if(v.value===null)return;const ve=Object.keys($.value);if(!ve||ve.length==0)return;Oe(ve[v.value]);return}if(be=="ArrowUp"){if(Ae.preventDefault(),v.value===null){const ve=Object.keys($.value).length-1;v.value=ve;return}v.value--,p();return}if(be=="ArrowDown"){if(Ae.preventDefault(),v.value===null){v.value=0;return}v.value++,p();return}}function ce(Ae){i.value=="multiple"&&Ae.key=="Backspace"&&!b.value&&F()}async function Oe(Ae){if(i.value=="single")_.value=[];else if(_.value.includes(Ae))return;_.value.push(Ae),w(),b.value="",_.value.length==s.value&&Z(!0),await Fn(),m.value.scrollTop=m.value.scrollHeight}function ge(Ae){const be=Ae.relatedTarget;u.value&&(u.value.contains(be)||Z(!1))}function we(Ae){const be=Ae.relatedTarget;u.value&&(u.value.contains(be)||Z(!0))}function _e(Ae){Ae.target.dataset.preventList||Ke()}async function Ke(){var ve;if(A.value!=="hidden")return;const{bottom:Ae}=u.value.getBoundingClientRect(),be=document.body.clientHeight;Rh+Ae>=be?A.value="top":A.value="bottom",await Fn(),u.value.tabIndex=-1,(ve=d.value)==null||ve.focus()}function Ee(Ae){v.value=Ae}return(Ae,be)=>(E(),M("div",{id:P(a),ref_key:"rootEl",ref:u,class:"BaseSelect colorTransformer",tabindex:"0","data-mode":P(i),"data-list-position":A.value,role:"listbox","aria-activedescendant":v.value?`${P(a)}-option-${v.value}`:void 0,onKeydown:re,onClick:_e,onFocusout:ge},[W("div",{ref_key:"selectedOptionsEl",ref:m,class:"selectedOptions"},[sn(W("div",aN,[P(l)?(E(),M(Ve,{key:0},[Dt(Pe(P(l)),1)],64)):P(i)=="multiple"&&P(s)>0?(E(),M(Ve,{key:1},[Dt("Select up to "+Pe(P(s))+" option"+Pe(P(s)>1?"s":"")+"...",1)],64)):P(i)=="multiple"?(E(),M(Ve,{key:2},[Dt("Select options....")],64)):P(i)=="single"?(E(),M(Ve,{key:3},[Dt("Select an option...")],64)):Se("",!0)],512),[[Wn,_.value.length==0]]),(E(!0),M(Ve,null,It(_.value,ve=>{var me,O;return E(),M("div",{key:ve,class:it(["option",{notFound:!((me=P(o))!=null&&me[ve])}]),"aria-selected":"true"},[(O=P(o))!=null&&O[ve]?(E(),M("div",oN,Pe(P(o)[ve]),1)):(E(),M("div",sN,Pe(ve),1)),W("div",{class:"remove","data-prevent-list":"true","aria-label":"Remove",onClick:fe=>S(ve)},be[1]||(be[1]=[W("i",{class:"material-symbols-outlined"}," close ",-1)]),8,iN)],2)}),128)),sn(W("input",{ref_key:"inputEl",ref:d,"onUpdate:modelValue":be[0]||(be[0]=ve=>b.value=ve),type:"text","aria-autocomplete":"none",tabindex:"-1",onKeydown:ce,onBlur:we},null,544),[[Ua,b.value]])],512),sn(W("div",{ref_key:"listEl",ref:y,class:"list"},[(E(!0),M(Ve,null,It($.value,(ve,me,O)=>(E(),M("div",{id:`${P(a)}-option-${O}`,key:`${O}-${me}`,class:it(["option",{highlighted:v.value==O}]),role:"option","data-list-offset":O,"data-prevent-list":"true",onMousemove:fe=>Ee(O),onClick:fe=>Oe(me)},Pe(ve),43,lN))),128)),Object.keys($.value).length==0?(E(),M("div",cN,[P(i)=="multiple"&&g.value?(E(),M(Ve,{key:0},[Dt("Up to "+Pe(P(s))+" option"+Pe(P(s)>1?"s":"")+" allowed.",1)],64)):(E(),M(Ve,{key:1},[Dt("No results")],64))])):Se("",!0)],512),[[Wn,A.value!=="hidden"]])],40,rN))}}),ky=Ne(uN,[["__scopeId","data-v-6871b972"]]),dN="A user input component that allows users to select multiple values from a searchable list of options.",fN={a:"Option A",b:"Option B"},pN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,hN={writer:{name:"Multiselect Input",description:dN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:G.KeyValue,default:JSON.stringify(fN,null,2),validator:ya},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:G.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:G.Number,default:"0",validator:jn},accentColor:{...Zt,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:G.Color,default:St.White,desc:"The colour of the text in the chips.",category:ze.Style,applyStyleVariable:!0},primaryTextColor:zt,secondaryTextColor:Un,containerBackgroundColor:kr,separatorColor:en,cssClasses:tt},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:pN.trim(),bindable:!0}}}},mN=ke({...hN,__name:"CoreMultiselectInput",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>t.options.value),r=J(()=>t.maximumCount.value),a=$e(null),o=ne(oe.core),s=ne(oe.instancePath),i=ne(oe.flattenedInstancePath),{formValue:l,handleInput:c}=dn(o,s,a);function u(d){c(d,"wf-options-change")}return(d,m)=>(E(),je(Cn,{ref_key:"rootInstance",ref:a,label:P(t).label.value,class:"CoreMultiselectInput"},{default:Ze(()=>[Ge(ky,{"base-id":P(i),"active-value":P(l),options:n.value,"maximum-count":r.value,mode:"multiple",placeholder:P(t).placeholder.value,onChange:u},null,8,["base-id","active-value","options","maximum-count","placeholder"])]),_:1},8,["label"]))}}),vN=Ne(mN,[["__scopeId","data-v-3b9fe936"]]),gN=["value","placeholder","min","max","step"],yN="A user input component that allows users to enter numeric values.",Lh=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,_N={writer:{name:"Number Input",description:yN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},placeholder:{name:"Placeholder",type:G.Text},minValue:{name:"Minimum value",type:G.Number,default:null},maxValue:{name:"Max value",type:G.Number,default:null},valueStep:{name:"Step",type:G.Number,default:"1"},cssClasses:tt},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:Lh,bindable:!0},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Lh}}}},bN=ke({..._N,__name:"CoreNumberInput",setup(e){const t=ne(oe.evaluatedFields),n=et("rootInstance"),r=et("inputEl"),a=ne(oe.core),o=ne(oe.instancePath),{formValue:s,handleInput:i}=dn(a,o,n);function l(){if(r.value.value=="")return null;let d=parseFloat(r.value.value);return isNaN(d)||(t.minValue.value!==null&&d<t.minValue.value&&(d=t.minValue.value,r.value.value=d),t.maxValue.value!==null&&d>t.maxValue.value&&(d=t.maxValue.value,r.value.value=d)),d}function c(){const d=l();isNaN(d)||i(d,"wf-number-change")}function u(){const d=l();isNaN(d)||i(d,"wf-number-change-finish")}return(d,m)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreNumberInput"},{default:Ze(()=>[W("input",{ref_key:"inputEl",ref:r,type:"number",value:P(s),placeholder:P(t).placeholder.value,min:P(t).minValue.value!==null?P(t).minValue.value:void 0,max:P(t).maxValue.value!==null?P(t).maxValue.value:void 0,step:P(t).valueStep.value!==null?P(t).valueStep.value:void 0,onInput:c,onChange:u},null,40,gN)]),_:1},8,["label"]))}}),wN=Ne(bN,[["__scopeId","data-v-b6fee345"]]),AN=["id","checked","value","name","onInput"],CN=["for"],$N="A user input component that allows users to choose a single value from a list of options using radio buttons.",SN={a:"Option A",b:"Option B"},IN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected radio option

	state["selected"] = payload`,EN={writer:{name:"Radio Input",description:$N,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:G.KeyValue,default:JSON.stringify(SN,null,2),validator:ya},orientation:{name:"Orientation",type:G.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:ze.Style,desc:"Specify how to lay out the options."},primaryTextColor:zt,accentColor:Zt,cssClasses:tt},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:IN.trim(),bindable:!0}}}},kN=ke({...EN,__name:"CoreRadioInput",setup(e){const t=ne(oe.evaluatedFields),n=ne(oe.flattenedInstancePath),r=$e(null),a=ne(oe.core),o=ne(oe.instancePath),{formValue:s,handleInput:i}=dn(a,o,r);return(l,c)=>(E(),je(Cn,{ref_key:"rootInstance",ref:r,label:P(t).label.value,class:"CoreRadioInput"},{default:Ze(()=>[W("div",{class:it(["options",{horizontal:P(t).orientation.value=="horizontal"}])},[(E(!0),M(Ve,null,It(P(t).options.value,(u,d)=>(E(),M("div",{key:d,class:"option"},[W("input",{id:`${P(n)}-option-${d}`,type:"radio",checked:P(s)===d,value:d,name:`${P(n)}-options`,onInput:m=>P(i)(d,"wf-option-change")},null,40,AN),W("label",{for:`${P(n)}-option-${d}`},Pe(u),9,CN)]))),128))],2)]),_:1},8,["label"]))}}),TN=Ne(kN,[["__scopeId","data-v-09078390"]]),xN="A user input component that allows users to select a single value from a searchable list of options.",PN={a:"Option A",b:"Option B"},MN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,NN={writer:{name:"Select Input",description:xN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:G.KeyValue,default:JSON.stringify(PN,null,2),validator:ya},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:G.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:G.Number,default:"0",validator:jn},accentColor:Zt,chipTextColor:{name:"Chip text",type:G.Color,default:St.White,desc:"The color of the text in the chips.",category:ze.Style,applyStyleVariable:!0},primaryTextColor:zt,secondaryTextColor:Un,containerBackgroundColor:kr,separatorColor:en,cssClasses:tt},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:MN.trim(),bindable:!0}}}},ON=ke({...NN,__name:"CoreSelectInput",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>t.options.value),r=$e(null),a=ne(oe.core),o=ne(oe.flattenedInstancePath),s=ne(oe.instancePath),{formValue:i,handleInput:l}=dn(a,s,r);function c(u){const d=(u==null?void 0:u[0])??null;l(d,"wf-option-change")}return(u,d)=>(E(),je(Cn,{ref_key:"rootInstance",ref:r,label:P(t).label.value,class:"CoreSelectInput"},{default:Ze(()=>[Ge(ky,{"base-id":P(o),"active-value":P(i)?[P(i)]:[],options:n.value,"maximum-count":1,mode:"single",placeholder:P(t).placeholder.value,onChange:c},null,8,["base-id","active-value","options","placeholder"])]),_:1},8,["label"]))}}),RN=Ne(ON,[["__scopeId","data-v-f2ad3b94"]]);function cl(e,t){const n=J(()=>{var r;return((r=String(t.value).split(".")[1])==null?void 0:r.length)??0});return J(()=>Number(e.value).toFixed(n.value))}const LN={class:"BaseInputRange__popover__content"},DN=ke({__name:"BaseInputSliderThumb",props:Hr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},sliderBoundingRect:{type:Object,default:void 0},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e,{expose:t}){const n=e;t({handleMouseDown:y,getOffsetLeft:b});const r=qr(e,"value"),a=et("thumb"),o=cl(r,ha(n,"step")),s=J(()=>typeof r.value!="number"?50:(r.value-n.min)/(n.max-n.min)*100),i=$e(n.popoverDisplayMode==="always");let l=null;He(ha(n.popoverDisplayMode),()=>{n.popoverDisplayMode==="always"&&(i.value=!0)});function c(){n.popoverDisplayMode!=="always"&&(i.value=!0,l&&(clearTimeout(l),l=null),l=setTimeout(()=>{i.value=!1,l=null},1e3))}const u=J(()=>`${s.value}%`),d=J(()=>`${s.value}%`);function m(v){if(c(),n.min!==void 0&&v<n.min||n.max!==void 0&&v>n.max)return;const _=v-n.min,A=Math.round(_/n.step),$=n.min+A*n.step;r.value!==$&&(r.value=$)}function y(v){document.addEventListener("mousemove",A),document.addEventListener("mouseup",$);const _=n.sliderBoundingRect;A(v);function A(g){const p=(g.x-_.left)/(_.right-_.left);if(p>1||p<0)return;const w=(n.max-n.min)*p+n.min;m(w)}function $(){document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",A)}}function b(){return a.value.offsetLeft}return(v,_)=>(E(),M(Ve,null,[Ge(Ev,null,{default:Ze(()=>[sn(W("div",{class:"BaseInputRange__popover",style:mt({left:d.value})},[W("span",LN,Pe(P(o)),1)],4),[[Wn,i.value]])]),_:1}),W("button",{ref_key:"thumb",ref:a,type:"button",class:"BaseInputRange__thumb",style:mt({left:u.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[_[0]||(_[0]=ga(A=>m(+r.value-e.step),["left"])),_[1]||(_[1]=ga(A=>m(+r.value+e.step),["right"]))],onMousedown:y},null,36)],64))}}),Ty=Ne(DN,[["__scopeId","data-v-f2261a8d"]]),FN=["aria-valuemin","aria-valuemax"],jN=ke({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(E(),M("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:it(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[Ht(t.$slots,"default",{},void 0,!0)],10,FN))}}),xy=Ne(jN,[["__scopeId","data-v-4583336d"]]);function Py(e,t=500){const n=$e(),r=setInterval(()=>{var a;n.value=(a=e.value)==null?void 0:a.getBoundingClientRect()},t);return tr(()=>{clearInterval(r)}),J(()=>n.value)}const BN=9,VN=ke({__name:"BaseInputSlider",props:Hr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=qr(e,"value"),r=et("slider"),a=et("thumb"),o=cl(n,ha(t,"step")),s=J(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),i=Py(r);return He(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),He(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(l,c)=>(E(),je(xy,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${P(o)} (${Math.round(s.value)}%)`},{default:Ze(()=>[W("div",{ref_key:"slider",ref:r,class:"BaseInputRange__slider",onMousedown:c[0]||(c[0]=(...u)=>P(a).handleMouseDown&&P(a).handleMouseDown(...u))},[W("div",{class:"BaseInputRange__slider__progress",style:mt({width:`calc(${s.value}% + ${BN}px)`})},null,4)],544),Ge(Ty,{ref_key:"thumb",ref:a,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":P(i),"onUpdate:value":c[1]||(c[1]=u=>n.value=u)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect"])]),_:1},8,["min","max","popover-display-mode","aria-valuenow","aria-valuetext"]))}}),UN="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",HN=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,zN={writer:{name:"Slider Input",description:UN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},minValue:{name:"Minimum value",type:G.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:G.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:G.Number,default:"1",init:"1",validator:jn},accentColor:Zt,popoverColor:{name:"Popover color",type:G.Color,category:ze.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:G.Color,category:ze.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:tt},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:HN,bindable:!0}}}},KN=ke({...zN,__name:"CoreSliderInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n,50);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSliderInput"},{default:Ze(()=>[Ge(VN,{"popover-display-mode":"always",value:P(o),min:P(t).minValue.value,max:P(t).maxValue.value,step:P(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>P(s)(c,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),WN=Ne(KN,[["__scopeId","data-v-c2e33d68"]]),qN=9,GN=ke({__name:"BaseInputSliderRange",props:Hr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Array,default:()=>[20,60]},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=qr(e,"value");function r(_,A){const $=[...n.value];$[_]=A,n.value=$.sort((g,p)=>g-p)}const a=et("slider"),o=et("thumbs");function s(_){const A=o.value[0],$=o.value[1],g=Math.abs(_.x-A.getOffsetLeft()),p=Math.abs(_.x-$.getOffsetLeft());g>p?$.handleMouseDown(_):A.handleMouseDown(_)}const i=J(()=>Math.min(...n.value)),l=J(()=>Math.max(...n.value)),c=ha(t,"step"),u=cl(i,c),d=cl(l,c),m=J(()=>`from ${u} to ${d}`),y=J(()=>typeof i.value!="number"?50:(i.value-t.min)/(t.max-t.min)*100),b=J(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100-y.value),v=Py(a);return He(()=>t.min,()=>{n.value.some(_=>_<t.min)&&(n.value=n.value.map(_=>_<t.min?t.min:_))},{immediate:!0}),He(()=>t.max,()=>{n.value.some(_=>_>t.max)&&(n.value=n.value.map(_=>_>t.max?t.max:_))},{immediate:!0}),(_,A)=>(E(),je(xy,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":m.value},{default:Ze(()=>[W("div",{ref_key:"slider",ref:a,class:"BaseInputRange__slider",onMousedown:s},[W("div",{class:"BaseInputRange__slider__progress",style:mt({width:`calc(${b.value}% + ${qN}px)`,marginLeft:`${y.value}%`})},null,4)],544),(E(),M(Ve,null,It([0,1],$=>Ge(Ty,{key:$,ref_for:!0,ref_key:"thumbs",ref:o,value:e.value[$],min:e.min,max:e.max,step:c.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":P(v),"onUpdate:value":g=>r($?1:0,g)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect","onUpdate:value"])),64))]),_:1},8,["min","max","popover-display-mode","aria-valuetext"]))}}),JN="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",YN=`
def onchange_handler(state, payload):

	# Set the state variables "from" & "to" to the new range
	state["from"] = payload[0]
	state["to"] = payload[1]`,QN={writer:{name:"Slider Range Input",description:JN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},minValue:{name:"Minimum value",type:G.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:G.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:G.Number,default:"1",init:"1",validator:jn},accentColor:Zt,popoverColor:{name:"Popover color",type:G.Color,category:ze.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:G.Color,category:ze.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:tt},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:YN,bindable:!0}}}},XN=ke({...QN,__name:"CoreSliderRangeInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n,[20,50]);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSliderInput"},{default:Ze(()=>[Ge(GN,{"popover-display-mode":"always",value:P(o),min:P(t).minValue.value,max:P(t).maxValue.value,step:P(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>P(s)(c,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),ZN=Ne(XN,[["__scopeId","data-v-6297ca8b"]]),eO=["type","value","placeholder"],tO="A user input component that allows users to enter single-line text values.",Dh=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,nO={writer:{name:"Text Input",description:tO,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},placeholder:{name:"Placeholder",type:G.Text},passwordMode:{...$t,name:"Password mode",default:"no",category:ze.Style},accentColor:Zt,cssClasses:tt},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Dh,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Dh}}}},rO=ke({...nO,__name:"CoreTextInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTextInput"},{default:Ze(()=>[W("input",{type:P(t).passwordMode.value?"password":"text",value:P(o),placeholder:P(t).placeholder.value,"aria-autocomplete":"none",onInput:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-change-finish"))},null,40,eO)]),_:1},8,["label"]))}}),aO=Ne(rO,[["__scopeId","data-v-46ecfa7d"]]),oO=["value","placeholder","rows"],sO="A user input component that allows users to enter multi-line text values.",Fh=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,iO={writer:{name:"Textarea Input",description:sO,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},placeholder:{name:"Placeholder",type:G.Text,control:Tl.Textarea},rows:{name:"Rows",type:G.Number,init:"5",default:"5",validator:jn},cssClasses:tt},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Fh,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Fh}}}},lO=ke({...iO,__name:"CoreTextareaInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTextareaInput"},{default:Ze(()=>[W("textarea",{value:P(o),placeholder:P(t).placeholder.value,rows:P(t).rows.value,onInput:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-change-finish"))},null,40,oO)]),_:1},8,["label"]))}}),cO=Ne(lO,[["__scopeId","data-v-aa91e798"]]),uO=["value"],dO="A user input component that allows users to select a time.",fO=`
def onchange_handler(state, payload):

	# Set the state variable "new_time" to the new value, provided as a hh:mm string (in 24-hour format that includes leading zeros).

	state["new_time"] = payload`,pO={writer:{name:"Time Input",description:dO,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},cssClasses:tt},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:fO,bindable:!0}}}},hO=ke({...pO,__name:"CoreTimeInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n);return(i,l)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTimeInput"},{default:Ze(()=>[W("input",{type:"time",value:P(o),onChange:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-time-change"))},null,40,uO)]),_:1},8,["label"]))}}),mO=Ne(hO,[["__scopeId","data-v-fa21b0e5"]]),vO={key:0,class:"filler light"},gO={key:1,class:"face"},yO={viewBox:"0 0 100 100"},_O=["d"],bO="A user input component that allows users to provide a rating.",wO=`
def onchange_handler(state, payload):

	# Set the state variable "rating" to the new value

	state["rating"] = payload`,AO={writer:{name:"Rating Input",description:bO,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},feedback:{name:"Feedback",default:"stars",type:G.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:G.Number,default:"1",desc:"Valid values are 0 and 1.",validator:ws(0,1)},maxValue:{name:"Max value",type:G.Number,default:"5",desc:"Valid values are between 2 and 11.",validator:ws(2,11)},valueStep:{name:"Step",type:G.Number,default:"1",desc:"Valid values are between 0.25 and 1.",validator:ws(.25,1)},accentColor:Zt,primaryTextColor:zt,cssClasses:tt},events:{"wf-number-change":{stub:wO,bindable:!0}}}},CO=ke({...AO,__name:"CoreRatingInput",setup(e){const t=ne(oe.evaluatedFields),n=et("rootInstance"),r=et("unitsEl"),a=ne(oe.core),o=ne(oe.instancePath),s=$e(null),{formValue:i,handleInput:l}=dn(a,o,n);function c(p){const w=p.offsetX,S=r.value.querySelectorAll(".unit");let F=0;return S.forEach(Z=>{const re=Z;w>re.offsetLeft+re.offsetWidth?F++:w>re.offsetLeft&&(F+=(w-re.offsetLeft)/re.offsetWidth)}),F}function u(p){let w=Math.ceil(p/$.value)*$.value;return w=Math.max(Math.min(w,A.value),_.value),w}function d(p){const w=c(p);return u(w)}function m(p){const w=d(p);s.value=w}function y(){s.value=null}function b(p){const w=Math.max(Math.min(p,A.value),_.value),S=45,F=95,Z=(w-_.value)/(A.value-_.value),re=Z*-10,ce=70+re,Oe=S+Z*(F-S)+re;return`M30,${ce} Q50,${Oe} 70,${ce}`}function v(p){const w=d(p);l(w,"wf-number-change")}const _=J(()=>Math.max(Math.min(t.minValue.value,1),0)),A=J(()=>Math.max(Math.min(t.maxValue.value,11),2)),$=J(()=>Math.max(Math.min(t.valueStep.value,1),.25)),g=J(()=>{if(s.value!==null)return s.value;const p=parseFloat(i.value);return isNaN(p)?null:p});return(p,w)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:P(t).label.value},{default:Ze(()=>[W("div",{ref_key:"unitsEl",ref:r,class:it(["units",{valueSet:g.value!==null}]),onClick:v,onMousemove:m,onMouseout:y},[(E(!0),M(Ve,null,It([...Array(A.value).keys()],S=>(E(),M("div",{key:S,class:it(["unit",P(t).feedback.value])},[W("div",{class:"filler",style:mt({width:`${g.value>S?Math.min(g.value-S,1)*100:0}%`})},null,4),g.value!==null?(E(),M("div",vO)):Se("",!0),P(t).feedback.value=="faces"?(E(),M("div",gO,[(E(),M("svg",yO,[w[0]||(w[0]=W("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),w[1]||(w[1]=W("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),W("path",{class:"mouth",d:b(g.value??S+1)},null,8,_O)]))])):Se("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),$O=Ne(CO,[["__scopeId","data-v-640d42e2"]]),SO=["aria-checked","onKeydown"],IO="A user input component with a simple on/off status.",EO=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,kO={writer:{name:"Switch Input",description:IO,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:G.Text},accentColor:Zt,primaryTextColor:zt,separatorColor:en,cssClasses:tt},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:EO.trim(),bindable:!0}}}},TO=ke({...kO,__name:"CoreSwitchInput",setup(e){const t=ne(oe.evaluatedFields),n=$e(null),r=ne(oe.core),a=ne(oe.instancePath),{formValue:o,handleInput:s}=dn(r,a,n);function i(){s(!o.value,"wf-toggle")}return(l,c)=>(E(),je(Cn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:Ze(()=>[W("div",{class:it(["switch",{on:!!P(o)}]),tabindex:"0",role:"switch","aria-checked":!!P(o),onClick:i,onKeydown:ga(Cr(i,["prevent"]),["enter","space"])},c[0]||(c[0]=[W("div",{class:"toggle"},null,-1)]),42,SO)]),_:1},8,["label"]))}}),xO=Ne(TO,[["__scopeId","data-v-ab3f108e"]]),PO=ke({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=J(()=>{const r={padding:t.contentPadding};return t.isHorizontal?{...r,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...r,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(r,a)=>(E(),M("div",{class:it(["BaseContainer",{horizontal:t.isHorizontal}]),style:mt(n.value),"data-writer-container":""},[Ht(r.$slots,"default",{},void 0,!0)],6))}}),Hs=Ne(PO,[["__scopeId","data-v-4caa740e"]]),MO={class:"BaseCollapseIcon__icon material-symbols-outlined"},NO=ke({__name:"BaseCollapseButton",props:Hr({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=qr(e,"modelValue"),r=J(()=>{switch(t.direction){case"left-right":return"chevron_left";case"top-bottom":return"keyboard_arrow_up";case"right-left":return"chevron_right";case"bottom-top":return"keyboard_arrow_down";default:return"keyboard_arrow_up"}});return(a,o)=>(E(),je(Yn,{class:it(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),variant:"tertiary",size:"icon",onClick:o[0]||(o[0]=s=>n.value=!n.value)},{default:Ze(()=>[W("i",MO,Pe(r.value),1)]),_:1},8,["class"]))}}),Kd=Ne(NO,[["__scopeId","data-v-e3ca49f7"]]),OO={key:0,class:"header"},RO={key:0,class:"titleContainer"},LO={key:0},DO={key:1,class:"collapsedTitle"},FO={class:"transformed"},jO={class:"content"},BO="A layout component that organizes its child components in columns. Must be inside a Column Container component.",VO={writer:{name:"Column",description:BO,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:G.Text},width:{name:"Width (factor)",default:"1",init:"1",type:G.Number,desc:"Relative size when compared to other columns in the same container. A column of width 2 will be double the width of one with width 1.",category:ze.Style,validator:jn},isSticky:{...$t,name:"Sticky",default:"no",category:ze.Style},isCollapsible:Ud,startCollapsed:{...Ll,desc:"Only applied when the column is collapsible."},separatorColor:en,contentPadding:Fo,contentHAlign:Do,contentVAlign:Vd,cssClasses:tt}}},UO=ke({...VO,__name:"CoreColumn",setup(e){const t=ne(oe.instancePath),n=ne(oe.instanceData),r=ne(oe.core),a=ne(oe.componentId),o=ne(oe.evaluatedFields),s=J(()=>!!o.isCollapsible.value),i=$e(o.isCollapsible.value&&o.startCollapsed.value),l=J(()=>{let y;return i.value?y="0 0 32px":y=`${o.width.value} 0 0`,{flex:y}}),c=J(()=>{var y,b;return m.value>=((b=(y=d.value)==null?void 0:y.value)==null?void 0:b.minimumNonCollapsiblePosition)}),u=J(()=>c.value?"right-left":"left-right"),d=J(()=>{var y;for(let b=-1;b>-1*t.length;b--){const v=t.at(b);if(((y=r.getComponentById(v.componentId))==null?void 0:y.type)!=="columns")continue;return n.at(b)}return null}),m=J(()=>{var y;return(y=r.getComponentById(a))==null?void 0:y.position});return He([()=>o.isCollapsible.value,m],()=>{const y=d.value;y&&(y.value={minimumNonCollapsiblePosition:void 0})}),He(d,y=>{!y||!y.value||s.value||typeof y.value.minimumNonCollapsiblePosition<"u"&&m.value>=y.value.minimumNonCollapsiblePosition||(y.value.minimumNonCollapsiblePosition=m.value)},{immediate:!0,deep:!0}),(y,b)=>(E(),M("div",{class:it(["CoreColumn",{sticky:P(o).isSticky.value,collapsible:s.value,collapsibleToRight:c.value,collapsed:i.value}]),style:mt(l.value)},[P(o).title.value||s.value?(E(),M("div",OO,[i.value?Se("",!0):(E(),M("div",RO,[P(o).title.value?(E(),M("h3",LO,Pe(P(o).title.value),1)):Se("",!0)])),s.value?(E(),je(Kd,{key:1,modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=v=>i.value=v),class:"collapser",direction:u.value},null,8,["modelValue","direction"])):Se("",!0)])):Se("",!0),i.value&&P(o).title.value?(E(),M("div",DO,[W("div",FO,[W("div",jO,Pe(P(o).title.value),1)])])):Se("",!0),Ge(Hs,{class:"container","aria-expanded":s.value?i.value:null,"content-h-align":P(o).contentHAlign.value,"content-v-align":P(o).contentVAlign.value,"content-padding":P(o).contentPadding.value},{default:Ze(()=>[Ht(y.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),HO=Ne(UO,[["__scopeId","data-v-9ec0335d"]]),zO={class:"CoreColumns horizontal","data-writer-container":""},KO={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:tt}}},WO=ke({...KO,__name:"CoreColumns",setup(e){const t=ne(oe.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,r)=>(E(),M("div",zO,[Ht(n.$slots,"default",{},void 0,!0)]))}}),qO=Ne(WO,[["__scopeId","data-v-616070ed"]]),GO={class:"CoreHeader"},JO={class:"container horizontal","data-writer-container":""},YO="A container component that typically contains the main navigation elements.",QO={writer:{name:"Header",description:YO,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:G.Text},primaryTextColor:zt,cssClasses:tt},previewField:"text"}},XO=ke({...QO,__name:"CoreHeader",setup(e){const t=ne(oe.evaluatedFields);return(n,r)=>(E(),M("div",GO,[W("h1",null,Pe(P(t).text.value),1),W("div",JO,[Ht(n.$slots,"default",{},void 0,!0)])]))}}),ZO=Ne(XO,[["__scopeId","data-v-0dba4bfb"]]),eR="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",tR={writer:{name:"Horizontal Stack",description:eR,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...Fo,default:"0"},contentHAlign:Do,contentVAlign:Vd,cssClasses:tt}}},nR=ke({...tR,__name:"CoreHorizontalStack",setup(e){const t=ne(oe.evaluatedFields);return(n,r)=>(E(),je(Hs,{class:"CoreHorizontalStack","content-h-align":P(t).contentHAlign.value,"content-v-align":P(t).contentVAlign.value,"content-padding":P(t).contentPadding.value,"is-horizontal":!0},{default:Ze(()=>[Ht(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),rR=Ne(nR,[["__scopeId","data-v-a5e8d853"]]),aR="A container component that divides the layout into sections, with an optional title.",oR={writer:{name:"Section",description:aR,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:G.Text},isCollapsible:Ud,startCollapsed:Ll,accentColor:Zt,primaryTextColor:zt,secondaryTextColor:Un,containerBackgroundColor:kr,containerShadow:Lo,separatorColor:en,buttonColor:Tr,buttonTextColor:xr,buttonShadow:Aa,contentPadding:{...Fo,default:"16px"},contentHAlign:Do,cssClasses:tt},previewField:"title"}},sR=ke({...oR,__name:"CoreSection",setup(e){const t=ne(oe.evaluatedFields),n=J(()=>t.isCollapsible.value),r=$e(n.value&&t.startCollapsed.value);return(a,o)=>(E(),M("section",{class:it(["CoreSection",{"CoreSection--collapsible":n.value}])},[P(t).title.value||n.value?(E(),M("div",{key:0,class:it(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&r.value}])},[W("h3",null,Pe(P(t).title.value),1),n.value?(E(),je(Kd,{key:0,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),direction:"top-bottom"},null,8,["modelValue"])):Se("",!0)],2)):Se("",!0),r.value?Se("",!0):(E(),je(Hs,{key:1,"content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value,"aria-expanded":n.value?r.value:null},{default:Ze(()=>[Ht(a.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),iR=Ne(sR,[["__scopeId","data-v-8bef68a0"]]),lR="A visual component to create a separation between adjacent elements.",My={writer:{name:"Separator",description:lR,category:"Layout",fields:{separatorColor:en,cssClasses:tt}}},jh=e=>{e.writer&&(e.writer.docs=`_Separator_ components are used to separate layout elements. They can be used in most containers, including _Column Container_ to separate columns.

If the container flows horizontally (like a _Horizontal Stack_ or a _Column Container_) the _Separator_ will be a vertical line. Otherwise, it'll be a horizontal line.`)},cR={class:"CoreSeparator separator"};function uR(e,t,n,r,a,o){return E(),M("div",cR,t[0]||(t[0]=[W("div",{class:"line"},null,-1)]))}typeof jh=="function"&&jh(My);const dR=Ne(My,[["render",uR],["__scopeId","data-v-5abd9423"]]),fR={class:"collapserContainer"},pR={class:"container","data-writer-container":""},hR="A container component that organizes its children in a sidebar. Its parent must be a Page component.",mR={writer:{name:"Sidebar",description:hR,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...Ll,desc:void 0},sidebarBackgroundColor:{name:"Background",type:G.Color,category:ze.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:Zt,primaryTextColor:zt,secondaryTextColor:Un,containerBackgroundColor:kr,containerShadow:Lo,separatorColor:en,buttonColor:Tr,buttonTextColor:xr,buttonShadow:Aa,cssClasses:tt}}},vR=ke({...mR,__name:"CoreSidebar",setup(e){const t=ne(oe.evaluatedFields),n=$e(t.startCollapsed.value),r=ne(oe.core),a=ne(oe.builderManager),o=ne(oe.componentId),s=J(()=>a==null?void 0:a.firstSelectedId.value),i=$e(0),l=J(()=>({"max-height":`calc(100vh - ${i.value}px)`}));He(s,u=>{u&&c(u)&&(n.value=!1)});const c=u=>{const d=r.getComponentById(u);return!d||d.type=="root"?!1:d.parentId==o?!0:c(d.parentId)};return Xt(()=>{const u=document.querySelector(".ComponentRenderer");i.value=document.body.clientHeight-(u==null?void 0:u.parentElement.clientHeight)}),(u,d)=>(E(),M("div",{class:it(["CoreSidebar",{collapsed:n.value}]),style:mt(l.value)},[W("div",fR,[Ge(Kd,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=m=>n.value=m),direction:"left-right"},null,8,["modelValue"])]),W("div",pR,[Ht(u.$slots,"default",{},void 0,!0)])],6))}}),gR=Ne(vR,[["__scopeId","data-v-99b92063"]]),yR={class:"CoreTab"},_R=0,Bh=1,bR="A container component that displays its child components as a tab inside a Tab Container.",wR={writer:{name:"Tab",description:bR,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:G.Text},contentPadding:{...Fo,default:"16px"},contentHAlign:Do,cssClasses:tt},previewField:"name"}},AR=ke({...wR,__name:"CoreTab",setup(e){const t=ne(oe.evaluatedFields),n=ne(oe.instancePath),r=ne(oe.instanceData),a=ne(oe.core),o=ne(oe.builderManager),s=ne(oe.componentId),{isComponentVisible:i}=Fl(a),l=J(()=>o==null?void 0:o.firstSelectedId.value),c=()=>{for(let p=-2;p>-1*n.length;p--){const w=n.at(p),{type:S}=a.getComponentById(w.componentId);if(S==="tabs")return p+1}},u=J(()=>{const p=c();return n.at(p)}),d=J(()=>u==null?void 0:u.value.instanceNumber),m=J(()=>d.value===_R),y=J(()=>d.value===Bh),b=J(()=>i(s)?m.value||y.value&&g.value:!1),v=()=>{for(let p=-1;p>-1*n.length;p--){const w=n.at(p),{type:S}=a.getComponentById(w.componentId);if(S==="tabs")return r.at(p)}},_=()=>{const p=c(),w=n.slice(0,p),S=p+1<0?n.slice(p+1):[];return[...w,{componentId:n.at(p).componentId,instanceNumber:Bh},...S]},A=()=>{const p=v();p.value={activeTab:_()}},$=p=>{const w=a.getComponentById(p);return!w||w.type=="root"?!1:w.parentId==s?!0:$(w.parentId)};He(l,p=>{p&&$(p)&&A()});const g=J(()=>{var F;let p;m.value?p=_():p=n;const S=(F=v().value)==null?void 0:F.activeTab;return JSON.stringify(S)==JSON.stringify(p)});return xo(()=>{var S;if(m.value)return;const p=v();(S=p.value)!=null&&S.activeTab||i(s,n)&&(p.value={activeTab:n})}),(p,w)=>sn((E(),M("div",yR,[m.value?(E(),M("button",{key:0,class:it(["bit",{active:g.value}]),tabindex:"0",onClick:A},Pe(P(t).name.value),3)):Se("",!0),y.value?sn((E(),je(Hs,{key:1,class:"container","content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value},{default:Ze(()=>[Ht(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[Wn,g.value]]):Se("",!0)],512)),[[Wn,b.value]])}}),CR=Ne(AR,[["__scopeId","data-v-63c66105"]]),$R={class:"CoreTabs"},SR={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},IR={class:"container"},ER="A container component for organising and displaying Tab components in a tabbed interface.",kR={writer:{name:"Tab Container",description:ER,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:Zt,primaryTextColor:zt,secondaryTextColor:Un,containerBackgroundColor:kr,containerShadow:Lo,separatorColor:en,buttonColor:Tr,buttonTextColor:xr,buttonShadow:Aa,cssClasses:tt}}},TR=ke({...kR,__name:"CoreTabs",setup(e){const t=ne(oe.instanceData);return t.at(-1).value={activeTab:void 0},(n,r)=>(E(),M("div",$R,[W("nav",SR,[Ht(n.$slots,"default",{instanceNumber:0},void 0,!0)]),W("div",IR,[Ht(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),xR=Ne(TR,[["__scopeId","data-v-46e04ad4"]]),PR={class:"CoreStep"},MR=["disabled"],NR={class:"indicator"},OR={key:0,class:"material-symbols-outlined"},RR={class:"label"},Ei=0,Bc=1,LR="A container component that displays its child components as a step inside a Step Container.",DR={writer:{name:"Step",description:LR,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:G.Text},contentPadding:{...Fo,default:"16px"},isCompleted:{...$t,name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no"},contentHAlign:Do,cssClasses:tt},previewField:"name"}},FR=ke({...DR,__name:"CoreStep",setup(e){const t=ne(oe.evaluatedFields),n=ne(oe.instancePath),r=ne(oe.instanceData),a=ne(oe.isBeingEdited),o=ne(oe.core),s=ne(oe.builderManager),i=ne(oe.componentId),{isComponentVisible:l}=Fl(o),c=J(()=>s==null?void 0:s.firstSelectedId.value),u=m();function d(){for(let p=-1;p>-1*n.length;p--){const w=n.at(p),S=o.getComponentById(w.componentId);if(!S)return;if(S.type==="steps")return p}}function m(){const p=d();if(!(typeof p>"u"))return r.at(p)}function y(){const p=d()+1,w=n.slice(0,p),S=p+1<0?n.slice(p+1):[];return[...w,{componentId:n.at(p).componentId,instanceNumber:Bc},...S]}function b(){u.value={...u.value,activeStep:y()}}function v(){const p=u.value.steps.findIndex(F=>JSON.stringify(F.instancePath)==JSON.stringify(n));if(p==-1||p+1>u.value.steps.length)return;let S=u.value.steps.slice(p+1).find(F=>!F.isCompleted);S||(S=u.value.steps.at(-1)),u.value={...u.value,activeStep:S.instancePath}}function _(p){const w=o.getComponentById(p);return!w||w.type=="root"?!1:w.parentId==i?!0:_(w.parentId)}function A(){if(!t.isCompleted.value){b();return}v()}const $=J(()=>{const p=d()+1;return n.at(p)});He(c,p=>{p&&_(p)&&b()});const g=J(()=>{var S;let p;($==null?void 0:$.value.instanceNumber)==Ei?p=y():p=n;const w=(S=u.value)==null?void 0:S.activeStep;return JSON.stringify(w)==JSON.stringify(p)});return He([g,t.isCompleted],()=>{a.value||g.value&&t.isCompleted.value&&v()}),He(t.isCompleted,(p,w)=>{w&&(p||A())}),xo(()=>{var w;($==null?void 0:$.value.instanceNumber)==Ei||(typeof u.value.steps.find(S=>S.instancePath==n)>"u"&&u.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(w=u.value)==null?void 0:w.activeStep)||l(i,n)&&A()}),wa(()=>{const p=u.value.steps.findIndex(w=>JSON.stringify(w.instancePath)==JSON.stringify(n));u.value.steps.splice(p,1)}),(p,w)=>{var S,F,Z,re;return sn((E(),M("div",PR,[((S=$.value)==null?void 0:S.instanceNumber)==Ei?(E(),M("button",{key:0,class:it(["bit",{active:g.value,completed:P(t).isCompleted.value}]),disabled:!P(a),stepindex:"0",onClick:b},[W("div",NR,[w[0]||(w[0]=W("div",{class:"linker left"},null,-1)),W("div",{class:it(["status",{completed:P(t).isCompleted.value}])},[P(t).isCompleted.value?(E(),M("i",OR," done ")):Se("",!0)],2),w[1]||(w[1]=W("div",{class:"linker right"},null,-1))]),W("div",RR,Pe(P(t).name.value),1)],10,MR)):Se("",!0),((F=$.value)==null?void 0:F.instanceNumber)==Bc?sn((E(),je(Hs,{key:1,class:"container","content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value},{default:Ze(()=>[Ht(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[Wn,g.value]]):Se("",!0)],512)),[[Wn,((Z=$.value)==null?void 0:Z.instanceNumber)==Ei||((re=$.value)==null?void 0:re.instanceNumber)==Bc&&g.value]])}}}),jR=Ne(FR,[["__scopeId","data-v-ee7ef213"]]),BR={class:"CoreSteps"},VR={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},UR={class:"container"},HR="A container component for displaying Step components, allowing you to implement a stepped workflow.",zR={writer:{name:"Step Container",description:HR,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:Zt,primaryTextColor:zt,secondaryTextColor:Un,containerBackgroundColor:kr,containerShadow:Lo,separatorColor:en,buttonColor:Tr,buttonTextColor:xr,buttonShadow:Aa,cssClasses:tt}}},KR=ke({...zR,__name:"CoreSteps",setup(e){const t=ne(oe.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(r,a)=>(E(),M("div",BR,[W("nav",VR,[Ht(r.$slots,"default",{instanceNumber:0},void 0,!0)]),W("div",UR,[Ht(r.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),WR=Ne(KR,[["__scopeId","data-v-782ebf0b"]]),qR={key:0,class:"material-symbols-outlined"},GR=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,JR="A standalone button component that can be linked to a click event handler.",YR={writer:{name:"Button",description:JR,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:GR.trim()}},fields:{text:{name:"Text",init:"Button Text",type:G.Text},isDisabled:{...$t,name:"Disabled",default:"no",desc:"Disables all event handlers."},buttonColor:Tr,buttonTextColor:xr,icon:{name:"Icon",type:G.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:ze.Style},buttonShadow:Aa,separatorColor:en,cssClasses:tt},previewField:"text"}},Ny=ke({...YR,__name:"CoreButton",setup(e){const t=$e(null),n=ne(oe.evaluatedFields),r=ne(oe.isDisabled);He(n.isDisabled,o=>{r.value=o},{immediate:!0});function a(o){if(!t.value)return;const s=Us(o);t.value.$el.dispatchEvent(s)}return(o,s)=>(E(),je(Yn,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":P(r),onClick:a},{default:Ze(()=>[P(n).icon.value?(E(),M("i",qR,Pe(P(n).icon.value),1)):Se("",!0),Dt(" "+Pe(P(n).text.value),1)]),_:1},8,["aria-disabled"]))}}),Vh=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Button_.")};typeof Vh=="function"&&Vh(Ny);const QR=Ne(Ny,[["__scopeId","data-v-53c55a8b"]]),XR={padding:"16px","min-height":"64px","min-width":"64px","border-radius":"8px",background:"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)"},ZR="A generic component that creates customisable HTML elements, which can serve as containers for other components.",Oy={writer:{name:"HTML Element",description:ZR,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:G.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:"{}",init:JSON.stringify(XR,null,2),type:G.Object,desc:"Define the CSS styles to apply to the HTML element using a JSON object or a state reference to a dictionary.",validator:ya},attrs:{name:"Attributes",default:"{}",type:G.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference.",validator:ya},htmlInside:{name:"HTML inside",default:null,type:G.Text,control:Tl.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:tt}},setup(e,{slots:t}){const n=ne(oe.evaluatedFields),r=/^[a-zA-Z][a-zA-Z0-9-_:.]*$/,a=J(()=>{if(typeof n.attrs.value!="object"||n.attrs.value===null)return{};const o=Object.entries(n.attrs.value).filter(([s])=>r.test(s));return Object.fromEntries(o)});return()=>{let o;return n.htmlInside.value&&(o=ma("div",{innerHTML:n.htmlInside.value})),ma(n.element.value,{...a.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),o])}}},Uh=e=>{e.writer&&(e.writer.docs=`You can configure the element type, styles, and attributes to fit your design requirements. You can link them to state for advanced use cases, such as custom animations.

All valid HTML tags are supported, including tags such as \`iframe\`, allowing you to embed external sites.

Take into account the potential risks of adding custom HTML to your app, including XSS. Be specially careful when injecting user-generated data.`)};typeof Uh=="function"&&Uh(Oy);const eL={class:"pagination-left"},tL={class:"pagination-pagesize"},nL=["value","selected"],rL={class:"pagination-description"},aL={class:"bold"},oL={class:"bold"},sL={class:"bold"},iL={class:"pagination-right"},lL={class:"pagination-picker"},cL={key:0,class:"paginationpicker-block paginationpicker-neutral"},uL=["onClick"],dL={key:2,class:"paginationpicker-block paginationpicker-currentpage"},fL={class:"pagination-jump"},pL=["value"],hL=`
def handle_page_change(state, payload):
    page = payload
    state["page"] = page

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,mL=`
def handle_page_size_change(state, payload):
    state['pageSize'] = payload

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,vL={writer:{name:"Pagination",category:"Other",description:"A component that can help you paginate records, for example from a Repeater or a DataFrame.",fields:{page:{name:"Page",init:"1",default:"1",type:G.Number,desc:"The current page number.",validator:jn},pageSize:{name:"Page Size",default:"10",type:G.Number,desc:"The number of items per page.",validator:jn},totalItems:{name:"Total Items",default:"10",type:G.Number,desc:"The total number of items",validator:jn},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:G.Text,desc:"A comma-separated list of page size options. If it's empty, the user can't change the page size. Set your default page size as the first option."},pageSizeShowAll:{...$t,name:"Show All Option",default:"no",desc:"Show an option to show all records."},jumpTo:{...$t,name:"Jump To",default:"no",desc:"Show an option to jump to a specific page."}},events:{"wf-change-page":{desc:"Fires when the user pick a page",stub:hL.trim()},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:mL.trim()}}}},gL=ke({...vL,__name:"CorePagination",setup(e){const t=ne(oe.evaluatedFields),n=ne(oe.core),r=et("rootEl"),a=ne(oe.instancePath),{handleInput:o}=dn(n,a,r),{handleInput:s}=dn(n,a,r),i=J(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value),l=J(()=>t.jumpTo.value),c=J(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),u=J(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),d=J(()=>t.totalItems.value),m=J(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),y=J(()=>{let p=[];const w=t.pageSizeOptions.value.split(",");for(const S in w){const F=parseInt(w[S],10);p.push({value:F,label:`${F} items`})}return t.pageSizeShowAll.value&&p.push({value:d.value,label:"All items"}),p}),b=J(()=>{const p=[],w=parseInt(t.page.value);if(m.value<=7)for(let S=0;S<m.value;S++)p.push(S+1);else w==1||w==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):w==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(m.value-1),p.push(m.value)):w==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(m.value)):w==m.value||w==m.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):w==m.value-2?(p.push(1),p.push(2),p.push("..."),p.push(m.value-3),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):(p.push(1),p.push("..."),p.push(w-1),p.push(w),p.push(w+1),p.push("..."),p.push(m.value));return p}),v=J(()=>parseInt(t.page.value)-1<1),_=J(()=>parseInt(t.page.value)+1>m.value),A=p=>{if(p.target.value==="")return;let w=parseInt(p.target.value);w>m.value&&(w=m.value),o(w,"wf-change-page")},$=p=>{o(p,"wf-change-page")},g=p=>{let w=parseInt(p.target.value);s(w,"wf-change-page-size")};return He(t.page,()=>{}),He(t.pageSize,()=>{}),Xt(()=>{}),tr(()=>{}),(p,w)=>(E(),M("div",{ref_key:"rootEl",ref:r,class:"CorePagination"},[W("div",eL,[sn(W("div",tL,[W("select",{class:"pagesize-select",onChange:g},[(E(!0),M(Ve,null,It(y.value,(S,F)=>(E(),M("option",{key:F,value:S.value,selected:S.value==P(t).pageSize.value},Pe(S.label),9,nL))),128))],32)],512),[[Wn,i.value]]),W("div",rL,[w[2]||(w[2]=Dt(" Showing ")),W("span",aL,Pe(c.value),1),w[3]||(w[3]=Dt(" to ")),W("span",oL,Pe(u.value),1),w[4]||(w[4]=Dt(" of ")),W("span",sL,Pe(d.value),1),w[5]||(w[5]=Dt(" results "))])]),W("div",iL,[W("div",lL,[W("div",{class:it(["paginationpicker-block",{"paginationpicker-disabled":v.value}]),onClick:w[0]||(w[0]=S=>$(P(t).page.value-1))},w[6]||(w[6]=[W("i",{class:"material-symbols-outlined"}," navigate_before ",-1)]),2),(E(!0),M(Ve,null,It(b.value,(S,F)=>(E(),M(Ve,{key:F},[S=="..."?(E(),M("div",cL,Pe(S),1)):Se("",!0),S!="..."&&S!=P(t).page.value?(E(),M("div",{key:1,class:"paginationpicker-block",onClick:Z=>$(S)},Pe(S),9,uL)):Se("",!0),S==P(t).page.value?(E(),M("div",dL,Pe(S),1)):Se("",!0)],64))),128)),W("div",{class:it(["paginationpicker-block",{"paginationpicker-disabled":_.value}]),onClick:w[1]||(w[1]=S=>$(P(t).page.value+1))},w[7]||(w[7]=[W("i",{class:"material-symbols-outlined"}," navigate_next ",-1)]),2)]),sn(W("div",fL,[w[8]||(w[8]=W("label",null,"Jump to",-1)),W("input",{type:"text",value:P(t).page.value,onInput:A},null,40,pL)],512),[[Wn,l.value]])])],512))}}),yL=Ne(gL,[["__scopeId","data-v-77e0c6df"]]),_L="A container component that repeats its child components based on a dictionary.",bL={a:{desc:"Option A"},b:{desc:"Option B"}},wL={writer:{name:"Repeater",description:_L,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(bL,null,2),type:G.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object.",validator:FT},keyVariable:{name:"Key variable name",default:"itemId",init:"itemId",type:G.Text,desc:"Set the name of the variable that will store the key of the current repeater object entry."},valueVariable:{name:"Value variable name",default:"item",init:"item",type:G.Text,desc:"Set the name of the variable that will store the value of the current repeater object entry."}}},setup(e,{slots:t}){const n=ne(oe.core),r=ne(oe.componentId),a=ne(oe.evaluatedFields),o=ne(oe.isBeingEdited),s=ne(oe.renderProxiedComponent),i=J(()=>n.getComponents(r,{sortedByPosition:!0})),l=()=>typeof a.repeaterObject.value!="object"?[]:Object.values(a.repeaterObject.value).map((u,d)=>i.value.map(m=>s(m.id,d)));return()=>{let c={};return i.value.length!=0&&a.repeaterObject.value!=null&&Object.keys(a.repeaterObject.value).length!=0?c=l():o.value===!0?c=t.default({}):c={},ma("div",{class:"CoreRepeater","data-writer-container":""},c)}}},AL=Ne(wL,[["__scopeId","data-v-0b783e59"]]),CL="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",$L=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),SL={writer:{name:"Timer",description:CL,category:"Other",fields:{intervalMs:{name:"Interval (ms)",desc:"How much time to wait between ticks. A tick is considered finished when its event is handled.",default:"200",type:G.Number,validator:jn},isActive:{...$t,name:"Active",default:"yes",desc:"Whether the timer should trigger tick events."},accentColor:Zt,cssClasses:tt},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:$L.trim()}}}},IL=ke({...SL,__name:"CoreTimer",setup(e){const r=ne(oe.evaluatedFields),a=ne(oe.core),o=et("rootEl"),s=J(()=>r.intervalMs.value),i=J(()=>r.isActive.value),l=$e(!1),c=ne(oe.componentId),u=J(()=>{var _,A;return!!((A=(_=a.getComponentById(c))==null?void 0:_.handlers)!=null&&A["wf-tick"])}),d=J(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));He([i,s],()=>{v()}),He(u,async _=>{_&&(await Fn(),v())});let m=0,y=null;function b(){clearTimeout(y)}function v(){if(b(),!i.value||s.value<0||!o.value)return;Date.now()-m>=500&&(o.value.classList.remove("tick"),o.value.offsetWidth,m=Date.now(),o.value.classList.add("tick"));const _=({ok:$})=>{l.value=!$,y=setTimeout(()=>{v()},s.value)},A=new CustomEvent("wf-tick",{detail:{callback:_}});o.value.dispatchEvent(A)}return Xt(()=>{v()}),(_,A)=>(E(),M("div",{ref_key:"rootEl",ref:o,class:it(["CoreTimer",{failing:l.value}]),style:mt(d.value)},null,6))}}),EL=Ne(IL,[["__scopeId","data-v-8e3b3227"]]),kL={class:"main"},TL={class:"actions"},xL=["value"],PL="A user input component that allows users to capture images using their webcam.",ML=`
def webcam_handler(payload):

	# This handler will save the captured images based on timestamp

	import time
	timestamp = time.time()

	# The payload is a file-like object which contains the captured image
	# in PNG format

	image_file = payload
	with open(f"capture-{timestamp}.png", "wb") as file_handle:
		file_handle.write(image_file)`.trim(),NL={writer:{name:"Webcam Capture",description:PL,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:G.Number,validator:jn},buttonColor:Tr,buttonTextColor:xr,buttonShadow:Aa,separatorColor:en,cssClasses:tt},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:ML.trim()}}}},OL=ke({...NL,__name:"CoreWebcamCapture",setup(e){const t=$e(!1),n=et("rootEl"),r=document.createElement("canvas"),a=et("videoEl"),o=ne(oe.evaluatedFields),s=$e(null),i=$e(null),l=Bn();Xt(async()=>{var _,A;s.value=await c(),i.value=(A=(_=s.value)==null?void 0:_[0])==null?void 0:A.deviceId}),wa(()=>{v()});const c=async()=>(await navigator.mediaDevices.enumerateDevices()).filter($=>$.kind=="videoinput"),u=J(()=>o.refreshRate.value);He(u,(_,A)=>{_>0&&A<=0&&y()}),He(i,async()=>{t.value&&(v(),await b())});const d=async()=>{if(t.value=!t.value,!t.value){v();return}await b(),y()},m=()=>(r.getContext("2d").drawImage(a.value,0,0),r.toDataURL("image/png")),y=()=>{const _=new CustomEvent("wf-webcam",{detail:{payload:m(),callback:()=>{u.value<=0||!t.value||setTimeout(()=>{y()},u.value)}}});n.value.dispatchEvent(_)},b=async()=>(a.value.style.display="",new Promise((_,A)=>{navigator.mediaDevices.getUserMedia||(l.error("This browser doesn't support webcam connection."),A());const $={video:!0};s.value.length>1&&($.video={deviceId:i.value}),navigator.mediaDevices.getUserMedia($).then(g=>{a.value.srcObject=g;const p=g.getVideoTracks()[0].getSettings().width,w=g.getVideoTracks()[0].getSettings().height;r.setAttribute("width",p.toString()),r.setAttribute("height",w.toString()),_()}).catch(g=>{l.error("An error occurred when trying to use the webcam.",g),A()})})),v=()=>{const _=a.value.srcObject;_&&_.getTracks().map($=>$.stop()),a.value.srcObject=null,a.value.style.display="none"};return(_,A)=>{var $;return E(),M("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[sn(W("div",kL,[W("video",{ref_key:"videoEl",ref:a,autoplay:"true"},null,512)],512),[[Wn,t.value]]),W("div",TL,[u.value==0?(E(),je(Yn,{key:0,onClick:y},{default:Ze(()=>A[1]||(A[1]=[Dt(" Capture image ")])),_:1})):Se("",!0),Ge(Yn,{onClick:d},{default:Ze(()=>[Dt(Pe(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),(($=s.value)==null?void 0:$.length)>1?(E(),je(Ey,{key:1,modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=g=>i.value=g)},{default:Ze(()=>[(E(!0),M(Ve,null,It(s.value,(g,p)=>(E(),M("option",{key:g.deviceId,value:g.deviceId},Pe(g.label||`Webcam ${p+1}`),9,xL))),128))]),_:1},8,["modelValue"])):Se("",!0)])],512)}}}),RL=Ne(OL,[["__scopeId","data-v-624c9808"]]),LL={writer:{name:"Reuse Component",slot:"*",description:"Those components are used to reuse other components. Reused components share the same state and are updated together.",category:"Other",allowedChildrenTypes:[],fields:{proxyId:{name:"Component id",type:G.Text,desc:"The id of the component to reuse."}}}},DL=ke({...LL,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=ne(oe.evaluatedFields),a=ne(oe.instancePath).at(-2).componentId,o=ne(oe.core),s=ne(oe.renderProxiedComponent),i=ne(oe.isBeingEdited),l=ne(oe.componentId),c=$e(ma("div","")),u=$e(!0),d=J(()=>{var v;return(v=o.getComponentById(n.proxyId.value))==null?void 0:v.type}),m=J(()=>d.value?o.getComponentDefinition(d.value):null);function y(v,_){u.value=t.contextSlot==="default",c.value=ma("div",{class:["CoreReuse",_],style:{color:"var(--primaryTextColor)"}},i.value?v:"")}function b(){if(!n.proxyId.value)return y("No component selected to reuse","empty");if(l===n.proxyId.value||!m.value)return y("The id specified for reuse doesn't match any component.","invalid-value");if(!o.getContainableTypes(a).includes(d.value))return y("The component cannot be reused here.","invalid-context");u.value=t.contextSlot===(m.value.slot??"default");const v=s(n.proxyId.value,0,{class:["CoreReuse"]});c.value=v}return He([n.proxyId,m],b,{immediate:!0}),(v,_)=>u.value?(E(),je(Po(c.value),{key:0})):Se("",!0)}}),FL={key:0,class:"controls"},jL={key:2},BL=["page"],VL="A component to embed PDF documents.",UL={writer:{name:"PDF",description:VL,category:"Embed",fields:{source:{name:"PDF source",type:G.Text,desc:"A valid URL. Alternatively, you can provide a state reference to a packed PDF file."},highlights:{name:"Highlights",default:JSON.stringify([]),desc:"A list of highlights to be applied to the PDF as a JSON array of strings.",type:G.Object,validator:ty},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:G.Number},page:{name:"Page",type:G.Number,desc:"The page to be displayed."},controls:{...$t,name:"Controls",desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:kr,separatorColor:en,primaryTextColor:zt,cssClasses:tt}}},HL=ke({...UL,__name:"CorePDF",setup(e){const t=ne(oe.evaluatedFields);let n,r,a;const o=J(()=>t.highlights.value?t.highlights.value.map(we=>we.replaceAll("|","\\|")).join("|"):""),s=$e({completeWords:!1,ignoreCase:!0}),i=$e(1),l=$e(1),c=$e([]),u=$e(0),d=et("rootEl"),m=et("viewerEl"),y=$e(!1),b=$e(0),v=$e([]);Xt(async()=>{const we=await Jt(()=>import("./index-BYnXncf8.js"),[],import.meta.url);a=we.VuePDF;const _e=we.usePDF;({pdf:n,pages:r}=_e(t.source)),_()});const _=()=>{y.value=!0,b.value=0,v.value=[],c.value=[]},A=we=>{v.value=[...v.value,we].sort((_e,Ke)=>_e.page-Ke.page)},$=we=>{b.value++},g=()=>{c.value=v.value.reduce((we,_e)=>[...we,..._e.matches.map((Ke,Ee)=>({page:_e.page,str:Ke.str,index:Ee}))],[]).sort((we,_e)=>we.page===_e.page?we.index-_e.index:we.page-_e.page)},p=()=>{g(),u.value&&F(u.value),t.selectedMatch.value&&(u.value=t.selectedMatch.value)},w=we=>{const _e=we.target.getBoundingClientRect(),Ke=[...we.target.children].filter(Ee=>Ee.className.includes("page")).find(Ee=>{const Ae=Ee.getBoundingClientRect(),be=Ae.y-_e.y;return be<_e.height/2&&be+Ae.height>_e.height/2});Ke&&(l.value=Number(Ke.getAttribute("page")))},S=(we,_e)=>{let Ke=0,Ee=we;for(;Ee&&Ee!==_e;)Ke+=Ee.offsetTop,Ee=Ee.offsetParent;return Ke},F=we=>{if(we<1||we>c.value.length)return;const _e=c.value[we-1];if(!_e)return;const Ee=d.value.querySelectorAll(`div[page='${_e.page}'] span.highlight`)[_e.index];m.value.scrollTop=S(Ee,m.value)},Z=we=>{if(we<1||we>r.value)return;const _e=d.value.querySelector("div[page='"+we+"']");m.value.scrollTop=S(_e,m.value)},re=()=>{u.value<c.value.length?u.value=u.value+1:u.value=1},ce=()=>{u.value>1?u.value=u.value-1:u.value=c.value.length},Oe=()=>{i.value=i.value<2?i.value+.1:i.value},ge=()=>{i.value=i.value>.25?i.value-.1:i.value};return He(b,()=>{b.value===r.value&&t.page.value&&Z(t.page.value)}),He([v,b],()=>{(!o.value||v.value.length===r.value)&&b.value===r.value&&(p(),y.value=!1)}),He(i,()=>{_()}),He(t.source,()=>{_()}),He(t.highlights,()=>{v.value=[],c.value=[]}),He(u,()=>{F(u.value)}),He(t.selectedMatch,()=>{u.value=t.selectedMatch.value}),He(t.page,()=>{Z(t.page.value)}),(we,_e)=>(E(),M("div",{ref_key:"rootEl",ref:d,class:"CorePDF"},[P(t).controls.value?(E(),M("div",FL,[Ge(ur,{onClick:_e[0]||(_e[0]=()=>Z(l.value-1))},{default:Ze(()=>_e[3]||(_e[3]=[W("i",{class:"material-symbols-outlined"},"arrow_upward",-1)])),_:1}),Ge(ur,{onClick:_e[1]||(_e[1]=()=>Z(l.value+1))},{default:Ze(()=>_e[4]||(_e[4]=[W("i",{class:"material-symbols-outlined"},"arrow_downward",-1)])),_:1}),(E(),M("span",{key:l.value},Pe(l.value)+" / "+Pe(P(r)),1)),Ge(ur,{disabled:y.value,onClick:Oe},{default:Ze(()=>_e[5]||(_e[5]=[W("i",{class:"material-symbols-outlined"},"zoom_in",-1)])),_:1},8,["disabled"]),Ge(ur,{disabled:y.value,onClick:ge},{default:Ze(()=>_e[6]||(_e[6]=[W("i",{class:"material-symbols-outlined"},"zoom_out",-1)])),_:1},8,["disabled"]),W("span",null,Pe(Math.round(i.value*100))+"%",1),_e[9]||(_e[9]=W("span",{class:"separator"},null,-1)),c.value.length?(E(),je(ur,{key:0,onClick:ce},{default:Ze(()=>_e[7]||(_e[7]=[W("i",{class:"material-symbols-outlined"},"navigate_before",-1)])),_:1})):Se("",!0),c.value.length?(E(),je(ur,{key:1,onClick:re},{default:Ze(()=>_e[8]||(_e[8]=[W("i",{class:"material-symbols-outlined"},"navigate_next",-1)])),_:1})):Se("",!0),c.value.length?(E(),M("span",jL,"Matches "+Pe(u.value)+" / "+Pe(c.value.length),1)):Se("",!0)])):Se("",!0),W("div",{ref_key:"viewerEl",ref:m,class:"viewer",onScroll:w},[(E(!0),M(Ve,null,It(P(r),Ke=>(E(),M("div",{key:Ke,page:Ke,class:"page"},[Ge(P(a),{scale:i.value,pdf:P(n),page:Ke,"text-layer":"","highlight-text":o.value,"highlight-options":s.value,onHighlight:_e[2]||(_e[2]=Ee=>A(Ee)),onLoaded:$},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,BL))),128))],544),_e[10]||(_e[10]=W("div",{class:"mask"},null,-1))],512))}}),zL=Ne(HL,[["__scopeId","data-v-aeb4c8ed"]]),KL={key:0,class:"noURLProvided"},WL=["src"],qL="A component to embed an external resource in an iframe.",GL=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,JL={writer:{name:"IFrame",description:qL,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:G.Text,validator:ry},separatorColor:en,cssClasses:tt},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:GL.trim()}}}},YL=ke({...JL,__name:"CoreIFrame",setup(e){const t=et("rootEl"),n=ne(oe.evaluatedFields);function r(){const a=new CustomEvent("wf-load");t.value.dispatchEvent(a)}return(a,o)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[P(n).src.value?(E(),M("iframe",{key:1,src:P(n).src.value,draggable:"false",onLoad:r},null,40,WL)):(E(),M("div",KL,o[0]||(o[0]=[W("h2",null,"No URL provided.",-1)]))),o[1]||(o[1]=W("div",{class:"mask"},null,-1))],512))}}),QL=Ne(YL,[["__scopeId","data-v-a3a63f75"]]),XL={key:0,class:"noAPIKeyProvided"},ZL="A component to embed a Google Map. It can be used to display a map with markers.",eD=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],tD={writer:{name:"Google Maps",description:ZL,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:G.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:G.Text},mapType:{name:"Map type",type:G.Text,default:"roadmap",options:{roadmap:"Roadmap",satellite:"Satellite",hybrid:"Hybrid",terrain:"Terrain"},desc:"One of 'roadmap', 'satellite', 'hybrid' or 'terrain'."},zoom:{name:"Zoom",default:"8",type:G.Number},lat:{name:"Latitude",default:"37.79322359164316",type:G.Number,validator:jd},lng:{name:"Longitude",default:"-122.39999318828129",type:G.Number,validator:Bd},markers:{name:"Markers",default:JSON.stringify(eD),desc:"Markers data",type:G.Object,validator:ny},cssClasses:tt},events:{"gmap-marker-click":{desc:"Capture single clicks on markers."},"gmap-click":{desc:"Capture single click on map."}}}},nD=ke({...tD,__name:"CoreGoogleMaps",setup(e){const t=et("rootEl"),n=et("mapEl"),r=ne(oe.evaluatedFields);let a=null,o=[];const s=J(()=>({lat:r.lat.value,lng:r.lng.value})),i=J(()=>["roadmap","satellite","hybrid","terrain"].includes(r.mapType.value)?r.mapType.value:"roadmap"),l=async()=>{u();const{Loader:d}=await Jt(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new d({apiKey:r.apiKey.value,version:"weekly"}).load(),a=new google.maps.Map(n.value,{center:s.value,mapTypeId:i.value,zoom:8,mapId:r.mapId.value}),a.addListener("click",y=>{const b=new CustomEvent("gmap-click",{detail:{payload:y.latLng.toJSON()}});t.value.dispatchEvent(b)}),c()},c=async()=>{if(!r.mapId.value||!r.markers.value)return;const{AdvancedMarkerElement:d}=await google.maps.importLibrary("marker");u(),r.markers.value.forEach(y=>{const b=new d({position:{lat:y.lat,lng:y.lng},map:a,title:y.name});o.push(b),b.addListener("click",()=>{const v=new CustomEvent("gmap-marker-click",{detail:{payload:y}});t.value.dispatchEvent(v)})})},u=()=>{o.forEach(d=>d.setMap(null)),o=[]};return Xt(async()=>{r.apiKey.value&&await l()}),He(s,async d=>{a&&a.setCenter(d)}),He(r.zoom,async d=>{a&&a.setZoom(d)}),He(i,async d=>{a&&a.setMapTypeId(d)}),He(r.markers,c),He(r.apiKey,l),He(r.mapId,l),(d,m)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[P(r).apiKey.value?(E(),M("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(E(),M("div",XL,m[0]||(m[0]=[W("h2",null,"Google Maps cannot be initialised.",-1),W("h3",null,"An API key hasn't been provided.",-1)]))),m[1]||(m[1]=W("div",{class:"mask"},null,-1))],512))}}),rD=Ne(nD,[["__scopeId","data-v-a422058f"]]),aD={class:"sidebarContainer"},oD=`
def handle_keydown(state, payload):
	# The payload is a dictionary containing the key code and modifier keys.
	# For example,
	# {
	#	"key": "ArrowDown",
	#	"ctrl_key": False,
	#	"shift_key": False,
	#	"meta_key": False
	# }

	key_activated = payload.get("key")
	delta = 0
	if key_activated == "ArrowLeft":
		delta += -10
	elif key_activated == "ArrowRight":
		delta += 10

	shift_key = payload.get("shift_key")
	if shift_key:
		delta *= 2 # Shift makes it go faster

	state["position"] += delta
`,sD=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,iD="A container component representing a single page within the application.",lD={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:oD},"wf-page-open":{desc:"Emitted when the page is opened.",stub:sD}},description:iD,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:G.IdKey},pageMode:{name:"Page mode",default:"compact",type:G.Text,options:{compact:"Compact",wide:"Wide"},category:ze.Style},accentColor:Zt,primaryTextColor:zt,secondaryTextColor:Un,emptinessColor:ay,containerBackgroundColor:kr,containerShadow:Lo,separatorColor:en,buttonColor:Tr,buttonTextColor:xr,buttonShadow:Aa,cssClasses:tt},previewField:"key"}},cD=ke({...lD,__name:"CorePage",setup(e){const t=et("rootEl"),n=ne(oe.evaluatedFields);function r(o){const s=Px(o),i=o.target;t.value.contains(i)&&t.value.dispatchEvent(s)}function a(){const o=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:o}});t.value.dispatchEvent(s)}return Xt(async()=>{document.addEventListener("keydown",r),a()}),tr(()=>{document.removeEventListener("keydown",r)}),(o,s)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[W("div",aD,[Ht(o.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),W("div",{class:it(["main",{compact:P(n).pageMode.value=="compact",wide:P(n).pageMode.value=="wide"}]),"data-writer-container":""},[Ht(o.$slots,"default",{},void 0,!0)],2)],512))}}),uD=Ne(cD,[["__scopeId","data-v-52076071"]]),dD=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function Wd(e=document.location.hash){var o;const n=(o=e.substring(1).match(dD))==null?void 0:o.groups,r=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:r,routeVars:new Map};const a=new URLSearchParams(n.routeVars);return{pageKey:r,routeVars:new Map(a.entries())}}function fD(){const e=Wd(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function pD(e){const{pageKey:t,routeVars:n}=e;let r="";if(t&&(r+=`${encodeURIComponent(t)}`),n.size>0){const a=new URLSearchParams([...n.entries()]);r+=`/${a.toString()}`}return r}function Ry(e){document.location.hash=pD(e)}function hD(e){const t=Wd();t.pageKey=e,Ry(t)}function n3(e){const t=Wd(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),Ry(t)}const mD=`
def handle_hashchange(state, payload):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#main/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#	  "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")

	if not route_vars:
		return

	if route_vars.get("animal") == "duck":
		state["message"] = "You've navigated to the Duck zone."
	else:
		state["message"] = "You're not in the Duck zone.`.trim(),vD=`
def handle_app_open(state):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#   "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")
`.trim(),gD="The root component of the application, which serves as the starting point of the component hierarchy.",yD={writer:{name:"Root",category:"Root",description:gD,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:G.Text,desc:"The app name will be shown in the browser's title bar."},...HT},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:vD},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:mD}}}},_D=ke({...yD,__name:"CoreRoot",setup(e){const t=ne(oe.core),n=ne(oe.builderManager),r=ne(oe.getChildrenVNodes),a=et("rootEl"),{isComponentVisible:o}=Fl(t),s=J(()=>{const l=t.activePageId.value;if(!!t.getComponentById(l)&&t.isChildOf("root",l))return l;const u=t.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(u.length==0)return null;const d=u.filter(m=>o(m.id));return d.length==0?null:d[0].id});function i(){var u;const l=fD(),c=new CustomEvent("wf-hashchange",{detail:{payload:l}});(u=a.value)==null||u.dispatchEvent(c),l.pageKey&&t.setActivePageFromKey(l.pageKey)}return He(s,l=>{var d;const u=(d=t.getComponentById(l).content)==null?void 0:d.key;n&&!n.isComponentIdSelected(l)&&n.setSelection(null),Fn().then(()=>{var m,y;window.scrollTo(0,0),(y=(m=document.querySelector(".ComponentRenderer"))==null?void 0:m.parentElement)==null||y.scrollTo(0,0)}),hD(u)}),xo(()=>{window.addEventListener("hashchange",()=>{i()}),i()}),(l,c)=>(E(),M("div",{ref_key:"rootEl",ref:a,class:"CoreRoot","data-writer-container":""},[(E(!0),M(Ve,null,It(P(r)(),u=>(E(),M(Ve,{key:u.key},[u.key===`${s.value}:0`?(E(),je(Po(u),{key:0})):Se("",!0)],64))),128))],512))}}),bD=Ne(_D,[["__scopeId","data-v-d3be7304"]]),wD={key:0,class:"noAccessTokenProvided"},AD=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],CD={writer:{name:"Mapbox",description:"A component to embed a Mapbox map. It can be used to display a map with markers.",docs:"For this component you need Mapbox access token: https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",category:"Embed",fields:{accessToken:{name:"Access Token",default:"",desc:"Access token from Mapbox",type:G.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:G.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:G.Number},lat:{name:"Latitude",default:"37.79322359164316",type:G.Number,validator:jd},lng:{name:"Longitude",default:"-122.39999318828129",type:G.Number,validator:Bd},markers:{name:"Markers",init:JSON.stringify(AD,null,2),desc:"",type:G.Object,validator:ny},controls:{...$t,name:"Controls visible",default:"yes",desc:"Show map controls"},cssClasses:tt},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers."},"mapbox-click":{desc:"Capture single click on map."}}}},$D=ke({...CD,__name:"CoreMapbox",setup(e){const t=ne(oe.evaluatedFields),n=et("rootEl"),r=et("mapEl"),a=J(()=>[t.lng.value,t.lat.value]),o=$e(null);let s=[],i=null;const l=async()=>{if(!r.value||!t.accessToken.value)return;const u=await Jt(()=>import("./mapbox-gl-D7US76Dl.js").then(d=>d.m),[],import.meta.url);try{u.accessToken=t.accessToken.value,u.default&&(u.default.accessToken=t.accessToken.value),o.value=new u.Map({container:r.value,style:t.mapStyle.value,center:a.value,zoom:t.zoom.value}),o.value.on("click",d=>{const m=new CustomEvent("mapbox-click",{detail:{payload:{lat:d.lngLat.lat,lng:d.lngLat.lng}}});n.value.dispatchEvent(m)}),i=new u.NavigationControl,t.controls.value&&o.value.addControl(i),t.markers.value&&o.value.on("load",c)}catch(d){Bn().error(d)}},c=async()=>{var d,m;if(!o.value)return;const u=await Jt(()=>import("./mapbox-gl-D7US76Dl.js").then(y=>y.m),[],import.meta.url);s.forEach(y=>y.remove()),s=[],(m=(d=t.markers)==null?void 0:d.value)==null||m.forEach(y=>{const b=new u.Marker().setLngLat([y.lng,y.lat]).addTo(o.value).setPopup(new u.Popup().setText(y.name));s.push(b),b.getElement().addEventListener("click",v=>{const _=new CustomEvent("mapbox-marker-click",{detail:{payload:y}});n.value.dispatchEvent(_),v.stopPropagation()})})};return He(t.controls,()=>{o.value&&(t.controls?o.value.addControl(i):o.value.removeControl(i))}),He(t.markers,async()=>{o.value&&await c()}),He(t.mapStyle,()=>{o.value&&o.value.setStyle(t.mapStyle.value)}),He(a,()=>{var u,d;o.value&&((u=a.value)!=null&&u.lat)&&((d=a.value)!=null&&d.lng)&&o.value.setCenter(a.value)}),He(t.zoom,()=>{o.value&&t.zoom.value&&o.value.setZoom(t.zoom.value)}),He([r,t.accessToken],()=>{l()}),(u,d)=>(E(),M("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[P(t).accessToken.value?(E(),M("div",{key:1,ref_key:"mapEl",ref:r,class:"map"},null,512)):(E(),M("div",wD,d[0]||(d[0]=[W("h2",null,"MapBox cannot be initialised.",-1),W("h3",null,"An access token hasn't been provided.",-1)]))),d[1]||(d[1]=W("div",{class:"mask"},null,-1))],512))}}),SD=Ne($D,[["__scopeId","data-v-78e9a85f"]]);function ID(e,t){const{type:n}=e[t],o=Jd().map(i=>({type:i,definition:Ns(i)})).filter(i=>i.definition.allowedParentTypes&&!i.definition.allowedParentTypes.includes(n));return new Set(o.map(i=>i.type))}function ED(e,t){const{type:n,parentId:r}=e[t],a=Jd().filter(l=>l!=="root"&&l!=="workflows_root"),{allowedChildrenTypes:o,toolkit:s}=Ns(n);if(!o)return new Set([]);let i=new Set(o);if(o.includes("*")&&(i=new Set([...i,...a])),i.delete("inherit")){if(!r)return i;const l=qd(e,r);i=new Set([...i,...l])}return s&&(i=new Set(Array.from(i).filter(l=>Ns(l).toolkit==s))),i}function qd(e,t){const n=Array.from(ED(e,t)),r=Array.from(ID(e,t));return n.filter(o=>!r.includes(o))}function Ly(e,t){function n(){let ee="";const X=new Uint16Array(16);return window.crypto.getRandomValues(X),X.forEach(ie=>{ee+=(ie%36).toString(36)}),ee}function r(B){const ee=e.getComponentById(B);if(!ee)return;const X=ee.position;if(X==0)return;const ie=e.getComponentById(ee.parentId);if(!ie)return;const Ie=e.getComponents(ie.id,{includeBMC:!0,includeCMC:!1}).filter(x=>x.position==X-1)[0],k=`move-up-${B}`;t.openMutationTransaction(k,"Move up"),t.registerPreMutation(Ie),Ie.position++,t.registerPostMutation(Ie),t.registerPreMutation(ee),ee.position--,t.registerPostMutation(ee),t.closeMutationTransaction(k),e.sendComponentUpdate()}function a(B){const ee=e.getComponentById(B);if(!ee)return;const X=e.getComponentById(ee.parentId);if(!X)return;const ie=ee.position;if(ie==-2)return;const Ie=e.getComponents(X.id,{includeBMC:!0,includeCMC:!1}).filter(le=>le.position!==-2);if(ie>=Ie.length-1)return;const k=Ie.filter(le=>le.position==ie+1)[0],x=`move-down-${B}`;t.openMutationTransaction(x,"Move down"),t.registerPreMutation(k),k.position--,t.registerPostMutation(k),t.registerPreMutation(ee),ee.position++,t.registerPostMutation(ee),t.closeMutationTransaction(x),e.sendComponentUpdate()}function o(B,ee,X){const ie=e.getComponentById(B);if(!ie)return;const Ie=e.getComponentById(ie.parentId);if(!Ie||B==ee||Ie.id==ee&&X===null)return;const k=`move-${B}`;t.openMutationTransaction(k,"Move"),t.registerPreMutation(ie),l(B,-1),ie.position=X??_e(ee,ie.type),ie.parentId=ee,l(B,1),t.registerPostMutation(ie),t.closeMutationTransaction(k),e.sendComponentUpdate()}function s(B,ee,X,ie){const Ie=n(),k=e.getComponentDefinition(B),{fields:x}=k,le={};return Object.entries(x??{}).map(([V,K])=>{var ue;le[V]=((ue=ie==null?void 0:ie.content)==null?void 0:ue[V])??K.init}),{...ie??{},id:Ie,type:B,parentId:ee,content:le,handlers:{},position:X??_e(ee,B)}}function i(B,ee,X,ie,Ie){const k=s(B,ee,X,ie),x=`create-${k.id}`;return t.openMutationTransaction(x,"Create"),e.addComponent(k),l(k.id,1),Ie==null||Ie(k.id),t.registerPostMutation(k),t.closeMutationTransaction(x),e.sendComponentUpdate(),k.id}function l(B,ee){const X=e.getComponentById(B);if(e.getComponentDefinition(X.type).positionless)return;e.getComponents(X.parentId,{includeBMC:!0,includeCMC:!1}).filter(x=>x.id!==B).filter(x=>x.position>=X.position).map(x=>{t.registerPreMutation(x),x.position+=ee,t.registerPostMutation(x)})}function c(B){const ee=e.getComponentById(B),X=[],ie=Ie=>{const k=e.getComponents(Ie.id);X.push(Ie),k.map(x=>ie(x))};return ie(ee),X}function u(B){return e.getComponents().filter(ee=>{var X;return(X=ee.outs)==null?void 0:X.find(ie=>ie.toNodeId==B)})}function d(...B){const ee=B.map(ie=>e.getComponentById(ie)).filter(Boolean);if(ee.length===0)return;const X=`delete-${ee.map(ie=>ie.id).join(",")}`;t.openMutationTransaction(X,"Delete");for(const ie of ee){e.getComponentById(ie.id).parentId&&l(ie.id,-1);const Ie=u(ie.id);for(const x of Ie)t.registerPreMutation(x),x.outs=[...x.outs.filter(le=>le.toNodeId!==ie.id)];const k=c(ie.id);for(const x of k)t.registerPreMutation(x),e.deleteComponent(x.id),t.removeSelectedComponentId(x.id)}t.closeMutationTransaction(X),e.sendComponentUpdate()}function m(B){return d(B)}function y(B){return B=="root"}function b(B){const ee=e.getComponentById(B);return!y(B)&&!(ee!=null&&ee.isCodeManaged)}function v(B){const ee=e.getComponentById(B);return!(ee!=null&&ee.isCodeManaged)&&e.getContainableTypes(B).length>0}function _(B){return!y(B)}function A(B){const ee=e.getComponentById(B);return!y(B)&&!(ee!=null&&ee.isCodeManaged)}function $(B){const ee=e.getComponentById(B);return!y(B)&&!(ee!=null&&ee.isCodeManaged)}function g(B){return!y(B)}function p(B,ee){const X=e.getComponentById(B);if(!X)return;const ie=X.parentId;if(!ie)return;let Ie;ee&&(Ie=ee.split(",").slice(0,-1).join(",")),t.setSelection(ie,Ie)}function w(B){if(B.length==0)return!1;const ee={};return[...e.getComponents(),...B].forEach(ie=>{ee[ie.id]=ie}),B.map(ie=>qd(ee,ie.parentId).includes(ie.type)).every(ie=>ie)}function S(B){const ee=e.getComponentById(B);if(!ee||ee.isCodeManaged)return!1;const X=t.getClipboard();if(X===null)return!1;const{jsonSubtree:ie}=X,Ie=JSON.parse(ie);return Ie.length==0?!1:(Ie[0].parentId=B,w(Ie))}function F(B){const ee=le=>e.getComponents(le,{includeBMC:!0,includeCMC:!1}).filter(K=>{var U;return!((U=e.getComponentDefinition(K.type))==null?void 0:U.positionless)}).length,X=e.getComponentById(B);if(!X||X.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(X.type).positionless)return{up:!1,down:!1};const Ie=X.parentId?ee(X.parentId):0,k=Ie>0&&X.position>0,x=Ie>0&&X.position<Ie-1;return{up:k,down:x}}function Z(B){e.getComponentById(B)&&(t.setClipboard({operation:co.Cut,jsonSubtree:JSON.stringify(c(B))}),t.setSelection(null),m(B),e.sendComponentUpdate())}function re(B){const ee=JSON.parse(JSON.stringify(B));return ee.forEach(X=>{delete X.isCodeManaged;const ie=n();ee.filter(Ie=>Ie.id!==X.id).map(Ie=>{var k;Ie.parentId==X.id&&(Ie.parentId=ie),(k=Ie.outs)==null||k.forEach(x=>{x.toNodeId==X.id&&(x.toNodeId=ie)})}),X.id=ie,typeof X.x<"u"&&typeof X.y<"u"&&(X.x+=36,X.y+=36)}),ee}function ce(B){if(!e.getComponentById(B))return;const X=c(B),ie=re(X);t.setClipboard({operation:co.Copy,jsonSubtree:JSON.stringify(ie)})}function Oe(B){if(!e.getComponentById(B))return;const X=t.getClipboard();if(X===null)return;const{operation:ie,jsonSubtree:Ie}=X,k=JSON.parse(Ie),x=k[0];if(typeof x.outs<"u"&&x.parentId!==B&&(x.outs=[]),ie==co.Cut)return ge(B,k);if(ie==co.Copy)return we(B,k)}function ge(B,ee){t.setClipboard(null);const X=ee[0];X.parentId=B,X.position=_e(B,X.type);const ie=`paste-cut-${B}`;t.openMutationTransaction(ie,"Paste from cut"),ee.map(Ie=>{e.addComponent(Ie),t.registerPostMutation(Ie)}),t.closeMutationTransaction(ie),e.sendComponentUpdate()}function we(B,ee){t.setClipboard({operation:co.Copy,jsonSubtree:JSON.stringify(re(ee))});const X=ee[0];X.parentId=B,X.position=_e(B,X.type);const ie=`paste-copy-${B}`;t.openMutationTransaction(ie,"Paste from copy"),ee.map(Ie=>{e.addComponent(Ie),t.registerPostMutation(Ie)}),t.closeMutationTransaction(ie),e.sendComponentUpdate()}function _e(B,ee){if(e.getComponentDefinition(ee).positionless)return-2;const ie=e.getComponents(B,{includeBMC:!0,includeCMC:!1}).filter(Ie=>Ie.position!==-2);return ie.length>0?Math.max(Math.max(...ie.map(k=>k.position))+1,0):0}function Ke(){var ee,X;const B=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!B.undo,isRedoAvailable:!!B.redo,undoDesc:(ee=B.undo)==null?void 0:ee.desc,redoDesc:(X=B.redo)==null?void 0:X.desc}}function Ee(){const B=t.consumeUndoTransaction();B&&(Object.entries(B.mutations).forEach(([ee,X])=>{if(X.jsonPre&&X.jsonPost){e.addComponent(JSON.parse(X.jsonPre));return}if(!X.jsonPre&&X.jsonPost){e.deleteComponent(ee);return}if(X.jsonPre&&!X.jsonPost){e.addComponent(JSON.parse(X.jsonPre));return}}),e.sendComponentUpdate())}function Ae(){const B=t.consumeRedoTransaction();B&&(Object.entries(B.mutations).forEach(([ee,X])=>{if(X.jsonPre&&X.jsonPost){e.addComponent(JSON.parse(X.jsonPost));return}if(!X.jsonPre&&X.jsonPost){e.addComponent(JSON.parse(X.jsonPost));return}if(X.jsonPre&&!X.jsonPost){e.deleteComponent(ee);return}}),e.sendComponentUpdate())}function be(B,ee,X){const ie=e.getComponentById(B);if(!ie)return;const Ie=`edit-${B}-content-${ee}`;t.openMutationTransaction(Ie,"Edit property",!0),t.registerPreMutation(ie),ie.content[ee]=X,t.registerPostMutation(ie),t.closeMutationTransaction(Ie),e.sendComponentUpdate()}function ve(B,ee){const X=e.getComponentById(B);if(!X)return;const ie=`add-${B}-out-${ee.outId}-${ee.toNodeId}`;t.openMutationTransaction(ie,"Add out",!0),t.registerPreMutation(X),X.outs=[...X.outs??[],ee],t.registerPostMutation(X),t.closeMutationTransaction(ie),e.sendComponentUpdate()}function me(B,ee){const X=e.getComponentById(B);if(!X)return;const ie=`edit-${B}-out-${ee.outId}-${ee.toNodeId}`;t.openMutationTransaction(ie,"Edit out",!0),t.registerPreMutation(X),X.outs=X.outs.filter(Ie=>!(ee.outId===Ie.outId&&ee.toNodeId===Ie.toNodeId)),t.registerPostMutation(X),t.closeMutationTransaction(ie),e.sendComponentUpdate()}function O(B,ee,X){const ie=e.getComponentById(B);if(!ie)return;const Ie=`change-${B}-coordinates`;t.openMutationTransaction(Ie,"Change coordinates",!1),t.registerPreMutation(ie),ie.x=Math.floor(ee),ie.y=Math.floor(X),t.registerPostMutation(ie),t.closeMutationTransaction(Ie),e.sendComponentUpdate()}function fe(B){const ee="change-multiple-coordinates";t.openMutationTransaction(ee,"Change coordinates",!1);const X=Object.entries(B);X.length!=0&&(X.forEach(([ie,{x:Ie,y:k}])=>{const x=e.getComponentById(ie);x&&(t.registerPreMutation(x),x.x=Math.floor(Ie),x.y=Math.floor(k),t.registerPostMutation(x))}),t.closeMutationTransaction(ee),e.sendComponentUpdate())}function q(B,ee,X="",ie=!1){const Ie=e.getComponentById(B);if(!Ie)return;const k=`change-visibility-${B}`;t.openMutationTransaction(k,"Change visibility",!0),t.registerPreMutation(Ie),Ie.visible==null&&(Ie.visible={expression:!0,binding:"",reversed:!1}),typeof ee=="boolean"?Ie.visible.expression=ee:ee=="custom"&&(Ie.visible={expression:"custom",binding:X,reversed:ie}),t.registerPostMutation(Ie),t.closeMutationTransaction(k),e.sendComponentUpdate()}function I(B,ee,X){const ie=e.getComponentById(B);if(!ie)return;let Ie;if(X)Ie=X;else{const x=e.getComponentDefinition(ie.type),j=Object.entries(x.events).filter(([V,K])=>K.bindable).map(([V,K])=>V);Ie=j==null?void 0:j[0]}if(!Ie)return;const k=`change-binding-${B}`;t.openMutationTransaction(k,"Change binding",!0),t.registerPreMutation(ie),ee?ie.binding={eventType:Ie,stateRef:ee}:delete ie.binding,t.registerPostMutation(ie),t.closeMutationTransaction(k),e.sendComponentUpdate()}function R(B,ee,X){const ie=e.getComponentById(B);if(!ie)return;const Ie=`set-handler-${B}`;t.openMutationTransaction(Ie,"Set event handler",!0),t.registerPreMutation(ie),X?(ie.handlers||(ie.handlers={}),ie.handlers[ee]=X):(delete ie.handlers[ee],Object.keys(ie.handlers).length==0&&delete ie.handlers),t.registerPostMutation(ie),t.closeMutationTransaction(Ie),e.sendComponentUpdate()}function pe(B){const ee=e.getComponentById(B);return!ee||ee.type=="root"?null:ee.type=="page"||ee.type=="workflows_workflow"?B:pe(ee.parentId)}async function Le(B){var ie;const ee=e.getComponentById(B);(ie=e.getComponentDefinition(ee.type))!=null&&ie.name&&e.setActivePageId(pe(B))}return{moveComponent:o,moveComponentUp:r,moveComponentDown:a,cutComponent:Z,copyComponent:ce,pasteComponent:Oe,createAndInsertComponent:i,removeComponentSubtree:m,removeComponentsSubtree:d,isPasteAllowed:S,undo:Ee,redo:Ae,setContentValue:be,addOut:ve,removeOut:me,changeCoordinates:O,changeCoordinatesMultiple:fe,setVisibleValue:q,setBinding:I,getUndoRedoSnapshot:Ke,setHandlerValue:R,isAddAllowed:v,isCopyAllowed:_,isCutAllowed:A,isDeleteAllowed:$,isGoToParentAllowed:g,isDraggingAllowed:b,getEnabledMoves:F,goToParent:p,goToComponentParentPage:Le}}const kD=30,TD=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,ns=$e(null),Rr=$e(null),ki=$e(!1);let Vc=null,Ti=null;function xD(e){function t(_){var g;const A=_.dataTransfer.types[0],$=(g=A==null?void 0:A.match(TD))==null?void 0:g.groups;if($)return{draggedType:$.componentType,draggedId:$.componentId}}function n(_){const g=(_.closest("[data-writer-cage]")??_).closest("[data-writer-id]");if(g)return g.dataset.writerId}function r(_){const A=t(_);if(!A)return;const{draggedType:$,draggedId:g}=A,p=n(_.target);if(!o(p,g,$))return;const S={draggedType:$,draggedId:g,parentId:ns.value,position:Ti};return v(_),S}function a(_,A,$){const g=e.getComponentById(_);if(!g)return!1;const p=e.getContainableTypes(_);return!(g!=null&&g.isCodeManaged)&&!e.isChildOf(A,_)&&p.includes($)}function o(_,A,$){const g=e.getComponentById(_);if(g)return a(_,A,$)?_:g.parentId?o(g.parentId,A,$):null}function s(_){if(ki.value){l(_);return}i(_)}function i(_){const A=t(_);if(!A)return;const{draggedType:$,draggedId:g}=A,p=_.target,w=n(p),S=o(w,g,$);if(!S||S==g)return;const Z=p.closest(`[data-writer-id="${S}"]`).dataset.writerInstancePath;if(_.preventDefault(),Rr.value!==Z)Vc=Date.now();else if(Date.now()-Vc>=c$){ki.value=!0,m(Rr.value);return}ns.value=S,Rr.value=Z}function l(_){const A=t(_);if(!A)return;_.preventDefault();const $=document.querySelector(`[data-writer-instance-path="${Rr.value}"]`);if(d(_.clientX,_.clientY,$)>kD){v(_);return}const g=c(Rr.value);if(g.length==0)return;const p=u(_.clientX,_.clientY,g);if(!p)return;const{el:w}=p,{draggedId:S}=A,F=parseInt(w.dataset.writerPosition),Z=e.getComponentById(S);if(g.map(re=>{re.classList.contains("highlighted")&&re.classList.remove("highlighted")}),!w.classList.contains("highlighted")){if(w.classList.add("highlighted"),Z&&Z.parentId==ns.value&&F>Z.position){Ti=F-1;return}Ti=F}}function c(_){const A=b(_);return Array.from(A.querySelectorAll("[data-writer-position]"))}function u(_,A,$){const g=$.map(p=>({el:p,distance:d(_,A,p)})).sort((p,w)=>p.distance>w.distance?1:-1);return g==null?void 0:g[0]}function d(_,A,$){const{top:g,left:p,right:w,bottom:S}=$.getBoundingClientRect(),F=Math.max(p-_,0,_-w),Z=Math.max(g-A,0,A-S);return Math.sqrt(F*F+Z*Z)}function m(_){b(_).classList.add("crackedContainer")}function y(_){b(_).classList.remove("crackedContainer")}function b(_){const A=document.querySelector(`[data-writer-instance-path="${_}"]`);if(A.hasAttribute("data-writer-container"))return A;const $=A.querySelectorAll("[data-writer-container]");for(let g=0;g<$.length;g++){const p=$[g];if(p.closest("[data-writer-instance-path]")==A)return p}}function v(_){_.preventDefault(),Rr.value&&(y(Rr.value),Rr.value=null),ns.value=null,Vc=null,Ti=null,ki.value=!1}return{candidateId:ns,candidateInstancePath:Rr,isParentSuitable:a,isCandidacyConfirmed:ki,getComponentInfoFromDrag:t,dropComponent:r,assignInsertionCandidacy:s,removeInsertionCandidacy:v}}const PD=["d"],MD=["d"],ND=["cx","cy"],OD=["x1","y1","x2","y2","stroke"],RD=["x1","y1","x2","y2","stroke"],rs=30,LD=ke({__name:"WorkflowArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,r=e,a=J(()=>{const i=r.arrow.x2-r.arrow.x1,l=r.arrow.y2-r.arrow.y1;return[{x:r.arrow.x1,y:r.arrow.y1},{x:r.arrow.x1+rs,y:r.arrow.y1},{x:r.arrow.x1+rs,y:r.arrow.y1+l*.25},{x:r.arrow.x1+i*.5,y:r.arrow.y1+l*.5},{x:r.arrow.x2-rs,y:r.arrow.y1+l*.75},{x:r.arrow.x2-rs,y:r.arrow.y2},{x:r.arrow.x2,y:r.arrow.y2}]}),o=J(()=>{const i=r.arrow.x2-r.arrow.x1,l=a.value;let c;return i>rs?(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[3].x} ${l[0].y}, ${l[3].x} ${l[6].y}, ${l[6].x} ${l[6].y}`):(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[1].x} ${l[1].y}, ${l[2].x} ${l[2].y}, ${l[3].x} ${l[3].y}`,c+=`C ${l[4].x} ${l[4].y}, ${l[5].x} ${l[5].y}, ${l[6].x} ${l[6].y}`),c});function s(){n("delete")}return(i,l)=>(E(),M("g",{class:it(["WorkflowArrow",{engaged:i.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[W("path",{d:o.value,style:mt({stroke:i.arrow.color})},null,12,PD),W("path",{d:o.value,style:mt({stroke:i.arrow.color,strokeWidth:12,opacity:i.isSelected?"0.2":"0"})},null,12,MD),i.isSelected?(E(),M("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:ga(s,["enter"])},[W("circle",{cx:a.value[3].x,cy:a.value[3].y,r:"12"},null,8,ND),W("line",{class:"cross",x1:a.value[3].x-4,y1:a.value[3].y-4,x2:a.value[3].x+4,y2:a.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,OD),W("line",{class:"cross",x1:a.value[3].x+4,y1:a.value[3].y-4,x2:a.value[3].x-4,y2:a.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,RD)],32)):Se("",!0)],2))}}),Hh=Ne(LD,[["__scopeId","data-v-c436de5e"]]),DD=ke({__name:"WorkflowMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){Mo($=>({"53073ee0":`${l.value.width}px`,"7885ce3a":`${l.value.height}px`,"8c0ea318":c.value.isDisplayed?"":"none"}));const n=ne(oe.builderManager),r=et("rootEl"),a=t,o=new ResizeObserver(y),s=new MutationObserver(y),i=$e(.2),l=$e({width:166,height:100}),c=$e({width:260,height:1,top:0,left:0,isDisplayed:!1}),u=$e({width:1,height:1,top:0,left:0}),d=e,m=$e([]);function y(){if(!d.nodeContainerEl)return;const $=Array.from(d.nodeContainerEl.querySelectorAll("[data-writer-id]")),g=d.nodeContainerEl.getBoundingClientRect();let p=0,w=0;m.value=$.map(S=>{const F=S.getBoundingClientRect();return p=Math.max(p,F.right+d.renderOffset.x*d.zoomLevel-g.left),w=Math.max(w,F.bottom+d.renderOffset.y*d.zoomLevel-g.top),{id:S.dataset.writerId,width:F.width,height:F.height,top:F.top+d.renderOffset.y*d.zoomLevel-g.top,left:F.left+d.renderOffset.x*d.zoomLevel-g.left}}),l.value={width:260,height:g.height/g.width*g.width/7},i.value=Math.min(l.value.width/(g.width+300),l.value.height/(g.height+300),l.value.width/(p+300),l.value.height/(w+300),l.value.width/(d.renderOffset.x*d.zoomLevel+g.width),l.value.height/(d.renderOffset.y*d.zoomLevel+g.height)),u.value={top:d.renderOffset.y*d.zoomLevel,left:d.renderOffset.x*d.zoomLevel,width:g.width,height:g.height},c.value={...u.value,isDisplayed:c.value.isDisplayed}}function b($){const g=d.nodeContainerEl.getBoundingClientRect(),p=r.value.getBoundingClientRect();c.value={...c.value,top:Math.min(Math.max(0,($.pageY-p.top)*(1/i.value)-g.height/2),p.height*(1/i.value)-g.height),left:Math.min(Math.max(0,($.pageX-p.left)*(1/i.value)-g.width/2),p.width*(1/i.value)-g.width)}}function v(){c.value.isDisplayed=!0}function _(){c.value.isDisplayed=!1}function A($){$.stopPropagation(),n.setSelection(null),a("changeRenderOffset",{x:c.value.left*(1/d.zoomLevel),y:c.value.top*(1/d.zoomLevel)})}return Xt(async()=>{o.observe(d.nodeContainerEl),s.observe(d.nodeContainerEl,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style"]}),await Fn(),y()}),tr(()=>{o.disconnect(),s.disconnect()}),($,g)=>(E(),M("div",{ref_key:"rootEl",ref:r,class:"WorkflowMiniMap",onMouseenter:v,onMouseleave:_,onMousemove:b,onClick:A},[W("div",{class:"selectedArea",style:mt({top:`${u.value.top*i.value}px`,left:`${u.value.left*i.value}px`,width:`${u.value.width*i.value}px`,height:`${u.value.height*i.value}px`})},null,4),W("div",{class:"selector",style:mt({top:`${c.value.top*i.value}px`,left:`${c.value.left*i.value}px`,width:`${c.value.width*i.value}px`,height:`${c.value.height*i.value}px`})},null,4),(E(!0),M(Ve,null,It(m.value,p=>(E(),M("div",{key:p.id,class:it(["node",{selected:P(n).isComponentIdSelected(p.id)}]),style:mt({top:`${p.top*i.value}px`,left:`${p.left*i.value}px`,width:`${p.width*i.value}px`,height:`${p.height*i.value}px`})},null,6))),128))],544))}}),FD=Ne(DD,[["__scopeId","data-v-2d1eae87"]]);function jD(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function zh(){return Fy()?"⌘ ":"Ctrl+"}function Dy(e){return Fy()?e.metaKey:e.ctrlKey}function Fy(){return jD().toLowerCase().indexOf("mac")!=-1}const BD={class:"bar"},VD={class:"autoArranger"},UD={class:"zoomer"},HD={class:"miniMapCollapser"},Kh=.01,xi=.2,zD=ke({__name:"WorkflowNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom","autoArrange"],setup(e,{emit:t}){const n=e,{zoomLevel:r}=Mu(n),a=et("rootEl"),o=t,s=$e(!0),i=$e(l(r.value));function l($){return`${Math.floor($*100)}%`}function c(){s.value=!s.value}function u(){o("autoArrange")}function d($){o("changeRenderOffset",$)}function m(){const $=r.value+xi;o("changeZoomLevel",$)}function y(){const $=r.value-xi;o("changeZoomLevel",$)}function b($){const g=$.key;let p=r.value;if(g=="ArrowUp")p+=Kh;else if(g=="ArrowDown")p-=Kh;else return;o("changeZoomLevel",p)}function v($){var w;const g=(w=$.target)==null?void 0:w.value;let p=parseInt(g)/100;isNaN(p)&&(p=1),i.value=l(p),o("changeZoomLevel",p)}function _(){o("resetZoom")}He(r,$=>{i.value=l($)});function A($){if(Dy($)===!1)return;let g=r.value;if($.key=="+"||$.key=="=")$.preventDefault(),g+=xi;else if($.key=="-")$.preventDefault(),g-=xi;else return;o("changeZoomLevel",g)}return Xt(()=>{document.addEventListener("keydown",A)}),tr(()=>{document.removeEventListener("keydown",A)}),($,g)=>(E(),M("div",{ref_key:"rootEl",ref:a,"data-writer-unselectable":"true",class:"WorkflowNavigator",onKeydown:A},[$.nodeContainerEl&&s.value?(E(),je(FD,{key:0,"node-container-el":$.nodeContainerEl,"render-offset":$.renderOffset,"zoom-level":P(r),class:"miniMap",onChangeRenderOffset:d},null,8,["node-container-el","render-offset","zoom-level"])):Se("",!0),W("div",BD,[W("div",VD,[Ge(Yn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Auto arrange blocks","data-writer-tooltip-placement":"left",onClick:u},{default:Ze(()=>g[1]||(g[1]=[W("i",{class:"material-symbols-outlined"},"apps",-1)])),_:1})]),W("div",UD,[Ge(Yn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":P(r)>P(La).minLevel?`Zoom out (${P(zh)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:y},{default:Ze(()=>g[2]||(g[2]=[W("i",{class:"material-symbols-outlined"},"remove",-1)])),_:1},8,["data-writer-tooltip"]),Ge(oy,{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=p=>i.value=p),class:"zoomLevelInput",onKeydown:b,onChange:v},null,8,["modelValue"]),Ge(Yn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":P(r)<P(La).maxLevel?`Zoom in (${P(zh)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:m},{default:Ze(()=>g[3]||(g[3]=[W("i",{class:"material-symbols-outlined"},"add",-1)])),_:1},8,["data-writer-tooltip"]),Ge(Yn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:_},{default:Ze(()=>g[4]||(g[4]=[W("i",{class:"material-symbols-outlined"},"undo",-1)])),_:1})]),W("div",HD,[Ge(Yn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:c},{default:Ze(()=>g[5]||(g[5]=[W("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)])),_:1},8,["data-writer-tooltip"])])])],544))}}),KD=Ne(zD,[["__scopeId","data-v-629799fa"]]),WD=["data-writer-unselectable"],qD={class:"workflowsToolbar"},GD="A container component representing a single workflow within the application.",JD={writer:{name:"Blueprint",toolkit:"workflows",category:"Root",description:GD,allowedChildrenTypes:["*"],allowedParentTypes:["workflows_root"],fields:{key:{name:"Workflow key",desc:"Unique identifier. It's needed to enable navigation to this Workflow.",type:G.IdKey}}}},La={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},YD=ke({...JD,__name:"WorkflowsWorkflow",setup(e){Mo(D=>({"0f894214":d.value}));const t=ne(oe.renderProxiedComponent),n=ne(oe.componentId),r=et("rootEl"),a=et("nodeContainerEl"),o=ne(oe.core),s=ne(oe.builderManager),i=$e([]),l=hr({x:0,y:0}),c=$e(!1),u=$e(null),d=$e(La.initialLevel),m=new MutationObserver(re),y=hr({}),b=64,v=128,_=J(()=>o.getComponents(n,{sortedByPosition:!0})),{createAndInsertComponent:A,addOut:$,removeOut:g,changeCoordinatesMultiple:p}=Ly(o,s),{getComponentInfoFromDrag:w}=xD(o),S=$e(null),F=$e(null),Z=$e(null);function re(){const D=[];_.value.filter(Q=>{var de;return((de=Q.outs)==null?void 0:de.length)>0}).forEach(Q=>{const de=Q.id;Q.outs.forEach(he=>{const Te=q(de,he.outId,void 0,he.toNodeId);Te&&D.push(Te)})}),i.value=D}const ce=J(()=>{var D,Q;return S.value===null&&!((D=F.value)!=null&&D.isPerfected)&&!((Q=Z.value)!=null&&Q.isPerfected)?null:!0});function Oe(){u.value=null}function ge(){const D=new Map;function Q(he,Te){var Be;D.forEach(st=>{st.has(he)&&st.delete(he)}),D.has(Te)||D.set(Te,new Set),D.get(Te).add(he),(Be=he.outs)==null||Be.forEach(st=>{const rt=o.getComponentById(st.toNodeId);Q(rt,Te+1)})}const de=new Map;return _.value.forEach(he=>{var Te;(Te=he.outs)==null||Te.forEach(De=>{de.has(De.toNodeId)||de.set(De.toNodeId,new Set),de.get(De.toNodeId).add(he.id)})}),_.value.filter(he=>!de.has(he.id)).forEach(he=>{Q(he,0)}),D}function we(D){const Q=new Map,de=new Map;return D.forEach((he,Te)=>{let De=0,Be=0;he.forEach(st=>{const rt=a.value.querySelector(`[data-writer-id="${st.id}"]`);if(!rt)return;const ct=rt.getBoundingClientRect();de.set(st.id,{height:ct.height*(1/d.value)}),De+=ct.height*(1/d.value)+b,Be=Math.max(Be,ct.width*(1/d.value))}),Q.set(Te,{height:De-b,width:Be})}),{columnDimensions:Q,nodeDimensions:de}}function _e(){const D=ge(),{columnDimensions:Q,nodeDimensions:de}=we(D),he=Math.max(...Array.from(Q.values()).map(Be=>Be.height)),Te={};let De=v/2;for(let Be=0;Be<D.size;Be++){const st=Array.from(D.get(Be)).sort((Nt,Kt)=>Nt.y>Kt.y?1:-1),{width:rt,height:ct}=Q.get(Be);let wt=(he-ct)/2+b;st.forEach(Nt=>{Te[Nt.id]={x:De,y:wt},wt+=de.get(Nt.id).height+b}),De+=rt+v}p(Te)}async function Ke(){c.value||(c.value=!0,await o.forwardEvent(new CustomEvent("wf-builtin-run",{detail:{callback:()=>{c.value=!1},handler:`$runWorkflowById_${n}`}}),null,!0))}function Ee(D,Q){pe();const he=document.querySelector(`[data-writer-id="${Q}"]`).getBoundingClientRect(),Te=(D.pageX-he.x)*(1/d.value),De=(D.pageY-he.y)*(1/d.value);F.value={nodeId:Q,offset:{x:Te,y:De},isPerfected:!1}}function Ae(D,Q){S.value={fromNodeId:D,fromOutId:Q}}function be(D){D.preventDefault(),D.stopPropagation()}function ve(D){const Q=r.value.getBoundingClientRect(),de=l.value.x+(D.pageX-Q.x)*(1/d.value),he=l.value.y+(D.pageY-Q.y)*(1/d.value);return{x:de,y:he}}function me(D){D.preventDefault(),D.stopPropagation();const Q=w(D);if(!Q)return;const{draggedType:de,draggedId:he}=Q;if(he)return;const{x:Te,y:De}=ve(D);Te<0||De<0||k(de,Te,De)}function O(D,Q){if(u.value==Q){u.value=null;return}D.stopPropagation(),u.value=Q,s.setSelection(null)}async function fe(D){if(!D.toNodeId)return;const Q={outId:D.fromOutId,toNodeId:D.toNodeId};g(D.fromNodeId,Q)}function q(D,Q,de,he){var Nt;let Te,De,Be,st;const rt=(Nt=r.value)==null?void 0:Nt.getBoundingClientRect();if(!rt)return;Be=((de==null?void 0:de.x)-rt.x)*(1/d.value),st=((de==null?void 0:de.y)-rt.y)*(1/d.value);const ct=document.querySelector(`[data-writer-id="${D}"] [data-writer-socket-id="${Q}"]`);if(!ct)return;const wt=ct.getBoundingClientRect();if(Te=(wt.x-rt.x+wt.width/2)*(1/d.value),De=(wt.y-rt.y+wt.height/2)*(1/d.value),!!ct){if(typeof he<"u"){const Pt=document.querySelector(`[data-writer-id="${he}"]`).getBoundingClientRect();Be=(Pt.x-rt.x)*(1/d.value),st=(Pt.y-rt.y+Pt.height/2)*(1/d.value)}return{x1:Te,y1:De,x2:Be,y2:st,color:getComputedStyle(ct).backgroundColor,fromNodeId:D,fromOutId:Q,toNodeId:he}}}function I(D){const de=D.target.closest(".WorkflowsWorkflow [data-writer-id]");return de==null?void 0:de.dataset.writerId}function R(D){let Q,de;de=I(D),typeof de>"u"&&(Q={x:D.pageX,y:D.pageY});const{fromNodeId:he,fromOutId:Te}=S.value;de!=he&&(S.value.liveArrow=q(he,Te,Q,de))}function pe(){Z.value=null,S.value=null,F.value=null}function Le(){p(y.value),y.value={}}function B(D){const{nodeId:Q,offset:de}=F.value;F.value.isPerfected=!0;const{x:he,y:Te}=ve(D),De=Math.floor(he-de.x),Be=Math.floor(Te-de.y),st=o.getComponentById(Q),rt=De-st.x,ct=Be-st.y;if(!s.selection.value.some(Kt=>Kt.componentId===Q)){y.value={...y.value,[Q]:{x:De,y:Be}};return}const Nt=s.selection.value.map(Kt=>o.getComponentById(Kt.componentId)).filter(Kt=>Kt.id!==Q&&Kt.x!==void 0&&Kt.y!==void 0).reduce((Kt,Pt)=>(Kt[Pt.id]={x:Pt.x+rt,y:Pt.y+ct},Kt),{});y.value={...y.value,...Nt,[Q]:{x:De,y:Be}}}function ee(D){const Q=r.value.getBoundingClientRect(),de=D.pageX-Q.x,he=D.pageY-Q.y,{x:Te,y:De}=Z.value.offset;Z.value.isPerfected=!0,Z.value.offset={x:de,y:he},K(l.value.x+(Te-de)*1*(1/d.value),l.value.y+(De-he)*1*(1/d.value))}function X(D){if(D.buttons==1){if(S.value){R(D);return}if(F.value){B(D);return}if(Z.value){ee(D);return}}}function ie(D){if(pe(),D.buttons!=1)return;const Q=r.value.getBoundingClientRect(),de=D.pageX-Q.x,he=D.pageY-Q.y;Z.value={offset:{x:de,y:he},isPerfected:!1}}async function Ie(D){if(F.value&&Le(),S.value===null)return;const Q=I(D);if(!Q){S.value=null;return}const{fromNodeId:de,fromOutId:he}=S.value;if(de==Q){S.value=null;return}$(S.value.fromNodeId,{toNodeId:Q,outId:he})}function k(D,Q,de){A(D,n,void 0,{x:Math.floor(Q),y:Math.floor(de)})}function x(D){var Be;const Q=r.value.querySelector(`[data-writer-id="${D}"]`),de=(Be=r.value)==null?void 0:Be.getBoundingClientRect();if(!Q||!de)return;const{width:he,height:Te}=Q.getBoundingClientRect(),De=o.getComponentById(D);De&&K(De.x-de.width/2+he/2,De.y-de.height/2+Te/2)}async function le(D){await K(D.x,D.y)}function j(D){d.value=Math.max(Math.min(La.maxLevel,D),La.minLevel)}function V(D){j(D)}function K(D,Q){l.value={x:Math.max(0,D),y:Math.max(0,Q)}}function ue(D){K(l.value.x+D.deltaX*(1/d.value),l.value.y+D.deltaY*(1/d.value))}function U(D){const Q=.006666666666666667,de=r.value.getBoundingClientRect(),he=d.value;d.value=Math.min(Math.max(d.value-D.deltaY*Q,La.minLevel),La.maxLevel);const Te={w:de.width*(1/he)*(1/d.value)*(d.value-he),h:de.height*(1/he)*(1/d.value)*(d.value-he)},De={x:(D.pageX-de.x)/de.width,y:(D.pageY-de.y)/de.height};K(l.value.x+Te.w*De.x,l.value.y+Te.h*De.y)}async function z(D){if(D.preventDefault(),!D.ctrlKey&&!Dy(D)){ue(D);return}U(D)}async function ae(){const{width:Q,height:de,x:he,y:Te}=r.value.getBoundingClientRect(),De=a.value.querySelectorAll("[data-writer-id]"),{maxX:Be,maxY:st}=Array.from(De).reduce((ct,wt)=>{const Nt=wt.getBoundingClientRect();return{maxY:Math.max(ct.maxY,(Nt.bottom-Te)*(1/d.value)+l.value.y),maxX:Math.max(ct.maxX,(Nt.right-he)*(1/d.value)+l.value.x)}},{maxY:0,maxX:0}),rt=Math.min((Q-48)/Be,(de-48)/st);j(rt),K(0,0)}return He(s.firstSelectedItem,D=>{D&&(u.value=null,o.isChildOf(n,D.componentId)&&D.source!=="click"&&x(D.componentId))}),Xt(async()=>{var D;await ae(),await Fn(),re(),(D=r.value)==null||D.addEventListener("wheel",z),m.observe(a.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0})}),tr(()=>{var D;(D=r.value)==null||D.removeEventListener("wheel",z),m.disconnect()}),(D,Q)=>{var de;return E(),M("div",{ref_key:"rootEl",ref:r,class:"WorkflowsWorkflow","data-writer-unselectable":ce.value,onClick:Oe,onDragover:be,onDrop:me,onMousemove:X,onMousedown:ie,onMouseup:Ie},[W("div",{ref_key:"nodeContainerEl",ref:a,class:"nodeContainer"},[(E(),M("svg",null,[(E(!0),M(Ve,null,It(i.value,(he,Te)=>(E(),je(Hh,{key:Te,arrow:he,"is-selected":u.value==Te,"is-engaged":u.value==Te||P(s).isComponentIdSelected(he.fromNodeId)||P(s).isComponentIdSelected(he.toNodeId),onClick:De=>O(De,Te),onDelete:De=>fe(he)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(de=S.value)!=null&&de.liveArrow?(E(),je(Hh,{key:"liveArrow",arrow:S.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):Se("",!0)])),(E(!0),M(Ve,null,It(_.value,he=>{var Te,De,Be,st,rt,ct,wt,Nt;return E(),je(Po(P(t)(he.id,0)),{key:he.id,style:mt({top:`${(((De=(Te=y.value)==null?void 0:Te[he.id])==null?void 0:De.y)??he.y)-l.value.y}px`,left:`${(((st=(Be=y.value)==null?void 0:Be[he.id])==null?void 0:st.x)??he.x)-l.value.x}px`,"border-color":((ct=(rt=S.value)==null?void 0:rt.liveArrow)==null?void 0:ct.toNodeId)==he.id?(Nt=(wt=S.value)==null?void 0:wt.liveArrow)==null?void 0:Nt.color:void 0}),onMousedown:Cr(Kt=>Ee(Kt,he.id),["stop"]),onOutMousedown:Kt=>Ae(he.id,Kt)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),W("div",qD,[Ge(Yn,{variant:"secondary",size:"small","data-writer-unselectable":!0,"data-automation-action":"run-workflow",onClick:Ke},{default:Ze(()=>[Q[0]||(Q[0]=W("i",{class:"material-symbols-outlined"},"play_arrow",-1)),Dt(" "+Pe(c.value?"Running...":"Run blueprint"),1)]),_:1})]),P(a)?(E(),je(KD,{key:0,"node-container-el":P(a),"render-offset":l.value,"zoom-level":d.value,class:"navigator",onAutoArrange:_e,onChangeRenderOffset:le,onChangeZoomLevel:V,onResetZoom:ae},null,8,["node-container-el","render-offset","zoom-level"])):Se("",!0)],40,WD)}}}),QD=Ne(YD,[["__scopeId","data-v-3ee99ab9"]]),XD={class:"alias"},ZD=["contenteditable"],e5=ke({__name:"WorkflowsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=ne(oe.core),r=ne(oe.builderManager),{setContentValue:a}=Ly(n,r),o=J(()=>{var m;return(m=n.getComponentById(t.componentId))==null?void 0:m.content.alias}),s=J(()=>!!o.value),i=et("aliasEditorEl"),l=$e(!1);async function c(){if(l.value)return;l.value=!0,await Fn();const m=i.value;m.focus();const y=document.createRange(),b=window.getSelection();y.setStart(m,m.childNodes.length),y.collapse(!0),b.removeAllRanges(),b.addRange(y)}function u(){const m=i.value.textContent;i.value.blur(),l.value=!1,a(t.componentId,"alias",m)}function d(m){l.value&&m.stopPropagation()}return(m,y)=>(E(),M("div",{class:it(["WorkflowsNodeNamer",{beingEdited:l.value,hasEyebrow:s.value||l.value}]),"data-writer-unselectable":"true"},[W("div",{class:"blockName",onClick:c},Pe(m.blockName),1),W("div",XD,[s.value||l.value?(E(),M("div",{key:0,ref_key:"aliasEditorEl",ref:i,class:"aliasEditor",contenteditable:l.value,"data-writer-unselectable":"true",onClick:c,onMousemove:d,onBlur:u,onKeydown:ga(u,["enter"])},Pe(o.value),41,ZD)):Se("",!0)])],2))}}),t5=Ne(e5,[["__scopeId","data-v-3f32d789"]]),Uc=new Map;function n5(){function e(n){const r=Uc.get(n);if(r!==void 0)return r;const a=fetch(n,{method:"HEAD"}).then(o=>{if(o.ok)return o.headers.get("Content-Type")||void 0}).catch(()=>{});return Uc.set(n,a),a}function t(){Uc.clear()}return{fetchAssetContentType:e,clearCache:t}}const r5=["src"],a5=ke({__name:"SharedImgWithFallback",props:{urls:{type:Array,required:!0}},setup(e){const t=e,n=$e(""),{fetchAssetContentType:r}=n5();return He(ha(t,"urls"),async a=>{n.value="";for(const o of a){const s=await r(o);if(!(!s||s==="text/html"))return n.value=o}},{immediate:!0}),(a,o)=>(E(),M("img",{src:n.value},null,8,r5))}});function o5(e,t=window.location.toString()){return new URL(`.${e}`,t).toString()}const s5={key:0,class:"side"},i5={class:"extraBorder"},l5={key:0,class:"runner"},c5={class:"main"},u5={class:"title"},d5={key:0,class:"deprecationNotice"},f5=["data-writer-socket-id","onMousedownCapture"],p5={key:0},h5={class:"outputs"},m5=["data-writer-socket-id","onMousedownCapture"],v5={writer:{name:"Node",description:"A Workflows node.",toolkit:"workflows",category:"Other",fields:{alias:{name:"Alias",type:G.Text}},allowedParentTypes:["workflows_workflow"],previewField:"alias"}},g5=ke({...v5,__name:"WorkflowsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,r=ne(oe.core),a=ne(oe.builderManager),o=ne(oe.componentId),s=ne(oe.evaluatedFields),i=J(()=>r.getComponentById(o)),l=J(()=>{var p;return r==null?void 0:r.getComponentDefinition((p=i.value)==null?void 0:p.type)}),c=J(()=>{var p;return((p=l==null?void 0:l.value)==null?void 0:p.category)=="Triggers"}),u=J(()=>{var p;return((p=l==null?void 0:l.value)==null?void 0:p.category)=="Writer"}),d=J(()=>{var p;return(p=l==null?void 0:l.value)==null?void 0:p.deprecated}),m=J(()=>y.value==null?null:y.value=="in_progress"?"running":{...v.value}[y.value].style??"success"),y=J(()=>{const p=a.getLogEntries();for(let w=0;w<p.length;w++){const F=p[w].workflowExecution;if(F)for(let Z=0;Z<F.summary.length;Z++){const re=F.summary[Z];if(re.componentId===i.value.id)return re.outcome}}return null}),b=J(()=>a.isComponentIdSelected(o)),v=J(()=>{const p={};return Object.entries(l.value.outs).forEach(([w,S])=>{S.field||(p[w]=S)}),p});function _(p){const S=l.value.fields[p].type==G.Tools,F=Object.keys(s[p].value??{});return S?F.filter(re=>{var ce;return((ce=s[p].value[re])==null?void 0:ce.type)=="function"}):F}const A=J(()=>{const p={};return Object.entries(l.value.outs).forEach(([w,S])=>{if(!S.field)return;p[S.field]={},_(S.field).forEach(Z=>{p[S.field][`${w}_${Z}`]={name:Z,description:"Dynamically created",style:"dynamic"}})}),p});function $(p,w){p.stopPropagation(),n("outMousedown",w)}const g=J(()=>{if(["success","error"].includes(m.value))return[`/status/${m.value}.svg`];const p=[`/components/${i.value.type}.svg`,`/components/workflows_category_${l.value.category}.svg`];return r.featureFlags.value.includes("custom_block_icons")&&p.unshift(`/static/components/${i.value.id}.svg`),p.map(w=>o5(w))});return He(b,()=>{n("engaged")}),(p,w)=>(E(),M("div",{class:it(["WorkflowsNode",{"WorkflowsNode--trigger":c.value,"WorkflowsNode--intelligent":u.value,"WorkflowsNode--deprecated":d.value,"WorkflowsNode--running":m.value=="running","WorkflowsNode--success":m.value=="success","WorkflowsNode--error":m.value=="error"}])},[u.value&&m.value===null?(E(),M("div",s5)):Se("",!0),W("div",i5,[m.value=="running"?(E(),M("div",l5)):Se("",!0)]),W("div",c5,[W("div",u5,[Ge(a5,{urls:g.value},null,8,["urls"]),Ge(t5,{"component-id":P(o),class:"nodeNamer","block-name":l.value.name},null,8,["component-id","block-name"]),d.value?(E(),M("div",d5," Deprecated ")):Se("",!0)]),(E(!0),M(Ve,null,It(A.value,(S,F)=>(E(),M("div",{key:F,class:"outputs"},[W("h4",null,Pe(l.value.fields[F].name),1),(E(!0),M(Ve,null,It(S,(Z,re)=>(E(),M("div",{key:re,class:"output"},[Dt(Pe(Z.name)+" ",1),W("div",{class:it(["ball",Z.style]),"data-writer-socket-id":re,"data-writer-unselectable":!0,onClickCapture:w[0]||(w[0]=Cr(()=>{},["stop"])),onMousedownCapture:ce=>$(ce,re)},null,42,f5)]))),128)),Object.keys(S).length==0?(E(),M("div",p5,"None configured.")):Se("",!0)]))),128)),W("div",h5,[(E(!0),M(Ve,null,It(v.value,(S,F)=>(E(),M("div",{key:F,class:"output"},[Object.keys(v.value).length>1?(E(),M(Ve,{key:0},[Dt(Pe(S.name),1)],64)):Se("",!0),W("div",{class:it(["ball",S.style]),"data-writer-socket-id":F,"data-writer-unselectable":!0,onClickCapture:w[1]||(w[1]=Cr(()=>{},["stop"])),onMousedownCapture:Z=>$(Z,F)},null,42,m5)]))),128))])])],2))}}),y5=Ne(g5,[["__scopeId","data-v-bfaca94b"]]),_5="The root component of the application, which serves as the starting point of the component hierarchy.",b5={writer:{name:"Blueprints Root",toolkit:"workflows",category:"Root",description:_5,allowedChildrenTypes:["workflows_workflow"],fields:{}}},w5=ke({...b5,__name:"WorkflowsRoot",setup(e){const t=ne(oe.core),n=ne(oe.getChildrenVNodes),r=et("rootEl"),a=J(()=>{const o=t.activePageId.value;if(!!t.getComponentById(o)&&t.isChildOf("workflows_root",o))return o;const i=t.getComponents("workflows_root",{includeBMC:!0,includeCMC:!1,sortedByPosition:!0});return i.length==0?null:i[0].id});return(o,s)=>(E(),M("div",{ref_key:"rootEl",ref:r,class:"WorkflowsRoot","data-writer-container":""},[(E(!0),M(Ve,null,It(P(n)(),i=>(E(),M(Ve,{key:i.key},[i.key===`${a.value}:0`?(E(),je(Po(i),{key:0})):Se("",!0)],64))),128))],512))}}),A5=Ne(w5,[["__scopeId","data-v-aa09395a"]]),Gd={root:bD,page:uD,sidebar:gR,button:QR,text:fP,section:iR,header:ZO,heading:Ex,dataframe:_x,html:Oy,pagination:yL,repeater:AL,column:HO,columns:qO,tab:CR,tabs:xR,link:SP,horizontalstack:rR,separator:dR,image:Dx,pdf:zL,iframe:QL,googlemaps:rD,mapbox:SD,icon:xx,timer:EL,textinput:aO,textareainput:cO,numberinput:wN,sliderinput:WN,rangeinput:ZN,colorinput:k2,dateinput:O2,timeinput:mO,radioinput:TN,checkboxinput:_2,dropdowninput:U2,selectinput:RN,multiselectinput:vN,fileinput:nN,webcamcapture:RL,vegalitechart:mP,plotlygraph:iP,metric:rP,message:Jx,videoplayer:bP,chatbot:oM,step:jR,steps:WR,ratinginput:$O,tags:pM,switchinput:xO,reuse:DL,avatar:AM,annotatedtext:TM,jsonviewer:QM,workflows_root:A5,workflows_workflow:QD,progressbar:c2},As={};function C5(e){const t=`Component type "${e}" not supported. If it's a custom component, please ensure it's been loaded.`;return{writer:{name:"Fallback Component",allowedChildrenTypes:["*"],description:t,category:"Fallback"},setup(n,{slots:r}){return()=>ma("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,r.default({})])}}}function $5(e){var a,o;const t={workflows_node:y5},n=As[e];if(!n)return;const r=n.baseType;return{...t[r],writer:{...t[r].writer,...As[e].writer,fields:{...(a=t[r].writer)==null?void 0:a.fields,...(o=As[e].writer)==null?void 0:o.fields}}}}function S5(e){return $5(e)??Gd[e]??C5(e)}function Ns(e){var t;return(t=S5(e))==null?void 0:t.writer}function Jd(){return[...Object.keys(Gd),...Object.keys(As)]}function I5(e,t){Gd[e]=t}function E5(e,t){As[e]=t}function k5(e){let t=!1;return x5(e),Object.entries(e).forEach(([,n])=>{t=N5(n,e)||t,t=T5(n)||t}),t}function T5(e){const t=Bn(),n=Ns(e.type);if(!n||n.category=="Fallback")return t.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let r=!1;return r=L5(e),r=R5(e)||r,P5(e,n),M5(e,n),r}function wu(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,r])=>r.parentId===e).forEach(([r])=>wu(r,t,n))}function x5(e){const t=Bn(),n=Object.fromEntries(Object.entries(e).map(([r])=>[r,!1]));wu("root",e,n),wu("workflows_root",e,n),Object.entries(n).forEach(([r,a])=>{a||t.warn(`Component ${r} (${e[r].type}). Orphan component.`)})}function P5(e,t){const n=Bn(),r=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(a=>{r.includes(a)||n.warn(`Component ${e.id} (${e.type}). Field key "${a}" is defined in the component but not in the template.`)})}function M5(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const r=e.binding.eventType;if(n.includes(r)&&t.events[r].bindable)return;Bn().warn(`Component ${e.id} (${e.type}). The component is bound to event "${e.binding.eventType}" but the template doesn't define that event or it's not bindable.`)}function N5(e,t){const n=Bn();let r=!1;e.id=="root"&&e.position!==0&&n.error("Root must be at position 0."),e.position==-1&&n.error(`Component ${e.id} (${e.type}). Invalid position.`);const a=Object.values(t).filter(i=>i.parentId===e.id&&i.position!==-2&&!i.isCodeManaged);let o=0;return a.forEach(i=>{o+=i.position}),(a.length-1)*a.length/2!==o&&(n.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),O5(a),r=!0),r}function O5(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function R5(e){var n,r,a;let t=!1;if(Object.keys(e.handlers??{}).forEach(o=>{if(!o.startsWith("ss-"))return;const s=`wf-${o.substring(3)}`;e.handlers[s]=e.handlers[o],t=!0,delete e.handlers[o]}),(r=(n=e.binding)==null?void 0:n.eventType)!=null&&r.startsWith("ss-")){const s=`wf-${((a=e.binding)==null?void 0:a.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function L5(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const r={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=r[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.alignment]||e.content.alignment,delete e.content.alignment,n=!0}}else e.type=="section"&&"snapMode"in e.content&&(delete e.content.snapMode,n=!0);return n}function D5(e){let t="";const n=[];let r=!1;for(let o=0;o<e.length;o++){const s=e[o];if(s==="."&&!r){n.push(t),t="";continue}t+=s,s==="\\"?r=!0:r=!1}return n.push(t),n.map(o=>o.replaceAll("\\.","."))}const F5="WriterCustomComponentTemplates";async function j5(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await B5(t):n.endsWith(".css")&&U5(t)}))}async function B5(e){var n;const t=Bn();t.log(`Importing custom component templates at "${e}"...`),await Jt(()=>import(jy()+e),[],import.meta.url),(n=Object.entries(window[F5]))==null||n.forEach(([r,a])=>{V5(r)?(I5(`custom_${r}`,a),t.log(`Registering template for "${r}".`)):t.warn(`custom component '${r}' is ignored. A custom component should be declared using only alphanumeric lowercase and _.`)})}function V5(e){return/^[a-z0-9_]+$/.test(e)}function U5(e){const t=document.createElement("link");t.rel="stylesheet",t.href=jy()+e,document.head.appendChild(t)}function jy(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function H5(e){return typeof e!="object"||e===null?!1:e.type==="file"&&typeof e.content=="string"}function r3(e){return typeof e!="object"||e===null?!1:e.type==="binary"}function jo(e){return typeof e!="object"||e===null?!1:e.type==="directory"&&typeof e.children=="object"}function*z5(e,t=[]){if(!jo(e)){yield t;return}for(const[n,r]of Object.entries(e.children))yield*z5(r,[...t,n])}function*K5(e,t=[]){if(yield t,!!jo(e))for(const[n,r]of Object.entries(e.children))yield*K5(r,[...t,n])}function Yd(e,t){if(e.length===0)return t;if(!jo(t))return;const[n,...r]=e,a=t.children[n];return r.length===0?a:Yd(r,a)}function Au(e,t,n={type:"file",content:"",complete:!0}){var o;const r=structuredClone(t);let a=r;for(let s=0;s<e.length;s++){if(!jo(a))return r;const i=e.at(s);if(s===e.length-1)return a.children[i]=n,r;(o=a.children)[i]??(o[i]={type:"directory",children:{}}),a=a.children[i]}return r}function W5(e,t,n){const r=Yd(e,n);if(jo(r)||r===void 0)return n;const a=By(e,n);return Au(t,a,structuredClone(r))}function By(e,t){var a;const n=structuredClone(t);let r=n;for(let o=0;o<e.length;o++){if(!jo(r))return n;const s=e.at(o);if(!(s in r.children))return n;if(o===e.length-1)return delete r.children[s],n;(a=r.children)[s]??(a[s]={type:"directory",children:{}}),r=r.children[s]}return n}const q5=1e3,G5=6e4;function J5(){let e=null;const t=$e(null),n=$e(null),r=hr([]),a=$e(null),o=hr({type:"directory",children:{}}),s=$e({}),i=$e([]),l=$e({});let c;const u=$e("idle");let d=0;const m=$e(new Map);let y=[],b=[];const v=$e(null);async function _(){await A(),g(),n.value=="edit"}async function A(){const j=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),V=await j.json();if(j.status>400)throw"Connection rejected.";V.extensionPaths&&await j5(V.extensionPaths),n.value=V.mode,s.value=V.components,l.value=V.userState,Z(V.mail),e=V.sessionId,t.value=new Date().getTime(),r.value=V.featureFlags,$(V.abstractTemplates),i.value=V.userFunctions,a.value=V.runCode,o.value=V.sourceFiles,await F(),!(n.value!="edit"||!k5(V.components))&&await Le()}function $(j){Object.entries(j??{}).forEach(([V,K])=>{E5(V,K)})}function g(){setTimeout(()=>{I("keepAlive",{},g)},G5)}function p(j){j&&Object.entries(j).forEach(([V,K])=>{const ue=V.charAt(0),U=D5(V.substring(1)),z=U.length-1;let ae=l.value;const D=ue==="-";for(let Q=0;Q<z;Q++){const de=ae==null?void 0:ae[U[Q]];typeof de=="object"&&de!==null?ae=de:D||(ae[U[Q]]={},ae=ae[U[Q]])}D?delete ae[U.at(-1)]:ae[U.at(-1)]=K})}function w(j){j&&(s.value=j)}function S(){m.value.forEach(({callback:j})=>{j==null||j({ok:!1})}),m.value.clear()}async function F(){if(c)return;const j=Bn(),V=new URL("./api/stream",window.location.href);return V.protocol=V.protocol.replace("https","wss"),V.protocol=V.protocol.replace("http","ws"),c=new WebSocket(V.href),c.onopen=()=>{S(),u.value="connected",j.log("WebSocket connected. Initialising stream..."),I("streamInit",{sessionId:e})},c.onmessage=K=>{var z,ae,D,Q;const ue=JSON.parse(K.data);if(ue.messageType=="announcement"&&ue.payload.type=="codeUpdate"){c.close(),A();return}if(ue.messageType=="announcement"&&ue.payload.type=="mail"){Z(ue.payload.payload);return}(ue.messageType=="eventResponse"||ue.messageType=="stateEnquiryResponse")&&(p((z=ue.payload)==null?void 0:z.mutations),Z((ae=ue.payload)==null?void 0:ae.mail),w((D=ue.payload)==null?void 0:D.components));const U=m.value.get(ue.trackingId);(Q=U==null?void 0:U.callback)==null||Q.call(U,{ok:!0,payload:ue.payload}),m.value.delete(ue.trackingId)},c.onclose=async K=>{if(c=null,u.value="offline",K.code==1008){j.error("Invalid session. Reinitialising..."),await A();return}j.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await F()}catch{j.error("Couldn't reconnect.")}},q5)},new Promise((K,ue)=>{c.addEventListener("open",()=>K(),{once:!0}),c.addEventListener("close",()=>ue(),{once:!0})})}function Z(j=[]){y.push(...j),y=y.filter(V=>{const K=b.filter(ue=>ue.mailType==V.type);if(K.length==0)return V;K.forEach(ue=>ue.fn(V.payload))})}function re(j,V){b.push({mailType:j,fn:V}),Z()}function ce(j,V){b=b.filter(K=>!(K.mailType===j&&K.fn===V))}function Oe(j){var K;let V=null;if(j instanceof CustomEvent)V=((K=j.detail)==null?void 0:K.payload)??null;else{const ue={};for(const U in j){const z=j[U];typeof z!="function"&&(z instanceof Object||(ue[U]=z))}V=ue}return V}async function ge(j,V,K){var D,Q;const ue=K?Oe(j):null;let U,z;j instanceof CustomEvent&&(U=(D=j.detail)==null?void 0:D.callback,z=(Q=j.detail)==null?void 0:Q.handler),I("event",async()=>({type:j.type,instancePath:V,handler:z,payload:await ue}),U,!0)}async function we(j){return new Promise((V,K)=>{I("hashRequest",{message:j},U=>{var z;if(!U.ok)return K("Couldn't connect to the server.");V((z=U.payload)==null?void 0:z.message)})})}function _e(j,V){const K=structuredClone(ft(o.value)),ue=Yd(V,K);H5(ue)&&(ue.content=j,ue.complete=!0,o.value=K)}async function Ke(j){return new Promise((V,K)=>{I("createSourceFile",{path:j},U=>{var z;if(!U.ok)return K("Couldn't connect to the server.");if((z=U.payload)!=null&&z.error)return K("Couldn't create the file.");o.value=Au(j,ft(o.value)),V()})})}async function Ee(j,V){return new Promise((K,ue)=>{I("uploadSourceFile",{path:j,content:V},z=>{var ae,D;if(!z.ok)return ue("Couldn't connect to the server.");if((ae=z.payload)!=null&&ae.error)return ue("Couldn't upload the file.");o.value=((D=z.payload)==null?void 0:D.sourceFiles)??Au(j,ft(o.value)),K()})})}async function Ae(j,V){return new Promise((K,ue)=>{I("renameSourceFile",{from:j,to:V},z=>{var ae;if(!z.ok)return ue("Couldn't connect to the server.");if((ae=z.payload)!=null&&ae.error)return ue("Couldn't rename the file.");o.value=W5(j,V,ft(o.value)),K()})})}async function be(j){return new Promise((V,K)=>{I("deleteSourceFile",{path:j},U=>{var z;if(!U.ok)return K("Couldn't connect to the server.");if((z=U.payload)!=null&&z.error)return K("Couldn't delete the file.");o.value=By(j,ft(o.value)),V()})})}async function ve(j,V=["main.py"]){return new Promise((K,ue)=>{I("codeSaveRequest",{code:j,path:V},z=>{if(!z.ok)return ue("Couldn't connect to the server.");_e(j,V),K()}),V.join("/")==="main.py"&&(u.value="suspended")})}function me(j){return new Promise((V,K)=>{I("loadSourceFile",{path:j},U=>{if(!U.ok)return K("Couldn't connect to the server.");_e(U.payload.content,j),V()})})}async function O(j){return new Promise((V,K)=>{I("listResources",{resource_type:j},U=>{var z;if(!U.ok)return K("Couldn't connect to the server.");V(((z=U.payload)==null?void 0:z.data)??[])})})}async function fe(j){I("stateEnquiry",{},j,!0)}function q(j){const ue=()=>{m.value.has(j)&&fe(()=>setTimeout(ue,150))};setTimeout(ue,150)}async function I(j,V,K,ue=!1){if(u.value=="offline"||u.value=="suspended"){K==null||K({ok:!1});return}const U=Bn(),z=d++;try{(K||ue)&&m.value.set(z,{callback:K}),ue&&q(z);let ae;typeof V=="function"?ae=await V():ae=V;const D={type:j,trackingId:z,payload:ae};if(c.readyState!==c.OPEN)throw"Connection lost.";c.send(JSON.stringify(D,eg))}catch(ae){U.error("sendFrontendMessage error",ae),K==null||K({ok:!1})}}function R(j){delete s.value[j]}function pe(j){s.value[j.id]=j}async function Le(){const j={};Object.entries(s.value).forEach(([K,ue])=>{ue.isCodeManaged||(j[K]=ue)});const V={components:j};return new Promise((K,ue)=>{I("componentUpdate",V,z=>{if(!z.ok)return ue("Couldn't connect to the server.");K()})})}function B(j){return s.value[j]}function ee(j,V){let K=s.value[V];do{if(K.parentId==j)return!0;K=s.value[K.parentId]}while(K);return!1}function X(j,{includeBMC:V=!0,includeCMC:K=!0,sortedByPosition:ue=!1}={}){let U=Object.values(s.value);return typeof j<"u"&&(U=U.filter(z=>z.parentId==j)),U=U.filter(z=>{const ae=z.isCodeManaged;return V&&!ae||K&&ae}),ue&&(U=U.sort((z,ae)=>z.isCodeManaged&&!ae.isCodeManaged?1:!z.isCodeManaged&&ae.isCodeManaged?-1:z.position>ae.position?1:-1)),U}function*ie(j,V={}){for(const K of X(j,V))yield K,yield*ie(K.id,V)}function Ie(j){const K=X("root").filter(ue=>ue.content.key==j);K.length!=0&&k(K[0].id)}function k(j){v.value=j}function x(j){return qd(s.value,j)}return{webSocket:c,syncHealth:u,frontendMessageMap:En(m),mode:En(n),userFunctions:En(i),addMailSubscription:re,removeMailSubscription:ce,init:_,forwardEvent:ge,hashMessage:we,runCode:En(a),sourceFiles:En(o),sendCodeSaveRequest:ve,sendCreateSourceFileRequest:Ke,sendRenameSourceFileRequest:Ae,sendDeleteSourceFileRequest:be,sendFileUploadRequest:Ee,requestSourceFileLoading:me,sendListResourcesRequest:O,sendComponentUpdate:Le,addComponent:pe,deleteComponent:R,getComponentById:B,getComponents:X,getComponentsNested:ie,setActivePageId:k,activePageId:En(v),setActivePageFromKey:Ie,getComponentDefinition:Ns,getSupportedComponentTypes:Jd,getContainableTypes:x,sessionTimestamp:En(t),userState:En(l),isChildOf:ee,featureFlags:En(r)}}function Y5(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const ls=J5();globalThis.vue=FC;globalThis.injectionKeys=oe;globalThis.core=ls;const ul=Bn();async function Q5(){await ls.init();const e=ls.mode.value,t=e=="edit"?p$():void 0;t&&ls.addMailSubscription("logEntry",t.handleLogEntry),ul.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await Jt(()=>import("./ComponentRenderer-BRt_Me-n.js"),__vite__mapDeps([5,6,7]),import.meta.url),{default:r}=e==="edit"&&await Jt(()=>import("./BuilderApp-DVqlivId.js").then(o=>o.c),__vite__mapDeps([8,9,10]),import.meta.url),a=rl(n||r);a.use(i$),a.provide(oe.core,ls),a.provide(oe.builderManager,t),Y5(a),a.mount("#app")}ul.log("Initialising Writer Framework core...");Q5().then(async()=>{ul.log("Core initialised.")}).catch(e=>{ul.error("Core initialisation failed.",e),document.write(e)});export{jo as $,t3 as A,Hd as B,xo as C,Ht as D,mt as E,ze as F,Fn as G,hD as H,n3 as I,fD as J,Jt as K,Mu as L,P as M,Se as N,Iy as O,Ly as P,tr as Q,uy as R,ft as S,w1 as T,hr as U,z5 as V,Yn as W,Yd as X,r3 as Y,H5 as Z,Ne as _,oe as a,Au as a0,K5 as a1,By as a2,zh as a3,Dy as a4,Qh as a5,kw as a6,Yw as a7,tg as a8,Gc as a9,Ey as aA,Po as aB,Z5 as aC,e3 as aD,OT as aE,VT as aF,G as aG,Jd as aH,Ns as aI,a5 as aJ,o5 as aK,c$ as aL,C1 as aM,Ua as aN,Cr as aa,ga as ab,Ev as ac,St as ad,V1 as ae,En as af,oy as ag,Qt as ah,Bn as ai,Bm as aj,SC as ak,Mo as al,xD as am,Fy as an,f$ as ao,rg as ap,X5 as aq,_o as ar,U$ as as,Xv as at,Hr as au,qr as av,Zv as aw,wa as ax,Tl as ay,l$ as az,je as b,J as c,ke as d,M as e,W as f,S5 as g,ma as h,ne as i,et as j,_l as k,Xt as l,sn as m,Ge as n,E as o,zm as p,Ze as q,$e as r,Dt as s,Pe as t,Fl as u,Wn as v,He as w,Ve as x,It as y,it as z};
