@processmaker/screen-builder 2.85.3 → 2.85.4

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.
@@ -265,7 +265,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
265
265
  `):" "+Dv(n[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a},adapters:hd};function md(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Wn(null,t)}function zv(t){return md(t),t.headers=Wr.from(t.headers),t.data=fd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Iv.getAdapter(t.adapter||dd.adapter)(t).then(function(a){return md(t),a.data=fd.call(t,t.transformResponse,a),a.headers=Wr.from(a.headers),a},function(a){return Mv(a)||(md(t),a&&a.response&&(a.response.data=fd.call(t,t.transformResponse,a.response),a.response.headers=Wr.from(a.response.headers))),Promise.reject(a)})}const Lv=t=>t instanceof Wr?t.toJSON():t;function ki(t,e){e=e||{};const r={};function a(l,c,d){return X.isPlainObject(l)&&X.isPlainObject(c)?X.merge.call({caseless:d},l,c):X.isPlainObject(c)?X.merge({},c):X.isArray(c)?c.slice():c}function i(l,c,d){if(X.isUndefined(c)){if(!X.isUndefined(l))return a(void 0,l,d)}else return a(l,c,d)}function n(l,c){if(!X.isUndefined(c))return a(void 0,c)}function s(l,c){if(X.isUndefined(c)){if(!X.isUndefined(l))return a(void 0,l)}else return a(void 0,c)}function o(l,c,d){if(d in e)return a(l,c);if(d in t)return a(void 0,l)}const u={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(l,c)=>i(Lv(l),Lv(c),!0)};return X.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=u[c]||i,p=d(t[c],e[c],c);X.isUndefined(p)&&d!==o||(r[c]=p)}),r}const jv="1.6.7",gd={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{gd[t]=function(a){return typeof a===t||"a"+(e<1?"n ":" ")+t}});const Nv={};gd.transitional=function(e,r,a){function i(n,s){return"[Axios v"+jv+"] Transitional option '"+n+"'"+s+(a?". "+a:"")}return(n,s,o)=>{if(e===!1)throw new Oe(i(s," has been removed"+(r?" in "+r:"")),Oe.ERR_DEPRECATED);return r&&!Nv[s]&&(Nv[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(n,s,o):!0}};function rB(t,e,r){if(typeof t!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const a=Object.keys(t);let i=a.length;for(;i-- >0;){const n=a[i],s=e[n];if(s){const o=t[n],u=o===void 0||s(o,n,t);if(u!==!0)throw new Oe("option "+n+" must be "+u,Oe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Oe("Unknown option "+n,Oe.ERR_BAD_OPTION)}}const vd={assertOptions:rB,validators:gd},ca=vd.validators;class fl{constructor(e){this.defaults=e,this.interceptors={request:new Cv,response:new Cv}}async request(e,r){try{return await this._request(e,r)}catch(a){if(a instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const n=i.stack?i.stack.replace(/^.+\n/,""):"";a.stack?n&&!String(a.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(a.stack+=`
