formeo 5.0.3 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 5.0.2
4
+ Version: 5.0.3
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
@@ -9,7 +9,7 @@ var us=Object.create,pi=Object.defineProperty,hs=Object.getOwnPropertyDescriptor
9
9
 
10
10
  `,`
11
11
  `))}static fromFile(i){const t=i.split(`
12
- `),n={};for(let m,f=0;f<t.length;f++)m=/^(.+?) *?= *?([^\n]+)/.exec(t[f]),m&&(n[m[1]]=m[2].trim());return n}static getInstance(i){return qt||(qt=new ii(i)),qt}static resetInstance(){qt=null}async loadLang(i,t=!0){if(this.loaded.includes(i)&&t)return this.langs[i];const n=`${this.config.location}${i}${this.config.extension}`;try{const m=await(async function(g){try{const c=await fetch(g);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c[g.endsWith(".lang")?"text":"json"]()}catch(c){throw c}})(n),f=ii.processFile(m);return this.applyLanguage(i,f),this.langs[i]}catch{return this.applyLanguage(i)}}applyLanguage(i,t={}){const n=this.config.override[i]||{},m=this.langs[i]||{};return this.langs[i]={...m,...t,...n},this.loaded.push(i),this.langs[i]}get getLangs(){return this.config.langs}async setCurrent(i="en-US"){return this.loaded.includes(i)||await this.loadLang(i),this.locale=i,this.current=this.langs[i],this.current}},{apply:(e,i,t)=>e.getInstance(...t),construct:(e,i)=>new e(...i),get:(e,i)=>e[i]}),Z=Wr.getInstance();(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();var ys=Object.defineProperty,bs=(e,i,t)=>i in e?ys(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,Fe=(e,i,t)=>bs(e,typeof i!="symbol"?i+"":i,t),Mt={tooltip:"_3x4ZIcu-",visible:"JIt36hCJ"},ws={triggerName:"tooltip"},Br=class gt{constructor(i=ws){Fe(this,"triggerName"),Fe(this,"tooltip"),Fe(this,"activeTriggerType",null),Fe(this,"spacing",12),Fe(this,"handleClick",t=>{const n=this.triggerName,m=t.target.closest(`[${n}][${n}-type="click"]`);if(m)if(this.isVisible())this.hide();else{const f=m.getAttribute(`${n}`);this.show(m,f),this.activeTriggerType="click"}else this.hide()}),Fe(this,"handleMouseOver",t=>{const n=this.triggerName,m=t.target.closest(`[${n}]`);if(this.activeTriggerType!=="click"&&m?.getAttribute(`${n}-type`)!=="click"){const f=m?.getAttribute(`${n}`);f&&(this.show(m,f),this.activeTriggerType="hover")}}),Fe(this,"handleMouseOut",t=>{const n=this.triggerName,m=t.target.closest(`[${n}]`);this.activeTriggerType!=="click"&&m?.getAttribute(`${n}-type`)!=="click"&&this.hide()}),Fe(this,"handleResize",()=>{this.isVisible()&&this.hide()}),Fe(this,"handleScroll",()=>{this.isVisible()&&this.hide()}),gt.instance&&gt.instance.destroy(),this.triggerName=`data-${i.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${Mt.tooltip}`,document.body.appendChild(this.tooltip),this.setupEventListeners(),gt.instance=this}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("touchstart",this.handleMouseOver),document.addEventListener("touchend",this.handleMouseOut),document.addEventListener("click",this.handleClick),globalThis.addEventListener("resize",this.handleResize),globalThis.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(Mt.visible)}calculatePosition(i){const t=i.getBoundingClientRect(),n=this.tooltip.getBoundingClientRect(),m=[{name:"top",x:t.left+(t.width-n.width)/2,y:t.top-n.height-this.spacing},{name:"bottom",x:t.left+(t.width-n.width)/2,y:t.bottom+this.spacing},{name:"left",x:t.left-n.width-this.spacing,y:t.top+(t.height-n.height)/2},{name:"right",x:t.right+this.spacing,y:t.top+(t.height-n.height)/2},{name:"top-left",x:t.left,y:t.top-n.height-this.spacing},{name:"top-right",x:t.right-n.width,y:t.top-n.height-this.spacing},{name:"bottom-left",x:t.left,y:t.bottom+this.spacing},{name:"bottom-right",x:t.right-n.width,y:t.bottom+this.spacing}];return m.find(f=>this.fitsInViewport(f,n))||m[0]}fitsInViewport(i,t){return i.x>=0&&i.y>=0&&i.x+t.width<=globalThis.innerWidth&&i.y+t.height<=globalThis.innerHeight?[[i.x,i.y],[i.x+t.width,i.y],[i.x,i.y+t.height],[i.x+t.width,i.y+t.height],[i.x+t.width/2,i.y+t.height/2]].flatMap(([n,m])=>Array.from(document.elementsFromPoint(n,m))).filter(n=>{if(this.tooltip.contains(n)||n===this.tooltip||n.classList.contains(Mt.tooltip)||getComputedStyle(n).pointerEvents==="none")return!1}).length===0:!1}show(i,t){this.tooltip.innerHTML=t??"",this.tooltip.classList.add(Mt.visible);const n=this.calculatePosition(i);this.tooltip.style.left=`${n.x}px`,this.tooltip.style.top=`${n.y}px`,this.tooltip.dataset.position=n.name}hide(){this.tooltip.classList.remove(Mt.visible),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("touchstart",this.handleMouseOver),document.removeEventListener("touchend",this.handleMouseOut),document.removeEventListener("click",this.handleClick),globalThis.removeEventListener("resize",this.handleResize),globalThis.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove(),gt.instance===this&&(gt.instance=null)}};Fe(Br,"instance",null);var jr=Br;globalThis!==void 0&&(globalThis.SmartTooltip=jr);var Cs="formeo",Ss="5.0.2",xs="module",Es="dist/formeo.cjs.js",As="dist/formeo.es.js",ks="dist/formeo.umd.js",Ts={".":{import:"./dist/formeo.es.js",require:"./dist/formeo.cjs.js",default:"./dist/formeo.umd.js"},"./dist/formeo.min.css":{import:"./dist/formeo.min.css",require:"./dist/formeo.min.css",default:"./dist/formeo.min.css"}},Ms=["dist/*","demo/**/*"],$s="https://formeo.io",Ls={url:"https://github.com/Draggable/formeo",type:"git"},Rs="Draggable https://draggable.io",_s=[{name:"Kevin Chappell",email:"kevin@chappell.dev",url:"https://kevin-chappell.com"}],Os={url:"https://github.com/draggable/formeo/issues"},Is="A zero dependency JavaScript module for drag and drop form creation.",Ds=["drag and drop","form builder","form maker","forms"];var Ns=["**/*","node_modules","test"],Fs={files:{test:["test/**/*.spec.js"],"formeo-editor":{js:"src/js/editor.js"},"formeo-renderer":{js:"src/js/renderer.js"},site:["demo/assets/sass/site.scss"]}},zs={dev:"NODE_ENV=development vite",preview:"vite preview","prebuild:lib":"rm -rf dist","build:lib":"npm-run-all -p build:lib:unminified build:lib:minified","build:lib:unminified":"vite build --config vite.config.lib.mjs --mode production","build:lib:minified":"vite build --config vite.config.lib.mjs --mode production-minified",build:"npm-run-all -p build:icons build:demo",prebuild:"npm run build:lib",postbuild:"npm run generate:jsonSchema","build:demo":"vite build --mode demo","postbuild:demo":"node --no-warnings tools/copy-assets.mjs","build:demo:watch":"vite build --mode demo --watch","build:icons":"node ./tools/generate-sprite",lint:"biome check ./src","lint:fix":"biome check --write ./src",format:"biome format --write .",test:"node --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:watch":"node --watch --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:updateSnapshots":"node --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --test-update-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:ci":"npm test --coverage",start:"npm-run-all build:icons dev","semantic-release":"semantic-release --ci --debug","copy:lang":"node ./tools/copy-directory.mjs ./node_modules/formeo-i18n/dist/lang ./src/demo/assets/lang","travis-deploy-once":"travis-deploy-once --pro","playwright:test":"playwright test","playwright:test:ui":"playwright test --ui","playwright:test:report":"playwright show-report","playwright:test:ci":"playwright test --reporter=dot",prepush:"npm test",prepare:"lefthook install",postmerge:"lefthook install","generate:jsonSchema":"node --experimental-strip-types --no-warnings ./tools/generate-json-schema.ts"},Ps={"@biomejs/biome":"^2.3.3","@commitlint/cli":"^21.0.1","@commitlint/config-conventional":"^21.0.1","@playwright/test":"^1.49.1","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.8","@semantic-release/npm":"^13.1.3","@types/node":"^25.8.0","ace-builds":"^1.36.5",esbuild:"^0.28.0",jsdom:"^29.1.1",lefthook:"^2.1.6","npm-run-all":"^4.1.5","sass-embedded":"^1.80.1","semantic-release":"^25.0.2","svg-sprite":"^2.0.4",vite:"^8.0.13","vite-plugin-banner":"^0.8.0","vite-plugin-compression":"^0.5.1","vite-plugin-html":"^3.2.2",zod:"^4.4.3","zod-to-json-schema":"^3.23.5"},Hs={"@draggable/formeo-languages":"^3.4.1","@draggable/i18n":"^1.0.7","@draggable/tooltip":"^1.2.2",lodash:"^4.17.21",sortablejs:"^1.15.3"},Ws={branches:["main"],verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],publish:["@semantic-release/npm","@semantic-release/github"],success:["@semantic-release/github"],fail:["@semantic-release/github"]},Bs={extends:["@commitlint/config-conventional"],rules:{"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]]}},Vr={name:Cs,version:Ss,type:xs,main:Es,module:As,unpkg:ks,exports:Ts,files:Ms,homepage:$s,repository:Ls,author:Rs,contributors:_s,bugs:Os,description:Is,keywords:Ds,license:"MIT",ignore:Ns,config:Fs,scripts:zs,devDependencies:Ps,dependencies:Hs,release:Ws,commitlint:Bs},js=j(((e,i)=>{function t(){this.__data__=[],this.size=0}i.exports=t})),Vt=j(((e,i)=>{function t(n,m){return n===m||n!==n&&m!==m}i.exports=t})),Ei=j(((e,i)=>{var t=Vt();function n(m,f){for(var g=m.length;g--;)if(t(m[g][0],f))return g;return-1}i.exports=n})),Vs=j(((e,i)=>{var t=Ei(),n=Array.prototype.splice;function m(f){var g=this.__data__,c=t(g,f);return c<0?!1:(c==g.length-1?g.pop():n.call(g,c,1),--this.size,!0)}i.exports=m})),Us=j(((e,i)=>{var t=Ei();function n(m){var f=this.__data__,g=t(f,m);return g<0?void 0:f[g][1]}i.exports=n})),Gs=j(((e,i)=>{var t=Ei();function n(m){return t(this.__data__,m)>-1}i.exports=n})),Ks=j(((e,i)=>{var t=Ei();function n(m,f){var g=this.__data__,c=t(g,m);return c<0?(++this.size,g.push([m,f])):g[c][1]=f,this}i.exports=n})),Ai=j(((e,i)=>{var t=js(),n=Vs(),m=Us(),f=Gs(),g=Ks();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),qs=j(((e,i)=>{var t=Ai();function n(){this.__data__=new t,this.size=0}i.exports=n})),Ys=j(((e,i)=>{function t(n){var m=this.__data__,f=m.delete(n);return this.size=m.size,f}i.exports=t})),Zs=j(((e,i)=>{function t(n){return this.__data__.get(n)}i.exports=t})),Qs=j(((e,i)=>{function t(n){return this.__data__.has(n)}i.exports=t})),Ur=j(((e,i)=>{var t=typeof global=="object"&&global&&global.Object===Object&&global;i.exports=t})),Be=j(((e,i)=>{var t=Ur(),n=typeof self=="object"&&self&&self.Object===Object&&self,m=t||n||Function("return this")();i.exports=m})),ki=j(((e,i)=>{var t=Be().Symbol;i.exports=t})),Xs=j(((e,i)=>{var t=ki(),n=Object.prototype,m=n.hasOwnProperty,f=n.toString,g=t?t.toStringTag:void 0;function c(o){var h=m.call(o,g),u=o[g];try{o[g]=void 0;var d=!0}catch{}var l=f.call(o);return d&&(h?o[g]=u:delete o[g]),l}i.exports=c})),Js=j(((e,i)=>{var t=Object.prototype.toString;function n(m){return t.call(m)}i.exports=n})),At=j(((e,i)=>{var t=ki(),n=Xs(),m=Js(),f="[object Null]",g="[object Undefined]",c=t?t.toStringTag:void 0;function o(h){return h==null?h===void 0?g:f:c&&c in Object(h)?n(h):m(h)}i.exports=o})),et=j(((e,i)=>{function t(n){var m=typeof n;return n!=null&&(m=="object"||m=="function")}i.exports=t})),xn=j(((e,i)=>{var t=At(),n=et(),m="[object AsyncFunction]",f="[object Function]",g="[object GeneratorFunction]",c="[object Proxy]";function o(h){if(!n(h))return!1;var u=t(h);return u==f||u==g||u==m||u==c}i.exports=o})),ea=j(((e,i)=>{var t=Be()["__core-js_shared__"];i.exports=t})),ta=j(((e,i)=>{var t=ea(),n=(function(){var f=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""})();function m(f){return!!n&&n in f}i.exports=m})),Gr=j(((e,i)=>{var t=Function.prototype.toString;function n(m){if(m!=null){try{return t.call(m)}catch{}try{return m+""}catch{}}return""}i.exports=n})),ia=j(((e,i)=>{var t=xn(),n=ta(),m=et(),f=Gr(),g=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,o=Function.prototype,h=Object.prototype,u=o.toString,d=h.hasOwnProperty,l=RegExp("^"+u.call(d).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function s(r){return!m(r)||n(r)?!1:(t(r)?l:c).test(f(r))}i.exports=s})),na=j(((e,i)=>{function t(n,m){return n?.[m]}i.exports=t})),dt=j(((e,i)=>{var t=ia(),n=na();function m(f,g){var c=n(f,g);return t(c)?c:void 0}i.exports=m})),En=j(((e,i)=>{var t=dt()(Be(),"Map");i.exports=t})),Ti=j(((e,i)=>{var t=dt()(Object,"create");i.exports=t})),ra=j(((e,i)=>{var t=Ti();function n(){this.__data__=t?t(null):{},this.size=0}i.exports=n})),oa=j(((e,i)=>{function t(n){var m=this.has(n)&&delete this.__data__[n];return this.size-=m?1:0,m}i.exports=t})),sa=j(((e,i)=>{var t=Ti(),n="__lodash_hash_undefined__",m=Object.prototype.hasOwnProperty;function f(g){var c=this.__data__;if(t){var o=c[g];return o===n?void 0:o}return m.call(c,g)?c[g]:void 0}i.exports=f})),aa=j(((e,i)=>{var t=Ti(),n=Object.prototype.hasOwnProperty;function m(f){var g=this.__data__;return t?g[f]!==void 0:n.call(g,f)}i.exports=m})),la=j(((e,i)=>{var t=Ti(),n="__lodash_hash_undefined__";function m(f,g){var c=this.__data__;return this.size+=this.has(f)?0:1,c[f]=t&&g===void 0?n:g,this}i.exports=m})),ca=j(((e,i)=>{var t=ra(),n=oa(),m=sa(),f=aa(),g=la();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),da=j(((e,i)=>{var t=ca(),n=Ai(),m=En();function f(){this.size=0,this.__data__={hash:new t,map:new(m||n),string:new t}}i.exports=f})),ua=j(((e,i)=>{function t(n){var m=typeof n;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?n!=="__proto__":n===null}i.exports=t})),Mi=j(((e,i)=>{var t=ua();function n(m,f){var g=m.__data__;return t(f)?g[typeof f=="string"?"string":"hash"]:g.map}i.exports=n})),ha=j(((e,i)=>{var t=Mi();function n(m){var f=t(this,m).delete(m);return this.size-=f?1:0,f}i.exports=n})),pa=j(((e,i)=>{var t=Mi();function n(m){return t(this,m).get(m)}i.exports=n})),fa=j(((e,i)=>{var t=Mi();function n(m){return t(this,m).has(m)}i.exports=n})),ga=j(((e,i)=>{var t=Mi();function n(m,f){var g=t(this,m),c=g.size;return g.set(m,f),this.size+=g.size==c?0:1,this}i.exports=n})),An=j(((e,i)=>{var t=da(),n=ha(),m=pa(),f=fa(),g=ga();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),ma=j(((e,i)=>{var t=Ai(),n=En(),m=An(),f=200;function g(c,o){var h=this.__data__;if(h instanceof t){var u=h.__data__;if(!n||u.length<f-1)return u.push([c,o]),this.size=++h.size,this;h=this.__data__=new m(u)}return h.set(c,o),this.size=h.size,this}i.exports=g})),Kr=j(((e,i)=>{var t=Ai(),n=qs(),m=Ys(),f=Zs(),g=Qs(),c=ma();function o(h){var u=this.__data__=new t(h);this.size=u.size}o.prototype.clear=n,o.prototype.delete=m,o.prototype.get=f,o.prototype.has=g,o.prototype.set=c,i.exports=o})),qr=j(((e,i)=>{var t=dt(),n=(function(){try{var m=t(Object,"defineProperty");return m({},"",{}),m}catch{}})();i.exports=n})),kn=j(((e,i)=>{var t=qr();function n(m,f,g){f=="__proto__"&&t?t(m,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):m[f]=g}i.exports=n})),Yr=j(((e,i)=>{var t=kn(),n=Vt();function m(f,g,c){(c!==void 0&&!n(f[g],c)||c===void 0&&!(g in f))&&t(f,g,c)}i.exports=m})),va=j(((e,i)=>{function t(n){return function(m,f,g){for(var c=-1,o=Object(m),h=g(m),u=h.length;u--;){var d=h[n?u:++c];if(f(o[d],d,o)===!1)break}return m}}i.exports=t})),ya=j(((e,i)=>{var t=va()();i.exports=t})),ba=j(((e,i)=>{var t=Be(),n=typeof e=="object"&&e&&!e.nodeType&&e,m=n&&typeof i=="object"&&i&&!i.nodeType&&i,f=m&&m.exports===n?t.Buffer:void 0,g=f?f.allocUnsafe:void 0;function c(o,h){if(h)return o.slice();var u=o.length,d=g?g(u):new o.constructor(u);return o.copy(d),d}i.exports=c})),Zr=j(((e,i)=>{var t=Be().Uint8Array;i.exports=t})),wa=j(((e,i)=>{var t=Zr();function n(m){var f=new m.constructor(m.byteLength);return new t(f).set(new t(m)),f}i.exports=n})),Ca=j(((e,i)=>{var t=wa();function n(m,f){var g=f?t(m.buffer):m.buffer;return new m.constructor(g,m.byteOffset,m.length)}i.exports=n})),Sa=j(((e,i)=>{function t(n,m){var f=-1,g=n.length;for(m||(m=Array(g));++f<g;)m[f]=n[f];return m}i.exports=t})),xa=j(((e,i)=>{var t=et(),n=Object.create,m=(function(){function f(){}return function(g){if(!t(g))return{};if(n)return n(g);f.prototype=g;var c=new f;return f.prototype=void 0,c}})();i.exports=m})),Qr=j(((e,i)=>{function t(n,m){return function(f){return n(m(f))}}i.exports=t})),Xr=j(((e,i)=>{var t=Qr()(Object.getPrototypeOf,Object);i.exports=t})),Tn=j(((e,i)=>{var t=Object.prototype;function n(m){var f=m&&m.constructor;return m===(typeof f=="function"&&f.prototype||t)}i.exports=n})),Ea=j(((e,i)=>{var t=xa(),n=Xr(),m=Tn();function f(g){return typeof g.constructor=="function"&&!m(g)?t(n(g)):{}}i.exports=f})),ut=j(((e,i)=>{function t(n){return n!=null&&typeof n=="object"}i.exports=t})),Aa=j(((e,i)=>{var t=At(),n=ut(),m="[object Arguments]";function f(g){return n(g)&&t(g)==m}i.exports=f})),Jr=j(((e,i)=>{var t=Aa(),n=ut(),m=Object.prototype,f=m.hasOwnProperty,g=m.propertyIsEnumerable,c=t((function(){return arguments})())?t:function(o){return n(o)&&f.call(o,"callee")&&!g.call(o,"callee")};i.exports=c})),ht=j(((e,i)=>{var t=Array.isArray;i.exports=t})),eo=j(((e,i)=>{var t=9007199254740991;function n(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=t}i.exports=n})),$i=j(((e,i)=>{var t=xn(),n=eo();function m(f){return f!=null&&n(f.length)&&!t(f)}i.exports=m})),ka=j(((e,i)=>{var t=$i(),n=ut();function m(f){return n(f)&&t(f)}i.exports=m})),Ta=j(((e,i)=>{function t(){return!1}i.exports=t})),Mn=j(((e,i)=>{var t=Be(),n=Ta(),m=typeof e=="object"&&e&&!e.nodeType&&e,f=m&&typeof i=="object"&&i&&!i.nodeType&&i,g=f&&f.exports===m?t.Buffer:void 0,c=(g?g.isBuffer:void 0)||n;i.exports=c})),Ma=j(((e,i)=>{var t=At(),n=Xr(),m=ut(),f="[object Object]",g=Function.prototype,c=Object.prototype,o=g.toString,h=c.hasOwnProperty,u=o.call(Object);function d(l){if(!m(l)||t(l)!=f)return!1;var s=n(l);if(s===null)return!0;var r=h.call(s,"constructor")&&s.constructor;return typeof r=="function"&&r instanceof r&&o.call(r)==u}i.exports=d})),$a=j(((e,i)=>{var t=At(),n=eo(),m=ut(),f="[object Arguments]",g="[object Array]",c="[object Boolean]",o="[object Date]",h="[object Error]",u="[object Function]",d="[object Map]",l="[object Number]",s="[object Object]",r="[object RegExp]",a="[object Set]",p="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",k="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",S="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",R="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",T="[object Uint32Array]",E={};E[x]=E[w]=E[S]=E[M]=E[L]=E[R]=E[$]=E[D]=E[T]=!0,E[f]=E[g]=E[y]=E[c]=E[k]=E[o]=E[h]=E[u]=E[d]=E[l]=E[s]=E[r]=E[a]=E[p]=E[v]=!1;function C(b){return m(b)&&n(b.length)&&!!E[t(b)]}i.exports=C})),La=j(((e,i)=>{function t(n){return function(m){return n(m)}}i.exports=t})),Ra=j(((e,i)=>{var t=Ur(),n=typeof e=="object"&&e&&!e.nodeType&&e,m=n&&typeof i=="object"&&i&&!i.nodeType&&i,f=m&&m.exports===n&&t.process,g=(function(){try{var c=m&&m.require&&m.require("util").types;return c||f&&f.binding&&f.binding("util")}catch{}})();i.exports=g})),$n=j(((e,i)=>{var t=$a(),n=La(),m=Ra(),f=m&&m.isTypedArray,g=f?n(f):t;i.exports=g})),to=j(((e,i)=>{function t(n,m){if(!(m==="constructor"&&typeof n[m]=="function")&&m!="__proto__")return n[m]}i.exports=t})),io=j(((e,i)=>{var t=kn(),n=Vt(),m=Object.prototype.hasOwnProperty;function f(g,c,o){var h=g[c];(!(m.call(g,c)&&n(h,o))||o===void 0&&!(c in g))&&t(g,c,o)}i.exports=f})),_a=j(((e,i)=>{var t=io(),n=kn();function m(f,g,c,o){var h=!c;c||(c={});for(var u=-1,d=g.length;++u<d;){var l=g[u],s=o?o(c[l],f[l],l,c,f):void 0;s===void 0&&(s=f[l]),h?n(c,l,s):t(c,l,s)}return c}i.exports=m})),Oa=j(((e,i)=>{function t(n,m){for(var f=-1,g=Array(n);++f<n;)g[f]=m(f);return g}i.exports=t})),Ln=j(((e,i)=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function m(f,g){var c=typeof f;return g=g??t,!!g&&(c=="number"||c!="symbol"&&n.test(f))&&f>-1&&f%1==0&&f<g}i.exports=m})),no=j(((e,i)=>{var t=Oa(),n=Jr(),m=ht(),f=Mn(),g=Ln(),c=$n(),o=Object.prototype.hasOwnProperty;function h(u,d){var l=m(u),s=!l&&n(u),r=!l&&!s&&f(u),a=!l&&!s&&!r&&c(u),p=l||s||r||a,v=p?t(u.length,String):[],y=v.length;for(var k in u)(d||o.call(u,k))&&!(p&&(k=="length"||r&&(k=="offset"||k=="parent")||a&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||g(k,y)))&&v.push(k);return v}i.exports=h})),Ia=j(((e,i)=>{function t(n){var m=[];if(n!=null)for(var f in Object(n))m.push(f);return m}i.exports=t})),Da=j(((e,i)=>{var t=et(),n=Tn(),m=Ia(),f=Object.prototype.hasOwnProperty;function g(c){if(!t(c))return m(c);var o=n(c),h=[];for(var u in c)u=="constructor"&&(o||!f.call(c,u))||h.push(u);return h}i.exports=g})),ro=j(((e,i)=>{var t=no(),n=Da(),m=$i();function f(g){return m(g)?t(g,!0):n(g)}i.exports=f})),Na=j(((e,i)=>{var t=_a(),n=ro();function m(f){return t(f,n(f))}i.exports=m})),Fa=j(((e,i)=>{var t=Yr(),n=ba(),m=Ca(),f=Sa(),g=Ea(),c=Jr(),o=ht(),h=ka(),u=Mn(),d=xn(),l=et(),s=Ma(),r=$n(),a=to(),p=Na();function v(y,k,x,w,S,M,L){var R=a(y,x),$=a(k,x),D=L.get($);if(D){t(y,x,D);return}var T=M?M(R,$,x+"",y,k,L):void 0,E=T===void 0;if(E){var C=o($),b=!C&&u($),A=!C&&!b&&r($);T=$,C||b||A?o(R)?T=R:h(R)?T=f(R):b?(E=!1,T=n($,!0)):A?(E=!1,T=m($,!0)):T=[]:s($)||c($)?(T=R,c(R)?T=p(R):(!l(R)||d(R))&&(T=g($))):E=!1}E&&(L.set($,T),S(T,$,w,M,L),L.delete($)),t(y,x,T)}i.exports=v})),za=j(((e,i)=>{var t=Kr(),n=Yr(),m=ya(),f=Fa(),g=et(),c=ro(),o=to();function h(u,d,l,s,r){u!==d&&m(d,function(a,p){if(r||(r=new t),g(a))f(u,d,p,l,h,s,r);else{var v=s?s(o(u,p),a,p+"",u,d,r):void 0;v===void 0&&(v=a),n(u,p,v)}},c)}i.exports=h})),oo=j(((e,i)=>{function t(n){return n}i.exports=t})),Pa=j(((e,i)=>{function t(n,m,f){switch(f.length){case 0:return n.call(m);case 1:return n.call(m,f[0]);case 2:return n.call(m,f[0],f[1]);case 3:return n.call(m,f[0],f[1],f[2])}return n.apply(m,f)}i.exports=t})),Ha=j(((e,i)=>{var t=Pa(),n=Math.max;function m(f,g,c){return g=n(g===void 0?f.length-1:g,0),function(){for(var o=arguments,h=-1,u=n(o.length-g,0),d=Array(u);++h<u;)d[h]=o[g+h];h=-1;for(var l=Array(g+1);++h<g;)l[h]=o[h];return l[g]=c(d),t(f,this,l)}}i.exports=m})),Wa=j(((e,i)=>{function t(n){return function(){return n}}i.exports=t})),Ba=j(((e,i)=>{var t=Wa(),n=qr(),m=oo(),f=n?function(g,c){return n(g,"toString",{configurable:!0,enumerable:!1,value:t(c),writable:!0})}:m;i.exports=f})),ja=j(((e,i)=>{var t=800,n=16,m=Date.now;function f(g){var c=0,o=0;return function(){var h=m(),u=n-(h-o);if(o=h,u>0){if(++c>=t)return arguments[0]}else c=0;return g.apply(void 0,arguments)}}i.exports=f})),Va=j(((e,i)=>{var t=Ba(),n=ja()(t);i.exports=n})),Ua=j(((e,i)=>{var t=oo(),n=Ha(),m=Va();function f(g,c){return m(n(g,c,t),g+"")}i.exports=f})),Ga=j(((e,i)=>{var t=Vt(),n=$i(),m=Ln(),f=et();function g(c,o,h){if(!f(h))return!1;var u=typeof o;return(u=="number"?n(h)&&m(o,h.length):u=="string"&&o in h)?t(h[o],c):!1}i.exports=g})),Ka=j(((e,i)=>{var t=Ua(),n=Ga();function m(f){return t(function(g,c){var o=-1,h=c.length,u=h>1?c[h-1]:void 0,d=h>2?c[2]:void 0;for(u=f.length>3&&typeof u=="function"?(h--,u):void 0,d&&n(c[0],c[1],d)&&(u=h<3?void 0:u,h=1),g=Object(g);++o<h;){var l=c[o];l&&f(g,l,o,u)}return g})}i.exports=m})),qa=j(((e,i)=>{var t=za(),n=Ka()(function(m,f,g,c){t(m,f,g,c)});i.exports=n})),Ya=Et(qa(),1),Za=()=>crypto.randomUUID().slice(0,8),Qa=()=>Za().slice(0,8),cr=(e="",i)=>{if(!i)return console.warn("utils.match missing argument 2."),!1;const t=/[|\\{}()[\]^*$+?.]/g;let n=typeof i=="string"?[i]:i;n=n.map(f=>f==="*"?"":f.replace(t,"\\$&"));let m=!0;return n.length&&(m=!new RegExp(n.join("|"),"i").exec(e)),m},Xa=(e,i)=>{const t=e.indexOf(i);t!==-1&&e.splice(t,1)},be=e=>{const i=e.className?.match(ul);return i&&cl[i[0]]},st=e=>Array.from(new Set(e)),Me=e=>e?.attrs?.id||e?.id||Qa(),De=(e,i)=>{const t=(n,m)=>{if(Array.isArray(n))return m!=null?st(n.concat(m)):m;if(Array.isArray(m))return n!=null?st(m.concat(n)):m};return(0,Ya.default)({},e,i,t)},He=e=>{let i;const t=e instanceof Promise;if(e===null||typeof e!="object"||t)return e;if(e instanceof Date)return i=new Date,i.setTime(e.getTime()),i;if(Array.isArray(e)){i=[];for(let n=0,m=e.length;n<m;n++)i[n]=He(e[n]);return i}if(e instanceof Object){i={};for(const n in e)Object.hasOwn(e,n)&&(i[n]=He(e[n]));return i}throw new Error("Unable to copy Object, type not supported.")},zi=(e,i)=>e/i*100,dn=e=>`${e.toString()}%`,Rn=Object.create(null,{get:{value:e=>{const i=window.sessionStorage?.getItem(e);try{return JSON.parse(i)}catch{return i}}},set:{value:(e,i)=>{try{return window.sessionStorage?.setItem(e,JSON.stringify(i))}catch(t){console.error(t)}}}}),Te=e=>/^(stage|row|column|field)s./.test(e),Ja=e=>sl.test(e);function so(e,i=zn){let t=0;return function(...n){const m=Date.now();m-t>=i&&(t=m,e.apply(this,n))}}function fi(e,i=at){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>e.apply(this,n),i)}}function un(e){return e}function hn(){}function Li(e=Object.create(null)){if(typeof e=="string")try{return JSON.parse(e)}catch(i){return console.error("Invalid JSON string provided:",i),Object.create(null)}return e}var rt=e=>e?He(Li(e)):wt();function ao(e,i,t,n={}){if(!i||!e[t][i])return n;const m=`${t}.${i}`;n[m]=e[t][i];const f=fl.get(t);if(f){const g=e[t][i].data?.children||[];for(const c of g)ao(e,c,f,n)}return n}var el='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acprefix__rect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="acprefix__layer1"><g id="acprefix__text4203"><g id="acprefix__g4212" transform="translate(0.10112835,0.1001358)"><path id="acprefix__path4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acprefix__path4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agprefix__rect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aiprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="aiprefix__rect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqprefix__g4220"><rect id="aqprefix__rect4191" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqprefix__g4220-6"><rect id="aqprefix__rect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><path d="M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z" transform="rotate(90 9.25 9.25)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><path d="M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z" transform="rotate(90)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><path d="M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-stage" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z" transform="translate(0 2.5)"/></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="arprefix__icomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><path d="M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 32 32" id="f-i-info-circle" xmlns="http://www.w3.org/2000/svg"><path d="m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="avprefix__icomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="axprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="axprefix__namedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="axprefix__path4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-plus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><path d="M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z" transform="rotate(45 77.994 208.636)"/></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bfprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bfprefix__g7209"><path id="bfprefix__rect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgprefix__XMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bhprefix__icomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="biprefix__XMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bjprefix__XMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="boprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>',_n=Vr.name,On=Vr.version,Ri=_n,tl="formeo-sprite",il=`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/${tl}.svg`,nl=`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/formeo.min.css`,rl="https://draggable.github.io/formeo/assets/css/formeo.min.css",lo="f-panel",ot="control-group",kt=`${Ri}-stage`,Ue=`${Ri}-row`,Ge=`${Ri}-column`,Tt=`${Ri}-field`,pn="custom-column-widths",co="column-preset",Pi="resizing-columns",ol=new Map([[kt,Ue],[Ue,Ge],[Ge,Tt]]),In=["stage","row","column","field"],Dn=In.map(e=>`${e}s`),Hh=new Map(Dn.map((e,i)=>[e,In[i]])),sl=new RegExp(`^${Dn.join("|")}.`),uo=[...In],ho=[...Dn],al=new Map(ho.map((e,i)=>[e,uo[i]])),Wh=new RegExp(`^${ho.join("|")}.`),Hi=uo.reduce((e,i)=>(e[i]=i,e),{}),ll=[{name:"controls",className:ot},{name:"stage",className:kt},{name:"row",className:Ue},{name:"column",className:Ge},{name:"field",className:Tt}],Nn={controls:ot,stage:kt,row:Ue,column:Ge,field:Tt},cl=Object.entries(Nn).reduce((e,[i,t])=>(e[t]=i,e),{}),dl=Object.values(Nn),ul=new RegExp(`${dl.join("|")}`,"g"),{childTypeMapVals:po,childTypeIndexMapVals:hl}=ll.reduce((e,{name:i},t,n)=>{const{name:m}=n[t+1]||{};return m&&(e.childTypeMapVals.push([i,m]),e.childTypeIndexMapVals.push([`${i}s`,`${m}s`])),e},{childTypeMapVals:[],childTypeIndexMapVals:[]}),pl=po.slice().map(e=>e.slice().reverse()).reverse(),dr=new Map(po),fl=new Map(hl),gl=new Map(pl.slice()),ml=[[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]],vl=new Map(ml.reduce((e,i,t)=>(e.push([t,i]),e),[])),Fn=`${_n}-formData`,ur=`${_n}-locale`;var at=Math.round(333/2),zn=Math.round(333*2),Bh=Math.round(333/5),fo="formeoSaved",Pn="formeoUpdated",yl="formeoChanged",go="formeoUpdatedStage",mo="formeoUpdatedRow",vo="formeoUpdatedColumn",yo="formeoUpdatedField",bl="formeoCleared",bo="formeoOnRender",wl="formeoConditionUpdated",Hn="formeoAddedRow",Wn="formeoAddedColumn",Bn="formeoAddedField",jn="formeoRemovedRow",Vn="formeoRemovedColumn",Un="formeoRemovedField",wo={equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},Cl={and:"&&",or:"||"},Co={equals:"="},Sl=["logical","source","sourceProperty","comparison","target","targetProperty","assignment","value"],hr=["isChecked","isNotChecked"],pr=["isVisible","isNotVisible"],ni=["value"],xl={comparison:wo,assignment:Co,logical:Cl};var El="then",Gn=()=>({if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],[El]:[{target:"",targetProperty:"",assignment:"",value:""}]}),Al=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)|(\b[0-9a-f]{8}\b)/g,fn=/\bcol-\w+-\d+/g,So="f-i-",wt=()=>({id:Me(),stages:{[Me()]:{}},rows:{},columns:{},fields:{}}),gi=["selected","checked"],kl=gi.toReversed(),Tl=new Map([["config",new Set(["label","helpText","hideLabel","labelAfter","disableHtmlLabel","tooltip"])]]),Ml="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map(e=>String.raw`\s${e}\s`),$l=new RegExp(String.raw`(?!${Ml.join("|")})\w\S*`,"g"),Ll=/\s+/g;function je(e){return typeof e!="string"||e.trim().match(Ll)?e:e.replace($l,i=>i.charAt(0).toUpperCase()+i.substring(1).replace(/[A-Z]/g,t=>` ${t}`))}var xo=(e,i="-")=>e.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,i),lt=e=>{if(Array.isArray(e))return e;const i=/[.[\]]/g,t=[];let n=0,m=i.exec(e);for(;m!==null;)t.push(e.slice(n,m.index)),n=m.index+m[0].length,m=i.exec(e);return n<e.length&&t.push(e.slice(n)),t.filter(Boolean)},fr=(e,i="-")=>lt(e).join(i),Rl=e=>{const i=document.createElement("div");return i.innerHTML=e,i.textContent||i.innerText||""},_l=(e,i,t="…")=>{if(e.length<=i)return e;const n=e.slice(0,i),m=n.lastIndexOf(" ");let f=`${m>0?n.slice(0,m):n}`;return t&&(f+=t),f},Ol=/^attrs\.|^meta\.|^options\.|^config\./g;function mi(e){return e.replaceAll(Ol,"")}var Kn=j(((e,i)=>{var t=At(),n=ut(),m="[object Symbol]";function f(g){return typeof g=="symbol"||n(g)&&t(g)==m}i.exports=f})),Il=j(((e,i)=>{var t=ht(),n=Kn(),m=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/;function g(c,o){if(t(c))return!1;var h=typeof c;return h=="number"||h=="symbol"||h=="boolean"||c==null||n(c)?!0:f.test(c)||!m.test(c)||o!=null&&c in Object(o)}i.exports=g})),Dl=j(((e,i)=>{var t=An(),n="Expected a function";function m(f,g){if(typeof f!="function"||g!=null&&typeof g!="function")throw new TypeError(n);var c=function(){var o=arguments,h=g?g.apply(this,o):o[0],u=c.cache;if(u.has(h))return u.get(h);var d=f.apply(this,o);return c.cache=u.set(h,d)||u,d};return c.cache=new(m.Cache||t),c}m.Cache=t,i.exports=m})),Nl=j(((e,i)=>{var t=Dl(),n=500;function m(f){var g=t(f,function(o){return c.size===n&&c.clear(),o}),c=g.cache;return g}i.exports=m})),Fl=j(((e,i)=>{var t=Nl(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m=/\\(\\)?/g,f=t(function(g){var c=[];return g.charCodeAt(0)===46&&c.push(""),g.replace(n,function(o,h,u,d){c.push(u?d.replace(m,"$1"):h||o)}),c});i.exports=f})),zl=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length,c=Array(g);++f<g;)c[f]=m(n[f],f,n);return c}i.exports=t})),Pl=j(((e,i)=>{var t=ki(),n=zl(),m=ht(),f=Kn(),g=1/0,c=t?t.prototype:void 0,o=c?c.toString:void 0;function h(u){if(typeof u=="string")return u;if(m(u))return n(u,h)+"";if(f(u))return o?o.call(u):"";var d=u+"";return d=="0"&&1/u==-g?"-0":d}i.exports=h})),_i=j(((e,i)=>{var t=Pl();function n(m){return m==null?"":t(m)}i.exports=n})),Eo=j(((e,i)=>{var t=ht(),n=Il(),m=Fl(),f=_i();function g(c,o){return t(c)?c:n(c,o)?[c]:m(f(c))}i.exports=g})),Ao=j(((e,i)=>{var t=Kn(),n=1/0;function m(f){if(typeof f=="string"||t(f))return f;var g=f+"";return g=="0"&&1/f==-n?"-0":g}i.exports=m})),Hl=j(((e,i)=>{var t=Eo(),n=Ao();function m(f,g){g=t(g,f);for(var c=0,o=g.length;f!=null&&c<o;)f=f[n(g[c++])];return c&&c==o?f:void 0}i.exports=m})),Wl=j(((e,i)=>{var t=Hl();function n(m,f,g){var c=m==null?void 0:t(m,f);return c===void 0?g:c}i.exports=n})),Bl=j(((e,i)=>{var t=io(),n=Eo(),m=Ln(),f=et(),g=Ao();function c(o,h,u,d){if(!f(o))return o;h=n(h,o);for(var l=-1,s=h.length,r=s-1,a=o;a!=null&&++l<s;){var p=g(h[l]),v=u;if(p==="__proto__"||p==="constructor"||p==="prototype")return o;if(l!=r){var y=a[p];v=d?d(y,p,a):void 0,v===void 0&&(v=f(y)?y:m(h[l+1])?[]:{})}t(a,p,v),a=a[p]}return o}i.exports=c})),jl=j(((e,i)=>{var t=Bl();function n(m,f,g){return m==null?m:t(m,f,g)}i.exports=n})),Vl=Et(Wl(),1),Ul=Et(jl(),1),we=Vl.default,Oi=Ul.default;function Gl(e,i={}){const t={...e};for(const n in i)Object.hasOwn(i,n)&&(Object.hasOwn(t,n)?Array.isArray(t[n])?t[n].push(i[n]):t[n]=[t[n],i[n]]:t[n]=i[n]);return t}function ri(...e){return e.flat().reduce((i,t)=>(i[t]=t,i),{})}var Kl=j(((e,i)=>{var t="__lodash_hash_undefined__";function n(m){return this.__data__.set(m,t),this}i.exports=n})),ql=j(((e,i)=>{function t(n){return this.__data__.has(n)}i.exports=t})),Yl=j(((e,i)=>{var t=An(),n=Kl(),m=ql();function f(g){var c=-1,o=g==null?0:g.length;for(this.__data__=new t;++c<o;)this.add(g[c])}f.prototype.add=f.prototype.push=n,f.prototype.has=m,i.exports=f})),Zl=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length;++f<g;)if(m(n[f],f,n))return!0;return!1}i.exports=t})),Ql=j(((e,i)=>{function t(n,m){return n.has(m)}i.exports=t})),ko=j(((e,i)=>{var t=Yl(),n=Zl(),m=Ql(),f=1,g=2;function c(o,h,u,d,l,s){var r=u&f,a=o.length,p=h.length;if(a!=p&&!(r&&p>a))return!1;var v=s.get(o),y=s.get(h);if(v&&y)return v==h&&y==o;var k=-1,x=!0,w=u&g?new t:void 0;for(s.set(o,h),s.set(h,o);++k<a;){var S=o[k],M=h[k];if(d)var L=r?d(M,S,k,h,o,s):d(S,M,k,o,h,s);if(L!==void 0){if(L)continue;x=!1;break}if(w){if(!n(h,function(R,$){if(!m(w,$)&&(S===R||l(S,R,u,d,s)))return w.push($)})){x=!1;break}}else if(!(S===M||l(S,M,u,d,s))){x=!1;break}}return s.delete(o),s.delete(h),x}i.exports=c})),Xl=j(((e,i)=>{function t(n){var m=-1,f=Array(n.size);return n.forEach(function(g,c){f[++m]=[c,g]}),f}i.exports=t})),Jl=j(((e,i)=>{function t(n){var m=-1,f=Array(n.size);return n.forEach(function(g){f[++m]=g}),f}i.exports=t})),ec=j(((e,i)=>{var t=ki(),n=Zr(),m=Vt(),f=ko(),g=Xl(),c=Jl(),o=1,h=2,u="[object Boolean]",d="[object Date]",l="[object Error]",s="[object Map]",r="[object Number]",a="[object RegExp]",p="[object Set]",v="[object String]",y="[object Symbol]",k="[object ArrayBuffer]",x="[object DataView]",w=t?t.prototype:void 0,S=w?w.valueOf:void 0;function M(L,R,$,D,T,E,C){switch($){case x:if(L.byteLength!=R.byteLength||L.byteOffset!=R.byteOffset)return!1;L=L.buffer,R=R.buffer;case k:return!(L.byteLength!=R.byteLength||!E(new n(L),new n(R)));case u:case d:case r:return m(+L,+R);case l:return L.name==R.name&&L.message==R.message;case a:case v:return L==R+"";case s:var b=g;case p:var A=D&o;if(b||(b=c),L.size!=R.size&&!A)return!1;var _=C.get(L);if(_)return _==R;D|=h,C.set(L,R);var O=f(b(L),b(R),D,T,E,C);return C.delete(L),O;case y:if(S)return S.call(L)==S.call(R)}return!1}i.exports=M})),tc=j(((e,i)=>{function t(n,m){for(var f=-1,g=m.length,c=n.length;++f<g;)n[c+f]=m[f];return n}i.exports=t})),ic=j(((e,i)=>{var t=tc(),n=ht();function m(f,g,c){var o=g(f);return n(f)?o:t(o,c(f))}i.exports=m})),nc=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length,c=0,o=[];++f<g;){var h=n[f];m(h,f,n)&&(o[c++]=h)}return o}i.exports=t})),rc=j(((e,i)=>{function t(){return[]}i.exports=t})),oc=j(((e,i)=>{var t=nc(),n=rc(),m=Object.prototype.propertyIsEnumerable,f=Object.getOwnPropertySymbols,g=f?function(c){return c==null?[]:(c=Object(c),t(f(c),function(o){return m.call(c,o)}))}:n;i.exports=g})),sc=j(((e,i)=>{var t=Qr()(Object.keys,Object);i.exports=t})),ac=j(((e,i)=>{var t=Tn(),n=sc(),m=Object.prototype.hasOwnProperty;function f(g){if(!t(g))return n(g);var c=[];for(var o in Object(g))m.call(g,o)&&o!="constructor"&&c.push(o);return c}i.exports=f})),lc=j(((e,i)=>{var t=no(),n=ac(),m=$i();function f(g){return m(g)?t(g):n(g)}i.exports=f})),cc=j(((e,i)=>{var t=ic(),n=oc(),m=lc();function f(g){return t(g,m,n)}i.exports=f})),dc=j(((e,i)=>{var t=cc(),n=1,m=Object.prototype.hasOwnProperty;function f(g,c,o,h,u,d){var l=o&n,s=t(g),r=s.length;if(r!=t(c).length&&!l)return!1;for(var a=r;a--;){var p=s[a];if(!(l?p in c:m.call(c,p)))return!1}var v=d.get(g),y=d.get(c);if(v&&y)return v==c&&y==g;var k=!0;d.set(g,c),d.set(c,g);for(var x=l;++a<r;){p=s[a];var w=g[p],S=c[p];if(h)var M=l?h(S,w,p,c,g,d):h(w,S,p,g,c,d);if(!(M===void 0?w===S||u(w,S,o,h,d):M)){k=!1;break}x||(x=p=="constructor")}if(k&&!x){var L=g.constructor,R=c.constructor;L!=R&&"constructor"in g&&"constructor"in c&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(k=!1)}return d.delete(g),d.delete(c),k}i.exports=f})),uc=j(((e,i)=>{var t=dt()(Be(),"DataView");i.exports=t})),hc=j(((e,i)=>{var t=dt()(Be(),"Promise");i.exports=t})),pc=j(((e,i)=>{var t=dt()(Be(),"Set");i.exports=t})),fc=j(((e,i)=>{var t=dt()(Be(),"WeakMap");i.exports=t})),gc=j(((e,i)=>{var t=uc(),n=En(),m=hc(),f=pc(),g=fc(),c=At(),o=Gr(),h="[object Map]",u="[object Object]",d="[object Promise]",l="[object Set]",s="[object WeakMap]",r="[object DataView]",a=o(t),p=o(n),v=o(m),y=o(f),k=o(g),x=c;(t&&x(new t(new ArrayBuffer(1)))!=r||n&&x(new n)!=h||m&&x(m.resolve())!=d||f&&x(new f)!=l||g&&x(new g)!=s)&&(x=function(w){var S=c(w),M=S==u?w.constructor:void 0,L=M?o(M):"";if(L)switch(L){case a:return r;case p:return h;case v:return d;case y:return l;case k:return s}return S}),i.exports=x})),mc=j(((e,i)=>{var t=Kr(),n=ko(),m=ec(),f=dc(),g=gc(),c=ht(),o=Mn(),h=$n(),u=1,d="[object Arguments]",l="[object Array]",s="[object Object]",r=Object.prototype.hasOwnProperty;function a(p,v,y,k,x,w){var S=c(p),M=c(v),L=S?l:g(p),R=M?l:g(v);L=L==d?s:L,R=R==d?s:R;var $=L==s,D=R==s,T=L==R;if(T&&o(p)){if(!o(v))return!1;S=!0,$=!1}if(T&&!$)return w||(w=new t),S||h(p)?n(p,v,y,k,x,w):m(p,v,L,y,k,x,w);if(!(y&u)){var E=$&&r.call(p,"__wrapped__"),C=D&&r.call(v,"__wrapped__");if(E||C){var b=E?p.value():p,A=C?v.value():v;return w||(w=new t),x(b,A,y,k,w)}}return T?(w||(w=new t),f(p,v,y,k,x,w)):!1}i.exports=a})),vc=j(((e,i)=>{var t=mc(),n=ut();function m(f,g,c,o,h){return f===g?!0:f==null||g==null||!n(f)&&!n(g)?f!==f&&g!==g:t(f,g,c,o,m,h)}i.exports=m})),yc=j(((e,i)=>{var t=vc();function n(m,f){return t(m,f)}i.exports=n})),gn=Et(yc(),1),bc=(e,i)=>e===void 0?"added":i===void 0?"removed":(0,gn.default)(e,i)?"unchanged":"changed",qn=class{constructor(e,i=Object.create(null)){this.name=e,this.data=i,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}toJSON=(e,i)=>JSON.stringify(e,null,i);get=e=>we(this.data,e);set(e,i){const t=we(this.data,e),n=Oi(this.data,e,i),m=Array.isArray(e)?e.join("."):e,f=Object.keys(this.setCallbacks).filter(c=>new RegExp(c).test(m)),g={newVal:i,oldVal:t,path:e};for(const c of f)for(const o of this.setCallbacks[c])o(g);if(!this.disableEvents){const c={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+e,value:i,data:n,changeType:bc(t,i),src:this.dom};if(t&&(c.previousValue=t),Q.formeoUpdated(c),this.name){const o={stage:go,row:mo,column:vo,field:yo}[this.name];o&&Q.formeoUpdated(c,o)}}return n}addSetCallback(e,i){this.setCallbacks[e]?this.setCallbacks[e].push(i):this.setCallbacks[e]=[i]}removeSetCallback(e,i){this.setCallbacks[e]=this.setCallbacks[e].filter(t=>t!==i)}add=(e,i=Object.create(null))=>{const{id:t}=i,n=e||t||Me();return this.set(n,i)};remove=e=>{const i=lt(e),t=i.pop(),n=this.get(i);return Array.isArray(n)?n.splice(Number(t),1):n&&delete n[t],n};empty(){this.data=Object.create(null)}getData=()=>Object.entries(this.data).reduce((e,[i,t])=>(e[i]=t?.data?t.getData():t,e),{});setCallbacks={};configVal=Object.create(null)},Ii=class extends qn{load=e=>{const i=Li(e);this.empty();for(const[t,n]of Object.entries(i))this.add(t,n);return this.data};get=e=>e?we(this.data,e):this.add();add=(e,i=Object.create(null))=>{const t=e||Me(),n=this.Component({...i,id:t});this.data[t]=n,this.active=n;const m={row:Hn,column:Wn,field:Bn}[this.name];return m&&Q.formeoUpdated({entity:n,componentId:t,componentType:this.name,data:n.data},m),n};remove=e=>{if(Array.isArray(e))for(const i of e)this.get(i).remove();else this.get(e).remove();return this.data};delete=e=>(delete this.data[e],e);clearAll=(e=!0)=>{const i=Object.values(this.data).map(t=>t.empty(e));return Promise.all(i)};set config(e){this.configVal=De(this.configVal,He(e))}get config(){return this.configVal}conditionMap=new Map};function wc(e,i,t){return(i=Ec(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ke.apply(null,arguments)}function gr(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter(function(m){return Object.getOwnPropertyDescriptor(e,m).enumerable})),t.push.apply(t,n)}return t}function We(e){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?gr(Object(t),!0).forEach(function(n){wc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cc(e,i){if(e==null)return{};var t,n,m=Sc(e,i);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(n=0;n<f.length;n++)t=f[n],i.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(m[t]=e[t])}return m}function Sc(e,i){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(i.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function xc(e,i){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,i||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(e)}function Ec(e){var i=xc(e,"string");return typeof i=="symbol"?i:i+""}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},mn(e)}var Ac="1.15.7";function Ve(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ye=Ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ut=Ve(/Edge/i),mr=Ve(/firefox/i),Dt=Ve(/safari/i)&&!Ve(/chrome/i)&&!Ve(/android/i),Yn=Ve(/iP(ad|od|hone)/i),To=Ve(/chrome/i)&&Ve(/android/i),Mo={capture:!1,passive:!1};function re(e,i,t){e.addEventListener(i,t,!Ye&&Mo)}function ne(e,i,t){e.removeEventListener(i,t,!Ye&&Mo)}function vi(e,i){if(i){if(i[0]===">"&&(i=i.substring(1)),e)try{if(e.matches)return e.matches(i);if(e.msMatchesSelector)return e.msMatchesSelector(i);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(i)}catch{return!1}return!1}}function $o(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function Ie(e,i,t,n){if(e){t=t||document;do{if(i!=null&&(i[0]===">"?e.parentNode===t&&vi(e,i):vi(e,i))||n&&e===t)return e;if(e===t)break}while(e=$o(e))}return null}var vr=/\s+/g;function xe(e,i,t){e&&i&&(e.classList?e.classList[t?"add":"remove"](i):e.className=((" "+e.className+" ").replace(vr," ").replace(" "+i+" "," ")+(t?" "+i:"")).replace(vr," "))}function ee(e,i,t){var n=e&&e.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),i===void 0?t:t[i];!(i in n)&&i.indexOf("webkit")===-1&&(i="-webkit-"+i),n[i]=t+(typeof t=="string"?"":"px")}}function Ct(e,i){var t="";if(typeof e=="string")t=e;else do{var n=ee(e,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!i&&(e=e.parentNode));var m=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return m&&new m(t)}function Lo(e,i,t){if(e){var n=e.getElementsByTagName(i),m=0,f=n.length;if(t)for(;m<f;m++)t(n[m],m);return n}return[]}function Pe(){var e=document.scrollingElement;return e||document.documentElement}function ue(e,i,t,n,m){if(!(!e.getBoundingClientRect&&e!==window)){var f,g,c,o,h,u,d;if(e!==window&&e.parentNode&&e!==Pe()?(f=e.getBoundingClientRect(),g=f.top,c=f.left,o=f.bottom,h=f.right,u=f.height,d=f.width):(g=0,c=0,o=window.innerHeight,h=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(i||t)&&e!==window&&(m=m||e.parentNode,!Ye))do if(m&&m.getBoundingClientRect&&(ee(m,"transform")!=="none"||t&&ee(m,"position")!=="static")){var l=m.getBoundingClientRect();g-=l.top+parseInt(ee(m,"border-top-width")),c-=l.left+parseInt(ee(m,"border-left-width")),o=g+f.height,h=c+f.width;break}while(m=m.parentNode);if(n&&e!==window){var s=Ct(m||e),r=s&&s.a,a=s&&s.d;s&&(g/=a,c/=r,d/=r,u/=a,o=g+u,h=c+d)}return{top:g,left:c,bottom:o,right:h,width:d,height:u}}}function yr(e,i,t){for(var n=Xe(e,!0),m=ue(e)[i];n;){var f=ue(n)[t],g=void 0;if(t==="top"||t==="left"?g=m>=f:g=m<=f,!g)return n;if(n===Pe())break;n=Xe(n,!1)}return!1}function St(e,i,t,n){for(var m=0,f=0,g=e.children;f<g.length;){if(g[f].style.display!=="none"&&g[f]!==J.ghost&&(n||g[f]!==J.dragged)&&Ie(g[f],t.draggable,e,!1)){if(m===i)return g[f];m++}f++}return null}function Zn(e,i){for(var t=e.lastElementChild;t&&(t===J.ghost||ee(t,"display")==="none"||i&&!vi(t,i));)t=t.previousElementSibling;return t||null}function ke(e,i){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==J.clone&&(!i||vi(e,i))&&t++;return t}function br(e){var i=0,t=0,n=Pe();if(e)do{var m=Ct(e),f=m.a,g=m.d;i+=e.scrollLeft*f,t+=e.scrollTop*g}while(e!==n&&(e=e.parentNode));return[i,t]}function kc(e,i){for(var t in e)if(e.hasOwnProperty(t)){for(var n in i)if(i.hasOwnProperty(n)&&i[n]===e[t][n])return Number(t)}return-1}function Xe(e,i){if(!e||!e.getBoundingClientRect)return Pe();var t=e,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var m=ee(t);if(t.clientWidth<t.scrollWidth&&(m.overflowX=="auto"||m.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(m.overflowY=="auto"||m.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Pe();if(n||i)return t;n=!0}}while(t=t.parentNode);return Pe()}function Tc(e,i){if(e&&i)for(var t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}function Wi(e,i){return Math.round(e.top)===Math.round(i.top)&&Math.round(e.left)===Math.round(i.left)&&Math.round(e.height)===Math.round(i.height)&&Math.round(e.width)===Math.round(i.width)}var Nt;function Ro(e,i){return function(){if(!Nt){var t=arguments,n=this;t.length===1?e.call(n,t[0]):e.apply(n,t),Nt=setTimeout(function(){Nt=void 0},i)}}}function Mc(){clearTimeout(Nt),Nt=void 0}function _o(e,i,t){e.scrollLeft+=i,e.scrollTop+=t}function Oo(e){var i=window.Polymer,t=window.jQuery||window.Zepto;return i&&i.dom?i.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function Io(e,i,t){var n={};return Array.from(e.children).forEach(function(m){var f,g,c,o;if(!(!Ie(m,i.draggable,e,!1)||m.animated||m===t)){var h=ue(m);n.left=Math.min((f=n.left)!==null&&f!==void 0?f:1/0,h.left),n.top=Math.min((g=n.top)!==null&&g!==void 0?g:1/0,h.top),n.right=Math.max((c=n.right)!==null&&c!==void 0?c:-1/0,h.right),n.bottom=Math.max((o=n.bottom)!==null&&o!==void 0?o:-1/0,h.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Ce="Sortable"+new Date().getTime();function $c(){var e=[],i;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(!(ee(n,"display")==="none"||n===J.ghost)){e.push({target:n,rect:ue(n)});var m=We({},e[e.length-1].rect);if(n.thisAnimationDuration){var f=Ct(n,!0);f&&(m.top-=f.f,m.left-=f.e)}n.fromRect=m}})},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(kc(e,{target:n}),1)},animateAll:function(n){var m=this;if(!this.options.animation){clearTimeout(i),typeof n=="function"&&n();return}var f=!1,g=0;e.forEach(function(c){var o=0,h=c.target,u=h.fromRect,d=ue(h),l=h.prevFromRect,s=h.prevToRect,r=c.rect,a=Ct(h,!0);a&&(d.top-=a.f,d.left-=a.e),h.toRect=d,h.thisAnimationDuration&&Wi(l,d)&&!Wi(u,d)&&(r.top-d.top)/(r.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(o=Rc(r,l,s,m.options)),Wi(d,u)||(h.prevFromRect=u,h.prevToRect=d,o||(o=m.options.animation),m.animate(h,r,d,o)),o&&(f=!0,g=Math.max(g,o),clearTimeout(h.animationResetTimer),h.animationResetTimer=setTimeout(function(){h.animationTime=0,h.prevFromRect=null,h.fromRect=null,h.prevToRect=null,h.thisAnimationDuration=null},o),h.thisAnimationDuration=o)}),clearTimeout(i),f?i=setTimeout(function(){typeof n=="function"&&n()},g):typeof n=="function"&&n(),e=[]},animate:function(n,m,f,g){if(g){ee(n,"transition",""),ee(n,"transform","");var c=Ct(this.el),o=c&&c.a,h=c&&c.d,u=(m.left-f.left)/(o||1),d=(m.top-f.top)/(h||1);n.animatingX=!!u,n.animatingY=!!d,ee(n,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=Lc(n),ee(n,"transition","transform "+g+"ms"+(this.options.easing?" "+this.options.easing:"")),ee(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){ee(n,"transition",""),ee(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},g)}}}}function Lc(e){return e.offsetWidth}function Rc(e,i,t,n){return Math.sqrt(Math.pow(i.top-e.top,2)+Math.pow(i.left-e.left,2))/Math.sqrt(Math.pow(i.top-t.top,2)+Math.pow(i.left-t.left,2))*n.animation}var pt=[],Bi={initializeByDefault:!0},Gt={mount:function(i){for(var t in Bi)Bi.hasOwnProperty(t)&&!(t in i)&&(i[t]=Bi[t]);pt.forEach(function(n){if(n.pluginName===i.pluginName)throw"Sortable: Cannot mount plugin ".concat(i.pluginName," more than once")}),pt.push(i)},pluginEvent:function(i,t,n){var m=this;this.eventCanceled=!1,n.cancel=function(){m.eventCanceled=!0};var f=i+"Global";pt.forEach(function(g){t[g.pluginName]&&(t[g.pluginName][f]&&t[g.pluginName][f](We({sortable:t},n)),t.options[g.pluginName]&&t[g.pluginName][i]&&t[g.pluginName][i](We({sortable:t},n)))})},initializePlugins:function(i,t,n,m){pt.forEach(function(c){var o=c.pluginName;if(!(!i.options[o]&&!c.initializeByDefault)){var h=new c(i,t,i.options);h.sortable=i,h.options=i.options,i[o]=h,Ke(n,h.defaults)}});for(var f in i.options)if(i.options.hasOwnProperty(f)){var g=this.modifyOption(i,f,i.options[f]);typeof g<"u"&&(i.options[f]=g)}},getEventProperties:function(i,t){var n={};return pt.forEach(function(m){typeof m.eventProperties=="function"&&Ke(n,m.eventProperties.call(t[m.pluginName],i))}),n},modifyOption:function(i,t,n){var m;return pt.forEach(function(f){i[f.pluginName]&&f.optionListeners&&typeof f.optionListeners[t]=="function"&&(m=f.optionListeners[t].call(i[f.pluginName],n))}),m}};function _c(e){var i=e.sortable,t=e.rootEl,n=e.name,m=e.targetEl,f=e.cloneEl,g=e.toEl,c=e.fromEl,o=e.oldIndex,h=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,l=e.originalEvent,s=e.putSortable,r=e.extraEventProperties;if(i=i||t&&t[Ce],!!i){var a,p=i.options,v="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ye&&!Ut?a=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent(n,!0,!0)),a.to=g||t,a.from=c||t,a.item=m||t,a.clone=f,a.oldIndex=o,a.newIndex=h,a.oldDraggableIndex=u,a.newDraggableIndex=d,a.originalEvent=l,a.pullMode=s?s.lastPutMode:void 0;var y=We(We({},r),Gt.getEventProperties(n,i));for(var k in y)a[k]=y[k];t&&t.dispatchEvent(a),p[v]&&p[v].call(i,a)}}var Oc=["evt"],ye=function(i,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=n.evt,f=Cc(n,Oc);Gt.pluginEvent.bind(J)(i,t,We({dragEl:K,parentEl:ce,ghostEl:ie,rootEl:se,nextEl:nt,lastDownEl:oi,cloneEl:ae,cloneHidden:Qe,dragStarted:_t,putSortable:pe,activeSortable:J.active,originalEvent:m,oldIndex:yt,oldDraggableIndex:Ft,newIndex:Ee,newDraggableIndex:Ze,hideGhostForTarget:zo,unhideGhostForTarget:Po,cloneNowHidden:function(){Qe=!0},cloneNowShown:function(){Qe=!1},dispatchSortableEvent:function(c){ve({sortable:t,name:c,originalEvent:m})}},f))};function ve(e){_c(We({putSortable:pe,cloneEl:ae,targetEl:K,rootEl:se,oldIndex:yt,oldDraggableIndex:Ft,newIndex:Ee,newDraggableIndex:Ze},e))}var K,ce,ie,se,nt,oi,ae,Qe,yt,Ee,Ft,Ze,Yt,pe,mt=!1,yi=!1,bi=[],tt,_e,ji,Vi,wr,Cr,_t,ft,zt,Pt=!1,Zt=!1,si,fe,Ui=[],vn=!1,wi=[],Di=typeof document<"u",Qt=Yn,Sr=Ut||Ye?"cssFloat":"float",Ic=Di&&!To&&!Yn&&"draggable"in document.createElement("div"),Do=(function(){if(Di){if(Ye)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),No=function(i,t){var n=ee(i),m=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),f=St(i,0,t),g=St(i,1,t),c=f&&ee(f),o=g&&ee(g),h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+ue(f).width,u=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+ue(g).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(f&&c.float&&c.float!=="none"){var d=c.float==="left"?"left":"right";return g&&(o.clear==="both"||o.clear===d)?"vertical":"horizontal"}return f&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||h>=m&&n[Sr]==="none"||g&&n[Sr]==="none"&&h+u>m)?"vertical":"horizontal"},Dc=function(i,t,n){var m=n?i.left:i.top,f=n?i.right:i.bottom,g=n?i.width:i.height,c=n?t.left:t.top,o=n?t.right:t.bottom,h=n?t.width:t.height;return m===c||f===o||m+g/2===c+h/2},Nc=function(i,t){var n;return bi.some(function(m){var f=m[Ce].options.emptyInsertThreshold;if(!(!f||Zn(m))){var g=ue(m),c=i>=g.left-f&&i<=g.right+f,o=t>=g.top-f&&t<=g.bottom+f;if(c&&o)return n=m}}),n},Fo=function(i){function t(f,g){return function(c,o,h,u){var d=c.options.group.name&&o.options.group.name&&c.options.group.name===o.options.group.name;if(f==null&&(g||d))return!0;if(f==null||f===!1)return!1;if(g&&f==="clone")return f;if(typeof f=="function")return t(f(c,o,h,u),g)(c,o,h,u);var l=(g?c:o).options.group.name;return f===!0||typeof f=="string"&&f===l||f.join&&f.indexOf(l)>-1}}var n={},m=i.group;(!m||mn(m)!="object")&&(m={name:m}),n.name=m.name,n.checkPull=t(m.pull,!0),n.checkPut=t(m.put),n.revertClone=m.revertClone,i.group=n},zo=function(){!Do&&ie&&ee(ie,"display","none")},Po=function(){!Do&&ie&&ee(ie,"display","")};Di&&!To&&document.addEventListener("click",function(e){if(yi)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),yi=!1,!1},!0);var it=function(i){if(K){i=i.touches?i.touches[0]:i;var t=Nc(i.clientX,i.clientY);if(t){var n={};for(var m in i)i.hasOwnProperty(m)&&(n[m]=i[m]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Ce]._onDragOver(n)}}},Fc=function(i){K&&K.parentNode[Ce]._isOutsideThisEl(i.target)};function J(e,i){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=i=Ke({},i),e[Ce]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return No(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(g,c){g.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:J.supportPointer!==!1&&"PointerEvent"in window&&(!Dt||Yn),emptyInsertThreshold:5};Gt.initializePlugins(this,e,t);for(var n in t)!(n in i)&&(i[n]=t[n]);Fo(i);for(var m in this)m.charAt(0)==="_"&&typeof this[m]=="function"&&(this[m]=this[m].bind(this));this.nativeDraggable=i.forceFallback?!1:Ic,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?re(e,"pointerdown",this._onTapStart):(re(e,"mousedown",this._onTapStart),re(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(re(e,"dragover",this),re(e,"dragenter",this)),bi.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),Ke(this,$c())}J.prototype={constructor:J,_isOutsideThisEl:function(i){!this.el.contains(i)&&i!==this.el&&(ft=null)},_getDirection:function(i,t){return typeof this.options.direction=="function"?this.options.direction.call(this,i,t,K):this.options.direction},_onTapStart:function(i){if(i.cancelable){var t=this,n=this.el,m=this.options,f=m.preventOnFilter,g=i.type,c=i.touches&&i.touches[0]||i.pointerType&&i.pointerType==="touch"&&i,o=(c||i).target,h=i.target.shadowRoot&&(i.path&&i.path[0]||i.composedPath&&i.composedPath()[0])||o,u=m.filter;if(Uc(n),!K&&!(/mousedown|pointerdown/.test(g)&&i.button!==0||m.disabled)&&!h.isContentEditable&&!(!this.nativeDraggable&&Dt&&o&&o.tagName.toUpperCase()==="SELECT")&&(o=Ie(o,m.draggable,n,!1),!(o&&o.animated)&&oi!==o)){if(yt=ke(o),Ft=ke(o,m.draggable),typeof u=="function"){if(u.call(this,i,o,this)){ve({sortable:t,rootEl:h,name:"filter",targetEl:o,toEl:n,fromEl:n}),ye("filter",t,{evt:i}),f&&i.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=Ie(h,d.trim(),n,!1),d)return ve({sortable:t,rootEl:d,name:"filter",targetEl:o,fromEl:n,toEl:n}),ye("filter",t,{evt:i}),!0}),u)){f&&i.preventDefault();return}m.handle&&!Ie(h,m.handle,n,!1)||this._prepareDragStart(i,c,o)}}},_prepareDragStart:function(i,t,n){var m=this,f=m.el,g=m.options,c=f.ownerDocument,o;if(n&&!K&&n.parentNode===f){var h=ue(n);if(se=f,K=n,ce=K.parentNode,nt=K.nextSibling,oi=n,Yt=g.group,J.dragged=K,tt={target:K,clientX:(t||i).clientX,clientY:(t||i).clientY},wr=tt.clientX-h.left,Cr=tt.clientY-h.top,this._lastX=(t||i).clientX,this._lastY=(t||i).clientY,K.style["will-change"]="all",o=function(){if(ye("delayEnded",m,{evt:i}),J.eventCanceled){m._onDrop();return}m._disableDelayedDragEvents(),!mr&&m.nativeDraggable&&(K.draggable=!0),m._triggerDragStart(i,t),ve({sortable:m,name:"choose",originalEvent:i}),xe(K,g.chosenClass,!0)},g.ignore.split(",").forEach(function(u){Lo(K,u.trim(),Gi)}),re(c,"dragover",it),re(c,"mousemove",it),re(c,"touchmove",it),g.supportPointer?(re(c,"pointerup",m._onDrop),!this.nativeDraggable&&re(c,"pointercancel",m._onDrop)):(re(c,"mouseup",m._onDrop),re(c,"touchend",m._onDrop),re(c,"touchcancel",m._onDrop)),mr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),ye("delayStart",this,{evt:i}),g.delay&&(!g.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ut||Ye))){if(J.eventCanceled){this._onDrop();return}g.supportPointer?(re(c,"pointerup",m._disableDelayedDrag),re(c,"pointercancel",m._disableDelayedDrag)):(re(c,"mouseup",m._disableDelayedDrag),re(c,"touchend",m._disableDelayedDrag),re(c,"touchcancel",m._disableDelayedDrag)),re(c,"mousemove",m._delayedDragTouchMoveHandler),re(c,"touchmove",m._delayedDragTouchMoveHandler),g.supportPointer&&re(c,"pointermove",m._delayedDragTouchMoveHandler),m._dragStartTimer=setTimeout(o,g.delay)}else o()}},_delayedDragTouchMoveHandler:function(i){var t=i.touches?i.touches[0]:i;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Gi(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var i=this.el.ownerDocument;ne(i,"mouseup",this._disableDelayedDrag),ne(i,"touchend",this._disableDelayedDrag),ne(i,"touchcancel",this._disableDelayedDrag),ne(i,"pointerup",this._disableDelayedDrag),ne(i,"pointercancel",this._disableDelayedDrag),ne(i,"mousemove",this._delayedDragTouchMoveHandler),ne(i,"touchmove",this._delayedDragTouchMoveHandler),ne(i,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(i,t){t=t||i.pointerType=="touch"&&i,!this.nativeDraggable||t?this.options.supportPointer?re(document,"pointermove",this._onTouchMove):t?re(document,"touchmove",this._onTouchMove):re(document,"mousemove",this._onTouchMove):(re(K,"dragend",this),re(se,"dragstart",this._onDragStart));try{document.selection?ai(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(i,t){if(mt=!1,se&&K){ye("dragStarted",this,{evt:t}),this.nativeDraggable&&re(document,"dragover",Fc);var n=this.options;!i&&xe(K,n.dragClass,!1),xe(K,n.ghostClass,!0),J.active=this,i&&this._appendGhost(),ve({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(_e){this._lastX=_e.clientX,this._lastY=_e.clientY,zo();for(var i=document.elementFromPoint(_e.clientX,_e.clientY),t=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(_e.clientX,_e.clientY),i!==t);)t=i;if(K.parentNode[Ce]._isOutsideThisEl(i),t)do{if(t[Ce]){var n=void 0;if(n=t[Ce]._onDragOver({clientX:_e.clientX,clientY:_e.clientY,target:i,rootEl:t}),n&&!this.options.dragoverBubble)break}i=t}while(t=$o(t));Po()}},_onTouchMove:function(i){if(tt){var t=this.options,n=t.fallbackTolerance,m=t.fallbackOffset,f=i.touches?i.touches[0]:i,g=ie&&Ct(ie,!0),c=ie&&g&&g.a,o=ie&&g&&g.d,h=Qt&&fe&&br(fe),u=(f.clientX-tt.clientX+m.x)/(c||1)+(h?h[0]-Ui[0]:0)/(c||1),d=(f.clientY-tt.clientY+m.y)/(o||1)+(h?h[1]-Ui[1]:0)/(o||1);if(!J.active&&!mt){if(n&&Math.max(Math.abs(f.clientX-this._lastX),Math.abs(f.clientY-this._lastY))<n)return;this._onDragStart(i,!0)}if(ie){g?(g.e+=u-(ji||0),g.f+=d-(Vi||0)):g={a:1,b:0,c:0,d:1,e:u,f:d};var l="matrix(".concat(g.a,",").concat(g.b,",").concat(g.c,",").concat(g.d,",").concat(g.e,",").concat(g.f,")");ee(ie,"webkitTransform",l),ee(ie,"mozTransform",l),ee(ie,"msTransform",l),ee(ie,"transform",l),ji=u,Vi=d,_e=f}i.cancelable&&i.preventDefault()}},_appendGhost:function(){if(!ie){var i=this.options.fallbackOnBody?document.body:se,t=ue(K,!0,Qt,!0,i),n=this.options;if(Qt){for(fe=i;ee(fe,"position")==="static"&&ee(fe,"transform")==="none"&&fe!==document;)fe=fe.parentNode;fe!==document.body&&fe!==document.documentElement?(fe===document&&(fe=Pe()),t.top+=fe.scrollTop,t.left+=fe.scrollLeft):fe=Pe(),Ui=br(fe)}ie=K.cloneNode(!0),xe(ie,n.ghostClass,!1),xe(ie,n.fallbackClass,!0),xe(ie,n.dragClass,!0),ee(ie,"transition",""),ee(ie,"transform",""),ee(ie,"box-sizing","border-box"),ee(ie,"margin",0),ee(ie,"top",t.top),ee(ie,"left",t.left),ee(ie,"width",t.width),ee(ie,"height",t.height),ee(ie,"opacity","0.8"),ee(ie,"position",Qt?"absolute":"fixed"),ee(ie,"zIndex","100000"),ee(ie,"pointerEvents","none"),J.ghost=ie,i.appendChild(ie),ee(ie,"transform-origin",wr/parseInt(ie.style.width)*100+"% "+Cr/parseInt(ie.style.height)*100+"%")}},_onDragStart:function(i,t){var n=this,m=i.dataTransfer,f=n.options;if(ye("dragStart",this,{evt:i}),J.eventCanceled){this._onDrop();return}ye("setupClone",this),J.eventCanceled||(ae=Oo(K),ae.removeAttribute("id"),ae.draggable=!1,ae.style["will-change"]="",this._hideClone(),xe(ae,this.options.chosenClass,!1),J.clone=ae),n.cloneId=ai(function(){ye("clone",n),!J.eventCanceled&&(n.options.removeCloneOnHide||se.insertBefore(ae,K),n._hideClone(),ve({sortable:n,name:"clone"}))}),!t&&xe(K,f.dragClass,!0),t?(yi=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ne(document,"mouseup",n._onDrop),ne(document,"touchend",n._onDrop),ne(document,"touchcancel",n._onDrop),m&&(m.effectAllowed="move",f.setData&&f.setData.call(n,m,K)),re(document,"drop",n),ee(K,"transform","translateZ(0)")),mt=!0,n._dragStartId=ai(n._dragStarted.bind(n,t,i)),re(document,"selectstart",n),_t=!0,window.getSelection().removeAllRanges(),Dt&&ee(document.body,"user-select","none")},_onDragOver:function(i){var t=this.el,n=i.target,m,f,g,c=this.options,o=c.group,h=J.active,u=Yt===o,d=c.sort,l=pe||h,s,r=this,a=!1;if(vn)return;function p(O,I){ye(O,r,We({evt:i,isOwner:u,axis:s?"vertical":"horizontal",revert:g,dragRect:m,targetRect:f,canSort:d,fromSortable:l,target:n,completed:y,onMove:function(F,z){return Xt(se,t,K,m,F,ue(F),i,z)},changed:k},I))}function v(){p("dragOverAnimationCapture"),r.captureAnimationState(),r!==l&&l.captureAnimationState()}function y(O){return p("dragOverCompleted",{insertion:O}),O&&(u?h._hideClone():h._showClone(r),r!==l&&(xe(K,pe?pe.options.ghostClass:h.options.ghostClass,!1),xe(K,c.ghostClass,!0)),pe!==r&&r!==J.active?pe=r:r===J.active&&pe&&(pe=null),l===r&&(r._ignoreWhileAnimating=n),r.animateAll(function(){p("dragOverAnimationComplete"),r._ignoreWhileAnimating=null}),r!==l&&(l.animateAll(),l._ignoreWhileAnimating=null)),(n===K&&!K.animated||n===t&&!n.animated)&&(ft=null),!c.dragoverBubble&&!i.rootEl&&n!==document&&(K.parentNode[Ce]._isOutsideThisEl(i.target),!O&&it(i)),!c.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),a=!0}function k(){Ee=ke(K),Ze=ke(K,c.draggable),ve({sortable:r,name:"change",toEl:t,newIndex:Ee,newDraggableIndex:Ze,originalEvent:i})}if(i.preventDefault!==void 0&&i.cancelable&&i.preventDefault(),n=Ie(n,c.draggable,t,!0),p("dragOver"),J.eventCanceled)return a;if(K.contains(i.target)||n.animated&&n.animatingX&&n.animatingY||r._ignoreWhileAnimating===n)return y(!1);if(yi=!1,h&&!c.disabled&&(u?d||(g=ce!==se):pe===this||(this.lastPutMode=Yt.checkPull(this,h,K,i))&&o.checkPut(this,h,K,i))){if(s=this._getDirection(i,n)==="vertical",m=ue(K),p("dragOverValid"),J.eventCanceled)return a;if(g)return ce=se,v(),this._hideClone(),p("revert"),J.eventCanceled||(nt?se.insertBefore(K,nt):se.appendChild(K)),y(!0);var x=Zn(t,c.draggable);if(!x||Wc(i,s,this)&&!x.animated){if(x===K)return y(!1);if(x&&t===i.target&&(n=x),n&&(f=ue(n)),Xt(se,t,K,m,n,f,i,!!n)!==!1)return v(),x&&x.nextSibling?t.insertBefore(K,x.nextSibling):t.appendChild(K),ce=t,k(),y(!0)}else if(x&&Hc(i,s,this)){var w=St(t,0,c,!0);if(w===K)return y(!1);if(n=w,f=ue(n),Xt(se,t,K,m,n,f,i,!1)!==!1)return v(),t.insertBefore(K,w),ce=t,k(),y(!0)}else if(n.parentNode===t){f=ue(n);var S=0,M,L=K.parentNode!==t,R=!Dc(K.animated&&K.toRect||m,n.animated&&n.toRect||f,s),$=s?"top":"left",D=yr(n,"top","top")||yr(K,"top","top"),T=D?D.scrollTop:void 0;ft!==n&&(M=f[$],Pt=!1,Zt=!R&&c.invertSwap||L),S=Bc(i,n,f,s,R?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,Zt,ft===n);var E;if(S!==0){var C=ke(K);do C-=S,E=ce.children[C];while(E&&(ee(E,"display")==="none"||E===ie))}if(S===0||E===n)return y(!1);ft=n,zt=S;var b=n.nextElementSibling,A=!1;A=S===1;var _=Xt(se,t,K,m,n,f,i,A);if(_!==!1)return(_===1||_===-1)&&(A=_===1),vn=!0,setTimeout(Pc,30),v(),A&&!b?t.appendChild(K):n.parentNode.insertBefore(K,A?b:n),D&&_o(D,0,T-D.scrollTop),ce=K.parentNode,M!==void 0&&!Zt&&(si=Math.abs(M-ue(n)[$])),k(),y(!0)}if(t.contains(K))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ne(document,"mousemove",this._onTouchMove),ne(document,"touchmove",this._onTouchMove),ne(document,"pointermove",this._onTouchMove),ne(document,"dragover",it),ne(document,"mousemove",it),ne(document,"touchmove",it)},_offUpEvents:function(){var i=this.el.ownerDocument;ne(i,"mouseup",this._onDrop),ne(i,"touchend",this._onDrop),ne(i,"pointerup",this._onDrop),ne(i,"pointercancel",this._onDrop),ne(i,"touchcancel",this._onDrop),ne(document,"selectstart",this)},_onDrop:function(i){var t=this.el,n=this.options;if(Ee=ke(K),Ze=ke(K,n.draggable),ye("drop",this,{evt:i}),ce=K&&K.parentNode,Ee=ke(K),Ze=ke(K,n.draggable),J.eventCanceled){this._nulling();return}mt=!1,Zt=!1,Pt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yn(this.cloneId),yn(this._dragStartId),this.nativeDraggable&&(ne(document,"drop",this),ne(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Dt&&ee(document.body,"user-select",""),ee(K,"transform",""),i&&(_t&&(i.cancelable&&i.preventDefault(),!n.dropBubble&&i.stopPropagation()),ie&&ie.parentNode&&ie.parentNode.removeChild(ie),(se===ce||pe&&pe.lastPutMode!=="clone")&&ae&&ae.parentNode&&ae.parentNode.removeChild(ae),K&&(this.nativeDraggable&&ne(K,"dragend",this),Gi(K),K.style["will-change"]="",_t&&!mt&&xe(K,pe?pe.options.ghostClass:this.options.ghostClass,!1),xe(K,this.options.chosenClass,!1),ve({sortable:this,name:"unchoose",toEl:ce,newIndex:null,newDraggableIndex:null,originalEvent:i}),se!==ce?(Ee>=0&&(ve({rootEl:ce,name:"add",toEl:ce,fromEl:se,originalEvent:i}),ve({sortable:this,name:"remove",toEl:ce,originalEvent:i}),ve({rootEl:ce,name:"sort",toEl:ce,fromEl:se,originalEvent:i}),ve({sortable:this,name:"sort",toEl:ce,originalEvent:i})),pe&&pe.save()):Ee!==yt&&Ee>=0&&(ve({sortable:this,name:"update",toEl:ce,originalEvent:i}),ve({sortable:this,name:"sort",toEl:ce,originalEvent:i})),J.active&&((Ee==null||Ee===-1)&&(Ee=yt,Ze=Ft),ve({sortable:this,name:"end",toEl:ce,originalEvent:i}),this.save()))),this._nulling()},_nulling:function(){ye("nulling",this),se=K=ce=ie=nt=ae=oi=Qe=tt=_e=_t=Ee=Ze=yt=Ft=ft=zt=pe=Yt=J.dragged=J.ghost=J.clone=J.active=null;var i=this.el;wi.forEach(function(t){i.contains(t)&&(t.checked=!0)}),wi.length=ji=Vi=0},handleEvent:function(i){switch(i.type){case"drop":case"dragend":this._onDrop(i);break;case"dragenter":case"dragover":K&&(this._onDragOver(i),zc(i));break;case"selectstart":i.preventDefault();break}},toArray:function(){for(var i=[],t,n=this.el.children,m=0,f=n.length,g=this.options;m<f;m++)t=n[m],Ie(t,g.draggable,this.el,!1)&&i.push(t.getAttribute(g.dataIdAttr)||Vc(t));return i},sort:function(i,t){var n={},m=this.el;this.toArray().forEach(function(f,g){var c=m.children[g];Ie(c,this.options.draggable,m,!1)&&(n[f]=c)},this),t&&this.captureAnimationState(),i.forEach(function(f){n[f]&&(m.removeChild(n[f]),m.appendChild(n[f]))}),t&&this.animateAll()},save:function(){var i=this.options.store;i&&i.set&&i.set(this)},closest:function(i,t){return Ie(i,t||this.options.draggable,this.el,!1)},option:function(i,t){var n=this.options;if(t===void 0)return n[i];var m=Gt.modifyOption(this,i,t);typeof m<"u"?n[i]=m:n[i]=t,i==="group"&&Fo(n)},destroy:function(){ye("destroy",this);var i=this.el;i[Ce]=null,ne(i,"mousedown",this._onTapStart),ne(i,"touchstart",this._onTapStart),ne(i,"pointerdown",this._onTapStart),this.nativeDraggable&&(ne(i,"dragover",this),ne(i,"dragenter",this)),Array.prototype.forEach.call(i.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),bi.splice(bi.indexOf(this.el),1),this.el=i=null},_hideClone:function(){if(!Qe){if(ye("hideClone",this),J.eventCanceled)return;ee(ae,"display","none"),this.options.removeCloneOnHide&&ae.parentNode&&ae.parentNode.removeChild(ae),Qe=!0}},_showClone:function(i){if(i.lastPutMode!=="clone"){this._hideClone();return}if(Qe){if(ye("showClone",this),J.eventCanceled)return;K.parentNode==se&&!this.options.group.revertClone?se.insertBefore(ae,K):nt?se.insertBefore(ae,nt):se.appendChild(ae),this.options.group.revertClone&&this.animate(K,ae),ee(ae,"display",""),Qe=!1}}};function zc(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Xt(e,i,t,n,m,f,g,c){var o,h=e[Ce],u=h.options.onMove,d;return window.CustomEvent&&!Ye&&!Ut?o=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(o=document.createEvent("Event"),o.initEvent("move",!0,!0)),o.to=i,o.from=e,o.dragged=t,o.draggedRect=n,o.related=m||i,o.relatedRect=f||ue(i),o.willInsertAfter=c,o.originalEvent=g,e.dispatchEvent(o),u&&(d=u.call(h,o,g)),d}function Gi(e){e.draggable=!1}function Pc(){vn=!1}function Hc(e,i,t){var n=ue(St(t.el,0,t.options,!0)),m=Io(t.el,t.options,ie),f=10;return i?e.clientX<m.left-f||e.clientY<n.top&&e.clientX<n.right:e.clientY<m.top-f||e.clientY<n.bottom&&e.clientX<n.left}function Wc(e,i,t){var n=ue(Zn(t.el,t.options.draggable)),m=Io(t.el,t.options,ie),f=10;return i?e.clientX>m.right+f||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>m.bottom+f||e.clientX>n.right&&e.clientY>n.top}function Bc(e,i,t,n,m,f,g,c){var o=n?e.clientY:e.clientX,h=n?t.height:t.width,u=n?t.top:t.left,d=n?t.bottom:t.right,l=!1;if(!g){if(c&&si<h*m){if(!Pt&&(zt===1?o>u+h*f/2:o<d-h*f/2)&&(Pt=!0),Pt)l=!0;else if(zt===1?o<u+si:o>d-si)return-zt}else if(o>u+h*(1-m)/2&&o<d-h*(1-m)/2)return jc(i)}return l=l||g,l&&(o<u+h*f/2||o>d-h*f/2)?o>u+h/2?1:-1:0}function jc(e){return ke(K)<ke(e)?1:-1}function Vc(e){for(var i=e.tagName+e.className+e.src+e.href+e.textContent,t=i.length,n=0;t--;)n+=i.charCodeAt(t);return n.toString(36)}function Uc(e){wi.length=0;for(var i=e.getElementsByTagName("input"),t=i.length;t--;){var n=i[t];n.checked&&wi.push(n)}}function ai(e){return setTimeout(e,0)}function yn(e){return clearTimeout(e)}Di&&re(document,"touchmove",function(e){(J.active||mt)&&e.cancelable&&e.preventDefault()});J.utils={on:re,off:ne,css:ee,find:Lo,is:function(i,t){return!!Ie(i,t,i,!1)},extend:Tc,throttle:Ro,closest:Ie,toggleClass:xe,clone:Oo,index:ke,nextTick:ai,cancelNextTick:yn,detectDirection:No,getChild:St,expando:Ce};J.get=function(e){return e[Ce]};J.mount=function(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];i[0].constructor===Array&&(i=i[0]),i.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(J.utils=We(We({},J.utils),n.utils)),Gt.mount(n)})};J.create=function(e,i){return new J(e,i)};J.version=Ac;var de=[],Ot,bn,wn=!1,Ki,qi,Ci,It;function Gc(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?re(document,"dragover",this._handleAutoScroll):this.options.supportPointer?re(document,"pointermove",this._handleFallbackAutoScroll):n.touches?re(document,"touchmove",this._handleFallbackAutoScroll):re(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ne(document,"dragover",this._handleAutoScroll):(ne(document,"pointermove",this._handleFallbackAutoScroll),ne(document,"touchmove",this._handleFallbackAutoScroll),ne(document,"mousemove",this._handleFallbackAutoScroll)),xr(),li(),Mc()},nulling:function(){Ci=bn=Ot=wn=It=Ki=qi=null,de.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var m=this,f=(t.touches?t.touches[0]:t).clientX,g=(t.touches?t.touches[0]:t).clientY,c=document.elementFromPoint(f,g);if(Ci=t,n||this.options.forceAutoScrollFallback||Ut||Ye||Dt){Yi(t,this.options,c,n);var o=Xe(c,!0);wn&&(!It||f!==Ki||g!==qi)&&(It&&xr(),It=setInterval(function(){var h=Xe(document.elementFromPoint(f,g),!0);h!==o&&(o=h,li()),Yi(t,m.options,h,n)},10),Ki=f,qi=g)}else{if(!this.options.bubbleScroll||Xe(c,!0)===Pe()){li();return}Yi(t,this.options,Xe(c,!1),!1)}}},Ke(e,{pluginName:"scroll",initializeByDefault:!0})}function li(){de.forEach(function(e){clearInterval(e.pid)}),de=[]}function xr(){clearInterval(It)}var Yi=Ro(function(e,i,t,n){if(i.scroll){var m=(e.touches?e.touches[0]:e).clientX,f=(e.touches?e.touches[0]:e).clientY,g=i.scrollSensitivity,c=i.scrollSpeed,o=Pe(),h=!1,u;bn!==t&&(bn=t,li(),Ot=i.scroll,u=i.scrollFn,Ot===!0&&(Ot=Xe(t,!0)));var d=0,l=Ot;do{var s=l,r=ue(s),a=r.top,p=r.bottom,v=r.left,y=r.right,k=r.width,x=r.height,w=void 0,S=void 0,M=s.scrollWidth,L=s.scrollHeight,R=ee(s),$=s.scrollLeft,D=s.scrollTop;s===o?(w=k<M&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),S=x<L&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(w=k<M&&(R.overflowX==="auto"||R.overflowX==="scroll"),S=x<L&&(R.overflowY==="auto"||R.overflowY==="scroll"));var T=w&&(Math.abs(y-m)<=g&&$+k<M)-(Math.abs(v-m)<=g&&!!$),E=S&&(Math.abs(p-f)<=g&&D+x<L)-(Math.abs(a-f)<=g&&!!D);if(!de[d])for(var C=0;C<=d;C++)de[C]||(de[C]={});(de[d].vx!=T||de[d].vy!=E||de[d].el!==s)&&(de[d].el=s,de[d].vx=T,de[d].vy=E,clearInterval(de[d].pid),(T!=0||E!=0)&&(h=!0,de[d].pid=setInterval(function(){n&&this.layer===0&&J.active._onTouchMove(Ci);var b=de[this.layer].vy?de[this.layer].vy*c:0,A=de[this.layer].vx?de[this.layer].vx*c:0;typeof u=="function"&&u.call(J.dragged.parentNode[Ce],A,b,e,Ci,de[this.layer].el)!=="continue"||_o(de[this.layer].el,A,b)}.bind({layer:d}),24))),d++}while(i.bubbleScroll&&l!==o&&(l=Xe(l,!1)));wn=h}},30),Ho=function(i){var t=i.originalEvent,n=i.putSortable,m=i.dragEl,f=i.activeSortable,g=i.dispatchSortableEvent,c=i.hideGhostForTarget,o=i.unhideGhostForTarget;if(t){var h=n||f;c();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(u.clientX,u.clientY);o(),h&&!h.el.contains(d)&&(g("spill"),this.onSpill({dragEl:m,putSortable:n}))}};function Qn(){}Qn.prototype={startIndex:null,dragStart:function(i){var t=i.oldDraggableIndex;this.startIndex=t},onSpill:function(i){var t=i.dragEl,n=i.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var m=St(this.sortable.el,this.startIndex,this.options);m?this.sortable.el.insertBefore(t,m):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Ho};Ke(Qn,{pluginName:"revertOnSpill"});function Xn(){}Xn.prototype={onSpill:function(i){var t=i.dragEl,n=i.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Ho};Ke(Xn,{pluginName:"removeOnSpill"});J.mount(new Gc);J.mount(Xn,Qn);var me={getStyle:(e,i=!1)=>{let t;return window.getComputedStyle?t=window.getComputedStyle(e,null):e.currentStyle&&(t=e.currentStyle),i?t[i]:t},fadeOut:(e,i=250)=>{const t=1/(i/60);e.style.opacity=1,(function n(){const m=Number(e.style.opacity)-t;m>0?(e.style.opacity=m,window.requestAnimationFrame(n)):e.remove()})()},slideDown:(e,i=250,t=!1)=>{e.style.display="block";const n=me.getStyle(e),m=Number.parseInt(n.height,10),f=m/(i/60);e.style.height="0px",(function g(){const c=Number.parseFloat(e.style.height),o=c+f;c<m?(e.style.height=`${o}px`,window.requestAnimationFrame(g)):(e.style.height="auto",t&&t(e))})()},slideUp:(e,i=250,t=!1)=>{const n=me.getStyle(e),m=Number.parseInt(n.height,10),f=n.overflow;e.style.overflow="hidden",e.style.height=`${m}px`;const g=n.minHeight;e.style.minHeight="auto";const c=parseFloat(m/(i/60)).toFixed(2);(function o(){const h=Number.parseInt(e.style.height,10)-c;h>0?(e.style.height=`${h}px`,window.requestAnimationFrame(o)):(e.style.overflow=f,e.style.display="none",e.style.minHeight=g,delete e.style.height,t&&t(e))})()},slideToggle:(e,i=250,t=me.getStyle(e,"display")==="none")=>{t?me.slideDown(e,i):me.slideUp(e,i)}},Wo=e=>Number.isInteger(Number(e)),Je=e=>{let i=0,t=e;for(;t?.previousElementSibling;)t=t.previousElementSibling,i++;return i},Si=(e,i,t)=>{const n=t.split("||");return st(st(i).map(m=>e.find(f=>{const g=n.find(c=>!!we(f,c));return g&&we(f,g)===m})).filter(Boolean).concat(e))},Ni=(e,i,t)=>{for(let n=0;n<e.length;n++)i.call(t,e[n],n)},Jn=(e,i)=>{const t=[];return Ni(e,(n,m)=>t.push(i(n,m))),t},Zi={},Bo=e=>{const i={className:"class"};if(Zi[e])return Zi[e];const t=(i[e]||e).replace(/^\d+/,"").replace(/[^a-zA-Z0-9-:]/g,"");return Zi[e]=t,t},jo=e=>e.replace(/\b\w/g,i=>i.toUpperCase()),Kc=e=>window.JSON.parse(window.JSON.stringify(e)),qc=(e,i)=>i.filter(t=>!~e.indexOf(t)),Ae={capitalize:jo,safeAttrName:Bo,forEach:Ni,copyObj:Kc,map:Jn,subtract:qc,indexOfNode:Je,isInt:Wo,get:we,orderObjectsBy:Si},$e={js:new Set,css:new Set,formeoSprite:null},Er=(e,i,t=hn)=>new Promise(n=>fetch(e).then(m=>{if(!m.ok)return n(t(m));n(i?i(m):m)}).catch(m=>t(m))),Vo=(e,i)=>{e.removeEventListener("load",Vo),i(e.src)},Uo=(e,i)=>{e.removeEventListener("load",Uo),i(e.src)},Yc=e=>new Promise((i,t)=>{if($e.js.has(e))return i(e);$e.js.add(e);const n=V.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:e},action:{load:()=>Uo(n,i),error:()=>t(new Error(`${e} failed to load.`))}});document.head.appendChild(n)}),Cn=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>new Promise((n,m)=>{if($e.css.has(t))return n(t);$e.css.add(t);const f=V.create({tag:"link",attrs:{rel:"stylesheet",href:t},action:{load:()=>Vo(f,n),error:()=>m(new Error(`${t} failed to load.`))}});document.head.appendChild(f)}));return Promise.all(i)},Zc=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>Yc(t));return Promise.all(i)},Qc=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>Cn(t));return Promise.all(i)},Ar=e=>($e.formeoSprite=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,$e.formeoSprite),Xc=async(e=null)=>{if($e.formeoSprite)return $e.formeoSprite;if(!e)return Ar(el);const i=async t=>Ar(await t.text());return Er(e,i,()=>Er(il,i))},Jc={js:Zc,css:Qc},Go=e=>{const i=Object.entries(e).map(([t,n])=>Jc[t](n));return Promise.all(i)},ed=async e=>{if(e&&!$e.css.has(e)&&(await Cn(e),!$e.css.has(e)&&!$e.css.has("https://draggable.github.io/formeo/assets/css/formeo.min.css")))return await Cn(rl)},td={glyphicons:e=>`<span class="glyphicon glyphicon-${e}" aria-hidden="true"></span>`,"font-awesome":e=>{const[i,t]=e.split(" ");return`<i class="${i} fa-${t}"></i>`},fontello:e=>`<i class="${So}${e}">${e}</i>`},id=new Set(["input","textarea","select"]),nd=e=>e.replace(/^on([A-Z])/,(i,t)=>t.toLowerCase()),rd=new Set(["focus","blur"]),od=e=>{const i=nd(e);return(t,n)=>t.addEventListener(i,n,rd.has(i))},Ko=(e={})=>{let i=e?.attrs?.name||e?.name;if(i)return i;const t=Me(e);let n=e.config?.label||e.attrs?.label||e?.label;return n&&(typeof n=="object"&&(n=V.create(n).textContent),/^<.+>.+<.+>$/gim.test(n)&&(n=Rl(n)),i=`${t}-${xo(_l(n,24,null))}`),i||t},sd=class{constructor(e=Object.create(null)){this.options=e}set setOptions(e){this.options=De(this.options,e)}processElemArg(e){let i=e,t;if(typeof i=="string")return t=i,i={tag:t},i;if(i.attrs){const{tag:n,...m}=i.attrs;n&&(typeof n=="string"?t=n:t=(n.find(f=>f.selected===!0)||n[0]).value),i.attrs=m}return i.tag=t||i.tag||"div",i}render=e=>(e.id=`f-${e.id||Me()}`,this.create(e));create=(e,i=!1)=>{if(!e)return;if(this.isDOMElement(e))return e;const t=this,n=["children","content"],{className:m,options:f,dataset:g,...c}=this.processElemArg(e);n.push("tag");let o;const{tag:h}=c;let u;const d={attrs:{},className:[Ae.get(c,"config.inputWrap")],children:[],config:{}};let l=document.createElement(h);const s={string:a=>{l.innerHTML+=a},object:a=>a&&l.appendChild(t.create(a,i)),node:a=>l.appendChild(a),component:a=>l.appendChild(a.dom),array:a=>{for(const p of a)o=t.childType(p),s[o](p)},function:a=>{a=a(),o=t.childType(a),s[o](a)},undefined:()=>null,boolean:()=>null};if(m&&(c.attrs=De(c.attrs,{className:m})),f){const a=this.processOptions(f,c,i);if(this.holdsContent(l)&&h!=="button")s.array.call(this,a),c.content=void 0;else return Ae.forEach(a,p=>{d.children.push(t.create(p,i))}),c.attrs.className&&(d.className=c.attrs.className),d.id=c.id,d.config={...c.config},this.create(d,i);n.push("options")}if(c.attrs&&(t.processAttrs(c,l,i),n.push("attrs")),c.config){if(c.config.label&&(c.config.label&&h!=="button"||["radio","checkbox"].includes(Ae.get(c,"attrs.type")))&&!i){const a=t.label(c);if(!c.config.hideLabel){const p=[a,l];t.labelAfter(c)&&p.reverse(),d.children.push(p)}}n.push("config")}if(c.content||c.children){const a=c.content||c.children;o=t.childType(a),s[o]||console.error(`childType: ${o} is not supported`),s[o].call(this,a)}if(g){for(const a in g)Object.hasOwn(g,a)&&(l.dataset[a]=typeof g[a]=="function"?g[a]():g[a]);n.push("dataset")}c.action&&(this.actionHandler(l,c.action),n.push("action"));const r=Ae.subtract(n,Object.keys(c));for(u=r.length-1;u>=0;u--)l[r[u]]=c[r[u]];return d.children.length&&(l=this.create(d)),l};onRender=(e,i,t=333)=>{const n=Date.now(),m=()=>{!e.parentElement&&Date.now()-n<t?window.requestAnimationFrame(m):e.parentElement&&i(e)};m()};actionHandler(e,i){const t={onRender:V.onRender,render:V.onRender};return Object.entries(i).map(([n,m])=>(Array.isArray(m)?m:[m]).map(f=>(t[n]||od(n))(e,f)))}get icons(){if(this.iconSymbols)return this.iconSymbols;const e=$e.formeoSprite.querySelectorAll("svg symbol"),i=t=>{const n=t.getAttribute("viewBox")||"0 0 24 24",m=Array.from(t.children).map(f=>f.cloneNode(!0).outerHTML).join("");return{tag:"svg",attrs:{className:["svg-icon",t.id],viewBox:n,xmlns:"http://www.w3.org/2000/svg"},children:m}};return this.iconSymbols=Array.from(e).reduce((t,n)=>{const m=n.id.replace(So,"");return t[m]=i(n),t},{}),this.cachedIcons={},this.iconSymbols}icon(e,i){if(!e)return;const t=`${e}?${new URLSearchParams(i).toString()}`;if(this.cachedIcons?.[t])return this.cachedIcons[t];const n=this.icons[e];if(n){if(i){const m=De(n,i);return this.cachedIcons[t]=V.create(m).outerHTML,this.cachedIcons[t]}return this.cachedIcons[t]=V.create(n).outerHTML,this.cachedIcons[t]}return td[V.options.iconFont]?.(e)||e}processAttrs(e,i,t){const{attrs:n={}}=e;if(!t&&!n.name&&n.name!==null&&this.isInput(e.tag)){const m=Ko(e);m&&i.setAttribute("name",m)}for(const m of Object.keys(n)){const f=Ae.safeAttrName(m),g=this.processAttrValue(n[m]);if(g!==!1)try{i.setAttribute(f,g)}catch(c){console.warn(`Could not set attribute ${f} with value ${g}`,c)}}}processAttrValue(e){if(typeof e=="function")return e();if(typeof e=="boolean")return e&&"";let i=e||"";if(Array.isArray(i))if(typeof i[0]=="object"){const t=i.filter(n=>n.selected===!0);i=t.length?t[0].value:i[0].value}else i=i.join(" ");return i}toggleElementsByStr=(e,i)=>{const t=[],n=(m,f)=>{f?(m.style.display="block",t.push(m)):m.style.display="none"};return V.elementsContainText(e,i,n),t};elementsContainText=(e,i,t)=>{const n=[];return Ni(e,m=>{const f=m.textContent.toLowerCase().indexOf(i.toLowerCase())!==-1;t?.(m,f),f&&n.push(m)}),n};generateOption=({type:e="option",label:i,value:t,i:n=0,selected:m})=>({tag:e==="option"?"option":"input",attrs:{type:e,value:t||`${e}-${n}`,[e==="option"?"selected":"checked"]:m||!n},config:{label:i||Z.get("labelCount",{label:Z.get("option"),count:n})}});processOptions(e,i,t){const{action:n,attrs:m={}}=i,f=m.type||i.tag,g=m.id||i.id,c=(o,h)=>{const{label:u,value:d,...l}=o,s=()=>{const r={tag:"input",attrs:{name:g,type:f,value:d||"",id:`${g}-${h}`,...l},action:n},a={tag:"label",attrs:{for:`${g}-${h}`},children:u},p={children:[r,a],className:[`f-${f}`]};return m.className&&(i.config.inputWrap=m.className),i.config.inline&&p.className.push(`f-${f}-inline`),o.selected&&(r.attrs.checked=!0),t&&(a.attrs.contenteditable=!0),p};return{select:()=>{const r=o.attrs||o,{label:a,checked:p,selected:v,attrs:y}={attrs:r,...o,...r};return{tag:"option",attrs:{...y,selected:!!(p||v)},children:a}},button:r=>{const{type:a,label:p,className:v,id:y}=r;return{...i,attrs:{type:a},className:v,id:y||Me(),options:void 0,children:p,action:i.action}},checkbox:s,radio:s}[f]?.(o)};return e.map(c)}holdsContent(e){return e.outerHTML.includes("/")}isBlockInput(e){return!this.isInput(e)&&this.holdsContent(e)}isInput(e){let i=e;return typeof i!="string"&&(i=i.tagName),id.has(i)}parsedHtml(e){const i=document.createElement("textarea");return i.innerHTML=e,i.textContent}labelAfter(e){const i=Ae.get(e,"attrs.type"),t=Ae.get(e,"config.labelAfter");return t===void 0?i==="checkbox"||i==="radio":t}requiredMark=()=>({tag:"span",className:"text-error",children:"*"});tooltip=e=>({tag:"span",className:"f-tooltip",dataset:{tooltip:e},content:V.icon("info-circle")});helpText=e=>({tag:"small",className:"f-help-text",children:e});label(e,i){const t=Ae.get(e,"attrs.required");let{config:{label:n="",helpText:m="",tooltip:f=null}}=e;const{id:g,attrs:c}=e;typeof n=="function"&&(n=n());const o={tag:"label",attrs:{for:g||c?.id},className:[],children:[n,t&&this.requiredMark(),f&&this.tooltip(f),m&&this.helpText(m)],action:{}};return i&&(o.attrs.for=void 0,o.attrs.contenteditable=!0,o.fMap=i),o}childType(e){return e===void 0?e:[["array",i=>Array.isArray(i)],["node",i=>i instanceof window.Node||i instanceof window.HTMLElement],["component",()=>e?.dom],[typeof e,()=>!0]].find(i=>i[1](e))[0]}getStyle(e,i=!1){let t;return window.getComputedStyle?t=window.getComputedStyle(e,null):e.currentStyle&&(t=e.currentStyle),i?t[i]:t}getElement(e){return{node:()=>e,object:()=>document.getElementById(e.id),string:()=>document.getElementById(e)}[this.childType(e)]()}empty(e){for(;e.firstChild;)this.remove(e.firstChild);return e}removeEmpty=e=>{const i=e.parentElement,t=be(e),n=i.getElementsByClassName(`formeo-${t}`);if(this.remove(e),!n.length)return this.isStage(i)?this.emptyClass(i):this.removeEmpty(i)};remove(e){const i=be(e);return i?oe.remove(`${i}s.${e.id}`):e.parentElement.removeChild(e)}removeClasses(e,i){const t={string:n=>n.classList.remove(i),array:n=>{for(const m of i)n.classList.remove(m)}};t.object=t.string,Ae.forEach(e,t[this.childType(i)])}addClasses(e,i){Ae.forEach(e,{string:t=>t.classList.add(i),array:t=>{for(const n of i)t.classList.add(n)}}[this.childType(i)])}formGroup(e,i=""){return{className:["f-field-group",i],children:e}}coords(e){const i=e.getBoundingClientRect(),t=document.body.getBoundingClientRect();return{pageX:i.left+i.width/2,pageY:i.top-t.top-i.height/2}}clearStage(e){e.classList.add("removing-all-fields");const i=()=>{V.empty(e),e.classList.remove("removing-all-fields"),V.emptyClass(e),me.slideDown(e,300)};me.slideUp(e,600,i)}toggleSortable(e,i){let t=i;const n=be(e);if(!n)return;const m=be(e.parentElement),f=V[n].get(e.id).sortable;t||(t=!f.option("disabled")),f.option("disabled",t),m&&["rows","columns","stages"].includes(m)&&this.toggleSortable(e.parentElement,t)}emptyClass(e){const i=e.getElementsByClassName(ol.get(e.classList.item(0)));e.classList.toggle("empty",!i.length)}btnTemplate=({title:e="",...i})=>({tag:"button",attrs:{type:"button",title:e},...i});isControls=e=>be(e)===ot;isStage=e=>be(e)===kt;isRow=e=>be(e)===Ue;isColumn=e=>be(e)===Ge;isField=e=>be(e)===Tt;asComponent=e=>oe[`${be(e)}s`].get(e.id);isDOMElement(e){return e instanceof window.Element||e instanceof window.HTMLElement||!!(e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string")}},V=new sd,bt="f-autocomplete",ad=`${bt}-display-field`,er=`${bt}-list`,$t="highlight-component",xi=`${er}-item`,ld=(e,i)=>{const t=e.reduce((n,m)=>n+(m===i),0);return t>1?`(${t})`:""},qo=["config.label","config.controlId"],cd=["config.legend","name"],dd=[...qo,...cd],Qi=e=>qo.reduce((i,t)=>i||e.get(t),null),kr=e=>dd.reduce((i,t)=>i||e.get(t),null)||je(e.name),ud=new Map([["condition.source",Qi],["if.condition.source",Qi],["if.condition.target",Qi],["then.condition.target",kr],["condition.target",kr]]),Yo=({id:e,...i},t)=>{const{name:n,label:m}=i;return n?ud.get(t)(i):m},hd=({selectedId:e,...i})=>(i.value===e&&(i.selected=!0),i),Xi=e=>(e.classList.contains(xi)||(e=e.parentElement),e),Zo=({value:e,textLabel:i,htmlLabel:t,componentType:n,depth:m=0},f)=>{const g={tag:"li",children:t,dataset:{value:e,label:i},className:[xi,`${xi}-depth-${m}`,`component-type-${n}`],action:{mousedown:({target:c})=>{c=Xi(c),f.setValue(c),f.selectOption(c),f.hideList()},mouseover:({target:c})=>{c=Xi(c),f.removeHighlight(),f.highlightComponent(c)},mouseleave:({target:c})=>{c=Xi(c),f.removeHighlight()}}};return V.create(g)},pd=(e,i)=>{const t=e.data.options.map((n,m)=>{const f=`${e.address}.options[${m}]`,g=n.label,c=n.label;return Zo({value:f,textLabel:g,htmlLabel:c,componentType:"option",depth:1},i)});return V.create({tag:"ul",attrs:{className:[er,"options-list"]},children:t})},fd=e=>{const i=e.value,t=[],n=oe.flatList();return Object.entries(n).reduce((m,[f,g])=>{const c=Yo(g,e.key);if(c){const o=g.name,h={tag:"span",content:` ${je(o)}`,className:"component-type"},u=`${o}.${c}`;t.push(u);const d=ld(t,u),l={tag:"span",content:d,className:"component-label-count"},s=[`${c} `,l,h],r=[c,d].join(" ").trim();if(g.isCheckable){const p=pd(g,e);s.push(p)}const a=hd({value:f,textLabel:r,htmlLabel:s,componentType:o,selectedId:i});m.push(Zo(a,e))}return m},[])},gd=class{lastCache=Date.now();optionsCache=null;constructor({key:e,value:i,className:t,onChange:n=hn}){this.key=e,this.className=[t||this.key.replace(/\./g,"-")].flat(),this.value=i,this.onChange=n||hn,this.events=[],this.build()}createProxy(){return new Proxy(this,{get(e,i){if(i in e)return e[i];if(i in e.dom){const t=e.dom[i];return typeof t=="function"?t.bind(e.dom):t}},set(e,i,t){return i in e?e[i]=t:e.dom[i]=t,!0}})}get isAddress(){return Te(this.value)}get valueComponent(){return Te(this.value)&&oe.getAddress(this.value)}build(){const e=t=>{const n=this.list,m=this.getActiveOption();let f=new Map([[38,()=>{const g=this.getPreviousOption(m);g&&this.selectOption(g)}],[40,()=>{const g=this.getNextOption(m);g&&this.selectOption(g)}],[13,()=>{m&&(this.selectOption(m),this.setValue(m),n.style.display==="none"?this.showList(m):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return f||(f=()=>!1),f()},i={focus:({target:t})=>{this.updateOptions(),t.parentElement.classList.add(`${bt}-focused`);const n=V.toggleElementsByStr(this.list.querySelectorAll(`.${xi}-depth-0`),t.value);t.addEventListener("keydown",e);const m=this.list.querySelector(".active-option")||n[0];this.showList(m)},blur:({target:t})=>{t.parentElement.classList.remove(`${bt}-focused`),t.removeEventListener("keydown",e),this.hideList()},input:t=>{const{value:n}=t.target,m=V.toggleElementsByStr(this.list.querySelectorAll("li"),n);if(n.length===0&&this.clearValue(),m.length===0)this.hideList();else{const f=this.getActiveOption()||m[0];this.showList(f)}this.setValue({dataset:{label:n,value:n}})}};return this.displayField=V.create({tag:"input",autocomplete:"off",action:i,attrs:{type:"text",className:ad,value:this.label||this.value,placeholder:Z.get(`${this.key}.placeholder`)}}),this.hiddenField=V.create({tag:"input",attrs:{type:"hidden",className:bt,value:this.value}}),this.list=V.create({tag:"ul",attrs:{className:er}}),this.clearButton=V.create({tag:"span",content:V.icon("remove"),className:"clear-button hidden",action:{click:()=>this.clearValue()}}),this.dom=V.create({children:[this.displayField,this.clearButton,this.hiddenField],className:[bt,this.className].flat(),action:{onRender:t=>{this.stage=t.closest(".formeo-stage"),this.value&&(this.displayField.value=this.label),this.clearButton.classList.toggle("hidden",!this.value.length)}}}),this.dom}get label(){if(!Te(this.value))return this.value;const e=this.value&&oe.getAddress(this.value);return e&&Yo(e,`${this.key}`)||this.value}updateOptions(){let e=this.optionsCache;const i=Date.now();(i-this.lastCache>zn*5||!e)&&(V.empty(this.list),e=this.generateOptions(),this.lastCache=i),this.list.children.length||this.list.append(...e)}generateOptions(){return this.optionsCache=fd(this),this.optionsCache}setListPosition(){const{offsetHeight:e,offsetWidth:i}=this.displayField,t=this.displayField.closest(".formeo-stage").getBoundingClientRect(),n=this.displayField.getBoundingClientRect(),m={position:"absolute",top:`${n.y+e-t.y}px`,left:`${n.x+window.scrollX-t.x+2}px`,width:`${i}px`};Object.assign(this.list.style,m)}showList(e,i=this.list){this.stage.contains(this.list)||this.stage.appendChild(this.list),this.setListPosition(),this.selectOption(e),me.slideDown(i,at)}hideList(e=this.list){me.slideUp(e,at),this.removeHighlight(),this.stage.contains(this.list)&&this.stage.removeChild(this.list)}getActiveOption(e=this.list){const i=e.querySelector(".active-option");return i?.style.display!=="none"?i:null}getPreviousOption(e){let i=e;do i=i?i.previousSibling:null;while(i!=null&&i.style.display==="none");return i}getNextOption(e){let i=e;do i=i?i.nextSibling:null;while(i!=null&&i.style.display==="none");return i}selectOption(e,i=this.list){const t=i.querySelectorAll("li");for(const n of t){const{dataset:{value:m}}=n;n.classList.remove("active-option"),Te(m)&&oe.getAddress(m)?.dom?.classList.remove($t)}e&&(e.classList.add("active-option"),this.highlightComponent(e))}removeHighlight(){const e=document.getElementsByClassName($t);for(const i of e)i.classList.remove($t)}highlightComponent(e){const{dataset:{value:i}}=e;if(Te(i)){const{componentAddress:t,isOptionAddress:n,optionIndex:m}=lt(i).reduce((g,c)=>c==="options"?(g.isOptionAddress=!0,g):g.isOptionAddress?(g.optionIndex=+c,g):(g.componentAddress.push(c),g),{componentAddress:[],optionIndex:null,isOptionAddress:!1}),f=oe.getAddress(t);f?.dom&&(f.dom.classList.add($t),n&&f.dom.querySelectorAll(".field-preview .f-checkbox, .field-preview .f-radio")[m]?.classList.add($t))}}clearValue(){this.selectOption(null),this.setValue({dataset:{label:"",value:""}}),this.displayField.focus()}setValue(e){const{label:i,value:t}=e.dataset;this.displayField.value=i,this.hiddenField.value=t,this.value=t,this.clearButton.classList.toggle("hidden",!t.length),this.onChange?.({target:this.hiddenField})}},Qo=e=>Z.get(`${e}.placeholder`)||je(mi(e)),tr=e=>e.replaceAll(".","-"),Tr=new Map([["config.helpText",(...e)=>Mr(...e)],["config.tooltip",(...e)=>Mr(...e)]]);function Ji({key:e,value:i,type:t="text",checked:n}){const m={tag:"input",attrs:{type:t,value:i,placeholder:Qo(e)},className:[tr(e)],config:{}};return n&&(m.attrs.checked=!0),m}function Mr({key:e,value:i}){return{tag:"textarea",attrs:{placeholder:Qo(e)},className:[tr(e)],config:{},textContent:i}}function ze(e){const i=Z.get(e);if(i)return i;const t=mi(e);return Z.get(t)||je(t)}var xt={autocomplete:(...e)=>new gd(...e).createProxy(),string:({key:e,value:i})=>Tr.has(e)?Tr.get(e)({key:e,value:i}):Ji({key:e,value:i}),boolean:({key:e,value:i})=>Ji({key:e,value:i,type:e==="selected"?"radio":"checkbox",checked:!!i}),number:({key:e,value:i})=>Ji({key:e,value:i,type:"number"}),array:({key:e,value:i})=>({tag:"select",attrs:{placeholder:ze(`placeholder.${e}`)},className:[tr(e)],options:i}),object:e=>Object.entries(e).map(([i,t])=>xt[V.childType(t)]({key:i,value:t}))},md={boolean:(e,i)=>({click:({target:t})=>{if(t.type==="radio"){const n=i.data.options.map(m=>({...m,selected:!1}));i.set("options",n)}i.set(e,t.checked),i.updatePreview()}}),string:(e,i)=>({input:({target:{value:t}})=>{i.set(e,t),i.debouncedUpdatePreview()}}),number:(e,i)=>({input:({target:{value:t}})=>{i.set(e,Number(t)),i.debouncedUpdatePreview()}}),array:(e,i)=>({change:({target:{value:t}})=>{i.set(e,t),i.debouncedUpdatePreview()}}),object:()=>({})},vd=Object.freeze({title:"",content:null,confirmText:()=>ze("save"),cancelText:()=>ze("cancel"),onConfirm:()=>{},onCancel:()=>{},className:"",closeOnEscape:!0,position:"top",triggerElement:null,triggerCoords:null}),yd=class ci{constructor(i){this.opts=De(vd,i),this.dialog=null}createDialog(){const{title:i,content:t,confirmText:n,cancelText:m,className:f,closeOnEscape:g,position:c}=this.opts,o=`dialog-position-${c}`,h=[];return i&&h.push({tag:"h3",className:"dialog-title",textContent:i}),t&&h.push({tag:"div",className:"dialog-body",children:Array.isArray(t)?t:[t]}),h.push({tag:"div",className:"dialog-actions",children:[{tag:"button",type:"button",className:"btn btn-sm btn-secondary",textContent:typeof m=="function"?m():m,action:{click:()=>this.handleCancel()}},{tag:"button",type:"submit",className:"btn btn-sm btn-primary",textContent:typeof n=="function"?n():n}]}),V.create({tag:"dialog",className:["formeo-dialog","formeo",o,f],children:[{tag:"form",className:"dialog-form",method:"dialog",children:h,action:{submit:u=>this.handleSubmit(u)}}],action:{cancel:u=>{g?this.handleCancel():u.preventDefault()}}})}handleSubmit(i){i.preventDefault();const t=new FormData(i.target);this.opts.onConfirm(t,this),this.close()}handleCancel(){this.opts.onCancel(this),this.close()}setPosition(){const{position:i,triggerElement:t,triggerCoords:n}=this.opts;if(i!=="trigger"||!this.dialog)return;let m=n;if(!m&&t){const f=t.getBoundingClientRect();m={x:f.left+f.width/2,y:f.bottom+8}}if(m){const f=this.dialog.getBoundingClientRect(),g=window.innerWidth,c=window.innerHeight;let o=m.x-f.width/2,h=m.y;const u=16;o=Math.max(u,Math.min(o,g-f.width-u)),h=Math.max(u,Math.min(h,c-f.height-u)),this.dialog.style.left=`${o}px`,this.dialog.style.top=`${h}px`,this.dialog.style.transform="none"}}open(){if(this.dialog||(this.dialog=this.createDialog()),document.body.appendChild(this.dialog),this.dialog.showModal(),this.opts.position==="trigger"){const i=setTimeout(()=>{this.setPosition(),clearTimeout(i)},0)}return this}close(){this.dialog&&(this.dialog.close(),this.dialog.remove(),this.dialog=null)}static alert(i,t=()=>{}){return new ci({content:{tag:"p",className:"dialog-message",textContent:i},confirmText:()=>Z.get("ok")||"OK",cancelText:"",onConfirm:()=>t()})}static confirm(i,t=()=>{},n=()=>{}){return new ci({content:{tag:"p",className:"dialog-message",textContent:i},confirmText:()=>Z.get("confirm")||"Confirm",onConfirm:()=>t(),onCancel:()=>n()})}static prompt(i,t=()=>{},n=""){return new ci({content:[{tag:"label",className:"dialog-prompt-label",children:[{tag:"p",className:"dialog-message",textContent:i},{tag:"input",type:"text",name:"prompt-value",className:"dialog-prompt-input",value:n}]}],onConfirm:m=>{t(m.get("prompt-value"))}})}},Xo="hidden-property",bd="hidden-option",en=/\.options\[\d+\]$/,wd={"if-sourceProperty":ri(ni,hr,pr),"if-targetProperty":ri(ni),"then-targetProperty":ri(ni,hr,pr),...Object.entries(xl).reduce((e,[i,t])=>(e[`if-${i}`]=t,e[`then-${i}`]=t,e),{})},Jo={assignment:Lt,comparison:Lt,logical:Lt,source:({key:e,value:i,onChange:t,conditionType:n})=>xt.autocomplete({key:`${n}.condition.${e}`,value:i,onChange:t,className:`condition-${e}`}),sourceProperty:Lt,targetProperty:Lt,target:e=>Jo.source(e),value:({key:e,value:i,onChange:t},n)=>{const m=xt.string({key:`condition.${e}`,value:i});return m.action={input:t},m}};function Cd({key:e,value:i,conditionType:t}){return Object.entries(wd[`${t}-${e}`]||{}).map(([n,m])=>Sd({fieldName:e,fieldValue:i,key:n,optionValue:m}))}function Sd({fieldName:e,fieldValue:i,key:t,optionValue:n}){return{label:Z.get(`${e}.${t}`)||je(t).toLowerCase(),value:n,selected:n===i}}function Lt({key:e,value:i,onChange:t,conditionType:n}){const m=Cd({key:e,value:i,conditionType:n}),f=xt.array({key:`condition.${e}`,value:m});return f.action={change:t},f}var xd=e=>!e?.classList.contains(Xo),Ed={sourceProperty:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i.value;return Lr(!!i.value.match(en),t),!n},comparison:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i.value,m=!!i.value.match(en);return!n||m||t.value!=="value"},assignment:e=>{const i=e.get("target"),t=e.get("targetProperty");return!i.value||t.value.startsWith("is")},targetProperty:e=>{const i=e.get("target"),t=e.get("targetProperty");return Lr(!!i.value.match(en),t),!Ja(i.value)},target:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i?.value;return t&&!n?!0:t&&t?.value!=="value"},value:e=>{const i=e.get("target"),t=e.get("targetProperty");return t===void 0?!1:i&&!i.value||!xd(e.get("comparison"))||t.value===es?!0:t.value.startsWith("is")}},$r=e=>{for(const[i,t]of e){const n=!!Ed[i]?.(e)||!1;t.classList.toggle(Xo,n)}},es="isChecked",tn=e=>e.value.endsWith("Checked"),Lr=(e,i)=>{if(e&&tn(i))return null;const t=Array.from(i.querySelectorAll("option")),n=[];for(const m of t){const f=tn(m),g=e?!f:f;g&&n.push(m.value),m.classList.toggle(bd,g)}n.includes(i.value)&&(i.value=e?es:t.find(m=>!tn(m))?.value||i.value)};function Ad(e,i=Sl){return i.reduce((t,n)=>(e[n]!==void 0&&t.push([n,e[n]]),t),[])}var kd=class{constructor({conditionValues:e,conditionType:i,conditionCount:t,index:n},m){this.values=new Map(Ad(e)),this.conditionType=i,this.parent=m,this.baseAddress=`${m.address}.${i}`,this.fields=new Map,this.conditionCount=t,this.index=n,this.dom=this.generateDom()}setConditionIndex(e){this.index=e}get address(){return`${this.baseAddress}[${this.index}]`}destroy(){const e=oe.getAddress(this.baseAddress);e.splice(this.index,1),oe.setAddress(this.baseAddress,e),me.slideUp(this.dom,at,()=>{this.dom.remove()})}label(){return this.index?null:{tag:"label",className:`condition-label ${this.conditionType}-condition-label`,content:Z.get(`condition.type.${this.conditionType}`)}}generateDom(){const e=[];for(const[t,n]of this.values){const m=o=>this.onChangeCondition({key:t,target:o.target}),f={key:t,value:n,conditionType:this.conditionType,onChange:m},g=Jo[t](f,this.values),c=g.dom||V.create(g);this.fields.set(t,g.dom?g:c),e.push(c)}const i={children:[this.label(),...e,...this.generateConditionTypeActionButtons()],className:`f-condition-row ${this.conditionType}-condition-row display-none`,action:{onRender:t=>{this.processUiState()}}};return V.create(i)}generateConditionTypeActionButtons(){const e=[],i="manage-condition-type",t=f=>`${f}-condition-type`,n=V.btnTemplate({title:Z.get(`remove${this.conditionType}Condition`),className:[i,t("remove")],content:V.icon("minus"),action:{click:()=>this.destroy(),mouseover:f=>{this.dom.classList.add("to-remove")},mouseout:f=>{this.dom.classList.remove("to-remove")}}});e.push(n);const m=V.btnTemplate({title:Z.get(`add${this.conditionType}Condition`),className:[i,t("add")],content:V.icon("plus"),action:{click:()=>{const f=this.parent.addConditionType(this.conditionType),g={changedProperty:null,dataPath:f.address,value:f.value,src:f.dom};this.updateDataDebounced(g)}}});return e.push(m),e}get value(){return Array.from(this.fields).reduce((e,[i,t])=>(e[i]=t.value,e),{})}processUiState(){$r(this.fields),this.dom.classList.remove("display-none")}updateDataDebounced=fi(e=>{Q.formeoUpdated(e),oe.setAddress(e.dataPath,e.value)});onChangeCondition=({key:e,target:i})=>{const t={changedProperty:e,dataPath:this.address,value:this.value,src:i};$r(this.fields),this.updateDataDebounced(t)}},Td=new Map([["attrs",({itemKey:e})=>e],["options",({itemKey:e,key:i})=>`${e}.${i}`]]),ts=(e,i)=>{if(i.controlId==="select"){const t=i.editPanels.get("options"),[n,m]=e?gi:kl,f=t.data.map(({[n]:g,...c})=>({[m]:g,...c}));t.setData(f)}},Md=new Map([["attrs-multiple",e=>({change:({target:i})=>{e.field.controlId==="select"&&ts(i.checked,e.field)}})]]),Rt=class{constructor({key:e,index:i,field:t,panel:n,data:m}){this.field=t,this.itemKey=e,this.itemIndex=i,this.panel=n,this.panelName=n.name,this.isDisabled=t.isDisabledProp(e,this.panelName),this.isHidden=this.isDisabled&&t.config.panels[this.panelName].hideDisabled,this.isLocked=t.isLockedProp(e,this.panelName),this.address=`${t.indexName}.${t.id}.${e}`,this.itemSlug=fr(e),this.conditionTypeWrap=new Map,m!==void 0&&this.field.get(this.itemKey)===void 0&&this.field.set(this.itemKey,m);const f=[`field-${this.itemSlug}`,"prop-wrap"];this.isHidden&&f.push("hidden-property"),this.dom=V.create({tag:"li",className:f,children:{className:"component-prop",children:[this.itemInputs(),this.itemControls]}})}get itemValues(){const e=this.field.get(this.itemKey);return e?.constructor===Object?Si(Object.entries(e),gi,"0"):[[this.itemKey,e]]}findOrCreateConditionTypeWrap(e){let i=this.conditionTypeWrap.get(e);return i||(i=V.create({className:`type-conditions-wrap ${e}-conditions-wrap`}),this.conditionTypeWrap.set(e,i),i)}itemInputs(){const e=V.create({className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map(([i,t])=>this.panelName==="conditions"?this.generateConditionFields(i,t):this.itemInput(i,t))});return this.inputs&&this.inputs.replaceWith(e),this.inputs=e,e}addConditionType=(e,i)=>{const t=this.findOrCreateConditionTypeWrap(e);let n=i;if(!n){const[f]=Gn()[e],g=t.children.length;e==="if"&&(f.logical="||"),n={conditionValues:f,conditionCount:g,index:g}}const m=new kd({conditionType:e,...n},this);return t.appendChild(m.dom),m};removeConditionType=(e,i)=>{const t=this.conditionTypeWrap.get(e).children[i];t.destroy(),t.dom.remove()};generateConditionFields=(e,i)=>(this.conditions=new Map,i.forEach((t,n)=>{const m=this.addConditionType(e,{index:n,conditionCount:i.length,conditionValues:t});this.conditions.set(n,m)}),this.findOrCreateConditionTypeWrap(e));get itemControls(){if(this.isLocked)return{className:`${this.panelName}-prop-controls prop-controls`,content:[]};const e={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{me.slideUp(this.dom,333,i=>{this.field.remove(this.itemKey),i.remove(),this.panel.updateProps()})},mouseover:i=>{this.dom.classList.add("to-remove")},mouseout:i=>{this.dom.classList.remove("to-remove")}},content:V.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[e]}}getConfigAttrOptions(e){const i=e.split(".").pop(),t=this.field.config?.attrs?.[i];return Array.isArray(t)?t:null}itemInput(e,i){if(this.isDisabled)return null;let t=V.childType(i)||"string",n=i;if(this.panelName==="attrs"){const s=this.getConfigAttrOptions(e);s&&(n=s.map(r=>({...r,selected:r.value===i})),t="array")}const m=Td.get(this.panelName)?.({itemKey:this.itemKey,key:e})||this.itemKey,f=m.split(".").filter(Number.isNaN).join(".")||e,g=xt[t]({key:e,value:n}),c=`${this.field.shortId}-${fr(m).replaceAll(/-\d+-(selected)/g,"-$1")}`,o={label:this.panelName!=="options"&&ze(f),labelAfter:!1,inputWrap:["f-input-wrap",this.isLocked&&"locked-prop",this.isDisabled&&"disabled-prop"].filter(Boolean).join(" ")},h={name:g.attrs.type==="checkbox"?`${c}[]`:c};h.disabled=this.isDisabled,h.readonly=this.isLocked;const u=Md.get(this.itemSlug)?.(this),d=Gl(md[t](m,this.field),u||{}),l=De(xt[t]({key:e,value:n}),{action:d,attrs:h,config:o});return gi.includes(e)?{className:"f-addon",children:l}:l}},$d={multiple:(e,i)=>{ts(!!e,i)}},Ld=[{label:ze("config.label"),value:"label"},{label:ze("config.hideLabel"),value:"hideLabel"},{label:ze("config.helpText"),value:"helpText"},{label:ze("config.labelAfter"),value:"labelAfter"},{label:ze("config.disableHtmlLabel"),value:"disableHtmlLabel"},{label:ze("config.tooltip"),value:"tooltip"}],Rd={label:"New Field",hideLabel:!1,helpText:"",labelAfter:!1,disableHtmlLabel:!1,tooltip:""},_d=class{constructor(e,i,t){this.type=V.childType(e),this.name=i,this.component=t,this.panelConfig=this.getPanelConfig(this.data)}get data(){const e=this.component.get(this.name);return this.type==="object"?Object.entries(e):e}getPanelConfig(e){return this.props=this.createProps(e),this.editButtons=this.createEditButtons(),{config:{label:Z.get(`panel.label.${this.name}`)},attrs:{className:`${lo} ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(e=this.data){this.editPanelItems=Array.from(e).map((t,n)=>{const m=this.type==="array",f=t[0],g=m?`[${n}]`:`.${t[0]}`,c=m?t:{[t[0]]:t[1]},o=`${this.name}${g}`,h=this.component.isDisabledProp(o,this.name),u=Tl.get(this.name)?.has(f)??!0;return h||!u?null:new Rt({key:o,data:c,field:this.component,index:n,panel:this})}).filter(Boolean);const i={tag:"ul",attrs:{className:["edit-group",`${this.component.name}-edit-group`,`${this.component.name}-edit-${this.name}`]},editGroup:this.name,isSortable:this.name==="options",content:this.editPanelItems};return V.create(i)}updateProps(){const e=this.createProps();this.props.replaceWith(e),this.props=e}createEditButtons(){const e=this.name,i={attrs:this.addAttribute,options:this.addOption,conditions:this.addCondition,config:this.addConfiguration},t=[];if(e==="conditions"){Z.current&&!Z.current.clearAll&&Z.put("clearAll","Clear All");const f={...V.btnTemplate({content:[V.icon("bin"),Z.get("clearAll")],title:Z.get("clearAll")}),className:`clear-all-${e}`,action:{click:()=>{this.clearAllItems()}}};t.push(f)}const n=Z.get(`panelEditButtons.${e}`)||`+ Add ${je(e)}`,m={...V.btnTemplate({content:n,title:n}),className:`add-${e}`,action:{click:f=>{const g={btnCoords:V.coords(f.target),addAction:i[e]};e==="attrs"&&(g.isDisabled=this.component.isDisabledProp,g.isLocked=this.component.isLockedProp,g.message={attr:Z.get(`action.add.${e}.attr`),value:Z.get(`action.add.${e}.value`)});const c=je(e),o=new globalThis.CustomEvent(`onAdd${c}`,{detail:g});ge.add[e](g),document.dispatchEvent(o)}}};return t.push(m),{className:"panel-action-buttons",content:t}}addAttribute=(e,i)=>{let t=i;const n=Bo(e),m=`attrs.${n}`;Z.current[m]||Z.put(m,jo(e)),typeof t=="string"&&["true","false"].includes(t)&&(t=JSON.parse(t)),this.component.set(`attrs.${e}`,t),$d[n]?.(t,this.component);const f=this.props.querySelector(`.${this.component.name}-attrs-${n}`),g=new Rt({key:m,data:{[n]:t},field:this.component,panel:this});f?f.replaceWith(g.dom):this.props.appendChild(g.dom),this.component.resizePanelWrap()};addOption=()=>{const e=this.component.data.config.controlId,i=this.component.get("options"),t=e==="select"?"option":e,n=Z.get("newOptionLabel",{type:t})||"New Option",m=`${this.name}[${this.data.length}]`,f=i[i.length-1],g={...i.length?f:{},label:n};e!=="button"&&(g.value=xo(n));const c=new Rt({key:m,data:g,field:this.component,index:this.props.children.length,panel:this});this.editPanelItems.push(c),this.props.appendChild(c.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()};addCondition=e=>{const i=`conditions[${this.component.get("conditions").length}]`,t=new Rt({key:i,data:e.template,field:this.component,panel:this});this.props.appendChild(t.dom),this.component.set(i,e.template),this.component.resizePanelWrap()};addConfiguration=()=>{const e=this.component.get("config");new yd({className:"config-item-dialog",content:[{tag:"select",config:{label:Z.get("selectConfigKey")||"Select Configuration Key"},attrs:{name:"selectConfigKey",required:!0,className:"config-key-select"},options:Ld.filter(i=>!(i.value in e))}],onConfirm:i=>{const t=i.get("selectConfigKey").trim(),n=`config.${t}`;if(t){const m=new Rt({key:n,data:Rd[t],field:this.component,panel:this});this.editPanelItems.push(m),this.props.appendChild(m.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()}}}).open()};clearAllItems=()=>{const e=this.type==="array"?[]:{},i={type:this.name,removeAction:()=>{this.component.set(this.name,e),this.updateProps()}};ge.remove[this.name](i);const t=je(this.name),n=new globalThis.CustomEvent(`onRemove${t}`,{detail:i});document.dispatchEvent(n)};setData(e){this.data=e,this.component.set(this.name,e),this.updateProps()}},Rr=Object.freeze({type:"field",displayType:"slider"}),Jt=e=>({transform:`translateX(${e?`${e}px`:0})`}),is=class{constructor(e){this.opts=De(Rr,e),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const i=this.createPanelsWrap();this.nav=this.navActions(),this.nav.groupChange(this.activePanelIndex);const t=new window.ResizeObserver(([{contentRect:{width:m}}])=>{this.currentWidth!==m&&(this.toggleTabbedLayout(),this.currentWidth=m,this.nav.setTranslateX(this.activePanelIndex,!1))}),n=window.setTimeout(()=>{t.observe(i),window.clearTimeout(n)},zn)}getPanelDisplay(){const e=this.panelsWrap,i=Number.parseInt(V.getStyle(e,"width"),10)>390?"tabbed":"slider",t=this.opts.displayType==="auto";return this.panelDisplay=t?i:this.opts.displayType||Rr.displayType,this.panelDisplay}toggleTabbedLayout=()=>{this.getPanelDisplay();const e=this.isTabbed;return this.panelsWrap.parentElement?.classList.toggle("tabbed-panels",e),e&&this.panelNav.removeAttribute("style"),e};resizePanels=()=>{this.toggleTabbedLayout()};createPanelsWrap(){const e=V.create({className:"panels",content:this.opts.panels.map(({config:i,...t})=>t)});return this.opts.type==="field"&&this.sortableProperties(e),this.panelsWrap=e,this.panels=e.children,this.currentPanel=this.panels[this.activePanelIndex],e}sortableProperties(e){const i=e.getElementsByClassName("field-edit-group");return Ae.forEach(i,t=>{t.fieldId=this.opts.id,t.isSortable&&J.create(t,{animation:150,group:{name:`edit-${t.editGroup}`,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:n=>{this.propertySave(n.to),this.resizePanels()}})})}createPanelNavLabels(){const e=this.opts.panels.map(n=>({tag:"h5",action:{click:m=>{const f=Je(m.target);this.nav.setTranslateX(f,!1),this.nav.groupChange(f)}},content:n.config.label})),i={className:"panel-labels",content:{content:e}},[t]=e;return t.className="active-tab",V.create(i)}createPanelNav(){this.labels=this.createPanelNavLabels();const e={tag:"button",attrs:{className:"next-group",title:Z.get("controlGroups.nextGroup"),type:"button"},action:{click:t=>this.nav.nextGroup(t)},content:V.icon("triangle-right")},i={tag:"button",attrs:{className:"prev-group",title:Z.get("controlGroups.prevGroup"),type:"button"},action:{click:t=>this.nav.prevGroup(t)},content:V.icon("triangle-left")};return V.create({tag:"nav",attrs:{className:"panel-nav"},content:[i,this.labels,e]})}get isTabbed(){return this.panelDisplay==="tabbed"}navActions(){const e={},i=this.currentPanel.parentElement,t=this.labels.firstChild,n=t.children,m=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Je(this.currentPanel);let f={nav:0,panel:0},g={...f};e.groupChange=h=>(this.activePanelIndex=h,this.currentPanel=m[h],V.removeClasses(m,"active-panel"),V.removeClasses(n,"active-tab"),this.currentPanel.classList.add("active-panel"),n[h].classList.add("active-tab"),this.currentPanel);const c=h=>({nav:-t.offsetWidth*h,panel:-i.offsetWidth*h}),o=({offset:h,reset:u,duration:d=at,animate:l=!this.isTabbed})=>{const s=[Jt(g.panel),Jt(h.panel)],r=[Jt(g.nav),Jt(this.isTabbed?0:h.nav)];if(u){const[y]=s,[k]=r;s.push(y),r.push(k)}const a={easing:"ease-in-out",duration:l?d:0,fill:"forwards"},p=i.animate(s,a);t.animate(r,a);const v=()=>{p.removeEventListener("finish",v),u||(g=h)};p.addEventListener("finish",v)};return e.setTranslateX=(h=this.activePanelIndex,u=!0)=>{f=c(h),o({offset:f,animate:u})},e.refresh=(h=this.activePanelIndex)=>{this.activePanelIndex!==h&&e.groupChange(h),e.setTranslateX(this.activePanelIndex,!1),this.resizePanels()},e.nextGroup=()=>{const h=this.activePanelIndex+1;if(h!==m.length){const u=m[h];f={nav:-t.offsetWidth*h,panel:-u.offsetLeft},o({offset:f}),e.groupChange(h)}else f={nav:g.nav-8,panel:g.panel-8},o({offset:f,reset:!0});return this.currentPanel},e.prevGroup=()=>{if(this.activePanelIndex!==0){const h=this.activePanelIndex-1,u=m[h];f={nav:-t.offsetWidth*h,panel:-u.offsetLeft},o({offset:f}),e.groupChange(h)}else f={nav:8,panel:8},o({offset:f,reset:!0})},e}},Od="modulepreload",Id=function(e){return"/formeo/"+e},_r={},vt=function(i,t,n){let m=Promise.resolve();if(t&&t.length>0){let h=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const g=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),o=c?.nonce||c?.getAttribute("nonce");m=h(t.map(u=>{if(u=Id(u,n),u in _r)return;_r[u]=!0;const d=u.endsWith(".css"),l=d?'[rel="stylesheet"]':"";if(n)for(let r=g.length-1;r>=0;r--){const a=g[r];if(a.href===u&&(!d||a.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${l}`))return;const s=document.createElement("link");if(s.rel=d?"stylesheet":Od,d||(s.as="script"),s.crossOrigin="",s.href=u,o&&s.setAttribute("nonce",o),document.head.appendChild(s),d)return new Promise((r,a)=>{s.addEventListener("load",r),s.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${u}`)))})}))}function f(g){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=g,window.dispatchEvent(c),!c.defaultPrevented)throw g}return m.then(g=>{for(const c of g||[])c.status==="rejected"&&f(c.reason);return i().catch(f)})},nn=null,rn=ri(ni),Fi=class extends qn{constructor(e,i={}){const t={...i,id:i.id||Me()};super(e,t),this.id=t.id,this.shortId=this.id.slice(0,this.id.indexOf("-")),this.name=e,this.indexName=`${e}s`,this.config={...t.config,...oe[`${this.name}s`].config},this.address=`${this.name}s.${this.id}`,this.dataPath=`${this.address}.`,this.editPanels=new Map,this.eventListeners=new Map,this.initEventHandlers()}initEventHandlers(){this.config.events&&Object.entries(this.config.events).forEach(([e,i])=>{this.addEventListener(e,i)})}addEventListener(e,i){this.eventListeners.has(e)||this.eventListeners.set(e,[]),this.eventListeners.get(e).push(i)}removeEventListener(e,i){if(!this.eventListeners?.has(e))return;const t=this.eventListeners.get(e),n=t.indexOf(i);n>-1&&t.splice(n,1)}dispatchComponentEvent(e,i={}){const t={component:this,target:this,type:e,timestamp:Date.now(),...i};return this.eventListeners?.has(e)&&this.eventListeners.get(e).forEach(n=>{try{typeof n=="function"&&n(t)}catch(m){console.error(`Error in ${e} event handler for ${this.name} ${this.id}:`,m)}}),t}set(e,i){const t=this.get(e),n=super.set(e,i);return t!==i&&this.dom&&this.dispatchComponentEvent("onUpdate",{path:e,oldValue:t,newValue:i}),n}get js(){return this.data}get json(){return this.data}remove=e=>{if(e){const m=lt(e),f=m.pop(),g=this.get(m);return Array.isArray(g)?Wo(f)?g.splice(Number(f),1):this.set(m,g.filter(c=>c!==f)):delete g[f],g}if(this.name==="stage")return null;const i=this.parent,t=this.children;this.dispatchComponentEvent("onRemove",{path:e,parent:i,children:[...t]}),Ni(t,m=>m.remove()),this.dom.remove(),Xa(oe.getAddress(`${i.name}s.${i.id}.children`),this.id),i.children.length||i.emptyClass(),i.name==="row"&&i.autoColumnWidths();const n={row:jn,column:Vn,field:Un}[this.name];return n&&Q.formeoUpdated({componentId:this.id,componentType:this.name,parent:i},n),oe[`${this.name}s`].delete(this.id)};empty(){const e=this.children.map(i=>(i.remove(),i));return this.dom.classList.add("empty"),e}emptyClass=()=>this.dom.classList.toggle("empty",!this.children.length);getActionButtons(){const e=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:()=>{oe.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...e)},mouseleave:({target:i})=>{this.dom.classList.remove(...e),oe.stages.active.dom.classList.remove(`active-hover-${this.name}`),i.removeAttribute("style")}},children:[{...V.btnTemplate({content:V.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}getComponentTag=()=>V.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[V.icon(`handle-${this.name}`),je(this.name)].filter(Boolean)});toggleEdit(e=!this.isEditing){this.isEditing=e;const i=this.dom,t="editing",n=`${t}-${this.name}`,m=this.dom.querySelector(`.${this.name}-edit`);me.slideToggle(m,333,e),this.name==="field"&&(me.slideToggle(this.preview,333,!e),i.parentElement.classList.toggle(`column-${n}`,e)),i.classList.toggle(t,e),i.classList.toggle(n,e)}get buttons(){if(this.actionButtons)return this.actionButtons;const e={handle:(m=`handle-${this.name}`)=>({...V.btnTemplate({content:V.icon(m)}),className:["component-handle"]}),move:(m="move")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-move"],meta:{id:"move"}}),edit:(m="edit")=>({...V.btnTemplate({content:V.icon(m)}),className:["edit-toggle"],meta:{id:"edit"},action:{click:()=>{this.toggleEdit()}}}),remove:(m="remove")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-remove"],meta:{id:"remove"},action:{click:()=>{me.slideUp(this.dom,333,()=>{this.name==="column"?(this.parent.autoColumnWidths(),this.remove()):this.remove()})}}}),clone:(m="copy")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),this.name==="column"&&this.parent.autoColumnWidths()}}})},{buttons:i,disabled:t}=this.config.actionButtons,n=i.filter(m=>!t.includes(m)).map(m=>e[m]?.()||m);return this.actionButtons=n,this.actionButtons}get index(){return Je(this.dom)}removeClasses=e=>{const i={string:()=>this.dom.classList.remove(e),array:()=>e.map(t=>this.dom.classList.remove(t))};return i.object=i.string,i[V.childType(e)](this.dom)};get parentType(){return gl.get(this.name)}get parent(){const e=this.parentType;if(!this.dom||!e)return null;const i=this.dom.closest(`.${Nn[e]}`);return i&&V.asComponent(i)}get children(){if(!this.dom)return[];const e=this.domChildren,i=dr.get(this.name);return Jn(e,t=>oe.getAddress(`${i}s.${t.id}`)).filter(Boolean)}loadChildren=(e=this.data.children)=>e.map(i=>this.addChild({id:i}));get domChildren(){const e=this.dom.querySelector(".children");return e?e.children:[]}addChild(e={},i=this.domChildren.length){let t=e;typeof e!="object"&&(t={id:t});const n=this.dom.querySelector(".children"),{id:m=Me()}=t,f=dr.get(this.name);if(!f)return null;const g=`${f}s`,c=oe.getAddress(`${g}.${m}`)||oe[g].add(m,t);i>=n.children.length?n.appendChild(c.dom):n.children[i].before(c.dom),this.dispatchComponentEvent("onAddChild",{parent:this,target:c,child:c,index:i}),c.dispatchComponentEvent("onAdd",{parent:this,target:c,index:i,addedVia:"addChild"}),this.config.events?.onAddChild?.({parent:this,child:c});const o=c.get("children");return o?.length&&c.loadChildren(o),this.removeClasses("empty"),this.saveChildOrder(),c}saveChildOrder=()=>{if(this.render)return;const e=this.children.map(({id:i})=>i);return this.set("children",e),e};onAdd({from:e,to:i,item:t,newIndex:n}){e.classList.contains("control-group")||(e=e.parentElement);const m=be(e),f=be(i.parentElement),g=()=>{this.saveChildOrder(),this.removeClasses("empty")},c=new Map([[-2,()=>{const h=this.addChild({},n).addChild();return h.addChild.bind(h)}],[-1,()=>{const h=this.addChild({},n);return h.addChild.bind(h)}],[0,()=>this.addChild.bind(this)],[1,h=>{const u=Je(this.dom);return()=>this.parent.addChild(h,u+1)}],[2,h=>()=>this.parent.parent.addChild(h)]]),o={controls:async()=>{if(!nn){const{default:r}=await vt(async()=>{const{default:a}=await Promise.resolve().then(()=>Zd);return{default:a}},void 0);nn=r}const{controlData:{meta:{id:h},...u}}=nn.get(t.id);Oi(u,"config.controlId",h);const d=h.startsWith("layout-")?h.replace(/^layout-/,""):"field",l=we({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${this.name}.${d}`),s=c.get(l)();return V.remove(t),s(u,n)},row:()=>(c.get({stage:-1,row:0,column:1}[f])||un)()?.({id:t.id},n),column:()=>(c.get({stage:-2,row:-1}[f])||un)()?.(t.id)}[m]?.(t,n);return this.dispatchComponentEvent("onAdd",{from:e,to:i,item:t,newIndex:n,fromType:m,toType:f,addedComponent:o,addedVia:"dragDrop"}),g(),o}onSort=()=>this.saveChildOrder();onRemove({from:{parentElement:e}}){return e.classList.contains(Ge)&&e.classList.remove("column-editing-field"),this.name!=="stage"&&!this.children.length?this.remove():(this.emptyClass(),this.saveChildOrder())}onEnd=({to:{parentElement:e},from:{parentElement:i}})=>{e?.classList.remove(`hovering-${be(e)}`),i?.classList.remove(`hovering-${be(i)}`)};onRender(){this.dispatchComponentEvent("onRender",{dom:this.dom});const{events:e}=this.config;if(!e)return null;e.onRender&&V.onRender(this.dom,e.onRender)}set config(e){const i=we(e,"all"),t=we(this.data,"config.controlId"),n=[i,t&&we(e,t),we(e,this.id)].reduce((m,f)=>f?De(m,f):m,this.configVal);this.configVal=n}get config(){return this.configVal}runConditions=()=>{const e=this.get("conditions");return e?.length?e.map(i=>{const t=this.processConditions(i.if),n=this.processResults(i.then);return t.map(m=>this.evaluateConditions(m)&&this.execResults(n))}):null};getComponent(e){const[i,t]=e.split("."),n=oe[i];return t===this.id?this:n?.get(t)}value=(e,i)=>{const t=e.split("."),n=this.getComponent(e),m=n&&t.slice(2,t.length).join(".");return[!n,!m,!rn[m]].some(Boolean)?e:i?n.set(rn[m],i):n.get(rn[m])};getResult=e=>({"=":(i,t,n)=>i.set(t,n)})[e];processResults=e=>e.map(({operator:i,target:t,value:n})=>{const m=this.getComponent(t);return{target:m,propertyPath:m&&t.split(".").slice(2,t.length).join("."),action:this.getResult(i),value:this.value(n)}});execResults=e=>{const i=e.map(t=>this.execResult(t));return Promise.all(i)};execResult=({target:e,action:i,value:t,_propertyPath:n})=>new Promise((m,f)=>{try{return m(i(e,t))}catch(g){return f(g)}});cloneData=()=>{const e={...He(this.data),id:Me()};return this.name!=="field"&&(e.children=[]),e};clone=(e=this.parent)=>{const i=e.addChild(this.cloneData(),this.index+1);return this.name!=="field"&&this.cloneChildren(i),this.dispatchComponentEvent("onClone",{original:this,clone:i,parent:e}),i};cloneChildren(e){for(const i of this.children)i?.clone(e)}createChildWrap=e=>V.create({tag:"ul",attrs:{className:"children"},children:e});get isRow(){return this.name===Hi.row}get isColumn(){return this.name===Hi.column}get isField(){return this.name===Hi.field}isDisabledProp=(e,i="attrs")=>{if(we(this.config,e))return!1;if((this.config?.disabled||[]).includes(e))return!0;const t=mi(e);return(this.config?.panels[i]?.disabled||[]).includes(t)};isLockedProp=(e,i="attrs")=>{if((this.config?.locked||[]).includes(e))return!0;const t=mi(e);return!!(this.config?.panels[i]?.locked||[]).includes(t)};get editWindow(){const e={className:["component-edit",`${this.name}-edit`,"slide-toggle","formeo-panels-wrap"]},i=this.editPanels.size;return i&&(e.className.push(`panel-count-${i}`),e.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh),e.action={onRender:()=>{if(i===0){const t=this.dom.querySelector(".edit-toggle"),n=this.dom.querySelector(`.${this.name}-actions`),m=n.getElementsByTagName("button");n.style.maxWidth=`${m.length*m[0].clientWidth}px`,V.remove(t)}else this.resizePanelWrap()}},V.create(e)}updateEditPanels=()=>{if(!this.config)return null;const e=new Set(["object","array"]),i=st([...this.config.panels.order,...Object.keys(this.data)]),t=new Set(["children","meta","action","events",...this.config.panels.disabled]),n=i.filter(f=>!t.has(f));for(const f of n){const g=this.get(f),c=V.childType(g);if(e.has(c)){const o=new _d(g,f,this);this.editPanels.set(o.name,o)}}const m={panels:Array.from(this.editPanels.values()).map(({panelConfig:f})=>f),id:this.id,displayType:"auto"};this.panels=new is(m),this.dom&&(this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav),this.dom.querySelector(".panels").replaceWith(this.panels.panelsWrap))}},Dd=class{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(e){const i=e.querySelector(".children");if(!i)return 0;const t=i.children.length,n=V.getStyle(i,"gap")||"0px",m=parseFloat(n,10)||0;return this.totalGapWidth=m*(t-1),i.offsetWidth-this.totalGapWidth}validateResizeTarget(e,i){return e&&i&&e.offsetWidth&&i.offsetWidth}onStart(e){if(e.preventDefault(),this.resized=!1,e.button!==0)return;const i=e.target.parentElement,t=i.nextSibling||i.previousSibling,n=i.closest(`.${Ue}`);if(!this.validateResizeTarget(i,t)){console.warn("Invalid resize targets"),this.cleanup();return}if(this.startX=e.type==="touchstart"?e.touches[0].clientX:e.clientX,n.classList.add(Pi),this.columnPreset=n.querySelector(`.${co}`),this.originalColumnClass=i.className,this.originalSiblingClass=t.className,i.className=i.className.replace(fn,""),t.className=t.className.replace(fn,""),this.colStartWidth=i.offsetWidth,this.sibStartWidth=t.offsetWidth,this.rowWidth=this.getRowWidth(n),this.rowWidth<=0){console.warn("Invalid row width calculated"),this.cleanup();return}this.column=i,this.sibling=t,this.row=n;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(m){console.error("Failed to initialize resize listeners:",m),this.cleanup()}}calculateNewWidths(e){const i=this.colStartWidth+e-this.startX,t=this.sibStartWidth-e+this.startX,n=parseFloat(zi(i,this.rowWidth)),m=parseFloat(zi(t,this.rowWidth));return n<10||m<10?null:{colWidth:dn(n.toFixed(1)),siblingColWidth:dn(m.toFixed(1))}}onMove(e){e.preventDefault();const{column:i,sibling:t}=this,n=e.type==="touchmove"?e.touches[0].clientX:e.clientX,m=this.calculateNewWidths(n);if(!m)return;const{colWidth:f,siblingColWidth:g}=m;i.dataset.colWidth=f,t.dataset.colWidth=g,i.style.width=f,t.style.width=g,this.resized=!0}onStop(){const{column:e,sibling:i}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),oe.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),oe.setAddress(`columns.${i.id}.config.width`,i.dataset.colWidth),this.row.classList.remove(Pi),this.resized=!1,this.cleanup())}cleanup(){this.column&&this.originalColumnClass&&(this.column.className=this.originalColumnClass),this.sibling&&this.originalSiblingClass&&(this.sibling.className=this.originalSiblingClass),this.row&&this.row.classList.remove(Pi),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const e=this.columnPreset;let i=e.querySelector(`.${pn}`);const t=this.row.querySelector(".children").children,n=Jn(t,g=>zi(g.clientWidth,this.rowWidth).toFixed(1)),m=n.join(","),f=n.join(" | ");return i||(i=V.create({tag:"option",attrs:{className:pn,value:m,selected:!0},content:f}),e.append(i)),i.value=m,i.textContent=f,m}},Nd=()=>Object.freeze({config:{width:"100%"},children:[],className:[Ge]}),Or={resizeHandle:e=>({className:"resize-x-handle",action:{pointerdown:e.onStart.bind(e)},content:[V.icon("triangle-down"),V.icon("triangle-up")]}),editWindow:()=>({className:"column-edit group-config"})},Fd=class extends Fi{constructor(e){super("column",{...Nd(),...e});const i=this.createChildWrap();this.dom=V.create({tag:"li",className:[Ge,"empty"],dataset:{hoverTag:Z.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),Or.editWindow(),Or.resizeHandle(new Dd),i]}),this.processConfig(),Q.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),J.create(i,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:t=>{t.from!==t.to&&t.from.classList.remove("hovering-column")},draggable:`.${Tt}`,handle:".item-move"})}processConfig(){const e=Ae.get(this.data,"config.width");e&&this.setDomWidth(e)}refreshFieldPanels=()=>{for(const e of this.children)e.panels.nav.refresh()};setDomWidth=e=>{this.dom.dataset.colWidth=e,this.dom.style.width=e};setWidth=e=>(this.setDomWidth(e),this.set("config.width",e))},zd={actionButtons:{buttons:["clone","move","remove"],disabled:[]}},Pd=class extends Ii{constructor(e){super("columns",e),this.config={all:zd}}Component(e){return new Fd(e)}},ns=new Pd,Hd=()=>Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[Ue]}),Wd=class extends Fi{constructor(e){super("row",{...Hd(),...e});const i=this.createChildWrap();this.dom=V.create({tag:"li",className:[Ue,"empty"],dataset:{hoverTag:Z.get("row"),editingHoverTag:Z.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,i]}),J.create(i,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),draggable:`.${Ge}`,handle:".item-move"})}get editWindow(){const e={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:Z.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:c}})=>{this.set("config.fieldset",!!c)}},config:{label:Z.get("row.settings.fieldsetWrap")}},i={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:Z.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:c}})=>this.set("config.inputGroup",c)},config:{label:Z.get("row.makeInputGroup"),description:Z.get("row.makeInputGroupDesc")}},t={className:"input-group",content:{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:this.get("config.legend"),placeholder:"Title"},config:{label:{children:["Row Title",{tag:"span",content:" ⓘ",dataset:{tooltip:"Row title will be used as the legend for the fieldset"}}]}},action:{input:({target:{value:c}})=>this.set("config.legend",c)},className:""}},n=V.formGroup([e,t]),m={tag:"label",content:Z.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=V.create(this.columnPresetControlConfig);const f={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},g=[i,"hr",n,"hr",V.formGroup([m,f],"row")];return V.create({className:`${this.name}-edit group-config`,action:{onRender:c=>{const o=g.map(h=>V.create(h));c.append(...o)}}})}onAdd(...e){super.onAdd(...e),this.autoColumnWidths()}onRemove(...e){super.onRemove(...e),this.autoColumnWidths()}autoColumnWidths=()=>{const e=this.children;if(!e.length)return;const i=Number.parseFloat((100/e.length).toFixed(1))/1;for(const t of e){t.removeClasses(fn);const n=t.dom,m=dn(i);t.set("config.width",m),n.style.width=m,n.dataset.colWidth=m;const f=setTimeout(()=>{clearTimeout(f),t.refreshFieldPanels()},at);document.dispatchEvent(Q.columnResized)}this.updateColumnPreset()};updateColumnPreset=()=>{this.columnPresetControl.innerHTML="";const e=this.getColumnPresetOptions.map(({label:i,...t})=>V.create({tag:"option",content:i,attrs:t}));this.columnPresetControl.append(...e)};setColumnWidths=e=>{typeof e=="string"&&(e=e.split(",")),this.children.forEach((i,t)=>{i.setWidth(`${e[t]}%`),i.refreshFieldPanels()})};get getColumnPresetOptions(){const e=this.children,i=vl.get(e.length-1)||[],t=e.map(n=>{const m=n.get("config.width")||"";return Number(m.replace("%","")).toFixed(1)}).join(",");if(i.length){const n=i.slice();return n.find(m=>m.value===t)||n.push({value:t,label:t.replace(/,/g," | "),className:pn}),n.map(m=>{const f={...m};return f.selected=m.value===t,f})}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:Z.get("defineColumnLayout"),className:co},action:{change:({target:e})=>{const{value:i}=e;this.setColumnWidths(i)}},options:this.getColumnPresetOptions}}},Bd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}},jd=class extends Ii{constructor(e){super("rows",e),this.config={all:Bd}}Component(e){return new Wd(e)}},ir=new jd,Vd=()=>({conditions:[Gn()],children:[]}),Ud=class extends Fi{constructor(e){super("stage",{...Vd(),...e}),this.updateEditPanels(),this.debouncedUpdateEditPanels=fi(this.updateEditPanels),Z.get("Untitled Form"),Z.get("Untitled Form"),Z.get("Form Title"),Z.get("Form novalidate"),Z.get("Tags");const i=this.createChildWrap();this.dom=V.create({attrs:{className:[kt,"empty"],id:this.id},children:[this.getComponentTag(),this.getActionButtons(),this.editWindow,i]}),J.create(i,{animation:150,fallbackClass:"row-moving",group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>{Bt.active=this},onSort:this.onSort.bind(this),draggable:`.${Ue}`,handle:".item-move"})}empty(e=!0){return new Promise(i=>{e?(this.dom.classList.add("removing-all-fields"),me.slideUp(this.dom,333,()=>{i(super.empty(e)),this.dom.classList.remove("removing-all-fields"),me.slideDown(this.dom,333)})):i(super.empty())})}onAdd(...e){const i=super.onAdd(...e);i?.name==="column"&&i.parent.autoColumnWidths()}},Gd=()=>({actionButtons:{buttons:["edit"],disabled:[]},panels:{disabled:[],order:["attrs","options","conditions"]}}),Kd=class extends Ii{constructor(e){super("stages",e),this.config={all:Gd()}}Component(e){return new Ud(e)}},Bt=new Kd,qd=class{controlCache=new Set;constructor({events:e={},dependencies:i={},controlAction:t,...n}){this.events=e,this.controlData=n,this.controlAction=t,this.dependencies=i,this.id=n.id||Me()}get controlId(){return this.controlData.meta?.id||this.controlData.config?.controlId}get dom(){const{meta:e,config:i}=this.controlData,t=this.i18n(i.label)||i.label,n={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:V.icon(e.icon)},{tag:"span",className:"control-label",content:t}],action:{focus:({target:m})=>{const f=m.closest(`.${ot}`);return f&&ct.panels.nav.refresh(Je(f))},click:({target:m})=>{const f=m.closest(".field-control")?.id;f&&ct.addElement(f)}}};return V.create({tag:"li",id:this.id,className:["field-control",`${e.group}-control`,`${e.id}-control`],content:n,meta:e,action:this.controlAction})}promise(){return Go(this.dependencies)}i18n(e,i){const t=Z.locale,n=this.definition?.i18n?.[t]||{};return(n[e]?.()??n[e])||Z.get(e,i)}},Yd=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}}),Zd=Sn({Controls:()=>rs,default:()=>ct}),rs=class{constructor(){this.data=new Map,this.buttonActions={focus:({target:e})=>{const i=e.closest(`.${ot}`);return i&&this.panels.nav.refresh(Je(i))},click:({target:e})=>{this.addElement(e.parentElement.id)}}}async init(e,i=!1){return await this.applyOptions(e),this.buildDOM(i),this}registerControls(e){return this.controls=[],e.map(i=>{const t=typeof i=="function"?new i:new qd(i);return this.add(t),this.controls.push(t.dom),t.promise()})}groupLabel=e=>Z.get(e)||e||"";groupElements(){let e=this.options.groups.slice(),i=this.controls.slice(),t=[];const n=[];return e=Si(e,this.groupOrder,"id"),e=e.filter(m=>cr(m.id,this.options.disable.groups)),t=e.map(m=>{const f={tag:"ul",attrs:{className:[ot,lo],id:`${m.id}-${ot}`},config:{label:this.groupLabel(m.label)}};if(this.options.elementOrder[m.id]){const g=this.options.elementOrder[m.id];m.elementOrder=st(g.concat(m.elementOrder))}return i=Si(i,m.elementOrder,"meta.id"),f.content=i.filter(g=>{const{controlData:c}=this.get(g.id),o=c.meta.id||"",h=[cr(o,this.options.disable.elements),c.meta.group===m.id,!n.includes(o)];let u=!0;return u=h.every(d=>d===!0),u&&n.push(o),u}),f}),t}add(e=Object.create(null)){const i=He(e);return this.data.set(i.id,i),i.controlData.meta.id&&this.data.set(i.controlData.meta.id,i.controlData),i}get(e){return He(this.data.get(e))}formActions(){if(this.options.disable.formActions===!0)return null;const e={...V.btnTemplate({content:[V.icon("bin"),Z.get("clear")],title:Z.get("clearAll")}),className:["clear-form"],action:{click:t=>{ir.size?(Q.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:Z.get("confirmClearAll"),clearAllAction:()=>{Bt.clearAll().then(()=>{const n={src:t.target};Q.formeoCleared(n)})},btnCoords:V.coords(t.target)}}),document.dispatchEvent(Q.confirmClearAll)):window.alert(Z.get("cannotClearFields"))}}},i={...V.btnTemplate({content:[V.icon("floppy-disk"),Z.get("save")],title:Z.get("save")}),className:["save-form"],action:{click:async({target:t})=>{const{default:n}=await vt(async()=>{const{default:g}=await Promise.resolve().then(()=>iu);return{default:g}},void 0),{formData:m}=n,f={action:()=>{},coords:V.coords(t),message:"",button:t};return ge.click.btn(f),ge.save.form(m)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:e,saveBtn:i}).reduce((t,[n,m])=>(this.options.disable.formActions.includes(n)||t.push(m),t),[])}}buildDOM(e){const i=this.groupElements(),t=this.formActions(),{displayType:n}=this.options.panels;this.panels=new is({panels:i,type:"controls",displayType:n});const m=["control-groups","formeo-panels-wrap",`panel-count-${i.length}`],f=V.create({className:m,content:[this.panels.panelNav,this.panels.panelsWrap]}),g=["formeo-controls"];e&&g.push("formeo-sticky");const c=V.create({className:g,content:[f,t]}),o=c.getElementsByClassName("control-group");this.dom=c,this.groups=o;const[h]=o;this.currentGroup=h,this.actions={filter:u=>{const d=u!=="",l=this.controls;let s=f.querySelector(".filtered-term");if(V.toggleElementsByStr(l,u),d){const r=Z.get("controls.filteringTerm",u);c.classList.add("filtered"),s?s.textContent=r:(s=V.create({tag:"h5",className:"filtered-term",content:r}),f.insertBefore(s,f.firstChild))}else s&&(c.classList.remove("filtered"),s.remove())},addElement:this.addElement,addGroup:u=>console.log(u)};for(let u=o.length-1;u>=0;u--){const d=`formeo-controls-${o[u]}`;this.options.sortable||globalThis.localStorage.removeItem(d),J.create(o[u],{animation:150,fallbackClass:"control-moving",fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,group:{name:"controls",pull:"clone",put:!1,revertClone:!0},onClone:({clone:l,item:s})=>{if(l.id=s.id,this.options.ghostPreview){const{controlData:r}=this.get(s.id);vt(async()=>{const{default:a}=await Promise.resolve().then(()=>Qd);return{default:a}},void 0).then(({default:a})=>{l.innerHTML="",l.appendChild(new a(r).preview)})}},onStart:()=>{this.originalDocumentOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"},onEnd:()=>{document.documentElement.style.overflow=this.originalDocumentOverflow,this.originalDocumentOverflow=null},sort:this.options.sortable,store:{get:()=>{const l=globalThis.localStorage.getItem(d);return l?l.split("|"):[]},set:l=>{const s=l.toArray();globalThis.localStorage.setItem(d,s.join("|"))}}})}return c}layoutTypes={row:()=>Bt.active.addChild(),column:()=>this.layoutTypes.row().addChild(),field:e=>this.layoutTypes.column().addChild(e)};addElement=e=>{const{meta:{group:i,id:t},...n}=we(this.get(e),"controlData");return Oi(n,"config.controlId",t),i==="layout"?this.layoutTypes[t.replace("layout-","")]():this.layoutTypes.field(n)};applyOptions=async(e={})=>{const{container:i,elements:t,groupOrder:n,...m}=De(Yd,e);this.container=i,this.groupOrder=st(n.concat(["common","html","layout"])),this.options=m;const[f,g,c]=await Promise.all([vt(()=>import("./layout.min.js"),[]),vt(()=>import("./form.min.js"),[]),vt(()=>import("./html.min.js"),[])]),o=[f.default,g.default,c.default].flat();return Promise.all(this.registerControls([...o,...t]))}},ct=new rs,Qd=Sn({default:()=>os}),Xd=new Set(["checkbox","radio"]),Jd=new Set(["radio","checkbox","select-one","select-multiple"]),os=class extends Fi{constructor(e=Object.create(null)){super("field",e),this.debouncedUpdateEditPanels=fi(this.updateEditPanels),this.debouncedUpdatePreview=fi(this.updatePreview),this.label=V.create(this.labelConfig),this.preview=this.fieldPreview(),this.controlId=this.get("config.controlId")||this.get("meta.id");const i=this.getActionButtons(),t=this.actionButtons.some(m=>m.meta?.id==="edit");this.updateEditPanels();const n=V.create({tag:"li",attrs:{className:Tt},id:this.id,children:[this.label,this.getComponentTag(),i,t&&this.editWindow,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:Z.get("field")}});this.dom=n,this.isEditing=!1}get labelConfig(){if(this.get("config.hideLabel"))return null;const{label:e,editorLabel:i,disableHtmlLabel:t,helpText:n,tooltip:m}=this.get("config"),{required:f}=this.get("attrs")||{},g=i||e,c={tag:"label",attrs:{}};return t?(c.tag="input",c.attrs.value=g):(c.attrs.contenteditable=!0,c.children=g),{className:"prev-label",children:[{...c,action:{input:({target:{innerHTML:o,value:h}})=>{const u=t?h:o;super.set("config.label",u);const d=this.dom.querySelector(".config-label");d&&(d.value=u)}}},f&&V.requiredMark(),m&&V.tooltip(m),n&&V.helpText(n)]}}setData=(e,i)=>super.set(e,i);set(e,i){return this.setData(e,i)}updateLabel(){const e=V.create(this.labelConfig);(this.label||!e)&&this.label.remove(),e&&(this.data.config?.labelAfter?this.dom.append(e):this.dom.prepend(e)),this.label=e}updatePreview=()=>{this.updateLabel();const e=this.fieldPreview();this.preview.replaceWith(e),this.preview=e};get defaultPreviewActions(){return{change:e=>{const{target:i}=e,{type:t}=i;if(Jd.has(t)){const n=this.preview.querySelectorAll(":checked"),m=this.get("options"),f=m?.[0]?.selected===void 0?"checked":"selected",g=m.reduce((c,o)=>(c[o.value]=o,c[o.value][f]=!1,c),{});for(const c of n)g[c.value][f]=c.value===g[c.value].value;return super.set("options",Object.values(g)),this.debouncedUpdateEditPanels()}},click:e=>{e.target.contentEditable==="true"&&e.preventDefault()},input:({target:e})=>{if(["input","meter","progress","button"].includes(e.tagName.toLowerCase()))return super.set("attrs.value",e.value),this.debouncedUpdateEditPanels();if(e.contentEditable&&!e.type?.startsWith("select-")){const i=e.parentElement.classList;if(i.contains("f-checkbox")||i.contains("f-radio")){const t=e.parentElement,n=Je(t);return this.setData(`options[${n}].label`,e.innerHTML),this.debouncedUpdateEditPanels()}this.setData("content",e.innerHTML||e.value)}}}}fieldPreview(){const{action:e={},...i}=He(this.data);i.id=`prev-${this.id}`,i.action=Object.entries(e).reduce((n,[m,f])=>(n[m]=f.bind(this),n),{}),this.data?.config.editableContent&&(i.attrs={...i.attrs,contenteditable:!0});const t={attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:V.create(i,!0),action:this.defaultPreviewActions};return V.create(t,!0)}get isCheckable(){return Xd.has(this.get("config.controlId"))}},eu=()=>({actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}}),tu=class extends Ii{constructor(e){super("fields",e),this.config={all:eu()}}Component(e){return new os(e)}get=e=>{let i=e&&we(this.data,e);if(!i){const t=ct.get(e);t&&(i=this.add(null,t.controlData))}return i};getData=()=>Object.entries(this.data).reduce((e,[i,t])=>{const{conditions:n,...m}=t?.getData()||t;if(n?.length){let f=!0;if(n.length===1){const[g]=n;f=!!g.if[0].source}f&&(m.conditions=n)}return e[i]=m,e},{});load=(e=Object.create(null))=>{const i=Li(e);this.empty();for(const[t,n]of Object.entries(i)){const{meta:m,...f}=n;m?.id&&Oi(f,"config.controlId",m?.id),this.add(t,f)}return this.data}},ss=new tu,iu=Sn({Columns:()=>Ht,Components:()=>as,Controls:()=>Wt,Fields:()=>hi,Rows:()=>ui,Stages:()=>di,default:()=>oe}),di=Bt,ui=ir,Ht=ns,hi=ss,Wt=ct,nu=(e,i=!1)=>{if(e!=null){const t=Li(e);if(t&&typeof t=="object"){const n=He(t);return{id:n.id||wt().id,stages:n.stages||wt().stages,rows:n.rows||{},columns:n.columns||{},fields:n.fields||{}}}console.warn("Formeo: Invalid formData provided, using default")}if(i){const t=Rn.get(Fn);if(t)return t}return wt()},as=class extends qn{constructor(){super("components"),this.disableEvents=!0,this.stages=di,this.rows=ui,this.columns=Ht,this.fields=hi,this.controls=Wt}load=(e,i)=>{this.empty();const t=nu(e,i.sessionStorage);this.opts=i,this.set("id",t.id),this.add("stages",di.load(t.stages)),this.add("rows",ui.load(t.rows)),this.add("columns",Ht.load(t.columns)),this.add("fields",hi.load(t.fields));for(const n of Object.values(this.get("stages")))n.loadChildren();return this.data};flatList(){const e={};for(const i of Object.keys(this.data.stages))ao(this.data,i,"stages",e);return e}getChildData=({type:e,id:i})=>{const t=this.get(e,i);if(t)return t.getData()};get json(){return window.JSON.stringify({$schema:`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/formData_schema.json`,...this.formData})}get formData(){return{id:this.get("id"),stages:Bt.getData(),rows:ir.getData(),columns:ns.getData(),fields:ss.getData()}}set config(e){const{stages:i,rows:t,columns:n,fields:m}=e;di.config=i,ui.config=t,Ht.config=n,hi.config=m}getIndex(e){return this[e]||this[al.get(e)]}setAddress(e,i){if(!Te(e))return;const[t,n,...m]=Array.isArray(e)?e:lt(e),f=this.getIndex(t).get(n);return f?.set(m,i),f}getAddress(e){if(!Te(e))return;const[i,t,...n]=Array.isArray(e)?e:lt(e),m=this.getIndex(i).get(t);if(!(n.length&&!m))return n.length?m.get(n):m}},oe=new as,ei="no-transition",ru={debug:!1,bubbles:!0,formeoLoaded:e=>{},onAdd:()=>{},onRemove:()=>{},onChange:e=>Q.opts?.debug&&console.log(e),onUpdate:e=>Q.opts?.debug&&console.log(e),onUpdateStage:e=>Q.opts?.debug&&console.log(e),onUpdateRow:e=>Q.opts?.debug&&console.log(e),onUpdateColumn:e=>Q.opts?.debug&&console.log(e),onUpdateField:e=>Q.opts?.debug&&console.log(e),onAddRow:e=>Q.opts?.debug&&console.log(e),onAddColumn:e=>Q.opts?.debug&&console.log(e),onAddField:e=>Q.opts?.debug&&console.log(e),onRemoveRow:e=>Q.opts?.debug&&console.log(e),onRemoveColumn:e=>Q.opts?.debug&&console.log(e),onRemoveField:e=>Q.opts?.debug&&console.log(e),onRender:e=>Q.opts?.debug&&console.log(e),onSave:e=>{},confirmClearAll:e=>{globalThis.confirm(e.confirmationMessage)&&e.clearAllAction(e)}},Oe=({src:e,...i},t=Pn)=>{const n=new globalThis.CustomEvent(t,{detail:i,bubbles:Q.opts?.debug||Q.opts?.bubbles});if(n.data=(e||document).dispatchEvent(n),t==="formeoUpdated"){const m=new globalThis.CustomEvent(yl,{detail:i,bubbles:Q.opts?.debug||Q.opts?.bubbles});(e||document).dispatchEvent(m)}return n},Q={init:function(e){return this.opts={...ru,...e},this},formeoSaved:e=>Oe(e,fo),formeoUpdated:(e,i)=>Oe(e,i||"formeoUpdated"),formeoCleared:e=>Oe(e,bl),formeoOnRender:e=>Oe(e,bo),formeoConditionUpdated:e=>Oe(e,wl),formeoAddedRow:e=>Oe(e,Hn),formeoAddedColumn:e=>Oe(e,Wn),formeoAddedField:e=>Oe(e,Bn),formeoRemovedRow:e=>Oe(e,jn),formeoRemovedColumn:e=>Oe(e,Vn),formeoRemovedField:e=>Oe(e,Un)},ou=so(()=>{const e={timeStamp:globalThis.performance.now(),type:Pn,detail:oe.formData};Q.opts.onUpdate(e),Q.opts.onChange!==Q.opts.onUpdate&&Q.opts.onChange(e)},at);document.addEventListener(Pn,ou);document.addEventListener(go,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateStage(m)});document.addEventListener(mo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateRow(m)});document.addEventListener(vo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateColumn(m)});document.addEventListener(yo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateField(m)});document.addEventListener(Hn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddRow(m)});document.addEventListener(Wn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddColumn(m)});document.addEventListener(Bn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddField(m)});document.addEventListener(jn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveRow(m)});document.addEventListener(Vn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveColumn(m)});document.addEventListener(Un,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveField(m)});document.addEventListener(bo,e=>{const{timeStamp:i,type:t,detail:n}=e;Q.opts.onRender({timeStamp:i,type:t,detail:n})});document.addEventListener("confirmClearAll",e=>{e={timeStamp:e.timeStamp,type:e.type,confirmationMessage:e.detail.confirmationMessage,clearAllAction:e.detail.clearAllAction,btnCoords:e.detail.btnCoords},Q.opts.confirmClearAll(e)});document.addEventListener(fo,({timeStamp:e,type:i,detail:{formData:t}})=>{const n={timeStamp:e,type:i,formData:t};Q.opts.onSave(n)});document.addEventListener("formeoLoaded",e=>{Q.opts.formeoLoaded(e.detail.formeo)});var on;function su(){on=on||window.requestAnimationFrame(()=>{on=!1;for(const e of Object.values(Ht.data))e.dom.classList.add(ei),Wt.dom.classList.add(ei),Wt.panels.nav.refresh(),e.refreshFieldPanels(),so(()=>{e.dom.classList.remove(ei),Wt.dom.classList.remove(ei)},333)})}window.addEventListener("resize",su);var Ir={add:{attr:e=>{const i=globalThis.prompt(e.message.attr);if(i&&e.isDisabled(i))return globalThis.alert(Z.get("attributeNotPermitted",i)),ge.add.attrs(e);let t;i&&(t=String(globalThis.prompt(e.message.value,"")),e.addAction(i,t))},option:e=>{e.addAction()},condition:e=>{e.addAction(e)},config:e=>{e.addAction(e)}},remove:{attrs:e=>{e.removeAction()},options:e=>{e.removeAction()},conditions:e=>{e.removeAction()}},click:{btn:e=>{e.action()}},save:{form:un}},ge={init:function(e){const i=Object.keys(Ir);return this.opts=i.reduce((t,n)=>(t[n]={...Ir[n],...e[n]},t),e),this},add:{attrs:e=>ge.opts.add.attr(e),options:e=>ge.opts.add.option(e),conditions:e=>(e.template=e.template||Gn(),ge.opts.add.condition(e)),config:e=>ge.opts.add.config(e)},remove:{attrs:e=>ge.opts.remove.attrs(e),options:e=>ge.opts.remove.options(e),conditions:e=>ge.opts.remove.conditions(e)},click:{btn:e=>ge.opts.click.btn(e)},save:{form:e=>(ge.opts.sessionStorage&&Rn.set(Fn,e),Q.formeoSaved({formData:e}),ge.opts.save.form(e))}},au={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,svgSprite:null,style:nl,iconFont:null,config:{},events:{},actions:{},controls:{},i18n:{location:"https://draggable.github.io/formeo/assets/lang/"},onLoad:()=>{}}}},Se={CREATED:"created",LOADING_RESOURCES:"loading",INITIALIZING:"initializing",READY:"ready",ERROR:"error"},ls=class{#e=Se.CREATED;#i=null;#t=null;#n=!1;constructor({formData:e,...i},t){const{actions:n,events:m,debug:f,config:g,editorContainer:c,...o}=De(au.editor,i);c&&(this.editorContainer=typeof c=="string"?document.querySelector(c):c),this.opts=o,V.setOptions=o,oe.config=g;const h=t||e;this.#t=h?rt(h):null,this.userFormData=this.#t,this.Components=oe,this.dom=V,Q.init({debug:f,...m}),ge.init({debug:f,sessionStorage:o.sessionStorage,...n}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.loadResources.bind(this)):this.loadResources()}get formData(){return this.Components.formData}set formData(e={}){const i=rt(e);this.#t=i,this.userFormData=i,this.load(this.userFormData,this.opts)}loadData(e={}){this.formData=e}get json(){return this.Components.json}clear(){const e=wt();this.#t=e,this.userFormData=e,this.Components.load(this.userFormData,this.opts),this.render()}async loadResources(){document.removeEventListener("DOMContentLoaded",this.loadResources),this.#e=Se.LOADING_RESOURCES;const e=[Xc(this.opts.svgSprite),ed(this.opts.style),Z.init({preloaded:{"en-US":vs},...this.opts.i18n,locale:globalThis.sessionStorage?.getItem(ur)})].filter(Boolean);try{await Promise.all(e),this.opts.allowEdit&&this.init()}catch(i){throw this.#e=Se.ERROR,console.error("Failed to load resources:",i),i}}init(){return this.#e===Se.INITIALIZING?this.#i:this.#e===Se.READY?this.#r():(this.#e=Se.INITIALIZING,this.#i=ct.init(this.opts.controls,this.opts.stickyControls).then(e=>(this.controls=e,this.#n||(this.#s(),this.#n=!0),this.formId=oe.get("id"),this.i18n={setLang:this.#o.bind(this)},this.render(),this.#e=Se.READY,this.opts.onLoad?.(this),this.tooltipInstance=new jr,this)).catch(e=>{throw this.#e=Se.ERROR,console.error("Failed to initialize editor:",e),e}),this.#i)}async#o(e){globalThis.sessionStorage?.setItem(ur,e),await Z.setCurrent(e),await this.#r()}async#r(){return this.controls=await ct.init(this.opts.controls,this.opts.stickyControls),this.render(),this}#s(){const e=this.#a();this.Components.load(e,this.opts)}#a(){if(this.#t)return He(this.#t);if(this.opts.sessionStorage){const e=Rn.get(Fn);if(e)return e}return wt()}load(e=this.userFormData,i=this.opts){this.Components.load(e,i),this.render()}get initState(){return this.#e}get isReady(){return this.#e===Se.READY}async whenReady(){return this.#e===Se.READY?this:this.#e===Se.ERROR?Promise.reject(new Error("Editor initialization failed")):this.#i?this.#i:new Promise((e,i)=>{const t=()=>{this.#e===Se.READY?e(this):this.#e===Se.ERROR?i(new Error("Editor initialization failed")):globalThis.requestAnimationFrame(t)};t()})}render(){if(!this.controls)return globalThis.requestAnimationFrame(()=>this.render());if(this.stages=Object.values(oe.get("stages")),this.opts.controlOnLeft)for(const i of this.stages)i.dom.style.order=1;const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map(({dom:i})=>i)]};Z.current.dir&&(e.attrs.dir=Z.current.dir,V.dir=Z.current.dir),this.editor=V.create(e),(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(V.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),Q.formeoLoaded=new globalThis.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(Q.formeoLoaded)}},Dr=e=>typeof e=="string"?document.querySelector(e):e,lu=({editorContainer:e,renderContainer:i,formData:t,...n})=>{const m={renderContainer:Dr(i),editorContainer:Dr(e),formData:rt(t)};return{elements:{},...n,...m}},ti=e=>e.match(Al)?.[0]||e,Nr=e=>{if(!e||e.hasAttribute("hidden")||e.parentElement.hasAttribute("hidden"))return!1;const i=window.getComputedStyle(e);return!(i.display==="none"||i.visibility==="hidden"||i.opacity==="0")},cu={isChecked:e=>e.checked,isNotChecked:e=>!e.checked,value:e=>e.value,isVisible:e=>Nr(e),isNotVisible:e=>!Nr(e)},du=()=>V.btnTemplate({className:"remove-input-group",children:V.icon("remove"),action:{mouseover:({target:e})=>e.parentElement.classList.add("will-remove"),mouseleave:({target:e})=>e.parentElement.classList.remove("will-remove"),click:({target:e})=>e.parentElement.remove()}}),Fr={equals:gn.default,notEquals:(e,i)=>!(0,gn.default)(e,i),contains:(e,i)=>e.includes(i),notContains:(e,i)=>!e.includes(i)},uu=Object.entries(wo).reduce((e,[i,t])=>(e[t]=Fr[i],e[i]=Fr[i],e),{}),zr={equals:(e,{targetProperty:i,value:t})=>{e[`_${i}`]=e[i],e[i]=t}},hu=Object.entries(Co).reduce((e,[i,t])=>(e[t]=zr[i],e[i]=zr[i],e),{}),pu={isChecked:e=>{e.checked=!0},isNotChecked:e=>{e.checked=!1},value:(e,{assignment:i,...t})=>{const n=hu[i]?.(e,t),m=new Event("input",{bubbles:!0});return e.dispatchEvent(m),n},isNotVisible:e=>{e?._required===void 0&&(e._required=e.required),e.parentElement.setAttribute("hidden",!0),e.required=!1},isVisible:e=>{e.parentElement.removeAttribute("hidden"),e.required=e._required}},cs=class{constructor(e,i){const{renderContainer:t,elements:n,formData:m,config:f}=lu(e);this.container=t,this.form=rt(i||m),this.elements=n,this.config=f,this.components=Object.create(null),this.dom=V}get formData(){return this.form}set formData(e){this.form=rt(e)}get userData(){const e=this.container.querySelector(".formeo-render")||this.renderedForm;if(!e)return{};const i=new FormData(e),t={};for(const[n,m]of i.entries())t[n]?Array.isArray(t[n])?t[n].push(m):t[n]=[t[n],m]:t[n]=m;return t}get userFormData(){const e=[];for(const[i,t]of Object.entries(this.userData)){const n={key:i,value:t,label:this.components[ti(i)]?.config?.label||""};e.push(n)}return e}set userData(e={}){const i=this.container.querySelector("form");for(const t of Object.keys(e)){const n=i.elements[t];if(n.length&&n[0].type==="checkbox"){const m=Array.isArray(e[t])?e[t]:[e[t]];for(const f of n)f.checked=m.includes(f.value)}else if(n.length&&n[0].type==="radio")for(const m of n)m.checked=m.value===e[t];else n.type&&(n.value=e[t])}}render(e=this.form){this.form=rt(e);const i=this.getRenderedForm(e),t=this.container.querySelector(".formeo-render");t?t.replaceWith(i):this.container.appendChild(i)}getRenderedForm(e=this.form){this.form=rt(e);const i=document.getElementsByClassName("formeo-render").length,t={...this.config,tag:"form",id:this.form.id,className:`formeo-render formeo formeo-rendered-${i}`,children:this.processedData};return this.renderedForm=V.render(t),this.applyConditions(),this.renderedForm}get html(){return(this.renderedForm||this.getRenderedForm()).outerHTML}orderChildren=(e,i)=>i.reduce((t,n)=>(t.push(this.form[e][n]),t),[]);prefixId=e=>"f-"+e;processColumn=({id:e,...i})=>({...i,id:this.prefixId(e),children:this.processFields(i.children),style:`width: ${i.config.width||"100%"}`});processRows=e=>this.orderChildren("rows",this.form.stages[e].children).reduce((i,t)=>(t&&i.push(this.processRow(t)),i),[]);cacheComponent=e=>(this.components[ti(e.id)]=e,e);processRow=(e,i="row")=>{const{config:t,id:n}=e,m=[`formeo-${i}-wrap`],f={...e,children:this.processColumns(e.id),id:this.prefixId(n)};this.cacheComponent(f);const g=[{condition:t.legend,result:()=>({tag:t.fieldset?"legend":"h3",children:t.legend})},{condition:!0,result:()=>f},{condition:t.inputGroup,result:()=>this.addButton(n)}].reduce((c,{condition:o,result:h})=>(o&&c.push(h()),c),[]);return t.inputGroup&&m.push("f-input-group-wrap"),{tag:t.fieldset?"fieldset":"div",className:m,children:g}};cloneComponentData=e=>{const{children:i=[],id:t,attrs:n={},...m}=this.components[e],f={...n,"data-clone-of":t};return m.tag==="input"&&(f.name=Ko(this.components[e])),{...m,id:"f-"+Me(t),children:i?.length&&i.map(({id:g})=>this.cloneComponentData(ti(g))),attrs:f}};addButton=e=>({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:i=>{const t=i.target.parentElement,n=V.create(this.cloneComponentData(e));t.insertBefore(n,t.lastChild);const m=V.create(du());n.appendChild(m)}}});processColumns=e=>this.orderChildren("columns",this.form.rows[e].children).map(i=>this.cacheComponent(this.processColumn(i)));processFields=e=>this.orderChildren("fields",e).map(({id:i,...t})=>{const n=t.config?.controlId||t.meta?.id,{action:m={},dependencies:f={}}=this.elements[n]||{};f&&Go(f);const g=De({action:m},t);return this.cacheComponent({...g,id:this.prefixId(i)})});get processedData(){return Object.values(this.form.stages).map(e=>(e.children=this.processRows(e.id),e.className=kt,this.components[ti(e.id)]=e,e))}handleComponentCondition=(e,i,t)=>{if(e.length){for(const f of e)this.handleComponentCondition(f,i,t);return}const n=gu(e);n&&e.addEventListener(n,f=>{if(this.evaluateCondition(i,f))for(const g of t)this.execResult(g,f)},!1);const m={target:e};if(this.evaluateCondition(i,m))for(const f of t)this.execResult(f,m)};applyConditions=()=>{for(const{conditions:e}of Object.values(this.components))if(e)for(const i of e){const{if:t,then:n}=i;for(const m of t){const{source:f,target:g}=m;if(Te(f)){const{component:c,options:o}=this.getComponent(f),h=o||c;this.handleComponentCondition(h,m,n)}if(Te(g)){const{component:c,options:o}=this.getComponent(g),h=o||c;this.handleComponentCondition(h,m,n)}}}};evaluateCondition=({source:e,sourceProperty:i,targetProperty:t,comparison:n,target:m})=>{const f=this.getComponentProperty(e,i);if(typeof f=="boolean")return f;const g=String(Te(m)?this.getComponentProperty(m,t):m);return uu[n]?.(f,g)};execResult=({target:e,targetProperty:i,assignment:t,value:n})=>{if(Te(e)){const{component:m,option:f}=this.getComponent(e),g=f||m;pu[i]?.(g,{targetProperty:i,assignment:t,value:n})}};getComponentProperty=(e,i)=>{const{component:t,option:n}=this.getComponent(e),m=n||t;return cu[i]?.(m)||m[i]};getComponent=e=>{const i={component:null};if(!Te(e))return null;const[,t,n,m]=lt(e),f=this.renderedForm.querySelector(`#f-${t}`);if(!f)return i;if(i.component=f,n){const g=f.querySelectorAll("input"),c=g[m];return i.options=g,i.option=c,i}return i};getComponents=e=>{const i=[],t=e.slice(e.indexOf(".")+1);return i.push(...this.renderedForm.querySelectorAll(`[name=f-${t}]`)),i}},fu=[["input",e=>["textarea","text"].includes(e.type)],["change",e=>["select"].includes(e.tagName.toLowerCase())||["checkbox","radio"].includes(e.type)]],gu=e=>{const[i]=fu.find(t=>t[1](e))||[!1];return i};window!==void 0&&(window.FormeoEditor=ls,window.FormeoRenderer=cs);var nr=ls,rr=cs,mu={rows:{all:{events:{onAdd:e=>{if(console.log(`You just added a new row with the id "${e.target.id}"`,e.index),e.index===2){const i=e.target.dom.querySelector(".action-btn-wrap"),t=document.createElement("button");t.type="button",t.className="btn btn-sm btn-secondary",t.textContent="Add Column",t.style.border="1px solid #ccc",t.style.width="auto",t.addEventListener("click",()=>{e.target.addChild()}),i.appendChild(t)}}}}},fields:{all:{panels:{attrs:{}},events:{onRemove:e=>{console.log(`You just removed the field with the id "${e.target.id}"`,e)}}},"text-input":{attrs:{type:[{label:"text",value:"text"},{label:"phone",value:"phone"},{label:"email",value:"email"}]},config:{helpText:"This is a custom help text for text input fields.",hideLabel:!1}},checkbox:{actionButtons:{},panels:{attrs:{hideDisabled:!0}}}}},vu={sortable:!1,groupOrder:["common","html"],disable:{},elements:[{tag:"input",config:{label:"Email",disabledAttrs:["type"],lockedAttrs:["required","className"]},meta:{group:"common",id:"email",icon:"@"},attrs:{className:"custom-email",type:"email",required:!0}}],elementOrder:{common:["button","checkbox","date-input","hidden","upload","number","radio","select","text-input","textarea"]}},yu=".build-form",bu=".render-form",jt={editorContainer:yu,actions:{},controls:vu,config:mu,events:{onSave:console.log,onChange:console.log},style:null,sessionStorage:!0,editPanelOrder:["attrs","options"],onLoad:()=>{console.log("demo loaded")}},or={renderContainer:bu,elements:{tinymce:{action:{onRender:e=>{if(e.id){const i=`#${e.id}`;globalThis.tinymce.remove(i),globalThis.tinymce.init({selector:i})}}}}}};async function wu(e){e.innerHTML=`
12
+ `),n={};for(let m,f=0;f<t.length;f++)m=/^(.+?) *?= *?([^\n]+)/.exec(t[f]),m&&(n[m[1]]=m[2].trim());return n}static getInstance(i){return qt||(qt=new ii(i)),qt}static resetInstance(){qt=null}async loadLang(i,t=!0){if(this.loaded.includes(i)&&t)return this.langs[i];const n=`${this.config.location}${i}${this.config.extension}`;try{const m=await(async function(g){try{const c=await fetch(g);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c[g.endsWith(".lang")?"text":"json"]()}catch(c){throw c}})(n),f=ii.processFile(m);return this.applyLanguage(i,f),this.langs[i]}catch{return this.applyLanguage(i)}}applyLanguage(i,t={}){const n=this.config.override[i]||{},m=this.langs[i]||{};return this.langs[i]={...m,...t,...n},this.loaded.push(i),this.langs[i]}get getLangs(){return this.config.langs}async setCurrent(i="en-US"){return this.loaded.includes(i)||await this.loadLang(i),this.locale=i,this.current=this.langs[i],this.current}},{apply:(e,i,t)=>e.getInstance(...t),construct:(e,i)=>new e(...i),get:(e,i)=>e[i]}),Z=Wr.getInstance();(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();var ys=Object.defineProperty,bs=(e,i,t)=>i in e?ys(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,Fe=(e,i,t)=>bs(e,typeof i!="symbol"?i+"":i,t),Mt={tooltip:"_3x4ZIcu-",visible:"JIt36hCJ"},ws={triggerName:"tooltip"},Br=class gt{constructor(i=ws){Fe(this,"triggerName"),Fe(this,"tooltip"),Fe(this,"activeTriggerType",null),Fe(this,"spacing",12),Fe(this,"handleClick",t=>{const n=this.triggerName,m=t.target.closest(`[${n}][${n}-type="click"]`);if(m)if(this.isVisible())this.hide();else{const f=m.getAttribute(`${n}`);this.show(m,f),this.activeTriggerType="click"}else this.hide()}),Fe(this,"handleMouseOver",t=>{const n=this.triggerName,m=t.target.closest(`[${n}]`);if(this.activeTriggerType!=="click"&&m?.getAttribute(`${n}-type`)!=="click"){const f=m?.getAttribute(`${n}`);f&&(this.show(m,f),this.activeTriggerType="hover")}}),Fe(this,"handleMouseOut",t=>{const n=this.triggerName,m=t.target.closest(`[${n}]`);this.activeTriggerType!=="click"&&m?.getAttribute(`${n}-type`)!=="click"&&this.hide()}),Fe(this,"handleResize",()=>{this.isVisible()&&this.hide()}),Fe(this,"handleScroll",()=>{this.isVisible()&&this.hide()}),gt.instance&&gt.instance.destroy(),this.triggerName=`data-${i.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${Mt.tooltip}`,document.body.appendChild(this.tooltip),this.setupEventListeners(),gt.instance=this}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("touchstart",this.handleMouseOver),document.addEventListener("touchend",this.handleMouseOut),document.addEventListener("click",this.handleClick),globalThis.addEventListener("resize",this.handleResize),globalThis.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(Mt.visible)}calculatePosition(i){const t=i.getBoundingClientRect(),n=this.tooltip.getBoundingClientRect(),m=[{name:"top",x:t.left+(t.width-n.width)/2,y:t.top-n.height-this.spacing},{name:"bottom",x:t.left+(t.width-n.width)/2,y:t.bottom+this.spacing},{name:"left",x:t.left-n.width-this.spacing,y:t.top+(t.height-n.height)/2},{name:"right",x:t.right+this.spacing,y:t.top+(t.height-n.height)/2},{name:"top-left",x:t.left,y:t.top-n.height-this.spacing},{name:"top-right",x:t.right-n.width,y:t.top-n.height-this.spacing},{name:"bottom-left",x:t.left,y:t.bottom+this.spacing},{name:"bottom-right",x:t.right-n.width,y:t.bottom+this.spacing}];return m.find(f=>this.fitsInViewport(f,n))||m[0]}fitsInViewport(i,t){return i.x>=0&&i.y>=0&&i.x+t.width<=globalThis.innerWidth&&i.y+t.height<=globalThis.innerHeight?[[i.x,i.y],[i.x+t.width,i.y],[i.x,i.y+t.height],[i.x+t.width,i.y+t.height],[i.x+t.width/2,i.y+t.height/2]].flatMap(([n,m])=>Array.from(document.elementsFromPoint(n,m))).filter(n=>{if(this.tooltip.contains(n)||n===this.tooltip||n.classList.contains(Mt.tooltip)||getComputedStyle(n).pointerEvents==="none")return!1}).length===0:!1}show(i,t){this.tooltip.innerHTML=t??"",this.tooltip.classList.add(Mt.visible);const n=this.calculatePosition(i);this.tooltip.style.left=`${n.x}px`,this.tooltip.style.top=`${n.y}px`,this.tooltip.dataset.position=n.name}hide(){this.tooltip.classList.remove(Mt.visible),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("touchstart",this.handleMouseOver),document.removeEventListener("touchend",this.handleMouseOut),document.removeEventListener("click",this.handleClick),globalThis.removeEventListener("resize",this.handleResize),globalThis.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove(),gt.instance===this&&(gt.instance=null)}};Fe(Br,"instance",null);var jr=Br;globalThis!==void 0&&(globalThis.SmartTooltip=jr);var Cs="formeo",Ss="5.0.3",xs="module",Es="dist/formeo.cjs.js",As="dist/formeo.es.js",ks="dist/formeo.umd.js",Ts={".":{import:"./dist/formeo.es.js",require:"./dist/formeo.cjs.js",default:"./dist/formeo.umd.js"},"./dist/formeo.min.css":{import:"./dist/formeo.min.css",require:"./dist/formeo.min.css",default:"./dist/formeo.min.css"}},Ms=["dist/*","demo/**/*"],$s="https://formeo.io",Ls={url:"https://github.com/Draggable/formeo",type:"git"},Rs="Draggable https://draggable.io",_s=[{name:"Kevin Chappell",email:"kevin@chappell.dev",url:"https://kevin-chappell.com"}],Os={url:"https://github.com/draggable/formeo/issues"},Is="A zero dependency JavaScript module for drag and drop form creation.",Ds=["drag and drop","form builder","form maker","forms"];var Ns=["**/*","node_modules","test"],Fs={files:{test:["test/**/*.spec.js"],"formeo-editor":{js:"src/js/editor.js"},"formeo-renderer":{js:"src/js/renderer.js"},site:["demo/assets/sass/site.scss"]}},zs={dev:"NODE_ENV=development vite",preview:"vite preview","prebuild:lib":"rm -rf dist","build:lib":"npm-run-all -p build:lib:unminified build:lib:minified","build:lib:unminified":"vite build --config vite.config.lib.mjs --mode production","build:lib:minified":"vite build --config vite.config.lib.mjs --mode production-minified",build:"npm-run-all -p build:icons build:demo",prebuild:"npm run build:lib",postbuild:"npm run generate:jsonSchema","build:demo":"vite build --mode demo","postbuild:demo":"node --no-warnings tools/copy-assets.mjs","build:demo:watch":"vite build --mode demo --watch","build:icons":"node ./tools/generate-sprite",lint:"biome check ./src","lint:fix":"biome check --write ./src",format:"biome format --write .",test:"node --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:watch":"node --watch --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:updateSnapshots":"node --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --test-update-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:ci":"npm test --coverage",start:"npm-run-all build:icons dev","semantic-release":"semantic-release --ci --debug","copy:lang":"node ./tools/copy-directory.mjs ./node_modules/formeo-i18n/dist/lang ./src/demo/assets/lang","travis-deploy-once":"travis-deploy-once --pro","playwright:test":"playwright test","playwright:test:ui":"playwright test --ui","playwright:test:report":"playwright show-report","playwright:test:ci":"playwright test --reporter=dot",prepush:"npm test",prepare:"lefthook install",postmerge:"lefthook install","generate:jsonSchema":"node --experimental-strip-types --no-warnings ./tools/generate-json-schema.ts"},Ps={"@biomejs/biome":"^2.3.3","@commitlint/cli":"^21.0.1","@commitlint/config-conventional":"^21.0.1","@playwright/test":"^1.49.1","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.8","@semantic-release/npm":"^13.1.3","@types/node":"^25.8.0","ace-builds":"^1.36.5",esbuild:"^0.28.0",jsdom:"^29.1.1",lefthook:"^2.1.6","npm-run-all":"^4.1.5","sass-embedded":"^1.80.1","semantic-release":"^25.0.2","svg-sprite":"^2.0.4",vite:"^8.0.13","vite-plugin-banner":"^0.8.0","vite-plugin-compression":"^0.5.1","vite-plugin-html":"^3.2.2",zod:"^4.4.3","zod-to-json-schema":"^3.23.5"},Hs={"@draggable/formeo-languages":"^3.4.1","@draggable/i18n":"^1.0.7","@draggable/tooltip":"^1.2.2",lodash:"^4.17.21",sortablejs:"^1.15.3"},Ws={branches:["main"],verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],publish:["@semantic-release/npm","@semantic-release/github"],success:["@semantic-release/github"],fail:["@semantic-release/github"]},Bs={extends:["@commitlint/config-conventional"],rules:{"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]]}},Vr={name:Cs,version:Ss,type:xs,main:Es,module:As,unpkg:ks,exports:Ts,files:Ms,homepage:$s,repository:Ls,author:Rs,contributors:_s,bugs:Os,description:Is,keywords:Ds,license:"MIT",ignore:Ns,config:Fs,scripts:zs,devDependencies:Ps,dependencies:Hs,release:Ws,commitlint:Bs},js=j(((e,i)=>{function t(){this.__data__=[],this.size=0}i.exports=t})),Vt=j(((e,i)=>{function t(n,m){return n===m||n!==n&&m!==m}i.exports=t})),Ei=j(((e,i)=>{var t=Vt();function n(m,f){for(var g=m.length;g--;)if(t(m[g][0],f))return g;return-1}i.exports=n})),Vs=j(((e,i)=>{var t=Ei(),n=Array.prototype.splice;function m(f){var g=this.__data__,c=t(g,f);return c<0?!1:(c==g.length-1?g.pop():n.call(g,c,1),--this.size,!0)}i.exports=m})),Us=j(((e,i)=>{var t=Ei();function n(m){var f=this.__data__,g=t(f,m);return g<0?void 0:f[g][1]}i.exports=n})),Gs=j(((e,i)=>{var t=Ei();function n(m){return t(this.__data__,m)>-1}i.exports=n})),Ks=j(((e,i)=>{var t=Ei();function n(m,f){var g=this.__data__,c=t(g,m);return c<0?(++this.size,g.push([m,f])):g[c][1]=f,this}i.exports=n})),Ai=j(((e,i)=>{var t=js(),n=Vs(),m=Us(),f=Gs(),g=Ks();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),qs=j(((e,i)=>{var t=Ai();function n(){this.__data__=new t,this.size=0}i.exports=n})),Ys=j(((e,i)=>{function t(n){var m=this.__data__,f=m.delete(n);return this.size=m.size,f}i.exports=t})),Zs=j(((e,i)=>{function t(n){return this.__data__.get(n)}i.exports=t})),Qs=j(((e,i)=>{function t(n){return this.__data__.has(n)}i.exports=t})),Ur=j(((e,i)=>{var t=typeof global=="object"&&global&&global.Object===Object&&global;i.exports=t})),Be=j(((e,i)=>{var t=Ur(),n=typeof self=="object"&&self&&self.Object===Object&&self,m=t||n||Function("return this")();i.exports=m})),ki=j(((e,i)=>{var t=Be().Symbol;i.exports=t})),Xs=j(((e,i)=>{var t=ki(),n=Object.prototype,m=n.hasOwnProperty,f=n.toString,g=t?t.toStringTag:void 0;function c(o){var h=m.call(o,g),u=o[g];try{o[g]=void 0;var d=!0}catch{}var l=f.call(o);return d&&(h?o[g]=u:delete o[g]),l}i.exports=c})),Js=j(((e,i)=>{var t=Object.prototype.toString;function n(m){return t.call(m)}i.exports=n})),At=j(((e,i)=>{var t=ki(),n=Xs(),m=Js(),f="[object Null]",g="[object Undefined]",c=t?t.toStringTag:void 0;function o(h){return h==null?h===void 0?g:f:c&&c in Object(h)?n(h):m(h)}i.exports=o})),et=j(((e,i)=>{function t(n){var m=typeof n;return n!=null&&(m=="object"||m=="function")}i.exports=t})),xn=j(((e,i)=>{var t=At(),n=et(),m="[object AsyncFunction]",f="[object Function]",g="[object GeneratorFunction]",c="[object Proxy]";function o(h){if(!n(h))return!1;var u=t(h);return u==f||u==g||u==m||u==c}i.exports=o})),ea=j(((e,i)=>{var t=Be()["__core-js_shared__"];i.exports=t})),ta=j(((e,i)=>{var t=ea(),n=(function(){var f=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""})();function m(f){return!!n&&n in f}i.exports=m})),Gr=j(((e,i)=>{var t=Function.prototype.toString;function n(m){if(m!=null){try{return t.call(m)}catch{}try{return m+""}catch{}}return""}i.exports=n})),ia=j(((e,i)=>{var t=xn(),n=ta(),m=et(),f=Gr(),g=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,o=Function.prototype,h=Object.prototype,u=o.toString,d=h.hasOwnProperty,l=RegExp("^"+u.call(d).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function s(r){return!m(r)||n(r)?!1:(t(r)?l:c).test(f(r))}i.exports=s})),na=j(((e,i)=>{function t(n,m){return n?.[m]}i.exports=t})),dt=j(((e,i)=>{var t=ia(),n=na();function m(f,g){var c=n(f,g);return t(c)?c:void 0}i.exports=m})),En=j(((e,i)=>{var t=dt()(Be(),"Map");i.exports=t})),Ti=j(((e,i)=>{var t=dt()(Object,"create");i.exports=t})),ra=j(((e,i)=>{var t=Ti();function n(){this.__data__=t?t(null):{},this.size=0}i.exports=n})),oa=j(((e,i)=>{function t(n){var m=this.has(n)&&delete this.__data__[n];return this.size-=m?1:0,m}i.exports=t})),sa=j(((e,i)=>{var t=Ti(),n="__lodash_hash_undefined__",m=Object.prototype.hasOwnProperty;function f(g){var c=this.__data__;if(t){var o=c[g];return o===n?void 0:o}return m.call(c,g)?c[g]:void 0}i.exports=f})),aa=j(((e,i)=>{var t=Ti(),n=Object.prototype.hasOwnProperty;function m(f){var g=this.__data__;return t?g[f]!==void 0:n.call(g,f)}i.exports=m})),la=j(((e,i)=>{var t=Ti(),n="__lodash_hash_undefined__";function m(f,g){var c=this.__data__;return this.size+=this.has(f)?0:1,c[f]=t&&g===void 0?n:g,this}i.exports=m})),ca=j(((e,i)=>{var t=ra(),n=oa(),m=sa(),f=aa(),g=la();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),da=j(((e,i)=>{var t=ca(),n=Ai(),m=En();function f(){this.size=0,this.__data__={hash:new t,map:new(m||n),string:new t}}i.exports=f})),ua=j(((e,i)=>{function t(n){var m=typeof n;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?n!=="__proto__":n===null}i.exports=t})),Mi=j(((e,i)=>{var t=ua();function n(m,f){var g=m.__data__;return t(f)?g[typeof f=="string"?"string":"hash"]:g.map}i.exports=n})),ha=j(((e,i)=>{var t=Mi();function n(m){var f=t(this,m).delete(m);return this.size-=f?1:0,f}i.exports=n})),pa=j(((e,i)=>{var t=Mi();function n(m){return t(this,m).get(m)}i.exports=n})),fa=j(((e,i)=>{var t=Mi();function n(m){return t(this,m).has(m)}i.exports=n})),ga=j(((e,i)=>{var t=Mi();function n(m,f){var g=t(this,m),c=g.size;return g.set(m,f),this.size+=g.size==c?0:1,this}i.exports=n})),An=j(((e,i)=>{var t=da(),n=ha(),m=pa(),f=fa(),g=ga();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),ma=j(((e,i)=>{var t=Ai(),n=En(),m=An(),f=200;function g(c,o){var h=this.__data__;if(h instanceof t){var u=h.__data__;if(!n||u.length<f-1)return u.push([c,o]),this.size=++h.size,this;h=this.__data__=new m(u)}return h.set(c,o),this.size=h.size,this}i.exports=g})),Kr=j(((e,i)=>{var t=Ai(),n=qs(),m=Ys(),f=Zs(),g=Qs(),c=ma();function o(h){var u=this.__data__=new t(h);this.size=u.size}o.prototype.clear=n,o.prototype.delete=m,o.prototype.get=f,o.prototype.has=g,o.prototype.set=c,i.exports=o})),qr=j(((e,i)=>{var t=dt(),n=(function(){try{var m=t(Object,"defineProperty");return m({},"",{}),m}catch{}})();i.exports=n})),kn=j(((e,i)=>{var t=qr();function n(m,f,g){f=="__proto__"&&t?t(m,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):m[f]=g}i.exports=n})),Yr=j(((e,i)=>{var t=kn(),n=Vt();function m(f,g,c){(c!==void 0&&!n(f[g],c)||c===void 0&&!(g in f))&&t(f,g,c)}i.exports=m})),va=j(((e,i)=>{function t(n){return function(m,f,g){for(var c=-1,o=Object(m),h=g(m),u=h.length;u--;){var d=h[n?u:++c];if(f(o[d],d,o)===!1)break}return m}}i.exports=t})),ya=j(((e,i)=>{var t=va()();i.exports=t})),ba=j(((e,i)=>{var t=Be(),n=typeof e=="object"&&e&&!e.nodeType&&e,m=n&&typeof i=="object"&&i&&!i.nodeType&&i,f=m&&m.exports===n?t.Buffer:void 0,g=f?f.allocUnsafe:void 0;function c(o,h){if(h)return o.slice();var u=o.length,d=g?g(u):new o.constructor(u);return o.copy(d),d}i.exports=c})),Zr=j(((e,i)=>{var t=Be().Uint8Array;i.exports=t})),wa=j(((e,i)=>{var t=Zr();function n(m){var f=new m.constructor(m.byteLength);return new t(f).set(new t(m)),f}i.exports=n})),Ca=j(((e,i)=>{var t=wa();function n(m,f){var g=f?t(m.buffer):m.buffer;return new m.constructor(g,m.byteOffset,m.length)}i.exports=n})),Sa=j(((e,i)=>{function t(n,m){var f=-1,g=n.length;for(m||(m=Array(g));++f<g;)m[f]=n[f];return m}i.exports=t})),xa=j(((e,i)=>{var t=et(),n=Object.create,m=(function(){function f(){}return function(g){if(!t(g))return{};if(n)return n(g);f.prototype=g;var c=new f;return f.prototype=void 0,c}})();i.exports=m})),Qr=j(((e,i)=>{function t(n,m){return function(f){return n(m(f))}}i.exports=t})),Xr=j(((e,i)=>{var t=Qr()(Object.getPrototypeOf,Object);i.exports=t})),Tn=j(((e,i)=>{var t=Object.prototype;function n(m){var f=m&&m.constructor;return m===(typeof f=="function"&&f.prototype||t)}i.exports=n})),Ea=j(((e,i)=>{var t=xa(),n=Xr(),m=Tn();function f(g){return typeof g.constructor=="function"&&!m(g)?t(n(g)):{}}i.exports=f})),ut=j(((e,i)=>{function t(n){return n!=null&&typeof n=="object"}i.exports=t})),Aa=j(((e,i)=>{var t=At(),n=ut(),m="[object Arguments]";function f(g){return n(g)&&t(g)==m}i.exports=f})),Jr=j(((e,i)=>{var t=Aa(),n=ut(),m=Object.prototype,f=m.hasOwnProperty,g=m.propertyIsEnumerable,c=t((function(){return arguments})())?t:function(o){return n(o)&&f.call(o,"callee")&&!g.call(o,"callee")};i.exports=c})),ht=j(((e,i)=>{var t=Array.isArray;i.exports=t})),eo=j(((e,i)=>{var t=9007199254740991;function n(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=t}i.exports=n})),$i=j(((e,i)=>{var t=xn(),n=eo();function m(f){return f!=null&&n(f.length)&&!t(f)}i.exports=m})),ka=j(((e,i)=>{var t=$i(),n=ut();function m(f){return n(f)&&t(f)}i.exports=m})),Ta=j(((e,i)=>{function t(){return!1}i.exports=t})),Mn=j(((e,i)=>{var t=Be(),n=Ta(),m=typeof e=="object"&&e&&!e.nodeType&&e,f=m&&typeof i=="object"&&i&&!i.nodeType&&i,g=f&&f.exports===m?t.Buffer:void 0,c=(g?g.isBuffer:void 0)||n;i.exports=c})),Ma=j(((e,i)=>{var t=At(),n=Xr(),m=ut(),f="[object Object]",g=Function.prototype,c=Object.prototype,o=g.toString,h=c.hasOwnProperty,u=o.call(Object);function d(l){if(!m(l)||t(l)!=f)return!1;var s=n(l);if(s===null)return!0;var r=h.call(s,"constructor")&&s.constructor;return typeof r=="function"&&r instanceof r&&o.call(r)==u}i.exports=d})),$a=j(((e,i)=>{var t=At(),n=eo(),m=ut(),f="[object Arguments]",g="[object Array]",c="[object Boolean]",o="[object Date]",h="[object Error]",u="[object Function]",d="[object Map]",l="[object Number]",s="[object Object]",r="[object RegExp]",a="[object Set]",p="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",k="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",S="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",R="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",T="[object Uint32Array]",E={};E[x]=E[w]=E[S]=E[M]=E[L]=E[R]=E[$]=E[D]=E[T]=!0,E[f]=E[g]=E[y]=E[c]=E[k]=E[o]=E[h]=E[u]=E[d]=E[l]=E[s]=E[r]=E[a]=E[p]=E[v]=!1;function C(b){return m(b)&&n(b.length)&&!!E[t(b)]}i.exports=C})),La=j(((e,i)=>{function t(n){return function(m){return n(m)}}i.exports=t})),Ra=j(((e,i)=>{var t=Ur(),n=typeof e=="object"&&e&&!e.nodeType&&e,m=n&&typeof i=="object"&&i&&!i.nodeType&&i,f=m&&m.exports===n&&t.process,g=(function(){try{var c=m&&m.require&&m.require("util").types;return c||f&&f.binding&&f.binding("util")}catch{}})();i.exports=g})),$n=j(((e,i)=>{var t=$a(),n=La(),m=Ra(),f=m&&m.isTypedArray,g=f?n(f):t;i.exports=g})),to=j(((e,i)=>{function t(n,m){if(!(m==="constructor"&&typeof n[m]=="function")&&m!="__proto__")return n[m]}i.exports=t})),io=j(((e,i)=>{var t=kn(),n=Vt(),m=Object.prototype.hasOwnProperty;function f(g,c,o){var h=g[c];(!(m.call(g,c)&&n(h,o))||o===void 0&&!(c in g))&&t(g,c,o)}i.exports=f})),_a=j(((e,i)=>{var t=io(),n=kn();function m(f,g,c,o){var h=!c;c||(c={});for(var u=-1,d=g.length;++u<d;){var l=g[u],s=o?o(c[l],f[l],l,c,f):void 0;s===void 0&&(s=f[l]),h?n(c,l,s):t(c,l,s)}return c}i.exports=m})),Oa=j(((e,i)=>{function t(n,m){for(var f=-1,g=Array(n);++f<n;)g[f]=m(f);return g}i.exports=t})),Ln=j(((e,i)=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function m(f,g){var c=typeof f;return g=g??t,!!g&&(c=="number"||c!="symbol"&&n.test(f))&&f>-1&&f%1==0&&f<g}i.exports=m})),no=j(((e,i)=>{var t=Oa(),n=Jr(),m=ht(),f=Mn(),g=Ln(),c=$n(),o=Object.prototype.hasOwnProperty;function h(u,d){var l=m(u),s=!l&&n(u),r=!l&&!s&&f(u),a=!l&&!s&&!r&&c(u),p=l||s||r||a,v=p?t(u.length,String):[],y=v.length;for(var k in u)(d||o.call(u,k))&&!(p&&(k=="length"||r&&(k=="offset"||k=="parent")||a&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||g(k,y)))&&v.push(k);return v}i.exports=h})),Ia=j(((e,i)=>{function t(n){var m=[];if(n!=null)for(var f in Object(n))m.push(f);return m}i.exports=t})),Da=j(((e,i)=>{var t=et(),n=Tn(),m=Ia(),f=Object.prototype.hasOwnProperty;function g(c){if(!t(c))return m(c);var o=n(c),h=[];for(var u in c)u=="constructor"&&(o||!f.call(c,u))||h.push(u);return h}i.exports=g})),ro=j(((e,i)=>{var t=no(),n=Da(),m=$i();function f(g){return m(g)?t(g,!0):n(g)}i.exports=f})),Na=j(((e,i)=>{var t=_a(),n=ro();function m(f){return t(f,n(f))}i.exports=m})),Fa=j(((e,i)=>{var t=Yr(),n=ba(),m=Ca(),f=Sa(),g=Ea(),c=Jr(),o=ht(),h=ka(),u=Mn(),d=xn(),l=et(),s=Ma(),r=$n(),a=to(),p=Na();function v(y,k,x,w,S,M,L){var R=a(y,x),$=a(k,x),D=L.get($);if(D){t(y,x,D);return}var T=M?M(R,$,x+"",y,k,L):void 0,E=T===void 0;if(E){var C=o($),b=!C&&u($),A=!C&&!b&&r($);T=$,C||b||A?o(R)?T=R:h(R)?T=f(R):b?(E=!1,T=n($,!0)):A?(E=!1,T=m($,!0)):T=[]:s($)||c($)?(T=R,c(R)?T=p(R):(!l(R)||d(R))&&(T=g($))):E=!1}E&&(L.set($,T),S(T,$,w,M,L),L.delete($)),t(y,x,T)}i.exports=v})),za=j(((e,i)=>{var t=Kr(),n=Yr(),m=ya(),f=Fa(),g=et(),c=ro(),o=to();function h(u,d,l,s,r){u!==d&&m(d,function(a,p){if(r||(r=new t),g(a))f(u,d,p,l,h,s,r);else{var v=s?s(o(u,p),a,p+"",u,d,r):void 0;v===void 0&&(v=a),n(u,p,v)}},c)}i.exports=h})),oo=j(((e,i)=>{function t(n){return n}i.exports=t})),Pa=j(((e,i)=>{function t(n,m,f){switch(f.length){case 0:return n.call(m);case 1:return n.call(m,f[0]);case 2:return n.call(m,f[0],f[1]);case 3:return n.call(m,f[0],f[1],f[2])}return n.apply(m,f)}i.exports=t})),Ha=j(((e,i)=>{var t=Pa(),n=Math.max;function m(f,g,c){return g=n(g===void 0?f.length-1:g,0),function(){for(var o=arguments,h=-1,u=n(o.length-g,0),d=Array(u);++h<u;)d[h]=o[g+h];h=-1;for(var l=Array(g+1);++h<g;)l[h]=o[h];return l[g]=c(d),t(f,this,l)}}i.exports=m})),Wa=j(((e,i)=>{function t(n){return function(){return n}}i.exports=t})),Ba=j(((e,i)=>{var t=Wa(),n=qr(),m=oo(),f=n?function(g,c){return n(g,"toString",{configurable:!0,enumerable:!1,value:t(c),writable:!0})}:m;i.exports=f})),ja=j(((e,i)=>{var t=800,n=16,m=Date.now;function f(g){var c=0,o=0;return function(){var h=m(),u=n-(h-o);if(o=h,u>0){if(++c>=t)return arguments[0]}else c=0;return g.apply(void 0,arguments)}}i.exports=f})),Va=j(((e,i)=>{var t=Ba(),n=ja()(t);i.exports=n})),Ua=j(((e,i)=>{var t=oo(),n=Ha(),m=Va();function f(g,c){return m(n(g,c,t),g+"")}i.exports=f})),Ga=j(((e,i)=>{var t=Vt(),n=$i(),m=Ln(),f=et();function g(c,o,h){if(!f(h))return!1;var u=typeof o;return(u=="number"?n(h)&&m(o,h.length):u=="string"&&o in h)?t(h[o],c):!1}i.exports=g})),Ka=j(((e,i)=>{var t=Ua(),n=Ga();function m(f){return t(function(g,c){var o=-1,h=c.length,u=h>1?c[h-1]:void 0,d=h>2?c[2]:void 0;for(u=f.length>3&&typeof u=="function"?(h--,u):void 0,d&&n(c[0],c[1],d)&&(u=h<3?void 0:u,h=1),g=Object(g);++o<h;){var l=c[o];l&&f(g,l,o,u)}return g})}i.exports=m})),qa=j(((e,i)=>{var t=za(),n=Ka()(function(m,f,g,c){t(m,f,g,c)});i.exports=n})),Ya=Et(qa(),1),Za=()=>crypto.randomUUID().slice(0,8),Qa=()=>Za().slice(0,8),cr=(e="",i)=>{if(!i)return console.warn("utils.match missing argument 2."),!1;const t=/[|\\{}()[\]^*$+?.]/g;let n=typeof i=="string"?[i]:i;n=n.map(f=>f==="*"?"":f.replace(t,"\\$&"));let m=!0;return n.length&&(m=!new RegExp(n.join("|"),"i").exec(e)),m},Xa=(e,i)=>{const t=e.indexOf(i);t!==-1&&e.splice(t,1)},be=e=>{const i=e.className?.match(ul);return i&&cl[i[0]]},st=e=>Array.from(new Set(e)),Me=e=>e?.attrs?.id||e?.id||Qa(),De=(e,i)=>{const t=(n,m)=>{if(Array.isArray(n))return m!=null?st(n.concat(m)):m;if(Array.isArray(m))return n!=null?st(m.concat(n)):m};return(0,Ya.default)({},e,i,t)},He=e=>{let i;const t=e instanceof Promise;if(e===null||typeof e!="object"||t)return e;if(e instanceof Date)return i=new Date,i.setTime(e.getTime()),i;if(Array.isArray(e)){i=[];for(let n=0,m=e.length;n<m;n++)i[n]=He(e[n]);return i}if(e instanceof Object){i={};for(const n in e)Object.hasOwn(e,n)&&(i[n]=He(e[n]));return i}throw new Error("Unable to copy Object, type not supported.")},zi=(e,i)=>e/i*100,dn=e=>`${e.toString()}%`,Rn=Object.create(null,{get:{value:e=>{const i=window.sessionStorage?.getItem(e);try{return JSON.parse(i)}catch{return i}}},set:{value:(e,i)=>{try{return window.sessionStorage?.setItem(e,JSON.stringify(i))}catch(t){console.error(t)}}}}),Te=e=>/^(stage|row|column|field)s./.test(e),Ja=e=>sl.test(e);function so(e,i=zn){let t=0;return function(...n){const m=Date.now();m-t>=i&&(t=m,e.apply(this,n))}}function fi(e,i=at){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>e.apply(this,n),i)}}function un(e){return e}function hn(){}function Li(e=Object.create(null)){if(typeof e=="string")try{return JSON.parse(e)}catch(i){return console.error("Invalid JSON string provided:",i),Object.create(null)}return e}var rt=e=>e?He(Li(e)):wt();function ao(e,i,t,n={}){if(!i||!e[t][i])return n;const m=`${t}.${i}`;n[m]=e[t][i];const f=fl.get(t);if(f){const g=e[t][i].data?.children||[];for(const c of g)ao(e,c,f,n)}return n}var el='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acprefix__rect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="acprefix__layer1"><g id="acprefix__text4203"><g id="acprefix__g4212" transform="translate(0.10112835,0.1001358)"><path id="acprefix__path4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acprefix__path4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agprefix__rect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aiprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="aiprefix__rect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqprefix__g4220"><rect id="aqprefix__rect4191" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqprefix__g4220-6"><rect id="aqprefix__rect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><path d="M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z" transform="rotate(90 9.25 9.25)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><path d="M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z" transform="rotate(90)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><path d="M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-stage" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z" transform="translate(0 2.5)"/></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="arprefix__icomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><path d="M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 32 32" id="f-i-info-circle" xmlns="http://www.w3.org/2000/svg"><path d="m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="avprefix__icomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="axprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="axprefix__namedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="axprefix__path4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-plus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><path d="M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z" transform="rotate(45 77.994 208.636)"/></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bfprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bfprefix__g7209"><path id="bfprefix__rect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgprefix__XMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bhprefix__icomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="biprefix__XMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bjprefix__XMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="boprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>',_n=Vr.name,On=Vr.version,Ri=_n,tl="formeo-sprite",il=`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/${tl}.svg`,nl=`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/formeo.min.css`,rl="https://draggable.github.io/formeo/assets/css/formeo.min.css",lo="f-panel",ot="control-group",kt=`${Ri}-stage`,Ue=`${Ri}-row`,Ge=`${Ri}-column`,Tt=`${Ri}-field`,pn="custom-column-widths",co="column-preset",Pi="resizing-columns",ol=new Map([[kt,Ue],[Ue,Ge],[Ge,Tt]]),In=["stage","row","column","field"],Dn=In.map(e=>`${e}s`),Hh=new Map(Dn.map((e,i)=>[e,In[i]])),sl=new RegExp(`^${Dn.join("|")}.`),uo=[...In],ho=[...Dn],al=new Map(ho.map((e,i)=>[e,uo[i]])),Wh=new RegExp(`^${ho.join("|")}.`),Hi=uo.reduce((e,i)=>(e[i]=i,e),{}),ll=[{name:"controls",className:ot},{name:"stage",className:kt},{name:"row",className:Ue},{name:"column",className:Ge},{name:"field",className:Tt}],Nn={controls:ot,stage:kt,row:Ue,column:Ge,field:Tt},cl=Object.entries(Nn).reduce((e,[i,t])=>(e[t]=i,e),{}),dl=Object.values(Nn),ul=new RegExp(`${dl.join("|")}`,"g"),{childTypeMapVals:po,childTypeIndexMapVals:hl}=ll.reduce((e,{name:i},t,n)=>{const{name:m}=n[t+1]||{};return m&&(e.childTypeMapVals.push([i,m]),e.childTypeIndexMapVals.push([`${i}s`,`${m}s`])),e},{childTypeMapVals:[],childTypeIndexMapVals:[]}),pl=po.slice().map(e=>e.slice().reverse()).reverse(),dr=new Map(po),fl=new Map(hl),gl=new Map(pl.slice()),ml=[[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]],vl=new Map(ml.reduce((e,i,t)=>(e.push([t,i]),e),[])),Fn=`${_n}-formData`,ur=`${_n}-locale`;var at=Math.round(333/2),zn=Math.round(333*2),Bh=Math.round(333/5),fo="formeoSaved",Pn="formeoUpdated",yl="formeoChanged",go="formeoUpdatedStage",mo="formeoUpdatedRow",vo="formeoUpdatedColumn",yo="formeoUpdatedField",bl="formeoCleared",bo="formeoOnRender",wl="formeoConditionUpdated",Hn="formeoAddedRow",Wn="formeoAddedColumn",Bn="formeoAddedField",jn="formeoRemovedRow",Vn="formeoRemovedColumn",Un="formeoRemovedField",wo={equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},Cl={and:"&&",or:"||"},Co={equals:"="},Sl=["logical","source","sourceProperty","comparison","target","targetProperty","assignment","value"],hr=["isChecked","isNotChecked"],pr=["isVisible","isNotVisible"],ni=["value"],xl={comparison:wo,assignment:Co,logical:Cl};var El="then",Gn=()=>({if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],[El]:[{target:"",targetProperty:"",assignment:"",value:""}]}),Al=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)|(\b[0-9a-f]{8}\b)/g,fn=/\bcol-\w+-\d+/g,So="f-i-",wt=()=>({id:Me(),stages:{[Me()]:{}},rows:{},columns:{},fields:{}}),gi=["selected","checked"],kl=gi.toReversed(),Tl=new Map([["config",new Set(["label","helpText","hideLabel","labelAfter","disableHtmlLabel","tooltip"])]]),Ml="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map(e=>String.raw`\s${e}\s`),$l=new RegExp(String.raw`(?!${Ml.join("|")})\w\S*`,"g"),Ll=/\s+/g;function je(e){return typeof e!="string"||e.trim().match(Ll)?e:e.replace($l,i=>i.charAt(0).toUpperCase()+i.substring(1).replace(/[A-Z]/g,t=>` ${t}`))}var xo=(e,i="-")=>e.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,i),lt=e=>{if(Array.isArray(e))return e;const i=/[.[\]]/g,t=[];let n=0,m=i.exec(e);for(;m!==null;)t.push(e.slice(n,m.index)),n=m.index+m[0].length,m=i.exec(e);return n<e.length&&t.push(e.slice(n)),t.filter(Boolean)},fr=(e,i="-")=>lt(e).join(i),Rl=e=>{const i=document.createElement("div");return i.innerHTML=e,i.textContent||i.innerText||""},_l=(e,i,t="…")=>{if(e.length<=i)return e;const n=e.slice(0,i),m=n.lastIndexOf(" ");let f=`${m>0?n.slice(0,m):n}`;return t&&(f+=t),f},Ol=/^attrs\.|^meta\.|^options\.|^config\./g;function mi(e){return e.replaceAll(Ol,"")}var Kn=j(((e,i)=>{var t=At(),n=ut(),m="[object Symbol]";function f(g){return typeof g=="symbol"||n(g)&&t(g)==m}i.exports=f})),Il=j(((e,i)=>{var t=ht(),n=Kn(),m=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/;function g(c,o){if(t(c))return!1;var h=typeof c;return h=="number"||h=="symbol"||h=="boolean"||c==null||n(c)?!0:f.test(c)||!m.test(c)||o!=null&&c in Object(o)}i.exports=g})),Dl=j(((e,i)=>{var t=An(),n="Expected a function";function m(f,g){if(typeof f!="function"||g!=null&&typeof g!="function")throw new TypeError(n);var c=function(){var o=arguments,h=g?g.apply(this,o):o[0],u=c.cache;if(u.has(h))return u.get(h);var d=f.apply(this,o);return c.cache=u.set(h,d)||u,d};return c.cache=new(m.Cache||t),c}m.Cache=t,i.exports=m})),Nl=j(((e,i)=>{var t=Dl(),n=500;function m(f){var g=t(f,function(o){return c.size===n&&c.clear(),o}),c=g.cache;return g}i.exports=m})),Fl=j(((e,i)=>{var t=Nl(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m=/\\(\\)?/g,f=t(function(g){var c=[];return g.charCodeAt(0)===46&&c.push(""),g.replace(n,function(o,h,u,d){c.push(u?d.replace(m,"$1"):h||o)}),c});i.exports=f})),zl=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length,c=Array(g);++f<g;)c[f]=m(n[f],f,n);return c}i.exports=t})),Pl=j(((e,i)=>{var t=ki(),n=zl(),m=ht(),f=Kn(),g=1/0,c=t?t.prototype:void 0,o=c?c.toString:void 0;function h(u){if(typeof u=="string")return u;if(m(u))return n(u,h)+"";if(f(u))return o?o.call(u):"";var d=u+"";return d=="0"&&1/u==-g?"-0":d}i.exports=h})),_i=j(((e,i)=>{var t=Pl();function n(m){return m==null?"":t(m)}i.exports=n})),Eo=j(((e,i)=>{var t=ht(),n=Il(),m=Fl(),f=_i();function g(c,o){return t(c)?c:n(c,o)?[c]:m(f(c))}i.exports=g})),Ao=j(((e,i)=>{var t=Kn(),n=1/0;function m(f){if(typeof f=="string"||t(f))return f;var g=f+"";return g=="0"&&1/f==-n?"-0":g}i.exports=m})),Hl=j(((e,i)=>{var t=Eo(),n=Ao();function m(f,g){g=t(g,f);for(var c=0,o=g.length;f!=null&&c<o;)f=f[n(g[c++])];return c&&c==o?f:void 0}i.exports=m})),Wl=j(((e,i)=>{var t=Hl();function n(m,f,g){var c=m==null?void 0:t(m,f);return c===void 0?g:c}i.exports=n})),Bl=j(((e,i)=>{var t=io(),n=Eo(),m=Ln(),f=et(),g=Ao();function c(o,h,u,d){if(!f(o))return o;h=n(h,o);for(var l=-1,s=h.length,r=s-1,a=o;a!=null&&++l<s;){var p=g(h[l]),v=u;if(p==="__proto__"||p==="constructor"||p==="prototype")return o;if(l!=r){var y=a[p];v=d?d(y,p,a):void 0,v===void 0&&(v=f(y)?y:m(h[l+1])?[]:{})}t(a,p,v),a=a[p]}return o}i.exports=c})),jl=j(((e,i)=>{var t=Bl();function n(m,f,g){return m==null?m:t(m,f,g)}i.exports=n})),Vl=Et(Wl(),1),Ul=Et(jl(),1),we=Vl.default,Oi=Ul.default;function Gl(e,i={}){const t={...e};for(const n in i)Object.hasOwn(i,n)&&(Object.hasOwn(t,n)?Array.isArray(t[n])?t[n].push(i[n]):t[n]=[t[n],i[n]]:t[n]=i[n]);return t}function ri(...e){return e.flat().reduce((i,t)=>(i[t]=t,i),{})}var Kl=j(((e,i)=>{var t="__lodash_hash_undefined__";function n(m){return this.__data__.set(m,t),this}i.exports=n})),ql=j(((e,i)=>{function t(n){return this.__data__.has(n)}i.exports=t})),Yl=j(((e,i)=>{var t=An(),n=Kl(),m=ql();function f(g){var c=-1,o=g==null?0:g.length;for(this.__data__=new t;++c<o;)this.add(g[c])}f.prototype.add=f.prototype.push=n,f.prototype.has=m,i.exports=f})),Zl=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length;++f<g;)if(m(n[f],f,n))return!0;return!1}i.exports=t})),Ql=j(((e,i)=>{function t(n,m){return n.has(m)}i.exports=t})),ko=j(((e,i)=>{var t=Yl(),n=Zl(),m=Ql(),f=1,g=2;function c(o,h,u,d,l,s){var r=u&f,a=o.length,p=h.length;if(a!=p&&!(r&&p>a))return!1;var v=s.get(o),y=s.get(h);if(v&&y)return v==h&&y==o;var k=-1,x=!0,w=u&g?new t:void 0;for(s.set(o,h),s.set(h,o);++k<a;){var S=o[k],M=h[k];if(d)var L=r?d(M,S,k,h,o,s):d(S,M,k,o,h,s);if(L!==void 0){if(L)continue;x=!1;break}if(w){if(!n(h,function(R,$){if(!m(w,$)&&(S===R||l(S,R,u,d,s)))return w.push($)})){x=!1;break}}else if(!(S===M||l(S,M,u,d,s))){x=!1;break}}return s.delete(o),s.delete(h),x}i.exports=c})),Xl=j(((e,i)=>{function t(n){var m=-1,f=Array(n.size);return n.forEach(function(g,c){f[++m]=[c,g]}),f}i.exports=t})),Jl=j(((e,i)=>{function t(n){var m=-1,f=Array(n.size);return n.forEach(function(g){f[++m]=g}),f}i.exports=t})),ec=j(((e,i)=>{var t=ki(),n=Zr(),m=Vt(),f=ko(),g=Xl(),c=Jl(),o=1,h=2,u="[object Boolean]",d="[object Date]",l="[object Error]",s="[object Map]",r="[object Number]",a="[object RegExp]",p="[object Set]",v="[object String]",y="[object Symbol]",k="[object ArrayBuffer]",x="[object DataView]",w=t?t.prototype:void 0,S=w?w.valueOf:void 0;function M(L,R,$,D,T,E,C){switch($){case x:if(L.byteLength!=R.byteLength||L.byteOffset!=R.byteOffset)return!1;L=L.buffer,R=R.buffer;case k:return!(L.byteLength!=R.byteLength||!E(new n(L),new n(R)));case u:case d:case r:return m(+L,+R);case l:return L.name==R.name&&L.message==R.message;case a:case v:return L==R+"";case s:var b=g;case p:var A=D&o;if(b||(b=c),L.size!=R.size&&!A)return!1;var _=C.get(L);if(_)return _==R;D|=h,C.set(L,R);var O=f(b(L),b(R),D,T,E,C);return C.delete(L),O;case y:if(S)return S.call(L)==S.call(R)}return!1}i.exports=M})),tc=j(((e,i)=>{function t(n,m){for(var f=-1,g=m.length,c=n.length;++f<g;)n[c+f]=m[f];return n}i.exports=t})),ic=j(((e,i)=>{var t=tc(),n=ht();function m(f,g,c){var o=g(f);return n(f)?o:t(o,c(f))}i.exports=m})),nc=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length,c=0,o=[];++f<g;){var h=n[f];m(h,f,n)&&(o[c++]=h)}return o}i.exports=t})),rc=j(((e,i)=>{function t(){return[]}i.exports=t})),oc=j(((e,i)=>{var t=nc(),n=rc(),m=Object.prototype.propertyIsEnumerable,f=Object.getOwnPropertySymbols,g=f?function(c){return c==null?[]:(c=Object(c),t(f(c),function(o){return m.call(c,o)}))}:n;i.exports=g})),sc=j(((e,i)=>{var t=Qr()(Object.keys,Object);i.exports=t})),ac=j(((e,i)=>{var t=Tn(),n=sc(),m=Object.prototype.hasOwnProperty;function f(g){if(!t(g))return n(g);var c=[];for(var o in Object(g))m.call(g,o)&&o!="constructor"&&c.push(o);return c}i.exports=f})),lc=j(((e,i)=>{var t=no(),n=ac(),m=$i();function f(g){return m(g)?t(g):n(g)}i.exports=f})),cc=j(((e,i)=>{var t=ic(),n=oc(),m=lc();function f(g){return t(g,m,n)}i.exports=f})),dc=j(((e,i)=>{var t=cc(),n=1,m=Object.prototype.hasOwnProperty;function f(g,c,o,h,u,d){var l=o&n,s=t(g),r=s.length;if(r!=t(c).length&&!l)return!1;for(var a=r;a--;){var p=s[a];if(!(l?p in c:m.call(c,p)))return!1}var v=d.get(g),y=d.get(c);if(v&&y)return v==c&&y==g;var k=!0;d.set(g,c),d.set(c,g);for(var x=l;++a<r;){p=s[a];var w=g[p],S=c[p];if(h)var M=l?h(S,w,p,c,g,d):h(w,S,p,g,c,d);if(!(M===void 0?w===S||u(w,S,o,h,d):M)){k=!1;break}x||(x=p=="constructor")}if(k&&!x){var L=g.constructor,R=c.constructor;L!=R&&"constructor"in g&&"constructor"in c&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(k=!1)}return d.delete(g),d.delete(c),k}i.exports=f})),uc=j(((e,i)=>{var t=dt()(Be(),"DataView");i.exports=t})),hc=j(((e,i)=>{var t=dt()(Be(),"Promise");i.exports=t})),pc=j(((e,i)=>{var t=dt()(Be(),"Set");i.exports=t})),fc=j(((e,i)=>{var t=dt()(Be(),"WeakMap");i.exports=t})),gc=j(((e,i)=>{var t=uc(),n=En(),m=hc(),f=pc(),g=fc(),c=At(),o=Gr(),h="[object Map]",u="[object Object]",d="[object Promise]",l="[object Set]",s="[object WeakMap]",r="[object DataView]",a=o(t),p=o(n),v=o(m),y=o(f),k=o(g),x=c;(t&&x(new t(new ArrayBuffer(1)))!=r||n&&x(new n)!=h||m&&x(m.resolve())!=d||f&&x(new f)!=l||g&&x(new g)!=s)&&(x=function(w){var S=c(w),M=S==u?w.constructor:void 0,L=M?o(M):"";if(L)switch(L){case a:return r;case p:return h;case v:return d;case y:return l;case k:return s}return S}),i.exports=x})),mc=j(((e,i)=>{var t=Kr(),n=ko(),m=ec(),f=dc(),g=gc(),c=ht(),o=Mn(),h=$n(),u=1,d="[object Arguments]",l="[object Array]",s="[object Object]",r=Object.prototype.hasOwnProperty;function a(p,v,y,k,x,w){var S=c(p),M=c(v),L=S?l:g(p),R=M?l:g(v);L=L==d?s:L,R=R==d?s:R;var $=L==s,D=R==s,T=L==R;if(T&&o(p)){if(!o(v))return!1;S=!0,$=!1}if(T&&!$)return w||(w=new t),S||h(p)?n(p,v,y,k,x,w):m(p,v,L,y,k,x,w);if(!(y&u)){var E=$&&r.call(p,"__wrapped__"),C=D&&r.call(v,"__wrapped__");if(E||C){var b=E?p.value():p,A=C?v.value():v;return w||(w=new t),x(b,A,y,k,w)}}return T?(w||(w=new t),f(p,v,y,k,x,w)):!1}i.exports=a})),vc=j(((e,i)=>{var t=mc(),n=ut();function m(f,g,c,o,h){return f===g?!0:f==null||g==null||!n(f)&&!n(g)?f!==f&&g!==g:t(f,g,c,o,m,h)}i.exports=m})),yc=j(((e,i)=>{var t=vc();function n(m,f){return t(m,f)}i.exports=n})),gn=Et(yc(),1),bc=(e,i)=>e===void 0?"added":i===void 0?"removed":(0,gn.default)(e,i)?"unchanged":"changed",qn=class{constructor(e,i=Object.create(null)){this.name=e,this.data=i,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}toJSON=(e,i)=>JSON.stringify(e,null,i);get=e=>we(this.data,e);set(e,i){const t=we(this.data,e),n=Oi(this.data,e,i),m=Array.isArray(e)?e.join("."):e,f=Object.keys(this.setCallbacks).filter(c=>new RegExp(c).test(m)),g={newVal:i,oldVal:t,path:e};for(const c of f)for(const o of this.setCallbacks[c])o(g);if(!this.disableEvents){const c={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+e,value:i,data:n,changeType:bc(t,i),src:this.dom};if(t&&(c.previousValue=t),Q.formeoUpdated(c),this.name){const o={stage:go,row:mo,column:vo,field:yo}[this.name];o&&Q.formeoUpdated(c,o)}}return n}addSetCallback(e,i){this.setCallbacks[e]?this.setCallbacks[e].push(i):this.setCallbacks[e]=[i]}removeSetCallback(e,i){this.setCallbacks[e]=this.setCallbacks[e].filter(t=>t!==i)}add=(e,i=Object.create(null))=>{const{id:t}=i,n=e||t||Me();return this.set(n,i)};remove=e=>{const i=lt(e),t=i.pop(),n=this.get(i);return Array.isArray(n)?n.splice(Number(t),1):n&&delete n[t],n};empty(){this.data=Object.create(null)}getData=()=>Object.entries(this.data).reduce((e,[i,t])=>(e[i]=t?.data?t.getData():t,e),{});setCallbacks={};configVal=Object.create(null)},Ii=class extends qn{load=e=>{const i=Li(e);this.empty();for(const[t,n]of Object.entries(i))this.add(t,n);return this.data};get=e=>e?we(this.data,e):this.add();add=(e,i=Object.create(null))=>{const t=e||Me(),n=this.Component({...i,id:t});this.data[t]=n,this.active=n;const m={row:Hn,column:Wn,field:Bn}[this.name];return m&&Q.formeoUpdated({entity:n,componentId:t,componentType:this.name,data:n.data},m),n};remove=e=>{if(Array.isArray(e))for(const i of e)this.get(i).remove();else this.get(e).remove();return this.data};delete=e=>(delete this.data[e],e);clearAll=(e=!0)=>{const i=Object.values(this.data).map(t=>t.empty(e));return Promise.all(i)};set config(e){this.configVal=De(this.configVal,He(e))}get config(){return this.configVal}conditionMap=new Map};function wc(e,i,t){return(i=Ec(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ke.apply(null,arguments)}function gr(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter(function(m){return Object.getOwnPropertyDescriptor(e,m).enumerable})),t.push.apply(t,n)}return t}function We(e){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?gr(Object(t),!0).forEach(function(n){wc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cc(e,i){if(e==null)return{};var t,n,m=Sc(e,i);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(n=0;n<f.length;n++)t=f[n],i.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(m[t]=e[t])}return m}function Sc(e,i){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(i.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function xc(e,i){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,i||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(e)}function Ec(e){var i=xc(e,"string");return typeof i=="symbol"?i:i+""}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},mn(e)}var Ac="1.15.7";function Ve(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ye=Ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ut=Ve(/Edge/i),mr=Ve(/firefox/i),Dt=Ve(/safari/i)&&!Ve(/chrome/i)&&!Ve(/android/i),Yn=Ve(/iP(ad|od|hone)/i),To=Ve(/chrome/i)&&Ve(/android/i),Mo={capture:!1,passive:!1};function re(e,i,t){e.addEventListener(i,t,!Ye&&Mo)}function ne(e,i,t){e.removeEventListener(i,t,!Ye&&Mo)}function vi(e,i){if(i){if(i[0]===">"&&(i=i.substring(1)),e)try{if(e.matches)return e.matches(i);if(e.msMatchesSelector)return e.msMatchesSelector(i);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(i)}catch{return!1}return!1}}function $o(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function Ie(e,i,t,n){if(e){t=t||document;do{if(i!=null&&(i[0]===">"?e.parentNode===t&&vi(e,i):vi(e,i))||n&&e===t)return e;if(e===t)break}while(e=$o(e))}return null}var vr=/\s+/g;function xe(e,i,t){e&&i&&(e.classList?e.classList[t?"add":"remove"](i):e.className=((" "+e.className+" ").replace(vr," ").replace(" "+i+" "," ")+(t?" "+i:"")).replace(vr," "))}function ee(e,i,t){var n=e&&e.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),i===void 0?t:t[i];!(i in n)&&i.indexOf("webkit")===-1&&(i="-webkit-"+i),n[i]=t+(typeof t=="string"?"":"px")}}function Ct(e,i){var t="";if(typeof e=="string")t=e;else do{var n=ee(e,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!i&&(e=e.parentNode));var m=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return m&&new m(t)}function Lo(e,i,t){if(e){var n=e.getElementsByTagName(i),m=0,f=n.length;if(t)for(;m<f;m++)t(n[m],m);return n}return[]}function Pe(){var e=document.scrollingElement;return e||document.documentElement}function ue(e,i,t,n,m){if(!(!e.getBoundingClientRect&&e!==window)){var f,g,c,o,h,u,d;if(e!==window&&e.parentNode&&e!==Pe()?(f=e.getBoundingClientRect(),g=f.top,c=f.left,o=f.bottom,h=f.right,u=f.height,d=f.width):(g=0,c=0,o=window.innerHeight,h=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(i||t)&&e!==window&&(m=m||e.parentNode,!Ye))do if(m&&m.getBoundingClientRect&&(ee(m,"transform")!=="none"||t&&ee(m,"position")!=="static")){var l=m.getBoundingClientRect();g-=l.top+parseInt(ee(m,"border-top-width")),c-=l.left+parseInt(ee(m,"border-left-width")),o=g+f.height,h=c+f.width;break}while(m=m.parentNode);if(n&&e!==window){var s=Ct(m||e),r=s&&s.a,a=s&&s.d;s&&(g/=a,c/=r,d/=r,u/=a,o=g+u,h=c+d)}return{top:g,left:c,bottom:o,right:h,width:d,height:u}}}function yr(e,i,t){for(var n=Xe(e,!0),m=ue(e)[i];n;){var f=ue(n)[t],g=void 0;if(t==="top"||t==="left"?g=m>=f:g=m<=f,!g)return n;if(n===Pe())break;n=Xe(n,!1)}return!1}function St(e,i,t,n){for(var m=0,f=0,g=e.children;f<g.length;){if(g[f].style.display!=="none"&&g[f]!==J.ghost&&(n||g[f]!==J.dragged)&&Ie(g[f],t.draggable,e,!1)){if(m===i)return g[f];m++}f++}return null}function Zn(e,i){for(var t=e.lastElementChild;t&&(t===J.ghost||ee(t,"display")==="none"||i&&!vi(t,i));)t=t.previousElementSibling;return t||null}function ke(e,i){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==J.clone&&(!i||vi(e,i))&&t++;return t}function br(e){var i=0,t=0,n=Pe();if(e)do{var m=Ct(e),f=m.a,g=m.d;i+=e.scrollLeft*f,t+=e.scrollTop*g}while(e!==n&&(e=e.parentNode));return[i,t]}function kc(e,i){for(var t in e)if(e.hasOwnProperty(t)){for(var n in i)if(i.hasOwnProperty(n)&&i[n]===e[t][n])return Number(t)}return-1}function Xe(e,i){if(!e||!e.getBoundingClientRect)return Pe();var t=e,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var m=ee(t);if(t.clientWidth<t.scrollWidth&&(m.overflowX=="auto"||m.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(m.overflowY=="auto"||m.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Pe();if(n||i)return t;n=!0}}while(t=t.parentNode);return Pe()}function Tc(e,i){if(e&&i)for(var t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}function Wi(e,i){return Math.round(e.top)===Math.round(i.top)&&Math.round(e.left)===Math.round(i.left)&&Math.round(e.height)===Math.round(i.height)&&Math.round(e.width)===Math.round(i.width)}var Nt;function Ro(e,i){return function(){if(!Nt){var t=arguments,n=this;t.length===1?e.call(n,t[0]):e.apply(n,t),Nt=setTimeout(function(){Nt=void 0},i)}}}function Mc(){clearTimeout(Nt),Nt=void 0}function _o(e,i,t){e.scrollLeft+=i,e.scrollTop+=t}function Oo(e){var i=window.Polymer,t=window.jQuery||window.Zepto;return i&&i.dom?i.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function Io(e,i,t){var n={};return Array.from(e.children).forEach(function(m){var f,g,c,o;if(!(!Ie(m,i.draggable,e,!1)||m.animated||m===t)){var h=ue(m);n.left=Math.min((f=n.left)!==null&&f!==void 0?f:1/0,h.left),n.top=Math.min((g=n.top)!==null&&g!==void 0?g:1/0,h.top),n.right=Math.max((c=n.right)!==null&&c!==void 0?c:-1/0,h.right),n.bottom=Math.max((o=n.bottom)!==null&&o!==void 0?o:-1/0,h.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Ce="Sortable"+new Date().getTime();function $c(){var e=[],i;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(!(ee(n,"display")==="none"||n===J.ghost)){e.push({target:n,rect:ue(n)});var m=We({},e[e.length-1].rect);if(n.thisAnimationDuration){var f=Ct(n,!0);f&&(m.top-=f.f,m.left-=f.e)}n.fromRect=m}})},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(kc(e,{target:n}),1)},animateAll:function(n){var m=this;if(!this.options.animation){clearTimeout(i),typeof n=="function"&&n();return}var f=!1,g=0;e.forEach(function(c){var o=0,h=c.target,u=h.fromRect,d=ue(h),l=h.prevFromRect,s=h.prevToRect,r=c.rect,a=Ct(h,!0);a&&(d.top-=a.f,d.left-=a.e),h.toRect=d,h.thisAnimationDuration&&Wi(l,d)&&!Wi(u,d)&&(r.top-d.top)/(r.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(o=Rc(r,l,s,m.options)),Wi(d,u)||(h.prevFromRect=u,h.prevToRect=d,o||(o=m.options.animation),m.animate(h,r,d,o)),o&&(f=!0,g=Math.max(g,o),clearTimeout(h.animationResetTimer),h.animationResetTimer=setTimeout(function(){h.animationTime=0,h.prevFromRect=null,h.fromRect=null,h.prevToRect=null,h.thisAnimationDuration=null},o),h.thisAnimationDuration=o)}),clearTimeout(i),f?i=setTimeout(function(){typeof n=="function"&&n()},g):typeof n=="function"&&n(),e=[]},animate:function(n,m,f,g){if(g){ee(n,"transition",""),ee(n,"transform","");var c=Ct(this.el),o=c&&c.a,h=c&&c.d,u=(m.left-f.left)/(o||1),d=(m.top-f.top)/(h||1);n.animatingX=!!u,n.animatingY=!!d,ee(n,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=Lc(n),ee(n,"transition","transform "+g+"ms"+(this.options.easing?" "+this.options.easing:"")),ee(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){ee(n,"transition",""),ee(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},g)}}}}function Lc(e){return e.offsetWidth}function Rc(e,i,t,n){return Math.sqrt(Math.pow(i.top-e.top,2)+Math.pow(i.left-e.left,2))/Math.sqrt(Math.pow(i.top-t.top,2)+Math.pow(i.left-t.left,2))*n.animation}var pt=[],Bi={initializeByDefault:!0},Gt={mount:function(i){for(var t in Bi)Bi.hasOwnProperty(t)&&!(t in i)&&(i[t]=Bi[t]);pt.forEach(function(n){if(n.pluginName===i.pluginName)throw"Sortable: Cannot mount plugin ".concat(i.pluginName," more than once")}),pt.push(i)},pluginEvent:function(i,t,n){var m=this;this.eventCanceled=!1,n.cancel=function(){m.eventCanceled=!0};var f=i+"Global";pt.forEach(function(g){t[g.pluginName]&&(t[g.pluginName][f]&&t[g.pluginName][f](We({sortable:t},n)),t.options[g.pluginName]&&t[g.pluginName][i]&&t[g.pluginName][i](We({sortable:t},n)))})},initializePlugins:function(i,t,n,m){pt.forEach(function(c){var o=c.pluginName;if(!(!i.options[o]&&!c.initializeByDefault)){var h=new c(i,t,i.options);h.sortable=i,h.options=i.options,i[o]=h,Ke(n,h.defaults)}});for(var f in i.options)if(i.options.hasOwnProperty(f)){var g=this.modifyOption(i,f,i.options[f]);typeof g<"u"&&(i.options[f]=g)}},getEventProperties:function(i,t){var n={};return pt.forEach(function(m){typeof m.eventProperties=="function"&&Ke(n,m.eventProperties.call(t[m.pluginName],i))}),n},modifyOption:function(i,t,n){var m;return pt.forEach(function(f){i[f.pluginName]&&f.optionListeners&&typeof f.optionListeners[t]=="function"&&(m=f.optionListeners[t].call(i[f.pluginName],n))}),m}};function _c(e){var i=e.sortable,t=e.rootEl,n=e.name,m=e.targetEl,f=e.cloneEl,g=e.toEl,c=e.fromEl,o=e.oldIndex,h=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,l=e.originalEvent,s=e.putSortable,r=e.extraEventProperties;if(i=i||t&&t[Ce],!!i){var a,p=i.options,v="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ye&&!Ut?a=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent(n,!0,!0)),a.to=g||t,a.from=c||t,a.item=m||t,a.clone=f,a.oldIndex=o,a.newIndex=h,a.oldDraggableIndex=u,a.newDraggableIndex=d,a.originalEvent=l,a.pullMode=s?s.lastPutMode:void 0;var y=We(We({},r),Gt.getEventProperties(n,i));for(var k in y)a[k]=y[k];t&&t.dispatchEvent(a),p[v]&&p[v].call(i,a)}}var Oc=["evt"],ye=function(i,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=n.evt,f=Cc(n,Oc);Gt.pluginEvent.bind(J)(i,t,We({dragEl:K,parentEl:ce,ghostEl:ie,rootEl:se,nextEl:nt,lastDownEl:oi,cloneEl:ae,cloneHidden:Qe,dragStarted:_t,putSortable:pe,activeSortable:J.active,originalEvent:m,oldIndex:yt,oldDraggableIndex:Ft,newIndex:Ee,newDraggableIndex:Ze,hideGhostForTarget:zo,unhideGhostForTarget:Po,cloneNowHidden:function(){Qe=!0},cloneNowShown:function(){Qe=!1},dispatchSortableEvent:function(c){ve({sortable:t,name:c,originalEvent:m})}},f))};function ve(e){_c(We({putSortable:pe,cloneEl:ae,targetEl:K,rootEl:se,oldIndex:yt,oldDraggableIndex:Ft,newIndex:Ee,newDraggableIndex:Ze},e))}var K,ce,ie,se,nt,oi,ae,Qe,yt,Ee,Ft,Ze,Yt,pe,mt=!1,yi=!1,bi=[],tt,_e,ji,Vi,wr,Cr,_t,ft,zt,Pt=!1,Zt=!1,si,fe,Ui=[],vn=!1,wi=[],Di=typeof document<"u",Qt=Yn,Sr=Ut||Ye?"cssFloat":"float",Ic=Di&&!To&&!Yn&&"draggable"in document.createElement("div"),Do=(function(){if(Di){if(Ye)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),No=function(i,t){var n=ee(i),m=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),f=St(i,0,t),g=St(i,1,t),c=f&&ee(f),o=g&&ee(g),h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+ue(f).width,u=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+ue(g).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(f&&c.float&&c.float!=="none"){var d=c.float==="left"?"left":"right";return g&&(o.clear==="both"||o.clear===d)?"vertical":"horizontal"}return f&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||h>=m&&n[Sr]==="none"||g&&n[Sr]==="none"&&h+u>m)?"vertical":"horizontal"},Dc=function(i,t,n){var m=n?i.left:i.top,f=n?i.right:i.bottom,g=n?i.width:i.height,c=n?t.left:t.top,o=n?t.right:t.bottom,h=n?t.width:t.height;return m===c||f===o||m+g/2===c+h/2},Nc=function(i,t){var n;return bi.some(function(m){var f=m[Ce].options.emptyInsertThreshold;if(!(!f||Zn(m))){var g=ue(m),c=i>=g.left-f&&i<=g.right+f,o=t>=g.top-f&&t<=g.bottom+f;if(c&&o)return n=m}}),n},Fo=function(i){function t(f,g){return function(c,o,h,u){var d=c.options.group.name&&o.options.group.name&&c.options.group.name===o.options.group.name;if(f==null&&(g||d))return!0;if(f==null||f===!1)return!1;if(g&&f==="clone")return f;if(typeof f=="function")return t(f(c,o,h,u),g)(c,o,h,u);var l=(g?c:o).options.group.name;return f===!0||typeof f=="string"&&f===l||f.join&&f.indexOf(l)>-1}}var n={},m=i.group;(!m||mn(m)!="object")&&(m={name:m}),n.name=m.name,n.checkPull=t(m.pull,!0),n.checkPut=t(m.put),n.revertClone=m.revertClone,i.group=n},zo=function(){!Do&&ie&&ee(ie,"display","none")},Po=function(){!Do&&ie&&ee(ie,"display","")};Di&&!To&&document.addEventListener("click",function(e){if(yi)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),yi=!1,!1},!0);var it=function(i){if(K){i=i.touches?i.touches[0]:i;var t=Nc(i.clientX,i.clientY);if(t){var n={};for(var m in i)i.hasOwnProperty(m)&&(n[m]=i[m]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Ce]._onDragOver(n)}}},Fc=function(i){K&&K.parentNode[Ce]._isOutsideThisEl(i.target)};function J(e,i){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=i=Ke({},i),e[Ce]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return No(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(g,c){g.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:J.supportPointer!==!1&&"PointerEvent"in window&&(!Dt||Yn),emptyInsertThreshold:5};Gt.initializePlugins(this,e,t);for(var n in t)!(n in i)&&(i[n]=t[n]);Fo(i);for(var m in this)m.charAt(0)==="_"&&typeof this[m]=="function"&&(this[m]=this[m].bind(this));this.nativeDraggable=i.forceFallback?!1:Ic,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?re(e,"pointerdown",this._onTapStart):(re(e,"mousedown",this._onTapStart),re(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(re(e,"dragover",this),re(e,"dragenter",this)),bi.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),Ke(this,$c())}J.prototype={constructor:J,_isOutsideThisEl:function(i){!this.el.contains(i)&&i!==this.el&&(ft=null)},_getDirection:function(i,t){return typeof this.options.direction=="function"?this.options.direction.call(this,i,t,K):this.options.direction},_onTapStart:function(i){if(i.cancelable){var t=this,n=this.el,m=this.options,f=m.preventOnFilter,g=i.type,c=i.touches&&i.touches[0]||i.pointerType&&i.pointerType==="touch"&&i,o=(c||i).target,h=i.target.shadowRoot&&(i.path&&i.path[0]||i.composedPath&&i.composedPath()[0])||o,u=m.filter;if(Uc(n),!K&&!(/mousedown|pointerdown/.test(g)&&i.button!==0||m.disabled)&&!h.isContentEditable&&!(!this.nativeDraggable&&Dt&&o&&o.tagName.toUpperCase()==="SELECT")&&(o=Ie(o,m.draggable,n,!1),!(o&&o.animated)&&oi!==o)){if(yt=ke(o),Ft=ke(o,m.draggable),typeof u=="function"){if(u.call(this,i,o,this)){ve({sortable:t,rootEl:h,name:"filter",targetEl:o,toEl:n,fromEl:n}),ye("filter",t,{evt:i}),f&&i.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=Ie(h,d.trim(),n,!1),d)return ve({sortable:t,rootEl:d,name:"filter",targetEl:o,fromEl:n,toEl:n}),ye("filter",t,{evt:i}),!0}),u)){f&&i.preventDefault();return}m.handle&&!Ie(h,m.handle,n,!1)||this._prepareDragStart(i,c,o)}}},_prepareDragStart:function(i,t,n){var m=this,f=m.el,g=m.options,c=f.ownerDocument,o;if(n&&!K&&n.parentNode===f){var h=ue(n);if(se=f,K=n,ce=K.parentNode,nt=K.nextSibling,oi=n,Yt=g.group,J.dragged=K,tt={target:K,clientX:(t||i).clientX,clientY:(t||i).clientY},wr=tt.clientX-h.left,Cr=tt.clientY-h.top,this._lastX=(t||i).clientX,this._lastY=(t||i).clientY,K.style["will-change"]="all",o=function(){if(ye("delayEnded",m,{evt:i}),J.eventCanceled){m._onDrop();return}m._disableDelayedDragEvents(),!mr&&m.nativeDraggable&&(K.draggable=!0),m._triggerDragStart(i,t),ve({sortable:m,name:"choose",originalEvent:i}),xe(K,g.chosenClass,!0)},g.ignore.split(",").forEach(function(u){Lo(K,u.trim(),Gi)}),re(c,"dragover",it),re(c,"mousemove",it),re(c,"touchmove",it),g.supportPointer?(re(c,"pointerup",m._onDrop),!this.nativeDraggable&&re(c,"pointercancel",m._onDrop)):(re(c,"mouseup",m._onDrop),re(c,"touchend",m._onDrop),re(c,"touchcancel",m._onDrop)),mr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),ye("delayStart",this,{evt:i}),g.delay&&(!g.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ut||Ye))){if(J.eventCanceled){this._onDrop();return}g.supportPointer?(re(c,"pointerup",m._disableDelayedDrag),re(c,"pointercancel",m._disableDelayedDrag)):(re(c,"mouseup",m._disableDelayedDrag),re(c,"touchend",m._disableDelayedDrag),re(c,"touchcancel",m._disableDelayedDrag)),re(c,"mousemove",m._delayedDragTouchMoveHandler),re(c,"touchmove",m._delayedDragTouchMoveHandler),g.supportPointer&&re(c,"pointermove",m._delayedDragTouchMoveHandler),m._dragStartTimer=setTimeout(o,g.delay)}else o()}},_delayedDragTouchMoveHandler:function(i){var t=i.touches?i.touches[0]:i;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Gi(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var i=this.el.ownerDocument;ne(i,"mouseup",this._disableDelayedDrag),ne(i,"touchend",this._disableDelayedDrag),ne(i,"touchcancel",this._disableDelayedDrag),ne(i,"pointerup",this._disableDelayedDrag),ne(i,"pointercancel",this._disableDelayedDrag),ne(i,"mousemove",this._delayedDragTouchMoveHandler),ne(i,"touchmove",this._delayedDragTouchMoveHandler),ne(i,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(i,t){t=t||i.pointerType=="touch"&&i,!this.nativeDraggable||t?this.options.supportPointer?re(document,"pointermove",this._onTouchMove):t?re(document,"touchmove",this._onTouchMove):re(document,"mousemove",this._onTouchMove):(re(K,"dragend",this),re(se,"dragstart",this._onDragStart));try{document.selection?ai(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(i,t){if(mt=!1,se&&K){ye("dragStarted",this,{evt:t}),this.nativeDraggable&&re(document,"dragover",Fc);var n=this.options;!i&&xe(K,n.dragClass,!1),xe(K,n.ghostClass,!0),J.active=this,i&&this._appendGhost(),ve({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(_e){this._lastX=_e.clientX,this._lastY=_e.clientY,zo();for(var i=document.elementFromPoint(_e.clientX,_e.clientY),t=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(_e.clientX,_e.clientY),i!==t);)t=i;if(K.parentNode[Ce]._isOutsideThisEl(i),t)do{if(t[Ce]){var n=void 0;if(n=t[Ce]._onDragOver({clientX:_e.clientX,clientY:_e.clientY,target:i,rootEl:t}),n&&!this.options.dragoverBubble)break}i=t}while(t=$o(t));Po()}},_onTouchMove:function(i){if(tt){var t=this.options,n=t.fallbackTolerance,m=t.fallbackOffset,f=i.touches?i.touches[0]:i,g=ie&&Ct(ie,!0),c=ie&&g&&g.a,o=ie&&g&&g.d,h=Qt&&fe&&br(fe),u=(f.clientX-tt.clientX+m.x)/(c||1)+(h?h[0]-Ui[0]:0)/(c||1),d=(f.clientY-tt.clientY+m.y)/(o||1)+(h?h[1]-Ui[1]:0)/(o||1);if(!J.active&&!mt){if(n&&Math.max(Math.abs(f.clientX-this._lastX),Math.abs(f.clientY-this._lastY))<n)return;this._onDragStart(i,!0)}if(ie){g?(g.e+=u-(ji||0),g.f+=d-(Vi||0)):g={a:1,b:0,c:0,d:1,e:u,f:d};var l="matrix(".concat(g.a,",").concat(g.b,",").concat(g.c,",").concat(g.d,",").concat(g.e,",").concat(g.f,")");ee(ie,"webkitTransform",l),ee(ie,"mozTransform",l),ee(ie,"msTransform",l),ee(ie,"transform",l),ji=u,Vi=d,_e=f}i.cancelable&&i.preventDefault()}},_appendGhost:function(){if(!ie){var i=this.options.fallbackOnBody?document.body:se,t=ue(K,!0,Qt,!0,i),n=this.options;if(Qt){for(fe=i;ee(fe,"position")==="static"&&ee(fe,"transform")==="none"&&fe!==document;)fe=fe.parentNode;fe!==document.body&&fe!==document.documentElement?(fe===document&&(fe=Pe()),t.top+=fe.scrollTop,t.left+=fe.scrollLeft):fe=Pe(),Ui=br(fe)}ie=K.cloneNode(!0),xe(ie,n.ghostClass,!1),xe(ie,n.fallbackClass,!0),xe(ie,n.dragClass,!0),ee(ie,"transition",""),ee(ie,"transform",""),ee(ie,"box-sizing","border-box"),ee(ie,"margin",0),ee(ie,"top",t.top),ee(ie,"left",t.left),ee(ie,"width",t.width),ee(ie,"height",t.height),ee(ie,"opacity","0.8"),ee(ie,"position",Qt?"absolute":"fixed"),ee(ie,"zIndex","100000"),ee(ie,"pointerEvents","none"),J.ghost=ie,i.appendChild(ie),ee(ie,"transform-origin",wr/parseInt(ie.style.width)*100+"% "+Cr/parseInt(ie.style.height)*100+"%")}},_onDragStart:function(i,t){var n=this,m=i.dataTransfer,f=n.options;if(ye("dragStart",this,{evt:i}),J.eventCanceled){this._onDrop();return}ye("setupClone",this),J.eventCanceled||(ae=Oo(K),ae.removeAttribute("id"),ae.draggable=!1,ae.style["will-change"]="",this._hideClone(),xe(ae,this.options.chosenClass,!1),J.clone=ae),n.cloneId=ai(function(){ye("clone",n),!J.eventCanceled&&(n.options.removeCloneOnHide||se.insertBefore(ae,K),n._hideClone(),ve({sortable:n,name:"clone"}))}),!t&&xe(K,f.dragClass,!0),t?(yi=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ne(document,"mouseup",n._onDrop),ne(document,"touchend",n._onDrop),ne(document,"touchcancel",n._onDrop),m&&(m.effectAllowed="move",f.setData&&f.setData.call(n,m,K)),re(document,"drop",n),ee(K,"transform","translateZ(0)")),mt=!0,n._dragStartId=ai(n._dragStarted.bind(n,t,i)),re(document,"selectstart",n),_t=!0,window.getSelection().removeAllRanges(),Dt&&ee(document.body,"user-select","none")},_onDragOver:function(i){var t=this.el,n=i.target,m,f,g,c=this.options,o=c.group,h=J.active,u=Yt===o,d=c.sort,l=pe||h,s,r=this,a=!1;if(vn)return;function p(O,I){ye(O,r,We({evt:i,isOwner:u,axis:s?"vertical":"horizontal",revert:g,dragRect:m,targetRect:f,canSort:d,fromSortable:l,target:n,completed:y,onMove:function(F,z){return Xt(se,t,K,m,F,ue(F),i,z)},changed:k},I))}function v(){p("dragOverAnimationCapture"),r.captureAnimationState(),r!==l&&l.captureAnimationState()}function y(O){return p("dragOverCompleted",{insertion:O}),O&&(u?h._hideClone():h._showClone(r),r!==l&&(xe(K,pe?pe.options.ghostClass:h.options.ghostClass,!1),xe(K,c.ghostClass,!0)),pe!==r&&r!==J.active?pe=r:r===J.active&&pe&&(pe=null),l===r&&(r._ignoreWhileAnimating=n),r.animateAll(function(){p("dragOverAnimationComplete"),r._ignoreWhileAnimating=null}),r!==l&&(l.animateAll(),l._ignoreWhileAnimating=null)),(n===K&&!K.animated||n===t&&!n.animated)&&(ft=null),!c.dragoverBubble&&!i.rootEl&&n!==document&&(K.parentNode[Ce]._isOutsideThisEl(i.target),!O&&it(i)),!c.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),a=!0}function k(){Ee=ke(K),Ze=ke(K,c.draggable),ve({sortable:r,name:"change",toEl:t,newIndex:Ee,newDraggableIndex:Ze,originalEvent:i})}if(i.preventDefault!==void 0&&i.cancelable&&i.preventDefault(),n=Ie(n,c.draggable,t,!0),p("dragOver"),J.eventCanceled)return a;if(K.contains(i.target)||n.animated&&n.animatingX&&n.animatingY||r._ignoreWhileAnimating===n)return y(!1);if(yi=!1,h&&!c.disabled&&(u?d||(g=ce!==se):pe===this||(this.lastPutMode=Yt.checkPull(this,h,K,i))&&o.checkPut(this,h,K,i))){if(s=this._getDirection(i,n)==="vertical",m=ue(K),p("dragOverValid"),J.eventCanceled)return a;if(g)return ce=se,v(),this._hideClone(),p("revert"),J.eventCanceled||(nt?se.insertBefore(K,nt):se.appendChild(K)),y(!0);var x=Zn(t,c.draggable);if(!x||Wc(i,s,this)&&!x.animated){if(x===K)return y(!1);if(x&&t===i.target&&(n=x),n&&(f=ue(n)),Xt(se,t,K,m,n,f,i,!!n)!==!1)return v(),x&&x.nextSibling?t.insertBefore(K,x.nextSibling):t.appendChild(K),ce=t,k(),y(!0)}else if(x&&Hc(i,s,this)){var w=St(t,0,c,!0);if(w===K)return y(!1);if(n=w,f=ue(n),Xt(se,t,K,m,n,f,i,!1)!==!1)return v(),t.insertBefore(K,w),ce=t,k(),y(!0)}else if(n.parentNode===t){f=ue(n);var S=0,M,L=K.parentNode!==t,R=!Dc(K.animated&&K.toRect||m,n.animated&&n.toRect||f,s),$=s?"top":"left",D=yr(n,"top","top")||yr(K,"top","top"),T=D?D.scrollTop:void 0;ft!==n&&(M=f[$],Pt=!1,Zt=!R&&c.invertSwap||L),S=Bc(i,n,f,s,R?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,Zt,ft===n);var E;if(S!==0){var C=ke(K);do C-=S,E=ce.children[C];while(E&&(ee(E,"display")==="none"||E===ie))}if(S===0||E===n)return y(!1);ft=n,zt=S;var b=n.nextElementSibling,A=!1;A=S===1;var _=Xt(se,t,K,m,n,f,i,A);if(_!==!1)return(_===1||_===-1)&&(A=_===1),vn=!0,setTimeout(Pc,30),v(),A&&!b?t.appendChild(K):n.parentNode.insertBefore(K,A?b:n),D&&_o(D,0,T-D.scrollTop),ce=K.parentNode,M!==void 0&&!Zt&&(si=Math.abs(M-ue(n)[$])),k(),y(!0)}if(t.contains(K))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ne(document,"mousemove",this._onTouchMove),ne(document,"touchmove",this._onTouchMove),ne(document,"pointermove",this._onTouchMove),ne(document,"dragover",it),ne(document,"mousemove",it),ne(document,"touchmove",it)},_offUpEvents:function(){var i=this.el.ownerDocument;ne(i,"mouseup",this._onDrop),ne(i,"touchend",this._onDrop),ne(i,"pointerup",this._onDrop),ne(i,"pointercancel",this._onDrop),ne(i,"touchcancel",this._onDrop),ne(document,"selectstart",this)},_onDrop:function(i){var t=this.el,n=this.options;if(Ee=ke(K),Ze=ke(K,n.draggable),ye("drop",this,{evt:i}),ce=K&&K.parentNode,Ee=ke(K),Ze=ke(K,n.draggable),J.eventCanceled){this._nulling();return}mt=!1,Zt=!1,Pt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yn(this.cloneId),yn(this._dragStartId),this.nativeDraggable&&(ne(document,"drop",this),ne(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Dt&&ee(document.body,"user-select",""),ee(K,"transform",""),i&&(_t&&(i.cancelable&&i.preventDefault(),!n.dropBubble&&i.stopPropagation()),ie&&ie.parentNode&&ie.parentNode.removeChild(ie),(se===ce||pe&&pe.lastPutMode!=="clone")&&ae&&ae.parentNode&&ae.parentNode.removeChild(ae),K&&(this.nativeDraggable&&ne(K,"dragend",this),Gi(K),K.style["will-change"]="",_t&&!mt&&xe(K,pe?pe.options.ghostClass:this.options.ghostClass,!1),xe(K,this.options.chosenClass,!1),ve({sortable:this,name:"unchoose",toEl:ce,newIndex:null,newDraggableIndex:null,originalEvent:i}),se!==ce?(Ee>=0&&(ve({rootEl:ce,name:"add",toEl:ce,fromEl:se,originalEvent:i}),ve({sortable:this,name:"remove",toEl:ce,originalEvent:i}),ve({rootEl:ce,name:"sort",toEl:ce,fromEl:se,originalEvent:i}),ve({sortable:this,name:"sort",toEl:ce,originalEvent:i})),pe&&pe.save()):Ee!==yt&&Ee>=0&&(ve({sortable:this,name:"update",toEl:ce,originalEvent:i}),ve({sortable:this,name:"sort",toEl:ce,originalEvent:i})),J.active&&((Ee==null||Ee===-1)&&(Ee=yt,Ze=Ft),ve({sortable:this,name:"end",toEl:ce,originalEvent:i}),this.save()))),this._nulling()},_nulling:function(){ye("nulling",this),se=K=ce=ie=nt=ae=oi=Qe=tt=_e=_t=Ee=Ze=yt=Ft=ft=zt=pe=Yt=J.dragged=J.ghost=J.clone=J.active=null;var i=this.el;wi.forEach(function(t){i.contains(t)&&(t.checked=!0)}),wi.length=ji=Vi=0},handleEvent:function(i){switch(i.type){case"drop":case"dragend":this._onDrop(i);break;case"dragenter":case"dragover":K&&(this._onDragOver(i),zc(i));break;case"selectstart":i.preventDefault();break}},toArray:function(){for(var i=[],t,n=this.el.children,m=0,f=n.length,g=this.options;m<f;m++)t=n[m],Ie(t,g.draggable,this.el,!1)&&i.push(t.getAttribute(g.dataIdAttr)||Vc(t));return i},sort:function(i,t){var n={},m=this.el;this.toArray().forEach(function(f,g){var c=m.children[g];Ie(c,this.options.draggable,m,!1)&&(n[f]=c)},this),t&&this.captureAnimationState(),i.forEach(function(f){n[f]&&(m.removeChild(n[f]),m.appendChild(n[f]))}),t&&this.animateAll()},save:function(){var i=this.options.store;i&&i.set&&i.set(this)},closest:function(i,t){return Ie(i,t||this.options.draggable,this.el,!1)},option:function(i,t){var n=this.options;if(t===void 0)return n[i];var m=Gt.modifyOption(this,i,t);typeof m<"u"?n[i]=m:n[i]=t,i==="group"&&Fo(n)},destroy:function(){ye("destroy",this);var i=this.el;i[Ce]=null,ne(i,"mousedown",this._onTapStart),ne(i,"touchstart",this._onTapStart),ne(i,"pointerdown",this._onTapStart),this.nativeDraggable&&(ne(i,"dragover",this),ne(i,"dragenter",this)),Array.prototype.forEach.call(i.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),bi.splice(bi.indexOf(this.el),1),this.el=i=null},_hideClone:function(){if(!Qe){if(ye("hideClone",this),J.eventCanceled)return;ee(ae,"display","none"),this.options.removeCloneOnHide&&ae.parentNode&&ae.parentNode.removeChild(ae),Qe=!0}},_showClone:function(i){if(i.lastPutMode!=="clone"){this._hideClone();return}if(Qe){if(ye("showClone",this),J.eventCanceled)return;K.parentNode==se&&!this.options.group.revertClone?se.insertBefore(ae,K):nt?se.insertBefore(ae,nt):se.appendChild(ae),this.options.group.revertClone&&this.animate(K,ae),ee(ae,"display",""),Qe=!1}}};function zc(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Xt(e,i,t,n,m,f,g,c){var o,h=e[Ce],u=h.options.onMove,d;return window.CustomEvent&&!Ye&&!Ut?o=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(o=document.createEvent("Event"),o.initEvent("move",!0,!0)),o.to=i,o.from=e,o.dragged=t,o.draggedRect=n,o.related=m||i,o.relatedRect=f||ue(i),o.willInsertAfter=c,o.originalEvent=g,e.dispatchEvent(o),u&&(d=u.call(h,o,g)),d}function Gi(e){e.draggable=!1}function Pc(){vn=!1}function Hc(e,i,t){var n=ue(St(t.el,0,t.options,!0)),m=Io(t.el,t.options,ie),f=10;return i?e.clientX<m.left-f||e.clientY<n.top&&e.clientX<n.right:e.clientY<m.top-f||e.clientY<n.bottom&&e.clientX<n.left}function Wc(e,i,t){var n=ue(Zn(t.el,t.options.draggable)),m=Io(t.el,t.options,ie),f=10;return i?e.clientX>m.right+f||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>m.bottom+f||e.clientX>n.right&&e.clientY>n.top}function Bc(e,i,t,n,m,f,g,c){var o=n?e.clientY:e.clientX,h=n?t.height:t.width,u=n?t.top:t.left,d=n?t.bottom:t.right,l=!1;if(!g){if(c&&si<h*m){if(!Pt&&(zt===1?o>u+h*f/2:o<d-h*f/2)&&(Pt=!0),Pt)l=!0;else if(zt===1?o<u+si:o>d-si)return-zt}else if(o>u+h*(1-m)/2&&o<d-h*(1-m)/2)return jc(i)}return l=l||g,l&&(o<u+h*f/2||o>d-h*f/2)?o>u+h/2?1:-1:0}function jc(e){return ke(K)<ke(e)?1:-1}function Vc(e){for(var i=e.tagName+e.className+e.src+e.href+e.textContent,t=i.length,n=0;t--;)n+=i.charCodeAt(t);return n.toString(36)}function Uc(e){wi.length=0;for(var i=e.getElementsByTagName("input"),t=i.length;t--;){var n=i[t];n.checked&&wi.push(n)}}function ai(e){return setTimeout(e,0)}function yn(e){return clearTimeout(e)}Di&&re(document,"touchmove",function(e){(J.active||mt)&&e.cancelable&&e.preventDefault()});J.utils={on:re,off:ne,css:ee,find:Lo,is:function(i,t){return!!Ie(i,t,i,!1)},extend:Tc,throttle:Ro,closest:Ie,toggleClass:xe,clone:Oo,index:ke,nextTick:ai,cancelNextTick:yn,detectDirection:No,getChild:St,expando:Ce};J.get=function(e){return e[Ce]};J.mount=function(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];i[0].constructor===Array&&(i=i[0]),i.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(J.utils=We(We({},J.utils),n.utils)),Gt.mount(n)})};J.create=function(e,i){return new J(e,i)};J.version=Ac;var de=[],Ot,bn,wn=!1,Ki,qi,Ci,It;function Gc(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?re(document,"dragover",this._handleAutoScroll):this.options.supportPointer?re(document,"pointermove",this._handleFallbackAutoScroll):n.touches?re(document,"touchmove",this._handleFallbackAutoScroll):re(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ne(document,"dragover",this._handleAutoScroll):(ne(document,"pointermove",this._handleFallbackAutoScroll),ne(document,"touchmove",this._handleFallbackAutoScroll),ne(document,"mousemove",this._handleFallbackAutoScroll)),xr(),li(),Mc()},nulling:function(){Ci=bn=Ot=wn=It=Ki=qi=null,de.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var m=this,f=(t.touches?t.touches[0]:t).clientX,g=(t.touches?t.touches[0]:t).clientY,c=document.elementFromPoint(f,g);if(Ci=t,n||this.options.forceAutoScrollFallback||Ut||Ye||Dt){Yi(t,this.options,c,n);var o=Xe(c,!0);wn&&(!It||f!==Ki||g!==qi)&&(It&&xr(),It=setInterval(function(){var h=Xe(document.elementFromPoint(f,g),!0);h!==o&&(o=h,li()),Yi(t,m.options,h,n)},10),Ki=f,qi=g)}else{if(!this.options.bubbleScroll||Xe(c,!0)===Pe()){li();return}Yi(t,this.options,Xe(c,!1),!1)}}},Ke(e,{pluginName:"scroll",initializeByDefault:!0})}function li(){de.forEach(function(e){clearInterval(e.pid)}),de=[]}function xr(){clearInterval(It)}var Yi=Ro(function(e,i,t,n){if(i.scroll){var m=(e.touches?e.touches[0]:e).clientX,f=(e.touches?e.touches[0]:e).clientY,g=i.scrollSensitivity,c=i.scrollSpeed,o=Pe(),h=!1,u;bn!==t&&(bn=t,li(),Ot=i.scroll,u=i.scrollFn,Ot===!0&&(Ot=Xe(t,!0)));var d=0,l=Ot;do{var s=l,r=ue(s),a=r.top,p=r.bottom,v=r.left,y=r.right,k=r.width,x=r.height,w=void 0,S=void 0,M=s.scrollWidth,L=s.scrollHeight,R=ee(s),$=s.scrollLeft,D=s.scrollTop;s===o?(w=k<M&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),S=x<L&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(w=k<M&&(R.overflowX==="auto"||R.overflowX==="scroll"),S=x<L&&(R.overflowY==="auto"||R.overflowY==="scroll"));var T=w&&(Math.abs(y-m)<=g&&$+k<M)-(Math.abs(v-m)<=g&&!!$),E=S&&(Math.abs(p-f)<=g&&D+x<L)-(Math.abs(a-f)<=g&&!!D);if(!de[d])for(var C=0;C<=d;C++)de[C]||(de[C]={});(de[d].vx!=T||de[d].vy!=E||de[d].el!==s)&&(de[d].el=s,de[d].vx=T,de[d].vy=E,clearInterval(de[d].pid),(T!=0||E!=0)&&(h=!0,de[d].pid=setInterval(function(){n&&this.layer===0&&J.active._onTouchMove(Ci);var b=de[this.layer].vy?de[this.layer].vy*c:0,A=de[this.layer].vx?de[this.layer].vx*c:0;typeof u=="function"&&u.call(J.dragged.parentNode[Ce],A,b,e,Ci,de[this.layer].el)!=="continue"||_o(de[this.layer].el,A,b)}.bind({layer:d}),24))),d++}while(i.bubbleScroll&&l!==o&&(l=Xe(l,!1)));wn=h}},30),Ho=function(i){var t=i.originalEvent,n=i.putSortable,m=i.dragEl,f=i.activeSortable,g=i.dispatchSortableEvent,c=i.hideGhostForTarget,o=i.unhideGhostForTarget;if(t){var h=n||f;c();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(u.clientX,u.clientY);o(),h&&!h.el.contains(d)&&(g("spill"),this.onSpill({dragEl:m,putSortable:n}))}};function Qn(){}Qn.prototype={startIndex:null,dragStart:function(i){var t=i.oldDraggableIndex;this.startIndex=t},onSpill:function(i){var t=i.dragEl,n=i.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var m=St(this.sortable.el,this.startIndex,this.options);m?this.sortable.el.insertBefore(t,m):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Ho};Ke(Qn,{pluginName:"revertOnSpill"});function Xn(){}Xn.prototype={onSpill:function(i){var t=i.dragEl,n=i.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Ho};Ke(Xn,{pluginName:"removeOnSpill"});J.mount(new Gc);J.mount(Xn,Qn);var me={getStyle:(e,i=!1)=>{let t;return window.getComputedStyle?t=window.getComputedStyle(e,null):e.currentStyle&&(t=e.currentStyle),i?t[i]:t},fadeOut:(e,i=250)=>{const t=1/(i/60);e.style.opacity=1,(function n(){const m=Number(e.style.opacity)-t;m>0?(e.style.opacity=m,window.requestAnimationFrame(n)):e.remove()})()},slideDown:(e,i=250,t=!1)=>{e.style.display="block";const n=me.getStyle(e),m=Number.parseInt(n.height,10),f=m/(i/60);e.style.height="0px",(function g(){const c=Number.parseFloat(e.style.height),o=c+f;c<m?(e.style.height=`${o}px`,window.requestAnimationFrame(g)):(e.style.height="auto",t&&t(e))})()},slideUp:(e,i=250,t=!1)=>{const n=me.getStyle(e),m=Number.parseInt(n.height,10),f=n.overflow;e.style.overflow="hidden",e.style.height=`${m}px`;const g=n.minHeight;e.style.minHeight="auto";const c=parseFloat(m/(i/60)).toFixed(2);(function o(){const h=Number.parseInt(e.style.height,10)-c;h>0?(e.style.height=`${h}px`,window.requestAnimationFrame(o)):(e.style.overflow=f,e.style.display="none",e.style.minHeight=g,delete e.style.height,t&&t(e))})()},slideToggle:(e,i=250,t=me.getStyle(e,"display")==="none")=>{t?me.slideDown(e,i):me.slideUp(e,i)}},Wo=e=>Number.isInteger(Number(e)),Je=e=>{let i=0,t=e;for(;t?.previousElementSibling;)t=t.previousElementSibling,i++;return i},Si=(e,i,t)=>{const n=t.split("||");return st(st(i).map(m=>e.find(f=>{const g=n.find(c=>!!we(f,c));return g&&we(f,g)===m})).filter(Boolean).concat(e))},Ni=(e,i,t)=>{for(let n=0;n<e.length;n++)i.call(t,e[n],n)},Jn=(e,i)=>{const t=[];return Ni(e,(n,m)=>t.push(i(n,m))),t},Zi={},Bo=e=>{const i={className:"class"};if(Zi[e])return Zi[e];const t=(i[e]||e).replace(/^\d+/,"").replace(/[^a-zA-Z0-9-:]/g,"");return Zi[e]=t,t},jo=e=>e.replace(/\b\w/g,i=>i.toUpperCase()),Kc=e=>window.JSON.parse(window.JSON.stringify(e)),qc=(e,i)=>i.filter(t=>!~e.indexOf(t)),Ae={capitalize:jo,safeAttrName:Bo,forEach:Ni,copyObj:Kc,map:Jn,subtract:qc,indexOfNode:Je,isInt:Wo,get:we,orderObjectsBy:Si},$e={js:new Set,css:new Set,formeoSprite:null},Er=(e,i,t=hn)=>new Promise(n=>fetch(e).then(m=>{if(!m.ok)return n(t(m));n(i?i(m):m)}).catch(m=>t(m))),Vo=(e,i)=>{e.removeEventListener("load",Vo),i(e.src)},Uo=(e,i)=>{e.removeEventListener("load",Uo),i(e.src)},Yc=e=>new Promise((i,t)=>{if($e.js.has(e))return i(e);$e.js.add(e);const n=V.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:e},action:{load:()=>Uo(n,i),error:()=>t(new Error(`${e} failed to load.`))}});document.head.appendChild(n)}),Cn=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>new Promise((n,m)=>{if($e.css.has(t))return n(t);$e.css.add(t);const f=V.create({tag:"link",attrs:{rel:"stylesheet",href:t},action:{load:()=>Vo(f,n),error:()=>m(new Error(`${t} failed to load.`))}});document.head.appendChild(f)}));return Promise.all(i)},Zc=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>Yc(t));return Promise.all(i)},Qc=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>Cn(t));return Promise.all(i)},Ar=e=>($e.formeoSprite=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,$e.formeoSprite),Xc=async(e=null)=>{if($e.formeoSprite)return $e.formeoSprite;if(!e)return Ar(el);const i=async t=>Ar(await t.text());return Er(e,i,()=>Er(il,i))},Jc={js:Zc,css:Qc},Go=e=>{const i=Object.entries(e).map(([t,n])=>Jc[t](n));return Promise.all(i)},ed=async e=>{if(e&&!$e.css.has(e)&&(await Cn(e),!$e.css.has(e)&&!$e.css.has("https://draggable.github.io/formeo/assets/css/formeo.min.css")))return await Cn(rl)},td={glyphicons:e=>`<span class="glyphicon glyphicon-${e}" aria-hidden="true"></span>`,"font-awesome":e=>{const[i,t]=e.split(" ");return`<i class="${i} fa-${t}"></i>`},fontello:e=>`<i class="${So}${e}">${e}</i>`},id=new Set(["input","textarea","select"]),nd=e=>e.replace(/^on([A-Z])/,(i,t)=>t.toLowerCase()),rd=new Set(["focus","blur"]),od=e=>{const i=nd(e);return(t,n)=>t.addEventListener(i,n,rd.has(i))},Ko=(e={})=>{let i=e?.attrs?.name||e?.name;if(i)return i;const t=Me(e);let n=e.config?.label||e.attrs?.label||e?.label;return n&&(typeof n=="object"&&(n=V.create(n).textContent),/^<.+>.+<.+>$/gim.test(n)&&(n=Rl(n)),i=`${t}-${xo(_l(n,24,null))}`),i||t},sd=class{constructor(e=Object.create(null)){this.options=e}set setOptions(e){this.options=De(this.options,e)}processElemArg(e){let i=e,t;if(typeof i=="string")return t=i,i={tag:t},i;if(i.attrs){const{tag:n,...m}=i.attrs;n&&(typeof n=="string"?t=n:t=(n.find(f=>f.selected===!0)||n[0]).value),i.attrs=m}return i.tag=t||i.tag||"div",i}render=e=>(e.id=`f-${e.id||Me()}`,this.create(e));create=(e,i=!1)=>{if(!e)return;if(this.isDOMElement(e))return e;const t=this,n=["children","content"],{className:m,options:f,dataset:g,...c}=this.processElemArg(e);n.push("tag");let o;const{tag:h}=c;let u;const d={attrs:{},className:[Ae.get(c,"config.inputWrap")],children:[],config:{}};let l=document.createElement(h);const s={string:a=>{l.innerHTML+=a},object:a=>a&&l.appendChild(t.create(a,i)),node:a=>l.appendChild(a),component:a=>l.appendChild(a.dom),array:a=>{for(const p of a)o=t.childType(p),s[o](p)},function:a=>{a=a(),o=t.childType(a),s[o](a)},undefined:()=>null,boolean:()=>null};if(m&&(c.attrs=De(c.attrs,{className:m})),f){const a=this.processOptions(f,c,i);if(this.holdsContent(l)&&h!=="button")s.array.call(this,a),c.content=void 0;else return Ae.forEach(a,p=>{d.children.push(t.create(p,i))}),c.attrs.className&&(d.className=c.attrs.className),d.id=c.id,d.config={...c.config},this.create(d,i);n.push("options")}if(c.attrs&&(t.processAttrs(c,l,i),n.push("attrs")),c.config){if(c.config.label&&(c.config.label&&h!=="button"||["radio","checkbox"].includes(Ae.get(c,"attrs.type")))&&!i){const a=t.label(c);if(!c.config.hideLabel){const p=[a,l];t.labelAfter(c)&&p.reverse(),d.children.push(p)}}n.push("config")}if(c.content||c.children){const a=c.content||c.children;o=t.childType(a),s[o]||console.error(`childType: ${o} is not supported`),s[o].call(this,a)}if(g){for(const a in g)Object.hasOwn(g,a)&&(l.dataset[a]=typeof g[a]=="function"?g[a]():g[a]);n.push("dataset")}c.action&&(this.actionHandler(l,c.action),n.push("action"));const r=Ae.subtract(n,Object.keys(c));for(u=r.length-1;u>=0;u--)l[r[u]]=c[r[u]];return d.children.length&&(l=this.create(d)),l};onRender=(e,i,t=333)=>{const n=Date.now(),m=()=>{!e.parentElement&&Date.now()-n<t?window.requestAnimationFrame(m):e.parentElement&&i(e)};m()};actionHandler(e,i){const t={onRender:V.onRender,render:V.onRender};return Object.entries(i).map(([n,m])=>(Array.isArray(m)?m:[m]).map(f=>(t[n]||od(n))(e,f)))}get icons(){if(this.iconSymbols)return this.iconSymbols;const e=$e.formeoSprite.querySelectorAll("svg symbol"),i=t=>{const n=t.getAttribute("viewBox")||"0 0 24 24",m=Array.from(t.children).map(f=>f.cloneNode(!0).outerHTML).join("");return{tag:"svg",attrs:{className:["svg-icon",t.id],viewBox:n,xmlns:"http://www.w3.org/2000/svg"},children:m}};return this.iconSymbols=Array.from(e).reduce((t,n)=>{const m=n.id.replace(So,"");return t[m]=i(n),t},{}),this.cachedIcons={},this.iconSymbols}icon(e,i){if(!e)return;const t=`${e}?${new URLSearchParams(i).toString()}`;if(this.cachedIcons?.[t])return this.cachedIcons[t];const n=this.icons[e];if(n){if(i){const m=De(n,i);return this.cachedIcons[t]=V.create(m).outerHTML,this.cachedIcons[t]}return this.cachedIcons[t]=V.create(n).outerHTML,this.cachedIcons[t]}return td[V.options.iconFont]?.(e)||e}processAttrs(e,i,t){const{attrs:n={}}=e;if(!t&&!n.name&&n.name!==null&&this.isInput(e.tag)){const m=Ko(e);m&&i.setAttribute("name",m)}for(const m of Object.keys(n)){const f=Ae.safeAttrName(m),g=this.processAttrValue(n[m]);if(g!==!1)try{i.setAttribute(f,g)}catch(c){console.warn(`Could not set attribute ${f} with value ${g}`,c)}}}processAttrValue(e){if(typeof e=="function")return e();if(typeof e=="boolean")return e&&"";let i=e||"";if(Array.isArray(i))if(typeof i[0]=="object"){const t=i.filter(n=>n.selected===!0);i=t.length?t[0].value:i[0].value}else i=i.join(" ");return i}toggleElementsByStr=(e,i)=>{const t=[],n=(m,f)=>{f?(m.style.display="block",t.push(m)):m.style.display="none"};return V.elementsContainText(e,i,n),t};elementsContainText=(e,i,t)=>{const n=[];return Ni(e,m=>{const f=m.textContent.toLowerCase().indexOf(i.toLowerCase())!==-1;t?.(m,f),f&&n.push(m)}),n};generateOption=({type:e="option",label:i,value:t,i:n=0,selected:m})=>({tag:e==="option"?"option":"input",attrs:{type:e,value:t||`${e}-${n}`,[e==="option"?"selected":"checked"]:m||!n},config:{label:i||Z.get("labelCount",{label:Z.get("option"),count:n})}});processOptions(e,i,t){const{action:n,attrs:m={}}=i,f=m.type||i.tag,g=m.id||i.id,c=(o,h)=>{const{label:u,value:d,...l}=o,s=()=>{const r={tag:"input",attrs:{name:g,type:f,value:d||"",id:`${g}-${h}`,...l},action:n},a={tag:"label",attrs:{for:`${g}-${h}`},children:u},p={children:[r,a],className:[`f-${f}`]};return m.className&&(i.config.inputWrap=m.className),i.config.inline&&p.className.push(`f-${f}-inline`),o.selected&&(r.attrs.checked=!0),t&&(a.attrs.contenteditable=!0),p};return{select:()=>{const r=o.attrs||o,{label:a,checked:p,selected:v,attrs:y}={attrs:r,...o,...r};return{tag:"option",attrs:{...y,selected:!!(p||v)},children:a}},button:r=>{const{type:a,label:p,className:v,id:y}=r;return{...i,attrs:{type:a},className:v,id:y||Me(),options:void 0,children:p,action:i.action}},checkbox:s,radio:s}[f]?.(o)};return e.map(c)}holdsContent(e){return e.outerHTML.includes("/")}isBlockInput(e){return!this.isInput(e)&&this.holdsContent(e)}isInput(e){let i=e;return typeof i!="string"&&(i=i.tagName),id.has(i)}parsedHtml(e){const i=document.createElement("textarea");return i.innerHTML=e,i.textContent}labelAfter(e){const i=Ae.get(e,"attrs.type"),t=Ae.get(e,"config.labelAfter");return t===void 0?i==="checkbox"||i==="radio":t}requiredMark=()=>({tag:"span",className:"text-error",children:"*"});tooltip=e=>({tag:"span",className:"f-tooltip",dataset:{tooltip:e},content:V.icon("info-circle")});helpText=e=>({tag:"small",className:"f-help-text",children:e});label(e,i){const t=Ae.get(e,"attrs.required");let{config:{label:n="",helpText:m="",tooltip:f=null}}=e;const{id:g,attrs:c}=e;typeof n=="function"&&(n=n());const o={tag:"label",attrs:{for:g||c?.id},className:[],children:[n,t&&this.requiredMark(),f&&this.tooltip(f),m&&this.helpText(m)],action:{}};return i&&(o.attrs.for=void 0,o.attrs.contenteditable=!0,o.fMap=i),o}childType(e){return e===void 0?e:[["array",i=>Array.isArray(i)],["node",i=>i instanceof window.Node||i instanceof window.HTMLElement],["component",()=>e?.dom],[typeof e,()=>!0]].find(i=>i[1](e))[0]}getStyle(e,i=!1){let t;return window.getComputedStyle?t=window.getComputedStyle(e,null):e.currentStyle&&(t=e.currentStyle),i?t[i]:t}getElement(e){return{node:()=>e,object:()=>document.getElementById(e.id),string:()=>document.getElementById(e)}[this.childType(e)]()}empty(e){for(;e.firstChild;)this.remove(e.firstChild);return e}removeEmpty=e=>{const i=e.parentElement,t=be(e),n=i.getElementsByClassName(`formeo-${t}`);if(this.remove(e),!n.length)return this.isStage(i)?this.emptyClass(i):this.removeEmpty(i)};remove(e){const i=be(e);return i?oe.remove(`${i}s.${e.id}`):e.parentElement.removeChild(e)}removeClasses(e,i){const t={string:n=>n.classList.remove(i),array:n=>{for(const m of i)n.classList.remove(m)}};t.object=t.string,Ae.forEach(e,t[this.childType(i)])}addClasses(e,i){Ae.forEach(e,{string:t=>t.classList.add(i),array:t=>{for(const n of i)t.classList.add(n)}}[this.childType(i)])}formGroup(e,i=""){return{className:["f-field-group",i],children:e}}coords(e){const i=e.getBoundingClientRect(),t=document.body.getBoundingClientRect();return{pageX:i.left+i.width/2,pageY:i.top-t.top-i.height/2}}clearStage(e){e.classList.add("removing-all-fields");const i=()=>{V.empty(e),e.classList.remove("removing-all-fields"),V.emptyClass(e),me.slideDown(e,300)};me.slideUp(e,600,i)}toggleSortable(e,i){let t=i;const n=be(e);if(!n)return;const m=be(e.parentElement),f=V[n].get(e.id).sortable;t||(t=!f.option("disabled")),f.option("disabled",t),m&&["rows","columns","stages"].includes(m)&&this.toggleSortable(e.parentElement,t)}emptyClass(e){const i=e.getElementsByClassName(ol.get(e.classList.item(0)));e.classList.toggle("empty",!i.length)}btnTemplate=({title:e="",...i})=>({tag:"button",attrs:{type:"button",title:e},...i});isControls=e=>be(e)===ot;isStage=e=>be(e)===kt;isRow=e=>be(e)===Ue;isColumn=e=>be(e)===Ge;isField=e=>be(e)===Tt;asComponent=e=>oe[`${be(e)}s`].get(e.id);isDOMElement(e){return e instanceof window.Element||e instanceof window.HTMLElement||!!(e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string")}resolveContainer(e){return typeof e=="string"?document.querySelector(e):e}},V=new sd,bt="f-autocomplete",ad=`${bt}-display-field`,er=`${bt}-list`,$t="highlight-component",xi=`${er}-item`,ld=(e,i)=>{const t=e.reduce((n,m)=>n+(m===i),0);return t>1?`(${t})`:""},qo=["config.label","config.controlId"],cd=["config.legend","name"],dd=[...qo,...cd],Qi=e=>qo.reduce((i,t)=>i||e.get(t),null),kr=e=>dd.reduce((i,t)=>i||e.get(t),null)||je(e.name),ud=new Map([["condition.source",Qi],["if.condition.source",Qi],["if.condition.target",Qi],["then.condition.target",kr],["condition.target",kr]]),Yo=({id:e,...i},t)=>{const{name:n,label:m}=i;return n?ud.get(t)(i):m},hd=({selectedId:e,...i})=>(i.value===e&&(i.selected=!0),i),Xi=e=>(e.classList.contains(xi)||(e=e.parentElement),e),Zo=({value:e,textLabel:i,htmlLabel:t,componentType:n,depth:m=0},f)=>{const g={tag:"li",children:t,dataset:{value:e,label:i},className:[xi,`${xi}-depth-${m}`,`component-type-${n}`],action:{mousedown:({target:c})=>{c=Xi(c),f.setValue(c),f.selectOption(c),f.hideList()},mouseover:({target:c})=>{c=Xi(c),f.removeHighlight(),f.highlightComponent(c)},mouseleave:({target:c})=>{c=Xi(c),f.removeHighlight()}}};return V.create(g)},pd=(e,i)=>{const t=e.data.options.map((n,m)=>{const f=`${e.address}.options[${m}]`,g=n.label,c=n.label;return Zo({value:f,textLabel:g,htmlLabel:c,componentType:"option",depth:1},i)});return V.create({tag:"ul",attrs:{className:[er,"options-list"]},children:t})},fd=e=>{const i=e.value,t=[],n=oe.flatList();return Object.entries(n).reduce((m,[f,g])=>{const c=Yo(g,e.key);if(c){const o=g.name,h={tag:"span",content:` ${je(o)}`,className:"component-type"},u=`${o}.${c}`;t.push(u);const d=ld(t,u),l={tag:"span",content:d,className:"component-label-count"},s=[`${c} `,l,h],r=[c,d].join(" ").trim();if(g.isCheckable){const p=pd(g,e);s.push(p)}const a=hd({value:f,textLabel:r,htmlLabel:s,componentType:o,selectedId:i});m.push(Zo(a,e))}return m},[])},gd=class{lastCache=Date.now();optionsCache=null;constructor({key:e,value:i,className:t,onChange:n=hn}){this.key=e,this.className=[t||this.key.replace(/\./g,"-")].flat(),this.value=i,this.onChange=n||hn,this.events=[],this.build()}createProxy(){return new Proxy(this,{get(e,i){if(i in e)return e[i];if(i in e.dom){const t=e.dom[i];return typeof t=="function"?t.bind(e.dom):t}},set(e,i,t){return i in e?e[i]=t:e.dom[i]=t,!0}})}get isAddress(){return Te(this.value)}get valueComponent(){return Te(this.value)&&oe.getAddress(this.value)}build(){const e=t=>{const n=this.list,m=this.getActiveOption();let f=new Map([[38,()=>{const g=this.getPreviousOption(m);g&&this.selectOption(g)}],[40,()=>{const g=this.getNextOption(m);g&&this.selectOption(g)}],[13,()=>{m&&(this.selectOption(m),this.setValue(m),n.style.display==="none"?this.showList(m):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return f||(f=()=>!1),f()},i={focus:({target:t})=>{this.updateOptions(),t.parentElement.classList.add(`${bt}-focused`);const n=V.toggleElementsByStr(this.list.querySelectorAll(`.${xi}-depth-0`),t.value);t.addEventListener("keydown",e);const m=this.list.querySelector(".active-option")||n[0];this.showList(m)},blur:({target:t})=>{t.parentElement.classList.remove(`${bt}-focused`),t.removeEventListener("keydown",e),this.hideList()},input:t=>{const{value:n}=t.target,m=V.toggleElementsByStr(this.list.querySelectorAll("li"),n);if(n.length===0&&this.clearValue(),m.length===0)this.hideList();else{const f=this.getActiveOption()||m[0];this.showList(f)}this.setValue({dataset:{label:n,value:n}})}};return this.displayField=V.create({tag:"input",autocomplete:"off",action:i,attrs:{type:"text",className:ad,value:this.label||this.value,placeholder:Z.get(`${this.key}.placeholder`)}}),this.hiddenField=V.create({tag:"input",attrs:{type:"hidden",className:bt,value:this.value}}),this.list=V.create({tag:"ul",attrs:{className:er}}),this.clearButton=V.create({tag:"span",content:V.icon("remove"),className:"clear-button hidden",action:{click:()=>this.clearValue()}}),this.dom=V.create({children:[this.displayField,this.clearButton,this.hiddenField],className:[bt,this.className].flat(),action:{onRender:t=>{this.stage=t.closest(".formeo-stage"),this.value&&(this.displayField.value=this.label),this.clearButton.classList.toggle("hidden",!this.value.length)}}}),this.dom}get label(){if(!Te(this.value))return this.value;const e=this.value&&oe.getAddress(this.value);return e&&Yo(e,`${this.key}`)||this.value}updateOptions(){let e=this.optionsCache;const i=Date.now();(i-this.lastCache>zn*5||!e)&&(V.empty(this.list),e=this.generateOptions(),this.lastCache=i),this.list.children.length||this.list.append(...e)}generateOptions(){return this.optionsCache=fd(this),this.optionsCache}setListPosition(){const{offsetHeight:e,offsetWidth:i}=this.displayField,t=this.displayField.closest(".formeo-stage").getBoundingClientRect(),n=this.displayField.getBoundingClientRect(),m={position:"absolute",top:`${n.y+e-t.y}px`,left:`${n.x+window.scrollX-t.x+2}px`,width:`${i}px`};Object.assign(this.list.style,m)}showList(e,i=this.list){this.stage.contains(this.list)||this.stage.appendChild(this.list),this.setListPosition(),this.selectOption(e),me.slideDown(i,at)}hideList(e=this.list){me.slideUp(e,at),this.removeHighlight(),this.stage.contains(this.list)&&this.stage.removeChild(this.list)}getActiveOption(e=this.list){const i=e.querySelector(".active-option");return i?.style.display!=="none"?i:null}getPreviousOption(e){let i=e;do i=i?i.previousSibling:null;while(i!=null&&i.style.display==="none");return i}getNextOption(e){let i=e;do i=i?i.nextSibling:null;while(i!=null&&i.style.display==="none");return i}selectOption(e,i=this.list){const t=i.querySelectorAll("li");for(const n of t){const{dataset:{value:m}}=n;n.classList.remove("active-option"),Te(m)&&oe.getAddress(m)?.dom?.classList.remove($t)}e&&(e.classList.add("active-option"),this.highlightComponent(e))}removeHighlight(){const e=document.getElementsByClassName($t);for(const i of e)i.classList.remove($t)}highlightComponent(e){const{dataset:{value:i}}=e;if(Te(i)){const{componentAddress:t,isOptionAddress:n,optionIndex:m}=lt(i).reduce((g,c)=>c==="options"?(g.isOptionAddress=!0,g):g.isOptionAddress?(g.optionIndex=+c,g):(g.componentAddress.push(c),g),{componentAddress:[],optionIndex:null,isOptionAddress:!1}),f=oe.getAddress(t);f?.dom&&(f.dom.classList.add($t),n&&f.dom.querySelectorAll(".field-preview .f-checkbox, .field-preview .f-radio")[m]?.classList.add($t))}}clearValue(){this.selectOption(null),this.setValue({dataset:{label:"",value:""}}),this.displayField.focus()}setValue(e){const{label:i,value:t}=e.dataset;this.displayField.value=i,this.hiddenField.value=t,this.value=t,this.clearButton.classList.toggle("hidden",!t.length),this.onChange?.({target:this.hiddenField})}},Qo=e=>Z.get(`${e}.placeholder`)||je(mi(e)),tr=e=>e.replaceAll(".","-"),Tr=new Map([["config.helpText",(...e)=>Mr(...e)],["config.tooltip",(...e)=>Mr(...e)]]);function Ji({key:e,value:i,type:t="text",checked:n}){const m={tag:"input",attrs:{type:t,value:i,placeholder:Qo(e)},className:[tr(e)],config:{}};return n&&(m.attrs.checked=!0),m}function Mr({key:e,value:i}){return{tag:"textarea",attrs:{placeholder:Qo(e)},className:[tr(e)],config:{},textContent:i}}function ze(e){const i=Z.get(e);if(i)return i;const t=mi(e);return Z.get(t)||je(t)}var xt={autocomplete:(...e)=>new gd(...e).createProxy(),string:({key:e,value:i})=>Tr.has(e)?Tr.get(e)({key:e,value:i}):Ji({key:e,value:i}),boolean:({key:e,value:i})=>Ji({key:e,value:i,type:e==="selected"?"radio":"checkbox",checked:!!i}),number:({key:e,value:i})=>Ji({key:e,value:i,type:"number"}),array:({key:e,value:i})=>({tag:"select",attrs:{placeholder:ze(`placeholder.${e}`)},className:[tr(e)],options:i}),object:e=>Object.entries(e).map(([i,t])=>xt[V.childType(t)]({key:i,value:t}))},md={boolean:(e,i)=>({click:({target:t})=>{if(t.type==="radio"){const n=i.data.options.map(m=>({...m,selected:!1}));i.set("options",n)}i.set(e,t.checked),i.updatePreview()}}),string:(e,i)=>({input:({target:{value:t}})=>{i.set(e,t),i.debouncedUpdatePreview()}}),number:(e,i)=>({input:({target:{value:t}})=>{i.set(e,Number(t)),i.debouncedUpdatePreview()}}),array:(e,i)=>({change:({target:{value:t}})=>{i.set(e,t),i.debouncedUpdatePreview()}}),object:()=>({})},vd=Object.freeze({title:"",content:null,confirmText:()=>ze("save"),cancelText:()=>ze("cancel"),onConfirm:()=>{},onCancel:()=>{},className:"",closeOnEscape:!0,position:"top",triggerElement:null,triggerCoords:null}),yd=class ci{constructor(i){this.opts=De(vd,i),this.dialog=null}createDialog(){const{title:i,content:t,confirmText:n,cancelText:m,className:f,closeOnEscape:g,position:c}=this.opts,o=`dialog-position-${c}`,h=[];return i&&h.push({tag:"h3",className:"dialog-title",textContent:i}),t&&h.push({tag:"div",className:"dialog-body",children:Array.isArray(t)?t:[t]}),h.push({tag:"div",className:"dialog-actions",children:[{tag:"button",type:"button",className:"btn btn-sm btn-secondary",textContent:typeof m=="function"?m():m,action:{click:()=>this.handleCancel()}},{tag:"button",type:"submit",className:"btn btn-sm btn-primary",textContent:typeof n=="function"?n():n}]}),V.create({tag:"dialog",className:["formeo-dialog","formeo",o,f],children:[{tag:"form",className:"dialog-form",method:"dialog",children:h,action:{submit:u=>this.handleSubmit(u)}}],action:{cancel:u=>{g?this.handleCancel():u.preventDefault()}}})}handleSubmit(i){i.preventDefault();const t=new FormData(i.target);this.opts.onConfirm(t,this),this.close()}handleCancel(){this.opts.onCancel(this),this.close()}setPosition(){const{position:i,triggerElement:t,triggerCoords:n}=this.opts;if(i!=="trigger"||!this.dialog)return;let m=n;if(!m&&t){const f=t.getBoundingClientRect();m={x:f.left+f.width/2,y:f.bottom+8}}if(m){const f=this.dialog.getBoundingClientRect(),g=window.innerWidth,c=window.innerHeight;let o=m.x-f.width/2,h=m.y;const u=16;o=Math.max(u,Math.min(o,g-f.width-u)),h=Math.max(u,Math.min(h,c-f.height-u)),this.dialog.style.left=`${o}px`,this.dialog.style.top=`${h}px`,this.dialog.style.transform="none"}}open(){if(this.dialog||(this.dialog=this.createDialog()),document.body.appendChild(this.dialog),this.dialog.showModal(),this.opts.position==="trigger"){const i=setTimeout(()=>{this.setPosition(),clearTimeout(i)},0)}return this}close(){this.dialog&&(this.dialog.close(),this.dialog.remove(),this.dialog=null)}static alert(i,t=()=>{}){return new ci({content:{tag:"p",className:"dialog-message",textContent:i},confirmText:()=>Z.get("ok")||"OK",cancelText:"",onConfirm:()=>t()})}static confirm(i,t=()=>{},n=()=>{}){return new ci({content:{tag:"p",className:"dialog-message",textContent:i},confirmText:()=>Z.get("confirm")||"Confirm",onConfirm:()=>t(),onCancel:()=>n()})}static prompt(i,t=()=>{},n=""){return new ci({content:[{tag:"label",className:"dialog-prompt-label",children:[{tag:"p",className:"dialog-message",textContent:i},{tag:"input",type:"text",name:"prompt-value",className:"dialog-prompt-input",value:n}]}],onConfirm:m=>{t(m.get("prompt-value"))}})}},Xo="hidden-property",bd="hidden-option",en=/\.options\[\d+\]$/,wd={"if-sourceProperty":ri(ni,hr,pr),"if-targetProperty":ri(ni),"then-targetProperty":ri(ni,hr,pr),...Object.entries(xl).reduce((e,[i,t])=>(e[`if-${i}`]=t,e[`then-${i}`]=t,e),{})},Jo={assignment:Lt,comparison:Lt,logical:Lt,source:({key:e,value:i,onChange:t,conditionType:n})=>xt.autocomplete({key:`${n}.condition.${e}`,value:i,onChange:t,className:`condition-${e}`}),sourceProperty:Lt,targetProperty:Lt,target:e=>Jo.source(e),value:({key:e,value:i,onChange:t},n)=>{const m=xt.string({key:`condition.${e}`,value:i});return m.action={input:t},m}};function Cd({key:e,value:i,conditionType:t}){return Object.entries(wd[`${t}-${e}`]||{}).map(([n,m])=>Sd({fieldName:e,fieldValue:i,key:n,optionValue:m}))}function Sd({fieldName:e,fieldValue:i,key:t,optionValue:n}){return{label:Z.get(`${e}.${t}`)||je(t).toLowerCase(),value:n,selected:n===i}}function Lt({key:e,value:i,onChange:t,conditionType:n}){const m=Cd({key:e,value:i,conditionType:n}),f=xt.array({key:`condition.${e}`,value:m});return f.action={change:t},f}var xd=e=>!e?.classList.contains(Xo),Ed={sourceProperty:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i.value;return Lr(!!i.value.match(en),t),!n},comparison:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i.value,m=!!i.value.match(en);return!n||m||t.value!=="value"},assignment:e=>{const i=e.get("target"),t=e.get("targetProperty");return!i.value||t.value.startsWith("is")},targetProperty:e=>{const i=e.get("target"),t=e.get("targetProperty");return Lr(!!i.value.match(en),t),!Ja(i.value)},target:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i?.value;return t&&!n?!0:t&&t?.value!=="value"},value:e=>{const i=e.get("target"),t=e.get("targetProperty");return t===void 0?!1:i&&!i.value||!xd(e.get("comparison"))||t.value===es?!0:t.value.startsWith("is")}},$r=e=>{for(const[i,t]of e){const n=!!Ed[i]?.(e)||!1;t.classList.toggle(Xo,n)}},es="isChecked",tn=e=>e.value.endsWith("Checked"),Lr=(e,i)=>{if(e&&tn(i))return null;const t=Array.from(i.querySelectorAll("option")),n=[];for(const m of t){const f=tn(m),g=e?!f:f;g&&n.push(m.value),m.classList.toggle(bd,g)}n.includes(i.value)&&(i.value=e?es:t.find(m=>!tn(m))?.value||i.value)};function Ad(e,i=Sl){return i.reduce((t,n)=>(e[n]!==void 0&&t.push([n,e[n]]),t),[])}var kd=class{constructor({conditionValues:e,conditionType:i,conditionCount:t,index:n},m){this.values=new Map(Ad(e)),this.conditionType=i,this.parent=m,this.baseAddress=`${m.address}.${i}`,this.fields=new Map,this.conditionCount=t,this.index=n,this.dom=this.generateDom()}setConditionIndex(e){this.index=e}get address(){return`${this.baseAddress}[${this.index}]`}destroy(){const e=oe.getAddress(this.baseAddress);e.splice(this.index,1),oe.setAddress(this.baseAddress,e),me.slideUp(this.dom,at,()=>{this.dom.remove()})}label(){return this.index?null:{tag:"label",className:`condition-label ${this.conditionType}-condition-label`,content:Z.get(`condition.type.${this.conditionType}`)}}generateDom(){const e=[];for(const[t,n]of this.values){const m=o=>this.onChangeCondition({key:t,target:o.target}),f={key:t,value:n,conditionType:this.conditionType,onChange:m},g=Jo[t](f,this.values),c=g.dom||V.create(g);this.fields.set(t,g.dom?g:c),e.push(c)}const i={children:[this.label(),...e,...this.generateConditionTypeActionButtons()],className:`f-condition-row ${this.conditionType}-condition-row display-none`,action:{onRender:t=>{this.processUiState()}}};return V.create(i)}generateConditionTypeActionButtons(){const e=[],i="manage-condition-type",t=f=>`${f}-condition-type`,n=V.btnTemplate({title:Z.get(`remove${this.conditionType}Condition`),className:[i,t("remove")],content:V.icon("minus"),action:{click:()=>this.destroy(),mouseover:f=>{this.dom.classList.add("to-remove")},mouseout:f=>{this.dom.classList.remove("to-remove")}}});e.push(n);const m=V.btnTemplate({title:Z.get(`add${this.conditionType}Condition`),className:[i,t("add")],content:V.icon("plus"),action:{click:()=>{const f=this.parent.addConditionType(this.conditionType),g={changedProperty:null,dataPath:f.address,value:f.value,src:f.dom};this.updateDataDebounced(g)}}});return e.push(m),e}get value(){return Array.from(this.fields).reduce((e,[i,t])=>(e[i]=t.value,e),{})}processUiState(){$r(this.fields),this.dom.classList.remove("display-none")}updateDataDebounced=fi(e=>{Q.formeoUpdated(e),oe.setAddress(e.dataPath,e.value)});onChangeCondition=({key:e,target:i})=>{const t={changedProperty:e,dataPath:this.address,value:this.value,src:i};$r(this.fields),this.updateDataDebounced(t)}},Td=new Map([["attrs",({itemKey:e})=>e],["options",({itemKey:e,key:i})=>`${e}.${i}`]]),ts=(e,i)=>{if(i.controlId==="select"){const t=i.editPanels.get("options"),[n,m]=e?gi:kl,f=t.data.map(({[n]:g,...c})=>({[m]:g,...c}));t.setData(f)}},Md=new Map([["attrs-multiple",e=>({change:({target:i})=>{e.field.controlId==="select"&&ts(i.checked,e.field)}})]]),Rt=class{constructor({key:e,index:i,field:t,panel:n,data:m}){this.field=t,this.itemKey=e,this.itemIndex=i,this.panel=n,this.panelName=n.name,this.isDisabled=t.isDisabledProp(e,this.panelName),this.isHidden=this.isDisabled&&t.config.panels[this.panelName].hideDisabled,this.isLocked=t.isLockedProp(e,this.panelName),this.address=`${t.indexName}.${t.id}.${e}`,this.itemSlug=fr(e),this.conditionTypeWrap=new Map,m!==void 0&&this.field.get(this.itemKey)===void 0&&this.field.set(this.itemKey,m);const f=[`field-${this.itemSlug}`,"prop-wrap"];this.isHidden&&f.push("hidden-property"),this.dom=V.create({tag:"li",className:f,children:{className:"component-prop",children:[this.itemInputs(),this.itemControls]}})}get itemValues(){const e=this.field.get(this.itemKey);return e?.constructor===Object?Si(Object.entries(e),gi,"0"):[[this.itemKey,e]]}findOrCreateConditionTypeWrap(e){let i=this.conditionTypeWrap.get(e);return i||(i=V.create({className:`type-conditions-wrap ${e}-conditions-wrap`}),this.conditionTypeWrap.set(e,i),i)}itemInputs(){const e=V.create({className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map(([i,t])=>this.panelName==="conditions"?this.generateConditionFields(i,t):this.itemInput(i,t))});return this.inputs&&this.inputs.replaceWith(e),this.inputs=e,e}addConditionType=(e,i)=>{const t=this.findOrCreateConditionTypeWrap(e);let n=i;if(!n){const[f]=Gn()[e],g=t.children.length;e==="if"&&(f.logical="||"),n={conditionValues:f,conditionCount:g,index:g}}const m=new kd({conditionType:e,...n},this);return t.appendChild(m.dom),m};removeConditionType=(e,i)=>{const t=this.conditionTypeWrap.get(e).children[i];t.destroy(),t.dom.remove()};generateConditionFields=(e,i)=>(this.conditions=new Map,i.forEach((t,n)=>{const m=this.addConditionType(e,{index:n,conditionCount:i.length,conditionValues:t});this.conditions.set(n,m)}),this.findOrCreateConditionTypeWrap(e));get itemControls(){if(this.isLocked)return{className:`${this.panelName}-prop-controls prop-controls`,content:[]};const e={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{me.slideUp(this.dom,333,i=>{this.field.remove(this.itemKey),i.remove(),this.panel.updateProps()})},mouseover:i=>{this.dom.classList.add("to-remove")},mouseout:i=>{this.dom.classList.remove("to-remove")}},content:V.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[e]}}getConfigAttrOptions(e){const i=e.split(".").pop(),t=this.field.config?.attrs?.[i];return Array.isArray(t)?t:null}itemInput(e,i){if(this.isDisabled)return null;let t=V.childType(i)||"string",n=i;if(this.panelName==="attrs"){const s=this.getConfigAttrOptions(e);s&&(n=s.map(r=>({...r,selected:r.value===i})),t="array")}const m=Td.get(this.panelName)?.({itemKey:this.itemKey,key:e})||this.itemKey,f=m.split(".").filter(Number.isNaN).join(".")||e,g=xt[t]({key:e,value:n}),c=`${this.field.shortId}-${fr(m).replaceAll(/-\d+-(selected)/g,"-$1")}`,o={label:this.panelName!=="options"&&ze(f),labelAfter:!1,inputWrap:["f-input-wrap",this.isLocked&&"locked-prop",this.isDisabled&&"disabled-prop"].filter(Boolean).join(" ")},h={name:g.attrs.type==="checkbox"?`${c}[]`:c};h.disabled=this.isDisabled,h.readonly=this.isLocked;const u=Md.get(this.itemSlug)?.(this),d=Gl(md[t](m,this.field),u||{}),l=De(xt[t]({key:e,value:n}),{action:d,attrs:h,config:o});return gi.includes(e)?{className:"f-addon",children:l}:l}},$d={multiple:(e,i)=>{ts(!!e,i)}},Ld=[{label:ze("config.label"),value:"label"},{label:ze("config.hideLabel"),value:"hideLabel"},{label:ze("config.helpText"),value:"helpText"},{label:ze("config.labelAfter"),value:"labelAfter"},{label:ze("config.disableHtmlLabel"),value:"disableHtmlLabel"},{label:ze("config.tooltip"),value:"tooltip"}],Rd={label:"New Field",hideLabel:!1,helpText:"",labelAfter:!1,disableHtmlLabel:!1,tooltip:""},_d=class{constructor(e,i,t){this.type=V.childType(e),this.name=i,this.component=t,this.panelConfig=this.getPanelConfig(this.data)}get data(){const e=this.component.get(this.name);return this.type==="object"?Object.entries(e):e}getPanelConfig(e){return this.props=this.createProps(e),this.editButtons=this.createEditButtons(),{config:{label:Z.get(`panel.label.${this.name}`)},attrs:{className:`${lo} ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(e=this.data){this.editPanelItems=Array.from(e).map((t,n)=>{const m=this.type==="array",f=t[0],g=m?`[${n}]`:`.${t[0]}`,c=m?t:{[t[0]]:t[1]},o=`${this.name}${g}`,h=this.component.isDisabledProp(o,this.name),u=Tl.get(this.name)?.has(f)??!0;return h||!u?null:new Rt({key:o,data:c,field:this.component,index:n,panel:this})}).filter(Boolean);const i={tag:"ul",attrs:{className:["edit-group",`${this.component.name}-edit-group`,`${this.component.name}-edit-${this.name}`]},editGroup:this.name,isSortable:this.name==="options",content:this.editPanelItems};return V.create(i)}updateProps(){const e=this.createProps();this.props.replaceWith(e),this.props=e}createEditButtons(){const e=this.name,i={attrs:this.addAttribute,options:this.addOption,conditions:this.addCondition,config:this.addConfiguration},t=[];if(e==="conditions"){Z.current&&!Z.current.clearAll&&Z.put("clearAll","Clear All");const f={...V.btnTemplate({content:[V.icon("bin"),Z.get("clearAll")],title:Z.get("clearAll")}),className:`clear-all-${e}`,action:{click:()=>{this.clearAllItems()}}};t.push(f)}const n=Z.get(`panelEditButtons.${e}`)||`+ Add ${je(e)}`,m={...V.btnTemplate({content:n,title:n}),className:`add-${e}`,action:{click:f=>{const g={btnCoords:V.coords(f.target),addAction:i[e]};e==="attrs"&&(g.isDisabled=this.component.isDisabledProp,g.isLocked=this.component.isLockedProp,g.message={attr:Z.get(`action.add.${e}.attr`),value:Z.get(`action.add.${e}.value`)});const c=je(e),o=new globalThis.CustomEvent(`onAdd${c}`,{detail:g});ge.add[e](g),document.dispatchEvent(o)}}};return t.push(m),{className:"panel-action-buttons",content:t}}addAttribute=(e,i)=>{let t=i;const n=Bo(e),m=`attrs.${n}`;Z.current[m]||Z.put(m,jo(e)),typeof t=="string"&&["true","false"].includes(t)&&(t=JSON.parse(t)),this.component.set(`attrs.${e}`,t),$d[n]?.(t,this.component);const f=this.props.querySelector(`.${this.component.name}-attrs-${n}`),g=new Rt({key:m,data:{[n]:t},field:this.component,panel:this});f?f.replaceWith(g.dom):this.props.appendChild(g.dom),this.component.resizePanelWrap()};addOption=()=>{const e=this.component.data.config.controlId,i=this.component.get("options"),t=e==="select"?"option":e,n=Z.get("newOptionLabel",{type:t})||"New Option",m=`${this.name}[${this.data.length}]`,f=i[i.length-1],g={...i.length?f:{},label:n};e!=="button"&&(g.value=xo(n));const c=new Rt({key:m,data:g,field:this.component,index:this.props.children.length,panel:this});this.editPanelItems.push(c),this.props.appendChild(c.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()};addCondition=e=>{const i=`conditions[${this.component.get("conditions").length}]`,t=new Rt({key:i,data:e.template,field:this.component,panel:this});this.props.appendChild(t.dom),this.component.set(i,e.template),this.component.resizePanelWrap()};addConfiguration=()=>{const e=this.component.get("config");new yd({className:"config-item-dialog",content:[{tag:"select",config:{label:Z.get("selectConfigKey")||"Select Configuration Key"},attrs:{name:"selectConfigKey",required:!0,className:"config-key-select"},options:Ld.filter(i=>!(i.value in e))}],onConfirm:i=>{const t=i.get("selectConfigKey").trim(),n=`config.${t}`;if(t){const m=new Rt({key:n,data:Rd[t],field:this.component,panel:this});this.editPanelItems.push(m),this.props.appendChild(m.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()}}}).open()};clearAllItems=()=>{const e=this.type==="array"?[]:{},i={type:this.name,removeAction:()=>{this.component.set(this.name,e),this.updateProps()}};ge.remove[this.name](i);const t=je(this.name),n=new globalThis.CustomEvent(`onRemove${t}`,{detail:i});document.dispatchEvent(n)};setData(e){this.data=e,this.component.set(this.name,e),this.updateProps()}},Rr=Object.freeze({type:"field",displayType:"slider"}),Jt=e=>({transform:`translateX(${e?`${e}px`:0})`}),is=class{constructor(e){this.opts=De(Rr,e),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const i=this.createPanelsWrap();this.nav=this.navActions(),this.nav.groupChange(this.activePanelIndex);const t=new window.ResizeObserver(([{contentRect:{width:m}}])=>{this.currentWidth!==m&&(this.toggleTabbedLayout(),this.currentWidth=m,this.nav.setTranslateX(this.activePanelIndex,!1))}),n=window.setTimeout(()=>{t.observe(i),window.clearTimeout(n)},zn)}getPanelDisplay(){const e=this.panelsWrap,i=Number.parseInt(V.getStyle(e,"width"),10)>390?"tabbed":"slider",t=this.opts.displayType==="auto";return this.panelDisplay=t?i:this.opts.displayType||Rr.displayType,this.panelDisplay}toggleTabbedLayout=()=>{this.getPanelDisplay();const e=this.isTabbed;return this.panelsWrap.parentElement?.classList.toggle("tabbed-panels",e),e&&this.panelNav.removeAttribute("style"),e};resizePanels=()=>{this.toggleTabbedLayout()};createPanelsWrap(){const e=V.create({className:"panels",content:this.opts.panels.map(({config:i,...t})=>t)});return this.opts.type==="field"&&this.sortableProperties(e),this.panelsWrap=e,this.panels=e.children,this.currentPanel=this.panels[this.activePanelIndex],e}sortableProperties(e){const i=e.getElementsByClassName("field-edit-group");return Ae.forEach(i,t=>{t.fieldId=this.opts.id,t.isSortable&&J.create(t,{animation:150,group:{name:`edit-${t.editGroup}`,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:n=>{this.propertySave(n.to),this.resizePanels()}})})}createPanelNavLabels(){const e=this.opts.panels.map(n=>({tag:"h5",action:{click:m=>{const f=Je(m.target);this.nav.setTranslateX(f,!1),this.nav.groupChange(f)}},content:n.config.label})),i={className:"panel-labels",content:{content:e}},[t]=e;return t.className="active-tab",V.create(i)}createPanelNav(){this.labels=this.createPanelNavLabels();const e={tag:"button",attrs:{className:"next-group",title:Z.get("controlGroups.nextGroup"),type:"button"},action:{click:t=>this.nav.nextGroup(t)},content:V.icon("triangle-right")},i={tag:"button",attrs:{className:"prev-group",title:Z.get("controlGroups.prevGroup"),type:"button"},action:{click:t=>this.nav.prevGroup(t)},content:V.icon("triangle-left")};return V.create({tag:"nav",attrs:{className:"panel-nav"},content:[i,this.labels,e]})}get isTabbed(){return this.panelDisplay==="tabbed"}navActions(){const e={},i=this.currentPanel.parentElement,t=this.labels.firstChild,n=t.children,m=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Je(this.currentPanel);let f={nav:0,panel:0},g={...f};e.groupChange=h=>(this.activePanelIndex=h,this.currentPanel=m[h],V.removeClasses(m,"active-panel"),V.removeClasses(n,"active-tab"),this.currentPanel.classList.add("active-panel"),n[h].classList.add("active-tab"),this.currentPanel);const c=h=>({nav:-t.offsetWidth*h,panel:-i.offsetWidth*h}),o=({offset:h,reset:u,duration:d=at,animate:l=!this.isTabbed})=>{const s=[Jt(g.panel),Jt(h.panel)],r=[Jt(g.nav),Jt(this.isTabbed?0:h.nav)];if(u){const[y]=s,[k]=r;s.push(y),r.push(k)}const a={easing:"ease-in-out",duration:l?d:0,fill:"forwards"},p=i.animate(s,a);t.animate(r,a);const v=()=>{p.removeEventListener("finish",v),u||(g=h)};p.addEventListener("finish",v)};return e.setTranslateX=(h=this.activePanelIndex,u=!0)=>{f=c(h),o({offset:f,animate:u})},e.refresh=(h=this.activePanelIndex)=>{this.activePanelIndex!==h&&e.groupChange(h),e.setTranslateX(this.activePanelIndex,!1),this.resizePanels()},e.nextGroup=()=>{const h=this.activePanelIndex+1;if(h!==m.length){const u=m[h];f={nav:-t.offsetWidth*h,panel:-u.offsetLeft},o({offset:f}),e.groupChange(h)}else f={nav:g.nav-8,panel:g.panel-8},o({offset:f,reset:!0});return this.currentPanel},e.prevGroup=()=>{if(this.activePanelIndex!==0){const h=this.activePanelIndex-1,u=m[h];f={nav:-t.offsetWidth*h,panel:-u.offsetLeft},o({offset:f}),e.groupChange(h)}else f={nav:8,panel:8},o({offset:f,reset:!0})},e}},Od="modulepreload",Id=function(e){return"/formeo/"+e},_r={},vt=function(i,t,n){let m=Promise.resolve();if(t&&t.length>0){let h=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const g=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),o=c?.nonce||c?.getAttribute("nonce");m=h(t.map(u=>{if(u=Id(u,n),u in _r)return;_r[u]=!0;const d=u.endsWith(".css"),l=d?'[rel="stylesheet"]':"";if(n)for(let r=g.length-1;r>=0;r--){const a=g[r];if(a.href===u&&(!d||a.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${l}`))return;const s=document.createElement("link");if(s.rel=d?"stylesheet":Od,d||(s.as="script"),s.crossOrigin="",s.href=u,o&&s.setAttribute("nonce",o),document.head.appendChild(s),d)return new Promise((r,a)=>{s.addEventListener("load",r),s.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${u}`)))})}))}function f(g){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=g,window.dispatchEvent(c),!c.defaultPrevented)throw g}return m.then(g=>{for(const c of g||[])c.status==="rejected"&&f(c.reason);return i().catch(f)})},nn=null,rn=ri(ni),Fi=class extends qn{constructor(e,i={}){const t={...i,id:i.id||Me()};super(e,t),this.id=t.id,this.shortId=this.id.slice(0,this.id.indexOf("-")),this.name=e,this.indexName=`${e}s`,this.config={...t.config,...oe[`${this.name}s`].config},this.address=`${this.name}s.${this.id}`,this.dataPath=`${this.address}.`,this.editPanels=new Map,this.eventListeners=new Map,this.initEventHandlers()}initEventHandlers(){this.config.events&&Object.entries(this.config.events).forEach(([e,i])=>{this.addEventListener(e,i)})}addEventListener(e,i){this.eventListeners.has(e)||this.eventListeners.set(e,[]),this.eventListeners.get(e).push(i)}removeEventListener(e,i){if(!this.eventListeners?.has(e))return;const t=this.eventListeners.get(e),n=t.indexOf(i);n>-1&&t.splice(n,1)}dispatchComponentEvent(e,i={}){const t={component:this,target:this,type:e,timestamp:Date.now(),...i};return this.eventListeners?.has(e)&&this.eventListeners.get(e).forEach(n=>{try{typeof n=="function"&&n(t)}catch(m){console.error(`Error in ${e} event handler for ${this.name} ${this.id}:`,m)}}),t}set(e,i){const t=this.get(e),n=super.set(e,i);return t!==i&&this.dom&&this.dispatchComponentEvent("onUpdate",{path:e,oldValue:t,newValue:i}),n}get js(){return this.data}get json(){return this.data}remove=e=>{if(e){const m=lt(e),f=m.pop(),g=this.get(m);return Array.isArray(g)?Wo(f)?g.splice(Number(f),1):this.set(m,g.filter(c=>c!==f)):delete g[f],g}if(this.name==="stage")return null;const i=this.parent,t=this.children;this.dispatchComponentEvent("onRemove",{path:e,parent:i,children:[...t]}),Ni(t,m=>m.remove()),this.dom.remove(),Xa(oe.getAddress(`${i.name}s.${i.id}.children`),this.id),i.children.length||i.emptyClass(),i.name==="row"&&i.autoColumnWidths();const n={row:jn,column:Vn,field:Un}[this.name];return n&&Q.formeoUpdated({componentId:this.id,componentType:this.name,parent:i},n),oe[`${this.name}s`].delete(this.id)};empty(){const e=this.children.map(i=>(i.remove(),i));return this.dom.classList.add("empty"),e}emptyClass=()=>this.dom.classList.toggle("empty",!this.children.length);getActionButtons(){const e=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:()=>{oe.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...e)},mouseleave:({target:i})=>{this.dom.classList.remove(...e),oe.stages.active.dom.classList.remove(`active-hover-${this.name}`),i.removeAttribute("style")}},children:[{...V.btnTemplate({content:V.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}getComponentTag=()=>V.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[V.icon(`handle-${this.name}`),je(this.name)].filter(Boolean)});toggleEdit(e=!this.isEditing){this.isEditing=e;const i=this.dom,t="editing",n=`${t}-${this.name}`,m=this.dom.querySelector(`.${this.name}-edit`);me.slideToggle(m,333,e),this.name==="field"&&(me.slideToggle(this.preview,333,!e),i.parentElement.classList.toggle(`column-${n}`,e)),i.classList.toggle(t,e),i.classList.toggle(n,e)}get buttons(){if(this.actionButtons)return this.actionButtons;const e={handle:(m=`handle-${this.name}`)=>({...V.btnTemplate({content:V.icon(m)}),className:["component-handle"]}),move:(m="move")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-move"],meta:{id:"move"}}),edit:(m="edit")=>({...V.btnTemplate({content:V.icon(m)}),className:["edit-toggle"],meta:{id:"edit"},action:{click:()=>{this.toggleEdit()}}}),remove:(m="remove")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-remove"],meta:{id:"remove"},action:{click:()=>{me.slideUp(this.dom,333,()=>{this.name==="column"?(this.parent.autoColumnWidths(),this.remove()):this.remove()})}}}),clone:(m="copy")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),this.name==="column"&&this.parent.autoColumnWidths()}}})},{buttons:i,disabled:t}=this.config.actionButtons,n=i.filter(m=>!t.includes(m)).map(m=>e[m]?.()||m);return this.actionButtons=n,this.actionButtons}get index(){return Je(this.dom)}removeClasses=e=>{const i={string:()=>this.dom.classList.remove(e),array:()=>e.map(t=>this.dom.classList.remove(t))};return i.object=i.string,i[V.childType(e)](this.dom)};get parentType(){return gl.get(this.name)}get parent(){const e=this.parentType;if(!this.dom||!e)return null;const i=this.dom.closest(`.${Nn[e]}`);return i&&V.asComponent(i)}get children(){if(!this.dom)return[];const e=this.domChildren,i=dr.get(this.name);return Jn(e,t=>oe.getAddress(`${i}s.${t.id}`)).filter(Boolean)}loadChildren=(e=this.data.children)=>e.map(i=>this.addChild({id:i}));get domChildren(){const e=this.dom.querySelector(".children");return e?e.children:[]}addChild(e={},i=this.domChildren.length){let t=e;typeof e!="object"&&(t={id:t});const n=this.dom.querySelector(".children"),{id:m=Me()}=t,f=dr.get(this.name);if(!f)return null;const g=`${f}s`,c=oe.getAddress(`${g}.${m}`)||oe[g].add(m,t);i>=n.children.length?n.appendChild(c.dom):n.children[i].before(c.dom),this.dispatchComponentEvent("onAddChild",{parent:this,target:c,child:c,index:i}),c.dispatchComponentEvent("onAdd",{parent:this,target:c,index:i,addedVia:"addChild"}),this.config.events?.onAddChild?.({parent:this,child:c});const o=c.get("children");return o?.length&&c.loadChildren(o),this.removeClasses("empty"),this.saveChildOrder(),c}saveChildOrder=()=>{if(this.render)return;const e=this.children.map(({id:i})=>i);return this.set("children",e),e};onAdd({from:e,to:i,item:t,newIndex:n}){e.classList.contains("control-group")||(e=e.parentElement);const m=be(e),f=be(i.parentElement),g=()=>{this.saveChildOrder(),this.removeClasses("empty")},c=new Map([[-2,()=>{const h=this.addChild({},n).addChild();return h.addChild.bind(h)}],[-1,()=>{const h=this.addChild({},n);return h.addChild.bind(h)}],[0,()=>this.addChild.bind(this)],[1,h=>{const u=Je(this.dom);return()=>this.parent.addChild(h,u+1)}],[2,h=>()=>this.parent.parent.addChild(h)]]),o={controls:async()=>{if(!nn){const{default:r}=await vt(async()=>{const{default:a}=await Promise.resolve().then(()=>Zd);return{default:a}},void 0);nn=r}const{controlData:{meta:{id:h},...u}}=nn.get(t.id);Oi(u,"config.controlId",h);const d=h.startsWith("layout-")?h.replace(/^layout-/,""):"field",l=we({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${this.name}.${d}`),s=c.get(l)();return V.remove(t),s(u,n)},row:()=>(c.get({stage:-1,row:0,column:1}[f])||un)()?.({id:t.id},n),column:()=>(c.get({stage:-2,row:-1}[f])||un)()?.(t.id)}[m]?.(t,n);return this.dispatchComponentEvent("onAdd",{from:e,to:i,item:t,newIndex:n,fromType:m,toType:f,addedComponent:o,addedVia:"dragDrop"}),g(),o}onSort=()=>this.saveChildOrder();onRemove({from:{parentElement:e}}){return e.classList.contains(Ge)&&e.classList.remove("column-editing-field"),this.name!=="stage"&&!this.children.length?this.remove():(this.emptyClass(),this.saveChildOrder())}onEnd=({to:{parentElement:e},from:{parentElement:i}})=>{e?.classList.remove(`hovering-${be(e)}`),i?.classList.remove(`hovering-${be(i)}`)};onRender(){this.dispatchComponentEvent("onRender",{dom:this.dom});const{events:e}=this.config;if(!e)return null;e.onRender&&V.onRender(this.dom,e.onRender)}set config(e){const i=we(e,"all"),t=we(this.data,"config.controlId"),n=[i,t&&we(e,t),we(e,this.id)].reduce((m,f)=>f?De(m,f):m,this.configVal);this.configVal=n}get config(){return this.configVal}runConditions=()=>{const e=this.get("conditions");return e?.length?e.map(i=>{const t=this.processConditions(i.if),n=this.processResults(i.then);return t.map(m=>this.evaluateConditions(m)&&this.execResults(n))}):null};getComponent(e){const[i,t]=e.split("."),n=oe[i];return t===this.id?this:n?.get(t)}value=(e,i)=>{const t=e.split("."),n=this.getComponent(e),m=n&&t.slice(2,t.length).join(".");return[!n,!m,!rn[m]].some(Boolean)?e:i?n.set(rn[m],i):n.get(rn[m])};getResult=e=>({"=":(i,t,n)=>i.set(t,n)})[e];processResults=e=>e.map(({operator:i,target:t,value:n})=>{const m=this.getComponent(t);return{target:m,propertyPath:m&&t.split(".").slice(2,t.length).join("."),action:this.getResult(i),value:this.value(n)}});execResults=e=>{const i=e.map(t=>this.execResult(t));return Promise.all(i)};execResult=({target:e,action:i,value:t,_propertyPath:n})=>new Promise((m,f)=>{try{return m(i(e,t))}catch(g){return f(g)}});cloneData=()=>{const e={...He(this.data),id:Me()};return this.name!=="field"&&(e.children=[]),e};clone=(e=this.parent)=>{const i=e.addChild(this.cloneData(),this.index+1);return this.name!=="field"&&this.cloneChildren(i),this.dispatchComponentEvent("onClone",{original:this,clone:i,parent:e}),i};cloneChildren(e){for(const i of this.children)i?.clone(e)}createChildWrap=e=>V.create({tag:"ul",attrs:{className:"children"},children:e});get isRow(){return this.name===Hi.row}get isColumn(){return this.name===Hi.column}get isField(){return this.name===Hi.field}isDisabledProp=(e,i="attrs")=>{if(we(this.config,e))return!1;if((this.config?.disabled||[]).includes(e))return!0;const t=mi(e);return(this.config?.panels[i]?.disabled||[]).includes(t)};isLockedProp=(e,i="attrs")=>{if((this.config?.locked||[]).includes(e))return!0;const t=mi(e);return!!(this.config?.panels[i]?.locked||[]).includes(t)};get editWindow(){const e={className:["component-edit",`${this.name}-edit`,"slide-toggle","formeo-panels-wrap"]},i=this.editPanels.size;return i&&(e.className.push(`panel-count-${i}`),e.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh),e.action={onRender:()=>{if(i===0){const t=this.dom.querySelector(".edit-toggle"),n=this.dom.querySelector(`.${this.name}-actions`),m=n.getElementsByTagName("button");n.style.maxWidth=`${m.length*m[0].clientWidth}px`,V.remove(t)}else this.resizePanelWrap()}},V.create(e)}updateEditPanels=()=>{if(!this.config)return null;const e=new Set(["object","array"]),i=st([...this.config.panels.order,...Object.keys(this.data)]),t=new Set(["children","meta","action","events",...this.config.panels.disabled]),n=i.filter(f=>!t.has(f));for(const f of n){const g=this.get(f),c=V.childType(g);if(e.has(c)){const o=new _d(g,f,this);this.editPanels.set(o.name,o)}}const m={panels:Array.from(this.editPanels.values()).map(({panelConfig:f})=>f),id:this.id,displayType:"auto"};this.panels=new is(m),this.dom&&(this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav),this.dom.querySelector(".panels").replaceWith(this.panels.panelsWrap))}},Dd=class{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(e){const i=e.querySelector(".children");if(!i)return 0;const t=i.children.length,n=V.getStyle(i,"gap")||"0px",m=parseFloat(n,10)||0;return this.totalGapWidth=m*(t-1),i.offsetWidth-this.totalGapWidth}validateResizeTarget(e,i){return e&&i&&e.offsetWidth&&i.offsetWidth}onStart(e){if(e.preventDefault(),this.resized=!1,e.button!==0)return;const i=e.target.parentElement,t=i.nextSibling||i.previousSibling,n=i.closest(`.${Ue}`);if(!this.validateResizeTarget(i,t)){console.warn("Invalid resize targets"),this.cleanup();return}if(this.startX=e.type==="touchstart"?e.touches[0].clientX:e.clientX,n.classList.add(Pi),this.columnPreset=n.querySelector(`.${co}`),this.originalColumnClass=i.className,this.originalSiblingClass=t.className,i.className=i.className.replace(fn,""),t.className=t.className.replace(fn,""),this.colStartWidth=i.offsetWidth,this.sibStartWidth=t.offsetWidth,this.rowWidth=this.getRowWidth(n),this.rowWidth<=0){console.warn("Invalid row width calculated"),this.cleanup();return}this.column=i,this.sibling=t,this.row=n;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(m){console.error("Failed to initialize resize listeners:",m),this.cleanup()}}calculateNewWidths(e){const i=this.colStartWidth+e-this.startX,t=this.sibStartWidth-e+this.startX,n=parseFloat(zi(i,this.rowWidth)),m=parseFloat(zi(t,this.rowWidth));return n<10||m<10?null:{colWidth:dn(n.toFixed(1)),siblingColWidth:dn(m.toFixed(1))}}onMove(e){e.preventDefault();const{column:i,sibling:t}=this,n=e.type==="touchmove"?e.touches[0].clientX:e.clientX,m=this.calculateNewWidths(n);if(!m)return;const{colWidth:f,siblingColWidth:g}=m;i.dataset.colWidth=f,t.dataset.colWidth=g,i.style.width=f,t.style.width=g,this.resized=!0}onStop(){const{column:e,sibling:i}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),oe.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),oe.setAddress(`columns.${i.id}.config.width`,i.dataset.colWidth),this.row.classList.remove(Pi),this.resized=!1,this.cleanup())}cleanup(){this.column&&this.originalColumnClass&&(this.column.className=this.originalColumnClass),this.sibling&&this.originalSiblingClass&&(this.sibling.className=this.originalSiblingClass),this.row&&this.row.classList.remove(Pi),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const e=this.columnPreset;let i=e.querySelector(`.${pn}`);const t=this.row.querySelector(".children").children,n=Jn(t,g=>zi(g.clientWidth,this.rowWidth).toFixed(1)),m=n.join(","),f=n.join(" | ");return i||(i=V.create({tag:"option",attrs:{className:pn,value:m,selected:!0},content:f}),e.append(i)),i.value=m,i.textContent=f,m}},Nd=()=>Object.freeze({config:{width:"100%"},children:[],className:[Ge]}),Or={resizeHandle:e=>({className:"resize-x-handle",action:{pointerdown:e.onStart.bind(e)},content:[V.icon("triangle-down"),V.icon("triangle-up")]}),editWindow:()=>({className:"column-edit group-config"})},Fd=class extends Fi{constructor(e){super("column",{...Nd(),...e});const i=this.createChildWrap();this.dom=V.create({tag:"li",className:[Ge,"empty"],dataset:{hoverTag:Z.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),Or.editWindow(),Or.resizeHandle(new Dd),i]}),this.processConfig(),Q.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),J.create(i,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:t=>{t.from!==t.to&&t.from.classList.remove("hovering-column")},draggable:`.${Tt}`,handle:".item-move"})}processConfig(){const e=Ae.get(this.data,"config.width");e&&this.setDomWidth(e)}refreshFieldPanels=()=>{for(const e of this.children)e.panels.nav.refresh()};setDomWidth=e=>{this.dom.dataset.colWidth=e,this.dom.style.width=e};setWidth=e=>(this.setDomWidth(e),this.set("config.width",e))},zd={actionButtons:{buttons:["clone","move","remove"],disabled:[]}},Pd=class extends Ii{constructor(e){super("columns",e),this.config={all:zd}}Component(e){return new Fd(e)}},ns=new Pd,Hd=()=>Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[Ue]}),Wd=class extends Fi{constructor(e){super("row",{...Hd(),...e});const i=this.createChildWrap();this.dom=V.create({tag:"li",className:[Ue,"empty"],dataset:{hoverTag:Z.get("row"),editingHoverTag:Z.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,i]}),J.create(i,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),draggable:`.${Ge}`,handle:".item-move"})}get editWindow(){const e={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:Z.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:c}})=>{this.set("config.fieldset",!!c)}},config:{label:Z.get("row.settings.fieldsetWrap")}},i={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:Z.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:c}})=>this.set("config.inputGroup",c)},config:{label:Z.get("row.makeInputGroup"),description:Z.get("row.makeInputGroupDesc")}},t={className:"input-group",content:{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:this.get("config.legend"),placeholder:"Title"},config:{label:{children:["Row Title",{tag:"span",content:" ⓘ",dataset:{tooltip:"Row title will be used as the legend for the fieldset"}}]}},action:{input:({target:{value:c}})=>this.set("config.legend",c)},className:""}},n=V.formGroup([e,t]),m={tag:"label",content:Z.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=V.create(this.columnPresetControlConfig);const f={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},g=[i,"hr",n,"hr",V.formGroup([m,f],"row")];return V.create({className:`${this.name}-edit group-config`,action:{onRender:c=>{const o=g.map(h=>V.create(h));c.append(...o)}}})}onAdd(...e){super.onAdd(...e),this.autoColumnWidths()}onRemove(...e){super.onRemove(...e),this.autoColumnWidths()}autoColumnWidths=()=>{const e=this.children;if(!e.length)return;const i=Number.parseFloat((100/e.length).toFixed(1))/1;for(const t of e){t.removeClasses(fn);const n=t.dom,m=dn(i);t.set("config.width",m),n.style.width=m,n.dataset.colWidth=m;const f=setTimeout(()=>{clearTimeout(f),t.refreshFieldPanels()},at);document.dispatchEvent(Q.columnResized)}this.updateColumnPreset()};updateColumnPreset=()=>{this.columnPresetControl.innerHTML="";const e=this.getColumnPresetOptions.map(({label:i,...t})=>V.create({tag:"option",content:i,attrs:t}));this.columnPresetControl.append(...e)};setColumnWidths=e=>{typeof e=="string"&&(e=e.split(",")),this.children.forEach((i,t)=>{i.setWidth(`${e[t]}%`),i.refreshFieldPanels()})};get getColumnPresetOptions(){const e=this.children,i=vl.get(e.length-1)||[],t=e.map(n=>{const m=n.get("config.width")||"";return Number(m.replace("%","")).toFixed(1)}).join(",");if(i.length){const n=i.slice();return n.find(m=>m.value===t)||n.push({value:t,label:t.replace(/,/g," | "),className:pn}),n.map(m=>{const f={...m};return f.selected=m.value===t,f})}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:Z.get("defineColumnLayout"),className:co},action:{change:({target:e})=>{const{value:i}=e;this.setColumnWidths(i)}},options:this.getColumnPresetOptions}}},Bd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}},jd=class extends Ii{constructor(e){super("rows",e),this.config={all:Bd}}Component(e){return new Wd(e)}},ir=new jd,Vd=()=>({conditions:[Gn()],children:[]}),Ud=class extends Fi{constructor(e){super("stage",{...Vd(),...e}),this.updateEditPanels(),this.debouncedUpdateEditPanels=fi(this.updateEditPanels),Z.get("Untitled Form"),Z.get("Untitled Form"),Z.get("Form Title"),Z.get("Form novalidate"),Z.get("Tags");const i=this.createChildWrap();this.dom=V.create({attrs:{className:[kt,"empty"],id:this.id},children:[this.getComponentTag(),this.getActionButtons(),this.editWindow,i]}),J.create(i,{animation:150,fallbackClass:"row-moving",group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>{Bt.active=this},onSort:this.onSort.bind(this),draggable:`.${Ue}`,handle:".item-move"})}empty(e=!0){return new Promise(i=>{e?(this.dom.classList.add("removing-all-fields"),me.slideUp(this.dom,333,()=>{i(super.empty(e)),this.dom.classList.remove("removing-all-fields"),me.slideDown(this.dom,333)})):i(super.empty())})}onAdd(...e){const i=super.onAdd(...e);i?.name==="column"&&i.parent.autoColumnWidths()}},Gd=()=>({actionButtons:{buttons:["edit"],disabled:[]},panels:{disabled:[],order:["attrs","options","conditions"]}}),Kd=class extends Ii{constructor(e){super("stages",e),this.config={all:Gd()}}Component(e){return new Ud(e)}},Bt=new Kd,qd=class{controlCache=new Set;constructor({events:e={},dependencies:i={},controlAction:t,...n}){this.events=e,this.controlData=n,this.controlAction=t,this.dependencies=i,this.id=n.id||Me()}get controlId(){return this.controlData.meta?.id||this.controlData.config?.controlId}get dom(){const{meta:e,config:i}=this.controlData,t=this.i18n(i.label)||i.label,n={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:V.icon(e.icon)},{tag:"span",className:"control-label",content:t}],action:{focus:({target:m})=>{const f=m.closest(`.${ot}`);return f&&ct.panels.nav.refresh(Je(f))},click:({target:m})=>{const f=m.closest(".field-control")?.id;f&&ct.addElement(f)}}};return V.create({tag:"li",id:this.id,className:["field-control",`${e.group}-control`,`${e.id}-control`],content:n,meta:e,action:this.controlAction})}promise(){return Go(this.dependencies)}i18n(e,i){const t=Z.locale,n=this.definition?.i18n?.[t]||{};return(n[e]?.()??n[e])||Z.get(e,i)}},Yd=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}}),Zd=Sn({Controls:()=>rs,default:()=>ct}),rs=class{constructor(){this.data=new Map,this.buttonActions={focus:({target:e})=>{const i=e.closest(`.${ot}`);return i&&this.panels.nav.refresh(Je(i))},click:({target:e})=>{this.addElement(e.parentElement.id)}}}async init(e,i=!1){return await this.applyOptions(e),this.buildDOM(i),this}registerControls(e){return this.controls=[],e.map(i=>{const t=typeof i=="function"?new i:new qd(i);return this.add(t),this.controls.push(t.dom),t.promise()})}groupLabel=e=>Z.get(e)||e||"";groupElements(){let e=this.options.groups.slice(),i=this.controls.slice(),t=[];const n=[];return e=Si(e,this.groupOrder,"id"),e=e.filter(m=>cr(m.id,this.options.disable.groups)),t=e.map(m=>{const f={tag:"ul",attrs:{className:[ot,lo],id:`${m.id}-${ot}`},config:{label:this.groupLabel(m.label)}};if(this.options.elementOrder[m.id]){const g=this.options.elementOrder[m.id];m.elementOrder=st(g.concat(m.elementOrder))}return i=Si(i,m.elementOrder,"meta.id"),f.content=i.filter(g=>{const{controlData:c}=this.get(g.id),o=c.meta.id||"",h=[cr(o,this.options.disable.elements),c.meta.group===m.id,!n.includes(o)];let u=!0;return u=h.every(d=>d===!0),u&&n.push(o),u}),f}),t}add(e=Object.create(null)){const i=He(e);return this.data.set(i.id,i),i.controlData.meta.id&&this.data.set(i.controlData.meta.id,i.controlData),i}get(e){return He(this.data.get(e))}formActions(){if(this.options.disable.formActions===!0)return null;const e={...V.btnTemplate({content:[V.icon("bin"),Z.get("clear")],title:Z.get("clearAll")}),className:["clear-form"],action:{click:t=>{ir.size?(Q.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:Z.get("confirmClearAll"),clearAllAction:()=>{Bt.clearAll().then(()=>{const n={src:t.target};Q.formeoCleared(n)})},btnCoords:V.coords(t.target)}}),document.dispatchEvent(Q.confirmClearAll)):window.alert(Z.get("cannotClearFields"))}}},i={...V.btnTemplate({content:[V.icon("floppy-disk"),Z.get("save")],title:Z.get("save")}),className:["save-form"],action:{click:async({target:t})=>{const{default:n}=await vt(async()=>{const{default:g}=await Promise.resolve().then(()=>iu);return{default:g}},void 0),{formData:m}=n,f={action:()=>{},coords:V.coords(t),message:"",button:t};return ge.click.btn(f),ge.save.form(m)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:e,saveBtn:i}).reduce((t,[n,m])=>(this.options.disable.formActions.includes(n)||t.push(m),t),[])}}buildDOM(e){const i=this.groupElements(),t=this.formActions(),{displayType:n}=this.options.panels;this.panels=new is({panels:i,type:"controls",displayType:n});const m=["control-groups","formeo-panels-wrap",`panel-count-${i.length}`],f=V.create({className:m,content:[this.panels.panelNav,this.panels.panelsWrap]}),g=["formeo-controls"];e&&g.push("formeo-sticky");const c=V.create({className:g,content:[f,t]}),o=c.getElementsByClassName("control-group");this.dom=c,this.groups=o;const[h]=o;this.currentGroup=h,this.actions={filter:u=>{const d=u!=="",l=this.controls;let s=f.querySelector(".filtered-term");if(V.toggleElementsByStr(l,u),d){const r=Z.get("controls.filteringTerm",u);c.classList.add("filtered"),s?s.textContent=r:(s=V.create({tag:"h5",className:"filtered-term",content:r}),f.insertBefore(s,f.firstChild))}else s&&(c.classList.remove("filtered"),s.remove())},addElement:this.addElement,addGroup:u=>console.log(u)};for(let u=o.length-1;u>=0;u--){const d=`formeo-controls-${o[u]}`;this.options.sortable||globalThis.localStorage.removeItem(d),J.create(o[u],{animation:150,fallbackClass:"control-moving",fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,group:{name:"controls",pull:"clone",put:!1,revertClone:!0},onClone:({clone:l,item:s})=>{if(l.id=s.id,this.options.ghostPreview){const{controlData:r}=this.get(s.id);vt(async()=>{const{default:a}=await Promise.resolve().then(()=>Qd);return{default:a}},void 0).then(({default:a})=>{l.innerHTML="",l.appendChild(new a(r).preview)})}},onStart:()=>{this.originalDocumentOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"},onEnd:()=>{document.documentElement.style.overflow=this.originalDocumentOverflow,this.originalDocumentOverflow=null},sort:this.options.sortable,store:{get:()=>{const l=globalThis.localStorage.getItem(d);return l?l.split("|"):[]},set:l=>{const s=l.toArray();globalThis.localStorage.setItem(d,s.join("|"))}}})}return c}layoutTypes={row:()=>Bt.active.addChild(),column:()=>this.layoutTypes.row().addChild(),field:e=>this.layoutTypes.column().addChild(e)};addElement=e=>{const{meta:{group:i,id:t},...n}=we(this.get(e),"controlData");return Oi(n,"config.controlId",t),i==="layout"?this.layoutTypes[t.replace("layout-","")]():this.layoutTypes.field(n)};applyOptions=async(e={})=>{const{container:i,elements:t,groupOrder:n,...m}=De(Yd,e);this.container=V.resolveContainer(i),this.groupOrder=st(n.concat(["common","html","layout"])),this.options=m;const[f,g,c]=await Promise.all([vt(()=>import("./layout.min.js"),[]),vt(()=>import("./form.min.js"),[]),vt(()=>import("./html.min.js"),[])]),o=[f.default,g.default,c.default].flat();return Promise.all(this.registerControls([...o,...t]))}},ct=new rs,Qd=Sn({default:()=>os}),Xd=new Set(["checkbox","radio"]),Jd=new Set(["radio","checkbox","select-one","select-multiple"]),os=class extends Fi{constructor(e=Object.create(null)){super("field",e),this.debouncedUpdateEditPanels=fi(this.updateEditPanels),this.debouncedUpdatePreview=fi(this.updatePreview),this.label=V.create(this.labelConfig),this.preview=this.fieldPreview(),this.controlId=this.get("config.controlId")||this.get("meta.id");const i=this.getActionButtons(),t=this.actionButtons.some(m=>m.meta?.id==="edit");this.updateEditPanels();const n=V.create({tag:"li",attrs:{className:Tt},id:this.id,children:[this.label,this.getComponentTag(),i,t&&this.editWindow,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:Z.get("field")}});this.dom=n,this.isEditing=!1}get labelConfig(){if(this.get("config.hideLabel"))return null;const{label:e,editorLabel:i,disableHtmlLabel:t,helpText:n,tooltip:m}=this.get("config"),{required:f}=this.get("attrs")||{},g=i||e,c={tag:"label",attrs:{}};return t?(c.tag="input",c.attrs.value=g):(c.attrs.contenteditable=!0,c.children=g),{className:"prev-label",children:[{...c,action:{input:({target:{innerHTML:o,value:h}})=>{const u=t?h:o;super.set("config.label",u);const d=this.dom.querySelector(".config-label");d&&(d.value=u)}}},f&&V.requiredMark(),m&&V.tooltip(m),n&&V.helpText(n)]}}setData=(e,i)=>super.set(e,i);set(e,i){return this.setData(e,i)}updateLabel(){const e=V.create(this.labelConfig);(this.label||!e)&&this.label.remove(),e&&(this.data.config?.labelAfter?this.dom.append(e):this.dom.prepend(e)),this.label=e}updatePreview=()=>{this.updateLabel();const e=this.fieldPreview();this.preview.replaceWith(e),this.preview=e};get defaultPreviewActions(){return{change:e=>{const{target:i}=e,{type:t}=i;if(Jd.has(t)){const n=this.preview.querySelectorAll(":checked"),m=this.get("options"),f=m?.[0]?.selected===void 0?"checked":"selected",g=m.reduce((c,o)=>(c[o.value]=o,c[o.value][f]=!1,c),{});for(const c of n)g[c.value][f]=c.value===g[c.value].value;return super.set("options",Object.values(g)),this.debouncedUpdateEditPanels()}},click:e=>{e.target.contentEditable==="true"&&e.preventDefault()},input:({target:e})=>{if(["input","meter","progress","button"].includes(e.tagName.toLowerCase()))return super.set("attrs.value",e.value),this.debouncedUpdateEditPanels();if(e.contentEditable&&!e.type?.startsWith("select-")){const i=e.parentElement.classList;if(i.contains("f-checkbox")||i.contains("f-radio")){const t=e.parentElement,n=Je(t);return this.setData(`options[${n}].label`,e.innerHTML),this.debouncedUpdateEditPanels()}this.setData("content",e.innerHTML||e.value)}}}}fieldPreview(){const{action:e={},...i}=He(this.data);i.id=`prev-${this.id}`,i.action=Object.entries(e).reduce((n,[m,f])=>(n[m]=f.bind(this),n),{}),this.data?.config.editableContent&&(i.attrs={...i.attrs,contenteditable:!0});const t={attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:V.create(i,!0),action:this.defaultPreviewActions};return V.create(t,!0)}get isCheckable(){return Xd.has(this.get("config.controlId"))}},eu=()=>({actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}}),tu=class extends Ii{constructor(e){super("fields",e),this.config={all:eu()}}Component(e){return new os(e)}get=e=>{let i=e&&we(this.data,e);if(!i){const t=ct.get(e);t&&(i=this.add(null,t.controlData))}return i};getData=()=>Object.entries(this.data).reduce((e,[i,t])=>{const{conditions:n,...m}=t?.getData()||t;if(n?.length){let f=!0;if(n.length===1){const[g]=n;f=!!g.if[0].source}f&&(m.conditions=n)}return e[i]=m,e},{});load=(e=Object.create(null))=>{const i=Li(e);this.empty();for(const[t,n]of Object.entries(i)){const{meta:m,...f}=n;m?.id&&Oi(f,"config.controlId",m?.id),this.add(t,f)}return this.data}},ss=new tu,iu=Sn({Columns:()=>Ht,Components:()=>as,Controls:()=>Wt,Fields:()=>hi,Rows:()=>ui,Stages:()=>di,default:()=>oe}),di=Bt,ui=ir,Ht=ns,hi=ss,Wt=ct,nu=(e,i=!1)=>{if(e!=null){const t=Li(e);if(t&&typeof t=="object"){const n=He(t);return{id:n.id||wt().id,stages:n.stages||wt().stages,rows:n.rows||{},columns:n.columns||{},fields:n.fields||{}}}console.warn("Formeo: Invalid formData provided, using default")}if(i){const t=Rn.get(Fn);if(t)return t}return wt()},as=class extends qn{constructor(){super("components"),this.disableEvents=!0,this.stages=di,this.rows=ui,this.columns=Ht,this.fields=hi,this.controls=Wt}load=(e,i)=>{this.empty();const t=nu(e,i.sessionStorage);this.opts=i,this.set("id",t.id),this.add("stages",di.load(t.stages)),this.add("rows",ui.load(t.rows)),this.add("columns",Ht.load(t.columns)),this.add("fields",hi.load(t.fields));for(const n of Object.values(this.get("stages")))n.loadChildren();return this.data};flatList(){const e={};for(const i of Object.keys(this.data.stages))ao(this.data,i,"stages",e);return e}getChildData=({type:e,id:i})=>{const t=this.get(e,i);if(t)return t.getData()};get json(){return window.JSON.stringify({$schema:`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/formData_schema.json`,...this.formData})}get formData(){return{id:this.get("id"),stages:Bt.getData(),rows:ir.getData(),columns:ns.getData(),fields:ss.getData()}}set config(e){const{stages:i,rows:t,columns:n,fields:m}=e;di.config=i,ui.config=t,Ht.config=n,hi.config=m}getIndex(e){return this[e]||this[al.get(e)]}setAddress(e,i){if(!Te(e))return;const[t,n,...m]=Array.isArray(e)?e:lt(e),f=this.getIndex(t).get(n);return f?.set(m,i),f}getAddress(e){if(!Te(e))return;const[i,t,...n]=Array.isArray(e)?e:lt(e),m=this.getIndex(i).get(t);if(!(n.length&&!m))return n.length?m.get(n):m}},oe=new as,ei="no-transition",ru={debug:!1,bubbles:!0,formeoLoaded:e=>{},onAdd:()=>{},onRemove:()=>{},onChange:e=>Q.opts?.debug&&console.log(e),onUpdate:e=>Q.opts?.debug&&console.log(e),onUpdateStage:e=>Q.opts?.debug&&console.log(e),onUpdateRow:e=>Q.opts?.debug&&console.log(e),onUpdateColumn:e=>Q.opts?.debug&&console.log(e),onUpdateField:e=>Q.opts?.debug&&console.log(e),onAddRow:e=>Q.opts?.debug&&console.log(e),onAddColumn:e=>Q.opts?.debug&&console.log(e),onAddField:e=>Q.opts?.debug&&console.log(e),onRemoveRow:e=>Q.opts?.debug&&console.log(e),onRemoveColumn:e=>Q.opts?.debug&&console.log(e),onRemoveField:e=>Q.opts?.debug&&console.log(e),onRender:e=>Q.opts?.debug&&console.log(e),onSave:e=>{},confirmClearAll:e=>{globalThis.confirm(e.confirmationMessage)&&e.clearAllAction(e)}},Oe=({src:e,...i},t=Pn)=>{const n=new globalThis.CustomEvent(t,{detail:i,bubbles:Q.opts?.debug||Q.opts?.bubbles});if(n.data=(e||document).dispatchEvent(n),t==="formeoUpdated"){const m=new globalThis.CustomEvent(yl,{detail:i,bubbles:Q.opts?.debug||Q.opts?.bubbles});(e||document).dispatchEvent(m)}return n},Q={init:function(e){return this.opts={...ru,...e},this},formeoSaved:e=>Oe(e,fo),formeoUpdated:(e,i)=>Oe(e,i||"formeoUpdated"),formeoCleared:e=>Oe(e,bl),formeoOnRender:e=>Oe(e,bo),formeoConditionUpdated:e=>Oe(e,wl),formeoAddedRow:e=>Oe(e,Hn),formeoAddedColumn:e=>Oe(e,Wn),formeoAddedField:e=>Oe(e,Bn),formeoRemovedRow:e=>Oe(e,jn),formeoRemovedColumn:e=>Oe(e,Vn),formeoRemovedField:e=>Oe(e,Un)},ou=so(()=>{const e={timeStamp:globalThis.performance.now(),type:Pn,detail:oe.formData};Q.opts.onUpdate(e),Q.opts.onChange!==Q.opts.onUpdate&&Q.opts.onChange(e)},at);document.addEventListener(Pn,ou);document.addEventListener(go,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateStage(m)});document.addEventListener(mo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateRow(m)});document.addEventListener(vo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateColumn(m)});document.addEventListener(yo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateField(m)});document.addEventListener(Hn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddRow(m)});document.addEventListener(Wn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddColumn(m)});document.addEventListener(Bn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddField(m)});document.addEventListener(jn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveRow(m)});document.addEventListener(Vn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveColumn(m)});document.addEventListener(Un,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveField(m)});document.addEventListener(bo,e=>{const{timeStamp:i,type:t,detail:n}=e;Q.opts.onRender({timeStamp:i,type:t,detail:n})});document.addEventListener("confirmClearAll",e=>{e={timeStamp:e.timeStamp,type:e.type,confirmationMessage:e.detail.confirmationMessage,clearAllAction:e.detail.clearAllAction,btnCoords:e.detail.btnCoords},Q.opts.confirmClearAll(e)});document.addEventListener(fo,({timeStamp:e,type:i,detail:{formData:t}})=>{const n={timeStamp:e,type:i,formData:t};Q.opts.onSave(n)});document.addEventListener("formeoLoaded",e=>{Q.opts.formeoLoaded(e.detail.formeo)});var on;function su(){on=on||window.requestAnimationFrame(()=>{on=!1;for(const e of Object.values(Ht.data))e.dom.classList.add(ei),Wt.dom.classList.add(ei),Wt.panels.nav.refresh(),e.refreshFieldPanels(),so(()=>{e.dom.classList.remove(ei),Wt.dom.classList.remove(ei)},333)})}window.addEventListener("resize",su);var Ir={add:{attr:e=>{const i=globalThis.prompt(e.message.attr);if(i&&e.isDisabled(i))return globalThis.alert(Z.get("attributeNotPermitted",i)),ge.add.attrs(e);let t;i&&(t=String(globalThis.prompt(e.message.value,"")),e.addAction(i,t))},option:e=>{e.addAction()},condition:e=>{e.addAction(e)},config:e=>{e.addAction(e)}},remove:{attrs:e=>{e.removeAction()},options:e=>{e.removeAction()},conditions:e=>{e.removeAction()}},click:{btn:e=>{e.action()}},save:{form:un}},ge={init:function(e){const i=Object.keys(Ir);return this.opts=i.reduce((t,n)=>(t[n]={...Ir[n],...e[n]},t),e),this},add:{attrs:e=>ge.opts.add.attr(e),options:e=>ge.opts.add.option(e),conditions:e=>(e.template=e.template||Gn(),ge.opts.add.condition(e)),config:e=>ge.opts.add.config(e)},remove:{attrs:e=>ge.opts.remove.attrs(e),options:e=>ge.opts.remove.options(e),conditions:e=>ge.opts.remove.conditions(e)},click:{btn:e=>ge.opts.click.btn(e)},save:{form:e=>(ge.opts.sessionStorage&&Rn.set(Fn,e),Q.formeoSaved({formData:e}),ge.opts.save.form(e))}},au={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,svgSprite:null,style:nl,iconFont:null,config:{},events:{},actions:{},controls:{container:null},i18n:{location:"https://draggable.github.io/formeo/assets/lang/"},onLoad:()=>{}}}},Se={CREATED:"created",LOADING_RESOURCES:"loading",INITIALIZING:"initializing",READY:"ready",ERROR:"error"},ls=class{#e=Se.CREATED;#i=null;#t=null;#n=!1;constructor({formData:e,...i},t){const{actions:n,events:m,debug:f,config:g,editorContainer:c,...o}=De(au.editor,i);c&&(this.editorContainer=V.resolveContainer(c)||null),this.opts=o,V.setOptions=o,oe.config=g;const h=t||e;this.#t=h?rt(h):null,this.userFormData=this.#t,this.Components=oe,this.dom=V,Q.init({debug:f,...m}),ge.init({debug:f,sessionStorage:o.sessionStorage,...n}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.loadResources.bind(this)):this.loadResources()}get formData(){return this.Components.formData}set formData(e={}){const i=rt(e);this.#t=i,this.userFormData=i,this.load(this.userFormData,this.opts)}loadData(e={}){this.formData=e}get json(){return this.Components.json}clear(){const e=wt();this.#t=e,this.userFormData=e,this.Components.load(this.userFormData,this.opts),this.render()}async loadResources(){document.removeEventListener("DOMContentLoaded",this.loadResources),this.#e=Se.LOADING_RESOURCES;const e=[Xc(this.opts.svgSprite),ed(this.opts.style),Z.init({preloaded:{"en-US":vs},...this.opts.i18n,locale:globalThis.sessionStorage?.getItem(ur)})].filter(Boolean);try{await Promise.all(e),this.opts.allowEdit&&this.init()}catch(i){throw this.#e=Se.ERROR,console.error("Failed to load resources:",i),i}}init(){return this.#e===Se.INITIALIZING?this.#i:this.#e===Se.READY?this.#r():(this.#e=Se.INITIALIZING,this.#i=ct.init(this.opts.controls,this.opts.stickyControls).then(e=>(this.controls=e,this.#n||(this.#s(),this.#n=!0),this.formId=oe.get("id"),this.i18n={setLang:this.#o.bind(this)},this.render(),this.#e=Se.READY,this.opts.onLoad?.(this),this.tooltipInstance=new jr,this)).catch(e=>{throw this.#e=Se.ERROR,console.error("Failed to initialize editor:",e),e}),this.#i)}async#o(e){globalThis.sessionStorage?.setItem(ur,e),await Z.setCurrent(e),await this.#r()}async#r(){return this.controls=await ct.init(this.opts.controls,this.opts.stickyControls),this.render(),this}#s(){const e=this.#a();this.Components.load(e,this.opts)}#a(){if(this.#t)return He(this.#t);if(this.opts.sessionStorage){const e=Rn.get(Fn);if(e)return e}return wt()}load(e=this.userFormData,i=this.opts){this.Components.load(e,i),this.render()}get initState(){return this.#e}get isReady(){return this.#e===Se.READY}async whenReady(){return this.#e===Se.READY?this:this.#e===Se.ERROR?Promise.reject(new Error("Editor initialization failed")):this.#i?this.#i:new Promise((e,i)=>{const t=()=>{this.#e===Se.READY?e(this):this.#e===Se.ERROR?i(new Error("Editor initialization failed")):globalThis.requestAnimationFrame(t)};t()})}render(){if(!this.controls)return globalThis.requestAnimationFrame(()=>this.render());if(this.stages=Object.values(oe.get("stages")),this.opts.controlOnLeft)for(const t of this.stages)t.dom.style.order=1;const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map(({dom:t})=>t)]};Z.current.dir&&(e.attrs.dir=Z.current.dir,V.dir=Z.current.dir),this.editor=V.create(e);const i=this.controls.container||this.editor;i&&(i!==this.editor&&V.empty(i),i.appendChild(this.controls.dom)),this.editorContainer&&(V.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),Q.formeoLoaded=new globalThis.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(Q.formeoLoaded)}},Dr=e=>typeof e=="string"?document.querySelector(e):e,lu=({editorContainer:e,renderContainer:i,formData:t,...n})=>{const m={renderContainer:Dr(i),editorContainer:Dr(e),formData:rt(t)};return{elements:{},...n,...m}},ti=e=>e.match(Al)?.[0]||e,Nr=e=>{if(!e||e.hasAttribute("hidden")||e.parentElement.hasAttribute("hidden"))return!1;const i=window.getComputedStyle(e);return!(i.display==="none"||i.visibility==="hidden"||i.opacity==="0")},cu={isChecked:e=>e.checked,isNotChecked:e=>!e.checked,value:e=>e.value,isVisible:e=>Nr(e),isNotVisible:e=>!Nr(e)},du=()=>V.btnTemplate({className:"remove-input-group",children:V.icon("remove"),action:{mouseover:({target:e})=>e.parentElement.classList.add("will-remove"),mouseleave:({target:e})=>e.parentElement.classList.remove("will-remove"),click:({target:e})=>e.parentElement.remove()}}),Fr={equals:gn.default,notEquals:(e,i)=>!(0,gn.default)(e,i),contains:(e,i)=>e.includes(i),notContains:(e,i)=>!e.includes(i)},uu=Object.entries(wo).reduce((e,[i,t])=>(e[t]=Fr[i],e[i]=Fr[i],e),{}),zr={equals:(e,{targetProperty:i,value:t})=>{e[`_${i}`]=e[i],e[i]=t}},hu=Object.entries(Co).reduce((e,[i,t])=>(e[t]=zr[i],e[i]=zr[i],e),{}),pu={isChecked:e=>{e.checked=!0},isNotChecked:e=>{e.checked=!1},value:(e,{assignment:i,...t})=>{const n=hu[i]?.(e,t),m=new Event("input",{bubbles:!0});return e.dispatchEvent(m),n},isNotVisible:e=>{e?._required===void 0&&(e._required=e.required),e.parentElement.setAttribute("hidden",!0),e.required=!1},isVisible:e=>{e.parentElement.removeAttribute("hidden"),e.required=e._required}},cs=class{constructor(e,i){const{renderContainer:t,elements:n,formData:m,config:f}=lu(e);this.container=t,this.form=rt(i||m),this.elements=n,this.config=f,this.components=Object.create(null),this.dom=V}get formData(){return this.form}set formData(e){this.form=rt(e)}get userData(){const e=this.container.querySelector(".formeo-render")||this.renderedForm;if(!e)return{};const i=new FormData(e),t={};for(const[n,m]of i.entries())t[n]?Array.isArray(t[n])?t[n].push(m):t[n]=[t[n],m]:t[n]=m;return t}get userFormData(){const e=[];for(const[i,t]of Object.entries(this.userData)){const n={key:i,value:t,label:this.components[ti(i)]?.config?.label||""};e.push(n)}return e}set userData(e={}){const i=this.container.querySelector("form");for(const t of Object.keys(e)){const n=i.elements[t];if(n.length&&n[0].type==="checkbox"){const m=Array.isArray(e[t])?e[t]:[e[t]];for(const f of n)f.checked=m.includes(f.value)}else if(n.length&&n[0].type==="radio")for(const m of n)m.checked=m.value===e[t];else n.type&&(n.value=e[t])}}render(e=this.form){this.form=rt(e);const i=this.getRenderedForm(e),t=this.container.querySelector(".formeo-render");t?t.replaceWith(i):this.container.appendChild(i)}getRenderedForm(e=this.form){this.form=rt(e);const i=document.getElementsByClassName("formeo-render").length,t={...this.config,tag:"form",id:this.form.id,className:`formeo-render formeo formeo-rendered-${i}`,children:this.processedData};return this.renderedForm=V.render(t),this.applyConditions(),this.renderedForm}get html(){return(this.renderedForm||this.getRenderedForm()).outerHTML}orderChildren=(e,i)=>i.reduce((t,n)=>(t.push(this.form[e][n]),t),[]);prefixId=e=>"f-"+e;processColumn=({id:e,...i})=>({...i,id:this.prefixId(e),children:this.processFields(i.children),style:`width: ${i.config.width||"100%"}`});processRows=e=>this.orderChildren("rows",this.form.stages[e].children).reduce((i,t)=>(t&&i.push(this.processRow(t)),i),[]);cacheComponent=e=>(this.components[ti(e.id)]=e,e);processRow=(e,i="row")=>{const{config:t,id:n}=e,m=[`formeo-${i}-wrap`],f={...e,children:this.processColumns(e.id),id:this.prefixId(n)};this.cacheComponent(f);const g=[{condition:t.legend,result:()=>({tag:t.fieldset?"legend":"h3",children:t.legend})},{condition:!0,result:()=>f},{condition:t.inputGroup,result:()=>this.addButton(n)}].reduce((c,{condition:o,result:h})=>(o&&c.push(h()),c),[]);return t.inputGroup&&m.push("f-input-group-wrap"),{tag:t.fieldset?"fieldset":"div",className:m,children:g}};cloneComponentData=e=>{const{children:i=[],id:t,attrs:n={},...m}=this.components[e],f={...n,"data-clone-of":t};return m.tag==="input"&&(f.name=Ko(this.components[e])),{...m,id:"f-"+Me(t),children:i?.length&&i.map(({id:g})=>this.cloneComponentData(ti(g))),attrs:f}};addButton=e=>({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:i=>{const t=i.target.parentElement,n=V.create(this.cloneComponentData(e));t.insertBefore(n,t.lastChild);const m=V.create(du());n.appendChild(m)}}});processColumns=e=>this.orderChildren("columns",this.form.rows[e].children).map(i=>this.cacheComponent(this.processColumn(i)));processFields=e=>this.orderChildren("fields",e).map(({id:i,...t})=>{const n=t.config?.controlId||t.meta?.id,{action:m={},dependencies:f={}}=this.elements[n]||{};f&&Go(f);const g=De({action:m},t);return this.cacheComponent({...g,id:this.prefixId(i)})});get processedData(){return Object.values(this.form.stages).map(e=>(e.children=this.processRows(e.id),e.className=kt,this.components[ti(e.id)]=e,e))}handleComponentCondition=(e,i,t)=>{if(e.length){for(const f of e)this.handleComponentCondition(f,i,t);return}const n=gu(e);n&&e.addEventListener(n,f=>{if(this.evaluateCondition(i,f))for(const g of t)this.execResult(g,f)},!1);const m={target:e};if(this.evaluateCondition(i,m))for(const f of t)this.execResult(f,m)};applyConditions=()=>{for(const{conditions:e}of Object.values(this.components))if(e)for(const i of e){const{if:t,then:n}=i;for(const m of t){const{source:f,target:g}=m;if(Te(f)){const{component:c,options:o}=this.getComponent(f),h=o||c;this.handleComponentCondition(h,m,n)}if(Te(g)){const{component:c,options:o}=this.getComponent(g),h=o||c;this.handleComponentCondition(h,m,n)}}}};evaluateCondition=({source:e,sourceProperty:i,targetProperty:t,comparison:n,target:m})=>{const f=this.getComponentProperty(e,i);if(typeof f=="boolean")return f;const g=String(Te(m)?this.getComponentProperty(m,t):m);return uu[n]?.(f,g)};execResult=({target:e,targetProperty:i,assignment:t,value:n})=>{if(Te(e)){const{component:m,option:f}=this.getComponent(e),g=f||m;pu[i]?.(g,{targetProperty:i,assignment:t,value:n})}};getComponentProperty=(e,i)=>{const{component:t,option:n}=this.getComponent(e),m=n||t;return cu[i]?.(m)||m[i]};getComponent=e=>{const i={component:null};if(!Te(e))return null;const[,t,n,m]=lt(e),f=this.renderedForm.querySelector(`#f-${t}`);if(!f)return i;if(i.component=f,n){const g=f.querySelectorAll("input"),c=g[m];return i.options=g,i.option=c,i}return i};getComponents=e=>{const i=[],t=e.slice(e.indexOf(".")+1);return i.push(...this.renderedForm.querySelectorAll(`[name=f-${t}]`)),i}},fu=[["input",e=>["textarea","text"].includes(e.type)],["change",e=>["select"].includes(e.tagName.toLowerCase())||["checkbox","radio"].includes(e.type)]],gu=e=>{const[i]=fu.find(t=>t[1](e))||[!1];return i};window!==void 0&&(window.FormeoEditor=ls,window.FormeoRenderer=cs);var nr=ls,rr=cs,mu={rows:{all:{events:{onAdd:e=>{if(console.log(`You just added a new row with the id "${e.target.id}"`,e.index),e.index===2){const i=e.target.dom.querySelector(".action-btn-wrap"),t=document.createElement("button");t.type="button",t.className="btn btn-sm btn-secondary",t.textContent="Add Column",t.style.border="1px solid #ccc",t.style.width="auto",t.addEventListener("click",()=>{e.target.addChild()}),i.appendChild(t)}}}}},fields:{all:{panels:{attrs:{}},events:{onRemove:e=>{console.log(`You just removed the field with the id "${e.target.id}"`,e)}}},"text-input":{attrs:{type:[{label:"text",value:"text"},{label:"phone",value:"phone"},{label:"email",value:"email"}]},config:{helpText:"This is a custom help text for text input fields.",hideLabel:!1}},checkbox:{actionButtons:{},panels:{attrs:{hideDisabled:!0}}}}},vu={sortable:!1,groupOrder:["common","html"],disable:{},elements:[{tag:"input",config:{label:"Email",disabledAttrs:["type"],lockedAttrs:["required","className"]},meta:{group:"common",id:"email",icon:"@"},attrs:{className:"custom-email",type:"email",required:!0}}],elementOrder:{common:["button","checkbox","date-input","hidden","upload","number","radio","select","text-input","textarea"]}},yu=".build-form",bu=".render-form",jt={editorContainer:yu,actions:{},controls:vu,config:mu,events:{onSave:console.log,onChange:console.log},style:null,sessionStorage:!0,editPanelOrder:["attrs","options"],onLoad:()=>{console.log("demo loaded")}},or={renderContainer:bu,elements:{tinymce:{action:{onRender:e=>{if(e.id){const i=`#${e.id}`;globalThis.tinymce.remove(i),globalThis.tinymce.init({selector:i})}}}}}};async function wu(e){e.innerHTML=`
13
13
  <div class="angular-demo">
14
14
  <h3>Angular Integration Demo</h3>
15
15
  <p>Demonstrating Formeo integration patterns for Angular applications</p>