formeo 4.2.5 → 5.0.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.
- package/dist/demo/assets/css/demo.min.css +2 -2
- package/dist/demo/assets/css/demo.min.css.gz +0 -0
- package/dist/demo/assets/css/formeo.min.css +2 -2
- package/dist/demo/assets/img/formeo-sprite.svg +1 -1
- package/dist/demo/assets/js/demo.min.js +78 -78
- package/dist/demo/assets/js/demo.min.js.gz +0 -0
- package/dist/demo/assets/js/formeo.cjs.js +557 -145
- package/dist/demo/assets/js/formeo.es.js +557 -145
- package/dist/demo/assets/js/formeo.min.cjs.js +2 -2
- package/dist/demo/assets/js/formeo.min.es.js +3 -3
- package/dist/demo/assets/js/formeo.min.js +557 -145
- package/dist/demo/assets/js/formeo.min.umd.js +2 -2
- package/dist/demo/assets/js/formeo.umd.js +557 -145
- package/dist/demo/assets/js/index.min.js +1 -1
- package/dist/demo/assets/js/index.min2.js +2 -2
- package/dist/demo/assets/js/index.min3.js +1 -1
- package/dist/demo/assets/js/mode-json.min.js +1 -1
- package/dist/demo/assets/js/mode-json.min.js.gz +0 -0
- package/dist/demo/assets/js/theme-github_light_default.min.js +1 -1
- package/dist/demo/index.html +1 -1
- package/dist/formeo-sprite.svg +1 -1
- package/dist/formeo.cjs.js +557 -145
- package/dist/formeo.css +176 -3
- package/dist/formeo.es.js +557 -145
- package/dist/formeo.min.cjs.js +2 -2
- package/dist/formeo.min.css +2 -2
- package/dist/formeo.min.es.js +3 -3
- package/dist/formeo.min.js +557 -145
- package/dist/formeo.min.umd.js +2 -2
- package/dist/formeo.umd.js +557 -145
- package/package.json +3 -3
package/dist/formeo.min.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
formeo - https://formeo.io
|
|
4
|
-
Version: 4.2.
|
|
4
|
+
Version: 4.2.5
|
|
5
5
|
Author: Draggable https://draggable.io
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).formeo={})}(this,(function(t){"use strict";const e={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}};class n{constructor(t=e){this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}processConfig(t){const{location:n,...o}={...e,...t},i=n.replace(/\/?$/,"/");this.config={location:i,...o};const{override:r,preloaded:s={}}=this.config,a=Object.entries(this.langs).concat(Object.entries(r||s));this.langs=a.reduce(((t,[e,n])=>(t[e]=this.applyLanguage(e,n),t)),{}),this.locale=this.config.locale||this.config.langs[0]}init(t){return this.processConfig({...this.config,...t}),this.setCurrent(this.locale)}addLanguage(t,e={}){e="string"==typeof e?n.processFile(e):e,this.applyLanguage(t,e),this.config.langs.push("locale")}getValue(t,e=this.locale){var n;return(null==(n=this.langs[e])?void 0:n[t])||this.getFallbackValue(t)}getFallbackValue(t){const e=Object.values(this.langs).find((e=>e[t]));return null==e?void 0:e[t]}makeSafe(t){const e={"{":"\\{","}":"\\}","|":"\\|"};return t=t.replace(/[{}|]/g,(t=>e[t])),new RegExp(t,"g")}put(t,e){return this.current[t]=e,e}get(t,e){const n=this;let o=this.getValue(t);if(!o)return;const i=o.match(/\{[^}]+?\}/g);if(e&&i)if("object"==typeof e)for(const r of i){const t=r.substring(1,r.length-1);o=o.replace(n.makeSafe(r),e[t]||"")}else o=o.replace(/\{[^}]+?\}/g,e);return o}static processFile(t){return n.fromFile(t.replace(/\n\n/g,"\n"))}static fromFile(t){const e=t.split("\n"),n={};for(let o,i=0;i<e.length;i++){o=/^(.+?) *?= *?([^\n]+)/.exec(e[i]),o&&(n[o[1]]=o[2].replace(/(^\s+|\s+$)/g,""))}return n}loadLang(t,e=!0){const o=this;return new Promise((function(i,r){if(-1!==o.loaded.indexOf(t)&&e)return o.applyLanguage(o.langs[t]),i(o.langs[t]);return async function(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=t.endsWith(".lang")?"text":"json";return await e[n]()}catch(e){throw e}}([o.config.location,t,o.config.extension].join("")).then((e=>{const r=n.processFile(e);return o.applyLanguage(t,r),o.loaded.push(t),i(o.langs[t])})).catch((e=>{const n=o.applyLanguage(t);i(n)}))}))}applyLanguage(t,e={}){const n=this.config.override[t]||{},o=this.langs[t]||{};return this.langs[t]={...o,...e,...n},this.langs[t]}get getLangs(){return this.config.langs}async setCurrent(t="en-US"){return await this.loadLang(t),this.locale=t,this.current=this.langs[t],this.current}}const o=new n;!function(){try{if("undefined"!=typeof document){var t=document.createElement("style");t.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(t)}}catch(e){}}();var i=Object.defineProperty,r=(t,e,n)=>((t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);const s="_3x4ZIcu-",a="JIt36hCJ",l={triggerName:"tooltip"};class c{constructor(t=l){r(this,"triggerName"),r(this,"tooltip"),r(this,"activeTriggerType",null),r(this,"spacing",12),r(this,"handleClick",(t=>{const e=this.triggerName,n=t.target.closest(`[${e}][${e}-type="click"]`);if(n)if(this.isVisible())this.hide();else{const t=n.getAttribute(`${e}`);this.show(n,t),this.activeTriggerType="click"}else this.hide()})),r(this,"handleMouseOver",(t=>{const e=this.triggerName,n=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==n?void 0:n.getAttribute(`${e}-type`))){const t=null==n?void 0:n.getAttribute(`${e}`);t&&(this.show(n,t),this.activeTriggerType="hover")}})),r(this,"handleMouseOut",(t=>{const e=this.triggerName,n=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==n?void 0:n.getAttribute(`${e}-type`))&&this.hide()})),r(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),r(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${s}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}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),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(a)}calculatePosition(t){const e=t.getBoundingClientRect(),n=this.tooltip.getBoundingClientRect(),o=[{name:"top",x:e.left+(e.width-n.width)/2,y:e.top-n.height-this.spacing},{name:"bottom",x:e.left+(e.width-n.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-n.width-this.spacing,y:e.top+(e.height-n.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-n.height)/2},{name:"top-left",x:e.left,y:e.top-n.height-this.spacing},{name:"top-right",x:e.right-n.width,y:e.top-n.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-n.width,y:e.bottom+this.spacing}];return o.find((t=>this.fitsInViewport(t,n)))||o[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(s)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(a);const n=this.calculatePosition(t);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(a),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),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}void 0!==window&&(window.SmartTooltip=c);const d="formeo",u="4.2.4";var h,p,m,f,g,v,b,y,w,C,x,S,E,_,O,M,A,T,k,L,N,D,P,z,j,$,H,I,V,R,F,B,W,q,U,G,X,Z,Y,J,K,Q,tt,et,nt,ot,it,rt,st,at,lt,ct,dt,ut,ht,pt,mt,ft,gt,vt,bt,yt,wt,Ct,xt,St,Et,_t,Ot,Mt,At,Tt,kt,Lt,Nt,Dt,Pt,zt,jt,$t,Ht,It,Vt,Rt,Ft,Bt,Wt,qt,Ut,Gt,Xt,Zt,Yt,Jt,Kt,Qt,te,ee,ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function oe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ie(){if(f)return m;return f=1,m=function(t,e){return t===e||t!=t&&e!=e}}function re(){if(v)return g;v=1;var t=ie();return g=function(e,n){for(var o=e.length;o--;)if(t(e[o][0],n))return o;return-1}}function se(){if(M)return O;M=1;var t=p?h:(p=1,h=function(){this.__data__=[],this.size=0}),e=function(){if(y)return b;y=1;var t=re(),e=Array.prototype.splice;return b=function(n){var o=this.__data__,i=t(o,n);return!(i<0||(i==o.length-1?o.pop():e.call(o,i,1),--this.size,0))}}(),n=function(){if(C)return w;C=1;var t=re();return w=function(e){var n=this.__data__,o=t(n,e);return o<0?void 0:n[o][1]}}(),o=function(){if(S)return x;S=1;var t=re();return x=function(e){return t(this.__data__,e)>-1}}(),i=function(){if(_)return E;_=1;var t=re();return E=function(e,n){var o=this.__data__,i=t(o,e);return i<0?(++this.size,o.push([e,n])):o[i][1]=n,this}}();function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}return r.prototype.clear=t,r.prototype.delete=e,r.prototype.get=n,r.prototype.has=o,r.prototype.set=i,O=r}function ae(){if($)return j;$=1;var t="object"==typeof ne&&ne&&ne.Object===Object&≠return j=t}function le(){if(I)return H;I=1;var t=ae(),e="object"==typeof self&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return H=n}function ce(){if(R)return V;R=1;var t=le().Symbol;return V=t}function de(){if(G)return U;G=1;var t=ce(),e=function(){if(B)return F;B=1;var t=ce(),e=Object.prototype,n=e.hasOwnProperty,o=e.toString,i=t?t.toStringTag:void 0;return F=function(t){var e=n.call(t,i),r=t[i];try{t[i]=void 0;var s=!0}catch(l){}var a=o.call(t);return s&&(e?t[i]=r:delete t[i]),a}}(),n=function(){if(q)return W;q=1;var t=Object.prototype.toString;return W=function(e){return t.call(e)}}(),o=t?t.toStringTag:void 0;return U=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?e(t):n(t)}}function ue(){if(Z)return X;return Z=1,X=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function he(){if(J)return Y;J=1;var t=de(),e=ue();return Y=function(n){if(!e(n))return!1;var o=t(n);return"[object Function]"==o||"[object GeneratorFunction]"==o||"[object AsyncFunction]"==o||"[object Proxy]"==o}}function pe(){if(et)return tt;et=1;var t,e=function(){if(Q)return K;Q=1;var t=le()["__core-js_shared__"];return K=t}(),n=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return tt=function(t){return!!n&&n in t}}function me(){if(ot)return nt;ot=1;var t=Function.prototype.toString;return nt=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}}function fe(){if(ct)return lt;ct=1;var t=function(){if(rt)return it;rt=1;var t=he(),e=pe(),n=ue(),o=me(),i=/^\[object .+?Constructor\]$/,r=Function.prototype,s=Object.prototype,a=r.toString,l=s.hasOwnProperty,c=RegExp("^"+a.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return it=function(r){return!(!n(r)||e(r))&&(t(r)?c:i).test(o(r))}}(),e=at?st:(at=1,st=function(t,e){return null==t?void 0:t[e]});return lt=function(n,o){var i=e(n,o);return t(i)?i:void 0}}function ge(){if(ut)return dt;ut=1;var t=fe()(le(),"Map");return dt=t}function ve(){if(pt)return ht;pt=1;var t=fe()(Object,"create");return ht=t}function be(){if(_t)return Et;_t=1;var t=function(){if(ft)return mt;ft=1;var t=ve();return mt=function(){this.__data__=t?t(null):{},this.size=0}}(),e=vt?gt:(vt=1,gt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),n=function(){if(yt)return bt;yt=1;var t=ve(),e=Object.prototype.hasOwnProperty;return bt=function(n){var o=this.__data__;if(t){var i=o[n];return"__lodash_hash_undefined__"===i?void 0:i}return e.call(o,n)?o[n]:void 0}}(),o=function(){if(Ct)return wt;Ct=1;var t=ve(),e=Object.prototype.hasOwnProperty;return wt=function(n){var o=this.__data__;return t?void 0!==o[n]:e.call(o,n)}}(),i=function(){if(St)return xt;St=1;var t=ve();return xt=function(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}return r.prototype.clear=t,r.prototype.delete=e,r.prototype.get=n,r.prototype.has=o,r.prototype.set=i,Et=r}function ye(){if(Lt)return kt;Lt=1;var t=Tt?At:(Tt=1,At=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return kt=function(e,n){var o=e.__data__;return t(n)?o["string"==typeof n?"string":"hash"]:o.map}}function we(){if(Rt)return Vt;Rt=1;var t=function(){if(Mt)return Ot;Mt=1;var t=be(),e=se(),n=ge();return Ot=function(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}}(),e=function(){if(Dt)return Nt;Dt=1;var t=ye();return Nt=function(e){var n=t(this,e).delete(e);return this.size-=n?1:0,n}}(),n=function(){if(zt)return Pt;zt=1;var t=ye();return Pt=function(e){return t(this,e).get(e)}}(),o=function(){if($t)return jt;$t=1;var t=ye();return jt=function(e){return t(this,e).has(e)}}(),i=function(){if(It)return Ht;It=1;var t=ye();return Ht=function(e,n){var o=t(this,e),i=o.size;return o.set(e,n),this.size+=o.size==i?0:1,this}}();function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}return r.prototype.clear=t,r.prototype.delete=e,r.prototype.get=n,r.prototype.has=o,r.prototype.set=i,Vt=r}function Ce(){if(qt)return Wt;qt=1;var t=se(),e=function(){if(T)return A;T=1;var t=se();return A=function(){this.__data__=new t,this.size=0}}(),n=L?k:(L=1,k=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}),o=D?N:(D=1,N=function(t){return this.__data__.get(t)}),i=z?P:(z=1,P=function(t){return this.__data__.has(t)}),r=function(){if(Bt)return Ft;Bt=1;var t=se(),e=ge(),n=we();return Ft=function(o,i){var r=this.__data__;if(r instanceof t){var s=r.__data__;if(!e||s.length<199)return s.push([o,i]),this.size=++r.size,this;r=this.__data__=new n(s)}return r.set(o,i),this.size=r.size,this}}();function s(e){var n=this.__data__=new t(e);this.size=n.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=r,Wt=s}function xe(){if(Gt)return Ut;Gt=1;var t=fe(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(n){}}();return Ut=e}function Se(){if(Zt)return Xt;Zt=1;var t=xe();return Xt=function(e,n,o){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}}function Ee(){if(Jt)return Yt;Jt=1;var t=Se(),e=ie();return Yt=function(n,o,i){(void 0!==i&&!e(n[o],i)||void 0===i&&!(o in n))&&t(n,o,i)}}function _e(){if(ee)return te;ee=1;var t=(Qt?Kt:(Qt=1,Kt=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}))();return te=t}var Oe,Me,Ae,Te,ke,Le,Ne,De,Pe,ze,je,$e,He,Ie,Ve,Re,Fe,Be,We,qe,Ue,Ge,Xe,Ze,Ye,Je,Ke,Qe,tn,en,nn,on,rn,sn={exports:{}};function an(){if(Ae)return Me;Ae=1;var t=le().Uint8Array;return Me=t}function ln(){if(Ne)return Le;Ne=1;var t=function(){if(ke)return Te;ke=1;var t=an();return Te=function(e){var n=new e.constructor(e.byteLength);return new t(n).set(new t(e)),n}}();return Le=function(e,n){var o=n?t(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}}function cn(){if(He)return $e;return He=1,$e=function(t,e){return function(n){return t(e(n))}}}function dn(){if(Ve)return Ie;Ve=1;var t=cn()(Object.getPrototypeOf,Object);return Ie=t}function un(){if(Fe)return Re;Fe=1;var t=Object.prototype;return Re=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}}function hn(){if(We)return Be;We=1;var t=function(){if(je)return ze;je=1;var t=ue(),e=Object.create;return ze=function(){function n(){}return function(o){if(!t(o))return{};if(e)return e(o);n.prototype=o;var i=new n;return n.prototype=void 0,i}}()}(),e=dn(),n=un();return Be=function(o){return"function"!=typeof o.constructor||n(o)?{}:t(e(o))}}function pn(){if(Ue)return qe;return Ue=1,qe=function(t){return null!=t&&"object"==typeof t}}function mn(){if(Ye)return Ze;Ye=1;var t=function(){if(Xe)return Ge;Xe=1;var t=de(),e=pn();return Ge=function(n){return e(n)&&"[object Arguments]"==t(n)}}(),e=pn(),n=Object.prototype,o=n.hasOwnProperty,i=n.propertyIsEnumerable,r=t(function(){return arguments}())?t:function(t){return e(t)&&o.call(t,"callee")&&!i.call(t,"callee")};return Ze=r}function fn(){if(Ke)return Je;Ke=1;var t=Array.isArray;return Je=t}function gn(){if(tn)return Qe;tn=1;return Qe=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function vn(){if(nn)return en;nn=1;var t=he(),e=gn();return en=function(n){return null!=n&&e(n.length)&&!t(n)}}var bn,yn,wn,Cn,xn,Sn,En,_n,On,Mn={exports:{}};function An(){return wn||(wn=1,t=Mn,e=Mn.exports,n=le(),o=yn?bn:(yn=1,bn=function(){return!1}),i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,s=r&&r.exports===i?n.Buffer:void 0,a=(s?s.isBuffer:void 0)||o,t.exports=a),Mn.exports;var t,e,n,o,i,r,s,a}var Tn,kn,Ln,Nn,Dn,Pn,zn,jn,$n,Hn,In,Vn,Rn,Fn,Bn,Wn,qn,Un,Gn,Xn,Zn,Yn,Jn,Kn,Qn,to,eo,no,oo,io,ro,so,ao,lo,co,uo,ho,po,mo,fo,go,vo,bo,yo,wo,Co,xo,So,Eo,_o={exports:{}};function Oo(){if(Ln)return kn;Ln=1;var t=function(){if(En)return Sn;En=1;var t=de(),e=gn(),n=pn(),o={};return o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,Sn=function(i){return n(i)&&e(i.length)&&!!o[t(i)]}}(),e=On?_n:(On=1,_n=function(t){return function(e){return t(e)}}),n=function(){return Tn||(Tn=1,t=_o,e=_o.exports,n=ae(),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||r&&r.binding&&r.binding("util")}catch(t){}}(),t.exports=s),_o.exports;var t,e,n,o,i,r,s}(),o=n&&n.isTypedArray,i=o?e(o):t;return kn=i}function Mo(){if(Dn)return Nn;return Dn=1,Nn=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}function Ao(){if(zn)return Pn;zn=1;var t=Se(),e=ie(),n=Object.prototype.hasOwnProperty;return Pn=function(o,i,r){var s=o[i];n.call(o,i)&&e(s,r)&&(void 0!==r||i in o)||t(o,i,r)}}function To(){if(Rn)return Vn;Rn=1;var t=/^(?:0|[1-9]\d*)$/;return Vn=function(e,n){var o=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&t.test(e))&&e>-1&&e%1==0&&e<n}}function ko(){if(Bn)return Fn;Bn=1;var t=In?Hn:(In=1,Hn=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}),e=mn(),n=fn(),o=An(),i=To(),r=Oo(),s=Object.prototype.hasOwnProperty;return Fn=function(a,l){var c=n(a),d=!c&&e(a),u=!c&&!d&&o(a),h=!c&&!d&&!u&&r(a),p=c||d||u||h,m=p?t(a.length,String):[],f=m.length;for(var g in a)!l&&!s.call(a,g)||p&&("length"==g||u&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||i(g,f))||m.push(g);return m}}function Lo(){if(Gn)return Un;Gn=1;var t=ue(),e=un(),n=qn?Wn:(qn=1,Wn=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}),o=Object.prototype.hasOwnProperty;return Un=function(i){if(!t(i))return n(i);var r=e(i),s=[];for(var a in i)("constructor"!=a||!r&&o.call(i,a))&&s.push(a);return s}}function No(){if(Zn)return Xn;Zn=1;var t=ko(),e=Lo(),n=vn();return Xn=function(o){return n(o)?t(o,!0):e(o)}}function Do(){if(Jn)return Yn;Jn=1;var t=function(){if($n)return jn;$n=1;var t=Ao(),e=Se();return jn=function(n,o,i,r){var s=!i;i||(i={});for(var a=-1,l=o.length;++a<l;){var c=o[a],d=r?r(i[c],n[c],c,i,n):void 0;void 0===d&&(d=n[c]),s?e(i,c,d):t(i,c,d)}return i}}(),e=No();return Yn=function(n){return t(n,e(n))}}function Po(){if(Qn)return Kn;Qn=1;var t,e,n,o,i,r,s,a=Ee(),l=(Oe||(Oe=1,t=sn,e=sn.exports,n=le(),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o?n.Buffer:void 0,s=r?r.allocUnsafe:void 0,t.exports=function(t,e){if(e)return t.slice();var n=t.length,o=s?s(n):new t.constructor(n);return t.copy(o),o}),sn.exports),c=ln(),d=Pe?De:(Pe=1,De=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}),u=hn(),h=mn(),p=fn(),m=function(){if(rn)return on;rn=1;var t=vn(),e=pn();return on=function(n){return e(n)&&t(n)}}(),f=An(),g=he(),v=ue(),b=function(){if(xn)return Cn;xn=1;var t=de(),e=dn(),n=pn(),o=Function.prototype,i=Object.prototype,r=o.toString,s=i.hasOwnProperty,a=r.call(Object);return Cn=function(o){if(!n(o)||"[object Object]"!=t(o))return!1;var i=e(o);if(null===i)return!0;var l=s.call(i,"constructor")&&i.constructor;return"function"==typeof l&&l instanceof l&&r.call(l)==a}}(),y=Oo(),w=Mo(),C=Do();return Kn=function(t,e,n,o,i,r,s){var x=w(t,n),S=w(e,n),E=s.get(S);if(E)a(t,n,E);else{var _=r?r(x,S,n+"",t,e,s):void 0,O=void 0===_;if(O){var M=p(S),A=!M&&f(S),T=!M&&!A&&y(S);_=S,M||A||T?p(x)?_=x:m(x)?_=d(x):A?(O=!1,_=l(S,!0)):T?(O=!1,_=c(S,!0)):_=[]:b(S)||h(S)?(_=x,h(x)?_=C(x):v(x)&&!g(x)||(_=u(S))):O=!1}O&&(s.set(S,_),i(_,S,o,r,s),s.delete(S)),a(t,n,_)}}}function zo(){if(oo)return no;return oo=1,no=function(t){return t}}function jo(){if(ao)return so;ao=1;var t=ro?io:(ro=1,io=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}),e=Math.max;return so=function(n,o,i){return o=e(void 0===o?n.length-1:o,0),function(){for(var r=arguments,s=-1,a=e(r.length-o,0),l=Array(a);++s<a;)l[s]=r[o+s];s=-1;for(var c=Array(o+1);++s<o;)c[s]=r[s];return c[o]=i(l),t(n,this,c)}},so}function $o(){if(ho)return uo;ho=1;var t=co?lo:(co=1,lo=function(t){return function(){return t}}),e=xe(),n=zo();return uo=e?function(n,o){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n}function Ho(){if(go)return fo;go=1;var t=$o(),e=function(){if(mo)return po;mo=1;var t=Date.now;return po=function(e){var n=0,o=0;return function(){var i=t(),r=16-(i-o);if(o=i,r>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}},po}(),n=e(t);return fo=n}function Io(){if(xo)return Co;xo=1;var t=function(){if(bo)return vo;bo=1;var t=zo(),e=jo(),n=Ho();return vo=function(o,i){return n(e(o,i,t),o+"")}}(),e=function(){if(wo)return yo;wo=1;var t=ie(),e=vn(),n=To(),o=ue();return yo=function(i,r,s){if(!o(s))return!1;var a=typeof r;return!!("number"==a?e(s)&&n(r,s.length):"string"==a&&r in s)&&t(s[r],i)}}();return Co=function(n){return t((function(t,o){var i=-1,r=o.length,s=r>1?o[r-1]:void 0,a=r>2?o[2]:void 0;for(s=n.length>3&&"function"==typeof s?(r--,s):void 0,a&&e(o[0],o[1],a)&&(s=r<3?void 0:s,r=1),t=Object(t);++i<r;){var l=o[i];l&&n(t,l,i,s)}return t}))}}const Vo=oe(function(){if(Eo)return So;Eo=1;var t=function(){if(eo)return to;eo=1;var t=Ce(),e=Ee(),n=_e(),o=Po(),i=ue(),r=No(),s=Mo();return to=function a(l,c,d,u,h){l!==c&&n(c,(function(n,r){if(h||(h=new t),i(n))o(l,c,r,d,a,u,h);else{var p=u?u(s(l,r),n,r+"",l,c,h):void 0;void 0===p&&(p=n),e(l,r,p)}}),r)},to}(),e=Io()((function(e,n,o,i){t(e,n,o,i)}));return So=e}()),Ro=()=>crypto.randomUUID().slice(0,8).slice(0,8),Fo=(t="",e)=>{if(!e)return!1;const n=/[|\\{}()[\]^*$+?.]/g;let o="string"==typeof e?[e]:e;o=o.map((t=>"*"===t?"":t.replace(n,"\\$&")));let i=!0;return o.length&&(i=!new RegExp(o.join("|"),"i").exec(t)),i},Bo=t=>{const e=t.className?.match(ki);return e&&Ai[e[0]]},Wo=t=>Array.from(new Set(t)),qo=t=>t?.attrs?.id||t?.id||Ro(),Uo=(t,e)=>Vo({},t,e,((t,e)=>Array.isArray(t)?null!=e?Wo(t.concat(e)):e:Array.isArray(e)?null!=t?Wo(e.concat(t)):e:void 0)),Go=t=>{let e;if(null===t||!("object"==typeof t)||t instanceof Promise)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(Array.isArray(t)){e=[];for(let n=0,o=t.length;n<o;n++)e[n]=Go(t[n]);return e}if(t instanceof Object){e={};for(const n in t)Object.hasOwn(t,n)&&(e[n]=Go(t[n]));return e}throw new Error("Unable to copy Object, type not supported.")},Xo=(t,e)=>t/e*100,Zo=t=>`${t.toString()}%`,Yo=Object.create(null,{get:{value:t=>{const e=window.sessionStorage?.getItem(t);try{return JSON.parse(e)}catch(n){return e}}},set:{value:(t,e)=>{try{return window.sessionStorage?.setItem(t,JSON.stringify(e))}catch(n){}}}}),Jo=t=>/^(stage|row|column|field)s./.test(t);function Ko(t,e=Ri){let n;return function(...o){n&&clearTimeout(n),n=setTimeout((()=>t.apply(this,o)),e)}}function Qo(t){return t}function ti(){}function ei(t=Object.create(null)){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return Object.create(null)}return t}const ni=t=>t?Go(ei(t)):fr();function oi(t,e,n,o={}){if(!e||!t[n][e])return o;o[`${n}.${e}`]=t[n][e];const i=zi.get(n);if(i){const r=t[n][e].data?.children||[];for(const e of r)oi(t,e,i,o)}return o}const ii=d,ri=u,si=`https://cdn.jsdelivr.net/npm/formeo@${ri}/dist/formeo-sprite.svg`,ai=`https://cdn.jsdelivr.net/npm/formeo@${ri}/dist/formeo.min.css`,li="https://draggable.github.io/formeo/assets/css/formeo.min.css",ci="f-panel",di="control-group",ui=`${ii}-stage`,hi=`${ii}-row`,pi=`${ii}-column`,mi=`${ii}-field`,fi="custom-column-widths",gi="column-preset",vi="resizing-columns",bi=new Map([[ui,hi],[hi,pi],[pi,mi]]),yi=["stage","row","column","field"],wi=yi.map((t=>`${t}s`));new Map(wi.map(((t,e)=>[t,yi[e]])));const Ci=new RegExp(`^${wi.join("|")}.`),xi=[...yi],Si=[...wi],Ei=new Map(Si.map(((t,e)=>[t,xi[e]]))),_i=xi.reduce(((t,e)=>(t[e]=e,t)),{}),Oi=[{name:"controls",className:di},{name:"stage",className:ui},{name:"row",className:hi},{name:"column",className:pi},{name:"field",className:mi}],Mi={controls:di,stage:ui,row:hi,column:pi,field:mi},Ai=Object.entries(Mi).reduce(((t,[e,n])=>(t[n]=e,t)),{}),Ti=Object.values(Mi),ki=new RegExp(`${Ti.join("|")}`,"g"),{childTypeMapVals:Li,childTypeIndexMapVals:Ni}=Oi.reduce(((t,{name:e},n,o)=>{const{name:i}=o[n+1]||{};return i&&(t.childTypeMapVals.push([e,i]),t.childTypeIndexMapVals.push([`${e}s`,`${i}s`])),t}),{childTypeMapVals:[],childTypeIndexMapVals:[]}),Di=Li.slice().map((t=>t.slice().reverse())).reverse(),Pi=new Map(Li),zi=new Map(Ni),ji=new Map(Di.slice()),$i=new Map([[{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"}]].reduce(((t,e,n)=>(t.push([n,e]),t)),[])),Hi=`${ii}-formData`,Ii=`${ii}-locale`,Vi=333,Ri=Math.round(166.5),Fi=Math.round(666),Bi="formeoSaved",Wi="formeoUpdated",qi="formeoUpdatedStage",Ui="formeoUpdatedRow",Gi="formeoUpdatedColumn",Xi="formeoUpdatedField",Zi="formeoOnRender",Yi="formeoAddedRow",Ji="formeoAddedColumn",Ki="formeoAddedField",Qi="formeoRemovedRow",tr="formeoRemovedColumn",er="formeoRemovedField",nr={equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},or={equals:"="},ir=["logical","source","sourceProperty","comparison","target","targetProperty","assignment","value"],rr=["isChecked","isNotChecked"],sr=["isVisible","isNotVisible"],ar=["value"],lr={comparison:nr,assignment:or,logical:{and:"&&",or:"||"}},cr="if",dr="then",ur=()=>({[cr]:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],[dr]:[{target:"",targetProperty:"",assignment:"",value:""}]}),hr=/(\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,pr=/\bcol-\w+-\d+/g,mr="f-i-",fr=()=>({id:qo(),stages:{[qo()]:{}},rows:{},columns:{},fields:{}}),gr=["selected","checked"],vr=gr.toReversed(),br="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((t=>`\\s${t}\\s`)),yr=new RegExp(`(?!${br.join("|")})\\w\\S*`,"g"),wr=/\s+/g;function Cr(t){if("string"!=typeof t)return t;if(t.trim().match(wr))return t;return t.replace(yr,(t=>t.charAt(0).toUpperCase()+t.substring(1).replace(/[A-Z]/g,(t=>` ${t}`))))}const xr=(t,e="-")=>t.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,e),Sr=t=>{if(Array.isArray(t))return t;const e=/[.[\]]/g,n=[];let o=0,i=e.exec(t);for(;null!==i;)n.push(t.slice(o,i.index)),o=i.index+i[0].length,i=e.exec(t);return o<t.length&&n.push(t.slice(o)),n.filter(Boolean)},Er=(t,e="-")=>Sr(t).join(e);var _r,Or,Mr,Ar,Tr,kr,Lr,Nr,Dr,Pr,zr,jr,$r,Hr,Ir,Vr,Rr,Fr,Br,Wr,qr,Ur,Gr,Xr;function Zr(){if(Or)return _r;Or=1;var t=de(),e=pn();return _r=function(n){return"symbol"==typeof n||e(n)&&"[object Symbol]"==t(n)}}function Yr(){if(Nr)return Lr;Nr=1;var t=function(){if(kr)return Tr;kr=1;var t=we();function e(n,o){if("function"!=typeof n||null!=o&&"function"!=typeof o)throw new TypeError("Expected a function");var i=function(){var t=arguments,e=o?o.apply(this,t):t[0],r=i.cache;if(r.has(e))return r.get(e);var s=n.apply(this,t);return i.cache=r.set(e,s)||r,s};return i.cache=new(e.Cache||t),i}return e.Cache=t,Tr=e}();return Lr=function(e){var n=t(e,(function(t){return 500===o.size&&o.clear(),t})),o=n.cache;return n}}function Jr(){if(Hr)return $r;Hr=1;var t=ce(),e=jr?zr:(jr=1,zr=function(t,e){for(var n=-1,o=null==t?0:t.length,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i}),n=fn(),o=Zr(),i=t?t.prototype:void 0,r=i?i.toString:void 0;return $r=function t(i){if("string"==typeof i)return i;if(n(i))return e(i,t)+"";if(o(i))return r?r.call(i):"";var s=i+"";return"0"==s&&1/i==-1/0?"-0":s},$r}function Kr(){if(Fr)return Rr;Fr=1;var t=fn(),e=function(){if(Ar)return Mr;Ar=1;var t=fn(),e=Zr(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;return Mr=function(i,r){if(t(i))return!1;var s=typeof i;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=i&&!e(i))||o.test(i)||!n.test(i)||null!=r&&i in Object(r)}}(),n=function(){if(Pr)return Dr;Pr=1;var t=Yr(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,o=t((function(t){var o=[];return 46===t.charCodeAt(0)&&o.push(""),t.replace(e,(function(t,e,i,r){o.push(i?r.replace(n,"$1"):e||t)})),o}));return Dr=o}(),o=function(){if(Vr)return Ir;Vr=1;var t=Jr();return Ir=function(e){return null==e?"":t(e)}}();return Rr=function(i,r){return t(i)?i:e(i,r)?[i]:n(o(i))}}function Qr(){if(Wr)return Br;Wr=1;var t=Zr();return Br=function(e){if("string"==typeof e||t(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}}const ts=oe(function(){if(Xr)return Gr;Xr=1;var t=function(){if(Ur)return qr;Ur=1;var t=Kr(),e=Qr();return qr=function(n,o){for(var i=0,r=(o=t(o,n)).length;null!=n&&i<r;)n=n[e(o[i++])];return i&&i==r?n:void 0}}();return Gr=function(e,n,o){var i=null==e?void 0:t(e,n);return void 0===i?o:i}}());var es,ns,os,is;var rs=function(){if(is)return os;is=1;var t=function(){if(ns)return es;ns=1;var t=Ao(),e=Kr(),n=To(),o=ue(),i=Qr();return es=function(r,s,a,l){if(!o(r))return r;for(var c=-1,d=(s=e(s,r)).length,u=d-1,h=r;null!=h&&++c<d;){var p=i(s[c]),m=a;if("__proto__"===p||"constructor"===p||"prototype"===p)return r;if(c!=u){var f=h[p];void 0===(m=l?l(f,p,h):void 0)&&(m=o(f)?f:n(s[c+1])?[]:{})}t(h,p,m),h=h[p]}return r}}();return os=function(e,n,o){return null==e?e:t(e,n,o)}}();const ss=ts,as=oe(rs);function ls(...t){return t.flat().reduce(((t,e)=>(t[e]=e,t)),{})}var cs,ds,us,hs,ps,ms,fs,gs,vs,bs,ys,ws,Cs,xs,Ss,Es,_s,Os,Ms,As,Ts,ks,Ls,Ns,Ds,Ps,zs,js,$s,Hs,Is,Vs,Rs,Fs,Bs,Ws,qs,Us,Gs,Xs,Zs,Ys,Js,Ks,Qs,ta,ea,na,oa,ia,ra,sa,aa,la;function ca(){if(ms)return ps;ms=1;var t=we(),e=ds?cs:(ds=1,cs=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),n=hs?us:(hs=1,us=function(t){return this.__data__.has(t)});function o(e){var n=-1,o=null==e?0:e.length;for(this.__data__=new t;++n<o;)this.add(e[n])}return o.prototype.add=o.prototype.push=e,o.prototype.has=n,ps=o}function da(){if(ws)return ys;ws=1;var t=ca(),e=gs?fs:(gs=1,fs=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1}),n=bs?vs:(bs=1,vs=function(t,e){return t.has(e)});return ys=function(o,i,r,s,a,l){var c=1&r,d=o.length,u=i.length;if(d!=u&&!(c&&u>d))return!1;var h=l.get(o),p=l.get(i);if(h&&p)return h==i&&p==o;var m=-1,f=!0,g=2&r?new t:void 0;for(l.set(o,i),l.set(i,o);++m<d;){var v=o[m],b=i[m];if(s)var y=c?s(b,v,m,i,o,l):s(v,b,m,o,i,l);if(void 0!==y){if(y)continue;f=!1;break}if(g){if(!e(i,(function(t,e){if(!n(g,e)&&(v===t||a(v,t,r,s,l)))return g.push(e)}))){f=!1;break}}else if(v!==b&&!a(v,b,r,s,l)){f=!1;break}}return l.delete(o),l.delete(i),f}}function ua(){if(Os)return _s;Os=1;var t=ce(),e=an(),n=ie(),o=da(),i=xs?Cs:(xs=1,Cs=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n}),r=Es?Ss:(Es=1,Ss=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}),s=t?t.prototype:void 0,a=s?s.valueOf:void 0;return _s=function(t,s,l,c,d,u,h){switch(l){case"[object DataView]":if(t.byteLength!=s.byteLength||t.byteOffset!=s.byteOffset)return!1;t=t.buffer,s=s.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=s.byteLength||!u(new e(t),new e(s)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+t,+s);case"[object Error]":return t.name==s.name&&t.message==s.message;case"[object RegExp]":case"[object String]":return t==s+"";case"[object Map]":var p=i;case"[object Set]":var m=1&c;if(p||(p=r),t.size!=s.size&&!m)return!1;var f=h.get(t);if(f)return f==s;c|=2,h.set(t,s);var g=o(p(t),p(s),c,d,u,h);return h.delete(t),g;case"[object Symbol]":if(a)return a.call(t)==a.call(s)}return!1}}function ha(){if(ks)return Ts;ks=1;var t=As?Ms:(As=1,Ms=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t}),e=fn();return Ts=function(n,o,i){var r=o(n);return e(n)?r:t(r,i(n))}}function pa(){if(js)return zs;js=1;var t=Ns?Ls:(Ns=1,Ls=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r}),e=Ps?Ds:(Ps=1,Ds=function(){return[]}),n=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;return zs=o?function(e){return null==e?[]:(e=Object(e),t(o(e),(function(t){return n.call(e,t)})))}:e}function ma(){if(Vs)return Is;Vs=1;var t=un(),e=function(){if(Hs)return $s;Hs=1;var t=cn()(Object.keys,Object);return $s=t}(),n=Object.prototype.hasOwnProperty;return Is=function(o){if(!t(o))return e(o);var i=[];for(var r in Object(o))n.call(o,r)&&"constructor"!=r&&i.push(r);return i}}function fa(){if(Ws)return Bs;Ws=1;var t=ha(),e=pa(),n=function(){if(Fs)return Rs;Fs=1;var t=ko(),e=ma(),n=vn();return Rs=function(o){return n(o)?t(o):e(o)}}();return Bs=function(o){return t(o,n,e)}}function ga(){if(na)return ea;na=1;var t=function(){if(Xs)return Gs;Xs=1;var t=fe()(le(),"DataView");return Gs=t}(),e=ge(),n=function(){if(Ys)return Zs;Ys=1;var t=fe()(le(),"Promise");return Zs=t}(),o=function(){if(Ks)return Js;Ks=1;var t=fe()(le(),"Set");return Js=t}(),i=function(){if(ta)return Qs;ta=1;var t=fe()(le(),"WeakMap");return Qs=t}(),r=de(),s=me(),a="[object Map]",l="[object Promise]",c="[object Set]",d="[object WeakMap]",u="[object DataView]",h=s(t),p=s(e),m=s(n),f=s(o),g=s(i),v=r;return(t&&v(new t(new ArrayBuffer(1)))!=u||e&&v(new e)!=a||n&&v(n.resolve())!=l||o&&v(new o)!=c||i&&v(new i)!=d)&&(v=function(t){var e=r(t),n="[object Object]"==e?t.constructor:void 0,o=n?s(n):"";if(o)switch(o){case h:return u;case p:return a;case m:return l;case f:return c;case g:return d}return e}),ea=v}function va(){if(ia)return oa;ia=1;var t=Ce(),e=da(),n=ua(),o=function(){if(Us)return qs;Us=1;var t=fa(),e=Object.prototype.hasOwnProperty;return qs=function(n,o,i,r,s,a){var l=1&i,c=t(n),d=c.length;if(d!=t(o).length&&!l)return!1;for(var u=d;u--;){var h=c[u];if(!(l?h in o:e.call(o,h)))return!1}var p=a.get(n),m=a.get(o);if(p&&m)return p==o&&m==n;var f=!0;a.set(n,o),a.set(o,n);for(var g=l;++u<d;){var v=n[h=c[u]],b=o[h];if(r)var y=l?r(b,v,h,o,n,a):r(v,b,h,n,o,a);if(!(void 0===y?v===b||s(v,b,i,r,a):y)){f=!1;break}g||(g="constructor"==h)}if(f&&!g){var w=n.constructor,C=o.constructor;w==C||!("constructor"in n)||!("constructor"in o)||"function"==typeof w&&w instanceof w&&"function"==typeof C&&C instanceof C||(f=!1)}return a.delete(n),a.delete(o),f}}(),i=ga(),r=fn(),s=An(),a=Oo(),l="[object Arguments]",c="[object Array]",d="[object Object]",u=Object.prototype.hasOwnProperty;return oa=function(h,p,m,f,g,v){var b=r(h),y=r(p),w=b?c:i(h),C=y?c:i(p),x=(w=w==l?d:w)==d,S=(C=C==l?d:C)==d,E=w==C;if(E&&s(h)){if(!s(p))return!1;b=!0,x=!1}if(E&&!x)return v||(v=new t),b||a(h)?e(h,p,m,f,g,v):n(h,p,w,m,f,g,v);if(!(1&m)){var _=x&&u.call(h,"__wrapped__"),O=S&&u.call(p,"__wrapped__");if(_||O){var M=_?h.value():h,A=O?p.value():p;return v||(v=new t),g(M,A,m,f,v)}}return!!E&&(v||(v=new t),o(h,p,m,f,g,v))}}const ba=oe(function(){if(la)return aa;la=1;var t=function(){if(sa)return ra;sa=1;var t=va(),e=pn();return ra=function n(o,i,r,s,a){return o===i||(null==o||null==i||!e(o)&&!e(i)?o!=o&&i!=i:t(o,i,r,s,n,a))},ra}();return aa=function(e,n){return t(e,n)}}()),ya=(t,e)=>void 0===t?"added":void 0===e?"removed":ba(t,e)?"unchanged":"changed";class wa{constructor(t,e=Object.create(null)){this.name=t,this.data=e,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}toJSON=(t,e)=>JSON.stringify(t,null,e);get=t=>ss(this.data,t);set(t,e){const n=ss(this.data,t),o=as(this.data,t,e),i=Array.isArray(t)?t.join("."):t,r=Object.keys(this.setCallbacks).filter((t=>new RegExp(t).test(i))),s={newVal:e,oldVal:n,path:t};for(const a of r)for(const t of this.setCallbacks[a])t(s);if(!this.disableEvents){const i={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+t,value:e,data:o,changeType:ya(n,e),src:this.dom};if(n&&(i.previousValue=n),fu.formeoUpdated(i),this.name){const t={stage:qi,row:Ui,column:Gi,field:Xi}[this.name];t&&fu.formeoUpdated(i,t)}}return o}addSetCallback(t,e){this.setCallbacks[t]?this.setCallbacks[t].push(e):this.setCallbacks[t]=[e]}removeSetCallback(t,e){this.setCallbacks[t]=this.setCallbacks[t].filter((t=>t!==e))}add=(t,e=Object.create(null))=>{const{id:n}=e,o=t||n||qo();return this.set(o,e)};remove=t=>{const e=Sr(t),n=e.pop(),o=this.get(e);return Array.isArray(o)?o.splice(Number(n),1):o&&delete o[n],o};empty(){this.data=Object.create(null)}getData=()=>Object.entries(this.data).reduce(((t,[e,n])=>(t[e]=n?.data?n.getData():n,t)),{});setCallbacks={};configVal=Object.create(null)}class Ca extends wa{load=t=>{const e=ei(t);this.empty();for(const[n,o]of Object.entries(e))this.add(n,o);return this.data};get=t=>t?ss(this.data,t):this.add();add=(t,e=Object.create(null))=>{const n=t||qo(),o=this.Component({...e,id:n});this.data[n]=o,this.active=o;const i={row:Yi,column:Ji,field:Ki}[this.name];return i&&fu.formeoUpdated({entity:o,componentId:n,componentType:this.name,data:o.data},i),o};remove=t=>{if(Array.isArray(t))for(const e of t)this.get(e).remove();else this.get(t).remove();return this.data};delete=t=>(delete this.data[t],t);clearAll=(t=!0)=>{const e=Object.values(this.data).map((e=>e.empty(t)));return Promise.all(e)};set config(t){this.configVal=Uo(this.configVal,Go(t))}get config(){return this.configVal}conditionMap=new Map}function xa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Sa(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xa(Object(n),!0).forEach((function(e){_a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ea(t){return(Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oa(){return Oa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Oa.apply(this,arguments)}function Ma(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Aa(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Ta=Aa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ka=Aa(/Edge/i),La=Aa(/firefox/i),Na=Aa(/safari/i)&&!Aa(/chrome/i)&&!Aa(/android/i),Da=Aa(/iP(ad|od|hone)/i),Pa=Aa(/chrome/i)&&Aa(/android/i),za={capture:!1,passive:!1};function ja(t,e,n){t.addEventListener(e,n,!Ta&&za)}function $a(t,e,n){t.removeEventListener(e,n,!Ta&&za)}function Ha(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function Ia(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Va(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Ha(t,e):Ha(t,e))||o&&t===n)return t;if(t===n)break}while(t=Ia(t))}return null}var Ra,Fa=/\s+/g;function Ba(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Fa," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Fa," ")}}function Wa(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function qa(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Wa(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Ua(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function Ga(){var t=document.scrollingElement;return t||document.documentElement}function Xa(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,s,a,l,c,d,u;if(t!==window&&t.parentNode&&t!==Ga()?(s=(r=t.getBoundingClientRect()).top,a=r.left,l=r.bottom,c=r.right,d=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Ta))do{if(i&&i.getBoundingClientRect&&("none"!==Wa(i,"transform")||n&&"static"!==Wa(i,"position"))){var h=i.getBoundingClientRect();s-=h.top+parseInt(Wa(i,"border-top-width")),a-=h.left+parseInt(Wa(i,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=qa(i||t),m=p&&p.a,f=p&&p.d;p&&(l=(s/=f)+(d/=f),c=(a/=m)+(u/=m))}return{top:s,left:a,bottom:l,right:c,width:u,height:d}}}function Za(t,e,n){for(var o=tl(t,!0),i=Xa(t)[e];o;){if(!(i>=Xa(o)[n]))return o;if(o===Ga())break;o=tl(o,!1)}return!1}function Ya(t,e,n,o){for(var i=0,r=0,s=t.children;r<s.length;){if("none"!==s[r].style.display&&s[r]!==ic.ghost&&(o||s[r]!==ic.dragged)&&Va(s[r],n.draggable,t,!1)){if(i===e)return s[r];i++}r++}return null}function Ja(t,e){for(var n=t.lastElementChild;n&&(n===ic.ghost||"none"===Wa(n,"display")||e&&!Ha(n,e));)n=n.previousElementSibling;return n||null}function Ka(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===ic.clone||e&&!Ha(t,e)||n++;return n}function Qa(t){var e=0,n=0,o=Ga();if(t)do{var i=qa(t),r=i.a,s=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}function tl(t,e){if(!t||!t.getBoundingClientRect)return Ga();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Wa(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Ga();if(o||e)return n;o=!0}}}while(n=n.parentNode);return Ga()}function el(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function nl(t,e){return function(){if(!Ra){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),Ra=setTimeout((function(){Ra=void 0}),e)}}}function ol(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function il(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function rl(t,e,n){var o={};return Array.from(t.children).forEach((function(i){var r,s,a,l;if(Va(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=Xa(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(s=o.top)&&void 0!==s?s:1/0,c.top),o.right=Math.max(null!==(a=o.right)&&void 0!==a?a:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var sl="Sortable"+(new Date).getTime();function al(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Wa(t,"display")&&t!==ic.ghost){e.push({target:t,rect:Xa(t)});var n=Sa({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=qa(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=Xa(n),l=n.prevFromRect,c=n.prevToRect,d=t.rect,u=qa(n,!0);u&&(a.top-=u.f,a.left-=u.e),n.toRect=a,n.thisAnimationDuration&&el(l,a)&&!el(s,a)&&(d.top-a.top)/(d.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,l,c,o.options)),el(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=o.options.animation),o.animate(n,d,a,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){Wa(t,"transition",""),Wa(t,"transform","");var i=qa(this.el),r=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(r||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,Wa(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Wa(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Wa(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Wa(t,"transition",""),Wa(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var ll=[],cl={initializeByDefault:!0},dl={mount:function(t){for(var e in cl)cl.hasOwnProperty(e)&&!(e in t)&&(t[e]=cl[e]);ll.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),ll.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";ll.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](Sa({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](Sa({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in ll.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,Oa(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return ll.forEach((function(o){"function"==typeof o.eventProperties&&Oa(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return ll.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var ul=["evt"],hl=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=Ma(n,ul);dl.pluginEvent.bind(ic)(t,e,Sa({dragEl:ml,parentEl:fl,ghostEl:gl,rootEl:vl,nextEl:bl,lastDownEl:yl,cloneEl:wl,cloneHidden:Cl,dragStarted:Pl,putSortable:Ml,activeSortable:ic.active,originalEvent:o,oldIndex:xl,oldDraggableIndex:El,newIndex:Sl,newDraggableIndex:_l,hideGhostForTarget:tc,unhideGhostForTarget:ec,cloneNowHidden:function(){Cl=!0},cloneNowShown:function(){Cl=!1},dispatchSortableEvent:function(t){pl({sortable:e,name:t,originalEvent:o})}},i))};function pl(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,u=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[sl]){var f,g=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Ta||ka?(f=document.createEvent("Event")).initEvent(o,!0,!0):f=new CustomEvent(o,{bubbles:!0,cancelable:!0}),f.to=s||n,f.from=a||n,f.item=i||n,f.clone=r,f.oldIndex=l,f.newIndex=c,f.oldDraggableIndex=d,f.newDraggableIndex=u,f.originalEvent=h,f.pullMode=p?p.lastPutMode:void 0;var b=Sa(Sa({},m),dl.getEventProperties(o,e));for(var y in b)f[y]=b[y];n&&n.dispatchEvent(f),g[v]&&g[v].call(e,f)}}(Sa({putSortable:Ml,cloneEl:wl,targetEl:ml,rootEl:vl,oldIndex:xl,oldDraggableIndex:El,newIndex:Sl,newDraggableIndex:_l},t))}var ml,fl,gl,vl,bl,yl,wl,Cl,xl,Sl,El,_l,Ol,Ml,Al,Tl,kl,Ll,Nl,Dl,Pl,zl,jl,$l,Hl,Il=!1,Vl=!1,Rl=[],Fl=!1,Bl=!1,Wl=[],ql=!1,Ul=[],Gl="undefined"!=typeof document,Xl=Da,Zl=ka||Ta?"cssFloat":"float",Yl=Gl&&!Pa&&!Da&&"draggable"in document.createElement("div"),Jl=function(){if(Gl){if(Ta)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Kl=function(t,e){var n=Wa(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Ya(t,0,e),r=Ya(t,1,e),s=i&&Wa(i),a=r&&Wa(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Xa(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Xa(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[Zl]||r&&"none"===n[Zl]&&l+c>o)?"vertical":"horizontal"},Ql=function(t){function e(t,n){return function(o,i,r,s){var a=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,s),n)(o,i,r,s);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==Ea(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},tc=function(){!Jl&&gl&&Wa(gl,"display","none")},ec=function(){!Jl&&gl&&Wa(gl,"display","")};Gl&&!Pa&&document.addEventListener("click",(function(t){if(Vl)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Vl=!1,!1}),!0);var nc=function(t){if(ml){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Rl.some((function(t){var e=t[sl].options.emptyInsertThreshold;if(e&&!Ja(t)){var n=Xa(t),o=i>=n.left-e&&i<=n.right+e,a=r>=n.top-e&&r<=n.bottom+e;return o&&a?s=t:void 0}})),s);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[sl]._onDragOver(n)}}var i,r,s},oc=function(t){ml&&ml.parentNode[sl]._isOutsideThisEl(t.target)};function ic(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Oa({},e),t[sl]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Kl(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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:!1!==ic.supportPointer&&"PointerEvent"in window&&!Na,emptyInsertThreshold:5};for(var o in dl.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Ql(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Yl,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ja(t,"pointerdown",this._onTapStart):(ja(t,"mousedown",this._onTapStart),ja(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ja(t,"dragover",this),ja(t,"dragenter",this)),Rl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Oa(this,al())}function rc(t,e,n,o,i,r,s,a){var l,c,d=t[sl],u=d.options.onMove;return!window.CustomEvent||Ta||ka?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||Xa(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),u&&(c=u.call(d,l,s)),c}function sc(t){t.draggable=!1}function ac(){ql=!1}function lc(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function cc(t){return setTimeout(t,0)}function dc(t){return clearTimeout(t)}ic.prototype={constructor:ic,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(zl=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,ml):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=o.filter;if(function(t){Ul.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ul.push(o)}}(n),!ml&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Na||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=Va(a,o.draggable,n,!1))&&a.animated||yl===a)){if(xl=Ka(a),El=Ka(a,o.draggable),"function"==typeof c){if(c.call(this,t,a,this))return pl({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),hl("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=Va(l,o.trim(),n,!1))return pl({sortable:e,rootEl:o,name:"filter",targetEl:a,fromEl:n,toEl:n}),hl("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!Va(l,o.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,s=i.options,a=r.ownerDocument;if(n&&!ml&&n.parentNode===r){var l=Xa(n);if(vl=r,fl=(ml=n).parentNode,bl=ml.nextSibling,yl=n,Ol=s.group,ic.dragged=ml,Al={target:ml,clientX:(e||t).clientX,clientY:(e||t).clientY},Nl=Al.clientX-l.left,Dl=Al.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ml.style["will-change"]="all",o=function(){hl("delayEnded",i,{evt:t}),ic.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!La&&i.nativeDraggable&&(ml.draggable=!0),i._triggerDragStart(t,e),pl({sortable:i,name:"choose",originalEvent:t}),Ba(ml,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){Ua(ml,t.trim(),sc)})),ja(a,"dragover",nc),ja(a,"mousemove",nc),ja(a,"touchmove",nc),ja(a,"mouseup",i._onDrop),ja(a,"touchend",i._onDrop),ja(a,"touchcancel",i._onDrop),La&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ml.draggable=!0),hl("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(ka||Ta))o();else{if(ic.eventCanceled)return void this._onDrop();ja(a,"mouseup",i._disableDelayedDrag),ja(a,"touchend",i._disableDelayedDrag),ja(a,"touchcancel",i._disableDelayedDrag),ja(a,"mousemove",i._delayedDragTouchMoveHandler),ja(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&ja(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ml&&sc(ml),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;$a(t,"mouseup",this._disableDelayedDrag),$a(t,"touchend",this._disableDelayedDrag),$a(t,"touchcancel",this._disableDelayedDrag),$a(t,"mousemove",this._delayedDragTouchMoveHandler),$a(t,"touchmove",this._delayedDragTouchMoveHandler),$a(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?ja(document,"pointermove",this._onTouchMove):ja(document,e?"touchmove":"mousemove",this._onTouchMove):(ja(ml,"dragend",this),ja(vl,"dragstart",this._onDragStart));try{document.selection?cc((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Il=!1,vl&&ml){hl("dragStarted",this,{evt:e}),this.nativeDraggable&&ja(document,"dragover",oc);var n=this.options;!t&&Ba(ml,n.dragClass,!1),Ba(ml,n.ghostClass,!0),ic.active=this,t&&this._appendGhost(),pl({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Tl){this._lastX=Tl.clientX,this._lastY=Tl.clientY,tc();for(var t=document.elementFromPoint(Tl.clientX,Tl.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Tl.clientX,Tl.clientY))!==e;)e=t;if(ml.parentNode[sl]._isOutsideThisEl(t),e)do{if(e[sl]){if(e[sl]._onDragOver({clientX:Tl.clientX,clientY:Tl.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=Ia(e));ec()}},_onTouchMove:function(t){if(Al){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=gl&&qa(gl,!0),s=gl&&r&&r.a,a=gl&&r&&r.d,l=Xl&&Hl&&Qa(Hl),c=(i.clientX-Al.clientX+o.x)/(s||1)+(l?l[0]-Wl[0]:0)/(s||1),d=(i.clientY-Al.clientY+o.y)/(a||1)+(l?l[1]-Wl[1]:0)/(a||1);if(!ic.active&&!Il){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(gl){r?(r.e+=c-(kl||0),r.f+=d-(Ll||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Wa(gl,"webkitTransform",u),Wa(gl,"mozTransform",u),Wa(gl,"msTransform",u),Wa(gl,"transform",u),kl=c,Ll=d,Tl=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!gl){var t=this.options.fallbackOnBody?document.body:vl,e=Xa(ml,!0,Xl,!0,t),n=this.options;if(Xl){for(Hl=t;"static"===Wa(Hl,"position")&&"none"===Wa(Hl,"transform")&&Hl!==document;)Hl=Hl.parentNode;Hl!==document.body&&Hl!==document.documentElement?(Hl===document&&(Hl=Ga()),e.top+=Hl.scrollTop,e.left+=Hl.scrollLeft):Hl=Ga(),Wl=Qa(Hl)}Ba(gl=ml.cloneNode(!0),n.ghostClass,!1),Ba(gl,n.fallbackClass,!0),Ba(gl,n.dragClass,!0),Wa(gl,"transition",""),Wa(gl,"transform",""),Wa(gl,"box-sizing","border-box"),Wa(gl,"margin",0),Wa(gl,"top",e.top),Wa(gl,"left",e.left),Wa(gl,"width",e.width),Wa(gl,"height",e.height),Wa(gl,"opacity","0.8"),Wa(gl,"position",Xl?"absolute":"fixed"),Wa(gl,"zIndex","100000"),Wa(gl,"pointerEvents","none"),ic.ghost=gl,t.appendChild(gl),Wa(gl,"transform-origin",Nl/parseInt(gl.style.width)*100+"% "+Dl/parseInt(gl.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;hl("dragStart",this,{evt:t}),ic.eventCanceled?this._onDrop():(hl("setupClone",this),ic.eventCanceled||((wl=il(ml)).removeAttribute("id"),wl.draggable=!1,wl.style["will-change"]="",this._hideClone(),Ba(wl,this.options.chosenClass,!1),ic.clone=wl),n.cloneId=cc((function(){hl("clone",n),ic.eventCanceled||(n.options.removeCloneOnHide||vl.insertBefore(wl,ml),n._hideClone(),pl({sortable:n,name:"clone"}))})),!e&&Ba(ml,i.dragClass,!0),e?(Vl=!0,n._loopId=setInterval(n._emulateDragOver,50)):($a(document,"mouseup",n._onDrop),$a(document,"touchend",n._onDrop),$a(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,ml)),ja(document,"drop",n),Wa(ml,"transform","translateZ(0)")),Il=!0,n._dragStartId=cc(n._dragStarted.bind(n,e,t)),ja(document,"selectstart",n),Pl=!0,Na&&Wa(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,s=t.target,a=this.options,l=a.group,c=ic.active,d=Ol===l,u=a.sort,h=Ml||c,p=this,m=!1;if(!ql){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=Va(s,a.draggable,r,!0),T("dragOver"),ic.eventCanceled)return m;if(ml.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return L(!1);if(Vl=!1,c&&!a.disabled&&(d?u||(o=fl!==vl):Ml===this||(this.lastPutMode=Ol.checkPull(this,c,ml,t))&&l.checkPut(this,c,ml,t))){if(i="vertical"===this._getDirection(t,s),e=Xa(ml),T("dragOverValid"),ic.eventCanceled)return m;if(o)return fl=vl,k(),this._hideClone(),T("revert"),ic.eventCanceled||(bl?vl.insertBefore(ml,bl):vl.appendChild(ml)),L(!0);var f=Ja(r,a.draggable);if(!f||function(t,e,n){var o=Xa(Ja(n.el,n.options.draggable)),i=rl(n.el,n.options,gl),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,i,this)&&!f.animated){if(f===ml)return L(!1);if(f&&r===t.target&&(s=f),s&&(n=Xa(s)),!1!==rc(vl,r,ml,e,s,n,t,!!s))return k(),f&&f.nextSibling?r.insertBefore(ml,f.nextSibling):r.appendChild(ml),fl=r,N(),L(!0)}else if(f&&function(t,e,n){var o=Xa(Ya(n.el,0,n.options,!0)),i=rl(n.el,n.options,gl),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,i,this)){var g=Ya(r,0,a,!0);if(g===ml)return L(!1);if(n=Xa(s=g),!1!==rc(vl,r,ml,e,s,n,t,!1))return k(),r.insertBefore(ml,g),fl=r,N(),L(!0)}else if(s.parentNode===r){n=Xa(s);var v,b,y,w=ml.parentNode!==r,C=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return o===s||i===a||o+r/2===s+l/2}(ml.animated&&ml.toRect||e,s.animated&&s.toRect||n,i),x=i?"top":"left",S=Za(s,"top","top")||Za(ml,"top","top"),E=S?S.scrollTop:void 0;if(zl!==s&&(b=n[x],Fl=!1,Bl=!C&&a.invertSwap||w),v=function(t,e,n,o,i,r,s,a){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!s)if(a&&$l<c*i){if(!Fl&&(1===jl?l>d+c*r/2:l<u-c*r/2)&&(Fl=!0),Fl)h=!0;else if(1===jl?l<d+$l:l>u-$l)return-jl}else if(l>d+c*(1-i)/2&&l<u-c*(1-i)/2)return function(t){return Ka(ml)<Ka(t)?1:-1}(e);if((h=h||s)&&(l<d+c*r/2||l>u-c*r/2))return l>d+c/2?1:-1;return 0}(t,s,n,i,C?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Bl,zl===s),0!==v){var _=Ka(ml);do{_-=v,y=fl.children[_]}while(y&&("none"===Wa(y,"display")||y===gl))}if(0===v||y===s)return L(!1);zl=s,jl=v;var O=s.nextElementSibling,M=!1,A=rc(vl,r,ml,e,s,n,t,M=1===v);if(!1!==A)return 1!==A&&-1!==A||(M=1===A),ql=!0,setTimeout(ac,30),k(),M&&!O?r.appendChild(ml):s.parentNode.insertBefore(ml,M?O:s),S&&ol(S,0,E-S.scrollTop),fl=ml.parentNode,void 0===b||Bl||($l=Math.abs(b-Xa(s)[x])),N(),L(!0)}if(r.contains(ml))return L(!1)}return!1}function T(a,l){hl(a,p,Sa({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:u,fromSortable:h,target:s,completed:L,onMove:function(n,o){return rc(vl,r,ml,e,n,Xa(n),t,o)},changed:N},l))}function k(){T("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function L(e){return T("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(p),p!==h&&(Ba(ml,Ml?Ml.options.ghostClass:c.options.ghostClass,!1),Ba(ml,a.ghostClass,!0)),Ml!==p&&p!==ic.active?Ml=p:p===ic.active&&Ml&&(Ml=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){T("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===ml&&!ml.animated||s===r&&!s.animated)&&(zl=null),a.dragoverBubble||t.rootEl||s===document||(ml.parentNode[sl]._isOutsideThisEl(t.target),!e&&nc(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function N(){Sl=Ka(ml),_l=Ka(ml,a.draggable),pl({sortable:p,name:"change",toEl:r,newIndex:Sl,newDraggableIndex:_l,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){$a(document,"mousemove",this._onTouchMove),$a(document,"touchmove",this._onTouchMove),$a(document,"pointermove",this._onTouchMove),$a(document,"dragover",nc),$a(document,"mousemove",nc),$a(document,"touchmove",nc)},_offUpEvents:function(){var t=this.el.ownerDocument;$a(t,"mouseup",this._onDrop),$a(t,"touchend",this._onDrop),$a(t,"pointerup",this._onDrop),$a(t,"touchcancel",this._onDrop),$a(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Sl=Ka(ml),_l=Ka(ml,n.draggable),hl("drop",this,{evt:t}),fl=ml&&ml.parentNode,Sl=Ka(ml),_l=Ka(ml,n.draggable),ic.eventCanceled||(Il=!1,Bl=!1,Fl=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),dc(this.cloneId),dc(this._dragStartId),this.nativeDraggable&&($a(document,"drop",this),$a(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Na&&Wa(document.body,"user-select",""),Wa(ml,"transform",""),t&&(Pl&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),gl&&gl.parentNode&&gl.parentNode.removeChild(gl),(vl===fl||Ml&&"clone"!==Ml.lastPutMode)&&wl&&wl.parentNode&&wl.parentNode.removeChild(wl),ml&&(this.nativeDraggable&&$a(ml,"dragend",this),sc(ml),ml.style["will-change"]="",Pl&&!Il&&Ba(ml,Ml?Ml.options.ghostClass:this.options.ghostClass,!1),Ba(ml,this.options.chosenClass,!1),pl({sortable:this,name:"unchoose",toEl:fl,newIndex:null,newDraggableIndex:null,originalEvent:t}),vl!==fl?(Sl>=0&&(pl({rootEl:fl,name:"add",toEl:fl,fromEl:vl,originalEvent:t}),pl({sortable:this,name:"remove",toEl:fl,originalEvent:t}),pl({rootEl:fl,name:"sort",toEl:fl,fromEl:vl,originalEvent:t}),pl({sortable:this,name:"sort",toEl:fl,originalEvent:t})),Ml&&Ml.save()):Sl!==xl&&Sl>=0&&(pl({sortable:this,name:"update",toEl:fl,originalEvent:t}),pl({sortable:this,name:"sort",toEl:fl,originalEvent:t})),ic.active&&(null!=Sl&&-1!==Sl||(Sl=xl,_l=El),pl({sortable:this,name:"end",toEl:fl,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){hl("nulling",this),vl=ml=fl=gl=bl=wl=yl=Cl=Al=Tl=Pl=Sl=_l=xl=El=zl=jl=Ml=Ol=ic.dragged=ic.ghost=ic.clone=ic.active=null,Ul.forEach((function(t){t.checked=!0})),Ul.length=kl=Ll=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ml&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)Va(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||lc(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];Va(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Va(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=dl.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Ql(n)},destroy:function(){hl("destroy",this);var t=this.el;t[sl]=null,$a(t,"mousedown",this._onTapStart),$a(t,"touchstart",this._onTapStart),$a(t,"pointerdown",this._onTapStart),this.nativeDraggable&&($a(t,"dragover",this),$a(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Rl.splice(Rl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Cl){if(hl("hideClone",this),ic.eventCanceled)return;Wa(wl,"display","none"),this.options.removeCloneOnHide&&wl.parentNode&&wl.parentNode.removeChild(wl),Cl=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Cl){if(hl("showClone",this),ic.eventCanceled)return;ml.parentNode!=vl||this.options.group.revertClone?bl?vl.insertBefore(wl,bl):vl.appendChild(wl):vl.insertBefore(wl,ml),this.options.group.revertClone&&this.animate(ml,wl),Wa(wl,"display",""),Cl=!1}}else this._hideClone()}},Gl&&ja(document,"touchmove",(function(t){(ic.active||Il)&&t.cancelable&&t.preventDefault()})),ic.utils={on:ja,off:$a,css:Wa,find:Ua,is:function(t,e){return!!Va(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:nl,closest:Va,toggleClass:Ba,clone:il,index:Ka,nextTick:cc,cancelNextTick:dc,detectDirection:Kl,getChild:Ya,expando:sl},ic.get=function(t){return t[sl]},ic.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(ic.utils=Sa(Sa({},ic.utils),t.utils)),dl.mount(t)}))},ic.create=function(t,e){return new ic(t,e)},ic.version="1.15.3";var uc,hc,pc,mc,fc,gc,vc=[],bc=!1;function yc(){vc.forEach((function(t){clearInterval(t.pid)})),vc=[]}function wc(){clearInterval(gc)}var Cc=nl((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=Ga(),d=!1;hc!==n&&(hc=n,yc(),uc=e.scroll,i=e.scrollFn,!0===uc&&(uc=tl(n,!0)));var u=0,h=uc;do{var p=h,m=Xa(p),f=m.top,g=m.bottom,v=m.left,b=m.right,y=m.width,w=m.height,C=void 0,x=void 0,S=p.scrollWidth,E=p.scrollHeight,_=Wa(p),O=p.scrollLeft,M=p.scrollTop;p===c?(C=y<S&&("auto"===_.overflowX||"scroll"===_.overflowX||"visible"===_.overflowX),x=w<E&&("auto"===_.overflowY||"scroll"===_.overflowY||"visible"===_.overflowY)):(C=y<S&&("auto"===_.overflowX||"scroll"===_.overflowX),x=w<E&&("auto"===_.overflowY||"scroll"===_.overflowY));var A=C&&(Math.abs(b-r)<=a&&O+y<S)-(Math.abs(v-r)<=a&&!!O),T=x&&(Math.abs(g-s)<=a&&M+w<E)-(Math.abs(f-s)<=a&&!!M);if(!vc[u])for(var k=0;k<=u;k++)vc[k]||(vc[k]={});vc[u].vx==A&&vc[u].vy==T&&vc[u].el===p||(vc[u].el=p,vc[u].vx=A,vc[u].vy=T,clearInterval(vc[u].pid),0==A&&0==T||(d=!0,vc[u].pid=setInterval(function(){o&&0===this.layer&&ic.active._onTouchMove(fc);var e=vc[this.layer].vy?vc[this.layer].vy*l:0,n=vc[this.layer].vx?vc[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(ic.dragged.parentNode[sl],n,e,t,fc,vc[this.layer].el)||ol(vc[this.layer].el,n,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=tl(h,!1)));bc=d}}),30),xc=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Sc(){}function Ec(){}Sc.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=Ya(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:xc},Oa(Sc,{pluginName:"revertOnSpill"}),Ec.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:xc},Oa(Ec,{pluginName:"removeOnSpill"}),ic.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?ja(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ja(document,"pointermove",this._handleFallbackAutoScroll):e.touches?ja(document,"touchmove",this._handleFallbackAutoScroll):ja(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?$a(document,"dragover",this._handleAutoScroll):($a(document,"pointermove",this._handleFallbackAutoScroll),$a(document,"touchmove",this._handleFallbackAutoScroll),$a(document,"mousemove",this._handleFallbackAutoScroll)),wc(),yc(),clearTimeout(Ra),Ra=void 0},nulling:function(){fc=hc=uc=bc=gc=pc=mc=null,vc.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(fc=t,e||this.options.forceAutoScrollFallback||ka||Ta||Na){Cc(t,this.options,r,e);var s=tl(r,!0);!bc||gc&&o===pc&&i===mc||(gc&&wc(),gc=setInterval((function(){var r=tl(document.elementFromPoint(o,i),!0);r!==s&&(s=r,yc()),Cc(t,n.options,r,e)}),10),pc=o,mc=i)}else{if(!this.options.bubbleScroll||tl(r,!0)===Ga())return void yc();Cc(t,this.options,tl(r,!1),!1)}}},Oa(t,{pluginName:"scroll",initializeByDefault:!0})}),ic.mount(Ec,Sc);const _c={getStyle:(t,e=!1)=>{let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n},fadeOut:(t,e=250)=>{const n=1/(e/60);t.style.opacity=1,function e(){const o=Number(t.style.opacity)-n;o>0?(t.style.opacity=o,window.requestAnimationFrame(e)):t.remove()}()},slideDown:(t,e=250,n=!1)=>{t.style.display="block";const o=_c.getStyle(t),i=Number.parseInt(o.height,10),r=i/(e/60);t.style.height="0px",function e(){const o=Number.parseFloat(t.style.height),s=o+r;o<i?(t.style.height=`${s}px`,window.requestAnimationFrame(e)):(t.style.height="auto",n&&n(t))}()},slideUp:(t,e=250,n=!1)=>{const o=_c.getStyle(t),i=Number.parseInt(o.height,10),r=o.overflow;t.style.overflow="hidden",t.style.height=`${i}px`;const s=o.minHeight;t.style.minHeight="auto";const a=parseFloat(i/(e/60)).toFixed(2);!function e(){const o=Number.parseInt(t.style.height,10)-a;o>0?(t.style.height=`${o}px`,window.requestAnimationFrame(e)):(t.style.overflow=r,t.style.display="none",t.style.minHeight=s,delete t.style.height,n&&n(t))}()},slideToggle:(t,e=250,n="none"===_c.getStyle(t,"display"))=>{n?_c.slideDown(t,e):_c.slideUp(t,e)}},Oc=t=>Number.isInteger(Number(t)),Mc=t=>{let e=0,n=t;for(;n?.previousElementSibling;)n=n.previousElementSibling,e++;return e},Ac=(t,e,n)=>{const o=n.split("||"),i=Wo(e).map((e=>t.find((t=>{const n=o.find((e=>!!ss(t,e)));return n&&ss(t,n)===e})))).filter(Boolean).concat(t);return Wo(i)},Tc=(t,e,n)=>{for(let o=0;o<t.length;o++)e.call(n,t[o],o)},kc=(t,e)=>{const n=[];return Tc(t,((t,o)=>n.push(e(t,o)))),n},Lc={},Nc=t=>{if(Lc[t])return Lc[t];const e=({className:"class"}[t]||t).replace(/^\d+/,"").replace(/[^a-zA-Z0-9-:]/g,"");return Lc[t]=e,e},Dc=t=>t.replace(/\b\w/g,(t=>t.toUpperCase())),Pc={capitalize:Dc,safeAttrName:Nc,forEach:Tc,copyObj:t=>window.JSON.parse(window.JSON.stringify(t)),map:kc,subtract:(t,e)=>e.filter((e=>!~t.indexOf(e))),indexOfNode:Mc,isInt:Oc,get:ss,orderObjectsBy:Ac},zc={js:new Set,css:new Set,formeoSprite:null},jc=(t,e,n=ti)=>new Promise((o=>fetch(t).then((t=>{if(!t.ok)return o(n(t));o(e?e(t):t)})).catch((t=>n(t))))),$c=(t,e)=>{t.removeEventListener("load",$c),e(t.src)},Hc=(t,e)=>{t.removeEventListener("load",Hc),e(t.src)},Ic=t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>new Promise(((e,n)=>{if(zc.css.has(t))return e(t);zc.css.add(t);const o=Gc.create({tag:"link",attrs:{rel:"stylesheet",href:t},action:{load:()=>$c(o,e),error:()=>n(new Error(`${(void 0).src} failed to load.`))}});document.head.appendChild(o)}))));return Promise.all(e)},Vc=t=>{const e=(new DOMParser).parseFromString(t,"image/svg+xml");return zc.formeoSprite=e.documentElement,zc.formeoSprite},Rc={js:t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>(t=>new Promise(((e,n)=>{if(zc.js.has(t))return e(t);zc.js.add(t);const o=Gc.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:t},action:{load:()=>Hc(o,e),error:()=>n(new Error(`${t} failed to load.`))}});document.head.appendChild(o)})))(t)));return Promise.all(e)},css:t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>Ic(t)));return Promise.all(e)}},Fc=t=>{const e=Object.entries(t).map((([t,e])=>Rc[t](e)));return Promise.all(e)},Bc={glyphicons:t=>`<span class="glyphicon glyphicon-${t}" aria-hidden="true"></span>`,"font-awesome":t=>{const[e,n]=t.split(" ");return`<i class="${e} fa-${n}"></i>`},fontello:t=>`<i class="${mr}${t}">${t}</i>`},Wc=new Set(["input","textarea","select"]),qc=new Set(["focus","blur"]),Uc=(t={})=>{let e=t?.attrs?.name||t?.name;if(e)return e;const n=qo(t);let o=t.config?.label||t.attrs?.label||t?.label;return o&&("object"==typeof o&&(o=Gc.create(o).textContent),/^<.+>.+<.+>$/gim.test(o)&&(o=(t=>{const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""})(o)),e=`${n}-${xr(((t,e,n="…")=>{if(t.length<=e)return t;const o=t.slice(0,e),i=o.lastIndexOf(" ");let r=`${i>0?o.slice(0,i):o}`;return n&&(r+=n),r})(o,24,null))}`),e||n};const Gc=new class{constructor(t=Object.create(null)){this.options=t}set setOptions(t){this.options=Uo(this.options,t)}processElemArg(t){let e,n=t;if("string"==typeof n)return e=n,n={tag:e},n;if(n.attrs){const{tag:t,...o}=n.attrs;if(t)if("string"==typeof t)e=t;else{e=(t.find((t=>!0===t.selected))||t[0]).value}n.attrs=o}return n.tag=e||n.tag||"div",n}render=t=>(t.id=`f-${t.id||qo()}`,this.create(t));create=(t,e=!1)=>{if(!t)return;if(this.isDOMElement(t))return t;const n=this,o=["children","content"],{className:i,options:r,dataset:s,...a}=this.processElemArg(t);let l;o.push("tag");const{tag:c}=a;let d;const u={attrs:{},className:[Pc.get(a,"config.inputWrap")],children:[],config:{}};let h=document.createElement(c);const p={string:t=>{h.innerHTML+=t},object:t=>t&&h.appendChild(n.create(t,e)),node:t=>h.appendChild(t),component:t=>h.appendChild(t.dom),array:t=>{for(const e of t)l=n.childType(e),p[l](e)},function:t=>{t=t(),l=n.childType(t),p[l](t)},undefined:()=>null,boolean:()=>null};if(i&&(a.attrs=Uo(a.attrs,{className:i})),r){const t=this.processOptions(r,a,e);if(!this.holdsContent(h)||"button"===c)return Pc.forEach(t,(t=>{u.children.push(n.create(t,e))})),a.attrs.className&&(u.className=a.attrs.className),u.id=a.id,u.config={...a.config},this.create(u,e);p.array.call(this,t),a.content=void 0,o.push("options")}if(a.attrs&&(n.processAttrs(a,h,e),o.push("attrs")),a.config){if(a.config.label&&(a.config.label&&"button"!==c||["radio","checkbox"].includes(Pc.get(a,"attrs.type")))&&!e){const t=n.label(a);if(!a.config.hideLabel){const e=[t,h];n.labelAfter(a)&&e.reverse(),u.children.push(e)}}o.push("config")}if(a.content||a.children){const t=a.content||a.children;l=n.childType(t),p[l],p[l].call(this,t)}if(s){for(const t in s)Object.hasOwn(s,t)&&(h.dataset[t]="function"==typeof s[t]?s[t]():s[t]);o.push("dataset")}a.action&&(this.actionHandler(h,a.action),o.push("action"));const m=Pc.subtract(o,Object.keys(a));for(d=m.length-1;d>=0;d--)h[m[d]]=a[m[d]];return u.children.length&&(h=this.create(u)),h};onRender=(t,e,n=333)=>{const o=Date.now(),i=()=>{!t.parentElement&&Date.now()-o<n?window.requestAnimationFrame(i):t.parentElement&&e(t)};i()};actionHandler(t,e){const n={onRender:Gc.onRender,render:Gc.onRender};return Object.entries(e).map((([e,o])=>(Array.isArray(o)?o:[o]).map((o=>{const i=n[e]||(t=>{const e=t.replace(/^on([A-Z])/,((t,e)=>e.toLowerCase()));return(t,n)=>t.addEventListener(e,n,qc.has(e))})(e);return i(t,o)}))))}get icons(){if(this.iconSymbols)return this.iconSymbols;const t=zc.formeoSprite.querySelectorAll("svg symbol");return this.iconSymbols=Array.from(t).reduce(((t,e)=>(t[e.id.replace(mr,"")]=(t=>{const e=t.getAttribute("viewBox")||"0 0 24 24",n=Array.from(t.children).map((t=>t.cloneNode(!0).outerHTML)).join("");return{tag:"svg",attrs:{className:["svg-icon",t.id],viewBox:e,xmlns:"http://www.w3.org/2000/svg"},children:n}})(e),t)),{}),this.cachedIcons={},this.iconSymbols}icon(t,e){if(!t)return;const n=`${t}?${new URLSearchParams(e).toString()}`;if(this.cachedIcons?.[n])return this.cachedIcons[n];const o=this.icons[t];if(o){if(e){const t=Uo(o,e);return this.cachedIcons[n]=Gc.create(t).outerHTML,this.cachedIcons[n]}return this.cachedIcons[n]=Gc.create(o).outerHTML,this.cachedIcons[n]}return Bc[Gc.options.iconFont]?.(t)||t}processAttrs(t,e,n){const{attrs:o={}}=t;if(!n&&!o.name&&null!==o.name&&this.isInput(t.tag)){const n=Uc(t);n&&e.setAttribute("name",n)}for(const i of Object.keys(o)){const t=Pc.safeAttrName(i),n=this.processAttrValue(o[i]);!1!==n&&e.setAttribute(t,n)}}processAttrValue(t){if("function"==typeof t)return t();if("boolean"==typeof t)return t?"":t;let e=t||"";if(Array.isArray(e))if("object"==typeof e[0]){const t=e.filter((t=>!0===t.selected));e=t.length?t[0].value:e[0].value}else e=e.join(" ");return e}toggleElementsByStr=(t,e)=>{const n=[];return Gc.elementsContainText(t,e,((t,e)=>{e?(t.style.display="block",n.push(t)):t.style.display="none"})),n};elementsContainText=(t,e,n)=>{const o=[];return Tc(t,(t=>{const i=-1!==t.textContent.toLowerCase().indexOf(e.toLowerCase());n?.(t,i),i&&o.push(t)})),o};generateOption=({type:t="option",label:e,value:n,i:i=0,selected:r})=>({tag:"option"===t?"option":"input",attrs:{type:t,value:n||`${t}-${i}`,["option"===t?"selected":"checked"]:r||!i},config:{label:e||o.get("labelCount",{label:o.get("option"),count:i})}});processOptions(t,e,n){const{action:o,attrs:i={}}=e,r=i.type||e.tag,s=i.id||e.id;return t.map(((t,a)=>{const{label:l,value:c,...d}=t,u=()=>{const u={tag:"input",attrs:{name:s,type:r,value:c||"",id:`${s}-${a}`,...d},action:o},h={tag:"label",attrs:{for:`${s}-${a}`},children:l},p={children:[u,h],className:[`f-${r}`]};return i.className&&(e.config.inputWrap=i.className),e.config.inline&&p.className.push(`f-${r}-inline`),t.selected&&(u.attrs.checked=!0),n&&(h.attrs.contenteditable=!0),p},h={select:()=>{const e=t.attrs||t,n={attrs:e,...t,...e},{label:o,checked:i,selected:r,attrs:s}=n;return{tag:"option",attrs:{...s,selected:!(!i&&!r)},children:o}},button:t=>{const{type:n,label:o,className:i,id:r}=t;return{...e,attrs:{type:n},className:i,id:r||qo(),options:void 0,children:o,action:e.action}},checkbox:u,radio:u};return h[r]?.(t)}))}holdsContent(t){return-1!==t.outerHTML.indexOf("/")}isBlockInput(t){return!this.isInput(t)&&this.holdsContent(t)}isInput(t){let e=t;return"string"!=typeof e&&(e=e.tagName),Wc.has(e)}parsedHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.textContent}labelAfter(t){const e=Pc.get(t,"attrs.type"),n=Pc.get(t,"config.labelAfter");return void 0!==n?n:"checkbox"===e||"radio"===e}requiredMark=()=>({tag:"span",className:"text-error",children:"*"});label(t,e){const n=Pc.get(t,"attrs.required");let{config:{label:o=""}}=t;const{id:i,attrs:r}=t;"function"==typeof o&&(o=o());const s={tag:"label",attrs:{for:i||r?.id},className:[],children:[o,n&&this.requiredMark()],action:{}};return e&&(s.attrs.for=void 0,s.attrs.contenteditable=!0,s.fMap=e),s}childType(t){return void 0===t?t:[["array",t=>Array.isArray(t)],["node",t=>t instanceof window.Node||t instanceof window.HTMLElement],["component",()=>t?.dom],[typeof t,()=>!0]].find((e=>e[1](t)))[0]}getStyle(t,e=!1){let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n}getElement(t){return{node:()=>t,object:()=>document.getElementById(t.id),string:()=>document.getElementById(t)}[this.childType(t)]()}empty(t){for(;t.firstChild;)this.remove(t.firstChild);return t}removeEmpty=t=>{const e=t.parentElement,n=Bo(t),o=e.getElementsByClassName(`formeo-${n}`);if(this.remove(t),!o.length)return this.isStage(e)?this.emptyClass(e):this.removeEmpty(e)};remove(t){const e=Bo(t);return e?du.remove(`${e}s.${t.id}`):t.parentElement.removeChild(t)}removeClasses(t,e){const n={string:t=>t.classList.remove(e),array:t=>{for(const n of e)t.classList.remove(n)}};n.object=n.string,Pc.forEach(t,n[this.childType(e)])}addClasses(t,e){const n={string:t=>t.classList.add(e),array:t=>{for(const n of e)t.classList.add(n)}};Pc.forEach(t,n[this.childType(e)])}formGroup(t,e=""){return{className:["f-field-group",e],children:t}}coords(t){const e=t.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{pageX:e.left+e.width/2,pageY:e.top-n.top-e.height/2}}clearStage(t){t.classList.add("removing-all-fields");_c.slideUp(t,600,(()=>{Gc.empty(t),t.classList.remove("removing-all-fields"),Gc.emptyClass(t),_c.slideDown(t,300)}))}toggleSortable(t,e){let n=e;const o=Bo(t);if(!o)return;const i=Bo(t.parentElement),r=Gc[o].get(t.id).sortable;n||(n=!r.option("disabled")),r.option("disabled",n),i&&["rows","columns","stages"].includes(i)&&this.toggleSortable(t.parentElement,n)}emptyClass(t){const e=t.getElementsByClassName(bi.get(t.classList.item(0)));t.classList.toggle("empty",!e.length)}btnTemplate=({title:t="",...e})=>({tag:"button",attrs:{type:"button",title:t},...e});isControls=t=>Bo(t)===di;isStage=t=>Bo(t)===ui;isRow=t=>Bo(t)===hi;isColumn=t=>Bo(t)===pi;isField=t=>Bo(t)===mi;asComponent=t=>du[`${Bo(t)}s`].get(t.id);isDOMElement(t){return t instanceof window.Element||t instanceof window.HTMLElement||!(!t||"object"!=typeof t||1!==t.nodeType||"string"!=typeof t.nodeName)}},Xc="f-autocomplete",Zc=`${Xc}-display-field`,Yc=`${Xc}-list`,Jc="highlight-component",Kc=`${Yc}-item`,Qc=["config.label","config.controlId"],td=[...Qc,"config.legend","name"],ed=t=>Qc.reduce(((e,n)=>e||t.get(n)),null),nd=t=>td.reduce(((e,n)=>e||t.get(n)),null)||Cr(t.name),od=new Map([["condition.source",ed],["if.condition.source",ed],["if.condition.target",ed],["then.condition.target",nd],["condition.target",nd]]),id=({id:t,...e},n)=>{const{name:o,label:i}=e;if(!o)return i;return od.get(n)(e)},rd=t=>(t.classList.contains(Kc)||(t=t.parentElement),t),sd=({value:t,textLabel:e,htmlLabel:n,componentType:o,depth:i=0},r)=>{const s={tag:"li",children:n,dataset:{value:t,label:e},className:[Kc,`${Kc}-depth-${i}`,`component-type-${o}`],action:{mousedown:({target:t})=>{t=rd(t),r.setValue(t),r.selectOption(t),r.hideList()},mouseover:({target:t})=>{t=rd(t),r.removeHighlight(),r.highlightComponent(t)},mouseleave:({target:t})=>{t=rd(t),r.removeHighlight()}}};return Gc.create(s)},ad=t=>{const e=t.value,n=[],o=du.flatList(),i=Object.entries(o).reduce(((o,[i,r])=>{const s=id(r,t.key);if(s){const a=r.name,l={tag:"span",content:` ${Cr(a)}`,className:"component-type"},c=`${a}.${s}`;n.push(c);const d=((t,e)=>{const n=t.reduce(((t,n)=>t+(n===e)),0);return n>1?`(${n})`:""})(n,c),u=[`${s} `,{tag:"span",content:d,className:"component-label-count"},l],h=[s,d].join(" ").trim();if(r.isCheckable){const e=((t,e)=>{const n=t.data.options.map(((n,o)=>{const i=`${t.address}.options[${o}]`,r=n.label,s=n.label;return sd({value:i,textLabel:r,htmlLabel:s,componentType:"option",depth:1},e)}));return Gc.create({tag:"ul",attrs:{className:[Yc,"options-list"]},children:n})})(r,t);u.push(e)}const p=(({selectedId:t,...e})=>(e.value===t&&(e.selected=!0),e))({value:i,textLabel:h,htmlLabel:u,componentType:a,selectedId:e});o.push(sd(p,t))}return o}),[]);return i};class ld{lastCache=Date.now();optionsCache=null;constructor({key:t,value:e,className:n,onChange:o=ti}){this.key=t,this.className=[n||this.key.replace(/\./g,"-")].flat(),this.value=e,this.onChange=o||ti,this.events=[],this.build()}createProxy(){return new Proxy(this,{get(t,e){if(e in t)return t[e];if(e in t.dom){const n=t.dom[e];return"function"==typeof n?n.bind(t.dom):n}},set:(t,e,n)=>(e in t?t[e]=n:t.dom[e]=n,!0)})}get isAddress(){return Jo(this.value)}get valueComponent(){return Jo(this.value)&&du.getAddress(this.value)}build(){const t=t=>{const e=this.list,n=this.getActiveOption();let o=new Map([[38,()=>{const t=this.getPreviousOption(n);t&&this.selectOption(t)}],[40,()=>{const t=this.getNextOption(n);t&&this.selectOption(t)}],[13,()=>{n&&(this.selectOption(n),this.setValue(n),"none"===e.style.display?this.showList(n):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return o||(o=()=>!1),o()},e={focus:({target:e})=>{this.updateOptions(),e.parentElement.classList.add(`${Xc}-focused`);const n=Gc.toggleElementsByStr(this.list.querySelectorAll(`.${Kc}-depth-0`),e.value);e.addEventListener("keydown",t);const o=this.list.querySelector(".active-option")||n[0];this.showList(o)},blur:({target:e})=>{e.parentElement.classList.remove(`${Xc}-focused`),e.removeEventListener("keydown",t),this.hideList()},input:t=>{const{value:e}=t.target,n=Gc.toggleElementsByStr(this.list.querySelectorAll("li"),e);if(0===e.length&&this.clearValue(),0===n.length)this.hideList();else{const t=this.getActiveOption()||n[0];this.showList(t)}this.setValue({dataset:{label:e,value:e}})}};return this.displayField=Gc.create({tag:"input",autocomplete:"off",action:e,attrs:{type:"text",className:Zc,value:this.label||this.value,placeholder:o.get(`${this.key}.placeholder`)}}),this.hiddenField=Gc.create({tag:"input",attrs:{type:"hidden",className:Xc,value:this.value}}),this.list=Gc.create({tag:"ul",attrs:{className:Yc}}),this.clearButton=Gc.create({tag:"span",content:Gc.icon("remove"),className:"clear-button hidden",action:{click:()=>this.clearValue()}}),this.dom=Gc.create({children:[this.displayField,this.clearButton,this.hiddenField],className:[Xc,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(!Jo(this.value))return this.value;const t=this.value&&du.getAddress(this.value);return t&&id(t,`${this.key}`)||this.value}updateOptions(){let t=this.optionsCache;const e=Date.now();(e-this.lastCache>5*Fi||!t)&&(Gc.empty(this.list),t=this.generateOptions(),this.lastCache=e),this.list.children.length||this.list.append(...t)}generateOptions(){return this.optionsCache=ad(this),this.optionsCache}setListPosition(){const{offsetHeight:t,offsetWidth:e}=this.displayField,n=this.displayField.closest(".formeo-stage").getBoundingClientRect(),o=this.displayField.getBoundingClientRect(),i={position:"absolute",top:o.y+t-n.y+"px",left:o.x+window.scrollX-n.x+2+"px",width:`${e}px`};Object.assign(this.list.style,i)}showList(t,e=this.list){this.stage.contains(this.list)||this.stage.appendChild(this.list),this.setListPosition(),this.selectOption(t),_c.slideDown(e,Ri)}hideList(t=this.list){_c.slideUp(t,Ri),this.removeHighlight(),this.stage.contains(this.list)&&this.stage.removeChild(this.list)}getActiveOption(t=this.list){const e=t.querySelector(".active-option");return"none"!==e?.style.display?e:null}getPreviousOption(t){let e=t;do{e=e?e.previousSibling:null}while(null!=e&&"none"===e.style.display);return e}getNextOption(t){let e=t;do{e=e?e.nextSibling:null}while(null!=e&&"none"===e.style.display);return e}selectOption(t,e=this.list){const n=e.querySelectorAll("li");for(const o of n){const{dataset:{value:t}}=o;if(o.classList.remove("active-option"),Jo(t)){const e=du.getAddress(t);e?.dom?.classList.remove(Jc)}}t&&(t.classList.add("active-option"),this.highlightComponent(t))}removeHighlight(){const t=document.getElementsByClassName(Jc);for(const e of t)e.classList.remove(Jc)}highlightComponent(t){const{dataset:{value:e}}=t;if(Jo(e)){const{componentAddress:t,isOptionAddress:n,optionIndex:o}=Sr(e).reduce(((t,e)=>"options"===e?(t.isOptionAddress=!0,t):t.isOptionAddress?(t.optionIndex=+e,t):(t.componentAddress.push(e),t)),{componentAddress:[],optionIndex:null,isOptionAddress:!1}),i=du.getAddress(t);if(i?.dom&&(i.dom.classList.add(Jc),n)){const t=i.dom.querySelectorAll(".field-preview .f-checkbox, .field-preview .f-radio");t[o]?.classList.add(Jc)}}}clearValue(){this.selectOption(null),this.setValue({dataset:{label:"",value:""}}),this.displayField.focus()}setValue(t){const{label:e,value:n}=t.dataset;this.displayField.value=e,this.hiddenField.value=n,this.value=n,this.clearButton.classList.toggle("hidden",!n.length),this.onChange?.({target:this.hiddenField})}}function cd({key:t,value:e,type:n="text",checked:i}){const r={tag:"input",attrs:{type:n,value:e,placeholder:o.get(`${t}.placeholder`)||Cr(t)},className:[t.replace(/\./g,"-")],config:{}};return i&&(r.attrs.checked=!0),r}function dd(t){const e=o.get(t);if(e)return e;const n=t.split(".");return o.get(n[n.length-1])}const ud={autocomplete:(...t)=>new ld(...t).createProxy(),string:({key:t,value:e})=>cd({key:t,value:e}),boolean:({key:t,value:e})=>cd({key:t,value:e,type:"selected"===t?"radio":"checkbox",checked:!!e}),number:({key:t,value:e})=>cd({key:t,value:e,type:"number"}),array:({key:t,value:e})=>({tag:"select",attrs:{placeholder:dd(`placeholder.${t}`)},className:[t.replace(/\./g,"-")],options:e}),object:t=>Object.entries(t).map((([t,e])=>ud[Gc.childType(e)]({key:t,value:e})))},hd={boolean:(t,e)=>({click:({target:n})=>{if("radio"===n.type){const t=e.data.options.map((t=>({...t,selected:!1})));e.set("options",t)}e.set(t,n.checked),e.updatePreview()}}),string:(t,e)=>({input:({target:{value:n}})=>{e.set(t,n),e.debouncedUpdatePreview()}}),number:(t,e)=>({input:({target:{value:n}})=>{e.set(t,Number(n)),e.debouncedUpdatePreview()}}),array:(t,e)=>({change:({target:{value:n}})=>{e.set(t,n),e.debouncedUpdatePreview()}}),object:()=>({})},pd="hidden-property",md=/\.options\[\d+\]$/,fd={"if-sourceProperty":ls(ar,rr,sr),"if-targetProperty":ls(ar),"then-targetProperty":ls(ar,rr,sr),...Object.entries(lr).reduce(((t,[e,n])=>(t[`if-${e}`]=n,t[`then-${e}`]=n,t)),{})},gd={assignment:bd,comparison:bd,logical:bd,source:({key:t,value:e,onChange:n,conditionType:o})=>ud.autocomplete({key:`${o}.condition.${t}`,value:e,onChange:n,className:`condition-${t}`}),sourceProperty:bd,targetProperty:bd,target:t=>gd.source(t),value:({key:t,value:e,onChange:n},o)=>{const i=ud.string({key:`condition.${t}`,value:e});return i.action={input:n},i}};function vd({key:t,value:e,conditionType:n}){const i=fd[`${n}-${t}`];return Object.entries(i||{}).map((([n,i])=>function({fieldName:t,fieldValue:e,key:n,optionValue:i}){return{label:o.get(`${t}.${n}`)||Cr(n).toLowerCase(),value:i,selected:i===e}}({fieldName:t,fieldValue:e,key:n,optionValue:i})))}function bd({key:t,value:e,onChange:n,conditionType:o}){const i=vd({key:t,value:e,conditionType:o}),r=ud.array({key:`condition.${t}`,value:i});return r.action={change:n},r}const yd={sourceProperty:t=>{const e=t.get("source"),n=t.get("sourceProperty"),o=!!e.value,i=!!e.value.match(md);return Sd(i,n),!o},comparison:t=>{const e=t.get("source"),n=t.get("sourceProperty"),o=!!e.value,i=!!e.value.match(md);return!o||i||"value"!==n.value},assignment:t=>{const e=t.get("target"),n=t.get("targetProperty");return!!!e.value||n.value.startsWith("is")},targetProperty:t=>{const e=t.get("target"),n=t.get("targetProperty"),o=!!e.value.match(md);return Sd(o,n),i=e.value,!Ci.test(i);var i},target:t=>{const e=t.get("source"),n=t.get("sourceProperty");return!(!n||!!e?.value)||n&&"value"!==n?.value},value:t=>{const e=t.get("target"),n=t.get("targetProperty");return void 0!==n&&(!(!e||e.value)||(o=t.get("comparison"),!!o?.classList.contains(pd)||(n.value===Cd||n.value.startsWith("is"))));var o}},wd=t=>{for(const[e,n]of t){const o=!!yd[e]?.(t)||!1;n.classList.toggle(pd,o)}},Cd="isChecked",xd=t=>t.value.endsWith("Checked"),Sd=(t,e)=>{if(t&&xd(e))return null;const n=Array.from(e.querySelectorAll("option")),o=[];for(const i of n){const e=xd(i),n=t?!e:e;n&&o.push(i.value),i.classList.toggle("hidden-option",n)}o.includes(e.value)&&(e.value=t?Cd:n.find((t=>!xd(t)))?.value||e.value)};class Ed{constructor({conditionValues:t,conditionType:e,conditionCount:n,index:o},i){this.values=new Map(function(t,e=ir){return e.reduce(((e,n)=>(void 0!==t[n]&&e.push([n,t[n]]),e)),[])}(t)),this.conditionType=e,this.parent=i,this.baseAddress=`${i.address}.${e}`,this.fields=new Map,this.conditionCount=n,this.index=o,this.dom=this.generateDom()}setConditionIndex(t){this.index=t}get address(){return`${this.baseAddress}[${this.index}]`}destroy(){const t=du.getAddress(this.baseAddress);t.splice(this.index,1),du.setAddress(this.baseAddress,t),_c.slideUp(this.dom,Ri,(()=>{this.dom.remove()}))}label(){return this.index?null:{tag:"label",className:`condition-label ${this.conditionType}-condition-label`,content:o.get(`condition.type.${this.conditionType}`)}}generateDom(){const t=[];for(const[n,o]of this.values){const e=t=>this.onChangeCondition({key:n,target:t.target}),i={key:n,value:o,conditionType:this.conditionType,onChange:e},r=gd[n](i,this.values),s=r.dom||Gc.create(r);this.fields.set(n,r.dom?r:s),t.push(s)}const e={children:[this.label(),...t,...this.generateConditionTypeActionButtons()],className:`f-condition-row ${this.conditionType}-condition-row display-none`,action:{onRender:t=>{this.processUiState()}}};return Gc.create(e)}generateConditionTypeActionButtons(){const t=[],e="manage-condition-type",n=t=>`${t}-condition-type`,i=Gc.btnTemplate({title:o.get(`remove${this.conditionType}Condition`),className:[e,n("remove")],content:Gc.icon("minus"),action:{click:()=>this.destroy(),mouseover:t=>{this.dom.classList.add("to-remove")},mouseout:t=>{this.dom.classList.remove("to-remove")}}});t.push(i);const r=Gc.btnTemplate({title:o.get(`add${this.conditionType}Condition`),className:[e,n("add")],content:Gc.icon("plus"),action:{click:()=>{const t=this.parent.addConditionType(this.conditionType),e={changedProperty:null,dataPath:t.address,value:t.value,src:t.dom};this.updateDataDebounced(e)}}});return t.push(r),t}get value(){return Array.from(this.fields).reduce(((t,[e,n])=>(t[e]=n.value,t)),{})}processUiState(){wd(this.fields),this.dom.classList.remove("display-none")}updateDataDebounced=Ko((t=>{fu.formeoUpdated(t),du.setAddress(t.dataPath,t.value)}));onChangeCondition=({key:t,target:e})=>{const n={changedProperty:t,dataPath:this.address,value:this.value,src:e};wd(this.fields),this.updateDataDebounced(n)}}const _d=new Map([["attrs",({itemKey:t})=>t],["options",({itemKey:t,key:e})=>`${t}.${e}`]]),Od=(t,e)=>{if("select"===e.controlId){const n=e.editPanels.get("options"),[o,i]=t?gr:vr,r=n.data.map((({[o]:t,...e})=>({[i]:t,...e})));n.setData(r)}},Md=new Map([["attrs-multiple",t=>({change:({target:e})=>{"select"===t.field.controlId&&Od(e.checked,t.field)}})]]);class Ad{constructor({key:t,index:e,field:n,panel:o,data:i}){this.field=n,this.itemKey=t,this.itemIndex=e,this.panel=o,this.panelName=o.name,this.isDisabled=n.isDisabledProp(t,this.panelName),this.isHidden=this.isDisabled&&n.config.panels[this.panelName].hideDisabled,this.isLocked=n.isLockedProp(t,this.panelName),this.address=`${n.indexName}.${n.id}.${t}`,this.itemSlug=Er(t),this.conditionTypeWrap=new Map,void 0!==i&&void 0===this.field.get(this.itemKey)&&this.field.set(this.itemKey,i);const r=[`field-${this.itemSlug}`,"prop-wrap"];this.isHidden&&r.push("hidden-property"),this.dom=Gc.create({tag:"li",className:r,children:{className:"component-prop",children:[this.itemInputs(),this.itemControls]}})}get itemValues(){const t=this.field.get(this.itemKey);return t?.constructor===Object?Ac(Object.entries(t),gr,"0"):[[this.itemKey,t]]}findOrCreateConditionTypeWrap(t){let e=this.conditionTypeWrap.get(t);return e||(e=Gc.create({className:`type-conditions-wrap ${t}-conditions-wrap`}),this.conditionTypeWrap.set(t,e),e)}itemInputs(){const t=Gc.create({className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map((([t,e])=>"conditions"===this.panelName?this.generateConditionFields(t,e):this.itemInput(t,e)))});return this.inputs&&this.inputs.replaceWith(t),this.inputs=t,t}addConditionType=(t,e)=>{const n=this.findOrCreateConditionTypeWrap(t);let o=e;if(!o){const[e]=ur()[t],i=n.children.length;"if"===t&&(e.logical="||"),o={conditionValues:e,conditionCount:i,index:i}}const i=new Ed({conditionType:t,...o},this);return n.appendChild(i.dom),i};removeConditionType=(t,e)=>{const n=this.conditionTypeWrap.get(t),o=n.children[e];o.destroy(),n.removeChild(o.dom)};generateConditionFields=(t,e)=>(this.conditions=new Map,e.forEach(((n,o)=>{const i=this.addConditionType(t,{index:o,conditionCount:e.length,conditionValues:n});this.conditions.set(o,i)})),this.findOrCreateConditionTypeWrap(t));get itemControls(){if(this.isLocked){return{className:`${this.panelName}-prop-controls prop-controls`,content:[]}}const t={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{_c.slideUp(this.dom,Vi,(t=>{this.field.remove(this.itemKey),t.remove(),this.panel.updateProps()}))},mouseover:t=>{this.dom.classList.add("to-remove")},mouseout:t=>{this.dom.classList.remove("to-remove")}},content:Gc.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[t]}}itemInput(t,e){const n=Gc.childType(e)||"string",o=_d.get(this.panelName)?.({itemKey:this.itemKey,key:t})||this.itemKey,i=o.split(".").filter(Number.isNaN).join(".")||t,r=ud[n]({key:t,value:e}),s=`${this.field.shortId}-${Er(o).replace(/-\d+-(selected)/g,"-$1")}`,a={label:"options"!==this.panelName&&(dd(i)||Cr(i)),labelAfter:!1},l={name:"checkbox"===r.attrs.type?`${s}[]`:s};l.disabled=this.isDisabled,l.locked=this.isLocked;const c=Md.get(this.itemSlug)?.(this),d=function(t,e={}){const n={...t};for(const o in e)Object.hasOwn(e,o)&&(Object.hasOwn(n,o)?Array.isArray(n[o])?n[o].push(e[o]):n[o]=[n[o],e[o]]:n[o]=e[o]);return n}(hd[n](o,this.field),c||{}),u=Uo(ud[n]({key:t,value:e}),{action:d,attrs:l,config:a});return gr.includes(t)?{className:"f-addon",children:u}:u}}const Td={multiple:(t,e)=>{Od(!!t,e)}};class kd{constructor(t,e,n){this.type=Gc.childType(t),this.name=e,this.component=n,this.panelConfig=this.getPanelConfig(this.data)}get data(){const t=this.component.get(this.name);return"object"===this.type?Object.entries(t):t}getPanelConfig(t){return this.props=this.createProps(t),this.editButtons=this.createEditButtons(),{config:{label:o.get(`panel.label.${this.name}`)},attrs:{className:`${ci} ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(t=this.data){this.editPanelItems=Array.from(t).map(((t,e)=>{const n="array"===this.type,o=n?`[${e}]`:`.${t[0]}`,i=n?t:{[t[0]]:t[1]};return new Ad({key:`${this.name}${o}`,data:i,field:this.component,index:e,panel:this})}));const e={tag:"ul",attrs:{className:["edit-group",`${this.component.name}-edit-group`,`${this.component.name}-edit-${this.name}`]},editGroup:this.name,isSortable:"options"===this.name,content:this.editPanelItems};return Gc.create(e)}updateProps(){const t=this.createProps();this.props.replaceWith(t),this.props=t}createEditButtons(){const t=this.name,e=o.get(`panelEditButtons.${t}`),n={attrs:this.addAttribute,options:this.addOption,conditions:this.addCondition},i=[];if("conditions"===t){o.current&&!o.current.clearAll&&o.put("clearAll","Clear All");const e={...Gc.btnTemplate({content:[Gc.icon("bin"),o.get("clearAll")],title:o.get("clearAll")}),className:`clear-all-${t}`,action:{click:()=>{this.clearAllItems()}}};i.push(e)}const r={...Gc.btnTemplate({content:e,title:e}),className:`add-${t}`,action:{click:e=>{const i={btnCoords:Gc.coords(e.target),addAction:n[t]};"attrs"===t&&(i.isDisabled=this.component.isDisabledProp,i.isLocked=this.component.isLockedProp,i.message={attr:o.get(`action.add.${t}.attr`),value:o.get(`action.add.${t}.value`)});const r=Cr(t),s=new window.CustomEvent(`onAdd${r}`,{detail:i});yu.add[t](i),document.dispatchEvent(s)}}};i.push(r);return{className:"panel-action-buttons",content:i}}addAttribute=(t,e)=>{let n=e;const i=Nc(t),r=`attrs.${i}`;o.current[r]||o.put(r,Dc(t)),"string"==typeof n&&["true","false"].includes(n)&&(n=JSON.parse(n)),this.component.set(`attrs.${t}`,n),Td[i]?.(n,this.component);const s=this.props.querySelector(`.${this.component.name}-attrs-${i}`),a=new Ad({key:r,data:{[i]:n},field:this.component,panel:this});s?s.replaceWith(a.dom):this.props.appendChild(a.dom),this.component.resizePanelWrap()};addOption=()=>{const t=this.component.data.config.controlId,e=this.component.get("options"),n="select"===t?"option":t,i=o.get("newOptionLabel",{type:n})||"New Option",r=`${this.name}[${this.data.length}]`,s=e[e.length-1],a={...e.length?s:{},label:i};"button"!==t&&(a.value=xr(i));const l=new Ad({key:r,data:a,field:this.component,index:this.props.children.length,panel:this});this.editPanelItems.push(l),this.props.appendChild(l.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()};addCondition=t=>{const e=`conditions[${this.component.get("conditions").length}]`,n=new Ad({key:e,data:t.template,field:this.component,panel:this});this.props.appendChild(n.dom),this.component.set(e,t.template),this.component.resizePanelWrap()};clearAllItems=()=>{const t="array"===this.type?[]:{},e={type:this.name,removeAction:()=>{this.component.set(this.name,t),this.updateProps()}};yu.remove[this.name](e);const n=Cr(this.name),o=new window.CustomEvent(`onRemove${n}`,{detail:e});document.dispatchEvent(o)};setData(t){this.data=t,this.component.set(this.name,t),this.updateProps()}}const Ld=Object.freeze({type:"field",displayType:"slider"}),Nd=t=>({transform:`translateX(${t?`${t}px`:0})`});class Dd{constructor(t){this.opts=Uo(Ld,t),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const e=this.createPanelsWrap();this.nav=this.navActions(),this.nav.groupChange(this.activePanelIndex);const n=new window.ResizeObserver((([{contentRect:{width:t}}])=>{this.currentWidth!==t&&(this.toggleTabbedLayout(),this.currentWidth=t,this.nav.setTranslateX(this.activePanelIndex,!1))})),o=window.setTimeout((()=>{n.observe(e),window.clearTimeout(o)}),Fi)}getPanelDisplay(){const t=this.panelsWrap,e=Number.parseInt(Gc.getStyle(t,"width"),10)>390?"tabbed":"slider",n="auto"===this.opts.displayType;return this.panelDisplay=n?e:this.opts.displayType||Ld.displayType,this.panelDisplay}toggleTabbedLayout=()=>{this.getPanelDisplay();const t=this.isTabbed;return this.panelsWrap.parentElement?.classList.toggle("tabbed-panels",t),t&&this.panelNav.removeAttribute("style"),t};resizePanels=()=>{this.toggleTabbedLayout()};createPanelsWrap(){const t=Gc.create({className:"panels",content:this.opts.panels.map((({config:t,...e})=>e))});return"field"===this.opts.type&&this.sortableProperties(t),this.panelsWrap=t,this.panels=t.children,this.currentPanel=this.panels[this.activePanelIndex],t}sortableProperties(t){const e=t.getElementsByClassName("field-edit-group");return Pc.forEach(e,(t=>{t.fieldId=this.opts.id,t.isSortable&&ic.create(t,{animation:150,group:{name:`edit-${t.editGroup}`,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:t=>{this.propertySave(t.to),this.resizePanels()}})}))}createPanelNavLabels(){const t=this.opts.panels.map((t=>({tag:"h5",action:{click:t=>{const e=Mc(t.target);this.nav.setTranslateX(e,!1),this.nav.groupChange(e)}},content:t.config.label}))),e={className:"panel-labels",content:{content:t}},[n]=t;return n.className="active-tab",Gc.create(e)}createPanelNav(){this.labels=this.createPanelNavLabels();const t={tag:"button",attrs:{className:"next-group",title:o.get("controlGroups.nextGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.nextGroup(t)},content:Gc.icon("triangle-right")},e={tag:"button",attrs:{className:"prev-group",title:o.get("controlGroups.prevGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.prevGroup(t)},content:Gc.icon("triangle-left")};return Gc.create({tag:"nav",attrs:{className:"panel-nav"},content:[e,this.labels,t]})}get isTabbed(){return"tabbed"===this.panelDisplay}navActions(){const t={},e=this.currentPanel.parentElement,n=this.labels.firstChild,o=n.children,i=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Mc(this.currentPanel);let r={nav:0,panel:0},s={...r};t.groupChange=t=>(this.activePanelIndex=t,this.currentPanel=i[t],Gc.removeClasses(i,"active-panel"),Gc.removeClasses(o,"active-tab"),this.currentPanel.classList.add("active-panel"),o[t].classList.add("active-tab"),this.currentPanel);const a=({offset:t,reset:o,duration:i=Ri,animate:r=!this.isTabbed})=>{const a=[Nd(s.panel),Nd(t.panel)],l=[Nd(s.nav),Nd(this.isTabbed?0:t.nav)];if(o){const[t]=a,[e]=l;a.push(t),l.push(e)}const c={easing:"ease-in-out",duration:r?i:0,fill:"forwards"},d=e.animate(a,c);n.animate(l,c);const u=()=>{d.removeEventListener("finish",u),o||(s=t)};d.addEventListener("finish",u)};return t.setTranslateX=(t=this.activePanelIndex,o=!0)=>{var i;i=t,r={nav:-n.offsetWidth*i,panel:-e.offsetWidth*i},a({offset:r,animate:o})},t.refresh=(e=this.activePanelIndex)=>{this.activePanelIndex!==e&&t.groupChange(e),t.setTranslateX(this.activePanelIndex,!1),this.resizePanels()},t.nextGroup=()=>{const e=this.activePanelIndex+1;if(e!==i.length){const o=i[e];r={nav:-n.offsetWidth*e,panel:-o.offsetLeft},a({offset:r}),t.groupChange(e)}else r={nav:s.nav-8,panel:s.panel-8},a({offset:r,reset:!0});return this.currentPanel},t.prevGroup=()=>{if(0!==this.activePanelIndex){const e=this.activePanelIndex-1,o=i[e];r={nav:-n.offsetWidth*e,panel:-o.offsetLeft},a({offset:r}),t.groupChange(e)}else r={nav:8,panel:8},a({offset:r,reset:!0})},t}}let Pd=null;const zd=ls(ar);class jd extends wa{constructor(t,e={}){const n={...e,id:e.id||qo()};super(t,n),this.id=n.id,this.shortId=this.id.slice(0,this.id.indexOf("-")),this.name=t,this.indexName=`${t}s`,this.config=du[`${this.name}s`].config,Uo(this.config,n.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((([t,e])=>{this.addEventListener(t,e)}))}addEventListener(t,e){this.eventListeners.has(t)||this.eventListeners.set(t,[]),this.eventListeners.get(t).push(e)}removeEventListener(t,e){if(!this.eventListeners?.has(t))return;const n=this.eventListeners.get(t),o=n.indexOf(e);o>-1&&n.splice(o,1)}dispatchComponentEvent(t,e={}){const n={component:this,target:this,type:t,timestamp:Date.now(),...e};return this.eventListeners?.has(t)&&this.eventListeners.get(t).forEach((t=>{try{"function"==typeof t&&t(n)}catch(e){}})),n}set(t,e){const n=this.get(t),o=super.set(t,e);return n!==e&&this.dom&&this.dispatchComponentEvent("onUpdate",{path:t,oldValue:n,newValue:e}),o}get js(){return this.data}get json(){return this.data}remove=t=>{if(t){const e=Sr(t),n=e.pop(),o=this.get(e);return Array.isArray(o)?Oc(n)?o.splice(Number(n),1):this.set(e,o.filter((t=>t!==n))):delete o[n],o}if("stage"===this.name)return null;const e=this.parent,n=this.children;this.dispatchComponentEvent("onRemove",{path:t,parent:e,children:[...n]}),Tc(n,(t=>t.remove())),this.dom.parentElement.removeChild(this.dom),((t,e)=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})(du.getAddress(`${e.name}s.${e.id}.children`),this.id),e.children.length||e.emptyClass(),"row"===e.name&&e.autoColumnWidths();const o={row:Qi,column:tr,field:er}[this.name];return o&&fu.formeoUpdated({componentId:this.id,componentType:this.name,parent:e},o),du[`${this.name}s`].delete(this.id)};empty(){const t=this.children.map((t=>(t.remove(),t)));return this.dom.classList.add("empty"),t}emptyClass=()=>this.dom.classList.toggle("empty",!this.children.length);getActionButtons(){const t=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:()=>{du.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...t)},mouseleave:({target:e})=>{this.dom.classList.remove(...t),du.stages.active.dom.classList.remove(`active-hover-${this.name}`),e.removeAttribute("style")}},children:[{...Gc.btnTemplate({content:Gc.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}getComponentTag=()=>Gc.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[Gc.icon(`handle-${this.name}`),Cr(this.name)].filter(Boolean)});toggleEdit(t=!this.isEditing){this.isEditing=t;const e=this.dom,n="editing",o=`${n}-${this.name}`,i=this.dom.querySelector(`.${this.name}-edit`);_c.slideToggle(i,Vi,t),"field"===this.name&&(_c.slideToggle(this.preview,Vi,!t),e.parentElement.classList.toggle(`column-${o}`,t)),e.classList.toggle(n,t),e.classList.toggle(o,t)}get buttons(){if(this.actionButtons)return this.actionButtons;const t={handle:(t=`handle-${this.name}`)=>({...Gc.btnTemplate({content:Gc.icon(t)}),className:["component-handle"]}),move:(t="move")=>({...Gc.btnTemplate({content:Gc.icon(t)}),className:["item-move"],meta:{id:"move"}}),edit:(t="edit")=>({...Gc.btnTemplate({content:Gc.icon(t)}),className:["edit-toggle"],meta:{id:"edit"},action:{click:()=>{this.toggleEdit()}}}),remove:(t="remove")=>({...Gc.btnTemplate({content:Gc.icon(t)}),className:["item-remove"],meta:{id:"remove"},action:{click:()=>{_c.slideUp(this.dom,Vi,(()=>{if("column"===this.name){this.parent.autoColumnWidths(),this.remove()}else this.remove()}))}}}),clone:(t="copy")=>({...Gc.btnTemplate({content:Gc.icon(t)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),"column"===this.name&&this.parent.autoColumnWidths()}}})},{buttons:e,disabled:n}=this.config.actionButtons,o=e.filter((t=>!n.includes(t))).map((e=>t[e]?.()||e));return this.actionButtons=o,this.actionButtons}get index(){return Mc(this.dom)}removeClasses=t=>{const e={string:()=>this.dom.classList.remove(t),array:()=>t.map((t=>this.dom.classList.remove(t)))};return e.object=e.string,e[Gc.childType(t)](this.dom)};get parentType(){return ji.get(this.name)}get parent(){const t=this.parentType;if(!this.dom||!t)return null;const e=this.dom.closest(`.${Mi[t]}`);return e&&Gc.asComponent(e)}get children(){if(!this.dom)return[];const t=this.domChildren,e=Pi.get(this.name);return kc(t,(t=>du.getAddress(`${e}s.${t.id}`))).filter(Boolean)}loadChildren=(t=this.data.children)=>t.map((t=>this.addChild({id:t})));get domChildren(){const t=this.dom.querySelector(".children");return t?t.children:[]}addChild(t={},e=this.domChildren.length){let n=t;"object"!=typeof t&&(n={id:n});const o=this.dom.querySelector(".children"),{id:i=qo()}=n,r=Pi.get(this.name);if(!r)return null;const s=`${r}s`,a=du.getAddress(`${s}.${i}`)||du[s].add(i,n);e>=o.children.length?o.appendChild(a.dom):o.children[e].before(a.dom),this.dispatchComponentEvent("onAddChild",{parent:this,target:a,child:a,index:e}),a.dispatchComponentEvent("onAdd",{parent:this,target:a,index:e,addedVia:"addChild"}),this.config.events?.onAddChild?.({parent:this,child:a});const l=a.get("children");return l?.length&&a.loadChildren(l),this.removeClasses("empty"),this.saveChildOrder(),a}saveChildOrder=()=>{if(this.render)return;const t=this.children.map((({id:t})=>t));return this.set("children",t),t};onAdd({from:t,to:e,item:n,newIndex:o}){t.classList.contains(di)||(t=t.parentElement);const i=Bo(t),r=Bo(e.parentElement),s=new Map([[-2,()=>{const t=this.addChild({},o).addChild();return t.addChild.bind(t)}],[-1,()=>{const t=this.addChild({},o);return t.addChild.bind(t)}],[0,()=>this.addChild.bind(this)],[1,t=>{const e=Mc(this.dom);return()=>this.parent.addChild(t,e+1)}],[2,t=>()=>this.parent.parent.addChild(t)]]),a={controls:async()=>{if(!Pd){const{default:t}=await Promise.resolve().then((()=>Kd));Pd=t}const{controlData:{meta:{id:t},...e}}=Pd.get(n.id);as(e,"config.controlId",t);const i=t.startsWith("layout-")?t.replace(/^layout-/,""):"field",r=ss({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}.${i}`),a=s.get(r)();Gc.remove(n);return a(e,o)},row:()=>{const t=(s.get({stage:-1,row:0,column:1}[r])||Qo)();return t?.({id:n.id},o)},column:()=>{const t=(s.get({stage:-2,row:-1}[r])||Qo)();return t?.(n.id)}},l=a[i]?.(n,o);return this.dispatchComponentEvent("onAdd",{from:t,to:e,item:n,newIndex:o,fromType:i,toType:r,addedComponent:l,addedVia:"dragDrop"}),(()=>{this.saveChildOrder(),this.removeClasses("empty")})(),l}onSort=()=>this.saveChildOrder();onRemove({from:{parentElement:t}}){return t.classList.contains(pi)&&t.classList.remove("column-editing-field"),"stage"===this.name||this.children.length?(this.emptyClass(),this.saveChildOrder()):this.remove()}onEnd=({to:{parentElement:t},from:{parentElement:e}})=>{t?.classList.remove(`hovering-${Bo(t)}`),e?.classList.remove(`hovering-${Bo(e)}`)};onRender(){this.dispatchComponentEvent("onRender",{dom:this.dom});const{events:t}=this.config;if(!t)return null;t.onRender&&Gc.onRender(this.dom,t.onRender)}set config(t){const e=ss(t,"all"),n=ss(this.data,"config.controlId"),o=[e,n&&ss(t,n),ss(t,this.id)].reduce(((t,e)=>e?Uo(t,e):t),this.configVal);this.configVal=o}get config(){return this.configVal}runConditions=()=>{const t=this.get("conditions");if(!t?.length)return null;return t.map((t=>{const e=this.processConditions(t.if),n=this.processResults(t.then);return e.map((t=>this.evaluateConditions(t)&&this.execResults(n)))}))};getComponent(t){const[e,n]=t.split("."),o=du[e];return n===this.id?this:o?.get(n)}value=(t,e)=>{const n=t.split("."),o=this.getComponent(t),i=o&&n.slice(2,n.length).join(".");return[!o,!i,!zd[i]].some(Boolean)?t:e?o.set(zd[i],e):o.get(zd[i])};getResult=t=>({"=":(t,e,n)=>t.set(e,n)}[t]);processResults=t=>t.map((({operator:t,target:e,value:n})=>{const o=this.getComponent(e);return{target:o,propertyPath:o&&e.split(".").slice(2,e.length).join("."),action:this.getResult(t),value:this.value(n)}}));execResults=t=>{const e=t.map((t=>this.execResult(t)));return Promise.all(e)};execResult=({target:t,action:e,value:n,_propertyPath:o})=>new Promise(((o,i)=>{try{return o(e(t,n))}catch(r){return i(r)}}));cloneData=()=>{const t={...Go(this.data),id:qo()};return"field"!==this.name&&(t.children=[]),t};clone=(t=this.parent)=>{const e=t.addChild(this.cloneData(),this.index+1);return"field"!==this.name&&this.cloneChildren(e),this.dispatchComponentEvent("onClone",{original:this,clone:e,parent:t}),e};cloneChildren(t){for(const e of this.children)e?.clone(t)}createChildWrap=t=>Gc.create({tag:"ul",attrs:{className:"children"},children:t});get isRow(){return this.name===_i.row}get isColumn(){return this.name===_i.column}get isField(){return this.name===_i.field}isDisabledProp=(t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.disabled.concat(this.get("config.disabled")).includes(t)};isLockedProp=(t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.locked.concat(this.get("config.locked")).includes(t)};get editWindow(){const t={className:["component-edit",`${this.name}-edit`,"slide-toggle","formeo-panels-wrap"]},e=this.editPanels.size;return e&&(t.className.push(`panel-count-${e}`),t.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh),t.action={onRender:()=>{if(0===e){const t=this.dom.querySelector(".edit-toggle"),e=this.dom.querySelector(`.${this.name}-actions`),n=e.getElementsByTagName("button");e.style.maxWidth=n.length*n[0].clientWidth+"px",Gc.remove(t)}else this.resizePanelWrap()}},Gc.create(t)}updateEditPanels=()=>{if(!this.config)return null;const t=["object","array"],e=Wo([...this.config.panels.order,...Object.keys(this.data)]),n=["children","config","meta","action","events",...this.config.panels.disabled],o=e.filter((t=>!n.includes(t)));for(const r of o){const e=this.get(r),n=Gc.childType(e);if(t.includes(n)){const t=new kd(e,r,this);this.editPanels.set(t.name,t)}}const i={panels:Array.from(this.editPanels.values()).map((({panelConfig:t})=>t)),id:this.id,displayType:"auto"};this.panels=new Dd(i),this.dom&&(this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav),this.dom.querySelector(".panels").replaceWith(this.panels.panelsWrap))}}class $d{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(t){const e=t.querySelector(".children");if(!e)return 0;const n=e.children.length,o=Gc.getStyle(e,"gap")||"0px",i=parseFloat(o,10)||0;return this.totalGapWidth=i*(n-1),e.offsetWidth-this.totalGapWidth}validateResizeTarget(t,e){return t&&e&&t.offsetWidth&&e.offsetWidth}onStart(t){if(t.preventDefault(),this.resized=!1,0!==t.button)return;const e=t.target.parentElement,n=e.nextSibling||e.previousSibling,o=e.closest(`.${hi}`);if(this.validateResizeTarget(e,n))if(this.startX="touchstart"===t.type?t.touches[0].clientX:t.clientX,o.classList.add(vi),this.columnPreset=o.querySelector(`.${gi}`),this.originalColumnClass=e.className,this.originalSiblingClass=n.className,e.className=e.className.replace(pr,""),n.className=n.className.replace(pr,""),this.colStartWidth=e.offsetWidth,this.sibStartWidth=n.offsetWidth,this.rowWidth=this.getRowWidth(o),this.rowWidth<=0)this.cleanup();else{this.column=e,this.sibling=n,this.row=o;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(i){this.cleanup()}}else this.cleanup()}calculateNewWidths(t){const e=this.colStartWidth+t-this.startX,n=this.sibStartWidth-t+this.startX,o=parseFloat(Xo(e,this.rowWidth)),i=parseFloat(Xo(n,this.rowWidth));return o<10||i<10?null:{colWidth:Zo(o.toFixed(1)),siblingColWidth:Zo(i.toFixed(1))}}onMove(t){t.preventDefault();const{column:e,sibling:n}=this,o="touchmove"===t.type?t.touches[0].clientX:t.clientX,i=this.calculateNewWidths(o);if(!i)return;const{colWidth:r,siblingColWidth:s}=i;e.dataset.colWidth=r,n.dataset.colWidth=s,e.style.width=r,n.style.width=s,this.resized=!0}onStop(){const{column:t,sibling:e}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),du.setAddress(`columns.${t.id}.config.width`,t.dataset.colWidth),du.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),this.row.classList.remove(vi),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(vi),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const t=this.columnPreset;let e=t.querySelector(`.${fi}`);const n=this.row.querySelector(".children").children,o=kc(n,(t=>Xo(t.clientWidth,this.rowWidth).toFixed(1))),i=o.join(","),r=o.join(" | ");return e||(e=Gc.create({tag:"option",attrs:{className:fi,value:i,selected:!0},content:r}),t.append(e)),e.value=i,e.textContent=r,i}}const Hd=t=>({className:"resize-x-handle",action:{pointerdown:t.onStart.bind(t)},content:[Gc.icon("triangle-down"),Gc.icon("triangle-up")]}),Id=()=>({className:"column-edit group-config"});class Vd extends jd{constructor(t){super("column",{...Object.freeze({config:{width:"100%"},children:[],className:[pi]}),...t});const e=this.createChildWrap();this.dom=Gc.create({tag:"li",className:[pi,"empty"],dataset:{hoverTag:o.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),Id(),Hd(new $d),e]}),this.processConfig(),fu.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),ic.create(e,{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:`.${mi}`,handle:".item-move"})}processConfig(){const t=Pc.get(this.data,"config.width");t&&this.setDomWidth(t)}refreshFieldPanels=()=>{for(const t of this.children)t.panels.nav.refresh()};setDomWidth=t=>{this.dom.dataset.colWidth=t,this.dom.style.width=t};setWidth=t=>(this.setDomWidth(t),this.set("config.width",t))}const Rd={actionButtons:{buttons:["clone","move","remove"],disabled:[]}};const Fd=new class extends Ca{constructor(t){super("columns",t),this.config={all:Rd}}Component(t){return new Vd(t)}};class Bd extends jd{constructor(t){super("row",{...Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[hi]}),...t});const e=this.createChildWrap();this.dom=Gc.create({tag:"li",className:[hi,"empty"],dataset:{hoverTag:o.get("row"),editingHoverTag:o.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,e]}),ic.create(e,{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:`.${pi}`,handle:".item-move"})}get editWindow(){const t={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:o.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:t}})=>{this.set("config.fieldset",Boolean(t))}},config:{label:o.get("row.settings.fieldsetWrap")}},e={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:o.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:t}})=>this.set("config.inputGroup",t)},config:{label:o.get("row.makeInputGroup"),description:o.get("row.makeInputGroupDesc")}},n={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:t}})=>this.set("config.legend",t)},className:""}},i=Gc.formGroup([t,n]),r={tag:"label",content:o.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=Gc.create(this.columnPresetControlConfig);const s={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},a=[e,"hr",i,"hr",Gc.formGroup([r,s],"row")];return Gc.create({className:`${this.name}-edit group-config`,action:{onRender:t=>{const e=a.map((t=>Gc.create(t)));t.append(...e)}}})}onAdd(...t){super.onAdd(...t),this.autoColumnWidths()}onRemove(...t){super.onRemove(...t),this.autoColumnWidths()}autoColumnWidths=()=>{const t=this.children;if(!t.length)return;const e=Number.parseFloat((100/t.length).toFixed(1))/1;for(const n of t){n.removeClasses(pr);const t=n.dom,o=Zo(e);n.set("config.width",o),t.style.width=o,t.dataset.colWidth=o;const i=setTimeout((()=>{clearTimeout(i),n.refreshFieldPanels()}),Ri);document.dispatchEvent(fu.columnResized)}this.updateColumnPreset()};updateColumnPreset=()=>{this.columnPresetControl.innerHTML="";const t=this.getColumnPresetOptions.map((({label:t,...e})=>Gc.create({tag:"option",content:t,attrs:e})));this.columnPresetControl.append(...t)};setColumnWidths=t=>{"string"==typeof t&&(t=t.split(",")),this.children.forEach(((e,n)=>{e.setWidth(`${t[n]}%`),e.refreshFieldPanels()}))};get getColumnPresetOptions(){const t=this.children,e=$i.get(t.length-1)||[],n=t.map((t=>{const e=t.get("config.width")||"";return Number(e.replace("%","")).toFixed(1)})).join(",");if(e.length){const t=e.slice();return!t.find((t=>t.value===n))&&t.push({value:n,label:n.replace(/,/g," | "),className:fi}),t.map((t=>{const e={...t};return e.selected=t.value===n,e}))}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:o.get("defineColumnLayout"),className:gi},action:{change:({target:t})=>{const{value:e}=t;this.setColumnWidths(e)}},options:this.getColumnPresetOptions}}}const Wd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}};const qd=new class extends Ca{constructor(t){super("rows",t),this.config={all:Wd}}Component(t){return new Bd(t)}};class Ud extends jd{constructor(t){super("stage",{conditions:[ur()],children:[],...t}),this.updateEditPanels(),this.debouncedUpdateEditPanels=Ko(this.updateEditPanels),o.get("Untitled Form"),o.get("Untitled Form"),o.get("Form Title"),o.get("Form novalidate"),o.get("Tags");const e=this.createChildWrap();this.dom=Gc.create({attrs:{className:[ui,"empty"],id:this.id},children:[this.getComponentTag(),this.getActionButtons(),this.editWindow,e]}),ic.create(e,{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:()=>{Gd.active=this},onSort:this.onSort.bind(this),draggable:`.${hi}`,handle:".item-move"})}empty(t=!0){return new Promise((e=>{t?(this.dom.classList.add("removing-all-fields"),_c.slideUp(this.dom,Vi,(()=>{e(super.empty(t)),this.dom.classList.remove("removing-all-fields"),_c.slideDown(this.dom,Vi)}))):e(super.empty())}))}onAdd(...t){const e=super.onAdd(...t);"column"===e?.name&&e.parent.autoColumnWidths()}}const Gd=new class extends Ca{constructor(t){super("stages",t),this.config={all:{actionButtons:{buttons:["edit"],disabled:[]},panels:{disabled:[],order:["attrs","options","conditions"]}}}}Component(t){return new Ud(t)}};class Xd{controlCache=new Set;constructor({events:t={},dependencies:e={},controlAction:n,...o}){this.events=t,this.controlData=o,this.controlAction=n,this.dependencies=e,this.id=o.id||qo()}get controlId(){return this.controlData.meta?.id||this.controlData.config?.controlId}get dom(){const{meta:t,config:e}=this.controlData,n=this.i18n(e.label)||e.label,o={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:Gc.icon(t.icon)},{tag:"span",className:"control-label",content:n}],action:{focus:({target:t})=>{const e=t.closest(`.${di}`);return e&&Jd.panels.nav.refresh(Mc(e))},click:({target:t})=>{const e=t.closest(".field-control")?.id;e&&Jd.addElement(e)}}};return Gc.create({tag:"li",id:this.id,className:["field-control",`${t.group}-control`,`${t.id}-control`],content:o,meta:t,action:this.controlAction})}promise(){return Fc(this.dependencies)}i18n(t,e){const n=o.locale,i=this.definition?.i18n,r=i?.[n]||{};return(r[t]?.()??r[t])||o.get(t,e)}}const Zd=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"}});let Yd=class{constructor(){this.data=new Map,this.buttonActions={focus:({target:t})=>{const e=t.closest(`.${di}`);return e&&this.panels.nav.refresh(Mc(e))},click:({target:t})=>{this.addElement(t.parentElement.id)}}}async init(t,e=!1){return await this.applyOptions(t),this.buildDOM(e),this}registerControls(t){return this.controls=[],t.map((t=>{const e="function"==typeof t?new t:new Xd(t);return this.add(e),this.controls.push(e.dom),e.promise()}))}groupLabel=t=>o.get(t)||t||"";groupElements(){let t=this.options.groups.slice(),e=this.controls.slice(),n=[];const o=[];return t=Ac(t,this.groupOrder,"id"),t=t.filter((t=>Fo(t.id,this.options.disable.groups))),n=t.map((t=>{const n={tag:"ul",attrs:{className:[di,ci],id:`${t.id}-${di}`},config:{label:this.groupLabel(t.label)}};if(this.options.elementOrder[t.id]){const e=this.options.elementOrder[t.id],n=Wo(e.concat(t.elementOrder));t.elementOrder=n}return e=Ac(e,t.elementOrder,"meta.id"),n.content=e.filter((e=>{const{controlData:n}=this.get(e.id),i=n.meta.id||"";let r=!0;return r=[Fo(i,this.options.disable.elements),n.meta.group===t.id,!o.includes(i)].every((t=>!0===t)),r&&o.push(i),r})),n})),n}add(t=Object.create(null)){const e=Go(t);return this.data.set(e.id,e),e.controlData.meta.id&&this.data.set(e.controlData.meta.id,e.controlData),e}get(t){return Go(this.data.get(t))}formActions(){if(!0===this.options.disable.formActions)return null;const t={...Gc.btnTemplate({content:[Gc.icon("bin"),o.get("clear")],title:o.get("clearAll")}),className:["clear-form"],action:{click:t=>{qd.size?(fu.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:o.get("confirmClearAll"),clearAllAction:()=>{Gd.clearAll().then((()=>{const e={src:t.target};fu.formeoCleared(e)}))},btnCoords:Gc.coords(t.target)}}),document.dispatchEvent(fu.confirmClearAll)):window.alert(o.get("cannotClearFields"))}}},e={...Gc.btnTemplate({content:[Gc.icon("floppy-disk"),o.get("save")],title:o.get("save")}),className:["save-form"],action:{click:async({target:t})=>{const{default:e}=await Promise.resolve().then((()=>uu)),{formData:n}=e,o={action:()=>{},coords:Gc.coords(t),message:"",button:t};return yu.click.btn(o),yu.save.form(n)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:t,saveBtn:e}).reduce(((t,[e,n])=>(this.options.disable.formActions.includes(e)||t.push(n),t)),[])}}buildDOM(t){const e=this.groupElements(),n=this.formActions(),{displayType:i}=this.options.panels;this.panels=new Dd({panels:e,type:"controls",displayType:i});const r=["control-groups","formeo-panels-wrap",`panel-count-${e.length}`],s=Gc.create({className:r,content:[this.panels.panelNav,this.panels.panelsWrap]}),a=["formeo-controls"];t&&a.push("formeo-sticky");const l=Gc.create({className:a,content:[s,n]}),c=l.getElementsByClassName("control-group");this.dom=l,this.groups=c;const[d]=c;this.currentGroup=d,this.actions={filter:t=>{const e=""!==t,n=this.controls;let i=s.querySelector(".filtered-term");if(Gc.toggleElementsByStr(n,t),e){const e=o.get("controls.filteringTerm",t);l.classList.add("filtered"),i?i.textContent=e:(i=Gc.create({tag:"h5",className:"filtered-term",content:e}),s.insertBefore(i,s.firstChild))}else i&&(l.classList.remove("filtered"),i.remove())},addElement:this.addElement,addGroup:t=>{}};for(let o=c.length-1;o>=0;o--){const t=`formeo-controls-${c[o]}`;this.options.sortable||globalThis.localStorage.removeItem(t),ic.create(c[o],{animation:150,fallbackClass:"control-moving",fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,group:{name:"controls",pull:"clone",put:!1,revertClone:!0},onClone:({clone:t,item:e})=>{if(t.id=e.id,this.options.ghostPreview){const{controlData:n}=this.get(e.id);Promise.resolve().then((()=>nu)).then((({default:e})=>{t.innerHTML="",t.appendChild(new e(n).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 e=globalThis.localStorage.getItem(t);return e?e.split("|"):[]},set:e=>{const n=e.toArray();globalThis.localStorage.setItem(t,n.join("|"))}}})}return l}layoutTypes={row:()=>Gd.active.addChild(),column:()=>this.layoutTypes.row().addChild(),field:t=>this.layoutTypes.column().addChild(t)};addElement=t=>{const{meta:{group:e,id:n},...o}=ss(this.get(t),"controlData");return as(o,"config.controlId",n),"layout"===e?this.layoutTypes[n.replace("layout-","")]():this.layoutTypes.field(o)};applyOptions=async(t={})=>{const{container:e,elements:n,groupOrder:o,...i}=Uo(Zd,t);this.container=e,this.groupOrder=Wo(o.concat(["common","html","layout"])),this.options=i;const[r,s,a]=await Promise.all([Promise.resolve().then((()=>Vu)),Promise.resolve().then((()=>Wu)),Promise.resolve().then((()=>Xu))]),l=[r.default,s.default,a.default].flat();return Promise.all(this.registerControls([...l,...n]))}};const Jd=new Yd,Kd=Object.freeze(Object.defineProperty({__proto__:null,Controls:Yd,default:Jd},Symbol.toStringTag,{value:"Module"})),Qd=new Set(["checkbox","radio"]),tu=new Set(["radio","checkbox","select-one","select-multiple"]);class eu extends jd{constructor(t=Object.create(null)){super("field",{...t}),this.debouncedUpdateEditPanels=Ko(this.updateEditPanels),this.debouncedUpdatePreview=Ko(this.updatePreview),this.label=Gc.create(this.labelConfig),this.preview=this.fieldPreview(),this.controlId=this.get("config.controlId")||this.get("meta.id");const e=this.getActionButtons(),n=this.actionButtons.some((t=>"edit"===t.meta?.id));this.updateEditPanels();const i=Gc.create({tag:"li",attrs:{className:mi},id:this.id,children:[this.label,this.getComponentTag(),e,n&&this.editWindow,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:o.get("field")}});this.dom=i,this.isEditing=!1}get labelConfig(){if(!!this.get("config.hideLabel"))return null;const t=this.get("config.editorLabel")||this.get("config.label"),e=this.get("attrs.required"),n=this.config.label.disableHTML;return{className:"prev-label",children:[{...(()=>{const e={tag:"label",attrs:{}};return n?(e.tag="input",e.attrs.value=t,e):(e.attrs.contenteditable=!0,e.children=t,e)})(),action:{input:({target:{innerHTML:t,innerText:e}})=>{super.set("config.label",n?e:t)}}},e&&Gc.requiredMark()]}}setData=(t,e)=>super.set(t,e);set(t,e){const n=this.setData(t,e);return this.debouncedUpdatePreview(),n}updateLabel(){if(!this.label)return null;const t=Gc.create(this.labelConfig);this.label.replaceWith(t),this.label=t}updatePreview=()=>{this.updateLabel();const t=this.fieldPreview();this.preview.replaceWith(t),this.preview=t};get defaultPreviewActions(){return{change:t=>{const{target:e}=t,{type:n}=e;if(tu.has(n)){const t=this.preview.querySelectorAll(":checked"),e=this.get("options"),n=void 0!==e?.[0]?.selected?"selected":"checked",o=e.reduce(((t,e)=>(t[e.value]=e,t[e.value][n]=!1,t)),{});for(const i of t)o[i.value][n]=i.value===o[i.value].value;return super.set("options",Object.values(o)),this.debouncedUpdateEditPanels()}},click:t=>{"true"===t.target.contentEditable&&t.preventDefault()},input:({target:t})=>{if(["input","meter","progress","button"].includes(t.tagName.toLowerCase()))return super.set("attrs.value",t.value),this.debouncedUpdateEditPanels();if(t.contentEditable&&!t.type?.startsWith("select-")){const e=t.parentElement.classList;if(e.contains("f-checkbox")||e.contains("f-radio")){const e=t.parentElement,n=Mc(e);return this.setData(`options[${n}].label`,t.innerHTML),this.debouncedUpdateEditPanels()}this.setData("content",t.innerHTML||t.value)}}}}fieldPreview(){const{action:t={},...e}=Go(this.data);e.id=`prev-${this.id}`,e.action=Object.entries(t).reduce(((t,[e,n])=>(t[e]=n.bind(this),t)),{}),this.data?.config.editableContent&&(e.attrs={...e.attrs,contenteditable:!0});const n={attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:Gc.create(e,!0),action:this.defaultPreviewActions};return Gc.create(n,!0)}get isCheckable(){return Qd.has(this.get("config.controlId"))}}const nu=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"}));const ou=new class extends Ca{constructor(t){super("fields",t),this.config={all:{actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}}}}Component(t){return new eu(t)}get=t=>{let e=t&&ss(this.data,t);if(!e){const n=Jd.get(t);n&&(e=this.add(null,n.controlData))}return e};getData=()=>Object.entries(this.data).reduce(((t,[e,n])=>{const{conditions:o,...i}=n?.getData()||n;if(o?.length){let t=!0;if(1===o.length){const[e]=o;t=Boolean(e.if[0].source)}t&&(i.conditions=o)}return t[e]=i,t}),{});load=(t=Object.create(null))=>{const e=ei(t);this.empty();for(const[n,o]of Object.entries(e)){const{meta:t,...e}=o;t?.id&&as(e,"config.controlId",t?.id),this.add(n,e)}return this.data}},iu=Gd,ru=qd,su=Fd,au=ou,lu=Jd;class cu extends wa{constructor(){super("components"),this.disableEvents=!0,this.stages=iu,this.rows=ru,this.columns=su,this.fields=au,this.controls=lu}load=(t,e)=>{this.empty();const n=((t,e=!1)=>t?Go(ei(t)):e&&Yo.get(Hi)||fr())(t,e.sessionStorage);this.opts=e,this.set("id",n.id),this.add("stages",iu.load(n.stages)),this.add("rows",ru.load(n.rows)),this.add("columns",su.load(n.columns)),this.add("fields",au.load(n.fields));for(const o of Object.values(this.get("stages")))o.loadChildren();return this.data};flatList(){const t={};for(const e of Object.keys(this.data.stages))oi(this.data,e,"stages",t);return t}getChildData=({type:t,id:e})=>{const n=this.get(t,e);if(n)return n.getData()};get json(){return window.JSON.stringify({$schema:`https://cdn.jsdelivr.net/npm/formeo@${ri}/dist/formData_schema.json`,...this.formData})}get formData(){return{id:this.get("id"),stages:Gd.getData(),rows:qd.getData(),columns:Fd.getData(),fields:ou.getData()}}set config(t){const{stages:e,rows:n,columns:o,fields:i}=t;iu.config=e,ru.config=n,su.config=o,au.config=i}getIndex(t){return this[t]||this[Ei.get(t)]}setAddress(t,e){if(!Jo(t))return;const[n,o,...i]=Array.isArray(t)?t:Sr(t),r=this.getIndex(n).get(o);return r?.set(i,e),r}getAddress(t){if(!Jo(t))return;const[e,n,...o]=Array.isArray(t)?t:Sr(t),i=this.getIndex(e).get(n);return!o.length||i?o.length?i.get(o):i:void 0}}const du=new cu,uu=Object.freeze(Object.defineProperty({__proto__:null,Columns:su,Components:cu,Controls:lu,Fields:au,Rows:ru,Stages:iu,default:du},Symbol.toStringTag,{value:"Module"})),hu="no-transition",pu={debug:!1,bubbles:!0,formeoLoaded:t=>{},onAdd:()=>{},onChange:t=>fu.opts?.debug&&void 0,onUpdate:t=>fu.opts?.debug&&void 0,onUpdateStage:t=>fu.opts?.debug&&void 0,onUpdateRow:t=>fu.opts?.debug&&void 0,onUpdateColumn:t=>fu.opts?.debug&&void 0,onUpdateField:t=>fu.opts?.debug&&void 0,onAddRow:t=>fu.opts?.debug&&void 0,onAddColumn:t=>fu.opts?.debug&&void 0,onAddField:t=>fu.opts?.debug&&void 0,onRemoveRow:t=>fu.opts?.debug&&void 0,onRemoveColumn:t=>fu.opts?.debug&&void 0,onRemoveField:t=>fu.opts?.debug&&void 0,onRender:t=>fu.opts?.debug&&void 0,onSave:t=>{},confirmClearAll:t=>{window.confirm(t.confirmationMessage)&&t.clearAllAction(t)}},mu=({src:t,...e},n=Wi)=>{const o=new window.CustomEvent(n,{detail:e,bubbles:fu.opts?.debug||fu.opts?.bubbles});if(o.data=(t||document).dispatchEvent(o),n===Wi){const n=new window.CustomEvent("formeoChanged",{detail:e,bubbles:fu.opts?.debug||fu.opts?.bubbles});(t||document).dispatchEvent(n)}return o},fu={init:function(t){return this.opts={...pu,...t},this},formeoSaved:t=>mu(t,Bi),formeoUpdated:(t,e)=>mu(t,e||Wi),formeoCleared:t=>mu(t,"formeoCleared"),formeoOnRender:t=>mu(t,Zi),formeoConditionUpdated:t=>mu(t,"formeoConditionUpdated"),formeoAddedRow:t=>mu(t,Yi),formeoAddedColumn:t=>mu(t,Ji),formeoAddedField:t=>mu(t,Ki),formeoRemovedRow:t=>mu(t,Qi),formeoRemovedColumn:t=>mu(t,tr),formeoRemovedField:t=>mu(t,er)},gu=function(t,e=Fi){let n=0;return function(...o){const i=Date.now();i-n>=e&&(n=i,t.apply(this,o))}}((()=>{const t={timeStamp:window.performance.now(),type:Wi,detail:du.formData};fu.opts.onUpdate(t),fu.opts.onChange!==fu.opts.onUpdate&&fu.opts.onChange(t)}),Ri);let vu;document.addEventListener(Wi,gu),document.addEventListener(qi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onUpdate(i),fu.opts.onUpdateStage(i)})),document.addEventListener(Ui,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onUpdate(i),fu.opts.onUpdateRow(i)})),document.addEventListener(Gi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onUpdate(i),fu.opts.onUpdateColumn(i)})),document.addEventListener(Xi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onUpdate(i),fu.opts.onUpdateField(i)})),document.addEventListener(Yi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onAddRow(i)})),document.addEventListener(Ji,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onAddColumn(i)})),document.addEventListener(Ki,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onAddField(i)})),document.addEventListener(Qi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onRemoveRow(i)})),document.addEventListener(tr,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onRemoveColumn(i)})),document.addEventListener(er,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};fu.opts.onRemoveField(i)})),document.addEventListener(Zi,(t=>{const{timeStamp:e,type:n,detail:o}=t;fu.opts.onRender({timeStamp:e,type:n,detail:o})})),document.addEventListener("confirmClearAll",(t=>{t={timeStamp:t.timeStamp,type:t.type,confirmationMessage:t.detail.confirmationMessage,clearAllAction:t.detail.clearAllAction,btnCoords:t.detail.btnCoords},fu.opts.confirmClearAll(t)})),document.addEventListener(Bi,(({timeStamp:t,type:e,detail:{formData:n}})=>{const o={timeStamp:t,type:e,formData:n};fu.opts.onSave(o)})),document.addEventListener("formeoLoaded",(t=>{fu.opts.formeoLoaded(t.detail.formeo)})),window.addEventListener("resize",(function(){vu=vu||window.requestAnimationFrame((()=>{vu=!1;for(const t of Object.values(su.data))t.dom.classList.add(hu),lu.dom.classList.add(hu),lu.panels.nav.refresh(),t.refreshFieldPanels()}))}));const bu={add:{attr:t=>{const e=window.prompt(t.message.attr);if(e&&t.isDisabled(e))return window.alert(o.get("attributeNotPermitted",e||"")),yu.add.attrs(t);let n;e&&(n=String(window.prompt(t.message.value,"")),t.addAction(e,n))},option:t=>{t.addAction()},condition:t=>{t.addAction(t)}},remove:{attrs:t=>{t.removeAction()},options:t=>{t.removeAction()},conditions:t=>{t.removeAction()}},click:{btn:t=>{t.action()}},save:{form:Qo}},yu={init:function(t){const e=Object.keys(bu);return this.opts=e.reduce(((e,n)=>(e[n]={...bu[n],...t[n]},e)),t),this},add:{attrs:t=>yu.opts.add.attr(t),options:t=>yu.opts.add.option(t),conditions:t=>(t.template=t.template||ur(),yu.opts.add.condition(t))},remove:{attrs:t=>yu.opts.remove.attrs(t),options:t=>yu.opts.remove.options(t),conditions:t=>yu.opts.remove.conditions(t)},click:{btn:t=>yu.opts.click.btn(t)},save:{form:t=>(yu.opts.sessionStorage&&Yo.set(Hi,t),fu.formeoSaved({formData:t}),yu.opts.save.form(t))}},wu={"en-US":"English",dir:"ltr","af-ZA":"Afrikaans (South Africa)","ar-TN":"Arabic (Tunisia)","cs-CZ":"Czech (Czechia)","de-DE":"German (Germany)","es-ES":"European Spanish","fa-IR":"Persian (Iran)","fi-FI":"Finnish (Finland)","fr-FR":"French (France)","hu-HU":"Hungarian (Hungary)","it-IT":"Italian (Italy)","ja-JP":"Japanese (Japan)","nb-NO":"Norwegian Bokmål (Norway)","pl-PL":"Polish (Poland)","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","ro-RO":"Romanian (Romania)","ru-RU":"Russian (Russia)","th-TH":"Thai (Thailand)","tr-TR":"Turkish (Türkiye)","zh-CN":"Chinese (China)","zh-HK":"Chinese (Hong Kong SAR China)","action.add.attrs.attr":"What attribute would you like to add?","action.add.attrs.value":"Default Value",addOption:"Add Option",allFieldsRemoved:"All fields were removed.",allowSelect:"Allow Select",and:"and",attribute:"Attribute",attributeNotPermitted:'Attribute "{attribute}" is not permitted, please choose another.',attributes:"Attributes","attrs.class":"Class","attrs.className":"Class","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Required","attrs.style":"Style","attrs.title":"Title","attrs.type":"Type","attrs.value":"Value",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",cannotClearFields:"There are no fields to clear",checkbox:"Checkbox",checkboxes:"Checkboxes",class:"Class",clear:"Clear",clearAllMessage:"Are you sure you want to clear all fields?",close:"Close",column:"Column","condition.target.placeholder":"target","condition.type.and":"And","condition.type.if":"If","condition.type.or":"Or","condition.type.then":"Then","condition.value.placeholder":"value",confirmClearAll:"Are you sure you want to remove all fields?",content:"Content",control:"Control","controlGroups.nextGroup":"Next Group","controlGroups.prevGroup":"Previous Group","controls.filteringTerm":'Filtering "{term}"',"controls.form.button":"Button","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Date","controls.form.input.email":"Email","controls.form.input.file":"File Upload","controls.form.input.hidden":"Hidden Input","controls.form.input.number":"Number","controls.form.input.text":"Text Input","controls.form.radio-group":"Radio Group","controls.form.select":"Select","controls.form.textarea":"TextArea","controls.groups.form":"Form Fields","controls.groups.html":"HTML Elements","controls.groups.layout":"Layout","controls.html.divider":"Divider","controls.html.header":"Header","controls.html.paragraph":"Paragraph","controls.layout.column":"Column","controls.layout.row":"Row",copy:"Copy To Clipboard",danger:"Danger",defineColumnLayout:"Define a column layout",defineColumnWidths:"Define column widths",description:"Help Text",descriptionField:"Description","editing.row":"Editing Row",editorTitle:"Form Elements",field:"Field","field.property.invalid":"not valid","field.property.isChecked":"is checked","field.property.isNotVisible":"is not visible","field.property.isVisible":"is visible","field.property.label":"label","field.property.valid":"valid","field.property.value":"value",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to get started.",group:"Group",grouped:"Grouped",hidden:"Hidden Input",hide:"Edit",htmlElements:"HTML Elements",if:"If","if.condition.source.placeholder":"source","if.condition.target.placeholder":"target / value",info:"Info","input.date":"Date","input.text":"Text",label:"Label",labelCount:"{label} {count}",labelEmpty:"Field Label cannot be empty","lang.af":"Afrikaans","lang.ar":"Arabic","lang.cs":"Czech","lang.de":"German","lang.en":"English","lang.es":"Spanish","lang.fa":"Persian","lang.fi":"Finnish","lang.fr":"French","lang.hu":"Hungarian","lang.it":"Italian","lang.ja":"Japanese","lang.nb":"Norwegian Bokmål","lang.pl":"Polish","lang.pt":"Portuguese","lang.ro":"Romanian","lang.ru":"Russian","lang.th":"Thai","lang.tr":"Turkish","lang.zh":"Chinese",layout:"Layout",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length","meta.group":"Group","meta.icon":"Ico","meta.label":"Label",minOptionMessage:"This field requires a minimum of 2 options",name:"Name",newOptionLabel:"New {type}",no:"No",number:"Number",off:"Off",on:"On","operator.contains":"contains","operator.equals":"equals","operator.notContains":"not contains","operator.notEquals":"not equal","operator.notVisible":"not visible","operator.visible":"visible",option:"Option",optional:"optional",optionEmpty:"Option value required",optionLabel:"Option {count}",options:"Options",or:"or",order:"Order","panel.label.attrs":"Attributes","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribute","panelEditButtons.conditions":"+ Condition","panelEditButtons.options":"+ Option",placeholder:"Placeholder","placeholder.className":"space separated classes","placeholder.email":"Enter you email","placeholder.label":"Label","placeholder.password":"Enter your password","placeholder.placeholder":"Placeholder","placeholder.text":"Enter some Text","placeholder.textarea":"Enter a lot of text","placeholder.value":"Value",preview:"Preview",primary:"Primary",remove:"Remove",removeMessage:"Remove Element",removeType:"Remove {type}",required:"Required",reset:"Reset",richText:"Rich Text Editor",roles:"Access",row:"Row","row.makeInputGroup":"Make this row an input group.","row.makeInputGroupDesc":"Input Groups enable users to add sets of inputs at a time.","row.settings.fieldsetWrap":"Wrap row in a <fieldset> tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Save",secondary:"Secondary",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",selectOptions:"Options",separator:"Separator",settings:"Settings",size:"Size",sizes:"Sizes","sizes.lg":"Large","sizes.m":"Default","sizes.sm":"Small","sizes.xs":"Extra Small",style:"Style",styles:"Styles","styles.btn":"Button Style","styles.btn.danger":"Danger","styles.btn.default":"Default","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",success:"Success",text:"Text Field",then:"Then","then.condition.target.placeholder":"target",toggle:"Toggle",ungrouped:"Un-Grouped",warning:"Warning",yes:"Yes"},Cu="en-US";o.addLanguage(Cu,wu),o.setCurrent(Cu);const xu={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,svgSprite:null,style:ai,iconFont:null,config:{},events:{},actions:{},controls:{},i18n:{location:"https://draggable.github.io/formeo/assets/lang/"},onLoad:()=>{}}}};new c;let Su=class{constructor({formData:t,...e},n){const o=Uo(xu.editor,e),{actions:i,events:r,debug:s,config:a,editorContainer:l,...c}=o;l&&(this.editorContainer="string"==typeof l?document.querySelector(l):l),this.opts=c,Gc.setOptions=c,du.config=a,this.userFormData=n||t,this.Components=du,this.dom=Gc,fu.init({debug:s,...r}),yu.init({debug:s,sessionStorage:c.sessionStorage,...i}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",this.loadResources.bind(this)):this.loadResources()}get formData(){return this.Components.formData}set formData(t={}){this.userFormData=ni(t),this.load(this.userFormData,this.opts)}loadData(t={}){this.formData=t}get json(){return this.Components.json}clear(){this.userFormData=fr(),this.Components.load(this.userFormData,this.opts),this.render()}async loadResources(){document.removeEventListener("DOMContentLoaded",this.loadResources);const t=[];t.push((async(t=null)=>{if(zc.formeoSprite)return zc.formeoSprite;if(!t)return Vc('<?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 viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="auprefix__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="awprefix__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="awprefix__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="awprefix__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="beprefix__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="beprefix__g7209"><path id="beprefix__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="bfprefix__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="bgprefix__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="bhprefix__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="biprefix__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="bnprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>');const e=async t=>Vc(await t.text());return jc(t,e,(()=>jc(si,e)))})(this.opts.svgSprite),(async t=>{if(!zc.css.has(t)&&(await Ic(t),!zc.css.has(li)))return await Ic(li)})(this.opts.style),o.init({...this.opts.i18n,locale:globalThis.sessionStorage?.getItem(Ii)})),await Promise.all(t),this.opts.allowEdit&&this.init()}init(){return Jd.init(this.opts.controls,this.opts.stickyControls).then((t=>{this.controls=t,this.load(this.userFormData,this.opts),this.formId=du.get("id"),this.i18n={setLang:t=>{window.sessionStorage?.setItem(Ii,t);o.setCurrent(t).then((()=>{this.init()}),console.error)}},this.opts.onLoad?.(this)}))}load(t=this.userFormData,e=this.opts){this.Components.load(t,e),this.render()}render(){if(!this.controls)return window.requestAnimationFrame((()=>this.render()));if(this.stages=Object.values(du.get("stages")),this.opts.controlOnLeft)for(const e of this.stages)e.dom.style.order=1;const t={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map((({dom:t})=>t))]};o.current.dir&&(t.attrs.dir=o.current.dir,Gc.dir=o.current.dir),this.editor=Gc.create(t);(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(Gc.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),fu.formeoLoaded=new globalThis.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(fu.formeoLoaded)}};const Eu="f-",_u=t=>"string"==typeof t?document.querySelector(t):t,Ou=t=>{const e=t.match(hr);return e?.[0]||t},Mu=t=>{if(!t)return!1;if(t.hasAttribute("hidden")||t.parentElement.hasAttribute("hidden"))return!1;const e=window.getComputedStyle(t);return!("none"===e.display||"hidden"===e.visibility||"0"===e.opacity)},Au={isChecked:t=>t.checked,isNotChecked:t=>!t.checked,value:t=>t.value,isVisible:t=>Mu(t),isNotVisible:t=>!Mu(t)},Tu={equals:ba,notEquals:(t,e)=>!ba(t,e),contains:(t,e)=>t.includes(e),notContains:(t,e)=>!t.includes(e)},ku=Object.entries(nr).reduce(((t,[e,n])=>(t[n]=Tu[e],t[e]=Tu[e],t)),{}),Lu={equals:(t,{targetProperty:e,value:n})=>{t[`_${e}`]=t[e],t[e]=n}},Nu=Object.entries(or).reduce(((t,[e,n])=>(t[n]=Lu[e],t[e]=Lu[e],t)),{}),Du={isChecked:t=>{t.checked=!0},isNotChecked:t=>{t.checked=!1},value:(t,{assignment:e,...n})=>{const o=Nu[e]?.(t,n),i=new Event("input",{bubbles:!0});return t.dispatchEvent(i),o},isNotVisible:t=>{void 0===t?._required&&(t._required=t.required),t.parentElement.setAttribute("hidden",!0),t.required=!1},isVisible:t=>{t.parentElement.removeAttribute("hidden"),t.required=t._required}};let Pu=class{constructor(t,e){const{renderContainer:n,elements:o,formData:i,config:r}=(({editorContainer:t,renderContainer:e,formData:n,...o})=>({elements:{},...o,renderContainer:_u(e),editorContainer:_u(t),formData:ni(n)}))(t);this.container=n,this.form=ni(e||i),this.elements=o,this.config=r,this.components=Object.create(null),this.dom=Gc}get formData(){return this.form}set formData(t){this.form=ni(t)}get userData(){const t=this.container.querySelector(".formeo-render")||this.renderedForm;if(!t)return{};const e=new FormData(t),n={};for(const[o,i]of e.entries())n[o]?Array.isArray(n[o])?n[o].push(i):n[o]=[n[o],i]:n[o]=i;return n}get userFormData(){const t=[];for(const[e,n]of Object.entries(this.userData)){const o={key:e,value:n,label:this.components[Ou(e)]?.config?.label||""};t.push(o)}return t}set userData(t={}){const e=this.container.querySelector("form");for(const n of Object.keys(t)){const o=e.elements[n];if(o.length&&"checkbox"===o[0].type){const e=Array.isArray(t[n])?t[n]:[t[n]];for(const t of o)t.checked=e.includes(t.value)}else if(o.length&&"radio"===o[0].type)for(const e of o)e.checked=e.value===t[n];else o.type&&(o.value=t[n])}}render(t=this.form){this.form=ni(t);const e=this.getRenderedForm(t),n=this.container.querySelector(".formeo-render");n?n.replaceWith(e):this.container.appendChild(e)}getRenderedForm(t=this.form){this.form=ni(t);const e=document.getElementsByClassName("formeo-render").length,n={...this.config,tag:"form",id:this.form.id,className:`formeo-render formeo formeo-rendered-${e}`,children:this.processedData};return this.renderedForm=Gc.render(n),this.applyConditions(),this.renderedForm}get html(){return(this.renderedForm||this.getRenderedForm()).outerHTML}orderChildren=(t,e)=>e.reduce(((e,n)=>(e.push(this.form[t][n]),e)),[]);prefixId=t=>Eu+t;processColumn=({id:t,...e})=>({...e,id:this.prefixId(t),children:this.processFields(e.children),style:`width: ${e.config.width||"100%"}`});processRows=t=>this.orderChildren("rows",this.form.stages[t].children).reduce(((t,e)=>(e&&t.push(this.processRow(e)),t)),[]);cacheComponent=t=>(this.components[Ou(t.id)]=t,t);processRow=(t,e="row")=>{const{config:n,id:o}=t,i=[`formeo-${e}-wrap`],r={...t,children:this.processColumns(t.id),id:this.prefixId(o)};this.cacheComponent(r);const s=[{condition:n.legend,result:()=>({tag:n.fieldset?"legend":"h3",children:n.legend})},{condition:!0,result:()=>r},{condition:n.inputGroup,result:()=>this.addButton(o)}].reduce(((t,{condition:e,result:n})=>(e&&t.push(n()),t)),[]);return n.inputGroup&&i.push(`${Eu}input-group-wrap`),{tag:n.fieldset?"fieldset":"div",className:i,children:s}};cloneComponentData=t=>{const{children:e=[],id:n,attrs:o={},...i}=this.components[t],r={...o,"data-clone-of":n};return"input"===i.tag&&(r.name=Uc(this.components[t])),{...i,id:Eu+qo(n),children:e?.length&&e.map((({id:t})=>this.cloneComponentData(Ou(t)))),attrs:r}};addButton=t=>({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:e=>{const n=e.target.parentElement,o=Gc.create(this.cloneComponentData(t));n.insertBefore(o,n.lastChild);const i=Gc.create(Gc.btnTemplate({className:"remove-input-group",children:Gc.icon("remove"),action:{mouseover:({target:t})=>t.parentElement.classList.add("will-remove"),mouseleave:({target:t})=>t.parentElement.classList.remove("will-remove"),click:({target:t})=>t.parentElement.remove()}}));o.appendChild(i)}}});processColumns=t=>this.orderChildren("columns",this.form.rows[t].children).map((t=>this.cacheComponent(this.processColumn(t))));processFields=t=>this.orderChildren("fields",t).map((({id:t,...e})=>{const n=e.config?.controlId||e.meta?.id,{action:o={},dependencies:i={}}=this.elements[n]||{};i&&Fc(i);const r=Uo({action:o},e);return this.cacheComponent({...r,id:this.prefixId(t)})}));get processedData(){return Object.values(this.form.stages).map((t=>(t.children=this.processRows(t.id),t.className=ui,this.components[Ou(t.id)]=t,t)))}handleComponentCondition=(t,e,n)=>{if(t.length){for(const o of t)this.handleComponentCondition(o,e,n);return}const o=ju(t);o&&t.addEventListener(o,(t=>{if(this.evaluateCondition(e,t))for(const e of n)this.execResult(e,t)}),!1);const i={target:t};if(this.evaluateCondition(e,i))for(const r of n)this.execResult(r,i)};applyConditions=()=>{for(const{conditions:t}of Object.values(this.components))if(t)for(const e of t){const{if:t,then:n}=e;for(const e of t){const{source:t,target:o}=e;if(Jo(t)){const{component:o,options:i}=this.getComponent(t),r=i||o;this.handleComponentCondition(r,e,n)}if(Jo(o)){const{component:t,options:i}=this.getComponent(o),r=i||t;this.handleComponentCondition(r,e,n)}}}};evaluateCondition=({source:t,sourceProperty:e,targetProperty:n,comparison:o,target:i})=>{const r=this.getComponentProperty(t,e);if("boolean"==typeof r)return r;const s=String(Jo(i)?this.getComponentProperty(i,n):i);return ku[o]?.(r,s)};execResult=({target:t,targetProperty:e,assignment:n,value:o})=>{if(Jo(t)){const{component:i,option:r}=this.getComponent(t),s=r||i;Du[e]?.(s,{targetProperty:e,assignment:n,value:o})}};getComponentProperty=(t,e)=>{const{component:n,option:o}=this.getComponent(t),i=o||n;return Au[e]?.(i)||i[e]};getComponent=t=>{const e={component:null};if(!Jo(t))return null;const[,n,o,i]=Sr(t),r=this.renderedForm.querySelector(`#${Eu}${n}`);if(!r)return e;if(e.component=r,o){const t=r.querySelectorAll("input"),n=t[i];return e.options=t,e.option=n,e}return e};getComponents=t=>{const e=[],n=t.slice(t.indexOf(".")+1);return e.push(...this.renderedForm.querySelectorAll(`[name=f-${n}]`)),e}};const zu=[["input",t=>["textarea","text"].includes(t.type)],["change",t=>["select"].includes(t.tagName.toLowerCase())||["checkbox","radio"].includes(t.type)]],ju=t=>{const[e]=zu.find((e=>e[1](t)))||[!1];return e};void 0!==window&&(window.FormeoEditor=Su,window.FormeoRenderer=Pu);const $u=Su,Hu=Pu,Iu=[{config:{label:"row"},meta:{group:"layout",icon:"rows",id:"layout-row"}},{config:{label:"column"},meta:{group:"layout",icon:"columns",id:"layout-column"}}],Vu=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"})),Ru=["button","submit","reset"].map((t=>({label:t,value:t})));Ru[0].selected=!0;const Fu=({type:t,isMultiple:e=!1,count:n=3})=>Array.from({length:n},((t,e)=>e+1)).map((n=>{const i="checkbox"===t||e?"checked":"selected";return{label:o.get("labelCount",{label:Cr(t),count:n}),value:`${t}-${n}`,[i]:!n}}));const Bu=[class extends Xd{constructor(t={}){const e={tag:"button",attrs:{className:[{label:"grouped",value:"f-btn-group"},{label:"ungrouped",value:"f-field-group"}]},config:{label:o.get("controls.form.button"),hideLabel:!0},meta:{group:"common",icon:"button",id:"button"},options:[{label:o.get("button"),type:Ru,className:[{label:"default",value:"",selected:!0},{label:"primary",value:"primary"},{label:"danger",value:"error"},{label:"success",value:"success"},{label:"warning",value:"warning"}]}]};super(Uo(e,t))}},class extends Xd{constructor(){super({tag:"input",attrs:{type:"date",required:!1,className:""},config:{label:o.get("controls.form.input.date")},meta:{group:"common",icon:"calendar",id:"date-input"}})}},class extends Xd{constructor(){super({tag:"input",attrs:{type:"hidden",value:""},config:{label:o.get("hidden"),hideLabel:!0},meta:{group:"common",icon:"hidden",id:"hidden"}})}},class extends Xd{constructor(){super({tag:"input",attrs:{type:"number",required:!1,className:""},config:{label:o.get("number")},meta:{group:"common",icon:"hash",id:"number"}})}},class extends Xd{constructor(){super({tag:"textarea",config:{label:o.get("controls.form.textarea")},meta:{group:"common",icon:"textarea",id:"textarea"},attrs:{required:!1}})}},class extends Xd{constructor(){super({tag:"input",attrs:{required:!1,type:"text",className:""},config:{label:o.get("controls.form.input.text")},meta:{group:"common",icon:"text-input",id:"text-input"}})}},class extends Xd{constructor(){super({tag:"input",attrs:{type:"file",required:!1},config:{label:o.get("fileUpload")},meta:{group:"common",icon:"upload",id:"upload"}})}},class extends Xd{constructor(t={}){const e={tag:"select",config:{label:o.get("controls.form.select")},attrs:{required:!1,className:"",multiple:!1},meta:{group:"common",icon:"select",id:"select"},options:Fu({type:"option",isMultiple:t.attrs?.multiple})};super(Uo(e,t))}},class extends Xd{constructor(){super({tag:"input",attrs:{type:"checkbox",required:!1},config:{label:o.get("controls.form.checkbox-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"checkbox",id:"checkbox"},options:Fu({type:"checkbox",count:1})})}},class extends Xd{constructor(){super({tag:"input",attrs:{type:"radio",required:!1},config:{label:o.get("controls.form.radio-group"),disabled:["attrs.type"]},meta:{group:"common",icon:"radio-group",id:"radio"},options:Fu({type:"radio"})})}}],Wu=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"})),qu=Array.from(Array(5).keys()).slice(1).map((t=>`h${t}`)),Uu="controls.html.header";const Gu=[class extends Xd{constructor(){super({tag:qu[0],attrs:{tag:qu.map(((t,e)=>({label:t.toUpperCase(),value:t,selected:!e}))),className:""},config:{label:o.get(Uu),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"header",id:"html.header"},content:o.get(Uu),action:{}})}static get definition(){return{i18n:{"en-US":{header:"Custom English Header"}}}}get content(){return super.i18n(Uu)}},class extends Xd{constructor(){super({tag:"p",attrs:{className:""},config:{label:o.get("controls.html.paragraph"),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"paragraph",id:"paragraph"},content:"Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment."})}},class extends Xd{constructor(){super({tag:"hr",config:{label:o.get("controls.html.divider"),hideLabel:!0},meta:{group:"html",icon:"divider",id:"divider"}})}},class extends Xd{constructor(t){super(Uo({tag:"textarea",config:{label:"WYSIWYG",editableContent:!0},meta:{group:"html",icon:"rich-text",id:"tinymce"},attrs:{required:!1},dependencies:{js:"https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"},action:{onRender:t=>{const e=`#${t.id}`;window.tinymce.remove(e),window.tinymce.init({selector:e})}},controlAction:{click:()=>{},onRender:()=>{}}},t))}}],Xu=Object.freeze(Object.defineProperty({__proto__:null,default:Gu},Symbol.toStringTag,{value:"Module"}));t.FormeoEditor=$u,t.FormeoRenderer=Hu,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
|
8
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).formeo={})}(this,(function(t){"use strict";const e={"en-US":"English",dir:"ltr","af-ZA":"Afrikaans (South Africa)","ar-TN":"Arabic (Tunisia)","cs-CZ":"Czech (Czechia)","de-DE":"German (Germany)","es-ES":"European Spanish","fa-IR":"Persian (Iran)","fi-FI":"Finnish (Finland)","fr-FR":"French (France)","hu-HU":"Hungarian (Hungary)","it-IT":"Italian (Italy)","ja-JP":"Japanese (Japan)","nb-NO":"Norwegian Bokmål (Norway)","pl-PL":"Polish (Poland)","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","ro-RO":"Romanian (Romania)","ru-RU":"Russian (Russia)","th-TH":"Thai (Thailand)","tr-TR":"Turkish (Türkiye)","zh-CN":"Chinese (China)","zh-HK":"Chinese (Hong Kong SAR China)","action.add.attrs.attr":"What attribute would you like to add?","action.add.attrs.value":"Default Value",addOption:"Add Option",allFieldsRemoved:"All fields were removed.",allowSelect:"Allow Select",and:"and",attribute:"Attribute",attributeNotPermitted:'Attribute "{attribute}" is not permitted, please choose another.',attributes:"Attributes","attrs.class":"Class","attrs.className":"Class","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Required","attrs.style":"Style","attrs.title":"Title","attrs.type":"Type","attrs.value":"Value",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",cannotClearFields:"There are no fields to clear",checkbox:"Checkbox",checkboxes:"Checkboxes",class:"Class",clear:"Clear",clearAllMessage:"Are you sure you want to clear all fields?",close:"Close",column:"Column","condition.target.placeholder":"target","condition.type.and":"And","condition.type.if":"If","condition.type.or":"Or","condition.type.then":"Then","condition.value.placeholder":"value",confirmClearAll:"Are you sure you want to remove all fields?",content:"Content",control:"Control","controlGroups.nextGroup":"Next Group","controlGroups.prevGroup":"Previous Group","controls.filteringTerm":'Filtering "{term}"',"controls.form.button":"Button","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Date","controls.form.input.email":"Email","controls.form.input.file":"File Upload","controls.form.input.hidden":"Hidden Input","controls.form.input.number":"Number","controls.form.input.text":"Text Input","controls.form.radio-group":"Radio Group","controls.form.select":"Select","controls.form.textarea":"TextArea","controls.groups.form":"Form Fields","controls.groups.html":"HTML Elements","controls.groups.layout":"Layout","controls.html.divider":"Divider","controls.html.header":"Header","controls.html.paragraph":"Paragraph","controls.layout.column":"Column","controls.layout.row":"Row",copy:"Copy To Clipboard",danger:"Danger",defineColumnLayout:"Define a column layout",defineColumnWidths:"Define column widths",description:"Help Text",descriptionField:"Description","editing.row":"Editing Row",editorTitle:"Form Elements",field:"Field","field.property.invalid":"not valid","field.property.isChecked":"is checked","field.property.isNotVisible":"is not visible","field.property.isVisible":"is visible","field.property.label":"label","field.property.valid":"valid","field.property.value":"value",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to get started.",group:"Group",grouped:"Grouped",hidden:"Hidden Input",hide:"Edit",htmlElements:"HTML Elements",if:"If","if.condition.source.placeholder":"source","if.condition.target.placeholder":"target / value",info:"Info","input.date":"Date","input.text":"Text",label:"Label",labelCount:"{label} {count}",labelEmpty:"Field Label cannot be empty","lang.af":"Afrikaans","lang.ar":"Arabic","lang.cs":"Czech","lang.de":"German","lang.en":"English","lang.es":"Spanish","lang.fa":"Persian","lang.fi":"Finnish","lang.fr":"French","lang.hu":"Hungarian","lang.it":"Italian","lang.ja":"Japanese","lang.nb":"Norwegian Bokmål","lang.pl":"Polish","lang.pt":"Portuguese","lang.ro":"Romanian","lang.ru":"Russian","lang.th":"Thai","lang.tr":"Turkish","lang.zh":"Chinese",layout:"Layout",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length","meta.group":"Group","meta.icon":"Ico","meta.label":"Label",minOptionMessage:"This field requires a minimum of 2 options",name:"Name",newOptionLabel:"New {type}",no:"No",number:"Number",off:"Off",on:"On","operator.contains":"contains","operator.equals":"equals","operator.notContains":"not contains","operator.notEquals":"not equal","operator.notVisible":"not visible","operator.visible":"visible",option:"Option",optional:"optional",optionEmpty:"Option value required",optionLabel:"Option {count}",options:"Options",or:"or",order:"Order","panel.label.attrs":"Attributes","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribute","panelEditButtons.conditions":"+ Condition","panelEditButtons.options":"+ Option",placeholder:"Placeholder","placeholder.className":"space separated classes","placeholder.email":"Enter you email","placeholder.label":"Label","placeholder.password":"Enter your password","placeholder.placeholder":"Placeholder","placeholder.text":"Enter some Text","placeholder.textarea":"Enter a lot of text","placeholder.value":"Value",preview:"Preview",primary:"Primary",remove:"Remove",removeMessage:"Remove Element",removeType:"Remove {type}",required:"Required",reset:"Reset",richText:"Rich Text Editor",roles:"Access",row:"Row","row.makeInputGroup":"Make this row an input group.","row.makeInputGroupDesc":"Input Groups enable users to add sets of inputs at a time.","row.settings.fieldsetWrap":"Wrap row in a <fieldset> tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Save",secondary:"Secondary",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",selectOptions:"Options",separator:"Separator",settings:"Settings",size:"Size",sizes:"Sizes","sizes.lg":"Large","sizes.m":"Default","sizes.sm":"Small","sizes.xs":"Extra Small",style:"Style",styles:"Styles","styles.btn":"Button Style","styles.btn.danger":"Danger","styles.btn.default":"Default","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",success:"Success",text:"Text Field",then:"Then","then.condition.target.placeholder":"target",toggle:"Toggle",ungrouped:"Un-Grouped",warning:"Warning",yes:"Yes"};const n={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}};class o{constructor(t=n){this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}processConfig(t){const{location:e,...o}={...n,...t},i=e.replace(/\/?$/,"/");this.config={location:i,...o};const{override:r,preloaded:s={}}=this.config,a=Object.entries(this.langs).concat(Object.entries(r||s));this.langs=a.reduce(((t,[e,n])=>(t[e]=this.applyLanguage(e,n),t)),{}),this.locale=this.config.locale||this.config.langs[0]}init(t){return this.processConfig({...this.config,...t}),this.setCurrent(this.locale)}addLanguage(t,e={}){e="string"==typeof e?o.processFile(e):e,this.applyLanguage(t,e),this.config.langs.push("locale")}getValue(t,e=this.locale){var n;return(null==(n=this.langs[e])?void 0:n[t])||this.getFallbackValue(t)}getFallbackValue(t){const e=Object.values(this.langs).find((e=>e[t]));return null==e?void 0:e[t]}makeSafe(t){const e={"{":"\\{","}":"\\}","|":"\\|"};return t=t.replace(/[{}|]/g,(t=>e[t])),new RegExp(t,"g")}put(t,e){return this.current[t]=e,e}get(t,e){const n=this;let o=this.getValue(t);if(!o)return;const i=o.match(/\{[^}]+?\}/g);if(e&&i)if("object"==typeof e)for(const r of i){const t=r.substring(1,r.length-1);o=o.replace(n.makeSafe(r),e[t]||"")}else o=o.replace(/\{[^}]+?\}/g,e);return o}static processFile(t){return o.fromFile(t.replace(/\n\n/g,"\n"))}static fromFile(t){const e=t.split("\n"),n={};for(let o,i=0;i<e.length;i++){o=/^(.+?) *?= *?([^\n]+)/.exec(e[i]),o&&(n[o[1]]=o[2].replace(/(^\s+|\s+$)/g,""))}return n}loadLang(t,e=!0){const n=this;return new Promise((function(i,r){if(-1!==n.loaded.indexOf(t)&&e)return n.applyLanguage(n.langs[t]),i(n.langs[t]);return async function(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=t.endsWith(".lang")?"text":"json";return await e[n]()}catch(e){throw e}}([n.config.location,t,n.config.extension].join("")).then((e=>{const r=o.processFile(e);return n.applyLanguage(t,r),n.loaded.push(t),i(n.langs[t])})).catch((e=>{const o=n.applyLanguage(t);i(o)}))}))}applyLanguage(t,e={}){const n=this.config.override[t]||{},o=this.langs[t]||{};return this.langs[t]={...o,...e,...n},this.langs[t]}get getLangs(){return this.config.langs}async setCurrent(t="en-US"){return await this.loadLang(t),this.locale=t,this.current=this.langs[t],this.current}}const i=new o;!function(){try{if("undefined"!=typeof document){var t=document.createElement("style");t.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(t)}}catch(e){}}();var r=Object.defineProperty,s=(t,e,n)=>((t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);const a="_3x4ZIcu-",l="JIt36hCJ",c={triggerName:"tooltip"};class d{constructor(t=c){s(this,"triggerName"),s(this,"tooltip"),s(this,"activeTriggerType",null),s(this,"spacing",12),s(this,"handleClick",(t=>{const e=this.triggerName,n=t.target.closest(`[${e}][${e}-type="click"]`);if(n)if(this.isVisible())this.hide();else{const t=n.getAttribute(`${e}`);this.show(n,t),this.activeTriggerType="click"}else this.hide()})),s(this,"handleMouseOver",(t=>{const e=this.triggerName,n=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==n?void 0:n.getAttribute(`${e}-type`))){const t=null==n?void 0:n.getAttribute(`${e}`);t&&(this.show(n,t),this.activeTriggerType="hover")}})),s(this,"handleMouseOut",(t=>{const e=this.triggerName,n=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==n?void 0:n.getAttribute(`${e}-type`))&&this.hide()})),s(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),s(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${a}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}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),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(l)}calculatePosition(t){const e=t.getBoundingClientRect(),n=this.tooltip.getBoundingClientRect(),o=[{name:"top",x:e.left+(e.width-n.width)/2,y:e.top-n.height-this.spacing},{name:"bottom",x:e.left+(e.width-n.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-n.width-this.spacing,y:e.top+(e.height-n.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-n.height)/2},{name:"top-left",x:e.left,y:e.top-n.height-this.spacing},{name:"top-right",x:e.right-n.width,y:e.top-n.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-n.width,y:e.bottom+this.spacing}];return o.find((t=>this.fitsInViewport(t,n)))||o[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(a)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(l);const n=this.calculatePosition(t);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(l),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),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}void 0!==window&&(window.SmartTooltip=d);const u="formeo",h="4.2.5";var p,m,f,g,v,b,y,w,C,x,S,E,_,T,A,M,O,N,k,L,D,P,z,j,$,H,I,V,R,F,B,W,q,U,G,X,Z,Y,K,J,Q,tt,et,nt,ot,it,rt,st,at,lt,ct,dt,ut,ht,pt,mt,ft,gt,vt,bt,yt,wt,Ct,xt,St,Et,_t,Tt,At,Mt,Ot,Nt,kt,Lt,Dt,Pt,zt,jt,$t,Ht,It,Vt,Rt,Ft,Bt,Wt,qt,Ut,Gt,Xt,Zt,Yt,Kt,Jt,Qt,te,ee,ne,oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ie(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function re(){if(g)return f;return g=1,f=function(t,e){return t===e||t!=t&&e!=e}}function se(){if(b)return v;b=1;var t=re();return v=function(e,n){for(var o=e.length;o--;)if(t(e[o][0],n))return o;return-1}}function ae(){if(M)return A;M=1;var t=m?p:(m=1,p=function(){this.__data__=[],this.size=0}),e=function(){if(w)return y;w=1;var t=se(),e=Array.prototype.splice;return y=function(n){var o=this.__data__,i=t(o,n);return!(i<0||(i==o.length-1?o.pop():e.call(o,i,1),--this.size,0))}}(),n=function(){if(x)return C;x=1;var t=se();return C=function(e){var n=this.__data__,o=t(n,e);return o<0?void 0:n[o][1]}}(),o=function(){if(E)return S;E=1;var t=se();return S=function(e){return t(this.__data__,e)>-1}}(),i=function(){if(T)return _;T=1;var t=se();return _=function(e,n){var o=this.__data__,i=t(o,e);return i<0?(++this.size,o.push([e,n])):o[i][1]=n,this}}();function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}return r.prototype.clear=t,r.prototype.delete=e,r.prototype.get=n,r.prototype.has=o,r.prototype.set=i,A=r}function le(){if(H)return $;H=1;var t="object"==typeof oe&&oe&&oe.Object===Object&&oe;return $=t}function ce(){if(V)return I;V=1;var t=le(),e="object"==typeof self&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return I=n}function de(){if(F)return R;F=1;var t=ce().Symbol;return R=t}function ue(){if(X)return G;X=1;var t=de(),e=function(){if(W)return B;W=1;var t=de(),e=Object.prototype,n=e.hasOwnProperty,o=e.toString,i=t?t.toStringTag:void 0;return B=function(t){var e=n.call(t,i),r=t[i];try{t[i]=void 0;var s=!0}catch(l){}var a=o.call(t);return s&&(e?t[i]=r:delete t[i]),a}}(),n=function(){if(U)return q;U=1;var t=Object.prototype.toString;return q=function(e){return t.call(e)}}(),o=t?t.toStringTag:void 0;return G=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?e(t):n(t)}}function he(){if(Y)return Z;return Y=1,Z=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function pe(){if(J)return K;J=1;var t=ue(),e=he();return K=function(n){if(!e(n))return!1;var o=t(n);return"[object Function]"==o||"[object GeneratorFunction]"==o||"[object AsyncFunction]"==o||"[object Proxy]"==o}}function me(){if(nt)return et;nt=1;var t,e=function(){if(tt)return Q;tt=1;var t=ce()["__core-js_shared__"];return Q=t}(),n=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return et=function(t){return!!n&&n in t}}function fe(){if(it)return ot;it=1;var t=Function.prototype.toString;return ot=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}}function ge(){if(dt)return ct;dt=1;var t=function(){if(st)return rt;st=1;var t=pe(),e=me(),n=he(),o=fe(),i=/^\[object .+?Constructor\]$/,r=Function.prototype,s=Object.prototype,a=r.toString,l=s.hasOwnProperty,c=RegExp("^"+a.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return rt=function(r){return!(!n(r)||e(r))&&(t(r)?c:i).test(o(r))}}(),e=lt?at:(lt=1,at=function(t,e){return null==t?void 0:t[e]});return ct=function(n,o){var i=e(n,o);return t(i)?i:void 0}}function ve(){if(ht)return ut;ht=1;var t=ge()(ce(),"Map");return ut=t}function be(){if(mt)return pt;mt=1;var t=ge()(Object,"create");return pt=t}function ye(){if(Tt)return _t;Tt=1;var t=function(){if(gt)return ft;gt=1;var t=be();return ft=function(){this.__data__=t?t(null):{},this.size=0}}(),e=bt?vt:(bt=1,vt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),n=function(){if(wt)return yt;wt=1;var t=be(),e=Object.prototype.hasOwnProperty;return yt=function(n){var o=this.__data__;if(t){var i=o[n];return"__lodash_hash_undefined__"===i?void 0:i}return e.call(o,n)?o[n]:void 0}}(),o=function(){if(xt)return Ct;xt=1;var t=be(),e=Object.prototype.hasOwnProperty;return Ct=function(n){var o=this.__data__;return t?void 0!==o[n]:e.call(o,n)}}(),i=function(){if(Et)return St;Et=1;var t=be();return St=function(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}return r.prototype.clear=t,r.prototype.delete=e,r.prototype.get=n,r.prototype.has=o,r.prototype.set=i,_t=r}function we(){if(Lt)return kt;Lt=1;var t=Nt?Ot:(Nt=1,Ot=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return kt=function(e,n){var o=e.__data__;return t(n)?o["string"==typeof n?"string":"hash"]:o.map}}function Ce(){if(Ft)return Rt;Ft=1;var t=function(){if(Mt)return At;Mt=1;var t=ye(),e=ae(),n=ve();return At=function(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}}(),e=function(){if(Pt)return Dt;Pt=1;var t=we();return Dt=function(e){var n=t(this,e).delete(e);return this.size-=n?1:0,n}}(),n=function(){if(jt)return zt;jt=1;var t=we();return zt=function(e){return t(this,e).get(e)}}(),o=function(){if(Ht)return $t;Ht=1;var t=we();return $t=function(e){return t(this,e).has(e)}}(),i=function(){if(Vt)return It;Vt=1;var t=we();return It=function(e,n){var o=t(this,e),i=o.size;return o.set(e,n),this.size+=o.size==i?0:1,this}}();function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}return r.prototype.clear=t,r.prototype.delete=e,r.prototype.get=n,r.prototype.has=o,r.prototype.set=i,Rt=r}function xe(){if(Ut)return qt;Ut=1;var t=ae(),e=function(){if(N)return O;N=1;var t=ae();return O=function(){this.__data__=new t,this.size=0}}(),n=L?k:(L=1,k=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}),o=P?D:(P=1,D=function(t){return this.__data__.get(t)}),i=j?z:(j=1,z=function(t){return this.__data__.has(t)}),r=function(){if(Wt)return Bt;Wt=1;var t=ae(),e=ve(),n=Ce();return Bt=function(o,i){var r=this.__data__;if(r instanceof t){var s=r.__data__;if(!e||s.length<199)return s.push([o,i]),this.size=++r.size,this;r=this.__data__=new n(s)}return r.set(o,i),this.size=r.size,this}}();function s(e){var n=this.__data__=new t(e);this.size=n.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=i,s.prototype.set=r,qt=s}function Se(){if(Xt)return Gt;Xt=1;var t=ge(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(n){}}();return Gt=e}function Ee(){if(Yt)return Zt;Yt=1;var t=Se();return Zt=function(e,n,o){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}}function _e(){if(Jt)return Kt;Jt=1;var t=Ee(),e=re();return Kt=function(n,o,i){(void 0!==i&&!e(n[o],i)||void 0===i&&!(o in n))&&t(n,o,i)}}function Te(){if(ne)return ee;ne=1;var t=(te?Qt:(te=1,Qt=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}))();return ee=t}var Ae,Me,Oe,Ne,ke,Le,De,Pe,ze,je,$e,He,Ie,Ve,Re,Fe,Be,We,qe,Ue,Ge,Xe,Ze,Ye,Ke,Je,Qe,tn,en,nn,on,rn,sn,an={exports:{}};function ln(){if(Oe)return Me;Oe=1;var t=ce().Uint8Array;return Me=t}function cn(){if(De)return Le;De=1;var t=function(){if(ke)return Ne;ke=1;var t=ln();return Ne=function(e){var n=new e.constructor(e.byteLength);return new t(n).set(new t(e)),n}}();return Le=function(e,n){var o=n?t(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}}function dn(){if(Ie)return He;return Ie=1,He=function(t,e){return function(n){return t(e(n))}}}function un(){if(Re)return Ve;Re=1;var t=dn()(Object.getPrototypeOf,Object);return Ve=t}function hn(){if(Be)return Fe;Be=1;var t=Object.prototype;return Fe=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}}function pn(){if(qe)return We;qe=1;var t=function(){if($e)return je;$e=1;var t=he(),e=Object.create;return je=function(){function n(){}return function(o){if(!t(o))return{};if(e)return e(o);n.prototype=o;var i=new n;return n.prototype=void 0,i}}()}(),e=un(),n=hn();return We=function(o){return"function"!=typeof o.constructor||n(o)?{}:t(e(o))}}function mn(){if(Ge)return Ue;return Ge=1,Ue=function(t){return null!=t&&"object"==typeof t}}function fn(){if(Ke)return Ye;Ke=1;var t=function(){if(Ze)return Xe;Ze=1;var t=ue(),e=mn();return Xe=function(n){return e(n)&&"[object Arguments]"==t(n)}}(),e=mn(),n=Object.prototype,o=n.hasOwnProperty,i=n.propertyIsEnumerable,r=t(function(){return arguments}())?t:function(t){return e(t)&&o.call(t,"callee")&&!i.call(t,"callee")};return Ye=r}function gn(){if(Qe)return Je;Qe=1;var t=Array.isArray;return Je=t}function vn(){if(en)return tn;en=1;return tn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function bn(){if(on)return nn;on=1;var t=pe(),e=vn();return nn=function(n){return null!=n&&e(n.length)&&!t(n)}}var yn,wn,Cn,xn,Sn,En,_n,Tn,An,Mn={exports:{}};function On(){return Cn||(Cn=1,t=Mn,e=Mn.exports,n=ce(),o=wn?yn:(wn=1,yn=function(){return!1}),i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,s=r&&r.exports===i?n.Buffer:void 0,a=(s?s.isBuffer:void 0)||o,t.exports=a),Mn.exports;var t,e,n,o,i,r,s,a}var Nn,kn,Ln,Dn,Pn,zn,jn,$n,Hn,In,Vn,Rn,Fn,Bn,Wn,qn,Un,Gn,Xn,Zn,Yn,Kn,Jn,Qn,to,eo,no,oo,io,ro,so,ao,lo,co,uo,ho,po,mo,fo,go,vo,bo,yo,wo,Co,xo,So,Eo,_o,To={exports:{}};function Ao(){if(Ln)return kn;Ln=1;var t=function(){if(_n)return En;_n=1;var t=ue(),e=vn(),n=mn(),o={};return o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,En=function(i){return n(i)&&e(i.length)&&!!o[t(i)]}}(),e=An?Tn:(An=1,Tn=function(t){return function(e){return t(e)}}),n=function(){return Nn||(Nn=1,t=To,e=To.exports,n=le(),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||r&&r.binding&&r.binding("util")}catch(t){}}(),t.exports=s),To.exports;var t,e,n,o,i,r,s}(),o=n&&n.isTypedArray,i=o?e(o):t;return kn=i}function Mo(){if(Pn)return Dn;return Pn=1,Dn=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}function Oo(){if(jn)return zn;jn=1;var t=Ee(),e=re(),n=Object.prototype.hasOwnProperty;return zn=function(o,i,r){var s=o[i];n.call(o,i)&&e(s,r)&&(void 0!==r||i in o)||t(o,i,r)}}function No(){if(Fn)return Rn;Fn=1;var t=/^(?:0|[1-9]\d*)$/;return Rn=function(e,n){var o=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&t.test(e))&&e>-1&&e%1==0&&e<n}}function ko(){if(Wn)return Bn;Wn=1;var t=Vn?In:(Vn=1,In=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}),e=fn(),n=gn(),o=On(),i=No(),r=Ao(),s=Object.prototype.hasOwnProperty;return Bn=function(a,l){var c=n(a),d=!c&&e(a),u=!c&&!d&&o(a),h=!c&&!d&&!u&&r(a),p=c||d||u||h,m=p?t(a.length,String):[],f=m.length;for(var g in a)!l&&!s.call(a,g)||p&&("length"==g||u&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||i(g,f))||m.push(g);return m}}function Lo(){if(Xn)return Gn;Xn=1;var t=he(),e=hn(),n=Un?qn:(Un=1,qn=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}),o=Object.prototype.hasOwnProperty;return Gn=function(i){if(!t(i))return n(i);var r=e(i),s=[];for(var a in i)("constructor"!=a||!r&&o.call(i,a))&&s.push(a);return s}}function Do(){if(Yn)return Zn;Yn=1;var t=ko(),e=Lo(),n=bn();return Zn=function(o){return n(o)?t(o,!0):e(o)}}function Po(){if(Jn)return Kn;Jn=1;var t=function(){if(Hn)return $n;Hn=1;var t=Oo(),e=Ee();return $n=function(n,o,i,r){var s=!i;i||(i={});for(var a=-1,l=o.length;++a<l;){var c=o[a],d=r?r(i[c],n[c],c,i,n):void 0;void 0===d&&(d=n[c]),s?e(i,c,d):t(i,c,d)}return i}}(),e=Do();return Kn=function(n){return t(n,e(n))}}function zo(){if(to)return Qn;to=1;var t,e,n,o,i,r,s,a=_e(),l=(Ae||(Ae=1,t=an,e=an.exports,n=ce(),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o?n.Buffer:void 0,s=r?r.allocUnsafe:void 0,t.exports=function(t,e){if(e)return t.slice();var n=t.length,o=s?s(n):new t.constructor(n);return t.copy(o),o}),an.exports),c=cn(),d=ze?Pe:(ze=1,Pe=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}),u=pn(),h=fn(),p=gn(),m=function(){if(sn)return rn;sn=1;var t=bn(),e=mn();return rn=function(n){return e(n)&&t(n)}}(),f=On(),g=pe(),v=he(),b=function(){if(Sn)return xn;Sn=1;var t=ue(),e=un(),n=mn(),o=Function.prototype,i=Object.prototype,r=o.toString,s=i.hasOwnProperty,a=r.call(Object);return xn=function(o){if(!n(o)||"[object Object]"!=t(o))return!1;var i=e(o);if(null===i)return!0;var l=s.call(i,"constructor")&&i.constructor;return"function"==typeof l&&l instanceof l&&r.call(l)==a}}(),y=Ao(),w=Mo(),C=Po();return Qn=function(t,e,n,o,i,r,s){var x=w(t,n),S=w(e,n),E=s.get(S);if(E)a(t,n,E);else{var _=r?r(x,S,n+"",t,e,s):void 0,T=void 0===_;if(T){var A=p(S),M=!A&&f(S),O=!A&&!M&&y(S);_=S,A||M||O?p(x)?_=x:m(x)?_=d(x):M?(T=!1,_=l(S,!0)):O?(T=!1,_=c(S,!0)):_=[]:b(S)||h(S)?(_=x,h(x)?_=C(x):v(x)&&!g(x)||(_=u(S))):T=!1}T&&(s.set(S,_),i(_,S,o,r,s),s.delete(S)),a(t,n,_)}}}function jo(){if(io)return oo;return io=1,oo=function(t){return t}}function $o(){if(lo)return ao;lo=1;var t=so?ro:(so=1,ro=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}),e=Math.max;return ao=function(n,o,i){return o=e(void 0===o?n.length-1:o,0),function(){for(var r=arguments,s=-1,a=e(r.length-o,0),l=Array(a);++s<a;)l[s]=r[o+s];s=-1;for(var c=Array(o+1);++s<o;)c[s]=r[s];return c[o]=i(l),t(n,this,c)}},ao}function Ho(){if(po)return ho;po=1;var t=uo?co:(uo=1,co=function(t){return function(){return t}}),e=Se(),n=jo();return ho=e?function(n,o){return e(n,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n}function Io(){if(vo)return go;vo=1;var t=Ho(),e=function(){if(fo)return mo;fo=1;var t=Date.now;return mo=function(e){var n=0,o=0;return function(){var i=t(),r=16-(i-o);if(o=i,r>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}},mo}(),n=e(t);return go=n}function Vo(){if(So)return xo;So=1;var t=function(){if(yo)return bo;yo=1;var t=jo(),e=$o(),n=Io();return bo=function(o,i){return n(e(o,i,t),o+"")}}(),e=function(){if(Co)return wo;Co=1;var t=re(),e=bn(),n=No(),o=he();return wo=function(i,r,s){if(!o(s))return!1;var a=typeof r;return!!("number"==a?e(s)&&n(r,s.length):"string"==a&&r in s)&&t(s[r],i)}}();return xo=function(n){return t((function(t,o){var i=-1,r=o.length,s=r>1?o[r-1]:void 0,a=r>2?o[2]:void 0;for(s=n.length>3&&"function"==typeof s?(r--,s):void 0,a&&e(o[0],o[1],a)&&(s=r<3?void 0:s,r=1),t=Object(t);++i<r;){var l=o[i];l&&n(t,l,i,s)}return t}))}}const Ro=ie(function(){if(_o)return Eo;_o=1;var t=function(){if(no)return eo;no=1;var t=xe(),e=_e(),n=Te(),o=zo(),i=he(),r=Do(),s=Mo();return eo=function a(l,c,d,u,h){l!==c&&n(c,(function(n,r){if(h||(h=new t),i(n))o(l,c,r,d,a,u,h);else{var p=u?u(s(l,r),n,r+"",l,c,h):void 0;void 0===p&&(p=n),e(l,r,p)}}),r)},eo}(),e=Vo()((function(e,n,o,i){t(e,n,o,i)}));return Eo=e}()),Fo=()=>crypto.randomUUID().slice(0,8).slice(0,8),Bo=(t="",e)=>{if(!e)return!1;const n=/[|\\{}()[\]^*$+?.]/g;let o="string"==typeof e?[e]:e;o=o.map((t=>"*"===t?"":t.replace(n,"\\$&")));let i=!0;return o.length&&(i=!new RegExp(o.join("|"),"i").exec(t)),i},Wo=t=>{const e=t.className?.match(ki);return e&&Oi[e[0]]},qo=t=>Array.from(new Set(t)),Uo=t=>t?.attrs?.id||t?.id||Fo(),Go=(t,e)=>Ro({},t,e,((t,e)=>Array.isArray(t)?null!=e?qo(t.concat(e)):e:Array.isArray(e)?null!=t?qo(e.concat(t)):e:void 0)),Xo=t=>{let e;if(null===t||!("object"==typeof t)||t instanceof Promise)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(Array.isArray(t)){e=[];for(let n=0,o=t.length;n<o;n++)e[n]=Xo(t[n]);return e}if(t instanceof Object){e={};for(const n in t)Object.hasOwn(t,n)&&(e[n]=Xo(t[n]));return e}throw new Error("Unable to copy Object, type not supported.")},Zo=(t,e)=>t/e*100,Yo=t=>`${t.toString()}%`,Ko=Object.create(null,{get:{value:t=>{const e=window.sessionStorage?.getItem(t);try{return JSON.parse(e)}catch(n){return e}}},set:{value:(t,e)=>{try{return window.sessionStorage?.setItem(t,JSON.stringify(e))}catch(n){}}}}),Jo=t=>/^(stage|row|column|field)s./.test(t);function Qo(t,e=Fi){let n;return function(...o){n&&clearTimeout(n),n=setTimeout((()=>t.apply(this,o)),e)}}function ti(t){return t}function ei(){}function ni(t=Object.create(null)){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return Object.create(null)}return t}const oi=t=>t?Xo(ni(t)):gr();function ii(t,e,n,o={}){if(!e||!t[n][e])return o;o[`${n}.${e}`]=t[n][e];const i=ji.get(n);if(i){const r=t[n][e].data?.children||[];for(const e of r)ii(t,e,i,o)}return o}const ri=u,si=h,ai=`https://cdn.jsdelivr.net/npm/formeo@${si}/dist/formeo-sprite.svg`,li=`https://cdn.jsdelivr.net/npm/formeo@${si}/dist/formeo.min.css`,ci="https://draggable.github.io/formeo/assets/css/formeo.min.css",di="f-panel",ui="control-group",hi=`${ri}-stage`,pi=`${ri}-row`,mi=`${ri}-column`,fi=`${ri}-field`,gi="custom-column-widths",vi="column-preset",bi="resizing-columns",yi=new Map([[hi,pi],[pi,mi],[mi,fi]]),wi=["stage","row","column","field"],Ci=wi.map((t=>`${t}s`));new Map(Ci.map(((t,e)=>[t,wi[e]])));const xi=new RegExp(`^${Ci.join("|")}.`),Si=[...wi],Ei=[...Ci],_i=new Map(Ei.map(((t,e)=>[t,Si[e]]))),Ti=Si.reduce(((t,e)=>(t[e]=e,t)),{}),Ai=[{name:"controls",className:ui},{name:"stage",className:hi},{name:"row",className:pi},{name:"column",className:mi},{name:"field",className:fi}],Mi={controls:ui,stage:hi,row:pi,column:mi,field:fi},Oi=Object.entries(Mi).reduce(((t,[e,n])=>(t[n]=e,t)),{}),Ni=Object.values(Mi),ki=new RegExp(`${Ni.join("|")}`,"g"),{childTypeMapVals:Li,childTypeIndexMapVals:Di}=Ai.reduce(((t,{name:e},n,o)=>{const{name:i}=o[n+1]||{};return i&&(t.childTypeMapVals.push([e,i]),t.childTypeIndexMapVals.push([`${e}s`,`${i}s`])),t}),{childTypeMapVals:[],childTypeIndexMapVals:[]}),Pi=Li.slice().map((t=>t.slice().reverse())).reverse(),zi=new Map(Li),ji=new Map(Di),$i=new Map(Pi.slice()),Hi=new Map([[{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"}]].reduce(((t,e,n)=>(t.push([n,e]),t)),[])),Ii=`${ri}-formData`,Vi=`${ri}-locale`,Ri=333,Fi=Math.round(166.5),Bi=Math.round(666),Wi="formeoSaved",qi="formeoUpdated",Ui="formeoUpdatedStage",Gi="formeoUpdatedRow",Xi="formeoUpdatedColumn",Zi="formeoUpdatedField",Yi="formeoOnRender",Ki="formeoAddedRow",Ji="formeoAddedColumn",Qi="formeoAddedField",tr="formeoRemovedRow",er="formeoRemovedColumn",nr="formeoRemovedField",or={equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},ir={equals:"="},rr=["logical","source","sourceProperty","comparison","target","targetProperty","assignment","value"],sr=["isChecked","isNotChecked"],ar=["isVisible","isNotVisible"],lr=["value"],cr={comparison:or,assignment:ir,logical:{and:"&&",or:"||"}},dr="if",ur="then",hr=()=>({[dr]:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],[ur]:[{target:"",targetProperty:"",assignment:"",value:""}]}),pr=/(\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,mr=/\bcol-\w+-\d+/g,fr="f-i-",gr=()=>({id:Uo(),stages:{[Uo()]:{}},rows:{},columns:{},fields:{}}),vr=["selected","checked"],br=vr.toReversed(),yr=new Map([["config",new Set(["label","helpText","hideLabel","labelAfter","disableHtmlLabel","tooltip"])]]),wr="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((t=>String.raw`\s${t}\s`)),Cr=new RegExp(String.raw`(?!${wr.join("|")})\w\S*`,"g"),xr=/\s+/g;function Sr(t){if("string"!=typeof t)return t;if(t.trim().match(xr))return t;return t.replace(Cr,(t=>t.charAt(0).toUpperCase()+t.substring(1).replace(/[A-Z]/g,(t=>` ${t}`))))}const Er=(t,e="-")=>t.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,e),_r=t=>{if(Array.isArray(t))return t;const e=/[.[\]]/g,n=[];let o=0,i=e.exec(t);for(;null!==i;)n.push(t.slice(o,i.index)),o=i.index+i[0].length,i=e.exec(t);return o<t.length&&n.push(t.slice(o)),n.filter(Boolean)},Tr=(t,e="-")=>_r(t).join(e),Ar=/^attrs\.|^meta\.|^options\.|^config\./g;function Mr(t){return t.replaceAll(Ar,"")}var Or,Nr,kr,Lr,Dr,Pr,zr,jr,$r,Hr,Ir,Vr,Rr,Fr,Br,Wr,qr,Ur,Gr,Xr,Zr,Yr,Kr,Jr;function Qr(){if(Nr)return Or;Nr=1;var t=ue(),e=mn();return Or=function(n){return"symbol"==typeof n||e(n)&&"[object Symbol]"==t(n)}}function ts(){if(jr)return zr;jr=1;var t=function(){if(Pr)return Dr;Pr=1;var t=Ce();function e(n,o){if("function"!=typeof n||null!=o&&"function"!=typeof o)throw new TypeError("Expected a function");var i=function(){var t=arguments,e=o?o.apply(this,t):t[0],r=i.cache;if(r.has(e))return r.get(e);var s=n.apply(this,t);return i.cache=r.set(e,s)||r,s};return i.cache=new(e.Cache||t),i}return e.Cache=t,Dr=e}();return zr=function(e){var n=t(e,(function(t){return 500===o.size&&o.clear(),t})),o=n.cache;return n}}function es(){if(Fr)return Rr;Fr=1;var t=de(),e=Vr?Ir:(Vr=1,Ir=function(t,e){for(var n=-1,o=null==t?0:t.length,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i}),n=gn(),o=Qr(),i=t?t.prototype:void 0,r=i?i.toString:void 0;return Rr=function t(i){if("string"==typeof i)return i;if(n(i))return e(i,t)+"";if(o(i))return r?r.call(i):"";var s=i+"";return"0"==s&&1/i==-1/0?"-0":s},Rr}function ns(){if(Ur)return qr;Ur=1;var t=gn(),e=function(){if(Lr)return kr;Lr=1;var t=gn(),e=Qr(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;return kr=function(i,r){if(t(i))return!1;var s=typeof i;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=i&&!e(i))||o.test(i)||!n.test(i)||null!=r&&i in Object(r)}}(),n=function(){if(Hr)return $r;Hr=1;var t=ts(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,o=t((function(t){var o=[];return 46===t.charCodeAt(0)&&o.push(""),t.replace(e,(function(t,e,i,r){o.push(i?r.replace(n,"$1"):e||t)})),o}));return $r=o}(),o=function(){if(Wr)return Br;Wr=1;var t=es();return Br=function(e){return null==e?"":t(e)}}();return qr=function(i,r){return t(i)?i:e(i,r)?[i]:n(o(i))}}function os(){if(Xr)return Gr;Xr=1;var t=Qr();return Gr=function(e){if("string"==typeof e||t(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}}const is=ie(function(){if(Jr)return Kr;Jr=1;var t=function(){if(Yr)return Zr;Yr=1;var t=ns(),e=os();return Zr=function(n,o){for(var i=0,r=(o=t(o,n)).length;null!=n&&i<r;)n=n[e(o[i++])];return i&&i==r?n:void 0}}();return Kr=function(e,n,o){var i=null==e?void 0:t(e,n);return void 0===i?o:i}}());var rs,ss,as,ls;var cs=function(){if(ls)return as;ls=1;var t=function(){if(ss)return rs;ss=1;var t=Oo(),e=ns(),n=No(),o=he(),i=os();return rs=function(r,s,a,l){if(!o(r))return r;for(var c=-1,d=(s=e(s,r)).length,u=d-1,h=r;null!=h&&++c<d;){var p=i(s[c]),m=a;if("__proto__"===p||"constructor"===p||"prototype"===p)return r;if(c!=u){var f=h[p];void 0===(m=l?l(f,p,h):void 0)&&(m=o(f)?f:n(s[c+1])?[]:{})}t(h,p,m),h=h[p]}return r}}();return as=function(e,n,o){return null==e?e:t(e,n,o)}}();const ds=is,us=ie(cs);function hs(...t){return t.flat().reduce(((t,e)=>(t[e]=e,t)),{})}var ps,ms,fs,gs,vs,bs,ys,ws,Cs,xs,Ss,Es,_s,Ts,As,Ms,Os,Ns,ks,Ls,Ds,Ps,zs,js,$s,Hs,Is,Vs,Rs,Fs,Bs,Ws,qs,Us,Gs,Xs,Zs,Ys,Ks,Js,Qs,ta,ea,na,oa,ia,ra,sa,aa,la,ca,da,ua,ha;function pa(){if(bs)return vs;bs=1;var t=Ce(),e=ms?ps:(ms=1,ps=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),n=gs?fs:(gs=1,fs=function(t){return this.__data__.has(t)});function o(e){var n=-1,o=null==e?0:e.length;for(this.__data__=new t;++n<o;)this.add(e[n])}return o.prototype.add=o.prototype.push=e,o.prototype.has=n,vs=o}function ma(){if(Es)return Ss;Es=1;var t=pa(),e=ws?ys:(ws=1,ys=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1}),n=xs?Cs:(xs=1,Cs=function(t,e){return t.has(e)});return Ss=function(o,i,r,s,a,l){var c=1&r,d=o.length,u=i.length;if(d!=u&&!(c&&u>d))return!1;var h=l.get(o),p=l.get(i);if(h&&p)return h==i&&p==o;var m=-1,f=!0,g=2&r?new t:void 0;for(l.set(o,i),l.set(i,o);++m<d;){var v=o[m],b=i[m];if(s)var y=c?s(b,v,m,i,o,l):s(v,b,m,o,i,l);if(void 0!==y){if(y)continue;f=!1;break}if(g){if(!e(i,(function(t,e){if(!n(g,e)&&(v===t||a(v,t,r,s,l)))return g.push(e)}))){f=!1;break}}else if(v!==b&&!a(v,b,r,s,l)){f=!1;break}}return l.delete(o),l.delete(i),f}}function fa(){if(Ns)return Os;Ns=1;var t=de(),e=ln(),n=re(),o=ma(),i=Ts?_s:(Ts=1,_s=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n}),r=Ms?As:(Ms=1,As=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}),s=t?t.prototype:void 0,a=s?s.valueOf:void 0;return Os=function(t,s,l,c,d,u,h){switch(l){case"[object DataView]":if(t.byteLength!=s.byteLength||t.byteOffset!=s.byteOffset)return!1;t=t.buffer,s=s.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=s.byteLength||!u(new e(t),new e(s)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+t,+s);case"[object Error]":return t.name==s.name&&t.message==s.message;case"[object RegExp]":case"[object String]":return t==s+"";case"[object Map]":var p=i;case"[object Set]":var m=1&c;if(p||(p=r),t.size!=s.size&&!m)return!1;var f=h.get(t);if(f)return f==s;c|=2,h.set(t,s);var g=o(p(t),p(s),c,d,u,h);return h.delete(t),g;case"[object Symbol]":if(a)return a.call(t)==a.call(s)}return!1}}function ga(){if(Ps)return Ds;Ps=1;var t=Ls?ks:(Ls=1,ks=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t}),e=gn();return Ds=function(n,o,i){var r=o(n);return e(n)?r:t(r,i(n))}}function va(){if(Vs)return Is;Vs=1;var t=js?zs:(js=1,zs=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r}),e=Hs?$s:(Hs=1,$s=function(){return[]}),n=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;return Is=o?function(e){return null==e?[]:(e=Object(e),t(o(e),(function(t){return n.call(e,t)})))}:e}function ba(){if(Ws)return Bs;Ws=1;var t=hn(),e=function(){if(Fs)return Rs;Fs=1;var t=dn()(Object.keys,Object);return Rs=t}(),n=Object.prototype.hasOwnProperty;return Bs=function(o){if(!t(o))return e(o);var i=[];for(var r in Object(o))n.call(o,r)&&"constructor"!=r&&i.push(r);return i}}function ya(){if(Xs)return Gs;Xs=1;var t=ga(),e=va(),n=function(){if(Us)return qs;Us=1;var t=ko(),e=ba(),n=bn();return qs=function(o){return n(o)?t(o):e(o)}}();return Gs=function(o){return t(o,n,e)}}function wa(){if(sa)return ra;sa=1;var t=function(){if(Js)return Ks;Js=1;var t=ge()(ce(),"DataView");return Ks=t}(),e=ve(),n=function(){if(ta)return Qs;ta=1;var t=ge()(ce(),"Promise");return Qs=t}(),o=function(){if(na)return ea;na=1;var t=ge()(ce(),"Set");return ea=t}(),i=function(){if(ia)return oa;ia=1;var t=ge()(ce(),"WeakMap");return oa=t}(),r=ue(),s=fe(),a="[object Map]",l="[object Promise]",c="[object Set]",d="[object WeakMap]",u="[object DataView]",h=s(t),p=s(e),m=s(n),f=s(o),g=s(i),v=r;return(t&&v(new t(new ArrayBuffer(1)))!=u||e&&v(new e)!=a||n&&v(n.resolve())!=l||o&&v(new o)!=c||i&&v(new i)!=d)&&(v=function(t){var e=r(t),n="[object Object]"==e?t.constructor:void 0,o=n?s(n):"";if(o)switch(o){case h:return u;case p:return a;case m:return l;case f:return c;case g:return d}return e}),ra=v}function Ca(){if(la)return aa;la=1;var t=xe(),e=ma(),n=fa(),o=function(){if(Ys)return Zs;Ys=1;var t=ya(),e=Object.prototype.hasOwnProperty;return Zs=function(n,o,i,r,s,a){var l=1&i,c=t(n),d=c.length;if(d!=t(o).length&&!l)return!1;for(var u=d;u--;){var h=c[u];if(!(l?h in o:e.call(o,h)))return!1}var p=a.get(n),m=a.get(o);if(p&&m)return p==o&&m==n;var f=!0;a.set(n,o),a.set(o,n);for(var g=l;++u<d;){var v=n[h=c[u]],b=o[h];if(r)var y=l?r(b,v,h,o,n,a):r(v,b,h,n,o,a);if(!(void 0===y?v===b||s(v,b,i,r,a):y)){f=!1;break}g||(g="constructor"==h)}if(f&&!g){var w=n.constructor,C=o.constructor;w==C||!("constructor"in n)||!("constructor"in o)||"function"==typeof w&&w instanceof w&&"function"==typeof C&&C instanceof C||(f=!1)}return a.delete(n),a.delete(o),f}}(),i=wa(),r=gn(),s=On(),a=Ao(),l="[object Arguments]",c="[object Array]",d="[object Object]",u=Object.prototype.hasOwnProperty;return aa=function(h,p,m,f,g,v){var b=r(h),y=r(p),w=b?c:i(h),C=y?c:i(p),x=(w=w==l?d:w)==d,S=(C=C==l?d:C)==d,E=w==C;if(E&&s(h)){if(!s(p))return!1;b=!0,x=!1}if(E&&!x)return v||(v=new t),b||a(h)?e(h,p,m,f,g,v):n(h,p,w,m,f,g,v);if(!(1&m)){var _=x&&u.call(h,"__wrapped__"),T=S&&u.call(p,"__wrapped__");if(_||T){var A=_?h.value():h,M=T?p.value():p;return v||(v=new t),g(A,M,m,f,v)}}return!!E&&(v||(v=new t),o(h,p,m,f,g,v))}}const xa=ie(function(){if(ha)return ua;ha=1;var t=function(){if(da)return ca;da=1;var t=Ca(),e=mn();return ca=function n(o,i,r,s,a){return o===i||(null==o||null==i||!e(o)&&!e(i)?o!=o&&i!=i:t(o,i,r,s,n,a))},ca}();return ua=function(e,n){return t(e,n)}}()),Sa=(t,e)=>void 0===t?"added":void 0===e?"removed":xa(t,e)?"unchanged":"changed";class Ea{constructor(t,e=Object.create(null)){this.name=t,this.data=e,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}toJSON=(t,e)=>JSON.stringify(t,null,e);get=t=>ds(this.data,t);set(t,e){const n=ds(this.data,t),o=us(this.data,t,e),i=Array.isArray(t)?t.join("."):t,r=Object.keys(this.setCallbacks).filter((t=>new RegExp(t).test(i))),s={newVal:e,oldVal:n,path:t};for(const a of r)for(const t of this.setCallbacks[a])t(s);if(!this.disableEvents){const i={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+t,value:e,data:o,changeType:Sa(n,e),src:this.dom};if(n&&(i.previousValue=n),Ou.formeoUpdated(i),this.name){const t={stage:Ui,row:Gi,column:Xi,field:Zi}[this.name];t&&Ou.formeoUpdated(i,t)}}return o}addSetCallback(t,e){this.setCallbacks[t]?this.setCallbacks[t].push(e):this.setCallbacks[t]=[e]}removeSetCallback(t,e){this.setCallbacks[t]=this.setCallbacks[t].filter((t=>t!==e))}add=(t,e=Object.create(null))=>{const{id:n}=e,o=t||n||Uo();return this.set(o,e)};remove=t=>{const e=_r(t),n=e.pop(),o=this.get(e);return Array.isArray(o)?o.splice(Number(n),1):o&&delete o[n],o};empty(){this.data=Object.create(null)}getData=()=>Object.entries(this.data).reduce(((t,[e,n])=>(t[e]=n?.data?n.getData():n,t)),{});setCallbacks={};configVal=Object.create(null)}class _a extends Ea{load=t=>{const e=ni(t);this.empty();for(const[n,o]of Object.entries(e))this.add(n,o);return this.data};get=t=>t?ds(this.data,t):this.add();add=(t,e=Object.create(null))=>{const n=t||Uo(),o=this.Component({...e,id:n});this.data[n]=o,this.active=o;const i={row:Ki,column:Ji,field:Qi}[this.name];return i&&Ou.formeoUpdated({entity:o,componentId:n,componentType:this.name,data:o.data},i),o};remove=t=>{if(Array.isArray(t))for(const e of t)this.get(e).remove();else this.get(t).remove();return this.data};delete=t=>(delete this.data[t],t);clearAll=(t=!0)=>{const e=Object.values(this.data).map((e=>e.empty(t)));return Promise.all(e)};set config(t){this.configVal=Go(this.configVal,Xo(t))}get config(){return this.configVal}conditionMap=new Map}function Ta(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Aa(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ta(Object(n),!0).forEach((function(e){Oa(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ta(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ma(t){return(Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Na(){return Na=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Na.apply(this,arguments)}function ka(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function La(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Da=La(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Pa=La(/Edge/i),za=La(/firefox/i),ja=La(/safari/i)&&!La(/chrome/i)&&!La(/android/i),$a=La(/iP(ad|od|hone)/i),Ha=La(/chrome/i)&&La(/android/i),Ia={capture:!1,passive:!1};function Va(t,e,n){t.addEventListener(e,n,!Da&&Ia)}function Ra(t,e,n){t.removeEventListener(e,n,!Da&&Ia)}function Fa(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function Ba(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Wa(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Fa(t,e):Fa(t,e))||o&&t===n)return t;if(t===n)break}while(t=Ba(t))}return null}var qa,Ua=/\s+/g;function Ga(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Ua," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Ua," ")}}function Xa(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Za(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Xa(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Ya(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function Ka(){var t=document.scrollingElement;return t||document.documentElement}function Ja(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,s,a,l,c,d,u;if(t!==window&&t.parentNode&&t!==Ka()?(s=(r=t.getBoundingClientRect()).top,a=r.left,l=r.bottom,c=r.right,d=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Da))do{if(i&&i.getBoundingClientRect&&("none"!==Xa(i,"transform")||n&&"static"!==Xa(i,"position"))){var h=i.getBoundingClientRect();s-=h.top+parseInt(Xa(i,"border-top-width")),a-=h.left+parseInt(Xa(i,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=Za(i||t),m=p&&p.a,f=p&&p.d;p&&(l=(s/=f)+(d/=f),c=(a/=m)+(u/=m))}return{top:s,left:a,bottom:l,right:c,width:u,height:d}}}function Qa(t,e,n){for(var o=il(t,!0),i=Ja(t)[e];o;){if(!(i>=Ja(o)[n]))return o;if(o===Ka())break;o=il(o,!1)}return!1}function tl(t,e,n,o){for(var i=0,r=0,s=t.children;r<s.length;){if("none"!==s[r].style.display&&s[r]!==lc.ghost&&(o||s[r]!==lc.dragged)&&Wa(s[r],n.draggable,t,!1)){if(i===e)return s[r];i++}r++}return null}function el(t,e){for(var n=t.lastElementChild;n&&(n===lc.ghost||"none"===Xa(n,"display")||e&&!Fa(n,e));)n=n.previousElementSibling;return n||null}function nl(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===lc.clone||e&&!Fa(t,e)||n++;return n}function ol(t){var e=0,n=0,o=Ka();if(t)do{var i=Za(t),r=i.a,s=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}function il(t,e){if(!t||!t.getBoundingClientRect)return Ka();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Xa(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Ka();if(o||e)return n;o=!0}}}while(n=n.parentNode);return Ka()}function rl(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function sl(t,e){return function(){if(!qa){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),qa=setTimeout((function(){qa=void 0}),e)}}}function al(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function ll(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function cl(t,e,n){var o={};return Array.from(t.children).forEach((function(i){var r,s,a,l;if(Wa(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=Ja(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(s=o.top)&&void 0!==s?s:1/0,c.top),o.right=Math.max(null!==(a=o.right)&&void 0!==a?a:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var dl="Sortable"+(new Date).getTime();function ul(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Xa(t,"display")&&t!==lc.ghost){e.push({target:t,rect:Ja(t)});var n=Aa({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Za(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=Ja(n),l=n.prevFromRect,c=n.prevToRect,d=t.rect,u=Za(n,!0);u&&(a.top-=u.f,a.left-=u.e),n.toRect=a,n.thisAnimationDuration&&rl(l,a)&&!rl(s,a)&&(d.top-a.top)/(d.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,l,c,o.options)),rl(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=o.options.animation),o.animate(n,d,a,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){Xa(t,"transition",""),Xa(t,"transform","");var i=Za(this.el),r=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(r||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,Xa(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Xa(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Xa(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Xa(t,"transition",""),Xa(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var hl=[],pl={initializeByDefault:!0},ml={mount:function(t){for(var e in pl)pl.hasOwnProperty(e)&&!(e in t)&&(t[e]=pl[e]);hl.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),hl.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";hl.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](Aa({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](Aa({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in hl.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,Na(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return hl.forEach((function(o){"function"==typeof o.eventProperties&&Na(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return hl.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var fl=["evt"],gl=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=ka(n,fl);ml.pluginEvent.bind(lc)(t,e,Aa({dragEl:bl,parentEl:yl,ghostEl:wl,rootEl:Cl,nextEl:xl,lastDownEl:Sl,cloneEl:El,cloneHidden:_l,dragStarted:Hl,putSortable:kl,activeSortable:lc.active,originalEvent:o,oldIndex:Tl,oldDraggableIndex:Ml,newIndex:Al,newDraggableIndex:Ol,hideGhostForTarget:ic,unhideGhostForTarget:rc,cloneNowHidden:function(){_l=!0},cloneNowShown:function(){_l=!1},dispatchSortableEvent:function(t){vl({sortable:e,name:t,originalEvent:o})}},i))};function vl(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,u=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[dl]){var f,g=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Da||Pa?(f=document.createEvent("Event")).initEvent(o,!0,!0):f=new CustomEvent(o,{bubbles:!0,cancelable:!0}),f.to=s||n,f.from=a||n,f.item=i||n,f.clone=r,f.oldIndex=l,f.newIndex=c,f.oldDraggableIndex=d,f.newDraggableIndex=u,f.originalEvent=h,f.pullMode=p?p.lastPutMode:void 0;var b=Aa(Aa({},m),ml.getEventProperties(o,e));for(var y in b)f[y]=b[y];n&&n.dispatchEvent(f),g[v]&&g[v].call(e,f)}}(Aa({putSortable:kl,cloneEl:El,targetEl:bl,rootEl:Cl,oldIndex:Tl,oldDraggableIndex:Ml,newIndex:Al,newDraggableIndex:Ol},t))}var bl,yl,wl,Cl,xl,Sl,El,_l,Tl,Al,Ml,Ol,Nl,kl,Ll,Dl,Pl,zl,jl,$l,Hl,Il,Vl,Rl,Fl,Bl=!1,Wl=!1,ql=[],Ul=!1,Gl=!1,Xl=[],Zl=!1,Yl=[],Kl="undefined"!=typeof document,Jl=$a,Ql=Pa||Da?"cssFloat":"float",tc=Kl&&!Ha&&!$a&&"draggable"in document.createElement("div"),ec=function(){if(Kl){if(Da)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),nc=function(t,e){var n=Xa(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=tl(t,0,e),r=tl(t,1,e),s=i&&Xa(i),a=r&&Xa(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Ja(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ja(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[Ql]||r&&"none"===n[Ql]&&l+c>o)?"vertical":"horizontal"},oc=function(t){function e(t,n){return function(o,i,r,s){var a=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,s),n)(o,i,r,s);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==Ma(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},ic=function(){!ec&&wl&&Xa(wl,"display","none")},rc=function(){!ec&&wl&&Xa(wl,"display","")};Kl&&!Ha&&document.addEventListener("click",(function(t){if(Wl)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Wl=!1,!1}),!0);var sc=function(t){if(bl){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,ql.some((function(t){var e=t[dl].options.emptyInsertThreshold;if(e&&!el(t)){var n=Ja(t),o=i>=n.left-e&&i<=n.right+e,a=r>=n.top-e&&r<=n.bottom+e;return o&&a?s=t:void 0}})),s);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[dl]._onDragOver(n)}}var i,r,s},ac=function(t){bl&&bl.parentNode[dl]._isOutsideThisEl(t.target)};function lc(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Na({},e),t[dl]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return nc(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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:!1!==lc.supportPointer&&"PointerEvent"in window&&!ja,emptyInsertThreshold:5};for(var o in ml.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in oc(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&tc,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Va(t,"pointerdown",this._onTapStart):(Va(t,"mousedown",this._onTapStart),Va(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Va(t,"dragover",this),Va(t,"dragenter",this)),ql.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Na(this,ul())}function cc(t,e,n,o,i,r,s,a){var l,c,d=t[dl],u=d.options.onMove;return!window.CustomEvent||Da||Pa?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||Ja(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),u&&(c=u.call(d,l,s)),c}function dc(t){t.draggable=!1}function uc(){Zl=!1}function hc(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function pc(t){return setTimeout(t,0)}function mc(t){return clearTimeout(t)}lc.prototype={constructor:lc,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Il=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,bl):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=o.filter;if(function(t){Yl.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Yl.push(o)}}(n),!bl&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!ja||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=Wa(a,o.draggable,n,!1))&&a.animated||Sl===a)){if(Tl=nl(a),Ml=nl(a,o.draggable),"function"==typeof c){if(c.call(this,t,a,this))return vl({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),gl("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=Wa(l,o.trim(),n,!1))return vl({sortable:e,rootEl:o,name:"filter",targetEl:a,fromEl:n,toEl:n}),gl("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!Wa(l,o.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,s=i.options,a=r.ownerDocument;if(n&&!bl&&n.parentNode===r){var l=Ja(n);if(Cl=r,yl=(bl=n).parentNode,xl=bl.nextSibling,Sl=n,Nl=s.group,lc.dragged=bl,Ll={target:bl,clientX:(e||t).clientX,clientY:(e||t).clientY},jl=Ll.clientX-l.left,$l=Ll.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,bl.style["will-change"]="all",o=function(){gl("delayEnded",i,{evt:t}),lc.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!za&&i.nativeDraggable&&(bl.draggable=!0),i._triggerDragStart(t,e),vl({sortable:i,name:"choose",originalEvent:t}),Ga(bl,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){Ya(bl,t.trim(),dc)})),Va(a,"dragover",sc),Va(a,"mousemove",sc),Va(a,"touchmove",sc),Va(a,"mouseup",i._onDrop),Va(a,"touchend",i._onDrop),Va(a,"touchcancel",i._onDrop),za&&this.nativeDraggable&&(this.options.touchStartThreshold=4,bl.draggable=!0),gl("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(Pa||Da))o();else{if(lc.eventCanceled)return void this._onDrop();Va(a,"mouseup",i._disableDelayedDrag),Va(a,"touchend",i._disableDelayedDrag),Va(a,"touchcancel",i._disableDelayedDrag),Va(a,"mousemove",i._delayedDragTouchMoveHandler),Va(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&Va(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){bl&&dc(bl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ra(t,"mouseup",this._disableDelayedDrag),Ra(t,"touchend",this._disableDelayedDrag),Ra(t,"touchcancel",this._disableDelayedDrag),Ra(t,"mousemove",this._delayedDragTouchMoveHandler),Ra(t,"touchmove",this._delayedDragTouchMoveHandler),Ra(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Va(document,"pointermove",this._onTouchMove):Va(document,e?"touchmove":"mousemove",this._onTouchMove):(Va(bl,"dragend",this),Va(Cl,"dragstart",this._onDragStart));try{document.selection?pc((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Bl=!1,Cl&&bl){gl("dragStarted",this,{evt:e}),this.nativeDraggable&&Va(document,"dragover",ac);var n=this.options;!t&&Ga(bl,n.dragClass,!1),Ga(bl,n.ghostClass,!0),lc.active=this,t&&this._appendGhost(),vl({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Dl){this._lastX=Dl.clientX,this._lastY=Dl.clientY,ic();for(var t=document.elementFromPoint(Dl.clientX,Dl.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Dl.clientX,Dl.clientY))!==e;)e=t;if(bl.parentNode[dl]._isOutsideThisEl(t),e)do{if(e[dl]){if(e[dl]._onDragOver({clientX:Dl.clientX,clientY:Dl.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=Ba(e));rc()}},_onTouchMove:function(t){if(Ll){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=wl&&Za(wl,!0),s=wl&&r&&r.a,a=wl&&r&&r.d,l=Jl&&Fl&&ol(Fl),c=(i.clientX-Ll.clientX+o.x)/(s||1)+(l?l[0]-Xl[0]:0)/(s||1),d=(i.clientY-Ll.clientY+o.y)/(a||1)+(l?l[1]-Xl[1]:0)/(a||1);if(!lc.active&&!Bl){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(wl){r?(r.e+=c-(Pl||0),r.f+=d-(zl||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Xa(wl,"webkitTransform",u),Xa(wl,"mozTransform",u),Xa(wl,"msTransform",u),Xa(wl,"transform",u),Pl=c,zl=d,Dl=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!wl){var t=this.options.fallbackOnBody?document.body:Cl,e=Ja(bl,!0,Jl,!0,t),n=this.options;if(Jl){for(Fl=t;"static"===Xa(Fl,"position")&&"none"===Xa(Fl,"transform")&&Fl!==document;)Fl=Fl.parentNode;Fl!==document.body&&Fl!==document.documentElement?(Fl===document&&(Fl=Ka()),e.top+=Fl.scrollTop,e.left+=Fl.scrollLeft):Fl=Ka(),Xl=ol(Fl)}Ga(wl=bl.cloneNode(!0),n.ghostClass,!1),Ga(wl,n.fallbackClass,!0),Ga(wl,n.dragClass,!0),Xa(wl,"transition",""),Xa(wl,"transform",""),Xa(wl,"box-sizing","border-box"),Xa(wl,"margin",0),Xa(wl,"top",e.top),Xa(wl,"left",e.left),Xa(wl,"width",e.width),Xa(wl,"height",e.height),Xa(wl,"opacity","0.8"),Xa(wl,"position",Jl?"absolute":"fixed"),Xa(wl,"zIndex","100000"),Xa(wl,"pointerEvents","none"),lc.ghost=wl,t.appendChild(wl),Xa(wl,"transform-origin",jl/parseInt(wl.style.width)*100+"% "+$l/parseInt(wl.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;gl("dragStart",this,{evt:t}),lc.eventCanceled?this._onDrop():(gl("setupClone",this),lc.eventCanceled||((El=ll(bl)).removeAttribute("id"),El.draggable=!1,El.style["will-change"]="",this._hideClone(),Ga(El,this.options.chosenClass,!1),lc.clone=El),n.cloneId=pc((function(){gl("clone",n),lc.eventCanceled||(n.options.removeCloneOnHide||Cl.insertBefore(El,bl),n._hideClone(),vl({sortable:n,name:"clone"}))})),!e&&Ga(bl,i.dragClass,!0),e?(Wl=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ra(document,"mouseup",n._onDrop),Ra(document,"touchend",n._onDrop),Ra(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,bl)),Va(document,"drop",n),Xa(bl,"transform","translateZ(0)")),Bl=!0,n._dragStartId=pc(n._dragStarted.bind(n,e,t)),Va(document,"selectstart",n),Hl=!0,ja&&Xa(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,s=t.target,a=this.options,l=a.group,c=lc.active,d=Nl===l,u=a.sort,h=kl||c,p=this,m=!1;if(!Zl){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=Wa(s,a.draggable,r,!0),O("dragOver"),lc.eventCanceled)return m;if(bl.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return k(!1);if(Wl=!1,c&&!a.disabled&&(d?u||(o=yl!==Cl):kl===this||(this.lastPutMode=Nl.checkPull(this,c,bl,t))&&l.checkPut(this,c,bl,t))){if(i="vertical"===this._getDirection(t,s),e=Ja(bl),O("dragOverValid"),lc.eventCanceled)return m;if(o)return yl=Cl,N(),this._hideClone(),O("revert"),lc.eventCanceled||(xl?Cl.insertBefore(bl,xl):Cl.appendChild(bl)),k(!0);var f=el(r,a.draggable);if(!f||function(t,e,n){var o=Ja(el(n.el,n.options.draggable)),i=cl(n.el,n.options,wl),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,i,this)&&!f.animated){if(f===bl)return k(!1);if(f&&r===t.target&&(s=f),s&&(n=Ja(s)),!1!==cc(Cl,r,bl,e,s,n,t,!!s))return N(),f&&f.nextSibling?r.insertBefore(bl,f.nextSibling):r.appendChild(bl),yl=r,L(),k(!0)}else if(f&&function(t,e,n){var o=Ja(tl(n.el,0,n.options,!0)),i=cl(n.el,n.options,wl),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,i,this)){var g=tl(r,0,a,!0);if(g===bl)return k(!1);if(n=Ja(s=g),!1!==cc(Cl,r,bl,e,s,n,t,!1))return N(),r.insertBefore(bl,g),yl=r,L(),k(!0)}else if(s.parentNode===r){n=Ja(s);var v,b,y,w=bl.parentNode!==r,C=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return o===s||i===a||o+r/2===s+l/2}(bl.animated&&bl.toRect||e,s.animated&&s.toRect||n,i),x=i?"top":"left",S=Qa(s,"top","top")||Qa(bl,"top","top"),E=S?S.scrollTop:void 0;if(Il!==s&&(b=n[x],Ul=!1,Gl=!C&&a.invertSwap||w),v=function(t,e,n,o,i,r,s,a){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!s)if(a&&Rl<c*i){if(!Ul&&(1===Vl?l>d+c*r/2:l<u-c*r/2)&&(Ul=!0),Ul)h=!0;else if(1===Vl?l<d+Rl:l>u-Rl)return-Vl}else if(l>d+c*(1-i)/2&&l<u-c*(1-i)/2)return function(t){return nl(bl)<nl(t)?1:-1}(e);if((h=h||s)&&(l<d+c*r/2||l>u-c*r/2))return l>d+c/2?1:-1;return 0}(t,s,n,i,C?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Gl,Il===s),0!==v){var _=nl(bl);do{_-=v,y=yl.children[_]}while(y&&("none"===Xa(y,"display")||y===wl))}if(0===v||y===s)return k(!1);Il=s,Vl=v;var T=s.nextElementSibling,A=!1,M=cc(Cl,r,bl,e,s,n,t,A=1===v);if(!1!==M)return 1!==M&&-1!==M||(A=1===M),Zl=!0,setTimeout(uc,30),N(),A&&!T?r.appendChild(bl):s.parentNode.insertBefore(bl,A?T:s),S&&al(S,0,E-S.scrollTop),yl=bl.parentNode,void 0===b||Gl||(Rl=Math.abs(b-Ja(s)[x])),L(),k(!0)}if(r.contains(bl))return k(!1)}return!1}function O(a,l){gl(a,p,Aa({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:u,fromSortable:h,target:s,completed:k,onMove:function(n,o){return cc(Cl,r,bl,e,n,Ja(n),t,o)},changed:L},l))}function N(){O("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function k(e){return O("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(p),p!==h&&(Ga(bl,kl?kl.options.ghostClass:c.options.ghostClass,!1),Ga(bl,a.ghostClass,!0)),kl!==p&&p!==lc.active?kl=p:p===lc.active&&kl&&(kl=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){O("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===bl&&!bl.animated||s===r&&!s.animated)&&(Il=null),a.dragoverBubble||t.rootEl||s===document||(bl.parentNode[dl]._isOutsideThisEl(t.target),!e&&sc(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function L(){Al=nl(bl),Ol=nl(bl,a.draggable),vl({sortable:p,name:"change",toEl:r,newIndex:Al,newDraggableIndex:Ol,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ra(document,"mousemove",this._onTouchMove),Ra(document,"touchmove",this._onTouchMove),Ra(document,"pointermove",this._onTouchMove),Ra(document,"dragover",sc),Ra(document,"mousemove",sc),Ra(document,"touchmove",sc)},_offUpEvents:function(){var t=this.el.ownerDocument;Ra(t,"mouseup",this._onDrop),Ra(t,"touchend",this._onDrop),Ra(t,"pointerup",this._onDrop),Ra(t,"touchcancel",this._onDrop),Ra(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Al=nl(bl),Ol=nl(bl,n.draggable),gl("drop",this,{evt:t}),yl=bl&&bl.parentNode,Al=nl(bl),Ol=nl(bl,n.draggable),lc.eventCanceled||(Bl=!1,Gl=!1,Ul=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),mc(this.cloneId),mc(this._dragStartId),this.nativeDraggable&&(Ra(document,"drop",this),Ra(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ja&&Xa(document.body,"user-select",""),Xa(bl,"transform",""),t&&(Hl&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),wl&&wl.parentNode&&wl.parentNode.removeChild(wl),(Cl===yl||kl&&"clone"!==kl.lastPutMode)&&El&&El.parentNode&&El.parentNode.removeChild(El),bl&&(this.nativeDraggable&&Ra(bl,"dragend",this),dc(bl),bl.style["will-change"]="",Hl&&!Bl&&Ga(bl,kl?kl.options.ghostClass:this.options.ghostClass,!1),Ga(bl,this.options.chosenClass,!1),vl({sortable:this,name:"unchoose",toEl:yl,newIndex:null,newDraggableIndex:null,originalEvent:t}),Cl!==yl?(Al>=0&&(vl({rootEl:yl,name:"add",toEl:yl,fromEl:Cl,originalEvent:t}),vl({sortable:this,name:"remove",toEl:yl,originalEvent:t}),vl({rootEl:yl,name:"sort",toEl:yl,fromEl:Cl,originalEvent:t}),vl({sortable:this,name:"sort",toEl:yl,originalEvent:t})),kl&&kl.save()):Al!==Tl&&Al>=0&&(vl({sortable:this,name:"update",toEl:yl,originalEvent:t}),vl({sortable:this,name:"sort",toEl:yl,originalEvent:t})),lc.active&&(null!=Al&&-1!==Al||(Al=Tl,Ol=Ml),vl({sortable:this,name:"end",toEl:yl,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){gl("nulling",this),Cl=bl=yl=wl=xl=El=Sl=_l=Ll=Dl=Hl=Al=Ol=Tl=Ml=Il=Vl=kl=Nl=lc.dragged=lc.ghost=lc.clone=lc.active=null,Yl.forEach((function(t){t.checked=!0})),Yl.length=Pl=zl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":bl&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)Wa(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||hc(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];Wa(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Wa(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=ml.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&oc(n)},destroy:function(){gl("destroy",this);var t=this.el;t[dl]=null,Ra(t,"mousedown",this._onTapStart),Ra(t,"touchstart",this._onTapStart),Ra(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ra(t,"dragover",this),Ra(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ql.splice(ql.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_l){if(gl("hideClone",this),lc.eventCanceled)return;Xa(El,"display","none"),this.options.removeCloneOnHide&&El.parentNode&&El.parentNode.removeChild(El),_l=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(_l){if(gl("showClone",this),lc.eventCanceled)return;bl.parentNode!=Cl||this.options.group.revertClone?xl?Cl.insertBefore(El,xl):Cl.appendChild(El):Cl.insertBefore(El,bl),this.options.group.revertClone&&this.animate(bl,El),Xa(El,"display",""),_l=!1}}else this._hideClone()}},Kl&&Va(document,"touchmove",(function(t){(lc.active||Bl)&&t.cancelable&&t.preventDefault()})),lc.utils={on:Va,off:Ra,css:Xa,find:Ya,is:function(t,e){return!!Wa(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:sl,closest:Wa,toggleClass:Ga,clone:ll,index:nl,nextTick:pc,cancelNextTick:mc,detectDirection:nc,getChild:tl,expando:dl},lc.get=function(t){return t[dl]},lc.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(lc.utils=Aa(Aa({},lc.utils),t.utils)),ml.mount(t)}))},lc.create=function(t,e){return new lc(t,e)},lc.version="1.15.3";var fc,gc,vc,bc,yc,wc,Cc=[],xc=!1;function Sc(){Cc.forEach((function(t){clearInterval(t.pid)})),Cc=[]}function Ec(){clearInterval(wc)}var _c=sl((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=Ka(),d=!1;gc!==n&&(gc=n,Sc(),fc=e.scroll,i=e.scrollFn,!0===fc&&(fc=il(n,!0)));var u=0,h=fc;do{var p=h,m=Ja(p),f=m.top,g=m.bottom,v=m.left,b=m.right,y=m.width,w=m.height,C=void 0,x=void 0,S=p.scrollWidth,E=p.scrollHeight,_=Xa(p),T=p.scrollLeft,A=p.scrollTop;p===c?(C=y<S&&("auto"===_.overflowX||"scroll"===_.overflowX||"visible"===_.overflowX),x=w<E&&("auto"===_.overflowY||"scroll"===_.overflowY||"visible"===_.overflowY)):(C=y<S&&("auto"===_.overflowX||"scroll"===_.overflowX),x=w<E&&("auto"===_.overflowY||"scroll"===_.overflowY));var M=C&&(Math.abs(b-r)<=a&&T+y<S)-(Math.abs(v-r)<=a&&!!T),O=x&&(Math.abs(g-s)<=a&&A+w<E)-(Math.abs(f-s)<=a&&!!A);if(!Cc[u])for(var N=0;N<=u;N++)Cc[N]||(Cc[N]={});Cc[u].vx==M&&Cc[u].vy==O&&Cc[u].el===p||(Cc[u].el=p,Cc[u].vx=M,Cc[u].vy=O,clearInterval(Cc[u].pid),0==M&&0==O||(d=!0,Cc[u].pid=setInterval(function(){o&&0===this.layer&&lc.active._onTouchMove(yc);var e=Cc[this.layer].vy?Cc[this.layer].vy*l:0,n=Cc[this.layer].vx?Cc[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(lc.dragged.parentNode[dl],n,e,t,yc,Cc[this.layer].el)||al(Cc[this.layer].el,n,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=il(h,!1)));xc=d}}),30),Tc=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Ac(){}function Mc(){}Ac.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=tl(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Tc},Na(Ac,{pluginName:"revertOnSpill"}),Mc.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Tc},Na(Mc,{pluginName:"removeOnSpill"}),lc.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Va(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Va(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Va(document,"touchmove",this._handleFallbackAutoScroll):Va(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?Ra(document,"dragover",this._handleAutoScroll):(Ra(document,"pointermove",this._handleFallbackAutoScroll),Ra(document,"touchmove",this._handleFallbackAutoScroll),Ra(document,"mousemove",this._handleFallbackAutoScroll)),Ec(),Sc(),clearTimeout(qa),qa=void 0},nulling:function(){yc=gc=fc=xc=wc=vc=bc=null,Cc.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(yc=t,e||this.options.forceAutoScrollFallback||Pa||Da||ja){_c(t,this.options,r,e);var s=il(r,!0);!xc||wc&&o===vc&&i===bc||(wc&&Ec(),wc=setInterval((function(){var r=il(document.elementFromPoint(o,i),!0);r!==s&&(s=r,Sc()),_c(t,n.options,r,e)}),10),vc=o,bc=i)}else{if(!this.options.bubbleScroll||il(r,!0)===Ka())return void Sc();_c(t,this.options,il(r,!1),!1)}}},Na(t,{pluginName:"scroll",initializeByDefault:!0})}),lc.mount(Mc,Ac);const Oc={getStyle:(t,e=!1)=>{let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n},fadeOut:(t,e=250)=>{const n=1/(e/60);t.style.opacity=1,function e(){const o=Number(t.style.opacity)-n;o>0?(t.style.opacity=o,window.requestAnimationFrame(e)):t.remove()}()},slideDown:(t,e=250,n=!1)=>{t.style.display="block";const o=Oc.getStyle(t),i=Number.parseInt(o.height,10),r=i/(e/60);t.style.height="0px",function e(){const o=Number.parseFloat(t.style.height),s=o+r;o<i?(t.style.height=`${s}px`,window.requestAnimationFrame(e)):(t.style.height="auto",n&&n(t))}()},slideUp:(t,e=250,n=!1)=>{const o=Oc.getStyle(t),i=Number.parseInt(o.height,10),r=o.overflow;t.style.overflow="hidden",t.style.height=`${i}px`;const s=o.minHeight;t.style.minHeight="auto";const a=parseFloat(i/(e/60)).toFixed(2);!function e(){const o=Number.parseInt(t.style.height,10)-a;o>0?(t.style.height=`${o}px`,window.requestAnimationFrame(e)):(t.style.overflow=r,t.style.display="none",t.style.minHeight=s,delete t.style.height,n&&n(t))}()},slideToggle:(t,e=250,n="none"===Oc.getStyle(t,"display"))=>{n?Oc.slideDown(t,e):Oc.slideUp(t,e)}},Nc=t=>Number.isInteger(Number(t)),kc=t=>{let e=0,n=t;for(;n?.previousElementSibling;)n=n.previousElementSibling,e++;return e},Lc=(t,e,n)=>{const o=n.split("||"),i=qo(e).map((e=>t.find((t=>{const n=o.find((e=>!!ds(t,e)));return n&&ds(t,n)===e})))).filter(Boolean).concat(t);return qo(i)},Dc=(t,e,n)=>{for(let o=0;o<t.length;o++)e.call(n,t[o],o)},Pc=(t,e)=>{const n=[];return Dc(t,((t,o)=>n.push(e(t,o)))),n},zc={},jc=t=>{if(zc[t])return zc[t];const e=({className:"class"}[t]||t).replace(/^\d+/,"").replace(/[^a-zA-Z0-9-:]/g,"");return zc[t]=e,e},$c=t=>t.replace(/\b\w/g,(t=>t.toUpperCase())),Hc={capitalize:$c,safeAttrName:jc,forEach:Dc,copyObj:t=>window.JSON.parse(window.JSON.stringify(t)),map:Pc,subtract:(t,e)=>e.filter((e=>!~t.indexOf(e))),indexOfNode:kc,isInt:Nc,get:ds,orderObjectsBy:Lc},Ic={js:new Set,css:new Set,formeoSprite:null},Vc=(t,e,n=ei)=>new Promise((o=>fetch(t).then((t=>{if(!t.ok)return o(n(t));o(e?e(t):t)})).catch((t=>n(t))))),Rc=(t,e)=>{t.removeEventListener("load",Rc),e(t.src)},Fc=(t,e)=>{t.removeEventListener("load",Fc),e(t.src)},Bc=t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>new Promise(((e,n)=>{if(Ic.css.has(t))return e(t);Ic.css.add(t);const o=Qc.create({tag:"link",attrs:{rel:"stylesheet",href:t},action:{load:()=>Rc(o,e),error:()=>n(new Error(`${t} failed to load.`))}});document.head.appendChild(o)}))));return Promise.all(e)},Wc=t=>{const e=(new DOMParser).parseFromString(t,"image/svg+xml");return Ic.formeoSprite=e.documentElement,Ic.formeoSprite},qc=async(t=null)=>{if(Ic.formeoSprite)return Ic.formeoSprite;if(!t)return Wc('<?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>');const e=async t=>Wc(await t.text());return Vc(t,e,(()=>Vc(ai,e)))},Uc={js:t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>(t=>new Promise(((e,n)=>{if(Ic.js.has(t))return e(t);Ic.js.add(t);const o=Qc.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:t},action:{load:()=>Fc(o,e),error:()=>n(new Error(`${t} failed to load.`))}});document.head.appendChild(o)})))(t)));return Promise.all(e)},css:t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>Bc(t)));return Promise.all(e)}},Gc=t=>{const e=Object.entries(t).map((([t,e])=>Uc[t](e)));return Promise.all(e)},Xc=async t=>{if(t&&!Ic.css.has(t)&&(await Bc(t),!Ic.css.has(t)&&!Ic.css.has(ci)))return await Bc(ci)},Zc={glyphicons:t=>`<span class="glyphicon glyphicon-${t}" aria-hidden="true"></span>`,"font-awesome":t=>{const[e,n]=t.split(" ");return`<i class="${e} fa-${n}"></i>`},fontello:t=>`<i class="${fr}${t}">${t}</i>`},Yc=new Set(["input","textarea","select"]),Kc=new Set(["focus","blur"]),Jc=(t={})=>{let e=t?.attrs?.name||t?.name;if(e)return e;const n=Uo(t);let o=t.config?.label||t.attrs?.label||t?.label;return o&&("object"==typeof o&&(o=Qc.create(o).textContent),/^<.+>.+<.+>$/gim.test(o)&&(o=(t=>{const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""})(o)),e=`${n}-${Er(((t,e,n="…")=>{if(t.length<=e)return t;const o=t.slice(0,e),i=o.lastIndexOf(" ");let r=`${i>0?o.slice(0,i):o}`;return n&&(r+=n),r})(o,24,null))}`),e||n};const Qc=new class{constructor(t=Object.create(null)){this.options=t}set setOptions(t){this.options=Go(this.options,t)}processElemArg(t){let e,n=t;if("string"==typeof n)return e=n,n={tag:e},n;if(n.attrs){const{tag:t,...o}=n.attrs;if(t)if("string"==typeof t)e=t;else{e=(t.find((t=>!0===t.selected))||t[0]).value}n.attrs=o}return n.tag=e||n.tag||"div",n}render=t=>(t.id=`f-${t.id||Uo()}`,this.create(t));create=(t,e=!1)=>{if(!t)return;if(this.isDOMElement(t))return t;const n=this,o=["children","content"],{className:i,options:r,dataset:s,...a}=this.processElemArg(t);let l;o.push("tag");const{tag:c}=a;let d;const u={attrs:{},className:[Hc.get(a,"config.inputWrap")],children:[],config:{}};let h=document.createElement(c);const p={string:t=>{h.innerHTML+=t},object:t=>t&&h.appendChild(n.create(t,e)),node:t=>h.appendChild(t),component:t=>h.appendChild(t.dom),array:t=>{for(const e of t)l=n.childType(e),p[l](e)},function:t=>{t=t(),l=n.childType(t),p[l](t)},undefined:()=>null,boolean:()=>null};if(i&&(a.attrs=Go(a.attrs,{className:i})),r){const t=this.processOptions(r,a,e);if(!this.holdsContent(h)||"button"===c)return Hc.forEach(t,(t=>{u.children.push(n.create(t,e))})),a.attrs.className&&(u.className=a.attrs.className),u.id=a.id,u.config={...a.config},this.create(u,e);p.array.call(this,t),a.content=void 0,o.push("options")}if(a.attrs&&(n.processAttrs(a,h,e),o.push("attrs")),a.config){if(a.config.label&&(a.config.label&&"button"!==c||["radio","checkbox"].includes(Hc.get(a,"attrs.type")))&&!e){const t=n.label(a);if(!a.config.hideLabel){const e=[t,h];n.labelAfter(a)&&e.reverse(),u.children.push(e)}}o.push("config")}if(a.content||a.children){const t=a.content||a.children;l=n.childType(t),p[l],p[l].call(this,t)}if(s){for(const t in s)Object.hasOwn(s,t)&&(h.dataset[t]="function"==typeof s[t]?s[t]():s[t]);o.push("dataset")}a.action&&(this.actionHandler(h,a.action),o.push("action"));const m=Hc.subtract(o,Object.keys(a));for(d=m.length-1;d>=0;d--)h[m[d]]=a[m[d]];return u.children.length&&(h=this.create(u)),h};onRender=(t,e,n=333)=>{const o=Date.now(),i=()=>{!t.parentElement&&Date.now()-o<n?window.requestAnimationFrame(i):t.parentElement&&e(t)};i()};actionHandler(t,e){const n={onRender:Qc.onRender,render:Qc.onRender};return Object.entries(e).map((([e,o])=>(Array.isArray(o)?o:[o]).map((o=>{const i=n[e]||(t=>{const e=t.replace(/^on([A-Z])/,((t,e)=>e.toLowerCase()));return(t,n)=>t.addEventListener(e,n,Kc.has(e))})(e);return i(t,o)}))))}get icons(){if(this.iconSymbols)return this.iconSymbols;const t=Ic.formeoSprite.querySelectorAll("svg symbol");return this.iconSymbols=Array.from(t).reduce(((t,e)=>(t[e.id.replace(fr,"")]=(t=>{const e=t.getAttribute("viewBox")||"0 0 24 24",n=Array.from(t.children).map((t=>t.cloneNode(!0).outerHTML)).join("");return{tag:"svg",attrs:{className:["svg-icon",t.id],viewBox:e,xmlns:"http://www.w3.org/2000/svg"},children:n}})(e),t)),{}),this.cachedIcons={},this.iconSymbols}icon(t,e){if(!t)return;const n=`${t}?${new URLSearchParams(e).toString()}`;if(this.cachedIcons?.[n])return this.cachedIcons[n];const o=this.icons[t];if(o){if(e){const t=Go(o,e);return this.cachedIcons[n]=Qc.create(t).outerHTML,this.cachedIcons[n]}return this.cachedIcons[n]=Qc.create(o).outerHTML,this.cachedIcons[n]}return Zc[Qc.options.iconFont]?.(t)||t}processAttrs(t,e,n){const{attrs:o={}}=t;if(!n&&!o.name&&null!==o.name&&this.isInput(t.tag)){const n=Jc(t);n&&e.setAttribute("name",n)}for(const r of Object.keys(o)){const t=Hc.safeAttrName(r),n=this.processAttrValue(o[r]);if(!1!==n)try{e.setAttribute(t,n)}catch(i){}}}processAttrValue(t){if("function"==typeof t)return t();if("boolean"==typeof t)return t?"":t;let e=t||"";if(Array.isArray(e))if("object"==typeof e[0]){const t=e.filter((t=>!0===t.selected));e=t.length?t[0].value:e[0].value}else e=e.join(" ");return e}toggleElementsByStr=(t,e)=>{const n=[];return Qc.elementsContainText(t,e,((t,e)=>{e?(t.style.display="block",n.push(t)):t.style.display="none"})),n};elementsContainText=(t,e,n)=>{const o=[];return Dc(t,(t=>{const i=-1!==t.textContent.toLowerCase().indexOf(e.toLowerCase());n?.(t,i),i&&o.push(t)})),o};generateOption=({type:t="option",label:e,value:n,i:o=0,selected:r})=>({tag:"option"===t?"option":"input",attrs:{type:t,value:n||`${t}-${o}`,["option"===t?"selected":"checked"]:r||!o},config:{label:e||i.get("labelCount",{label:i.get("option"),count:o})}});processOptions(t,e,n){const{action:o,attrs:i={}}=e,r=i.type||e.tag,s=i.id||e.id;return t.map(((t,a)=>{const{label:l,value:c,...d}=t,u=()=>{const u={tag:"input",attrs:{name:s,type:r,value:c||"",id:`${s}-${a}`,...d},action:o},h={tag:"label",attrs:{for:`${s}-${a}`},children:l},p={children:[u,h],className:[`f-${r}`]};return i.className&&(e.config.inputWrap=i.className),e.config.inline&&p.className.push(`f-${r}-inline`),t.selected&&(u.attrs.checked=!0),n&&(h.attrs.contenteditable=!0),p},h={select:()=>{const e=t.attrs||t,n={attrs:e,...t,...e},{label:o,checked:i,selected:r,attrs:s}=n;return{tag:"option",attrs:{...s,selected:!(!i&&!r)},children:o}},button:t=>{const{type:n,label:o,className:i,id:r}=t;return{...e,attrs:{type:n},className:i,id:r||Uo(),options:void 0,children:o,action:e.action}},checkbox:u,radio:u};return h[r]?.(t)}))}holdsContent(t){return t.outerHTML.includes("/")}isBlockInput(t){return!this.isInput(t)&&this.holdsContent(t)}isInput(t){let e=t;return"string"!=typeof e&&(e=e.tagName),Yc.has(e)}parsedHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.textContent}labelAfter(t){const e=Hc.get(t,"attrs.type"),n=Hc.get(t,"config.labelAfter");return void 0===n?"checkbox"===e||"radio"===e:n}requiredMark=()=>({tag:"span",className:"text-error",children:"*"});tooltip=t=>({tag:"span",className:"f-tooltip",dataset:{tooltip:t},content:Qc.icon("info-circle")});helpText=t=>({tag:"small",className:"f-help-text",children:t});label(t,e){const n=Hc.get(t,"attrs.required");let{config:{label:o="",helpText:i="",tooltip:r=null}}=t;const{id:s,attrs:a}=t;"function"==typeof o&&(o=o());const l={tag:"label",attrs:{for:s||a?.id},className:[],children:[o,n&&this.requiredMark(),r&&this.tooltip(r),i&&this.helpText(i)],action:{}};return e&&(l.attrs.for=void 0,l.attrs.contenteditable=!0,l.fMap=e),l}childType(t){return void 0===t?t:[["array",t=>Array.isArray(t)],["node",t=>t instanceof window.Node||t instanceof window.HTMLElement],["component",()=>t?.dom],[typeof t,()=>!0]].find((e=>e[1](t)))[0]}getStyle(t,e=!1){let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n}getElement(t){return{node:()=>t,object:()=>document.getElementById(t.id),string:()=>document.getElementById(t)}[this.childType(t)]()}empty(t){for(;t.firstChild;)this.remove(t.firstChild);return t}removeEmpty=t=>{const e=t.parentElement,n=Wo(t),o=e.getElementsByClassName(`formeo-${n}`);if(this.remove(t),!o.length)return this.isStage(e)?this.emptyClass(e):this.removeEmpty(e)};remove(t){const e=Wo(t);return e?Eu.remove(`${e}s.${t.id}`):t.parentElement.removeChild(t)}removeClasses(t,e){const n={string:t=>t.classList.remove(e),array:t=>{for(const n of e)t.classList.remove(n)}};n.object=n.string,Hc.forEach(t,n[this.childType(e)])}addClasses(t,e){const n={string:t=>t.classList.add(e),array:t=>{for(const n of e)t.classList.add(n)}};Hc.forEach(t,n[this.childType(e)])}formGroup(t,e=""){return{className:["f-field-group",e],children:t}}coords(t){const e=t.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{pageX:e.left+e.width/2,pageY:e.top-n.top-e.height/2}}clearStage(t){t.classList.add("removing-all-fields");Oc.slideUp(t,600,(()=>{Qc.empty(t),t.classList.remove("removing-all-fields"),Qc.emptyClass(t),Oc.slideDown(t,300)}))}toggleSortable(t,e){let n=e;const o=Wo(t);if(!o)return;const i=Wo(t.parentElement),r=Qc[o].get(t.id).sortable;n||(n=!r.option("disabled")),r.option("disabled",n),i&&["rows","columns","stages"].includes(i)&&this.toggleSortable(t.parentElement,n)}emptyClass(t){const e=t.getElementsByClassName(yi.get(t.classList.item(0)));t.classList.toggle("empty",!e.length)}btnTemplate=({title:t="",...e})=>({tag:"button",attrs:{type:"button",title:t},...e});isControls=t=>Wo(t)===ui;isStage=t=>Wo(t)===hi;isRow=t=>Wo(t)===pi;isColumn=t=>Wo(t)===mi;isField=t=>Wo(t)===fi;asComponent=t=>Eu[`${Wo(t)}s`].get(t.id);isDOMElement(t){return t instanceof window.Element||t instanceof window.HTMLElement||!(!t||"object"!=typeof t||1!==t.nodeType||"string"!=typeof t.nodeName)}},td="f-autocomplete",ed=`${td}-display-field`,nd=`${td}-list`,od="highlight-component",id=`${nd}-item`,rd=["config.label","config.controlId"],sd=[...rd,"config.legend","name"],ad=t=>rd.reduce(((e,n)=>e||t.get(n)),null),ld=t=>sd.reduce(((e,n)=>e||t.get(n)),null)||Sr(t.name),cd=new Map([["condition.source",ad],["if.condition.source",ad],["if.condition.target",ad],["then.condition.target",ld],["condition.target",ld]]),dd=({id:t,...e},n)=>{const{name:o,label:i}=e;if(!o)return i;return cd.get(n)(e)},ud=t=>(t.classList.contains(id)||(t=t.parentElement),t),hd=({value:t,textLabel:e,htmlLabel:n,componentType:o,depth:i=0},r)=>{const s={tag:"li",children:n,dataset:{value:t,label:e},className:[id,`${id}-depth-${i}`,`component-type-${o}`],action:{mousedown:({target:t})=>{t=ud(t),r.setValue(t),r.selectOption(t),r.hideList()},mouseover:({target:t})=>{t=ud(t),r.removeHighlight(),r.highlightComponent(t)},mouseleave:({target:t})=>{t=ud(t),r.removeHighlight()}}};return Qc.create(s)},pd=t=>{const e=t.value,n=[],o=Eu.flatList(),i=Object.entries(o).reduce(((o,[i,r])=>{const s=dd(r,t.key);if(s){const a=r.name,l={tag:"span",content:` ${Sr(a)}`,className:"component-type"},c=`${a}.${s}`;n.push(c);const d=((t,e)=>{const n=t.reduce(((t,n)=>t+(n===e)),0);return n>1?`(${n})`:""})(n,c),u=[`${s} `,{tag:"span",content:d,className:"component-label-count"},l],h=[s,d].join(" ").trim();if(r.isCheckable){const e=((t,e)=>{const n=t.data.options.map(((n,o)=>{const i=`${t.address}.options[${o}]`,r=n.label,s=n.label;return hd({value:i,textLabel:r,htmlLabel:s,componentType:"option",depth:1},e)}));return Qc.create({tag:"ul",attrs:{className:[nd,"options-list"]},children:n})})(r,t);u.push(e)}const p=(({selectedId:t,...e})=>(e.value===t&&(e.selected=!0),e))({value:i,textLabel:h,htmlLabel:u,componentType:a,selectedId:e});o.push(hd(p,t))}return o}),[]);return i};class md{lastCache=Date.now();optionsCache=null;constructor({key:t,value:e,className:n,onChange:o=ei}){this.key=t,this.className=[n||this.key.replace(/\./g,"-")].flat(),this.value=e,this.onChange=o||ei,this.events=[],this.build()}createProxy(){return new Proxy(this,{get(t,e){if(e in t)return t[e];if(e in t.dom){const n=t.dom[e];return"function"==typeof n?n.bind(t.dom):n}},set:(t,e,n)=>(e in t?t[e]=n:t.dom[e]=n,!0)})}get isAddress(){return Jo(this.value)}get valueComponent(){return Jo(this.value)&&Eu.getAddress(this.value)}build(){const t=t=>{const e=this.list,n=this.getActiveOption();let o=new Map([[38,()=>{const t=this.getPreviousOption(n);t&&this.selectOption(t)}],[40,()=>{const t=this.getNextOption(n);t&&this.selectOption(t)}],[13,()=>{n&&(this.selectOption(n),this.setValue(n),"none"===e.style.display?this.showList(n):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return o||(o=()=>!1),o()},e={focus:({target:e})=>{this.updateOptions(),e.parentElement.classList.add(`${td}-focused`);const n=Qc.toggleElementsByStr(this.list.querySelectorAll(`.${id}-depth-0`),e.value);e.addEventListener("keydown",t);const o=this.list.querySelector(".active-option")||n[0];this.showList(o)},blur:({target:e})=>{e.parentElement.classList.remove(`${td}-focused`),e.removeEventListener("keydown",t),this.hideList()},input:t=>{const{value:e}=t.target,n=Qc.toggleElementsByStr(this.list.querySelectorAll("li"),e);if(0===e.length&&this.clearValue(),0===n.length)this.hideList();else{const t=this.getActiveOption()||n[0];this.showList(t)}this.setValue({dataset:{label:e,value:e}})}};return this.displayField=Qc.create({tag:"input",autocomplete:"off",action:e,attrs:{type:"text",className:ed,value:this.label||this.value,placeholder:i.get(`${this.key}.placeholder`)}}),this.hiddenField=Qc.create({tag:"input",attrs:{type:"hidden",className:td,value:this.value}}),this.list=Qc.create({tag:"ul",attrs:{className:nd}}),this.clearButton=Qc.create({tag:"span",content:Qc.icon("remove"),className:"clear-button hidden",action:{click:()=>this.clearValue()}}),this.dom=Qc.create({children:[this.displayField,this.clearButton,this.hiddenField],className:[td,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(!Jo(this.value))return this.value;const t=this.value&&Eu.getAddress(this.value);return t&&dd(t,`${this.key}`)||this.value}updateOptions(){let t=this.optionsCache;const e=Date.now();(e-this.lastCache>5*Bi||!t)&&(Qc.empty(this.list),t=this.generateOptions(),this.lastCache=e),this.list.children.length||this.list.append(...t)}generateOptions(){return this.optionsCache=pd(this),this.optionsCache}setListPosition(){const{offsetHeight:t,offsetWidth:e}=this.displayField,n=this.displayField.closest(".formeo-stage").getBoundingClientRect(),o=this.displayField.getBoundingClientRect(),i={position:"absolute",top:o.y+t-n.y+"px",left:o.x+window.scrollX-n.x+2+"px",width:`${e}px`};Object.assign(this.list.style,i)}showList(t,e=this.list){this.stage.contains(this.list)||this.stage.appendChild(this.list),this.setListPosition(),this.selectOption(t),Oc.slideDown(e,Fi)}hideList(t=this.list){Oc.slideUp(t,Fi),this.removeHighlight(),this.stage.contains(this.list)&&this.stage.removeChild(this.list)}getActiveOption(t=this.list){const e=t.querySelector(".active-option");return"none"!==e?.style.display?e:null}getPreviousOption(t){let e=t;do{e=e?e.previousSibling:null}while(null!=e&&"none"===e.style.display);return e}getNextOption(t){let e=t;do{e=e?e.nextSibling:null}while(null!=e&&"none"===e.style.display);return e}selectOption(t,e=this.list){const n=e.querySelectorAll("li");for(const o of n){const{dataset:{value:t}}=o;if(o.classList.remove("active-option"),Jo(t)){const e=Eu.getAddress(t);e?.dom?.classList.remove(od)}}t&&(t.classList.add("active-option"),this.highlightComponent(t))}removeHighlight(){const t=document.getElementsByClassName(od);for(const e of t)e.classList.remove(od)}highlightComponent(t){const{dataset:{value:e}}=t;if(Jo(e)){const{componentAddress:t,isOptionAddress:n,optionIndex:o}=_r(e).reduce(((t,e)=>"options"===e?(t.isOptionAddress=!0,t):t.isOptionAddress?(t.optionIndex=+e,t):(t.componentAddress.push(e),t)),{componentAddress:[],optionIndex:null,isOptionAddress:!1}),i=Eu.getAddress(t);if(i?.dom&&(i.dom.classList.add(od),n)){const t=i.dom.querySelectorAll(".field-preview .f-checkbox, .field-preview .f-radio");t[o]?.classList.add(od)}}}clearValue(){this.selectOption(null),this.setValue({dataset:{label:"",value:""}}),this.displayField.focus()}setValue(t){const{label:e,value:n}=t.dataset;this.displayField.value=e,this.hiddenField.value=n,this.value=n,this.clearButton.classList.toggle("hidden",!n.length),this.onChange?.({target:this.hiddenField})}}const fd=t=>i.get(`${t}.placeholder`)||Sr(Mr(t)),gd=t=>t.replaceAll(".","-"),vd=new Map([["config.helpText",(...t)=>yd(...t)],["config.tooltip",(...t)=>yd(...t)]]);function bd({key:t,value:e,type:n="text",checked:o}){const i={tag:"input",attrs:{type:n,value:e,placeholder:fd(t)},className:[gd(t)],config:{}};return o&&(i.attrs.checked=!0),i}function yd({key:t,value:e}){return{tag:"textarea",attrs:{placeholder:fd(t)},className:[gd(t)],config:{},textContent:e}}function wd(t){const e=i.get(t);if(e)return e;const n=Mr(t);return i.get(n)||Sr(n)}const Cd={autocomplete:(...t)=>new md(...t).createProxy(),string:({key:t,value:e})=>vd.has(t)?vd.get(t)({key:t,value:e}):bd({key:t,value:e}),boolean:({key:t,value:e})=>bd({key:t,value:e,type:"selected"===t?"radio":"checkbox",checked:!!e}),number:({key:t,value:e})=>bd({key:t,value:e,type:"number"}),array:({key:t,value:e})=>({tag:"select",attrs:{placeholder:wd(`placeholder.${t}`)},className:[gd(t)],options:e}),object:t=>Object.entries(t).map((([t,e])=>Cd[Qc.childType(e)]({key:t,value:e})))},xd={boolean:(t,e)=>({click:({target:n})=>{if("radio"===n.type){const t=e.data.options.map((t=>({...t,selected:!1})));e.set("options",t)}e.set(t,n.checked),e.updatePreview()}}),string:(t,e)=>({input:({target:{value:n}})=>{e.set(t,n),e.debouncedUpdatePreview()}}),number:(t,e)=>({input:({target:{value:n}})=>{e.set(t,Number(n)),e.debouncedUpdatePreview()}}),array:(t,e)=>({change:({target:{value:n}})=>{e.set(t,n),e.debouncedUpdatePreview()}}),object:()=>({})},Sd=Object.freeze({title:"",content:null,confirmText:()=>wd("save"),cancelText:()=>wd("cancel"),onConfirm:()=>{},onCancel:()=>{},className:"",closeOnEscape:!0,position:"top",triggerElement:null,triggerCoords:null});class Ed{constructor(t){this.opts=Go(Sd,t),this.dialog=null}createDialog(){const{title:t,content:e,confirmText:n,cancelText:o,className:i,closeOnEscape:r,position:s}=this.opts,a=`dialog-position-${s}`,l=[];t&&l.push({tag:"h3",className:"dialog-title",textContent:t}),e&&l.push({tag:"div",className:"dialog-body",children:Array.isArray(e)?e:[e]}),l.push({tag:"div",className:"dialog-actions",children:[{tag:"button",type:"button",className:"btn btn-sm btn-secondary",textContent:"function"==typeof o?o():o,action:{click:()=>this.handleCancel()}},{tag:"button",type:"submit",className:"btn btn-sm btn-primary",textContent:"function"==typeof n?n():n}]});return Qc.create({tag:"dialog",className:["formeo-dialog","formeo",a,i],children:[{tag:"form",className:"dialog-form",method:"dialog",children:l,action:{submit:t=>this.handleSubmit(t)}}],action:{cancel:t=>{r?this.handleCancel():t.preventDefault()}}})}handleSubmit(t){t.preventDefault();const e=new FormData(t.target);this.opts.onConfirm(e,this),this.close()}handleCancel(){this.opts.onCancel(this),this.close()}setPosition(){const{position:t,triggerElement:e,triggerCoords:n}=this.opts;if("trigger"!==t||!this.dialog)return;let o=n;if(!o&&e){const t=e.getBoundingClientRect();o={x:t.left+t.width/2,y:t.bottom+8}}if(o){const t=this.dialog.getBoundingClientRect(),e=window.innerWidth,n=window.innerHeight;let i=o.x-t.width/2,r=o.y;const s=16;i=Math.max(s,Math.min(i,e-t.width-s)),r=Math.max(s,Math.min(r,n-t.height-s)),this.dialog.style.left=`${i}px`,this.dialog.style.top=`${r}px`,this.dialog.style.transform="none"}}open(){if(this.dialog||(this.dialog=this.createDialog()),document.body.appendChild(this.dialog),this.dialog.showModal(),"trigger"===this.opts.position){const t=setTimeout((()=>{this.setPosition(),clearTimeout(t)}),0)}return this}close(){this.dialog&&(this.dialog.close(),this.dialog.remove(),this.dialog=null)}static alert(t,e=()=>{}){return new Ed({content:{tag:"p",className:"dialog-message",textContent:t},confirmText:()=>i.get("ok")||"OK",cancelText:"",onConfirm:()=>e()})}static confirm(t,e=()=>{},n=()=>{}){return new Ed({content:{tag:"p",className:"dialog-message",textContent:t},confirmText:()=>i.get("confirm")||"Confirm",onConfirm:()=>e(),onCancel:()=>n()})}static prompt(t,e=()=>{},n=""){return new Ed({content:[{tag:"label",className:"dialog-prompt-label",children:[{tag:"p",className:"dialog-message",textContent:t},{tag:"input",type:"text",name:"prompt-value",className:"dialog-prompt-input",value:n}]}],onConfirm:t=>{const n=t.get("prompt-value");e(n)}})}}const _d="hidden-property",Td=/\.options\[\d+\]$/,Ad={"if-sourceProperty":hs(lr,sr,ar),"if-targetProperty":hs(lr),"then-targetProperty":hs(lr,sr,ar),...Object.entries(cr).reduce(((t,[e,n])=>(t[`if-${e}`]=n,t[`then-${e}`]=n,t)),{})},Md={assignment:Nd,comparison:Nd,logical:Nd,source:({key:t,value:e,onChange:n,conditionType:o})=>Cd.autocomplete({key:`${o}.condition.${t}`,value:e,onChange:n,className:`condition-${t}`}),sourceProperty:Nd,targetProperty:Nd,target:t=>Md.source(t),value:({key:t,value:e,onChange:n},o)=>{const i=Cd.string({key:`condition.${t}`,value:e});return i.action={input:n},i}};function Od({key:t,value:e,conditionType:n}){const o=Ad[`${n}-${t}`];return Object.entries(o||{}).map((([n,o])=>function({fieldName:t,fieldValue:e,key:n,optionValue:o}){return{label:i.get(`${t}.${n}`)||Sr(n).toLowerCase(),value:o,selected:o===e}}({fieldName:t,fieldValue:e,key:n,optionValue:o})))}function Nd({key:t,value:e,onChange:n,conditionType:o}){const i=Od({key:t,value:e,conditionType:o}),r=Cd.array({key:`condition.${t}`,value:i});return r.action={change:n},r}const kd={sourceProperty:t=>{const e=t.get("source"),n=t.get("sourceProperty"),o=!!e.value,i=!!e.value.match(Td);return zd(i,n),!o},comparison:t=>{const e=t.get("source"),n=t.get("sourceProperty"),o=!!e.value,i=!!e.value.match(Td);return!o||i||"value"!==n.value},assignment:t=>{const e=t.get("target"),n=t.get("targetProperty");return!!!e.value||n.value.startsWith("is")},targetProperty:t=>{const e=t.get("target"),n=t.get("targetProperty"),o=!!e.value.match(Td);return zd(o,n),i=e.value,!xi.test(i);var i},target:t=>{const e=t.get("source"),n=t.get("sourceProperty");return!(!n||!!e?.value)||n&&"value"!==n?.value},value:t=>{const e=t.get("target"),n=t.get("targetProperty");return void 0!==n&&(!(!e||e.value)||(o=t.get("comparison"),!!o?.classList.contains(_d)||(n.value===Dd||n.value.startsWith("is"))));var o}},Ld=t=>{for(const[e,n]of t){const o=!!kd[e]?.(t)||!1;n.classList.toggle(_d,o)}},Dd="isChecked",Pd=t=>t.value.endsWith("Checked"),zd=(t,e)=>{if(t&&Pd(e))return null;const n=Array.from(e.querySelectorAll("option")),o=[];for(const i of n){const e=Pd(i),n=t?!e:e;n&&o.push(i.value),i.classList.toggle("hidden-option",n)}o.includes(e.value)&&(e.value=t?Dd:n.find((t=>!Pd(t)))?.value||e.value)};class jd{constructor({conditionValues:t,conditionType:e,conditionCount:n,index:o},i){this.values=new Map(function(t,e=rr){return e.reduce(((e,n)=>(void 0!==t[n]&&e.push([n,t[n]]),e)),[])}(t)),this.conditionType=e,this.parent=i,this.baseAddress=`${i.address}.${e}`,this.fields=new Map,this.conditionCount=n,this.index=o,this.dom=this.generateDom()}setConditionIndex(t){this.index=t}get address(){return`${this.baseAddress}[${this.index}]`}destroy(){const t=Eu.getAddress(this.baseAddress);t.splice(this.index,1),Eu.setAddress(this.baseAddress,t),Oc.slideUp(this.dom,Fi,(()=>{this.dom.remove()}))}label(){return this.index?null:{tag:"label",className:`condition-label ${this.conditionType}-condition-label`,content:i.get(`condition.type.${this.conditionType}`)}}generateDom(){const t=[];for(const[n,o]of this.values){const e=t=>this.onChangeCondition({key:n,target:t.target}),i={key:n,value:o,conditionType:this.conditionType,onChange:e},r=Md[n](i,this.values),s=r.dom||Qc.create(r);this.fields.set(n,r.dom?r:s),t.push(s)}const e={children:[this.label(),...t,...this.generateConditionTypeActionButtons()],className:`f-condition-row ${this.conditionType}-condition-row display-none`,action:{onRender:t=>{this.processUiState()}}};return Qc.create(e)}generateConditionTypeActionButtons(){const t=[],e="manage-condition-type",n=t=>`${t}-condition-type`,o=Qc.btnTemplate({title:i.get(`remove${this.conditionType}Condition`),className:[e,n("remove")],content:Qc.icon("minus"),action:{click:()=>this.destroy(),mouseover:t=>{this.dom.classList.add("to-remove")},mouseout:t=>{this.dom.classList.remove("to-remove")}}});t.push(o);const r=Qc.btnTemplate({title:i.get(`add${this.conditionType}Condition`),className:[e,n("add")],content:Qc.icon("plus"),action:{click:()=>{const t=this.parent.addConditionType(this.conditionType),e={changedProperty:null,dataPath:t.address,value:t.value,src:t.dom};this.updateDataDebounced(e)}}});return t.push(r),t}get value(){return Array.from(this.fields).reduce(((t,[e,n])=>(t[e]=n.value,t)),{})}processUiState(){Ld(this.fields),this.dom.classList.remove("display-none")}updateDataDebounced=Qo((t=>{Ou.formeoUpdated(t),Eu.setAddress(t.dataPath,t.value)}));onChangeCondition=({key:t,target:e})=>{const n={changedProperty:t,dataPath:this.address,value:this.value,src:e};Ld(this.fields),this.updateDataDebounced(n)}}const $d=new Map([["attrs",({itemKey:t})=>t],["options",({itemKey:t,key:e})=>`${t}.${e}`]]),Hd=(t,e)=>{if("select"===e.controlId){const n=e.editPanels.get("options"),[o,i]=t?vr:br,r=n.data.map((({[o]:t,...e})=>({[i]:t,...e})));n.setData(r)}},Id=new Map([["attrs-multiple",t=>({change:({target:e})=>{"select"===t.field.controlId&&Hd(e.checked,t.field)}})]]);class Vd{constructor({key:t,index:e,field:n,panel:o,data:i}){this.field=n,this.itemKey=t,this.itemIndex=e,this.panel=o,this.panelName=o.name,this.isDisabled=n.isDisabledProp(t,this.panelName),this.isHidden=this.isDisabled&&n.config.panels[this.panelName].hideDisabled,this.isLocked=n.isLockedProp(t,this.panelName),this.address=`${n.indexName}.${n.id}.${t}`,this.itemSlug=Tr(t),this.conditionTypeWrap=new Map,void 0!==i&&void 0===this.field.get(this.itemKey)&&this.field.set(this.itemKey,i);const r=[`field-${this.itemSlug}`,"prop-wrap"];this.isHidden&&r.push("hidden-property"),this.dom=Qc.create({tag:"li",className:r,children:{className:"component-prop",children:[this.itemInputs(),this.itemControls]}})}get itemValues(){const t=this.field.get(this.itemKey);return t?.constructor===Object?Lc(Object.entries(t),vr,"0"):[[this.itemKey,t]]}findOrCreateConditionTypeWrap(t){let e=this.conditionTypeWrap.get(t);return e||(e=Qc.create({className:`type-conditions-wrap ${t}-conditions-wrap`}),this.conditionTypeWrap.set(t,e),e)}itemInputs(){const t=Qc.create({className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map((([t,e])=>"conditions"===this.panelName?this.generateConditionFields(t,e):this.itemInput(t,e)))});return this.inputs&&this.inputs.replaceWith(t),this.inputs=t,t}addConditionType=(t,e)=>{const n=this.findOrCreateConditionTypeWrap(t);let o=e;if(!o){const[e]=hr()[t],i=n.children.length;"if"===t&&(e.logical="||"),o={conditionValues:e,conditionCount:i,index:i}}const i=new jd({conditionType:t,...o},this);return n.appendChild(i.dom),i};removeConditionType=(t,e)=>{const n=this.conditionTypeWrap.get(t).children[e];n.destroy(),n.dom.remove()};generateConditionFields=(t,e)=>(this.conditions=new Map,e.forEach(((n,o)=>{const i=this.addConditionType(t,{index:o,conditionCount:e.length,conditionValues:n});this.conditions.set(o,i)})),this.findOrCreateConditionTypeWrap(t));get itemControls(){if(this.isLocked){return{className:`${this.panelName}-prop-controls prop-controls`,content:[]}}const t={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{Oc.slideUp(this.dom,Ri,(t=>{this.field.remove(this.itemKey),t.remove(),this.panel.updateProps()}))},mouseover:t=>{this.dom.classList.add("to-remove")},mouseout:t=>{this.dom.classList.remove("to-remove")}},content:Qc.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[t]}}getConfigAttrOptions(t){const e=t.split(".").pop(),n=this.field.config?.attrs?.[e];return Array.isArray(n)?n:null}itemInput(t,e){if(this.isDisabled)return null;let n=Qc.childType(e)||"string",o=e;if("attrs"===this.panelName){const i=this.getConfigAttrOptions(t);i&&(o=i.map((t=>({...t,selected:t.value===e}))),n="array")}const i=$d.get(this.panelName)?.({itemKey:this.itemKey,key:t})||this.itemKey,r=i.split(".").filter(Number.isNaN).join(".")||t,s=Cd[n]({key:t,value:o}),a=`${this.field.shortId}-${Tr(i).replaceAll(/-\d+-(selected)/g,"-$1")}`,l={label:"options"!==this.panelName&&wd(r),labelAfter:!1,inputWrap:["f-input-wrap",this.isLocked&&"locked-prop",this.isDisabled&&"disabled-prop"].filter(Boolean).join(" ")},c={name:"checkbox"===s.attrs.type?`${a}[]`:a};c.disabled=this.isDisabled,c.readonly=this.isLocked;const d=Id.get(this.itemSlug)?.(this),u=function(t,e={}){const n={...t};for(const o in e)Object.hasOwn(e,o)&&(Object.hasOwn(n,o)?Array.isArray(n[o])?n[o].push(e[o]):n[o]=[n[o],e[o]]:n[o]=e[o]);return n}(xd[n](i,this.field),d||{}),h=Go(Cd[n]({key:t,value:o}),{action:u,attrs:c,config:l});return vr.includes(t)?{className:"f-addon",children:h}:h}}const Rd={multiple:(t,e)=>{Hd(!!t,e)}},Fd=[{label:wd("config.label"),value:"label"},{label:wd("config.hideLabel"),value:"hideLabel"},{label:wd("config.helpText"),value:"helpText"},{label:wd("config.labelAfter"),value:"labelAfter"},{label:wd("config.disableHtmlLabel"),value:"disableHtmlLabel"},{label:wd("config.tooltip"),value:"tooltip"}],Bd={label:"New Field",hideLabel:!1,helpText:"",labelAfter:!1,disableHtmlLabel:!1,tooltip:""};class Wd{constructor(t,e,n){this.type=Qc.childType(t),this.name=e,this.component=n,this.panelConfig=this.getPanelConfig(this.data)}get data(){const t=this.component.get(this.name);return"object"===this.type?Object.entries(t):t}getPanelConfig(t){return this.props=this.createProps(t),this.editButtons=this.createEditButtons(),{config:{label:i.get(`panel.label.${this.name}`)},attrs:{className:`${di} ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(t=this.data){this.editPanelItems=Array.from(t).map(((t,e)=>{const n="array"===this.type,o=t[0],i=n?`[${e}]`:`.${t[0]}`,r=n?t:{[t[0]]:t[1]},s=`${this.name}${i}`,a=this.component.isDisabledProp(s,this.name),l=yr.get(this.name)?.has(o)??!0;return a||!l?null:new Vd({key:s,data:r,field:this.component,index:e,panel:this})})).filter(Boolean);const e={tag:"ul",attrs:{className:["edit-group",`${this.component.name}-edit-group`,`${this.component.name}-edit-${this.name}`]},editGroup:this.name,isSortable:"options"===this.name,content:this.editPanelItems};return Qc.create(e)}updateProps(){const t=this.createProps();this.props.replaceWith(t),this.props=t}createEditButtons(){const t=this.name,e={attrs:this.addAttribute,options:this.addOption,conditions:this.addCondition,config:this.addConfiguration},n=[];if("conditions"===t){i.current&&!i.current.clearAll&&i.put("clearAll","Clear All");const e={...Qc.btnTemplate({content:[Qc.icon("bin"),i.get("clearAll")],title:i.get("clearAll")}),className:`clear-all-${t}`,action:{click:()=>{this.clearAllItems()}}};n.push(e)}const o=i.get(`panelEditButtons.${t}`)||`+ Add ${Sr(t)}`,r={...Qc.btnTemplate({content:o,title:o}),className:`add-${t}`,action:{click:n=>{const o={btnCoords:Qc.coords(n.target),addAction:e[t]};"attrs"===t&&(o.isDisabled=this.component.isDisabledProp,o.isLocked=this.component.isLockedProp,o.message={attr:i.get(`action.add.${t}.attr`),value:i.get(`action.add.${t}.value`)});const r=Sr(t),s=new globalThis.CustomEvent(`onAdd${r}`,{detail:o});Du.add[t](o),document.dispatchEvent(s)}}};n.push(r);return{className:"panel-action-buttons",content:n}}addAttribute=(t,e)=>{let n=e;const o=jc(t),r=`attrs.${o}`;i.current[r]||i.put(r,$c(t)),"string"==typeof n&&["true","false"].includes(n)&&(n=JSON.parse(n)),this.component.set(`attrs.${t}`,n),Rd[o]?.(n,this.component);const s=this.props.querySelector(`.${this.component.name}-attrs-${o}`),a=new Vd({key:r,data:{[o]:n},field:this.component,panel:this});s?s.replaceWith(a.dom):this.props.appendChild(a.dom),this.component.resizePanelWrap()};addOption=()=>{const t=this.component.data.config.controlId,e=this.component.get("options"),n="select"===t?"option":t,o=i.get("newOptionLabel",{type:n})||"New Option",r=`${this.name}[${this.data.length}]`,s=e[e.length-1],a={...e.length?s:{},label:o};"button"!==t&&(a.value=Er(o));const l=new Vd({key:r,data:a,field:this.component,index:this.props.children.length,panel:this});this.editPanelItems.push(l),this.props.appendChild(l.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()};addCondition=t=>{const e=`conditions[${this.component.get("conditions").length}]`,n=new Vd({key:e,data:t.template,field:this.component,panel:this});this.props.appendChild(n.dom),this.component.set(e,t.template),this.component.resizePanelWrap()};addConfiguration=()=>{const t=this.component.get("config");new Ed({className:"config-item-dialog",content:[{tag:"select",config:{label:i.get("selectConfigKey")||"Select Configuration Key"},attrs:{name:"selectConfigKey",required:!0,className:"config-key-select"},options:Fd.filter((e=>!(e.value in t)))}],onConfirm:t=>{const e=t.get("selectConfigKey").trim();if(e){const t=new Vd({key:`config.${e}`,data:Bd[e],field:this.component,panel:this});this.editPanelItems.push(t),this.props.appendChild(t.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()}}}).open()};clearAllItems=()=>{const t="array"===this.type?[]:{},e={type:this.name,removeAction:()=>{this.component.set(this.name,t),this.updateProps()}};Du.remove[this.name](e);const n=Sr(this.name),o=new globalThis.CustomEvent(`onRemove${n}`,{detail:e});document.dispatchEvent(o)};setData(t){this.data=t,this.component.set(this.name,t),this.updateProps()}}const qd=Object.freeze({type:"field",displayType:"slider"}),Ud=t=>({transform:`translateX(${t?`${t}px`:0})`});class Gd{constructor(t){this.opts=Go(qd,t),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const e=this.createPanelsWrap();this.nav=this.navActions(),this.nav.groupChange(this.activePanelIndex);const n=new window.ResizeObserver((([{contentRect:{width:t}}])=>{this.currentWidth!==t&&(this.toggleTabbedLayout(),this.currentWidth=t,this.nav.setTranslateX(this.activePanelIndex,!1))})),o=window.setTimeout((()=>{n.observe(e),window.clearTimeout(o)}),Bi)}getPanelDisplay(){const t=this.panelsWrap,e=Number.parseInt(Qc.getStyle(t,"width"),10)>390?"tabbed":"slider",n="auto"===this.opts.displayType;return this.panelDisplay=n?e:this.opts.displayType||qd.displayType,this.panelDisplay}toggleTabbedLayout=()=>{this.getPanelDisplay();const t=this.isTabbed;return this.panelsWrap.parentElement?.classList.toggle("tabbed-panels",t),t&&this.panelNav.removeAttribute("style"),t};resizePanels=()=>{this.toggleTabbedLayout()};createPanelsWrap(){const t=Qc.create({className:"panels",content:this.opts.panels.map((({config:t,...e})=>e))});return"field"===this.opts.type&&this.sortableProperties(t),this.panelsWrap=t,this.panels=t.children,this.currentPanel=this.panels[this.activePanelIndex],t}sortableProperties(t){const e=t.getElementsByClassName("field-edit-group");return Hc.forEach(e,(t=>{t.fieldId=this.opts.id,t.isSortable&&lc.create(t,{animation:150,group:{name:`edit-${t.editGroup}`,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:t=>{this.propertySave(t.to),this.resizePanels()}})}))}createPanelNavLabels(){const t=this.opts.panels.map((t=>({tag:"h5",action:{click:t=>{const e=kc(t.target);this.nav.setTranslateX(e,!1),this.nav.groupChange(e)}},content:t.config.label}))),e={className:"panel-labels",content:{content:t}},[n]=t;return n.className="active-tab",Qc.create(e)}createPanelNav(){this.labels=this.createPanelNavLabels();const t={tag:"button",attrs:{className:"next-group",title:i.get("controlGroups.nextGroup"),type:"button"},action:{click:t=>this.nav.nextGroup(t)},content:Qc.icon("triangle-right")},e={tag:"button",attrs:{className:"prev-group",title:i.get("controlGroups.prevGroup"),type:"button"},action:{click:t=>this.nav.prevGroup(t)},content:Qc.icon("triangle-left")};return Qc.create({tag:"nav",attrs:{className:"panel-nav"},content:[e,this.labels,t]})}get isTabbed(){return"tabbed"===this.panelDisplay}navActions(){const t={},e=this.currentPanel.parentElement,n=this.labels.firstChild,o=n.children,i=this.currentPanel.parentElement.childNodes;this.activePanelIndex=kc(this.currentPanel);let r={nav:0,panel:0},s={...r};t.groupChange=t=>(this.activePanelIndex=t,this.currentPanel=i[t],Qc.removeClasses(i,"active-panel"),Qc.removeClasses(o,"active-tab"),this.currentPanel.classList.add("active-panel"),o[t].classList.add("active-tab"),this.currentPanel);const a=({offset:t,reset:o,duration:i=Fi,animate:r=!this.isTabbed})=>{const a=[Ud(s.panel),Ud(t.panel)],l=[Ud(s.nav),Ud(this.isTabbed?0:t.nav)];if(o){const[t]=a,[e]=l;a.push(t),l.push(e)}const c={easing:"ease-in-out",duration:r?i:0,fill:"forwards"},d=e.animate(a,c);n.animate(l,c);const u=()=>{d.removeEventListener("finish",u),o||(s=t)};d.addEventListener("finish",u)};return t.setTranslateX=(t=this.activePanelIndex,o=!0)=>{var i;i=t,r={nav:-n.offsetWidth*i,panel:-e.offsetWidth*i},a({offset:r,animate:o})},t.refresh=(e=this.activePanelIndex)=>{this.activePanelIndex!==e&&t.groupChange(e),t.setTranslateX(this.activePanelIndex,!1),this.resizePanels()},t.nextGroup=()=>{const e=this.activePanelIndex+1;if(e!==i.length){const o=i[e];r={nav:-n.offsetWidth*e,panel:-o.offsetLeft},a({offset:r}),t.groupChange(e)}else r={nav:s.nav-8,panel:s.panel-8},a({offset:r,reset:!0});return this.currentPanel},t.prevGroup=()=>{if(0!==this.activePanelIndex){const e=this.activePanelIndex-1,o=i[e];r={nav:-n.offsetWidth*e,panel:-o.offsetLeft},a({offset:r}),t.groupChange(e)}else r={nav:8,panel:8},a({offset:r,reset:!0})},t}}let Xd=null;const Zd=hs(lr);class Yd extends Ea{constructor(t,e={}){const n={...e,id:e.id||Uo()};super(t,n),this.id=n.id,this.shortId=this.id.slice(0,this.id.indexOf("-")),this.name=t,this.indexName=`${t}s`,this.config={...n.config,...Eu[`${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((([t,e])=>{this.addEventListener(t,e)}))}addEventListener(t,e){this.eventListeners.has(t)||this.eventListeners.set(t,[]),this.eventListeners.get(t).push(e)}removeEventListener(t,e){if(!this.eventListeners?.has(t))return;const n=this.eventListeners.get(t),o=n.indexOf(e);o>-1&&n.splice(o,1)}dispatchComponentEvent(t,e={}){const n={component:this,target:this,type:t,timestamp:Date.now(),...e};return this.eventListeners?.has(t)&&this.eventListeners.get(t).forEach((t=>{try{"function"==typeof t&&t(n)}catch(e){}})),n}set(t,e){const n=this.get(t),o=super.set(t,e);return n!==e&&this.dom&&this.dispatchComponentEvent("onUpdate",{path:t,oldValue:n,newValue:e}),o}get js(){return this.data}get json(){return this.data}remove=t=>{if(t){const e=_r(t),n=e.pop(),o=this.get(e);return Array.isArray(o)?Nc(n)?o.splice(Number(n),1):this.set(e,o.filter((t=>t!==n))):delete o[n],o}if("stage"===this.name)return null;const e=this.parent,n=this.children;this.dispatchComponentEvent("onRemove",{path:t,parent:e,children:[...n]}),Dc(n,(t=>t.remove())),this.dom.remove(),((t,e)=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})(Eu.getAddress(`${e.name}s.${e.id}.children`),this.id),e.children.length||e.emptyClass(),"row"===e.name&&e.autoColumnWidths();const o={row:tr,column:er,field:nr}[this.name];return o&&Ou.formeoUpdated({componentId:this.id,componentType:this.name,parent:e},o),Eu[`${this.name}s`].delete(this.id)};empty(){const t=this.children.map((t=>(t.remove(),t)));return this.dom.classList.add("empty"),t}emptyClass=()=>this.dom.classList.toggle("empty",!this.children.length);getActionButtons(){const t=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:()=>{Eu.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...t)},mouseleave:({target:e})=>{this.dom.classList.remove(...t),Eu.stages.active.dom.classList.remove(`active-hover-${this.name}`),e.removeAttribute("style")}},children:[{...Qc.btnTemplate({content:Qc.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}getComponentTag=()=>Qc.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[Qc.icon(`handle-${this.name}`),Sr(this.name)].filter(Boolean)});toggleEdit(t=!this.isEditing){this.isEditing=t;const e=this.dom,n="editing",o=`${n}-${this.name}`,i=this.dom.querySelector(`.${this.name}-edit`);Oc.slideToggle(i,Ri,t),"field"===this.name&&(Oc.slideToggle(this.preview,Ri,!t),e.parentElement.classList.toggle(`column-${o}`,t)),e.classList.toggle(n,t),e.classList.toggle(o,t)}get buttons(){if(this.actionButtons)return this.actionButtons;const t={handle:(t=`handle-${this.name}`)=>({...Qc.btnTemplate({content:Qc.icon(t)}),className:["component-handle"]}),move:(t="move")=>({...Qc.btnTemplate({content:Qc.icon(t)}),className:["item-move"],meta:{id:"move"}}),edit:(t="edit")=>({...Qc.btnTemplate({content:Qc.icon(t)}),className:["edit-toggle"],meta:{id:"edit"},action:{click:()=>{this.toggleEdit()}}}),remove:(t="remove")=>({...Qc.btnTemplate({content:Qc.icon(t)}),className:["item-remove"],meta:{id:"remove"},action:{click:()=>{Oc.slideUp(this.dom,Ri,(()=>{if("column"===this.name){this.parent.autoColumnWidths(),this.remove()}else this.remove()}))}}}),clone:(t="copy")=>({...Qc.btnTemplate({content:Qc.icon(t)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),"column"===this.name&&this.parent.autoColumnWidths()}}})},{buttons:e,disabled:n}=this.config.actionButtons,o=e.filter((t=>!n.includes(t))).map((e=>t[e]?.()||e));return this.actionButtons=o,this.actionButtons}get index(){return kc(this.dom)}removeClasses=t=>{const e={string:()=>this.dom.classList.remove(t),array:()=>t.map((t=>this.dom.classList.remove(t)))};return e.object=e.string,e[Qc.childType(t)](this.dom)};get parentType(){return $i.get(this.name)}get parent(){const t=this.parentType;if(!this.dom||!t)return null;const e=this.dom.closest(`.${Mi[t]}`);return e&&Qc.asComponent(e)}get children(){if(!this.dom)return[];const t=this.domChildren,e=zi.get(this.name);return Pc(t,(t=>Eu.getAddress(`${e}s.${t.id}`))).filter(Boolean)}loadChildren=(t=this.data.children)=>t.map((t=>this.addChild({id:t})));get domChildren(){const t=this.dom.querySelector(".children");return t?t.children:[]}addChild(t={},e=this.domChildren.length){let n=t;"object"!=typeof t&&(n={id:n});const o=this.dom.querySelector(".children"),{id:i=Uo()}=n,r=zi.get(this.name);if(!r)return null;const s=`${r}s`,a=Eu.getAddress(`${s}.${i}`)||Eu[s].add(i,n);e>=o.children.length?o.appendChild(a.dom):o.children[e].before(a.dom),this.dispatchComponentEvent("onAddChild",{parent:this,target:a,child:a,index:e}),a.dispatchComponentEvent("onAdd",{parent:this,target:a,index:e,addedVia:"addChild"}),this.config.events?.onAddChild?.({parent:this,child:a});const l=a.get("children");return l?.length&&a.loadChildren(l),this.removeClasses("empty"),this.saveChildOrder(),a}saveChildOrder=()=>{if(this.render)return;const t=this.children.map((({id:t})=>t));return this.set("children",t),t};onAdd({from:t,to:e,item:n,newIndex:o}){t.classList.contains(ui)||(t=t.parentElement);const i=Wo(t),r=Wo(e.parentElement),s=new Map([[-2,()=>{const t=this.addChild({},o).addChild();return t.addChild.bind(t)}],[-1,()=>{const t=this.addChild({},o);return t.addChild.bind(t)}],[0,()=>this.addChild.bind(this)],[1,t=>{const e=kc(this.dom);return()=>this.parent.addChild(t,e+1)}],[2,t=>()=>this.parent.parent.addChild(t)]]),a={controls:async()=>{if(!Xd){const{default:t}=await Promise.resolve().then((()=>hu));Xd=t}const{controlData:{meta:{id:t},...e}}=Xd.get(n.id);us(e,"config.controlId",t);const i=t.startsWith("layout-")?t.replace(/^layout-/,""):"field",r=ds({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}.${i}`),a=s.get(r)();Qc.remove(n);return a(e,o)},row:()=>{const t=(s.get({stage:-1,row:0,column:1}[r])||ti)();return t?.({id:n.id},o)},column:()=>{const t=(s.get({stage:-2,row:-1}[r])||ti)();return t?.(n.id)}},l=a[i]?.(n,o);return this.dispatchComponentEvent("onAdd",{from:t,to:e,item:n,newIndex:o,fromType:i,toType:r,addedComponent:l,addedVia:"dragDrop"}),(()=>{this.saveChildOrder(),this.removeClasses("empty")})(),l}onSort=()=>this.saveChildOrder();onRemove({from:{parentElement:t}}){return t.classList.contains(mi)&&t.classList.remove("column-editing-field"),"stage"===this.name||this.children.length?(this.emptyClass(),this.saveChildOrder()):this.remove()}onEnd=({to:{parentElement:t},from:{parentElement:e}})=>{t?.classList.remove(`hovering-${Wo(t)}`),e?.classList.remove(`hovering-${Wo(e)}`)};onRender(){this.dispatchComponentEvent("onRender",{dom:this.dom});const{events:t}=this.config;if(!t)return null;t.onRender&&Qc.onRender(this.dom,t.onRender)}set config(t){const e=ds(t,"all"),n=ds(this.data,"config.controlId"),o=[e,n&&ds(t,n),ds(t,this.id)].reduce(((t,e)=>e?Go(t,e):t),this.configVal);this.configVal=o}get config(){return this.configVal}runConditions=()=>{const t=this.get("conditions");if(!t?.length)return null;return t.map((t=>{const e=this.processConditions(t.if),n=this.processResults(t.then);return e.map((t=>this.evaluateConditions(t)&&this.execResults(n)))}))};getComponent(t){const[e,n]=t.split("."),o=Eu[e];return n===this.id?this:o?.get(n)}value=(t,e)=>{const n=t.split("."),o=this.getComponent(t),i=o&&n.slice(2,n.length).join(".");return[!o,!i,!Zd[i]].some(Boolean)?t:e?o.set(Zd[i],e):o.get(Zd[i])};getResult=t=>({"=":(t,e,n)=>t.set(e,n)}[t]);processResults=t=>t.map((({operator:t,target:e,value:n})=>{const o=this.getComponent(e);return{target:o,propertyPath:o&&e.split(".").slice(2,e.length).join("."),action:this.getResult(t),value:this.value(n)}}));execResults=t=>{const e=t.map((t=>this.execResult(t)));return Promise.all(e)};execResult=({target:t,action:e,value:n,_propertyPath:o})=>new Promise(((o,i)=>{try{return o(e(t,n))}catch(r){return i(r)}}));cloneData=()=>{const t={...Xo(this.data),id:Uo()};return"field"!==this.name&&(t.children=[]),t};clone=(t=this.parent)=>{const e=t.addChild(this.cloneData(),this.index+1);return"field"!==this.name&&this.cloneChildren(e),this.dispatchComponentEvent("onClone",{original:this,clone:e,parent:t}),e};cloneChildren(t){for(const e of this.children)e?.clone(t)}createChildWrap=t=>Qc.create({tag:"ul",attrs:{className:"children"},children:t});get isRow(){return this.name===Ti.row}get isColumn(){return this.name===Ti.column}get isField(){return this.name===Ti.field}isDisabledProp=(t,e="attrs")=>{if(ds(this.config,t))return!1;if((this.config?.disabled||[]).includes(t))return!0;const n=Mr(t);return(this.config?.panels[e]?.disabled||[]).includes(n)};isLockedProp=(t,e="attrs")=>{if((this.config?.locked||[]).includes(t))return!0;const n=Mr(t);return!!(this.config?.panels[e]?.locked||[]).includes(n)};get editWindow(){const t={className:["component-edit",`${this.name}-edit`,"slide-toggle","formeo-panels-wrap"]},e=this.editPanels.size;return e&&(t.className.push(`panel-count-${e}`),t.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh),t.action={onRender:()=>{if(0===e){const t=this.dom.querySelector(".edit-toggle"),e=this.dom.querySelector(`.${this.name}-actions`),n=e.getElementsByTagName("button");e.style.maxWidth=n.length*n[0].clientWidth+"px",Qc.remove(t)}else this.resizePanelWrap()}},Qc.create(t)}updateEditPanels=()=>{if(!this.config)return null;const t=new Set(["object","array"]),e=qo([...this.config.panels.order,...Object.keys(this.data)]),n=new Set(["children","meta","action","events",...this.config.panels.disabled]),o=e.filter((t=>!n.has(t)));for(const r of o){const e=this.get(r),n=Qc.childType(e);if(t.has(n)){const t=new Wd(e,r,this);this.editPanels.set(t.name,t)}}const i={panels:Array.from(this.editPanels.values()).map((({panelConfig:t})=>t)),id:this.id,displayType:"auto"};this.panels=new Gd(i),this.dom&&(this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav),this.dom.querySelector(".panels").replaceWith(this.panels.panelsWrap))}}class Kd{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(t){const e=t.querySelector(".children");if(!e)return 0;const n=e.children.length,o=Qc.getStyle(e,"gap")||"0px",i=parseFloat(o,10)||0;return this.totalGapWidth=i*(n-1),e.offsetWidth-this.totalGapWidth}validateResizeTarget(t,e){return t&&e&&t.offsetWidth&&e.offsetWidth}onStart(t){if(t.preventDefault(),this.resized=!1,0!==t.button)return;const e=t.target.parentElement,n=e.nextSibling||e.previousSibling,o=e.closest(`.${pi}`);if(this.validateResizeTarget(e,n))if(this.startX="touchstart"===t.type?t.touches[0].clientX:t.clientX,o.classList.add(bi),this.columnPreset=o.querySelector(`.${vi}`),this.originalColumnClass=e.className,this.originalSiblingClass=n.className,e.className=e.className.replace(mr,""),n.className=n.className.replace(mr,""),this.colStartWidth=e.offsetWidth,this.sibStartWidth=n.offsetWidth,this.rowWidth=this.getRowWidth(o),this.rowWidth<=0)this.cleanup();else{this.column=e,this.sibling=n,this.row=o;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(i){this.cleanup()}}else this.cleanup()}calculateNewWidths(t){const e=this.colStartWidth+t-this.startX,n=this.sibStartWidth-t+this.startX,o=parseFloat(Zo(e,this.rowWidth)),i=parseFloat(Zo(n,this.rowWidth));return o<10||i<10?null:{colWidth:Yo(o.toFixed(1)),siblingColWidth:Yo(i.toFixed(1))}}onMove(t){t.preventDefault();const{column:e,sibling:n}=this,o="touchmove"===t.type?t.touches[0].clientX:t.clientX,i=this.calculateNewWidths(o);if(!i)return;const{colWidth:r,siblingColWidth:s}=i;e.dataset.colWidth=r,n.dataset.colWidth=s,e.style.width=r,n.style.width=s,this.resized=!0}onStop(){const{column:t,sibling:e}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),Eu.setAddress(`columns.${t.id}.config.width`,t.dataset.colWidth),Eu.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),this.row.classList.remove(bi),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(bi),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const t=this.columnPreset;let e=t.querySelector(`.${gi}`);const n=this.row.querySelector(".children").children,o=Pc(n,(t=>Zo(t.clientWidth,this.rowWidth).toFixed(1))),i=o.join(","),r=o.join(" | ");return e||(e=Qc.create({tag:"option",attrs:{className:gi,value:i,selected:!0},content:r}),t.append(e)),e.value=i,e.textContent=r,i}}const Jd=t=>({className:"resize-x-handle",action:{pointerdown:t.onStart.bind(t)},content:[Qc.icon("triangle-down"),Qc.icon("triangle-up")]}),Qd=()=>({className:"column-edit group-config"});class tu extends Yd{constructor(t){super("column",{...Object.freeze({config:{width:"100%"},children:[],className:[mi]}),...t});const e=this.createChildWrap();this.dom=Qc.create({tag:"li",className:[mi,"empty"],dataset:{hoverTag:i.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),Qd(),Jd(new Kd),e]}),this.processConfig(),Ou.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),lc.create(e,{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:`.${fi}`,handle:".item-move"})}processConfig(){const t=Hc.get(this.data,"config.width");t&&this.setDomWidth(t)}refreshFieldPanels=()=>{for(const t of this.children)t.panels.nav.refresh()};setDomWidth=t=>{this.dom.dataset.colWidth=t,this.dom.style.width=t};setWidth=t=>(this.setDomWidth(t),this.set("config.width",t))}const eu={actionButtons:{buttons:["clone","move","remove"],disabled:[]}};const nu=new class extends _a{constructor(t){super("columns",t),this.config={all:eu}}Component(t){return new tu(t)}};class ou extends Yd{constructor(t){super("row",{...Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[pi]}),...t});const e=this.createChildWrap();this.dom=Qc.create({tag:"li",className:[pi,"empty"],dataset:{hoverTag:i.get("row"),editingHoverTag:i.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,e]}),lc.create(e,{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:`.${mi}`,handle:".item-move"})}get editWindow(){const t={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:i.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:t}})=>{this.set("config.fieldset",Boolean(t))}},config:{label:i.get("row.settings.fieldsetWrap")}},e={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:i.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:t}})=>this.set("config.inputGroup",t)},config:{label:i.get("row.makeInputGroup"),description:i.get("row.makeInputGroupDesc")}},n={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:t}})=>this.set("config.legend",t)},className:""}},o=Qc.formGroup([t,n]),r={tag:"label",content:i.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=Qc.create(this.columnPresetControlConfig);const s={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},a=[e,"hr",o,"hr",Qc.formGroup([r,s],"row")];return Qc.create({className:`${this.name}-edit group-config`,action:{onRender:t=>{const e=a.map((t=>Qc.create(t)));t.append(...e)}}})}onAdd(...t){super.onAdd(...t),this.autoColumnWidths()}onRemove(...t){super.onRemove(...t),this.autoColumnWidths()}autoColumnWidths=()=>{const t=this.children;if(!t.length)return;const e=Number.parseFloat((100/t.length).toFixed(1))/1;for(const n of t){n.removeClasses(mr);const t=n.dom,o=Yo(e);n.set("config.width",o),t.style.width=o,t.dataset.colWidth=o;const i=setTimeout((()=>{clearTimeout(i),n.refreshFieldPanels()}),Fi);document.dispatchEvent(Ou.columnResized)}this.updateColumnPreset()};updateColumnPreset=()=>{this.columnPresetControl.innerHTML="";const t=this.getColumnPresetOptions.map((({label:t,...e})=>Qc.create({tag:"option",content:t,attrs:e})));this.columnPresetControl.append(...t)};setColumnWidths=t=>{"string"==typeof t&&(t=t.split(",")),this.children.forEach(((e,n)=>{e.setWidth(`${t[n]}%`),e.refreshFieldPanels()}))};get getColumnPresetOptions(){const t=this.children,e=Hi.get(t.length-1)||[],n=t.map((t=>{const e=t.get("config.width")||"";return Number(e.replace("%","")).toFixed(1)})).join(",");if(e.length){const t=e.slice();return!t.find((t=>t.value===n))&&t.push({value:n,label:n.replace(/,/g," | "),className:gi}),t.map((t=>{const e={...t};return e.selected=t.value===n,e}))}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:i.get("defineColumnLayout"),className:vi},action:{change:({target:t})=>{const{value:e}=t;this.setColumnWidths(e)}},options:this.getColumnPresetOptions}}}const iu={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}};const ru=new class extends _a{constructor(t){super("rows",t),this.config={all:iu}}Component(t){return new ou(t)}};class su extends Yd{constructor(t){super("stage",{conditions:[hr()],children:[],...t}),this.updateEditPanels(),this.debouncedUpdateEditPanels=Qo(this.updateEditPanels),i.get("Untitled Form"),i.get("Untitled Form"),i.get("Form Title"),i.get("Form novalidate"),i.get("Tags");const e=this.createChildWrap();this.dom=Qc.create({attrs:{className:[hi,"empty"],id:this.id},children:[this.getComponentTag(),this.getActionButtons(),this.editWindow,e]}),lc.create(e,{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:()=>{au.active=this},onSort:this.onSort.bind(this),draggable:`.${pi}`,handle:".item-move"})}empty(t=!0){return new Promise((e=>{t?(this.dom.classList.add("removing-all-fields"),Oc.slideUp(this.dom,Ri,(()=>{e(super.empty(t)),this.dom.classList.remove("removing-all-fields"),Oc.slideDown(this.dom,Ri)}))):e(super.empty())}))}onAdd(...t){const e=super.onAdd(...t);"column"===e?.name&&e.parent.autoColumnWidths()}}const au=new class extends _a{constructor(t){super("stages",t),this.config={all:{actionButtons:{buttons:["edit"],disabled:[]},panels:{disabled:[],order:["attrs","options","conditions"]}}}}Component(t){return new su(t)}};class lu{controlCache=new Set;constructor({events:t={},dependencies:e={},controlAction:n,...o}){this.events=t,this.controlData=o,this.controlAction=n,this.dependencies=e,this.id=o.id||Uo()}get controlId(){return this.controlData.meta?.id||this.controlData.config?.controlId}get dom(){const{meta:t,config:e}=this.controlData,n=this.i18n(e.label)||e.label,o={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:Qc.icon(t.icon)},{tag:"span",className:"control-label",content:n}],action:{focus:({target:t})=>{const e=t.closest(`.${ui}`);return e&&uu.panels.nav.refresh(kc(e))},click:({target:t})=>{const e=t.closest(".field-control")?.id;e&&uu.addElement(e)}}};return Qc.create({tag:"li",id:this.id,className:["field-control",`${t.group}-control`,`${t.id}-control`],content:o,meta:t,action:this.controlAction})}promise(){return Gc(this.dependencies)}i18n(t,e){const n=i.locale,o=this.definition?.i18n,r=o?.[n]||{};return(r[t]?.()??r[t])||i.get(t,e)}}const cu=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"}});let du=class{constructor(){this.data=new Map,this.buttonActions={focus:({target:t})=>{const e=t.closest(`.${ui}`);return e&&this.panels.nav.refresh(kc(e))},click:({target:t})=>{this.addElement(t.parentElement.id)}}}async init(t,e=!1){return await this.applyOptions(t),this.buildDOM(e),this}registerControls(t){return this.controls=[],t.map((t=>{const e="function"==typeof t?new t:new lu(t);return this.add(e),this.controls.push(e.dom),e.promise()}))}groupLabel=t=>i.get(t)||t||"";groupElements(){let t=this.options.groups.slice(),e=this.controls.slice(),n=[];const o=[];return t=Lc(t,this.groupOrder,"id"),t=t.filter((t=>Bo(t.id,this.options.disable.groups))),n=t.map((t=>{const n={tag:"ul",attrs:{className:[ui,di],id:`${t.id}-${ui}`},config:{label:this.groupLabel(t.label)}};if(this.options.elementOrder[t.id]){const e=this.options.elementOrder[t.id],n=qo(e.concat(t.elementOrder));t.elementOrder=n}return e=Lc(e,t.elementOrder,"meta.id"),n.content=e.filter((e=>{const{controlData:n}=this.get(e.id),i=n.meta.id||"";let r=!0;return r=[Bo(i,this.options.disable.elements),n.meta.group===t.id,!o.includes(i)].every((t=>!0===t)),r&&o.push(i),r})),n})),n}add(t=Object.create(null)){const e=Xo(t);return this.data.set(e.id,e),e.controlData.meta.id&&this.data.set(e.controlData.meta.id,e.controlData),e}get(t){return Xo(this.data.get(t))}formActions(){if(!0===this.options.disable.formActions)return null;const t={...Qc.btnTemplate({content:[Qc.icon("bin"),i.get("clear")],title:i.get("clearAll")}),className:["clear-form"],action:{click:t=>{ru.size?(Ou.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:i.get("confirmClearAll"),clearAllAction:()=>{au.clearAll().then((()=>{const e={src:t.target};Ou.formeoCleared(e)}))},btnCoords:Qc.coords(t.target)}}),document.dispatchEvent(Ou.confirmClearAll)):window.alert(i.get("cannotClearFields"))}}},e={...Qc.btnTemplate({content:[Qc.icon("floppy-disk"),i.get("save")],title:i.get("save")}),className:["save-form"],action:{click:async({target:t})=>{const{default:e}=await Promise.resolve().then((()=>_u)),{formData:n}=e,o={action:()=>{},coords:Qc.coords(t),message:"",button:t};return Du.click.btn(o),Du.save.form(n)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:t,saveBtn:e}).reduce(((t,[e,n])=>(this.options.disable.formActions.includes(e)||t.push(n),t)),[])}}buildDOM(t){const e=this.groupElements(),n=this.formActions(),{displayType:o}=this.options.panels;this.panels=new Gd({panels:e,type:"controls",displayType:o});const r=["control-groups","formeo-panels-wrap",`panel-count-${e.length}`],s=Qc.create({className:r,content:[this.panels.panelNav,this.panels.panelsWrap]}),a=["formeo-controls"];t&&a.push("formeo-sticky");const l=Qc.create({className:a,content:[s,n]}),c=l.getElementsByClassName("control-group");this.dom=l,this.groups=c;const[d]=c;this.currentGroup=d,this.actions={filter:t=>{const e=""!==t,n=this.controls;let o=s.querySelector(".filtered-term");if(Qc.toggleElementsByStr(n,t),e){const e=i.get("controls.filteringTerm",t);l.classList.add("filtered"),o?o.textContent=e:(o=Qc.create({tag:"h5",className:"filtered-term",content:e}),s.insertBefore(o,s.firstChild))}else o&&(l.classList.remove("filtered"),o.remove())},addElement:this.addElement,addGroup:t=>{}};for(let i=c.length-1;i>=0;i--){const t=`formeo-controls-${c[i]}`;this.options.sortable||globalThis.localStorage.removeItem(t),lc.create(c[i],{animation:150,fallbackClass:"control-moving",fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,group:{name:"controls",pull:"clone",put:!1,revertClone:!0},onClone:({clone:t,item:e})=>{if(t.id=e.id,this.options.ghostPreview){const{controlData:n}=this.get(e.id);Promise.resolve().then((()=>gu)).then((({default:e})=>{t.innerHTML="",t.appendChild(new e(n).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 e=globalThis.localStorage.getItem(t);return e?e.split("|"):[]},set:e=>{const n=e.toArray();globalThis.localStorage.setItem(t,n.join("|"))}}})}return l}layoutTypes={row:()=>au.active.addChild(),column:()=>this.layoutTypes.row().addChild(),field:t=>this.layoutTypes.column().addChild(t)};addElement=t=>{const{meta:{group:e,id:n},...o}=ds(this.get(t),"controlData");return us(o,"config.controlId",n),"layout"===e?this.layoutTypes[n.replace("layout-","")]():this.layoutTypes.field(o)};applyOptions=async(t={})=>{const{container:e,elements:n,groupOrder:o,...i}=Go(cu,t);this.container=e,this.groupOrder=qo(o.concat(["common","html","layout"])),this.options=i;const[r,s,a]=await Promise.all([Promise.resolve().then((()=>Ju)),Promise.resolve().then((()=>nh)),Promise.resolve().then((()=>sh))]),l=[r.default,s.default,a.default].flat();return Promise.all(this.registerControls([...l,...n]))}};const uu=new du,hu=Object.freeze(Object.defineProperty({__proto__:null,Controls:du,default:uu},Symbol.toStringTag,{value:"Module"})),pu=new Set(["checkbox","radio"]),mu=new Set(["radio","checkbox","select-one","select-multiple"]);class fu extends Yd{constructor(t=Object.create(null)){super("field",t),this.debouncedUpdateEditPanels=Qo(this.updateEditPanels),this.debouncedUpdatePreview=Qo(this.updatePreview),this.label=Qc.create(this.labelConfig),this.preview=this.fieldPreview(),this.controlId=this.get("config.controlId")||this.get("meta.id");const e=this.getActionButtons(),n=this.actionButtons.some((t=>"edit"===t.meta?.id));this.updateEditPanels();const o=Qc.create({tag:"li",attrs:{className:fi},id:this.id,children:[this.label,this.getComponentTag(),e,n&&this.editWindow,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:i.get("field")}});this.dom=o,this.isEditing=!1}get labelConfig(){if(!!this.get("config.hideLabel"))return null;const{label:t,editorLabel:e,disableHtmlLabel:n,helpText:o,tooltip:i}=this.get("config"),{required:r}=this.get("attrs")||{},s=e||t,a={tag:"label",attrs:{}};n?(a.tag="input",a.attrs.value=s):(a.attrs.contenteditable=!0,a.children=s);return{className:"prev-label",children:[{...a,action:{input:({target:{innerHTML:t,value:e}})=>{const o=n?e:t;super.set("config.label",o);const i=this.dom.querySelector(".config-label");i&&(i.value=o)}}},r&&Qc.requiredMark(),i&&Qc.tooltip(i),o&&Qc.helpText(o)]}}setData=(t,e)=>super.set(t,e);set(t,e){return this.setData(t,e)}updateLabel(){const t=Qc.create(this.labelConfig);!this.label&&t||this.label.remove(),t&&(this.data.config?.labelAfter?this.dom.append(t):this.dom.prepend(t)),this.label=t}updatePreview=()=>{this.updateLabel();const t=this.fieldPreview();this.preview.replaceWith(t),this.preview=t};get defaultPreviewActions(){return{change:t=>{const{target:e}=t,{type:n}=e;if(mu.has(n)){const t=this.preview.querySelectorAll(":checked"),e=this.get("options"),n=void 0===e?.[0]?.selected?"checked":"selected",o=e.reduce(((t,e)=>(t[e.value]=e,t[e.value][n]=!1,t)),{});for(const i of t)o[i.value][n]=i.value===o[i.value].value;return super.set("options",Object.values(o)),this.debouncedUpdateEditPanels()}},click:t=>{"true"===t.target.contentEditable&&t.preventDefault()},input:({target:t})=>{if(["input","meter","progress","button"].includes(t.tagName.toLowerCase()))return super.set("attrs.value",t.value),this.debouncedUpdateEditPanels();if(t.contentEditable&&!t.type?.startsWith("select-")){const e=t.parentElement.classList;if(e.contains("f-checkbox")||e.contains("f-radio")){const e=t.parentElement,n=kc(e);return this.setData(`options[${n}].label`,t.innerHTML),this.debouncedUpdateEditPanels()}this.setData("content",t.innerHTML||t.value)}}}}fieldPreview(){const{action:t={},...e}=Xo(this.data);e.id=`prev-${this.id}`,e.action=Object.entries(t).reduce(((t,[e,n])=>(t[e]=n.bind(this),t)),{}),this.data?.config.editableContent&&(e.attrs={...e.attrs,contenteditable:!0});const n={attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:Qc.create(e,!0),action:this.defaultPreviewActions};return Qc.create(n,!0)}get isCheckable(){return pu.has(this.get("config.controlId"))}}const gu=Object.freeze(Object.defineProperty({__proto__:null,default:fu},Symbol.toStringTag,{value:"Module"}));const vu=new class extends _a{constructor(t){super("fields",t),this.config={all:{actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}}}}Component(t){return new fu(t)}get=t=>{let e=t&&ds(this.data,t);if(!e){const n=uu.get(t);n&&(e=this.add(null,n.controlData))}return e};getData=()=>Object.entries(this.data).reduce(((t,[e,n])=>{const{conditions:o,...i}=n?.getData()||n;if(o?.length){let t=!0;if(1===o.length){const[e]=o;t=Boolean(e.if[0].source)}t&&(i.conditions=o)}return t[e]=i,t}),{});load=(t=Object.create(null))=>{const e=ni(t);this.empty();for(const[n,o]of Object.entries(e)){const{meta:t,...e}=o;t?.id&&us(e,"config.controlId",t?.id),this.add(n,e)}return this.data}},bu=au,yu=ru,wu=nu,Cu=vu,xu=uu;class Su extends Ea{constructor(){super("components"),this.disableEvents=!0,this.stages=bu,this.rows=yu,this.columns=wu,this.fields=Cu,this.controls=xu}load=(t,e)=>{this.empty();const n=((t,e=!1)=>t?Xo(ni(t)):e&&Ko.get(Ii)||gr())(t,e.sessionStorage);this.opts=e,this.set("id",n.id),this.add("stages",bu.load(n.stages)),this.add("rows",yu.load(n.rows)),this.add("columns",wu.load(n.columns)),this.add("fields",Cu.load(n.fields));for(const o of Object.values(this.get("stages")))o.loadChildren();return this.data};flatList(){const t={};for(const e of Object.keys(this.data.stages))ii(this.data,e,"stages",t);return t}getChildData=({type:t,id:e})=>{const n=this.get(t,e);if(n)return n.getData()};get json(){return window.JSON.stringify({$schema:`https://cdn.jsdelivr.net/npm/formeo@${si}/dist/formData_schema.json`,...this.formData})}get formData(){return{id:this.get("id"),stages:au.getData(),rows:ru.getData(),columns:nu.getData(),fields:vu.getData()}}set config(t){const{stages:e,rows:n,columns:o,fields:i}=t;bu.config=e,yu.config=n,wu.config=o,Cu.config=i}getIndex(t){return this[t]||this[_i.get(t)]}setAddress(t,e){if(!Jo(t))return;const[n,o,...i]=Array.isArray(t)?t:_r(t),r=this.getIndex(n).get(o);return r?.set(i,e),r}getAddress(t){if(!Jo(t))return;const[e,n,...o]=Array.isArray(t)?t:_r(t),i=this.getIndex(e).get(n);return!o.length||i?o.length?i.get(o):i:void 0}}const Eu=new Su,_u=Object.freeze(Object.defineProperty({__proto__:null,Columns:wu,Components:Su,Controls:xu,Dialog:Ed,Fields:Cu,Rows:yu,Stages:bu,default:Eu},Symbol.toStringTag,{value:"Module"})),Tu="no-transition",Au={debug:!1,bubbles:!0,formeoLoaded:t=>{},onAdd:()=>{},onChange:t=>Ou.opts?.debug&&void 0,onUpdate:t=>Ou.opts?.debug&&void 0,onUpdateStage:t=>Ou.opts?.debug&&void 0,onUpdateRow:t=>Ou.opts?.debug&&void 0,onUpdateColumn:t=>Ou.opts?.debug&&void 0,onUpdateField:t=>Ou.opts?.debug&&void 0,onAddRow:t=>Ou.opts?.debug&&void 0,onAddColumn:t=>Ou.opts?.debug&&void 0,onAddField:t=>Ou.opts?.debug&&void 0,onRemoveRow:t=>Ou.opts?.debug&&void 0,onRemoveColumn:t=>Ou.opts?.debug&&void 0,onRemoveField:t=>Ou.opts?.debug&&void 0,onRender:t=>Ou.opts?.debug&&void 0,onSave:t=>{},confirmClearAll:t=>{globalThis.confirm(t.confirmationMessage)&&t.clearAllAction(t)}},Mu=({src:t,...e},n=qi)=>{const o=new globalThis.CustomEvent(n,{detail:e,bubbles:Ou.opts?.debug||Ou.opts?.bubbles});if(o.data=(t||document).dispatchEvent(o),n===qi){const n=new globalThis.CustomEvent("formeoChanged",{detail:e,bubbles:Ou.opts?.debug||Ou.opts?.bubbles});(t||document).dispatchEvent(n)}return o},Ou={init:function(t){return this.opts={...Au,...t},this},formeoSaved:t=>Mu(t,Wi),formeoUpdated:(t,e)=>Mu(t,e||qi),formeoCleared:t=>Mu(t,"formeoCleared"),formeoOnRender:t=>Mu(t,Yi),formeoConditionUpdated:t=>Mu(t,"formeoConditionUpdated"),formeoAddedRow:t=>Mu(t,Ki),formeoAddedColumn:t=>Mu(t,Ji),formeoAddedField:t=>Mu(t,Qi),formeoRemovedRow:t=>Mu(t,tr),formeoRemovedColumn:t=>Mu(t,er),formeoRemovedField:t=>Mu(t,nr)},Nu=function(t,e=Bi){let n=0;return function(...o){const i=Date.now();i-n>=e&&(n=i,t.apply(this,o))}}((()=>{const t={timeStamp:globalThis.performance.now(),type:qi,detail:Eu.formData};Ou.opts.onUpdate(t),Ou.opts.onChange!==Ou.opts.onUpdate&&Ou.opts.onChange(t)}),Fi);let ku;document.addEventListener(qi,Nu),document.addEventListener(Ui,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onUpdate(i),Ou.opts.onUpdateStage(i)})),document.addEventListener(Gi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onUpdate(i),Ou.opts.onUpdateRow(i)})),document.addEventListener(Xi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onUpdate(i),Ou.opts.onUpdateColumn(i)})),document.addEventListener(Zi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onUpdate(i),Ou.opts.onUpdateField(i)})),document.addEventListener(Ki,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onAddRow(i)})),document.addEventListener(Ji,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onAddColumn(i)})),document.addEventListener(Qi,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onAddField(i)})),document.addEventListener(tr,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onRemoveRow(i)})),document.addEventListener(er,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onRemoveColumn(i)})),document.addEventListener(nr,(t=>{const{timeStamp:e,type:n,detail:o}=t,i={timeStamp:e,type:n,detail:o};Ou.opts.onRemoveField(i)})),document.addEventListener(Yi,(t=>{const{timeStamp:e,type:n,detail:o}=t;Ou.opts.onRender({timeStamp:e,type:n,detail:o})})),document.addEventListener("confirmClearAll",(t=>{t={timeStamp:t.timeStamp,type:t.type,confirmationMessage:t.detail.confirmationMessage,clearAllAction:t.detail.clearAllAction,btnCoords:t.detail.btnCoords},Ou.opts.confirmClearAll(t)})),document.addEventListener(Wi,(({timeStamp:t,type:e,detail:{formData:n}})=>{const o={timeStamp:t,type:e,formData:n};Ou.opts.onSave(o)})),document.addEventListener("formeoLoaded",(t=>{Ou.opts.formeoLoaded(t.detail.formeo)})),window.addEventListener("resize",(function(){ku=ku||window.requestAnimationFrame((()=>{ku=!1;for(const t of Object.values(wu.data))t.dom.classList.add(Tu),xu.dom.classList.add(Tu),xu.panels.nav.refresh(),t.refreshFieldPanels()}))}));const Lu={add:{attr:t=>{const e=globalThis.prompt(t.message.attr);if(e&&t.isDisabled(e))return globalThis.alert(i.get("attributeNotPermitted",e)),Du.add.attrs(t);let n;e&&(n=String(globalThis.prompt(t.message.value,"")),t.addAction(e,n))},option:t=>{t.addAction()},condition:t=>{t.addAction(t)},config:t=>{t.addAction(t)}},remove:{attrs:t=>{t.removeAction()},options:t=>{t.removeAction()},conditions:t=>{t.removeAction()}},click:{btn:t=>{t.action()}},save:{form:ti}},Du={init:function(t){const e=Object.keys(Lu);return this.opts=e.reduce(((e,n)=>(e[n]={...Lu[n],...t[n]},e)),t),this},add:{attrs:t=>Du.opts.add.attr(t),options:t=>Du.opts.add.option(t),conditions:t=>(t.template=t.template||hr(),Du.opts.add.condition(t)),config:t=>Du.opts.add.config(t)},remove:{attrs:t=>Du.opts.remove.attrs(t),options:t=>Du.opts.remove.options(t),conditions:t=>Du.opts.remove.conditions(t)},click:{btn:t=>Du.opts.click.btn(t)},save:{form:t=>(Du.opts.sessionStorage&&Ko.set(Ii,t),Ou.formeoSaved({formData:t}),Du.opts.save.form(t))}},Pu={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,svgSprite:null,style:li,iconFont:null,config:{},events:{},actions:{},controls:{},i18n:{location:"https://draggable.github.io/formeo/assets/lang/"},onLoad:()=>{}}}};let zu=class{constructor({formData:t,...e},n){const o=Go(Pu.editor,e),{actions:i,events:r,debug:s,config:a,editorContainer:l,...c}=o;l&&(this.editorContainer="string"==typeof l?document.querySelector(l):l),this.opts=c,Qc.setOptions=c,Eu.config=a,this.userFormData=n||t,this.Components=Eu,this.dom=Qc,Ou.init({debug:s,...r}),Du.init({debug:s,sessionStorage:c.sessionStorage,...i}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",this.loadResources.bind(this)):this.loadResources()}get formData(){return this.Components.formData}set formData(t={}){this.userFormData=oi(t),this.load(this.userFormData,this.opts)}loadData(t={}){this.formData=t}get json(){return this.Components.json}clear(){this.userFormData=gr(),this.Components.load(this.userFormData,this.opts),this.render()}async loadResources(){document.removeEventListener("DOMContentLoaded",this.loadResources);const t=[qc(this.opts.svgSprite),Xc(this.opts.style),i.init({preloaded:{"en-US":e},...this.opts.i18n,locale:globalThis.sessionStorage?.getItem(Vi)})].filter(Boolean);await Promise.all(t),this.opts.allowEdit&&this.init()}init(){return uu.init(this.opts.controls,this.opts.stickyControls).then((t=>{this.controls=t,this.load(this.userFormData,this.opts),this.formId=Eu.get("id"),this.i18n={setLang:t=>{globalThis.sessionStorage?.setItem(Vi,t);i.setCurrent(t).then((()=>{this.init()}),console.error)}},this.opts.onLoad?.(this),this.tooltipInstance=new d}))}load(t=this.userFormData,e=this.opts){this.Components.load(t,e),this.render()}render(){if(!this.controls)return globalThis.requestAnimationFrame((()=>this.render()));if(this.stages=Object.values(Eu.get("stages")),this.opts.controlOnLeft)for(const e of this.stages)e.dom.style.order=1;const t={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map((({dom:t})=>t))]};i.current.dir&&(t.attrs.dir=i.current.dir,Qc.dir=i.current.dir),this.editor=Qc.create(t);(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(Qc.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),Ou.formeoLoaded=new globalThis.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(Ou.formeoLoaded)}};const ju="f-",$u=t=>"string"==typeof t?document.querySelector(t):t,Hu=t=>{const e=t.match(pr);return e?.[0]||t},Iu=t=>{if(!t)return!1;if(t.hasAttribute("hidden")||t.parentElement.hasAttribute("hidden"))return!1;const e=window.getComputedStyle(t);return!("none"===e.display||"hidden"===e.visibility||"0"===e.opacity)},Vu={isChecked:t=>t.checked,isNotChecked:t=>!t.checked,value:t=>t.value,isVisible:t=>Iu(t),isNotVisible:t=>!Iu(t)},Ru={equals:xa,notEquals:(t,e)=>!xa(t,e),contains:(t,e)=>t.includes(e),notContains:(t,e)=>!t.includes(e)},Fu=Object.entries(or).reduce(((t,[e,n])=>(t[n]=Ru[e],t[e]=Ru[e],t)),{}),Bu={equals:(t,{targetProperty:e,value:n})=>{t[`_${e}`]=t[e],t[e]=n}},Wu=Object.entries(ir).reduce(((t,[e,n])=>(t[n]=Bu[e],t[e]=Bu[e],t)),{}),qu={isChecked:t=>{t.checked=!0},isNotChecked:t=>{t.checked=!1},value:(t,{assignment:e,...n})=>{const o=Wu[e]?.(t,n),i=new Event("input",{bubbles:!0});return t.dispatchEvent(i),o},isNotVisible:t=>{void 0===t?._required&&(t._required=t.required),t.parentElement.setAttribute("hidden",!0),t.required=!1},isVisible:t=>{t.parentElement.removeAttribute("hidden"),t.required=t._required}};let Uu=class{constructor(t,e){const{renderContainer:n,elements:o,formData:i,config:r}=(({editorContainer:t,renderContainer:e,formData:n,...o})=>({elements:{},...o,renderContainer:$u(e),editorContainer:$u(t),formData:oi(n)}))(t);this.container=n,this.form=oi(e||i),this.elements=o,this.config=r,this.components=Object.create(null),this.dom=Qc}get formData(){return this.form}set formData(t){this.form=oi(t)}get userData(){const t=this.container.querySelector(".formeo-render")||this.renderedForm;if(!t)return{};const e=new FormData(t),n={};for(const[o,i]of e.entries())n[o]?Array.isArray(n[o])?n[o].push(i):n[o]=[n[o],i]:n[o]=i;return n}get userFormData(){const t=[];for(const[e,n]of Object.entries(this.userData)){const o={key:e,value:n,label:this.components[Hu(e)]?.config?.label||""};t.push(o)}return t}set userData(t={}){const e=this.container.querySelector("form");for(const n of Object.keys(t)){const o=e.elements[n];if(o.length&&"checkbox"===o[0].type){const e=Array.isArray(t[n])?t[n]:[t[n]];for(const t of o)t.checked=e.includes(t.value)}else if(o.length&&"radio"===o[0].type)for(const e of o)e.checked=e.value===t[n];else o.type&&(o.value=t[n])}}render(t=this.form){this.form=oi(t);const e=this.getRenderedForm(t),n=this.container.querySelector(".formeo-render");n?n.replaceWith(e):this.container.appendChild(e)}getRenderedForm(t=this.form){this.form=oi(t);const e=document.getElementsByClassName("formeo-render").length,n={...this.config,tag:"form",id:this.form.id,className:`formeo-render formeo formeo-rendered-${e}`,children:this.processedData};return this.renderedForm=Qc.render(n),this.applyConditions(),this.renderedForm}get html(){return(this.renderedForm||this.getRenderedForm()).outerHTML}orderChildren=(t,e)=>e.reduce(((e,n)=>(e.push(this.form[t][n]),e)),[]);prefixId=t=>ju+t;processColumn=({id:t,...e})=>({...e,id:this.prefixId(t),children:this.processFields(e.children),style:`width: ${e.config.width||"100%"}`});processRows=t=>this.orderChildren("rows",this.form.stages[t].children).reduce(((t,e)=>(e&&t.push(this.processRow(e)),t)),[]);cacheComponent=t=>(this.components[Hu(t.id)]=t,t);processRow=(t,e="row")=>{const{config:n,id:o}=t,i=[`formeo-${e}-wrap`],r={...t,children:this.processColumns(t.id),id:this.prefixId(o)};this.cacheComponent(r);const s=[{condition:n.legend,result:()=>({tag:n.fieldset?"legend":"h3",children:n.legend})},{condition:!0,result:()=>r},{condition:n.inputGroup,result:()=>this.addButton(o)}].reduce(((t,{condition:e,result:n})=>(e&&t.push(n()),t)),[]);return n.inputGroup&&i.push(`${ju}input-group-wrap`),{tag:n.fieldset?"fieldset":"div",className:i,children:s}};cloneComponentData=t=>{const{children:e=[],id:n,attrs:o={},...i}=this.components[t],r={...o,"data-clone-of":n};return"input"===i.tag&&(r.name=Jc(this.components[t])),{...i,id:ju+Uo(n),children:e?.length&&e.map((({id:t})=>this.cloneComponentData(Hu(t)))),attrs:r}};addButton=t=>({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:e=>{const n=e.target.parentElement,o=Qc.create(this.cloneComponentData(t));n.insertBefore(o,n.lastChild);const i=Qc.create(Qc.btnTemplate({className:"remove-input-group",children:Qc.icon("remove"),action:{mouseover:({target:t})=>t.parentElement.classList.add("will-remove"),mouseleave:({target:t})=>t.parentElement.classList.remove("will-remove"),click:({target:t})=>t.parentElement.remove()}}));o.appendChild(i)}}});processColumns=t=>this.orderChildren("columns",this.form.rows[t].children).map((t=>this.cacheComponent(this.processColumn(t))));processFields=t=>this.orderChildren("fields",t).map((({id:t,...e})=>{const n=e.config?.controlId||e.meta?.id,{action:o={},dependencies:i={}}=this.elements[n]||{};i&&Gc(i);const r=Go({action:o},e);return this.cacheComponent({...r,id:this.prefixId(t)})}));get processedData(){return Object.values(this.form.stages).map((t=>(t.children=this.processRows(t.id),t.className=hi,this.components[Hu(t.id)]=t,t)))}handleComponentCondition=(t,e,n)=>{if(t.length){for(const o of t)this.handleComponentCondition(o,e,n);return}const o=Xu(t);o&&t.addEventListener(o,(t=>{if(this.evaluateCondition(e,t))for(const e of n)this.execResult(e,t)}),!1);const i={target:t};if(this.evaluateCondition(e,i))for(const r of n)this.execResult(r,i)};applyConditions=()=>{for(const{conditions:t}of Object.values(this.components))if(t)for(const e of t){const{if:t,then:n}=e;for(const e of t){const{source:t,target:o}=e;if(Jo(t)){const{component:o,options:i}=this.getComponent(t),r=i||o;this.handleComponentCondition(r,e,n)}if(Jo(o)){const{component:t,options:i}=this.getComponent(o),r=i||t;this.handleComponentCondition(r,e,n)}}}};evaluateCondition=({source:t,sourceProperty:e,targetProperty:n,comparison:o,target:i})=>{const r=this.getComponentProperty(t,e);if("boolean"==typeof r)return r;const s=String(Jo(i)?this.getComponentProperty(i,n):i);return Fu[o]?.(r,s)};execResult=({target:t,targetProperty:e,assignment:n,value:o})=>{if(Jo(t)){const{component:i,option:r}=this.getComponent(t),s=r||i;qu[e]?.(s,{targetProperty:e,assignment:n,value:o})}};getComponentProperty=(t,e)=>{const{component:n,option:o}=this.getComponent(t),i=o||n;return Vu[e]?.(i)||i[e]};getComponent=t=>{const e={component:null};if(!Jo(t))return null;const[,n,o,i]=_r(t),r=this.renderedForm.querySelector(`#${ju}${n}`);if(!r)return e;if(e.component=r,o){const t=r.querySelectorAll("input"),n=t[i];return e.options=t,e.option=n,e}return e};getComponents=t=>{const e=[],n=t.slice(t.indexOf(".")+1);return e.push(...this.renderedForm.querySelectorAll(`[name=f-${n}]`)),e}};const Gu=[["input",t=>["textarea","text"].includes(t.type)],["change",t=>["select"].includes(t.tagName.toLowerCase())||["checkbox","radio"].includes(t.type)]],Xu=t=>{const[e]=Gu.find((e=>e[1](t)))||[!1];return e};void 0!==window&&(window.FormeoEditor=zu,window.FormeoRenderer=Uu);const Zu=zu,Yu=Uu,Ku=[{config:{label:"row"},meta:{group:"layout",icon:"rows",id:"layout-row"}},{config:{label:"column"},meta:{group:"layout",icon:"columns",id:"layout-column"}}],Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Ku},Symbol.toStringTag,{value:"Module"})),Qu=["button","submit","reset"].map((t=>({label:t,value:t})));Qu[0].selected=!0;const th=({type:t,isMultiple:e=!1,count:n=3})=>Array.from({length:n},((t,e)=>e+1)).map((n=>{const o="checkbox"===t||e?"checked":"selected";return{label:i.get("labelCount",{label:Sr(t),count:n}),value:`${t}-${n}`,[o]:!n}}));const eh=[class extends lu{constructor(t={}){const e={tag:"button",attrs:{className:[{label:"grouped",value:"f-btn-group"},{label:"ungrouped",value:"f-field-group"}]},config:{label:i.get("controls.form.button"),hideLabel:!0},meta:{group:"common",icon:"button",id:"button"},options:[{label:i.get("button"),type:Qu,className:[{label:"default",value:"",selected:!0},{label:"primary",value:"primary"},{label:"danger",value:"error"},{label:"success",value:"success"},{label:"warning",value:"warning"}]}]};super(Go(e,t))}},class extends lu{constructor(){super({tag:"input",attrs:{type:"date",required:!1,className:""},config:{label:i.get("controls.form.input.date")},meta:{group:"common",icon:"calendar",id:"date-input"}})}},class extends lu{constructor(){super({tag:"input",attrs:{type:"hidden",value:""},config:{label:i.get("hidden"),hideLabel:!0},meta:{group:"common",icon:"hidden",id:"hidden"}})}},class extends lu{constructor(){super({tag:"input",attrs:{type:"number",required:!1,className:""},config:{label:i.get("number")},meta:{group:"common",icon:"hash",id:"number"}})}},class extends lu{constructor(){super({tag:"textarea",config:{label:i.get("controls.form.textarea")},meta:{group:"common",icon:"textarea",id:"textarea"},attrs:{required:!1}})}},class extends lu{constructor(){super({tag:"input",attrs:{required:!1,type:"text",className:""},config:{label:i.get("controls.form.input.text"),hideLabel:!1},meta:{group:"common",icon:"text-input",id:"text-input"}})}},class extends lu{constructor(){super({tag:"input",attrs:{type:"file",required:!1},config:{label:i.get("fileUpload")},meta:{group:"common",icon:"upload",id:"upload"}})}},class extends lu{constructor(t={}){const e={tag:"select",config:{label:i.get("controls.form.select")},attrs:{required:!1,className:"",multiple:!1},meta:{group:"common",icon:"select",id:"select"},options:th({type:"option",isMultiple:t.attrs?.multiple})};super(Go(e,t))}},class extends lu{constructor(){super({tag:"input",attrs:{type:"checkbox",required:!1},config:{label:i.get("controls.form.checkbox-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"checkbox",id:"checkbox"},options:th({type:"checkbox",count:1})})}},class extends lu{constructor(){super({tag:"input",attrs:{type:"radio",required:!1},config:{label:i.get("controls.form.radio-group"),disabled:["attrs.type"]},meta:{group:"common",icon:"radio-group",id:"radio"},options:th({type:"radio"})})}}],nh=Object.freeze(Object.defineProperty({__proto__:null,default:eh},Symbol.toStringTag,{value:"Module"})),oh=Array.from(Array(5).keys()).slice(1).map((t=>`h${t}`)),ih="controls.html.header";const rh=[class extends lu{constructor(){super({tag:oh[0],attrs:{tag:oh.map(((t,e)=>({label:t.toUpperCase(),value:t,selected:!e}))),className:""},config:{label:i.get(ih),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"header",id:"html.header"},content:i.get(ih),action:{}})}static get definition(){return{i18n:{"en-US":{header:"Custom English Header"}}}}get content(){return super.i18n(ih)}},class extends lu{constructor(){super({tag:"p",attrs:{className:""},config:{label:i.get("controls.html.paragraph"),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"paragraph",id:"paragraph"},content:"Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment."})}},class extends lu{constructor(){super({tag:"hr",config:{label:i.get("controls.html.divider"),hideLabel:!0},meta:{group:"html",icon:"divider",id:"divider"}})}},class extends lu{constructor(t){super(Go({tag:"textarea",config:{label:"WYSIWYG",editableContent:!0},meta:{group:"html",icon:"rich-text",id:"tinymce"},attrs:{required:!1},dependencies:{js:"https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"},action:{onRender:t=>{const e=`#${t.id}`;window.tinymce.remove(e),window.tinymce.init({selector:e})}},controlAction:{click:()=>{},onRender:()=>{}}},t))}}],sh=Object.freeze(Object.defineProperty({__proto__:null,default:rh},Symbol.toStringTag,{value:"Module"}));t.FormeoEditor=Zu,t.FormeoRenderer=Yu,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|