266
266
  `+n):a.stack=n}throw a}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ki(this.defaults,r);const{transitional:a,paramsSerializer:i,headers:n}=r;a!==void 0&&vd.assertOptions(a,{silentJSONParsing:ca.transitional(ca.boolean),forcedJSONParsing:ca.transitional(ca.boolean),clarifyTimeoutError:ca.transitional(ca.boolean)},!1),i!=null&&(X.isFunction(i)?r.paramsSerializer={serialize:i}:vd.assertOptions(i,{encode:ca.function,serialize:ca.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=n&&X.merge(n.common,n[r.method]);n&&X.forEach(["delete","get","head","post","put","patch","common"],_=>{delete n[_]}),r.headers=Wr.concat(s,n);const o=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(u=u&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,d=0,p;if(!u){const _=[zv.bind(this),void 0];for(_.unshift.apply(_,o),_.push.apply(_,l),p=_.length,c=Promise.resolve(r);d<p;)c=c.then(_[d++],_[d++]);return c}p=o.length;let v=r;for(d=0;d<p;){const _=o[d++],h=o[d++];try{v=_(v)}catch(y){h.call(this,y);break}}try{c=zv.call(this,v)}catch(_){return Promise.reject(_)}for(d=0,p=l.length;d<p;)c=c.then(l[d++],l[d++]);return c}getUri(e){e=ki(this.defaults,e);const r=$v(e.baseURL,e.url);return ud(r,e.params,e.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(e){fl.prototype[e]=function(r,a){return this.request(ki(a||{},{method:e,url:r,data:(a||{}).data}))}}),X.forEach(["post","put","patch"],function(e){function r(a){return function(n,s,o){return this.request(ki(o||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}fl.prototype[e]=r(),fl.prototype[e+"Form"]=r(!0)});const hl=fl;class bd{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const a=this;this.promise.then(i=>{if(!a._listeners)return;let n=a._listeners.length;for(;n-- >0;)a._listeners[n](i);a._listeners=null}),this.promise.then=i=>{let n;const s=new Promise(o=>{a.subscribe(o),n=o}).then(i);return s.cancel=function(){a.unsubscribe(n)},s},e(function(n,s,o){a.reason||(a.reason=new Wn(n,s,o),r(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new bd(function(i){e=i}),cancel:e}}}const aB=bd;function iB(t){return function(r){return t.apply(null,r)}}function nB(t){return X.isObject(t)&&t.isAxiosError===!0}const yd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yd).forEach(([t,e])=>{yd[e]=t});const sB=yd;function Rv(t){const e=new hl(t),r=uv(hl.prototype.request,e);return X.extend(r,hl.prototype,e,{allOwnKeys:!0}),X.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return Rv(ki(t,i))},r}const tt=Rv(dd);tt.Axios=hl,tt.CanceledError=Wn,tt.CancelToken=aB,tt.isCancel=Mv,tt.VERSION=jv,tt.toFormData=cl,tt.AxiosError=Oe,tt.Cancel=tt.CanceledError,tt.all=function(e){return Promise.all(e)},tt.spread=iB,tt.isAxiosError=nB,tt.mergeConfig=ki,tt.AxiosHeaders=Wr,tt.formToJSON=t=>Ov(X.isHTMLForm(t)?new FormData(t):t),tt.getAdapter=Iv.getAdapter,tt.HttpStatusCode=sB,tt.default=tt;const Vn=tt,Un=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ml=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Fv}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},oB=typeof AbortSignal=="function",lB=typeof ml.AbortSignal=="function",Fv=oB?AbortSignal:lB?ml.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(a=>a!==r))}},Sd=new Set,xd=(t,e)=>{const r=`LRU_CACHE_OPTION_${t}`;gl(r)&&_d(r,`${t} option`,`options.${e}`,bl)},kd=(t,e)=>{const r=`LRU_CACHE_METHOD_${t}`;if(gl(r)){const{prototype:a}=bl,{get:i}=Object.getOwnPropertyDescriptor(a,t);_d(r,`${t} method`,`cache.${e}()`,i)}},uB=(t,e)=>{const r=`LRU_CACHE_PROPERTY_${t}`;if(gl(r)){const{prototype:a}=bl,{get:i}=Object.getOwnPropertyDescriptor(a,t);_d(r,`${t} property`,`cache.${e}`,i)}},qv=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},gl=t=>!Sd.has(t),_d=(t,e,r,a)=>{Sd.add(t);const i=`The ${e} is deprecated. Please use ${r} instead.`;qv(i,"DeprecationWarning",t,a)},da=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Bv=t=>da(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?vl:null:null;let vl=class extends Array{constructor(e){super(e),this.fill(0)}},cB=class{constructor(e){if(e===0)return[];const r=Bv(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},bl=class pf{constructor(e={}){const{max:r=0,ttl:a,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:p,maxSize:v=0,maxEntrySize:_=0,sizeCalculation:h,fetchMethod:y,fetchContext:S,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:k,ignoreFetchAbort:g}=e,{length:m,maxAge:w,stale:O}=e instanceof pf?{}:e;if(r!==0&&!da(r))throw new TypeError("max option must be a nonnegative integer");const C=r?Bv(r):Array;if(!C)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=v,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=h||m,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&S!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new C(r),this.prev=new C(r),this.head=0,this.tail=0,this.free=new cB(r),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof c=="function"?(this.disposeAfter=c,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!f,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!g,this.maxEntrySize!==0){if(this.maxSize!==0&&!da(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!da(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!O,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=da(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=a||w||0,this.ttl){if(!da(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const M="LRU_CACHE_UNBOUNDED";gl(M)&&(Sd.add(M),qv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,pf))}O&&xd("stale","allowStale"),w&&xd("maxAge","ttl"),m&&xd("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new vl(this.max),this.starts=new vl(this.max),this.setItemTTL=(a,i,n=Un.now())=>{if(this.starts[a]=i!==0?n:0,this.ttls[a]=i,i!==0&&this.ttlAutopurge){const s=setTimeout(()=>{this.isStale(a)&&this.delete(this.keyList[a])},i+1);s.unref&&s.unref()}},this.updateItemAge=a=>{this.starts[a]=this.ttls[a]!==0?Un.now():0},this.statusTTL=(a,i)=>{a&&(a.ttl=this.ttls[i],a.start=this.starts[i],a.now=e||r(),a.remainingTTL=a.now+a.ttl-a.start)};let e=0;const r=()=>{const a=Un.now();if(this.ttlResolution>0){e=a;const i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return a};this.getRemainingTTL=a=>{const i=this.keyMap.get(a);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=a=>this.ttls[a]!==0&&this.starts[a]!==0&&(e||r())-this.starts[a]>this.ttls[a]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,a){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new vl(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,a,i)=>{if(this.isBackgroundFetch(r))return 0;if(!da(a))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(a=i(r,e),!da(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.addItemSize=(e,r,a)=>{if(this.sizes[e]=r,this.maxSize){const i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],a&&(a.entrySize=r,a.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,a,i){if(a||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(const e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(const e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(const e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(const e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(const e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(const a of this.indexes()){const i=this.valList[a],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.keyList[a],this))return this.get(this.keyList[a],r)}}forEach(e,r=this){for(const a of this.indexes()){const i=this.valList[a],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.keyList[a],this)}}rforEach(e,r=this){for(const a of this.rindexes()){const i=this.valList[a],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.keyList[a],this)}}get prune(){return kd("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){const e=[];for(const r of this.indexes({allowStale:!0})){const a=this.keyList[r],i=this.valList[r],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(n===void 0)continue;const s={value:n};if(this.ttls){s.ttl=this.ttls[r];const o=Un.now()-this.starts[r];s.start=Math.floor(Date.now()-o)}this.sizes&&(s.size=this.sizes[r]),e.unshift([a,s])}return e}load(e){this.clear();for(const[r,a]of e){if(a.start){const i=Date.now()-a.start;a.start=Un.now()-i}this.set(r,a.value,a)}}dispose(e,r,a){}set(e,r,{ttl:a=this.ttl,start:i,noDisposeOnSet:n=this.noDisposeOnSet,size:s=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,status:l}={}){if(s=this.requireSize(e,r,s,o),this.maxEntrySize&&s>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let c=this.size===0?void 0:this.keyMap.get(e);if(c===void 0)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=r,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,s,l),l&&(l.set="add"),u=!1;else{this.moveToTail(c);const d=this.valList[c];if(r!==d){if(this.isBackgroundFetch(d)?d.__abortController.abort(new Error("replaced")):n||(this.dispose(d,e,"set"),this.disposeAfter&&this.disposed.push([d,e,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,s,l),l){l.set="replace";const p=d&&this.isBackgroundFetch(d)?d.__staleWhileFetching:d;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(a!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,a,i),this.statusTTL(l,c),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const r=this.head,a=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,a,"evict"),this.disposeAfter&&this.disposed.push([i,a,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(a),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:a}={}){const i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))a&&(a.has="stale",this.statusTTL(a,i));else return r&&this.updateItemAge(i),a&&(a.has="hit"),this.statusTTL(a,i),!0;else a&&(a.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){const a=this.keyMap.get(e);if(a!==void 0&&(r||!this.isStale(a))){const i=this.valList[a];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,a,i){const n=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(n))return n;const s=new ml;a.signal&&a.signal.addEventListener("abort",()=>s.abort(a.signal.reason));const o={signal:s.signal,options:a,context:i},u=(v,_=!1)=>{const{aborted:h}=s.signal,y=a.ignoreFetchAbort&&v!==void 0;return a.status&&(h&&!_?(a.status.fetchAborted=!0,a.status.fetchError=s.signal.reason,y&&(a.status.fetchAbortIgnored=!0)):a.status.fetchResolved=!0),h&&!y&&!_?c(s.signal.reason):(this.valList[r]===p&&(v===void 0?p.__staleWhileFetching?this.valList[r]=p.__staleWhileFetching:this.delete(e):(a.status&&(a.status.fetchUpdated=!0),this.set(e,v,o.options))),v)},l=v=>(a.status&&(a.status.fetchRejected=!0,a.status.fetchError=v),c(v)),c=v=>{const{aborted:_}=s.signal,h=_&&a.allowStaleOnFetchAbort,y=h||a.allowStaleOnFetchRejection,S=y||a.noDeleteOnFetchRejection;if(this.valList[r]===p&&(!S||p.__staleWhileFetching===void 0?this.delete(e):h||(this.valList[r]=p.__staleWhileFetching)),y)return a.status&&p.__staleWhileFetching!==void 0&&(a.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw v},d=(v,_)=>{this.fetchMethod(e,n,o).then(h=>v(h),_),s.signal.addEventListener("abort",()=>{(!a.ignoreFetchAbort||a.allowStaleOnFetchAbort)&&(v(),a.allowStaleOnFetchAbort&&(v=h=>u(h,!0)))})};a.status&&(a.status.fetchDispatched=!0);const p=new Promise(d).then(u,l);return p.__abortController=s,p.__staleWhileFetching=n,p.__returned=null,r===void 0?(this.set(e,p,{...o.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=p,p}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:v=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:h=!1,status:y,signal:S}={}){if(!this.fetchMethod)return y&&(y.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:i,status:y});const x={allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:i,ttl:n,noDisposeOnSet:s,size:o,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:v,ignoreFetchAbort:p,status:y,signal:S};let b=this.keyMap.get(e);if(b===void 0){y&&(y.fetch="miss");const f=this.backgroundFetch(e,b,x,_);return f.__returned=f}else{const f=this.valList[b];if(this.isBackgroundFetch(f)){const O=r&&f.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",O&&(y.returnedStale=!0)),O?f.__staleWhileFetching:f.__returned=f}const k=this.isStale(b);if(!h&&!k)return y&&(y.fetch="hit"),this.moveToTail(b),a&&this.updateItemAge(b),this.statusTTL(y,b),f;const g=this.backgroundFetch(e,b,x,_),m=g.__staleWhileFetching!==void 0,w=m&&r;return y&&(y.fetch=m&&k?"stale":"refresh",w&&k&&(y.returnedStale=!0)),w?g.__staleWhileFetching:g.__returned=g}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:n}={}){const s=this.keyMap.get(e);if(s!==void 0){const o=this.valList[s],u=this.isBackgroundFetch(o);return this.statusTTL(n,s),this.isStale(s)?(n&&(n.get="stale"),u?(n&&(n.returnedStale=r&&o.__staleWhileFetching!==void 0),r?o.__staleWhileFetching:void 0):(i||this.delete(e),n&&(n.returnedStale=r),r?o:void 0)):(n&&(n.get="hit"),u?o.__staleWhileFetching:(this.moveToTail(s),a&&this.updateItemAge(s),o))}else n&&(n.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return kd("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){const a=this.keyMap.get(e);if(a!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(a);const i=this.valList[a];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[a]=null,this.valList[a]=null,a===this.tail?this.tail=this.prev[a]:a===this.head?this.head=this.next[a]:(this.next[this.prev[a]]=this.next[a],this.prev[this.next[a]]=this.prev[a]),this.size--,this.free.push(a)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const e of this.rindexes({allowStale:!0})){const r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{const a=this.keyList[e];this.dispose(r,a,"delete"),this.disposeAfter&&this.disposed.push([r,a,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return kd("reset","clear"),this.clear}get length(){return uB("length","size"),this.size}static get AbortController(){return ml}static get AbortSignal(){return Fv}};const dB=bl;function pB(t,e,r,a){function i(n){return n instanceof r?n:new r(function(s){s(n)})}return new(r||(r=Promise))(function(n,s){function o(c){try{l(a.next(c))}catch(d){s(d)}}function u(c){try{l(a.throw(c))}catch(d){s(d)}}function l(c){c.done?n(c.value):i(c.value).then(o,u)}l((a=a.apply(t,e||[])).next())})}function fB(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(a)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(a=1,i&&(n=l[0]&2?i.return:l[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,l[1])).done)return n;switch(i=0,n&&(l=[l[0]&2,n.value]),l[0]){case 0:case 1:n=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]<n[3])){r.label=l[1];break}if(l[0]===6&&r.label<n[1]){r.label=n[1],n=l;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(l);break}n[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],i=0}finally{a=n=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;function hB(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ud.apply(void 0,t),a=r.split("?"),i=a[0],n=a[1];if(n){var s=n.split("&");return"".concat(i,"?").concat(s.sort().join("&"))}return r}function mB(t){return typeof t.get=="function"&&typeof t.set=="function"&&(typeof t.delete=="function"||typeof t.del=="function")}var gB=1e3*60*5,vB=100;function Wv(t,e){var r=this;e===void 0&&(e={});var a=e.enabledByDefault,i=a===void 0?!0:a,n=e.cacheFlag,s=n===void 0?"cache":n,o=e.defaultCache,u=o===void 0?new dB({ttl:gB,max:vB}):o;return function(l){var c=l.url,d=l.method,p=l.params,v=l.paramsSerializer,_=l.forceUpdate,h=l[s]!==void 0&&l[s]!==null?l[s]:i;if(d==="get"&&h){var y=mB(h)?h:u,S=hB(c,p,v),x=y.get(S);return!x||_?(x=function(){return pB(r,void 0,void 0,function(){var b;return fB(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,t(l)];case 1:return[2,f.sent()];case 2:throw b=f.sent(),"delete"in y?y.delete(S):y.del(S),b;case 3:return[2]}})})}(),y.set(S,x),x):({}.LOGGER_LEVEL==="info"&&console.info("[axios-extensions] request cached by cache adapter --> url: ".concat(S)),x)}return t(l)}}const _i=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Vv=new Set,wd=typeof process=="object"&&process?process:{},Uv=(t,e,r,a)=>{typeof wd.emitWarning=="function"?wd.emitWarning(t,e,r,a):console.error(`[${r}] ${e}: ${t}`)};let yl=globalThis.AbortController,Gv=globalThis.AbortSignal;if(typeof yl>"u"){Gv=class{constructor(){se(this,"onabort");se(this,"_onabort",[]);se(this,"reason");se(this,"aborted",!1)}addEventListener(a,i){this._onabort.push(i)}},yl=class{constructor(){se(this,"signal",new Gv);e()}abort(a){var i,n;if(!this.signal.aborted){this.signal.reason=a,this.signal.aborted=!0;for(const s of this.signal._onabort)s(a);(n=(i=this.signal).onabort)==null||n.call(i,a)}}};let t=((uk=wd.env)==null?void 0:uk.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Uv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const bB=t=>!Vv.has(t),pa=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Hv=t=>pa(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Sl:null:null;class Sl extends Array{constructor(e){super(e),this.fill(0)}}const Ka=class Ka{constructor(e,r){se(this,"heap");se(this,"length");if(!V(Ka,Qi))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=Hv(e);if(!r)return[];ge(Ka,Qi,!0);const a=new Ka(e,r);return ge(Ka,Qi,!1),a}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Qi=new WeakMap,we(Ka,Qi,!1);let Cd=Ka;const of=class of{constructor(e){we(this,Os);we(this,Su);we(this,Pr);we(this,Dr);we(this,$s);we(this,Zi);we(this,Xi);we(this,ze);we(this,Ps);we(this,Xa);we(this,pr,void 0);we(this,Ft,void 0);we(this,fr,void 0);we(this,hr,void 0);we(this,Ki,void 0);se(this,"ttl");se(this,"ttlResolution");se(this,"ttlAutopurge");se(this,"updateAgeOnGet");se(this,"updateAgeOnHas");se(this,"allowStale");se(this,"noDisposeOnSet");se(this,"noUpdateTTL");se(this,"maxEntrySize");se(this,"sizeCalculation");se(this,"noDeleteOnFetchRejection");se(this,"noDeleteOnStaleGet");se(this,"allowStaleOnFetchAbort");se(this,"allowStaleOnFetchRejection");se(this,"ignoreFetchAbort");we(this,nt,void 0);we(this,mr,void 0);we(this,at,void 0);we(this,Be,void 0);we(this,ke,void 0);we(this,xt,void 0);we(this,qt,void 0);we(this,gt,void 0);we(this,st,void 0);we(this,gr,void 0);we(this,ot,void 0);we(this,vr,void 0);we(this,br,void 0);we(this,Bt,void 0);we(this,yr,void 0);we(this,Sa,void 0);we(this,kt,void 0);we(this,Ja,()=>{});we(this,ra,()=>{});we(this,Es,()=>{});we(this,Wt,()=>!1);we(this,Za,e=>{});we(this,Ji,(e,r,a)=>{});we(this,Ms,(e,r,a,i)=>{if(a||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:a,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:p,maxSize:v=0,maxEntrySize:_=0,sizeCalculation:h,fetchMethod:y,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:f,ignoreFetchAbort:k}=e;if(r!==0&&!pa(r))throw new TypeError("max option must be a nonnegative integer");const g=r?Hv(r):Array;if(!g)throw new Error("invalid max value: "+r);if(ge(this,pr,r),ge(this,Ft,v),this.maxEntrySize=_||V(this,Ft),this.sizeCalculation=h,this.sizeCalculation){if(!V(this,Ft)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(ge(this,Ki,y),ge(this,Sa,!!y),ge(this,at,new Map),ge(this,Be,new Array(r).fill(void 0)),ge(this,ke,new Array(r).fill(void 0)),ge(this,xt,new g(r)),ge(this,qt,new g(r)),ge(this,gt,0),ge(this,st,0),ge(this,gr,Cd.create(r)),ge(this,nt,0),ge(this,mr,0),typeof l=="function"&&ge(this,fr,l),typeof c=="function"?(ge(this,hr,c),ge(this,ot,[])):(ge(this,hr,void 0),ge(this,ot,void 0)),ge(this,yr,!!V(this,fr)),ge(this,kt,!!V(this,hr)),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!f,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(V(this,Ft)!==0&&!pa(V(this,Ft)))throw new TypeError("maxSize must be a positive integer if specified");if(!pa(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");fe(this,Su,pk).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=pa(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=a||0,this.ttl){if(!pa(this.ttl))throw new TypeError("ttl must be a positive integer if specified");fe(this,Os,ff).call(this)}if(V(this,pr)===0&&this.ttl===0&&V(this,Ft)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!V(this,pr)&&!V(this,Ft)){const m="LRU_CACHE_UNBOUNDED";bB(m)&&(Vv.add(m),Uv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",m,of))}}static unsafeExposeInternals(e){return{starts:V(e,br),ttls:V(e,Bt),sizes:V(e,vr),keyMap:V(e,at),keyList:V(e,Be),valList:V(e,ke),next:V(e,xt),prev:V(e,qt),get head(){return V(e,gt)},get tail(){return V(e,st)},free:V(e,gr),isBackgroundFetch:r=>{var a;return fe(a=e,ze,We).call(a,r)},backgroundFetch:(r,a,i,n)=>{var s;return fe(s=e,Xi,Cu).call(s,r,a,i,n)},moveToTail:r=>{var a;return fe(a=e,Xa,Is).call(a,r)},indexes:r=>{var a;return fe(a=e,Pr,xa).call(a,r)},rindexes:r=>{var a;return fe(a=e,Dr,ka).call(a,r)},isStale:r=>{var a;return V(a=e,Wt).call(a,r)}}}get max(){return V(this,pr)}get maxSize(){return V(this,Ft)}get calculatedSize(){return V(this,mr)}get size(){return V(this,nt)}get fetchMethod(){return V(this,Ki)}get dispose(){return V(this,fr)}get disposeAfter(){return V(this,hr)}getRemainingTTL(e){return V(this,at).has(e)?1/0:0}*entries(){for(const e of fe(this,Pr,xa).call(this))V(this,ke)[e]!==void 0&&V(this,Be)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield[V(this,Be)[e],V(this,ke)[e]])}*rentries(){for(const e of fe(this,Dr,ka).call(this))V(this,ke)[e]!==void 0&&V(this,Be)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield[V(this,Be)[e],V(this,ke)[e]])}*keys(){for(const e of fe(this,Pr,xa).call(this)){const r=V(this,Be)[e];r!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield r)}}*rkeys(){for(const e of fe(this,Dr,ka).call(this)){const r=V(this,Be)[e];r!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield r)}}*values(){for(const e of fe(this,Pr,xa).call(this))V(this,ke)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield V(this,ke)[e])}*rvalues(){for(const e of fe(this,Dr,ka).call(this))V(this,ke)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield V(this,ke)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const a of fe(this,Pr,xa).call(this)){const i=V(this,ke)[a],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,V(this,Be)[a],this))return this.get(V(this,Be)[a],r)}}forEach(e,r=this){for(const a of fe(this,Pr,xa).call(this)){const i=V(this,ke)[a],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,V(this,Be)[a],this)}}rforEach(e,r=this){for(const a of fe(this,Dr,ka).call(this)){const i=V(this,ke)[a],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,V(this,Be)[a],this)}}purgeStale(){let e=!1;for(const r of fe(this,Dr,ka).call(this,{allowStale:!0}))V(this,Wt).call(this,r)&&(this.delete(V(this,Be)[r]),e=!0);return e}info(e){const r=V(this,at).get(e);if(r===void 0)return;const a=V(this,ke)[r],i=fe(this,ze,We).call(this,a)?a.__staleWhileFetching:a;if(i===void 0)return;const n={value:i};if(V(this,Bt)&&V(this,br)){const s=V(this,Bt)[r],o=V(this,br)[r];if(s&&o){const u=s-(_i.now()-o);n.ttl=u,n.start=Date.now()}}return V(this,vr)&&(n.size=V(this,vr)[r]),n}dump(){const e=[];for(const r of fe(this,Pr,xa).call(this,{allowStale:!0})){const a=V(this,Be)[r],i=V(this,ke)[r],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;if(n===void 0||a===void 0)continue;const s={value:n};if(V(this,Bt)&&V(this,br)){s.ttl=V(this,Bt)[r];const o=_i.now()-V(this,br)[r];s.start=Math.floor(Date.now()-o)}V(this,vr)&&(s.size=V(this,vr)[r]),e.unshift([a,s])}return e}load(e){this.clear();for(const[r,a]of e){if(a.start){const i=Date.now()-a.start;a.start=_i.now()-i}this.set(r,a.value,a)}}set(e,r,a={}){var p,v,_,h,y;if(r===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:n,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:u}=a;let{noUpdateTTL:l=this.noUpdateTTL}=a;const c=V(this,Ms).call(this,e,r,a.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=V(this,nt)===0?void 0:V(this,at).get(e);if(d===void 0)d=V(this,nt)===0?V(this,st):V(this,gr).length!==0?V(this,gr).pop():V(this,nt)===V(this,pr)?fe(this,Zi,wu).call(this,!1):V(this,nt),V(this,Be)[d]=e,V(this,ke)[d]=r,V(this,at).set(e,d),V(this,xt)[V(this,st)]=d,V(this,qt)[d]=V(this,st),ge(this,st,d),_u(this,nt)._++,V(this,Ji).call(this,d,c,u),u&&(u.set="add"),l=!1;else{fe(this,Xa,Is).call(this,d);const S=V(this,ke)[d];if(r!==S){if(V(this,Sa)&&fe(this,ze,We).call(this,S)){S.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:x}=S;x!==void 0&&!s&&(V(this,yr)&&((p=V(this,fr))==null||p.call(this,x,e,"set")),V(this,kt)&&((v=V(this,ot))==null||v.push([x,e,"set"])))}else s||(V(this,yr)&&((_=V(this,fr))==null||_.call(this,S,e,"set")),V(this,kt)&&((h=V(this,ot))==null||h.push([S,e,"set"])));if(V(this,Za).call(this,d),V(this,Ji).call(this,d,c,u),V(this,ke)[d]=r,u){u.set="replace";const x=S&&fe(this,ze,We).call(this,S)?S.__staleWhileFetching:S;x!==void 0&&(u.oldValue=x)}}else u&&(u.set="update")}if(i!==0&&!V(this,Bt)&&fe(this,Os,ff).call(this),V(this,Bt)&&(l||V(this,Es).call(this,d,i,n),u&&V(this,ra).call(this,u,d)),!s&&V(this,kt)&&V(this,ot)){const S=V(this,ot);let x;for(;x=S==null?void 0:S.shift();)(y=V(this,hr))==null||y.call(this,...x)}return this}pop(){var e;try{for(;V(this,nt);){const r=V(this,ke)[V(this,gt)];if(fe(this,Zi,wu).call(this,!0),fe(this,ze,We).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(V(this,kt)&&V(this,ot)){const r=V(this,ot);let a;for(;a=r==null?void 0:r.shift();)(e=V(this,hr))==null||e.call(this,...a)}}}has(e,r={}){const{updateAgeOnHas:a=this.updateAgeOnHas,status:i}=r,n=V(this,at).get(e);if(n!==void 0){const s=V(this,ke)[n];if(fe(this,ze,We).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(V(this,Wt).call(this,n))i&&(i.has="stale",V(this,ra).call(this,i,n));else return a&&V(this,Ja).call(this,n),i&&(i.has="hit",V(this,ra).call(this,i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){const{allowStale:a=this.allowStale}=r,i=V(this,at).get(e);if(i===void 0||!a&&V(this,Wt).call(this,i))return;const n=V(this,ke)[i];return fe(this,ze,We).call(this,n)?n.__staleWhileFetching:n}async fetch(e,r={}){const{allowStale:a=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:h,forceRefresh:y=!1,status:S,signal:x}=r;if(!V(this,Sa))return S&&(S.fetch="get"),this.get(e,{allowStale:a,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:S});const b={allowStale:a,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:s,noDisposeOnSet:o,size:u,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:v,status:S,signal:x};let f=V(this,at).get(e);if(f===void 0){S&&(S.fetch="miss");const k=fe(this,Xi,Cu).call(this,e,f,b,h);return k.__returned=k}else{const k=V(this,ke)[f];if(fe(this,ze,We).call(this,k)){const C=a&&k.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",C&&(S.returnedStale=!0)),C?k.__staleWhileFetching:k.__returned=k}const g=V(this,Wt).call(this,f);if(!y&&!g)return S&&(S.fetch="hit"),fe(this,Xa,Is).call(this,f),i&&V(this,Ja).call(this,f),S&&V(this,ra).call(this,S,f),k;const m=fe(this,Xi,Cu).call(this,e,f,b,h),O=m.__staleWhileFetching!==void 0&&a;return S&&(S.fetch=g?"stale":"refresh",O&&g&&(S.returnedStale=!0)),O?m.__staleWhileFetching:m.__returned=m}}get(e,r={}){const{allowStale:a=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:s}=r,o=V(this,at).get(e);if(o!==void 0){const u=V(this,ke)[o],l=fe(this,ze,We).call(this,u);return s&&V(this,ra).call(this,s,o),V(this,Wt).call(this,o)?(s&&(s.get="stale"),l?(s&&a&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),a?u.__staleWhileFetching:void 0):(n||this.delete(e),s&&a&&(s.returnedStale=!0),a?u:void 0)):(s&&(s.get="hit"),l?u.__staleWhileFetching:(fe(this,Xa,Is).call(this,o),i&&V(this,Ja).call(this,o),u))}else s&&(s.get="miss")}delete(e){var a,i,n,s;let r=!1;if(V(this,nt)!==0){const o=V(this,at).get(e);if(o!==void 0)if(r=!0,V(this,nt)===1)this.clear();else{V(this,Za).call(this,o);const u=V(this,ke)[o];if(fe(this,ze,We).call(this,u)?u.__abortController.abort(new Error("deleted")):(V(this,yr)||V(this,kt))&&(V(this,yr)&&((a=V(this,fr))==null||a.call(this,u,e,"delete")),V(this,kt)&&((i=V(this,ot))==null||i.push([u,e,"delete"]))),V(this,at).delete(e),V(this,Be)[o]=void 0,V(this,ke)[o]=void 0,o===V(this,st))ge(this,st,V(this,qt)[o]);else if(o===V(this,gt))ge(this,gt,V(this,xt)[o]);else{const l=V(this,qt)[o];V(this,xt)[l]=V(this,xt)[o];const c=V(this,xt)[o];V(this,qt)[c]=V(this,qt)[o]}_u(this,nt)._--,V(this,gr).push(o)}}if(V(this,kt)&&((n=V(this,ot))!=null&&n.length)){const o=V(this,ot);let u;for(;u=o==null?void 0:o.shift();)(s=V(this,hr))==null||s.call(this,...u)}return r}clear(){var e,r,a;for(const i of fe(this,Dr,ka).call(this,{allowStale:!0})){const n=V(this,ke)[i];if(fe(this,ze,We).call(this,n))n.__abortController.abort(new Error("deleted"));else{const s=V(this,Be)[i];V(this,yr)&&((e=V(this,fr))==null||e.call(this,n,s,"delete")),V(this,kt)&&((r=V(this,ot))==null||r.push([n,s,"delete"]))}}if(V(this,at).clear(),V(this,ke).fill(void 0),V(this,Be).fill(void 0),V(this,Bt)&&V(this,br)&&(V(this,Bt).fill(0),V(this,br).fill(0)),V(this,vr)&&V(this,vr).fill(0),ge(this,gt,0),ge(this,st,0),V(this,gr).length=0,ge(this,mr,0),ge(this,nt,0),V(this,kt)&&V(this,ot)){const i=V(this,ot);let n;for(;n=i==null?void 0:i.shift();)(a=V(this,hr))==null||a.call(this,...n)}}};pr=new WeakMap,Ft=new WeakMap,fr=new WeakMap,hr=new WeakMap,Ki=new WeakMap,nt=new WeakMap,mr=new WeakMap,at=new WeakMap,Be=new WeakMap,ke=new WeakMap,xt=new WeakMap,qt=new WeakMap,gt=new WeakMap,st=new WeakMap,gr=new WeakMap,ot=new WeakMap,vr=new WeakMap,br=new WeakMap,Bt=new WeakMap,yr=new WeakMap,Sa=new WeakMap,kt=new WeakMap,Os=new WeakSet,ff=function(){const e=new Sl(V(this,pr)),r=new Sl(V(this,pr));ge(this,Bt,e),ge(this,br,r),ge(this,Es,(n,s,o=_i.now())=>{if(r[n]=s!==0?o:0,e[n]=s,s!==0&&this.ttlAutopurge){const u=setTimeout(()=>{V(this,Wt).call(this,n)&&this.delete(V(this,Be)[n])},s+1);u.unref&&u.unref()}}),ge(this,Ja,n=>{r[n]=e[n]!==0?_i.now():0}),ge(this,ra,(n,s)=>{if(e[s]){const o=e[s],u=r[s];if(!o||!u)return;n.ttl=o,n.start=u,n.now=a||i();const l=n.now-u;n.remainingTTL=o-l}});let a=0;const i=()=>{const n=_i.now();if(this.ttlResolution>0){a=n;const s=setTimeout(()=>a=0,this.ttlResolution);s.unref&&s.unref()}return n};this.getRemainingTTL=n=>{const s=V(this,at).get(n);if(s===void 0)return 0;const o=e[s],u=r[s];if(!o||!u)return 1/0;const l=(a||i())-u;return o-l},ge(this,Wt,n=>{const s=r[n],o=e[n];return!!o&&!!s&&(a||i())-s>o})},Ja=new WeakMap,ra=new WeakMap,Es=new WeakMap,Wt=new WeakMap,Su=new WeakSet,pk=function(){const e=new Sl(V(this,pr));ge(this,mr,0),ge(this,vr,e),ge(this,Za,r=>{ge(this,mr,V(this,mr)-e[r]),e[r]=0}),ge(this,Ms,(r,a,i,n)=>{if(fe(this,ze,We).call(this,a))return 0;if(!pa(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(a,r),!pa(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ge(this,Ji,(r,a,i)=>{if(e[r]=a,V(this,Ft)){const n=V(this,Ft)-e[r];for(;V(this,mr)>n;)fe(this,Zi,wu).call(this,!0)}ge(this,mr,V(this,mr)+e[r]),i&&(i.entrySize=a,i.totalCalculatedSize=V(this,mr))})},Za=new WeakMap,Ji=new WeakMap,Ms=new WeakMap,Pr=new WeakSet,xa=function*({allowStale:e=this.allowStale}={}){if(V(this,nt))for(let r=V(this,st);!(!fe(this,$s,hf).call(this,r)||((e||!V(this,Wt).call(this,r))&&(yield r),r===V(this,gt)));)r=V(this,qt)[r]},Dr=new WeakSet,ka=function*({allowStale:e=this.allowStale}={}){if(V(this,nt))for(let r=V(this,gt);!(!fe(this,$s,hf).call(this,r)||((e||!V(this,Wt).call(this,r))&&(yield r),r===V(this,st)));)r=V(this,xt)[r]},$s=new WeakSet,hf=function(e){return e!==void 0&&V(this,at).get(V(this,Be)[e])===e},Zi=new WeakSet,wu=function(e){var n,s;const r=V(this,gt),a=V(this,Be)[r],i=V(this,ke)[r];return V(this,Sa)&&fe(this,ze,We).call(this,i)?i.__abortController.abort(new Error("evicted")):(V(this,yr)||V(this,kt))&&(V(this,yr)&&((n=V(this,fr))==null||n.call(this,i,a,"evict")),V(this,kt)&&((s=V(this,ot))==null||s.push([i,a,"evict"]))),V(this,Za).call(this,r),e&&(V(this,Be)[r]=void 0,V(this,ke)[r]=void 0,V(this,gr).push(r)),V(this,nt)===1?(ge(this,gt,ge(this,st,0)),V(this,gr).length=0):ge(this,gt,V(this,xt)[r]),V(this,at).delete(a),_u(this,nt)._--,r},Xi=new WeakSet,Cu=function(e,r,a,i){const n=r===void 0?void 0:V(this,ke)[r];if(fe(this,ze,We).call(this,n))return n;const s=new yl,{signal:o}=a;o==null||o.addEventListener("abort",()=>s.abort(o.reason),{signal:s.signal});const u={signal:s.signal,options:a,context:i},l=(h,y=!1)=>{const{aborted:S}=s.signal,x=a.ignoreFetchAbort&&h!==void 0;if(a.status&&(S&&!y?(a.status.fetchAborted=!0,a.status.fetchError=s.signal.reason,x&&(a.status.fetchAbortIgnored=!0)):a.status.fetchResolved=!0),S&&!x&&!y)return d(s.signal.reason);const b=v;return V(this,ke)[r]===v&&(h===void 0?b.__staleWhileFetching?V(this,ke)[r]=b.__staleWhileFetching:this.delete(e):(a.status&&(a.status.fetchUpdated=!0),this.set(e,h,u.options))),h},c=h=>(a.status&&(a.status.fetchRejected=!0,a.status.fetchError=h),d(h)),d=h=>{const{aborted:y}=s.signal,S=y&&a.allowStaleOnFetchAbort,x=S||a.allowStaleOnFetchRejection,b=x||a.noDeleteOnFetchRejection,f=v;if(V(this,ke)[r]===v&&(!b||f.__staleWhileFetching===void 0?this.delete(e):S||(V(this,ke)[r]=f.__staleWhileFetching)),x)return a.status&&f.__staleWhileFetching!==void 0&&(a.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw h},p=(h,y)=>{var x;const S=(x=V(this,Ki))==null?void 0:x.call(this,e,n,u);S&&S instanceof Promise&&S.then(b=>h(b===void 0?void 0:b),y),s.signal.addEventListener("abort",()=>{(!a.ignoreFetchAbort||a.allowStaleOnFetchAbort)&&(h(void 0),a.allowStaleOnFetchAbort&&(h=b=>l(b,!0)))})};a.status&&(a.status.fetchDispatched=!0);const v=new Promise(p).then(l,c),_=Object.assign(v,{__abortController:s,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,_,{...u.options,status:void 0}),r=V(this,at).get(e)):V(this,ke)[r]=_,_},ze=new WeakSet,We=function(e){if(!V(this,Sa))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof yl},Ps=new WeakSet,mf=function(e,r){V(this,qt)[r]=e,V(this,xt)[e]=r},Xa=new WeakSet,Is=function(e){e!==V(this,st)&&(e===V(this,gt)?ge(this,gt,V(this,xt)[e]):fe(this,Ps,mf).call(this,V(this,qt)[e],V(this,xt)[e]),fe(this,Ps,mf).call(this,V(this,st),e),ge(this,st,e))};let xl=of;function ur(t){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(t)}function yB(t,e){if(ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e||"default");if(ur(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yv(t){var e=yB(t,"string");return ur(e)=="symbol"?e:String(e)}function SB(t,e,r){return e=Yv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&a.push.apply(a,Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),a.forEach(function(i){SB(t,i,r[i])})}return t}function Vr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qv(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Yv(a.key),a)}}function Ur(t,e,r){return e&&Qv(t.prototype,e),r&&Qv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gn(t,e){if(e&&(ur(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nt(t)}function wi(t){return wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wi(t)}function Td(t,e){return Td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,i){return a.__proto__=i,a},Td(t,e)}function kl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Td(t,e)}function Ad(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function xB(t){if(Array.isArray(t))return Ad(t)}function kB(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Kv(t,e){if(t){if(typeof t=="string")return Ad(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ad(t,e)}}function _B(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
267
267
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wB(t){return xB(t)||kB(t)||Kv(t)||_B()}var CB={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,r){var a;console&&console[e]&&(a=console)[e].apply(a,wB(r))}},TB=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vr(this,t),this.init(e,r)}return Ur(t,[{key:"init",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=r||CB,this.options=a,this.debug=a.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,a,i,n){return n&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(i).concat(this.prefix," ").concat(r[0])),this.logger[a](r))}},{key:"create",value:function(r){return new t(this.logger,jt({},{prefix:"".concat(this.prefix,":").concat(r,":")},this.options))}}]),t}();const Gr=new TB;var fa=function(){function t(){Vr(this,t),this.observers={}}return Ur(t,[{key:"on",value:function(r,a){var i=this;return r.split(" ").forEach(function(n){i.observers[n]=i.observers[n]||[],i.observers[n].push(a)}),this}},{key:"off",value:function(r,a){var i=this;this.observers[r]&&this.observers[r].forEach(function(){if(!a)delete i.observers[r];else{var n=i.observers[r].indexOf(a);n>-1&&i.observers[r].splice(n,1)}})}},{key:"emit",value:function(r){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];if(this.observers[r]){var s=[].concat(this.observers[r]);s.forEach(function(u){u.apply(void 0,i)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(u){u.apply(u,[r].concat(i))})}}}]),t}();function Hn(){var t,e,r=new Promise(function(a,i){t=a,e=i});return r.resolve=t,r.reject=e,r}function Jv(t){return t==null?"":""+t}function AB(t,e,r){t.forEach(function(a){e[a]&&(r[a]=e[a])})}function Od(t,e,r){function a(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!t||typeof t=="string"}for(var n=typeof e!="string"?[].concat(e):e.split(".");n.length>1;){if(i())return{};var s=a(n.shift());!t[s]&&r&&(t[s]=new r),t=t[s]}return i()?{}:{obj:t,k:a(n.shift())}}function Zv(t,e,r){var a=Od(t,e,Object),i=a.obj,n=a.k;i[n]=r}function OB(t,e,r,a){var i=Od(t,e,Object),n=i.obj,s=i.k;n[s]=n[s]||[],a&&(n[s]=n[s].concat(r)),a||n[s].push(r)}function _l(t,e){var r=Od(t,e),a=r.obj,i=r.k;if(a)return a[i]}function Xv(t,e,r){for(var a in e)a in t?typeof t[a]=="string"||t[a]instanceof String||typeof e[a]=="string"||e[a]instanceof String?r&&(t[a]=e[a]):Xv(t[a],e[a],r):t[a]=e[a];return t}function Ci(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var EB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function MB(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return EB[e]}):t}var $B=function(t){kl(e,t);function e(r){var a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Vr(this,e),a=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(a))),a.data=r||{},a.options=i,a.options.keySeparator===void 0&&(a.options.keySeparator="."),a}return Ur(e,[{key:"addNamespaces",value:function(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}},{key:"removeNamespaces",value:function(a){var i=this.options.ns.indexOf(a);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(a,i,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=[a,i];return n&&typeof n!="string"&&(u=u.concat(n)),n&&typeof n=="string"&&(u=u.concat(o?n.split(o):n)),a.indexOf(".")>-1&&(u=a.split(".")),_l(this.data,u)}},{key:"addResource",value:function(a,i,n,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var l=[a,i];n&&(l=l.concat(u?n.split(u):n)),a.indexOf(".")>-1&&(l=a.split("."),s=i,i=l[1]),this.addNamespaces(i),Zv(this.data,l,s),o.silent||this.emit("added",a,i,n,s)}},{key:"addResources",value:function(a,i,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var o in n)(typeof n[o]=="string"||Object.prototype.toString.apply(n[o])==="[object Array]")&&this.addResource(a,i,o,n[o],{silent:!0});s.silent||this.emit("added",a,i,n)}},{key:"addResourceBundle",value:function(a,i,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[a,i];a.indexOf(".")>-1&&(l=a.split("."),s=n,n=i,i=l[1]),this.addNamespaces(i);var c=_l(this.data,l)||{};s?Xv(c,n,o):c=jt({},c,n),Zv(this.data,l,c),u.silent||this.emit("added",a,i,n)}},{key:"removeResourceBundle",value:function(a,i){this.hasResourceBundle(a,i)&&delete this.data[a][i],this.removeNamespaces(i),this.emit("removed",a,i)}},{key:"hasResourceBundle",value:function(a,i){return this.getResource(a,i)!==void 0}},{key:"getResourceBundle",value:function(a,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?jt({},{},this.getResource(a,i)):this.getResource(a,i)}},{key:"getDataByLanguage",value:function(a){return this.data[a]}},{key:"toJSON",value:function(){return this.data}}]),e}(fa);const eb={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,a,i,n){var s=this;return e.forEach(function(o){s.processors[o]&&(r=s.processors[o].process(r,a,i,n))}),r}};var tb=function(t){kl(e,t);function e(r){var a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Vr(this,e),a=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(a))),AB(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],r,Nt(Nt(a))),a.options=i,a.options.keySeparator===void 0&&(a.options.keySeparator="."),a.logger=Gr.create("translator"),a}return Ur(e,[{key:"changeLanguage",value:function(a){a&&(this.language=a)}},{key:"exists",value:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},n=this.resolve(a,i);return n&&n.res!==void 0}},{key:"extractFromKey",value:function(a,i){var n=i.nsSeparator||this.options.nsSeparator;n===void 0&&(n=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ns||this.options.defaultNS;if(n&&a.indexOf(n)>-1){var u=a.split(n);(n!==s||n===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),a=u.join(s)}return typeof o=="string"&&(o=[o]),{key:a,namespaces:o}}},{key:"translate",value:function(a,i){var n=this;if(ur(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=this.extractFromKey(a[a.length-1],i),u=o.key,l=o.namespaces,c=l[l.length-1],d=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(p){var v=i.nsSeparator||this.options.nsSeparator;return c+v+u}return u}var _=this.resolve(a,i),h=_&&_.res,y=_&&_.usedKey||u,S=_&&_.exactUsedKey||u,x=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],f=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,g=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(k&&h&&g&&b.indexOf(x)<0&&!(typeof f=="string"&&x==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,i):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(s){var m=x==="[object Array]",w=m?[]:{},O=m?S:y;for(var C in h)if(Object.prototype.hasOwnProperty.call(h,C)){var M="".concat(O).concat(s).concat(C);w[C]=this.translate(M,jt({},i,{joinArrays:!1,ns:l})),w[C]===M&&(w[C]=h[C])}h=w}}else if(k&&typeof f=="string"&&x==="[object Array]")h=h.join(f),h&&(h=this.extendTranslation(h,a,i));else{var T=!1,E=!1;if(!this.isValidLookup(h)&&i.defaultValue!==void 0){if(T=!0,i.count!==void 0){var z=this.pluralResolver.getSuffix(d,i.count);h=i["defaultValue".concat(z)]}h||(h=i.defaultValue)}this.isValidLookup(h)||(E=!0,h=u);var F=i.defaultValue&&i.defaultValue!==h&&this.options.updateMissing;if(E||T||F){this.logger.log(F?"updateKey":"missingKey",d,c,u,F?i.defaultValue:h);var N=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(var q=0;q<U.length;q++)N.push(U[q]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(i.lng||this.language):N.push(i.lng||this.language);var P=function(L,W){n.options.missingKeyHandler?n.options.missingKeyHandler(L,c,W,F?i.defaultValue:h,F,i):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(L,c,W,F?i.defaultValue:h,F,i),n.emit("missingKey",L,c,W,h)};if(this.options.saveMissing){var D=i.count!==void 0&&typeof i.count!="string";this.options.saveMissingPlurals&&D?N.forEach(function(I){var L=n.pluralResolver.getPluralFormsOfKey(I,u);L.forEach(function(W){return P([I],W)})}):P(N,u)}}h=this.extendTranslation(h,a,i,_),E&&h===u&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(u)),E&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(a,i,n,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)a=this.i18nFormat.parse(a,n,s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(jt({},n,{interpolation:jt({},this.options.interpolation,n.interpolation)}));var u=n.replace&&typeof n.replace!="string"?n.replace:n;this.options.interpolation.defaultVariables&&(u=jt({},this.options.interpolation.defaultVariables,u)),a=this.interpolator.interpolate(a,u,n.lng||this.language,n),n.nest!==!1&&(a=this.interpolator.nest(a,function(){return o.translate.apply(o,arguments)},n)),n.interpolation&&this.interpolator.reset()}var l=n.postProcess||this.options.postProcess,c=typeof l=="string"?[l]:l;return a!=null&&c&&c.length&&n.applyPostProcessor!==!1&&(a=eb.handle(c,a,i,n,this)),a}},{key:"resolve",value:function(a){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,o,u,l,c;return typeof a=="string"&&(a=[a]),a.forEach(function(d){if(!i.isValidLookup(s)){var p=i.extractFromKey(d,n),v=p.key;o=v;var _=p.namespaces;i.options.fallbackNS&&(_=_.concat(i.options.fallbackNS));var h=n.count!==void 0&&typeof n.count!="string",y=n.context!==void 0&&typeof n.context=="string"&&n.context!=="",S=n.lngs?n.lngs:i.languageUtils.toResolveHierarchy(n.lng||i.language,n.fallbackLng);_.forEach(function(x){i.isValidLookup(s)||(c=x,S.forEach(function(b){if(!i.isValidLookup(s)){l=b;var f=v,k=[f];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(k,v,b,x,n);else{var g;h&&(g=i.pluralResolver.getSuffix(b,n.count)),h&&y&&k.push(f+g),y&&k.push(f+="".concat(i.options.contextSeparator).concat(n.context)),h&&k.push(f+=g)}for(var m;m=k.pop();)i.isValidLookup(s)||(u=m,s=i.getResource(b,x,m,n))}}))})}}),{res:s,usedKey:o,exactUsedKey:u,usedLng:l,usedNS:c}}},{key:"isValidLookup",value:function(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}},{key:"getResource",value:function(a,i,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(a,i,n,s):this.resourceStore.getResource(a,i,n,s)}}]),e}(fa);function Ed(t){return t.charAt(0).toUpperCase()+t.slice(1)}var PB=function(){function t(e){Vr(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=Gr.create("languageUtils")}return Ur(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var a=r.split("-");return a.length===2?null:(a.pop(),this.formatLanguageCode(a.join("-")))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var a=r.split("-");return this.formatLanguageCode(a[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var a=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(n){return n.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),a.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ed(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),a.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ed(i[1].toLowerCase())),a.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ed(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isWhitelisted",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitWhitelist)&&(r=this.getLanguagePartFromCode(r)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(r)>-1}},{key:"getFallbackCodes",value:function(r,a){if(!r)return[];if(typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!a)return r.default||[];var i=r[a];return i||(i=r[this.getScriptPartFromCode(a)]),i||(i=r[this.formatLanguageCode(a)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,a){var i=this,n=this.getFallbackCodes(a||this.options.fallbackLng||[],r),s=[],o=function(l){l&&(i.isWhitelisted(l)?s.push(l):i.logger.warn("rejecting non-whitelisted language code: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(r))):typeof r=="string"&&o(this.formatLanguageCode(r)),n.forEach(function(u){s.indexOf(u)<0&&o(i.formatLanguageCode(u))}),s}}]),t}(),DB=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],IB={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e===0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e===0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e===0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e===1?0:e===2?1:(e<0||e>10)&&e%10==0?2:3}};function zB(){var t={};return DB.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:IB[e.fc]}})}),t}var LB=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vr(this,t),this.languageUtils=e,this.options=r,this.logger=Gr.create("pluralResolver"),this.rules=zB()}return Ur(t,[{key:"addRule",value:function(r,a){this.rules[r]=a}},{key:"getRule",value:function(r){return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var a=this.getRule(r);return a&&a.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,a){var i=this,n=[],s=this.getRule(r);return s&&s.numbers.forEach(function(o){var u=i.getSuffix(r,o);n.push("".concat(a).concat(u))}),n}},{key:"getSuffix",value:function(r,a){var i=this,n=this.getRule(r);if(n){var s=n.noAbs?n.plurals(a):n.plurals(Math.abs(a)),o=n.numbers[s];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var u=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?u():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}return this.logger.warn("no plural rule found for: ".concat(r)),""}}]),t}(),jB=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vr(this,t),this.logger=Gr.create("interpolator"),this.init(e,!0)}return Ur(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;a&&(this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n}),r.interpolation||(r.interpolation={escapeValue:!0});var i=r.interpolation;this.escape=i.escape!==void 0?i.escape:MB,this.escapeValue=i.escapeValue!==void 0?i.escapeValue:!0,this.useRawValueToEscape=i.useRawValueToEscape!==void 0?i.useRawValueToEscape:!1,this.prefix=i.prefix?Ci(i.prefix):i.prefixEscaped||"{{",this.suffix=i.suffix?Ci(i.suffix):i.suffixEscaped||"}}",this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||",",this.unescapePrefix=i.unescapeSuffix?"":i.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":i.unescapeSuffix||"",this.nestingPrefix=i.nestingPrefix?Ci(i.nestingPrefix):i.nestingPrefixEscaped||Ci("$t("),this.nestingSuffix=i.nestingSuffix?Ci(i.nestingSuffix):i.nestingSuffixEscaped||Ci(")"),this.maxReplaces=i.maxReplaces?i.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var a="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(a,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,a,i,n){var s=this,o,u,l;function c(_){return _.replace(/\$/g,"$$$$")}var d=function(h){if(h.indexOf(s.formatSeparator)<0)return _l(a,h);var y=h.split(s.formatSeparator),S=y.shift().trim(),x=y.join(s.formatSeparator).trim();return s.format(_l(a,S),x,i)};this.resetRegExp();var p=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(l=0;(o=this.regexpUnescape.exec(r))&&(u=d(o[1].trim()),r=r.replace(o[0],u),this.regexpUnescape.lastIndex=0,l++,!(l>=this.maxReplaces)););for(l=0;o=this.regexp.exec(r);){if(u=d(o[1].trim()),u===void 0)if(typeof p=="function"){var v=p(r,o,n);u=typeof v=="string"?v:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(r)),u="";else typeof u!="string"&&!this.useRawValueToEscape&&(u=Jv(u));if(u=this.escapeValue?c(this.escape(u)):c(u),r=r.replace(o[0],u),this.regexp.lastIndex=0,l++,l>=this.maxReplaces)break}return r}},{key:"nest",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n,s,o=jt({},i);o.applyPostProcessor=!1;function u(l,c){if(l.indexOf(",")<0)return l;var d=l.split(",");l=d.shift();var p=d.join(",");p=this.interpolate(p,o),p=p.replace(/'/g,'"');try{o=JSON.parse(p),c&&(o=jt({},c,o))}catch(v){this.logger.error("failed parsing options string in nesting for key ".concat(l),v)}return l}for(;n=this.nestingRegexp.exec(r);){if(s=a(u.call(this,n[1].trim(),o),o),s&&n[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=Jv(s)),s||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(r)),s=""),r=r.replace(n[0],s),this.regexp.lastIndex=0}return r}}]),t}();function NB(t){if(Array.isArray(t))return t}function RB(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,i,n,s,o=[],u=!0,l=!1;try{if(n=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(a=n.call(r)).done)&&(o.push(a.value),o.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function FB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
268
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(t,e){return NB(t)||RB(t,e)||Kv(t,e)||FB()}function qB(t,e){for(var r=t.indexOf(e);r!==-1;)t.splice(r,1),r=t.indexOf(e)}var BB=function(t){kl(e,t);function e(r,a,i){var n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Vr(this,e),n=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(n))),n.backend=r,n.store=a,n.languageUtils=i.languageUtils,n.options=s,n.logger=Gr.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(i,s.backend,s),n}return Ur(e,[{key:"queueLoad",value:function(a,i,n,s){var o=this,u=[],l=[],c=[],d=[];return a.forEach(function(p){var v=!0;i.forEach(function(_){var h="".concat(p,"|").concat(_);!n.reload&&o.store.hasResourceBundle(p,_)?o.state[h]=2:o.state[h]<0||(o.state[h]===1?l.indexOf(h)<0&&l.push(h):(o.state[h]=1,v=!1,l.indexOf(h)<0&&l.push(h),u.indexOf(h)<0&&u.push(h),d.indexOf(_)<0&&d.push(_)))}),v||c.push(p)}),(u.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:s}),{toLoad:u,pending:l,toLoadLanguages:c,toLoadNamespaces:d}}},{key:"loaded",value:function(a,i,n){var s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];i&&this.emit("failedLoading",u,l,i),n&&this.store.addResourceBundle(u,l,n),this.state[a]=i?-1:2;var c={};this.queue.forEach(function(d){OB(d.loaded,[u],l),qB(d.pending,a),i&&d.errors.push(i),d.pending.length===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){c[p]||(c[p]=[]),d.loaded[p].length&&d.loaded[p].forEach(function(v){c[p].indexOf(v)<0&&c[p].push(v)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(a,i,n){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,l=arguments.length>5?arguments[5]:void 0;return a.length?this.backend[n](a,i,function(c,d){if(c&&d&&o<5){setTimeout(function(){s.read.call(s,a,i,n,o+1,u*2,l)},u);return}l(c,d)}):l(null,{})}},{key:"prepareLoading",value:function(a,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof a=="string"&&(a=this.languageUtils.toResolveHierarchy(a)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(a,i,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(function(l){n.loadOne(l)})}},{key:"load",value:function(a,i,n){this.prepareLoading(a,i,{},n)}},{key:"reload",value:function(a,i,n){this.prepareLoading(a,i,{reload:!0},n)}},{key:"loadOne",value:function(a){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];this.read(u,l,"read",null,null,function(c,d){c&&i.logger.warn("".concat(n,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&d&&i.logger.log("".concat(n,"loaded namespace ").concat(l," for language ").concat(u),d),i.loaded(a,c,d)})}},{key:"saveMissing",value:function(a,i,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(a,i,n,s,null,jt({},u,{isUpdate:o})),!(!a||!a[0])&&this.store.addResource(a[0],i,n,s)}}]),e}(fa);function WB(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ur(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ur(e[2])==="object"||ur(e[3])==="object"){var a=e[3]||e[2];Object.keys(a).forEach(function(i){r[i]=a[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,a){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function ab(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function wl(){}var VB=function(t){kl(e,t);function e(){var r,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Vr(this,e),r=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(r))),r.options=ab(a),r.services={},r.logger=Gr,r.modules={external:[]},i&&!r.isInitialized&&!a.isClone){if(!r.options.initImmediate)return r.init(a,i),Gn(r,Nt(Nt(r)));setTimeout(function(){r.init(a,i)},0)}return r}return Ur(e,[{key:"init",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(n=i,i={}),this.options=jt({},WB(),this.options,ab(i)),this.format=this.options.interpolation.format,n||(n=wl);function s(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Gr.init(s(this.modules.logger),this.options):Gr.init(null,this.options);var o=new PB(this.options);this.store=new $B(this.options.resources,this.options);var u=this.services;u.logger=Gr,u.resourceStore=this.store,u.languageUtils=o,u.pluralResolver=new LB(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new jB(this.options),u.backendConnector=new BB(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new tb(this.services,this.options),this.translator.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.external.forEach(function(p){p.init&&p.init(a)})}var l=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){a[p]=function(){var v;return(v=a.store)[p].apply(v,arguments)}});var c=Hn(),d=function(){a.changeLanguage(a.options.lng,function(v,_){a.isInitialized=!0,a.logger.log("initialized",a.options),a.emit("initialized",a.options),c.resolve(_),n(v,_)})};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wl;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&this.language.toLowerCase()==="cimode")return i();var n=[],s=function(l){if(l){var c=a.services.languageUtils.toResolveHierarchy(l);c.forEach(function(d){n.indexOf(d)<0&&n.push(d)})}};if(this.language)s(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach(function(u){return s(u)})}this.options.preload&&this.options.preload.forEach(function(u){return s(u)}),this.services.backendConnector.load(n,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(a,i,n){var s=Hn();return a||(a=this.languages),i||(i=this.options.ns),n||(n=wl),this.services.backendConnector.reload(a,i,function(o){s.resolve(),n(o)}),s}},{key:"use",value:function(a){return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&eb.addPostProcessor(a),a.type==="3rdParty"&&this.modules.external.push(a),this}},{key:"changeLanguage",value:function(a,i){var n=this,s=Hn();this.emit("languageChanging",a);var o=function(c,d){n.translator.changeLanguage(d),d&&(n.emit("languageChanged",d),n.logger.log("languageChanged",d)),s.resolve(function(){return n.t.apply(n,arguments)}),i&&i(c,function(){return n.t.apply(n,arguments)})},u=function(c){c&&(n.language=c,n.languages=n.services.languageUtils.toResolveHierarchy(c),n.translator.language||n.translator.changeLanguage(c),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(c)),n.loadResources(function(d){o(d,c)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(a),s}},{key:"getFixedT",value:function(a,i){var n=this,s=function o(u,l){var c=jt({},l);if(ur(l)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v<d;v++)p[v-2]=arguments[v];c=n.options.overloadTranslationOptionHandler([u,l].concat(p))}return c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,n.t(u,c)};return typeof a=="string"?s.lng=a:s.lngs=a,s.ns=i,s}},{key:"t",value:function(){var a;return this.translator&&(a=this.translator).translate.apply(a,arguments)}},{key:"exists",value:function(){var a;return this.translator&&(a=this.translator).exists.apply(a,arguments)}},{key:"setDefaultNamespace",value:function(a){this.options.defaultNS=a}},{key:"loadNamespaces",value:function(a,i){var n=this,s=Hn();return this.options.ns?(typeof a=="string"&&(a=[a]),a.forEach(function(o){n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),this.loadResources(function(o){s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(a,i){var n=Hn();typeof a=="string"&&(a=[a]);var s=this.options.preload||[],o=a.filter(function(u){return s.indexOf(u)<0});return o.length?(this.options.preload=s.concat(o),this.loadResources(function(u){n.resolve(),i&&i(u)}),n):(i&&i(),Promise.resolve())}},{key:"dir",value:function(a){if(a||(a=this.languages&&this.languages.length>0?this.languages[0]:this.language),!a)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(a))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new e(a,i)}},{key:"cloneInstance",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wl,s=jt({},this.options,i,{isClone:!0}),o=new e(s),u=["store","services","language"];return u.forEach(function(l){o[l]=a[l]}),o.translator=new tb(o.services,o.options),o.translator.on("*",function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];o.emit.apply(o,[l].concat(d))}),o.init(s,n),o.translator.options=o.options,o}}]),e}(fa);const Me=new VB;Me.changeLanguage.bind(Me),Me.cloneInstance.bind(Me),Me.createInstance.bind(Me),Me.dir.bind(Me),Me.exists.bind(Me),Me.getFixedT.bind(Me),Me.init.bind(Me),Me.loadLanguages.bind(Me),Me.loadNamespaces.bind(Me),Me.loadResources.bind(Me),Me.off.bind(Me),Me.on.bind(Me),Me.setDefaultNamespace.bind(Me),Me.t.bind(Me),Me.use.bind(Me);const Cl={screensCache:[],cachedScreenPromises:[],install(t){t.prototype.$dataProvider=this},apiInstance(){return H.has(window,"ProcessMaker.apiClient")&&!window.ProcessMaker.isStub?window.ProcessMaker.apiClient:this.token()?(Vn.defaults.baseURL=this.baseURL(),Vn.defaults.headers.common={Authorization:`Bearer ${this.token()}`},Vn.defaults.adapter=Wv(Vn.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})}),Vn):H.has(window,"ProcessMaker.apiClient")&&window.ProcessMaker.isStub?window.ProcessMaker.apiClient:{get(){return Promise.resolve({data:{data:[]}})}}},get(...t){return this.apiInstance().get(...t)},post(...t){return this.apiInstance().post(...t)},delete(...t){return this.apiInstance().delete(...t)},token(){return localStorage.getItem("token")},baseURL(){return localStorage.getItem("baseURL")},getTasks(t){const e=H.get(window,"PM4ConfigOverrides.getTasksEndpoint","/tasks");return this.get(e+t).then(r=>(r.data.screen&&r.data.screen.nested&&this.addNestedScreenCache(r.data.screen.nested),r))},addNestedScreenCache(t){t.forEach(e=>{e.screen_id&&(e.id=e.screen_id);const r=this.screensCache.findIndex(a=>a.id===e.id);r>-1?this.screensCache.splice(r,1,e):this.screensCache.push(e)})},getScreen(t,e=""){if(!t)return null;const r=this.cachedScreenPromises.find(s=>s.id===t&&s.query===e);if(r)return r.screenPromise;const a=H.get(window,"PM4ConfigOverrides.getScreenEndpoint","/screens"),i=this.screensCache.find(s=>s.id===t);if(i)return Promise.resolve({data:i});const n=new Promise((s,o)=>{this.get(`${a}/${t}${e}`).then(u=>{u.data.nested&&this.addNestedScreenCache(u.data.nested),s(u)}).catch(u=>o(u))});return this.cachedScreenPromises.push({id:t,query:e,screenPromise:n}),n},flushScreenCache(){this.cachedScreenPromises.splice(0,this.cachedScreenPromises.length)},postScript(t,e,r={}){const a=H.get(window,"PM4ConfigOverrides.postScriptEndpoint","/scripts/execute/{id}");return this.post(a.replace("{id}",t)+this.authQueryString(),e,r)},postDataSource(t,e,r){let a;return e?a=`/requests/${e}/data_sources/${t}`:a=`/requests/data_sources/${t}`,a+=this.authQueryString(),this.post(a,r,{timeout:0})},getDataSource(t,e){if(!window.ProcessMaker.screen.cacheEnabled&&!window.ProcessMaker.screen.cacheTimeout)return this.postDataSource(t,null,e);let r=`/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;return r+=this.authQueryString(),this.get(r,{useCache:window.ProcessMaker.screen.cacheEnabled,params:{pmds_config:JSON.stringify(e.config),pmds_data:JSON.stringify(e.data)}}).then(a=>a)},authQueryString(){const t=H.get(window,"PM4ConfigOverrides.authParams",null);let e="";return t&&(e=`?${new URLSearchParams(t).toString()}`),e},deleteFile(t,e=null){let r=`files/${t}`;return e&&(r+=`?token=${e}`),this.delete(r)},download(t){return this.apiInstance().get(t,{responseType:"blob"})},getCollections(){return this.get("/collections?per_page=1000").catch(t=>{throw t.response&&t.response.status===404?new Error(Me.t("Collections package not installed")):t})},getCollectionFields(t){return this.get(`/collections/${t}/columns?per_page=1000`).catch(e=>{throw e.response&&e.response.status===404?new Error(Me.t("Collection id not found")):e})},getCollectionRecords(t,e,r=null){return e.useCache=window.ProcessMaker.screen.cacheEnabled,this.get(`/collections/${t}/records${this.authQueryString()}`,e).then(a=>{const i=a?a.data:null;if(!i)throw new Error(Me.t("No data returned"));return[i,r]}).catch(a=>{if(a.response&&a.response.status===404)return[{data:[]},r];throw a})}};let Yn=typeof window>"u"?global:window;class Ti{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);this.element=e,Object.assign(this,r)}async countItems(e){throw e}}class UB extends Ti{async countItems(e){for(const r of this.element)await Ai(r,{screen:this.screen}).countItems(e)}}class GB extends Ti{async countItems(e){for(let r=0,a=this.element.config.length;r<a;r++)await Ai(this.element.config[r].items,{screen:this.element}).countItems(e)}}class HB extends Ti{async countItems(e){e.push(this.element);const r=await this.loadScreen(this.element.config.screen);r&&r[0]&&r[0].items&&await Ai(r[0].items,{screen:this.screen}).countItems(e)}async loadScreen(e){try{if(Yn.nestedScreens||(Yn.nestedScreens={}),Yn.nestedScreens["id_"+e])return Yn.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Yn.nestedScreens["id_"+e]=r.data.config,r.data.config}catch{return!1}}}class YB extends Ti{async countItems(e){e.push(this.element),await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class QB extends Ti{async countItems(e){await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class KB extends Ti{async countItems(e){e.push(this.element)}}function Ai(t,e){return t instanceof Array?new UB(t,e):t.config instanceof Array?new GB(t,e):t.component==="FormNestedScreen"?new HB(t,e):t.component==="FormMultiColumn"?new QB(t,e):t.component==="FormLoop"?new YB(t,e):new KB(t,e)}let Or=typeof window>"u"?global:window,Qn=[];class Fa{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);se(this,"data",{});se(this,"insideLoop",!1);this.element=e,Object.assign(this,r)}async addValidations(e){throw e}isVisible(){if(!(this.element.visibleInDevice===null||this.element.visibleInDevice===void 0?!0:this.element.visibleInDevice))return!1;let r=!0;if(this.element.config.conditionalHide)try{r=!!At.evaluate(this.element.config.conditionalHide,this.data)}catch{r=!1}return r}}class JB extends Fa{async addValidations(e){for(const r of this.element)await ha(r,{screen:this.screen,data:this.data,parentVisibilityRule:this.parentVisibilityRule,insideLoop:this.insideLoop}).addValidations(e)}}class ZB extends Fa{async addValidations(e){this.element.config[this.firstPage]&&(Qn=[this.firstPage],await ha(this.element.config[this.firstPage].items,{screen:this.element,data:this.data}).addValidations(e),Qn=[])}}class XB extends Fa{async addValidations(e){if(!this.isVisible())return;const r=await this.loadNestedScreen(this.element.config.screen);if(r&&r.config){const a=r.config;let i=this.parentVisibilityRule?this.parentVisibilityRule:this.element.config.conditionalHide;a&&a[0]&&a[0].items&&await ha(a[0].items,{screen:r,data:this.data,parentVisibilityRule:i}).addValidations(e)}}async loadNestedScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return{config:Or.nestedScreens["id_"+e]};const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,{config:r.data}}async loadScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return Or.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,r.data.config}}class eW extends Fa{async addValidations(e){if(!this.isVisible())return;H.set(e,this.element.config.name,{});const r=H.get(e,this.element.config.name);r.$each={},this.checkForSiblings(e);const a=(H.get(this.data,this.element.config.name)||[{}])[0];await ha(this.element.items,{screen:this.screen,data:{_parent:this.data,...a},parentVisibilityRule:this.element.config.conditionalHide,insideLoop:!0}).addValidations(r.$each)}checkForSiblings(e){const r=[],a=[];if(this.screen.config.forEach(i=>{!i||!i.items||(i.items.filter(n=>{n.component==="FormLoop"&&n.config.name===this.element.config.name&&r.push(n)}),r&&r.forEach(n=>{n.items.filter(s=>{s.config.validation&&s.config.validation.forEach(o=>{const u=this.camelCase(o.value.split(":")[0]),l=nl[u],c={};let d={};d[u]=l,c[s.config.name]=d,H.merge(a,c)})})}))}),Object.keys(a).length!=0){const i=H.get(e,this.element.config.name);i.hasOwnProperty("$each")&&H.merge(i.$each,a),H.set(e[this.element.config.name].$each,i)}}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}class tW extends Fa{async addValidations(e){this.isVisible()&&await ha(this.element.items,{screen:this.screen,data:this.data,parentVisibilityRule:this.element.config.conditionalHide}).addValidations(e)}}class rW extends Fa{async addValidations(e){if(!this.isVisible())return;const r=this.element.config.eventData;let a="Empty Screen";this.screen.config[r]&&this.screen.config[r].name&&(a=this.screen.config[r].name);const i=`${a}-${r}`;Qn.length>0&&!Qn.includes(i)&&this.screen.config[r]&&this.screen.config[r].items&&(Qn.push(i),await ha(this.screen.config[this.element.config.eventData].items,{screen:this.screen,data:this.data}).addValidations(e))}}class aW extends Fa{async addValidations(e){if(this.element.config&&this.element.config.readonly||this.element.config&&this.element.config.disabled||!(this.element.config&&this.element.config.name&&typeof this.element.config.name=="string"&&this.element.config.name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)))return;const r=this.element.config.name,a=this.element.config.validation,i=this.element.config.conditionalHide,n=this.parentVisibilityRule,s=this.insideLoop||!1,o=this.element.config.deviceVisibility?this.element.config.deviceVisibility:{showForDesktop:!0,showForMobile:!0};H.set(e,r,H.get(e,r,{}));const u=H.get(e,r);if(a instanceof Array)a.forEach(l=>{const c=this.camelCase(l.value.split(":")[0]);if(!c)return;let d=nl[c];if(d){if(l.configs instanceof Array){const p=[];l.configs.forEach(v=>{p.push(v.value)}),p.push(r),d=d(...p)}u[c]=function(...p){const v=p[1],_=r.split(".").length-1,h=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_);if(n){const x=s?1:0,b=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_+x);let f=!0;try{f=!!At.evaluate(n,b)}catch{f=!1}if(!f)return!0}let y=!0;try{const x=this.$root.$children[0].$refs.renderer.definition.isMobile;y=x&&o.showForMobile||!x&&o.showForDesktop}catch{y=!0}if(!y)return!0;let S=!0;if(i)try{S=!!At.evaluate(i,h)}catch{S=!1}return S?d.apply(this,p):!0}}});else if(typeof a=="string"&&a){let l=nl[a];if(!l)return;u[a]=function(...c){const d=c[1],p=r.split(".").length-1,v=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p);if(n){const h=s?1:0,y=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p+h);let S=!0;try{S=!!At.evaluate(n,y)}catch{S=!1}if(!S)return!0}let _=!0;if(i)try{_=!!At.evaluate(i,v)}catch{_=!1}return _?l.apply(this,c):!0}}this.element.items&&ha(this.element.items,{screen:this.screen,data:this.data}).addValidations(e)}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}function ha(t,e){return t instanceof Array?new JB(t,e):t.config instanceof Array?new ZB(t,e):t.component==="FormNestedScreen"?new XB(t,e):t.component==="FormMultiColumn"?new tW(t,e):t.component==="FormLoop"?new eW(t,e):(t.component,t.component==="FormButton"&&t.config.event==="pageNavigate"?new rW(t,e):new aW(t,e))}let Kn;const ib={mixins:ov,props:{value:Object,_parent:null,definition:Object,components:{type:Object,default(){return{}}},showErrors:{type:Boolean,default:!1},testScreenDefinition:{type:Boolean,default:!1}},data(){return{references__:[],debugCmp:null,component:null,alias:{},extensions:[],nodeNameProperty:"component",variables:[],variablesTree:[],initialize:[],ownerDocument:window.document,updatedConfigs:[],building:{show:!1,error:"",component:"",errors:[]}}},methods:{dot2bracket(t){return t.replace(/\.\d/g,e=>`[${e.substr(1)}]`)},submit(t,e=!1,r=null){this.$emit("submit",this.value,e,r)},buildComponent(t){window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-build-component",this);const e=this.componentDefinition(t);if(!this.testScreenDefinition)return e;const r=this.$root.constructor,a=r.config.warnHandler,i=r.config.errorHandler,n=[];this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;let s;try{r.config.warnHandler=u=>{n.push(u)},r.config.errorHandler=u=>{n.push(u)},s=r.component("ScreenRendered",e);const o=new s({propsData:{vdata:{}}});if(o.$parent=this,o.$mount(),n.length>0)throw this.$t("Building error");return this.codigo=e,e}catch(o){return console.error(o),this.building.error=o,this.building.component=e,this.building.errors=n,this.building.show=!0,e||{template:"<div></div>"}}finally{r.config.warnHandler=a,r.config.errorHandler=i}},parse(t,e){const r=this.ownerDocument.createElement("div");return this.loadPages(e,r,t),"<div>"+r.innerHTML+"</div>"},loadPages(t,e,r){const a=t.config;this.variables.splice(0),this.extensions.forEach(i=>i.beforeload instanceof Function&&i.beforeload.bind(this)({pages:a,owner:e,definition:t})),a.forEach((i,n)=>{if(i){const s=this.createComponent("div",{name:i.name,class:"page","v-if":`currentPage__==${n}`,key:`page-${n}`});this.loadItems(i.items,s,r,t,n),e.appendChild(s)}})},escapeVuePropertyName(t){return t.substr(0,1)==="@"?t.replace("@","v-on:"):this.snakeCase(t)},snakeCase(t){return t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/^-/,"")},camelCase(t){return t.replace(/_\w/g,e=>e.substr(1,1).toUpperCase())},updateComponentConfig(t,e){this.updatedConfigs.push({name:t,properties:e})},mergeUpdatedConfig(t,e){let r=this.updatedConfigs.find(a=>a.name===t);if(r){let a=r.properties;for(let i in a)e[i]===void 0&&(e[i]=a[i])}return e},createComponent(t,e){e=this.mergeUpdatedConfig(t,this.setDefaultPropertyValues(e)),t=this.snakeCase(t);const r=this.ownerDocument.createElement(t);for(let a in e){const i=e[a];i!==!1&&i!==null&&i!==void 0&&(a.substr(0,1)===":"||typeof i=="string"&&i.indexOf("{{")===-1?r.setAttribute(this.escapeVuePropertyName(a),i):typeof i=="string"&&i.indexOf("{{")!==-1&&!e.ignoreMustache?r.setAttribute(":"+this.escapeVuePropertyName(a),"mustache("+this.byValue(i)+")"):i!==void 0&&r.setAttribute(":"+this.escapeVuePropertyName(a),this.byRef(i)))}return r},byValue(t){return JSON.stringify(t).replace("{{","{{").replace("}}","}}")},byRef(t){const r=`references__[${this.references__.indexOf(t)>-1?this.references__.indexOf(t):this.references__.length}]`;return this.references__.push(t),r},loadItems(t,e,r,a,i){t.forEach(n=>{const s=n[this.nodeNameProperty],o=this.alias[s]||s,u={...n.config};this.extensions.forEach(d=>d.onloadproperties instanceof Function&&d.onloadproperties.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,screen:r,definition:a,formIndex:i}));const l=this.createComponent(o,u),c=this.ownerDocument.createElement("div");c.appendChild(l),this.extensions.forEach(d=>d.onloaditems instanceof Function&&d.onloaditems.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,node:l,wrapper:c,screen:r,definition:a,formIndex:i})),e.appendChild(c)})},setDefaultPropertyValues(t){let e={...t};return(typeof e.ariaLabel>"u"||e.ariaLabel===null||e.ariaLabel==="")&&e.label&&(e.ariaLabel=e.label),e.tabindex&&(e.tabindex=parseInt(e.tabindex)),e},validVariableName(t){return t&&typeof t=="string"&&t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)},isComputedVariable(t,e){return e.computed&&e.computed.some(r=>new RegExp(`^${r.property}(\\.|$)`,"i").test(t))},registerVariable(t,e={}){if(t&&t.startsWith("_parent.")||t&&t.includes("._parent.")||!this.validVariableName(t))return;const r=H.get(e,"config",{});this.variables.find(i=>i.name===t)||(this.variables.push({name:t,config:r,element:e}),this.variablesTree.push({name:t,config:r,element:e}))},registerNestedVariable(t,e,r){const a=Kn.getVariablesTree(r);this.variablesTree.push({name:t,prefix:e,config:{},items:a}),Kn.getVariablesTree({config:[]})},getVariablesTree(t){let e;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},data:{},watch:{},mounted:[]},this.variablesTree=[];const r=this.parse(e,t);return this.extensions.forEach(a=>{a.onparse instanceof Function&&a.onparse.bind(this)({screen:e,template:r,definition:t})}),this.variablesTree}catch(r){return console.error(r),this.variablesTree}},elementCssClass(t){const e=[];return t.config.bgcolor&&e.push(t.config.bgcolor),t.config.color&&e.push(t.config.color),e.join(" ")},componentDefinition(t){let e;this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},created:[],data:{},watch:{},mounted:[]};const r=this.parse(e,t);this.extensions.forEach(n=>{n.onparse instanceof Function&&n.onparse.bind(this)({screen:e,template:r,definition:t})}),e.template=r,this.extensions.forEach(n=>{n.onbuild instanceof Function&&n.onbuild.bind(this)({screen:e,definition:t})});const a=["currentPage__"],i=`let value;const data = {};
268
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(t,e){return NB(t)||RB(t,e)||Kv(t,e)||FB()}function qB(t,e){for(var r=t.indexOf(e);r!==-1;)t.splice(r,1),r=t.indexOf(e)}var BB=function(t){kl(e,t);function e(r,a,i){var n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Vr(this,e),n=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(n))),n.backend=r,n.store=a,n.languageUtils=i.languageUtils,n.options=s,n.logger=Gr.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(i,s.backend,s),n}return Ur(e,[{key:"queueLoad",value:function(a,i,n,s){var o=this,u=[],l=[],c=[],d=[];return a.forEach(function(p){var v=!0;i.forEach(function(_){var h="".concat(p,"|").concat(_);!n.reload&&o.store.hasResourceBundle(p,_)?o.state[h]=2:o.state[h]<0||(o.state[h]===1?l.indexOf(h)<0&&l.push(h):(o.state[h]=1,v=!1,l.indexOf(h)<0&&l.push(h),u.indexOf(h)<0&&u.push(h),d.indexOf(_)<0&&d.push(_)))}),v||c.push(p)}),(u.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:s}),{toLoad:u,pending:l,toLoadLanguages:c,toLoadNamespaces:d}}},{key:"loaded",value:function(a,i,n){var s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];i&&this.emit("failedLoading",u,l,i),n&&this.store.addResourceBundle(u,l,n),this.state[a]=i?-1:2;var c={};this.queue.forEach(function(d){OB(d.loaded,[u],l),qB(d.pending,a),i&&d.errors.push(i),d.pending.length===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){c[p]||(c[p]=[]),d.loaded[p].length&&d.loaded[p].forEach(function(v){c[p].indexOf(v)<0&&c[p].push(v)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(a,i,n){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,l=arguments.length>5?arguments[5]:void 0;return a.length?this.backend[n](a,i,function(c,d){if(c&&d&&o<5){setTimeout(function(){s.read.call(s,a,i,n,o+1,u*2,l)},u);return}l(c,d)}):l(null,{})}},{key:"prepareLoading",value:function(a,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof a=="string"&&(a=this.languageUtils.toResolveHierarchy(a)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(a,i,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(function(l){n.loadOne(l)})}},{key:"load",value:function(a,i,n){this.prepareLoading(a,i,{},n)}},{key:"reload",value:function(a,i,n){this.prepareLoading(a,i,{reload:!0},n)}},{key:"loadOne",value:function(a){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];this.read(u,l,"read",null,null,function(c,d){c&&i.logger.warn("".concat(n,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&d&&i.logger.log("".concat(n,"loaded namespace ").concat(l," for language ").concat(u),d),i.loaded(a,c,d)})}},{key:"saveMissing",value:function(a,i,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(a,i,n,s,null,jt({},u,{isUpdate:o})),!(!a||!a[0])&&this.store.addResource(a[0],i,n,s)}}]),e}(fa);function WB(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ur(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ur(e[2])==="object"||ur(e[3])==="object"){var a=e[3]||e[2];Object.keys(a).forEach(function(i){r[i]=a[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,a){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function ab(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function wl(){}var VB=function(t){kl(e,t);function e(){var r,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Vr(this,e),r=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(r))),r.options=ab(a),r.services={},r.logger=Gr,r.modules={external:[]},i&&!r.isInitialized&&!a.isClone){if(!r.options.initImmediate)return r.init(a,i),Gn(r,Nt(Nt(r)));setTimeout(function(){r.init(a,i)},0)}return r}return Ur(e,[{key:"init",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(n=i,i={}),this.options=jt({},WB(),this.options,ab(i)),this.format=this.options.interpolation.format,n||(n=wl);function s(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Gr.init(s(this.modules.logger),this.options):Gr.init(null,this.options);var o=new PB(this.options);this.store=new $B(this.options.resources,this.options);var u=this.services;u.logger=Gr,u.resourceStore=this.store,u.languageUtils=o,u.pluralResolver=new LB(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new jB(this.options),u.backendConnector=new BB(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new tb(this.services,this.options),this.translator.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.external.forEach(function(p){p.init&&p.init(a)})}var l=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){a[p]=function(){var v;return(v=a.store)[p].apply(v,arguments)}});var c=Hn(),d=function(){a.changeLanguage(a.options.lng,function(v,_){a.isInitialized=!0,a.logger.log("initialized",a.options),a.emit("initialized",a.options),c.resolve(_),n(v,_)})};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wl;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&this.language.toLowerCase()==="cimode")return i();var n=[],s=function(l){if(l){var c=a.services.languageUtils.toResolveHierarchy(l);c.forEach(function(d){n.indexOf(d)<0&&n.push(d)})}};if(this.language)s(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach(function(u){return s(u)})}this.options.preload&&this.options.preload.forEach(function(u){return s(u)}),this.services.backendConnector.load(n,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(a,i,n){var s=Hn();return a||(a=this.languages),i||(i=this.options.ns),n||(n=wl),this.services.backendConnector.reload(a,i,function(o){s.resolve(),n(o)}),s}},{key:"use",value:function(a){return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&eb.addPostProcessor(a),a.type==="3rdParty"&&this.modules.external.push(a),this}},{key:"changeLanguage",value:function(a,i){var n=this,s=Hn();this.emit("languageChanging",a);var o=function(c,d){n.translator.changeLanguage(d),d&&(n.emit("languageChanged",d),n.logger.log("languageChanged",d)),s.resolve(function(){return n.t.apply(n,arguments)}),i&&i(c,function(){return n.t.apply(n,arguments)})},u=function(c){c&&(n.language=c,n.languages=n.services.languageUtils.toResolveHierarchy(c),n.translator.language||n.translator.changeLanguage(c),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(c)),n.loadResources(function(d){o(d,c)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(a),s}},{key:"getFixedT",value:function(a,i){var n=this,s=function o(u,l){var c=jt({},l);if(ur(l)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v<d;v++)p[v-2]=arguments[v];c=n.options.overloadTranslationOptionHandler([u,l].concat(p))}return c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,n.t(u,c)};return typeof a=="string"?s.lng=a:s.lngs=a,s.ns=i,s}},{key:"t",value:function(){var a;return this.translator&&(a=this.translator).translate.apply(a,arguments)}},{key:"exists",value:function(){var a;return this.translator&&(a=this.translator).exists.apply(a,arguments)}},{key:"setDefaultNamespace",value:function(a){this.options.defaultNS=a}},{key:"loadNamespaces",value:function(a,i){var n=this,s=Hn();return this.options.ns?(typeof a=="string"&&(a=[a]),a.forEach(function(o){n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),this.loadResources(function(o){s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(a,i){var n=Hn();typeof a=="string"&&(a=[a]);var s=this.options.preload||[],o=a.filter(function(u){return s.indexOf(u)<0});return o.length?(this.options.preload=s.concat(o),this.loadResources(function(u){n.resolve(),i&&i(u)}),n):(i&&i(),Promise.resolve())}},{key:"dir",value:function(a){if(a||(a=this.languages&&this.languages.length>0?this.languages[0]:this.language),!a)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(a))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new e(a,i)}},{key:"cloneInstance",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wl,s=jt({},this.options,i,{isClone:!0}),o=new e(s),u=["store","services","language"];return u.forEach(function(l){o[l]=a[l]}),o.translator=new tb(o.services,o.options),o.translator.on("*",function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];o.emit.apply(o,[l].concat(d))}),o.init(s,n),o.translator.options=o.options,o}}]),e}(fa);const Me=new VB;Me.changeLanguage.bind(Me),Me.cloneInstance.bind(Me),Me.createInstance.bind(Me),Me.dir.bind(Me),Me.exists.bind(Me),Me.getFixedT.bind(Me),Me.init.bind(Me),Me.loadLanguages.bind(Me),Me.loadNamespaces.bind(Me),Me.loadResources.bind(Me),Me.off.bind(Me),Me.on.bind(Me),Me.setDefaultNamespace.bind(Me),Me.t.bind(Me),Me.use.bind(Me);const Cl={screensCache:[],cachedScreenPromises:[],install(t){t.prototype.$dataProvider=this},apiInstance(){return H.has(window,"ProcessMaker.apiClient")&&!window.ProcessMaker.isStub?window.ProcessMaker.apiClient:this.token()?(Vn.defaults.baseURL=this.baseURL(),Vn.defaults.headers.common={Authorization:`Bearer ${this.token()}`},Vn.defaults.adapter=Wv(Vn.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})}),Vn):H.has(window,"ProcessMaker.apiClient")&&window.ProcessMaker.isStub?window.ProcessMaker.apiClient:{get(){return Promise.resolve({data:{data:[]}})}}},get(...t){return this.apiInstance().get(...t)},post(...t){return this.apiInstance().post(...t)},delete(...t){return this.apiInstance().delete(...t)},token(){return localStorage.getItem("token")},baseURL(){return localStorage.getItem("baseURL")},getTasks(t){const e=H.get(window,"PM4ConfigOverrides.getTasksEndpoint","/tasks");return this.get(e+t).then(r=>(r.data.screen&&r.data.screen.nested&&this.addNestedScreenCache(r.data.screen.nested),r))},addNestedScreenCache(t){t.forEach(e=>{e.screen_id&&(e.id=e.screen_id);const r=this.screensCache.findIndex(a=>a.id===e.id);r>-1?this.screensCache.splice(r,1,e):this.screensCache.push(e)})},getScreen(t,e=""){if(!t)return null;const r=this.cachedScreenPromises.find(s=>s.id===t&&s.query===e);if(r)return r.screenPromise;const a=H.get(window,"PM4ConfigOverrides.getScreenEndpoint","/screens"),i=this.screensCache.find(s=>s.id===t);if(i)return Promise.resolve({data:i});const n=new Promise((s,o)=>{this.get(`${a}/${t}${e}`).then(u=>{u.data.nested&&this.addNestedScreenCache(u.data.nested),s(u)}).catch(u=>o(u))});return this.cachedScreenPromises.push({id:t,query:e,screenPromise:n}),n},flushScreenCache(){this.cachedScreenPromises.splice(0,this.cachedScreenPromises.length)},postScript(t,e,r={}){const a=H.get(window,"PM4ConfigOverrides.postScriptEndpoint","/scripts/execute/{id}");return this.post(a.replace("{id}",t)+this.authQueryString(),e,r)},postDataSource(t,e,r){let a;return e?a=`/requests/${e}/data_sources/${t}`:a=`/requests/data_sources/${t}`,a+=this.authQueryString(),this.post(a,r,{timeout:0})},getDataSource(t,e){if(!window.ProcessMaker.screen.cacheEnabled&&!window.ProcessMaker.screen.cacheTimeout)return this.postDataSource(t,null,e);let r=`/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;return r+=this.authQueryString(),this.get(r,{useCache:window.ProcessMaker.screen.cacheEnabled,params:{pmds_config:JSON.stringify(e.config),pmds_data:JSON.stringify(e.data)}}).then(a=>a)},authQueryString(){const t=H.get(window,"PM4ConfigOverrides.authParams",null);let e="";return t&&(e=`?${new URLSearchParams(t).toString()}`),e},deleteFile(t,e=null){let r=`files/${t}`;return e&&(r+=`?token=${e}`),this.delete(r)},download(t){return this.apiInstance().get(t,{responseType:"blob"})},getCollections(){return this.get("/collections?per_page=1000").catch(t=>{throw t.response&&t.response.status===404?new Error(Me.t("Collections package not installed")):t})},getCollectionFields(t){return this.get(`/collections/${t}/columns?per_page=1000`).catch(e=>{throw e.response&&e.response.status===404?new Error(Me.t("Collection id not found")):e})},getCollectionRecords(t,e,r=null){return e.useCache=window.ProcessMaker.screen.cacheEnabled,this.get(`/collections/${t}/records${this.authQueryString()}`,e).then(a=>{const i=a?a.data:null;if(!i)throw new Error(Me.t("No data returned"));return[i,r]}).catch(a=>{if(a.response&&a.response.status===404)return[{data:[]},r];throw a})}};let Yn=typeof window>"u"?global:window;class Ti{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);this.element=e,Object.assign(this,r)}async countItems(e){throw e}}class UB extends Ti{async countItems(e){for(const r of this.element)await Ai(r,{screen:this.screen}).countItems(e)}}class GB extends Ti{async countItems(e){for(let r=0,a=this.element.config.length;r<a;r++)await Ai(this.element.config[r].items,{screen:this.element}).countItems(e)}}class HB extends Ti{async countItems(e){e.push(this.element);const r=await this.loadScreen(this.element.config.screen);r&&r[0]&&r[0].items&&await Ai(r[0].items,{screen:this.screen}).countItems(e)}async loadScreen(e){try{if(Yn.nestedScreens||(Yn.nestedScreens={}),Yn.nestedScreens["id_"+e])return Yn.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Yn.nestedScreens["id_"+e]=r.data.config,r.data.config}catch{return!1}}}class YB extends Ti{async countItems(e){e.push(this.element),await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class QB extends Ti{async countItems(e){await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class KB extends Ti{async countItems(e){e.push(this.element)}}function Ai(t,e){return t instanceof Array?new UB(t,e):t.config instanceof Array?new GB(t,e):t.component==="FormNestedScreen"?new HB(t,e):t.component==="FormMultiColumn"?new QB(t,e):t.component==="FormLoop"?new YB(t,e):new KB(t,e)}let Or=typeof window>"u"?global:window,Qn=[];class Fa{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);se(this,"data",{});se(this,"insideLoop",!1);this.element=e,Object.assign(this,r)}async addValidations(e){throw e}isVisible(){if(!(this.element.visibleInDevice===null||this.element.visibleInDevice===void 0?!0:this.element.visibleInDevice))return!1;let r=!0;if(this.element.config.conditionalHide)try{r=!!At.evaluate(this.element.config.conditionalHide,this.data)}catch{r=!1}return r}}class JB extends Fa{async addValidations(e){for(const r of this.element)await ha(r,{screen:this.screen,data:this.data,parentVisibilityRule:this.parentVisibilityRule,insideLoop:this.insideLoop}).addValidations(e)}}class ZB extends Fa{async addValidations(e){this.element.config[this.firstPage]&&(Qn=[this.firstPage],await ha(this.element.config[this.firstPage].items,{screen:this.element,data:this.data}).addValidations(e),Qn=[])}}class XB extends Fa{async addValidations(e){if(!this.isVisible())return;const r=await this.loadNestedScreen(this.element.config.screen);if(r&&r.config){const a=r.config;let i=this.parentVisibilityRule?this.parentVisibilityRule:this.element.config.conditionalHide;a&&a[0]&&a[0].items&&await ha(a[0].items,{screen:r,data:this.data,parentVisibilityRule:i}).addValidations(e)}}async loadNestedScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return{config:Or.nestedScreens["id_"+e]};const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,{config:r.data}}async loadScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return Or.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,r.data.config}}class eW extends Fa{async addValidations(e){if(!this.isVisible())return;H.set(e,this.element.config.name,{});const r=H.get(e,this.element.config.name);r.$each={},this.checkForSiblings(e);const a=(H.get(this.data,this.element.config.name)||[{}])[0];await ha(this.element.items,{screen:this.screen,data:{_parent:this.data,...a},parentVisibilityRule:this.element.config.conditionalHide,insideLoop:!0}).addValidations(r.$each)}checkForSiblings(e){const r=[],a=[];if(this.screen.config.forEach(i=>{!i||!i.items||(i.items.filter(n=>{n.component==="FormLoop"&&n.config.name===this.element.config.name&&r.push(n)}),r&&r.forEach(n=>{n.items.filter(s=>{s.config.validation&&s.config.validation.forEach(o=>{const u=this.camelCase(o.value.split(":")[0]),l=nl[u],c={};let d={};d[u]=l,c[s.config.name]=d,H.merge(a,c)})})}))}),Object.keys(a).length!=0){const i=H.get(e,this.element.config.name);i.hasOwnProperty("$each")&&H.merge(i.$each,a),H.set(e[this.element.config.name].$each,i)}}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}class tW extends Fa{async addValidations(e){this.isVisible()&&await ha(this.element.items,{screen:this.screen,data:this.data,parentVisibilityRule:this.element.config.conditionalHide}).addValidations(e)}}class rW extends Fa{async addValidations(e){if(!this.isVisible())return;const r=this.element.config.eventData;let a="Empty Screen";this.screen.config[r]&&this.screen.config[r].name&&(a=this.screen.config[r].name);const i=`${a}-${r}`;Qn.length>0&&!Qn.includes(i)&&this.screen.config[r]&&this.screen.config[r].items&&(Qn.push(i),await ha(this.screen.config[this.element.config.eventData].items,{screen:this.screen,data:this.data}).addValidations(e))}}class aW extends Fa{async addValidations(e){if(this.element.config&&this.element.config.readonly||this.element.config&&this.element.config.disabled||!(this.element.config&&this.element.config.name&&typeof this.element.config.name=="string"&&this.element.config.name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)))return;const r=this.element.config.name,a=this.element.config.validation,i=this.element.config.conditionalHide,n=this.parentVisibilityRule,s=this.insideLoop||!1,o=this.element.config.deviceVisibility?this.element.config.deviceVisibility:{showForDesktop:!0,showForMobile:!0};H.set(e,r,H.get(e,r,{}));const u=H.get(e,r);if(a instanceof Array)a.forEach(l=>{const c=this.camelCase(l.value.split(":")[0]);if(!c)return;let d=nl[c];if(d){if(l.configs instanceof Array){const p=[];l.configs.forEach(v=>{p.push(v.value)}),p.push(r),d=d(...p)}u[c]=function(...p){const v=p[1],_=r.split(".").length-1,h=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_);if(n){const x=s?1:0,b=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_+x);let f=!0;try{f=!!At.evaluate(n,b)}catch{f=!1}if(!f)return!0}let y=!0;try{const x=this.$root.$children[0].$refs.renderer.definition.isMobile;y=x&&o.showForMobile||!x&&o.showForDesktop}catch{y=!0}if(!y)return!0;let S=!0;if(i)try{S=!!At.evaluate(i,h)}catch{S=!1}return S?d.apply(this,p):!0}}});else if(typeof a=="string"&&a){let l=nl[a];if(!l)return;u[a]=function(...c){const d=c[1],p=r.split(".").length-1,v=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p);if(n){const h=s?1:0,y=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p+h);let S=!0;try{S=!!At.evaluate(n,y)}catch{S=!1}if(!S)return!0}let _=!0;if(i)try{_=!!At.evaluate(i,v)}catch{_=!1}return _?l.apply(this,c):!0}}this.element.items&&ha(this.element.items,{screen:this.screen,data:this.data}).addValidations(e)}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}function ha(t,e){return t instanceof Array?new JB(t,e):t.config instanceof Array?new ZB(t,e):t.component==="FormNestedScreen"?new XB(t,e):t.component==="FormMultiColumn"?new tW(t,e):t.component==="FormLoop"?new eW(t,e):(t.component,t.component==="FormButton"&&t.config.event==="pageNavigate"?new rW(t,e):new aW(t,e))}let Kn;const ib={mixins:ov,props:{value:Object,_parent:null,definition:Object,components:{type:Object,default(){return{}}},showErrors:{type:Boolean,default:!1},testScreenDefinition:{type:Boolean,default:!1}},data(){return{references__:[],debugCmp:null,component:null,alias:{},extensions:[],nodeNameProperty:"component",variables:[],variablesTree:[],initialize:[],ownerDocument:window.document,updatedConfigs:[],building:{show:!1,error:"",component:"",errors:[]}}},methods:{dot2bracket(t){return t.replace(/\.\d/g,e=>`[${e.substr(1)}]`)},submit(t,e=!1,r=null){r&&this.loopContext&&(r.loopContext=this.loopContext),this.$emit("submit",this.value,e,r)},buildComponent(t){window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-build-component",this);const e=this.componentDefinition(t);if(!this.testScreenDefinition)return e;const r=this.$root.constructor,a=r.config.warnHandler,i=r.config.errorHandler,n=[];this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;let s;try{r.config.warnHandler=u=>{n.push(u)},r.config.errorHandler=u=>{n.push(u)},s=r.component("ScreenRendered",e);const o=new s({propsData:{vdata:{}}});if(o.$parent=this,o.$mount(),n.length>0)throw this.$t("Building error");return this.codigo=e,e}catch(o){return console.error(o),this.building.error=o,this.building.component=e,this.building.errors=n,this.building.show=!0,e||{template:"<div></div>"}}finally{r.config.warnHandler=a,r.config.errorHandler=i}},parse(t,e){const r=this.ownerDocument.createElement("div");return this.loadPages(e,r,t),"<div>"+r.innerHTML+"</div>"},loadPages(t,e,r){const a=t.config;this.variables.splice(0),this.extensions.forEach(i=>i.beforeload instanceof Function&&i.beforeload.bind(this)({pages:a,owner:e,definition:t})),a.forEach((i,n)=>{if(i){const s=this.createComponent("div",{name:i.name,class:"page","v-if":`currentPage__==${n}`,key:`page-${n}`});this.loadItems(i.items,s,r,t,n),e.appendChild(s)}})},escapeVuePropertyName(t){return t.substr(0,1)==="@"?t.replace("@","v-on:"):this.snakeCase(t)},snakeCase(t){return t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/^-/,"")},camelCase(t){return t.replace(/_\w/g,e=>e.substr(1,1).toUpperCase())},updateComponentConfig(t,e){this.updatedConfigs.push({name:t,properties:e})},mergeUpdatedConfig(t,e){let r=this.updatedConfigs.find(a=>a.name===t);if(r){let a=r.properties;for(let i in a)e[i]===void 0&&(e[i]=a[i])}return e},createComponent(t,e){e=this.mergeUpdatedConfig(t,this.setDefaultPropertyValues(e)),t=this.snakeCase(t);const r=this.ownerDocument.createElement(t);for(let a in e){const i=e[a];i!==!1&&i!==null&&i!==void 0&&(a.substr(0,1)===":"||typeof i=="string"&&i.indexOf("{{")===-1?r.setAttribute(this.escapeVuePropertyName(a),i):typeof i=="string"&&i.indexOf("{{")!==-1&&!e.ignoreMustache?r.setAttribute(":"+this.escapeVuePropertyName(a),"mustache("+this.byValue(i)+")"):i!==void 0&&r.setAttribute(":"+this.escapeVuePropertyName(a),this.byRef(i)))}return r},byValue(t){return JSON.stringify(t).replace("{{","{{").replace("}}","}}")},byRef(t){const r=`references__[${this.references__.indexOf(t)>-1?this.references__.indexOf(t):this.references__.length}]`;return this.references__.push(t),r},loadItems(t,e,r,a,i){t.forEach(n=>{const s=n[this.nodeNameProperty],o=this.alias[s]||s,u={...n.config};this.extensions.forEach(d=>d.onloadproperties instanceof Function&&d.onloadproperties.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,screen:r,definition:a,formIndex:i}));const l=this.createComponent(o,u),c=this.ownerDocument.createElement("div");c.appendChild(l),this.extensions.forEach(d=>d.onloaditems instanceof Function&&d.onloaditems.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,node:l,wrapper:c,screen:r,definition:a,formIndex:i})),e.appendChild(c)})},setDefaultPropertyValues(t){let e={...t};return(typeof e.ariaLabel>"u"||e.ariaLabel===null||e.ariaLabel==="")&&e.label&&(e.ariaLabel=e.label),e.tabindex&&(e.tabindex=parseInt(e.tabindex)),e},validVariableName(t){return t&&typeof t=="string"&&t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)},isComputedVariable(t,e){return e.computed&&e.computed.some(r=>new RegExp(`^${r.property}(\\.|$)`,"i").test(t))},registerVariable(t,e={}){if(t&&t.startsWith("_parent.")||t&&t.includes("._parent.")||!this.validVariableName(t))return;const r=H.get(e,"config",{});this.variables.find(i=>i.name===t)||(this.variables.push({name:t,config:r,element:e}),this.variablesTree.push({name:t,config:r,element:e}))},registerNestedVariable(t,e,r){const a=Kn.getVariablesTree(r);this.variablesTree.push({name:t,prefix:e,config:{},items:a}),Kn.getVariablesTree({config:[]})},getVariablesTree(t){let e;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},data:{},watch:{},mounted:[]},this.variablesTree=[];const r=this.parse(e,t);return this.extensions.forEach(a=>{a.onparse instanceof Function&&a.onparse.bind(this)({screen:e,template:r,definition:t})}),this.variablesTree}catch(r){return console.error(r),this.variablesTree}},elementCssClass(t){const e=[];return t.config.bgcolor&&e.push(t.config.bgcolor),t.config.color&&e.push(t.config.color),e.join(" ")},componentDefinition(t){let e;this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},created:[],data:{},watch:{},mounted:[]};const r=this.parse(e,t);this.extensions.forEach(n=>{n.onparse instanceof Function&&n.onparse.bind(this)({screen:e,template:r,definition:t})}),e.template=r,this.extensions.forEach(n=>{n.onbuild instanceof Function&&n.onbuild.bind(this)({screen:e,definition:t})});const a=["currentPage__"],i=`let value;const data = {};
269
269
  ${Object.keys(e.data).map(n=>{const{code:s,variable:o}=e.data[n];return`value = ${s};
270
270
  data.${this.safeDotName(n)} = value;
271
271
  ${!o||a.includes(o)||o.endsWith("__")?"":`this.setValue(${JSON.stringify(o)}, value, this.vdata);`}`}).join(`
@@ -341,5 +341,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
341
341
  content: $t(element.popoverContent),
342
342
  customClass: 'custom-popover',
343
343
  boundaryPadding: 16
344
- }`,modifiers:{hover:!0,right:!0}}],key:o,staticClass:"gray-text",attrs:{boundary:"viewport","data-cy":`controls-${s.component}`}},[s.config&&s.config.icon?r("i",{class:s.config.icon}):e._e(),r("span",{staticClass:"svg-icon",staticStyle:{width:"12px",height:"12px"},domProps:{innerHTML:e._s(s.config.svg)}}),e._v(" "+e._s(e.$t(s.label))+" ")])}),1):e._e()],1)],1)]})],2)],1)],1),r("b-col",{ref:"screen-container",staticClass:"overflow-auto mh-100 p-0 d-flex flex-column position-relative",attrs:{id:"screen-container"}},[r("tabs-bar",{ref:"tabsBar",attrs:{pages:e.config},on:{"tab-opened":function(a){e.currentPage=a}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(a){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(a){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:a}){return[e.isCurrentPageEmpty(a)?r("div",{staticClass:"d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column",attrs:{"data-cy":"screen-drop-zone"}},[r("svg",{attrs:{width:"81",height:"107",viewBox:"0 0 81 107",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z",fill:"#699CFF"}})]),r("h3",[e._v(e._s(e.$t("Place your controls here.")))]),r("p",[e._v(" "+e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left."))+" ")])]):e._e(),e.renderControls?r("draggable",e._b({key:e.editorContentKey,staticClass:"h-100",attrs:{"data-cy":"editor-content","ghost-class":"form-control-ghost",value:e.config[a].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[a].items,function(i,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===i,hasError:e.hasError(i)},attrs:{selector:i.config.customCssSelector},on:{click:function(s){return e.inspect(i)}}},[i.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(i)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(i)}}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(i)&&e.aiPreview(i)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||i.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{"data-test":"apply-ai-btn",title:e.$t("Apply Changes")},on:{click:function(s){return e.applyAiChanges(i)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(i)&&e.aiPreview(i)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"data-test":"copy-control-btn",title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"data-test":"delete-control-btn",title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:i.config,"ai-element":i},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:i.items,callback:function(s){e.$set(i,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1},on:{input:function(s){i.config.interactive&&(i.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",i.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(a)?e._e():r("div",{attrs:{"data-cy":"screen-drop-zone"}},[e._v("   ")])]}}])})],1),e.renderControls?r("b-col",{staticClass:"overflow-hidden h-100 p-0 inspector-column"},[r("b-card",{staticClass:"p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0",attrs:{"no-body":""}},[r("b-card-body",{staticClass:"p-0 h-100 overflow-auto"},[e._l(e.accordions,function(a){return[e.getInspectorFields(a)&&e.getInspectorFields(a).length>0?r("b-button",{key:`${e.accordionName(a)}-button`,staticClass:"text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none",attrs:{variant:"outline","data-cy":`accordion-${e.accordionName(a).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(a).replace(" ","")}`,"is-open":a.open?"1":"0"},on:{click:function(i){return e.toggleAccordion(a)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(a)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!a.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(a)}-collapse`,attrs:{id:e.accordionName(a)},model:{value:a.open,callback:function(i){e.$set(a,"open",i)},expression:"accordion.open"}},e._l(e.getInspectorFields(a),function(i,n){return r(i.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(i.field||i.config.name),"field-name":i.field,"field-accordion":`accordion-${e.accordionName(a).replace(" ","")}`,builder:e.builder,"form-config":e.config,"screen-type":e.screenType,"current-page":e.currentPage,"selected-control":e.selected},on:{"update-state":e.updateState,setName:function(s){e.inspection.config.name=s}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}},model:{value:e.inspection.config[i.field],callback:function(s){e.$set(e.inspection.config,i.field,s)},expression:"inspection.config[item.field]"}},"component",i.config,!1))}),1)]})],2)],1)],1):e._e(),r("b-modal",{ref:"openSortable",attrs:{id:"openSortable","header-close-content":"&times;",role:"dialog",size:"lg",title:e.$t("Edit Pages"),"ok-title":e.$t("DONE"),"ok-only":"","ok-variant":"secondary","header-class":"modal-header-custom"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Edit Pages")))]),r("span",{staticClass:"modal-subtitle"},[e._v(e._s(e.$t("Change pages order and name")))])]},proxy:!0},{key:"modal-header-close",fn:function({close:a}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(i){return a()}}},[e._v("×")])]}}])},[r("Sortable",{attrs:{items:e.config,"filter-key":"name"},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(a){return e.$bvModal.show("addPageModal")}}})],1),r("b-modal",{ref:"addPageModal",attrs:{id:"addPageModal","header-class":"pb-2",size:"lg","ok-title":e.$t("SAVE"),"cancel-title":e.$t("CANCEL"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;","data-cy":"add-page-modal","ok-disabled":!e.addPageName||!!e.checkPageName(e.addPageName)},on:{ok:e.addPage,show:function(a){e.addPageName="",e.showAddPageValidations=!1}},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Create New Page")))]),r("small",{staticClass:"modal-subtitle mb-n2"},[e._v(e._s(e.$t("Create a new page in your screen")))])]},proxy:!0}])},[r("form-input",{ref:"addPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The name of the new page to add"),error:e.checkPageName(e.addPageName),"data-cy":"add-page-name","aria-required":"true"},model:{value:e.addPageName,callback:function(a){e.addPageName=a},expression:"addPageName"}})],1),r("b-modal",{ref:"editPageModal",attrs:{title:e.$t("Edit Page Title"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.editPage}},[r("required"),r("form-input",{ref:"editPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The new name of the page"),validation:"required",error:e.checkPageName(e.editPageName),required:"","aria-required":"true"},model:{value:e.editPageName,callback:function(a){e.editPageName=a},expression:"editPageName"}})],1),r("b-modal",{ref:"confirm",attrs:{title:e.$t("Caution!"),"ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.deletePage,cancel:e.hideConfirmModal}},[r("p",[e._v(e._s(e.confirmMessage))]),r("div",{attrs:{slot:"modal-ok"},slot:"modal-ok"},[e._v(e._s(e.$t("Delete")))])])],1)},MK=[],$K=oe(OK,EK,MK,!1,null,"fdf4961e",null,null);const Vx=$K.exports,PK=1,DK={name:"FormMultiColumn",mixins:[gn,sb,$c],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Oa,FormInput:Ba,FormSelectList:ee.FormSelectList,FormTextArea:ee.FormTextArea,FormCheckbox:ee.FormCheckbox,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},data(){return{items:[]}},computed:{model(){return this.$parent.model}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},methods:{classColumn(t){let e=PK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e} ${this.columnVerticalAlign(t)}`},columnVerticalAlign(t){let e="";if(this.items.length>0&&this.items[t].length===1){let r=this.items[0].filter(n=>n.component==="FormText");if(r.length===0)return"";let a=r[0],i=" justify-content-"+(a.config.textAlign==="right"?"end":a.config.textAlign);switch(a.config.verticalAlign){case"top":e="d-flex align-items-start"+i;break;case"middle":e="d-flex align-items-center"+i;break;case"bottom":e="d-flex align-items-end"+i;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var IK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"column-draggable",class:e.classColumn(i)},[e._l(a.filter(e.shouldElementBeVisible),function(n,s){return[n.container?r(n.component,{key:s,ref:"container",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{transientData:e.transientData,config:n.config,name:n.config.name!==void 0?n.config.name:null,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}}):r("div",{key:s,staticClass:"w-100",attrs:{id:n.config.name?n.config.name:void 0,selector:n.config.customCssSelector}},[r(n.component,e._b({ref:"elements",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{validationData:e.transientData,disabled:n.config.interactive||n.config.disabled,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:e.model[e.getValidPath(n.config.name)],callback:function(o){e.$set(e.model,e.getValidPath(n.config.name),o)},expression:"model[getValidPath(element.config.name)]"}},"component",n.config,!1))],1)]})],2)}),0)])},zK=[],LK=oe(DK,IK,zK,!1,null,null,null,null);const mu=LK.exports,Ux={value:"string",content:"Text"},Gx={value:"int",content:"Integer"},jK={value:"currency",content:"Currency"},NK={value:"password",content:"Password"},RK={value:"percentage",content:"Percentage"},Hx={value:"float",content:"Decimal"},Yx={value:"datetime",content:"Datetime"},Qx={value:"date",content:"Date"},FK={value:"boolean",content:"Boolean"},qK=[Ux,Gx,jK,RK,Hx,Yx,Qx,NK],BK=[Ux,Gx,Hx];function gu(t){return{type:"FormMultiselect",field:"dataFormat",config:{label:"Data Type",name:"Data Type",helper:"The data type specifies what kind of data is stored in the variable.",validation:"required",options:t}}}function WK(){return{type:nf,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const Kx=gu(qK),VK=gu(BK),UK=gu([FK]),Jx=gu([Qx,Yx]),Zx=WK(),GK=[{editorComponent:ee.FormHtmlEditor,editorBinding:"FormHtmlEditor",rendererComponent:ee.FormHtmlEditor,rendererBinding:"FormHtmlEditor",control:{popoverContent:"Use a Rich Text Editor to add HTML-formatted",order:1,group:"Content Fields",label:"Rich Text",component:"FormHtmlViewer","editor-component":"FormHtmlEditor","editor-control":"FormHtmlEditor",config:{icon:"fas fa-pencil-ruler",interactive:!0,content:"<p>Rich text editor</p>",renderVarHtml:null},inspector:[{type:"FormTextArea",field:"content",config:{rows:5,label:"Content",helper:"The HTML text to display",value:""}},{type:"FormCheckbox",field:"renderVarHtml",config:{label:"Render HTML from a Variable",helper:"",value:""}}]}},{builderComponent:ee.FormInput,builderBinding:"FormInput",rendererComponent:Ba,rendererBinding:"FormMaskedInput",control:{popoverContent:"Collect a string of text and format it as one of several data types",order:1,group:"Input Fields",label:"Line Input",component:"FormInput","editor-component":"FormInput","editor-control":"FormInput",config:{icon:"far fa-square",label:"New Input",name:"",placeholder:"",validation:"",helper:null,type:"text",dataFormat:"string"},inspector:[Yt,Br,Kx,Zx,Ra,Nn,Si,al,ua,la,Rn]}},{editorComponent:ee.FormTextArea,editorBinding:"FormTextArea",rendererComponent:ee.FormTextArea,rendererBinding:"FormTextArea",control:{popoverContent:"Collect a multi-line string of text, to allow for extensive, richly formatted responses",order:4,group:"Input Fields",label:"Textarea",component:"FormTextArea","editor-component":"FormTextArea","editor-control":"FormTextArea","fa-icon":"fas fa-paragraph",config:{icon:"fas fa-paragraph",label:"New Textarea",placeholder:"",helper:null,rows:2,richtext:!1,currency:{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"}},inspector:[Yt,Br,Nn,Si,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Ra,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},al,ua,la,Rn]}},{editorComponent:ee.FormSelectList,editorBinding:"FormSelectList",rendererComponent:ee.FormSelectList,rendererBinding:"FormSelectList",control:{popoverContent:"Collect options from a list, as radio butttons or dropdowns",order:2,group:"Input Fields",label:"Select List",component:"FormSelectList","editor-component":"FormSelectList","editor-control":"FormSelectList",config:{icon:"fas fa-angle-double-down",label:"New Select List",placeholder:"",validation:"",dataSourceUrl:"",dataSourceEndpoint:"",rootElement:"response",options:{showRenderAs:!0,dataSource:ea.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Yt,Br,Nn,Ra,Si,{type:"OptionsList",field:"options",config:{}},ua,la,Rn,al]}},{editorComponent:ee.FormCheckbox,editorBinding:"FormCheckbox",rendererComponent:ee.FormCheckbox,rendererBinding:"FormCheckbox",control:{popoverContent:"Add a checkbox or toggle for true/false responses",order:6,group:"Input Fields",label:"Checkbox",component:"FormCheckbox","editor-component":"FormCheckbox","editor-control":"FormCheckbox",config:{icon:"fas fa-check-square",label:"New Checkbox",helper:null,name:null,initiallyChecked:!1,validation:"",toggle:!1},inspector:[Yt,Br,Si,Ra,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ua,la,ev,td]}},{editorComponent:ee.FormDatePicker,editorBinding:"FormDatePicker",rendererComponent:ee.FormDatePicker,rendererBinding:"FormDatePicker",control:{popoverContent:"Collect a date or date/time",order:5,group:"Input Fields",label:"Date Picker",component:"FormDatePicker","editor-component":"FormDatePicker","editor-control":"FormDatePicker",config:{icon:"far fa-calendar-alt",label:"New Date Picker",type:"datetime",name:"",placeholder:"",minDate:"",maxDate:""},inspector:[{type:"FormInput",field:"minDate",config:{name:"Minimum Date",label:"Minimum Date",validation:"date_or_mustache"}},{type:"FormInput",field:"maxDate",config:{name:"Maximum Date",label:"Maximum Date",validation:"after_min_date|date_or_mustache"}},Yt,Br,Jx,Ra,Nn,Si,ua,la,td,Rn]}},{editorComponent:qa,editorBinding:"FormButton",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add special buttons that link between subpages within this Form",order:1,group:"Navigation",label:"Page Navigation",component:"FormButton","editor-component":"FormButton","editor-control":"PageNavigation",config:{icon:"far fa-compass",label:"Page Navigation",variant:"primary",event:"pageNavigate",eventData:null},inspector:[{type:"PageSelect",field:"eventData",config:{label:"Destination Screen",helper:"The destination page to navigate to"}},Xg,rd]}},{editorComponent:mu,editorBinding:"FormMultiColumn",rendererComponent:mu,rendererBinding:"FormMultiColumn",control:{popoverContent:"Organize and group your content in columns",order:2,group:"Content Fields",label:"Multicolumn / Table",component:"FormMultiColumn","editor-component":"MultiColumn","editor-control":"MultiColumn",container:!0,items:[[],[]],config:{icon:"fas fa-table",options:[{value:"1",content:"6"},{value:"2",content:"6"}]},inspector:[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}},ua,la]}},{editorComponent:xs,editorBinding:"FormLoop",rendererComponent:xs,rendererBinding:"FormLoop",control:{popoverContent:"Add a repeatable section of content",order:5,group:"Content Fields",label:"Loop",component:"FormLoop","editor-component":"Loop","editor-control":"Loop",container:!0,items:[],config:{name:"",icon:"fas fa-redo",settings:{type:"new",varname:"loop",times:"3",add:!1}},inspector:[{type:"LoopInspector",field:"settings",config:{}}]}},{editorComponent:hu,editorBinding:"FormText",rendererComponent:fu,rendererBinding:"FormRecordList",control:{popoverContent:"Format content in a table structure and allow for adding rows",order:4,group:"Content Fields",label:"Record List",component:"FormRecordList","editor-component":"FormText","editor-control":"FormRecordList",config:{name:"",icon:"fas fa-th-list",label:"New Record List",editable:!1,fields:{dataSource:ea.provideData,jsonData:""},form:""},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"List Label",helper:"The label describes this record list"}},{type:"FormCheckbox",field:"editable",config:{label:"Editable?",helper:"Should records be editable/removable and can new records be added"}},{type:"ColumnSetup",field:"fields",config:{label:"Columns",helper:"List of columns to display in the record list"}},{type:"PageSelect",field:"form",config:{label:"Record Form",helper:"The form to use for adding/editing records"}},ua,la]}},{editorComponent:Jn,editorBinding:"FormImage",rendererComponent:Jn,rendererBinding:"FormImage",control:{popoverContent:"Upload an image to your screen",order:3,group:"Content Fields",label:"Image",component:"FormImage","editor-component":"FormImage","editor-control":"FormImage",config:{label:"Image",icon:"fas fa-image",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"name",config:{label:"Name",helper:"Image name"}},{type:"ImageUpload",field:"image",config:{label:"Upload",helper:"Upload image"}},{type:"ImageVariable",field:"imageName",config:{label:"Render from a variable name",helper:null}},{type:"FormInput",field:"height",config:{label:"Height",helper:"Image height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"image width",type:"number"}}]}},{editorComponent:yn,editorBinding:"FormAvatar",rendererComponent:yn,rendererBinding:"FormAvatar",control:{popoverContent:"User avatar",order:3,group:"Dashboards",label:"User Avatar",component:"FormAvatar","editor-component":"FormAvatar","editor-control":"FormAvatar",config:{label:"User Avatar",icon:"fas fa-user-circle",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"height",config:{label:"Height",helper:"Avatar height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"Avatar width",type:"number"}}]}},{editorComponent:qa,editorBinding:"FormSubmit",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add an action to submit your form or update a field",order:3,group:"Input Fields",label:"Submit Button",component:"FormButton","editor-component":"FormButton","editor-control":"FormSubmit",config:{icon:"fas fa-share-square",label:"New Submit",variant:"primary",event:"submit",loading:!1,loadingLabel:"Loading...",defaultSubmit:!0,name:null,fieldValue:null,tooltip:{}},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"name",config:{label:"Variable Name",name:"Variable Name",helper:"A variable name is a symbolic name to reference information.",validation:"regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(?<![.])$/|not_in:"+rl}},tv,av,iv,rv,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},rd]}},{editorComponent:ks,editorBinding:"FormNestedScreen",rendererComponent:ks,rendererBinding:"FormNestedScreen",control:{popoverContent:"Add and reuse another Form within this Form",order:6,group:"Content Fields",label:"Nested Screen",component:"FormNestedScreen","editor-component":"FormNestedScreen","editor-control":"FormNestedScreen",config:{label:"Nested Screen",icon:"fas fa-file-invoice",variant:"primary",name:"Nested Screen",value:null},inspector:[{type:"ScreenSelector",field:"screen",config:{label:"Screen",name:"SelectScreen","validate-nested":!1,helper:"Select a screen"}}]}},{rendererComponent:bn,rendererBinding:"FileUpload",builderComponent:bn,builderBinding:"FileUpload",control:{group:"Files",popoverContent:"Collect files uploaded into the Form",order:1,label:"File Upload",component:"FileUpload","editor-component":"FileUpload","editor-control":"FileUpload",config:{label:"New File Upload",icon:"fas fa-file-upload"},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the field's name"}},{type:"MultipleUploadsCheckbox",field:"multipleUpload",config:{label:"Upload multiple files"}},{type:"FormInput",field:"accept",config:{label:"File Accepted",helper:"Common file types: application/msword, image/gif, image/jpeg, application/pdf, application/vnd.ms-powerpoint, application/vnd.ms-excel, text/plain"}},{type:"RequiredCheckbox",field:"validation",config:{label:"Required",helper:"Prevent form from being submitted unless a file is uploaded"}}]}},{rendererComponent:hu,rendererBinding:"FormText",builderComponent:Xs,builderBinding:"FileDownload",control:{popoverContent:"Offer a File download",order:2,group:"Files",label:"File Download",component:"FileDownload","editor-component":"FormText","editor-control":"FileDownload",config:{label:"New File Download",icon:"fas fa-file-download"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The text to display"}},{type:"FormInput",field:"name",config:{label:"Name",helper:"The name of the Download"}}]}},{rendererComponent:ee.BFormComponent,rendererBinding:"BFormComponent",builderComponent:ee.BFormComponent,builderBinding:"BFormComponent",control:{popoverContent:"Add one of several Bootstrap Vue components",order:1,group:"Advanced",label:"Bootstrap Component",component:"BFormComponent","editor-component":"BFormComponent","editor-control":"BFormComponent",config:{bootstrapComponent:"b-form-tags",bootstrapConfig:"{}",label:"New Bootstrap Component",icon:"fab fa-bootstrap"},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-embed",content:"Embed"},{value:"b-img",content:"Image"},{value:"b-form-rating",content:"Form Rating"},{value:"b-form-spinbutton",content:"Form Spinbutton"},{value:"b-form-tags",content:"Form Tags"},{value:"b-form-timepicker",content:"Form Timepicker"},{value:"b-table",content:"Table"}]}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}},Ra]}},{rendererComponent:ee.BWrapperComponent,rendererBinding:"BWrapperComponent",builderComponent:ee.BWrapperComponent,builderBinding:"BWrapperComponent",control:{popoverContent:"Wrap an existing subpage within this Form into a Bootstrap Vue component",order:2,group:"Advanced",label:"Bootstrap Wrapper",component:"BWrapperComponent","editor-component":"BWrapperComponent","editor-control":"BWrapperComponent",config:{bootstrapComponent:"b-modal",bootstrapConfig:"{}",label:"New Bootstrap Wrapper",icon:"fab fa-bootstrap",name:"",form:""},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-alert",content:"Alert"},{value:"b-card",content:"Card"},{value:"b-collapse",content:"Collapse"},{value:"b-jumbotron",content:"Jumbotron"},{value:"b-modal",content:"Modal"}]}},{type:"PageSelect",field:"form",config:{label:"Page",helper:"The page to use inside the component"}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}}]}},{editorComponent:_s,editorBinding:"FormListTable",rendererComponent:_s,rendererBinding:"FormListTable",control:{popoverContent:"Create List Table",order:6.5,group:"Dashboards",label:"List Table",component:"FormListTable","editor-component":"FormListTable","editor-control":"FormListTable",config:{label:"List Table",icon:"fas fa-list",variant:"primary"},inspector:[{type:"FormMultiselect",field:"listOption",config:{icon:"fas fa-list",label:"List Table",options:[{value:"My Tasks",content:"My Tasks"},{value:"My Requests",content:"My Requests"},{value:"Start New Request",content:"Start New Request"}]}}]}},{editorComponent:ws,editorBinding:"FormAnalyticsChart",rendererComponent:ws,rendererBinding:"FormAnalyticsChart",control:{popoverContent:"Add a chart from the Analytics Reports",order:6,group:"Dashboards",label:"Analytics Chart",component:"FormAnalyticsChart","editor-component":"FormAnalyticsChart","editor-control":"FormAnalyticsChart",config:{label:"Analytics Chart",icon:"fas fa-chart-area",variant:"primary"},inspector:[{type:"AnalyticsSelector",field:"listChartOption",config:{label:"Chart"}}]}}],HK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDEwNC41MTNDMzkuMTE0OSA5MS45MDIxIDU2LjIzMDQgNTcuNjcxNSA4NS4wNTYyIDczLjg4NloiIGZpbGw9IiNERUVFRkEiLz4KPHBhdGggZD0iTTIwNS41OTIgMTI0LjIzNUMyMDcuMjA2IDEyNC44MzUgMjA4Ljk2OSAxMjQuODc1IDIxMC42NDcgMTI0LjQ4OUMyMTcuNjc3IDEyMi44NzYgMjQxLjg1IDExOC42MDMgMjM3LjY1IDEzNy4zMzVDMjM2LjczNSAxNDEuMDUxIDIyMi41NzggMTYxLjg2NCAyNDIuNzM5IDE2OS40NjJDMjQ0LjIxNyAxNzAuMDI2IDI0NS43NzkgMTcwLjMzNCAyNDcuMzYgMTcwLjM3MkMyNTMuNTY4IDE3MC41IDI2NS44NjkgMTY5LjAzNCAyNzEuMDE3IDE2My43OTRDMjc3LjIzNyAxNTcuNDYzIDI3MC40NDIgMTYwLjQ2NSAyNzAuNDQyIDE2MC40NjVDMjcwLjQ0MiAxNjAuNDY1IDI0Ni43OTggMTcwLjc4MyAyMzguNDQ2IDE1OS44MzZDMjM3LjUxNyAxNTguNjE4IDIzNi45MjUgMTU2Ljg0OSAyMzYuNzU2IDE1NS4zMjZDMjM2LjQ2MiAxNTIuNjg2IDIzNy42MzQgMTQ5LjE5NyAyMzkuMTc0IDE0Ni4xNTlDMjQxLjI1OSAxNDIuMDQ4IDI1MS4yNjYgMTIzLjU1NSAyMjkuNTM5IDExOC4xNjhDMjI0LjUzMyAxMTYuOTc2IDIxNy4yNjMgMTE1LjkwNiAyMDcuODkgMTE5Ljg1MkMyMDIuNDIyIDEyMi4xNTQgMjAzLjYzMyAxMjMuNTA3IDIwNS41OTIgMTI0LjIzNVoiIGZpbGw9IiNCQ0RDRjgiLz4KPHBhdGggZD0iTTIxMC40MyAxMTcuMzMxTDIwNC4xMzcgMTE5LjY4N0MyMDEuOTY1IDEyMC41IDIwMC44NjMgMTIyLjkyIDIwMS42NzYgMTI1LjA5MkwyMDEuOTg4IDEyNS45MjZDMjAyLjgwMSAxMjguMDk4IDIwNS4yMjEgMTI5LjIgMjA3LjM5MyAxMjguMzg3TDIxMy42ODcgMTI2LjAzMkMyMTUuODU5IDEyNS4yMTkgMjE2Ljk2MSAxMjIuNzk5IDIxNi4xNDggMTIwLjYyNkwyMTUuODM2IDExOS43OTNDMjE1LjAyMyAxMTcuNjIgMjEyLjYwMyAxMTYuNTE4IDIxMC40MyAxMTcuMzMxWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTcxLjgwMSAxMjQuMTQ3TDE1MS4wNDYgMTMxLjkxNEMxNDkuOTYgMTMyLjMyMSAxNDkuNDA5IDEzMy41MzEgMTQ5LjgxNSAxMzQuNjE3TDE0OS44OTcgMTM0LjgzNkMxNTAuMzAzIDEzNS45MjIgMTUxLjUxMyAxMzYuNDczIDE1Mi42IDEzNi4wNjZMMTczLjM1NSAxMjguMjk5QzE3NC40NDEgMTI3Ljg5MiAxNzQuOTkyIDEyNi42ODIgMTc0LjU4NSAxMjUuNTk2TDE3NC41MDMgMTI1LjM3N0MxNzQuMDk3IDEyNC4yOTEgMTcyLjg4NyAxMjMuNzQgMTcxLjgwMSAxMjQuMTQ3WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTc3LjU5MyAxMzkuNjI0TDE1Ni44MzggMTQ3LjM5MUMxNTUuNzUyIDE0Ny43OTggMTU1LjIwMSAxNDkuMDA4IDE1NS42MDggMTUwLjA5NEwxNTUuNjg5IDE1MC4zMTNDMTU2LjA5NiAxNTEuMzk5IDE1Ny4zMDYgMTUxLjk1IDE1OC4zOTIgMTUxLjU0M0wxNzkuMTQ3IDE0My43NzZDMTgwLjIzMyAxNDMuMzY5IDE4MC43ODQgMTQyLjE1OSAxODAuMzc4IDE0MS4wNzNMMTgwLjI5NiAxNDAuODU0QzE3OS44OSAxMzkuNzY4IDE3OC42NzkgMTM5LjIxNyAxNzcuNTkzIDEzOS42MjRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xOTYuNzU1IDExMy41ODVMMTc5LjkzNCAxMTkuODhDMTc3Ljc2MSAxMjAuNjkzIDE3Ni42NTkgMTIzLjExNCAxNzcuNDcyIDEyNS4yODZMMTgzLjIxNiAxNDAuNjMxQzE4NC4wMjkgMTQyLjgwMyAxODYuNDQ5IDE0My45MDUgMTg4LjYyMSAxNDMuMDkyTDIwNS40NDMgMTM2Ljc5N0MyMDcuNjE1IDEzNS45ODQgMjA4LjcxNyAxMzMuNTY0IDIwNy45MDQgMTMxLjM5MUwyMDIuMTYxIDExNi4wNDZDMjAxLjM0OCAxMTMuODc0IDE5OC45MjggMTEyLjc3MiAxOTYuNzU1IDExMy41ODVaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xODEuNjcyIDExNy42MUwxNjQuODUgMTIzLjkwNkMxNjIuNjc4IDEyNC43MTkgMTYxLjU3NiAxMjcuMTM5IDE2Mi4zODkgMTI5LjMxMkwxNjkuMjQxIDE0Ny42MTlDMTcwLjA1NCAxNDkuNzkxIDE3Mi40NzQgMTUwLjg5MyAxNzQuNjQ2IDE1MC4wOEwxOTEuNDY4IDE0My43ODVDMTkzLjY0IDE0Mi45NzIgMTk0Ljc0MiAxNDAuNTUxIDE5My45MjkgMTM4LjM3OUwxODcuMDc3IDEyMC4wNzJDMTg2LjI2NCAxMTcuODk5IDE4My44NDQgMTE2Ljc5NyAxODEuNjcyIDExNy42MVoiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTE4NC4zMDUgMTEzLjg5NUwxODQuMTczIDExMy45NDRDMTgyLjcyNSAxMTQuNDg2IDE4MS45OSAxMTYuMSAxODIuNTMyIDExNy41NDhMMTkyLjEzMSAxNDMuMTk1QzE5Mi42NzMgMTQ0LjY0MyAxOTQuMjg2IDE0NS4zNzggMTk1LjczNCAxNDQuODM2TDE5NS44NjYgMTQ0Ljc4NkMxOTcuMzE1IDE0NC4yNDQgMTk4LjA0OSAxNDIuNjMxIDE5Ny41MDcgMTQxLjE4MkwxODcuOTA5IDExNS41MzZDMTg3LjM2NyAxMTQuMDg4IDE4NS43NTMgMTEzLjM1MyAxODQuMzA1IDExMy44OTVaIiBmaWxsPSIjMTU3MkMyIi8+CjxwYXRoIGQ9Ik0xMi43ODE2IDEzMC4yOTJDMTIuNzgxNiAxMzAuMjkyIDQ2LjU2NDggMTIwLjc5OCA0MS42NiAxNDIuNjcyQzQwLjgwODMgMTQ2LjEzMyAyOC41NDcyIDE2My45NTMgNDMuMTUyIDE3Mi41MDlDNDYuMjg4IDE3NC4zNDYgNDkuOTA3IDE3NS4xNiA1My41NDEzIDE3NS4xNDFDNjAuMDU3MyAxNzUuMTA3IDcwLjM4NzIgMTczLjg1MyA3NS4wMjc4IDE2OS4xM0M4MS4yNDcxIDE2Mi43OTkgNzQuNDUyNiAxNjUuODAxIDc0LjQ1MjYgMTY1LjgwMUM3NC40NTI2IDE2NS44MDEgNTUuMDUwNCAxNzMuNzgyIDQ1LjA2ODcgMTY3LjQyQzQxLjY2MDQgMTY1LjI0OCA0MC4xMTU1IDE2MS4wNDIgNDEuMDQxMSAxNTcuMTA3QzQxLjUxNDEgMTU1LjE1MyA0Mi4yMzQ1IDE1My4yNjcgNDMuMTg0NyAxNTEuNDk1QzQ1LjM1NTYgMTQ3LjQyOSA1NS4yNzY4IDEyOC44OTEgMzMuNTQ4OCAxMjMuNTA0QzI4LjU0MzYgMTIyLjMxMiAyMS4yNzM4IDEyMS4yNDIgMTEuOTAwMSAxMjUuMTg4QzIuNTI2MzcgMTI5LjEzNSAxMi43ODE2IDEzMC4yOTIgMTIuNzgxNiAxMzAuMjkyWiIgZmlsbD0iI0JDRENGOCIvPgo8cGF0aCBkPSJNNzkuNTcwNCAxNjAuOTA2TDczLjI3NzIgMTYzLjI2MkM3MS4xMDQ4IDE2NC4wNzUgNzAuMDAyOCAxNjYuNDk1IDcwLjgxNTggMTY4LjY2N0w3MS4xMjc4IDE2OS41MDFDNzEuOTQwOCAxNzEuNjczIDc0LjM2MTEgMTcyLjc3NSA3Ni41MzM1IDE3MS45NjJMODIuODI2OCAxNjkuNjA3Qzg0Ljk5OTIgMTY4Ljc5NCA4Ni4xMDEyIDE2Ni4zNzQgODUuMjg4MSAxNjQuMjAxTDg0Ljk3NjIgMTYzLjM2OEM4NC4xNjMxIDE2MS4xOTUgODEuNzQyOSAxNjAuMDkzIDc5LjU3MDQgMTYwLjkwNloiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTkwLjIwMzEgMTUwLjU1Mkw4MC44NzYyIDE1NC4wNDNDNzguNzAzNyAxNTQuODU2IDc3LjYwMTcgMTU3LjI3NiA3OC40MTQ4IDE1OS40NDlMODIuOTEyMiAxNzEuNDY1QzgzLjcyNTMgMTczLjYzOCA4Ni4xNDU1IDE3NC43NCA4OC4zMTc5IDE3My45MjdMOTcuNjQ0OCAxNzAuNDM2Qzk5LjgxNzMgMTY5LjYyMyAxMDAuOTE5IDE2Ny4yMDMgMTAwLjEwNiAxNjUuMDNMOTUuNjA4OCAxNTMuMDEzQzk0Ljc5NTcgMTUwLjg0MSA5Mi4zNzU1IDE0OS43MzkgOTAuMjAzMSAxNTAuNTUyWiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTA1LjczIDE0MS4zTDkxLjgyMTMgMTQ2LjUwNkM4OS42NDg5IDE0Ny4zMTkgODguNTQ2OSAxNDkuNzM5IDg5LjM2IDE1MS45MTJMOTYuMjExNyAxNzAuMjE5Qzk3LjAyNDggMTcyLjM5MiA5OS40NDUgMTczLjQ5NCAxMDEuNjE3IDE3Mi42OEwxMTUuNTI2IDE2Ny40NzVDMTE3LjY5OSAxNjYuNjYyIDExOC44MDEgMTY0LjI0MiAxMTcuOTg4IDE2Mi4wNjlMMTExLjEzNiAxNDMuNzYyQzExMC4zMjMgMTQxLjU4OSAxMDcuOTAzIDE0MC40ODcgMTA1LjczIDE0MS4zWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTA4LjY3NyAxMzcuNTA5TDEwOC41NDUgMTM3LjU1OEMxMDcuMDk2IDEzOC4xIDEwNi4zNjIgMTM5LjcxNCAxMDYuOTA0IDE0MS4xNjJMMTE2LjUwMiAxNjYuODA5QzExNy4wNDQgMTY4LjI1NyAxMTguNjU4IDE2OC45OTIgMTIwLjEwNiAxNjguNDVMMTIwLjIzOCAxNjguNEMxMjEuNjg2IDE2Ny44NTggMTIyLjQyMSAxNjYuMjQ1IDEyMS44NzkgMTY0Ljc5NkwxMTIuMjggMTM5LjE1QzExMS43MzggMTM3LjcwMiAxMTAuMTI1IDEzNi45NjcgMTA4LjY3NyAxMzcuNTA5WiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTQ0LjE5NCAxMjEuMTdDMTQzLjY5MyAxMjEuMTE0IDE0My4yMzMgMTIwLjg2NyAxNDIuOTExIDEyMC40NzlDMTQyLjU5IDEyMC4wOTEgMTQyLjQzMSAxMTkuNTk0IDE0Mi40NjggMTE5LjA5MUwxNDMuNTA2IDEwMC4xMzVDMTQzLjU2OCA5OS4wMDI3IDE0NC41MjQgOTguMTQyNCAxNDUuNjA5IDk4LjI0MjVMMTQ3LjEyMSA5OC4zODI1QzE0OC4yMDYgOTguNDgyNiAxNDguOTgzIDk5LjUwMjUgMTQ4LjgzMSAxMDAuNjI3TDE0Ni4yODEgMTE5LjQ0M0MxNDYuMjIzIDExOS45NDQgMTQ1Ljk3MyAxMjAuNDAzIDE0NS41ODQgMTIwLjcyNUMxNDUuMTk1IDEyMS4wNDcgMTQ0LjY5NyAxMjEuMjA2IDE0NC4xOTQgMTIxLjE3VjEyMS4xN1oiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTEzNS4yMzMgMTIyLjgwNEMxMzUuMDc3IDEyMi44NSAxMzQuOTE0IDEyMi44NjUgMTM0Ljc1MiAxMjIuODQ4QzEzNC41OTEgMTIyLjgzIDEzNC40MzQgMTIyLjc4MSAxMzQuMjkyIDEyMi43MDNDMTM0LjE0OSAxMjIuNjI2IDEzNC4wMjQgMTIyLjUyMSAxMzMuOTIyIDEyMi4zOTRDMTMzLjgyIDEyMi4yNjggMTMzLjc0NCAxMjIuMTIyIDEzMy42OTggMTIxLjk2N0wxMjkuOTkyIDExMC4xNzVDMTI5Ljg4NCAxMDkuODQgMTI5LjkxNCAxMDkuNDc1IDEzMC4wNzQgMTA5LjE2MkMxMzAuMjM1IDEwOC44NDggMTMwLjUxMyAxMDguNjExIDEzMC44NDkgMTA4LjUwM0wxMzEuODA4IDEwOC4yMTNDMTMxLjk3MyAxMDguMTY1IDEzMi4xNDYgMTA4LjE1MiAxMzIuMzE2IDEwOC4xNzRDMTMyLjQ4NiAxMDguMTk2IDEzMi42NDkgMTA4LjI1MyAxMzIuNzk2IDEwOC4zNDJDMTMyLjk0MyAxMDguNDMgMTMzLjA3IDEwOC41NDggMTMzLjE2OSAxMDguNjg4QzEzMy4yNjggMTA4LjgyOCAxMzMuMzM3IDEwOC45ODcgMTMzLjM3MSAxMDkuMTU1TDEzNi4xMTggMTIxLjIzN0MxMzYuMTk1IDEyMS41NjEgMTM2LjE0NiAxMjEuOTAzIDEzNS45ODIgMTIyLjE5NEMxMzUuODE4IDEyMi40ODQgMTM1LjU1MSAxMjIuNzAyIDEzNS4yMzMgMTIyLjgwNFYxMjIuODA0WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTMwLjIzMiAxMjkuNjA0QzEyOS41NjggMTMwLjQyNyAxMjguMjMzIDEzMC40MTcgMTI3LjIwNCAxMjkuNTgyTDEwOC45NTMgMTE0Ljc1M0MxMDcuODYzIDExMy44NjcgMTA3LjU0MSAxMTIuNDAxIDEwOC4yNDUgMTExLjUyOUwxMDkuMjI3IDExMC4zMTNDMTA5LjkzMiAxMDkuNDQgMTExLjM3OCAxMDkuNTEyIDExMi40MSAxMTAuNDdMMTI5LjY4IDEyNi41MTVDMTMwLjY1MyAxMjcuNDE5IDEzMC44OTYgMTI4Ljc4MiAxMzAuMjMyIDEyOS42MDRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xMzguNjY5IDE2Ny45MDZDMTM5LjEzOSAxNjguMDg4IDEzOS41MiAxNjguNDQ1IDEzOS43MzIgMTY4LjkwMkMxMzkuOTQ1IDE2OS4zNTkgMTM5Ljk3MSAxNjkuODgxIDEzOS44MDcgMTcwLjM1N0wxMzMuOTYyIDE4OC40MTlDMTMzLjYxMyAxODkuNDk4IDEzMi40NjkgMTkwLjA4NSAxMzEuNDQ1IDE4OS43MTFMMTMwLjAxOCAxODkuMTlDMTI4Ljk5NSAxODguODE2IDEyOC41MDQgMTg3LjYzMSAxMjguOTM4IDE4Ni41ODRMMTM2LjIwOSAxNjkuMDQzQzEzNi4zOTQgMTY4LjU3MyAxMzYuNzUyIDE2OC4xOTMgMTM3LjIxMSAxNjcuOTgxQzEzNy42NjkgMTY3Ljc2OSAxMzguMTkxIDE2Ny43NDIgMTM4LjY2OSAxNjcuOTA2VjE2Ny45MDZaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xNDcuNzUgMTY4LjYxNUMxNDcuOTEyIDE2OC42MSAxNDguMDc0IDE2OC42MzggMTQ4LjIyNiAxNjguNjk2QzE0OC4zNzcgMTY4Ljc1NCAxNDguNTE2IDE2OC44NDEgMTQ4LjYzNCAxNjguOTUzQzE0OC43NTIgMTY5LjA2NCAxNDguODQ3IDE2OS4xOTggMTQ4LjkxMyAxNjkuMzQ2QzE0OC45NzkgMTY5LjQ5NCAxNDkuMDE2IDE2OS42NTQgMTQ5LjAyIDE2OS44MTdMMTQ5LjU5MiAxODIuMTY0QzE0OS42MSAxODIuNTE2IDE0OS40ODkgMTgyLjg2IDE0OS4yNTMgMTgzLjEyMkMxNDkuMDE4IDE4My4zODUgMTQ4LjY4OCAxODMuNTQzIDE0OC4zMzcgMTgzLjU2MkwxNDcuMzM1IDE4My41OTdDMTQ3LjE2MyAxODMuNjAxIDE0Ni45OTMgMTgzLjU3IDE0Ni44MzQgMTgzLjUwNUMxNDYuNjc1IDE4My40NCAxNDYuNTMyIDE4My4zNDMgMTQ2LjQxMiAxODMuMjJDMTQ2LjI5MyAxODMuMDk3IDE0Ni4yIDE4Mi45NTEgMTQ2LjE0IDE4Mi43OUMxNDYuMDggMTgyLjYyOSAxNDYuMDU1IDE4Mi40NTggMTQ2LjA2NCAxODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Zte="",YK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var QK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"simple-error-message-main"},[e._m(0),r("p",[r("span",{staticClass:"simple-error-message-title"},[e._v(" "+e._s(e.$t(e.title))+" ")])]),r("p",[r("span",{staticClass:"simple-error-message-message"},[e._v(e._s(e.$t(e.message)))])])])},KK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:HK}})])}],JK=oe(YK,QK,KK,!1,null,null,null,null);const ZK={components:{simpleErrorMessage:JK.exports,VueFormRenderer:Gi},props:{initialTaskId:{type:Number,default:null},initialScreenId:{type:Number,default:null},initialRequestId:{type:Number,default:null},initialProcessId:{type:Number,default:null},initialNodeId:{type:String,default:null},userId:{type:Number,default:null},csrfToken:{type:String,default:null},value:{type:Object,default:()=>{}},beforeLoadTask:{type:Function,default:()=>new Promise(t=>{t()})},initialLoopContext:{type:String,default:""},taskPreview:{type:Boolean,default:!1},loading:{type:Number,default:null}},data(){return{task:null,taskId:null,request:null,requestId:null,screen:null,screenId:null,renderComponent:"task-screen",processId:null,nodeId:null,disabled:!1,socketListeners:[],requestData:{},hasErrors:!1,refreshScreen:0,redirecting:null,loadingButton:!1}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialTaskId:{handler(){this.taskId=this.initialTaskId}},initialRequestId:{handler(){this.requestId=this.initialRequestId}},initialProcessId:{handler(){this.processId=this.initialProcessId}},initialNodeId:{handler(){this.nodeId=this.initialNodeId}},screenId:{handler(){this.screenId&&this.loadScreen(this.screenId)}},taskId:{handler(){this.taskId&&(!this.task||this.task.id!==this.taskId)&&this.loadTask()}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},task:{handler(){this.screen||(this.screen=this.task&&this.task.interstitial_screen),this.taskId=this.task.id,this.nodeId=this.task.element_id,this.listenForParentChanges(),this.task.process_request.status==="COMPLETED"&&(this.taskPreview||this.$emit("completed",this.task.process_request.id)),this.taskPreview&&this.task.status==="CLOSED"&&(this.task.interstitial_screen._interstitial=!1,this.task.screen.config=this.disableForm(this.task.screen.config),this.screen=this.task.screen)}},value:{handler(){this.requestData=this.value}},screen:{handler(){if(this.screen&&this.renderComponent!=="ConversationalForm")if(this.screen.type==="CONVERSATIONAL")this.renderComponent="ConversationalForm";else{const t=H.get(this.screen,"_interstitial",!1);let e=H.get(this,"task.component","task-screen");(e===null||t)&&(e="task-screen"),this.renderComponent=e}}}},computed:{shouldAddSubmitButton(){return this.task?this.task.bpmn_tag_name==="manualTask"||!this.task.screen&&this.task.element_type!=="startEvent":!1},showTaskIsCompleted(){return this.task&&this.task.advanceStatus==="completed"&&!this.screen},screenTypeClass(){return this.screen?this.screen.type.toLowerCase()+"-screen":void 0},parentRequest(){return H.get(this.task,"process_request.parent_request_id",null)}},methods:{disableForm(t){if(t instanceof Array)for(let e of t)e.component==="FormButton"&&e.config.event==="submit"?t.splice(t.indexOf(e),1):this.disableForm(e);return t.config!==void 0&&(t.config.disabled=!0),t.items!==void 0&&this.disableForm(t.items),t},showSimpleErrorMessage(){this.renderComponent="simpleErrorMessage"},loadScreen(t){let e="?include=nested";this.requestId&&(e+="&request_id="+this.requestId),this.$dataProvider.getScreen(t,e).then(r=>{this.screen=r.data})},reload(){this.taskId?this.loadTask():this.loadNextAssignedTask()},loadTask(){const t=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;return window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")&&(window.ProcessMaker.VocabulariesSchemaUrl=`vocabularies/task_schema/${this.taskId}`),this.beforeLoadTask(this.taskId,this.nodeId).then(()=>{this.$dataProvider.getTasks(t).then(e=>{if(this.task=e.data,this.checkTaskStatus(),window.PM4ConfigOverrides&&window.PM4ConfigOverrides.getScreenEndpoint&&window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")){const r=window.PM4ConfigOverrides.getScreenEndpoint.split("/");r[1]=this.task.id,window.PM4ConfigOverrides.getScreenEndpoint=r.join("/")}}).catch(()=>{this.hasErrors=!0})})},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=H.get(this.task,"request_data",{}),this.loopContext=H.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=H.merge({},this.requestData,this.task.draft.data)),this.refreshScreen++),this.$emit("task-updated",this.task),this.task.process_request.status==="ERROR"?(this.hasErrors=!0,this.$emit("error",this.requestId)):this.hasErrors=!1},resetScreenState(){this.loadingButton=!1,this.disabled=!1,this.$refs.renderer&&this.$refs.renderer.$children[0]&&(this.$refs.renderer.$children[0].currentPage=0,this.$refs.renderer.restartValidation())},checkTaskStatus(){this.task.status=="COMPLETED"||this.task.status=="CLOSED"||this.task.status=="TRIGGERED"?this.closeTask():this.screen=this.task.screen,this.prepareTask()},disableForSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.disabled=!0:this.disabled=!1})},closeTask(t=null){if(this.hasErrors){this.$emit("error",this.requestId);return}this.task.process_request.status==="COMPLETED"?this.loadNextAssignedTask(t):this.loadingButton?this.loadNextAssignedTask(t):this.task.allow_interstitial?(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)):this.taskPreview||this.$emit("closed",this.task.id)},loadNextAssignedTask(t=null){t||(t=this.requestId);const e=window.Cypress?"":`&t=${Date.now()}`,r=`?user_id=${this.userId}&status=ACTIVE&process_request_id=${t}&include_sub_tasks=1${e}`;return this.$dataProvider.getTasks(r).then(a=>{if(a.data.data.length>0){let i=a.data.data[0];if(i.process_request_id!==this.requestId){if(this.redirecting===i.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=i.process_request_id,this.$emit("redirect",i.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=i.id,this.nodeId=i.element_id}else this.parentRequest&&["COMPLETED","CLOSED"].includes(this.task.process_request.status)&&this.$emit("completed",this.getAllowedRequestId())})},emitIfTaskCompleted(t){this.task&&this.parentRequest&&t==this.task.process_request_id&&this.task.process_request.status==="COMPLETED"&&this.$emit("completed",this.parentRequest)},classHeaderCard(t){let e="bg-success";switch(t){case"completed":e="bg-secondary";break;case"overdue":e="bg-danger";break}return"card-header text-capitalize text-white "+e},submit(t=null,e=!1,r=null){this.disabled||(this.disabled=!0,t&&this.onUpdate(Object.assign({},this.requestData,t)),e?this.loadingButton=!0:this.loadingButton=!1,this.$emit("submit",this.task,e,r),this.task&&this.task.allow_interstitial&&!this.loadingButton&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen))},onUpdate(t){this.$emit("input",t),this.disableForSelfService()},activityAssigned(){},processCompleted(){let t;this.parentRequest&&(t=this.getAllowedRequestId(),this.$emit("completed",t)),t!==this.requestId&&this.$emit("completed",this.requestId)},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(a=>a.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},processUpdated:H.debounce(function(t){(t.event==="ACTIVITY_COMPLETED"||t.event==="ACTIVITY_ACTIVATED")&&this.reload(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},300),initSocketListeners(){this.addSocketListener(`completed-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessCompleted",t=>{this.processCompleted(t)}),this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>{this.processUpdated(t)}),this.taskId||this.reload()},listenForParentChanges(){this.parentRequest&&this.addSocketListener(`parent-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.parentRequest}`,".ProcessUpdated",t=>{["ACTIVITY_ACTIVATED"].includes(t.event)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,a){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,i=>{a(i)}))},unsubscribeSocketListeners(){Object.values(this.socketListeners).forEach(t=>{window.Echo.private(t.channel).stopListening(t.event)}),this.socketListeners={}},obtainPayload(t){return new Promise(e=>{window.ProcessMaker.apiClient.get(t).then(r=>{e(r.data)}).catch(()=>{})})},setMetaValue(){const t=document.head.querySelector('meta[name="request-id"]');t&&t.setAttribute("content",this.requestId)}},mounted(){this.screenId=this.initialScreenId,this.taskId=this.initialTaskId,this.requestId=this.initialRequestId,this.processId=this.initialProcessId,this.nodeId=this.initialNodeId,this.requestData=this.value,this.loopContext=this.initialLoopContext},destroyed(){this.unsubscribeSocketListeners()}};var XK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"tab-pane active show h-100",attrs:{id:"tab-form",role:"tabpanel","aria-labelledby":"tab-form"}},[e.screen?[r("b-overlay",{attrs:{show:e.disabled,id:"overlay-background",variant:"white",cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("p",[e._v("Please claim this task to continue.")])])]},proxy:!0}],null,!1,2499821482)},[r("div",{staticClass:"card card-body border-top-0 h-100",class:e.screenTypeClass},[e.renderComponent==="task-screen"?r("div",[r("vue-form-renderer",{key:e.refreshScreen,ref:"renderer",attrs:{config:e.screen.config,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,"loop-context":e.loopContext},on:{update:e.onUpdate,submit:e.submit},model:{value:e.requestData,callback:function(a){e.requestData=a},expression:"requestData"}})],1):r("div",[r(e.renderComponent,{tag:"component",attrs:{"process-id":e.processId,"instance-id":e.requestId,"token-id":e.taskId,screen:e.screen.config,"csrf-token":e.csrfToken,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,data:e.requestData,type:e.screen.type},on:{submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(a){return e.submit(null)}}},[e._v(" "+e._s(e.$t("Complete Task"))+" ")])]):e._e()])]:e._e(),e.showTaskIsCompleted?[r("div",{staticClass:"card card-body text-center"},[r("h1",[e._v(" "+e._s(e.$t("Task Completed"))+" "),r("i",{staticClass:"fas fa-clipboard-check"})])])]:e._e()],2)},eJ=[],tJ=oe(ZK,XK,eJ,!1,null,null,null,null);const Xx=tJ.exports,tre="",rJ={name:"Loop",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors?this.validationErrors.some(({item:e})=>e===t):!1},inspect(t){this.$emit("inspect",t)},deleteItem(t){this.items.splice(t,1),this.$emit("update-state")},duplicateItem(t){const e=H.cloneDeep(this.items[t]);this.items.push(e),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.component==="AiSection"&&e===r.config.aiConfig.nonce&&this.$set(r,"items",JSON.parse(JSON.stringify(t)))})},updateProgress(t,e){this.value.forEach(r=>{if(r.component==="AiSection"&&e===r.config.aiConfig.nonce){if(this.cancelledJobs.some(a=>a===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var aJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column-draggable",attrs:{selector:e.config.customCssSelector}},[r("draggable",{staticStyle:{"min-height":"80px"},attrs:{list:e.items,group:"controls"}},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"control-item",class:{selected:e.selected===a,hasError:e.hasError(a)},on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[a.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(a)&&e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(a)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){return e.applyAiChanges(a)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(a)&&e.aiPreview(a)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":a,config:a.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:a.items,callback:function(n){e.$set(a,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:a.config.name?a.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1,config:a.config},on:{input:function(n){a.config.interactive&&(a.config.content=n)}}},"component",a.config,!1))],1)])])}),0)],1)},iJ=[],nJ=oe(rJ,aJ,iJ,!1,null,"06c4d69f",null,null);const ek=nJ.exports,rre="",sJ=1,oJ={name:"MultiColumn",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},computed:{classContainer(){return this.items.length>0?"form-group":"column-draggable"}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)},"config.options":function(t){this.items=t.map((e,r)=>this.items[r]?this.items[r]:[])}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors.some(({item:e})=>e===t)},updateContainerConfig(t,e){this.items[e]=t,this.$emit("update-state")},classColumn(t){let e=sJ;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e}`},inspect(t){this.$emit("inspect",t)},deleteItem(t,e){this.items[t].splice(e,1),this.$emit("update-state")},duplicateItem(t,e){const r=H.cloneDeep(this.items[t][e]);this.items[t].push(r),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.forEach(a=>{a.component==="AiSection"&&e===a.config.aiConfig.nonce&&this.$set(a,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})}}};var lJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"mb-1 mt-1 pb-0 pt-0",class:e.classContainer},[r("div",{attrs:{selector:e.config.customCssSelector}},[r("div",{staticClass:"row"},[e._l(e.items,function(a,i){return[r("draggable",{key:i,staticClass:"column-draggable",class:e.classColumn(i),attrs:{value:e.items[i],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,i)}},model:{value:e.items[i],callback:function(n){e.$set(e.items,i,n)},expression:"items[index]"}},e._l(a,function(n,s){return r("div",{key:s,staticClass:"control-item",class:{selected:e.selected===n,hasError:e.hasError(n)},on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[n.container?r("div",{on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(n)&&e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(n)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(n)&&e.aiPreview(n)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(o){return e.applyAiChanges(n)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(n)&&e.aiPreview(n)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"aria-label":e.$t("Duplicate")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(n),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":n,config:n.config},on:{inspect:e.inspect,"update-state":function(o){return e.$emit("update-state")}},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}})],1)]):r("div",{attrs:{id:n.config.name?n.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(n),{"prevent-interaction":!n.config.interactive}],attrs:{tabindex:n.config.interactive?0:-1,config:n.config},on:{input:function(o){n.config.interactive&&(n.config.content=o)}}},"component",n.config,!1))],1)])])}),0)]})],2)])])},uJ=[],cJ=oe(oJ,lJ,uJ,!1,null,"eaf6f1c4",null,null);const tk=cJ.exports,dJ={name:"default-loading-spinner"};var pJ=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},fJ=[],hJ=oe(dJ,pJ,fJ,!1,null,null,null,null);const rk=hJ.exports,mJ=!0;function vu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,a])=>{if(a){if(typeof a=="object"&&"$each"in a){e+=vu(a.$each.$iter);return}r!=="$iter"&&typeof a=="object"&&"$invalid"in a&&a.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&a&&(e+=vu(a))}}),e}const ak=async(t,e)=>{if(t.length===0)return;const r=ch(t[0]),a=[];t.forEach(n=>{r!==n&&a.push(n.loadValidationRules())}),await Promise.all(a);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const i=r.$v;if(i){let n=0,s="";i.$invalid&&(n+=vu(i.vdata),n+=vu(i.schema),s=n===1?"There is a validation error in your form.":"There are {{items}} validation errors in your form.",s=r.$t(s,{items:n})),e("basic",{key:"valid",value:!i.$invalid}),e("basic",{key:"message",value:s})}},gJ=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},vJ=H.debounce(ak,500),bu=[],bJ=(t,e)=>{bu.includes(t)||bu.push(t),vJ(bu,e)},ik={namespaced:mJ,state:()=>({locked:!1,valid:!0,message:"",mode:"",submitted:!1,showValidationOnLoad:!1,disableSubmit:!1}),getters:{isValidScreen(t){return t.valid},getErrorMessage(t){return t.message},getMode(t){return t.mode},showValidationErrors(t){return t.showValidationOnLoad||t.submitted}},mutations:{basic(t,e){t[e.key]=e.value},setMode(t,e){t.mode=e},disableSubmit(t,e){t.disableSubmit=e.value,t.message=e.message}},actions:{restartValidation(){bu.length=0},validate({commit:t},e){bJ(e,t)},async validateNow({commit:t},e){await ak([e],t)},close({commit:t}){t("basic",{key:"valid",value:!0})},hasSubmitted({commit:t},e){t("basic",{key:"submitted",value:e})},showValidationOnLoad({commit:t},e){t("basic",{key:"showValidationOnLoad",value:e})},async disableSubmitOnPhotoVideoUpload({commit:t},e){await gJ(t,e)}}},yu={namespaced:!0,state(){return{stack:[],position:null}},getters:{canUndo(t){return t.position>0},canRedo(t){return t.position<t.stack.length-1},currentState(t,e){const r=t.stack[t.position];return e.nextState&&e.nextState.deletedPage&&(r.currentPage=e.nextState.currentPage),r},nextState(t,e){return e.canRedo?t.stack[t.position+1]:!1}},mutations:{setPosition(t,e){t.position=e},setState(t,e){t.stack.push(e)}},methods:{emitChanges(){window.ProcessMaker.EventBus.$emit("screen-change")}},actions:{pushState({state:t,getters:e,commit:r},a){a.config!==e.currentState&&(r("setState",a),r("setPosition",t.stack.length-1),yu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),yu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),yu.methods.emitChanges())}}},are="",yJ={props:{placeholder:{type:String},value:{type:String}},data(){return{query:""}},watch:{query(t){this.$emit("input",t)}},methods:{runSearch(t){this.$emit("submit",this.query)}},mounted(){this.query=this.value}};var SJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"basic-search"},[r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-1"},[r("div",{staticClass:"search-bar-basic d-flex w-100"},[r("div",{staticClass:"search-bar-inputs flex-grow w-100"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search_input",staticClass:"search-bar-manual-input form-control",attrs:{type:"text",placeholder:e.placeholder?e.placeholder:e.$t("Search"),"data-cy":"watchers-table-search"},domProps:{value:e.query},on:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(a){a.target.composing||(e.query=a.target.value)}}})]),r("div",{staticClass:"search-bar-actions d-flex flex-shrink"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-search-run",attrs:{variant:"primary",title:e.$t("Search")},on:{click:e.runSearch}},[r("i",{staticClass:"fas fa-search",attrs:{"data-cy":"watchers-table-search-button"}})])],1)])]),r("div",{staticClass:"search-bar-buttons"},[e._t("buttons")],2)])])},xJ=[],kJ=oe(yJ,SJ,xJ,!1,null,"d660c896",null,null);const nk=kJ.exports,ire="",_J={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a},mixins:[nc],props:["value"],data(){return{required:!0,numberItem:0,displayList:!0,ruleDescription:"",ruleFormula:"",rulePropName:"",editorInvalid:!1,existsProperty:!1,current:[],add:{id:0,name:"",property:"",type:"expression",formula:""},css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Property Name"),key:"property"},{label:this.$t("Description"),key:"name"},{key:"__actions",label:"",class:"text-right"}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{}}},computed:{javascriptTypeClass(){const{isJS:t}=this;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},expressionTypeClass(){const t=!this.isJS;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},isJS(){return this.add.type==="javascript"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem}),this.current=this.value}},created(){Lt.register("exists-property",()=>{let t=!0;return this.current.forEach(e=>{e.property===this.add.property&&e.id!==this.add.id&&(t=!1)}),t},this.$t("Property already exists"))},methods:{switchExpressionType(t){this.add.type=t},show(){this.$refs.modal.show()},emptyForm(){this.add.id=0,this.add.name="",this.add.property="",this.add.type="expression",this.add.formula="",this.editorInvalid=!1,this.existsProperty=!1,this.ruleDescription="",this.ruleFormula="",this.rulePropName=""},displayTableList(){this.emptyForm(),this.displayList=!0},displayFormProperty(){this.emptyForm(),this.displayList=!1},validateData(){this.errors=[];const t={property:"required|exists-property",name:"required",formula:"required"},e={property:this.add.property,name:this.add.name,formula:this.add.formula},r=new Lt(e,t),a=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(i=>[i,r.errors.first(i)])),a?this.saveProperty():this.focusFirstCalculatedPropertiesError()},saveProperty(){this.add.id===0?(this.numberItem++,this.current.push({id:this.numberItem,property:this.add.property,name:this.add.name,formula:this.add.formula,type:this.add.type})):this.current.forEach(t=>{t.id===this.add.id&&(t.name=this.add.name,t.property=this.add.property,t.formula=this.add.formula,t.type=this.add.type)}),this.$emit("input",this.current),this.displayTableList()},editProperty(t){this.add.id=t.id,this.add.name=t.name,this.add.property=t.property,this.add.type=t.type?t.type:"expression",this.add.formula=t.formula,this.displayList=!1},deleteProperty(t){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t}}};var wJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:"lg",title:e.$t("Calculated Properties"),"content-class":"p-3","header-class":"m-0 p-0 mb-3","body-class":"m-0 p-0","title-class":"m-0","footer-class":"m-0 p-0","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList}},[e.displayList?[r("div",{staticClass:"d-flex align-items-end flex-column mb-3"},[r("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-cy":"calcs-add-property"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Property"))+" ")])]),r("div",{staticClass:"card card-body table-card"},[r("b-table",{attrs:{css:e.css,fields:e.fields,items:e.current,"empty-text":e.$t("No Data Available"),"data-cy":"calcs-table"},scopedSlots:e._u([{key:"cell(__actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"calcs-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"calcs-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}],null,!1,3545130899)})],1),r("template",{slot:"modal-footer"},[r("span")])]:[r("required"),r("form-input",{ref:"property",staticClass:"mb-3",attrs:{label:e.$t("Property Name")+" *",name:"property",error:e.errors.property,"data-cy":"calcs-property-name",required:"","aria-required":"true"},model:{value:e.add.property,callback:function(a){e.$set(e.add,"property",a)},expression:"add.property"}}),r("form-text-area",{ref:"name",staticClass:"mb-3",attrs:{label:e.$t("Description")+" *",name:"name",error:e.errors.name,"data-cy":"calcs-property-description",required:"","aria-required":"true"},model:{value:e.add.name,callback:function(a){e.$set(e.add,"name",a)},expression:"add.name"}}),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("label",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}]},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",{staticClass:"float-right"},[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(a){return e.switchExpressionType("expression")}}},[r("i",{staticClass:"fas fa-square-root-alt"})]),r("a",{staticClass:"btn btn-sm",class:e.javascriptTypeClass,attrs:{"data-cy":"calcs-switch-javascript"},on:{click:function(a){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square"})])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",attrs:{rows:"5",label:e.$t("Formula")+" *",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor-border",class:{"is-invalid":!!e.errors.formula}}),r("monaco-editor",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"calcs-property-javascript",required:"","aria-required":"true"},on:{editorDidMount:e.editorMounted},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),e.isJS&&e.errors.formula?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.errors.formula))])]):e._e()],1),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"calcs-button-cancel"},on:{click:e.displayTableList}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},CJ=[],TJ=oe(_J,wJ,CJ,!1,null,"5efce491",null,null);const AJ=TJ.exports,nre="",OJ={props:["value","cssErrors"],components:{MonacoEditor:_a},data(){return{saveValue:"",innerValue:"",monacoOptions:{language:"css",automaticLayout:!0,minimap:{enabled:!1}}}},watch:{innerValue(t){this.$emit("input",t)}},methods:{show(){this.innerValue=this.value,this.saveValue=this.value,this.$refs.modal.show()},close(){this.$refs.modal.hide()},hide(){this.innerValue=this.saveValue,this.$emit("input",this.innerValue)},save(){this.saveValue=this.innerValue,this.$refs.modal.hide()}}};var EJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"custom-css",title:e.$t("Custom CSS"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","no-close-on-backdrop":"","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"header-close-content":"&times;"},on:{ok:e.save,cancel:e.close,hide:e.hide}},[r("p",[e._v(e._s(e.$t("You can set CSS Selector names in the inspector. Use them here with [selector='my-selector']")))]),r("div",{staticClass:"editor"},[r("monaco-editor",{staticClass:"monaco",attrs:{options:e.monacoOptions,"data-cy":"monaco-editor"},model:{value:e.innerValue,callback:function(a){e.innerValue=a},expression:"innerValue"}})],1),r("b-alert",{attrs:{show:e.cssErrors!="",variant:"danger"}},[r("pre",[e._v(e._s(e.cssErrors))])]),r("div",{attrs:{slot:"modal-cancel","data-cy":"cancel-button"},slot:"modal-cancel"},[e._v(e._s(e.$t("Cancel")))]),r("div",{attrs:{slot:"modal-ok","data-cy":"save-button"},slot:"modal-ok"},[e._v(e._s(e.$t("Save")))])],1)},MJ=[],$J=oe(OJ,EJ,MJ,!1,null,"3824b29b",null,null);const PJ=$J.exports,sre="",DJ=typeof window>"u"?global:window,IJ={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:_a,DataMapping:Xp,OutboundConfig:af,ScreenVariableSelector:xx},mixins:[nc],props:{config:{type:Object,default(){return{name:"",watching:"",script:"",script_id:"",script_key:"",input_data:"{}",script_configuration:"{}",output_variable:"",synchronous:!1,run_onload:!1,show_async_loading:!1}}}},data(){return{scriptConfig:"",endpoint:null,endpoints:[],ruleWatcherName:"",ruleWatcherVariable:"",ruleWatcherScript:"",ruleWatcherOutputVariable:"",required:!0,inputDataInvalid:!1,scriptConfigurationInvalid:!1,scripts:[],script:null,monacoOptions:{automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1}},endpointError:null,inputDataEditor:null,scriptConfigEditor:null}},computed:{dataSourceLink(){const t=this.selectedDataSourceId(),e=this.endpoint;return t&&e?`/designer/data-sources/${t}/resources/${e}`:""},dataSourceConfigWarning(){const t=this.selectedDataSourceId(),e=this.scripts.find(a=>a.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(a=>a.id===`data_source-${t}`);return typeof r>"u"||e===null?"":r.validationStatus.length>0?r.validationStatus:""},isDatasource(){return this.config.script&&this.config.script.id.substr(0,11)==="data_source"},isScript(){return!this.config.script||this.config.script.id.substr(0,6)==="script"},hasInputData(){let t;try{t=JSON.parse(this.config.script_configuration)}catch{return!1}return typeof t.input_data>"u"||t.input_data==null?!1:Object.keys(t.input_data).length===0&&t.input_data.constructor===Object},outputVarLabel(){const t=this.ruleWatcherOutputVariable=="required"?" *":"";return this.$t("Output Variable")+t}},watch:{scriptConfig(t){try{const e=JSON.parse(this.config.script_configuration),r=JSON.parse(t);this.config.script_configuration=JSON.stringify({...e,...r},null," ")}catch{}},endpoint(t){this.setConfig("endpoint",t);const e=this.scriptConfig?JSON.parse(this.scriptConfig):{},r=e.dataMapping||[],a=this.scripts.find(i=>i.items&&i.items.length>0&&i.items[0].id&&i.items[0].id.substr(0,11)==="data_source");if(a&&r.length===0){const i=a.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(i.endpoints&&i.endpoints[t]?i.endpoints[t].dataMapping:[])||[];e.dataMapping=[],n.forEach(s=>{e.dataMapping.push({key:s.key,value:s.value})}),this.scriptConfig=JSON.stringify(e)}},config:{deep:!0,immediate:!0,handler(t){t.input_data||(t.input_data="{}"),t.script_configuration?this.scriptConfig=this.config.script_configuration:t.script_configuration="{}",this.endpoint=this.getConfig().endpoint}},"config.script":{handler(t,e){if(!t)this.config.script_id="",this.config.script_key="",this.config.datasource_script_id="";else if(typeof t=="object"){const r=t.id.split("-"),a=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,a!==r[0]&&(this.config.script_configuration="{}"),r[0]==="data_source"&&this.setConfig("dataSource",this.config.script_id),this.config.datasource_script_id=t.dataSourceScriptId}return t}}},methods:{selectedDataSourceId(){let t=null;try{t=JSON.parse(this.scriptConfig).dataSource}catch{t=null}return t},setValidations(){this.ruleWatcherName="required",this.ruleWatcherVariable="required",this.ruleWatcherScript="required",this.hasInputData&&(this.ruleWatcherOutputVariable="required")},getConfig(){try{return JSON.parse(this.config.script_configuration)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.config.script_configuration=JSON.stringify(r),this.scriptConfig=this.config.script_configuration)},loadEndpoints(){const t=this.config.script.id.substr(0,11)==="data_source"?this.config.script.id.substr(12):null;this.endpoints.splice(0),t&&window.ProcessMaker&&window.ProcessMaker.apiClient&&window.ProcessMaker.apiClient.get(`/data_sources/${t}`).then(e=>{for(const r in e.data.endpoints)this.endpoints.push(r)})},loadSources(){this.scripts=[],this.$root.$children[0].watchers_config.api.scripts.forEach(t=>{t(this.scripts)})},displayTableList(){this.$emit("display-list")},jsonIsValid(t){try{JSON.parse(this.config[t])}catch{return!1}return!0},isFormValid(){this.isDatasource&&!this.endpoint?this.endpointError=this.$t("Endpoint is required"):this.endpointError=null;for(const t in this.$refs)if(this.$refs[t]&&this.$refs[t].name&&this.$refs[t].validator&&this.$refs[t].validator.errorCount!==0)return!1;return!(!this.config.watching||!this.config.script||this.endpointError||!this.jsonIsValid("input_data")||!this.jsonIsValid("script_configuration"))},validateDataAndSave(){this.setValidations(),this.$nextTick(()=>{if(!this.isFormValid()){DJ.ProcessMaker.alert(this.$t("An error occurred. Check the form for errors in red text."),"danger"),this.focusFirstWatcherError();return}this.config.uid||(this.config.uid=H.uniqueId(new Date().getTime())),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var zJ=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"accordion",attrs:{id:"watcherAccordion"}},[r("div",{staticClass:"card card-overflow"},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherConfigButton",staticClass:"p-3 btn btn-link d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherConfig","data-cy":"watchers-accordion-configuration"}},[e._m(0),e._m(1)])])]),r("div",{staticClass:"collapse show",attrs:{id:"watcherConfig","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-input",{ref:"name",attrs:{label:e.$t("Watcher Name")+" *",name:e.$t("Watcher Name"),validation:e.ruleWatcherName,helper:e.$t("A name to describe this Watcher"),"data-cy":"watchers-watcher-name",required:"","aria-required":"true"},model:{value:e.config.name,callback:function(a){e.$set(e.config,"name",a)},expression:"config.name"}}),r("screen-variable-selector",{ref:"watching",attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",validation:e.ruleWatcherVariable,helper:e.$t("Select the variable to watch on this screen or type any request variable name"),"data-cy":"watchers-watcher-variable"},model:{value:e.config.watching,callback:function(a){e.$set(e.config,"watching",a)},expression:"config.watching"}}),r("form-checkbox",{attrs:{name:e.$t("Run Synchronously"),label:e.$t("Run Synchronously"),toggle:!0,helper:e.$t("Wait for the Watcher to run before accepting more input"),"data-cy":"watchers-watcher-synchronous"},model:{value:e.config.synchronous,callback:function(a){e.$set(e.config,"synchronous",a)},expression:"config.synchronous"}}),r("form-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.config.synchronous,expression:"!config.synchronous"}],attrs:{name:e.$t("Show message while loading remote data"),label:e.$t("Show message while loading remote data"),toggle:!0,"data-cy":"watchers-watcher-show-loading"},model:{value:e.config.show_async_loading,callback:function(a){e.$set(e.config,"show_async_loading",a)},expression:"config.show_async_loading"}}),r("form-checkbox",{attrs:{name:e.$t("Run Watcher on Screen Load"),label:e.$t("Run watcher on Screen Load"),toggle:!0,"data-cy":"watchers-watcher-run-onload"},model:{value:e.config.run_onload,callback:function(a){e.$set(e.config,"run_onload",a)},expression:"config.run_onload"}})],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherSourceButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherSource","data-cy":"watchers-accordion-source"}},[e._m(2),e._m(3)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherSource","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-multi-select",{ref:"script",attrs:{name:e.$t("Source"),label:e.$t("Source")+" *",options:e.scripts,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,searchable:!0,"option-value":"id","option-content":"title","group-values":"items","group-label":"type",validation:e.ruleWatcherScript,helper:e.$t("The source to access when this Watcher runs"),"data-cy":"watchers-watcher-source"},on:{open:e.loadSources},model:{value:e.config.script,callback:function(a){e.$set(e.config,"script",a)},expression:"config.script"}}),e.isScript?r("div",[e.config.script?r("b-alert",{attrs:{show:"",variant:"warning"}},[r("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.$t("Using watchers with Scripts can slow the performance of your screen."))+" ")]):e._e(),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{ref:"input_data",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},on:{editorDidMount:e.inputDataEditorMounted},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the script (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])]),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Script Configuration")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("script_configuration")}},[r("monaco-editor",{ref:"script_configuration",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-script_configuration"},on:{editorDidMount:e.scriptConfigEditorMounted},model:{value:e.config.script_configuration,callback:function(a){e.$set(e.config,"script_configuration",a)},expression:"config.script_configuration"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Configuration data for the script (valid JSON object, variables supported)")))]),e.scriptConfigurationInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(" "+e._s(e.$t("The Script Configuration field is required"))+" ")])]):e._e(),e.jsonIsValid("script_configuration")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])],1):e._e(),e.isDatasource?r("div",[r("div",{staticClass:"form-group"},[r("form-multi-select",{ref:"endpoint",attrs:{name:e.$t("Resource"),label:e.$t("Resource"),options:e.endpoints,placeholder:e.$t("Select a resource"),multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1,helper:e.$t("The Data Connector resource to access when this Watcher runs"),"data-cy":"watchers-watcher-endpoint"},on:{"search-change":e.loadEndpoints,open:function(a){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(a){e.endpoint=a},expression:"endpoint"}}),e.endpointError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.endpointError))])]):e._e(),e.dataSourceConfigWarning.length>0?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.dataSourceConfigWarning))])]):e._e(),r("a",{directives:[{name:"show",rawName:"v-show",value:e.dataSourceLink.length>0,expression:"dataSourceLink.length > 0"}],staticClass:"link-primary",attrs:{href:e.dataSourceLink,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Data Connector"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])],1),e.hasInputData?e._e():r("outbound-config",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}),e.hasInputData?r("div",{staticClass:"form-group"},[e._m(4),r("div",{staticClass:"row pl-3 mt-1"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the Data Connector (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])]):e._e()],1):e._e()],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherOutputButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherOutput","data-cy":"watchers-accordion-output"}},[e._m(5),e._m(6)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherOutput","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[e.hasInputData||e.isScript?r("form-input",{ref:"propOutputVariableName",attrs:{label:e.outputVarLabel,name:e.$t("Output Variable"),helper:e.$t("The variable that will store the output of the Watcher"),validation:e.ruleWatcherOutputVariable,"data-cy":"watchers-watcher-output_variable",required:e.ruleWatcherOutputVariable=="required","aria-required":e.ruleWatcherOutputVariable=="required"},model:{value:e.config.output_variable,callback:function(a){e.$set(e.config,"output_variable",a)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(a){return a.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},LJ=[function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-cog"}),t._v(" Configuration")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-upload"}),t._v(" Source")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row pl-3"},[e("span",{staticClass:"text-danger"},[t._v(" * Deprecation Warning: Recreate the watcher to use the new format. Version 4.2 will not support Input Data as a JSON object. ")])])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-download"}),t._v(" Output")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])}],jJ=oe(IJ,zJ,LJ,!1,null,"60e1dcd1",null,null);const sk=jJ.exports,ore="",NJ={components:{BasicSearch:nk,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea},props:{value:{type:Array,default(){return[]}}},data(){return{filter:"",css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"name",tdClass:"break-word"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable",tdClass:"break-word"},{label:this.$t("Source"),key:"script.title"},{key:"actions",label:""}]}},computed:{filtered(){const t=this.getValuesWithOutputVarsNames(this.value);if(!this.filter)return t;const e=[];return t.forEach(r=>{Object.keys(r).find(a=>typeof r[a]=="string"?r[a].indexOf(this.filter)>=0:!1)&&e.push(r)}),e}},methods:{search(){},displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getValuesWithOutputVarsNames(t){return t.map(r=>{let a=Object.assign({},r);if(a.script&&a.script.id&&a.script.id.substr(0,11)==="data_source"){let i=JSON.parse(a.script_configuration),n=i&&i.dataMapping?i.dataMapping.map(o=>o.key).join(", "):"";const s=50;a.output_variable=n.length>s?n.substr(0,s)+"...":n}return a})}}};var RJ=function(){var e=this,r=e._self._c;return r("div",[r("b-row",{staticClass:"mb-3"},[r("b-col",[r("basic-search",{on:{submit:e.search},model:{value:e.filter,callback:function(a){e.filter=a},expression:"filter"}},[r("template",{slot:"buttons"},[r("b-btn",{staticClass:"text-nowrap",attrs:{variant:"secondary","data-cy":"watchers-add-watcher"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Watcher"))+" ")])],1)],2)],1)],1),r("div",{staticClass:"card card-body table-card watchers-list"},[r("b-table",{attrs:{items:e.filtered,fields:e.fields,"empty-text":e.$t("No Data Available"),"data-cy":"watchers-table","sort-icon-left":""},scopedSlots:e._u([{key:"cell(actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"watchers-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"watchers-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}])})],1),r("template",{slot:"modal-footer"},[r("span")])],2)},FJ=[],qJ=oe(NJ,RJ,FJ,!1,null,null,null,null);const ok=qJ.exports,lk=typeof window>"u"?global:window,BJ={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a,WatchersList:ok,WatchersForm:sk},props:["value"],data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1}}},watch:{value:{handler(t){this.current=t}}},computed:{},methods:{show(){this.$refs.modal.show()},displayList(){this.add={},this.enableList=!0},displayForm(){this.add={},this.enableList=!1},save(){let t=this.$t("Watcher Saved"),e=this.current.findIndex(r=>r.uid===this.add.uid);e===-1?this.current.push(this.add):(t=this.$t("Watcher Updated"),this.current[e]=this.add),this.showAlert(t),this.$emit("input",this.current),this.displayList()},edit(t){this.displayForm(),this.$set(this,"add",H.cloneDeep(t))},confirmRemoval(t){lk.ProcessMaker.confirmModal(this.$t("Caution!"),this.$t("Are you sure you want to delete the Watcher?"),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.uid!==t.uid),this.$emit("input",this.current),this.showAlert(this.$t("Watcher deleted")),this.displayList()},showAlert(t){lk.ProcessMaker.alert(t,"success")}}};var WJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-popup",title:e.$t("Watchers"),"hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList}},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval},model:{value:e.current,callback:function(a){e.current=a},expression:"current"}})]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},VJ=[],UJ=oe(BJ,WJ,VJ,!1,null,null,null,null);const GJ=UJ.exports,lre="",HJ={...Cs,FormMultiColumn:mu};function YJ(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const QJ={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Hu),t.component("FormImage",Jn),t.component("FormAvatar",yn),t.component("FormLoop",xs),t.component("FormMultiColumn",mu),t.component("FormNestedScreen",ks),t.component("FormRecordList",fu),t.component("Loop",ek),t.component("MultiColumn",tk),t.component("NewFormMultiColumn",Yp),t.component("ScreenRenderer",yx),t.component("Task",Xx),t.component("VueFormBuilder",Vx),t.component("VueFormRenderer",Gi),t.component("DefaultLoadingSpinner",rk),t.use(ee),t.component("FormButton",qa),t.component("FileUpload",bn),t.component("FileDownload",Xs),t.component("FormAnalyticsChart",ws),t.component("FormMaskedInput",Ba),t.use(Cl),t.use(Pt),t.component("FormListTable",_s);const e=new Pt.Store({modules:{globalErrorsModule:ik,undoRedoModule:yu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,a=null){return YJ(this).getDataReference(r,a)}}})}};function KJ(t,e){t.defaults.adapter=Wv(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}K.AddLoopRow=Hu,K.AnalyticsSelector=jx,K.BasicSearch=nk,K.CollectionSelectList=Zp,K.ColorSelect=_x,K.ColumnSetup=wx,K.ComputedProperties=AJ,K.ContainerColumns=Cx,K.Currencies=WH,K.CurrentPageProperty=ac,K.CustomCSS=PJ,K.DataFormatProperty=Zx,K.DataMapping=Xp,K.DataReference=uh,K.DataTypeBooleanProperty=UK,K.DataTypeDateTimeProperty=Jx,K.DataTypeProperty=Kx,K.DataTypeWithoutDateProperty=VK,K.DefaultLoadingSpinner=rk,K.DefaultValueEditor=ef,K.DeviceDetector=ph,K.DeviceVisibility=ed,K.EditOption=Tx,K.FileDownload=Xs,K.FileUpload=bn,K.FormAnalyticsChart=ws,K.FormAvatar=yn,K.FormBuilderControls=GK,K.FormButton=qa,K.FormImage=Jn,K.FormInputMasked=Ba,K.FormListTable=_s,K.FormLoop=xs,K.FormMaskedInput=Ba,K.FormMultiselect=tf,K.FormNestedScreen=ks,K.FormRecordList=fu,K.FormRecordListStatic=Sx,K.FormRequests=Jp,K.FormTasks=Kp,K.FormText=hu,K.HasColorProperty=gn,K.ImageUpload=Ax,K.ImageVariable=Ox,K.InputVariable=rf,K.Json2Vue=ib,K.LabelSubmitButton=Lx,K.LabelSubmitButtonProperty=iv,K.LoadingSubmitButton=zx,K.LoadingSubmitButtonProperty=av,K.Loop=ek,K.LoopInspector=Ex,K.MultiColumn=tk,K.MultipleUploadsCheckbox=Bx,K.MustacheHelper=Hi,K.NewFormMultiColumn=Yp,K.OptionsList=Mx,K.OutboundConfig=af,K.PageSelect=$x,K.RequiredCheckbox=qx,K.ScreenBase=ad,K.ScreenRendererError=Gp,K.ScreenSelector=Px,K.SelectDataTypeMask=nf,K.Task=Xx,K.Tooltip=Xc,K.ValidationMsg=il,K.ValidationSelect=Ix,K.VariableNameGenerator=Fx,K.VisibilityRule=nv,K.VueFormBuilder=Vx,K.VueFormRenderer=Gi,K.WatchersForm=sk,K.WatchersList=ok,K.WatchersPopup=GJ,K.WatchersSynchronous=bx,K.accordions=Rx,K.bgcolorProperty=la,K.buttonLabelProperty=Xg,K.buttonTypeEvent=tv,K.buttonVariantStyleProperty=rd,K.canOpenJsonFile=L_,K.colorProperty=ua,K.computedFields=sh,K.dataSourceValues=ea,K.dataSources=Ts,K.datatable=ic,K.default=QJ,K.defaultValueProperty=Rn,K.defaultValues=Pw,K.deviceVisibilityProperty=$q,K.disabledProperty=td,K.focusErrors=nc,K.formTypes=As,K.formWatchers=YE,K.getValidPath=$c,K.globalErrorsModule=ik,K.globalProperties=CQ,K.helperTextProperty=Si,K.initializeScreenCache=KJ,K.inspector=Nx,K.javascriptReservedKeywords=rl,K.keyNameProperty=Yt,K.labelProperty=Br,K.multiselectApi=nb,K.mustacheEvaluation=Md,K.placeholderProperty=Nn,K.readonlyProperty=al,K.renderer=HJ,K.shouldElementBeVisible=sb,K.testing=lb,K.toggleStyleProperty=ev,K.tooltipProperty=rv,K.validationRulesProperty=Ra,K.validators=nl,K.watchers=sv,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
344
+ }`,modifiers:{hover:!0,right:!0}}],key:o,staticClass:"gray-text",attrs:{boundary:"viewport","data-cy":`controls-${s.component}`}},[s.config&&s.config.icon?r("i",{class:s.config.icon}):e._e(),r("span",{staticClass:"svg-icon",staticStyle:{width:"12px",height:"12px"},domProps:{innerHTML:e._s(s.config.svg)}}),e._v(" "+e._s(e.$t(s.label))+" ")])}),1):e._e()],1)],1)]})],2)],1)],1),r("b-col",{ref:"screen-container",staticClass:"overflow-auto mh-100 p-0 d-flex flex-column position-relative",attrs:{id:"screen-container"}},[r("tabs-bar",{ref:"tabsBar",attrs:{pages:e.config},on:{"tab-opened":function(a){e.currentPage=a}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(a){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(a){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:a}){return[e.isCurrentPageEmpty(a)?r("div",{staticClass:"d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column",attrs:{"data-cy":"screen-drop-zone"}},[r("svg",{attrs:{width:"81",height:"107",viewBox:"0 0 81 107",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z",fill:"#699CFF"}})]),r("h3",[e._v(e._s(e.$t("Place your controls here.")))]),r("p",[e._v(" "+e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left."))+" ")])]):e._e(),e.renderControls?r("draggable",e._b({key:e.editorContentKey,staticClass:"h-100",attrs:{"data-cy":"editor-content","ghost-class":"form-control-ghost",value:e.config[a].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[a].items,function(i,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===i,hasError:e.hasError(i)},attrs:{selector:i.config.customCssSelector},on:{click:function(s){return e.inspect(i)}}},[i.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(i)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(i)}}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(i)&&e.aiPreview(i)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||i.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{"data-test":"apply-ai-btn",title:e.$t("Apply Changes")},on:{click:function(s){return e.applyAiChanges(i)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(i)&&e.aiPreview(i)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"data-test":"copy-control-btn",title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"data-test":"delete-control-btn",title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:i.config,"ai-element":i},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:i.items,callback:function(s){e.$set(i,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1},on:{input:function(s){i.config.interactive&&(i.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",i.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(a)?e._e():r("div",{attrs:{"data-cy":"screen-drop-zone"}},[e._v("   ")])]}}])})],1),e.renderControls?r("b-col",{staticClass:"overflow-hidden h-100 p-0 inspector-column"},[r("b-card",{staticClass:"p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0",attrs:{"no-body":""}},[r("b-card-body",{staticClass:"p-0 h-100 overflow-auto"},[e._l(e.accordions,function(a){return[e.getInspectorFields(a)&&e.getInspectorFields(a).length>0?r("b-button",{key:`${e.accordionName(a)}-button`,staticClass:"text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none",attrs:{variant:"outline","data-cy":`accordion-${e.accordionName(a).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(a).replace(" ","")}`,"is-open":a.open?"1":"0"},on:{click:function(i){return e.toggleAccordion(a)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(a)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!a.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(a)}-collapse`,attrs:{id:e.accordionName(a)},model:{value:a.open,callback:function(i){e.$set(a,"open",i)},expression:"accordion.open"}},e._l(e.getInspectorFields(a),function(i,n){return r(i.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(i.field||i.config.name),"field-name":i.field,"field-accordion":`accordion-${e.accordionName(a).replace(" ","")}`,builder:e.builder,"form-config":e.config,"screen-type":e.screenType,"current-page":e.currentPage,"selected-control":e.selected},on:{"update-state":e.updateState,setName:function(s){e.inspection.config.name=s}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}},model:{value:e.inspection.config[i.field],callback:function(s){e.$set(e.inspection.config,i.field,s)},expression:"inspection.config[item.field]"}},"component",i.config,!1))}),1)]})],2)],1)],1):e._e(),r("b-modal",{ref:"openSortable",attrs:{id:"openSortable","header-close-content":"&times;",role:"dialog",size:"lg",title:e.$t("Edit Pages"),"ok-title":e.$t("DONE"),"ok-only":"","ok-variant":"secondary","header-class":"modal-header-custom"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Edit Pages")))]),r("span",{staticClass:"modal-subtitle"},[e._v(e._s(e.$t("Change pages order and name")))])]},proxy:!0},{key:"modal-header-close",fn:function({close:a}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(i){return a()}}},[e._v("×")])]}}])},[r("Sortable",{attrs:{items:e.config,"filter-key":"name"},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(a){return e.$bvModal.show("addPageModal")}}})],1),r("b-modal",{ref:"addPageModal",attrs:{id:"addPageModal","header-class":"pb-2",size:"lg","ok-title":e.$t("SAVE"),"cancel-title":e.$t("CANCEL"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;","data-cy":"add-page-modal","ok-disabled":!e.addPageName||!!e.checkPageName(e.addPageName)},on:{ok:e.addPage,show:function(a){e.addPageName="",e.showAddPageValidations=!1}},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Create New Page")))]),r("small",{staticClass:"modal-subtitle mb-n2"},[e._v(e._s(e.$t("Create a new page in your screen")))])]},proxy:!0}])},[r("form-input",{ref:"addPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The name of the new page to add"),error:e.checkPageName(e.addPageName),"data-cy":"add-page-name","aria-required":"true"},model:{value:e.addPageName,callback:function(a){e.addPageName=a},expression:"addPageName"}})],1),r("b-modal",{ref:"editPageModal",attrs:{title:e.$t("Edit Page Title"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.editPage}},[r("required"),r("form-input",{ref:"editPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The new name of the page"),validation:"required",error:e.checkPageName(e.editPageName),required:"","aria-required":"true"},model:{value:e.editPageName,callback:function(a){e.editPageName=a},expression:"editPageName"}})],1),r("b-modal",{ref:"confirm",attrs:{title:e.$t("Caution!"),"ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.deletePage,cancel:e.hideConfirmModal}},[r("p",[e._v(e._s(e.confirmMessage))]),r("div",{attrs:{slot:"modal-ok"},slot:"modal-ok"},[e._v(e._s(e.$t("Delete")))])])],1)},MK=[],$K=oe(OK,EK,MK,!1,null,"fdf4961e",null,null);const Vx=$K.exports,PK=1,DK={name:"FormMultiColumn",mixins:[gn,sb,$c],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Oa,FormInput:Ba,FormSelectList:ee.FormSelectList,FormTextArea:ee.FormTextArea,FormCheckbox:ee.FormCheckbox,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},data(){return{items:[]}},computed:{model(){return this.$parent.model}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},methods:{classColumn(t){let e=PK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e} ${this.columnVerticalAlign(t)}`},columnVerticalAlign(t){let e="";if(this.items.length>0&&this.items[t].length===1){let r=this.items[0].filter(n=>n.component==="FormText");if(r.length===0)return"";let a=r[0],i=" justify-content-"+(a.config.textAlign==="right"?"end":a.config.textAlign);switch(a.config.verticalAlign){case"top":e="d-flex align-items-start"+i;break;case"middle":e="d-flex align-items-center"+i;break;case"bottom":e="d-flex align-items-end"+i;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var IK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"column-draggable",class:e.classColumn(i)},[e._l(a.filter(e.shouldElementBeVisible),function(n,s){return[n.container?r(n.component,{key:s,ref:"container",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{transientData:e.transientData,config:n.config,name:n.config.name!==void 0?n.config.name:null,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}}):r("div",{key:s,staticClass:"w-100",attrs:{id:n.config.name?n.config.name:void 0,selector:n.config.customCssSelector}},[r(n.component,e._b({ref:"elements",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{validationData:e.transientData,disabled:n.config.interactive||n.config.disabled,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:e.model[e.getValidPath(n.config.name)],callback:function(o){e.$set(e.model,e.getValidPath(n.config.name),o)},expression:"model[getValidPath(element.config.name)]"}},"component",n.config,!1))],1)]})],2)}),0)])},zK=[],LK=oe(DK,IK,zK,!1,null,null,null,null);const mu=LK.exports,Ux={value:"string",content:"Text"},Gx={value:"int",content:"Integer"},jK={value:"currency",content:"Currency"},NK={value:"password",content:"Password"},RK={value:"percentage",content:"Percentage"},Hx={value:"float",content:"Decimal"},Yx={value:"datetime",content:"Datetime"},Qx={value:"date",content:"Date"},FK={value:"boolean",content:"Boolean"},qK=[Ux,Gx,jK,RK,Hx,Yx,Qx,NK],BK=[Ux,Gx,Hx];function gu(t){return{type:"FormMultiselect",field:"dataFormat",config:{label:"Data Type",name:"Data Type",helper:"The data type specifies what kind of data is stored in the variable.",validation:"required",options:t}}}function WK(){return{type:nf,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const Kx=gu(qK),VK=gu(BK),UK=gu([FK]),Jx=gu([Qx,Yx]),Zx=WK(),GK=[{editorComponent:ee.FormHtmlEditor,editorBinding:"FormHtmlEditor",rendererComponent:ee.FormHtmlEditor,rendererBinding:"FormHtmlEditor",control:{popoverContent:"Use a Rich Text Editor to add HTML-formatted",order:1,group:"Content Fields",label:"Rich Text",component:"FormHtmlViewer","editor-component":"FormHtmlEditor","editor-control":"FormHtmlEditor",config:{icon:"fas fa-pencil-ruler",interactive:!0,content:"<p>Rich text editor</p>",renderVarHtml:null},inspector:[{type:"FormTextArea",field:"content",config:{rows:5,label:"Content",helper:"The HTML text to display",value:""}},{type:"FormCheckbox",field:"renderVarHtml",config:{label:"Render HTML from a Variable",helper:"",value:""}}]}},{builderComponent:ee.FormInput,builderBinding:"FormInput",rendererComponent:Ba,rendererBinding:"FormMaskedInput",control:{popoverContent:"Collect a string of text and format it as one of several data types",order:1,group:"Input Fields",label:"Line Input",component:"FormInput","editor-component":"FormInput","editor-control":"FormInput",config:{icon:"far fa-square",label:"New Input",name:"",placeholder:"",validation:"",helper:null,type:"text",dataFormat:"string"},inspector:[Yt,Br,Kx,Zx,Ra,Nn,Si,al,ua,la,Rn]}},{editorComponent:ee.FormTextArea,editorBinding:"FormTextArea",rendererComponent:ee.FormTextArea,rendererBinding:"FormTextArea",control:{popoverContent:"Collect a multi-line string of text, to allow for extensive, richly formatted responses",order:4,group:"Input Fields",label:"Textarea",component:"FormTextArea","editor-component":"FormTextArea","editor-control":"FormTextArea","fa-icon":"fas fa-paragraph",config:{icon:"fas fa-paragraph",label:"New Textarea",placeholder:"",helper:null,rows:2,richtext:!1,currency:{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"}},inspector:[Yt,Br,Nn,Si,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Ra,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},al,ua,la,Rn]}},{editorComponent:ee.FormSelectList,editorBinding:"FormSelectList",rendererComponent:ee.FormSelectList,rendererBinding:"FormSelectList",control:{popoverContent:"Collect options from a list, as radio butttons or dropdowns",order:2,group:"Input Fields",label:"Select List",component:"FormSelectList","editor-component":"FormSelectList","editor-control":"FormSelectList",config:{icon:"fas fa-angle-double-down",label:"New Select List",placeholder:"",validation:"",dataSourceUrl:"",dataSourceEndpoint:"",rootElement:"response",options:{showRenderAs:!0,dataSource:ea.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Yt,Br,Nn,Ra,Si,{type:"OptionsList",field:"options",config:{}},ua,la,Rn,al]}},{editorComponent:ee.FormCheckbox,editorBinding:"FormCheckbox",rendererComponent:ee.FormCheckbox,rendererBinding:"FormCheckbox",control:{popoverContent:"Add a checkbox or toggle for true/false responses",order:6,group:"Input Fields",label:"Checkbox",component:"FormCheckbox","editor-component":"FormCheckbox","editor-control":"FormCheckbox",config:{icon:"fas fa-check-square",label:"New Checkbox",helper:null,name:null,initiallyChecked:!1,validation:"",toggle:!1},inspector:[Yt,Br,Si,Ra,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ua,la,ev,td]}},{editorComponent:ee.FormDatePicker,editorBinding:"FormDatePicker",rendererComponent:ee.FormDatePicker,rendererBinding:"FormDatePicker",control:{popoverContent:"Collect a date or date/time",order:5,group:"Input Fields",label:"Date Picker",component:"FormDatePicker","editor-component":"FormDatePicker","editor-control":"FormDatePicker",config:{icon:"far fa-calendar-alt",label:"New Date Picker",type:"datetime",name:"",placeholder:"",minDate:"",maxDate:""},inspector:[{type:"FormInput",field:"minDate",config:{name:"Minimum Date",label:"Minimum Date",validation:"date_or_mustache"}},{type:"FormInput",field:"maxDate",config:{name:"Maximum Date",label:"Maximum Date",validation:"after_min_date|date_or_mustache"}},Yt,Br,Jx,Ra,Nn,Si,ua,la,td,Rn]}},{editorComponent:qa,editorBinding:"FormButton",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add special buttons that link between subpages within this Form",order:1,group:"Navigation",label:"Page Navigation",component:"FormButton","editor-component":"FormButton","editor-control":"PageNavigation",config:{icon:"far fa-compass",label:"Page Navigation",variant:"primary",event:"pageNavigate",eventData:null},inspector:[{type:"PageSelect",field:"eventData",config:{label:"Destination Screen",helper:"The destination page to navigate to"}},Xg,rd]}},{editorComponent:mu,editorBinding:"FormMultiColumn",rendererComponent:mu,rendererBinding:"FormMultiColumn",control:{popoverContent:"Organize and group your content in columns",order:2,group:"Content Fields",label:"Multicolumn / Table",component:"FormMultiColumn","editor-component":"MultiColumn","editor-control":"MultiColumn",container:!0,items:[[],[]],config:{icon:"fas fa-table",options:[{value:"1",content:"6"},{value:"2",content:"6"}]},inspector:[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}},ua,la]}},{editorComponent:xs,editorBinding:"FormLoop",rendererComponent:xs,rendererBinding:"FormLoop",control:{popoverContent:"Add a repeatable section of content",order:5,group:"Content Fields",label:"Loop",component:"FormLoop","editor-component":"Loop","editor-control":"Loop",container:!0,items:[],config:{name:"",icon:"fas fa-redo",settings:{type:"new",varname:"loop",times:"3",add:!1}},inspector:[{type:"LoopInspector",field:"settings",config:{}}]}},{editorComponent:hu,editorBinding:"FormText",rendererComponent:fu,rendererBinding:"FormRecordList",control:{popoverContent:"Format content in a table structure and allow for adding rows",order:4,group:"Content Fields",label:"Record List",component:"FormRecordList","editor-component":"FormText","editor-control":"FormRecordList",config:{name:"",icon:"fas fa-th-list",label:"New Record List",editable:!1,fields:{dataSource:ea.provideData,jsonData:""},form:""},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"List Label",helper:"The label describes this record list"}},{type:"FormCheckbox",field:"editable",config:{label:"Editable?",helper:"Should records be editable/removable and can new records be added"}},{type:"ColumnSetup",field:"fields",config:{label:"Columns",helper:"List of columns to display in the record list"}},{type:"PageSelect",field:"form",config:{label:"Record Form",helper:"The form to use for adding/editing records"}},ua,la]}},{editorComponent:Jn,editorBinding:"FormImage",rendererComponent:Jn,rendererBinding:"FormImage",control:{popoverContent:"Upload an image to your screen",order:3,group:"Content Fields",label:"Image",component:"FormImage","editor-component":"FormImage","editor-control":"FormImage",config:{label:"Image",icon:"fas fa-image",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"name",config:{label:"Name",helper:"Image name"}},{type:"ImageUpload",field:"image",config:{label:"Upload",helper:"Upload image"}},{type:"ImageVariable",field:"imageName",config:{label:"Render from a variable name",helper:null}},{type:"FormInput",field:"height",config:{label:"Height",helper:"Image height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"image width",type:"number"}}]}},{editorComponent:yn,editorBinding:"FormAvatar",rendererComponent:yn,rendererBinding:"FormAvatar",control:{popoverContent:"User avatar",order:3,group:"Dashboards",label:"User Avatar",component:"FormAvatar","editor-component":"FormAvatar","editor-control":"FormAvatar",config:{label:"User Avatar",icon:"fas fa-user-circle",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"height",config:{label:"Height",helper:"Avatar height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"Avatar width",type:"number"}}]}},{editorComponent:qa,editorBinding:"FormSubmit",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add an action to submit your form or update a field",order:3,group:"Input Fields",label:"Submit Button",component:"FormButton","editor-component":"FormButton","editor-control":"FormSubmit",config:{icon:"fas fa-share-square",label:"New Submit",variant:"primary",event:"submit",loading:!1,loadingLabel:"Loading...",defaultSubmit:!0,name:null,fieldValue:null,tooltip:{}},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"name",config:{label:"Variable Name",name:"Variable Name",helper:"A variable name is a symbolic name to reference information.",validation:"regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(?<![.])$/|not_in:"+rl}},tv,av,iv,rv,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},rd]}},{editorComponent:ks,editorBinding:"FormNestedScreen",rendererComponent:ks,rendererBinding:"FormNestedScreen",control:{popoverContent:"Add and reuse another Form within this Form",order:6,group:"Content Fields",label:"Nested Screen",component:"FormNestedScreen","editor-component":"FormNestedScreen","editor-control":"FormNestedScreen",config:{label:"Nested Screen",icon:"fas fa-file-invoice",variant:"primary",name:"Nested Screen",value:null},inspector:[{type:"ScreenSelector",field:"screen",config:{label:"Screen",name:"SelectScreen","validate-nested":!1,helper:"Select a screen"}}]}},{rendererComponent:bn,rendererBinding:"FileUpload",builderComponent:bn,builderBinding:"FileUpload",control:{group:"Files",popoverContent:"Collect files uploaded into the Form",order:1,label:"File Upload",component:"FileUpload","editor-component":"FileUpload","editor-control":"FileUpload",config:{label:"New File Upload",icon:"fas fa-file-upload"},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the field's name"}},{type:"MultipleUploadsCheckbox",field:"multipleUpload",config:{label:"Upload multiple files"}},{type:"FormInput",field:"accept",config:{label:"File Accepted",helper:"Common file types: application/msword, image/gif, image/jpeg, application/pdf, application/vnd.ms-powerpoint, application/vnd.ms-excel, text/plain"}},{type:"RequiredCheckbox",field:"validation",config:{label:"Required",helper:"Prevent form from being submitted unless a file is uploaded"}}]}},{rendererComponent:hu,rendererBinding:"FormText",builderComponent:Xs,builderBinding:"FileDownload",control:{popoverContent:"Offer a File download",order:2,group:"Files",label:"File Download",component:"FileDownload","editor-component":"FormText","editor-control":"FileDownload",config:{label:"New File Download",icon:"fas fa-file-download"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The text to display"}},{type:"FormInput",field:"name",config:{label:"Name",helper:"The name of the Download"}}]}},{rendererComponent:ee.BFormComponent,rendererBinding:"BFormComponent",builderComponent:ee.BFormComponent,builderBinding:"BFormComponent",control:{popoverContent:"Add one of several Bootstrap Vue components",order:1,group:"Advanced",label:"Bootstrap Component",component:"BFormComponent","editor-component":"BFormComponent","editor-control":"BFormComponent",config:{bootstrapComponent:"b-form-tags",bootstrapConfig:"{}",label:"New Bootstrap Component",icon:"fab fa-bootstrap"},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-embed",content:"Embed"},{value:"b-img",content:"Image"},{value:"b-form-rating",content:"Form Rating"},{value:"b-form-spinbutton",content:"Form Spinbutton"},{value:"b-form-tags",content:"Form Tags"},{value:"b-form-timepicker",content:"Form Timepicker"},{value:"b-table",content:"Table"}]}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}},Ra]}},{rendererComponent:ee.BWrapperComponent,rendererBinding:"BWrapperComponent",builderComponent:ee.BWrapperComponent,builderBinding:"BWrapperComponent",control:{popoverContent:"Wrap an existing subpage within this Form into a Bootstrap Vue component",order:2,group:"Advanced",label:"Bootstrap Wrapper",component:"BWrapperComponent","editor-component":"BWrapperComponent","editor-control":"BWrapperComponent",config:{bootstrapComponent:"b-modal",bootstrapConfig:"{}",label:"New Bootstrap Wrapper",icon:"fab fa-bootstrap",name:"",form:""},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-alert",content:"Alert"},{value:"b-card",content:"Card"},{value:"b-collapse",content:"Collapse"},{value:"b-jumbotron",content:"Jumbotron"},{value:"b-modal",content:"Modal"}]}},{type:"PageSelect",field:"form",config:{label:"Page",helper:"The page to use inside the component"}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}}]}},{editorComponent:_s,editorBinding:"FormListTable",rendererComponent:_s,rendererBinding:"FormListTable",control:{popoverContent:"Create List Table",order:6.5,group:"Dashboards",label:"List Table",component:"FormListTable","editor-component":"FormListTable","editor-control":"FormListTable",config:{label:"List Table",icon:"fas fa-list",variant:"primary"},inspector:[{type:"FormMultiselect",field:"listOption",config:{icon:"fas fa-list",label:"List Table",options:[{value:"My Tasks",content:"My Tasks"},{value:"My Requests",content:"My Requests"},{value:"Start New Request",content:"Start New Request"}]}}]}},{editorComponent:ws,editorBinding:"FormAnalyticsChart",rendererComponent:ws,rendererBinding:"FormAnalyticsChart",control:{popoverContent:"Add a chart from the Analytics Reports",order:6,group:"Dashboards",label:"Analytics Chart",component:"FormAnalyticsChart","editor-component":"FormAnalyticsChart","editor-control":"FormAnalyticsChart",config:{label:"Analytics Chart",icon:"fas fa-chart-area",variant:"primary"},inspector:[{type:"AnalyticsSelector",field:"listChartOption",config:{label:"Chart"}}]}}],HK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDEwNC41MTNDMzkuMTE0OSA5MS45MDIxIDU2LjIzMDQgNTcuNjcxNSA4NS4wNTYyIDczLjg4NloiIGZpbGw9IiNERUVFRkEiLz4KPHBhdGggZD0iTTIwNS41OTIgMTI0LjIzNUMyMDcuMjA2IDEyNC44MzUgMjA4Ljk2OSAxMjQuODc1IDIxMC42NDcgMTI0LjQ4OUMyMTcuNjc3IDEyMi44NzYgMjQxLjg1IDExOC42MDMgMjM3LjY1IDEzNy4zMzVDMjM2LjczNSAxNDEuMDUxIDIyMi41NzggMTYxLjg2NCAyNDIuNzM5IDE2OS40NjJDMjQ0LjIxNyAxNzAuMDI2IDI0NS43NzkgMTcwLjMzNCAyNDcuMzYgMTcwLjM3MkMyNTMuNTY4IDE3MC41IDI2NS44NjkgMTY5LjAzNCAyNzEuMDE3IDE2My43OTRDMjc3LjIzNyAxNTcuNDYzIDI3MC40NDIgMTYwLjQ2NSAyNzAuNDQyIDE2MC40NjVDMjcwLjQ0MiAxNjAuNDY1IDI0Ni43OTggMTcwLjc4MyAyMzguNDQ2IDE1OS44MzZDMjM3LjUxNyAxNTguNjE4IDIzNi45MjUgMTU2Ljg0OSAyMzYuNzU2IDE1NS4zMjZDMjM2LjQ2MiAxNTIuNjg2IDIzNy42MzQgMTQ5LjE5NyAyMzkuMTc0IDE0Ni4xNTlDMjQxLjI1OSAxNDIuMDQ4IDI1MS4yNjYgMTIzLjU1NSAyMjkuNTM5IDExOC4xNjhDMjI0LjUzMyAxMTYuOTc2IDIxNy4yNjMgMTE1LjkwNiAyMDcuODkgMTE5Ljg1MkMyMDIuNDIyIDEyMi4xNTQgMjAzLjYzMyAxMjMuNTA3IDIwNS41OTIgMTI0LjIzNVoiIGZpbGw9IiNCQ0RDRjgiLz4KPHBhdGggZD0iTTIxMC40MyAxMTcuMzMxTDIwNC4xMzcgMTE5LjY4N0MyMDEuOTY1IDEyMC41IDIwMC44NjMgMTIyLjkyIDIwMS42NzYgMTI1LjA5MkwyMDEuOTg4IDEyNS45MjZDMjAyLjgwMSAxMjguMDk4IDIwNS4yMjEgMTI5LjIgMjA3LjM5MyAxMjguMzg3TDIxMy42ODcgMTI2LjAzMkMyMTUuODU5IDEyNS4yMTkgMjE2Ljk2MSAxMjIuNzk5IDIxNi4xNDggMTIwLjYyNkwyMTUuODM2IDExOS43OTNDMjE1LjAyMyAxMTcuNjIgMjEyLjYwMyAxMTYuNTE4IDIxMC40MyAxMTcuMzMxWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTcxLjgwMSAxMjQuMTQ3TDE1MS4wNDYgMTMxLjkxNEMxNDkuOTYgMTMyLjMyMSAxNDkuNDA5IDEzMy41MzEgMTQ5LjgxNSAxMzQuNjE3TDE0OS44OTcgMTM0LjgzNkMxNTAuMzAzIDEzNS45MjIgMTUxLjUxMyAxMzYuNDczIDE1Mi42IDEzNi4wNjZMMTczLjM1NSAxMjguMjk5QzE3NC40NDEgMTI3Ljg5MiAxNzQuOTkyIDEyNi42ODIgMTc0LjU4NSAxMjUuNTk2TDE3NC41MDMgMTI1LjM3N0MxNzQuMDk3IDEyNC4yOTEgMTcyLjg4NyAxMjMuNzQgMTcxLjgwMSAxMjQuMTQ3WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTc3LjU5MyAxMzkuNjI0TDE1Ni44MzggMTQ3LjM5MUMxNTUuNzUyIDE0Ny43OTggMTU1LjIwMSAxNDkuMDA4IDE1NS42MDggMTUwLjA5NEwxNTUuNjg5IDE1MC4zMTNDMTU2LjA5NiAxNTEuMzk5IDE1Ny4zMDYgMTUxLjk1IDE1OC4zOTIgMTUxLjU0M0wxNzkuMTQ3IDE0My43NzZDMTgwLjIzMyAxNDMuMzY5IDE4MC43ODQgMTQyLjE1OSAxODAuMzc4IDE0MS4wNzNMMTgwLjI5NiAxNDAuODU0QzE3OS44OSAxMzkuNzY4IDE3OC42NzkgMTM5LjIxNyAxNzcuNTkzIDEzOS42MjRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xOTYuNzU1IDExMy41ODVMMTc5LjkzNCAxMTkuODhDMTc3Ljc2MSAxMjAuNjkzIDE3Ni42NTkgMTIzLjExNCAxNzcuNDcyIDEyNS4yODZMMTgzLjIxNiAxNDAuNjMxQzE4NC4wMjkgMTQyLjgwMyAxODYuNDQ5IDE0My45MDUgMTg4LjYyMSAxNDMuMDkyTDIwNS40NDMgMTM2Ljc5N0MyMDcuNjE1IDEzNS45ODQgMjA4LjcxNyAxMzMuNTY0IDIwNy45MDQgMTMxLjM5MUwyMDIuMTYxIDExNi4wNDZDMjAxLjM0OCAxMTMuODc0IDE5OC45MjggMTEyLjc3MiAxOTYuNzU1IDExMy41ODVaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xODEuNjcyIDExNy42MUwxNjQuODUgMTIzLjkwNkMxNjIuNjc4IDEyNC43MTkgMTYxLjU3NiAxMjcuMTM5IDE2Mi4zODkgMTI5LjMxMkwxNjkuMjQxIDE0Ny42MTlDMTcwLjA1NCAxNDkuNzkxIDE3Mi40NzQgMTUwLjg5MyAxNzQuNjQ2IDE1MC4wOEwxOTEuNDY4IDE0My43ODVDMTkzLjY0IDE0Mi45NzIgMTk0Ljc0MiAxNDAuNTUxIDE5My45MjkgMTM4LjM3OUwxODcuMDc3IDEyMC4wNzJDMTg2LjI2NCAxMTcuODk5IDE4My44NDQgMTE2Ljc5NyAxODEuNjcyIDExNy42MVoiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTE4NC4zMDUgMTEzLjg5NUwxODQuMTczIDExMy45NDRDMTgyLjcyNSAxMTQuNDg2IDE4MS45OSAxMTYuMSAxODIuNTMyIDExNy41NDhMMTkyLjEzMSAxNDMuMTk1QzE5Mi42NzMgMTQ0LjY0MyAxOTQuMjg2IDE0NS4zNzggMTk1LjczNCAxNDQuODM2TDE5NS44NjYgMTQ0Ljc4NkMxOTcuMzE1IDE0NC4yNDQgMTk4LjA0OSAxNDIuNjMxIDE5Ny41MDcgMTQxLjE4MkwxODcuOTA5IDExNS41MzZDMTg3LjM2NyAxMTQuMDg4IDE4NS43NTMgMTEzLjM1MyAxODQuMzA1IDExMy44OTVaIiBmaWxsPSIjMTU3MkMyIi8+CjxwYXRoIGQ9Ik0xMi43ODE2IDEzMC4yOTJDMTIuNzgxNiAxMzAuMjkyIDQ2LjU2NDggMTIwLjc5OCA0MS42NiAxNDIuNjcyQzQwLjgwODMgMTQ2LjEzMyAyOC41NDcyIDE2My45NTMgNDMuMTUyIDE3Mi41MDlDNDYuMjg4IDE3NC4zNDYgNDkuOTA3IDE3NS4xNiA1My41NDEzIDE3NS4xNDFDNjAuMDU3MyAxNzUuMTA3IDcwLjM4NzIgMTczLjg1MyA3NS4wMjc4IDE2OS4xM0M4MS4yNDcxIDE2Mi43OTkgNzQuNDUyNiAxNjUuODAxIDc0LjQ1MjYgMTY1LjgwMUM3NC40NTI2IDE2NS44MDEgNTUuMDUwNCAxNzMuNzgyIDQ1LjA2ODcgMTY3LjQyQzQxLjY2MDQgMTY1LjI0OCA0MC4xMTU1IDE2MS4wNDIgNDEuMDQxMSAxNTcuMTA3QzQxLjUxNDEgMTU1LjE1MyA0Mi4yMzQ1IDE1My4yNjcgNDMuMTg0NyAxNTEuNDk1QzQ1LjM1NTYgMTQ3LjQyOSA1NS4yNzY4IDEyOC44OTEgMzMuNTQ4OCAxMjMuNTA0QzI4LjU0MzYgMTIyLjMxMiAyMS4yNzM4IDEyMS4yNDIgMTEuOTAwMSAxMjUuMTg4QzIuNTI2MzcgMTI5LjEzNSAxMi43ODE2IDEzMC4yOTIgMTIuNzgxNiAxMzAuMjkyWiIgZmlsbD0iI0JDRENGOCIvPgo8cGF0aCBkPSJNNzkuNTcwNCAxNjAuOTA2TDczLjI3NzIgMTYzLjI2MkM3MS4xMDQ4IDE2NC4wNzUgNzAuMDAyOCAxNjYuNDk1IDcwLjgxNTggMTY4LjY2N0w3MS4xMjc4IDE2OS41MDFDNzEuOTQwOCAxNzEuNjczIDc0LjM2MTEgMTcyLjc3NSA3Ni41MzM1IDE3MS45NjJMODIuODI2OCAxNjkuNjA3Qzg0Ljk5OTIgMTY4Ljc5NCA4Ni4xMDEyIDE2Ni4zNzQgODUuMjg4MSAxNjQuMjAxTDg0Ljk3NjIgMTYzLjM2OEM4NC4xNjMxIDE2MS4xOTUgODEuNzQyOSAxNjAuMDkzIDc5LjU3MDQgMTYwLjkwNloiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTkwLjIwMzEgMTUwLjU1Mkw4MC44NzYyIDE1NC4wNDNDNzguNzAzNyAxNTQuODU2IDc3LjYwMTcgMTU3LjI3NiA3OC40MTQ4IDE1OS40NDlMODIuOTEyMiAxNzEuNDY1QzgzLjcyNTMgMTczLjYzOCA4Ni4xNDU1IDE3NC43NCA4OC4zMTc5IDE3My45MjdMOTcuNjQ0OCAxNzAuNDM2Qzk5LjgxNzMgMTY5LjYyMyAxMDAuOTE5IDE2Ny4yMDMgMTAwLjEwNiAxNjUuMDNMOTUuNjA4OCAxNTMuMDEzQzk0Ljc5NTcgMTUwLjg0MSA5Mi4zNzU1IDE0OS43MzkgOTAuMjAzMSAxNTAuNTUyWiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTA1LjczIDE0MS4zTDkxLjgyMTMgMTQ2LjUwNkM4OS42NDg5IDE0Ny4zMTkgODguNTQ2OSAxNDkuNzM5IDg5LjM2IDE1MS45MTJMOTYuMjExNyAxNzAuMjE5Qzk3LjAyNDggMTcyLjM5MiA5OS40NDUgMTczLjQ5NCAxMDEuNjE3IDE3Mi42OEwxMTUuNTI2IDE2Ny40NzVDMTE3LjY5OSAxNjYuNjYyIDExOC44MDEgMTY0LjI0MiAxMTcuOTg4IDE2Mi4wNjlMMTExLjEzNiAxNDMuNzYyQzExMC4zMjMgMTQxLjU4OSAxMDcuOTAzIDE0MC40ODcgMTA1LjczIDE0MS4zWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTA4LjY3NyAxMzcuNTA5TDEwOC41NDUgMTM3LjU1OEMxMDcuMDk2IDEzOC4xIDEwNi4zNjIgMTM5LjcxNCAxMDYuOTA0IDE0MS4xNjJMMTE2LjUwMiAxNjYuODA5QzExNy4wNDQgMTY4LjI1NyAxMTguNjU4IDE2OC45OTIgMTIwLjEwNiAxNjguNDVMMTIwLjIzOCAxNjguNEMxMjEuNjg2IDE2Ny44NTggMTIyLjQyMSAxNjYuMjQ1IDEyMS44NzkgMTY0Ljc5NkwxMTIuMjggMTM5LjE1QzExMS43MzggMTM3LjcwMiAxMTAuMTI1IDEzNi45NjcgMTA4LjY3NyAxMzcuNTA5WiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTQ0LjE5NCAxMjEuMTdDMTQzLjY5MyAxMjEuMTE0IDE0My4yMzMgMTIwLjg2NyAxNDIuOTExIDEyMC40NzlDMTQyLjU5IDEyMC4wOTEgMTQyLjQzMSAxMTkuNTk0IDE0Mi40NjggMTE5LjA5MUwxNDMuNTA2IDEwMC4xMzVDMTQzLjU2OCA5OS4wMDI3IDE0NC41MjQgOTguMTQyNCAxNDUuNjA5IDk4LjI0MjVMMTQ3LjEyMSA5OC4zODI1QzE0OC4yMDYgOTguNDgyNiAxNDguOTgzIDk5LjUwMjUgMTQ4LjgzMSAxMDAuNjI3TDE0Ni4yODEgMTE5LjQ0M0MxNDYuMjIzIDExOS45NDQgMTQ1Ljk3MyAxMjAuNDAzIDE0NS41ODQgMTIwLjcyNUMxNDUuMTk1IDEyMS4wNDcgMTQ0LjY5NyAxMjEuMjA2IDE0NC4xOTQgMTIxLjE3VjEyMS4xN1oiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTEzNS4yMzMgMTIyLjgwNEMxMzUuMDc3IDEyMi44NSAxMzQuOTE0IDEyMi44NjUgMTM0Ljc1MiAxMjIuODQ4QzEzNC41OTEgMTIyLjgzIDEzNC40MzQgMTIyLjc4MSAxMzQuMjkyIDEyMi43MDNDMTM0LjE0OSAxMjIuNjI2IDEzNC4wMjQgMTIyLjUyMSAxMzMuOTIyIDEyMi4zOTRDMTMzLjgyIDEyMi4yNjggMTMzLjc0NCAxMjIuMTIyIDEzMy42OTggMTIxLjk2N0wxMjkuOTkyIDExMC4xNzVDMTI5Ljg4NCAxMDkuODQgMTI5LjkxNCAxMDkuNDc1IDEzMC4wNzQgMTA5LjE2MkMxMzAuMjM1IDEwOC44NDggMTMwLjUxMyAxMDguNjExIDEzMC44NDkgMTA4LjUwM0wxMzEuODA4IDEwOC4yMTNDMTMxLjk3MyAxMDguMTY1IDEzMi4xNDYgMTA4LjE1MiAxMzIuMzE2IDEwOC4xNzRDMTMyLjQ4NiAxMDguMTk2IDEzMi42NDkgMTA4LjI1MyAxMzIuNzk2IDEwOC4zNDJDMTMyLjk0MyAxMDguNDMgMTMzLjA3IDEwOC41NDggMTMzLjE2OSAxMDguNjg4QzEzMy4yNjggMTA4LjgyOCAxMzMuMzM3IDEwOC45ODcgMTMzLjM3MSAxMDkuMTU1TDEzNi4xMTggMTIxLjIzN0MxMzYuMTk1IDEyMS41NjEgMTM2LjE0NiAxMjEuOTAzIDEzNS45ODIgMTIyLjE5NEMxMzUuODE4IDEyMi40ODQgMTM1LjU1MSAxMjIuNzAyIDEzNS4yMzMgMTIyLjgwNFYxMjIuODA0WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTMwLjIzMiAxMjkuNjA0QzEyOS41NjggMTMwLjQyNyAxMjguMjMzIDEzMC40MTcgMTI3LjIwNCAxMjkuNTgyTDEwOC45NTMgMTE0Ljc1M0MxMDcuODYzIDExMy44NjcgMTA3LjU0MSAxMTIuNDAxIDEwOC4yNDUgMTExLjUyOUwxMDkuMjI3IDExMC4zMTNDMTA5LjkzMiAxMDkuNDQgMTExLjM3OCAxMDkuNTEyIDExMi40MSAxMTAuNDdMMTI5LjY4IDEyNi41MTVDMTMwLjY1MyAxMjcuNDE5IDEzMC44OTYgMTI4Ljc4MiAxMzAuMjMyIDEyOS42MDRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xMzguNjY5IDE2Ny45MDZDMTM5LjEzOSAxNjguMDg4IDEzOS41MiAxNjguNDQ1IDEzOS43MzIgMTY4LjkwMkMxMzkuOTQ1IDE2OS4zNTkgMTM5Ljk3MSAxNjkuODgxIDEzOS44MDcgMTcwLjM1N0wxMzMuOTYyIDE4OC40MTlDMTMzLjYxMyAxODkuNDk4IDEzMi40NjkgMTkwLjA4NSAxMzEuNDQ1IDE4OS43MTFMMTMwLjAxOCAxODkuMTlDMTI4Ljk5NSAxODguODE2IDEyOC41MDQgMTg3LjYzMSAxMjguOTM4IDE4Ni41ODRMMTM2LjIwOSAxNjkuMDQzQzEzNi4zOTQgMTY4LjU3MyAxMzYuNzUyIDE2OC4xOTMgMTM3LjIxMSAxNjcuOTgxQzEzNy42NjkgMTY3Ljc2OSAxMzguMTkxIDE2Ny43NDIgMTM4LjY2OSAxNjcuOTA2VjE2Ny45MDZaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xNDcuNzUgMTY4LjYxNUMxNDcuOTEyIDE2OC42MSAxNDguMDc0IDE2OC42MzggMTQ4LjIyNiAxNjguNjk2QzE0OC4zNzcgMTY4Ljc1NCAxNDguNTE2IDE2OC44NDEgMTQ4LjYzNCAxNjguOTUzQzE0OC43NTIgMTY5LjA2NCAxNDguODQ3IDE2OS4xOTggMTQ4LjkxMyAxNjkuMzQ2QzE0OC45NzkgMTY5LjQ5NCAxNDkuMDE2IDE2OS42NTQgMTQ5LjAyIDE2OS44MTdMMTQ5LjU5MiAxODIuMTY0QzE0OS42MSAxODIuNTE2IDE0OS40ODkgMTgyLjg2IDE0OS4yNTMgMTgzLjEyMkMxNDkuMDE4IDE4My4zODUgMTQ4LjY4OCAxODMuNTQzIDE0OC4zMzcgMTgzLjU2MkwxNDcuMzM1IDE4My41OTdDMTQ3LjE2MyAxODMuNjAxIDE0Ni45OTMgMTgzLjU3IDE0Ni44MzQgMTgzLjUwNUMxNDYuNjc1IDE4My40NCAxNDYuNTMyIDE4My4zNDMgMTQ2LjQxMiAxODMuMjJDMTQ2LjI5MyAxODMuMDk3IDE0Ni4yIDE4Mi45NTEgMTQ2LjE0IDE4Mi43OUMxNDYuMDggMTgyLjYyOSAxNDYuMDU1IDE4Mi40NTggMTQ2LjA2NCAxODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Zte="",YK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var QK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"simple-error-message-main"},[e._m(0),r("p",[r("span",{staticClass:"simple-error-message-title"},[e._v(" "+e._s(e.$t(e.title))+" ")])]),r("p",[r("span",{staticClass:"simple-error-message-message"},[e._v(e._s(e.$t(e.message)))])])])},KK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:HK}})])}],JK=oe(YK,QK,KK,!1,null,null,null,null);const ZK={components:{simpleErrorMessage:JK.exports,VueFormRenderer:Gi},props:{initialTaskId:{type:Number,default:null},initialScreenId:{type:Number,default:null},initialRequestId:{type:Number,default:null},initialProcessId:{type:Number,default:null},initialNodeId:{type:String,default:null},userId:{type:Number,default:null},csrfToken:{type:String,default:null},value:{type:Object,default:()=>{}},beforeLoadTask:{type:Function,default:()=>new Promise(t=>{t()})},initialLoopContext:{type:String,default:""},taskPreview:{type:Boolean,default:!1},loading:{type:Number,default:null},alwaysAllowEditing:{type:Boolean,default:!1},disableInterstitial:{type:Boolean,default:!1}},data(){return{task:null,taskId:null,request:null,requestId:null,screen:null,screenId:null,renderComponent:"task-screen",processId:null,nodeId:null,disabled:!1,socketListeners:[],requestData:{},hasErrors:!1,refreshScreen:0,redirecting:null,loadingButton:!1}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialTaskId:{handler(){this.taskId=this.initialTaskId}},initialRequestId:{handler(){this.requestId=this.initialRequestId}},initialProcessId:{handler(){this.processId=this.initialProcessId}},initialNodeId:{handler(){this.nodeId=this.initialNodeId}},screenId:{handler(){this.screenId&&this.loadScreen(this.screenId)}},taskId:{handler(){this.taskId&&(!this.task||this.task.id!==this.taskId)&&this.loadTask()}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},task:{handler(){this.screen||(this.screen=this.task&&this.task.interstitial_screen),this.taskId=this.task.id,this.nodeId=this.task.element_id,this.listenForParentChanges(),this.task.process_request.status==="COMPLETED"&&(this.taskPreview||this.$emit("completed",this.task.process_request.id)),this.taskPreview&&this.task.status==="CLOSED"&&(this.task.interstitial_screen._interstitial=!1,this.alwaysAllowEditing||(this.task.screen.config=this.disableForm(this.task.screen.config)),this.screen=this.task.screen)}},value:{handler(){this.requestData=this.value}},screen:{handler(){if(this.screen&&this.renderComponent!=="ConversationalForm")if(this.screen.type==="CONVERSATIONAL")this.renderComponent="ConversationalForm";else{const t=H.get(this.screen,"_interstitial",!1);let e=H.get(this,"task.component","task-screen");(e===null||t)&&(e="task-screen"),this.renderComponent=e}}}},computed:{shouldAddSubmitButton(){return this.task?this.task.bpmn_tag_name==="manualTask"||!this.task.screen&&this.task.element_type!=="startEvent":!1},showTaskIsCompleted(){return this.task&&this.task.advanceStatus==="completed"&&!this.screen},screenTypeClass(){return this.screen?this.screen.type.toLowerCase()+"-screen":void 0},parentRequest(){return H.get(this.task,"process_request.parent_request_id",null)}},methods:{disableForm(t){if(t instanceof Array)for(let e of t)e.component==="FormButton"&&e.config.event==="submit"?t.splice(t.indexOf(e),1):this.disableForm(e);return t.config!==void 0&&(t.config.disabled=!0),t.items!==void 0&&this.disableForm(t.items),t},showSimpleErrorMessage(){this.renderComponent="simpleErrorMessage"},loadScreen(t){let e="?include=nested";this.requestId&&(e+="&request_id="+this.requestId),this.$dataProvider.getScreen(t,e).then(r=>{this.screen=r.data})},reload(){this.taskId?this.loadTask():this.loadNextAssignedTask()},loadTask(){const t=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;return window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")&&(window.ProcessMaker.VocabulariesSchemaUrl=`vocabularies/task_schema/${this.taskId}`),this.beforeLoadTask(this.taskId,this.nodeId).then(()=>{this.$dataProvider.getTasks(t).then(e=>{if(this.task=e.data,this.checkTaskStatus(),window.PM4ConfigOverrides&&window.PM4ConfigOverrides.getScreenEndpoint&&window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")){const r=window.PM4ConfigOverrides.getScreenEndpoint.split("/");r[1]=this.task.id,window.PM4ConfigOverrides.getScreenEndpoint=r.join("/")}}).catch(()=>{this.hasErrors=!0})})},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=H.get(this.task,"request_data",{}),this.loopContext=H.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=H.merge({},this.requestData,this.task.draft.data)),this.refreshScreen++),this.$emit("task-updated",this.task),this.task.process_request.status==="ERROR"?(this.hasErrors=!0,this.$emit("error",this.requestId)):this.hasErrors=!1},resetScreenState(){this.loadingButton=!1,this.disabled=!1,this.$refs.renderer&&this.$refs.renderer.$children[0]&&(this.$refs.renderer.$children[0].currentPage=0,this.$refs.renderer.restartValidation())},checkTaskStatus(){this.task.status=="COMPLETED"||this.task.status=="CLOSED"||this.task.status=="TRIGGERED"?this.closeTask():this.screen=this.task.screen,this.prepareTask()},disableForSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.disabled=!0:this.disabled=!1})},closeTask(t=null){if(this.hasErrors){this.$emit("error",this.requestId);return}this.task.process_request.status==="COMPLETED"?this.loadNextAssignedTask(t):this.loadingButton?this.loadNextAssignedTask(t):this.task.allow_interstitial?(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)):this.taskPreview||this.$emit("closed",this.task.id)},loadNextAssignedTask(t=null){t||(t=this.requestId);const e=window.Cypress?"":`&t=${Date.now()}`,r=`?user_id=${this.userId}&status=ACTIVE&process_request_id=${t}&include_sub_tasks=1${e}`;return this.$dataProvider.getTasks(r).then(a=>{if(a.data.data.length>0){let i=a.data.data[0];if(i.process_request_id!==this.requestId){if(this.redirecting===i.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=i.process_request_id,this.$emit("redirect",i.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=i.id,this.nodeId=i.element_id}else this.parentRequest&&["COMPLETED","CLOSED"].includes(this.task.process_request.status)&&this.$emit("completed",this.getAllowedRequestId())})},emitIfTaskCompleted(t){this.task&&this.parentRequest&&t==this.task.process_request_id&&this.task.process_request.status==="COMPLETED"&&this.$emit("completed",this.parentRequest)},classHeaderCard(t){let e="bg-success";switch(t){case"completed":e="bg-secondary";break;case"overdue":e="bg-danger";break}return"card-header text-capitalize text-white "+e},submit(t=null,e=!1,r=null){var a;this.disabled||(this.disabled=!0,t&&this.onUpdate(Object.assign({},this.requestData,t)),e?this.loadingButton=!0:this.loadingButton=!1,this.$emit("submit",this.task,e,r),(a=this.task)!=null&&a.allow_interstitial&&!this.loadingButton&&!this.disableInterstitial&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen))},onUpdate(t){this.$emit("input",t),this.disableForSelfService()},activityAssigned(){},processCompleted(){let t;this.parentRequest&&(t=this.getAllowedRequestId(),this.$emit("completed",t)),t!==this.requestId&&this.$emit("completed",this.requestId)},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(a=>a.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},processUpdated:H.debounce(function(t){t.event==="ACTIVITY_ACTIVATED"&&this.reload(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},300),initSocketListeners(){this.addSocketListener(`completed-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessCompleted",t=>{this.processCompleted(t)}),this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>{this.processUpdated(t)}),this.taskId||this.reload()},existsEventMessage(t,e){return sessionStorage.getItem(t)?!0:(sessionStorage.setItem(t,e),!1)},listenForParentChanges(){this.parentRequest&&this.addSocketListener(`parent-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.parentRequest}`,".ProcessUpdated",t=>{["ACTIVITY_ACTIVATED"].includes(t.event)&&!this.existsEventMessage(`${t.event}-${this.userId}-${this.taskId}`)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&!this.existsEventMessage(`${t.event}-${this.userId}-${this.taskId}`)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,a){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,i=>{a(i)}))},unsubscribeSocketListeners(){Object.values(this.socketListeners).forEach(t=>{window.Echo.private(t.channel).stopListening(t.event)}),this.socketListeners={}},obtainPayload(t){return new Promise(e=>{window.ProcessMaker.apiClient.get(t).then(r=>{e(r.data)}).catch(()=>{})})},setMetaValue(){const t=document.head.querySelector('meta[name="request-id"]');t&&t.setAttribute("content",this.requestId)}},mounted(){this.screenId=this.initialScreenId,this.taskId=this.initialTaskId,this.requestId=this.initialRequestId,this.processId=this.initialProcessId,this.nodeId=this.initialNodeId,this.requestData=this.value,this.loopContext=this.initialLoopContext},destroyed(){this.unsubscribeSocketListeners()}};var XK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"tab-pane active show h-100",attrs:{id:"tab-form",role:"tabpanel","aria-labelledby":"tab-form"}},[e.screen?[r("b-overlay",{attrs:{show:e.disabled,id:"overlay-background",variant:"white",cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("p",[e._v("Please claim this task to continue.")])])]},proxy:!0}],null,!1,2499821482)},[r("div",{staticClass:"card card-body border-top-0 h-100",class:e.screenTypeClass},[e.renderComponent==="task-screen"?r("div",[r("vue-form-renderer",{key:e.refreshScreen,ref:"renderer",attrs:{config:e.screen.config,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,"loop-context":e.loopContext},on:{update:e.onUpdate,submit:e.submit},model:{value:e.requestData,callback:function(a){e.requestData=a},expression:"requestData"}})],1):r("div",[r(e.renderComponent,{tag:"component",attrs:{"process-id":e.processId,"instance-id":e.requestId,"token-id":e.taskId,screen:e.screen.config,"csrf-token":e.csrfToken,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,data:e.requestData,type:e.screen.type},on:{submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(a){return e.submit(null)}}},[e._v(" "+e._s(e.$t("Complete Task"))+" ")])]):e._e()])]:e._e(),e.showTaskIsCompleted?[r("div",{staticClass:"card card-body text-center"},[r("h1",[e._v(" "+e._s(e.$t("Task Completed"))+" "),r("i",{staticClass:"fas fa-clipboard-check"})])])]:e._e()],2)},eJ=[],tJ=oe(ZK,XK,eJ,!1,null,null,null,null);const Xx=tJ.exports,tre="",rJ={name:"Loop",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors?this.validationErrors.some(({item:e})=>e===t):!1},inspect(t){this.$emit("inspect",t)},deleteItem(t){this.items.splice(t,1),this.$emit("update-state")},duplicateItem(t){const e=H.cloneDeep(this.items[t]);this.items.push(e),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.component==="AiSection"&&e===r.config.aiConfig.nonce&&this.$set(r,"items",JSON.parse(JSON.stringify(t)))})},updateProgress(t,e){this.value.forEach(r=>{if(r.component==="AiSection"&&e===r.config.aiConfig.nonce){if(this.cancelledJobs.some(a=>a===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var aJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column-draggable",attrs:{selector:e.config.customCssSelector}},[r("draggable",{staticStyle:{"min-height":"80px"},attrs:{list:e.items,group:"controls"}},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"control-item",class:{selected:e.selected===a,hasError:e.hasError(a)},on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[a.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(a)&&e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(a)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){return e.applyAiChanges(a)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(a)&&e.aiPreview(a)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":a,config:a.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:a.items,callback:function(n){e.$set(a,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:a.config.name?a.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1,config:a.config},on:{input:function(n){a.config.interactive&&(a.config.content=n)}}},"component",a.config,!1))],1)])])}),0)],1)},iJ=[],nJ=oe(rJ,aJ,iJ,!1,null,"06c4d69f",null,null);const ek=nJ.exports,rre="",sJ=1,oJ={name:"MultiColumn",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},computed:{classContainer(){return this.items.length>0?"form-group":"column-draggable"}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)},"config.options":function(t){this.items=t.map((e,r)=>this.items[r]?this.items[r]:[])}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors.some(({item:e})=>e===t)},updateContainerConfig(t,e){this.items[e]=t,this.$emit("update-state")},classColumn(t){let e=sJ;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e}`},inspect(t){this.$emit("inspect",t)},deleteItem(t,e){this.items[t].splice(e,1),this.$emit("update-state")},duplicateItem(t,e){const r=H.cloneDeep(this.items[t][e]);this.items[t].push(r),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.forEach(a=>{a.component==="AiSection"&&e===a.config.aiConfig.nonce&&this.$set(a,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})}}};var lJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"mb-1 mt-1 pb-0 pt-0",class:e.classContainer},[r("div",{attrs:{selector:e.config.customCssSelector}},[r("div",{staticClass:"row"},[e._l(e.items,function(a,i){return[r("draggable",{key:i,staticClass:"column-draggable",class:e.classColumn(i),attrs:{value:e.items[i],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,i)}},model:{value:e.items[i],callback:function(n){e.$set(e.items,i,n)},expression:"items[index]"}},e._l(a,function(n,s){return r("div",{key:s,staticClass:"control-item",class:{selected:e.selected===n,hasError:e.hasError(n)},on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[n.container?r("div",{on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(n)&&e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(n)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(n)&&e.aiPreview(n)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(o){return e.applyAiChanges(n)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(n)&&e.aiPreview(n)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"aria-label":e.$t("Duplicate")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(n),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":n,config:n.config},on:{inspect:e.inspect,"update-state":function(o){return e.$emit("update-state")}},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}})],1)]):r("div",{attrs:{id:n.config.name?n.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(n),{"prevent-interaction":!n.config.interactive}],attrs:{tabindex:n.config.interactive?0:-1,config:n.config},on:{input:function(o){n.config.interactive&&(n.config.content=o)}}},"component",n.config,!1))],1)])])}),0)]})],2)])])},uJ=[],cJ=oe(oJ,lJ,uJ,!1,null,"eaf6f1c4",null,null);const tk=cJ.exports,dJ={name:"default-loading-spinner"};var pJ=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},fJ=[],hJ=oe(dJ,pJ,fJ,!1,null,null,null,null);const rk=hJ.exports,mJ=!0;function vu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,a])=>{if(a){if(typeof a=="object"&&"$each"in a){e+=vu(a.$each.$iter);return}r!=="$iter"&&typeof a=="object"&&"$invalid"in a&&a.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&a&&(e+=vu(a))}}),e}const ak=async(t,e)=>{if(t.length===0)return;const r=ch(t[0]),a=[];t.forEach(n=>{r!==n&&a.push(n.loadValidationRules())}),await Promise.all(a);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const i=r.$v;if(i){let n=0,s="";i.$invalid&&(n+=vu(i.vdata),n+=vu(i.schema),s=n===1?"There is a validation error in your form.":"There are {{items}} validation errors in your form.",s=r.$t(s,{items:n})),e("basic",{key:"valid",value:!i.$invalid}),e("basic",{key:"message",value:s})}},gJ=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},vJ=H.debounce(ak,500),bu=[],bJ=(t,e)=>{bu.includes(t)||bu.push(t),vJ(bu,e)},ik={namespaced:mJ,state:()=>({locked:!1,valid:!0,message:"",mode:"",submitted:!1,showValidationOnLoad:!1,disableSubmit:!1}),getters:{isValidScreen(t){return t.valid},getErrorMessage(t){return t.message},getMode(t){return t.mode},showValidationErrors(t){return t.showValidationOnLoad||t.submitted}},mutations:{basic(t,e){t[e.key]=e.value},setMode(t,e){t.mode=e},disableSubmit(t,e){t.disableSubmit=e.value,t.message=e.message}},actions:{restartValidation(){bu.length=0},validate({commit:t},e){bJ(e,t)},async validateNow({commit:t},e){await ak([e],t)},close({commit:t}){t("basic",{key:"valid",value:!0})},hasSubmitted({commit:t},e){t("basic",{key:"submitted",value:e})},showValidationOnLoad({commit:t},e){t("basic",{key:"showValidationOnLoad",value:e})},async disableSubmitOnPhotoVideoUpload({commit:t},e){await gJ(t,e)}}},yu={namespaced:!0,state(){return{stack:[],position:null}},getters:{canUndo(t){return t.position>0},canRedo(t){return t.position<t.stack.length-1},currentState(t,e){const r=t.stack[t.position];return e.nextState&&e.nextState.deletedPage&&(r.currentPage=e.nextState.currentPage),r},nextState(t,e){return e.canRedo?t.stack[t.position+1]:!1}},mutations:{setPosition(t,e){t.position=e},setState(t,e){t.stack.push(e)}},methods:{emitChanges(){window.ProcessMaker.EventBus.$emit("screen-change")}},actions:{pushState({state:t,getters:e,commit:r},a){a.config!==e.currentState&&(r("setState",a),r("setPosition",t.stack.length-1),yu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),yu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),yu.methods.emitChanges())}}},are="",yJ={props:{placeholder:{type:String},value:{type:String}},data(){return{query:""}},watch:{query(t){this.$emit("input",t)}},methods:{runSearch(t){this.$emit("submit",this.query)}},mounted(){this.query=this.value}};var SJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"basic-search"},[r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-1"},[r("div",{staticClass:"search-bar-basic d-flex w-100"},[r("div",{staticClass:"search-bar-inputs flex-grow w-100"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search_input",staticClass:"search-bar-manual-input form-control",attrs:{type:"text",placeholder:e.placeholder?e.placeholder:e.$t("Search"),"data-cy":"watchers-table-search"},domProps:{value:e.query},on:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(a){a.target.composing||(e.query=a.target.value)}}})]),r("div",{staticClass:"search-bar-actions d-flex flex-shrink"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-search-run",attrs:{variant:"primary",title:e.$t("Search")},on:{click:e.runSearch}},[r("i",{staticClass:"fas fa-search",attrs:{"data-cy":"watchers-table-search-button"}})])],1)])]),r("div",{staticClass:"search-bar-buttons"},[e._t("buttons")],2)])])},xJ=[],kJ=oe(yJ,SJ,xJ,!1,null,"d660c896",null,null);const nk=kJ.exports,ire="",_J={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a},mixins:[nc],props:["value"],data(){return{required:!0,numberItem:0,displayList:!0,ruleDescription:"",ruleFormula:"",rulePropName:"",editorInvalid:!1,existsProperty:!1,current:[],add:{id:0,name:"",property:"",type:"expression",formula:""},css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Property Name"),key:"property"},{label:this.$t("Description"),key:"name"},{key:"__actions",label:"",class:"text-right"}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{}}},computed:{javascriptTypeClass(){const{isJS:t}=this;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},expressionTypeClass(){const t=!this.isJS;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},isJS(){return this.add.type==="javascript"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem}),this.current=this.value}},created(){Lt.register("exists-property",()=>{let t=!0;return this.current.forEach(e=>{e.property===this.add.property&&e.id!==this.add.id&&(t=!1)}),t},this.$t("Property already exists"))},methods:{switchExpressionType(t){this.add.type=t},show(){this.$refs.modal.show()},emptyForm(){this.add.id=0,this.add.name="",this.add.property="",this.add.type="expression",this.add.formula="",this.editorInvalid=!1,this.existsProperty=!1,this.ruleDescription="",this.ruleFormula="",this.rulePropName=""},displayTableList(){this.emptyForm(),this.displayList=!0},displayFormProperty(){this.emptyForm(),this.displayList=!1},validateData(){this.errors=[];const t={property:"required|exists-property",name:"required",formula:"required"},e={property:this.add.property,name:this.add.name,formula:this.add.formula},r=new Lt(e,t),a=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(i=>[i,r.errors.first(i)])),a?this.saveProperty():this.focusFirstCalculatedPropertiesError()},saveProperty(){this.add.id===0?(this.numberItem++,this.current.push({id:this.numberItem,property:this.add.property,name:this.add.name,formula:this.add.formula,type:this.add.type})):this.current.forEach(t=>{t.id===this.add.id&&(t.name=this.add.name,t.property=this.add.property,t.formula=this.add.formula,t.type=this.add.type)}),this.$emit("input",this.current),this.displayTableList()},editProperty(t){this.add.id=t.id,this.add.name=t.name,this.add.property=t.property,this.add.type=t.type?t.type:"expression",this.add.formula=t.formula,this.displayList=!1},deleteProperty(t){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t}}};var wJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:"lg",title:e.$t("Calculated Properties"),"content-class":"p-3","header-class":"m-0 p-0 mb-3","body-class":"m-0 p-0","title-class":"m-0","footer-class":"m-0 p-0","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList}},[e.displayList?[r("div",{staticClass:"d-flex align-items-end flex-column mb-3"},[r("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-cy":"calcs-add-property"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Property"))+" ")])]),r("div",{staticClass:"card card-body table-card"},[r("b-table",{attrs:{css:e.css,fields:e.fields,items:e.current,"empty-text":e.$t("No Data Available"),"data-cy":"calcs-table"},scopedSlots:e._u([{key:"cell(__actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"calcs-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"calcs-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}],null,!1,3545130899)})],1),r("template",{slot:"modal-footer"},[r("span")])]:[r("required"),r("form-input",{ref:"property",staticClass:"mb-3",attrs:{label:e.$t("Property Name")+" *",name:"property",error:e.errors.property,"data-cy":"calcs-property-name",required:"","aria-required":"true"},model:{value:e.add.property,callback:function(a){e.$set(e.add,"property",a)},expression:"add.property"}}),r("form-text-area",{ref:"name",staticClass:"mb-3",attrs:{label:e.$t("Description")+" *",name:"name",error:e.errors.name,"data-cy":"calcs-property-description",required:"","aria-required":"true"},model:{value:e.add.name,callback:function(a){e.$set(e.add,"name",a)},expression:"add.name"}}),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("label",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}]},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",{staticClass:"float-right"},[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(a){return e.switchExpressionType("expression")}}},[r("i",{staticClass:"fas fa-square-root-alt"})]),r("a",{staticClass:"btn btn-sm",class:e.javascriptTypeClass,attrs:{"data-cy":"calcs-switch-javascript"},on:{click:function(a){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square"})])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",attrs:{rows:"5",label:e.$t("Formula")+" *",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor-border",class:{"is-invalid":!!e.errors.formula}}),r("monaco-editor",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"calcs-property-javascript",required:"","aria-required":"true"},on:{editorDidMount:e.editorMounted},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),e.isJS&&e.errors.formula?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.errors.formula))])]):e._e()],1),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"calcs-button-cancel"},on:{click:e.displayTableList}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},CJ=[],TJ=oe(_J,wJ,CJ,!1,null,"5efce491",null,null);const AJ=TJ.exports,nre="",OJ={props:["value","cssErrors"],components:{MonacoEditor:_a},data(){return{saveValue:"",innerValue:"",monacoOptions:{language:"css",automaticLayout:!0,minimap:{enabled:!1}}}},watch:{innerValue(t){this.$emit("input",t)}},methods:{show(){this.innerValue=this.value,this.saveValue=this.value,this.$refs.modal.show()},close(){this.$refs.modal.hide()},hide(){this.innerValue=this.saveValue,this.$emit("input",this.innerValue)},save(){this.saveValue=this.innerValue,this.$refs.modal.hide()}}};var EJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"custom-css",title:e.$t("Custom CSS"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","no-close-on-backdrop":"","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"header-close-content":"&times;"},on:{ok:e.save,cancel:e.close,hide:e.hide}},[r("p",[e._v(e._s(e.$t("You can set CSS Selector names in the inspector. Use them here with [selector='my-selector']")))]),r("div",{staticClass:"editor"},[r("monaco-editor",{staticClass:"monaco",attrs:{options:e.monacoOptions,"data-cy":"monaco-editor"},model:{value:e.innerValue,callback:function(a){e.innerValue=a},expression:"innerValue"}})],1),r("b-alert",{attrs:{show:e.cssErrors!="",variant:"danger"}},[r("pre",[e._v(e._s(e.cssErrors))])]),r("div",{attrs:{slot:"modal-cancel","data-cy":"cancel-button"},slot:"modal-cancel"},[e._v(e._s(e.$t("Cancel")))]),r("div",{attrs:{slot:"modal-ok","data-cy":"save-button"},slot:"modal-ok"},[e._v(e._s(e.$t("Save")))])],1)},MJ=[],$J=oe(OJ,EJ,MJ,!1,null,"3824b29b",null,null);const PJ=$J.exports,sre="",DJ=typeof window>"u"?global:window,IJ={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:_a,DataMapping:Xp,OutboundConfig:af,ScreenVariableSelector:xx},mixins:[nc],props:{config:{type:Object,default(){return{name:"",watching:"",script:"",script_id:"",script_key:"",input_data:"{}",script_configuration:"{}",output_variable:"",synchronous:!1,run_onload:!1,show_async_loading:!1}}}},data(){return{scriptConfig:"",endpoint:null,endpoints:[],ruleWatcherName:"",ruleWatcherVariable:"",ruleWatcherScript:"",ruleWatcherOutputVariable:"",required:!0,inputDataInvalid:!1,scriptConfigurationInvalid:!1,scripts:[],script:null,monacoOptions:{automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1}},endpointError:null,inputDataEditor:null,scriptConfigEditor:null}},computed:{dataSourceLink(){const t=this.selectedDataSourceId(),e=this.endpoint;return t&&e?`/designer/data-sources/${t}/resources/${e}`:""},dataSourceConfigWarning(){const t=this.selectedDataSourceId(),e=this.scripts.find(a=>a.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(a=>a.id===`data_source-${t}`);return typeof r>"u"||e===null?"":r.validationStatus.length>0?r.validationStatus:""},isDatasource(){return this.config.script&&this.config.script.id.substr(0,11)==="data_source"},isScript(){return!this.config.script||this.config.script.id.substr(0,6)==="script"},hasInputData(){let t;try{t=JSON.parse(this.config.script_configuration)}catch{return!1}return typeof t.input_data>"u"||t.input_data==null?!1:Object.keys(t.input_data).length===0&&t.input_data.constructor===Object},outputVarLabel(){const t=this.ruleWatcherOutputVariable=="required"?" *":"";return this.$t("Output Variable")+t}},watch:{scriptConfig(t){try{const e=JSON.parse(this.config.script_configuration),r=JSON.parse(t);this.config.script_configuration=JSON.stringify({...e,...r},null," ")}catch{}},endpoint(t){this.setConfig("endpoint",t);const e=this.scriptConfig?JSON.parse(this.scriptConfig):{},r=e.dataMapping||[],a=this.scripts.find(i=>i.items&&i.items.length>0&&i.items[0].id&&i.items[0].id.substr(0,11)==="data_source");if(a&&r.length===0){const i=a.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(i.endpoints&&i.endpoints[t]?i.endpoints[t].dataMapping:[])||[];e.dataMapping=[],n.forEach(s=>{e.dataMapping.push({key:s.key,value:s.value})}),this.scriptConfig=JSON.stringify(e)}},config:{deep:!0,immediate:!0,handler(t){t.input_data||(t.input_data="{}"),t.script_configuration?this.scriptConfig=this.config.script_configuration:t.script_configuration="{}",this.endpoint=this.getConfig().endpoint}},"config.script":{handler(t,e){if(!t)this.config.script_id="",this.config.script_key="",this.config.datasource_script_id="";else if(typeof t=="object"){const r=t.id.split("-"),a=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,a!==r[0]&&(this.config.script_configuration="{}"),r[0]==="data_source"&&this.setConfig("dataSource",this.config.script_id),this.config.datasource_script_id=t.dataSourceScriptId}return t}}},methods:{selectedDataSourceId(){let t=null;try{t=JSON.parse(this.scriptConfig).dataSource}catch{t=null}return t},setValidations(){this.ruleWatcherName="required",this.ruleWatcherVariable="required",this.ruleWatcherScript="required",this.hasInputData&&(this.ruleWatcherOutputVariable="required")},getConfig(){try{return JSON.parse(this.config.script_configuration)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.config.script_configuration=JSON.stringify(r),this.scriptConfig=this.config.script_configuration)},loadEndpoints(){const t=this.config.script.id.substr(0,11)==="data_source"?this.config.script.id.substr(12):null;this.endpoints.splice(0),t&&window.ProcessMaker&&window.ProcessMaker.apiClient&&window.ProcessMaker.apiClient.get(`/data_sources/${t}`).then(e=>{for(const r in e.data.endpoints)this.endpoints.push(r)})},loadSources(){this.scripts=[],this.$root.$children[0].watchers_config.api.scripts.forEach(t=>{t(this.scripts)})},displayTableList(){this.$emit("display-list")},jsonIsValid(t){try{JSON.parse(this.config[t])}catch{return!1}return!0},isFormValid(){this.isDatasource&&!this.endpoint?this.endpointError=this.$t("Endpoint is required"):this.endpointError=null;for(const t in this.$refs)if(this.$refs[t]&&this.$refs[t].name&&this.$refs[t].validator&&this.$refs[t].validator.errorCount!==0)return!1;return!(!this.config.watching||!this.config.script||this.endpointError||!this.jsonIsValid("input_data")||!this.jsonIsValid("script_configuration"))},validateDataAndSave(){this.setValidations(),this.$nextTick(()=>{if(!this.isFormValid()){DJ.ProcessMaker.alert(this.$t("An error occurred. Check the form for errors in red text."),"danger"),this.focusFirstWatcherError();return}this.config.uid||(this.config.uid=H.uniqueId(new Date().getTime())),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var zJ=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"accordion",attrs:{id:"watcherAccordion"}},[r("div",{staticClass:"card card-overflow"},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherConfigButton",staticClass:"p-3 btn btn-link d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherConfig","data-cy":"watchers-accordion-configuration"}},[e._m(0),e._m(1)])])]),r("div",{staticClass:"collapse show",attrs:{id:"watcherConfig","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-input",{ref:"name",attrs:{label:e.$t("Watcher Name")+" *",name:e.$t("Watcher Name"),validation:e.ruleWatcherName,helper:e.$t("A name to describe this Watcher"),"data-cy":"watchers-watcher-name",required:"","aria-required":"true"},model:{value:e.config.name,callback:function(a){e.$set(e.config,"name",a)},expression:"config.name"}}),r("screen-variable-selector",{ref:"watching",attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",validation:e.ruleWatcherVariable,helper:e.$t("Select the variable to watch on this screen or type any request variable name"),"data-cy":"watchers-watcher-variable"},model:{value:e.config.watching,callback:function(a){e.$set(e.config,"watching",a)},expression:"config.watching"}}),r("form-checkbox",{attrs:{name:e.$t("Run Synchronously"),label:e.$t("Run Synchronously"),toggle:!0,helper:e.$t("Wait for the Watcher to run before accepting more input"),"data-cy":"watchers-watcher-synchronous"},model:{value:e.config.synchronous,callback:function(a){e.$set(e.config,"synchronous",a)},expression:"config.synchronous"}}),r("form-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.config.synchronous,expression:"!config.synchronous"}],attrs:{name:e.$t("Show message while loading remote data"),label:e.$t("Show message while loading remote data"),toggle:!0,"data-cy":"watchers-watcher-show-loading"},model:{value:e.config.show_async_loading,callback:function(a){e.$set(e.config,"show_async_loading",a)},expression:"config.show_async_loading"}}),r("form-checkbox",{attrs:{name:e.$t("Run Watcher on Screen Load"),label:e.$t("Run watcher on Screen Load"),toggle:!0,"data-cy":"watchers-watcher-run-onload"},model:{value:e.config.run_onload,callback:function(a){e.$set(e.config,"run_onload",a)},expression:"config.run_onload"}})],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherSourceButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherSource","data-cy":"watchers-accordion-source"}},[e._m(2),e._m(3)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherSource","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-multi-select",{ref:"script",attrs:{name:e.$t("Source"),label:e.$t("Source")+" *",options:e.scripts,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,searchable:!0,"option-value":"id","option-content":"title","group-values":"items","group-label":"type",validation:e.ruleWatcherScript,helper:e.$t("The source to access when this Watcher runs"),"data-cy":"watchers-watcher-source"},on:{open:e.loadSources},model:{value:e.config.script,callback:function(a){e.$set(e.config,"script",a)},expression:"config.script"}}),e.isScript?r("div",[e.config.script?r("b-alert",{attrs:{show:"",variant:"warning"}},[r("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.$t("Using watchers with Scripts can slow the performance of your screen."))+" ")]):e._e(),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{ref:"input_data",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},on:{editorDidMount:e.inputDataEditorMounted},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the script (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])]),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Script Configuration")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("script_configuration")}},[r("monaco-editor",{ref:"script_configuration",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-script_configuration"},on:{editorDidMount:e.scriptConfigEditorMounted},model:{value:e.config.script_configuration,callback:function(a){e.$set(e.config,"script_configuration",a)},expression:"config.script_configuration"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Configuration data for the script (valid JSON object, variables supported)")))]),e.scriptConfigurationInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(" "+e._s(e.$t("The Script Configuration field is required"))+" ")])]):e._e(),e.jsonIsValid("script_configuration")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])],1):e._e(),e.isDatasource?r("div",[r("div",{staticClass:"form-group"},[r("form-multi-select",{ref:"endpoint",attrs:{name:e.$t("Resource"),label:e.$t("Resource"),options:e.endpoints,placeholder:e.$t("Select a resource"),multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1,helper:e.$t("The Data Connector resource to access when this Watcher runs"),"data-cy":"watchers-watcher-endpoint"},on:{"search-change":e.loadEndpoints,open:function(a){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(a){e.endpoint=a},expression:"endpoint"}}),e.endpointError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.endpointError))])]):e._e(),e.dataSourceConfigWarning.length>0?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.dataSourceConfigWarning))])]):e._e(),r("a",{directives:[{name:"show",rawName:"v-show",value:e.dataSourceLink.length>0,expression:"dataSourceLink.length > 0"}],staticClass:"link-primary",attrs:{href:e.dataSourceLink,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Data Connector"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])],1),e.hasInputData?e._e():r("outbound-config",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}),e.hasInputData?r("div",{staticClass:"form-group"},[e._m(4),r("div",{staticClass:"row pl-3 mt-1"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the Data Connector (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])]):e._e()],1):e._e()],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherOutputButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherOutput","data-cy":"watchers-accordion-output"}},[e._m(5),e._m(6)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherOutput","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[e.hasInputData||e.isScript?r("form-input",{ref:"propOutputVariableName",attrs:{label:e.outputVarLabel,name:e.$t("Output Variable"),helper:e.$t("The variable that will store the output of the Watcher"),validation:e.ruleWatcherOutputVariable,"data-cy":"watchers-watcher-output_variable",required:e.ruleWatcherOutputVariable=="required","aria-required":e.ruleWatcherOutputVariable=="required"},model:{value:e.config.output_variable,callback:function(a){e.$set(e.config,"output_variable",a)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(a){return a.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},LJ=[function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-cog"}),t._v(" Configuration")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-upload"}),t._v(" Source")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row pl-3"},[e("span",{staticClass:"text-danger"},[t._v(" * Deprecation Warning: Recreate the watcher to use the new format. Version 4.2 will not support Input Data as a JSON object. ")])])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-download"}),t._v(" Output")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])}],jJ=oe(IJ,zJ,LJ,!1,null,"60e1dcd1",null,null);const sk=jJ.exports,ore="",NJ={components:{BasicSearch:nk,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea},props:{value:{type:Array,default(){return[]}}},data(){return{filter:"",css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"name",tdClass:"break-word"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable",tdClass:"break-word"},{label:this.$t("Source"),key:"script.title"},{key:"actions",label:""}]}},computed:{filtered(){const t=this.getValuesWithOutputVarsNames(this.value);if(!this.filter)return t;const e=[];return t.forEach(r=>{Object.keys(r).find(a=>typeof r[a]=="string"?r[a].indexOf(this.filter)>=0:!1)&&e.push(r)}),e}},methods:{search(){},displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getValuesWithOutputVarsNames(t){return t.map(r=>{let a=Object.assign({},r);if(a.script&&a.script.id&&a.script.id.substr(0,11)==="data_source"){let i=JSON.parse(a.script_configuration),n=i&&i.dataMapping?i.dataMapping.map(o=>o.key).join(", "):"";const s=50;a.output_variable=n.length>s?n.substr(0,s)+"...":n}return a})}}};var RJ=function(){var e=this,r=e._self._c;return r("div",[r("b-row",{staticClass:"mb-3"},[r("b-col",[r("basic-search",{on:{submit:e.search},model:{value:e.filter,callback:function(a){e.filter=a},expression:"filter"}},[r("template",{slot:"buttons"},[r("b-btn",{staticClass:"text-nowrap",attrs:{variant:"secondary","data-cy":"watchers-add-watcher"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Watcher"))+" ")])],1)],2)],1)],1),r("div",{staticClass:"card card-body table-card watchers-list"},[r("b-table",{attrs:{items:e.filtered,fields:e.fields,"empty-text":e.$t("No Data Available"),"data-cy":"watchers-table","sort-icon-left":""},scopedSlots:e._u([{key:"cell(actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"watchers-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"watchers-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}])})],1),r("template",{slot:"modal-footer"},[r("span")])],2)},FJ=[],qJ=oe(NJ,RJ,FJ,!1,null,null,null,null);const ok=qJ.exports,lk=typeof window>"u"?global:window,BJ={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a,WatchersList:ok,WatchersForm:sk},props:["value"],data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1}}},watch:{value:{handler(t){this.current=t}}},computed:{},methods:{show(){this.$refs.modal.show()},displayList(){this.add={},this.enableList=!0},displayForm(){this.add={},this.enableList=!1},save(){let t=this.$t("Watcher Saved"),e=this.current.findIndex(r=>r.uid===this.add.uid);e===-1?this.current.push(this.add):(t=this.$t("Watcher Updated"),this.current[e]=this.add),this.showAlert(t),this.$emit("input",this.current),this.displayList()},edit(t){this.displayForm(),this.$set(this,"add",H.cloneDeep(t))},confirmRemoval(t){lk.ProcessMaker.confirmModal(this.$t("Caution!"),this.$t("Are you sure you want to delete the Watcher?"),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.uid!==t.uid),this.$emit("input",this.current),this.showAlert(this.$t("Watcher deleted")),this.displayList()},showAlert(t){lk.ProcessMaker.alert(t,"success")}}};var WJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-popup",title:e.$t("Watchers"),"hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList}},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval},model:{value:e.current,callback:function(a){e.current=a},expression:"current"}})]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},VJ=[],UJ=oe(BJ,WJ,VJ,!1,null,null,null,null);const GJ=UJ.exports,lre="",HJ={...Cs,FormMultiColumn:mu};function YJ(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const QJ={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Hu),t.component("FormImage",Jn),t.component("FormAvatar",yn),t.component("FormLoop",xs),t.component("FormMultiColumn",mu),t.component("FormNestedScreen",ks),t.component("FormRecordList",fu),t.component("Loop",ek),t.component("MultiColumn",tk),t.component("NewFormMultiColumn",Yp),t.component("ScreenRenderer",yx),t.component("Task",Xx),t.component("VueFormBuilder",Vx),t.component("VueFormRenderer",Gi),t.component("DefaultLoadingSpinner",rk),t.use(ee),t.component("FormButton",qa),t.component("FileUpload",bn),t.component("FileDownload",Xs),t.component("FormAnalyticsChart",ws),t.component("FormMaskedInput",Ba),t.use(Cl),t.use(Pt),t.component("FormListTable",_s);const e=new Pt.Store({modules:{globalErrorsModule:ik,undoRedoModule:yu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,a=null){return YJ(this).getDataReference(r,a)}}})}};function KJ(t,e){t.defaults.adapter=Wv(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}K.AddLoopRow=Hu,K.AnalyticsSelector=jx,K.BasicSearch=nk,K.CollectionSelectList=Zp,K.ColorSelect=_x,K.ColumnSetup=wx,K.ComputedProperties=AJ,K.ContainerColumns=Cx,K.Currencies=WH,K.CurrentPageProperty=ac,K.CustomCSS=PJ,K.DataFormatProperty=Zx,K.DataMapping=Xp,K.DataReference=uh,K.DataTypeBooleanProperty=UK,K.DataTypeDateTimeProperty=Jx,K.DataTypeProperty=Kx,K.DataTypeWithoutDateProperty=VK,K.DefaultLoadingSpinner=rk,K.DefaultValueEditor=ef,K.DeviceDetector=ph,K.DeviceVisibility=ed,K.EditOption=Tx,K.FileDownload=Xs,K.FileUpload=bn,K.FormAnalyticsChart=ws,K.FormAvatar=yn,K.FormBuilderControls=GK,K.FormButton=qa,K.FormImage=Jn,K.FormInputMasked=Ba,K.FormListTable=_s,K.FormLoop=xs,K.FormMaskedInput=Ba,K.FormMultiselect=tf,K.FormNestedScreen=ks,K.FormRecordList=fu,K.FormRecordListStatic=Sx,K.FormRequests=Jp,K.FormTasks=Kp,K.FormText=hu,K.HasColorProperty=gn,K.ImageUpload=Ax,K.ImageVariable=Ox,K.InputVariable=rf,K.Json2Vue=ib,K.LabelSubmitButton=Lx,K.LabelSubmitButtonProperty=iv,K.LoadingSubmitButton=zx,K.LoadingSubmitButtonProperty=av,K.Loop=ek,K.LoopInspector=Ex,K.MultiColumn=tk,K.MultipleUploadsCheckbox=Bx,K.MustacheHelper=Hi,K.NewFormMultiColumn=Yp,K.OptionsList=Mx,K.OutboundConfig=af,K.PageSelect=$x,K.RequiredCheckbox=qx,K.ScreenBase=ad,K.ScreenRendererError=Gp,K.ScreenSelector=Px,K.SelectDataTypeMask=nf,K.Task=Xx,K.Tooltip=Xc,K.ValidationMsg=il,K.ValidationSelect=Ix,K.VariableNameGenerator=Fx,K.VisibilityRule=nv,K.VueFormBuilder=Vx,K.VueFormRenderer=Gi,K.WatchersForm=sk,K.WatchersList=ok,K.WatchersPopup=GJ,K.WatchersSynchronous=bx,K.accordions=Rx,K.bgcolorProperty=la,K.buttonLabelProperty=Xg,K.buttonTypeEvent=tv,K.buttonVariantStyleProperty=rd,K.canOpenJsonFile=L_,K.colorProperty=ua,K.computedFields=sh,K.dataSourceValues=ea,K.dataSources=Ts,K.datatable=ic,K.default=QJ,K.defaultValueProperty=Rn,K.defaultValues=Pw,K.deviceVisibilityProperty=$q,K.disabledProperty=td,K.focusErrors=nc,K.formTypes=As,K.formWatchers=YE,K.getValidPath=$c,K.globalErrorsModule=ik,K.globalProperties=CQ,K.helperTextProperty=Si,K.initializeScreenCache=KJ,K.inspector=Nx,K.javascriptReservedKeywords=rl,K.keyNameProperty=Yt,K.labelProperty=Br,K.multiselectApi=nb,K.mustacheEvaluation=Md,K.placeholderProperty=Nn,K.readonlyProperty=al,K.renderer=HJ,K.shouldElementBeVisible=sb,K.testing=lb,K.toggleStyleProperty=ev,K.tooltipProperty=rv,K.validationRulesProperty=Ra,K.validators=nl,K.watchers=sv,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
345
345
  //# sourceMappingURL=vue-form-builder.umd.js.map