@questwork/vue-q-widget-vue3 3.1.10 → 3.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,35 @@
1
1
  /*! For license information please see q-widget.min.js.LICENSE.txt */
2
- ;(function(Ct,m){
2
+ ;(function(ht,g){
3
3
  if (typeof exports == "object" && typeof module < "u") { // for commonjs
4
4
  const returns = {}
5
- m(returns, require("vue"));
5
+ g(returns, require("vue"));
6
6
  module.exports = returns;
7
7
  exports.QWidget = returns.QWidget;
8
8
  }
9
9
  else if (typeof define == "function" && define.amd) { // for amd
10
- define(["exports", "vue"], m);
10
+ define(["exports", "vue"], g);
11
11
  }
12
12
  else { // for browser script tag
13
- Ct = (typeof globalThis < "u") ? globalThis : Ct || self;
14
- m(Ct.QWidget={},Ct.Vue);
13
+ ht = (typeof globalThis < "u") ? globalThis : ht || self;
14
+ g(ht.QWidget={},ht.Vue);
15
15
  }
16
- })(this,function(Ct,m){"use strict";const ie=(s,r)=>{const i=s.__vccOpts||s;for(const[a,c]of r)i[a]=c;return i},Ha={name:"q-widget-q-modal",props:{modal:{type:Object,default:()=>({})}},data(){return{}},computed:{body(){return this.modal.body},css(){return this.modal.css},countdown(){return this.modal.countdown},label(){return this.modal.label},model(){return this.modal.model},onCancel(){return this.modal.onCancel},onClose(){return this.modal.onClose},onConfirm(){return this.modal.onConfirm},title(){return this.modal.title}},methods:{onFinish(){this.modal.onFinish()},qForm(s){this.modal.qForm(s)},qList(s){this.modal.qList(s)}}},Ia={class:"q-widget-q-modal __modal"};function Fa(s,r,i,a,c,u){const g=m.resolveComponent("q-modal",!0);return m.openBlock(),m.createElementBlock("div",Ia,[m.createVNode(g,{body:u.body,countdown:u.countdown,css:u.css,label:u.label,model:u.model,onCancel:u.onCancel,onClose:u.onClose,onConfirm:u.onConfirm,title:u.title,onOnFinish:u.onFinish,onQForm:u.qForm,onQList:u.qList},null,8,["body","countdown","css","label","model","onCancel","onClose","onConfirm","title","onOnFinish","onQForm","onQList"])])}const Da=ie(Ha,[["render",Fa],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QModal.vue"]]);function Pa({controller:s,state:r,saveControllerState:i}){const{saveStateKeys:a=[]}=s,c=a.reduce((u,g)=>({...u,...fs({keys:g.split("."),obj:r})}),{});return i({data:c})}function fs({keys:s,obj:r}){const i=s.shift();return{[i]:s.length===0?r[i]:fs({keys:s,obj:r[i]})}}function Yt({component:s,message:r,modalConfig:i={}}){const{countdown:a,label:c,title:u,canClose:g=!0}=i,w={body:[{customComponentName:"q-modal-region-tool-html",html:r}],countdown:a,label:c,onClose:g?()=>{s.modal=null}:null,title:u||"Error"};s.modal=w}class Ma{static exec({config:r,keys:i,permissions:a}){Array.isArray(r)||console.log("can not handle these buttons");const c=i.shift();return i.length!==0&&console.log(`can not handle ${i.join(".")}`),Wa({buttons:r,key:c,permissions:a})}}function Wa({buttons:s,key:r,permissions:i}){return s.map(a=>{if(Ua(r,a)){const c=a.permissions||[];return{...a,permissions:[...c,...i]}}return a})}function Ua(s,r){const{buttonType:i,id:a,label:c}=r;return s===a||s===c||s===i}class Va{static exec({config:r,keys:i,permissions:a}){return $r({layout:r,keys:i,permissions:a})}}function $r({layout:s,keys:r,permissions:i}){const a=r[0],{children:c,permissions:u}=s;if(Ka(a,s)){if(r.shift(),r.length===0)return{...s,permissions:[...u||[],...i]};if(Array.isArray(c))return{...s,children:c.map(g=>$r({layout:g,keys:[...r],permissions:i}))};console.log(`can not handle ${r.join(".")}`)}return Array.isArray(c)?{...s,children:c.map(g=>$r({layout:g,keys:[...r],permissions:i}))}:s}function Ka(s,r){const{id:i,name:a}=r;return s===i||s===a}class Qa{static exec({config:r,keys:i,permissions:a}){const c=i.shift();let u=null;switch(c){case"buttons":{u=Ma;break}case"layout":{u=Va;break}default:{u=null;break}}return!u||typeof u.exec!="function"?r:{...r,[c]:u.exec({config:r[c],keys:[...i],permissions:a})}}}class Ga{static exec({config:r,keys:i,permissions:a}){Array.isArray(r)||console.log("can not handle these actions");const c=i.shift();return i.length!==0&&console.log(`can not handle ${i.join(".")}`),za({actions:r,key:c,permissions:a})}}function za({actions:s,key:r,permissions:i}){return s.map(a=>{if(Ya(r,a)){const c=a.permissions||[];return{...a,permissions:[...c,...i]}}return a})}function Ya(s,r){const{id:i,label:a}=r;return s===i||s===a}class Za{static exec({config:r,keys:i,permissions:a}){const c=i.shift();switch(c){case"actions":return{...r,actions:Ja({actions:r[c],keys:i,permissions:a})};default:return r}}}function Ja({actions:s,keys:r,permissions:i}){Array.isArray(s)||console.log("can not handle these actions");const a=r.shift();return r.length!==0?(console.log(`can not handle ${r.join(".")}`),s):s.map(c=>{if(Xa(a,c)){const u=c.permissions||[];return{...c,permissions:[...u,...i]}}return c})}function Xa(s,r){const{id:i,label:a}=r;return s===i||s===a}class ja{static exec({config:r,keys:i,permissions:a}){return Array.isArray(r)||console.log("can not handle these actions"),ds({headers:r,keys:i,permissions:a})}}function ds({headers:s,keys:r,permissions:i}){const a=r.shift();return s.map(c=>{if(eu(a,c)){const{permissions:u,children:g}=c;return r.length!==0?Array.isArray(g)&&g.length>0?{...c,children:ds({headers:g,keys:r,permissions:i})}:(console.log(`can not handle ${r.join(".")}`),c):{...c,permissions:[...u||[],...i]}}return c})}function eu(s,r){const{id:i,label:a,key:c}=r;return s===i||s===a||s===c}class tu{static exec({config:r,keys:i,permissions:a}){const c=i.shift();let u=null;switch(c){case"actions":{u=Ga;break}case"bulkAction":{u=Za;break}case"headers":{u=ja;break}default:{u=null;break}}return!u||typeof u.exec!="function"?r:{...r,[c]:u.exec({config:r[c],keys:[...i],permissions:a})}}}const nu={ElementQForm:Qa,ElementQList:tu};function ru({config:s,configPermissions:r=[],type:i}){return r.reduce((c,u)=>{const g=iu(i);if(!g||typeof g.exec!="function")return console.log("no config handler"),c;const{key:w,value:x}=u;return g.exec({config:c,keys:w.split("."),permissions:x})},s)}function iu(s){return nu[s]||null}var Zt={};Zt.d=(s,r)=>{for(var i in r)Zt.o(r,i)&&!Zt.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:r[i]})},Zt.o=(s,r)=>Object.prototype.hasOwnProperty.call(s,r);var j={};Zt.d(j,{sh:()=>Ds,Yc:()=>Xt,OS:()=>yu,Z8:()=>qn,lc:()=>Hr,kl:()=>Ws,Mg:()=>Ns,_x:()=>wu,yl:()=>Fs,l0:()=>_u,Yq:()=>hs,zn:()=>Cu,G8:()=>Xe,pY:()=>_e,su:()=>Jt,Q6:()=>Us,UI:()=>kn,d:()=>Nr,Lv:()=>Ks,Qy:()=>$n,yO:()=>Qs});function Xe(s,r,i,a){if(!s)return!0;if(typeof i!="function"||a&&typeof a!="function")return!1;const{key:c="",value:u,keyValuePath:g=""}=s,[w]=Object.keys(u);if(!c)switch(w){case"$and":return u.$and.reduce((S,R)=>S&&Xe(R,r,i,a),!0);case"$or":return u.$or.reduce((S,R)=>S||Xe(R,r,i,a),!1);default:return!1}let x=i(c,r);if(g){console.log("keyValuePath",g);const S=a.toObject(x);x=i(g,S)}switch(w){case"$empty":return x==null===u.$empty;case"$eq":return x===u.$eq;case"$gt":return x>u.$gt;case"$gte":return x>=u.$gte;case"$lt":return x<u.$lt;case"$lte":return x<=u.$lte;case"$in":return Array.isArray(x)?!!x.find(S=>u.$in.includes(S)):typeof x!="object"?!!u.$in.includes(x):!1;case"$inValue":{const S=i(u.$inValue,r),R=Array.isArray(S)?S:[];return Array.isArray(x)?!!x.find(B=>R.includes(B)):typeof x=="string"?!!R.includes(x):!1}case"$ne":return x!==u.$ne;case"$notIn":return Array.isArray(x)?!x.find(S=>u.$notIn.includes(S)):typeof x!="object"?!u.$notIn.includes(x):!1;case"$intervalTimeGt":{const S=new Date().getTime(),R=new Date(x).getTime();return S-R>u.$intervalTimeGt}case"$intervalTimeLt":{const S=new Date().getTime(),R=new Date(x).getTime();return S-R<u.$intervalTimeLt}case"$isToday":{const S=new Date,R=S.setHours(0,0,0,0),B=S.setHours(23,59,59,59),G=new Date(x).getTime();return(R<=G&&B>=G)===u.$isToday}case"$notInValue":{const S=i(u.$notInValue,r),R=Array.isArray(S)?S:[];return Array.isArray(x)?!x.find(B=>R.includes(B)):typeof x!="object"?!R.includes(x):!1}case"$range":{const[S,R]=u.$range;return typeof S=="number"&&typeof R=="number"&&x>=S&&x<=R}default:return!1}}function hs(s,r){const i=s&&s instanceof Date?s:new Date(s),a=["日","一","二","三","四","五","六"],c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],g=r||"YYYY/MM/DD hh:mm",w=i.getDay(),x=u[w],S=a[w],R=c[w],B=i.getFullYear(),G=i.getMonth()+1,de=i.getDate(),he=i.getHours(),Pe=i.getMinutes(),ge=i.getSeconds();return g.replace("YYYY",B).replace("MM",Ge(G)).replace("MM",Ge(G)).replace("DD",Ge(de)).replace("hh",Ge(he)).replace("mm",Ge(Pe)).replace("ss",Ge(ge)).replace("M",G).replace("D",de).replace("h",he).replace("m",Pe).replace("s",ge).replace("EEEE",Ge(R)).replace("EEE",Ge(S)).replace("EE",Ge(x)).replace("E",Ge(w))}function Ge(s){return s<10?`0${s}`:s}function _e(s,r){let i=s,a=r;if(typeof s=="string"&&(i=i.split(".")),!Array.isArray(s)&&typeof s=="object"){const{keys:u,obj:g}=s;i=u,a=g}if(i.length===0)return a;const c=i.shift();return a&&Object.prototype.hasOwnProperty.call(a,c)?_e(i,a[c]):a&&c?a[c]:a}const ee={argumentEmptyException:"Argument is empty",argumentFormatException:"Incorrect number or format of argument",invalidFuntionException:"Function Name is invalid",invalidRegExpException:"Invalid regular expression",isNotAFunctionException:"Is not a function",notExistException:"Key does not exist",resultEmptyException:"Result is empty",resultMoreThanOneException:"More than one result"};class Z extends Error{constructor(r){super(r),this.message=r}}const su="_EMPTY",gs=["get","map","join","concatIf","exec","filterOne","filterAll","formatDate","eq","neq","gt","lt","gte","lte","isEmpty","isNotEmpty","toLowerCase","toUpperCase"],ms="_HIDE",ou="_NOT_EMPTY",fe="_SELF",lu=["<%=","%>"],au=["{{","}}"];function ps(s,r){if(typeof s!="string")throw new Z(`_concatIf: ${ee.argumentFormatException}: the data must be string :${s.join(", ")}`);if(r.length!==3)throw new Z(`_concatIf: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;const[i,a,c]=r;if([su,ou].includes(i)||a.length!==2)throw new Z(`concatIf: ${ee.argumentEmptyException}: ${i}, ${a}`);return s===""&&c.includes(ms)?"":s!==""&&(s!==null||s!==void 0)&&c.includes(ms)?`${a[0]}${s}${a[a.length-1]}`:c}function _s(s,r){if(r.length!==3)throw new Z(`eq: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s===i?r[1]:r[2]}function uu(s,r){try{const[i,...a]=r;return s[i](...a)}catch(i){throw i}}function qr(s,r){try{if(!Array.isArray(r)||r.length===0)throw new Z(ee.argumentEmptyException);return!Array.isArray(s)||s.length===0?[]:typeof s[0]=="object"?ys(s,r):typeof s[0]=="string"||typeof s[0]=="number"?cu(s,r):[]}catch(i){throw i}}function cu(s,r){const i=r.flat();return s.filter(a=>i.some(c=>vs(c,a)))}function ys(s,r){if(r.length===1){const u=r[0];return s.filter(g=>u.includes(".")?_e(u.split("."),g):Object.prototype.hasOwnProperty.call(g,u))}if(r.length>2){let u=s;for(let g=0;g<r.length;g+=2){const w=[r[g],r[g+1]];u=ys(u,w)}return u}const[i,...a]=r,c=a.flat();return s.filter(u=>{const g=i.includes(".")?_e(i.split("."),u):u[i];return c.some(w=>vs(w,g))})}function vs(s,r){if(s===void 0&&r===void 0||s===null&&r===null)return!0;if(typeof s=="boolean")return s===r;if(s===""||s==="*")return r==null?!1:typeof r=="string"?s===""?r==="":r!=="":Array.isArray(r)?s===""?r.length===0:r.length!==0:s!=="";if(fu(s))return s===r;if(s.startsWith("[")&&s.endsWith("]"))return s==="[]"?Array.isArray(r)&&r.length===0:s==="[*]"?Array.isArray(r)&&r.length!==0:!1;const{operator:i,value:a}=du(s);if(!i||a!==0&&!a)return!1;switch(i){case">":return r>a;case"<":return r<a;case"!=":return r!==a;case">=":return r>=a;case"<=":return r<=a;default:return!1}}function fu(s){return typeof s=="string"?!(s.startsWith("[")&&s.endsWith("]")||/!=|>=|<=|>|</.test(s)):!Number.isNaN(s)}function du(s){const i=["!=",">=","<=",">","<"].find(u=>s.startsWith(u));if(!i)return{operator:null,value:null};const a=s.slice(i.length);if(/^[a-zA-Z]*$/.test(a)&&i!=="!=")return{operator:null,value:null};const c=!Number.isNaN(parseFloat(a))&&!Number.isNaN(a)?Number(a):a;return{operator:i,value:c}}function hu(s,r){try{const i=qr(s,r);if(i.length===1)return i[0];if(i.length===0)return null;throw new Z(ee.resultMoreThanOneException)}catch(i){throw i}}function ws(s,r){if(r.length===0)throw new Z(`_formateDate: ${ee.argumentFormatException}: format parts must be not empty array`);if(s==null)return null;const i=new Date(s),a={yyyy:String(i.getFullYear()),mm:String(i.getMonth()+1).padStart(2,"0"),dd:String(i.getDate()).padStart(2,"0")},c=["yyyy","mm","dd"];if(r.filter(g=>g.length>1&&!c.includes(g)).length>0)throw new Z(`_formateDate: ${ee.argumentFormatException}: the format type is not valid: ${r.join(", ")}`);return r.reduce((g,w)=>g+(a[w]||w),"")}function On(s,r,i=null){try{if(r===null||typeof r>"u"||r==="")throw new Z(ee.argumentEmptyException);if(s===null)return null;if(r.includes(".")){const a=r.split(".");if(a.length>1){const c=a.shift(),u=a.join(".");return typeof s[c]<"u"?On(s[c],u,i):Cs(r,i)}}return typeof s[r]<"u"?s[r]:Cs(r,i)}catch(a){throw a}}function Cs(s,r){return r!==null?r:null}function Es(s,r){if(r.length!==3)throw new Z(`_gt: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s>i?r[1]:r[2]}function bs(s,r){if(r.length!==3)throw new Z(`_gte: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s>=i?r[1]:r[2]}function As(s,r){if(r.length!==2)throw new Z(`_isEmpty: ${ee.argumentFormatException}: ${r.join(", ")}`);return r.includes(fe)&&(r=r.map(i=>i===fe?s:i)),s!==null&&typeof s=="object"&&Object.keys(s).length===0||s===""||s===null||s===void 0||s.length===0?r[0]:r[1]}function xs(s,r){if(r.length!==2)throw new Z(`_isNotEmpty: ${ee.argumentFormatException}: ${r.join(", ")}`);return r.includes(fe)&&(r=r.map(i=>i===fe?s:i)),s!==null&&typeof s=="object"&&Object.keys(s).length===0||Array.isArray(s)&&s.length===0||typeof s=="string"&&s===""||s==null?r[1]:r[0]}function Ss(s,r){try{return s.length===0?"":s.length===1?Rs(s[0]):s.map(i=>Rs(i)).join(r)}catch(i){throw i}}function Rs(s){return JSON.stringify(s).replace(/"([^"]+)":/g,"$1: ").replace(/"([^"]+)"/g,"$1").replace(/,/g,", ")}function Os(s,r){if(r.length!==3)throw new Z(`_lt: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s<i?r[1]:r[2]}function ks(s,r){if(r.length!==3)throw new Z(`_lte: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s<=i?r[1]:r[2]}function $s(s,r){try{if(r.length===0)throw new Z(ee.argumentEmptyException);return s===null||typeof s>"u"?null:s.reduce((a,c)=>{r.length===1&&Array.isArray(r[0])&&(r=r[0],a.hasFormat=!0);const u=r.map(g=>{if(g.includes(".")){const w=g.split("."),x=w[0];w.shift();const S=w.join(".");return On(c[x],S)}return typeof c[g]<"u"?c[g]:null});return a.hasFormat?a.content.push(u):a.content=a.content.concat(u),a},{content:[],hasFormat:!1}).content}catch(i){throw i}}function qs(s,r){if(r.length!==3)throw new Z(`_neq: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s!==i?r[1]:r[2]}function Bs(s,r){if(r!==void 0)throw new Z(`_toLowerCase: ${ee.argumentFormatException}: ${r.join(", ")}`);return s===null||typeof s>"u"||typeof s!="string"?null:String(s).toLowerCase()}function Ls(s,r){if(typeof s!="string")throw new Z(`_toUpperCase: ${ee.argumentFormatException}: the data must be string: ${s}`);if(r!==void 0)throw new Z(`_toUpperCase: ${ee.argumentFormatException}: the argument must be empty: ${r.join(", ")}`);return s===null||typeof s>"u"||typeof s!="string"?null:String(s).toUpperCase()}class Ns{constructor(r){this.data=r}static init(r){return new this(r)}static initFromArray(r=[]){return Array.isArray(r)?r.map(i=>this.init(i)):[]}static initOnlyValidFromArray(r=[]){return this.initFromArray(r).filter(i=>i)}static concatIf(r,i){return ps(r,i)}static eq(r,i){return _s(r,i)}static filterAll(r,i){return qr(r,i)}static formatDate(r,i){return ws(r,i)}static get(r,i,a=null){return On(r,i,a)}static gt(r,i){return Es(r,i)}static gte(r,i){return bs(r,i)}static isEmpty(r,i){return As(r,i)}static isNotEmpty(r,i){return xs(r,i)}static join(r,i=""){return Ss(r,i)}static lt(r,i){return Os(r,i)}static lte(r,i){return ks(r,i)}static map(r,i=[]){return $s(r,i)}static neq(r,i){return qs(r,i)}static toLowerCase(r,i){return Bs(r,i)}static toUpperCase(r,i){return Ls(r,i)}static parseFunction(r){return Ts(r,gs)}pipe(r=""){this.delimiters=r.substring(0,2)==="{{"?au:lu;const i=new RegExp(`${this.delimiters[0]}\\s(.*?)\\s${this.delimiters[1]}`),a=r.match(i);if(a!==null)try{return Ts(a[1],gs).reduce((u,g)=>pu(u,g.name,g.args),this.data)}catch(c){throw new Z(`TemplateCompiler engine error: ${c.message}`)}throw new Z(`TemplateCompiler engine error: ${ee.invalidRegExpException}`)}}function Ts(s,r){const i=new RegExp(/(\w+)\(([^)]*)\)/);let a;return s.includes("|")?a=s.split("|"):a=[s],a.reduce((c,u)=>{const g=u.match(i);if(g!==null){const w=g[1],x=g[2],S=gu(x);if(r.includes(w))c.push({name:w,args:S});else throw new Z(`${w} is not a valid function`)}return c},[])}function gu(s){const r=s.trim(),i=new RegExp(/^[^\w\d\s]+$/);return r.match(i)!==null?[r.substring(1,r.length-1)]:r.includes(",")?mu(r).map(u=>Hs(u)):[Hs(r)]}function mu(s){const r=new RegExp(/^\d+(\.\d+)?$/),i=new RegExp(/(?![^\[]*\])\s*,\s*/);return s.split(i).map(c=>{const u=c.trim();return u!==""&&u.match(r)?Number.isNaN(u)?u:parseInt(u,10):u})}function Hs(s){if(typeof s=="string"){if(s.startsWith('"')&&s.endsWith('"'))return s.substring(1,s.length-1);const r=Is(s);if(typeof r!="string")return r;if(r.startsWith("[")&&r.endsWith("]")){const i=r.substring(1,r.length-1).trim();return i!==""?i.split(",").map(a=>Is(a.trim())):[]}return s}return s}function Is(s){if(s.startsWith('"')&&s.endsWith('"'))return s.substring(1,s.length-1);if(s==="true")return!0;if(s==="false")return!1;if(s!=="undefined")return s==="null"?null:!Number.isNaN(s)&&!Number.isNaN(Number.parseFloat(s))?Number(s):s}function pu(s,r,i){try{let a;switch(r){case"exec":return uu(s,i);case"get":if(i.length>2)throw new Z(ee.argumentFormatException);return i.length===2&&(a=i[i.length-1]),On(s,i[0],a);case"join":return Ss(s,i[0]);case"map":return $s(s,i);case"concatIf":return ps(s,i);case"filterOne":return hu(s,i);case"filterAll":return qr(s,i);case"formatDate":return ws(s,i);case"eq":return _s(s,i);case"neq":return qs(s,i);case"gt":return Es(s,i);case"gte":return bs(s,i);case"lt":return Os(s,i);case"lte":return ks(s,i);case"isEmpty":return As(s,i);case"isNotEmpty":return xs(s,i);case"toLowerCase":return Bs(s);case"toUpperCase":return Ls(s);default:throw new Error(`${r} is not a valid function`)}}catch(a){throw a}}function Fs(s,r){return s.reduce((i,a)=>{const{type:c,value:u="",restriction:g,template:w,format:x,showMinutes:S}=a;switch(c){case"label":{Xe(g,r,_e)&&(i+=u.toString());break}case"value":{if(Xe(g,r,_e)){const R=_e(u.split("."),r)||"";i+=R.toString()}break}case"array":{if(Xe(g,r,_e)){const R=_e(u.split("."),r)||[];i+=R.reduce((B,G)=>B+=Fs(w,G),"")}break}case"ellipsis":{if(Xe(g,r,_e)){const{maxLength:R}=a,B=_e(u.split("."),r)||"";B.length<=R?i+=B.toString():i+=`${B.substr(0,R)}...`}break}case"date":{if(Xe(g,r,_e)){const R=_e(u.split("."),r)||"";i+=hs(R,x).toString()}break}case"templateCompiler":{if(Xe(g,r,_e)){const R=new Ns({data:r});i+=R.pipe(u)}break}}return i},"")}function _u(s,r=/\$\{(.+?)\}/g,i,a){if(!s)return"";let c=typeof a!="function"?a:_e;const u=new RegExp(r,"g");return s.replace(u,(g,w)=>{const x=c({keys:w.split("."),obj:i});return x==null?"":typeof x=="object"?JSON.stringify(x):x})}const kn={get(s,r){return r.split(".").reduce((a,c)=>{if(c.endsWith("[]")){const u=c.slice(0,-2);return Array.isArray(a[u])?a[u]:[]}if(c.includes("[")&&c.includes("]")){const u=c.match(/(\w+)\[(\d+)\]/);if(u){const g=u[1],w=u[2];return a&&a[g]&&a[g][w]}}else return a&&Array.isArray(a)?a.map(u=>u[c]):a&&a[c]},s)},merge:Br,set(s,r,i){const a=r.split(".");let c=s;for(let g=0;g<a.length-1;g++){const w=a[g];if(w.endsWith("[]")){const x=w.slice(0,-2);Array.isArray(c[x])&&c[x].forEach(S=>set(S,a.slice(g+1).join("."),i));return}if(w.includes("[")&&w.includes("]")){const x=w.match(/(\w+)\[(\d+)\]/);if(x){const S=x[1],R=x[2];if(Array.isArray(c[S])&&c[S][R])c=c[S][R];else return}}else c[w]||(c[w]={}),c=c[w]}const u=a[a.length-1];c[u]=i}};function Br(s,...r){if(!r.length)return s;const i=r.shift();if(Lr(s)&&Lr(i))for(const a in i)Lr(i[a])?(s[a]||(s[a]={}),Br(s[a],i[a])):s[a]=i[a];return Br(s,...r)}function Lr(s){return s&&typeof s=="object"&&!Array.isArray(s)}async function Nr(s,r,i){return new Promise((a,c)=>{const u=s[Symbol.iterator]();let g=0;const w=async x=>{const S=u.next();if(S.done){a(x);return}try{const[R,B]=await Promise.all([x,S.value]);w(r(R,B,g++))}catch(R){c(R)}};w(i)})}class Ds{constructor(r={}){r=r||{},this._data=r.data||r._data||[],this.err=r.err,this.isNew=r.isNew||!1,this.message=r.message,this.total=r.total||0,this._instanceBuilder=r._instanceBuilder}static init(r={}){return r instanceof this?r:new this(r)}static get _classname(){return"ApiResponse"}static get _superclass(){return"ApiResponse"}get data(){return this._instanceBuilder&&typeof this._instanceBuilder=="function"?this._data.map(this._instanceBuilder):this._data}}function Jt({repo:s,result:r}){return Ds.init({...r,_instanceBuilder:i=>s.init(i)})}class Xt{constructor(r={}){r=r||{},this.key=r.key||null,this.value=typeof r.value<"u"?r.value:""}static init(r={}){if(r instanceof this)return r;const i=new this(r);return i.isValid?i:null}static initFromArray(r=[]){return Array.isArray(r)?r.map(i=>this.init(i)):[]}static initOnlyValidFromArray(r=[]){return this.initFromArray(r).filter(i=>i)}static get _classname(){return"KeyValueObject"}static get _superclass(){return"KeyValueObject"}static addItem(r,i,a){r.push(this.init({key:i,value:a}))}static addRecord(r=[],i,a){return this.hasKeyValue(r,i,a)||r.push(this.init({key:i,value:a})),r}static appendRecord(r=[],i,a){return r.map(c=>(this.sameKey(c,i)&&(c.value=[...c.value,...a]),c))}static appendValueArray(r=[],i,a){return r.map(c=>(this.sameKey(c,i)&&(c.value=[...c.value,...a]),c))}static foundByKey(r=[],i){return r.find(c=>this.sameKey(c,i))||null}static foundValueByKey(r=[],i){const a=this.foundByKey(r,i);return a?a.value:null}static fromObject(r={}){return Object.keys(r).reduce((i,a)=>(i.push(this.init({key:a,value:r[a]})),i),[])}static getValueByKey(r=[],i){return this.foundValueByKey(r,i)}static getValueByKeyFromArray(r=[],i){if(r.length===0)return null;const c=r.shift().find(u=>this.sameKey(u,i));return c&&c.value?c.value:this.getValueByKeyFromArray(r,i)}static getValuesByKey(r=[],i){return r.reduce((a,c)=>(this.sameKey(c,i)&&a.push(c.value),a),[])}static hasKeyValue(r=[],i,a){return typeof a>"u"?r.filter(c=>this.sameKey(c,i)).length>0:r.filter(c=>this.sameKey(c,i)&&Ps(c.value,a)).length>0}static insertOrUpdateRecord(r=[],i,a){let c=[...r];return this.hasKeyValue(r,i)?c=this.updateRecord(r,i,a):c.push(this.init({key:i,value:a})),c}static keys(r=[]){return Array.isArray(r)?r.reduce((i,a)=>(i.push(a.key),i),[]):[]}static merge(r,i){return(i||[]).map(a=>{const c=r.find(u=>u.key===a.key);c?c.value=(c.value||[]).concat(a.value):r.push(a)}),r}static removeByKey(r,i){return r.reduce((a,c)=>(this.sameKey(c,i)||a.push(c),a),[])}static sameKey(r,i){return Ps(r.key,i)}static toObject(r=[]){return Array.isArray(r)?r.reduce((i,a)=>(i[a.key]=a.value,i),{}):{}}static toString(r=[],i="; "){return Array.isArray(r)?r.reduce((a,c)=>(a.push(`${c.key}: ${c.value}`),a),[]).join(i):""}static updateRecord(r=[],i,a){return r.map(c=>this.sameKey(c,i)?{...c,value:a}:c)}static updateOrInsertRecord(r=[],i,a){return this.insertOrUpdateRecord(r,i,a)}static updateRecordsFromArray(r=[],i=[]){if(Array.isArray(r)&&Array.isArray(i)){const a=this.toObject(r),c=this.toObject(i);return this.fromObject({...a,...c})}return[]}static values(r=[]){return Array.isArray(r)?r.reduce((i,a)=>(i.push(a.value),i),[]):[]}get isValid(){return!!this.key}get toObject(){const r={};return this.isValid&&(r[this.key]=this.value),r}}function Ps(s,r){return s===r}function $n(s,r="_"){return s===null||typeof s>"u"||typeof s.toString>"u"?null:s.toString().trim().toUpperCase().replace("-",r).replace(" ",r)}const Tr="_";class yu extends Xt{static init(r={}){if(r instanceof this)return r;const i=new this({...r,key:$n(r.key,Tr)});return i.isValid?i:null}static get _classname(){return"Metadata"}static merge(r,i){return(i||[]).map(a=>{const c=r.find(u=>Ms(u.key,a.key));c?c.value=(c.value||[]).concat(a.value):r.push(a)}),r}static sameKey(r,i){return Ms(r.key,i)}}function Ms(s,r){return $n(s,Tr)===$n(r,Tr)}const vu=["attributes","ref"];class qn{constructor(r={}){r=r||{},this.attributes=Xt.initOnlyValidFromArray(r.attributes),this.ref=r.ref||{}}static get _classname(){return"QMeta"}static get _superclass(){return"QMeta"}static init(r={}){return r instanceof qn?r:new qn(r)}addAttribute(r){const i=Xt.init(r);if(!i)throw new Error("invalid meta attribute");return this.attributes.push(i),this}update(r){return Object.keys(r).forEach(i=>{vu.includes(i)&&(i==="attributes"?this[i]=Xt.initOnlyValidFromArray(r[i]):this[i]=r[i])}),this}}class Hr{constructor(r){r=r||{},this.model=r.model,this._sharedOptions=r._sharedOptions,this._queryOptions=r._queryOptions,this._saveOptions=r._saveOptions,this._Class=r._constructor&&r._constructor._Class?r._constructor._Class:null}static init(r={}){if(r instanceof this)return r;const i=new this(r);return i.isValid?i:null}static get _classname(){return"Repo"}static get _superclass(){return"Repo"}get _classname(){return"Repo"}get _superclass(){return"Repo"}get isValid(){return this.model&&typeof this.model.deleteOne=="function"&&typeof this.model.findAll=="function"&&typeof this.model.saveOne=="function"}get queryOptions(){return{...this._sharedOptions,...this._queryOptions}}get saveOptions(){return{...this._sharedOptions,...this._saveOptions}}init(r){return this._Class&&typeof this._Class.init=="function"?this._Class.init(r):r}async deleteOne({id:r}){try{return{...await this.model.deleteOne({_id:r}),isNew:!1,data:[]}}catch(i){throw i}}findAll({query:r,systemLog:i}){const a=Bn({systemLog:i,label:"REPO_READ",message:`fn ${this._classname}.prototype.findAll`,input:[{query:{...r},systemLog:{...i}}]});return new Promise((c,u)=>{this.model.findAll(r,this.queryOptions,(g,w,x)=>{if(g)a({level:"warn",output:g.toString()}),u(g);else{const S={isNew:!1,data:w,total:x||w.length};a({level:"info",output:{...S}}),c(S)}})})}findOne({query:r,systemLog:i}){const a=Bn({systemLog:i,label:"REPO_READ",message:`fn ${this._classname}.prototype.findOne`,input:[{query:{...r},systemLog:{...i}}]});return new Promise((c,u)=>{this.model.findAll(r,this.queryOptions,(g,w)=>{if(g)u(g);else if(w.length===1){const x={isNew:!1,data:w,total:1};a({level:"info",output:{...x}}),c(x)}else w.length===0?u(new Error("record not found")):u(new Error("more than one is found"))})}).catch(c=>{throw a({level:"warn",output:c.toString()}),c})}saveAll({docs:r,systemLog:i}){let a;const c=Bn({systemLog:i,label:"REPO_WRITE",message:`fn ${this._classname}.prototype.saveAll`,input:[{docs:[...r],systemLog:{...i}}]});return(typeof this.model.saveAll=="function"?this.model.saveAll({docs:r}):Promise.all(r.map(async g=>{if(g){const w=await this.saveOne({doc:g});return a=w.isNew,(w._data||w.data)[0]}return null}))).then(g=>{g.length!==1&&(a=null);const w={data:g,isNew:a,total:g.length};return c({level:"info",output:{...w}}),w}).catch(g=>{throw c({level:"warn",output:g.toString()}),g})}saveOne({doc:r,systemLog:i}){const a=Bn({systemLog:i,label:"REPO_WRITE",message:`fn ${this._classname}.prototype.saveOne`,input:[{doc:{...r},systemLog:{...i}}]});return new Promise((c,u)=>{this.model.saveOne(r,this.saveOptions,(g,w)=>{g?(a({level:"warn",output:g.toString()}),u(g)):(a({level:"info",output:{...w}}),c(w))})})}}function Bn({systemLog:s,label:r,message:i,input:a}={}){return({level:c,messgae:u,output:g}={})=>{s&&s.systemLogHelper&&s.systemLogHelper.log({batchId:s.batchId,label:r,level:c,message:u||i,data:{payload:{input:a,output:g}}})}}class Ws{constructor({repo:r}){this.repo=r}static get _classname(){return"Service"}static get _superclass(){return"Service"}deleteOne({id:r}){return this.repo.deleteOne({id:r}).catch(()=>{throw new Error(`Not found for query: ${r}`)})}async findAll({query:r={},systemLog:i}={}){const a=await this.repo.findAll({query:r,systemLog:i});return Jt({repo:this.repo,result:a})}async findOne({query:r={},systemLog:i}={}){const a=await this.repo.findOne({query:r,systemLog:i});return Jt({repo:this.repo,result:a})}init(r){return this.repo.init(r)}initFromArray(r=[]){return Array.isArray(r)?r.map(i=>this.init(i)):[]}initOnlyValidFromArray(r=[]){return this.initFromArray(r).filter(i=>i)}async saveAll({docs:r=[],systemLog:i}={}){const a=r.map(u=>this.init(u)),c=await this.repo.saveAll({docs:a,systemLog:i});return Jt({repo:this.repo,result:c})}async saveOne({doc:r={},systemLog:i}={}){const a=this.init(r);if(a){const c=await this.repo.saveOne({doc:a,systemLog:i});return Jt({repo:this.repo,result:c})}return{isNew:null,data:[],err:new Error("doc is not a valid instance")}}}function Us({repo:s}){if(s===void 0)throw new Error("repo is required.");if(s._superclass!==Hr._superclass)throw new Error("repo is not an instance of Repo.");return new Ws({repo:s})}class wu{static get _classname(){return"UniqueKeyGenerator"}static get _superclass(){return"UniqueKeyGenerator"}static makeFormatter({fieldName:r,format:i,options:a}){switch(i){case"set_code":return Vs(r);default:return Vs(r)}}static makeGenerator(r){const i=r.map(a=>this.makeFormatter(a));return async a=>await Nr(i,async(u,g)=>{const w=await g(a);return Object.assign(u,w)},a)}}function Vs(s,r){return async(i={})=>i[s]?{}:{[s]:Qs.setCode()}}async function Cu({body:s={},GeneralModel:r,UniqueKeyGenerator:i,resourceInfo:a}){const{resources:c,data:u,globalShared:g={},shared:w={},relationship:x={}}=s,S=a||s.resourceInfo;return Eu(u,g,w),await Nr(c,async(B,G)=>{const de=Au(G,S,i,r);bu(u,x[G],B);const he=u[G],Pe=await de.saveAll({docs:[].concat(he)});return B[G]=Array.isArray(he)?Pe._data:Pe._data[0],B},{})}function Eu(s,r={},i={}){Object.keys(i).forEach(a=>{const c=s[a];s[a]=kn.merge({},c,r,i[a]||{})})}function bu(s,r={},i){Object.keys(r).forEach(a=>{const c=r[a],u=kn.get(i,c);kn.set(s,a,u)})}function Au(s,r,i,a){const{collectionName:c,fields:u}=r[s],g=i.makeGenerator(u),w=new a({collectionName:c,uniqueKeyGenerator:g});return Us({repo:new Hr({model:w})})}function Ks(s,r=6){return s=s.toString(),s.length<r?Ks("0"+s,r):s}function xu(s,r=34){const i=Ru(r);return Su(s,i)}function Su(s,r){let i=r.byCode;if(s===0)return i[0];for(var a="",c=r.length;s>0;)a=i[s%c]+a,s=Math.floor(s/c);return a}function Ru(s){let r="9876543210ABCDEFGHJKLMNPQRSTUVWXYZ";return s===58&&(r="9876543210ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz"),Ou(r)}function Ou(s){var r={},i={},a=s.length,c,u;for(c=0;c<a;c++)u=s[c],r[c]=u,i[u]=c;return{byCode:r,byChar:i,length:a}}function ku({len:s=16,pattern:r="a1"}={}){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a="abcdefghijklmnopqrstuvwxyz",c="1234567890",u="~!@#$%^&*_+-=";let g="";r.includes("A")&&(g+=i),r.includes("a")&&(g+=a),r.includes("1")&&(g+=c),r.includes("#")&&(g+=u);const w=[...g];return[...Array(s)].map(x=>w[Math.random()*w.length|0]).join``}function $u(s){return typeof s!="string"&&(s=s.toString()),s.split("").reverse().join("")}function qu(s=34){const r=new Date().valueOf(),i=ku({len:8,pattern:"1"}),a=$u(`${r}${i}`);return xu(a,s)}const Qs={setCode:qu};j.sh;var Gs=j.Yc;j.OS,j.Z8,j.lc,j.kl,j.Mg,j._x,j.yl;var Bu=j.l0;j.Yq,j.zn;var Lu=j.G8,Nu=j.pY;j.su,j.Q6,j.UI,j.d,j.Lv,j.Qy,j.yO;function Ln({keys:s,obj:r}){return Nu(s,r)}function Tu(s,r,i){return Bu(s,r,i,Ln)}function Ir({rule:s,data:r}){return Lu(s,r,Hu,Gs)}function Hu(s,r){const i=s.split(".");return Ln({keys:i,obj:r})}function Fr(s,r){return Iu(s,r,Ln,Ir)}function Iu(s,r,i,a){return!Array.isArray(s)||s.length===0?"":s.reduce((c,u)=>{const{type:g,value:w="",restriction:x,template:S}=u;if(a({rule:x,data:r}))switch(g){case"label":{c+=w.toString();break}case"value":{const R=i({keys:w.split("."),obj:r})||"";c+=R.toString();break}case"array":{const R=i({keys:w.split("."),obj:r})||[];c+=R.reduce((B,G)=>B+=Fr(S,G),"");break}case"group":{c+=Fr(S,r);break}case"ellipsis":{const{maxLength:R}=u,B=i({keys:w.split("."),obj:r})||"";B.length<=R?c+=B.toString():c+=`${B.substr(0,R)}...`;break}default:{c+=w.toString();break}}return c},"")}function Dr(s){return`${s}-${Math.floor(Math.random()*1e9)}`}const Fu=Object.freeze(Object.defineProperty({__proto__:null,KeyValueObject:Gs,convertString:Tu,getStringByArr:Fr,getValidation:Ir,getValueByKeys:Ln,setId:Dr},Symbol.toStringTag,{value:"Module"}));class Pr{constructor(r={}){this.css=r.css,this.configType="Config"}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Du(s,r){const{button:i,klass:a}=s,{element:c}=r,u=c.getState()||{},{formData:g={}}=u;class w extends a{constructor(S){super(S),this.hidden=S.hidden||!1,this.permissionResult=S.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden&&super.isValid}static init(S,R){if(S instanceof w)return S;const B=S.permissions?R.permissionHandler(S.permissions,g):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},G=new w({...S,permissionResult:B});return G.isValid?G:null}permissionResultHandler(S){const{event:R,isAllowCreate:B,isAllowRead:G,isAllowUpdate:de,isAllowDelete:he}=S;R?typeof this[R]=="function"?this[R]({val:!0}):console.log(`do not have the event ${R}`):B&&G&&de&&he||this.setHidden({val:!0})}setDisabled({val:S}){this.disabled=S}setHidden({val:S}){this.hidden=S}}return w.init(i,r)}function Pu(s,r){const{layout:i,klass:a}=s,{element:c}=r,u=c.getState()||{},{formData:g={}}=u;class w extends a{constructor(R){super(R),this.permissionResult=R.permissions?r.permissionHandler(R.permissions,g):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},this.permissionResultHandler(this.permissionResult)}permissionResultHandler(R){const{event:B,isAllowCreate:G,isAllowRead:de,isAllowUpdate:he,isAllowDelete:Pe}=R;B?typeof this[B]=="function"?this[B]({val:!0}):console.log(`do not have the event ${B}`):de?he||this.setPreview({val:!0}):this.setHidden({val:!0}),Array.isArray(this.children)&&this.children.forEach(ge=>{ge.permissionResultHandler(R)})}setDecoratorDisabled({val:R}){this.setDisabled({val:R})}setDecoratorHidden({val:R}){this.setHidden({val:R})}setDecoratorPreview({val:R}){this.setPreview({val:R})}}return w.init(i)}function Mu(s){return r=>{const{type:i}=r;switch(i){case"button":return Du(r,s);case"node":return Pu(r,s);default:return null}}}class zs extends Pr{constructor(r={}){super(r),this.configType="ElementQFormConfig",this.buttons=r.buttons,this.css=r.css||{},this.disabledForm=r.disabledForm||!1,this.eventName=r.eventName||{},this.formHandler=Mu(r.helpers),this.layout=r.layout,this.previewForm=r.previewForm||!1,this.updateLayoutConfigs=r.updateLayoutConfigs||[]}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Wu({helpers:s}){const{element:r}=s,{getClasses:i}=r.getHandlers(),{Cell:a}=s.qGrid;class c extends a{constructor(g){super(g),typeof g.hidden=="function"?this.permissionHidden=g.hidden(this.item.item,this):this.permissionHidden=g.hidden||!1,this.permissionResult=g.permissionResult,this.permissionResultHandler(this.permissionResult,g.customComponentName)}get isValid(){return this.permissionHidden===!1}static init(g){const{permissions:w}=g,x=w?s.permissionHandler(w):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},S=new this({...g,permissionResult:x});return S.isValid?S:null}permissionResultHandler(g,w){const{event:x,isAllowCreate:S,isAllowRead:R,isAllowUpdate:B,isAllowDelete:G}=g;if(x){typeof this[x]=="function"?this[x]({val:!0}):console.log(`do not have the event ${x}`);return}(!(w==="q-grid-body-row-cell-button")&&!R||!(S&&R&&B&&G))&&this.setPermissionHidden({val:!0})}setPermissionHidden({val:g}){this.permissionHidden=g}}return typeof i!="function"?{Cell:c}:i({helpers:{Cell:c,...s}})}class Ys extends Pr{constructor(r={}){super(r),this.configType="ElementQGridConfig",this.classes=Wu({helpers:r.helpers}),this.converter=Uu({helpers:r.helpers}),this.eventName=r.eventName,this.layout=r.layout,this.fillLastRow=r.fillLastRow,this.placeholder=r.placeholder,this.urlDelegate=r.urlDelegate}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Uu({helpers:s}){const{element:r}=s,{converter:i}=r.getHandlers();if(typeof i!="function")return c=>c;const{QItem:a}=s.qGrid;return i({helpers:{QItem:a,...s}})}function Vu({helpers:s}){const{QListBulkButton:r}=s.qList,{getValidation:i}=s.qUtilities;class a extends r{constructor(u){super(u),this.hidden=u.hidden||!1,this.permissionResult=u.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(u,g){if(u instanceof a)return u;const{restriction:w,permissions:x}=u,S=g.controller.getState();if(!i({rule:w,data:S}))return null;const R=x?g.permissionHandler(x):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},B=new a({...u,permissionResult:R});return B.isValid?B:null}static initFromArray(u,g){return Array.isArray(u)?u.map(w=>this.init(w,g)):[]}static initOnlyValidFromArray(u,g){return this.initFromArray(u,g).filter(w=>w)}permissionResultHandler(u){const{event:g,isAllowCreate:w,isAllowRead:x,isAllowUpdate:S,isAllowDelete:R}=u;g?typeof this[g]=="function"?this[g]({val:!0}):console.log(`do not have the event ${g}`):w&&x&&S&&R||this.setHidden({val:!0})}setHidden({val:u}){this.hidden=u}}return a}function Ku({helpers:s}){const{QListButton:r}=s.qList;class i extends r{constructor(c){super(c),this.endpoint=Zs(c.endpoint,c.qRow),this.httpMethod=c.httpMethod,this.hidden=c.hidden||!1,this.permissionResult=c.permissionResult,this.permissionResultHandler(this.permissionResult),this.url=Zs(c.url,c.qRow)}get isValid(){return!this.hidden&&super.isValid}static init(c,u){if(c instanceof i)return c;const g=c.permissions?u.permissionHandler(c.permissions,c.qRow.get()):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},w=new i({...c,permissionResult:g});return w.isValid?w:null}static initFromArray(c,u){return Array.isArray(c)?c.map(g=>this.init(g,u)):[]}static initOnlyValidFromArray(c,u){return this.initFromArray(c,u).filter(g=>g)}permissionResultHandler(c){const{event:u,isAllowCreate:g,isAllowRead:w,isAllowUpdate:x,isAllowDelete:S}=c;u?typeof this[u]=="function"?this[u]({val:!0}):console.log(`do not have the event ${u}`):g&&w&&x&&S||this.setHidden({val:!0})}setHidden({val:c}){this.hidden=c}}return i}function Zs(s,r){if(!s)return"";const i=/\$\{(.+?)\}/g;return s.replace(i,(a,c)=>r.get(c.trim()))}function Qu(){class s{constructor(i){Object.keys(i).forEach(a=>{this[a]=i[a]}),this.hidden=i.hidden||!1,this.permissionResult=i.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(i,a){if(i instanceof s)return i;const{children:c,permissions:u}=i,g=u?a.permissionHandler(u):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},w=new s({...i,children:Array.isArray(c)?this.initOnlyValidFromArray(c,a):null,permissionResult:g});return w.isValid?w:null}static initFromArray(i,a){return Array.isArray(i)?i.map(c=>this.init(c,a)):[]}static initOnlyValidFromArray(i,a){return this.initFromArray(i,a).filter(c=>c)}permissionResultHandler(i){const{event:a,isAllowCreate:c,isAllowRead:u,isAllowUpdate:g,isAllowDelete:w}=i;a?typeof this[a]=="function"?this[a]({val:!0}):console.log(`do not have the event ${a}`):u||this.setHidden({val:!0})}setHidden({val:i}){this.hidden=i}}return s}class Js extends Pr{constructor(r={}){super(r),this.configType="ElementQListConfig",this.bulkAction=Gu({bulkAction:r.bulkAction,helpers:r.helpers}),this.converter=Yu({actions:r.actions,helpers:r.helpers}),this.css=r.css,this.eventName=r.eventName,this.expansion=r.expansion,this.headers=zu({headers:r.headers,helpers:r.helpers}),this.listStyle=r.listStyle||"q-list-table",this.listShowFooter=r.showFooter||!1,this.listSortBys=r.sortBys,this.noDataMessage=r.noDataMessage}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Gu({bulkAction:s={},helpers:r}){const i=Vu({helpers:r});return{...s,actions:i.initOnlyValidFromArray(s.actions,r)}}function zu({headers:s,helpers:r}){return Qu().initOnlyValidFromArray(s,r)}function Yu({actions:s,helpers:r}){const{QRow:i}=r.qList,c={QListButton:Ku({helpers:r}),QRow:i,...r},{element:u}=c,{converter:g}=u.getHandlers();return typeof g!="function"?w=>w:g({actions:s,helpers:c})}const Zu=["setHidden","setVisible"];class Mr{constructor(r={}){this.id=r.id||Dr("node"),this.css=r.css||"",this.hidden=r.hidden||!1,this.nodeType="Node",this.observers=r.observers||[],this.permissionResult=r.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!!this.id}get isVisible(){return!this.hidden}get isCreated(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}getElementState(){return this}getType(){return this.type}isExist(r){const{name:i}=this;return!!r.find(a=>i&&a.name===i)}handleObservers(r){this.observers.forEach(i=>{const{key:a,value:c,condition:u}=i,g=Ir({rule:u,data:r});g&&Ju(a)&&typeof this[a]=="function"&&this[a]({value:c,val:g})})}permissionResultHandler(r){const{event:i,isAllowCreate:a,isAllowRead:c,isAllowUpdate:u,isAllowDelete:g}=r;i?typeof this[i]=="function"?this[i]({val:!0}):console.log(`do not have the event ${i}`):a&&c&&u&&g||this.setHidden({val:!0})}resetNode(){this.component=null}setHidden({val:r}){this.hidden=r,r&&this.resetNode()}setVisible(r){this.setHidden({...r,val:!r.val})}updateElementState(r){return this.handleObservers(r),this}}function Ju(s){return Zu.includes(s)}let jt=class extends Mr{constructor(r={}){super(r),this.children=r.children||[],this.nodeType="Container"}get isCreated(){return super.isCreated&&!!this.isVisibleChildrenCreated}get isVisibleChildrenCreated(){return this.getVisibleChildren().reduce((r,i)=>r&&i.isCreated,!0)}get validChildren(){return this.children.filter(r=>r)}getElements(){return this.validChildren.reduce((r,i)=>[...r,...i.getElements()],[])}getElementState(){return this.validChildren.reduce((r,i)=>({...r,...i.getElementState()}),{})}getVisibleChildren(){return this.validChildren.filter(r=>r.isVisible)}updateElementState(r){return super.updateElementState(r),this.validChildren.forEach(i=>i.updateElementState(r)),this}};class Xu extends jt{constructor(r={}){super(r),this.nodeType="ContainerBox"}}class ju extends jt{constructor(r={}){super(r),this.nodeType="ContainerColumn"}}class ec extends jt{constructor(r={}){super(r),this.nodeType="ContainerHeaderSticky"}}class tc extends jt{constructor(r={}){super(r),this.nodeType="ContainerRow"}}const nc={ContainerBox:Xu,ContainerColumn:ju,ContainerHeaderSticky:ec,ContainerRow:tc};let De=class extends Mr{constructor(r={}){super(r),this.controllerHelpers=r.controllerHelpers,this.configPermissions=r.configPermissions,this.name=r.name,this.nodeType=r.nodeType||"Element",this.state={},this.configHandler(r.config)}get isCreated(){return super.isCreated&&!!this.component}get isValid(){return super.isValid&&!!this.name}get hasConfigPermissions(){return!!this.configPermissions}get stateName(){return{...this.defaultStateName,...this.config.stateName}}addComponent(r){this.component=r}configHandler(r={}){this.hasConfigPermissions?this.config=ru({config:r,configPermissions:this.configPermissions,type:this.nodeType}):this.config=r}getConfig(){return this.config||{}}getComponent(){return this.component}getElements(){return[this]}getElementName(){return this.name}getHandlers(){const r=this.getElementName(),{elementHandlers:i={}}=this.state;return i[r]||{}}getState(){return this.state}getElementState(){return rc(this.state,this.stateName)}onCreated({component:r,payload:i={}}){return this.addComponent(r),this.updateState(i),this}update(r){this.updateElementState(r)}updateState(r){this.state={...this.state,...r}}updateElementState(r){super.updateElementState(r);const i=ic(r,this.stateName);return this.updateState(i),this}};function rc(s,r){return Object.keys(r).reduce((i,a)=>{const c=r[a],u=s[a];return{...i,[c]:u}},{})}function ic(s,r){return Object.keys(r).reduce((i,a)=>{const c=r[a],u=s[c];return delete i[c],{...i,[a]:u}},{...s})}class sc extends De{constructor(r={}){super(r),this.defaultStateName={qButton:"qButton"}}getConfig(){return{...this.state.qButton||{},...this.config||{},...this.state[this.name]||{}}}}var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Nn={exports:{}};Nn.exports,function(s,r){(function(){var i,a="4.17.21",c=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",w="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",S=500,R="__lodash_placeholder__",B=1,G=2,de=4,he=1,Pe=2,ge=1,qt=2,no=4,je=8,nn=16,et=32,rn=64,tt=128,sn=256,Ur=512,zf=30,Yf="...",Zf=800,Jf=16,ro=1,Xf=2,jf=3,Hn=1/0,Bt=9007199254740991,ed=17976931348623157e292,In=NaN,ze=4294967295,td=ze-1,nd=ze>>>1,rd=[["ary",tt],["bind",ge],["bindKey",qt],["curry",je],["curryRight",nn],["flip",Ur],["partial",et],["partialRight",rn],["rearg",sn]],Lt="[object Arguments]",Fn="[object Array]",id="[object AsyncFunction]",on="[object Boolean]",ln="[object Date]",sd="[object DOMException]",Dn="[object Error]",Pn="[object Function]",io="[object GeneratorFunction]",Me="[object Map]",an="[object Number]",od="[object Null]",nt="[object Object]",so="[object Promise]",ld="[object Proxy]",un="[object RegExp]",We="[object Set]",cn="[object String]",Mn="[object Symbol]",ad="[object Undefined]",fn="[object WeakMap]",ud="[object WeakSet]",dn="[object ArrayBuffer]",Nt="[object DataView]",Vr="[object Float32Array]",Kr="[object Float64Array]",Qr="[object Int8Array]",Gr="[object Int16Array]",zr="[object Int32Array]",Yr="[object Uint8Array]",Zr="[object Uint8ClampedArray]",Jr="[object Uint16Array]",Xr="[object Uint32Array]",cd=/\b__p \+= '';/g,fd=/\b(__p \+=) '' \+/g,dd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oo=/&(?:amp|lt|gt|quot|#39);/g,lo=/[&<>"']/g,hd=RegExp(oo.source),gd=RegExp(lo.source),md=/<%-([\s\S]+?)%>/g,pd=/<%([\s\S]+?)%>/g,ao=/<%=([\s\S]+?)%>/g,_d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yd=/^\w*$/,vd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jr=/[\\^$.*+?()[\]{}|]/g,wd=RegExp(jr.source),ei=/^\s+/,Cd=/\s/,Ed=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bd=/\{\n\/\* \[wrapped with (.+)\] \*/,Ad=/,? & /,xd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sd=/[()=,{}\[\]\/\s]/,Rd=/\\(\\)?/g,Od=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,uo=/\w*$/,kd=/^[-+]0x[0-9a-f]+$/i,$d=/^0b[01]+$/i,qd=/^\[object .+?Constructor\]$/,Bd=/^0o[0-7]+$/i,Ld=/^(?:0|[1-9]\d*)$/,Nd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,Td=/['\n\r\u2028\u2029\\]/g,Un="\\ud800-\\udfff",Hd="\\u0300-\\u036f",Id="\\ufe20-\\ufe2f",Fd="\\u20d0-\\u20ff",co=Hd+Id+Fd,fo="\\u2700-\\u27bf",ho="a-z\\xdf-\\xf6\\xf8-\\xff",Dd="\\xac\\xb1\\xd7\\xf7",Pd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Md="\\u2000-\\u206f",Wd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",go="A-Z\\xc0-\\xd6\\xd8-\\xde",mo="\\ufe0e\\ufe0f",po=Dd+Pd+Md+Wd,ti="['’]",Ud="["+Un+"]",_o="["+po+"]",Vn="["+co+"]",yo="\\d+",Vd="["+fo+"]",vo="["+ho+"]",wo="[^"+Un+po+yo+fo+ho+go+"]",ni="\\ud83c[\\udffb-\\udfff]",Kd="(?:"+Vn+"|"+ni+")",Co="[^"+Un+"]",ri="(?:\\ud83c[\\udde6-\\uddff]){2}",ii="[\\ud800-\\udbff][\\udc00-\\udfff]",Tt="["+go+"]",Eo="\\u200d",bo="(?:"+vo+"|"+wo+")",Qd="(?:"+Tt+"|"+wo+")",Ao="(?:"+ti+"(?:d|ll|m|re|s|t|ve))?",xo="(?:"+ti+"(?:D|LL|M|RE|S|T|VE))?",So=Kd+"?",Ro="["+mo+"]?",Gd="(?:"+Eo+"(?:"+[Co,ri,ii].join("|")+")"+Ro+So+")*",zd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oo=Ro+So+Gd,Zd="(?:"+[Vd,ri,ii].join("|")+")"+Oo,Jd="(?:"+[Co+Vn+"?",Vn,ri,ii,Ud].join("|")+")",Xd=RegExp(ti,"g"),jd=RegExp(Vn,"g"),si=RegExp(ni+"(?="+ni+")|"+Jd+Oo,"g"),eh=RegExp([Tt+"?"+vo+"+"+Ao+"(?="+[_o,Tt,"$"].join("|")+")",Qd+"+"+xo+"(?="+[_o,Tt+bo,"$"].join("|")+")",Tt+"?"+bo+"+"+Ao,Tt+"+"+xo,Yd,zd,yo,Zd].join("|"),"g"),th=RegExp("["+Eo+Un+co+mo+"]"),nh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rh=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ih=-1,Y={};Y[Vr]=Y[Kr]=Y[Qr]=Y[Gr]=Y[zr]=Y[Yr]=Y[Zr]=Y[Jr]=Y[Xr]=!0,Y[Lt]=Y[Fn]=Y[dn]=Y[on]=Y[Nt]=Y[ln]=Y[Dn]=Y[Pn]=Y[Me]=Y[an]=Y[nt]=Y[un]=Y[We]=Y[cn]=Y[fn]=!1;var z={};z[Lt]=z[Fn]=z[dn]=z[Nt]=z[on]=z[ln]=z[Vr]=z[Kr]=z[Qr]=z[Gr]=z[zr]=z[Me]=z[an]=z[nt]=z[un]=z[We]=z[cn]=z[Mn]=z[Yr]=z[Zr]=z[Jr]=z[Xr]=!0,z[Dn]=z[Pn]=z[fn]=!1;var sh={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},oh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},lh={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ah={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uh=parseFloat,ch=parseInt,ko=typeof en=="object"&&en&&en.Object===Object&&en,fh=typeof self=="object"&&self&&self.Object===Object&&self,ue=ko||fh||Function("return this")(),oi=r&&!r.nodeType&&r,Et=oi&&!0&&s&&!s.nodeType&&s,$o=Et&&Et.exports===oi,li=$o&&ko.process,qe=function(){try{var _=Et&&Et.require&&Et.require("util").types;return _||li&&li.binding&&li.binding("util")}catch{}}(),qo=qe&&qe.isArrayBuffer,Bo=qe&&qe.isDate,Lo=qe&&qe.isMap,No=qe&&qe.isRegExp,To=qe&&qe.isSet,Ho=qe&&qe.isTypedArray;function xe(_,C,v){switch(v.length){case 0:return _.call(C);case 1:return _.call(C,v[0]);case 2:return _.call(C,v[0],v[1]);case 3:return _.call(C,v[0],v[1],v[2])}return _.apply(C,v)}function dh(_,C,v,k){for(var T=-1,U=_==null?0:_.length;++T<U;){var oe=_[T];C(k,oe,v(oe),_)}return k}function Be(_,C){for(var v=-1,k=_==null?0:_.length;++v<k&&C(_[v],v,_)!==!1;);return _}function hh(_,C){for(var v=_==null?0:_.length;v--&&C(_[v],v,_)!==!1;);return _}function Io(_,C){for(var v=-1,k=_==null?0:_.length;++v<k;)if(!C(_[v],v,_))return!1;return!0}function dt(_,C){for(var v=-1,k=_==null?0:_.length,T=0,U=[];++v<k;){var oe=_[v];C(oe,v,_)&&(U[T++]=oe)}return U}function Kn(_,C){var v=_==null?0:_.length;return!!v&&Ht(_,C,0)>-1}function ai(_,C,v){for(var k=-1,T=_==null?0:_.length;++k<T;)if(v(C,_[k]))return!0;return!1}function J(_,C){for(var v=-1,k=_==null?0:_.length,T=Array(k);++v<k;)T[v]=C(_[v],v,_);return T}function ht(_,C){for(var v=-1,k=C.length,T=_.length;++v<k;)_[T+v]=C[v];return _}function ui(_,C,v,k){var T=-1,U=_==null?0:_.length;for(k&&U&&(v=_[++T]);++T<U;)v=C(v,_[T],T,_);return v}function gh(_,C,v,k){var T=_==null?0:_.length;for(k&&T&&(v=_[--T]);T--;)v=C(v,_[T],T,_);return v}function ci(_,C){for(var v=-1,k=_==null?0:_.length;++v<k;)if(C(_[v],v,_))return!0;return!1}var mh=fi("length");function ph(_){return _.split("")}function _h(_){return _.match(xd)||[]}function Fo(_,C,v){var k;return v(_,function(T,U,oe){if(C(T,U,oe))return k=U,!1}),k}function Qn(_,C,v,k){for(var T=_.length,U=v+(k?1:-1);k?U--:++U<T;)if(C(_[U],U,_))return U;return-1}function Ht(_,C,v){return C===C?kh(_,C,v):Qn(_,Do,v)}function yh(_,C,v,k){for(var T=v-1,U=_.length;++T<U;)if(k(_[T],C))return T;return-1}function Do(_){return _!==_}function Po(_,C){var v=_==null?0:_.length;return v?hi(_,C)/v:In}function fi(_){return function(C){return C==null?i:C[_]}}function di(_){return function(C){return _==null?i:_[C]}}function Mo(_,C,v,k,T){return T(_,function(U,oe,Q){v=k?(k=!1,U):C(v,U,oe,Q)}),v}function vh(_,C){var v=_.length;for(_.sort(C);v--;)_[v]=_[v].value;return _}function hi(_,C){for(var v,k=-1,T=_.length;++k<T;){var U=C(_[k]);U!==i&&(v=v===i?U:v+U)}return v}function gi(_,C){for(var v=-1,k=Array(_);++v<_;)k[v]=C(v);return k}function wh(_,C){return J(C,function(v){return[v,_[v]]})}function Wo(_){return _&&_.slice(0,Qo(_)+1).replace(ei,"")}function Se(_){return function(C){return _(C)}}function mi(_,C){return J(C,function(v){return _[v]})}function hn(_,C){return _.has(C)}function Uo(_,C){for(var v=-1,k=_.length;++v<k&&Ht(C,_[v],0)>-1;);return v}function Vo(_,C){for(var v=_.length;v--&&Ht(C,_[v],0)>-1;);return v}function Ch(_,C){for(var v=_.length,k=0;v--;)_[v]===C&&++k;return k}var Eh=di(sh),bh=di(oh);function Ah(_){return"\\"+ah[_]}function xh(_,C){return _==null?i:_[C]}function It(_){return th.test(_)}function Sh(_){return nh.test(_)}function Rh(_){for(var C,v=[];!(C=_.next()).done;)v.push(C.value);return v}function pi(_){var C=-1,v=Array(_.size);return _.forEach(function(k,T){v[++C]=[T,k]}),v}function Ko(_,C){return function(v){return _(C(v))}}function gt(_,C){for(var v=-1,k=_.length,T=0,U=[];++v<k;){var oe=_[v];(oe===C||oe===R)&&(_[v]=R,U[T++]=v)}return U}function Gn(_){var C=-1,v=Array(_.size);return _.forEach(function(k){v[++C]=k}),v}function Oh(_){var C=-1,v=Array(_.size);return _.forEach(function(k){v[++C]=[k,k]}),v}function kh(_,C,v){for(var k=v-1,T=_.length;++k<T;)if(_[k]===C)return k;return-1}function $h(_,C,v){for(var k=v+1;k--;)if(_[k]===C)return k;return k}function Ft(_){return It(_)?Bh(_):mh(_)}function Ue(_){return It(_)?Lh(_):ph(_)}function Qo(_){for(var C=_.length;C--&&Cd.test(_.charAt(C)););return C}var qh=di(lh);function Bh(_){for(var C=si.lastIndex=0;si.test(_);)++C;return C}function Lh(_){return _.match(si)||[]}function Nh(_){return _.match(eh)||[]}var Th=function _(C){C=C==null?ue:Dt.defaults(ue.Object(),C,Dt.pick(ue,rh));var v=C.Array,k=C.Date,T=C.Error,U=C.Function,oe=C.Math,Q=C.Object,_i=C.RegExp,Hh=C.String,Le=C.TypeError,zn=v.prototype,Ih=U.prototype,Pt=Q.prototype,Yn=C["__core-js_shared__"],Zn=Ih.toString,K=Pt.hasOwnProperty,Fh=0,Go=function(){var e=/[^.]+$/.exec(Yn&&Yn.keys&&Yn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Jn=Pt.toString,Dh=Zn.call(Q),Ph=ue._,Mh=_i("^"+Zn.call(K).replace(jr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xn=$o?C.Buffer:i,mt=C.Symbol,jn=C.Uint8Array,zo=Xn?Xn.allocUnsafe:i,er=Ko(Q.getPrototypeOf,Q),Yo=Q.create,Zo=Pt.propertyIsEnumerable,tr=zn.splice,Jo=mt?mt.isConcatSpreadable:i,gn=mt?mt.iterator:i,bt=mt?mt.toStringTag:i,nr=function(){try{var e=Ot(Q,"defineProperty");return e({},"",{}),e}catch{}}(),Wh=C.clearTimeout!==ue.clearTimeout&&C.clearTimeout,Uh=k&&k.now!==ue.Date.now&&k.now,Vh=C.setTimeout!==ue.setTimeout&&C.setTimeout,rr=oe.ceil,ir=oe.floor,yi=Q.getOwnPropertySymbols,Kh=Xn?Xn.isBuffer:i,Xo=C.isFinite,Qh=zn.join,Gh=Ko(Q.keys,Q),le=oe.max,me=oe.min,zh=k.now,Yh=C.parseInt,jo=oe.random,Zh=zn.reverse,vi=Ot(C,"DataView"),mn=Ot(C,"Map"),wi=Ot(C,"Promise"),Mt=Ot(C,"Set"),pn=Ot(C,"WeakMap"),_n=Ot(Q,"create"),sr=pn&&new pn,Wt={},Jh=kt(vi),Xh=kt(mn),jh=kt(wi),eg=kt(Mt),tg=kt(pn),or=mt?mt.prototype:i,yn=or?or.valueOf:i,el=or?or.toString:i;function f(e){if(te(e)&&!H(e)&&!(e instanceof M)){if(e instanceof Ne)return e;if(K.call(e,"__wrapped__"))return ta(e)}return new Ne(e)}var Ut=function(){function e(){}return function(t){if(!X(t))return{};if(Yo)return Yo(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function lr(){}function Ne(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}f.templateSettings={escape:md,evaluate:pd,interpolate:ao,variable:"",imports:{_:f}},f.prototype=lr.prototype,f.prototype.constructor=f,Ne.prototype=Ut(lr.prototype),Ne.prototype.constructor=Ne;function M(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ze,this.__views__=[]}function ng(){var e=new M(this.__wrapped__);return e.__actions__=Ce(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ce(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ce(this.__views__),e}function rg(){if(this.__filtered__){var e=new M(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ig(){var e=this.__wrapped__.value(),t=this.__dir__,n=H(e),o=t<0,l=n?e.length:0,d=pm(0,l,this.__views__),h=d.start,p=d.end,y=p-h,E=o?p:h-1,b=this.__iteratees__,A=b.length,O=0,$=me(y,this.__takeCount__);if(!n||!o&&l==y&&$==y)return Al(e,this.__actions__);var L=[];e:for(;y--&&O<$;){E+=t;for(var F=-1,N=e[E];++F<A;){var P=b[F],W=P.iteratee,ke=P.type,we=W(N);if(ke==Xf)N=we;else if(!we){if(ke==ro)continue e;break e}}L[O++]=N}return L}M.prototype=Ut(lr.prototype),M.prototype.constructor=M;function At(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function sg(){this.__data__=_n?_n(null):{},this.size=0}function og(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function lg(e){var t=this.__data__;if(_n){var n=t[e];return n===x?i:n}return K.call(t,e)?t[e]:i}function ag(e){var t=this.__data__;return _n?t[e]!==i:K.call(t,e)}function ug(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_n&&t===i?x:t,this}At.prototype.clear=sg,At.prototype.delete=og,At.prototype.get=lg,At.prototype.has=ag,At.prototype.set=ug;function rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function cg(){this.__data__=[],this.size=0}function fg(e){var t=this.__data__,n=ar(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():tr.call(t,n,1),--this.size,!0}function dg(e){var t=this.__data__,n=ar(t,e);return n<0?i:t[n][1]}function hg(e){return ar(this.__data__,e)>-1}function gg(e,t){var n=this.__data__,o=ar(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}rt.prototype.clear=cg,rt.prototype.delete=fg,rt.prototype.get=dg,rt.prototype.has=hg,rt.prototype.set=gg;function it(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function mg(){this.size=0,this.__data__={hash:new At,map:new(mn||rt),string:new At}}function pg(e){var t=wr(this,e).delete(e);return this.size-=t?1:0,t}function _g(e){return wr(this,e).get(e)}function yg(e){return wr(this,e).has(e)}function vg(e,t){var n=wr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}it.prototype.clear=mg,it.prototype.delete=pg,it.prototype.get=_g,it.prototype.has=yg,it.prototype.set=vg;function xt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new it;++t<n;)this.add(e[t])}function wg(e){return this.__data__.set(e,x),this}function Cg(e){return this.__data__.has(e)}xt.prototype.add=xt.prototype.push=wg,xt.prototype.has=Cg;function Ve(e){var t=this.__data__=new rt(e);this.size=t.size}function Eg(){this.__data__=new rt,this.size=0}function bg(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ag(e){return this.__data__.get(e)}function xg(e){return this.__data__.has(e)}function Sg(e,t){var n=this.__data__;if(n instanceof rt){var o=n.__data__;if(!mn||o.length<c-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new it(o)}return n.set(e,t),this.size=n.size,this}Ve.prototype.clear=Eg,Ve.prototype.delete=bg,Ve.prototype.get=Ag,Ve.prototype.has=xg,Ve.prototype.set=Sg;function tl(e,t){var n=H(e),o=!n&&$t(e),l=!n&&!o&&wt(e),d=!n&&!o&&!l&&Gt(e),h=n||o||l||d,p=h?gi(e.length,Hh):[],y=p.length;for(var E in e)(t||K.call(e,E))&&!(h&&(E=="length"||l&&(E=="offset"||E=="parent")||d&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||at(E,y)))&&p.push(E);return p}function nl(e){var t=e.length;return t?e[qi(0,t-1)]:i}function Rg(e,t){return Cr(Ce(e),St(t,0,e.length))}function Og(e){return Cr(Ce(e))}function Ci(e,t,n){(n!==i&&!Ke(e[t],n)||n===i&&!(t in e))&&st(e,t,n)}function vn(e,t,n){var o=e[t];(!(K.call(e,t)&&Ke(o,n))||n===i&&!(t in e))&&st(e,t,n)}function ar(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function kg(e,t,n,o){return pt(e,function(l,d,h){t(o,l,n(l),h)}),o}function rl(e,t){return e&&Ze(t,ae(t),e)}function $g(e,t){return e&&Ze(t,be(t),e)}function st(e,t,n){t=="__proto__"&&nr?nr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ei(e,t){for(var n=-1,o=t.length,l=v(o),d=e==null;++n<o;)l[n]=d?i:ns(e,t[n]);return l}function St(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function Te(e,t,n,o,l,d){var h,p=t&B,y=t&G,E=t&de;if(n&&(h=l?n(e,o,l,d):n(e)),h!==i)return h;if(!X(e))return e;var b=H(e);if(b){if(h=ym(e),!p)return Ce(e,h)}else{var A=pe(e),O=A==Pn||A==io;if(wt(e))return Rl(e,p);if(A==nt||A==Lt||O&&!l){if(h=y||O?{}:Ql(e),!p)return y?lm(e,$g(h,e)):om(e,rl(h,e))}else{if(!z[A])return l?e:{};h=vm(e,A,p)}}d||(d=new Ve);var $=d.get(e);if($)return $;d.set(e,h),Ca(e)?e.forEach(function(N){h.add(Te(N,t,n,N,e,d))}):va(e)&&e.forEach(function(N,P){h.set(P,Te(N,t,n,P,e,d))});var L=E?y?Wi:Mi:y?be:ae,F=b?i:L(e);return Be(F||e,function(N,P){F&&(P=N,N=e[P]),vn(h,P,Te(N,t,n,P,e,d))}),h}function qg(e){var t=ae(e);return function(n){return il(n,e,t)}}function il(e,t,n){var o=n.length;if(e==null)return!o;for(e=Q(e);o--;){var l=n[o],d=t[l],h=e[l];if(h===i&&!(l in e)||!d(h))return!1}return!0}function sl(e,t,n){if(typeof e!="function")throw new Le(g);return Sn(function(){e.apply(i,n)},t)}function wn(e,t,n,o){var l=-1,d=Kn,h=!0,p=e.length,y=[],E=t.length;if(!p)return y;n&&(t=J(t,Se(n))),o?(d=ai,h=!1):t.length>=c&&(d=hn,h=!1,t=new xt(t));e:for(;++l<p;){var b=e[l],A=n==null?b:n(b);if(b=o||b!==0?b:0,h&&A===A){for(var O=E;O--;)if(t[O]===A)continue e;y.push(b)}else d(t,A,o)||y.push(b)}return y}var pt=Bl(Ye),ol=Bl(Ai,!0);function Bg(e,t){var n=!0;return pt(e,function(o,l,d){return n=!!t(o,l,d),n}),n}function ur(e,t,n){for(var o=-1,l=e.length;++o<l;){var d=e[o],h=t(d);if(h!=null&&(p===i?h===h&&!Oe(h):n(h,p)))var p=h,y=d}return y}function Lg(e,t,n,o){var l=e.length;for(n=I(n),n<0&&(n=-n>l?0:l+n),o=o===i||o>l?l:I(o),o<0&&(o+=l),o=n>o?0:ba(o);n<o;)e[n++]=t;return e}function ll(e,t){var n=[];return pt(e,function(o,l,d){t(o,l,d)&&n.push(o)}),n}function ce(e,t,n,o,l){var d=-1,h=e.length;for(n||(n=Cm),l||(l=[]);++d<h;){var p=e[d];t>0&&n(p)?t>1?ce(p,t-1,n,o,l):ht(l,p):o||(l[l.length]=p)}return l}var bi=Ll(),al=Ll(!0);function Ye(e,t){return e&&bi(e,t,ae)}function Ai(e,t){return e&&al(e,t,ae)}function cr(e,t){return dt(t,function(n){return ut(e[n])})}function Rt(e,t){t=yt(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Je(t[n++])];return n&&n==o?e:i}function ul(e,t,n){var o=t(e);return H(e)?o:ht(o,n(e))}function ye(e){return e==null?e===i?ad:od:bt&&bt in Q(e)?mm(e):Om(e)}function xi(e,t){return e>t}function Ng(e,t){return e!=null&&K.call(e,t)}function Tg(e,t){return e!=null&&t in Q(e)}function Hg(e,t,n){return e>=me(t,n)&&e<le(t,n)}function Si(e,t,n){for(var o=n?ai:Kn,l=e[0].length,d=e.length,h=d,p=v(d),y=1/0,E=[];h--;){var b=e[h];h&&t&&(b=J(b,Se(t))),y=me(b.length,y),p[h]=!n&&(t||l>=120&&b.length>=120)?new xt(h&&b):i}b=e[0];var A=-1,O=p[0];e:for(;++A<l&&E.length<y;){var $=b[A],L=t?t($):$;if($=n||$!==0?$:0,!(O?hn(O,L):o(E,L,n))){for(h=d;--h;){var F=p[h];if(!(F?hn(F,L):o(e[h],L,n)))continue e}O&&O.push(L),E.push($)}}return E}function Ig(e,t,n,o){return Ye(e,function(l,d,h){t(o,n(l),d,h)}),o}function Cn(e,t,n){t=yt(t,e),e=Zl(e,t);var o=e==null?e:e[Je(Ie(t))];return o==null?i:xe(o,e,n)}function cl(e){return te(e)&&ye(e)==Lt}function Fg(e){return te(e)&&ye(e)==dn}function Dg(e){return te(e)&&ye(e)==ln}function En(e,t,n,o,l){return e===t?!0:e==null||t==null||!te(e)&&!te(t)?e!==e&&t!==t:Pg(e,t,n,o,En,l)}function Pg(e,t,n,o,l,d){var h=H(e),p=H(t),y=h?Fn:pe(e),E=p?Fn:pe(t);y=y==Lt?nt:y,E=E==Lt?nt:E;var b=y==nt,A=E==nt,O=y==E;if(O&&wt(e)){if(!wt(t))return!1;h=!0,b=!1}if(O&&!b)return d||(d=new Ve),h||Gt(e)?Ul(e,t,n,o,l,d):hm(e,t,y,n,o,l,d);if(!(n&he)){var $=b&&K.call(e,"__wrapped__"),L=A&&K.call(t,"__wrapped__");if($||L){var F=$?e.value():e,N=L?t.value():t;return d||(d=new Ve),l(F,N,n,o,d)}}return O?(d||(d=new Ve),gm(e,t,n,o,l,d)):!1}function Mg(e){return te(e)&&pe(e)==Me}function Ri(e,t,n,o){var l=n.length,d=l,h=!o;if(e==null)return!d;for(e=Q(e);l--;){var p=n[l];if(h&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++l<d;){p=n[l];var y=p[0],E=e[y],b=p[1];if(h&&p[2]){if(E===i&&!(y in e))return!1}else{var A=new Ve;if(o)var O=o(E,b,y,e,t,A);if(!(O===i?En(b,E,he|Pe,o,A):O))return!1}}return!0}function fl(e){if(!X(e)||bm(e))return!1;var t=ut(e)?Mh:qd;return t.test(kt(e))}function Wg(e){return te(e)&&ye(e)==un}function Ug(e){return te(e)&&pe(e)==We}function Vg(e){return te(e)&&Rr(e.length)&&!!Y[ye(e)]}function dl(e){return typeof e=="function"?e:e==null?Ae:typeof e=="object"?H(e)?ml(e[0],e[1]):gl(e):Na(e)}function Oi(e){if(!xn(e))return Gh(e);var t=[];for(var n in Q(e))K.call(e,n)&&n!="constructor"&&t.push(n);return t}function Kg(e){if(!X(e))return Rm(e);var t=xn(e),n=[];for(var o in e)o=="constructor"&&(t||!K.call(e,o))||n.push(o);return n}function ki(e,t){return e<t}function hl(e,t){var n=-1,o=Ee(e)?v(e.length):[];return pt(e,function(l,d,h){o[++n]=t(l,d,h)}),o}function gl(e){var t=Vi(e);return t.length==1&&t[0][2]?zl(t[0][0],t[0][1]):function(n){return n===e||Ri(n,e,t)}}function ml(e,t){return Qi(e)&&Gl(t)?zl(Je(e),t):function(n){var o=ns(n,e);return o===i&&o===t?rs(n,e):En(t,o,he|Pe)}}function fr(e,t,n,o,l){e!==t&&bi(t,function(d,h){if(l||(l=new Ve),X(d))Qg(e,t,h,n,fr,o,l);else{var p=o?o(zi(e,h),d,h+"",e,t,l):i;p===i&&(p=d),Ci(e,h,p)}},be)}function Qg(e,t,n,o,l,d,h){var p=zi(e,n),y=zi(t,n),E=h.get(y);if(E){Ci(e,n,E);return}var b=d?d(p,y,n+"",e,t,h):i,A=b===i;if(A){var O=H(y),$=!O&&wt(y),L=!O&&!$&&Gt(y);b=y,O||$||L?H(p)?b=p:ne(p)?b=Ce(p):$?(A=!1,b=Rl(y,!0)):L?(A=!1,b=Ol(y,!0)):b=[]:Rn(y)||$t(y)?(b=p,$t(p)?b=Aa(p):(!X(p)||ut(p))&&(b=Ql(y))):A=!1}A&&(h.set(y,b),l(b,y,o,d,h),h.delete(y)),Ci(e,n,b)}function pl(e,t){var n=e.length;if(n)return t+=t<0?n:0,at(t,n)?e[t]:i}function _l(e,t,n){t.length?t=J(t,function(d){return H(d)?function(h){return Rt(h,d.length===1?d[0]:d)}:d}):t=[Ae];var o=-1;t=J(t,Se(q()));var l=hl(e,function(d,h,p){var y=J(t,function(E){return E(d)});return{criteria:y,index:++o,value:d}});return vh(l,function(d,h){return sm(d,h,n)})}function Gg(e,t){return yl(e,t,function(n,o){return rs(e,o)})}function yl(e,t,n){for(var o=-1,l=t.length,d={};++o<l;){var h=t[o],p=Rt(e,h);n(p,h)&&bn(d,yt(h,e),p)}return d}function zg(e){return function(t){return Rt(t,e)}}function $i(e,t,n,o){var l=o?yh:Ht,d=-1,h=t.length,p=e;for(e===t&&(t=Ce(t)),n&&(p=J(e,Se(n)));++d<h;)for(var y=0,E=t[d],b=n?n(E):E;(y=l(p,b,y,o))>-1;)p!==e&&tr.call(p,y,1),tr.call(e,y,1);return e}function vl(e,t){for(var n=e?t.length:0,o=n-1;n--;){var l=t[n];if(n==o||l!==d){var d=l;at(l)?tr.call(e,l,1):Ni(e,l)}}return e}function qi(e,t){return e+ir(jo()*(t-e+1))}function Yg(e,t,n,o){for(var l=-1,d=le(rr((t-e)/(n||1)),0),h=v(d);d--;)h[o?d:++l]=e,e+=n;return h}function Bi(e,t){var n="";if(!e||t<1||t>Bt)return n;do t%2&&(n+=e),t=ir(t/2),t&&(e+=e);while(t);return n}function D(e,t){return Yi(Yl(e,t,Ae),e+"")}function Zg(e){return nl(zt(e))}function Jg(e,t){var n=zt(e);return Cr(n,St(t,0,n.length))}function bn(e,t,n,o){if(!X(e))return e;t=yt(t,e);for(var l=-1,d=t.length,h=d-1,p=e;p!=null&&++l<d;){var y=Je(t[l]),E=n;if(y==="__proto__"||y==="constructor"||y==="prototype")return e;if(l!=h){var b=p[y];E=o?o(b,y,p):i,E===i&&(E=X(b)?b:at(t[l+1])?[]:{})}vn(p,y,E),p=p[y]}return e}var wl=sr?function(e,t){return sr.set(e,t),e}:Ae,Xg=nr?function(e,t){return nr(e,"toString",{configurable:!0,enumerable:!1,value:ss(t),writable:!0})}:Ae;function jg(e){return Cr(zt(e))}function He(e,t,n){var o=-1,l=e.length;t<0&&(t=-t>l?0:l+t),n=n>l?l:n,n<0&&(n+=l),l=t>n?0:n-t>>>0,t>>>=0;for(var d=v(l);++o<l;)d[o]=e[o+t];return d}function em(e,t){var n;return pt(e,function(o,l,d){return n=t(o,l,d),!n}),!!n}function dr(e,t,n){var o=0,l=e==null?o:e.length;if(typeof t=="number"&&t===t&&l<=nd){for(;o<l;){var d=o+l>>>1,h=e[d];h!==null&&!Oe(h)&&(n?h<=t:h<t)?o=d+1:l=d}return l}return Li(e,t,Ae,n)}function Li(e,t,n,o){var l=0,d=e==null?0:e.length;if(d===0)return 0;t=n(t);for(var h=t!==t,p=t===null,y=Oe(t),E=t===i;l<d;){var b=ir((l+d)/2),A=n(e[b]),O=A!==i,$=A===null,L=A===A,F=Oe(A);if(h)var N=o||L;else E?N=L&&(o||O):p?N=L&&O&&(o||!$):y?N=L&&O&&!$&&(o||!F):$||F?N=!1:N=o?A<=t:A<t;N?l=b+1:d=b}return me(d,td)}function Cl(e,t){for(var n=-1,o=e.length,l=0,d=[];++n<o;){var h=e[n],p=t?t(h):h;if(!n||!Ke(p,y)){var y=p;d[l++]=h===0?0:h}}return d}function El(e){return typeof e=="number"?e:Oe(e)?In:+e}function Re(e){if(typeof e=="string")return e;if(H(e))return J(e,Re)+"";if(Oe(e))return el?el.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _t(e,t,n){var o=-1,l=Kn,d=e.length,h=!0,p=[],y=p;if(n)h=!1,l=ai;else if(d>=c){var E=t?null:fm(e);if(E)return Gn(E);h=!1,l=hn,y=new xt}else y=t?[]:p;e:for(;++o<d;){var b=e[o],A=t?t(b):b;if(b=n||b!==0?b:0,h&&A===A){for(var O=y.length;O--;)if(y[O]===A)continue e;t&&y.push(A),p.push(b)}else l(y,A,n)||(y!==p&&y.push(A),p.push(b))}return p}function Ni(e,t){return t=yt(t,e),e=Zl(e,t),e==null||delete e[Je(Ie(t))]}function bl(e,t,n,o){return bn(e,t,n(Rt(e,t)),o)}function hr(e,t,n,o){for(var l=e.length,d=o?l:-1;(o?d--:++d<l)&&t(e[d],d,e););return n?He(e,o?0:d,o?d+1:l):He(e,o?d+1:0,o?l:d)}function Al(e,t){var n=e;return n instanceof M&&(n=n.value()),ui(t,function(o,l){return l.func.apply(l.thisArg,ht([o],l.args))},n)}function Ti(e,t,n){var o=e.length;if(o<2)return o?_t(e[0]):[];for(var l=-1,d=v(o);++l<o;)for(var h=e[l],p=-1;++p<o;)p!=l&&(d[l]=wn(d[l]||h,e[p],t,n));return _t(ce(d,1),t,n)}function xl(e,t,n){for(var o=-1,l=e.length,d=t.length,h={};++o<l;){var p=o<d?t[o]:i;n(h,e[o],p)}return h}function Hi(e){return ne(e)?e:[]}function Ii(e){return typeof e=="function"?e:Ae}function yt(e,t){return H(e)?e:Qi(e,t)?[e]:ea(V(e))}var tm=D;function vt(e,t,n){var o=e.length;return n=n===i?o:n,!t&&n>=o?e:He(e,t,n)}var Sl=Wh||function(e){return ue.clearTimeout(e)};function Rl(e,t){if(t)return e.slice();var n=e.length,o=zo?zo(n):new e.constructor(n);return e.copy(o),o}function Fi(e){var t=new e.constructor(e.byteLength);return new jn(t).set(new jn(e)),t}function nm(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function rm(e){var t=new e.constructor(e.source,uo.exec(e));return t.lastIndex=e.lastIndex,t}function im(e){return yn?Q(yn.call(e)):{}}function Ol(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function kl(e,t){if(e!==t){var n=e!==i,o=e===null,l=e===e,d=Oe(e),h=t!==i,p=t===null,y=t===t,E=Oe(t);if(!p&&!E&&!d&&e>t||d&&h&&y&&!p&&!E||o&&h&&y||!n&&y||!l)return 1;if(!o&&!d&&!E&&e<t||E&&n&&l&&!o&&!d||p&&n&&l||!h&&l||!y)return-1}return 0}function sm(e,t,n){for(var o=-1,l=e.criteria,d=t.criteria,h=l.length,p=n.length;++o<h;){var y=kl(l[o],d[o]);if(y){if(o>=p)return y;var E=n[o];return y*(E=="desc"?-1:1)}}return e.index-t.index}function $l(e,t,n,o){for(var l=-1,d=e.length,h=n.length,p=-1,y=t.length,E=le(d-h,0),b=v(y+E),A=!o;++p<y;)b[p]=t[p];for(;++l<h;)(A||l<d)&&(b[n[l]]=e[l]);for(;E--;)b[p++]=e[l++];return b}function ql(e,t,n,o){for(var l=-1,d=e.length,h=-1,p=n.length,y=-1,E=t.length,b=le(d-p,0),A=v(b+E),O=!o;++l<b;)A[l]=e[l];for(var $=l;++y<E;)A[$+y]=t[y];for(;++h<p;)(O||l<d)&&(A[$+n[h]]=e[l++]);return A}function Ce(e,t){var n=-1,o=e.length;for(t||(t=v(o));++n<o;)t[n]=e[n];return t}function Ze(e,t,n,o){var l=!n;n||(n={});for(var d=-1,h=t.length;++d<h;){var p=t[d],y=o?o(n[p],e[p],p,n,e):i;y===i&&(y=e[p]),l?st(n,p,y):vn(n,p,y)}return n}function om(e,t){return Ze(e,Ki(e),t)}function lm(e,t){return Ze(e,Vl(e),t)}function gr(e,t){return function(n,o){var l=H(n)?dh:kg,d=t?t():{};return l(n,e,q(o,2),d)}}function Vt(e){return D(function(t,n){var o=-1,l=n.length,d=l>1?n[l-1]:i,h=l>2?n[2]:i;for(d=e.length>3&&typeof d=="function"?(l--,d):i,h&&ve(n[0],n[1],h)&&(d=l<3?i:d,l=1),t=Q(t);++o<l;){var p=n[o];p&&e(t,p,o,d)}return t})}function Bl(e,t){return function(n,o){if(n==null)return n;if(!Ee(n))return e(n,o);for(var l=n.length,d=t?l:-1,h=Q(n);(t?d--:++d<l)&&o(h[d],d,h)!==!1;);return n}}function Ll(e){return function(t,n,o){for(var l=-1,d=Q(t),h=o(t),p=h.length;p--;){var y=h[e?p:++l];if(n(d[y],y,d)===!1)break}return t}}function am(e,t,n){var o=t&ge,l=An(e);function d(){var h=this&&this!==ue&&this instanceof d?l:e;return h.apply(o?n:this,arguments)}return d}function Nl(e){return function(t){t=V(t);var n=It(t)?Ue(t):i,o=n?n[0]:t.charAt(0),l=n?vt(n,1).join(""):t.slice(1);return o[e]()+l}}function Kt(e){return function(t){return ui(Ba(qa(t).replace(Xd,"")),e,"")}}function An(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ut(e.prototype),o=e.apply(n,t);return X(o)?o:n}}function um(e,t,n){var o=An(e);function l(){for(var d=arguments.length,h=v(d),p=d,y=Qt(l);p--;)h[p]=arguments[p];var E=d<3&&h[0]!==y&&h[d-1]!==y?[]:gt(h,y);if(d-=E.length,d<n)return Dl(e,t,mr,l.placeholder,i,h,E,i,i,n-d);var b=this&&this!==ue&&this instanceof l?o:e;return xe(b,this,h)}return l}function Tl(e){return function(t,n,o){var l=Q(t);if(!Ee(t)){var d=q(n,3);t=ae(t),n=function(p){return d(l[p],p,l)}}var h=e(t,n,o);return h>-1?l[d?t[h]:h]:i}}function Hl(e){return lt(function(t){var n=t.length,o=n,l=Ne.prototype.thru;for(e&&t.reverse();o--;){var d=t[o];if(typeof d!="function")throw new Le(g);if(l&&!h&&vr(d)=="wrapper")var h=new Ne([],!0)}for(o=h?o:n;++o<n;){d=t[o];var p=vr(d),y=p=="wrapper"?Ui(d):i;y&&Gi(y[0])&&y[1]==(tt|je|et|sn)&&!y[4].length&&y[9]==1?h=h[vr(y[0])].apply(h,y[3]):h=d.length==1&&Gi(d)?h[p]():h.thru(d)}return function(){var E=arguments,b=E[0];if(h&&E.length==1&&H(b))return h.plant(b).value();for(var A=0,O=n?t[A].apply(this,E):b;++A<n;)O=t[A].call(this,O);return O}})}function mr(e,t,n,o,l,d,h,p,y,E){var b=t&tt,A=t&ge,O=t&qt,$=t&(je|nn),L=t&Ur,F=O?i:An(e);function N(){for(var P=arguments.length,W=v(P),ke=P;ke--;)W[ke]=arguments[ke];if($)var we=Qt(N),$e=Ch(W,we);if(o&&(W=$l(W,o,l,$)),d&&(W=ql(W,d,h,$)),P-=$e,$&&P<E){var re=gt(W,we);return Dl(e,t,mr,N.placeholder,n,W,re,p,y,E-P)}var Qe=A?n:this,ft=O?Qe[e]:e;return P=W.length,p?W=km(W,p):L&&P>1&&W.reverse(),b&&y<P&&(W.length=y),this&&this!==ue&&this instanceof N&&(ft=F||An(ft)),ft.apply(Qe,W)}return N}function Il(e,t){return function(n,o){return Ig(n,e,t(o),{})}}function pr(e,t){return function(n,o){var l;if(n===i&&o===i)return t;if(n!==i&&(l=n),o!==i){if(l===i)return o;typeof n=="string"||typeof o=="string"?(n=Re(n),o=Re(o)):(n=El(n),o=El(o)),l=e(n,o)}return l}}function Di(e){return lt(function(t){return t=J(t,Se(q())),D(function(n){var o=this;return e(t,function(l){return xe(l,o,n)})})})}function _r(e,t){t=t===i?" ":Re(t);var n=t.length;if(n<2)return n?Bi(t,e):t;var o=Bi(t,rr(e/Ft(t)));return It(t)?vt(Ue(o),0,e).join(""):o.slice(0,e)}function cm(e,t,n,o){var l=t&ge,d=An(e);function h(){for(var p=-1,y=arguments.length,E=-1,b=o.length,A=v(b+y),O=this&&this!==ue&&this instanceof h?d:e;++E<b;)A[E]=o[E];for(;y--;)A[E++]=arguments[++p];return xe(O,l?n:this,A)}return h}function Fl(e){return function(t,n,o){return o&&typeof o!="number"&&ve(t,n,o)&&(n=o=i),t=ct(t),n===i?(n=t,t=0):n=ct(n),o=o===i?t<n?1:-1:ct(o),Yg(t,n,o,e)}}function yr(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=Fe(t),n=Fe(n)),e(t,n)}}function Dl(e,t,n,o,l,d,h,p,y,E){var b=t&je,A=b?h:i,O=b?i:h,$=b?d:i,L=b?i:d;t|=b?et:rn,t&=~(b?rn:et),t&no||(t&=-4);var F=[e,t,l,$,A,L,O,p,y,E],N=n.apply(i,F);return Gi(e)&&Jl(N,F),N.placeholder=o,Xl(N,e,t)}function Pi(e){var t=oe[e];return function(n,o){if(n=Fe(n),o=o==null?0:me(I(o),292),o&&Xo(n)){var l=(V(n)+"e").split("e"),d=t(l[0]+"e"+(+l[1]+o));return l=(V(d)+"e").split("e"),+(l[0]+"e"+(+l[1]-o))}return t(n)}}var fm=Mt&&1/Gn(new Mt([,-0]))[1]==Hn?function(e){return new Mt(e)}:as;function Pl(e){return function(t){var n=pe(t);return n==Me?pi(t):n==We?Oh(t):wh(t,e(t))}}function ot(e,t,n,o,l,d,h,p){var y=t&qt;if(!y&&typeof e!="function")throw new Le(g);var E=o?o.length:0;if(E||(t&=-97,o=l=i),h=h===i?h:le(I(h),0),p=p===i?p:I(p),E-=l?l.length:0,t&rn){var b=o,A=l;o=l=i}var O=y?i:Ui(e),$=[e,t,n,o,l,b,A,d,h,p];if(O&&Sm($,O),e=$[0],t=$[1],n=$[2],o=$[3],l=$[4],p=$[9]=$[9]===i?y?0:e.length:le($[9]-E,0),!p&&t&(je|nn)&&(t&=-25),!t||t==ge)var L=am(e,t,n);else t==je||t==nn?L=um(e,t,p):(t==et||t==(ge|et))&&!l.length?L=cm(e,t,n,o):L=mr.apply(i,$);var F=O?wl:Jl;return Xl(F(L,$),e,t)}function Ml(e,t,n,o){return e===i||Ke(e,Pt[n])&&!K.call(o,n)?t:e}function Wl(e,t,n,o,l,d){return X(e)&&X(t)&&(d.set(t,e),fr(e,t,i,Wl,d),d.delete(t)),e}function dm(e){return Rn(e)?i:e}function Ul(e,t,n,o,l,d){var h=n&he,p=e.length,y=t.length;if(p!=y&&!(h&&y>p))return!1;var E=d.get(e),b=d.get(t);if(E&&b)return E==t&&b==e;var A=-1,O=!0,$=n&Pe?new xt:i;for(d.set(e,t),d.set(t,e);++A<p;){var L=e[A],F=t[A];if(o)var N=h?o(F,L,A,t,e,d):o(L,F,A,e,t,d);if(N!==i){if(N)continue;O=!1;break}if($){if(!ci(t,function(P,W){if(!hn($,W)&&(L===P||l(L,P,n,o,d)))return $.push(W)})){O=!1;break}}else if(!(L===F||l(L,F,n,o,d))){O=!1;break}}return d.delete(e),d.delete(t),O}function hm(e,t,n,o,l,d,h){switch(n){case Nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dn:return!(e.byteLength!=t.byteLength||!d(new jn(e),new jn(t)));case on:case ln:case an:return Ke(+e,+t);case Dn:return e.name==t.name&&e.message==t.message;case un:case cn:return e==t+"";case Me:var p=pi;case We:var y=o&he;if(p||(p=Gn),e.size!=t.size&&!y)return!1;var E=h.get(e);if(E)return E==t;o|=Pe,h.set(e,t);var b=Ul(p(e),p(t),o,l,d,h);return h.delete(e),b;case Mn:if(yn)return yn.call(e)==yn.call(t)}return!1}function gm(e,t,n,o,l,d){var h=n&he,p=Mi(e),y=p.length,E=Mi(t),b=E.length;if(y!=b&&!h)return!1;for(var A=y;A--;){var O=p[A];if(!(h?O in t:K.call(t,O)))return!1}var $=d.get(e),L=d.get(t);if($&&L)return $==t&&L==e;var F=!0;d.set(e,t),d.set(t,e);for(var N=h;++A<y;){O=p[A];var P=e[O],W=t[O];if(o)var ke=h?o(W,P,O,t,e,d):o(P,W,O,e,t,d);if(!(ke===i?P===W||l(P,W,n,o,d):ke)){F=!1;break}N||(N=O=="constructor")}if(F&&!N){var we=e.constructor,$e=t.constructor;we!=$e&&"constructor"in e&&"constructor"in t&&!(typeof we=="function"&&we instanceof we&&typeof $e=="function"&&$e instanceof $e)&&(F=!1)}return d.delete(e),d.delete(t),F}function lt(e){return Yi(Yl(e,i,ia),e+"")}function Mi(e){return ul(e,ae,Ki)}function Wi(e){return ul(e,be,Vl)}var Ui=sr?function(e){return sr.get(e)}:as;function vr(e){for(var t=e.name+"",n=Wt[t],o=K.call(Wt,t)?n.length:0;o--;){var l=n[o],d=l.func;if(d==null||d==e)return l.name}return t}function Qt(e){var t=K.call(f,"placeholder")?f:e;return t.placeholder}function q(){var e=f.iteratee||os;return e=e===os?dl:e,arguments.length?e(arguments[0],arguments[1]):e}function wr(e,t){var n=e.__data__;return Em(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Vi(e){for(var t=ae(e),n=t.length;n--;){var o=t[n],l=e[o];t[n]=[o,l,Gl(l)]}return t}function Ot(e,t){var n=xh(e,t);return fl(n)?n:i}function mm(e){var t=K.call(e,bt),n=e[bt];try{e[bt]=i;var o=!0}catch{}var l=Jn.call(e);return o&&(t?e[bt]=n:delete e[bt]),l}var Ki=yi?function(e){return e==null?[]:(e=Q(e),dt(yi(e),function(t){return Zo.call(e,t)}))}:us,Vl=yi?function(e){for(var t=[];e;)ht(t,Ki(e)),e=er(e);return t}:us,pe=ye;(vi&&pe(new vi(new ArrayBuffer(1)))!=Nt||mn&&pe(new mn)!=Me||wi&&pe(wi.resolve())!=so||Mt&&pe(new Mt)!=We||pn&&pe(new pn)!=fn)&&(pe=function(e){var t=ye(e),n=t==nt?e.constructor:i,o=n?kt(n):"";if(o)switch(o){case Jh:return Nt;case Xh:return Me;case jh:return so;case eg:return We;case tg:return fn}return t});function pm(e,t,n){for(var o=-1,l=n.length;++o<l;){var d=n[o],h=d.size;switch(d.type){case"drop":e+=h;break;case"dropRight":t-=h;break;case"take":t=me(t,e+h);break;case"takeRight":e=le(e,t-h);break}}return{start:e,end:t}}function _m(e){var t=e.match(bd);return t?t[1].split(Ad):[]}function Kl(e,t,n){t=yt(t,e);for(var o=-1,l=t.length,d=!1;++o<l;){var h=Je(t[o]);if(!(d=e!=null&&n(e,h)))break;e=e[h]}return d||++o!=l?d:(l=e==null?0:e.length,!!l&&Rr(l)&&at(h,l)&&(H(e)||$t(e)))}function ym(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&K.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ql(e){return typeof e.constructor=="function"&&!xn(e)?Ut(er(e)):{}}function vm(e,t,n){var o=e.constructor;switch(t){case dn:return Fi(e);case on:case ln:return new o(+e);case Nt:return nm(e,n);case Vr:case Kr:case Qr:case Gr:case zr:case Yr:case Zr:case Jr:case Xr:return Ol(e,n);case Me:return new o;case an:case cn:return new o(e);case un:return rm(e);case We:return new o;case Mn:return im(e)}}function wm(e,t){var n=t.length;if(!n)return e;var o=n-1;return t[o]=(n>1?"& ":"")+t[o],t=t.join(n>2?", ":" "),e.replace(Ed,`{
16
+ })(this,function(ht,g){"use strict";const ee=(l,s)=>{const r=l.__vccOpts||l;for(const[d,f]of s)r[d]=f;return r},Dl={name:"q-widget-q-modal",props:{modal:{type:Object,default:()=>({})}},data(){return{}},computed:{body(){return this.modal.body},css(){return this.modal.css},countdown(){return this.modal.countdown},label(){return this.modal.label},model(){return this.modal.model},onCancel(){return this.modal.onCancel},onClose(){return this.modal.onClose},onConfirm(){return this.modal.onConfirm},title(){return this.modal.title}},methods:{onFinish(){this.modal.onFinish()},qForm(l){this.modal.qForm(l)},qList(l){this.modal.qList(l)}}},Pl={class:"q-widget-q-modal __modal"};function Fl(l,s,r,d,f,u){const v=g.resolveComponent("q-modal",!0);return g.openBlock(),g.createElementBlock("div",Pl,[g.createVNode(v,{body:u.body,countdown:u.countdown,css:u.css,label:u.label,model:u.model,onCancel:u.onCancel,onClose:u.onClose,onConfirm:u.onConfirm,title:u.title,onOnFinish:u.onFinish,onQForm:u.qForm,onQList:u.qList},null,8,["body","countdown","css","label","model","onCancel","onClose","onConfirm","title","onOnFinish","onQForm","onQList"])])}const Ul=ee(Dl,[["render",Fl],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QModal.vue"]]);function Wl({controller:l,state:s,saveControllerState:r}){const{saveStateKeys:d=[]}=l,f=d.reduce((u,v)=>({...u,...Ki({keys:v.split("."),obj:s})}),{});return r({data:f})}function Ki({keys:l,obj:s}){const r=l.shift();return{[r]:l.length===0?s[r]:Ki({keys:l,obj:s[r]})}}function Ut({component:l,message:s,modalConfig:r={}}){const{countdown:d,label:f,title:u,canClose:v=!0}=r,S={body:[{customComponentName:"q-modal-region-tool-html",html:s}],countdown:d,label:f,onClose:v?()=>{l.modal=null}:null,title:u||"Error"};l.modal=S}class Ml{static exec({config:s,keys:r,permissions:d}){Array.isArray(s)||console.log("can not handle these buttons");const f=r.shift();return r.length!==0&&console.log(`can not handle ${r.join(".")}`),Ql({buttons:s,key:f,permissions:d})}}function Ql({buttons:l,key:s,permissions:r}){return l.map(d=>{if(Vl(s,d)){const f=d.permissions||[];return{...d,permissions:[...f,...r]}}return d})}function Vl(l,s){const{buttonType:r,id:d,label:f}=s;return l===d||l===f||l===r}class Kl{static exec({config:s,keys:r,permissions:d}){return mr({layout:s,keys:r,permissions:d})}}function mr({layout:l,keys:s,permissions:r}){const d=s[0],{children:f,permissions:u}=l;if(zl(d,l)){if(s.shift(),s.length===0)return{...l,permissions:[...u||[],...r]};if(Array.isArray(f))return{...l,children:f.map(v=>mr({layout:v,keys:[...s],permissions:r}))};console.log(`can not handle ${s.join(".")}`)}return Array.isArray(f)?{...l,children:f.map(v=>mr({layout:v,keys:[...s],permissions:r}))}:l}function zl(l,s){const{id:r,name:d}=s;return l===r||l===d}class Gl{static exec({config:s,keys:r,permissions:d}){const f=r.shift();let u=null;switch(f){case"buttons":{u=Ml;break}case"layout":{u=Kl;break}default:{u=null;break}}return!u||typeof u.exec!="function"?s:{...s,[f]:u.exec({config:s[f],keys:[...r],permissions:d})}}}class Yl{static exec({config:s,keys:r,permissions:d}){Array.isArray(s)||console.log("can not handle these actions");const f=r.shift();return r.length!==0&&console.log(`can not handle ${r.join(".")}`),Zl({actions:s,key:f,permissions:d})}}function Zl({actions:l,key:s,permissions:r}){return l.map(d=>{if(Jl(s,d)){const f=d.permissions||[];return{...d,permissions:[...f,...r]}}return d})}function Jl(l,s){const{id:r,label:d}=s;return l===r||l===d}class Xl{static exec({config:s,keys:r,permissions:d}){const f=r.shift();switch(f){case"actions":return{...s,actions:jl({actions:s[f],keys:r,permissions:d})};default:return s}}}function jl({actions:l,keys:s,permissions:r}){Array.isArray(l)||console.log("can not handle these actions");const d=s.shift();return s.length!==0?(console.log(`can not handle ${s.join(".")}`),l):l.map(f=>{if(ea(d,f)){const u=f.permissions||[];return{...f,permissions:[...u,...r]}}return f})}function ea(l,s){const{id:r,label:d}=s;return l===r||l===d}class ta{static exec({config:s,keys:r,permissions:d}){return Array.isArray(s)||console.log("can not handle these actions"),zi({headers:s,keys:r,permissions:d})}}function zi({headers:l,keys:s,permissions:r}){const d=s.shift();return l.map(f=>{if(na(d,f)){const{permissions:u,children:v}=f;return s.length!==0?Array.isArray(v)&&v.length>0?{...f,children:zi({headers:v,keys:s,permissions:r})}:(console.log(`can not handle ${s.join(".")}`),f):{...f,permissions:[...u||[],...r]}}return f})}function na(l,s){const{id:r,label:d,key:f}=s;return l===r||l===d||l===f}class ra{static exec({config:s,keys:r,permissions:d}){const f=r.shift();let u=null;switch(f){case"actions":{u=Yl;break}case"bulkAction":{u=Xl;break}case"headers":{u=ta;break}default:{u=null;break}}return!u||typeof u.exec!="function"?s:{...s,[f]:u.exec({config:s[f],keys:[...r],permissions:d})}}}const ia={ElementQForm:Gl,ElementQList:ra};function sa({config:l,configPermissions:s=[],type:r}){return s.reduce((f,u)=>{const v=oa(r);if(!v||typeof v.exec!="function")return console.log("no config handler"),f;const{key:S,value:T}=u;return v.exec({config:f,keys:S.split("."),permissions:T})},l)}function oa(l){return ia[l]||null}function pr(l,s,r,d){if(!l)return!0;if(typeof r!="function"||d&&typeof d!="function")return!1;const{key:f="",value:u,placeholder:v,keyValuePath:S=""}=l,[T]=Object.keys(u);if(!f&&typeof v>"u")switch(T){case"$and":return u.$and.reduce((x,B)=>x&&pr(B,s,r,d),!0);case"$or":return u.$or.reduce((x,B)=>x||pr(B,s,r,d),!1);default:return!1}let R=typeof v>"u"?r(f,s):v;if(S){const x=d.toObject(R);R=r(S,x)}switch(T){case"$empty":return R==null===u.$empty;case"$eq":return R===u.$eq;case"$gt":return R>u.$gt;case"$gte":return R>=u.$gte;case"$hasOverlap":return la(R,u.$hasOverlap);case"$lt":return R<u.$lt;case"$lte":return R<=u.$lte;case"$in":return Array.isArray(R)?!!R.find(x=>u.$in.includes(x)):typeof R!="object"?!!u.$in.includes(R):!1;case"$inValue":{const x=r(u.$inValue,s),B=Array.isArray(x)?x:[];return Array.isArray(R)?!!R.find(ie=>B.includes(ie)):typeof R=="string"?!!B.includes(R):!1}case"$ne":return R!==u.$ne;case"$notIn":return Array.isArray(R)?!R.find(x=>u.$notIn.includes(x)):typeof R!="object"?!u.$notIn.includes(R):!1;case"$intervalTimeGt":{const x=new Date().getTime(),B=new Date(R).getTime();return x-B>u.$intervalTimeGt}case"$intervalTimeLt":{const x=new Date().getTime(),B=new Date(R).getTime();return x-B<u.$intervalTimeLt}case"$isToday":{const x=new Date,B=x.setHours(0,0,0,0),ie=x.setHours(23,59,59,59),he=new Date(R).getTime();return(B<=he&&ie>=he)===u.$isToday}case"$notInValue":{const x=r(u.$notInValue,s),B=Array.isArray(x)?x:[];return Array.isArray(R)?!R.find(ie=>B.includes(ie)):typeof R!="object"?!B.includes(R):!1}case"$range":{const[x,B]=u.$range;return typeof x=="number"&&typeof B=="number"&&R>=x&&R<=B}default:return!1}}function la(l,s){let r=l,d=s;typeof r=="string"&&(r=r.split(",")),typeof d=="string"&&(d=d.split(","));const f=new Set(r);return d.find(u=>f.has(u))}function _r(l,s){let r=l,d=s;if(typeof l=="string"&&(r=r.split(".")),!Array.isArray(l)&&typeof l=="object"){const{keys:u,obj:v}=l;r=u,d=v}if(r.length===0)return d;const f=r.shift();return d&&Object.prototype.hasOwnProperty.call(d,f)?_r(r,d[f]):d&&f?d[f]:d}function aa(l,s=/\$\{(.+?)\}/g,r,d){if(!l)return"";let f=typeof d!="function"?d:_r;const u=new RegExp(s,"g");return l.replace(u,(v,S)=>{const T=f({keys:S.split("."),obj:r});return T==null?"":typeof T=="object"?JSON.stringify(T):T})}class Gi{constructor(s={}){s=s||{},this.key=s.key||null,this.value=typeof s.value<"u"?s.value:""}static init(s={}){if(s instanceof this)return s;const r=new this(s);return r.isValid?r:null}static initFromArray(s=[]){return Array.isArray(s)?s.map(r=>this.init(r)):[]}static initOnlyValidFromArray(s=[]){return this.initFromArray(s).filter(r=>r)}static get _classname(){return"KeyValueObject"}static get _superclass(){return"KeyValueObject"}static addItem(s,r,d){s.push(this.init({key:r,value:d}))}static addRecord(s=[],r,d){return this.hasKeyValue(s,r,d)||s.push(this.init({key:r,value:d})),s}static appendRecord(s=[],r,d){return s.map(f=>(this.sameKey(f,r)&&(f.value=[...f.value,...d]),f))}static appendValueArray(s=[],r,d){return s.map(f=>(this.sameKey(f,r)&&(f.value=[...f.value,...d]),f))}static foundByKey(s=[],r){return s.find(f=>this.sameKey(f,r))||null}static foundValueByKey(s=[],r){const d=this.foundByKey(s,r);return d?d.value:null}static fromObject(s={}){return Object.keys(s).reduce((r,d)=>(r.push(this.init({key:d,value:s[d]})),r),[])}static getValueByKey(s=[],r){return this.foundValueByKey(s,r)}static getValueByKeyFromArray(s=[],r){if(s.length===0)return null;const f=s.shift().find(u=>this.sameKey(u,r));return f&&f.value?f.value:this.getValueByKeyFromArray(s,r)}static getValuesByKey(s=[],r){return s.reduce((d,f)=>(this.sameKey(f,r)&&d.push(f.value),d),[])}static hasKeyValue(s=[],r,d){return typeof d>"u"?s.filter(f=>this.sameKey(f,r)).length>0:s.filter(f=>this.sameKey(f,r)&&Yi(f.value,d)).length>0}static insertOrUpdateRecord(s=[],r,d){let f=[...s];return this.hasKeyValue(s,r)?f=this.updateRecord(s,r,d):f.push(this.init({key:r,value:d})),f}static keys(s=[]){return Array.isArray(s)?s.reduce((r,d)=>(r.push(d.key),r),[]):[]}static merge(s,r){return(r||[]).map(d=>{const f=s.find(u=>u.key===d.key);f?f.value=ua(d.value,f.value):s.push(d)}),s}static removeByKey(s,r){return s.reduce((d,f)=>(this.sameKey(f,r)||d.push(f),d),[])}static sameKey(s,r){return Yi(s.key,r)}static toObject(s=[]){return Array.isArray(s)?s.reduce((r,d)=>(r[d.key]=d.value,r),{}):{}}static toString(s=[],r="; "){return Array.isArray(s)?s.reduce((d,f)=>(d.push(`${f.key}: ${f.value}`),d),[]).join(r):""}static updateRecord(s=[],r,d){return s.map(f=>this.sameKey(f,r)?{...f,value:d}:f)}static updateOrInsertRecord(s=[],r,d){return this.insertOrUpdateRecord(s,r,d)}static updateRecordsFromArray(s=[],r=[]){if(Array.isArray(s)&&Array.isArray(r)){const d=this.toObject(s),f=this.toObject(r);return this.fromObject({...d,...f})}return[]}static values(s=[]){return Array.isArray(s)?s.reduce((r,d)=>(r.push(d.value),r),[]):[]}get isValid(){return!!this.key}get toObject(){const s={};return this.isValid&&(s[this.key]=this.value),s}}function ua(l,s){return l===void 0?s:Array.isArray(l)&&Array.isArray(s)?[...new Set([...l,...s])]:typeof l=="object"&&typeof s=="object"&&!Array.isArray(l)&&!Array.isArray(s)?{...l,...s}:s}function Yi(l,s){return l===s}function vn({keys:l,obj:s}){return _r(l,s)}function ca(l,s,r){return aa(l,s,r,vn)}function vr({rule:l,data:s}){return pr(l,s,fa,Gi)}function fa(l,s){const r=l.split(".");return vn({keys:r,obj:s})}function yr(l,s){return da(l,s,vn,vr)}function da(l,s,r,d){return!Array.isArray(l)||l.length===0?"":l.reduce((f,u)=>{const{type:v,value:S="",restriction:T,template:R}=u;if(d({rule:T,data:s}))switch(v){case"label":{f+=S.toString();break}case"value":{const x=r({keys:S.split("."),obj:s})||"";f+=x.toString();break}case"array":{const x=r({keys:S.split("."),obj:s})||[];f+=x.reduce((B,ie)=>B+=yr(R,ie),"");break}case"group":{f+=yr(R,s);break}case"ellipsis":{const{maxLength:x}=u,B=r({keys:S.split("."),obj:s})||"";B.length<=x?f+=B.toString():f+=`${B.substr(0,x)}...`;break}default:{f+=S.toString();break}}return f},"")}function Cr(l){return`${l}-${Math.floor(Math.random()*1e9)}`}const ha=Object.freeze(Object.defineProperty({__proto__:null,KeyValueObject:Gi,convertString:ca,getStringByArr:yr,getValidation:vr,getValueByKeys:vn,setId:Cr},Symbol.toStringTag,{value:"Module"}));class wr{constructor(s={}){this.css=s.css,this.configType="Config"}get isValid(){return!!this}static init(s){const r=new this(s);return r.isValid?r:null}}function ga(l,s){const{button:r,klass:d}=l,{element:f}=s,u=f.getState()||{},{formData:v={}}=u;class S extends d{constructor(R){super(R),this.hidden=R.hidden||!1,this.permissionResult=R.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden&&super.isValid}static init(R,x){if(R instanceof S)return R;const B=R.permissions?x.permissionHandler(R.permissions,v):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},ie=new S({...R,permissionResult:B});return ie.isValid?ie:null}permissionResultHandler(R){const{event:x,isAllowCreate:B,isAllowRead:ie,isAllowUpdate:he,isAllowDelete:Fe}=R;x?typeof this[x]=="function"?this[x]({val:!0}):console.log(`do not have the event ${x}`):B&&ie&&he&&Fe||this.setHidden({val:!0})}setDisabled({val:R}){this.disabled=R}setHidden({val:R}){this.hidden=R}}return S.init(r,s)}function ma(l,s){const{layout:r,klass:d}=l,{element:f}=s,u=f.getState()||{},{formData:v={}}=u;class S extends d{constructor(x){super(x),this.permissionResult=x.permissions?s.permissionHandler(x.permissions,v):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},this.permissionResultHandler(this.permissionResult)}permissionResultHandler(x){const{event:B,isAllowCreate:ie,isAllowRead:he,isAllowUpdate:Fe,isAllowDelete:Vt}=x;B?typeof this[B]=="function"?this[B]({val:!0}):console.log(`do not have the event ${B}`):he?Fe||this.setPreview({val:!0}):this.setHidden({val:!0}),Array.isArray(this.children)&&this.children.forEach(ve=>{ve.permissionResultHandler(x)})}update(x){super.update(x),this.permissionResultHandler(this.permissionResult)}setDecoratorDisabled({val:x}){this.setDisabled({val:x})}setDecoratorHidden({val:x}){this.setHidden({val:x})}setDecoratorPreview({val:x}){this.setPreview({val:x})}}return S.init(r)}function pa(l){return s=>{const{type:r}=s;switch(r){case"button":return ga(s,l);case"node":return ma(s,l);default:return null}}}class Zi extends wr{constructor(s={}){super(s),this.configType="ElementQFormConfig",this.buttons=s.buttons,this.css=s.css||{},this.disabledForm=s.disabledForm||!1,this.eventName=s.eventName||{},this.formHandler=pa(s.helpers),this.layout=s.layout,this.previewForm=s.previewForm||!1,this.updateLayoutConfigs=s.updateLayoutConfigs||[]}get isValid(){return!!this}static init(s){const r=new this(s);return r.isValid?r:null}}function _a({helpers:l}){const{element:s}=l,{getClasses:r}=s.getHandlers(),{Cell:d}=l.qGrid;class f extends d{constructor(v){super(v),typeof v.hidden=="function"?this.permissionHidden=v.hidden(this.item.item,this):this.permissionHidden=v.hidden||!1,this.permissionResult=v.permissionResult,this.permissionResultHandler(this.permissionResult,v.customComponentName)}get isValid(){return this.permissionHidden===!1}static init(v){const{permissions:S}=v,T=S?l.permissionHandler(S):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},R=new this({...v,permissionResult:T});return R.isValid?R:null}permissionResultHandler(v,S){const{event:T,isAllowCreate:R,isAllowRead:x,isAllowUpdate:B,isAllowDelete:ie}=v;if(T){typeof this[T]=="function"?this[T]({val:!0}):console.log(`do not have the event ${T}`);return}(!(S==="q-grid-body-row-cell-button")&&!x||!(R&&x&&B&&ie))&&this.setPermissionHidden({val:!0})}setPermissionHidden({val:v}){this.permissionHidden=v}}return typeof r!="function"?{Cell:f}:r({helpers:{Cell:f,...l}})}class Ji extends wr{constructor(s={}){super(s),this.configType="ElementQGridConfig",this.classes=_a({helpers:s.helpers}),this.converter=va({helpers:s.helpers}),this.eventName=s.eventName,this.layout=s.layout,this.fillLastRow=s.fillLastRow,this.placeholder=s.placeholder,this.urlDelegate=s.urlDelegate}get isValid(){return!!this}static init(s){const r=new this(s);return r.isValid?r:null}}function va({helpers:l}){const{element:s}=l,{converter:r}=s.getHandlers();if(typeof r!="function")return f=>f;const{QItem:d}=l.qGrid;return r({helpers:{QItem:d,...l}})}function ya({helpers:l}){const{QListBulkButton:s}=l.qList,{getValidation:r}=l.qUtilities;class d extends s{constructor(u){super(u),this.hidden=u.hidden||!1,this.permissionResult=u.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(u,v){if(u instanceof d)return u;const{restriction:S,permissions:T}=u,R=v.controller.getState();if(!r({rule:S,data:R}))return null;const x=T?v.permissionHandler(T):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},B=new d({...u,permissionResult:x});return B.isValid?B:null}static initFromArray(u,v){return Array.isArray(u)?u.map(S=>this.init(S,v)):[]}static initOnlyValidFromArray(u,v){return this.initFromArray(u,v).filter(S=>S)}permissionResultHandler(u){const{event:v,isAllowCreate:S,isAllowRead:T,isAllowUpdate:R,isAllowDelete:x}=u;v?typeof this[v]=="function"?this[v]({val:!0}):console.log(`do not have the event ${v}`):S&&T&&R&&x||this.setHidden({val:!0})}setHidden({val:u}){this.hidden=u}}return d}function Ca({helpers:l}){const{QListButton:s}=l.qList;class r extends s{constructor(f){super(f),this.endpoint=Xi(f.endpoint,f.qRow),this.httpMethod=f.httpMethod,this.hidden=f.hidden||!1,this.permissionResult=f.permissionResult,this.permissionResultHandler(this.permissionResult),this.url=Xi(f.url,f.qRow)}get isValid(){return!this.hidden&&super.isValid}static init(f,u){if(f instanceof r)return f;const v=f.permissions?u.permissionHandler(f.permissions,f.qRow.get()):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},S=new r({...f,permissionResult:v});return S.isValid?S:null}static initFromArray(f,u){return Array.isArray(f)?f.map(v=>this.init(v,u)):[]}static initOnlyValidFromArray(f,u){return this.initFromArray(f,u).filter(v=>v)}permissionResultHandler(f){const{event:u,isAllowCreate:v,isAllowRead:S,isAllowUpdate:T,isAllowDelete:R}=f;u?typeof this[u]=="function"?this[u]({val:!0}):console.log(`do not have the event ${u}`):v&&S&&T&&R||this.setHidden({val:!0})}setHidden({val:f}){this.hidden=f}}return r}function Xi(l,s){if(!l)return"";const r=/\$\{(.+?)\}/g;return l.replace(r,(d,f)=>s.get(f.trim()))}function wa(){class l{constructor(r){Object.keys(r).forEach(d=>{this[d]=r[d]}),this.hidden=r.hidden||!1,this.permissionResult=r.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(r,d){if(r instanceof l)return r;const{children:f,permissions:u}=r,v=u?d.permissionHandler(u):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},S=new l({...r,children:Array.isArray(f)?this.initOnlyValidFromArray(f,d):null,permissionResult:v});return S.isValid?S:null}static initFromArray(r,d){return Array.isArray(r)?r.map(f=>this.init(f,d)):[]}static initOnlyValidFromArray(r,d){return this.initFromArray(r,d).filter(f=>f)}permissionResultHandler(r){const{event:d,isAllowCreate:f,isAllowRead:u,isAllowUpdate:v,isAllowDelete:S}=r;d?typeof this[d]=="function"?this[d]({val:!0}):console.log(`do not have the event ${d}`):u||this.setHidden({val:!0})}setHidden({val:r}){this.hidden=r}}return l}class ji extends wr{constructor(s={}){super(s),this.configType="ElementQListConfig",this.bulkAction=Ea({bulkAction:s.bulkAction,helpers:s.helpers}),this.converter=Aa({actions:s.actions,helpers:s.helpers}),this.css=s.css,this.eventName=s.eventName,this.expansion=s.expansion,this.headers=ba({headers:s.headers,helpers:s.helpers}),this.listStyle=s.listStyle||"q-list-table",this.listShowFooter=s.showFooter||!1,this.listSortBys=s.sortBys,this.noDataMessage=s.noDataMessage}get isValid(){return!!this}static init(s){const r=new this(s);return r.isValid?r:null}}function Ea({bulkAction:l={},helpers:s}){const r=ya({helpers:s});return{...l,actions:r.initOnlyValidFromArray(l.actions,s)}}function ba({headers:l,helpers:s}){return wa().initOnlyValidFromArray(l,s)}function Aa({actions:l,helpers:s}){const{QRow:r}=s.qList,d=Ca({helpers:s}),f={QListButton:d,QRow:r,...s},{element:u}=f,{converter:v}=u.getHandlers();return typeof v!="function"?S=>r.init({row:S,getActions:(T,R)=>{const{actions:x=[]}=R||{};return x.map(B=>d.init({...B,qRow:T},s)).filter(B=>B)}}):v({actions:l,helpers:f})}const Sa=["setHidden","setVisible"];class Er{constructor(s={}){this.id=s.id||Cr("node"),this.css=s.css||"",this.hidden=s.hidden||!1,this.nodeType="Node",this.observers=s.observers||[],this.permissionResult=s.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!!this.id}get isVisible(){return!this.hidden}get isCreated(){return!!this}static init(s){const r=new this(s);return r.isValid?r:null}getElementState(){return this}getType(){return this.type}isExist(s){const{name:r}=this;return!!s.find(d=>r&&d.name===r)}handleObservers(s){this.observers.forEach(r=>{const{key:d,value:f,condition:u}=r,v=vr({rule:u,data:s});v&&Ra(d)&&typeof this[d]=="function"&&this[d]({value:f,val:v})})}permissionResultHandler(s){const{event:r,isAllowCreate:d,isAllowRead:f,isAllowUpdate:u,isAllowDelete:v}=s;r?typeof this[r]=="function"?this[r]({val:!0}):console.log(`do not have the event ${r}`):d&&f&&u&&v||this.setHidden({val:!0})}resetNode(){this.component=null}setHidden({val:s}){this.hidden=s,s&&this.resetNode()}setVisible(s){this.setHidden({...s,val:!s.val})}updateElementState(s){return this.handleObservers(s),this}}function Ra(l){return Sa.includes(l)}let Wt=class extends Er{constructor(s={}){super(s),this.children=s.children||[],this.nodeType="Container"}get isCreated(){return super.isCreated&&!!this.isVisibleChildrenCreated}get isVisibleChildrenCreated(){return this.getVisibleChildren().reduce((s,r)=>s&&r.isCreated,!0)}get validChildren(){return this.children.filter(s=>s)}getElements(){return this.validChildren.reduce((s,r)=>[...s,...r.getElements()],[])}getElementState(){return this.validChildren.reduce((s,r)=>({...s,...r.getElementState()}),{})}getVisibleChildren(){return this.validChildren.filter(s=>s.isVisible)}updateElementState(s){return super.updateElementState(s),this.validChildren.forEach(r=>r.updateElementState(s)),this}};class xa extends Wt{constructor(s={}){super(s),this.nodeType="ContainerBox"}}class ka extends Wt{constructor(s={}){super(s),this.nodeType="ContainerColumn"}}class qa extends Wt{constructor(s={}){super(s),this.nodeType="ContainerHeaderSticky"}}class Ba extends Wt{constructor(s={}){super(s),this.nodeType="ContainerRow"}}const Oa={ContainerBox:xa,ContainerColumn:ka,ContainerHeaderSticky:qa,ContainerRow:Ba};let Se=class extends Er{constructor(s={}){super(s),this.controllerHelpers=s.controllerHelpers,this.configPermissions=s.configPermissions,this.name=s.name,this.nodeType=s.nodeType||"Element",this.state={},this.configHandler(s.config)}get isCreated(){return super.isCreated&&!!this.component}get isValid(){return super.isValid&&!!this.name}get hasConfigPermissions(){return!!this.configPermissions}get stateName(){return{...this.defaultStateName,...this.config.stateName}}addComponent(s){this.component=s}configHandler(s={}){this.hasConfigPermissions?this.config=sa({config:s,configPermissions:this.configPermissions,type:this.nodeType}):this.config=s}getConfig(){return this.config||{}}getComponent(){return this.component}getElements(){return[this]}getElementName(){return this.name}getHandlers(){const s=this.getElementName(),{elementHandlers:r={}}=this.state;return r[s]||{}}getState(){return this.state}getElementState(){return $a(this.state,this.stateName)}onCreated({component:s,payload:r={}}){return this.addComponent(s),this.updateState(r),this}update(s){this.updateElementState(s)}updateState(s){this.state={...this.state,...s}}updateElementState(s){super.updateElementState(s);const r=La(s,this.stateName);return this.updateState(r),this}};function $a(l,s){return Object.keys(s).reduce((r,d)=>{const f=s[d],u=l[d];return{...r,[f]:u}},{})}function La(l,s){return Object.keys(s).reduce((r,d)=>{const f=s[d],u=l[f];return delete r[f],{...r,[d]:u}},{...l})}class Na extends Se{constructor(s={}){super(s),this.defaultStateName={qButton:"qButton"}}getConfig(){return{...this.state.qButton||{},...this.config||{},...this.state[this.name]||{}}}}class Ha extends Se{constructor(s={}){super(s),this.defaultStateName={qComponent:"qComponent"}}getConfig(){return{...this.state.qComponent||{},...this.config||{},...this.state[this.name]||{}}}}var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ta(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var yn={exports:{}};yn.exports,function(l,s){(function(){var r,d="4.17.21",f=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",S="Invalid `variable` option passed into `_.template`",T="__lodash_hash_undefined__",R=500,x="__lodash_placeholder__",B=1,ie=2,he=4,Fe=1,Vt=2,ve=1,bt=2,is=4,Ve=8,Kt=16,Ke=32,zt=64,ze=128,Gt=256,Ar=512,xc=30,kc="...",qc=800,Bc=16,ss=1,Oc=2,$c=3,wn=1/0,At=9007199254740991,Lc=17976931348623157e292,En=NaN,Ue=4294967295,Nc=Ue-1,Hc=Ue>>>1,Tc=[["ary",ze],["bind",ve],["bindKey",bt],["curry",Ve],["curryRight",Kt],["flip",Ar],["partial",Ke],["partialRight",zt],["rearg",Gt]],St="[object Arguments]",bn="[object Array]",Ic="[object AsyncFunction]",Yt="[object Boolean]",Zt="[object Date]",Dc="[object DOMException]",An="[object Error]",Sn="[object Function]",os="[object GeneratorFunction]",Ne="[object Map]",Jt="[object Number]",Pc="[object Null]",Ge="[object Object]",ls="[object Promise]",Fc="[object Proxy]",Xt="[object RegExp]",He="[object Set]",jt="[object String]",Rn="[object Symbol]",Uc="[object Undefined]",en="[object WeakMap]",Wc="[object WeakSet]",tn="[object ArrayBuffer]",Rt="[object DataView]",Sr="[object Float32Array]",Rr="[object Float64Array]",xr="[object Int8Array]",kr="[object Int16Array]",qr="[object Int32Array]",Br="[object Uint8Array]",Or="[object Uint8ClampedArray]",$r="[object Uint16Array]",Lr="[object Uint32Array]",Mc=/\b__p \+= '';/g,Qc=/\b(__p \+=) '' \+/g,Vc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,as=/&(?:amp|lt|gt|quot|#39);/g,us=/[&<>"']/g,Kc=RegExp(as.source),zc=RegExp(us.source),Gc=/<%-([\s\S]+?)%>/g,Yc=/<%([\s\S]+?)%>/g,cs=/<%=([\s\S]+?)%>/g,Zc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jc=/^\w*$/,Xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nr=/[\\^$.*+?()[\]{}|]/g,jc=RegExp(Nr.source),Hr=/^\s+/,ef=/\s/,tf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nf=/\{\n\/\* \[wrapped with (.+)\] \*/,rf=/,? & /,sf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,of=/[()=,{}\[\]\/\s]/,lf=/\\(\\)?/g,af=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fs=/\w*$/,uf=/^[-+]0x[0-9a-f]+$/i,cf=/^0b[01]+$/i,ff=/^\[object .+?Constructor\]$/,df=/^0o[0-7]+$/i,hf=/^(?:0|[1-9]\d*)$/,gf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xn=/($^)/,mf=/['\n\r\u2028\u2029\\]/g,kn="\\ud800-\\udfff",pf="\\u0300-\\u036f",_f="\\ufe20-\\ufe2f",vf="\\u20d0-\\u20ff",ds=pf+_f+vf,hs="\\u2700-\\u27bf",gs="a-z\\xdf-\\xf6\\xf8-\\xff",yf="\\xac\\xb1\\xd7\\xf7",Cf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wf="\\u2000-\\u206f",Ef=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ms="A-Z\\xc0-\\xd6\\xd8-\\xde",ps="\\ufe0e\\ufe0f",_s=yf+Cf+wf+Ef,Tr="['’]",bf="["+kn+"]",vs="["+_s+"]",qn="["+ds+"]",ys="\\d+",Af="["+hs+"]",Cs="["+gs+"]",ws="[^"+kn+_s+ys+hs+gs+ms+"]",Ir="\\ud83c[\\udffb-\\udfff]",Sf="(?:"+qn+"|"+Ir+")",Es="[^"+kn+"]",Dr="(?:\\ud83c[\\udde6-\\uddff]){2}",Pr="[\\ud800-\\udbff][\\udc00-\\udfff]",xt="["+ms+"]",bs="\\u200d",As="(?:"+Cs+"|"+ws+")",Rf="(?:"+xt+"|"+ws+")",Ss="(?:"+Tr+"(?:d|ll|m|re|s|t|ve))?",Rs="(?:"+Tr+"(?:D|LL|M|RE|S|T|VE))?",xs=Sf+"?",ks="["+ps+"]?",xf="(?:"+bs+"(?:"+[Es,Dr,Pr].join("|")+")"+ks+xs+")*",kf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qs=ks+xs+xf,Bf="(?:"+[Af,Dr,Pr].join("|")+")"+qs,Of="(?:"+[Es+qn+"?",qn,Dr,Pr,bf].join("|")+")",$f=RegExp(Tr,"g"),Lf=RegExp(qn,"g"),Fr=RegExp(Ir+"(?="+Ir+")|"+Of+qs,"g"),Nf=RegExp([xt+"?"+Cs+"+"+Ss+"(?="+[vs,xt,"$"].join("|")+")",Rf+"+"+Rs+"(?="+[vs,xt+As,"$"].join("|")+")",xt+"?"+As+"+"+Ss,xt+"+"+Rs,qf,kf,ys,Bf].join("|"),"g"),Hf=RegExp("["+bs+kn+ds+ps+"]"),Tf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,If=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Df=-1,G={};G[Sr]=G[Rr]=G[xr]=G[kr]=G[qr]=G[Br]=G[Or]=G[$r]=G[Lr]=!0,G[St]=G[bn]=G[tn]=G[Yt]=G[Rt]=G[Zt]=G[An]=G[Sn]=G[Ne]=G[Jt]=G[Ge]=G[Xt]=G[He]=G[jt]=G[en]=!1;var z={};z[St]=z[bn]=z[tn]=z[Rt]=z[Yt]=z[Zt]=z[Sr]=z[Rr]=z[xr]=z[kr]=z[qr]=z[Ne]=z[Jt]=z[Ge]=z[Xt]=z[He]=z[jt]=z[Rn]=z[Br]=z[Or]=z[$r]=z[Lr]=!0,z[An]=z[Sn]=z[en]=!1;var Pf={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ff={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Uf={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Wf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mf=parseFloat,Qf=parseInt,Bs=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,Vf=typeof self=="object"&&self&&self.Object===Object&&self,oe=Bs||Vf||Function("return this")(),Ur=s&&!s.nodeType&&s,gt=Ur&&!0&&l&&!l.nodeType&&l,Os=gt&&gt.exports===Ur,Wr=Os&&Bs.process,Re=function(){try{var p=gt&&gt.require&&gt.require("util").types;return p||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),$s=Re&&Re.isArrayBuffer,Ls=Re&&Re.isDate,Ns=Re&&Re.isMap,Hs=Re&&Re.isRegExp,Ts=Re&&Re.isSet,Is=Re&&Re.isTypedArray;function ye(p,C,y){switch(y.length){case 0:return p.call(C);case 1:return p.call(C,y[0]);case 2:return p.call(C,y[0],y[1]);case 3:return p.call(C,y[0],y[1],y[2])}return p.apply(C,y)}function Kf(p,C,y,k){for(var N=-1,M=p==null?0:p.length;++N<M;){var ne=p[N];C(k,ne,y(ne),p)}return k}function xe(p,C){for(var y=-1,k=p==null?0:p.length;++y<k&&C(p[y],y,p)!==!1;);return p}function zf(p,C){for(var y=p==null?0:p.length;y--&&C(p[y],y,p)!==!1;);return p}function Ds(p,C){for(var y=-1,k=p==null?0:p.length;++y<k;)if(!C(p[y],y,p))return!1;return!0}function it(p,C){for(var y=-1,k=p==null?0:p.length,N=0,M=[];++y<k;){var ne=p[y];C(ne,y,p)&&(M[N++]=ne)}return M}function Bn(p,C){var y=p==null?0:p.length;return!!y&&kt(p,C,0)>-1}function Mr(p,C,y){for(var k=-1,N=p==null?0:p.length;++k<N;)if(y(C,p[k]))return!0;return!1}function Y(p,C){for(var y=-1,k=p==null?0:p.length,N=Array(k);++y<k;)N[y]=C(p[y],y,p);return N}function st(p,C){for(var y=-1,k=C.length,N=p.length;++y<k;)p[N+y]=C[y];return p}function Qr(p,C,y,k){var N=-1,M=p==null?0:p.length;for(k&&M&&(y=p[++N]);++N<M;)y=C(y,p[N],N,p);return y}function Gf(p,C,y,k){var N=p==null?0:p.length;for(k&&N&&(y=p[--N]);N--;)y=C(y,p[N],N,p);return y}function Vr(p,C){for(var y=-1,k=p==null?0:p.length;++y<k;)if(C(p[y],y,p))return!0;return!1}var Yf=Kr("length");function Zf(p){return p.split("")}function Jf(p){return p.match(sf)||[]}function Ps(p,C,y){var k;return y(p,function(N,M,ne){if(C(N,M,ne))return k=M,!1}),k}function On(p,C,y,k){for(var N=p.length,M=y+(k?1:-1);k?M--:++M<N;)if(C(p[M],M,p))return M;return-1}function kt(p,C,y){return C===C?ud(p,C,y):On(p,Fs,y)}function Xf(p,C,y,k){for(var N=y-1,M=p.length;++N<M;)if(k(p[N],C))return N;return-1}function Fs(p){return p!==p}function Us(p,C){var y=p==null?0:p.length;return y?Gr(p,C)/y:En}function Kr(p){return function(C){return C==null?r:C[p]}}function zr(p){return function(C){return p==null?r:p[C]}}function Ws(p,C,y,k,N){return N(p,function(M,ne,K){y=k?(k=!1,M):C(y,M,ne,K)}),y}function jf(p,C){var y=p.length;for(p.sort(C);y--;)p[y]=p[y].value;return p}function Gr(p,C){for(var y,k=-1,N=p.length;++k<N;){var M=C(p[k]);M!==r&&(y=y===r?M:y+M)}return y}function Yr(p,C){for(var y=-1,k=Array(p);++y<p;)k[y]=C(y);return k}function ed(p,C){return Y(C,function(y){return[y,p[y]]})}function Ms(p){return p&&p.slice(0,zs(p)+1).replace(Hr,"")}function Ce(p){return function(C){return p(C)}}function Zr(p,C){return Y(C,function(y){return p[y]})}function nn(p,C){return p.has(C)}function Qs(p,C){for(var y=-1,k=p.length;++y<k&&kt(C,p[y],0)>-1;);return y}function Vs(p,C){for(var y=p.length;y--&&kt(C,p[y],0)>-1;);return y}function td(p,C){for(var y=p.length,k=0;y--;)p[y]===C&&++k;return k}var nd=zr(Pf),rd=zr(Ff);function id(p){return"\\"+Wf[p]}function sd(p,C){return p==null?r:p[C]}function qt(p){return Hf.test(p)}function od(p){return Tf.test(p)}function ld(p){for(var C,y=[];!(C=p.next()).done;)y.push(C.value);return y}function Jr(p){var C=-1,y=Array(p.size);return p.forEach(function(k,N){y[++C]=[N,k]}),y}function Ks(p,C){return function(y){return p(C(y))}}function ot(p,C){for(var y=-1,k=p.length,N=0,M=[];++y<k;){var ne=p[y];(ne===C||ne===x)&&(p[y]=x,M[N++]=y)}return M}function $n(p){var C=-1,y=Array(p.size);return p.forEach(function(k){y[++C]=k}),y}function ad(p){var C=-1,y=Array(p.size);return p.forEach(function(k){y[++C]=[k,k]}),y}function ud(p,C,y){for(var k=y-1,N=p.length;++k<N;)if(p[k]===C)return k;return-1}function cd(p,C,y){for(var k=y+1;k--;)if(p[k]===C)return k;return k}function Bt(p){return qt(p)?dd(p):Yf(p)}function Te(p){return qt(p)?hd(p):Zf(p)}function zs(p){for(var C=p.length;C--&&ef.test(p.charAt(C)););return C}var fd=zr(Uf);function dd(p){for(var C=Fr.lastIndex=0;Fr.test(p);)++C;return C}function hd(p){return p.match(Fr)||[]}function gd(p){return p.match(Nf)||[]}var md=function p(C){C=C==null?oe:Ot.defaults(oe.Object(),C,Ot.pick(oe,If));var y=C.Array,k=C.Date,N=C.Error,M=C.Function,ne=C.Math,K=C.Object,Xr=C.RegExp,pd=C.String,ke=C.TypeError,Ln=y.prototype,_d=M.prototype,$t=K.prototype,Nn=C["__core-js_shared__"],Hn=_d.toString,V=$t.hasOwnProperty,vd=0,Gs=function(){var e=/[^.]+$/.exec(Nn&&Nn.keys&&Nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Tn=$t.toString,yd=Hn.call(K),Cd=oe._,wd=Xr("^"+Hn.call(V).replace(Nr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),In=Os?C.Buffer:r,lt=C.Symbol,Dn=C.Uint8Array,Ys=In?In.allocUnsafe:r,Pn=Ks(K.getPrototypeOf,K),Zs=K.create,Js=$t.propertyIsEnumerable,Fn=Ln.splice,Xs=lt?lt.isConcatSpreadable:r,rn=lt?lt.iterator:r,mt=lt?lt.toStringTag:r,Un=function(){try{var e=Ct(K,"defineProperty");return e({},"",{}),e}catch{}}(),Ed=C.clearTimeout!==oe.clearTimeout&&C.clearTimeout,bd=k&&k.now!==oe.Date.now&&k.now,Ad=C.setTimeout!==oe.setTimeout&&C.setTimeout,Wn=ne.ceil,Mn=ne.floor,jr=K.getOwnPropertySymbols,Sd=In?In.isBuffer:r,js=C.isFinite,Rd=Ln.join,xd=Ks(K.keys,K),re=ne.max,ae=ne.min,kd=k.now,qd=C.parseInt,eo=ne.random,Bd=Ln.reverse,ei=Ct(C,"DataView"),sn=Ct(C,"Map"),ti=Ct(C,"Promise"),Lt=Ct(C,"Set"),on=Ct(C,"WeakMap"),ln=Ct(K,"create"),Qn=on&&new on,Nt={},Od=wt(ei),$d=wt(sn),Ld=wt(ti),Nd=wt(Lt),Hd=wt(on),Vn=lt?lt.prototype:r,an=Vn?Vn.valueOf:r,to=Vn?Vn.toString:r;function a(e){if(J(e)&&!H(e)&&!(e instanceof U)){if(e instanceof qe)return e;if(V.call(e,"__wrapped__"))return rl(e)}return new qe(e)}var Ht=function(){function e(){}return function(t){if(!Z(t))return{};if(Zs)return Zs(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Kn(){}function qe(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}a.templateSettings={escape:Gc,evaluate:Yc,interpolate:cs,variable:"",imports:{_:a}},a.prototype=Kn.prototype,a.prototype.constructor=a,qe.prototype=Ht(Kn.prototype),qe.prototype.constructor=qe;function U(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ue,this.__views__=[]}function Td(){var e=new U(this.__wrapped__);return e.__actions__=ge(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ge(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ge(this.__views__),e}function Id(){if(this.__filtered__){var e=new U(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Dd(){var e=this.__wrapped__.value(),t=this.__dir__,n=H(e),i=t<0,o=n?e.length:0,c=Zh(0,o,this.__views__),h=c.start,m=c.end,_=m-h,w=i?m:h-1,E=this.__iteratees__,b=E.length,A=0,q=ae(_,this.__takeCount__);if(!n||!i&&o==_&&q==_)return Ro(e,this.__actions__);var $=[];e:for(;_--&&A<q;){w+=t;for(var D=-1,L=e[w];++D<b;){var F=E[D],W=F.iteratee,be=F.type,de=W(L);if(be==Oc)L=de;else if(!de){if(be==ss)continue e;break e}}$[A++]=L}return $}U.prototype=Ht(Kn.prototype),U.prototype.constructor=U;function pt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pd(){this.__data__=ln?ln(null):{},this.size=0}function Fd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Ud(e){var t=this.__data__;if(ln){var n=t[e];return n===T?r:n}return V.call(t,e)?t[e]:r}function Wd(e){var t=this.__data__;return ln?t[e]!==r:V.call(t,e)}function Md(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ln&&t===r?T:t,this}pt.prototype.clear=Pd,pt.prototype.delete=Fd,pt.prototype.get=Ud,pt.prototype.has=Wd,pt.prototype.set=Md;function Ye(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Qd(){this.__data__=[],this.size=0}function Vd(e){var t=this.__data__,n=zn(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():Fn.call(t,n,1),--this.size,!0}function Kd(e){var t=this.__data__,n=zn(t,e);return n<0?r:t[n][1]}function zd(e){return zn(this.__data__,e)>-1}function Gd(e,t){var n=this.__data__,i=zn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}Ye.prototype.clear=Qd,Ye.prototype.delete=Vd,Ye.prototype.get=Kd,Ye.prototype.has=zd,Ye.prototype.set=Gd;function Ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Yd(){this.size=0,this.__data__={hash:new pt,map:new(sn||Ye),string:new pt}}function Zd(e){var t=sr(this,e).delete(e);return this.size-=t?1:0,t}function Jd(e){return sr(this,e).get(e)}function Xd(e){return sr(this,e).has(e)}function jd(e,t){var n=sr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}Ze.prototype.clear=Yd,Ze.prototype.delete=Zd,Ze.prototype.get=Jd,Ze.prototype.has=Xd,Ze.prototype.set=jd;function _t(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ze;++t<n;)this.add(e[t])}function eh(e){return this.__data__.set(e,T),this}function th(e){return this.__data__.has(e)}_t.prototype.add=_t.prototype.push=eh,_t.prototype.has=th;function Ie(e){var t=this.__data__=new Ye(e);this.size=t.size}function nh(){this.__data__=new Ye,this.size=0}function rh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ih(e){return this.__data__.get(e)}function sh(e){return this.__data__.has(e)}function oh(e,t){var n=this.__data__;if(n instanceof Ye){var i=n.__data__;if(!sn||i.length<f-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ze(i)}return n.set(e,t),this.size=n.size,this}Ie.prototype.clear=nh,Ie.prototype.delete=rh,Ie.prototype.get=ih,Ie.prototype.has=sh,Ie.prototype.set=oh;function no(e,t){var n=H(e),i=!n&&Et(e),o=!n&&!i&&dt(e),c=!n&&!i&&!o&&Pt(e),h=n||i||o||c,m=h?Yr(e.length,pd):[],_=m.length;for(var w in e)(t||V.call(e,w))&&!(h&&(w=="length"||o&&(w=="offset"||w=="parent")||c&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||et(w,_)))&&m.push(w);return m}function ro(e){var t=e.length;return t?e[di(0,t-1)]:r}function lh(e,t){return or(ge(e),vt(t,0,e.length))}function ah(e){return or(ge(e))}function ni(e,t,n){(n!==r&&!De(e[t],n)||n===r&&!(t in e))&&Je(e,t,n)}function un(e,t,n){var i=e[t];(!(V.call(e,t)&&De(i,n))||n===r&&!(t in e))&&Je(e,t,n)}function zn(e,t){for(var n=e.length;n--;)if(De(e[n][0],t))return n;return-1}function uh(e,t,n,i){return at(e,function(o,c,h){t(i,o,n(o),h)}),i}function io(e,t){return e&&Me(t,se(t),e)}function ch(e,t){return e&&Me(t,pe(t),e)}function Je(e,t,n){t=="__proto__"&&Un?Un(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ri(e,t){for(var n=-1,i=t.length,o=y(i),c=e==null;++n<i;)o[n]=c?r:Ii(e,t[n]);return o}function vt(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function Be(e,t,n,i,o,c){var h,m=t&B,_=t&ie,w=t&he;if(n&&(h=o?n(e,i,o,c):n(e)),h!==r)return h;if(!Z(e))return e;var E=H(e);if(E){if(h=Xh(e),!m)return ge(e,h)}else{var b=ue(e),A=b==Sn||b==os;if(dt(e))return qo(e,m);if(b==Ge||b==St||A&&!o){if(h=_||A?{}:Go(e),!m)return _?Uh(e,ch(h,e)):Fh(e,io(h,e))}else{if(!z[b])return o?e:{};h=jh(e,b,m)}}c||(c=new Ie);var q=c.get(e);if(q)return q;c.set(e,h),bl(e)?e.forEach(function(L){h.add(Be(L,t,n,L,e,c))}):wl(e)&&e.forEach(function(L,F){h.set(F,Be(L,t,n,F,e,c))});var $=w?_?bi:Ei:_?pe:se,D=E?r:$(e);return xe(D||e,function(L,F){D&&(F=L,L=e[F]),un(h,F,Be(L,t,n,F,e,c))}),h}function fh(e){var t=se(e);return function(n){return so(n,e,t)}}function so(e,t,n){var i=n.length;if(e==null)return!i;for(e=K(e);i--;){var o=n[i],c=t[o],h=e[o];if(h===r&&!(o in e)||!c(h))return!1}return!0}function oo(e,t,n){if(typeof e!="function")throw new ke(v);return pn(function(){e.apply(r,n)},t)}function cn(e,t,n,i){var o=-1,c=Bn,h=!0,m=e.length,_=[],w=t.length;if(!m)return _;n&&(t=Y(t,Ce(n))),i?(c=Mr,h=!1):t.length>=f&&(c=nn,h=!1,t=new _t(t));e:for(;++o<m;){var E=e[o],b=n==null?E:n(E);if(E=i||E!==0?E:0,h&&b===b){for(var A=w;A--;)if(t[A]===b)continue e;_.push(E)}else c(t,b,i)||_.push(E)}return _}var at=No(We),lo=No(si,!0);function dh(e,t){var n=!0;return at(e,function(i,o,c){return n=!!t(i,o,c),n}),n}function Gn(e,t,n){for(var i=-1,o=e.length;++i<o;){var c=e[i],h=t(c);if(h!=null&&(m===r?h===h&&!Ee(h):n(h,m)))var m=h,_=c}return _}function hh(e,t,n,i){var o=e.length;for(n=I(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:I(i),i<0&&(i+=o),i=n>i?0:Sl(i);n<i;)e[n++]=t;return e}function ao(e,t){var n=[];return at(e,function(i,o,c){t(i,o,c)&&n.push(i)}),n}function le(e,t,n,i,o){var c=-1,h=e.length;for(n||(n=tg),o||(o=[]);++c<h;){var m=e[c];t>0&&n(m)?t>1?le(m,t-1,n,i,o):st(o,m):i||(o[o.length]=m)}return o}var ii=Ho(),uo=Ho(!0);function We(e,t){return e&&ii(e,t,se)}function si(e,t){return e&&uo(e,t,se)}function Yn(e,t){return it(t,function(n){return tt(e[n])})}function yt(e,t){t=ct(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Qe(t[n++])];return n&&n==i?e:r}function co(e,t,n){var i=t(e);return H(e)?i:st(i,n(e))}function ce(e){return e==null?e===r?Uc:Pc:mt&&mt in K(e)?Yh(e):ag(e)}function oi(e,t){return e>t}function gh(e,t){return e!=null&&V.call(e,t)}function mh(e,t){return e!=null&&t in K(e)}function ph(e,t,n){return e>=ae(t,n)&&e<re(t,n)}function li(e,t,n){for(var i=n?Mr:Bn,o=e[0].length,c=e.length,h=c,m=y(c),_=1/0,w=[];h--;){var E=e[h];h&&t&&(E=Y(E,Ce(t))),_=ae(E.length,_),m[h]=!n&&(t||o>=120&&E.length>=120)?new _t(h&&E):r}E=e[0];var b=-1,A=m[0];e:for(;++b<o&&w.length<_;){var q=E[b],$=t?t(q):q;if(q=n||q!==0?q:0,!(A?nn(A,$):i(w,$,n))){for(h=c;--h;){var D=m[h];if(!(D?nn(D,$):i(e[h],$,n)))continue e}A&&A.push($),w.push(q)}}return w}function _h(e,t,n,i){return We(e,function(o,c,h){t(i,n(o),c,h)}),i}function fn(e,t,n){t=ct(t,e),e=Xo(e,t);var i=e==null?e:e[Qe($e(t))];return i==null?r:ye(i,e,n)}function fo(e){return J(e)&&ce(e)==St}function vh(e){return J(e)&&ce(e)==tn}function yh(e){return J(e)&&ce(e)==Zt}function dn(e,t,n,i,o){return e===t?!0:e==null||t==null||!J(e)&&!J(t)?e!==e&&t!==t:Ch(e,t,n,i,dn,o)}function Ch(e,t,n,i,o,c){var h=H(e),m=H(t),_=h?bn:ue(e),w=m?bn:ue(t);_=_==St?Ge:_,w=w==St?Ge:w;var E=_==Ge,b=w==Ge,A=_==w;if(A&&dt(e)){if(!dt(t))return!1;h=!0,E=!1}if(A&&!E)return c||(c=new Ie),h||Pt(e)?Vo(e,t,n,i,o,c):zh(e,t,_,n,i,o,c);if(!(n&Fe)){var q=E&&V.call(e,"__wrapped__"),$=b&&V.call(t,"__wrapped__");if(q||$){var D=q?e.value():e,L=$?t.value():t;return c||(c=new Ie),o(D,L,n,i,c)}}return A?(c||(c=new Ie),Gh(e,t,n,i,o,c)):!1}function wh(e){return J(e)&&ue(e)==Ne}function ai(e,t,n,i){var o=n.length,c=o,h=!i;if(e==null)return!c;for(e=K(e);o--;){var m=n[o];if(h&&m[2]?m[1]!==e[m[0]]:!(m[0]in e))return!1}for(;++o<c;){m=n[o];var _=m[0],w=e[_],E=m[1];if(h&&m[2]){if(w===r&&!(_ in e))return!1}else{var b=new Ie;if(i)var A=i(w,E,_,e,t,b);if(!(A===r?dn(E,w,Fe|Vt,i,b):A))return!1}}return!0}function ho(e){if(!Z(e)||rg(e))return!1;var t=tt(e)?wd:ff;return t.test(wt(e))}function Eh(e){return J(e)&&ce(e)==Xt}function bh(e){return J(e)&&ue(e)==He}function Ah(e){return J(e)&&dr(e.length)&&!!G[ce(e)]}function go(e){return typeof e=="function"?e:e==null?_e:typeof e=="object"?H(e)?_o(e[0],e[1]):po(e):Tl(e)}function ui(e){if(!mn(e))return xd(e);var t=[];for(var n in K(e))V.call(e,n)&&n!="constructor"&&t.push(n);return t}function Sh(e){if(!Z(e))return lg(e);var t=mn(e),n=[];for(var i in e)i=="constructor"&&(t||!V.call(e,i))||n.push(i);return n}function ci(e,t){return e<t}function mo(e,t){var n=-1,i=me(e)?y(e.length):[];return at(e,function(o,c,h){i[++n]=t(o,c,h)}),i}function po(e){var t=Si(e);return t.length==1&&t[0][2]?Zo(t[0][0],t[0][1]):function(n){return n===e||ai(n,e,t)}}function _o(e,t){return xi(e)&&Yo(t)?Zo(Qe(e),t):function(n){var i=Ii(n,e);return i===r&&i===t?Di(n,e):dn(t,i,Fe|Vt)}}function Zn(e,t,n,i,o){e!==t&&ii(t,function(c,h){if(o||(o=new Ie),Z(c))Rh(e,t,h,n,Zn,i,o);else{var m=i?i(qi(e,h),c,h+"",e,t,o):r;m===r&&(m=c),ni(e,h,m)}},pe)}function Rh(e,t,n,i,o,c,h){var m=qi(e,n),_=qi(t,n),w=h.get(_);if(w){ni(e,n,w);return}var E=c?c(m,_,n+"",e,t,h):r,b=E===r;if(b){var A=H(_),q=!A&&dt(_),$=!A&&!q&&Pt(_);E=_,A||q||$?H(m)?E=m:X(m)?E=ge(m):q?(b=!1,E=qo(_,!0)):$?(b=!1,E=Bo(_,!0)):E=[]:_n(_)||Et(_)?(E=m,Et(m)?E=Rl(m):(!Z(m)||tt(m))&&(E=Go(_))):b=!1}b&&(h.set(_,E),o(E,_,i,c,h),h.delete(_)),ni(e,n,E)}function vo(e,t){var n=e.length;if(n)return t+=t<0?n:0,et(t,n)?e[t]:r}function yo(e,t,n){t.length?t=Y(t,function(c){return H(c)?function(h){return yt(h,c.length===1?c[0]:c)}:c}):t=[_e];var i=-1;t=Y(t,Ce(O()));var o=mo(e,function(c,h,m){var _=Y(t,function(w){return w(c)});return{criteria:_,index:++i,value:c}});return jf(o,function(c,h){return Ph(c,h,n)})}function xh(e,t){return Co(e,t,function(n,i){return Di(e,i)})}function Co(e,t,n){for(var i=-1,o=t.length,c={};++i<o;){var h=t[i],m=yt(e,h);n(m,h)&&hn(c,ct(h,e),m)}return c}function kh(e){return function(t){return yt(t,e)}}function fi(e,t,n,i){var o=i?Xf:kt,c=-1,h=t.length,m=e;for(e===t&&(t=ge(t)),n&&(m=Y(e,Ce(n)));++c<h;)for(var _=0,w=t[c],E=n?n(w):w;(_=o(m,E,_,i))>-1;)m!==e&&Fn.call(m,_,1),Fn.call(e,_,1);return e}function wo(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==c){var c=o;et(o)?Fn.call(e,o,1):mi(e,o)}}return e}function di(e,t){return e+Mn(eo()*(t-e+1))}function qh(e,t,n,i){for(var o=-1,c=re(Wn((t-e)/(n||1)),0),h=y(c);c--;)h[i?c:++o]=e,e+=n;return h}function hi(e,t){var n="";if(!e||t<1||t>At)return n;do t%2&&(n+=e),t=Mn(t/2),t&&(e+=e);while(t);return n}function P(e,t){return Bi(Jo(e,t,_e),e+"")}function Bh(e){return ro(Ft(e))}function Oh(e,t){var n=Ft(e);return or(n,vt(t,0,n.length))}function hn(e,t,n,i){if(!Z(e))return e;t=ct(t,e);for(var o=-1,c=t.length,h=c-1,m=e;m!=null&&++o<c;){var _=Qe(t[o]),w=n;if(_==="__proto__"||_==="constructor"||_==="prototype")return e;if(o!=h){var E=m[_];w=i?i(E,_,m):r,w===r&&(w=Z(E)?E:et(t[o+1])?[]:{})}un(m,_,w),m=m[_]}return e}var Eo=Qn?function(e,t){return Qn.set(e,t),e}:_e,$h=Un?function(e,t){return Un(e,"toString",{configurable:!0,enumerable:!1,value:Fi(t),writable:!0})}:_e;function Lh(e){return or(Ft(e))}function Oe(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var c=y(o);++i<o;)c[i]=e[i+t];return c}function Nh(e,t){var n;return at(e,function(i,o,c){return n=t(i,o,c),!n}),!!n}function Jn(e,t,n){var i=0,o=e==null?i:e.length;if(typeof t=="number"&&t===t&&o<=Hc){for(;i<o;){var c=i+o>>>1,h=e[c];h!==null&&!Ee(h)&&(n?h<=t:h<t)?i=c+1:o=c}return o}return gi(e,t,_e,n)}function gi(e,t,n,i){var o=0,c=e==null?0:e.length;if(c===0)return 0;t=n(t);for(var h=t!==t,m=t===null,_=Ee(t),w=t===r;o<c;){var E=Mn((o+c)/2),b=n(e[E]),A=b!==r,q=b===null,$=b===b,D=Ee(b);if(h)var L=i||$;else w?L=$&&(i||A):m?L=$&&A&&(i||!q):_?L=$&&A&&!q&&(i||!D):q||D?L=!1:L=i?b<=t:b<t;L?o=E+1:c=E}return ae(c,Nc)}function bo(e,t){for(var n=-1,i=e.length,o=0,c=[];++n<i;){var h=e[n],m=t?t(h):h;if(!n||!De(m,_)){var _=m;c[o++]=h===0?0:h}}return c}function Ao(e){return typeof e=="number"?e:Ee(e)?En:+e}function we(e){if(typeof e=="string")return e;if(H(e))return Y(e,we)+"";if(Ee(e))return to?to.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ut(e,t,n){var i=-1,o=Bn,c=e.length,h=!0,m=[],_=m;if(n)h=!1,o=Mr;else if(c>=f){var w=t?null:Vh(e);if(w)return $n(w);h=!1,o=nn,_=new _t}else _=t?[]:m;e:for(;++i<c;){var E=e[i],b=t?t(E):E;if(E=n||E!==0?E:0,h&&b===b){for(var A=_.length;A--;)if(_[A]===b)continue e;t&&_.push(b),m.push(E)}else o(_,b,n)||(_!==m&&_.push(b),m.push(E))}return m}function mi(e,t){return t=ct(t,e),e=Xo(e,t),e==null||delete e[Qe($e(t))]}function So(e,t,n,i){return hn(e,t,n(yt(e,t)),i)}function Xn(e,t,n,i){for(var o=e.length,c=i?o:-1;(i?c--:++c<o)&&t(e[c],c,e););return n?Oe(e,i?0:c,i?c+1:o):Oe(e,i?c+1:0,i?o:c)}function Ro(e,t){var n=e;return n instanceof U&&(n=n.value()),Qr(t,function(i,o){return o.func.apply(o.thisArg,st([i],o.args))},n)}function pi(e,t,n){var i=e.length;if(i<2)return i?ut(e[0]):[];for(var o=-1,c=y(i);++o<i;)for(var h=e[o],m=-1;++m<i;)m!=o&&(c[o]=cn(c[o]||h,e[m],t,n));return ut(le(c,1),t,n)}function xo(e,t,n){for(var i=-1,o=e.length,c=t.length,h={};++i<o;){var m=i<c?t[i]:r;n(h,e[i],m)}return h}function _i(e){return X(e)?e:[]}function vi(e){return typeof e=="function"?e:_e}function ct(e,t){return H(e)?e:xi(e,t)?[e]:nl(Q(e))}var Hh=P;function ft(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:Oe(e,t,n)}var ko=Ed||function(e){return oe.clearTimeout(e)};function qo(e,t){if(t)return e.slice();var n=e.length,i=Ys?Ys(n):new e.constructor(n);return e.copy(i),i}function yi(e){var t=new e.constructor(e.byteLength);return new Dn(t).set(new Dn(e)),t}function Th(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ih(e){var t=new e.constructor(e.source,fs.exec(e));return t.lastIndex=e.lastIndex,t}function Dh(e){return an?K(an.call(e)):{}}function Bo(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,c=Ee(e),h=t!==r,m=t===null,_=t===t,w=Ee(t);if(!m&&!w&&!c&&e>t||c&&h&&_&&!m&&!w||i&&h&&_||!n&&_||!o)return 1;if(!i&&!c&&!w&&e<t||w&&n&&o&&!i&&!c||m&&n&&o||!h&&o||!_)return-1}return 0}function Ph(e,t,n){for(var i=-1,o=e.criteria,c=t.criteria,h=o.length,m=n.length;++i<h;){var _=Oo(o[i],c[i]);if(_){if(i>=m)return _;var w=n[i];return _*(w=="desc"?-1:1)}}return e.index-t.index}function $o(e,t,n,i){for(var o=-1,c=e.length,h=n.length,m=-1,_=t.length,w=re(c-h,0),E=y(_+w),b=!i;++m<_;)E[m]=t[m];for(;++o<h;)(b||o<c)&&(E[n[o]]=e[o]);for(;w--;)E[m++]=e[o++];return E}function Lo(e,t,n,i){for(var o=-1,c=e.length,h=-1,m=n.length,_=-1,w=t.length,E=re(c-m,0),b=y(E+w),A=!i;++o<E;)b[o]=e[o];for(var q=o;++_<w;)b[q+_]=t[_];for(;++h<m;)(A||o<c)&&(b[q+n[h]]=e[o++]);return b}function ge(e,t){var n=-1,i=e.length;for(t||(t=y(i));++n<i;)t[n]=e[n];return t}function Me(e,t,n,i){var o=!n;n||(n={});for(var c=-1,h=t.length;++c<h;){var m=t[c],_=i?i(n[m],e[m],m,n,e):r;_===r&&(_=e[m]),o?Je(n,m,_):un(n,m,_)}return n}function Fh(e,t){return Me(e,Ri(e),t)}function Uh(e,t){return Me(e,Ko(e),t)}function jn(e,t){return function(n,i){var o=H(n)?Kf:uh,c=t?t():{};return o(n,e,O(i,2),c)}}function Tt(e){return P(function(t,n){var i=-1,o=n.length,c=o>1?n[o-1]:r,h=o>2?n[2]:r;for(c=e.length>3&&typeof c=="function"?(o--,c):r,h&&fe(n[0],n[1],h)&&(c=o<3?r:c,o=1),t=K(t);++i<o;){var m=n[i];m&&e(t,m,i,c)}return t})}function No(e,t){return function(n,i){if(n==null)return n;if(!me(n))return e(n,i);for(var o=n.length,c=t?o:-1,h=K(n);(t?c--:++c<o)&&i(h[c],c,h)!==!1;);return n}}function Ho(e){return function(t,n,i){for(var o=-1,c=K(t),h=i(t),m=h.length;m--;){var _=h[e?m:++o];if(n(c[_],_,c)===!1)break}return t}}function Wh(e,t,n){var i=t&ve,o=gn(e);function c(){var h=this&&this!==oe&&this instanceof c?o:e;return h.apply(i?n:this,arguments)}return c}function To(e){return function(t){t=Q(t);var n=qt(t)?Te(t):r,i=n?n[0]:t.charAt(0),o=n?ft(n,1).join(""):t.slice(1);return i[e]()+o}}function It(e){return function(t){return Qr(Nl(Ll(t).replace($f,"")),e,"")}}function gn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ht(e.prototype),i=e.apply(n,t);return Z(i)?i:n}}function Mh(e,t,n){var i=gn(e);function o(){for(var c=arguments.length,h=y(c),m=c,_=Dt(o);m--;)h[m]=arguments[m];var w=c<3&&h[0]!==_&&h[c-1]!==_?[]:ot(h,_);if(c-=w.length,c<n)return Uo(e,t,er,o.placeholder,r,h,w,r,r,n-c);var E=this&&this!==oe&&this instanceof o?i:e;return ye(E,this,h)}return o}function Io(e){return function(t,n,i){var o=K(t);if(!me(t)){var c=O(n,3);t=se(t),n=function(m){return c(o[m],m,o)}}var h=e(t,n,i);return h>-1?o[c?t[h]:h]:r}}function Do(e){return je(function(t){var n=t.length,i=n,o=qe.prototype.thru;for(e&&t.reverse();i--;){var c=t[i];if(typeof c!="function")throw new ke(v);if(o&&!h&&ir(c)=="wrapper")var h=new qe([],!0)}for(i=h?i:n;++i<n;){c=t[i];var m=ir(c),_=m=="wrapper"?Ai(c):r;_&&ki(_[0])&&_[1]==(ze|Ve|Ke|Gt)&&!_[4].length&&_[9]==1?h=h[ir(_[0])].apply(h,_[3]):h=c.length==1&&ki(c)?h[m]():h.thru(c)}return function(){var w=arguments,E=w[0];if(h&&w.length==1&&H(E))return h.plant(E).value();for(var b=0,A=n?t[b].apply(this,w):E;++b<n;)A=t[b].call(this,A);return A}})}function er(e,t,n,i,o,c,h,m,_,w){var E=t&ze,b=t&ve,A=t&bt,q=t&(Ve|Kt),$=t&Ar,D=A?r:gn(e);function L(){for(var F=arguments.length,W=y(F),be=F;be--;)W[be]=arguments[be];if(q)var de=Dt(L),Ae=td(W,de);if(i&&(W=$o(W,i,o,q)),c&&(W=Lo(W,c,h,q)),F-=Ae,q&&F<w){var j=ot(W,de);return Uo(e,t,er,L.placeholder,n,W,j,m,_,w-F)}var Pe=b?n:this,rt=A?Pe[e]:e;return F=W.length,m?W=ug(W,m):$&&F>1&&W.reverse(),E&&_<F&&(W.length=_),this&&this!==oe&&this instanceof L&&(rt=D||gn(rt)),rt.apply(Pe,W)}return L}function Po(e,t){return function(n,i){return _h(n,e,t(i),{})}}function tr(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;typeof n=="string"||typeof i=="string"?(n=we(n),i=we(i)):(n=Ao(n),i=Ao(i)),o=e(n,i)}return o}}function Ci(e){return je(function(t){return t=Y(t,Ce(O())),P(function(n){var i=this;return e(t,function(o){return ye(o,i,n)})})})}function nr(e,t){t=t===r?" ":we(t);var n=t.length;if(n<2)return n?hi(t,e):t;var i=hi(t,Wn(e/Bt(t)));return qt(t)?ft(Te(i),0,e).join(""):i.slice(0,e)}function Qh(e,t,n,i){var o=t&ve,c=gn(e);function h(){for(var m=-1,_=arguments.length,w=-1,E=i.length,b=y(E+_),A=this&&this!==oe&&this instanceof h?c:e;++w<E;)b[w]=i[w];for(;_--;)b[w++]=arguments[++m];return ye(A,o?n:this,b)}return h}function Fo(e){return function(t,n,i){return i&&typeof i!="number"&&fe(t,n,i)&&(n=i=r),t=nt(t),n===r?(n=t,t=0):n=nt(n),i=i===r?t<n?1:-1:nt(i),qh(t,n,i,e)}}function rr(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=Le(t),n=Le(n)),e(t,n)}}function Uo(e,t,n,i,o,c,h,m,_,w){var E=t&Ve,b=E?h:r,A=E?r:h,q=E?c:r,$=E?r:c;t|=E?Ke:zt,t&=~(E?zt:Ke),t&is||(t&=-4);var D=[e,t,o,q,b,$,A,m,_,w],L=n.apply(r,D);return ki(e)&&jo(L,D),L.placeholder=i,el(L,e,t)}function wi(e){var t=ne[e];return function(n,i){if(n=Le(n),i=i==null?0:ae(I(i),292),i&&js(n)){var o=(Q(n)+"e").split("e"),c=t(o[0]+"e"+(+o[1]+i));return o=(Q(c)+"e").split("e"),+(o[0]+"e"+(+o[1]-i))}return t(n)}}var Vh=Lt&&1/$n(new Lt([,-0]))[1]==wn?function(e){return new Lt(e)}:Mi;function Wo(e){return function(t){var n=ue(t);return n==Ne?Jr(t):n==He?ad(t):ed(t,e(t))}}function Xe(e,t,n,i,o,c,h,m){var _=t&bt;if(!_&&typeof e!="function")throw new ke(v);var w=i?i.length:0;if(w||(t&=-97,i=o=r),h=h===r?h:re(I(h),0),m=m===r?m:I(m),w-=o?o.length:0,t&zt){var E=i,b=o;i=o=r}var A=_?r:Ai(e),q=[e,t,n,i,o,E,b,c,h,m];if(A&&og(q,A),e=q[0],t=q[1],n=q[2],i=q[3],o=q[4],m=q[9]=q[9]===r?_?0:e.length:re(q[9]-w,0),!m&&t&(Ve|Kt)&&(t&=-25),!t||t==ve)var $=Wh(e,t,n);else t==Ve||t==Kt?$=Mh(e,t,m):(t==Ke||t==(ve|Ke))&&!o.length?$=Qh(e,t,n,i):$=er.apply(r,q);var D=A?Eo:jo;return el(D($,q),e,t)}function Mo(e,t,n,i){return e===r||De(e,$t[n])&&!V.call(i,n)?t:e}function Qo(e,t,n,i,o,c){return Z(e)&&Z(t)&&(c.set(t,e),Zn(e,t,r,Qo,c),c.delete(t)),e}function Kh(e){return _n(e)?r:e}function Vo(e,t,n,i,o,c){var h=n&Fe,m=e.length,_=t.length;if(m!=_&&!(h&&_>m))return!1;var w=c.get(e),E=c.get(t);if(w&&E)return w==t&&E==e;var b=-1,A=!0,q=n&Vt?new _t:r;for(c.set(e,t),c.set(t,e);++b<m;){var $=e[b],D=t[b];if(i)var L=h?i(D,$,b,t,e,c):i($,D,b,e,t,c);if(L!==r){if(L)continue;A=!1;break}if(q){if(!Vr(t,function(F,W){if(!nn(q,W)&&($===F||o($,F,n,i,c)))return q.push(W)})){A=!1;break}}else if(!($===D||o($,D,n,i,c))){A=!1;break}}return c.delete(e),c.delete(t),A}function zh(e,t,n,i,o,c,h){switch(n){case Rt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tn:return!(e.byteLength!=t.byteLength||!c(new Dn(e),new Dn(t)));case Yt:case Zt:case Jt:return De(+e,+t);case An:return e.name==t.name&&e.message==t.message;case Xt:case jt:return e==t+"";case Ne:var m=Jr;case He:var _=i&Fe;if(m||(m=$n),e.size!=t.size&&!_)return!1;var w=h.get(e);if(w)return w==t;i|=Vt,h.set(e,t);var E=Vo(m(e),m(t),i,o,c,h);return h.delete(e),E;case Rn:if(an)return an.call(e)==an.call(t)}return!1}function Gh(e,t,n,i,o,c){var h=n&Fe,m=Ei(e),_=m.length,w=Ei(t),E=w.length;if(_!=E&&!h)return!1;for(var b=_;b--;){var A=m[b];if(!(h?A in t:V.call(t,A)))return!1}var q=c.get(e),$=c.get(t);if(q&&$)return q==t&&$==e;var D=!0;c.set(e,t),c.set(t,e);for(var L=h;++b<_;){A=m[b];var F=e[A],W=t[A];if(i)var be=h?i(W,F,A,t,e,c):i(F,W,A,e,t,c);if(!(be===r?F===W||o(F,W,n,i,c):be)){D=!1;break}L||(L=A=="constructor")}if(D&&!L){var de=e.constructor,Ae=t.constructor;de!=Ae&&"constructor"in e&&"constructor"in t&&!(typeof de=="function"&&de instanceof de&&typeof Ae=="function"&&Ae instanceof Ae)&&(D=!1)}return c.delete(e),c.delete(t),D}function je(e){return Bi(Jo(e,r,ol),e+"")}function Ei(e){return co(e,se,Ri)}function bi(e){return co(e,pe,Ko)}var Ai=Qn?function(e){return Qn.get(e)}:Mi;function ir(e){for(var t=e.name+"",n=Nt[t],i=V.call(Nt,t)?n.length:0;i--;){var o=n[i],c=o.func;if(c==null||c==e)return o.name}return t}function Dt(e){var t=V.call(a,"placeholder")?a:e;return t.placeholder}function O(){var e=a.iteratee||Ui;return e=e===Ui?go:e,arguments.length?e(arguments[0],arguments[1]):e}function sr(e,t){var n=e.__data__;return ng(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Si(e){for(var t=se(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Yo(o)]}return t}function Ct(e,t){var n=sd(e,t);return ho(n)?n:r}function Yh(e){var t=V.call(e,mt),n=e[mt];try{e[mt]=r;var i=!0}catch{}var o=Tn.call(e);return i&&(t?e[mt]=n:delete e[mt]),o}var Ri=jr?function(e){return e==null?[]:(e=K(e),it(jr(e),function(t){return Js.call(e,t)}))}:Qi,Ko=jr?function(e){for(var t=[];e;)st(t,Ri(e)),e=Pn(e);return t}:Qi,ue=ce;(ei&&ue(new ei(new ArrayBuffer(1)))!=Rt||sn&&ue(new sn)!=Ne||ti&&ue(ti.resolve())!=ls||Lt&&ue(new Lt)!=He||on&&ue(new on)!=en)&&(ue=function(e){var t=ce(e),n=t==Ge?e.constructor:r,i=n?wt(n):"";if(i)switch(i){case Od:return Rt;case $d:return Ne;case Ld:return ls;case Nd:return He;case Hd:return en}return t});function Zh(e,t,n){for(var i=-1,o=n.length;++i<o;){var c=n[i],h=c.size;switch(c.type){case"drop":e+=h;break;case"dropRight":t-=h;break;case"take":t=ae(t,e+h);break;case"takeRight":e=re(e,t-h);break}}return{start:e,end:t}}function Jh(e){var t=e.match(nf);return t?t[1].split(rf):[]}function zo(e,t,n){t=ct(t,e);for(var i=-1,o=t.length,c=!1;++i<o;){var h=Qe(t[i]);if(!(c=e!=null&&n(e,h)))break;e=e[h]}return c||++i!=o?c:(o=e==null?0:e.length,!!o&&dr(o)&&et(h,o)&&(H(e)||Et(e)))}function Xh(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&V.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Go(e){return typeof e.constructor=="function"&&!mn(e)?Ht(Pn(e)):{}}function jh(e,t,n){var i=e.constructor;switch(t){case tn:return yi(e);case Yt:case Zt:return new i(+e);case Rt:return Th(e,n);case Sr:case Rr:case xr:case kr:case qr:case Br:case Or:case $r:case Lr:return Bo(e,n);case Ne:return new i;case Jt:case jt:return new i(e);case Xt:return Ih(e);case He:return new i;case Rn:return Dh(e)}}function eg(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(tf,`{
17
17
  /* [wrapped with `+t+`] */
18
- `)}function Cm(e){return H(e)||$t(e)||!!(Jo&&e&&e[Jo])}function at(e,t){var n=typeof e;return t=t??Bt,!!t&&(n=="number"||n!="symbol"&&Ld.test(e))&&e>-1&&e%1==0&&e<t}function ve(e,t,n){if(!X(n))return!1;var o=typeof t;return(o=="number"?Ee(n)&&at(t,n.length):o=="string"&&t in n)?Ke(n[t],e):!1}function Qi(e,t){if(H(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Oe(e)?!0:yd.test(e)||!_d.test(e)||t!=null&&e in Q(t)}function Em(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gi(e){var t=vr(e),n=f[t];if(typeof n!="function"||!(t in M.prototype))return!1;if(e===n)return!0;var o=Ui(n);return!!o&&e===o[0]}function bm(e){return!!Go&&Go in e}var Am=Yn?ut:cs;function xn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Pt;return e===n}function Gl(e){return e===e&&!X(e)}function zl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==i||e in Q(n))}}function xm(e){var t=xr(e,function(o){return n.size===S&&n.clear(),o}),n=t.cache;return t}function Sm(e,t){var n=e[1],o=t[1],l=n|o,d=l<(ge|qt|tt),h=o==tt&&n==je||o==tt&&n==sn&&e[7].length<=t[8]||o==(tt|sn)&&t[7].length<=t[8]&&n==je;if(!(d||h))return e;o&ge&&(e[2]=t[2],l|=n&ge?0:no);var p=t[3];if(p){var y=e[3];e[3]=y?$l(y,p,t[4]):p,e[4]=y?gt(e[3],R):t[4]}return p=t[5],p&&(y=e[5],e[5]=y?ql(y,p,t[6]):p,e[6]=y?gt(e[5],R):t[6]),p=t[7],p&&(e[7]=p),o&tt&&(e[8]=e[8]==null?t[8]:me(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}function Rm(e){var t=[];if(e!=null)for(var n in Q(e))t.push(n);return t}function Om(e){return Jn.call(e)}function Yl(e,t,n){return t=le(t===i?e.length-1:t,0),function(){for(var o=arguments,l=-1,d=le(o.length-t,0),h=v(d);++l<d;)h[l]=o[t+l];l=-1;for(var p=v(t+1);++l<t;)p[l]=o[l];return p[t]=n(h),xe(e,this,p)}}function Zl(e,t){return t.length<2?e:Rt(e,He(t,0,-1))}function km(e,t){for(var n=e.length,o=me(t.length,n),l=Ce(e);o--;){var d=t[o];e[o]=at(d,n)?l[d]:i}return e}function zi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Jl=jl(wl),Sn=Vh||function(e,t){return ue.setTimeout(e,t)},Yi=jl(Xg);function Xl(e,t,n){var o=t+"";return Yi(e,wm(o,$m(_m(o),n)))}function jl(e){var t=0,n=0;return function(){var o=zh(),l=Jf-(o-n);if(n=o,l>0){if(++t>=Zf)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Cr(e,t){var n=-1,o=e.length,l=o-1;for(t=t===i?o:t;++n<t;){var d=qi(n,l),h=e[d];e[d]=e[n],e[n]=h}return e.length=t,e}var ea=xm(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(vd,function(n,o,l,d){t.push(l?d.replace(Rd,"$1"):o||n)}),t});function Je(e){if(typeof e=="string"||Oe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kt(e){if(e!=null){try{return Zn.call(e)}catch{}try{return e+""}catch{}}return""}function $m(e,t){return Be(rd,function(n){var o="_."+n[0];t&n[1]&&!Kn(e,o)&&e.push(o)}),e.sort()}function ta(e){if(e instanceof M)return e.clone();var t=new Ne(e.__wrapped__,e.__chain__);return t.__actions__=Ce(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function qm(e,t,n){(n?ve(e,t,n):t===i)?t=1:t=le(I(t),0);var o=e==null?0:e.length;if(!o||t<1)return[];for(var l=0,d=0,h=v(rr(o/t));l<o;)h[d++]=He(e,l,l+=t);return h}function Bm(e){for(var t=-1,n=e==null?0:e.length,o=0,l=[];++t<n;){var d=e[t];d&&(l[o++]=d)}return l}function Lm(){var e=arguments.length;if(!e)return[];for(var t=v(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return ht(H(n)?Ce(n):[n],ce(t,1))}var Nm=D(function(e,t){return ne(e)?wn(e,ce(t,1,ne,!0)):[]}),Tm=D(function(e,t){var n=Ie(t);return ne(n)&&(n=i),ne(e)?wn(e,ce(t,1,ne,!0),q(n,2)):[]}),Hm=D(function(e,t){var n=Ie(t);return ne(n)&&(n=i),ne(e)?wn(e,ce(t,1,ne,!0),i,n):[]});function Im(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===i?1:I(t),He(e,t<0?0:t,o)):[]}function Fm(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===i?1:I(t),t=o-t,He(e,0,t<0?0:t)):[]}function Dm(e,t){return e&&e.length?hr(e,q(t,3),!0,!0):[]}function Pm(e,t){return e&&e.length?hr(e,q(t,3),!0):[]}function Mm(e,t,n,o){var l=e==null?0:e.length;return l?(n&&typeof n!="number"&&ve(e,t,n)&&(n=0,o=l),Lg(e,t,n,o)):[]}function na(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=n==null?0:I(n);return l<0&&(l=le(o+l,0)),Qn(e,q(t,3),l)}function ra(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=o-1;return n!==i&&(l=I(n),l=n<0?le(o+l,0):me(l,o-1)),Qn(e,q(t,3),l,!0)}function ia(e){var t=e==null?0:e.length;return t?ce(e,1):[]}function Wm(e){var t=e==null?0:e.length;return t?ce(e,Hn):[]}function Um(e,t){var n=e==null?0:e.length;return n?(t=t===i?1:I(t),ce(e,t)):[]}function Vm(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var l=e[t];o[l[0]]=l[1]}return o}function sa(e){return e&&e.length?e[0]:i}function Km(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=n==null?0:I(n);return l<0&&(l=le(o+l,0)),Ht(e,t,l)}function Qm(e){var t=e==null?0:e.length;return t?He(e,0,-1):[]}var Gm=D(function(e){var t=J(e,Hi);return t.length&&t[0]===e[0]?Si(t):[]}),zm=D(function(e){var t=Ie(e),n=J(e,Hi);return t===Ie(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Si(n,q(t,2)):[]}),Ym=D(function(e){var t=Ie(e),n=J(e,Hi);return t=typeof t=="function"?t:i,t&&n.pop(),n.length&&n[0]===e[0]?Si(n,i,t):[]});function Zm(e,t){return e==null?"":Qh.call(e,t)}function Ie(e){var t=e==null?0:e.length;return t?e[t-1]:i}function Jm(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=o;return n!==i&&(l=I(n),l=l<0?le(o+l,0):me(l,o-1)),t===t?$h(e,t,l):Qn(e,Do,l,!0)}function Xm(e,t){return e&&e.length?pl(e,I(t)):i}var jm=D(oa);function oa(e,t){return e&&e.length&&t&&t.length?$i(e,t):e}function ep(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,q(n,2)):e}function tp(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,i,n):e}var np=lt(function(e,t){var n=e==null?0:e.length,o=Ei(e,t);return vl(e,J(t,function(l){return at(l,n)?+l:l}).sort(kl)),o});function rp(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,l=[],d=e.length;for(t=q(t,3);++o<d;){var h=e[o];t(h,o,e)&&(n.push(h),l.push(o))}return vl(e,l),n}function Zi(e){return e==null?e:Zh.call(e)}function ip(e,t,n){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&ve(e,t,n)?(t=0,n=o):(t=t==null?0:I(t),n=n===i?o:I(n)),He(e,t,n)):[]}function sp(e,t){return dr(e,t)}function op(e,t,n){return Li(e,t,q(n,2))}function lp(e,t){var n=e==null?0:e.length;if(n){var o=dr(e,t);if(o<n&&Ke(e[o],t))return o}return-1}function ap(e,t){return dr(e,t,!0)}function up(e,t,n){return Li(e,t,q(n,2),!0)}function cp(e,t){var n=e==null?0:e.length;if(n){var o=dr(e,t,!0)-1;if(Ke(e[o],t))return o}return-1}function fp(e){return e&&e.length?Cl(e):[]}function dp(e,t){return e&&e.length?Cl(e,q(t,2)):[]}function hp(e){var t=e==null?0:e.length;return t?He(e,1,t):[]}function gp(e,t,n){return e&&e.length?(t=n||t===i?1:I(t),He(e,0,t<0?0:t)):[]}function mp(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===i?1:I(t),t=o-t,He(e,t<0?0:t,o)):[]}function pp(e,t){return e&&e.length?hr(e,q(t,3),!1,!0):[]}function _p(e,t){return e&&e.length?hr(e,q(t,3)):[]}var yp=D(function(e){return _t(ce(e,1,ne,!0))}),vp=D(function(e){var t=Ie(e);return ne(t)&&(t=i),_t(ce(e,1,ne,!0),q(t,2))}),wp=D(function(e){var t=Ie(e);return t=typeof t=="function"?t:i,_t(ce(e,1,ne,!0),i,t)});function Cp(e){return e&&e.length?_t(e):[]}function Ep(e,t){return e&&e.length?_t(e,q(t,2)):[]}function bp(e,t){return t=typeof t=="function"?t:i,e&&e.length?_t(e,i,t):[]}function Ji(e){if(!(e&&e.length))return[];var t=0;return e=dt(e,function(n){if(ne(n))return t=le(n.length,t),!0}),gi(t,function(n){return J(e,fi(n))})}function la(e,t){if(!(e&&e.length))return[];var n=Ji(e);return t==null?n:J(n,function(o){return xe(t,i,o)})}var Ap=D(function(e,t){return ne(e)?wn(e,t):[]}),xp=D(function(e){return Ti(dt(e,ne))}),Sp=D(function(e){var t=Ie(e);return ne(t)&&(t=i),Ti(dt(e,ne),q(t,2))}),Rp=D(function(e){var t=Ie(e);return t=typeof t=="function"?t:i,Ti(dt(e,ne),i,t)}),Op=D(Ji);function kp(e,t){return xl(e||[],t||[],vn)}function $p(e,t){return xl(e||[],t||[],bn)}var qp=D(function(e){var t=e.length,n=t>1?e[t-1]:i;return n=typeof n=="function"?(e.pop(),n):i,la(e,n)});function aa(e){var t=f(e);return t.__chain__=!0,t}function Bp(e,t){return t(e),e}function Er(e,t){return t(e)}var Lp=lt(function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,l=function(d){return Ei(d,e)};return t>1||this.__actions__.length||!(o instanceof M)||!at(n)?this.thru(l):(o=o.slice(n,+n+(t?1:0)),o.__actions__.push({func:Er,args:[l],thisArg:i}),new Ne(o,this.__chain__).thru(function(d){return t&&!d.length&&d.push(i),d}))});function Np(){return aa(this)}function Tp(){return new Ne(this.value(),this.__chain__)}function Hp(){this.__values__===i&&(this.__values__=Ea(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function Ip(){return this}function Fp(e){for(var t,n=this;n instanceof lr;){var o=ta(n);o.__index__=0,o.__values__=i,t?l.__wrapped__=o:t=o;var l=o;n=n.__wrapped__}return l.__wrapped__=e,t}function Dp(){var e=this.__wrapped__;if(e instanceof M){var t=e;return this.__actions__.length&&(t=new M(this)),t=t.reverse(),t.__actions__.push({func:Er,args:[Zi],thisArg:i}),new Ne(t,this.__chain__)}return this.thru(Zi)}function Pp(){return Al(this.__wrapped__,this.__actions__)}var Mp=gr(function(e,t,n){K.call(e,n)?++e[n]:st(e,n,1)});function Wp(e,t,n){var o=H(e)?Io:Bg;return n&&ve(e,t,n)&&(t=i),o(e,q(t,3))}function Up(e,t){var n=H(e)?dt:ll;return n(e,q(t,3))}var Vp=Tl(na),Kp=Tl(ra);function Qp(e,t){return ce(br(e,t),1)}function Gp(e,t){return ce(br(e,t),Hn)}function zp(e,t,n){return n=n===i?1:I(n),ce(br(e,t),n)}function ua(e,t){var n=H(e)?Be:pt;return n(e,q(t,3))}function ca(e,t){var n=H(e)?hh:ol;return n(e,q(t,3))}var Yp=gr(function(e,t,n){K.call(e,n)?e[n].push(t):st(e,n,[t])});function Zp(e,t,n,o){e=Ee(e)?e:zt(e),n=n&&!o?I(n):0;var l=e.length;return n<0&&(n=le(l+n,0)),Or(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&Ht(e,t,n)>-1}var Jp=D(function(e,t,n){var o=-1,l=typeof t=="function",d=Ee(e)?v(e.length):[];return pt(e,function(h){d[++o]=l?xe(t,h,n):Cn(h,t,n)}),d}),Xp=gr(function(e,t,n){st(e,n,t)});function br(e,t){var n=H(e)?J:hl;return n(e,q(t,3))}function jp(e,t,n,o){return e==null?[]:(H(t)||(t=t==null?[]:[t]),n=o?i:n,H(n)||(n=n==null?[]:[n]),_l(e,t,n))}var e_=gr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function t_(e,t,n){var o=H(e)?ui:Mo,l=arguments.length<3;return o(e,q(t,4),n,l,pt)}function n_(e,t,n){var o=H(e)?gh:Mo,l=arguments.length<3;return o(e,q(t,4),n,l,ol)}function r_(e,t){var n=H(e)?dt:ll;return n(e,Sr(q(t,3)))}function i_(e){var t=H(e)?nl:Zg;return t(e)}function s_(e,t,n){(n?ve(e,t,n):t===i)?t=1:t=I(t);var o=H(e)?Rg:Jg;return o(e,t)}function o_(e){var t=H(e)?Og:jg;return t(e)}function l_(e){if(e==null)return 0;if(Ee(e))return Or(e)?Ft(e):e.length;var t=pe(e);return t==Me||t==We?e.size:Oi(e).length}function a_(e,t,n){var o=H(e)?ci:em;return n&&ve(e,t,n)&&(t=i),o(e,q(t,3))}var u_=D(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ve(e,t[0],t[1])?t=[]:n>2&&ve(t[0],t[1],t[2])&&(t=[t[0]]),_l(e,ce(t,1),[])}),Ar=Uh||function(){return ue.Date.now()};function c_(e,t){if(typeof t!="function")throw new Le(g);return e=I(e),function(){if(--e<1)return t.apply(this,arguments)}}function fa(e,t,n){return t=n?i:t,t=e&&t==null?e.length:t,ot(e,tt,i,i,i,i,t)}function da(e,t){var n;if(typeof t!="function")throw new Le(g);return e=I(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Xi=D(function(e,t,n){var o=ge;if(n.length){var l=gt(n,Qt(Xi));o|=et}return ot(e,o,t,n,l)}),ha=D(function(e,t,n){var o=ge|qt;if(n.length){var l=gt(n,Qt(ha));o|=et}return ot(t,o,e,n,l)});function ga(e,t,n){t=n?i:t;var o=ot(e,je,i,i,i,i,i,t);return o.placeholder=ga.placeholder,o}function ma(e,t,n){t=n?i:t;var o=ot(e,nn,i,i,i,i,i,t);return o.placeholder=ma.placeholder,o}function pa(e,t,n){var o,l,d,h,p,y,E=0,b=!1,A=!1,O=!0;if(typeof e!="function")throw new Le(g);t=Fe(t)||0,X(n)&&(b=!!n.leading,A="maxWait"in n,d=A?le(Fe(n.maxWait)||0,t):d,O="trailing"in n?!!n.trailing:O);function $(re){var Qe=o,ft=l;return o=l=i,E=re,h=e.apply(ft,Qe),h}function L(re){return E=re,p=Sn(P,t),b?$(re):h}function F(re){var Qe=re-y,ft=re-E,Ta=t-Qe;return A?me(Ta,d-ft):Ta}function N(re){var Qe=re-y,ft=re-E;return y===i||Qe>=t||Qe<0||A&&ft>=d}function P(){var re=Ar();if(N(re))return W(re);p=Sn(P,F(re))}function W(re){return p=i,O&&o?$(re):(o=l=i,h)}function ke(){p!==i&&Sl(p),E=0,o=y=l=p=i}function we(){return p===i?h:W(Ar())}function $e(){var re=Ar(),Qe=N(re);if(o=arguments,l=this,y=re,Qe){if(p===i)return L(y);if(A)return Sl(p),p=Sn(P,t),$(y)}return p===i&&(p=Sn(P,t)),h}return $e.cancel=ke,$e.flush=we,$e}var f_=D(function(e,t){return sl(e,1,t)}),d_=D(function(e,t,n){return sl(e,Fe(t)||0,n)});function h_(e){return ot(e,Ur)}function xr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new Le(g);var n=function(){var o=arguments,l=t?t.apply(this,o):o[0],d=n.cache;if(d.has(l))return d.get(l);var h=e.apply(this,o);return n.cache=d.set(l,h)||d,h};return n.cache=new(xr.Cache||it),n}xr.Cache=it;function Sr(e){if(typeof e!="function")throw new Le(g);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function g_(e){return da(2,e)}var m_=tm(function(e,t){t=t.length==1&&H(t[0])?J(t[0],Se(q())):J(ce(t,1),Se(q()));var n=t.length;return D(function(o){for(var l=-1,d=me(o.length,n);++l<d;)o[l]=t[l].call(this,o[l]);return xe(e,this,o)})}),ji=D(function(e,t){var n=gt(t,Qt(ji));return ot(e,et,i,t,n)}),_a=D(function(e,t){var n=gt(t,Qt(_a));return ot(e,rn,i,t,n)}),p_=lt(function(e,t){return ot(e,sn,i,i,i,t)});function __(e,t){if(typeof e!="function")throw new Le(g);return t=t===i?t:I(t),D(e,t)}function y_(e,t){if(typeof e!="function")throw new Le(g);return t=t==null?0:le(I(t),0),D(function(n){var o=n[t],l=vt(n,0,t);return o&&ht(l,o),xe(e,this,l)})}function v_(e,t,n){var o=!0,l=!0;if(typeof e!="function")throw new Le(g);return X(n)&&(o="leading"in n?!!n.leading:o,l="trailing"in n?!!n.trailing:l),pa(e,t,{leading:o,maxWait:t,trailing:l})}function w_(e){return fa(e,1)}function C_(e,t){return ji(Ii(t),e)}function E_(){if(!arguments.length)return[];var e=arguments[0];return H(e)?e:[e]}function b_(e){return Te(e,de)}function A_(e,t){return t=typeof t=="function"?t:i,Te(e,de,t)}function x_(e){return Te(e,B|de)}function S_(e,t){return t=typeof t=="function"?t:i,Te(e,B|de,t)}function R_(e,t){return t==null||il(e,t,ae(t))}function Ke(e,t){return e===t||e!==e&&t!==t}var O_=yr(xi),k_=yr(function(e,t){return e>=t}),$t=cl(function(){return arguments}())?cl:function(e){return te(e)&&K.call(e,"callee")&&!Zo.call(e,"callee")},H=v.isArray,$_=qo?Se(qo):Fg;function Ee(e){return e!=null&&Rr(e.length)&&!ut(e)}function ne(e){return te(e)&&Ee(e)}function q_(e){return e===!0||e===!1||te(e)&&ye(e)==on}var wt=Kh||cs,B_=Bo?Se(Bo):Dg;function L_(e){return te(e)&&e.nodeType===1&&!Rn(e)}function N_(e){if(e==null)return!0;if(Ee(e)&&(H(e)||typeof e=="string"||typeof e.splice=="function"||wt(e)||Gt(e)||$t(e)))return!e.length;var t=pe(e);if(t==Me||t==We)return!e.size;if(xn(e))return!Oi(e).length;for(var n in e)if(K.call(e,n))return!1;return!0}function T_(e,t){return En(e,t)}function H_(e,t,n){n=typeof n=="function"?n:i;var o=n?n(e,t):i;return o===i?En(e,t,i,n):!!o}function es(e){if(!te(e))return!1;var t=ye(e);return t==Dn||t==sd||typeof e.message=="string"&&typeof e.name=="string"&&!Rn(e)}function I_(e){return typeof e=="number"&&Xo(e)}function ut(e){if(!X(e))return!1;var t=ye(e);return t==Pn||t==io||t==id||t==ld}function ya(e){return typeof e=="number"&&e==I(e)}function Rr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bt}function X(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function te(e){return e!=null&&typeof e=="object"}var va=Lo?Se(Lo):Mg;function F_(e,t){return e===t||Ri(e,t,Vi(t))}function D_(e,t,n){return n=typeof n=="function"?n:i,Ri(e,t,Vi(t),n)}function P_(e){return wa(e)&&e!=+e}function M_(e){if(Am(e))throw new T(u);return fl(e)}function W_(e){return e===null}function U_(e){return e==null}function wa(e){return typeof e=="number"||te(e)&&ye(e)==an}function Rn(e){if(!te(e)||ye(e)!=nt)return!1;var t=er(e);if(t===null)return!0;var n=K.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zn.call(n)==Dh}var ts=No?Se(No):Wg;function V_(e){return ya(e)&&e>=-9007199254740991&&e<=Bt}var Ca=To?Se(To):Ug;function Or(e){return typeof e=="string"||!H(e)&&te(e)&&ye(e)==cn}function Oe(e){return typeof e=="symbol"||te(e)&&ye(e)==Mn}var Gt=Ho?Se(Ho):Vg;function K_(e){return e===i}function Q_(e){return te(e)&&pe(e)==fn}function G_(e){return te(e)&&ye(e)==ud}var z_=yr(ki),Y_=yr(function(e,t){return e<=t});function Ea(e){if(!e)return[];if(Ee(e))return Or(e)?Ue(e):Ce(e);if(gn&&e[gn])return Rh(e[gn]());var t=pe(e),n=t==Me?pi:t==We?Gn:zt;return n(e)}function ct(e){if(!e)return e===0?e:0;if(e=Fe(e),e===Hn||e===-1/0){var t=e<0?-1:1;return t*ed}return e===e?e:0}function I(e){var t=ct(e),n=t%1;return t===t?n?t-n:t:0}function ba(e){return e?St(I(e),0,ze):0}function Fe(e){if(typeof e=="number")return e;if(Oe(e))return In;if(X(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=X(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Wo(e);var n=$d.test(e);return n||Bd.test(e)?ch(e.slice(2),n?2:8):kd.test(e)?In:+e}function Aa(e){return Ze(e,be(e))}function Z_(e){return e?St(I(e),-9007199254740991,Bt):e===0?e:0}function V(e){return e==null?"":Re(e)}var J_=Vt(function(e,t){if(xn(t)||Ee(t)){Ze(t,ae(t),e);return}for(var n in t)K.call(t,n)&&vn(e,n,t[n])}),xa=Vt(function(e,t){Ze(t,be(t),e)}),kr=Vt(function(e,t,n,o){Ze(t,be(t),e,o)}),X_=Vt(function(e,t,n,o){Ze(t,ae(t),e,o)}),j_=lt(Ei);function ey(e,t){var n=Ut(e);return t==null?n:rl(n,t)}var ty=D(function(e,t){e=Q(e);var n=-1,o=t.length,l=o>2?t[2]:i;for(l&&ve(t[0],t[1],l)&&(o=1);++n<o;)for(var d=t[n],h=be(d),p=-1,y=h.length;++p<y;){var E=h[p],b=e[E];(b===i||Ke(b,Pt[E])&&!K.call(e,E))&&(e[E]=d[E])}return e}),ny=D(function(e){return e.push(i,Wl),xe(Sa,i,e)});function ry(e,t){return Fo(e,q(t,3),Ye)}function iy(e,t){return Fo(e,q(t,3),Ai)}function sy(e,t){return e==null?e:bi(e,q(t,3),be)}function oy(e,t){return e==null?e:al(e,q(t,3),be)}function ly(e,t){return e&&Ye(e,q(t,3))}function ay(e,t){return e&&Ai(e,q(t,3))}function uy(e){return e==null?[]:cr(e,ae(e))}function cy(e){return e==null?[]:cr(e,be(e))}function ns(e,t,n){var o=e==null?i:Rt(e,t);return o===i?n:o}function fy(e,t){return e!=null&&Kl(e,t,Ng)}function rs(e,t){return e!=null&&Kl(e,t,Tg)}var dy=Il(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Jn.call(t)),e[t]=n},ss(Ae)),hy=Il(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Jn.call(t)),K.call(e,t)?e[t].push(n):e[t]=[n]},q),gy=D(Cn);function ae(e){return Ee(e)?tl(e):Oi(e)}function be(e){return Ee(e)?tl(e,!0):Kg(e)}function my(e,t){var n={};return t=q(t,3),Ye(e,function(o,l,d){st(n,t(o,l,d),o)}),n}function py(e,t){var n={};return t=q(t,3),Ye(e,function(o,l,d){st(n,l,t(o,l,d))}),n}var _y=Vt(function(e,t,n){fr(e,t,n)}),Sa=Vt(function(e,t,n,o){fr(e,t,n,o)}),yy=lt(function(e,t){var n={};if(e==null)return n;var o=!1;t=J(t,function(d){return d=yt(d,e),o||(o=d.length>1),d}),Ze(e,Wi(e),n),o&&(n=Te(n,B|G|de,dm));for(var l=t.length;l--;)Ni(n,t[l]);return n});function vy(e,t){return Ra(e,Sr(q(t)))}var wy=lt(function(e,t){return e==null?{}:Gg(e,t)});function Ra(e,t){if(e==null)return{};var n=J(Wi(e),function(o){return[o]});return t=q(t),yl(e,n,function(o,l){return t(o,l[0])})}function Cy(e,t,n){t=yt(t,e);var o=-1,l=t.length;for(l||(l=1,e=i);++o<l;){var d=e==null?i:e[Je(t[o])];d===i&&(o=l,d=n),e=ut(d)?d.call(e):d}return e}function Ey(e,t,n){return e==null?e:bn(e,t,n)}function by(e,t,n,o){return o=typeof o=="function"?o:i,e==null?e:bn(e,t,n,o)}var Oa=Pl(ae),ka=Pl(be);function Ay(e,t,n){var o=H(e),l=o||wt(e)||Gt(e);if(t=q(t,4),n==null){var d=e&&e.constructor;l?n=o?new d:[]:X(e)?n=ut(d)?Ut(er(e)):{}:n={}}return(l?Be:Ye)(e,function(h,p,y){return t(n,h,p,y)}),n}function xy(e,t){return e==null?!0:Ni(e,t)}function Sy(e,t,n){return e==null?e:bl(e,t,Ii(n))}function Ry(e,t,n,o){return o=typeof o=="function"?o:i,e==null?e:bl(e,t,Ii(n),o)}function zt(e){return e==null?[]:mi(e,ae(e))}function Oy(e){return e==null?[]:mi(e,be(e))}function ky(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=Fe(n),n=n===n?n:0),t!==i&&(t=Fe(t),t=t===t?t:0),St(Fe(e),t,n)}function $y(e,t,n){return t=ct(t),n===i?(n=t,t=0):n=ct(n),e=Fe(e),Hg(e,t,n)}function qy(e,t,n){if(n&&typeof n!="boolean"&&ve(e,t,n)&&(t=n=i),n===i&&(typeof t=="boolean"?(n=t,t=i):typeof e=="boolean"&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ct(e),t===i?(t=e,e=0):t=ct(t)),e>t){var o=e;e=t,t=o}if(n||e%1||t%1){var l=jo();return me(e+l*(t-e+uh("1e-"+((l+"").length-1))),t)}return qi(e,t)}var By=Kt(function(e,t,n){return t=t.toLowerCase(),e+(n?$a(t):t)});function $a(e){return is(V(e).toLowerCase())}function qa(e){return e=V(e),e&&e.replace(Nd,Eh).replace(jd,"")}function Ly(e,t,n){e=V(e),t=Re(t);var o=e.length;n=n===i?o:St(I(n),0,o);var l=n;return n-=t.length,n>=0&&e.slice(n,l)==t}function Ny(e){return e=V(e),e&&gd.test(e)?e.replace(lo,bh):e}function Ty(e){return e=V(e),e&&wd.test(e)?e.replace(jr,"\\$&"):e}var Hy=Kt(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Iy=Kt(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Fy=Nl("toLowerCase");function Dy(e,t,n){e=V(e),t=I(t);var o=t?Ft(e):0;if(!t||o>=t)return e;var l=(t-o)/2;return _r(ir(l),n)+e+_r(rr(l),n)}function Py(e,t,n){e=V(e),t=I(t);var o=t?Ft(e):0;return t&&o<t?e+_r(t-o,n):e}function My(e,t,n){e=V(e),t=I(t);var o=t?Ft(e):0;return t&&o<t?_r(t-o,n)+e:e}function Wy(e,t,n){return n||t==null?t=0:t&&(t=+t),Yh(V(e).replace(ei,""),t||0)}function Uy(e,t,n){return(n?ve(e,t,n):t===i)?t=1:t=I(t),Bi(V(e),t)}function Vy(){var e=arguments,t=V(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Ky=Kt(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function Qy(e,t,n){return n&&typeof n!="number"&&ve(e,t,n)&&(t=n=i),n=n===i?ze:n>>>0,n?(e=V(e),e&&(typeof t=="string"||t!=null&&!ts(t))&&(t=Re(t),!t&&It(e))?vt(Ue(e),0,n):e.split(t,n)):[]}var Gy=Kt(function(e,t,n){return e+(n?" ":"")+is(t)});function zy(e,t,n){return e=V(e),n=n==null?0:St(I(n),0,e.length),t=Re(t),e.slice(n,n+t.length)==t}function Yy(e,t,n){var o=f.templateSettings;n&&ve(e,t,n)&&(t=i),e=V(e),t=kr({},t,o,Ml);var l=kr({},t.imports,o.imports,Ml),d=ae(l),h=mi(l,d),p,y,E=0,b=t.interpolate||Wn,A="__p += '",O=_i((t.escape||Wn).source+"|"+b.source+"|"+(b===ao?Od:Wn).source+"|"+(t.evaluate||Wn).source+"|$","g"),$="//# sourceURL="+(K.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ih+"]")+`
19
- `;e.replace(O,function(N,P,W,ke,we,$e){return W||(W=ke),A+=e.slice(E,$e).replace(Td,Ah),P&&(p=!0,A+=`' +
20
- __e(`+P+`) +
21
- '`),we&&(y=!0,A+=`';
22
- `+we+`;
23
- __p += '`),W&&(A+=`' +
18
+ `)}function tg(e){return H(e)||Et(e)||!!(Xs&&e&&e[Xs])}function et(e,t){var n=typeof e;return t=t??At,!!t&&(n=="number"||n!="symbol"&&hf.test(e))&&e>-1&&e%1==0&&e<t}function fe(e,t,n){if(!Z(n))return!1;var i=typeof t;return(i=="number"?me(n)&&et(t,n.length):i=="string"&&t in n)?De(n[t],e):!1}function xi(e,t){if(H(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ee(e)?!0:Jc.test(e)||!Zc.test(e)||t!=null&&e in K(t)}function ng(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ki(e){var t=ir(e),n=a[t];if(typeof n!="function"||!(t in U.prototype))return!1;if(e===n)return!0;var i=Ai(n);return!!i&&e===i[0]}function rg(e){return!!Gs&&Gs in e}var ig=Nn?tt:Vi;function mn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||$t;return e===n}function Yo(e){return e===e&&!Z(e)}function Zo(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in K(n))}}function sg(e){var t=cr(e,function(i){return n.size===R&&n.clear(),i}),n=t.cache;return t}function og(e,t){var n=e[1],i=t[1],o=n|i,c=o<(ve|bt|ze),h=i==ze&&n==Ve||i==ze&&n==Gt&&e[7].length<=t[8]||i==(ze|Gt)&&t[7].length<=t[8]&&n==Ve;if(!(c||h))return e;i&ve&&(e[2]=t[2],o|=n&ve?0:is);var m=t[3];if(m){var _=e[3];e[3]=_?$o(_,m,t[4]):m,e[4]=_?ot(e[3],x):t[4]}return m=t[5],m&&(_=e[5],e[5]=_?Lo(_,m,t[6]):m,e[6]=_?ot(e[5],x):t[6]),m=t[7],m&&(e[7]=m),i&ze&&(e[8]=e[8]==null?t[8]:ae(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function lg(e){var t=[];if(e!=null)for(var n in K(e))t.push(n);return t}function ag(e){return Tn.call(e)}function Jo(e,t,n){return t=re(t===r?e.length-1:t,0),function(){for(var i=arguments,o=-1,c=re(i.length-t,0),h=y(c);++o<c;)h[o]=i[t+o];o=-1;for(var m=y(t+1);++o<t;)m[o]=i[o];return m[t]=n(h),ye(e,this,m)}}function Xo(e,t){return t.length<2?e:yt(e,Oe(t,0,-1))}function ug(e,t){for(var n=e.length,i=ae(t.length,n),o=ge(e);i--;){var c=t[i];e[i]=et(c,n)?o[c]:r}return e}function qi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var jo=tl(Eo),pn=Ad||function(e,t){return oe.setTimeout(e,t)},Bi=tl($h);function el(e,t,n){var i=t+"";return Bi(e,eg(i,cg(Jh(i),n)))}function tl(e){var t=0,n=0;return function(){var i=kd(),o=Bc-(i-n);if(n=i,o>0){if(++t>=qc)return arguments[0]}else t=0;return e.apply(r,arguments)}}function or(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var c=di(n,o),h=e[c];e[c]=e[n],e[n]=h}return e.length=t,e}var nl=sg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Xc,function(n,i,o,c){t.push(o?c.replace(lf,"$1"):i||n)}),t});function Qe(e){if(typeof e=="string"||Ee(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wt(e){if(e!=null){try{return Hn.call(e)}catch{}try{return e+""}catch{}}return""}function cg(e,t){return xe(Tc,function(n){var i="_."+n[0];t&n[1]&&!Bn(e,i)&&e.push(i)}),e.sort()}function rl(e){if(e instanceof U)return e.clone();var t=new qe(e.__wrapped__,e.__chain__);return t.__actions__=ge(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function fg(e,t,n){(n?fe(e,t,n):t===r)?t=1:t=re(I(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,c=0,h=y(Wn(i/t));o<i;)h[c++]=Oe(e,o,o+=t);return h}function dg(e){for(var t=-1,n=e==null?0:e.length,i=0,o=[];++t<n;){var c=e[t];c&&(o[i++]=c)}return o}function hg(){var e=arguments.length;if(!e)return[];for(var t=y(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return st(H(n)?ge(n):[n],le(t,1))}var gg=P(function(e,t){return X(e)?cn(e,le(t,1,X,!0)):[]}),mg=P(function(e,t){var n=$e(t);return X(n)&&(n=r),X(e)?cn(e,le(t,1,X,!0),O(n,2)):[]}),pg=P(function(e,t){var n=$e(t);return X(n)&&(n=r),X(e)?cn(e,le(t,1,X,!0),r,n):[]});function _g(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:I(t),Oe(e,t<0?0:t,i)):[]}function vg(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:I(t),t=i-t,Oe(e,0,t<0?0:t)):[]}function yg(e,t){return e&&e.length?Xn(e,O(t,3),!0,!0):[]}function Cg(e,t){return e&&e.length?Xn(e,O(t,3),!0):[]}function wg(e,t,n,i){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&fe(e,t,n)&&(n=0,i=o),hh(e,t,n,i)):[]}function il(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:I(n);return o<0&&(o=re(i+o,0)),On(e,O(t,3),o)}function sl(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=I(n),o=n<0?re(i+o,0):ae(o,i-1)),On(e,O(t,3),o,!0)}function ol(e){var t=e==null?0:e.length;return t?le(e,1):[]}function Eg(e){var t=e==null?0:e.length;return t?le(e,wn):[]}function bg(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:I(t),le(e,t)):[]}function Ag(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var o=e[t];i[o[0]]=o[1]}return i}function ll(e){return e&&e.length?e[0]:r}function Sg(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=n==null?0:I(n);return o<0&&(o=re(i+o,0)),kt(e,t,o)}function Rg(e){var t=e==null?0:e.length;return t?Oe(e,0,-1):[]}var xg=P(function(e){var t=Y(e,_i);return t.length&&t[0]===e[0]?li(t):[]}),kg=P(function(e){var t=$e(e),n=Y(e,_i);return t===$e(n)?t=r:n.pop(),n.length&&n[0]===e[0]?li(n,O(t,2)):[]}),qg=P(function(e){var t=$e(e),n=Y(e,_i);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?li(n,r,t):[]});function Bg(e,t){return e==null?"":Rd.call(e,t)}function $e(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Og(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=I(n),o=o<0?re(i+o,0):ae(o,i-1)),t===t?cd(e,t,o):On(e,Fs,o,!0)}function $g(e,t){return e&&e.length?vo(e,I(t)):r}var Lg=P(al);function al(e,t){return e&&e.length&&t&&t.length?fi(e,t):e}function Ng(e,t,n){return e&&e.length&&t&&t.length?fi(e,t,O(n,2)):e}function Hg(e,t,n){return e&&e.length&&t&&t.length?fi(e,t,r,n):e}var Tg=je(function(e,t){var n=e==null?0:e.length,i=ri(e,t);return wo(e,Y(t,function(o){return et(o,n)?+o:o}).sort(Oo)),i});function Ig(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,o=[],c=e.length;for(t=O(t,3);++i<c;){var h=e[i];t(h,i,e)&&(n.push(h),o.push(i))}return wo(e,o),n}function Oi(e){return e==null?e:Bd.call(e)}function Dg(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&fe(e,t,n)?(t=0,n=i):(t=t==null?0:I(t),n=n===r?i:I(n)),Oe(e,t,n)):[]}function Pg(e,t){return Jn(e,t)}function Fg(e,t,n){return gi(e,t,O(n,2))}function Ug(e,t){var n=e==null?0:e.length;if(n){var i=Jn(e,t);if(i<n&&De(e[i],t))return i}return-1}function Wg(e,t){return Jn(e,t,!0)}function Mg(e,t,n){return gi(e,t,O(n,2),!0)}function Qg(e,t){var n=e==null?0:e.length;if(n){var i=Jn(e,t,!0)-1;if(De(e[i],t))return i}return-1}function Vg(e){return e&&e.length?bo(e):[]}function Kg(e,t){return e&&e.length?bo(e,O(t,2)):[]}function zg(e){var t=e==null?0:e.length;return t?Oe(e,1,t):[]}function Gg(e,t,n){return e&&e.length?(t=n||t===r?1:I(t),Oe(e,0,t<0?0:t)):[]}function Yg(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:I(t),t=i-t,Oe(e,t<0?0:t,i)):[]}function Zg(e,t){return e&&e.length?Xn(e,O(t,3),!1,!0):[]}function Jg(e,t){return e&&e.length?Xn(e,O(t,3)):[]}var Xg=P(function(e){return ut(le(e,1,X,!0))}),jg=P(function(e){var t=$e(e);return X(t)&&(t=r),ut(le(e,1,X,!0),O(t,2))}),em=P(function(e){var t=$e(e);return t=typeof t=="function"?t:r,ut(le(e,1,X,!0),r,t)});function tm(e){return e&&e.length?ut(e):[]}function nm(e,t){return e&&e.length?ut(e,O(t,2)):[]}function rm(e,t){return t=typeof t=="function"?t:r,e&&e.length?ut(e,r,t):[]}function $i(e){if(!(e&&e.length))return[];var t=0;return e=it(e,function(n){if(X(n))return t=re(n.length,t),!0}),Yr(t,function(n){return Y(e,Kr(n))})}function ul(e,t){if(!(e&&e.length))return[];var n=$i(e);return t==null?n:Y(n,function(i){return ye(t,r,i)})}var im=P(function(e,t){return X(e)?cn(e,t):[]}),sm=P(function(e){return pi(it(e,X))}),om=P(function(e){var t=$e(e);return X(t)&&(t=r),pi(it(e,X),O(t,2))}),lm=P(function(e){var t=$e(e);return t=typeof t=="function"?t:r,pi(it(e,X),r,t)}),am=P($i);function um(e,t){return xo(e||[],t||[],un)}function cm(e,t){return xo(e||[],t||[],hn)}var fm=P(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,ul(e,n)});function cl(e){var t=a(e);return t.__chain__=!0,t}function dm(e,t){return t(e),e}function lr(e,t){return t(e)}var hm=je(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(c){return ri(c,e)};return t>1||this.__actions__.length||!(i instanceof U)||!et(n)?this.thru(o):(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:lr,args:[o],thisArg:r}),new qe(i,this.__chain__).thru(function(c){return t&&!c.length&&c.push(r),c}))});function gm(){return cl(this)}function mm(){return new qe(this.value(),this.__chain__)}function pm(){this.__values__===r&&(this.__values__=Al(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function _m(){return this}function vm(e){for(var t,n=this;n instanceof Kn;){var i=rl(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function ym(){var e=this.__wrapped__;if(e instanceof U){var t=e;return this.__actions__.length&&(t=new U(this)),t=t.reverse(),t.__actions__.push({func:lr,args:[Oi],thisArg:r}),new qe(t,this.__chain__)}return this.thru(Oi)}function Cm(){return Ro(this.__wrapped__,this.__actions__)}var wm=jn(function(e,t,n){V.call(e,n)?++e[n]:Je(e,n,1)});function Em(e,t,n){var i=H(e)?Ds:dh;return n&&fe(e,t,n)&&(t=r),i(e,O(t,3))}function bm(e,t){var n=H(e)?it:ao;return n(e,O(t,3))}var Am=Io(il),Sm=Io(sl);function Rm(e,t){return le(ar(e,t),1)}function xm(e,t){return le(ar(e,t),wn)}function km(e,t,n){return n=n===r?1:I(n),le(ar(e,t),n)}function fl(e,t){var n=H(e)?xe:at;return n(e,O(t,3))}function dl(e,t){var n=H(e)?zf:lo;return n(e,O(t,3))}var qm=jn(function(e,t,n){V.call(e,n)?e[n].push(t):Je(e,n,[t])});function Bm(e,t,n,i){e=me(e)?e:Ft(e),n=n&&!i?I(n):0;var o=e.length;return n<0&&(n=re(o+n,0)),hr(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&kt(e,t,n)>-1}var Om=P(function(e,t,n){var i=-1,o=typeof t=="function",c=me(e)?y(e.length):[];return at(e,function(h){c[++i]=o?ye(t,h,n):fn(h,t,n)}),c}),$m=jn(function(e,t,n){Je(e,n,t)});function ar(e,t){var n=H(e)?Y:mo;return n(e,O(t,3))}function Lm(e,t,n,i){return e==null?[]:(H(t)||(t=t==null?[]:[t]),n=i?r:n,H(n)||(n=n==null?[]:[n]),yo(e,t,n))}var Nm=jn(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Hm(e,t,n){var i=H(e)?Qr:Ws,o=arguments.length<3;return i(e,O(t,4),n,o,at)}function Tm(e,t,n){var i=H(e)?Gf:Ws,o=arguments.length<3;return i(e,O(t,4),n,o,lo)}function Im(e,t){var n=H(e)?it:ao;return n(e,fr(O(t,3)))}function Dm(e){var t=H(e)?ro:Bh;return t(e)}function Pm(e,t,n){(n?fe(e,t,n):t===r)?t=1:t=I(t);var i=H(e)?lh:Oh;return i(e,t)}function Fm(e){var t=H(e)?ah:Lh;return t(e)}function Um(e){if(e==null)return 0;if(me(e))return hr(e)?Bt(e):e.length;var t=ue(e);return t==Ne||t==He?e.size:ui(e).length}function Wm(e,t,n){var i=H(e)?Vr:Nh;return n&&fe(e,t,n)&&(t=r),i(e,O(t,3))}var Mm=P(function(e,t){if(e==null)return[];var n=t.length;return n>1&&fe(e,t[0],t[1])?t=[]:n>2&&fe(t[0],t[1],t[2])&&(t=[t[0]]),yo(e,le(t,1),[])}),ur=bd||function(){return oe.Date.now()};function Qm(e,t){if(typeof t!="function")throw new ke(v);return e=I(e),function(){if(--e<1)return t.apply(this,arguments)}}function hl(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Xe(e,ze,r,r,r,r,t)}function gl(e,t){var n;if(typeof t!="function")throw new ke(v);return e=I(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Li=P(function(e,t,n){var i=ve;if(n.length){var o=ot(n,Dt(Li));i|=Ke}return Xe(e,i,t,n,o)}),ml=P(function(e,t,n){var i=ve|bt;if(n.length){var o=ot(n,Dt(ml));i|=Ke}return Xe(t,i,e,n,o)});function pl(e,t,n){t=n?r:t;var i=Xe(e,Ve,r,r,r,r,r,t);return i.placeholder=pl.placeholder,i}function _l(e,t,n){t=n?r:t;var i=Xe(e,Kt,r,r,r,r,r,t);return i.placeholder=_l.placeholder,i}function vl(e,t,n){var i,o,c,h,m,_,w=0,E=!1,b=!1,A=!0;if(typeof e!="function")throw new ke(v);t=Le(t)||0,Z(n)&&(E=!!n.leading,b="maxWait"in n,c=b?re(Le(n.maxWait)||0,t):c,A="trailing"in n?!!n.trailing:A);function q(j){var Pe=i,rt=o;return i=o=r,w=j,h=e.apply(rt,Pe),h}function $(j){return w=j,m=pn(F,t),E?q(j):h}function D(j){var Pe=j-_,rt=j-w,Il=t-Pe;return b?ae(Il,c-rt):Il}function L(j){var Pe=j-_,rt=j-w;return _===r||Pe>=t||Pe<0||b&&rt>=c}function F(){var j=ur();if(L(j))return W(j);m=pn(F,D(j))}function W(j){return m=r,A&&i?q(j):(i=o=r,h)}function be(){m!==r&&ko(m),w=0,i=_=o=m=r}function de(){return m===r?h:W(ur())}function Ae(){var j=ur(),Pe=L(j);if(i=arguments,o=this,_=j,Pe){if(m===r)return $(_);if(b)return ko(m),m=pn(F,t),q(_)}return m===r&&(m=pn(F,t)),h}return Ae.cancel=be,Ae.flush=de,Ae}var Vm=P(function(e,t){return oo(e,1,t)}),Km=P(function(e,t,n){return oo(e,Le(t)||0,n)});function zm(e){return Xe(e,Ar)}function cr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new ke(v);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],c=n.cache;if(c.has(o))return c.get(o);var h=e.apply(this,i);return n.cache=c.set(o,h)||c,h};return n.cache=new(cr.Cache||Ze),n}cr.Cache=Ze;function fr(e){if(typeof e!="function")throw new ke(v);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Gm(e){return gl(2,e)}var Ym=Hh(function(e,t){t=t.length==1&&H(t[0])?Y(t[0],Ce(O())):Y(le(t,1),Ce(O()));var n=t.length;return P(function(i){for(var o=-1,c=ae(i.length,n);++o<c;)i[o]=t[o].call(this,i[o]);return ye(e,this,i)})}),Ni=P(function(e,t){var n=ot(t,Dt(Ni));return Xe(e,Ke,r,t,n)}),yl=P(function(e,t){var n=ot(t,Dt(yl));return Xe(e,zt,r,t,n)}),Zm=je(function(e,t){return Xe(e,Gt,r,r,r,t)});function Jm(e,t){if(typeof e!="function")throw new ke(v);return t=t===r?t:I(t),P(e,t)}function Xm(e,t){if(typeof e!="function")throw new ke(v);return t=t==null?0:re(I(t),0),P(function(n){var i=n[t],o=ft(n,0,t);return i&&st(o,i),ye(e,this,o)})}function jm(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new ke(v);return Z(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),vl(e,t,{leading:i,maxWait:t,trailing:o})}function ep(e){return hl(e,1)}function tp(e,t){return Ni(vi(t),e)}function np(){if(!arguments.length)return[];var e=arguments[0];return H(e)?e:[e]}function rp(e){return Be(e,he)}function ip(e,t){return t=typeof t=="function"?t:r,Be(e,he,t)}function sp(e){return Be(e,B|he)}function op(e,t){return t=typeof t=="function"?t:r,Be(e,B|he,t)}function lp(e,t){return t==null||so(e,t,se(t))}function De(e,t){return e===t||e!==e&&t!==t}var ap=rr(oi),up=rr(function(e,t){return e>=t}),Et=fo(function(){return arguments}())?fo:function(e){return J(e)&&V.call(e,"callee")&&!Js.call(e,"callee")},H=y.isArray,cp=$s?Ce($s):vh;function me(e){return e!=null&&dr(e.length)&&!tt(e)}function X(e){return J(e)&&me(e)}function fp(e){return e===!0||e===!1||J(e)&&ce(e)==Yt}var dt=Sd||Vi,dp=Ls?Ce(Ls):yh;function hp(e){return J(e)&&e.nodeType===1&&!_n(e)}function gp(e){if(e==null)return!0;if(me(e)&&(H(e)||typeof e=="string"||typeof e.splice=="function"||dt(e)||Pt(e)||Et(e)))return!e.length;var t=ue(e);if(t==Ne||t==He)return!e.size;if(mn(e))return!ui(e).length;for(var n in e)if(V.call(e,n))return!1;return!0}function mp(e,t){return dn(e,t)}function pp(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?dn(e,t,r,n):!!i}function Hi(e){if(!J(e))return!1;var t=ce(e);return t==An||t==Dc||typeof e.message=="string"&&typeof e.name=="string"&&!_n(e)}function _p(e){return typeof e=="number"&&js(e)}function tt(e){if(!Z(e))return!1;var t=ce(e);return t==Sn||t==os||t==Ic||t==Fc}function Cl(e){return typeof e=="number"&&e==I(e)}function dr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=At}function Z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function J(e){return e!=null&&typeof e=="object"}var wl=Ns?Ce(Ns):wh;function vp(e,t){return e===t||ai(e,t,Si(t))}function yp(e,t,n){return n=typeof n=="function"?n:r,ai(e,t,Si(t),n)}function Cp(e){return El(e)&&e!=+e}function wp(e){if(ig(e))throw new N(u);return ho(e)}function Ep(e){return e===null}function bp(e){return e==null}function El(e){return typeof e=="number"||J(e)&&ce(e)==Jt}function _n(e){if(!J(e)||ce(e)!=Ge)return!1;var t=Pn(e);if(t===null)return!0;var n=V.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Hn.call(n)==yd}var Ti=Hs?Ce(Hs):Eh;function Ap(e){return Cl(e)&&e>=-9007199254740991&&e<=At}var bl=Ts?Ce(Ts):bh;function hr(e){return typeof e=="string"||!H(e)&&J(e)&&ce(e)==jt}function Ee(e){return typeof e=="symbol"||J(e)&&ce(e)==Rn}var Pt=Is?Ce(Is):Ah;function Sp(e){return e===r}function Rp(e){return J(e)&&ue(e)==en}function xp(e){return J(e)&&ce(e)==Wc}var kp=rr(ci),qp=rr(function(e,t){return e<=t});function Al(e){if(!e)return[];if(me(e))return hr(e)?Te(e):ge(e);if(rn&&e[rn])return ld(e[rn]());var t=ue(e),n=t==Ne?Jr:t==He?$n:Ft;return n(e)}function nt(e){if(!e)return e===0?e:0;if(e=Le(e),e===wn||e===-1/0){var t=e<0?-1:1;return t*Lc}return e===e?e:0}function I(e){var t=nt(e),n=t%1;return t===t?n?t-n:t:0}function Sl(e){return e?vt(I(e),0,Ue):0}function Le(e){if(typeof e=="number")return e;if(Ee(e))return En;if(Z(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Z(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ms(e);var n=cf.test(e);return n||df.test(e)?Qf(e.slice(2),n?2:8):uf.test(e)?En:+e}function Rl(e){return Me(e,pe(e))}function Bp(e){return e?vt(I(e),-9007199254740991,At):e===0?e:0}function Q(e){return e==null?"":we(e)}var Op=Tt(function(e,t){if(mn(t)||me(t)){Me(t,se(t),e);return}for(var n in t)V.call(t,n)&&un(e,n,t[n])}),xl=Tt(function(e,t){Me(t,pe(t),e)}),gr=Tt(function(e,t,n,i){Me(t,pe(t),e,i)}),$p=Tt(function(e,t,n,i){Me(t,se(t),e,i)}),Lp=je(ri);function Np(e,t){var n=Ht(e);return t==null?n:io(n,t)}var Hp=P(function(e,t){e=K(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&fe(t[0],t[1],o)&&(i=1);++n<i;)for(var c=t[n],h=pe(c),m=-1,_=h.length;++m<_;){var w=h[m],E=e[w];(E===r||De(E,$t[w])&&!V.call(e,w))&&(e[w]=c[w])}return e}),Tp=P(function(e){return e.push(r,Qo),ye(kl,r,e)});function Ip(e,t){return Ps(e,O(t,3),We)}function Dp(e,t){return Ps(e,O(t,3),si)}function Pp(e,t){return e==null?e:ii(e,O(t,3),pe)}function Fp(e,t){return e==null?e:uo(e,O(t,3),pe)}function Up(e,t){return e&&We(e,O(t,3))}function Wp(e,t){return e&&si(e,O(t,3))}function Mp(e){return e==null?[]:Yn(e,se(e))}function Qp(e){return e==null?[]:Yn(e,pe(e))}function Ii(e,t,n){var i=e==null?r:yt(e,t);return i===r?n:i}function Vp(e,t){return e!=null&&zo(e,t,gh)}function Di(e,t){return e!=null&&zo(e,t,mh)}var Kp=Po(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Tn.call(t)),e[t]=n},Fi(_e)),zp=Po(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Tn.call(t)),V.call(e,t)?e[t].push(n):e[t]=[n]},O),Gp=P(fn);function se(e){return me(e)?no(e):ui(e)}function pe(e){return me(e)?no(e,!0):Sh(e)}function Yp(e,t){var n={};return t=O(t,3),We(e,function(i,o,c){Je(n,t(i,o,c),i)}),n}function Zp(e,t){var n={};return t=O(t,3),We(e,function(i,o,c){Je(n,o,t(i,o,c))}),n}var Jp=Tt(function(e,t,n){Zn(e,t,n)}),kl=Tt(function(e,t,n,i){Zn(e,t,n,i)}),Xp=je(function(e,t){var n={};if(e==null)return n;var i=!1;t=Y(t,function(c){return c=ct(c,e),i||(i=c.length>1),c}),Me(e,bi(e),n),i&&(n=Be(n,B|ie|he,Kh));for(var o=t.length;o--;)mi(n,t[o]);return n});function jp(e,t){return ql(e,fr(O(t)))}var e_=je(function(e,t){return e==null?{}:xh(e,t)});function ql(e,t){if(e==null)return{};var n=Y(bi(e),function(i){return[i]});return t=O(t),Co(e,n,function(i,o){return t(i,o[0])})}function t_(e,t,n){t=ct(t,e);var i=-1,o=t.length;for(o||(o=1,e=r);++i<o;){var c=e==null?r:e[Qe(t[i])];c===r&&(i=o,c=n),e=tt(c)?c.call(e):c}return e}function n_(e,t,n){return e==null?e:hn(e,t,n)}function r_(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:hn(e,t,n,i)}var Bl=Wo(se),Ol=Wo(pe);function i_(e,t,n){var i=H(e),o=i||dt(e)||Pt(e);if(t=O(t,4),n==null){var c=e&&e.constructor;o?n=i?new c:[]:Z(e)?n=tt(c)?Ht(Pn(e)):{}:n={}}return(o?xe:We)(e,function(h,m,_){return t(n,h,m,_)}),n}function s_(e,t){return e==null?!0:mi(e,t)}function o_(e,t,n){return e==null?e:So(e,t,vi(n))}function l_(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:So(e,t,vi(n),i)}function Ft(e){return e==null?[]:Zr(e,se(e))}function a_(e){return e==null?[]:Zr(e,pe(e))}function u_(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=Le(n),n=n===n?n:0),t!==r&&(t=Le(t),t=t===t?t:0),vt(Le(e),t,n)}function c_(e,t,n){return t=nt(t),n===r?(n=t,t=0):n=nt(n),e=Le(e),ph(e,t,n)}function f_(e,t,n){if(n&&typeof n!="boolean"&&fe(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=nt(e),t===r?(t=e,e=0):t=nt(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=eo();return ae(e+o*(t-e+Mf("1e-"+((o+"").length-1))),t)}return di(e,t)}var d_=It(function(e,t,n){return t=t.toLowerCase(),e+(n?$l(t):t)});function $l(e){return Pi(Q(e).toLowerCase())}function Ll(e){return e=Q(e),e&&e.replace(gf,nd).replace(Lf,"")}function h_(e,t,n){e=Q(e),t=we(t);var i=e.length;n=n===r?i:vt(I(n),0,i);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function g_(e){return e=Q(e),e&&zc.test(e)?e.replace(us,rd):e}function m_(e){return e=Q(e),e&&jc.test(e)?e.replace(Nr,"\\$&"):e}var p_=It(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),__=It(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),v_=To("toLowerCase");function y_(e,t,n){e=Q(e),t=I(t);var i=t?Bt(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return nr(Mn(o),n)+e+nr(Wn(o),n)}function C_(e,t,n){e=Q(e),t=I(t);var i=t?Bt(e):0;return t&&i<t?e+nr(t-i,n):e}function w_(e,t,n){e=Q(e),t=I(t);var i=t?Bt(e):0;return t&&i<t?nr(t-i,n)+e:e}function E_(e,t,n){return n||t==null?t=0:t&&(t=+t),qd(Q(e).replace(Hr,""),t||0)}function b_(e,t,n){return(n?fe(e,t,n):t===r)?t=1:t=I(t),hi(Q(e),t)}function A_(){var e=arguments,t=Q(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var S_=It(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function R_(e,t,n){return n&&typeof n!="number"&&fe(e,t,n)&&(t=n=r),n=n===r?Ue:n>>>0,n?(e=Q(e),e&&(typeof t=="string"||t!=null&&!Ti(t))&&(t=we(t),!t&&qt(e))?ft(Te(e),0,n):e.split(t,n)):[]}var x_=It(function(e,t,n){return e+(n?" ":"")+Pi(t)});function k_(e,t,n){return e=Q(e),n=n==null?0:vt(I(n),0,e.length),t=we(t),e.slice(n,n+t.length)==t}function q_(e,t,n){var i=a.templateSettings;n&&fe(e,t,n)&&(t=r),e=Q(e),t=gr({},t,i,Mo);var o=gr({},t.imports,i.imports,Mo),c=se(o),h=Zr(o,c),m,_,w=0,E=t.interpolate||xn,b="__p += '",A=Xr((t.escape||xn).source+"|"+E.source+"|"+(E===cs?af:xn).source+"|"+(t.evaluate||xn).source+"|$","g"),q="//# sourceURL="+(V.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Df+"]")+`
19
+ `;e.replace(A,function(L,F,W,be,de,Ae){return W||(W=be),b+=e.slice(w,Ae).replace(mf,id),F&&(m=!0,b+=`' +
20
+ __e(`+F+`) +
21
+ '`),de&&(_=!0,b+=`';
22
+ `+de+`;
23
+ __p += '`),W&&(b+=`' +
24
24
  ((__t = (`+W+`)) == null ? '' : __t) +
25
- '`),E=$e+N.length,N}),A+=`';
26
- `;var L=K.call(t,"variable")&&t.variable;if(!L)A=`with (obj) {
27
- `+A+`
25
+ '`),w=Ae+L.length,L}),b+=`';
26
+ `;var $=V.call(t,"variable")&&t.variable;if(!$)b=`with (obj) {
27
+ `+b+`
28
28
  }
29
- `;else if(Sd.test(L))throw new T(w);A=(y?A.replace(cd,""):A).replace(fd,"$1").replace(dd,"$1;"),A="function("+(L||"obj")+`) {
30
- `+(L?"":`obj || (obj = {});
31
- `)+"var __t, __p = ''"+(p?", __e = _.escape":"")+(y?`, __j = Array.prototype.join;
29
+ `;else if(of.test($))throw new N(S);b=(_?b.replace(Mc,""):b).replace(Qc,"$1").replace(Vc,"$1;"),b="function("+($||"obj")+`) {
30
+ `+($?"":`obj || (obj = {});
31
+ `)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(_?`, __j = Array.prototype.join;
32
32
  function print() { __p += __j.call(arguments, '') }
33
33
  `:`;
34
- `)+A+`return __p
35
- }`;var F=La(function(){return U(d,$+"return "+A).apply(i,h)});if(F.source=A,es(F))throw F;return F}function Zy(e){return V(e).toLowerCase()}function Jy(e){return V(e).toUpperCase()}function Xy(e,t,n){if(e=V(e),e&&(n||t===i))return Wo(e);if(!e||!(t=Re(t)))return e;var o=Ue(e),l=Ue(t),d=Uo(o,l),h=Vo(o,l)+1;return vt(o,d,h).join("")}function jy(e,t,n){if(e=V(e),e&&(n||t===i))return e.slice(0,Qo(e)+1);if(!e||!(t=Re(t)))return e;var o=Ue(e),l=Vo(o,Ue(t))+1;return vt(o,0,l).join("")}function ev(e,t,n){if(e=V(e),e&&(n||t===i))return e.replace(ei,"");if(!e||!(t=Re(t)))return e;var o=Ue(e),l=Uo(o,Ue(t));return vt(o,l).join("")}function tv(e,t){var n=zf,o=Yf;if(X(t)){var l="separator"in t?t.separator:l;n="length"in t?I(t.length):n,o="omission"in t?Re(t.omission):o}e=V(e);var d=e.length;if(It(e)){var h=Ue(e);d=h.length}if(n>=d)return e;var p=n-Ft(o);if(p<1)return o;var y=h?vt(h,0,p).join(""):e.slice(0,p);if(l===i)return y+o;if(h&&(p+=y.length-p),ts(l)){if(e.slice(p).search(l)){var E,b=y;for(l.global||(l=_i(l.source,V(uo.exec(l))+"g")),l.lastIndex=0;E=l.exec(b);)var A=E.index;y=y.slice(0,A===i?p:A)}}else if(e.indexOf(Re(l),p)!=p){var O=y.lastIndexOf(l);O>-1&&(y=y.slice(0,O))}return y+o}function nv(e){return e=V(e),e&&hd.test(e)?e.replace(oo,qh):e}var rv=Kt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),is=Nl("toUpperCase");function Ba(e,t,n){return e=V(e),t=n?i:t,t===i?Sh(e)?Nh(e):_h(e):e.match(t)||[]}var La=D(function(e,t){try{return xe(e,i,t)}catch(n){return es(n)?n:new T(n)}}),iv=lt(function(e,t){return Be(t,function(n){n=Je(n),st(e,n,Xi(e[n],e))}),e});function sv(e){var t=e==null?0:e.length,n=q();return e=t?J(e,function(o){if(typeof o[1]!="function")throw new Le(g);return[n(o[0]),o[1]]}):[],D(function(o){for(var l=-1;++l<t;){var d=e[l];if(xe(d[0],this,o))return xe(d[1],this,o)}})}function ov(e){return qg(Te(e,B))}function ss(e){return function(){return e}}function lv(e,t){return e==null||e!==e?t:e}var av=Hl(),uv=Hl(!0);function Ae(e){return e}function os(e){return dl(typeof e=="function"?e:Te(e,B))}function cv(e){return gl(Te(e,B))}function fv(e,t){return ml(e,Te(t,B))}var dv=D(function(e,t){return function(n){return Cn(n,e,t)}}),hv=D(function(e,t){return function(n){return Cn(e,n,t)}});function ls(e,t,n){var o=ae(t),l=cr(t,o);n==null&&!(X(t)&&(l.length||!o.length))&&(n=t,t=e,e=this,l=cr(t,ae(t)));var d=!(X(n)&&"chain"in n)||!!n.chain,h=ut(e);return Be(l,function(p){var y=t[p];e[p]=y,h&&(e.prototype[p]=function(){var E=this.__chain__;if(d||E){var b=e(this.__wrapped__),A=b.__actions__=Ce(this.__actions__);return A.push({func:y,args:arguments,thisArg:e}),b.__chain__=E,b}return y.apply(e,ht([this.value()],arguments))})}),e}function gv(){return ue._===this&&(ue._=Ph),this}function as(){}function mv(e){return e=I(e),D(function(t){return pl(t,e)})}var pv=Di(J),_v=Di(Io),yv=Di(ci);function Na(e){return Qi(e)?fi(Je(e)):zg(e)}function vv(e){return function(t){return e==null?i:Rt(e,t)}}var wv=Fl(),Cv=Fl(!0);function us(){return[]}function cs(){return!1}function Ev(){return{}}function bv(){return""}function Av(){return!0}function xv(e,t){if(e=I(e),e<1||e>Bt)return[];var n=ze,o=me(e,ze);t=q(t),e-=ze;for(var l=gi(o,t);++n<e;)t(n);return l}function Sv(e){return H(e)?J(e,Je):Oe(e)?[e]:Ce(ea(V(e)))}function Rv(e){var t=++Fh;return V(e)+t}var Ov=pr(function(e,t){return e+t},0),kv=Pi("ceil"),$v=pr(function(e,t){return e/t},1),qv=Pi("floor");function Bv(e){return e&&e.length?ur(e,Ae,xi):i}function Lv(e,t){return e&&e.length?ur(e,q(t,2),xi):i}function Nv(e){return Po(e,Ae)}function Tv(e,t){return Po(e,q(t,2))}function Hv(e){return e&&e.length?ur(e,Ae,ki):i}function Iv(e,t){return e&&e.length?ur(e,q(t,2),ki):i}var Fv=pr(function(e,t){return e*t},1),Dv=Pi("round"),Pv=pr(function(e,t){return e-t},0);function Mv(e){return e&&e.length?hi(e,Ae):0}function Wv(e,t){return e&&e.length?hi(e,q(t,2)):0}return f.after=c_,f.ary=fa,f.assign=J_,f.assignIn=xa,f.assignInWith=kr,f.assignWith=X_,f.at=j_,f.before=da,f.bind=Xi,f.bindAll=iv,f.bindKey=ha,f.castArray=E_,f.chain=aa,f.chunk=qm,f.compact=Bm,f.concat=Lm,f.cond=sv,f.conforms=ov,f.constant=ss,f.countBy=Mp,f.create=ey,f.curry=ga,f.curryRight=ma,f.debounce=pa,f.defaults=ty,f.defaultsDeep=ny,f.defer=f_,f.delay=d_,f.difference=Nm,f.differenceBy=Tm,f.differenceWith=Hm,f.drop=Im,f.dropRight=Fm,f.dropRightWhile=Dm,f.dropWhile=Pm,f.fill=Mm,f.filter=Up,f.flatMap=Qp,f.flatMapDeep=Gp,f.flatMapDepth=zp,f.flatten=ia,f.flattenDeep=Wm,f.flattenDepth=Um,f.flip=h_,f.flow=av,f.flowRight=uv,f.fromPairs=Vm,f.functions=uy,f.functionsIn=cy,f.groupBy=Yp,f.initial=Qm,f.intersection=Gm,f.intersectionBy=zm,f.intersectionWith=Ym,f.invert=dy,f.invertBy=hy,f.invokeMap=Jp,f.iteratee=os,f.keyBy=Xp,f.keys=ae,f.keysIn=be,f.map=br,f.mapKeys=my,f.mapValues=py,f.matches=cv,f.matchesProperty=fv,f.memoize=xr,f.merge=_y,f.mergeWith=Sa,f.method=dv,f.methodOf=hv,f.mixin=ls,f.negate=Sr,f.nthArg=mv,f.omit=yy,f.omitBy=vy,f.once=g_,f.orderBy=jp,f.over=pv,f.overArgs=m_,f.overEvery=_v,f.overSome=yv,f.partial=ji,f.partialRight=_a,f.partition=e_,f.pick=wy,f.pickBy=Ra,f.property=Na,f.propertyOf=vv,f.pull=jm,f.pullAll=oa,f.pullAllBy=ep,f.pullAllWith=tp,f.pullAt=np,f.range=wv,f.rangeRight=Cv,f.rearg=p_,f.reject=r_,f.remove=rp,f.rest=__,f.reverse=Zi,f.sampleSize=s_,f.set=Ey,f.setWith=by,f.shuffle=o_,f.slice=ip,f.sortBy=u_,f.sortedUniq=fp,f.sortedUniqBy=dp,f.split=Qy,f.spread=y_,f.tail=hp,f.take=gp,f.takeRight=mp,f.takeRightWhile=pp,f.takeWhile=_p,f.tap=Bp,f.throttle=v_,f.thru=Er,f.toArray=Ea,f.toPairs=Oa,f.toPairsIn=ka,f.toPath=Sv,f.toPlainObject=Aa,f.transform=Ay,f.unary=w_,f.union=yp,f.unionBy=vp,f.unionWith=wp,f.uniq=Cp,f.uniqBy=Ep,f.uniqWith=bp,f.unset=xy,f.unzip=Ji,f.unzipWith=la,f.update=Sy,f.updateWith=Ry,f.values=zt,f.valuesIn=Oy,f.without=Ap,f.words=Ba,f.wrap=C_,f.xor=xp,f.xorBy=Sp,f.xorWith=Rp,f.zip=Op,f.zipObject=kp,f.zipObjectDeep=$p,f.zipWith=qp,f.entries=Oa,f.entriesIn=ka,f.extend=xa,f.extendWith=kr,ls(f,f),f.add=Ov,f.attempt=La,f.camelCase=By,f.capitalize=$a,f.ceil=kv,f.clamp=ky,f.clone=b_,f.cloneDeep=x_,f.cloneDeepWith=S_,f.cloneWith=A_,f.conformsTo=R_,f.deburr=qa,f.defaultTo=lv,f.divide=$v,f.endsWith=Ly,f.eq=Ke,f.escape=Ny,f.escapeRegExp=Ty,f.every=Wp,f.find=Vp,f.findIndex=na,f.findKey=ry,f.findLast=Kp,f.findLastIndex=ra,f.findLastKey=iy,f.floor=qv,f.forEach=ua,f.forEachRight=ca,f.forIn=sy,f.forInRight=oy,f.forOwn=ly,f.forOwnRight=ay,f.get=ns,f.gt=O_,f.gte=k_,f.has=fy,f.hasIn=rs,f.head=sa,f.identity=Ae,f.includes=Zp,f.indexOf=Km,f.inRange=$y,f.invoke=gy,f.isArguments=$t,f.isArray=H,f.isArrayBuffer=$_,f.isArrayLike=Ee,f.isArrayLikeObject=ne,f.isBoolean=q_,f.isBuffer=wt,f.isDate=B_,f.isElement=L_,f.isEmpty=N_,f.isEqual=T_,f.isEqualWith=H_,f.isError=es,f.isFinite=I_,f.isFunction=ut,f.isInteger=ya,f.isLength=Rr,f.isMap=va,f.isMatch=F_,f.isMatchWith=D_,f.isNaN=P_,f.isNative=M_,f.isNil=U_,f.isNull=W_,f.isNumber=wa,f.isObject=X,f.isObjectLike=te,f.isPlainObject=Rn,f.isRegExp=ts,f.isSafeInteger=V_,f.isSet=Ca,f.isString=Or,f.isSymbol=Oe,f.isTypedArray=Gt,f.isUndefined=K_,f.isWeakMap=Q_,f.isWeakSet=G_,f.join=Zm,f.kebabCase=Hy,f.last=Ie,f.lastIndexOf=Jm,f.lowerCase=Iy,f.lowerFirst=Fy,f.lt=z_,f.lte=Y_,f.max=Bv,f.maxBy=Lv,f.mean=Nv,f.meanBy=Tv,f.min=Hv,f.minBy=Iv,f.stubArray=us,f.stubFalse=cs,f.stubObject=Ev,f.stubString=bv,f.stubTrue=Av,f.multiply=Fv,f.nth=Xm,f.noConflict=gv,f.noop=as,f.now=Ar,f.pad=Dy,f.padEnd=Py,f.padStart=My,f.parseInt=Wy,f.random=qy,f.reduce=t_,f.reduceRight=n_,f.repeat=Uy,f.replace=Vy,f.result=Cy,f.round=Dv,f.runInContext=_,f.sample=i_,f.size=l_,f.snakeCase=Ky,f.some=a_,f.sortedIndex=sp,f.sortedIndexBy=op,f.sortedIndexOf=lp,f.sortedLastIndex=ap,f.sortedLastIndexBy=up,f.sortedLastIndexOf=cp,f.startCase=Gy,f.startsWith=zy,f.subtract=Pv,f.sum=Mv,f.sumBy=Wv,f.template=Yy,f.times=xv,f.toFinite=ct,f.toInteger=I,f.toLength=ba,f.toLower=Zy,f.toNumber=Fe,f.toSafeInteger=Z_,f.toString=V,f.toUpper=Jy,f.trim=Xy,f.trimEnd=jy,f.trimStart=ev,f.truncate=tv,f.unescape=nv,f.uniqueId=Rv,f.upperCase=rv,f.upperFirst=is,f.each=ua,f.eachRight=ca,f.first=sa,ls(f,function(){var e={};return Ye(f,function(t,n){K.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=a,Be(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),Be(["drop","take"],function(e,t){M.prototype[e]=function(n){n=n===i?1:le(I(n),0);var o=this.__filtered__&&!t?new M(this):this.clone();return o.__filtered__?o.__takeCount__=me(n,o.__takeCount__):o.__views__.push({size:me(n,ze),type:e+(o.__dir__<0?"Right":"")}),o},M.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Be(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==ro||n==jf;M.prototype[e]=function(l){var d=this.clone();return d.__iteratees__.push({iteratee:q(l,3),type:n}),d.__filtered__=d.__filtered__||o,d}}),Be(["head","last"],function(e,t){var n="take"+(t?"Right":"");M.prototype[e]=function(){return this[n](1).value()[0]}}),Be(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");M.prototype[e]=function(){return this.__filtered__?new M(this):this[n](1)}}),M.prototype.compact=function(){return this.filter(Ae)},M.prototype.find=function(e){return this.filter(e).head()},M.prototype.findLast=function(e){return this.reverse().find(e)},M.prototype.invokeMap=D(function(e,t){return typeof e=="function"?new M(this):this.map(function(n){return Cn(n,e,t)})}),M.prototype.reject=function(e){return this.filter(Sr(q(e)))},M.prototype.slice=function(e,t){e=I(e);var n=this;return n.__filtered__&&(e>0||t<0)?new M(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=I(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},M.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},M.prototype.toArray=function(){return this.take(ze)},Ye(M.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),l=f[o?"take"+(t=="last"?"Right":""):t],d=o||/^find/.test(t);l&&(f.prototype[t]=function(){var h=this.__wrapped__,p=o?[1]:arguments,y=h instanceof M,E=p[0],b=y||H(h),A=function(P){var W=l.apply(f,ht([P],p));return o&&O?W[0]:W};b&&n&&typeof E=="function"&&E.length!=1&&(y=b=!1);var O=this.__chain__,$=!!this.__actions__.length,L=d&&!O,F=y&&!$;if(!d&&b){h=F?h:new M(this);var N=e.apply(h,p);return N.__actions__.push({func:Er,args:[A],thisArg:i}),new Ne(N,O)}return L&&F?e.apply(this,p):(N=this.thru(A),L?o?N.value()[0]:N.value():N)})}),Be(["pop","push","shift","sort","splice","unshift"],function(e){var t=zn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(o&&!this.__chain__){var d=this.value();return t.apply(H(d)?d:[],l)}return this[n](function(h){return t.apply(H(h)?h:[],l)})}}),Ye(M.prototype,function(e,t){var n=f[t];if(n){var o=n.name+"";K.call(Wt,o)||(Wt[o]=[]),Wt[o].push({name:t,func:n})}}),Wt[mr(i,qt).name]=[{name:"wrapper",func:i}],M.prototype.clone=ng,M.prototype.reverse=rg,M.prototype.value=ig,f.prototype.at=Lp,f.prototype.chain=Np,f.prototype.commit=Tp,f.prototype.next=Hp,f.prototype.plant=Fp,f.prototype.reverse=Dp,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Pp,f.prototype.first=f.prototype.head,gn&&(f.prototype[gn]=Ip),f},Dt=Th();Et?((Et.exports=Dt)._=Dt,oi._=Dt):ue._=Dt}).call(en)}(Nn,Nn.exports);var lc=Nn.exports;const Wr=oc(lc);class ac extends De{constructor(r={}){super(r),this.defaultStateName={axios:"axios",formData:"formData",formErrors:"formErrors",formNode:"formNode",pageKey:"pageKey",qForm:"qForm"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qForm:r}=this.controllerHelpers||{},{NodeHelper:i}=r||{};return typeof i!="function"?(console.log("invalid form helpers"),!1):!0}getConfig(){const r={...this.state.qForm||{},...this.config||{},...this.state[this.name]||{}};return typeof zs=="function"?zs.init({...r,helpers:{...this.controllerHelpers,element:this}}):{}}getFormCustomizer(){const{formCustomizer:r}=this.getHandlers();return typeof r=="function"?r:uc}}function uc(s,r){if(Array.isArray(s))return r||null;if(typeof r=="number"||typeof r=="boolean")return r;if(!r)return null}class cc extends De{constructor(r={}){super(r),this.defaultStateName={gridItems:"gridItems"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qGrid:r}=this.controllerHelpers||{},{QItem:i,Cell:a}=r||{};return typeof i!="function"||typeof a!="function"?(console.log("invalid grid helpers"),!1):!0}getConfig(){const r={...this.state.qGrid||{},...this.config||{},...this.state[this.name]||{}};return typeof Ys=="function"?Ys.init({...r,helpers:{...this.controllerHelpers,element:this}}):{}}}class fc extends De{constructor(r={}){super(r),this.defaultStateName={qHtml:"qHtml"}}getConfig(){return{...this.state.qHtml||{},...this.config||{},...this.state[this.name]||{}}}}class dc extends De{constructor(r={}){super(r)}}class hc extends De{constructor(r={}){super(r),this.defaultStateName={qLabel:"qLabel"}}getConfig(){return{...this.state.qLabel||{},...this.config||{},...this.state[this.name]||{}}}}class gc extends De{constructor(r={}){super(r),this.defaultStateName={qList:"qList",qSorterKeys:"qSorterKeys",rows:"rows"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qList:r}=this.controllerHelpers||{},{QListBulkButton:i,QListButton:a,QRow:c}=r||{};return typeof i!="function"||typeof a!="function"||typeof c!="function"?(console.log("invalid list helpers"),!1):!0}getConfig(){const r={...this.state.qList||{},...this.config||{},...this.state[this.name]||{}};return typeof Js=="function"?Js.init({...r,helpers:{...this.controllerHelpers,element:this}}):{}}}class mc extends De{constructor(r={}){super(r),this.defaultStateName={currentPage:"currentPage",currentPageSize:"currentPageSize",qPaginator:"qPaginator",totalRecords:"totalRecords"}}getConfig(){return{...this.state.qPaginator||{},...this.config||{},...this.state[this.name]||{}}}}class pc extends De{constructor(r={}){super(r),this.defaultStateName={qScheduler:"qScheduler"}}getConfig(){return{...this.state.qScheduler||{},...this.config||{},...this.state[this.name]||{}}}}class _c extends De{constructor(r={}){super(r),this.defaultStateName={active:"active",qTab:"qTab",tabLayout:"tabLayout"}}getConfig(){return{...this.state.qTab||{},...this.config||{},...this.state[this.name]||{}}}}const se={...nc,...{ElementQButton:sc,ElementQForm:ac,ElementQGrid:cc,ElementQHtml:fc,ElementQImport:dc,ElementQLabel:hc,ElementQList:gc,ElementQPaginator:mc,ElementQScheduler:pc,ElementQTab:_c},Container:jt,Element:De,Node:Mr};class yc{static init({layout:r={},controllerHelpers:i={}}={}){return Xs({layout:r,nodes:[],controllerHelpers:i})}}function Xs({layout:s,nodes:r,controllerHelpers:i}){if(s instanceof se.Node)return s;const a={...s};return Array.isArray(a.children)&&(a.children=a.children.map(c=>Xs({layout:c,nodes:r,controllerHelpers:i}))),vc(a,r,i)}function vc(s,r,i){const{nodeType:a,permissions:c}=s||{};if(typeof se[a]=="function"){const{permissionHandler:u}=i,g=c?u(c):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},w=se[a].init({...s,controllerHelpers:i,permissionResult:g});return w?w.isExist(r)?null:(r.push(w),w):null}return null}class wc{constructor(r={}){this.css=r.css||"",this.controllerHelpers=r.controllerHelpers,this.eventHandlers=r.eventHandlers||{},this.id=r.id||Dr("controller"),this.initialState=r.initialState,this.name=r.name,this.saveStateKeys=r.saveStateKeys||[],this.setLayout(r.layout)}get createdElement(){return this.elements.filter(r=>r.isCreated)}get elements(){return this.layout.getElements()}get isValid(){return!!this.id&&this.isValidControllerHelpers}get isValidControllerHelpers(){const{qUtilities:r}=this.controllerHelpers;return r&&js(r.convertString)&&js(r.getValidation)}static init(r){const i=new this(r);return i.isValid?i:null}getElementByElementName(r){return this.elements.find(i=>i.getElementName()===r)}getState(){return{...this.getControllerState(),...this.layout.getElementState()}}getControllerState(){return this.state}setLayout(r){const i={...this.controllerHelpers,controller:this};this.layout=yc.init({layout:r,controllerHelpers:i})}updateState(r={}){this.state={...this.state,...r},this.layout&&this.layout.updateElementState(this.state)}}function js(s){return typeof s=="function"}const tn={beforeCreate(){this.$options.components={...this.$options.components,QWidgetContainersContainer:m.defineAsyncComponent(()=>Promise.resolve().then(()=>zc)),QWidgetElementsElement:m.defineAsyncComponent(()=>Promise.resolve().then(()=>Gf))}},methods:{currentContainer(s){return s.isVisible?s instanceof se.Container?"q-widget-containers-container":s instanceof se.Element?"q-widget-elements-element":null:null}}},Cc={name:"q-widget-controller",components:{QModal:Da},mixins:[tn],props:{controller:{type:Object,default:()=>({})}},data(){return{isReady:!1,loadingCount:0,modal:null,renderKey:0}},computed:{controllerCss(){return this.controller.css||""},controllerHelpers(){return this.controller.controllerHelpers},eventHandlers(){return this.controller.eventHandlers||{}},initControllerState(){return this.controller.initialState},node(){return this.controller.layout}},created(){this.init()},methods:{async init(){try{const{getControllerState:s}=this.controllerHelpers;let r=this.initControllerState;typeof s=="function"&&(r=await s({state:r}));const{onCreated:i}=this.eventHandlers;i&&(r=await this.eventHandler({state:r,event:i})),this.updateState(r),this.updateDocumentTitle(r)}catch(s){Yt({component:this,message:s.message})}finally{this.isReady=!0,this.reRenderElements()}},async callbackEmit({event:s,payload:r}){console.log("callbackEmit",s,r)},async callbackSubscribe(s,{event:r,payload:i,cb:a}){const{getControllerUniqueKey:c}=this.controllerHelpers;if(typeof c=="function"&&s===c())try{const{key:u}=r,{controllerSubscribed:g}=this.eventHandlers,w=g[u];let x=this.controller.getState();w&&(x=await this.eventHandler({state:{...x,eventPayload:i},event:w})),typeof a=="function"&&await a({event:r,payload:x})}catch(u){Yt({component:this,message:u.message})}},async eventHandler({event:s,state:r}){const{eventHandler:i}=this.controllerHelpers;if(typeof i!="function")return console.log("no eventHandler"),r;let a=r;const c=Ec({event:s}),u=this.getLoadingFunctions({scope:c});try{if(eo({loadingFunctions:u,action:"start"}),s){const g={body:{...r},controller:this.controller,component:this,controllerHelpers:{...this.controllerHelpers,callbackEmit:this.callbackEmit,callbackSubscribe:this.callbackSubscribe,eventHandler:this.eventHandler,reRenderElements:this.reRenderElements,runEventChains:this.eventHandler,showError:Yt,updateState:this.updateState,updateLayout:this.updateLayout}},w=await i({event:s,payload:g});a={...a,...w}}return console.log(a),a}catch(g){throw new Error(g.message)}finally{eo({loadingFunctions:u,action:"stop"})}},getKey(s,r){return`${this.renderKey}-${s}-${r} `},getLoadingFunctions({scope:s=""}){const{startLoading:r,stopLoading:i}=this.controllerHelpers;switch(s){case"full":return typeof r!="function"||typeof i!="function"?null:{startLoading:r,stopLoading:i};case"none":return null;case"self":return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading};default:return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading}}},async onEvent(s){try{const{eventName:r,element:i,payload:a}=s,{elementEvents:c={}}=this.eventHandlers,u=c[r];u?await this.eventHandler({state:{...this.controller.getState(),eventPayload:a,eventElement:i},event:u}):console.log(`can not find the event ${r}`)}catch(r){Yt({component:this,message:r.message,modalConfig:{title:"提示"}})}},async onElementCreated(){try{console.log("onElementCreated",this.controller.elements,this.controller.createdElement);const s=this.eventHandlers.onElementCreated;s&&await this.eventHandler({state:this.controller.getState(),event:s})}catch(s){Yt({component:this,message:s.message})}},reRenderElements(){this.renderKey+=1},startSelfLoading(){this.loadingCount+=1},stopSelfLoading(){this.loadingCount-=1},updateDocumentTitle(s={}){const{documentTitle:r}=s;r&&(document.title=r)},updateState(s){this.controller.updateState(s);const{saveControllerState:r}=this.controllerHelpers;typeof r=="function"&&Pa({controller:this.controller,state:s,saveControllerState:r})},updateLayout(s,r){s||console.log("no layout"),r||console.log("use controller state"),this.controller.setLayout(s),this.controller.updateState(r),this.reRenderElements()}}};function Ec({event:s={}}={}){return s.scope||"full"}function eo({loadingFunctions:s,action:r}){if(s){const{startLoading:i,stopLoading:a}=s;switch(r){case"start":{i();break}case"stop":{a();break}}}}function bc(s,r,i,a,c,u){const g=m.resolveComponent("q-modal");return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-controller __controller",u.controllerCss])},[u.node?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(s.currentContainer(u.node)),{key:c.renderKey,controllerReady:c.isReady,node:u.node,loadingCount:c.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"])):m.createCommentVNode("v-if",!0),c.modal?(m.openBlock(),m.createBlock(g,{key:u.getKey("modal",c.modal),modal:c.modal},null,8,["modal"])):m.createCommentVNode("v-if",!0)],2)}const Ac={name:"q-widget",components:{QWidgetController:ie(Cc,[["render",bc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Controller.vue"]])},props:{content:{type:Object,default:()=>({})},contentHelpers:{type:Object,default:()=>({})},controller:{type:Object,default:()=>null},controllerHelpers:{type:Object,default:()=>null}},data(){return{controllerInstence:null,error:null}},computed:{hasError(){return this.error}},created(){this.init()},methods:{init(){try{const s=this.controllerHelpers||this.contentHelpers||{},r=s.qUtilities||{},i=this.controller||this.content;if(this.controllerInstence=wc.init({...i,controllerHelpers:{permissionHandler:xc,...s,qUtilities:{...Fu,...r}}}),!this.controllerInstence)throw new Error("invalid controller")}catch(s){this.error=s.message||"invalid controller"}}}};function xc(){return{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0}}const Sc={class:"q-widget"},Rc={key:1,class:"__error"};function Oc(s,r,i,a,c,u){const g=m.resolveComponent("q-widget-controller");return m.openBlock(),m.createElementBlock("div",Sc,[u.hasError?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createBlock(g,{key:0,controller:c.controllerInstence},null,8,["controller"])),u.hasError?(m.openBlock(),m.createElementBlock("div",Rc,m.toDisplayString(c.error),1)):m.createCommentVNode("v-if",!0)])}const Tn=ie(Ac,[["render",Oc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QWidget.vue"]]);function kc(s){s.component(Tn.name,Tn)}Tn.install=kc;const $c={name:"q-widget-containers-box",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},qc={class:"q-widget-containers-box __outer-box"},Bc={class:"__inner-box"};function Lc(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",qc,[m.createElementVNode("div",Bc,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(u.children,(g,w)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("box",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])])}const Nc=ie($c,[["render",Lc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Box.vue"]]),Tc={name:"q-widget-containers-column",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},Hc={class:"q-widget-containers-column __column"};function Ic(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",Hc,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(u.children,(g,w)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("cloumn",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Fc=ie(Tc,[["render",Ic],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Column.vue"]]),Dc={name:"q-widget-containers-header-sticky",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},Pc={class:"q-widget-containers-header-sticky __header __sticky --sticky-top"};function Mc(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",Pc,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(u.children,(g,w)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("header-sticky",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Wc=ie(Dc,[["render",Mc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/HeaderSticky.vue"]]),Uc={name:"q-widget-containers-row",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},Vc={class:"q-widget-containers-row __row"};function Kc(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",Vc,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(u.children,(g,w)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("row",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Qc={name:"q-widget-containers-container",components:{QWidgetBoxContainer:Nc,QWidgetColumnContainer:Fc,QWidgetHeaderStickyContainer:Wc,QWidgetRowContainer:ie(Uc,[["render",Kc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Row.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.getVisibleChildren()||[]}},methods:{factoryInit(s){return s instanceof se.ContainerBox?"q-widget-box-container":s instanceof se.ContainerColumn?"q-widget-column-container":s instanceof se.ContainerHeaderSticky?"q-widget-header-sticky-container":s instanceof se.ContainerRow?"q-widget-row-container":""},getClass(s){return s.css||""},getKey(s,r){return`${s}-${r}`},onEvent(s){this.$emit("onEvent",s)},onElementCreated(){this.node.isCreated&&this.$emit("onElementCreated")}}};function Gc(s,r,i,a,c,u){return m.openBlock(),m.createBlock(m.resolveDynamicComponent(u.factoryInit(i.node)),{class:m.normalizeClass(u.getClass(i.node)),controllerReady:i.controllerReady,getKey:u.getKey,node:i.node,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["class","controllerReady","getKey","node","loadingCount","onOnEvent","onOnElementCreated"])}const zc=Object.freeze(Object.defineProperty({__proto__:null,default:ie(Qc,[["render",Gc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Container.vue"]])},Symbol.toStringTag,{value:"Module"})),Yc={name:"q-widget-elements-adapters-q-button",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$button(){return this.$config.button||{}},$config(){return this.element.getConfig()},$event(){return this.$button.event||"onButtonClick"},$url(){return this.$button.url||""},button(){return{...this.$button,url:this.url}},helpers(){return this.element.controllerHelpers||{}},url(){const s=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:r}=this.helpers.qUtilities;return r(this.$url,s,this.state)},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onClick(s){const r={eventName:this.$event,payload:s};this.$emit("onEvent",r)}}},Zc={key:1};function Jc(s,r,i,a,c,u){const g=m.resolveComponent("q-button",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-button q-widget-adapters-q-button __element __adapter __button __flex",u.getClass(i.element)])},[u.isReady?(m.openBlock(),m.createBlock(g,{key:0,class:"q-button",button:u.button,onClick:u.onClick,onOnChange:u.onClick,onUpload:u.onClick},null,8,["button","onClick","onOnChange","onUpload"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",Zc,r[0]||(r[0]=[m.createElementVNode("div",{class:"button __loading-box"},[m.createElementVNode("div",{class:"skeleton"},[m.createElementVNode("div",{class:"skeleton__tr"},[m.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Xc=ie(Yc,[["render",Jc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QButton.vue"]]),jc={name:"q-widget-elements-adapters-q-form",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{formErrors:[],formValue:null,initPageKey:"",isFormReady:!1}},computed:{$buttons(){return this.$config.buttons||[]},$config(){return this.element.getConfig()},$disabledForm(){return this.$config.disabledForm||!1},$eventName(){return this.$config.eventName||{}},$formCss(){return this.$config.css||{}},$formHandler(){return this.$config.formHandler},$layout(){return this.$config.layout},$previewForm(){return this.$config.previewForm||!1},axios(){return this.state.axios},elementHandlers(){return this.element.getHandlers()},customizer(){return this.element.getFormCustomizer()},displayLayout(){return this.getLayout()},formData(){return this.state.formData},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},pageKey(){return this.state.pageKey||this.initPageKey||""}},created(){this.controllerReady&&this.init()},methods:{init(){this.formValue=Wr.cloneDeep(this.formData),this.isFormReady=!0},getClass(s){return s.css||""},getLayout(){if(!this.$layout)return null;const{NodeHelper:s}=this.helpers.qForm,{convertString:r,getValidation:i}=this.helpers.qUtilities;return tf({config:this.$config,convertString:r,getValidation:i,layout:this.$layout,NodeHelper:s,state:this.state})},onChange(s){const{node:r}=s;this.formErrors=[];const i=r.save({errors:this.formErrors}),a=Wr.mergeWith(this.formValue,i,this.customizer),u={eventName:this.$eventName.onFormChange||"onFormChange",payload:{...s,formData:a,errors:this.formErrors}};this.$emit("onEvent",u)},onClick(s){const{value:r,event:i}=s,a=Wr.mergeWith(this.formValue,r,this.customizer),c={eventName:i,payload:{...s,errors:this.formErrors,formData:a}};this.$emit("onEvent",c)},onCreated(s){const{pageKey:r,node:i}=s;this.initPageKey=r;const{afterSave:a}=this.elementHandlers;typeof a=="function"&&i.subscribe("afterSave",a({node:i,state:this.state})),this.formErrors=[],i.save({errors:this.formErrors}),this.element.onCreated({component:this,payload:{...s,formErrors:this.formErrors,formNode:i,pageKey:r}}),this.$emit("onCreated")}}};function ef(s,r,i,a){const c=/['"]\$\{(.+?)\}['"]/g;return JSON.parse(a(JSON.stringify(s),c,i))}function tf({config:s={},convertString:r,getValidation:i,layout:a,NodeHelper:c,state:u}){const g=nf({config:s,getValidation:i,layout:a,NodeHelper:c,state:u});return ef(g,s,u,r)}function nf({config:s={},getValidation:r,layout:i,NodeHelper:a,state:c}){let u=i;const{updateLayoutConfigs:g=[]}=s;return typeof a.updateNode=="function"&&g.forEach(w=>{const{key:x,value:S,type:R,restriction:B}=w;r({rule:B,data:c})&&(u=a.updateNode({keys:x.split("."),value:S,layout:u,type:R}))}),u}const rf={key:1};function sf(s,r,i,a,c,u){const g=m.resolveComponent("q-form",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-form q-widget-adapters-q-form __element __adapter __form",u.getClass(i.element)])},[u.isReady&&c.isFormReady&&u.displayLayout?(m.openBlock(),m.createBlock(g,{key:0,axios:u.axios,buttons:u.$buttons,css:u.$formCss,disabledForm:u.$disabledForm,formHandler:u.$formHandler,layout:u.displayLayout,pageKey:u.pageKey,previewForm:u.$previewForm,value:c.formValue,onOnClick:u.onClick,onOnChange:u.onChange,onOnCreated:u.onCreated},null,8,["axios","buttons","css","disabledForm","formHandler","layout","pageKey","previewForm","value","onOnClick","onOnChange","onOnCreated"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",rf,r[0]||(r[0]=[m.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const of=ie(jc,[["render",sf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QForm.vue"]]),lf={name:"q-widget-elements-adapters-q-grid",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{itemsData:[]}},computed:{$cellHandler(){return this.$config.cellHandler},$classes(){return this.$config.classes},$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$eventName(){return this.$config.eventName||{}},$fillLastRow(){return this.$config.fillLastRow||!1},$gridCss(){return this.$config.css||""},$layout(){return this.$config.layout},$placeholder(){return this.$config.placeholder||null},$urlDelegate(){return this.$config.urlDelegate||""},displayLayout(){return this.getLayout()},gridItems(){return this.state.gridItems},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.itemsData=this.gridItems.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},getLayout(){if(!this.$layout)return null;const{convertString:s}=this.helpers.qUtilities;return af(this.$layout,{},this.state,s)},onClickGridItem(s){const i={eventName:this.$eventName.onClickGridItem||"onClickGridItem",payload:s};this.$emit("onEvent",i)},onButtonClick(s){const i={eventName:this.$eventName.onClick||"onGridButtonClick",payload:s};this.$emit("onEvent",i)}}};function af(s,r,i,a){const c=/['"]\$\{(.+?)\}['"]/g;return JSON.parse(a(JSON.stringify(s),c,i))}const uf={key:1};function cf(s,r,i,a,c,u){const g=m.resolveComponent("q-grid",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-grid q-widget-adapters-q-grid __element __adapter __grid",u.getClass(i.element)])},[u.isReady?(m.openBlock(),m.createBlock(g,{key:0,cellHandler:u.$cellHandler,classes:u.$classes,css:u.$gridCss,fillLastRow:u.$fillLastRow,items:c.itemsData,layout:u.displayLayout,placeholder:u.$placeholder,urlDelegate:u.$urlDelegate,onOnClick:u.onButtonClick,onOnClickGridItem:u.onClickGridItem},null,8,["cellHandler","classes","css","fillLastRow","items","layout","placeholder","urlDelegate","onOnClick","onOnClickGridItem"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",uf," Loading "))],2)}const ff=ie(lf,[["render",cf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QGrid.vue"]]),df={name:"q-widget-elements-adapters-q-html",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()||{}},$html(){const s=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:r}=this.helpers.qUtilities;return r(this.$config.html,s,this.state)},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""}}},hf=["innerHTML"],gf={key:1};function mf(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-html q-widget-adapters-q-html __element __adapter __html",u.getClass(i.element)])},[u.$html&&u.isReady?(m.openBlock(),m.createElementBlock("div",{key:0,class:"__html",innerHTML:u.$html},null,8,hf)):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",gf,[m.createCommentVNode(" loading ")]))],2)}const pf=ie(df,[["render",mf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QHtml.vue"]]),_f={name:"q-widget-elements-adapters-q-import",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],data(){return{elementState:{}}},computed:{$additionalListHeaders(){return this.$config.additionalListHeaders||[]},$config(){return this.element.getConfig()},$label(){return this.$config.label},$templateUrl(){return this.$config.templateUrl},elementHandlers(){return this.element.getHandlers()},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},formatRowData(s){return this.elementHandlers.formatRowData(s)},getClass(s){return s.css||""},setElementState(s){this.elementState={...this.elementState,...s}},showError(s={}){const{payload:r}=s;return this.elementHandlers.showError({payload:r,state:{...this.state,...this.elementState}})},showSuccess({payload:s}){return this.elementHandlers.showSuccess({payload:s,state:{...this.state,...this.elementState}})},validationHandler({payload:s}){return this.elementHandlers.validationHandler({payload:s,state:this.state,setElementState:this.setElementState})}}},yf={key:1};function vf(s,r,i,a,c,u){const g=m.resolveComponent("q-import",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-import q-widget-adapters-q-import __element __adapter",u.getClass(i.element)])},[u.isReady?(m.openBlock(),m.createBlock(g,{key:0,additionalListHeaders:u.$additionalListHeaders,formatRowData:u.formatRowData,label:u.$label,showError:u.showError,showSuccess:u.showSuccess,templateUrl:u.$templateUrl,validationHandler:u.validationHandler},null,8,["additionalListHeaders","formatRowData","label","showError","showSuccess","templateUrl","validationHandler"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",yf,r[0]||(r[0]=[m.createElementVNode("div",{class:"import __loading-box"},[m.createElementVNode("div",{class:"skeleton"},[m.createElementVNode("div",{class:"skeleton__tr"},[m.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const wf=ie(_f,[["render",vf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QImport.vue"]]),Cf={name:"q-widget-elements-adapters-q-label",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()},$label(){return this.$config.label||""},isReady(){return this.loadingCount<=0&&this.controllerReady},tag(){return this.element&&this.element.config?this.element.config.tag||"div":"h2"}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""}}},Ef={key:1};function bf(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-label q-widget-adapters-q-label __element __label",u.getClass(i.element)])},[u.$label&&u.isReady?(m.openBlock(),m.createBlock(m.resolveDynamicComponent(u.tag),{key:0},{default:m.withCtx(()=>[m.createTextVNode(m.toDisplayString(u.$label),1)]),_:1})):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",Ef))],2)}const Af=ie(Cf,[["render",bf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QLabel.vue"]]),xf={name:"q-widget-elements-adapters-q-list",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{listRows:[],paginatorLayout:null,ready:!1}},computed:{$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$css(){return this.$config.css},$eventName(){return this.$config.eventName||{}},$expansion(){return this.$config.expansion||[]},$listBulkAction(){return this.$config.bulkAction||{}},$listHeaders(){return this.$config.headers||[]},$listSortBys(){return this.$config.listSortBys||[]},$listShowFooter(){return this.$config.listShowFooter||!1},$listStyle(){return this.$config.listStyle||"q-list-table"},$noDataMessage(){return this.$config.noDataMessage||""},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},listSortKeys(){return this.state.qSorterKeys||[]},rows(){return this.state.rows||[]}},created(){this.controllerReady&&this.init()},methods:{init(){this.listRows=this.rows.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated"),this.ready=!0},converter(s){return s},getClass(s){return s.css||""},onClickList(s){const{action:r={},qRow:i,row:a}=s,{qListButtonType:c=""}=r,u={eventName:c||"onListClick",payload:s};this.$emit("onEvent",u)},onClickListBulk(s){const{action:r,qRows:i,rows:a}=s,{qListButtonType:c}=r,u={eventName:c||"onListClickBulk",payload:s};this.$emit("onEvent",u)},onListHeaderClick(s){const{key:r}=s.header;if(to(r,this.$listSortBys)){const a=Sf(this.listSortKeys,r),c=Rf(this.$listSortBys,a),u={eventName:this.$eventName.onListClickHeader||"onListClickHeader",payload:{qSorterKeys:a,qSorter:c}};this.$emit("onEvent",u)}}}};function to(s,r){return s?r.find(i=>{const{key:a}=i;return s===a}):null}function Sf(s,r){let i=!1;const a=s.map(c=>{const{by:u,direction:g}=c;if(r===u){i=!0;const w=typeof g<"u"?Number(g)===1?-1:Number(g)===-1?0:1:1;return{...c,direction:w}}return c});return i?a.filter(c=>c.direction!==0):[...s,{by:r,direction:1}]}function Rf(s,r){return r.reduce((i,a)=>{const{by:c,direction:u}=a,g=to(c,s),{value:w=[]}=g;if(!g)return i;const x=w.map(S=>({...S,direction:u}));return i.push(...x),i},[])}const Of={key:1};function kf(s,r,i,a,c,u){const g=m.resolveComponent("q-list",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-list q-widget-adapters-q-list __element __adapter __list",u.getClass(i.element)])},[u.isReady&&c.ready?(m.openBlock(),m.createBlock(g,{key:0,bulkAction:u.$listBulkAction,css:u.$css,expansion:u.$expansion,headers:u.$listHeaders,listStyle:u.$listStyle,noDataMessage:u.$noDataMessage,rows:c.listRows,showFooter:u.$listShowFooter,sortBys:u.$listSortBys,sortStatus:u.listSortKeys,onClick:u.onClickList,onOnClickBulk:u.onClickListBulk,onOnListHeaderClick:u.onListHeaderClick},null,8,["bulkAction","css","expansion","headers","listStyle","noDataMessage","rows","showFooter","sortBys","sortStatus","onClick","onOnClickBulk","onOnListHeaderClick"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",Of,r[0]||(r[0]=[m.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__hr"></div><div class="skeleton__section skeleton__section--table"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div></div>',1)])))],2)}const $f=ie(xf,[["render",kf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QList.vue"]]),qf={name:"q-widget-elements-adapters-q-paginator",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{isPaginator:!1,paginatorLayout:null}},computed:{$config(){return this.element.getConfig()},$controlLabel(){return this.$config.controlLabel},$eventName(){return this.$config.eventName||{}},$paginatorLayout(){return this.$config.layout},$paginatorSizeOptions(){return this.$paginatorLayout.pageSizeOptions||[]},currentPage(){return this.state.currentPage},currentPageSize(){return this.state.currentPageSize},currentPageSizeOptionsIndex(){return this.$paginatorSizeOptions.indexOf(this.currentPageSize)},initPage(){return this.currentPage>=0?this.currentPage:this.$paginatorLayout.initPage},isReady(){return this.loadingCount<=0&&this.controllerReady},pageSizeOptionsIndex(){return this.currentPageSizeOptionsIndex>=0?this.currentPageSizeOptionsIndex:(this.onChangeRecPerPage(this.$paginatorSizeOptions[this.$paginatorLayout.pageSizeOptionsIdx],this.initPage),this.$paginatorLayout.pageSizeOptionsIndex)},totalRecords(){return this.state.totalRecords}},created(){this.controllerReady&&this.init()},mounted(){},methods:{init(){this.paginatorLayout={...this.$paginatorLayout,initPage:this.initPage,pageSizeOptionsIndex:this.pageSizeOptionsIndex},this.isPaginator=!0,this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onChangePageIdx(s){if(s!==this.currentPage){const i={eventName:this.$eventName.onChangePageIdx||"onChangePageIdx",payload:{currentPage:s}};this.$emit("onEvent",i)}},onChangeRecPerPage(s,r){const a={eventName:this.$eventName.onChangeRecPerPage||"onChangeRecPerPage",payload:{currentPageSize:s,currentPage:r}};this.$emit("onEvent",a)}}},Bf={key:1};function Lf(s,r,i,a,c,u){const g=m.resolveComponent("q-paginator",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-paginator q-widget-adapters-q-paginator __element __adapter __paginator",u.getClass(i.element)])},[c.isPaginator&&u.isReady?(m.openBlock(),m.createBlock(g,{key:0,controlLabel:u.$controlLabel,layout:c.paginatorLayout,total:u.totalRecords,onChangeCurrentPage:u.onChangePageIdx,onChangePageSize:u.onChangeRecPerPage},null,8,["controlLabel","layout","total","onChangeCurrentPage","onChangePageSize"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",Bf,r[0]||(r[0]=[m.createStaticVNode('<div class="paginator __loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Nf=ie(qf,[["render",Lf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QPaginator.vue"]]),Tf={name:"q-widget-elements-adapters-q-scheduler",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$allCellSelectable(){return this.$config.allCellSelectable},$bookings(){return this.state.bookings},$canSelectMoreThanOne(){return this.$config.canSelectMoreThanOne},$config(){return this.element.getConfig()},$emptyMessage(){return this.$config.emptyMessage},$eventBlockTemplate(){return this.$config.eventBlockTemplate},$eventsObj(){return this.state.schedulerEventsObj},$headerActions(){return this.$config.headerActions},$headers(){return this.state.schedulerHeaders},$labelTemplates(){return this.$config.labelTemplates},$layoutConfig(){return this.$config.layoutConfig},$isSelectingRange(){return this.$config.isSelectingRange},$showActions(){return this.$config.showActions},$showSelectWhloeDayAction(){return this.$config.showSelectWhloeDayAction},$tempEventConfig(){return this.$config.tempEventConfig},$tempEvents(){return this.state.tempEvents},$timeSlotsByDay(){return this.state.timeSlotsByDay},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onChangeDate(s){const r={eventName:"onSchedulerChangeDate",payload:s};this.$emit("onEvent",r)},onClickBooking(s){const r={eventName:"onSchedulerClickBooking",payload:s};this.$emit("onEvent",r)},onClickHeaderAction(s){const r={eventName:"onSchedulerClickHeaderAction",payload:s};this.$emit("onEvent",r)},onClickNextPage(s){const r={eventName:"onSchedulerClickNextPage",payload:s};this.$emit("onEvent",r)},onClickPreviousPage(s){const r={eventName:"onSchedulerClickPreviousPage",payload:s};this.$emit("onEvent",r)},onDeleteTempEvent(s){const r={eventName:"onSchedulerDeleteTempEvent",payload:s};this.$emit("onEvent",r)},selectTime(s){const r={eventName:"onSchedulerSelectTime",payload:s};this.$emit("onEvent",r)}}},Hf={key:1};function If(s,r,i,a,c,u){const g=m.resolveComponent("q-scheduler",!0);return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-scheduler q-widget-adapters-q-scheduler __element __adapter __flex",u.getClass(i.element)])},[u.isReady?(m.openBlock(),m.createBlock(g,{key:0,class:"q-scheduler",allCellSelectable:u.$allCellSelectable,bookings:u.$bookings,canSelectMoreThanOne:u.$canSelectMoreThanOne,emptyMessage:u.$emptyMessage,eventBlockTemplate:u.$eventBlockTemplate,eventsObj:u.$eventsObj,headerActions:u.$headerActions,headers:u.$headers,labelTemplates:u.$labelTemplates,layoutConfig:u.$layoutConfig,isSelectingRange:u.$isSelectingRange,showActions:u.$showActions,showSelectWhloeDayAction:u.$showSelectWhloeDayAction,tempEventConfig:u.$tempEventConfig,tempEvents:u.$tempEvents,timeSlotsByDay:u.$timeSlotsByDay,onOnDeleteTempEvent:u.onDeleteTempEvent,onSelectTime:u.selectTime,onOnClickBooking:u.onClickBooking,onOnClickHeaderAction:u.onClickHeaderAction,onOnChangeDate:u.onChangeDate,onOnClickPreviousPage:u.onClickPreviousPage,onOnClickNextPage:u.onClickNextPage},null,8,["allCellSelectable","bookings","canSelectMoreThanOne","emptyMessage","eventBlockTemplate","eventsObj","headerActions","headers","labelTemplates","layoutConfig","isSelectingRange","showActions","showSelectWhloeDayAction","tempEventConfig","tempEvents","timeSlotsByDay","onOnDeleteTempEvent","onSelectTime","onOnClickBooking","onOnClickHeaderAction","onOnChangeDate","onOnClickPreviousPage","onOnClickNextPage"])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",Hf,r[0]||(r[0]=[m.createElementVNode("div",{class:"__loading-box"},[m.createElementVNode("div",{class:"skeleton"},[m.createElementVNode("div",{class:"skeleton__tr"},[m.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Ff=ie(Tf,[["render",If],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QScheduler.vue"]]),Df={name:"q-widget-elements-adapters-q-tab",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{active:{},renderKey:0,tabLayout:[]}},computed:{$config(){return this.element.getConfig()},$eventName(){return this.$config.eventName||{}},$tabLayout(){return this.$config.layout||[]},activeKey(){return this.active.key},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.tabLayout=[...this.$tabLayout],this.active=this.state.active||this.tabLayout[0]||{},this.element.onCreated({component:this,payload:{tabLayout:this.tabLayout}}),this.$emit("onCreated")},getClass(s){return s.css||""},onChangeTab(s){const i={eventName:this.$eventName.onChangeTab||"onTabChange",payload:{active:s}};this.$emit("onEvent",i)}}},Pf={key:0,class:"__tabs __flex"},Mf=["href"],Wf=["onClick"],Uf={key:1};function Vf(s,r,i,a,c,u){return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["q-widget-elements-adapters-q-tab q-widget-adapters-q-tab __element __adapter",u.getClass(i.element)])},[u.isReady?(m.openBlock(),m.createElementBlock("div",Pf,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(c.tabLayout,(g,w)=>(m.openBlock(),m.createElementBlock("div",{key:w,class:m.normalizeClass(["__pointer __tab",u.activeKey===g.key?"__active":""])},[g.url?(m.openBlock(),m.createElementBlock("a",{key:0,href:g.url},m.toDisplayString(g.label)+m.toDisplayString(Number.isNaN(Number(g.total))?"":`(${Number(g.total)})`),9,Mf)):m.createCommentVNode("v-if",!0),g.url?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",{key:1,onClick:x=>u.onChangeTab(g)},m.toDisplayString(g.label)+m.toDisplayString(Number.isNaN(Number(g.total))?"":`(${Number(g.total)})`),9,Wf))],2))),128))])):m.createCommentVNode("v-if",!0),u.isReady?m.createCommentVNode("v-if",!0):(m.openBlock(),m.createElementBlock("div",Uf,r[0]||(r[0]=[m.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Kf={name:"q-widget-elements-element",components:{QWidgetQButtonElement:Xc,QWidgetQFormElement:of,QWidgetQGridElement:ff,QWidgetQHtmlElement:pf,QWidgetQImportElement:wf,QWidgetQLabelElement:Af,QWidgetQListElement:$f,QWidgetQPaginatorElement:Nf,QWidgetQSchedulerElement:Ff,QWidgetQTabElement:ie(Df,[["render",Vf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QTab.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{elementName(){return this.element.getElementName()},element(){return this.node},state(){return this.element.getState()}},methods:{factoryInit(s){return s instanceof se.ElementQButton?"q-widget-q-button-element":s instanceof se.ElementQForm?"q-widget-q-form-element":s instanceof se.ElementQGrid?"q-widget-q-grid-element":s instanceof se.ElementQHtml?"q-widget-q-html-element":s instanceof se.ElementQImport?"q-widget-q-import-element":s instanceof se.ElementQLabel?"q-widget-q-label-element":s instanceof se.ElementQList?"q-widget-q-list-element":s instanceof se.ElementQPaginator?"q-widget-q-paginator-element":s instanceof se.ElementQScheduler?"q-widget-q-scheduler-element":s instanceof se.ElementQTab?"q-widget-q-tab-element":""},onEvent(s){this.$emit("onEvent",{...s,element:this.element})},onElementCreated(){this.element.isCreated&&this.$emit("onElementCreated")}}};function Qf(s,r,i,a,c,u){return m.openBlock(),m.createBlock(m.resolveDynamicComponent(u.factoryInit(i.node)),{controllerReady:i.controllerReady,element:i.node,elementName:u.elementName,loadingCount:i.loadingCount,state:u.state,onOnCreated:u.onElementCreated,onOnEvent:u.onEvent},null,40,["controllerReady","element","elementName","loadingCount","state","onOnCreated","onOnEvent"])}const Gf=Object.freeze(Object.defineProperty({__proto__:null,default:ie(Kf,[["render",Qf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Element.vue"]])},Symbol.toStringTag,{value:"Module"}));Ct.QWidget=Tn,Object.defineProperty(Ct,Symbol.toStringTag,{value:"Module"}); return Ct; });
34
+ `)+b+`return __p
35
+ }`;var D=Hl(function(){return M(c,q+"return "+b).apply(r,h)});if(D.source=b,Hi(D))throw D;return D}function B_(e){return Q(e).toLowerCase()}function O_(e){return Q(e).toUpperCase()}function $_(e,t,n){if(e=Q(e),e&&(n||t===r))return Ms(e);if(!e||!(t=we(t)))return e;var i=Te(e),o=Te(t),c=Qs(i,o),h=Vs(i,o)+1;return ft(i,c,h).join("")}function L_(e,t,n){if(e=Q(e),e&&(n||t===r))return e.slice(0,zs(e)+1);if(!e||!(t=we(t)))return e;var i=Te(e),o=Vs(i,Te(t))+1;return ft(i,0,o).join("")}function N_(e,t,n){if(e=Q(e),e&&(n||t===r))return e.replace(Hr,"");if(!e||!(t=we(t)))return e;var i=Te(e),o=Qs(i,Te(t));return ft(i,o).join("")}function H_(e,t){var n=xc,i=kc;if(Z(t)){var o="separator"in t?t.separator:o;n="length"in t?I(t.length):n,i="omission"in t?we(t.omission):i}e=Q(e);var c=e.length;if(qt(e)){var h=Te(e);c=h.length}if(n>=c)return e;var m=n-Bt(i);if(m<1)return i;var _=h?ft(h,0,m).join(""):e.slice(0,m);if(o===r)return _+i;if(h&&(m+=_.length-m),Ti(o)){if(e.slice(m).search(o)){var w,E=_;for(o.global||(o=Xr(o.source,Q(fs.exec(o))+"g")),o.lastIndex=0;w=o.exec(E);)var b=w.index;_=_.slice(0,b===r?m:b)}}else if(e.indexOf(we(o),m)!=m){var A=_.lastIndexOf(o);A>-1&&(_=_.slice(0,A))}return _+i}function T_(e){return e=Q(e),e&&Kc.test(e)?e.replace(as,fd):e}var I_=It(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Pi=To("toUpperCase");function Nl(e,t,n){return e=Q(e),t=n?r:t,t===r?od(e)?gd(e):Jf(e):e.match(t)||[]}var Hl=P(function(e,t){try{return ye(e,r,t)}catch(n){return Hi(n)?n:new N(n)}}),D_=je(function(e,t){return xe(t,function(n){n=Qe(n),Je(e,n,Li(e[n],e))}),e});function P_(e){var t=e==null?0:e.length,n=O();return e=t?Y(e,function(i){if(typeof i[1]!="function")throw new ke(v);return[n(i[0]),i[1]]}):[],P(function(i){for(var o=-1;++o<t;){var c=e[o];if(ye(c[0],this,i))return ye(c[1],this,i)}})}function F_(e){return fh(Be(e,B))}function Fi(e){return function(){return e}}function U_(e,t){return e==null||e!==e?t:e}var W_=Do(),M_=Do(!0);function _e(e){return e}function Ui(e){return go(typeof e=="function"?e:Be(e,B))}function Q_(e){return po(Be(e,B))}function V_(e,t){return _o(e,Be(t,B))}var K_=P(function(e,t){return function(n){return fn(n,e,t)}}),z_=P(function(e,t){return function(n){return fn(e,n,t)}});function Wi(e,t,n){var i=se(t),o=Yn(t,i);n==null&&!(Z(t)&&(o.length||!i.length))&&(n=t,t=e,e=this,o=Yn(t,se(t)));var c=!(Z(n)&&"chain"in n)||!!n.chain,h=tt(e);return xe(o,function(m){var _=t[m];e[m]=_,h&&(e.prototype[m]=function(){var w=this.__chain__;if(c||w){var E=e(this.__wrapped__),b=E.__actions__=ge(this.__actions__);return b.push({func:_,args:arguments,thisArg:e}),E.__chain__=w,E}return _.apply(e,st([this.value()],arguments))})}),e}function G_(){return oe._===this&&(oe._=Cd),this}function Mi(){}function Y_(e){return e=I(e),P(function(t){return vo(t,e)})}var Z_=Ci(Y),J_=Ci(Ds),X_=Ci(Vr);function Tl(e){return xi(e)?Kr(Qe(e)):kh(e)}function j_(e){return function(t){return e==null?r:yt(e,t)}}var ev=Fo(),tv=Fo(!0);function Qi(){return[]}function Vi(){return!1}function nv(){return{}}function rv(){return""}function iv(){return!0}function sv(e,t){if(e=I(e),e<1||e>At)return[];var n=Ue,i=ae(e,Ue);t=O(t),e-=Ue;for(var o=Yr(i,t);++n<e;)t(n);return o}function ov(e){return H(e)?Y(e,Qe):Ee(e)?[e]:ge(nl(Q(e)))}function lv(e){var t=++vd;return Q(e)+t}var av=tr(function(e,t){return e+t},0),uv=wi("ceil"),cv=tr(function(e,t){return e/t},1),fv=wi("floor");function dv(e){return e&&e.length?Gn(e,_e,oi):r}function hv(e,t){return e&&e.length?Gn(e,O(t,2),oi):r}function gv(e){return Us(e,_e)}function mv(e,t){return Us(e,O(t,2))}function pv(e){return e&&e.length?Gn(e,_e,ci):r}function _v(e,t){return e&&e.length?Gn(e,O(t,2),ci):r}var vv=tr(function(e,t){return e*t},1),yv=wi("round"),Cv=tr(function(e,t){return e-t},0);function wv(e){return e&&e.length?Gr(e,_e):0}function Ev(e,t){return e&&e.length?Gr(e,O(t,2)):0}return a.after=Qm,a.ary=hl,a.assign=Op,a.assignIn=xl,a.assignInWith=gr,a.assignWith=$p,a.at=Lp,a.before=gl,a.bind=Li,a.bindAll=D_,a.bindKey=ml,a.castArray=np,a.chain=cl,a.chunk=fg,a.compact=dg,a.concat=hg,a.cond=P_,a.conforms=F_,a.constant=Fi,a.countBy=wm,a.create=Np,a.curry=pl,a.curryRight=_l,a.debounce=vl,a.defaults=Hp,a.defaultsDeep=Tp,a.defer=Vm,a.delay=Km,a.difference=gg,a.differenceBy=mg,a.differenceWith=pg,a.drop=_g,a.dropRight=vg,a.dropRightWhile=yg,a.dropWhile=Cg,a.fill=wg,a.filter=bm,a.flatMap=Rm,a.flatMapDeep=xm,a.flatMapDepth=km,a.flatten=ol,a.flattenDeep=Eg,a.flattenDepth=bg,a.flip=zm,a.flow=W_,a.flowRight=M_,a.fromPairs=Ag,a.functions=Mp,a.functionsIn=Qp,a.groupBy=qm,a.initial=Rg,a.intersection=xg,a.intersectionBy=kg,a.intersectionWith=qg,a.invert=Kp,a.invertBy=zp,a.invokeMap=Om,a.iteratee=Ui,a.keyBy=$m,a.keys=se,a.keysIn=pe,a.map=ar,a.mapKeys=Yp,a.mapValues=Zp,a.matches=Q_,a.matchesProperty=V_,a.memoize=cr,a.merge=Jp,a.mergeWith=kl,a.method=K_,a.methodOf=z_,a.mixin=Wi,a.negate=fr,a.nthArg=Y_,a.omit=Xp,a.omitBy=jp,a.once=Gm,a.orderBy=Lm,a.over=Z_,a.overArgs=Ym,a.overEvery=J_,a.overSome=X_,a.partial=Ni,a.partialRight=yl,a.partition=Nm,a.pick=e_,a.pickBy=ql,a.property=Tl,a.propertyOf=j_,a.pull=Lg,a.pullAll=al,a.pullAllBy=Ng,a.pullAllWith=Hg,a.pullAt=Tg,a.range=ev,a.rangeRight=tv,a.rearg=Zm,a.reject=Im,a.remove=Ig,a.rest=Jm,a.reverse=Oi,a.sampleSize=Pm,a.set=n_,a.setWith=r_,a.shuffle=Fm,a.slice=Dg,a.sortBy=Mm,a.sortedUniq=Vg,a.sortedUniqBy=Kg,a.split=R_,a.spread=Xm,a.tail=zg,a.take=Gg,a.takeRight=Yg,a.takeRightWhile=Zg,a.takeWhile=Jg,a.tap=dm,a.throttle=jm,a.thru=lr,a.toArray=Al,a.toPairs=Bl,a.toPairsIn=Ol,a.toPath=ov,a.toPlainObject=Rl,a.transform=i_,a.unary=ep,a.union=Xg,a.unionBy=jg,a.unionWith=em,a.uniq=tm,a.uniqBy=nm,a.uniqWith=rm,a.unset=s_,a.unzip=$i,a.unzipWith=ul,a.update=o_,a.updateWith=l_,a.values=Ft,a.valuesIn=a_,a.without=im,a.words=Nl,a.wrap=tp,a.xor=sm,a.xorBy=om,a.xorWith=lm,a.zip=am,a.zipObject=um,a.zipObjectDeep=cm,a.zipWith=fm,a.entries=Bl,a.entriesIn=Ol,a.extend=xl,a.extendWith=gr,Wi(a,a),a.add=av,a.attempt=Hl,a.camelCase=d_,a.capitalize=$l,a.ceil=uv,a.clamp=u_,a.clone=rp,a.cloneDeep=sp,a.cloneDeepWith=op,a.cloneWith=ip,a.conformsTo=lp,a.deburr=Ll,a.defaultTo=U_,a.divide=cv,a.endsWith=h_,a.eq=De,a.escape=g_,a.escapeRegExp=m_,a.every=Em,a.find=Am,a.findIndex=il,a.findKey=Ip,a.findLast=Sm,a.findLastIndex=sl,a.findLastKey=Dp,a.floor=fv,a.forEach=fl,a.forEachRight=dl,a.forIn=Pp,a.forInRight=Fp,a.forOwn=Up,a.forOwnRight=Wp,a.get=Ii,a.gt=ap,a.gte=up,a.has=Vp,a.hasIn=Di,a.head=ll,a.identity=_e,a.includes=Bm,a.indexOf=Sg,a.inRange=c_,a.invoke=Gp,a.isArguments=Et,a.isArray=H,a.isArrayBuffer=cp,a.isArrayLike=me,a.isArrayLikeObject=X,a.isBoolean=fp,a.isBuffer=dt,a.isDate=dp,a.isElement=hp,a.isEmpty=gp,a.isEqual=mp,a.isEqualWith=pp,a.isError=Hi,a.isFinite=_p,a.isFunction=tt,a.isInteger=Cl,a.isLength=dr,a.isMap=wl,a.isMatch=vp,a.isMatchWith=yp,a.isNaN=Cp,a.isNative=wp,a.isNil=bp,a.isNull=Ep,a.isNumber=El,a.isObject=Z,a.isObjectLike=J,a.isPlainObject=_n,a.isRegExp=Ti,a.isSafeInteger=Ap,a.isSet=bl,a.isString=hr,a.isSymbol=Ee,a.isTypedArray=Pt,a.isUndefined=Sp,a.isWeakMap=Rp,a.isWeakSet=xp,a.join=Bg,a.kebabCase=p_,a.last=$e,a.lastIndexOf=Og,a.lowerCase=__,a.lowerFirst=v_,a.lt=kp,a.lte=qp,a.max=dv,a.maxBy=hv,a.mean=gv,a.meanBy=mv,a.min=pv,a.minBy=_v,a.stubArray=Qi,a.stubFalse=Vi,a.stubObject=nv,a.stubString=rv,a.stubTrue=iv,a.multiply=vv,a.nth=$g,a.noConflict=G_,a.noop=Mi,a.now=ur,a.pad=y_,a.padEnd=C_,a.padStart=w_,a.parseInt=E_,a.random=f_,a.reduce=Hm,a.reduceRight=Tm,a.repeat=b_,a.replace=A_,a.result=t_,a.round=yv,a.runInContext=p,a.sample=Dm,a.size=Um,a.snakeCase=S_,a.some=Wm,a.sortedIndex=Pg,a.sortedIndexBy=Fg,a.sortedIndexOf=Ug,a.sortedLastIndex=Wg,a.sortedLastIndexBy=Mg,a.sortedLastIndexOf=Qg,a.startCase=x_,a.startsWith=k_,a.subtract=Cv,a.sum=wv,a.sumBy=Ev,a.template=q_,a.times=sv,a.toFinite=nt,a.toInteger=I,a.toLength=Sl,a.toLower=B_,a.toNumber=Le,a.toSafeInteger=Bp,a.toString=Q,a.toUpper=O_,a.trim=$_,a.trimEnd=L_,a.trimStart=N_,a.truncate=H_,a.unescape=T_,a.uniqueId=lv,a.upperCase=I_,a.upperFirst=Pi,a.each=fl,a.eachRight=dl,a.first=ll,Wi(a,function(){var e={};return We(a,function(t,n){V.call(a.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),a.VERSION=d,xe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){a[e].placeholder=a}),xe(["drop","take"],function(e,t){U.prototype[e]=function(n){n=n===r?1:re(I(n),0);var i=this.__filtered__&&!t?new U(this):this.clone();return i.__filtered__?i.__takeCount__=ae(n,i.__takeCount__):i.__views__.push({size:ae(n,Ue),type:e+(i.__dir__<0?"Right":"")}),i},U.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),xe(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==ss||n==$c;U.prototype[e]=function(o){var c=this.clone();return c.__iteratees__.push({iteratee:O(o,3),type:n}),c.__filtered__=c.__filtered__||i,c}}),xe(["head","last"],function(e,t){var n="take"+(t?"Right":"");U.prototype[e]=function(){return this[n](1).value()[0]}}),xe(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");U.prototype[e]=function(){return this.__filtered__?new U(this):this[n](1)}}),U.prototype.compact=function(){return this.filter(_e)},U.prototype.find=function(e){return this.filter(e).head()},U.prototype.findLast=function(e){return this.reverse().find(e)},U.prototype.invokeMap=P(function(e,t){return typeof e=="function"?new U(this):this.map(function(n){return fn(n,e,t)})}),U.prototype.reject=function(e){return this.filter(fr(O(e)))},U.prototype.slice=function(e,t){e=I(e);var n=this;return n.__filtered__&&(e>0||t<0)?new U(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=I(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},U.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},U.prototype.toArray=function(){return this.take(Ue)},We(U.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=a[i?"take"+(t=="last"?"Right":""):t],c=i||/^find/.test(t);o&&(a.prototype[t]=function(){var h=this.__wrapped__,m=i?[1]:arguments,_=h instanceof U,w=m[0],E=_||H(h),b=function(F){var W=o.apply(a,st([F],m));return i&&A?W[0]:W};E&&n&&typeof w=="function"&&w.length!=1&&(_=E=!1);var A=this.__chain__,q=!!this.__actions__.length,$=c&&!A,D=_&&!q;if(!c&&E){h=D?h:new U(this);var L=e.apply(h,m);return L.__actions__.push({func:lr,args:[b],thisArg:r}),new qe(L,A)}return $&&D?e.apply(this,m):(L=this.thru(b),$?i?L.value()[0]:L.value():L)})}),xe(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ln[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);a.prototype[e]=function(){var o=arguments;if(i&&!this.__chain__){var c=this.value();return t.apply(H(c)?c:[],o)}return this[n](function(h){return t.apply(H(h)?h:[],o)})}}),We(U.prototype,function(e,t){var n=a[t];if(n){var i=n.name+"";V.call(Nt,i)||(Nt[i]=[]),Nt[i].push({name:t,func:n})}}),Nt[er(r,bt).name]=[{name:"wrapper",func:r}],U.prototype.clone=Td,U.prototype.reverse=Id,U.prototype.value=Dd,a.prototype.at=hm,a.prototype.chain=gm,a.prototype.commit=mm,a.prototype.next=pm,a.prototype.plant=vm,a.prototype.reverse=ym,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Cm,a.prototype.first=a.prototype.head,rn&&(a.prototype[rn]=_m),a},Ot=md();gt?((gt.exports=Ot)._=Ot,Ur._=Ot):oe._=Ot}).call(Mt)}(yn,yn.exports);var Ia=yn.exports;const br=Ta(Ia);class Da extends Se{constructor(s={}){super(s),this.defaultStateName={axios:"axios",formData:"formData",formErrors:"formErrors",formNode:"formNode",pageKey:"pageKey",qForm:"qForm"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qForm:s}=this.controllerHelpers||{},{NodeHelper:r}=s||{};return typeof r!="function"?(console.log("invalid form helpers"),!1):!0}getConfig(){const s={...this.state.qForm||{},...this.config||{},...this.state[this.name]||{}};return typeof Zi=="function"?Zi.init({...s,helpers:{...this.controllerHelpers,element:this}}):{}}getFormCustomizer(){const{formCustomizer:s}=this.getHandlers();return typeof s=="function"?s:Pa}}function Pa(l,s){if(Array.isArray(l))return s||null;if(typeof s=="number"||typeof s=="boolean")return s;if(!s)return null}class Fa extends Se{constructor(s={}){super(s),this.defaultStateName={gridItems:"gridItems"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qGrid:s}=this.controllerHelpers||{},{QItem:r,Cell:d}=s||{};return typeof r!="function"||typeof d!="function"?(console.log("invalid grid helpers"),!1):!0}getConfig(){const s={...this.state.qGrid||{},...this.config||{},...this.state[this.name]||{}};return typeof Ji=="function"?Ji.init({...s,helpers:{...this.controllerHelpers,element:this}}):{}}}class Ua extends Se{constructor(s={}){super(s),this.defaultStateName={qHtml:"qHtml"}}getConfig(){return{...this.state.qHtml||{},...this.config||{},...this.state[this.name]||{}}}}class Wa extends Se{constructor(s={}){super(s)}}class Ma extends Se{constructor(s={}){super(s),this.defaultStateName={qLabel:"qLabel"}}getConfig(){return{...this.state.qLabel||{},...this.config||{},...this.state[this.name]||{}}}}class Qa extends Se{constructor(s={}){super(s),this.defaultStateName={qList:"qList",qSorterKeys:"qSorterKeys",rows:"rows"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qList:s}=this.controllerHelpers||{},{QListBulkButton:r,QListButton:d,QRow:f}=s||{};return typeof r!="function"||typeof d!="function"||typeof f!="function"?(console.log("invalid list helpers"),!1):!0}getConfig(){const s={...this.state.qList||{},...this.config||{},...this.state[this.name]||{}};return typeof ji=="function"?ji.init({...s,helpers:{...this.controllerHelpers,element:this}}):{}}}class Va extends Se{constructor(s={}){super(s),this.defaultStateName={currentPage:"currentPage",currentPageSize:"currentPageSize",qPaginator:"qPaginator",totalRecords:"totalRecords"}}getConfig(){return{...this.state.qPaginator||{},...this.config||{},...this.state[this.name]||{}}}}class Ka extends Se{constructor(s={}){super(s),this.defaultStateName={qScheduler:"qScheduler"}}getConfig(){return{...this.state.qScheduler||{},...this.config||{},...this.state[this.name]||{}}}}class za extends Se{constructor(s={}){super(s),this.defaultStateName={active:"active",qTab:"qTab",tabLayout:"tabLayout"}}getConfig(){return{...this.state.qTab||{},...this.config||{},...this.state[this.name]||{}}}}const te={...Oa,...{ElementQButton:Na,ElementQComponent:Ha,ElementQForm:Da,ElementQGrid:Fa,ElementQHtml:Ua,ElementQImport:Wa,ElementQLabel:Ma,ElementQList:Qa,ElementQPaginator:Va,ElementQScheduler:Ka,ElementQTab:za},Container:Wt,Element:Se,Node:Er};class Ga{static init({layout:s={},controllerHelpers:r={}}={}){return es({layout:s,nodes:[],controllerHelpers:r})}}function es({layout:l,nodes:s,controllerHelpers:r}){if(l instanceof te.Node)return l;const d={...l};return Array.isArray(d.children)&&(d.children=d.children.map(f=>es({layout:f,nodes:s,controllerHelpers:r}))),Ya(d,s,r)}function Ya(l,s,r){const{nodeType:d,permissions:f}=l||{};if(typeof te[d]=="function"){const{permissionHandler:u}=r,v=f?u(f):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},S=te[d].init({...l,controllerHelpers:r,permissionResult:v});return S?S.isExist(s)?null:(s.push(S),S):null}return null}class Za{constructor(s={}){this.css=s.css||"",this.controllerHelpers=s.controllerHelpers,this.eventHandlers=s.eventHandlers||{},this.id=s.id||Cr("controller"),this.initialState=s.initialState,this.name=s.name,this.saveStateKeys=s.saveStateKeys||[],this.setLayout(s.layout)}get createdElement(){return this.elements.filter(s=>s.isCreated)}get elements(){return this.layout.getElements()}get isValid(){return!!this.id&&this.isValidControllerHelpers}get isValidControllerHelpers(){const{qUtilities:s}=this.controllerHelpers;return s&&ts(s.convertString)&&ts(s.getValidation)}static init(s){const r=new this(s);return r.isValid?r:null}getElementByElementName(s){return this.elements.find(r=>r.getElementName()===s)}getState(){return{...this.getControllerState(),...this.layout.getElementState()}}getControllerState(){return this.state}setLayout(s){const r={...this.controllerHelpers,controller:this};this.layout=Ga.init({layout:s,controllerHelpers:r})}updateState(s={}){this.state={...this.state,...s},this.layout&&this.layout.updateElementState(this.state)}}function ts(l){return typeof l=="function"}const Qt={beforeCreate(){this.$options.components={...this.$options.components,QWidgetContainersContainer:g.defineAsyncComponent(()=>Promise.resolve().then(()=>Au)),QWidgetElementsElement:g.defineAsyncComponent(()=>Promise.resolve().then(()=>Rc))}},methods:{currentContainer(l){return l.isVisible?l instanceof te.Container?"q-widget-containers-container":l instanceof te.Element?"q-widget-elements-element":null:null}}},Ja={name:"q-widget-controller",components:{QModal:Ul},mixins:[Qt],props:{controller:{type:Object,default:()=>({})}},data(){return{isReady:!1,loadingCount:0,modal:null,renderKey:0}},computed:{controllerCss(){return this.controller.css||""},controllerHelpers(){return this.controller.controllerHelpers},eventHandlers(){return this.controller.eventHandlers||{}},initControllerState(){return this.controller.initialState},node(){return this.controller.layout}},created(){this.init()},methods:{async init(){try{const{getControllerState:l}=this.controllerHelpers;let s=this.initControllerState;typeof l=="function"&&(s=await l({state:s}));const{onCreated:r}=this.eventHandlers;r&&(s=await this.eventHandler({state:s,event:r})),this.updateState(s),this.updateDocumentTitle(s)}catch(l){Ut({component:this,message:l.message})}finally{this.isReady=!0,this.reRenderElements()}},async callbackEmit({event:l,payload:s}){console.log("callbackEmit",l,s)},async callbackSubscribe(l,{event:s,payload:r,cb:d}){const{getControllerUniqueKey:f}=this.controllerHelpers;if(typeof f=="function"&&l===f())try{const{key:u}=s,{controllerSubscribed:v}=this.eventHandlers,S=v[u];let T=this.controller.getState();S&&(T=await this.eventHandler({state:{...T,eventPayload:r},event:S})),typeof d=="function"&&await d({event:s,payload:T})}catch(u){Ut({component:this,message:u.message})}},async eventHandler({event:l,state:s}){const{eventHandler:r}=this.controllerHelpers;if(typeof r!="function")return console.log("no eventHandler"),s;let d=s;const f=Xa({event:l}),u=this.getLoadingFunctions({scope:f});try{if(ns({loadingFunctions:u,action:"start"}),l){const v={body:{...s},controller:this.controller,component:this,controllerHelpers:{...this.controllerHelpers,callbackEmit:this.callbackEmit,callbackSubscribe:this.callbackSubscribe,eventHandler:this.eventHandler,reRenderElements:this.reRenderElements,runEventChains:this.eventHandler,showError:Ut,updateState:this.updateState,updateLayout:this.updateLayout}},S=await r({event:l,payload:v});d={...d,...S}}return console.log(d),d}catch(v){throw new Error(v.message)}finally{ns({loadingFunctions:u,action:"stop"})}},getKey(l,s){return`${this.renderKey}-${l}-${s} `},getLoadingFunctions({scope:l=""}){const{startLoading:s,stopLoading:r}=this.controllerHelpers;switch(l){case"full":return typeof s!="function"||typeof r!="function"?null:{startLoading:s,stopLoading:r};case"none":return null;case"self":return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading};default:return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading}}},async onEvent(l){try{const{eventName:s,element:r,payload:d}=l,{elementEvents:f={}}=this.eventHandlers,u=f[s];u?await this.eventHandler({state:{...this.controller.getState(),eventPayload:d,eventElement:r},event:u}):console.log(`can not find the event ${s}`)}catch(s){Ut({component:this,message:s.message,modalConfig:{title:"提示"}})}},async onElementCreated(){try{console.log("onElementCreated",this.controller.elements,this.controller.createdElement);const l=this.eventHandlers.onElementCreated;l&&await this.eventHandler({state:this.controller.getState(),event:l})}catch(l){Ut({component:this,message:l.message})}},reRenderElements(){this.renderKey+=1},startSelfLoading(){this.loadingCount+=1},stopSelfLoading(){this.loadingCount-=1},updateDocumentTitle(l={}){const{documentTitle:s}=l;s&&(document.title=s)},updateState(l){this.controller.updateState(l);const{saveControllerState:s}=this.controllerHelpers;typeof s=="function"&&Wl({controller:this.controller,state:l,saveControllerState:s})},updateLayout(l,s){l||console.log("no layout"),s||console.log("use controller state"),this.controller.setLayout(l),this.controller.updateState(s),this.reRenderElements()}}};function Xa({event:l={}}={}){return l.scope||"full"}function ns({loadingFunctions:l,action:s}){if(l){const{startLoading:r,stopLoading:d}=l;switch(s){case"start":{r();break}case"stop":{d();break}}}}function ja(l,s,r,d,f,u){const v=g.resolveComponent("q-modal");return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-controller __controller",u.controllerCss])},[u.node?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(u.node)),{key:f.renderKey,controllerReady:f.isReady,node:u.node,loadingCount:f.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"])):g.createCommentVNode("v-if",!0),f.modal?(g.openBlock(),g.createBlock(v,{key:u.getKey("modal",f.modal),modal:f.modal},null,8,["modal"])):g.createCommentVNode("v-if",!0)],2)}const eu={name:"q-widget",components:{QWidgetController:ee(Ja,[["render",ja],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Controller.vue"]])},props:{content:{type:Object,default:()=>({})},contentHelpers:{type:Object,default:()=>({})},controller:{type:Object,default:()=>null},controllerHelpers:{type:Object,default:()=>null}},data(){return{controllerInstence:null,error:null}},computed:{hasError(){return this.error}},created(){this.init()},methods:{init(){try{const l=this.controllerHelpers||this.contentHelpers||{},s=l.qUtilities||{},r=this.controller||this.content;if(this.controllerInstence=Za.init({...r,controllerHelpers:{permissionHandler:tu,...l,qUtilities:{...ha,...s}}}),!this.controllerInstence)throw new Error("invalid controller")}catch(l){this.error=l.message||"invalid controller"}}}};function tu(){return{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0}}const nu={class:"q-widget"},ru={key:1,class:"__error"};function iu(l,s,r,d,f,u){const v=g.resolveComponent("q-widget-controller");return g.openBlock(),g.createElementBlock("div",nu,[u.hasError?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createBlock(v,{key:0,controller:f.controllerInstence},null,8,["controller"])),u.hasError?(g.openBlock(),g.createElementBlock("div",ru,g.toDisplayString(f.error),1)):g.createCommentVNode("v-if",!0)])}const Cn=ee(eu,[["render",iu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QWidget.vue"]]);function su(l){l.component(Cn.name,Cn)}Cn.install=su;const ou={name:"q-widget-containers-box",mixins:[Qt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},lu={class:"q-widget-containers-box __outer-box"},au={class:"__inner-box"};function uu(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",lu,[g.createElementVNode("div",au,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.children,(v,S)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:r.getKey("box",S),controllerReady:r.controllerReady,node:v,loadingCount:r.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])])}const cu=ee(ou,[["render",uu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Box.vue"]]),fu={name:"q-widget-containers-column",mixins:[Qt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},du={class:"q-widget-containers-column __column"};function hu(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",du,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.children,(v,S)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:r.getKey("cloumn",S),controllerReady:r.controllerReady,node:v,loadingCount:r.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const gu=ee(fu,[["render",hu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Column.vue"]]),mu={name:"q-widget-containers-header-sticky",mixins:[Qt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},pu={class:"q-widget-containers-header-sticky __header __sticky --sticky-top"};function _u(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",pu,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.children,(v,S)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:r.getKey("header-sticky",S),controllerReady:r.controllerReady,node:v,loadingCount:r.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const vu=ee(mu,[["render",_u],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/HeaderSticky.vue"]]),yu={name:"q-widget-containers-row",mixins:[Qt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},Cu={class:"q-widget-containers-row __row"};function wu(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",Cu,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(u.children,(v,S)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:r.getKey("row",S),controllerReady:r.controllerReady,node:v,loadingCount:r.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Eu={name:"q-widget-containers-container",components:{QWidgetBoxContainer:cu,QWidgetColumnContainer:gu,QWidgetHeaderStickyContainer:vu,QWidgetRowContainer:ee(yu,[["render",wu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Row.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.getVisibleChildren()||[]}},methods:{factoryInit(l){return l instanceof te.ContainerBox?"q-widget-box-container":l instanceof te.ContainerColumn?"q-widget-column-container":l instanceof te.ContainerHeaderSticky?"q-widget-header-sticky-container":l instanceof te.ContainerRow?"q-widget-row-container":""},getClass(l){return l.css||""},getKey(l,s){return`${l}-${s}`},onEvent(l){this.$emit("onEvent",l)},onElementCreated(){this.node.isCreated&&this.$emit("onElementCreated")}}};function bu(l,s,r,d,f,u){return g.openBlock(),g.createBlock(g.resolveDynamicComponent(u.factoryInit(r.node)),{class:g.normalizeClass(u.getClass(r.node)),controllerReady:r.controllerReady,getKey:u.getKey,node:r.node,loadingCount:r.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["class","controllerReady","getKey","node","loadingCount","onOnEvent","onOnElementCreated"])}const Au=Object.freeze(Object.defineProperty({__proto__:null,default:ee(Eu,[["render",bu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Container.vue"]])},Symbol.toStringTag,{value:"Module"})),Su={name:"q-widget-elements-adapters-q-button",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$button(){return this.$config.button||{}},$config(){return this.element.getConfig()},$event(){return this.$button.event||"onButtonClick"},$url(){return this.$button.url||""},button(){return{...this.$button,url:this.url}},helpers(){return this.element.controllerHelpers||{}},url(){const l=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:s}=this.helpers.qUtilities;return s(this.$url,l,this.state)},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onClick(l){const s={eventName:this.$event,payload:l};this.$emit("onEvent",s)}}},Ru={key:1};function xu(l,s,r,d,f,u){const v=g.resolveComponent("q-button",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-button q-widget-adapters-q-button __element __adapter __button __flex",u.getClass(r.element)])},[u.isReady?(g.openBlock(),g.createBlock(v,{key:0,class:"q-button",button:u.button,onClick:u.onClick,onOnChange:u.onClick,onUpload:u.onClick},null,8,["button","onClick","onOnChange","onUpload"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Ru,s[0]||(s[0]=[g.createElementVNode("div",{class:"button __loading-box"},[g.createElementVNode("div",{class:"skeleton"},[g.createElementVNode("div",{class:"skeleton__tr"},[g.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const ku=ee(Su,[["render",xu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QButton.vue"]]),qu={name:"q-widget-elements-adapters-q-form",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{formErrors:[],formValue:null,initPageKey:"",isFormReady:!1}},computed:{$buttons(){return this.$config.buttons||[]},$config(){return this.element.getConfig()},$disabledForm(){return this.$config.disabledForm||!1},$eventName(){return this.$config.eventName||{}},$formCss(){return this.$config.css||{}},$formHandler(){return this.$config.formHandler},$layout(){return this.$config.layout},$previewForm(){return this.$config.previewForm||!1},axios(){return this.state.axios},elementHandlers(){return this.element.getHandlers()},customizer(){return this.element.getFormCustomizer()},displayLayout(){return this.getLayout()},formData(){return this.state.formData},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},pageKey(){return this.state.pageKey||this.initPageKey||""}},created(){this.controllerReady&&this.init()},methods:{init(){this.formValue=br.cloneDeep(this.formData),this.isFormReady=!0},getClass(l){return l.css||""},getLayout(){if(!this.$layout)return null;const{NodeHelper:l}=this.helpers.qForm,{convertString:s,getValidation:r}=this.helpers.qUtilities;return Ou({config:this.$config,convertString:s,getValidation:r,layout:this.$layout,NodeHelper:l,state:this.state})},onChange(l){const{node:s}=l;this.formErrors=[];const r=s.save({errors:this.formErrors}),d=br.mergeWith(this.formValue,r,this.customizer),u={eventName:this.$eventName.onFormChange||"onFormChange",payload:{...l,formData:d,errors:this.formErrors}};this.$emit("onEvent",u)},onClick(l){const{value:s,event:r}=l,d=br.mergeWith(this.formValue,s,this.customizer),f={eventName:r,payload:{...l,errors:this.formErrors,formData:d}};this.$emit("onEvent",f)},onCreated(l){const{pageKey:s,node:r}=l;this.initPageKey=s;const{afterSave:d}=this.elementHandlers;typeof d=="function"&&r.subscribe("afterSave",d({node:r,state:this.state})),this.formErrors=[],r.save({errors:this.formErrors}),this.element.onCreated({component:this,payload:{...l,formErrors:this.formErrors,formNode:r,pageKey:s}}),this.$emit("onCreated")}}};function Bu(l,s,r,d){const f=/['"]\$\{(.+?)\}['"]/g;return JSON.parse(d(JSON.stringify(l),f,r))}function Ou({config:l={},convertString:s,getValidation:r,layout:d,NodeHelper:f,state:u}){const v=$u({config:l,getValidation:r,layout:d,NodeHelper:f,state:u});return Bu(v,l,u,s)}function $u({config:l={},getValidation:s,layout:r,NodeHelper:d,state:f}){let u=r;const{updateLayoutConfigs:v=[]}=l;return typeof d.updateNode=="function"&&v.forEach(S=>{const{key:T,value:R,type:x,restriction:B}=S;s({rule:B,data:f})&&(u=d.updateNode({keys:T.split("."),value:R,layout:u,type:x}))}),u}const Lu={key:1};function Nu(l,s,r,d,f,u){const v=g.resolveComponent("q-form",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-form q-widget-adapters-q-form __element __adapter __form",u.getClass(r.element)])},[u.isReady&&f.isFormReady&&u.displayLayout?(g.openBlock(),g.createBlock(v,{key:0,axios:u.axios,buttons:u.$buttons,css:u.$formCss,disabledForm:u.$disabledForm,formHandler:u.$formHandler,layout:u.displayLayout,pageKey:u.pageKey,previewForm:u.$previewForm,value:f.formValue,onOnClick:u.onClick,onOnChange:u.onChange,onOnCreated:u.onCreated},null,8,["axios","buttons","css","disabledForm","formHandler","layout","pageKey","previewForm","value","onOnClick","onOnChange","onOnCreated"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Lu,s[0]||(s[0]=[g.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Hu=ee(qu,[["render",Nu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QForm.vue"]]),Tu={name:"q-widget-elements-adapters-q-grid",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{itemsData:[]}},computed:{$cellHandler(){return this.$config.cellHandler},$classes(){return this.$config.classes},$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$eventName(){return this.$config.eventName||{}},$fillLastRow(){return this.$config.fillLastRow||!1},$gridCss(){return this.$config.css||""},$layout(){return this.$config.layout},$placeholder(){return this.$config.placeholder||null},$urlDelegate(){return this.$config.urlDelegate||""},displayLayout(){return this.getLayout()},gridItems(){return this.state.gridItems},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.itemsData=this.gridItems.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},getLayout(){if(!this.$layout)return null;const{convertString:l}=this.helpers.qUtilities;return Iu(this.$layout,{},this.state,l)},onClickGridItem(l){const r={eventName:this.$eventName.onClickGridItem||"onClickGridItem",payload:l};this.$emit("onEvent",r)},onButtonClick(l){const r={eventName:this.$eventName.onClick||"onGridButtonClick",payload:l};this.$emit("onEvent",r)}}};function Iu(l,s,r,d){const f=/['"]\$\{(.+?)\}['"]/g;return JSON.parse(d(JSON.stringify(l),f,r))}const Du={key:1};function Pu(l,s,r,d,f,u){const v=g.resolveComponent("q-grid",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-grid q-widget-adapters-q-grid __element __adapter __grid",u.getClass(r.element)])},[u.isReady?(g.openBlock(),g.createBlock(v,{key:0,cellHandler:u.$cellHandler,classes:u.$classes,css:u.$gridCss,fillLastRow:u.$fillLastRow,items:f.itemsData,layout:u.displayLayout,placeholder:u.$placeholder,urlDelegate:u.$urlDelegate,onOnClick:u.onButtonClick,onOnClickGridItem:u.onClickGridItem},null,8,["cellHandler","classes","css","fillLastRow","items","layout","placeholder","urlDelegate","onOnClick","onOnClickGridItem"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Du," Loading "))],2)}const Fu=ee(Tu,[["render",Pu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QGrid.vue"]]),Uu={name:"q-widget-elements-adapters-q-html",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()||{}},$html(){const l=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:s}=this.helpers.qUtilities;return s(this.$config.html,l,this.state)},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""}}},Wu=["innerHTML"],Mu={key:1};function Qu(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-html q-widget-adapters-q-html __element __adapter __html",u.getClass(r.element)])},[u.$html&&u.isReady?(g.openBlock(),g.createElementBlock("div",{key:0,class:"__html",innerHTML:u.$html},null,8,Wu)):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Mu,[g.createCommentVNode(" loading ")]))],2)}const Vu=ee(Uu,[["render",Qu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QHtml.vue"]]),Ku={name:"q-widget-elements-adapters-q-import",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],data(){return{elementState:{}}},computed:{$additionalListHeaders(){return this.$config.additionalListHeaders||[]},$config(){return this.element.getConfig()},$label(){return this.$config.label},$templateUrl(){return this.$config.templateUrl},elementHandlers(){return this.element.getHandlers()},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},formatRowData(l){return this.elementHandlers.formatRowData(l)},getClass(l){return l.css||""},setElementState(l){this.elementState={...this.elementState,...l}},showError(l={}){const{payload:s}=l;return this.elementHandlers.showError({payload:s,state:{...this.state,...this.elementState}})},showSuccess({payload:l}){return this.elementHandlers.showSuccess({payload:l,state:{...this.state,...this.elementState}})},validationHandler({payload:l}){return this.elementHandlers.validationHandler({payload:l,state:this.state,setElementState:this.setElementState})}}},zu={key:1};function Gu(l,s,r,d,f,u){const v=g.resolveComponent("q-import",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-import q-widget-adapters-q-import __element __adapter",u.getClass(r.element)])},[u.isReady?(g.openBlock(),g.createBlock(v,{key:0,additionalListHeaders:u.$additionalListHeaders,formatRowData:u.formatRowData,label:u.$label,showError:u.showError,showSuccess:u.showSuccess,templateUrl:u.$templateUrl,validationHandler:u.validationHandler},null,8,["additionalListHeaders","formatRowData","label","showError","showSuccess","templateUrl","validationHandler"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",zu,s[0]||(s[0]=[g.createElementVNode("div",{class:"import __loading-box"},[g.createElementVNode("div",{class:"skeleton"},[g.createElementVNode("div",{class:"skeleton__tr"},[g.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Yu=ee(Ku,[["render",Gu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QImport.vue"]]),Zu={name:"q-widget-elements-adapters-q-label",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()},$label(){return this.$config.label||""},isReady(){return this.loadingCount<=0&&this.controllerReady},tag(){return this.element&&this.element.config?this.element.config.tag||"div":"h2"}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""}}},Ju={key:1};function Xu(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-label q-widget-adapters-q-label __element __label",u.getClass(r.element)])},[u.$label&&u.isReady?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(u.tag),{key:0},{default:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(u.$label),1)]),_:1})):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Ju))],2)}const ju=ee(Zu,[["render",Xu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QLabel.vue"]]),ec={name:"q-widget-elements-adapters-q-list",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{listRows:[],paginatorLayout:null,ready:!1}},computed:{$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$css(){return this.$config.css},$eventName(){return this.$config.eventName||{}},$expansion(){return this.$config.expansion||[]},$listBulkAction(){return this.$config.bulkAction||{}},$listHeaders(){return this.$config.headers||[]},$listSortBys(){return this.$config.listSortBys||[]},$listShowFooter(){return this.$config.listShowFooter||!1},$listStyle(){return this.$config.listStyle||"q-list-table"},$noDataMessage(){return this.$config.noDataMessage||""},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},listSortKeys(){return this.state.qSorterKeys||[]},rows(){return this.state.rows||[]}},created(){this.controllerReady&&this.init()},methods:{init(){this.listRows=this.rows.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated"),this.ready=!0},converter(l){return l},getClass(l){return l.css||""},onClickList(l){const{action:s={},qRow:r,row:d}=l,{qListButtonType:f=""}=s,u={eventName:f||"onListClick",payload:l};this.$emit("onEvent",u)},onClickListBulk(l){const{action:s,qRows:r,rows:d}=l,{qListButtonType:f}=s,u={eventName:f||"onListClickBulk",payload:l};this.$emit("onEvent",u)},onListHeaderClick(l){const{key:s}=l.header;if(rs(s,this.$listSortBys)){const d=tc(this.listSortKeys,s),f=nc(this.$listSortBys,d),u={eventName:this.$eventName.onListClickHeader||"onListClickHeader",payload:{qSorterKeys:d,qSorter:f}};this.$emit("onEvent",u)}}}};function rs(l,s){return l?s.find(r=>{const{key:d}=r;return l===d}):null}function tc(l,s){let r=!1;const d=l.map(f=>{const{by:u,direction:v}=f;if(s===u){r=!0;const S=typeof v<"u"?Number(v)===1?-1:Number(v)===-1?0:1:1;return{...f,direction:S}}return f});return r?d.filter(f=>f.direction!==0):[...l,{by:s,direction:1}]}function nc(l,s){return s.reduce((r,d)=>{const{by:f,direction:u}=d,v=rs(f,l),{value:S=[]}=v;if(!v)return r;const T=S.map(R=>({...R,direction:u}));return r.push(...T),r},[])}const rc={key:1};function ic(l,s,r,d,f,u){const v=g.resolveComponent("q-list",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-list q-widget-adapters-q-list __element __adapter __list",u.getClass(r.element)])},[u.isReady&&f.ready?(g.openBlock(),g.createBlock(v,{key:0,bulkAction:u.$listBulkAction,css:u.$css,expansion:u.$expansion,headers:u.$listHeaders,listStyle:u.$listStyle,noDataMessage:u.$noDataMessage,rows:f.listRows,showFooter:u.$listShowFooter,sortBys:u.$listSortBys,sortStatus:u.listSortKeys,onClick:u.onClickList,onOnClickBulk:u.onClickListBulk,onOnListHeaderClick:u.onListHeaderClick},null,8,["bulkAction","css","expansion","headers","listStyle","noDataMessage","rows","showFooter","sortBys","sortStatus","onClick","onOnClickBulk","onOnListHeaderClick"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",rc,s[0]||(s[0]=[g.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__hr"></div><div class="skeleton__section skeleton__section--table"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div></div>',1)])))],2)}const sc=ee(ec,[["render",ic],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QList.vue"]]),oc={name:"q-widget-elements-adapters-q-paginator",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{isPaginator:!1,paginatorLayout:null}},computed:{$config(){return this.element.getConfig()},$controlLabel(){return this.$config.controlLabel},$eventName(){return this.$config.eventName||{}},$paginatorLayout(){return this.$config.layout},$paginatorSizeOptions(){return this.$paginatorLayout.pageSizeOptions||[]},currentPage(){return this.state.currentPage},currentPageSize(){return this.state.currentPageSize},currentPageSizeOptionsIndex(){return this.$paginatorSizeOptions.indexOf(this.currentPageSize)},initPage(){return this.currentPage>=0?this.currentPage:this.$paginatorLayout.initPage},isReady(){return this.loadingCount<=0&&this.controllerReady},pageSizeOptionsIndex(){return this.currentPageSizeOptionsIndex>=0?this.currentPageSizeOptionsIndex:(this.onChangeRecPerPage(this.$paginatorSizeOptions[this.$paginatorLayout.pageSizeOptionsIdx],this.initPage),this.$paginatorLayout.pageSizeOptionsIndex)},totalRecords(){return this.state.totalRecords}},created(){this.controllerReady&&this.init()},mounted(){},methods:{init(){this.paginatorLayout={...this.$paginatorLayout,initPage:this.initPage,pageSizeOptionsIndex:this.pageSizeOptionsIndex},this.isPaginator=!0,this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onChangePageIdx(l){if(l!==this.currentPage){const r={eventName:this.$eventName.onChangePageIdx||"onChangePageIdx",payload:{currentPage:l}};this.$emit("onEvent",r)}},onChangeRecPerPage(l,s){const d={eventName:this.$eventName.onChangeRecPerPage||"onChangeRecPerPage",payload:{currentPageSize:l,currentPage:s}};this.$emit("onEvent",d)}}},lc={key:1};function ac(l,s,r,d,f,u){const v=g.resolveComponent("q-paginator",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-paginator q-widget-adapters-q-paginator __element __adapter __paginator",u.getClass(r.element)])},[f.isPaginator&&u.isReady?(g.openBlock(),g.createBlock(v,{key:0,controlLabel:u.$controlLabel,layout:f.paginatorLayout,total:u.totalRecords,onChangeCurrentPage:u.onChangePageIdx,onChangePageSize:u.onChangeRecPerPage},null,8,["controlLabel","layout","total","onChangeCurrentPage","onChangePageSize"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",lc,s[0]||(s[0]=[g.createStaticVNode('<div class="paginator __loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const uc=ee(oc,[["render",ac],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QPaginator.vue"]]),cc={name:"q-widget-elements-adapters-q-scheduler",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$allCellSelectable(){return this.$config.allCellSelectable},$bookings(){return this.state.bookings},$canSelectMoreThanOne(){return this.$config.canSelectMoreThanOne},$config(){return this.element.getConfig()},$emptyMessage(){return this.$config.emptyMessage},$eventBlockTemplate(){return this.$config.eventBlockTemplate},$eventsObj(){return this.state.schedulerEventsObj},$headerActions(){return this.$config.headerActions},$headers(){return this.state.schedulerHeaders},$labelTemplates(){return this.$config.labelTemplates},$layoutConfig(){return this.$config.layoutConfig},$isSelectingRange(){return this.$config.isSelectingRange},$showActions(){return this.$config.showActions},$showSelectWhloeDayAction(){return this.$config.showSelectWhloeDayAction},$tempEventConfig(){return this.$config.tempEventConfig},$tempEvents(){return this.state.tempEvents},$timeSlotsByDay(){return this.state.timeSlotsByDay},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onChangeDate(l){const s={eventName:"onSchedulerChangeDate",payload:l};this.$emit("onEvent",s)},onClickBooking(l){const s={eventName:"onSchedulerClickBooking",payload:l};this.$emit("onEvent",s)},onClickHeaderAction(l){const s={eventName:"onSchedulerClickHeaderAction",payload:l};this.$emit("onEvent",s)},onClickNextPage(l){const s={eventName:"onSchedulerClickNextPage",payload:l};this.$emit("onEvent",s)},onClickPreviousPage(l){const s={eventName:"onSchedulerClickPreviousPage",payload:l};this.$emit("onEvent",s)},onDeleteTempEvent(l){const s={eventName:"onSchedulerDeleteTempEvent",payload:l};this.$emit("onEvent",s)},selectTime(l){const s={eventName:"onSchedulerSelectTime",payload:l};this.$emit("onEvent",s)}}},fc={key:1};function dc(l,s,r,d,f,u){const v=g.resolveComponent("q-scheduler",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-scheduler q-widget-adapters-q-scheduler __element __adapter __flex",u.getClass(r.element)])},[u.isReady?(g.openBlock(),g.createBlock(v,{key:0,class:"q-scheduler",allCellSelectable:u.$allCellSelectable,bookings:u.$bookings,canSelectMoreThanOne:u.$canSelectMoreThanOne,emptyMessage:u.$emptyMessage,eventBlockTemplate:u.$eventBlockTemplate,eventsObj:u.$eventsObj,headerActions:u.$headerActions,headers:u.$headers,labelTemplates:u.$labelTemplates,layoutConfig:u.$layoutConfig,isSelectingRange:u.$isSelectingRange,showActions:u.$showActions,showSelectWhloeDayAction:u.$showSelectWhloeDayAction,tempEventConfig:u.$tempEventConfig,tempEvents:u.$tempEvents,timeSlotsByDay:u.$timeSlotsByDay,onOnDeleteTempEvent:u.onDeleteTempEvent,onSelectTime:u.selectTime,onOnClickBooking:u.onClickBooking,onOnClickHeaderAction:u.onClickHeaderAction,onOnChangeDate:u.onChangeDate,onOnClickPreviousPage:u.onClickPreviousPage,onOnClickNextPage:u.onClickNextPage},null,8,["allCellSelectable","bookings","canSelectMoreThanOne","emptyMessage","eventBlockTemplate","eventsObj","headerActions","headers","labelTemplates","layoutConfig","isSelectingRange","showActions","showSelectWhloeDayAction","tempEventConfig","tempEvents","timeSlotsByDay","onOnDeleteTempEvent","onSelectTime","onOnClickBooking","onOnClickHeaderAction","onOnChangeDate","onOnClickPreviousPage","onOnClickNextPage"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",fc,s[0]||(s[0]=[g.createElementVNode("div",{class:"__loading-box"},[g.createElementVNode("div",{class:"skeleton"},[g.createElementVNode("div",{class:"skeleton__tr"},[g.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const hc=ee(cc,[["render",dc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QScheduler.vue"]]),gc={name:"q-widget-elements-adapters-q-tab",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{active:{},renderKey:0,tabLayout:[]}},computed:{$config(){return this.element.getConfig()},$eventName(){return this.$config.eventName||{}},$tabLayout(){return this.$config.layout||[]},activeKey(){return this.active.key},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.tabLayout=[...this.$tabLayout],this.active=this.state.active||this.tabLayout[0]||{},this.element.onCreated({component:this,payload:{tabLayout:this.tabLayout}}),this.$emit("onCreated")},getClass(l){return l.css||""},onChangeTab(l){const r={eventName:this.$eventName.onChangeTab||"onTabChange",payload:{active:l}};this.$emit("onEvent",r)}}},mc={key:0,class:"__tabs __flex"},pc=["href"],_c=["onClick"],vc={key:1};function yc(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-tab q-widget-adapters-q-tab __element __adapter",u.getClass(r.element)])},[u.isReady?(g.openBlock(),g.createElementBlock("div",mc,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(f.tabLayout,(v,S)=>(g.openBlock(),g.createElementBlock("div",{key:S,class:g.normalizeClass(["__pointer __tab",u.activeKey===v.key?"__active":""])},[v.url?(g.openBlock(),g.createElementBlock("a",{key:0,href:v.url},g.toDisplayString(v.label)+g.toDisplayString(Number.isNaN(Number(v.total))?"":`(${Number(v.total)})`),9,pc)):g.createCommentVNode("v-if",!0),v.url?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",{key:1,onClick:T=>u.onChangeTab(v)},g.toDisplayString(v.label)+g.toDisplayString(Number.isNaN(Number(v.total))?"":`(${Number(v.total)})`),9,_c))],2))),128))])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",vc,s[0]||(s[0]=[g.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Cc=ee(gc,[["render",yc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QTab.vue"]]),wc={name:"q-widget-elements-adapters-q-component",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$config(){return this.element.getConfig()||{}},$componentName(){return this.$config.componentName},$component(){return this.state?.elementComponents?this.state.elementComponents[this.$componentName]:null},$componentPayload(){return this.state.componentPayload?this.state.componentPayload[this.element.name]:{}},$eventName(){return this.$config.eventName||{}},$payload(){return{state:this.state,...this.$componentPayload}},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady&&!!this.$component}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},getComponent(){return this.$component||"div"},onElementEvent({eventName:l,payload:s}={}){const r={eventName:this.$eventName[l]||l,payload:s};this.$emit("onEvent",r)}}},Ec={key:1};function bc(l,s,r,d,f,u){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-component q-widget-adapters-q-component __element __adapter __component",u.getClass(r.element)])},[u.isReady?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(u.getComponent()),{key:0,class:"__component",payload:u.$payload,onOnElementEvent:u.onElementEvent},null,40,["payload","onOnElementEvent"])):g.createCommentVNode("v-if",!0),u.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Ec,[g.createCommentVNode(" loading ")]))],2)}const Ac={name:"q-widget-elements-element",components:{QWidgetQButtonElement:ku,QWidgetQFormElement:Hu,QWidgetQGridElement:Fu,QWidgetQHtmlElement:Vu,QWidgetQImportElement:Yu,QWidgetQLabelElement:ju,QWidgetQListElement:sc,QWidgetQPaginatorElement:uc,QWidgetQSchedulerElement:hc,QWidgetQTabElement:Cc,QWidgetQComponentElement:ee(wc,[["render",bc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QComponent.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{elementName(){return this.element.getElementName()},element(){return this.node},state(){return this.element.getState()}},methods:{factoryInit(l){return l instanceof te.ElementQComponent?"q-widget-q-component-element":l instanceof te.ElementQButton?"q-widget-q-button-element":l instanceof te.ElementQForm?"q-widget-q-form-element":l instanceof te.ElementQGrid?"q-widget-q-grid-element":l instanceof te.ElementQHtml?"q-widget-q-html-element":l instanceof te.ElementQImport?"q-widget-q-import-element":l instanceof te.ElementQLabel?"q-widget-q-label-element":l instanceof te.ElementQList?"q-widget-q-list-element":l instanceof te.ElementQPaginator?"q-widget-q-paginator-element":l instanceof te.ElementQScheduler?"q-widget-q-scheduler-element":l instanceof te.ElementQTab?"q-widget-q-tab-element":""},onEvent(l){this.$emit("onEvent",{...l,element:this.element})},onElementCreated(){this.element.isCreated&&this.$emit("onElementCreated")}}};function Sc(l,s,r,d,f,u){return g.openBlock(),g.createBlock(g.resolveDynamicComponent(u.factoryInit(r.node)),{controllerReady:r.controllerReady,element:r.node,elementName:u.elementName,loadingCount:r.loadingCount,state:u.state,onOnCreated:u.onElementCreated,onOnEvent:u.onEvent},null,40,["controllerReady","element","elementName","loadingCount","state","onOnCreated","onOnEvent"])}const Rc=Object.freeze(Object.defineProperty({__proto__:null,default:ee(Ac,[["render",Sc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Element.vue"]])},Symbol.toStringTag,{value:"Module"}));ht.QWidget=Cn,Object.defineProperty(ht,Symbol.toStringTag,{value:"Module"}); return ht; });
@@ -1,5 +1,5 @@
1
1
  Name: @questwork/q-utilities
2
- Version: 0.1.12
2
+ Version: 0.1.15
3
3
  License: MIT
4
4
  Private: false
5
5
  Description: Questwork QUtilities
@@ -35,6 +35,11 @@ function nodeHandler(obj, helpers) {
35
35
  }
36
36
  }
37
37
 
38
+ update(obj) {
39
+ super.update(obj)
40
+ this.permissionResultHandler(this.permissionResult)
41
+ }
42
+
38
43
  setDecoratorDisabled({ val }) {
39
44
  this.setDisabled({ val })
40
45
  }
@@ -62,7 +62,16 @@ function makeConvert({ actions, helpers }) {
62
62
  const { element } = _helpers
63
63
  const { converter } = element.getHandlers()
64
64
  if (typeof converter !== 'function') {
65
- return (row) => (row)
65
+ return (row) => QRow.init({
66
+ row,
67
+ getActions: (qRow, header) => {
68
+ const { actions: headerActions = [] } = header || {}
69
+ return headerActions.map((action) => (QWidgetQListButton.init({
70
+ ...action,
71
+ qRow
72
+ }, helpers))).filter((i) => i)
73
+ }
74
+ })
66
75
  }
67
76
  return converter({ actions, helpers: _helpers })
68
77
  }
@@ -1,4 +1,5 @@
1
1
  import { ElementQButton } from './qButton'
2
+ import { ElementQComponent } from './qComponent'
2
3
  import { ElementQForm } from './qForm'
3
4
  import { ElementQGrid } from './qGrid'
4
5
  import { ElementQHtml } from './qHtml'
@@ -11,6 +12,7 @@ import { ElementQTab } from './qTab'
11
12
 
12
13
  export default {
13
14
  ElementQButton,
15
+ ElementQComponent,
14
16
  ElementQForm,
15
17
  ElementQGrid,
16
18
  ElementQHtml,
@@ -24,6 +26,7 @@ export default {
24
26
 
25
27
  export {
26
28
  ElementQButton,
29
+ ElementQComponent,
27
30
  ElementQForm,
28
31
  ElementQGrid,
29
32
  ElementQHtml,
@@ -0,0 +1,28 @@
1
+ import { Element } from '../element'
2
+
3
+ class ElementQComponent extends Element {
4
+ constructor(opt = {}) {
5
+ super(opt)
6
+ this.defaultStateName = {
7
+ qComponent: 'qComponent'
8
+ }
9
+ }
10
+
11
+ getConfig() {
12
+ const config = {
13
+ ...(this.state.qComponent || {}),
14
+ ...(this.config || {}),
15
+ ...(this.state[this.name] || {})
16
+ }
17
+ return config
18
+ }
19
+
20
+ }
21
+
22
+ export default {
23
+ ElementQComponent
24
+ }
25
+
26
+ export {
27
+ ElementQComponent
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@questwork/vue-q-widget-vue3",
3
- "version": "3.1.10",
3
+ "version": "3.1.12",
4
4
  "description": "Questwork vue component Sample",
5
5
  "exports": {
6
6
  ".": {
@@ -16,9 +16,13 @@
16
16
  },
17
17
  "license": "MIT",
18
18
  "devDependencies": {
19
+ "@aws-sdk/client-s3": "^3.812.0",
20
+ "@aws-sdk/client-sts": "^3.812.0",
21
+ "@aws-sdk/s3-request-presigner": "^3.817.0",
19
22
  "@babel/core": "^7.12.16",
20
23
  "@babel/eslint-parser": "^7.12.16",
21
24
  "@babel/preset-env": "^7.22.4",
25
+ "@questwork/q-utilities": "^0.1.12",
22
26
  "@questwork/vue-q-buttons-vue3": "^3.1.0",
23
27
  "@questwork/vue-q-form-vue3": "3.1.0",
24
28
  "@questwork/vue-q-grid-vue3": "^3.1.0",
@@ -31,26 +35,28 @@
31
35
  "@storybook/vue3": "^8.4.7",
32
36
  "@storybook/vue3-vite": "^8.4.7",
33
37
  "@vitejs/plugin-vue": "^5.2.1",
38
+ "@vue-office/docx": "^1.6.3",
39
+ "@vue-office/excel": "^1.7.14",
40
+ "@vue-office/pdf": "^2.0.10",
41
+ "@vue-office/pptx": "^1.0.1",
34
42
  "cross-env": "^7.0.3",
35
43
  "eslint": "8.47.0",
36
44
  "eslint-config-airbnb-base": "11.2.0",
37
45
  "eslint-plugin-import": "2.3.0",
38
46
  "eslint-plugin-storybook": "^0.11.2",
39
47
  "eslint-plugin-vue": "^9.32.0",
48
+ "lodash": "^4.17.21",
40
49
  "rollup-plugin-license": "^3.5.3",
41
50
  "sass": "^1.83.4",
42
51
  "storybook": "^8.4.7",
43
52
  "vite": "5.4.11",
44
53
  "vite-plugin-commonjs": "^0.10.4",
45
- "vue": "^3.5.13"
54
+ "vue": "^3.5.13",
55
+ "vue-demi": "0.14.6"
46
56
  },
47
57
  "engines": {
48
58
  "node": ">=10.0.0"
49
59
  },
50
- "dependencies": {
51
- "@questwork/q-utilities": "^0.1.12",
52
- "lodash": "^4.17.21"
53
- },
54
60
  "scripts": {
55
61
  "build": "vite build",
56
62
  "build:copy": "vite build && cp -r dist/*.js '../congress.system/public/libs/vue.v3/' && cp -r dist/*.js '../wordpress.plugins/wp-q-components/assets/js/vue.v3/' && cp -r dist/*.css '../congress.system/public/userfile/shared/css/vue.v3/' && cp -r dist/*.css '../wordpress.plugins/wp-q-components/assets/css/vue.v3/'",