qcobjectsnewapp 2.5.14-ts → 2.5.15-ts

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- "use script";"use strict";var global=(()=>{var Bi=Object.defineProperty;var c=(s,t)=>Bi(s,"name",{value:t,configurable:!0}),jn=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var ae=(s,t)=>()=>{try{return t||s((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var x=ae((ya,dn)=>{"use strict";var Ui=Object.create,Jn=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Bo=Object.getOwnPropertyNames,zi=Object.getPrototypeOf,Vi=Object.prototype.hasOwnProperty,p=c((s,t)=>Jn(s,"name",{value:t,configurable:!0}),"__name"),w=c((s,t)=>c(function(){return s&&(t=(0,s[Bo(s)[0]])(s=0)),t},"__init"),"__esm"),Ji=c((s,t)=>c(function(){return t||(0,s[Bo(s)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Us=c((s,t)=>{for(var e in t)Jn(s,e,{get:t[e],enumerable:!0})},"__export"),Ws=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bo(t))!Vi.call(s,o)&&o!==e&&Jn(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=Wi(t,o))||n.enumerable});return s},"__copyProps"),Qi=c((s,t,e)=>(e=s!=null?Ui(zi(s)):{},Ws(t||!s||!s.__esModule?Jn(e,"default",{value:s,enumerable:!0}):e,s)),"__toESM"),Zi=c(s=>Ws(Jn({},"__esModule",{value:!0}),s),"__toCommonJS"),bn,Qn=w({"src/is_raw_class.ts"(){"use strict";bn=p(s=>!!(typeof s=="function"&&s.toString().startsWith("class")),"__is_raw_class__")}}),_n,Zn=w({"src/ObjectName.ts"(){"use strict";_n=p(s=>{let t="";return typeof s=="function"&&Object.hasOwn(s,"name")&&s.name!==""?t=s.name:typeof s<"u"&&typeof s.constructor=="function"&&s.constructor.name!==""?t=s.constructor.name:typeof s<"u"&&typeof s.constructor=="object"&&(t=s.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),t},"ObjectName")}}),Z,fe=w({"src/getType.ts"(){"use strict";Qn(),Zn(),Z=p(c(function(t){let e="";switch(!0){case(typeof t=="object"&&!!t.constructor&&!!t.constructor.name&&t.constructor.name!==""):e=t.constructor.name;break;case(typeof t=="function"&&!!t.name):e=t.name;break;case(bn(t)&&!!t.name):e=t.name;break;case(!!t&&!!t.__classType&&t.__classType!==""):e=t.__classType;break;case(!!t&&!!t.__definition&&!!t.__definition.__classType&&t.__definition.__classType!==""):e=t.__definition.__classType;break;default:e=_n(t);break}return e},"__getType__2"),"__getType__")}}),Xn,_o=w({"src/make_global.ts"(){"use strict";X(),Xn=p(s=>{s&&s.name&&(typeof R<"u"&&typeof s<"u"&&R!==null&&!Object.hasOwn(R,s.name)?gn(s.name,s):typeof global<"u"?global[s.name]=s:typeof globalThis<"u"&&(globalThis[s.name]=s))},"__make_global__")}}),Y,J,Dn,Fe,qn,zs,jo,qo,$o,Fo,Vs,so,Oe=w({"src/PrimaryCollections.ts"(){"use strict";fe(),_o(),Y={},J={},Dn=[],Fe=[],qn=p(function(s,t){let e=Z(s),n=s.name||e;return n.toLowerCase()==="function"&&(n=e),(!Object.hasOwn(s,"__definition")||typeof s.__definition>"u")&&Object.defineProperty(s,"__definition",{value:{},writable:!0,enumerable:!0,configurable:!0}),s.__definition.__classType=e,typeof t<"u"&&(s.__definition.__namespace=t),Y[n]=s,Xn(s),Y[n]},"__register_class__"),zs=p(s=>Y[s],"get_QC_CLASS"),jo=p(function(s){let t=[];for(let e of Object.keys(s))typeof s[e]<"u"&&typeof s[e]!="function"&&Object.hasOwn(s[e],"length")&&s[e].length>0&&(t.push(e),t=t.concat(jo(s[e])));return t},"_get_packages_names"),qo=p(()=>jo(J),"getPackagesNamesList"),$o=p(()=>[...qo()].map(s=>{let t=J[s],e;return t&&(e={packageName:s,classesList:t.filter(function(){return!0})}),e}).filter(function(s){return typeof s<"u"}),"getPackagesList"),Fo=p(()=>{let s=[];return[...$o()].forEach(function(t){return s=s.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${Z(e)}`,classFactory:e}))),t}),s},"getClassesList"),Vs=p(()=>[...Fo()].map(s=>s.className),"getClassesNamesList"),so=p((s,t)=>{J[s]=t},"set_QC_PACKAGE")}}),S,ot=w({"src/Export.ts"(){"use strict";_o(),S=p(function(s){return Xn(s)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Js(s){d.debug(`Importing ${s}...`);function t(e){return d.debug(`Validating if ${e} is a package name...`),!e.startsWith(".")&&!e.startsWith("/")&&!e.includes("/")}c(t,"isPackage"),p(t,"isPackage");try{return!/\.[^/\\]+$/.test(s)&&!t(s)&&(d.debug(`${s} does not have an extension and is not a package. Adding js extension.`),s+=".js"),await import(s)}catch(e){d.warn(`Failed to load module: ${e}`)}}c(Js,"_import_");var Xi=w({"src/_import_.ts"(){"use strict";P(),p(Js,"_import_")}}),Do,y,Uo,qs,Te,yo,q=w({"src/platform.ts"(){"use strict";Xi(),P(),Do=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!Do,Uo=typeof dn<"u"&&typeof window>"u",qs=p(s=>{},"deno_require"),Te=p(s=>Do?qs(s):(t=>{let e;try{(async()=>{e=await Js(t)})().then(n=>{e=n&&n.default||n}).catch(n=>{d.warn(`An error ocurred: ${n}`)})}catch(n){d.debug(`An error ocurred importing module. ${n}`),e={export:{}}}return e})(s),"_require_"),yo=(function(){return typeof cordova<"u"})()}}),uo,d,P=w({"src/Logger.ts"(){"use strict";var s;ot(),q(),uo=(s=class{constructor(){this.debugEnabled=!0,this.infoEnabled=!0,this.warnEnabled=!0,this.errorEnabled=!0}debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)}info(e){let n;this.infoEnabled&&(y?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))}warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}error(e){this.errorEnabled&&console.error("\x1B[31m%s\x1B[0m",`[ERROR][${performance.now().toLocaleString()}] ${e}`)}},c(s,"Logger"),p(s,"Logger"),s),d=new uo,S(d)}}),ve,Re,Se=w({"src/Cast.ts"(){"use strict";P(),ve=p(function(s,t){for(let e in s)if(typeof s[e]<"u")try{t[e]=s[e]}catch(n){d.debug(`An error ocurred: ${n}.`),d.warn(`Unable to cast ${(typeof s).toString()}.${typeof e.toString()} to ${(typeof t).toString()}.${typeof e.toString()}`)}return t},"_Cast"),Re=p(function(s,t,e=!0){for(let n in s)if(typeof s[n]<"u"&&typeof s[n]!="function")try{t[n]=s[n]}catch(o){e||d.debug(`An error ocurred: ${o}.`)}else if(typeof s[n]=="function")try{t[n]=s[n].bind(t)}catch(o){d.warn(o)}return t},"_CastProps")}}),ee,$s,Fs,ge=w({"src/DOMCreateElement.ts"(){"use strict";q(),ee=p(function(s,t,e){let n;return y?n=Fs(s,t,e):n={},n},"_DOMCreateElement"),$s=p((s,{props:t,children:e})=>s({props:t,children:e}),"ComplexTypeCall"),Fs=p((s,t,e)=>{if(typeof s!="string")return $s(s,{props:t,children:e});let n=document.createElement(s);return t&&Object.entries(t).forEach(([o,i])=>{typeof i=="string"||typeof i=="number"?n.setAttribute(o,i.toString()):typeof i=="function"&&o.toLowerCase().startsWith("on")&&n.addEventListener(o.slice(2).toLowerCase(),i.bind(n))}),Array.isArray(e)?e.filter((o=>o instanceof Node)).forEach(o=>{n.appendChild(o)}):e instanceof Node?n.appendChild(e):typeof e=="string"&&(n.innerHTML=e),n},"_DOMCreateComplexElement")}}),Ie,Wo,zo=w({"src/IncrementInstanceID.ts"(){"use strict";Ie=0,Wo=p(()=>{Ie=typeof Ie>"u"||Ie===null?0:Ie+1},"IncrementInstanceID")}}),M,pe,ke=w({"src/introspection.ts"(){"use strict";M=p(s=>{let t=typeof s.prototype<"u"?s.prototype.toString:(function(){return""});typeof s.prototype<"u"&&(s.prototype.toString=function(){let e=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],n;return e.includes(this.name)?n=this.name+"{ [QCObjects native code] }":n=t.call(this),n})},"_protected_code_"),M(Function),pe=p(function(s){let t=[];for(let e in s)(typeof s[e]).toLowerCase()==="function"&&t.push(s[e]);return t},"_methods_")}}),k,$=w({"src/Package.ts"(){"use strict";Qn(),Oe(),k=p((s,t=[])=>{if(Object.hasOwn(J,s)&&typeof J[s]<"u"&&typeof J[s]!="string"&&Object.hasOwn(J[s],"length")&&J[s].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{qn(e,s)}),so(s,J[s].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{qn(e,s)}),so(s,t);else if(bn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=s,t.__namespace=s,qn(t,s),so(s,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${s}.`);return Object.hasOwn(J,s)?J[s]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var s;P(),zo(),Se(),ge(),fe(),ke(),eo(),q(),Oe(),$(),G=(s=class{get body(){return this._body}set body(e){this._body=e}constructor(e){typeof e<"u"&&typeof e.__definition<"u"&&(this.__definition={...e.__definition});let n=this;if(typeof e<"u"&&e!==null&&Object.keys(e).filter(function(o){return isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n[o]=="function"?n[o]=e[o].bind(n):n[o]=e[o]}),Wo(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Ie,writable:!1}),typeof n.__definition<"u"&&Object.keys(n.__definition).filter(function(o){return isNaN(o)&&!["name","__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n.__definition[o]=="function"?n[o]=n.__definition[o].bind(n):n[o]=n.__definition[o]}),pe(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),pe(n.__definition).map(function(o){return n[o.name]=o.bind(n),o}),typeof n._body>"u"||n._body===null){let o=Z(n)||"div";try{y?n.body=ee(o):n.body={}}catch(i){d.debug(`An error ocurred: ${i}.`),n.body={}}}try{if(n.__new__.call(n,e),typeof n=="object"&&Object.hasOwn(n,"_new_")&&typeof n._new_.isCalled>"u")try{n._new_(e),n._new_.isCalled=!0}catch(o){d.warn(`${n.__classType}._new_() failed with error: ${o}`)}}catch(o){d.warn(o)}}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(e){let n=p(function(r){return Object.hasOwn(r,"__classType")?r.__classType:Z.call(e,r)},"__classType"),o=p(r=>typeof r<"u"&&typeof r.__proto__<"u"&&r.__proto__!==null?(n(r)!==""?[n(r)]:[]).concat(o(r.__proto__)):[],"__hierarchy__proto__");(typeof e>"u"||e===null)&&(e=this);let i=[];return i.push(n(e)),i=i.concat(o(e.__proto__)),i}__new__(e){Re(e,this)}_new_(e){}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}getParentClass(){return this.constructor.getParentClass()}static getClass(){return Object.getPrototypeOf(this.constructor)}getClass(){return this.constructor.getClass()}css(e){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=ve(e,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let e=this;return this.constructor.hierarchy(e)}append(e){let n=e||this.body;if(d.debug("append: start"),Ce(n,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${n.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(n);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(n);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(n)}else y&&(d.debug("append to body"),document.body.append(n))}attachIn(e){if(y){let n=document.subelements(e);for(let o=0,i=n.length;o<i;o++)n[o].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},c(s,"InheritClass"),p(s,"InheritClass"),s),k("com.qcobjects",[G])}}),nt,Kn,Yn=w({"src/isQCObjects.ts"(){"use strict";U(),nt=p(function(s){return!!(typeof s=="object"&&Object.hasOwn(s,"__classType")&&s.__instanceID&&Object.hasOwn(s,"__definition")&&typeof s.__definition<"u")||s instanceof G},"isQCObjects_Object"),Kn=p(function(s){return!!(typeof s=="function"&&!s.__instanceID&&s.__definition&&typeof s.__definition<"u"&&s.__definition.__classType)||s.prototype instanceof G},"isQCObjects_Class")}}),Ce,eo=w({"src/is_a.ts"(){"use strict";fe(),Yn(),Zn(),Ce=p((s,t)=>!!(typeof s<"u"&&s!==null&&((Kn(s)||nt(s))&&s.hierarchy().includes(t)||Z(s)===t||_n(s)===t||typeof s===t)),"is_a")}}),Qs,Ki=w({"src/is_forbidden_name.ts"(){"use strict";Qs=p(s=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(s)!==-1,"__is__forbidden_name__")}}),wo,Vo=w({"src/LegacyCopy.ts"(){"use strict";Qn(),wo=p(function(s,t){var n;let e;switch(!0){case typeof s=="string":e=s;break;case typeof s=="number":e=s;break;case typeof s=="object":e=[{...Object.keys(s).filter(o=>!t?.includes(o))}].map(o=>({[o]:s[o]})).reduce((o,i)=>Object.assign(o,i));break;case typeof s=="function":e=s.bind({});break;case bn(s):e=(n=class extends s{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),an,Jo=w({"src/Class.ts"(){"use strict";Oe(),Se(),ge(),fe(),zo(),ke(),eo(),Ki(),Vo(),P(),q(),X(),an=p((s,t,e)=>{var r,a;let n={},o,i;switch(!0){case(!s&&!t&&!e):return class{};case(!!s&&!t&&!e):o=(r=class{},c(r,"type"),p(r,"type"),r),i={};break;case(!!s&&!t&&!!e):o=(a=class{},c(a,"type"),p(a,"type"),a),i=e;break;case(!!s&&!!t&&!!e):o=t,i=e;break;default:return class{}}if(typeof s!="string")throw new Error("Class name must be a string");if(typeof o!="function")throw new Error("Class type must be a function or class");if(Qs(s))throw new Error(`${s} is not an allowed word in the name of a class`);return typeof o.__definition=="object"&&o.__definition&&Object.keys(o.__definition).length!==0&&(i.__definition=Object.assign(wo(o.__definition,["name"]),o)),n[o.name]=o,typeof i>"u"||i===null?i={}:i={...i},typeof i.__instanceID<"u"&&delete i.__instanceID,Y[s]=class extends n[o.name]{constructor(l){super(l||{}),this.__definition={...i};let u=this;if(Wo(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Ie,writable:!1}),typeof u.__definition<"u"&&Object.keys(u.__definition).filter(function(h){return isNaN(h)&&!["name","__instanceID","__classType","__definition"].includes(h)}).forEach(function(h){typeof u.__definition[h]=="function"?u[h]=u.__definition[h].bind(u):u[h]=u.__definition[h]}),pe(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),pe(u.__definition).map(function(h){return u[h.name]=h.bind(u),h}),typeof u._body>"u"||u._body===null){let h=Z(u)||"div";try{y?u.body=ee(h):u.body={}}catch(f){d.debug(`An error ocurred: ${f}.`),u.body={}}}try{if(typeof u.__new__=="function"?u.__new__.call(u,l):typeof super.__new__=="function"&&(u.__new__=super.__new__.bind(u),u.__new__.call(u,l)),typeof u=="object"&&Object.hasOwn(u,"_new_")&&typeof u._new_.isCalled>"u")try{u._new_(l),u._new_.isCalled=!0}catch(h){d.warn(`${u.__classType}._new_() failed with error: ${h}`)}}catch(h){d.warn(h)}}get body(){return this._body}set body(l){this._body=l}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(l){let u=p(function(g){return Object.hasOwn(g,"__classType")?g.__classType:Z.call(l,g)},"__classType"),h=p(g=>typeof g<"u"&&typeof g.__proto__<"u"&&g.__proto__!==null?(u(g)!==""?[u(g)]:[]).concat(h(g.__proto__)):[],"__hierarchy__proto__");(typeof l>"u"||l===null)&&(l=this);let f=[];return f.push(u(l)),f=f.concat(h(l.__proto__)),f}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(l){Re(l,this)}_new_(l){}getClass(){return Object.getPrototypeOf(this.constructor)}css(l){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=ve(l,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let l=this;return this.getClass()?.hierarchy(l)}append(l){let u=l||this.body;if(d.debug("append: start"),Ce(u,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${u.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(u);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(u);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(u)}else y&&(d.debug("append to body"),document.body.append(u))}attachIn(l){if(y){let u=document.subelements(l);for(let h=0,f=u.length;h<f;h++)u[h].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},Y[s]=Re(i,Y[s]),Y[s].__definition=i,Y[s].__definition.__classType=s,R[s]=Y[s],Y[s]},"Class"),typeof an.prototype<"u"&&(an.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),D,me=w({"src/ClassFactory.ts"(){"use strict";Qn(),Oe(),D=p(s=>{let t;if(typeof s>"u"||s===null)throw Error("You need to pass a parameter {className}");if(s!==null&&s.indexOf(".")!==-1){let e=s.split(".").slice(0,s.split(".").length-1).join("."),n=s.split(".").slice(-1).join(""),i=(J[e]||[]).filter(r=>bn(r)).reverse();if(i.length>0)t=i[0];else throw Error(`Class ${n} not found. Found classes: ${JSON.stringify(i)} in package ${e}`)}else if(s!==null){if(t=zs(s),typeof t>"u")throw new Error(`${s} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
1
+ "use script";"use strict";var global=(()=>{var Bi=Object.defineProperty;var c=(s,t)=>Bi(s,"name",{value:t,configurable:!0}),jn=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var ae=(s,t)=>()=>{try{return t||s((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var x=ae((ya,dn)=>{"use strict";var Ui=Object.create,Jn=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Bo=Object.getOwnPropertyNames,zi=Object.getPrototypeOf,Vi=Object.prototype.hasOwnProperty,p=c((s,t)=>Jn(s,"name",{value:t,configurable:!0}),"__name"),w=c((s,t)=>c(function(){return s&&(t=(0,s[Bo(s)[0]])(s=0)),t},"__init"),"__esm"),Ji=c((s,t)=>c(function(){return t||(0,s[Bo(s)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Us=c((s,t)=>{for(var e in t)Jn(s,e,{get:t[e],enumerable:!0})},"__export"),Ws=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bo(t))!Vi.call(s,o)&&o!==e&&Jn(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=Wi(t,o))||n.enumerable});return s},"__copyProps"),Qi=c((s,t,e)=>(e=s!=null?Ui(zi(s)):{},Ws(t||!s||!s.__esModule?Jn(e,"default",{value:s,enumerable:!0}):e,s)),"__toESM"),Zi=c(s=>Ws(Jn({},"__esModule",{value:!0}),s),"__toCommonJS"),bn,Qn=w({"src/is_raw_class.ts"(){"use strict";bn=p(s=>!!(typeof s=="function"&&s.toString().startsWith("class")),"__is_raw_class__")}}),_n,Zn=w({"src/ObjectName.ts"(){"use strict";_n=p(s=>{let t="";return typeof s=="function"&&Object.hasOwn(s,"name")&&s.name!==""?t=s.name:typeof s<"u"&&typeof s.constructor=="function"&&s.constructor.name!==""?t=s.constructor.name:typeof s<"u"&&typeof s.constructor=="object"&&(t=s.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),t},"ObjectName")}}),Z,fe=w({"src/getType.ts"(){"use strict";Qn(),Zn(),Z=p(c(function(t){let e="";switch(!0){case(typeof t=="object"&&!!t.constructor&&!!t.constructor.name&&t.constructor.name!==""):e=t.constructor.name;break;case(typeof t=="function"&&!!t.name):e=t.name;break;case(bn(t)&&!!t.name):e=t.name;break;case(!!t&&!!t.__classType&&t.__classType!==""):e=t.__classType;break;case(!!t&&!!t.__definition&&!!t.__definition.__classType&&t.__definition.__classType!==""):e=t.__definition.__classType;break;default:e=_n(t);break}return e},"__getType__2"),"__getType__")}}),Xn,_o=w({"src/make_global.ts"(){"use strict";X(),Xn=p(s=>{s&&s.name&&(typeof R<"u"&&typeof s<"u"&&R!==null&&!Object.hasOwn(R,s.name)?gn(s.name,s):typeof global<"u"?global[s.name]=s:typeof globalThis<"u"&&(globalThis[s.name]=s))},"__make_global__")}}),Y,J,Dn,Fe,qn,zs,jo,qo,$o,Fo,Vs,so,Oe=w({"src/PrimaryCollections.ts"(){"use strict";fe(),_o(),Y={},J={},Dn=[],Fe=[],qn=p(function(s,t){let e=Z(s),n=s.name||e;return n.toLowerCase()==="function"&&(n=e),(!Object.hasOwn(s,"__definition")||typeof s.__definition>"u")&&Object.defineProperty(s,"__definition",{value:{},writable:!0,enumerable:!0,configurable:!0}),s.__definition.__classType=e,typeof t<"u"&&(s.__definition.__namespace=t),Y[n]=s,Xn(s),Y[n]},"__register_class__"),zs=p(s=>Y[s],"get_QC_CLASS"),jo=p(function(s){let t=[];for(let e of Object.keys(s))typeof s[e]<"u"&&typeof s[e]!="function"&&Object.hasOwn(s[e],"length")&&s[e].length>0&&(t.push(e),t=t.concat(jo(s[e])));return t},"_get_packages_names"),qo=p(()=>jo(J),"getPackagesNamesList"),$o=p(()=>[...qo()].map(s=>{let t=J[s],e;return t&&(e={packageName:s,classesList:t.filter(function(){return!0})}),e}).filter(function(s){return typeof s<"u"}),"getPackagesList"),Fo=p(()=>{let s=[];return[...$o()].forEach(function(t){return s=s.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${Z(e)}`,classFactory:e}))),t}),s},"getClassesList"),Vs=p(()=>[...Fo()].map(s=>s.className),"getClassesNamesList"),so=p((s,t)=>{J[s]=t},"set_QC_PACKAGE")}}),S,ot=w({"src/Export.ts"(){"use strict";_o(),S=p(function(s){return Xn(s)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Js(s){d.debug(`Importing ${s}...`);function t(e){return d.debug(`Validating if ${e} is a package name...`),!e.startsWith(".")&&!e.startsWith("/")&&!e.includes("/")}c(t,"isPackage"),p(t,"isPackage");try{return!/\.[^/\\]+$/.test(s)&&!t(s)&&(d.debug(`${s} does not have an extension and is not a package. Adding js extension.`),s+=".js"),await import(s)}catch(e){d.warn(`Failed to load module: ${e}`)}}c(Js,"_import_");var Xi=w({"src/_import_.ts"(){"use strict";P(),p(Js,"_import_")}}),Do,y,Uo,qs,Te,yo,q=w({"src/platform.ts"(){"use strict";Xi(),P(),Do=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!Do,Uo=typeof dn<"u"&&typeof window>"u",qs=p(s=>{},"deno_require"),Te=p(s=>Do?qs(s):(t=>{let e;try{(async()=>{e=await Js(t)})().then(n=>{e=n&&n.default||n}).catch(n=>{d.warn(`An error ocurred: ${n}`)})}catch(n){d.debug(`An error ocurred importing module. ${n}`),e={export:{}}}return e})(s),"_require_"),yo=(function(){return typeof cordova<"u"})()}}),uo,d,P=w({"src/Logger.ts"(){"use strict";var s;ot(),q(),uo=(s=class{constructor(){this.debugEnabled=!0,this.infoEnabled=!0,this.warnEnabled=!0,this.errorEnabled=!0}debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)}info(e){let n;this.infoEnabled&&(y?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))}warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}error(e){this.errorEnabled&&console.error("\x1B[31m%s\x1B[0m",`[ERROR][${performance.now().toLocaleString()}] ${e}`)}},c(s,"Logger"),p(s,"Logger"),s),d=new uo,S(d)}}),Ce,Re,Se=w({"src/Cast.ts"(){"use strict";P(),Ce=p(function(s,t){for(let e in s)if(typeof s[e]<"u")try{t[e]=s[e]}catch(n){d.debug(`An error ocurred: ${n}.`),d.warn(`Unable to cast ${(typeof s).toString()}.${typeof e.toString()} to ${(typeof t).toString()}.${typeof e.toString()}`)}return t},"_Cast"),Re=p(function(s,t,e=!0){for(let n in s)if(typeof s[n]<"u"&&typeof s[n]!="function")try{t[n]=s[n]}catch(o){e||d.debug(`An error ocurred: ${o}.`)}else if(typeof s[n]=="function")try{t[n]=s[n].bind(t)}catch(o){d.warn(o)}return t},"_CastProps")}}),ee,$s,Fs,ge=w({"src/DOMCreateElement.ts"(){"use strict";q(),ee=p(function(s,t,e){let n;return y?n=Fs(s,t,e):n={},n},"_DOMCreateElement"),$s=p((s,{props:t,children:e})=>s({props:t,children:e}),"ComplexTypeCall"),Fs=p((s,t,e)=>{if(typeof s!="string")return $s(s,{props:t,children:e});let n=document.createElement(s);return t&&Object.entries(t).forEach(([o,i])=>{typeof i=="string"||typeof i=="number"?n.setAttribute(o,i.toString()):typeof i=="function"&&o.toLowerCase().startsWith("on")&&n.addEventListener(o.slice(2).toLowerCase(),i.bind(n))}),Array.isArray(e)?e.filter((o=>o instanceof Node)).forEach(o=>{n.appendChild(o)}):e instanceof Node?n.appendChild(e):typeof e=="string"&&(n.innerHTML=e),n},"_DOMCreateComplexElement")}}),Ie,Wo,zo=w({"src/IncrementInstanceID.ts"(){"use strict";Ie=0,Wo=p(()=>{Ie=typeof Ie>"u"||Ie===null?0:Ie+1},"IncrementInstanceID")}}),M,pe,ke=w({"src/introspection.ts"(){"use strict";M=p(s=>{let t=typeof s.prototype<"u"?s.prototype.toString:(function(){return""});typeof s.prototype<"u"&&(s.prototype.toString=function(){let e=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],n;return e.includes(this.name)?n=this.name+"{ [QCObjects native code] }":n=t.call(this),n})},"_protected_code_"),M(Function),pe=p(function(s){let t=[];for(let e in s)(typeof s[e]).toLowerCase()==="function"&&t.push(s[e]);return t},"_methods_")}}),k,$=w({"src/Package.ts"(){"use strict";Qn(),Oe(),k=p((s,t=[])=>{if(Object.hasOwn(J,s)&&typeof J[s]<"u"&&typeof J[s]!="string"&&Object.hasOwn(J[s],"length")&&J[s].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{qn(e,s)}),so(s,J[s].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{qn(e,s)}),so(s,t);else if(bn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=s,t.__namespace=s,qn(t,s),so(s,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${s}.`);return Object.hasOwn(J,s)?J[s]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var s;P(),zo(),Se(),ge(),fe(),ke(),eo(),q(),Oe(),$(),G=(s=class{get body(){return this._body}set body(e){this._body=e}constructor(e){typeof e<"u"&&typeof e.__definition<"u"&&(this.__definition={...e.__definition});let n=this;if(typeof e<"u"&&e!==null&&Object.keys(e).filter(function(o){return isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n[o]=="function"?n[o]=e[o].bind(n):n[o]=e[o]}),Wo(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Ie,writable:!1}),typeof n.__definition<"u"&&Object.keys(n.__definition).filter(function(o){return isNaN(o)&&!["name","__instanceID","__classType","__definition"].includes(o)}).forEach(function(o){typeof n.__definition[o]=="function"?n[o]=n.__definition[o].bind(n):n[o]=n.__definition[o]}),pe(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),pe(n.__definition).map(function(o){return n[o.name]=o.bind(n),o}),typeof n._body>"u"||n._body===null){let o=Z(n)||"div";try{y?n.body=ee(o):n.body={}}catch(i){d.debug(`An error ocurred: ${i}.`),n.body={}}}try{if(n.__new__.call(n,e),typeof n=="object"&&Object.hasOwn(n,"_new_")&&typeof n._new_.isCalled>"u")try{n._new_(e),n._new_.isCalled=!0}catch(o){d.warn(`${n.__classType}._new_() failed with error: ${o}`)}}catch(o){d.warn(o)}}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(e){let n=p(function(r){return Object.hasOwn(r,"__classType")?r.__classType:Z.call(e,r)},"__classType"),o=p(r=>typeof r<"u"&&typeof r.__proto__<"u"&&r.__proto__!==null?(n(r)!==""?[n(r)]:[]).concat(o(r.__proto__)):[],"__hierarchy__proto__");(typeof e>"u"||e===null)&&(e=this);let i=[];return i.push(n(e)),i=i.concat(o(e.__proto__)),i}__new__(e){Re(e,this)}_new_(e){}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}getParentClass(){return this.constructor.getParentClass()}static getClass(){return Object.getPrototypeOf(this.constructor)}getClass(){return this.constructor.getClass()}css(e){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=Ce(e,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let e=this;return this.constructor.hierarchy(e)}append(e){let n=e||this.body;if(d.debug("append: start"),ve(n,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${n.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(n);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(n);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(n)}else y&&(d.debug("append to body"),document.body.append(n))}attachIn(e){if(y){let n=document.subelements(e);for(let o=0,i=n.length;o<i;o++)n[o].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},c(s,"InheritClass"),p(s,"InheritClass"),s),k("com.qcobjects",[G])}}),nt,Kn,Yn=w({"src/isQCObjects.ts"(){"use strict";U(),nt=p(function(s){return!!(typeof s=="object"&&Object.hasOwn(s,"__classType")&&s.__instanceID&&Object.hasOwn(s,"__definition")&&typeof s.__definition<"u")||s instanceof G},"isQCObjects_Object"),Kn=p(function(s){return!!(typeof s=="function"&&!s.__instanceID&&s.__definition&&typeof s.__definition<"u"&&s.__definition.__classType)||s.prototype instanceof G},"isQCObjects_Class")}}),ve,eo=w({"src/is_a.ts"(){"use strict";fe(),Yn(),Zn(),ve=p((s,t)=>!!(typeof s<"u"&&s!==null&&((Kn(s)||nt(s))&&s.hierarchy().includes(t)||Z(s)===t||_n(s)===t||typeof s===t)),"is_a")}}),Qs,Ki=w({"src/is_forbidden_name.ts"(){"use strict";Qs=p(s=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(s)!==-1,"__is__forbidden_name__")}}),wo,Vo=w({"src/LegacyCopy.ts"(){"use strict";Qn(),wo=p(function(s,t){var n;let e;switch(!0){case typeof s=="string":e=s;break;case typeof s=="number":e=s;break;case typeof s=="object":e=[{...Object.keys(s).filter(o=>!t?.includes(o))}].map(o=>({[o]:s[o]})).reduce((o,i)=>Object.assign(o,i));break;case typeof s=="function":e=s.bind({});break;case bn(s):e=(n=class extends s{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),an,Jo=w({"src/Class.ts"(){"use strict";Oe(),Se(),ge(),fe(),zo(),ke(),eo(),Ki(),Vo(),P(),q(),X(),an=p((s,t,e)=>{var r,a;let n={},o,i;switch(!0){case(!s&&!t&&!e):return class{};case(!!s&&!t&&!e):o=(r=class{},c(r,"type"),p(r,"type"),r),i={};break;case(!!s&&!t&&!!e):o=(a=class{},c(a,"type"),p(a,"type"),a),i=e;break;case(!!s&&!!t&&!!e):o=t,i=e;break;default:return class{}}if(typeof s!="string")throw new Error("Class name must be a string");if(typeof o!="function")throw new Error("Class type must be a function or class");if(Qs(s))throw new Error(`${s} is not an allowed word in the name of a class`);return typeof o.__definition=="object"&&o.__definition&&Object.keys(o.__definition).length!==0&&(i.__definition=Object.assign(wo(o.__definition,["name"]),o)),n[o.name]=o,typeof i>"u"||i===null?i={}:i={...i},typeof i.__instanceID<"u"&&delete i.__instanceID,Y[s]=class extends n[o.name]{constructor(l){super(l||{}),this.__definition={...i};let u=this;if(Wo(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Ie,writable:!1}),typeof u.__definition<"u"&&Object.keys(u.__definition).filter(function(h){return isNaN(h)&&!["name","__instanceID","__classType","__definition"].includes(h)}).forEach(function(h){typeof u.__definition[h]=="function"?u[h]=u.__definition[h].bind(u):u[h]=u.__definition[h]}),pe(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),pe(u.__definition).map(function(h){return u[h.name]=h.bind(u),h}),typeof u._body>"u"||u._body===null){let h=Z(u)||"div";try{y?u.body=ee(h):u.body={}}catch(f){d.debug(`An error ocurred: ${f}.`),u.body={}}}try{if(typeof u.__new__=="function"?u.__new__.call(u,l):typeof super.__new__=="function"&&(u.__new__=super.__new__.bind(u),u.__new__.call(u,l)),typeof u=="object"&&Object.hasOwn(u,"_new_")&&typeof u._new_.isCalled>"u")try{u._new_(l),u._new_.isCalled=!0}catch(h){d.warn(`${u.__classType}._new_() failed with error: ${h}`)}}catch(h){d.warn(h)}}get body(){return this._body}set body(l){this._body=l}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(l){let u=p(function(g){return Object.hasOwn(g,"__classType")?g.__classType:Z.call(l,g)},"__classType"),h=p(g=>typeof g<"u"&&typeof g.__proto__<"u"&&g.__proto__!==null?(u(g)!==""?[u(g)]:[]).concat(h(g.__proto__)):[],"__hierarchy__proto__");(typeof l>"u"||l===null)&&(l=this);let f=[];return f.push(u(l)),f=f.concat(h(l.__proto__)),f}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(l){Re(l,this)}_new_(l){}getClass(){return Object.getPrototypeOf(this.constructor)}css(l){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(d.debug("body style"),this.body&&(this.body.style=Ce(l,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let l=this;return this.getClass()?.hierarchy(l)}append(l){let u=l||this.body;if(d.debug("append: start"),ve(u,"Component")&&(d.debug("append: child is a Component"),d.debug(`appending the body of ${u.name}`)),typeof this.body<"u")if(d.debug("append element"),arguments.length>0){if(d.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(u);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(u);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(u)}else y&&(d.debug("append to body"),document.body.append(u))}attachIn(l){if(y){let u=document.subelements(l);for(let h=0,f=u.length;h<f;h++)u[h].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},Y[s]=Re(i,Y[s]),Y[s].__definition=i,Y[s].__definition.__classType=s,R[s]=Y[s],Y[s]},"Class"),typeof an.prototype<"u"&&(an.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),D,me=w({"src/ClassFactory.ts"(){"use strict";Qn(),Oe(),D=p(s=>{let t;if(typeof s>"u"||s===null)throw Error("You need to pass a parameter {className}");if(s!==null&&s.indexOf(".")!==-1){let e=s.split(".").slice(0,s.split(".").length-1).join("."),n=s.split(".").slice(-1).join(""),i=(J[e]||[]).filter(r=>bn(r)).reverse();if(i.length>0)t=i[0];else throw Error(`Class ${n} not found. Found classes: ${JSON.stringify(i)} in package ${e}`)}else if(s!==null){if(t=zs(s),typeof t>"u")throw new Error(`${s} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
2
2
  Not found in:
3
3
  ${Object.keys(Y).join(`
4
- `)}`);return t},"ClassFactory")}}),Hn,Qo=w({"src/Base64.ts"(){"use strict";var s;Hn=(s=class{static encode(e){let n="",o,i,r,a,l,u,h,f=0;for(e=s._utf8_encode(e);f<e.length;)o=e.charCodeAt(f++),i=e.charCodeAt(f++),r=e.charCodeAt(f++),a=o>>2,l=(o&3)<<4|i>>4,u=(i&15)<<2|r>>6,h=r&63,isNaN(i)?u=h=64:isNaN(r)&&(h=64),n=n+this._keyStr.charAt(a)+this._keyStr.charAt(l)+this._keyStr.charAt(u)+this._keyStr.charAt(h);return n}static decode(e){let n="",o,i,r,a,l,u,h,f=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");f<e.length;)a=this._keyStr.indexOf(e.charAt(f++)),l=this._keyStr.indexOf(e.charAt(f++)),u=this._keyStr.indexOf(e.charAt(f++)),h=this._keyStr.indexOf(e.charAt(f++)),o=a<<2|l>>4,i=(l&15)<<4|u>>2,r=(u&3)<<6|h,n=n+String.fromCharCode(o),u!==64&&(n=n+String.fromCharCode(i)),h!==64&&(n=n+String.fromCharCode(r));return n=s._utf8_decode(n),n}static _utf8_encode(e){e=e.replace(/rn/g,"n");let n="";for(let o=0;o<e.length;o++){let i=e.charCodeAt(o);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}static _utf8_decode(e){let n="",o=0,i=0,r=0,a;for(;o<e.length;)i=e.charCodeAt(o),i<128?(n+=String.fromCharCode(i),o++):i>191&&i<224?(r=e.charCodeAt(o+1),n+=String.fromCharCode((i&31)<<6|r&63),o+=2):(r=e.charCodeAt(o+1),a=e.charCodeAt(o+2),n+=String.fromCharCode((i&15)<<12|(r&63)<<6|a&63),o+=3);return n}},c(s,"_Base64"),p(s,"Base64"),s._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s)}}),he,Zs,Le=w({"src/basePath.ts"(){"use strict";q(),he=(function(){let s="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),s=t.join("/")+"/"}else try{let t=jn("node:process");typeof t<"u"?s=`${t.cwd()}/`:s=""}catch{s=""}return s})(),Zs=p(s=>{he=s},"setBasePath")}}),T,be=w({"src/DataStringify.ts"(){"use strict";Vo(),T=p(s=>JSON.stringify(s,p(function(){let e=new WeakSet,n=0;return function(o,i){if(typeof i=="object"&&i!==null){if(e.has(i))return n+=1,n<=3?wo(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),yn,to=w({"src/domain.ts"(){"use strict";yn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Q,je=w({"src/New.ts"(){"use strict";Q=p(function(s,t={}){if(t=arguments.length>1?t:{},typeof s>"u")return new Object;let e=new s(t);typeof t=="object"&&t!==null&&Object.keys(t).filter(o=>isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)).forEach(o=>{typeof t[o]=="function"?e[o]=t[o].bind(e):e[o]=t[o]});let n=typeof s.__definition=="object"&&s.__definition!==null?s.__definition:{};return e.__definition=Object.assign({},n),typeof e.__classType=="string"&&e.__classType!==""&&(e.__definition.__classType=e.__classType),e},"New"),Q.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),ln,Zo=w({"src/secretKey.ts"(){"use strict";q(),ln=y?location.host:"secret"}}),ue,Xs,Go,Co=w({"src/Crypt.ts"(){"use strict";var s;Qo(),be(),U(),$(),Zo(),ue=(s=class extends G{constructor(){super(...arguments),this.string="",this.key="",this.last_string="",this.last_key="",this.construct=!1}encrypt(e,n){throw new Error("Method not implemented.")}decrypt(e,n){throw new Error("Method not implemented.")}_new_(e){let n=e.string,o=Object.hasOwn(e,"key")?e.key:"";this.__new__(e),o=o===""?this.__instanceID.toString():o,this.last_key=o,this.last_string=n,this.construct=!0}_encrypt(){let e=this.string,n=this.key,o="",i,r;for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+r.charCodeAt(0)),o+=i;return this.last_string=Hn.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,r;e=Hn.decode(e);for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-r.charCodeAt(0)),o+=i;return this.last_string=o,this.last_string}static encrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},c(s,"__Crypt"),p(s,"_Crypt"),s),Xs=p(function(t){return ue.encrypt(T(t),ln)},"_CryptObject"),Go=p(function(t){return t===""?{}:JSON.parse(ue.decrypt(t,ln))},"_DecryptObject"),k("com.qcobjects",[ue])}}),Ae,Yi=w({"src/ConfigSettings.ts"(){"use strict";var s;Le(),U(),$(),Ae=(s=class extends G{constructor(){super(...arguments),this._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:he},this._CONFIG_ENC=""}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}},c(s,"_ConfigSettings"),p(s,"ConfigSettings"),s),k("com.qcobjects",[Ae])}}),v,ce=w({"src/CONFIG.ts"(){"use strict";var s;Le(),Se(),Co(),be(),P(),wn(),Zo(),$(),U(),Yi(),v=(s=class extends G{get _CONFIG_ENC(){return Ae.instance._CONFIG_ENC}get _CONFIG(){return Ae.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&Zs(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=ue.encrypt(T({}),ln));let r=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return Re(a,Go(r))})(Ae.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Ae.instance._CONFIG_ENC=Xs(o),Ae.instance.set(e,n)}get(e,n){let o;try{let r=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=ue.encrypt(T({}),ln));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return Re(u,Go(l))})(Ae.instance);typeof r[e]<"u"&&(o=r[e])}catch(r){console.error(r),d.debug("Something wrong when trying to get CONFIG values"),d.debug("No config value for: "+e),o=n}let i=we.processObject(o);return o===null&&i===null?null:i||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}static set(e,n){s.instance.set(e,n)}static get(e,n){return s.instance.get(e,n)}},c(s,"_CONFIG"),p(s,"CONFIG"),s),k("com.qcobjects",[v])}}),cn,we,wn=w({"src/Processor.ts"(){"use strict";var s;ce(),U(),je(),X(),$(),cn=(s=class extends G{constructor({component:e,processors:n}){super({component:e}),this.processors={config(o,i){return v.get(i,"")},ENV(o,i){return typeof process<"u"?process.env[i]:""},global(o,i){return typeof R<"u"?R[i]:""}},this.processors=Object.assign({},this.processors,s._instance?.processors,n)}static get instance(){return typeof s._instance>"u"&&(s._instance=new s({component:null})),s._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(s.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return s.instance.processors[e]}static getProcessorNames(){return Object.keys(s.instance.processors)}execute(e,n,o){let i=typeof e<"u"&&e!==null?e.processorHandler:this,r=typeof o=="string"?o.split(",").map(a=>a.trim()):[];return i?.processors[n].apply(i,[e,...r])}static process(e,n=null){return s.instance.process(e,n)}process(e,n=null){let o=n!==null?n.processorHandler:Q(s,{component:null});return typeof e=="string"&&Object.keys(o.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(r){let a=`$${i}(${r[1]})`;return e=e.replace(a,o.execute.bind(o).call(o,n,i,r[1])),r})),e}static processObject(e,n){return e==null?e:s.instance.processObject(e,n)}processObject(e,n=null){if(e==null)return e;let o=n===null?this:n.processorHandler;return typeof o>"u"&&(o=new s({component:n})),typeof e=="object"?Object.keys(e).map(i=>(typeof e[i]=="object"&&!Object.hasOwn(e[i],"call")?e[i]=o?.processObject.bind(o)(e[i],n):typeof e[i]=="string"&&(e[i]=o?.process.bind(o)(e[i],n)),i)):typeof e=="string"&&(e=o.process.bind(o)(e,n)),e}},c(s,"_Processor"),p(s,"Processor"),s),we=cn.instance,k("com.qcobjects",[cn])}}),Ks,Ys,Ho,ea=w({"src/routings.ts"(){"use strict";Ks=p((s,t)=>{let e=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),Ys=p(function(s,t){return s.filter(function(e){let n=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(n,"g").test(t)}).reverse()},"__valid_routings__"),Ho=p((s,t)=>s.includes(t),"__valid_routing_way__")}});function un(s,t){let n=class n{constructor(i,r=[]){this.func=i,this.args=r}dispatch(){this.func.apply(this,...t,this)}};c(n,"AsyncCallback"),p(n,"AsyncCallback");let e=n;return ro.push(new e(s,t)),e}c(un,"asyncLoad");var ro,Xo,vo=w({"src/asyncLoad.ts"(){"use strict";ot(),q(),X(),ro=[],p(un,"asyncLoad"),Xo=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&ro.map(function(s){s.dispatch.call(s)})}):typeof R<"u"&&ro.map(function(s){s.dispatch.call(s)})},"_fireAsyncLoad"),S(un)}}),pn,Oo=w({"src/ComplexStorageCache.ts"(){"use strict";var s;Qo(),be(),P(),pn=(s=class{constructor(e){let n,o,i=e.index;if(typeof i<"u"){n=e.load,o=e.alternate;let r=this.getID(i),a=localStorage.getItem(r);if(this.isEmpty(a)){let l=n.call(null,{cachedObjectID:r,cachedResponse:a,cache:this});this.save(i,l),d.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",r))}else o.call(null,{cachedObjectID:r,cachedResponse:a,cache:this}),d.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",r))}else throw new Error("ComplexStorageCache: index is undefined");return this}getItem(e){let n=localStorage.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)}setItem(e,n){localStorage.setItem(e,T(n))}isEmpty(e){let n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n}getID(e){let n;return typeof e<"u"&&(n="cachedObject_"+Hn.encode(T(e).replace(/\{|\}|,/g,"_"))),n}save(e,n){let o=this.getID(e);d.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",o)),this.setItem(o,n)}getCached(e){let n=this.getID(e);return this.getItem(n)}clear(){Object.keys(localStorage).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){return localStorage.removeItem(e),e})}},c(s,"ComplexStorageCache"),p(s,"ComplexStorageCache"),s)}}),no,So=w({"src/serviceLoader.ts"(){"use strict";vo(),Oo(),be(),P(),q(),X(),no=p(function(s,t=!1){let e=p(function(a){var l=new Promise(function(u,h){d.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(a.data)).replace("{{URL}}",a.url));let f=new XMLHttpRequest;f.withCredentials=a.withCredentials,f.open(a.method,a.url,!0);for(let b in a.headers)try{typeof a.headers[b]!="function"&&f.setRequestHeader(b,a.headers[b])}catch(O){d.debug("Something went wrong when assign the header "+b),d.debug(`An error ocurred: ${O}`)}f.onload=function(){if(f.status===200){let O=f.responseText;if(d.debug("Data received {{DATA}}".replace("{{DATA}}",T(O))),d.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",a.name)),a.template=O,a.cached&&typeof C<"u"&&C.save(a.name,a.template),typeof a.done=="function"){var b={request:f,service:a};a.done.call(a,b),u.call(l,b)}}else if(typeof a.fail=="function"){var b={request:f,service:a};a.fail.call(a,b),h.call(l,b)}};let m=p(function(){d.debug("SENDING THE NORMAL REQUEST ");try{f.send(T(a.data))}catch(b){d.debug("SOMETHING WRONG WITH REQUEST "),d.debug(`An error ocurred: ${b}`),h.call(l,{request:f,service:a})}},"_directLoad");if(a.cached){var C=new pn({index:a.data,load(){m.call(this)},alternate(b){if(a.method==="GET"){if(a.template=b.cache.getCached(a.name),typeof a.done=="function"){let O={request:f,service:a};a.done.call(a,O),u.call(l,O)}}else m()}});R.lastCache=C}else m();return f});return l},"_serviceLoaderInBrowser"),n=p(function(a){var l=new Promise(function(u,h){if(typeof URL>"u"){global.URL=Te("url").URL;let b=global.URL}let f=new URL(a.url);var g;a.useHTTP2=Object.hasOwn(a,"useHTTP2")&&a.useHTTP2;let m=p(function(b){d.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(a.data)).replace("{{URL}}",a.url));let O,A={http2Client:C,request:b,service:a,responseHeaders:null};if(typeof a.data=="object"&&a.data!==null&&a.useHTTP2)try{d.debug("Sending data...");let B=new Buffer(T(a.data));b.write(B)}catch(B){d.debug("It was not possible to send any data"),d.debug(`An error ocurred: ${B}`)}O="",b.on("response",B=>{d.debug("receiving response..."),A.responseHeaders=B,O=""}),b.on("data",B=>{d.debug("receiving data..."),O+=""+B.toString(),a.template=O}),a.useHTTP2&&b.resume(),b.on("end",()=>{d.debug("ending call..."),a.template=O,Object.hasOwn(a,"useHTTP2")&&a.useHTTP2?C.destroy():b.destroy(),a.done.call(a,A),u.call(l,A)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var C=Te("http2").connect(f.origin);b=Object.assign({":method":a.method,":path":f.pathname},a.options),b=Object.assign(b,a.headers),g=C.request(b),g.setEncoding("utf8"),m(g)}else if(f.protocol==="http:"){let A=Te("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=A(a.url),m(g)}else if(f.protocol==="https:"){let O=Te("https");b=Object.assign({hostname:f.hostname,port:f.port,path:f.pathname,method:a.method,headers:a.headers},a.options),O.request(b,function(B){m(B)}).end()}else{let O="Protocol not supported: "+f.protocol;throw d.debug(O),new Error(O)}}catch(b){d.debug(b),a.fail.call(a,b),h.call(l,b)}}).catch(u=>{d.debug(`Something happened when trying to call the service: ${a.name}. Error: ${u}`),a.fail.call(a,u)});return l},"_serviceLoaderInNode"),o=p(function(a){var l=new Promise(function(u){d.debug(`Calling mockup service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.mockup=="function"?a.mockup.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderMockup"),i=p(function(a){var l=new Promise(function(u){d.debug(`Calling local service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.local=="function"?a.local.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderLocal"),r;switch(s.kind){case"rest":y?typeof t<"u"&&t?r=un(e,[s,t]):r=e(s):r=n(s);break;case"mockup":r=o(s);break;case"local":r=i(s);break;default:d.debug(`The value of the kind property of the service ${s.name} is not valid`),r=Promise.resolve();break}return r},"serviceLoader")}}),Eo,Ko=w({"src/tag_filter.ts"(){"use strict";Eo="quick-component:not([loaded]),component:not([loaded])"}}),Bn,Yo=w({"src/componentLoader.ts"(){"use strict";vo(),Oo(),be(),P(),q(),X(),Bn=p(function(s,t){let e,n=p(function(r){return e=new Promise(function(a,l){let u=r.__promise__;if((Object.hasOwn(r,"container")&&typeof r.container<"u"&&r.container!==null?r.container:r.body)!==null){let C=p(function(O){O.feedComponent();let A={request:g,component:O};a.call(u,A)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(r.data)).replace("{{URL}}",r.url));let b=p(function(){let O=f?0:200;if(g.status===O){let A=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",T(A))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=A,r.cached&&typeof m<"u"&&m.save(r.name,r.template),C(r)}else{let A={request:g,component:r};l.call(u,A)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")C(r);else{var f=!!r.url.startsWith("file:"),g=new XMLHttpRequest;if(f)"fetch"in R&&(d.debug("I can use fetch..."),d.debug("It is a file to be loaded, so I will try to use fetch"),fetch(r.url).then(A=>{d.debug("I got a response from fetch, so I'll feed the component"),A.text().then(B=>{r.template=B,C(r)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(A=>{throw new Error(`An error ocurred: ${A}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(r.method,r.url,!0)}catch(A){d.debug(`An error ocurred: ${A}.`),d.debug("Last try has failed... The component cannot be loaded.")}!yo&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(A){A=!(typeof A>"u"||!A),d.debug("SENDING THE NORMAL REQUEST "),A?"fetch"in R||(d.debug("I have to try to load the file using xhr... "),g.send(null),g.status===XMLHttpRequest.DONE&&b()):(d.debug("Trying to send the data to the component... "),g.send(T(r.data)))},"_directLoad");if(r.cached&&!f){d.debug("USING CACHE FOR COMPONENT: "+r.name);var m=new pn({index:r.cacheIndex,load(){O.call(this,f)},alternate(A){r.method==="GET"?(r.template=A.cache.getCached(r.cacheIndex),C.call(this,r)):O.call(this,f)}});R.lastCache=m}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),O(f)}}else d.debug("CONTAINER DOESNT EXIST")}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,a).catch(l=>{throw new Error(`${l}`)}),Promise.reject(new Error("An error ocurred"))}).catch(function(a){throw d.debug("Something wrong loading the component"),new Error(`An error ocurred: ${a}`)}),e},"_componentLoaderInBrowser"),o=p(function(r){return e=new Promise(function(a,l){let u=e,h=p(function(m){m.feedComponent().catch(b=>{throw new Error(`An error ocurred trying to feed the component: ${m.name}. Error: ${b}`)});let C={request:null,component:m};a.call(u,C)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(r.data)).replace("{{URL}}",r.url));let f=p(function(m,C){if(m){let b={request:null,component:r};l.call(u,b)}else{let b=C.toString();d.debug("Data received {{DATA}}".replace("{{DATA}}",T(b))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=b,r.cached&&typeof g<"u"&&g.save(r.name,r.template),h(r)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")h(r);else{d.debug("Loading the component as a local file in server...");let m=p(function(){let{readFile:C}=jn("node:fs");d.debug("SENDING THE NORMAL REQUEST "),C(r.url,f)},"_directLoad");if(r.cached){d.debug("USING CACHE FOR COMPONENT: "+r.name);var g=new pn({index:r.cacheIndex,load(){m()},alternate(C){r.method==="GET"?(r.template=C.cache.getCached(r.cacheIndex),h.call(this,r)):m.call(this)}});R.lastCache=g}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),m()}}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,a).catch(l=>{throw new Error(`An error ocurred: ${l}`)}),Promise.reject(new Error("An error ocurred."))}).catch(function(a){d.debug(`Something wrong loading the component: ${a}`)}),e},"_componentLoaderInNode"),i;return y?typeof t<"u"&&t?i=un(n,[s,t]):i=n(s):i=o(s),i},"componentLoader")}}),He,es=w({"src/Component.ts"(){"use strict";var s;Qo(),Le(),Se(),me(),xo(),be(),to(),ge(),fe(),U(),ke(),eo(),Yn(),P(),je(),$(),q(),wn(),ea(),X(),ce(),So(),Ko(),Yo(),He=(s=class extends G{constructor({__parent__:e,templateURI:n="",template:o,tplsource:i="default",tplextension:r,url:a="",name:l="",method:u="GET",data:h={},reload:f=!1,shadowed:g=!1,cached:m=!0,enableServiceClass:C,assignRoutingParams:b=!0,_body:O=ee("div"),__promise__:A=null,__shadowRoot:B,body:ie,shadowRoot:Ln,splashScreenComponent:Fi,controller:Gi,view:Hi}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:e,templateURI:n,template:o,tplsource:i,tplextension:r,url:a,name:l,method:u,data:h,reload:f,shadowed:g,cached:m,enableServiceClass:C,assignRoutingParams:b,_body:O,__promise__:A,__shadowRoot:B,body:ie,shadowRoot:Ln,splashScreenComponent:Fi,controller:Gi,view:Hi}),this.validRoutingWays=["pathname","hash","search"],this.basePath=he,this.domain=yn,this.templateHandler="DefaultTemplateHandler",this.routingWay=null,this.routingNodes=[],this.routings=[],this.routingPath="",this.routingPaths=[],this._componentHelpers=[],this.subcomponents=[],this.splashScreenComponent=void 0,this.controller=void 0,this.routingController=void 0,this.view=void 0,this.effect=void 0,this.method="GET",this.cached=!0,this.__promise__=null,this.__namespace=void 0,this._serviceClassName=null,this.enableServiceClass=!0,this.shadowed=!1,this.assignRoutingParams=!0;let j=this;typeof l<"u"&&(j.name=l),typeof j.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+Z(j)),j.routingWay=v.get("routingWay"),j.processorHandler=new cn({component:j}),j.data=typeof j.data>"u"||j.data===null?{}:j.data,j.data=Object.assign(j.data,j.dataAttributes),j.createServiceInstance().then(()=>{typeof j.__new__=="function"&&j.__new__(j),j._generateRoutingPaths(j.body).then(function(){j._reroute_().then(function(){return j.rebuild().then(function(){d.info(`Component._new_ The component ${j.name} was built successfully!`)}).catch(function($e){d.warn(`Component._new_ Something went wrong building the component ${j.name}`),console.error(`Component._new_ Something went wrong building the component ${j.name}`,$e)})}).catch($e=>{throw Error(`Unexpected error ${$e}`)})}).catch($e=>{throw Error(`Unexpected error ${$e}`)})}).catch($e=>{throw Error(`Unexpected error. ${$e}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=T(e.routingPath);return Hn.encode(e.name+n)}set parsedAssignmentText(e){d.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){let e=this;if(e._parsedAssignmentText=e.parseTemplate(e.template),typeof e._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return e._parsedAssignmentText}set shadowRoot(e){let n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:d.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){return this.__shadowRoot}set routingSelected(e){d.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){let e=this;return Ys(e.routings,e.routingPath)}set routingParams(e){d.debug("[routingParams] This is a read-only property of the component")}get routingParams(){let e=this;return[{}].concat(e.routingSelected.map(function(n){return Ks(n,e.routingPath)})).reduce(function(n,o){return Object.assign(n,o)})}set serviceClassName(e){this._serviceClassName=e}get serviceClassName(){let e="";return y?e=this.body.getAttribute("serviceClass")!==null?this.body.getAttribute("serviceClass"):this._serviceClassName:e=this._serviceClassName,e}get responseToData(){let e=!1;return y?e=this.body.getAttribute("response-to")==="data"||this.responseTo==="data":e=this.responseTo==="data",e}get responseToTemplate(){let e=!1;return y?e=this.body.getAttribute("response-to")==="template"||this.responseTo==="template":e=this.responseTo==="template",e}createServiceInstance(){let e=this,n=this.data,o,i=e.getClass().__definition,r=e.serviceClassName;return new Promise(function(a,l){let u=e.enableServiceClass,h=e.responseToData,f=e.responseToTemplate;if(u&&r!==null&&(o=D(r)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(D("Component"),"responseTo")&&(h=D("Component").responseTo==="data"),!f&&i&&Object.hasOwn(i,"responseTo")?f=i.responseTo==="template":!f&&Object.hasOwn(D("Component"),"responseTo")&&(f=D("Component").responseTo==="template"),typeof o<"u"&&typeof u<"u"&&u===!0&&(h||f)){d.info("Loading service "+r);let g=Q(o,{data:n});no(g)?.then(function({service:m}){let C;typeof m.JSONresponse<"u"&&m.JSONresponse!==null?C=m.JSONresponse:C=m.template,h&&(typeof n=="object"&&typeof C=="object"?n=Object.assign(n,C):n=C,e.data=n),e.serviceInstance=g,e.serviceData=n,f&&(e.template=C),a(C)},function(m){d.debug(`Service loading rejected for ${r} in ${e.name}`),l(m)}).catch(function(m){throw d.debug("Something went wroing while trying to load the service "+r),Error(`Error loading ${r} for ${e.name}. Detail: ${m}`)})}else a(null)})}_bindroute_(){let e=this;e._bindroute_.loaded?d.debug(`Routes already bound to popstate events for ${e.name}`):(y&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(o){let i=!0;le("routingPaths")||gn("routingPaths",[]);let r=v.get("routingWay"),a=o.target[r];return le("routingPaths").includes(a)&&o.target[r]!==location[r]&&o.target.href!==document.location.href?(d.debug("A ROUTING WAS FOUND: "+a),window.history.pushState({href:o.target.href},o?.target?.href,o.target.href),s.route().catch(l=>{throw Error(`Unexpected error: ${l}`)}),i=!1):d.debug("NO ROUTING FOUND FOR: "+a),typeof o.target.oldclick<"u"&&typeof o.target.oldclick=="function"&&o.target.oldclick.call(o.target,o),i},null}),e._bindroute_.loaded=!0)}done(e){return new Promise(o=>{if(typeof e<"u"){let{request:i,component:r}=e;o({request:i,component:r})}else o({request:void 0,component:void 0})})}createControllerInstance(){let e;if(y){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=D(n),typeof e<"u"&&(this.controller=Q(e,{component:this}))}return new Promise((o,i)=>{if(y&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(r){throw Error(r)}else d.debug(`${n} does not have a done() method.`),i(new Error(`${n} does not have a done() method.`));typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):d.debug(`${n} does not have a createRoutingController() method.`)}o({component:this,controller:this.controller})})}createEffectInstance(){let e=this;return new Promise(function(n){if(y){let o=e.body?.getAttribute("effectClass"),i=e.body?.getAttribute("apply-effect-to");i=i!==null?i:"load",o!==null&&i==="observe"?e.applyObserveTransitionEffect(o):o!==null&&i==="load"&&e.applyTransitionEffect(o)}n({component:e,effect:e.effect})})}createViewInstance(){let e=this;return new Promise(function(n){let o=y?e.body.getAttribute("viewClass"):null;if(o!==null){let i=D(o);typeof i<"u"&&(e.view=Q(i,{component:e}),Object.hasOwn(e.view,"done")&&typeof e.view?.done=="function"&&e.view?.done.call(e.view))}n({component:e,view:e.view})})}__done__(){let e=this,n=p(function(){if(typeof e>"u")throw new Error("componentDone() has lost its context");if(typeof e.body>"u")throw new Error("The component has no body");(async()=>{await e.createViewInstance(),await e.createControllerInstance(),await e.createEffectInstance()})().catch(o=>{throw new Error(`Unknown error ${o}.`)}),d.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),d.debug(`Component helpers for ${e.name} executed.`)}catch(o){throw d.debug(`Component helpers for ${e.name} could not be executed.`),Error(o)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),y&&e.body.setAttribute("loaded","true")},"componentDone");return new Promise(function(o,i){try{o(n.call(e))}catch(r){i(new Error(r))}})}hostElements(e){let n=this,o=[];if(y)if(n.shadowed&&typeof n.shadowRoot<"u"&&n.shadowRoot!==null){o=n.shadowRoot.subelements(e);let r=n.container??n.body,a=typeof r<"u"&&r!==null?r.querySelector(".shadowHost"):null;a!==null&&typeof a<"u"&&a.subelements(e).forEach(u=>{o.includes(u)||o.push(u)})}else o=n.body.subelements(e);return o}get subtags(){let e=this,n=Eo;return e.hostElements(n)}get bodyAttributes(){let n=this.body;return y?[...n.getAttributeNames()].map(o=>({[o]:n.getAttribute(o)})).reduce((o,i)=>Object.assign(o,i)):{}}get dataAttributes(){let n=this.body;return y?[{}].concat([...n.getAttributeNames()].filter(o=>o.startsWith("data-")).map(o=>({[o.split("-")[1]]:n.getAttribute(o)}))).reduce((o,i)=>Object.assign(o,i)):{}}__buildSubComponents__(e=!1){let n=this,o=n.subtags;return e||(o=o.filter(i=>!$n(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=po(o,n)),n.subcomponents}fail(e){return new Promise((o,i)=>{if(typeof e<"u"){let{error:r,component:a}=e;o({error:r,component:a})}else i(new Error(" Unknown error."))})}set(e,n){this[e]=n}get(e,n){return this[e]||n}feedComponent(){let e=this;d.debug(`[Component][${this.name}][feedComponent] start feeding component...`);let n=p(function(r){if(typeof r.container>"u"&&typeof r.body>"u"){d.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",r.name));return}let a=typeof r.container>"u"||r.container===null?r.body:r.container,l=r.parsedAssignmentText;if(r.innerHTML=l,r.shadowed){d.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",r.name)),d.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.name));let u=ee("div");a.subelements("[slot]").map(f=>(f.parentElement===a&&u.appendChild(f),f)),d.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",r.name));let h=ee("div");h.classList.add("shadowHost");try{r.shadowRoot=h.attachShadow({mode:"open"})}catch(f){d.debug(`An error ocurred: ${f}.`);try{d.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",r.name)),r.shadowRoot=h.shadowRoot}catch(g){d.debug(`An error ocurred: ${g}.`),d.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",r.name))}}if(typeof r.shadowRoot<"u"&&r.shadowRoot!==null){r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=r.innerHTML)):(u.innerHTML=r.parseTemplate(u.innerHTML),d.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=r.innerHTML)),d.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h.innerHTML+=u.innerHTML,d.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",r.name));let f=a.querySelector(".shadowHost");typeof f<"u"&&f!==null?(d.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",r.name)),r.shadowRoot!==null&&h.shadowRoot!==null&&(r.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):a.appendChild(h)}else d.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",r.name))}else r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),a.innerHTML=r.innerHTML):a&&r?(d.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),a.innerHTML+=r.innerHTML):d.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",r.name))},"_feedComponent_InBrowser"),o=p(function(r){let a=r.parsedAssignmentText;r.innerHTML=a},"_feedComponent_InNode"),i;return Ce(e,"Component")?new Promise((r,a)=>{if(y)try{i=n(e),r(i)}catch(l){a(new Error(l))}else try{i=o(e),r(i)}catch(l){a(new Error(l))}}):(d.warn("Trying to feed a non component object"),Promise.reject(new Error(`Trying to feed a non component object ${typeof e}`)))}rebuild(){let e=this;var n=new Promise(function(o,i){if((typeof e>"u"||e===null)&&i(new Error("Component is undefined")),nt(e)&&Ce(e,"Component"))switch(!0){case e.get("tplsource")==="none":d.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var r={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,r).catch(a=>{d.debug(`It was an error while calling done() in ${e.name}: ${a}`)}),o.call(n,r)},function(){i.call(n,r)});break;case e.get("tplsource")==="inline":d.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),(async a=>{await a.feedComponent.bind(a)()})(e).catch(a=>{d.debug(`It was not possible to feed the component ${e.name}: ${a}`)});var r={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(r),o.call(n,r)},function(){i.call(n,r)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),Bn(e,!1)?.then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),Bn(e,!1).then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):d.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),i.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:d.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),i.call(n,{request:null,component:e});break}});return n}Cast(e){let n=pe(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return ve(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(nt(e)&&Ce(e,"Component")),i=p(function(r){let a=[],l=r.filter(function(u){return typeof u<"u"}).map(function(u){if(typeof u.name<"u")a.push(u.name);else throw new Error(Z(u)+" does not have a name");return new Promise(function(h,f){typeof u<"u"&&u._reroute_?u._reroute_().then(function(){u.reload=!0,u.rebuild().then(()=>{h()}).catch(g=>{d.debug(`Error ${g}`)})}).then(function(){if(Object.hasOwn(u,"subcomponents")&&typeof u.subcomponents<"u"&&u.subcomponents.length>0)return d.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+u.name),i.call(u,u.subcomponents);d.debug("No subcomponents to look for routings in: "+u.name),u.subtags.length>0&&(u.subcomponents=u.__buildSubComponents__(!0)),h()}).catch(g=>{d.debug(`Error: ${g}`)}):typeof u<"u"&&f(new Error("Component "+u.name+" is not an instance of Component"))})});return Promise.all(l).then(function(){d.debug("ROUTING COMPLETED FOR "+a.join(", "))}).catch(function(u){d.warn("ROUTING FAILED FOR "+a.join(", ")+": "+u)})},"__route__");if(o||fn)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:fn);else throw d.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return n}fullscreen(){if(y){let e=this.body;e.requestFullscreen?e.requestFullscreen().catch(n=>{throw new Error(`An error ocurred when requesting fullscreen: ${n}`)}):e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){y&&(document.exitFullscreen?document.exitFullscreen().catch(e=>{throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`)}):document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){let n=this;return new Promise(function(o){y&&Ho(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let r=i.getAttributeNames(),a={};return r.map((l,u)=>(a[r[u]]=i.getAttribute(r[u]),l)),n.routings.push(a),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(a.path)||n.routingPaths.push(a.path),le("routingPaths")||gn("routingPaths",[]),le("routingPaths").includes(a.path)||le("routingPaths").push(a.path),i})),o()})}parseTemplate(e){let n=this,o,i=e;if(Object.hasOwn(n,"templateHandler")){let r=n.templateHandler;d.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${r} ...`);let a=D(r),l=Q(a,{component:n,template:i});l.component=n;let u=n.data;if(Object.hasOwn(n,"assignRoutingParams")&&n.assignRoutingParams)try{u=Object.assign(u,n.routingParams)}catch(h){d.debug(`An error ocurred: ${h}.`),d.debug("[parseTemplate] it was not possible to assign the routing params to the template")}o=l.assign(u)}else d.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),o=i;return o}_reroute_(){let e=this;return new Promise(function(n){y&&Ho(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=Un({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:o.name.toString(),TPLEXTENSION:Object.hasOwn(o,"tplextension")?o.tplextension||"":e.tplextension,TPL_SOURCE:"default"});return e.templateURI=i,o}),e.routingSelected.length>0&&(e.template="",typeof e.body<"u"&&e.body!==null&&(e.body.innerHTML=""))),n(e)})}lazyLoadImages(){if(y){let n=this.componentRoot;if(typeof n<"u"&&n!==null){let o=[...n.subelements("img[lazy-src]")],i=p(function(r){r.setAttribute("src",r.getAttribute("lazy-src")?.toString()),r.onload=()=>{r.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let r=new IntersectionObserver((a,l)=>{a.forEach(u=>{u.isIntersecting&&(i(u.target),l.unobserve(u.target))})});o.map(function(a){return r.observe(a)})}else o.map(i)}}return null}applyTransitionEffect(e){let n=D(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&Ce(n,"TransitionEffect")?(this.effect=Q(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):d.debug(`${e} is ${Z(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(y){let n=this,o=n.componentRoot,i=p(function(){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){let r=new IntersectionObserver((l,u)=>{l.forEach(h=>{h.isIntersecting&&(i(),u.unobserve(h.target))})}),a=typeof o<"u"&&o!==null&&typeof o.getBoundingClientRect!="function"?o.host??o:o;r.observe(a)}else i()}}get componentRoot(){return this.shadowed?this.shadowRoot:this.body}scrollIntoHash(){if(y){let e=this;document.location.hash!==""&&(e.componentRoot?.subelements(document.location.hash)).map(o=>(typeof o.scrollIntoView=="function"&&o.scrollIntoView(v.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"})),o))}}i18n_translate(){if(y&&v.get("use_i18n")){let e=this,n=e.componentRoot,o=v.get("lang","en"),i=navigator.language.slice(0,2),r=le("i18n");o!==i&&typeof r=="object"&&Object.hasOwn(r,"messages")&&p(()=>new Promise(function(l){let u=r.messages.filter(function(h){return Object.hasOwn(h,o)&&Object.hasOwn(h,i)});(n?.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component")).map(h=>(u.map(function(f){let g=h.innerHTML;return g=g?.replace(new RegExp(`${f[o]}`,"g"),f[i]),h.innerHTML=g,null}),h)),l()}),"callback_i18n").call(e).then(function(){d.debug("i18n loaded for component: "+e.name)}).catch(l=>{throw new Error(`An error ocurred when parsing i18n: ${l}.`)})}}addComponentHelper(e){this._componentHelpers.push(e)}runComponentHelpers(){if(y){let e=this,n=[];n.push(e.i18n_translate.bind(e)),n.push(e.scrollIntoHash.bind(e)),n.push(e.lazyLoadImages.bind(e)),n=n.concat(e._componentHelpers),n.map(o=>(d.debug(`Executing ${o.name} as component helper for ${e.name}...`),o(),o))}}},c(s,"_Component"),p(s,"Component"),s.shadowed=!1,s.cached=!0,s),k("com.qcobjects",[He]),pe(D("Component")).map(t=>(M(t),t))}}),Un,$n,io,Gs,po,er,xo=w({"src/ComponentFactory.ts"(){"use strict";Jo(),me(),es(),ce(),ge(),fe(),P(),je(),$(),q(),Ko(),Un=p(({TPL_SOURCE:s,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>s==="default"?`${t}${e}.${n}`:"","ComponentURI"),$n=p((s,t)=>{let e=s.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),io=p((s,t)=>s.getAttribute(t)===null,"__attributeNotSet_"),Gs=p((s,t)=>{let e=io(s,"shadowed"),n=s.getAttribute("template-source")===null,o=$n(s,"shadowed"),i=io(s,"cached"),r=$n(s,"cached"),a=typeof v.get("tplextension")<"u"?v.get("tplextension"):"html";a=s.getAttribute("tplextension")!==null?s.getAttribute("tplextension"):a;let l=s.getAttribute("name"),u=s.getAttribute("componentClass")!==null?s.getAttribute("componentClass"):"Component",h=v.get("preserveComponentBodyTag")?l!==null?"com.qcobjects.components."+l+".ComponentBody":"com.qcobjects.components.ComponentBody":u;l=l!==null?l:D(h)&&typeof D(h).name<"u"?D(h).name:"";let f=D(h),g=h!=="Component"&&typeof f<"u"&&typeof f.tplsource=="string"&&f.tplsource!=="",m=n&&g?f.tplsource:n?"default":s.getAttribute("template-source");d.debug(`template source for ${l} is ${m} `),d.debug(`type for ${l} is ${Z(f)} `);let C=Un({COMPONENTS_BASE_PATH:v.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return v.get("preserveComponentBodyTag")&&k(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[an("ComponentBody",He,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let A=e?f&&f.shadowed||He.shadowed:o,B=i?(f&&f.cached)??He.cached:r,ie={__parent__:t,name:l,cached:B,shadowed:A,tplextension:a,body:v.get("preserveComponentBodyTag")?ee("componentBody"):s,templateURI:C,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete ie.name,C===""&&delete ie.templateURI;let Ln=Q(f,ie);return v.get("preserveComponentBodyTag")&&typeof Ln<"u"&&s.append(Ln.body),Ln},"__create_component_instance_")()},"_buildComponentFromElement_"),po=p((s,t)=>{let e=[];return y?e=s.map(function(n){return Gs(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),er=p(s=>{let t=Eo,e=s.subelements(t);return po(e,null)},"buildComponents")}}),ao,co,ho,tr=w({"src/Service.ts"(){"use strict";var s,t,e;Le(),Co(),to(),U(),P(),$(),Zo(),ce(),ao=(s=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=yn,this.basePath=he,this.url="",this.method="GET",this.data={},this.reload=!1,this.cached=!1}mockup({request:o,service:i}){throw new Error("Method not implemented.")}local({request:o,service:i}){throw new Error("Method not implemented.")}done({request:o,service:i}){throw new Error("Method not implemented.")}fail(...o){throw new Error("Method not implemented.")}set(o,i){this[o]=i}get(o,i){return this[o]||i}},c(s,"Service"),p(s,"Service"),s),co=(t=class extends ao{constructor(){super(...arguments),this.method="GET",this.cached=!1,this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0}done(o){d.debug("***** RECEIVED RESPONSE:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template)}},c(t,"JSONService"),p(t,"JSONService"),t),ho=(e=class extends co{constructor(){super(),this.method="GET",this.cached=!1,this.configFileName="config.json",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0,this.set("url",`${this.get("basePath")}${this.get("configFileName")}`)}configLoaded(){throw Error("Method not implemented.")}done(o){if(d.debug("***** CONFIG LOADED:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template),Object.hasOwn(this.JSONresponse,"__encoded__")){let r=ue.decrypt(this.JSONresponse?.__encoded__,ln);this.JSONresponse=JSON.parse(r)}let i=this.JSONresponse;Object.keys(i).map(r=>(v.set(r,i[r]),r)),this.configLoaded().catch(r=>{throw new Error(`An error ocurred: ${r}`)})}fail(){this.configLoaded().catch(o=>{throw new Error(`An error ocurred: ${o}`)})}},c(e,"ConfigService"),p(e,"ConfigService"),e),k("com.qcobjects.api",[ao]),k("com.qcobjects.api.services",[co]),k("com.qcobjects.api.config",[ho])}}),hn,ts=w({"src/globalSettings.ts"(){"use strict";var s;ce(),U(),P(),$(),q(),So(),X(),tr(),hn=(s=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new uo}static __start__(){return s.instance.__start__()}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}get logger(){return this._logger}set logger(e){this._logger=e}set(e,n){this._GLOBAL[e]=n}get(e,n){let o;return typeof this._GLOBAL[e]<"u"?o=this._GLOBAL[e]:typeof n<"u"&&(o=n),o}__start__(){let e=p(function(){let o;return y?o=new Promise(function(i,r){"serviceWorker"in navigator&&typeof v.get("serviceWorkerURI")<"u"&&(v.set("serviceWorkerScope",v.get("serviceWorkerScope")?v.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(v.get("serviceWorkerURI"),{scope:v.get("serviceWorkerScope")}).then(function(a){d.debug("Service Worker Registered"),i.call(o,a)},function(a){d.debug("Error registering Service Worker"),r.call(o,a)}),navigator.serviceWorker.ready.then(function(a){d.debug("Service Worker Ready"),i.call(o,a)},function(a){d.debug("Error loading Service Worker"),r.call(o,a)}))}):o=Promise.resolve(),o},"__load__serviceWorker"),n=p(function(){return new Promise(o=>{if(y){d.debug("Starting to building components");try{ns()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(R).catch(function(i){d.debug(`error loading the service worker ${i}`)})}o()})},"_buildComponents");return new Promise(o=>{d.debug("Starting to load the config settings..."),v.get("useConfigService",!1)?(d.debug("Loading settings using local configuration file..."),os(new ho),Fn.configLoaded=n,no(Fn)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${Fn.url}: ${i}`)})):(d.debug("Starting to load the components..."),n.call(this).then(()=>{o({})}).catch(i=>{throw new Error(`An error ocurred while trying to build the components stack. ${i}`)}))})}},c(s,"_GlobalSettings"),p(s,"GlobalSettings"),s),k("com.qcobjects",[hn])}}),nr={};Us(nr,{_top:c(()=>R,"_top"),buildComponentsStack:c(()=>ns,"buildComponentsStack"),componentsStack:c(()=>fn,"componentsStack"),configService:c(()=>Fn,"configService"),get:c(()=>le,"get"),resetTop:c(()=>fo,"resetTop"),set:c(()=>gn,"set"),setConfigService:c(()=>os,"setConfigService")});var R,fn,fo,ns,Fn,os,gn,le,Hs,X=w({"src/top.ts"(){"use strict";xo(),Se(),ts(),Oe(),P(),R={},R.lastCache=void 0,fn=[],fo=p(()=>{let s=hn.instance;R=Re(s,R,!0)},"resetTop"),ns=p(()=>{fn=er(document)},"buildComponentsStack"),os=p(s=>{R.configService=s,Fn=s},"setConfigService"),gn=p((s,t)=>{R[s]=t},"set"),le=p((s,t)=>R[s]||t,"get"),fo(),Hs=p(function(s){Object.hasOwn(s,"PackagesList")||Object.defineProperty(s,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>$o(),"get")}),Object.hasOwn(s,"PackagesNameList")||Object.defineProperty(s,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>qo(),"get")}),Object.hasOwn(s,"ClassesList")||Object.defineProperty(s,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>Fo(),"get")}),Object.hasOwn(s,"ClassesNameList")||Object.defineProperty(s,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>Vs(),"get")})},"_define_props"),Hs(R)}}),sn,ss,or=w({"src/captureFalseTouch.ts"(){"use strict";if(P(),q(),sn=!1,ss=p(()=>sn?{passive:!0}:!1,"captureFalseTouch"),y)try{let s=Object.defineProperty({},"passive",{get(){return sn=!0,sn}});window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}catch(s){d.debug(`An error ocurred: ${s}.`),sn=!1}else sn=!1}}),Wn,rs=w({"src/range.ts"(){"use strict";ke(),Wn=p((s,t=0,e=1)=>((t===0||typeof t>"u")&&(t=s,s=0),Array.from({length:(t-s)/e+1},function(n,o){return s+o*e})),"range"),M(Wn)}}),is,sr=w({"src/defaultProcessors.ts"(){"use strict";P(),wn(),X(),rs(),is=p(()=>{(function(){let s=p((i,r,a)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${r}.${a} does not have a component instance or it is null.`);let l=le(a),u=i.get(a),h=i.data[a],f=typeof h<"u"?h:typeof u<"u"?u:l,g="";return typeof f<"u"&&typeof f.map<"u"?g=f.map(function(m){let C=[...Object.keys(m)].map(b=>` data-${b}="${typeof m[b]<"u"&&m[b]!==null?m[b].toString():""}"`).join("");return`<quick-component name="${r}" ${C} ></quick-component>`}).join(""):d.debug(`${r}.${a} does not have a map property`),g},"mapper");we.setProcessor(s);let t=p(function(i,r,a){let l=`
4
+ `)}`);return t},"ClassFactory")}}),Hn,Qo=w({"src/Base64.ts"(){"use strict";var s;Hn=(s=class{static encode(e){let n="",o,i,r,a,l,u,h,f=0;for(e=s._utf8_encode(e);f<e.length;)o=e.charCodeAt(f++),i=e.charCodeAt(f++),r=e.charCodeAt(f++),a=o>>2,l=(o&3)<<4|i>>4,u=(i&15)<<2|r>>6,h=r&63,isNaN(i)?u=h=64:isNaN(r)&&(h=64),n=n+this._keyStr.charAt(a)+this._keyStr.charAt(l)+this._keyStr.charAt(u)+this._keyStr.charAt(h);return n}static decode(e){let n="",o,i,r,a,l,u,h,f=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");f<e.length;)a=this._keyStr.indexOf(e.charAt(f++)),l=this._keyStr.indexOf(e.charAt(f++)),u=this._keyStr.indexOf(e.charAt(f++)),h=this._keyStr.indexOf(e.charAt(f++)),o=a<<2|l>>4,i=(l&15)<<4|u>>2,r=(u&3)<<6|h,n=n+String.fromCharCode(o),u!==64&&(n=n+String.fromCharCode(i)),h!==64&&(n=n+String.fromCharCode(r));return n=s._utf8_decode(n),n}static _utf8_encode(e){e=e.replace(/rn/g,"n");let n="";for(let o=0;o<e.length;o++){let i=e.charCodeAt(o);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}static _utf8_decode(e){let n="",o=0,i=0,r=0,a;for(;o<e.length;)i=e.charCodeAt(o),i<128?(n+=String.fromCharCode(i),o++):i>191&&i<224?(r=e.charCodeAt(o+1),n+=String.fromCharCode((i&31)<<6|r&63),o+=2):(r=e.charCodeAt(o+1),a=e.charCodeAt(o+2),n+=String.fromCharCode((i&15)<<12|(r&63)<<6|a&63),o+=3);return n}},c(s,"_Base64"),p(s,"Base64"),s._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s)}}),he,Zs,Le=w({"src/basePath.ts"(){"use strict";q(),he=(function(){let s="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),s=t.join("/")+"/"}else try{let t=jn("node:process");typeof t<"u"?s=`${t.cwd()}/`:s=""}catch{s=""}return s})(),Zs=p(s=>{he=s},"setBasePath")}}),T,be=w({"src/DataStringify.ts"(){"use strict";Vo(),T=p(s=>JSON.stringify(s,p(function(){let e=new WeakSet,n=0;return function(o,i){if(typeof i=="object"&&i!==null){if(e.has(i))return n+=1,n<=3?wo(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),yn,to=w({"src/domain.ts"(){"use strict";yn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Q,je=w({"src/New.ts"(){"use strict";Q=p(function(s,t={}){if(t=arguments.length>1?t:{},typeof s>"u")return new Object;let e=new s(t);typeof t=="object"&&t!==null&&Object.keys(t).filter(o=>isNaN(o)&&!["__instanceID","__classType","__definition"].includes(o)).forEach(o=>{typeof t[o]=="function"?e[o]=t[o].bind(e):e[o]=t[o]});let n=typeof s.__definition=="object"&&s.__definition!==null?s.__definition:{};return e.__definition=Object.assign({},n),typeof e.__classType=="string"&&e.__classType!==""&&(e.__definition.__classType=e.__classType),e},"New"),Q.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),ln,Zo=w({"src/secretKey.ts"(){"use strict";q(),ln=y?location.host:"secret"}}),ue,Xs,Go,vo=w({"src/Crypt.ts"(){"use strict";var s;Qo(),be(),U(),$(),Zo(),ue=(s=class extends G{constructor(){super(...arguments),this.string="",this.key="",this.last_string="",this.last_key="",this.construct=!1}encrypt(e,n){throw new Error("Method not implemented.")}decrypt(e,n){throw new Error("Method not implemented.")}_new_(e){let n=e.string,o=Object.hasOwn(e,"key")?e.key:"";this.__new__(e),o=o===""?this.__instanceID.toString():o,this.last_key=o,this.last_string=n,this.construct=!0}_encrypt(){let e=this.string,n=this.key,o="",i,r;for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+r.charCodeAt(0)),o+=i;return this.last_string=Hn.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,r;e=Hn.decode(e);for(let a=0;a<e.length;a++)i=e.substr(a,1),r=n.substr(a%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-r.charCodeAt(0)),o+=i;return this.last_string=o,this.last_string}static encrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new s({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},c(s,"__Crypt"),p(s,"_Crypt"),s),Xs=p(function(t){return ue.encrypt(T(t),ln)},"_CryptObject"),Go=p(function(t){return t===""?{}:JSON.parse(ue.decrypt(t,ln))},"_DecryptObject"),k("com.qcobjects",[ue])}}),Ae,Yi=w({"src/ConfigSettings.ts"(){"use strict";var s;Le(),U(),$(),Ae=(s=class extends G{constructor(){super(...arguments),this._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:he},this._CONFIG_ENC=""}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}},c(s,"_ConfigSettings"),p(s,"ConfigSettings"),s),k("com.qcobjects",[Ae])}}),C,ce=w({"src/CONFIG.ts"(){"use strict";var s;Le(),Se(),vo(),be(),P(),wn(),Zo(),$(),U(),Yi(),C=(s=class extends G{get _CONFIG_ENC(){return Ae.instance._CONFIG_ENC}get _CONFIG(){return Ae.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&Zs(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=ue.encrypt(T({}),ln));let r=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return Re(a,Go(r))})(Ae.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Ae.instance._CONFIG_ENC=Xs(o),Ae.instance.set(e,n)}get(e,n){let o;try{let r=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=ue.encrypt(T({}),ln));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return Re(u,Go(l))})(Ae.instance);typeof r[e]<"u"&&(o=r[e])}catch(r){console.error(r),d.debug("Something wrong when trying to get CONFIG values"),d.debug("No config value for: "+e),o=n}let i=we.processObject(o);return o===null&&i===null?null:i||n}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}static set(e,n){s.instance.set(e,n)}static get(e,n){return s.instance.get(e,n)}},c(s,"_CONFIG"),p(s,"CONFIG"),s),k("com.qcobjects",[C])}}),cn,we,wn=w({"src/Processor.ts"(){"use strict";var s;ce(),U(),je(),X(),$(),cn=(s=class extends G{constructor({component:e,processors:n}){super({component:e}),this.processors={config(o,i){return C.get(i,"")},ENV(o,i){return typeof process<"u"?process.env[i]:""},global(o,i){return typeof R<"u"?R[i]:""}},this.processors=Object.assign({},this.processors,s._instance?.processors,n)}static get instance(){return typeof s._instance>"u"&&(s._instance=new s({component:null})),s._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(s.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return s.instance.processors[e]}static getProcessorNames(){return Object.keys(s.instance.processors)}execute(e,n,o){let i=typeof e<"u"&&e!==null?e.processorHandler:this,r=typeof o=="string"?o.split(",").map(a=>a.trim()):[];return i?.processors[n].apply(i,[e,...r])}static process(e,n=null){return s.instance.process(e,n)}process(e,n=null){let o=n!==null?n.processorHandler:Q(s,{component:null});return typeof e=="string"&&Object.keys(o.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(r){let a=`$${i}(${r[1]})`;return e=e.replace(a,o.execute.bind(o).call(o,n,i,r[1])),r})),e}static processObject(e,n){return e==null?e:s.instance.processObject(e,n)}processObject(e,n=null){if(e==null)return e;let o=n===null?this:n.processorHandler;return typeof o>"u"&&(o=new s({component:n})),typeof e=="object"?Object.keys(e).map(i=>(typeof e[i]=="object"&&!Object.hasOwn(e[i],"call")?e[i]=o?.processObject.bind(o)(e[i],n):typeof e[i]=="string"&&(e[i]=o?.process.bind(o)(e[i],n)),i)):typeof e=="string"&&(e=o.process.bind(o)(e,n)),e}},c(s,"_Processor"),p(s,"Processor"),s),we=cn.instance,k("com.qcobjects",[cn])}}),Ks,Ys,Ho,ea=w({"src/routings.ts"(){"use strict";Ks=p((s,t)=>{let e=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),Ys=p(function(s,t){return s.filter(function(e){let n=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(n,"g").test(t)}).reverse()},"__valid_routings__"),Ho=p((s,t)=>s.includes(t),"__valid_routing_way__")}});function un(s,t){let n=class n{constructor(i,r=[]){this.func=i,this.args=r}dispatch(){this.func.apply(this,...t,this)}};c(n,"AsyncCallback"),p(n,"AsyncCallback");let e=n;return ro.push(new e(s,t)),e}c(un,"asyncLoad");var ro,Xo,Co=w({"src/asyncLoad.ts"(){"use strict";ot(),q(),X(),ro=[],p(un,"asyncLoad"),Xo=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&ro.map(function(s){s.dispatch.call(s)})}):typeof R<"u"&&ro.map(function(s){s.dispatch.call(s)})},"_fireAsyncLoad"),S(un)}}),pn,Oo=w({"src/ComplexStorageCache.ts"(){"use strict";var s;Qo(),be(),P(),pn=(s=class{constructor(e){let n,o,i=e.index;if(typeof i<"u"){n=e.load,o=e.alternate;let r=this.getID(i),a=localStorage.getItem(r);if(this.isEmpty(a)){let l=n.call(null,{cachedObjectID:r,cachedResponse:a,cache:this});this.save(i,l),d.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",r))}else o.call(null,{cachedObjectID:r,cachedResponse:a,cache:this}),d.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",r))}else throw new Error("ComplexStorageCache: index is undefined");return this}getItem(e){let n=localStorage.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)}setItem(e,n){localStorage.setItem(e,T(n))}isEmpty(e){let n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n}getID(e){let n;return typeof e<"u"&&(n="cachedObject_"+Hn.encode(T(e).replace(/\{|\}|,/g,"_"))),n}save(e,n){let o=this.getID(e);d.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",o)),this.setItem(o,n)}getCached(e){let n=this.getID(e);return this.getItem(n)}clear(){Object.keys(localStorage).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){return localStorage.removeItem(e),e})}},c(s,"ComplexStorageCache"),p(s,"ComplexStorageCache"),s)}}),no,So=w({"src/serviceLoader.ts"(){"use strict";Co(),Oo(),be(),P(),q(),X(),no=p(function(s,t=!1){let e=p(function(a){var l=new Promise(function(u,h){d.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(a.data)).replace("{{URL}}",a.url));let f=new XMLHttpRequest;f.withCredentials=a.withCredentials,f.open(a.method,a.url,!0);for(let b in a.headers)try{typeof a.headers[b]!="function"&&f.setRequestHeader(b,a.headers[b])}catch(O){d.debug("Something went wrong when assign the header "+b),d.debug(`An error ocurred: ${O}`)}f.onload=function(){if(f.status===200){let O=f.responseText;if(d.debug("Data received {{DATA}}".replace("{{DATA}}",T(O))),d.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",a.name)),a.template=O,a.cached&&typeof v<"u"&&v.save(a.name,a.template),typeof a.done=="function"){var b={request:f,service:a};a.done.call(a,b),u.call(l,b)}}else if(typeof a.fail=="function"){var b={request:f,service:a};a.fail.call(a,b),h.call(l,b)}};let m=p(function(){d.debug("SENDING THE NORMAL REQUEST ");try{f.send(T(a.data))}catch(b){d.debug("SOMETHING WRONG WITH REQUEST "),d.debug(`An error ocurred: ${b}`),h.call(l,{request:f,service:a})}},"_directLoad");if(a.cached){var v=new pn({index:a.data,load(){m.call(this)},alternate(b){if(a.method==="GET"){if(a.template=b.cache.getCached(a.name),typeof a.done=="function"){let O={request:f,service:a};a.done.call(a,O),u.call(l,O)}}else m()}});R.lastCache=v}else m();return f});return l},"_serviceLoaderInBrowser"),n=p(function(a){var l=new Promise(function(u,h){if(typeof URL>"u"){global.URL=Te("url").URL;let b=global.URL}let f=new URL(a.url);var g;a.useHTTP2=Object.hasOwn(a,"useHTTP2")&&a.useHTTP2;let m=p(function(b){d.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(a.data)).replace("{{URL}}",a.url));let O,A={http2Client:v,request:b,service:a,responseHeaders:null};if(typeof a.data=="object"&&a.data!==null&&a.useHTTP2)try{d.debug("Sending data...");let B=new Buffer(T(a.data));b.write(B)}catch(B){d.debug("It was not possible to send any data"),d.debug(`An error ocurred: ${B}`)}O="",b.on("response",B=>{d.debug("receiving response..."),A.responseHeaders=B,O=""}),b.on("data",B=>{d.debug("receiving data..."),O+=""+B.toString(),a.template=O}),a.useHTTP2&&b.resume(),b.on("end",()=>{d.debug("ending call..."),a.template=O,Object.hasOwn(a,"useHTTP2")&&a.useHTTP2?v.destroy():b.destroy(),a.done.call(a,A),u.call(l,A)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var v=Te("http2").connect(f.origin);b=Object.assign({":method":a.method,":path":f.pathname},a.options),b=Object.assign(b,a.headers),g=v.request(b),g.setEncoding("utf8"),m(g)}else if(f.protocol==="http:"){let A=Te("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=A(a.url),m(g)}else if(f.protocol==="https:"){let O=Te("https");b=Object.assign({hostname:f.hostname,port:f.port,path:f.pathname,method:a.method,headers:a.headers},a.options),O.request(b,function(B){m(B)}).end()}else{let O="Protocol not supported: "+f.protocol;throw d.debug(O),new Error(O)}}catch(b){d.debug(b),a.fail.call(a,b),h.call(l,b)}}).catch(u=>{d.debug(`Something happened when trying to call the service: ${a.name}. Error: ${u}`),a.fail.call(a,u)});return l},"_serviceLoaderInNode"),o=p(function(a){var l=new Promise(function(u){d.debug(`Calling mockup service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.mockup=="function"?a.mockup.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderMockup"),i=p(function(a){var l=new Promise(function(u){d.debug(`Calling local service ${a.name} ...`);let h={request:null,service:a,responseHeaders:a.responseHeaders};typeof a.local=="function"?a.local.call(a,h):a.done.call(a,h),u.call(l,h)});return l},"_serviceLoaderLocal"),r;switch(s.kind){case"rest":y?typeof t<"u"&&t?r=un(e,[s,t]):r=e(s):r=n(s);break;case"mockup":r=o(s);break;case"local":r=i(s);break;default:d.debug(`The value of the kind property of the service ${s.name} is not valid`),r=Promise.resolve();break}return r},"serviceLoader")}}),Eo,Ko=w({"src/tag_filter.ts"(){"use strict";Eo="quick-component:not([loaded]),component:not([loaded])"}}),Bn,Yo=w({"src/componentLoader.ts"(){"use strict";Co(),Oo(),be(),P(),q(),X(),Bn=p(function(s,t){let e,n=p(function(r){return e=new Promise(function(a,l){let u=r.__promise__;if((Object.hasOwn(r,"container")&&typeof r.container<"u"&&r.container!==null?r.container:r.body)!==null){let v=p(function(O){O.feedComponent();let A={request:g,component:O};a.call(u,A)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(r.data)).replace("{{URL}}",r.url));let b=p(function(){let O=f?0:200;if(g.status===O){let A=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",T(A))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=A,r.cached&&typeof m<"u"&&m.save(r.cacheIndex,r.template),v(r)}else{let A={request:g,component:r};l.call(u,A)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")v(r);else{var f=!!r.url.startsWith("file:"),g=new XMLHttpRequest;if(f)"fetch"in R&&(d.debug("I can use fetch..."),d.debug("It is a file to be loaded, so I will try to use fetch"),fetch(r.url).then(A=>{d.debug("I got a response from fetch, so I'll feed the component"),A.text().then(B=>{r.template=B,v(r)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(A=>{throw new Error(`An error ocurred: ${A}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(r.method,r.url,!0)}catch(A){d.debug(`An error ocurred: ${A}.`),d.debug("Last try has failed... The component cannot be loaded.")}!yo&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(A){A=!(typeof A>"u"||!A),d.debug("SENDING THE NORMAL REQUEST "),A?"fetch"in R||(d.debug("I have to try to load the file using xhr... "),g.send(null),g.status===XMLHttpRequest.DONE&&b()):(d.debug("Trying to send the data to the component... "),g.send(T(r.data)))},"_directLoad");if(r.cached&&!f){d.debug("USING CACHE FOR COMPONENT: "+r.name);var m=new pn({index:r.cacheIndex,load(){O.call(this,f)},alternate(A){r.method==="GET"?(r.template=A.cache.getCached(r.cacheIndex),v.call(this,r)):O.call(this,f)}});R.lastCache=m}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),O(f)}}else d.debug("CONTAINER DOESNT EXIST")}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,a).catch(l=>{throw new Error(`${l}`)}),Promise.reject(new Error("An error ocurred"))}).catch(function(a){throw d.debug("Something wrong loading the component"),new Error(`An error ocurred: ${a}`)}),e},"_componentLoaderInBrowser"),o=p(function(r){return e=new Promise(function(a,l){let u=e,h=p(function(m){m.feedComponent().catch(b=>{throw new Error(`An error ocurred trying to feed the component: ${m.name}. Error: ${b}`)});let v={request:null,component:m};a.call(u,v)},"_feedComponent_");d.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",T(r.data)).replace("{{URL}}",r.url));let f=p(function(m,v){if(m){let b={request:null,component:r};l.call(u,b)}else{let b=v.toString();d.debug("Data received {{DATA}}".replace("{{DATA}}",T(b))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=b,r.cached&&typeof g<"u"&&g.save(r.cacheIndex,r.template),h(r)}},"_componentLoaded");if(typeof r.template=="string"&&r.template!=="")h(r);else{d.debug("Loading the component as a local file in server...");let m=p(function(){let{readFile:v}=jn("node:fs");d.debug("SENDING THE NORMAL REQUEST "),v(r.url,f)},"_directLoad");if(r.cached){d.debug("USING CACHE FOR COMPONENT: "+r.name);var g=new pn({index:r.cacheIndex,load(){m()},alternate(v){r.method==="GET"?(r.template=v.cache.getCached(r.cacheIndex),h.call(this,r)):m.call(this)}});R.lastCache=g}else d.debug("NOT USING CACHE FOR COMPONENT: "+r.name),m()}}),e.then(function(a){return r.__done__().then(function(){let l;return typeof r.done=="function"&&(l=r.done.call(r,a)),Promise.resolve(l)})},function(a){return typeof r.fail=="function"&&r.fail.call(r,a).catch(l=>{throw new Error(`An error ocurred: ${l}`)}),Promise.reject(new Error("An error ocurred."))}).catch(function(a){d.debug(`Something wrong loading the component: ${a}`)}),e},"_componentLoaderInNode"),i;return y?typeof t<"u"&&t?i=un(n,[s,t]):i=n(s):i=o(s),i},"componentLoader")}}),He,es=w({"src/Component.ts"(){"use strict";var s;Qo(),Le(),Se(),me(),xo(),be(),to(),ge(),fe(),U(),ke(),eo(),Yn(),P(),je(),$(),q(),wn(),ea(),X(),ce(),So(),Ko(),Yo(),He=(s=class extends G{constructor({__parent__:e,templateURI:n="",template:o,tplsource:i="default",tplextension:r,url:a="",name:l="",method:u="GET",data:h={},reload:f=!1,shadowed:g=!1,cached:m=!0,enableServiceClass:v,assignRoutingParams:b=!0,_body:O=ee("div"),__promise__:A=null,__shadowRoot:B,body:ie,shadowRoot:Ln,splashScreenComponent:Fi,controller:Gi,view:Hi}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:e,templateURI:n,template:o,tplsource:i,tplextension:r,url:a,name:l,method:u,data:h,reload:f,shadowed:g,cached:m,enableServiceClass:v,assignRoutingParams:b,_body:O,__promise__:A,__shadowRoot:B,body:ie,shadowRoot:Ln,splashScreenComponent:Fi,controller:Gi,view:Hi}),this.validRoutingWays=["pathname","hash","search"],this.basePath=he,this.domain=yn,this.templateHandler="DefaultTemplateHandler",this.routingWay=null,this.routingNodes=[],this.routings=[],this.routingPath="",this.routingPaths=[],this._componentHelpers=[],this.subcomponents=[],this.splashScreenComponent=void 0,this.controller=void 0,this.routingController=void 0,this.view=void 0,this.effect=void 0,this.method="GET",this.cached=!0,this.__promise__=null,this.__namespace=void 0,this._serviceClassName=null,this.enableServiceClass=!0,this.shadowed=!1,this.assignRoutingParams=!0;let j=this;typeof l<"u"&&(j.name=l),typeof j.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+Z(j)),j.routingWay=C.get("routingWay"),j.processorHandler=new cn({component:j}),j.data=typeof j.data>"u"||j.data===null?{}:j.data,j.data=Object.assign(j.data,j.dataAttributes),j.createServiceInstance().then(()=>{typeof j.__new__=="function"&&j.__new__(j),j._generateRoutingPaths(j.body).then(function(){j._reroute_().then(function(){return j.rebuild().then(function(){d.info(`Component._new_ The component ${j.name} was built successfully!`)}).catch(function($e){d.warn(`Component._new_ Something went wrong building the component ${j.name}`),console.error(`Component._new_ Something went wrong building the component ${j.name}`,$e)})}).catch($e=>{throw Error(`Unexpected error ${$e}`)})}).catch($e=>{throw Error(`Unexpected error ${$e}`)})}).catch($e=>{throw Error(`Unexpected error. ${$e}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=T(e.routingPath);return Hn.encode(e.name+n)}set parsedAssignmentText(e){d.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){let e=this;if(e._parsedAssignmentText=e.parseTemplate(e.template),typeof e._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return e._parsedAssignmentText}set shadowRoot(e){let n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:d.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){return this.__shadowRoot}set routingSelected(e){d.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){let e=this;return Ys(e.routings,e.routingPath)}set routingParams(e){d.debug("[routingParams] This is a read-only property of the component")}get routingParams(){let e=this;return[{}].concat(e.routingSelected.map(function(n){return Ks(n,e.routingPath)})).reduce(function(n,o){return Object.assign(n,o)})}set serviceClassName(e){this._serviceClassName=e}get serviceClassName(){let e="";return y?e=this.body.getAttribute("serviceClass")!==null?this.body.getAttribute("serviceClass"):this._serviceClassName:e=this._serviceClassName,e}get responseToData(){let e=!1;return y?e=this.body.getAttribute("response-to")==="data"||this.responseTo==="data":e=this.responseTo==="data",e}get responseToTemplate(){let e=!1;return y?e=this.body.getAttribute("response-to")==="template"||this.responseTo==="template":e=this.responseTo==="template",e}createServiceInstance(){let e=this,n=this.data,o,i=e.getClass().__definition,r=e.serviceClassName;return new Promise(function(a,l){let u=e.enableServiceClass,h=e.responseToData,f=e.responseToTemplate;if(u&&r!==null&&(o=D(r)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(D("Component"),"responseTo")&&(h=D("Component").responseTo==="data"),!f&&i&&Object.hasOwn(i,"responseTo")?f=i.responseTo==="template":!f&&Object.hasOwn(D("Component"),"responseTo")&&(f=D("Component").responseTo==="template"),typeof o<"u"&&typeof u<"u"&&u===!0&&(h||f)){d.info("Loading service "+r);let g=Q(o,{data:n});no(g)?.then(function({service:m}){let v;typeof m.JSONresponse<"u"&&m.JSONresponse!==null?v=m.JSONresponse:v=m.template,h&&(typeof n=="object"&&typeof v=="object"?n=Object.assign(n,v):n=v,e.data=n),e.serviceInstance=g,e.serviceData=n,f&&(e.template=v),a(v)},function(m){d.debug(`Service loading rejected for ${r} in ${e.name}`),l(m)}).catch(function(m){throw d.debug("Something went wroing while trying to load the service "+r),Error(`Error loading ${r} for ${e.name}. Detail: ${m}`)})}else a(null)})}_bindroute_(){let e=this;e._bindroute_.loaded?d.debug(`Routes already bound to popstate events for ${e.name}`):(y&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(o){let i=!0;le("routingPaths")||gn("routingPaths",[]);let r=C.get("routingWay"),a=o.target[r];return le("routingPaths").includes(a)&&o.target[r]!==location[r]&&o.target.href!==document.location.href?(d.debug("A ROUTING WAS FOUND: "+a),window.history.pushState({href:o.target.href},o?.target?.href,o.target.href),s.route().catch(l=>{throw Error(`Unexpected error: ${l}`)}),i=!1):d.debug("NO ROUTING FOUND FOR: "+a),typeof o.target.oldclick<"u"&&typeof o.target.oldclick=="function"&&o.target.oldclick.call(o.target,o),i},null}),e._bindroute_.loaded=!0)}done(e){return new Promise(o=>{if(typeof e<"u"){let{request:i,component:r}=e;o({request:i,component:r})}else o({request:void 0,component:void 0})})}createControllerInstance(){let e;if(y){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=D(n),typeof e<"u"&&(this.controller=Q(e,{component:this}))}return new Promise((o,i)=>{if(y&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(r){throw Error(r)}else d.debug(`${n} does not have a done() method.`),i(new Error(`${n} does not have a done() method.`));typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):d.debug(`${n} does not have a createRoutingController() method.`)}o({component:this,controller:this.controller})})}createEffectInstance(){let e=this;return new Promise(function(n){if(y){let o=e.body?.getAttribute("effectClass"),i=e.body?.getAttribute("apply-effect-to");i=i!==null?i:"load",o!==null&&i==="observe"?e.applyObserveTransitionEffect(o):o!==null&&i==="load"&&e.applyTransitionEffect(o)}n({component:e,effect:e.effect})})}createViewInstance(){let e=this;return new Promise(function(n){let o=y?e.body.getAttribute("viewClass"):null;if(o!==null){let i=D(o);typeof i<"u"&&(e.view=Q(i,{component:e}),Object.hasOwn(e.view,"done")&&typeof e.view?.done=="function"&&e.view?.done.call(e.view))}n({component:e,view:e.view})})}__done__(){let e=this,n=p(function(){if(typeof e>"u")throw new Error("componentDone() has lost its context");if(typeof e.body>"u")throw new Error("The component has no body");(async()=>{await e.createViewInstance(),await e.createControllerInstance(),await e.createEffectInstance()})().catch(o=>{throw new Error(`Unknown error ${o}.`)}),d.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),d.debug(`Component helpers for ${e.name} executed.`)}catch(o){throw d.debug(`Component helpers for ${e.name} could not be executed.`),Error(o)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),y&&e.body.setAttribute("loaded","true")},"componentDone");return new Promise(function(o,i){try{o(n.call(e))}catch(r){i(new Error(r))}})}hostElements(e){let n=this,o=[];if(y)if(n.shadowed&&typeof n.shadowRoot<"u"&&n.shadowRoot!==null){o=n.shadowRoot.subelements(e);let r=n.container??n.body,a=typeof r<"u"&&r!==null?r.querySelector(".shadowHost"):null;a!==null&&typeof a<"u"&&a.subelements(e).forEach(u=>{o.includes(u)||o.push(u)})}else o=n.body.subelements(e);return o}get subtags(){let e=this,n=Eo;return e.hostElements(n)}get bodyAttributes(){let n=this.body;return y?[...n.getAttributeNames()].map(o=>({[o]:n.getAttribute(o)})).reduce((o,i)=>Object.assign(o,i)):{}}get dataAttributes(){let n=this.body;return y?[{}].concat([...n.getAttributeNames()].filter(o=>o.startsWith("data-")).map(o=>({[o.split("-")[1]]:n.getAttribute(o)}))).reduce((o,i)=>Object.assign(o,i)):{}}__buildSubComponents__(e=!1){let n=this,o=n.subtags;return e||(o=o.filter(i=>!$n(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=po(o,n)),n.subcomponents}fail(e){return new Promise((o,i)=>{if(typeof e<"u"){let{error:r,component:a}=e;o({error:r,component:a})}else i(new Error(" Unknown error."))})}set(e,n){this[e]=n}get(e,n){return this[e]||n}feedComponent(){let e=this;d.debug(`[Component][${this.name}][feedComponent] start feeding component...`);let n=p(function(r){if(typeof r.container>"u"&&typeof r.body>"u"){d.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",r.name));return}let a=typeof r.container>"u"||r.container===null?r.body:r.container,l=r.parsedAssignmentText;if(r.innerHTML=l,r.shadowed){d.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",r.name)),d.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.name));let u=ee("div");a.subelements("[slot]").map(f=>(f.parentElement===a&&u.appendChild(f),f)),d.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",r.name));let h=ee("div");h.classList.add("shadowHost");try{r.shadowRoot=h.attachShadow({mode:"open"})}catch(f){d.debug(`An error ocurred: ${f}.`);try{d.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",r.name)),r.shadowRoot=h.shadowRoot}catch(g){d.debug(`An error ocurred: ${g}.`),d.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",r.name))}}if(typeof r.shadowRoot<"u"&&r.shadowRoot!==null){r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=r.innerHTML)):(u.innerHTML=r.parseTemplate(u.innerHTML),d.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=r.innerHTML)),d.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),h.innerHTML+=u.innerHTML,d.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",r.name));let f=a.querySelector(".shadowHost");typeof f<"u"&&f!==null?(d.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",r.name)),r.shadowRoot!==null&&h.shadowRoot!==null&&(r.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):a.appendChild(h)}else d.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",r.name))}else r.reload?(d.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),a.innerHTML=r.innerHTML):a&&r?(d.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",r.name)),a.innerHTML+=r.innerHTML):d.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",r.name))},"_feedComponent_InBrowser"),o=p(function(r){let a=r.parsedAssignmentText;r.innerHTML=a},"_feedComponent_InNode"),i;return ve(e,"Component")?new Promise((r,a)=>{if(y)try{i=n(e),r(i)}catch(l){a(new Error(l))}else try{i=o(e),r(i)}catch(l){a(new Error(l))}}):(d.warn("Trying to feed a non component object"),Promise.reject(new Error(`Trying to feed a non component object ${typeof e}`)))}rebuild(){let e=this;var n=new Promise(function(o,i){if((typeof e>"u"||e===null)&&i(new Error("Component is undefined")),nt(e)&&ve(e,"Component"))switch(!0){case e.get("tplsource")==="none":d.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var r={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,r).catch(a=>{d.debug(`It was an error while calling done() in ${e.name}: ${a}`)}),o.call(n,r)},function(){i.call(n,r)});break;case e.get("tplsource")==="inline":d.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),(async a=>{await a.feedComponent.bind(a)()})(e).catch(a=>{d.debug(`It was not possible to feed the component ${e.name}: ${a}`)});var r={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(r),o.call(n,r)},function(){i.call(n,r)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),Bn(e,!1)?.then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),Bn(e,!1).then(function(a){o.call(n,a)},function(a){i.call(n,a)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):d.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),i.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:d.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),i.call(n,{request:null,component:e});break}});return n}Cast(e){let n=pe(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return Ce(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(nt(e)&&ve(e,"Component")),i=p(function(r){let a=[],l=r.filter(function(u){return typeof u<"u"}).map(function(u){if(typeof u.name<"u")a.push(u.name);else throw new Error(Z(u)+" does not have a name");return new Promise(function(h,f){typeof u<"u"&&u._reroute_?u._reroute_().then(function(){u.reload=!0,u.rebuild().then(()=>{h()}).catch(g=>{d.debug(`Error ${g}`)})}).then(function(){if(Object.hasOwn(u,"subcomponents")&&typeof u.subcomponents<"u"&&u.subcomponents.length>0)return d.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+u.name),i.call(u,u.subcomponents);d.debug("No subcomponents to look for routings in: "+u.name),u.subtags.length>0&&(u.subcomponents=u.__buildSubComponents__(!0)),h()}).catch(g=>{d.debug(`Error: ${g}`)}):typeof u<"u"&&f(new Error("Component "+u.name+" is not an instance of Component"))})});return Promise.all(l).then(function(){d.debug("ROUTING COMPLETED FOR "+a.join(", "))}).catch(function(u){d.warn("ROUTING FAILED FOR "+a.join(", ")+": "+u)})},"__route__");if(o||fn)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:fn);else throw d.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return n}fullscreen(){if(y){let e=this.body;e.requestFullscreen?e.requestFullscreen().catch(n=>{throw new Error(`An error ocurred when requesting fullscreen: ${n}`)}):e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){y&&(document.exitFullscreen?document.exitFullscreen().catch(e=>{throw new Error(`An error ocurred when trying to exit fullscrenn ${e}.`)}):document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){let n=this;return new Promise(function(o){y&&Ho(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let r=i.getAttributeNames(),a={};return r.map((l,u)=>(a[r[u]]=i.getAttribute(r[u]),l)),n.routings.push(a),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(a.path)||n.routingPaths.push(a.path),le("routingPaths")||gn("routingPaths",[]),le("routingPaths").includes(a.path)||le("routingPaths").push(a.path),i})),o()})}parseTemplate(e){let n=this,o,i=e;if(Object.hasOwn(n,"templateHandler")){let r=n.templateHandler;d.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${r} ...`);let a=D(r),l=Q(a,{component:n,template:i});l.component=n;let u=n.data;if(Object.hasOwn(n,"assignRoutingParams")&&n.assignRoutingParams)try{u=Object.assign(u,n.routingParams)}catch(h){d.debug(`An error ocurred: ${h}.`),d.debug("[parseTemplate] it was not possible to assign the routing params to the template")}o=l.assign(u)}else d.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),o=i;return o}_reroute_(){let e=this;return new Promise(function(n){y&&Ho(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=Un({COMPONENTS_BASE_PATH:C.get("componentsBasePath"),COMPONENT_NAME:o.name.toString(),TPLEXTENSION:Object.hasOwn(o,"tplextension")?o.tplextension||"":e.tplextension,TPL_SOURCE:"default"});return e.templateURI=i,o}),e.routingSelected.length>0&&(e.template="",typeof e.body<"u"&&e.body!==null&&(e.body.innerHTML=""))),n(e)})}lazyLoadImages(){if(y){let n=this.componentRoot;if(typeof n<"u"&&n!==null){let o=[...n.subelements("img[lazy-src]")],i=p(function(r){r.setAttribute("src",r.getAttribute("lazy-src")?.toString()),r.onload=()=>{r.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let r=new IntersectionObserver((a,l)=>{a.forEach(u=>{u.isIntersecting&&(i(u.target),l.unobserve(u.target))})});o.map(function(a){return r.observe(a)})}else o.map(i)}}return null}applyTransitionEffect(e){let n=D(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&ve(n,"TransitionEffect")?(this.effect=Q(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):d.debug(`${e} is ${Z(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(y){let n=this,o=n.componentRoot,i=p(function(){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){let r=new IntersectionObserver((l,u)=>{l.forEach(h=>{h.isIntersecting&&(i(),u.unobserve(h.target))})}),a=typeof o<"u"&&o!==null&&typeof o.getBoundingClientRect!="function"?o.host??o:o;r.observe(a)}else i()}}get componentRoot(){return this.shadowed?this.shadowRoot:this.body}scrollIntoHash(){if(y){let e=this;document.location.hash!==""&&(e.componentRoot?.subelements(document.location.hash)).map(o=>(typeof o.scrollIntoView=="function"&&o.scrollIntoView(C.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"})),o))}}i18n_translate(){if(y&&C.get("use_i18n")){let e=this,n=e.componentRoot,o=C.get("lang","en"),i=navigator.language.slice(0,2),r=le("i18n");o!==i&&typeof r=="object"&&Object.hasOwn(r,"messages")&&p(()=>new Promise(function(l){let u=r.messages.filter(function(h){return Object.hasOwn(h,o)&&Object.hasOwn(h,i)});(n?.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component")).map(h=>(u.map(function(f){let g=h.innerHTML;return g=g?.replace(new RegExp(`${f[o]}`,"g"),f[i]),h.innerHTML=g,null}),h)),l()}),"callback_i18n").call(e).then(function(){d.debug("i18n loaded for component: "+e.name)}).catch(l=>{throw new Error(`An error ocurred when parsing i18n: ${l}.`)})}}addComponentHelper(e){this._componentHelpers.push(e)}runComponentHelpers(){if(y){let e=this,n=[];n.push(e.i18n_translate.bind(e)),n.push(e.scrollIntoHash.bind(e)),n.push(e.lazyLoadImages.bind(e)),n=n.concat(e._componentHelpers),n.map(o=>(d.debug(`Executing ${o.name} as component helper for ${e.name}...`),o(),o))}}},c(s,"_Component"),p(s,"Component"),s.shadowed=!1,s.cached=!0,s),k("com.qcobjects",[He]),pe(D("Component")).map(t=>(M(t),t))}}),Un,$n,io,Gs,po,er,xo=w({"src/ComponentFactory.ts"(){"use strict";Jo(),me(),es(),ce(),ge(),fe(),P(),je(),$(),q(),Ko(),Un=p(({TPL_SOURCE:s,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>s==="default"?`${t}${e}.${n}`:"","ComponentURI"),$n=p((s,t)=>{let e=s.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),io=p((s,t)=>s.getAttribute(t)===null,"__attributeNotSet_"),Gs=p((s,t)=>{let e=io(s,"shadowed"),n=s.getAttribute("template-source")===null,o=$n(s,"shadowed"),i=io(s,"cached"),r=$n(s,"cached"),a=typeof C.get("tplextension")<"u"?C.get("tplextension"):"html";a=s.getAttribute("tplextension")!==null?s.getAttribute("tplextension"):a;let l=s.getAttribute("name"),u=s.getAttribute("componentClass")!==null?s.getAttribute("componentClass"):"Component",h=C.get("preserveComponentBodyTag")?l!==null?"com.qcobjects.components."+l+".ComponentBody":"com.qcobjects.components.ComponentBody":u;l=l!==null?l:D(h)&&typeof D(h).name<"u"?D(h).name:"";let f=D(h),g=h!=="Component"&&typeof f<"u"&&typeof f.tplsource=="string"&&f.tplsource!=="",m=n&&g?f.tplsource:n?"default":s.getAttribute("template-source");d.debug(`template source for ${l} is ${m} `),d.debug(`type for ${l} is ${Z(f)} `);let v=Un({COMPONENTS_BASE_PATH:C.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return C.get("preserveComponentBodyTag")&&k(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[an("ComponentBody",He,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let A=e?f&&f.shadowed||He.shadowed:o,B=i?(f&&f.cached)??He.cached:r,ie={__parent__:t,name:l,cached:B,shadowed:A,tplextension:a,body:C.get("preserveComponentBodyTag")?ee("componentBody"):s,templateURI:v,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete ie.name,v===""&&delete ie.templateURI;let Ln=Q(f,ie);return C.get("preserveComponentBodyTag")&&typeof Ln<"u"&&s.append(Ln.body),Ln},"__create_component_instance_")()},"_buildComponentFromElement_"),po=p((s,t)=>{let e=[];return y?e=s.map(function(n){return Gs(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),er=p(s=>{let t=Eo,e=s.subelements(t);return po(e,null)},"buildComponents")}}),ao,co,ho,tr=w({"src/Service.ts"(){"use strict";var s,t,e;Le(),vo(),to(),U(),P(),$(),Zo(),ce(),ao=(s=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=yn,this.basePath=he,this.url="",this.method="GET",this.data={},this.reload=!1,this.cached=!1}mockup({request:o,service:i}){throw new Error("Method not implemented.")}local({request:o,service:i}){throw new Error("Method not implemented.")}done({request:o,service:i}){throw new Error("Method not implemented.")}fail(...o){throw new Error("Method not implemented.")}set(o,i){this[o]=i}get(o,i){return this[o]||i}},c(s,"Service"),p(s,"Service"),s),co=(t=class extends ao{constructor(){super(...arguments),this.method="GET",this.cached=!1,this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0}done(o){d.debug("***** RECEIVED RESPONSE:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template)}},c(t,"JSONService"),p(t,"JSONService"),t),ho=(e=class extends co{constructor(){super(),this.method="GET",this.cached=!1,this.configFileName="config.json",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.JSONresponse=void 0,this.set("url",`${this.get("basePath")}${this.get("configFileName")}`)}configLoaded(){throw Error("Method not implemented.")}done(o){if(d.debug("***** CONFIG LOADED:"),d.debug(o.service.template),this.JSONresponse=JSON.parse(o.service.template),Object.hasOwn(this.JSONresponse,"__encoded__")){let r=ue.decrypt(this.JSONresponse?.__encoded__,ln);this.JSONresponse=JSON.parse(r)}let i=this.JSONresponse;Object.keys(i).map(r=>(C.set(r,i[r]),r)),this.configLoaded().catch(r=>{throw new Error(`An error ocurred: ${r}`)})}fail(){this.configLoaded().catch(o=>{throw new Error(`An error ocurred: ${o}`)})}},c(e,"ConfigService"),p(e,"ConfigService"),e),k("com.qcobjects.api",[ao]),k("com.qcobjects.api.services",[co]),k("com.qcobjects.api.config",[ho])}}),hn,ts=w({"src/globalSettings.ts"(){"use strict";var s;ce(),U(),P(),$(),q(),So(),X(),tr(),hn=(s=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new uo}static __start__(){return s.instance.__start__()}static get instance(){return typeof s._instance>"u"&&(s._instance=new s),s._instance}get logger(){return this._logger}set logger(e){this._logger=e}set(e,n){this._GLOBAL[e]=n}get(e,n){let o;return typeof this._GLOBAL[e]<"u"?o=this._GLOBAL[e]:typeof n<"u"&&(o=n),o}__start__(){let e=p(function(){let o;return y?o=new Promise(function(i,r){"serviceWorker"in navigator&&typeof C.get("serviceWorkerURI")<"u"&&(C.set("serviceWorkerScope",C.get("serviceWorkerScope")?C.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(C.get("serviceWorkerURI"),{scope:C.get("serviceWorkerScope")}).then(function(a){d.debug("Service Worker Registered"),i.call(o,a)},function(a){d.debug("Error registering Service Worker"),r.call(o,a)}),navigator.serviceWorker.ready.then(function(a){d.debug("Service Worker Ready"),i.call(o,a)},function(a){d.debug("Error loading Service Worker"),r.call(o,a)}))}):o=Promise.resolve(),o},"__load__serviceWorker"),n=p(function(){return new Promise(o=>{if(y){d.debug("Starting to building components");try{ns()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(R).catch(function(i){d.debug(`error loading the service worker ${i}`)})}o()})},"_buildComponents");return new Promise(o=>{d.debug("Starting to load the config settings..."),C.get("useConfigService",!1)?(d.debug("Loading settings using local configuration file..."),os(new ho),Fn.configLoaded=n,no(Fn)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${Fn.url}: ${i}`)})):(d.debug("Starting to load the components..."),n.call(this).then(()=>{o({})}).catch(i=>{throw new Error(`An error ocurred while trying to build the components stack. ${i}`)}))})}},c(s,"_GlobalSettings"),p(s,"GlobalSettings"),s),k("com.qcobjects",[hn])}}),nr={};Us(nr,{_top:c(()=>R,"_top"),buildComponentsStack:c(()=>ns,"buildComponentsStack"),componentsStack:c(()=>fn,"componentsStack"),configService:c(()=>Fn,"configService"),get:c(()=>le,"get"),resetTop:c(()=>fo,"resetTop"),set:c(()=>gn,"set"),setConfigService:c(()=>os,"setConfigService")});var R,fn,fo,ns,Fn,os,gn,le,Hs,X=w({"src/top.ts"(){"use strict";xo(),Se(),ts(),Oe(),P(),R={},R.lastCache=void 0,fn=[],fo=p(()=>{let s=hn.instance;R=Re(s,R,!0)},"resetTop"),ns=p(()=>{fn=er(document)},"buildComponentsStack"),os=p(s=>{R.configService=s,Fn=s},"setConfigService"),gn=p((s,t)=>{R[s]=t},"set"),le=p((s,t)=>R[s]||t,"get"),fo(),Hs=p(function(s){Object.hasOwn(s,"PackagesList")||Object.defineProperty(s,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>$o(),"get")}),Object.hasOwn(s,"PackagesNameList")||Object.defineProperty(s,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>qo(),"get")}),Object.hasOwn(s,"ClassesList")||Object.defineProperty(s,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>Fo(),"get")}),Object.hasOwn(s,"ClassesNameList")||Object.defineProperty(s,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>Vs(),"get")})},"_define_props"),Hs(R)}}),sn,ss,or=w({"src/captureFalseTouch.ts"(){"use strict";if(P(),q(),sn=!1,ss=p(()=>sn?{passive:!0}:!1,"captureFalseTouch"),y)try{let s=Object.defineProperty({},"passive",{get(){return sn=!0,sn}});window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}catch(s){d.debug(`An error ocurred: ${s}.`),sn=!1}else sn=!1}}),Wn,rs=w({"src/range.ts"(){"use strict";ke(),Wn=p((s,t=0,e=1)=>((t===0||typeof t>"u")&&(t=s,s=0),Array.from({length:(t-s)/e+1},function(n,o){return s+o*e})),"range"),M(Wn)}}),is,sr=w({"src/defaultProcessors.ts"(){"use strict";P(),wn(),X(),rs(),is=p(()=>{(function(){let s=p((i,r,a)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${r}.${a} does not have a component instance or it is null.`);let l=le(a),u=i.get(a),h=i.data[a],f=typeof h<"u"?h:typeof u<"u"?u:l,g="";return typeof f<"u"&&typeof f.map<"u"?g=f.map(function(m){let v=[...Object.keys(m)].map(b=>` data-${b}="${typeof m[b]<"u"&&m[b]!==null?m[b].toString():""}"`).join("");return`<quick-component name="${r}" ${v} ></quick-component>`}).join(""):d.debug(`${r}.${a} does not have a map property`),g},"mapper");we.setProcessor(s);let t=p(function(i,r,a){let l=`
5
5
  /* CSS Document for Mobile Imports */
6
6
  @import url("${a}") (orientation:portrait);
7
7
  @import url("${a}") (max-width:460px);
@@ -17,8 +17,8 @@
17
17
  @import url("${a}") (aspect-ratio: 8/5) and (min-width:460px);
18
18
  @import url("${a}") (aspect-ratio: 4/3) and (min-width:460px);
19
19
  @import url("${a}") (aspect-ratio: 3/2) and (min-width:460px);
20
- `,portrait:l};return Object.hasOwn(h,r)?h[r]:""},"layout");we.setProcessor(t);let e=p((i,r,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<component name="${r}" componentClass="${a}" ${h}></component>`},"component");we.setProcessor(e);let n=p((i,r,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<quick-component name="${r}" componentClass="${a}" ${h}></quick-component>`},"quick_component");we.setProcessor(n);let o=p((i,r,a)=>Wn(r).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");we.setProcessor(o)})()},"setDefaultProcessors")}}),mn,as=w({"src/findPackageNodePath.ts"(){"use strict";ce(),ot(),P(),q(),mn=p(function(s){let t=null;if(!y){let e=null;try{let r=jn("node:fs");r&&typeof r.existsSync=="function"&&(e=r)}catch(r){d.debug(`findPackageNodePath could not load node:fs: ${r}`)}let n=typeof dn<"u"&&Array.isArray(dn.paths)?dn.paths:[],o=typeof process<"u"&&typeof process.cwd=="function"?process.cwd():"",i=[`${v.get("projectPath")}${v.get("relativeImportPath")}`,`${v.get("basePath")}${v.get("relativeImportPath")}`,`${v.get("projectPath")}`,`${v.get("basePath")}`,`${v.get("relativeImportPath")}`,`${o}${v.get("relativeImportPath")}`,`${o}/node_modules/`,`${o}/node_modules`,`${o}`,"node_modules","./",""].concat(n).filter(r=>typeof r=="string"&&r!=="undefined");e!==null?(i=i.filter(r=>e.existsSync(r+"/"+s)),i.length>0?(t=i[0],d.info(s+" is Installed.")):(t="",d.info(`${s} is not in a standard path.`))):(t=`${o}/node_modules`,d.debug(`findPackageNodePath could not verify ${s}, assuming ${t}`))}return t},"findPackageNodePath"),S(mn)}}),zn,cs=w({"src/Import.ts"(){"use strict";Le(),ce(),be(),ge(),as(),P(),q(),Oe(),zn=p(function(s,t,e){e!==void 0&&d.debug(`[Import] Setting external=${e.toString()} resource to import: ${s}`),e?d.debug(`[Import] Registering external resource to import: ${s}`):d.debug(`[Import] Registering local resource to import: ${s}`);let n;return y?(n=new Promise(function(o,i){let r=p(function(){let l=!1,u=0;for(let h in J)u++;return u<Dn.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){Dn.push(t),r()&&Dn.map(u=>Fe.push(u)),y&&v.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:s})},"readyImported");if(!Object.hasOwn(J,s)){let l=ee("script");l.type=v.get("sourceType","text/javascript"),l.async=!!v.get("asynchronousImportsLoad"),l.onreadystatechange=function(){l.readyState==="complete"&&a(l)},l.onload=a,l.onerror=function(u){d.debug(`An error ocurred: ${u}.`),i.call(n,{_imported_:l,_package_name_:s})},l.src=e?v.get("remoteImportsPath")+s+".js":he+v.get("relativeImportPath")+s+".js",document.getElementsByTagName("head")[0].appendChild(l)}}),n.catch(function(){d.debug("Import: Error loading a package ")})):n=new Promise(function(o,i){try{let r=mn(s),a="";if(r!==null)a=r+"/"+s;else{let l=mn(s+".js");l!==null?a=l+"/"+s+".js":a=he+v.get("relativeImportPath")+s}try{o.call(n,{_imported_:Te(`${a}`),_package_name_:s})}catch(l){i.call(n,{_imported_:null,_package_name_:s,error:l})}}catch(r){i.call(n,{_imported_:null,_package_name_:s,error:r})}}).catch(function(o){d.debug("Something happened when importing "+s),console.warn(o)}),n.catch(function(o){d.warn(T(o))}),n},"Import"),zn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,ds=w({"src/mathFunctions.ts"(){"use strict";W=p(function(s){return isNaN(s)?new Number(0):new Number(s)},"__to_number")}}),ls,rr=w({"src/NamespaceRef.ts"(){"use strict";Yn(),$(),ls=p(function(s){let e=(k(s)||[]).filter(n=>Kn(n)).map(n=>({[n.__definition.__classType]:n})).reduce((n,o)=>Object.assign(n,o));return s.split(".").map(n=>({[n]:e})).reverse().reduce((n,o)=>(o[Object.keys(o).join(".")]=n,o))},"NamespaceRef")}}),Ge,us,Gn,ir=w({"src/Ready.ts"(){"use strict";ce(),q(),Oe(),X(),Ge=p(s=>{y?Fe.push(s.bind(window)):typeof global<"u"&&Fe.push(s.bind(global))},"Ready"),us=Ge,Gn=p(s=>{let t=p(()=>{Fe.map(function(e,n){typeof e=="function"&&(e(),Fe.splice(n,1))})},"_execReady");v.get("delayForReady")>0?y?setTimeout(t.bind(window),v.get("delayForReady")):typeof global<"u"&&setTimeout(t.bind(global),v.get("delayForReady")):t.call(R)},"_Ready")}}),go,ar,cr=w({"src/ArrayCollection.ts"(){"use strict";var s,t;me(),P(),je(),ds(),go=(s=class extends Array{unique(){return this.filter(function(n,o,i){return i.indexOf(n)===o})}table(){console.table(this)}sum(){return this.reduce((n,o)=>W(n)+W(o),0)}avg(){return this.length<1?0:this.reduce((n,o)=>(W(n)+W(o))/2)}min(){return this.reduce((n,o)=>W(n)<=W(o)?n:o,1/0)}max(){return this.reduce((n,o)=>W(n)>=W(o)?n:o,0)}sortBy(n,o){let i=o?(function(r,a){return a[n]<r[n]?1:-1}):(function(r,a){return a[n]>r[n]?1:-1});return this.sort(i)}matrix(n,o){return Array.from({length:n},p(()=>o,"x_func"))}matrix2d(n,o){let i=p(function(){return o},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}matrix3d(n,o){let i=p(function(){return Array.from({length:n},function(){return o})},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}},c(s,"ArrayList"),p(s,"ArrayList"),s),ar=(t=class{constructor(){this.source=Q(go,[])}changed(n,o){d.debug("VALUE CHANGED"),d.debug(n),d.debug(o)}push(n){let o=this;return d.debug("VALUE ADDED"),d.debug(n),o.source.push(n)}pop(){let n=this;return d.debug("VALUE POPPED"),n.source.pop()}_new_(n){let o=this,i=0;o.source=Q(D("ArrayList"),n);for(let r of Object.keys(o.source))isNaN(r)||(d.debug("binding "+r.toString()),(function(a){Object.defineProperty(o,a,{set(l){d.debug("setting "+a+"="+l),o.source[a]=l,o.changed(a,l)},get(){return o.source[a]}})})(r),i++);o.source.length=i,Object.defineProperty(o,"length",{get(){return o.source.length}})}},c(t,"ArrayCollection"),p(t,"ArrayCollection"),t)}}),lo,mo,dr=w({"src/Tag.ts"(){"use strict";var s;me(),je(),$(),q(),cr(),lo=(s=class extends go{show(){this.map(function(e){return e.style.opacity=1})}hide(){this.map(function(e){return e.style.opacity=0})}effect(...e){let n=[...e].slice(1),o=e[0],i;(typeof o).toLowerCase()==="string"&&(i=D(o)),this.map(function(r){return i.apply.apply(i,[r].concat(n))})}findElements(e){let n=Q(D("TagElements"));if(y)for(let o of Object.keys(this))typeof o=="number"&&typeof this[o]!="function"&&Object.hasOwn(this[o],"subelements")&&n.push(this[o].subelements(e));return n}},c(s,"TagElements"),p(s,"TagElements"),s),mo=p(function(t,e){let n=Q(lo);if(y){let o=document.subelements(t),i=[];for(let r=0;r<o.length;r++)typeof e<"u"&&Object.hasOwn(o[r],"innerHTML")&&(o[r].innerHTML=e),i.indexOf(r)<0&&(n.push(o[r]),i.push(r))}return n},"Tag"),k("com.qcobjects",[lo,mo])}}),ps,lr=w({"src/shortCode.ts"(){"use strict";Co(),ps=p(()=>{let t=ue.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...ue.encrypt((Math.random()*1e3).toString().replace(".",""),new Date(new Date().getTime()-1e3*1e3).getTime().toString())].map((o,i)=>[...t][i]===o?null:o).filter(o=>o!==null).join("")},"shortCode")}}),bo,ur=w({"src/super.ts"(){"use strict";me(),bo=p(function(s,t){return D(s)[t]},"_super_"),bo.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),hs,pr=w({"src/waitUntil.ts"(){"use strict";P(),hs=p((s,t)=>{let e=p((n,o)=>{let r=0;var a=setInterval(function(){o()?(clearInterval(a),n(),d.debug("Ejecuting "+n.name+" after wait")):r<2e3?(r+=1,d.debug("WAIT UNTIL "+n.name+" is true, "+r.toString()+" cycles")):(d.debug("Max execution time for "+n.name+" expression until true"),clearInterval(a))},1)},"_waitUntil");setTimeout(function(){e(s,t)},1)},"waitUntil")}}),rn,hr=w({"src/subelements.ts"(){"use strict";rn=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),Bs,fr,ta=w({"src/loadSDK.ts"(){"use strict";ce(),as(),cs(),P(),q(),X(),Bs=p(()=>{if(typeof R._sdk_<"u"){d.debug("The SDK is already present in this bundle, skipping the dynamic import");return}v.get("useSDK")&&(function(){let s=v.get("remoteImportsPath"),t=!v.get("useLocalSDK");v.set("remoteImportsPath",v.get("remoteSDKPath"));let e=!1,n="QCObjects-SDK";if(y)e=!0;else{let o=mn("qcobjects-sdk");o!==null?(n="qcobjects-sdk",e=!0):o!==""?(n="node_modules/qcobjects-sdk/QCObjects-SDK",e=!0):e=!1}e?(d.info("Importing SDK... "+n),Uo&&typeof jn<"u"?Te("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):zn(n,function(){t?d.debug("QCObjects-SDK.js loaded from remote location"):d.debug("QCObjects-SDK.js loaded from local"),v.set("remoteImportsPath",s)},t)?.catch(o=>{throw new Error(`An error ocurred when trying to import: ${o}`)})):d.debug("SDK has not been imported as it is not available at the moment")})()},"loadSDK"),fr=Bs}}),na=Ji({"src/MainProcess.ts"(){"use strict";X(),vo(),or(),Se(),Jo(),me(),es(),xo(),Yo(),ce(),be(),sr(),ot(),cs(),ke(),Yn(),P(),ds(),rr(),je(),Zn(),$(),q(),ir(),So(),dr(),wn(),eo(),fe(),lr(),ge(),Oo(),ur(),pr(),hr(),ts(),ta(),rs(),p(c((function s(t){if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:s})}catch(e){d.debug(`An error ocurred: ${e}`),typeof t.__qcobjects__<"u"&&(t.__qcobjects__.loaded=!0)}typeof t.__qcobjects__.loaded>"u"&&(t.__qcobjects__.loaded=!0,y&&(Element.prototype.subelements=rn,Document.prototype.subelements=rn,HTMLElement.prototype.subelements=rn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=rn)),d.debugEnabled=!1,d.infoEnabled=!0,y&&(Element.prototype.find=function(e){let n=this,o=[],i=document.subelements(e);return i.map((r,a)=>(typeof i[a]<"u"&&i[a].parentNode.tagName===n.parentNode.tagName&&o.push(ve(r,new Object)),r)),o}),y&&(Element.prototype.append=p(c(function(n){nt(n)||typeof n.body<"u"?this.appendChild(n.body):this.appendChild(n)},"QC_Append"),"QC_Append"),Element.prototype.render=p(c(function(n){let o=this,i=p((r,a)=>{if(typeof document.implementation.createHTMLDocument<"u"){let l=document.implementation.createHTMLDocument("");l.body.innerHTML=a,l.body.subelements("*").map(u=>r.append(u))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=n}catch(r){d.debug(`An error ocurred: ${r}`),i(o,n)}else i(o,n)},"QC_Render"),"QC_Render")),S(hs),S(bo),S(pn),S(D),S(ee),S(ps),S(Z),S(Ce),k("com.qcobjects",[cn]),y&&(Element.prototype.Cast=p(c(function(n){return ve(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=Gn,yo&&document.addEventListener("deviceready",Gn,ss)):global.onload=Gn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),He.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(no),S(Bn),S(Un),S(_n),S(T),S(Kn),S(nt),S(ls),Array.prototype.unique=function(){return this.filter(function(e,n,o){return o.indexOf(e)===n})},Array.unique=function(e){return e.unique()},M(Array.unique),M(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){e.table()},M(Array.table),M(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return W(e)+W(n)},0)},Array.sum=function(e){return e.sum()},M(Array.sum),M(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(W(e)+W(n))/2})},Array.avg=function(e){return e.avg()},M(Array.avg),M(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return W(e)<=W(n)?e:n},1/0)},Array.min=function(e){return e.min()},M(Array.min),M(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return W(e)>=W(n)?e:n},0)},Array.max=function(e){return e.max()},M(Array.max),M(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){let o=n?(function(i,r){return r[e]<i[e]?1:-1}):(function(i,r){return r[e]>i[e]?1:-1});return this.sort(o)},Array.sortBy=function(e,n,o=!0){return e.sortBy(n,o)},M(Array.sortBy),M(Array.prototype.sortBy),Array.prototype.matrix=function(e,n=0){return Array.from({length:e},p(function(i=void 0){return n},"x_func"))},Array.matrix=function(e,n,o=0){return e.matrix(n,o)},M(Array.matrix),M(Array.prototype.matrix),Array.prototype.matrix2d=function(e,n=0){let o=p(function(r){return n},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix2d=function(e,n,o=0){return e.matrix2d(n,o)},M(Array.matrix2d),M(Array.prototype.matrix2d),Array.prototype.matrix3d=function(e,n=0){let o=p(function(r){return Array.from({length:e},function(){return n})},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix3d=function(e,n,o=0){return e.matrix3d(n,o)},M(Array.matrix3d),M(Array.prototype.matrix3d),String.prototype.list=function(){let e=this;return Wn(0,e.length-1).map(function(n){return e[n]})},M(String.prototype.list),is(),Ge(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):fr(),v.get("useSDK")||hn.__start__().catch(e=>{throw Error(e)})}),S(S),S(zn),S(k),S(an),S(Q),S(mo),S(Ge),S(us),S(y),S(pe),S(hn),y&&un(function(){Ge(function(){(function(e){let n=!1,o=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function r(a){let l=Math.round(e.scrollY*100/o),u=Math.round(e.scrollX*100/i),h=new CustomEvent("scrollpercent",{detail:{percentX:u,percentY:l}});a.target.dispatchEvent(h);let f="defaultscroll";[0,5,10,25,50,75,90,95,100].filter(function(m){return m===l}).map(function(m){f="percentY"+l.toString();let C=new CustomEvent(f,{detail:{percentX:u,percentY:l}});return a.target.dispatchEvent(C),m})}c(r,"scrollDispatcher"),p(r,"scrollDispatcher"),document.addEventListener("scroll",function(a){n||(requestAnimationFrame(function(){r(a),n=!1}),n=!0)})})(t)})},[]),y||(typeof t._fireAsyncLoad<"u"&&Xo.call(t),typeof t.onload<"u"&&t.onload.call(t)),(function(e){let n=p(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&v.get("secureObjects",!1)?Ge(function(){n()}):v.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(R)}}),gr={};Us(gr,{ArrayCollection:c(()=>ar,"ArrayCollection"),ArrayList:c(()=>go,"ArrayList"),AssignPolyfill:c(()=>oa,"AssignPolyfill"),BackendMicroservice:c(()=>mr,"BackendMicroservice"),CONFIG:c(()=>v,"CONFIG"),Class:c(()=>an,"Class"),ClassFactory:c(()=>D,"ClassFactory"),ComplexStorageCache:c(()=>pn,"ComplexStorageCache"),Component:c(()=>He,"Component"),ComponentURI:c(()=>Un,"ComponentURI"),ConfigService:c(()=>ho,"ConfigService"),Controller:c(()=>wr,"Controller"),DDO:c(()=>Er,"DDO"),DefaultTemplateHandler:c(()=>br,"DefaultTemplateHandler"),Effect:c(()=>ms,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>hn,"GlobalSettings"),Import:c(()=>zn,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>co,"JSONService"),Logger:c(()=>uo,"Logger"),NamespaceRef:c(()=>ls,"NamespaceRef"),New:c(()=>Q,"New"),ObjectName:c(()=>_n,"ObjectName"),Package:c(()=>k,"Package"),Processor:c(()=>cn,"Processor"),Ready:c(()=>Ge,"Ready"),RegisterClass:c(()=>fs,"RegisterClass"),RegisterWidget:c(()=>No,"RegisterWidget"),RegisterWidgets:c(()=>gs,"RegisterWidgets"),Service:c(()=>ao,"Service"),SourceCSS:c(()=>yr,"SourceCSS"),SourceJS:c(()=>_r,"SourceJS"),Tag:c(()=>mo,"Tag"),TagElements:c(()=>lo,"TagElements"),Timer:c(()=>Sr,"Timer"),Toggle:c(()=>xr,"Toggle"),TransitionEffect:c(()=>Or,"TransitionEffect"),VO:c(()=>vr,"VO"),View:c(()=>Cr,"View"),_Cast:c(()=>ve,"_Cast"),_CastProps:c(()=>Re,"_CastProps"),_ComponentWidget_:c(()=>Vn,"_ComponentWidget_"),_Crypt:c(()=>ue,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>T,"_DataStringify"),_LegacyCopy:c(()=>wo,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>J,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>Dn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>Fe,"_QC_READY_LISTENERS"),_Ready:c(()=>Gn,"_Ready"),__attributeNotSet_:c(()=>io,"__attributeNotSet_"),__booleanAttribute_:c(()=>$n,"__booleanAttribute_"),__getType__:c(()=>Z,"__getType__"),__instanceID:c(()=>Ie,"__instanceID"),__is_raw_class__:c(()=>bn,"__is_raw_class__"),__make_global__:c(()=>Xn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>nr,"__top__"),_buildComponentsFromElements_:c(()=>po,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>Xo,"_fireAsyncLoad"),_methods_:c(()=>pe,"_methods_"),_protected_code_:c(()=>M,"_protected_code_"),_require_:c(()=>Te,"_require_"),_super_:c(()=>bo,"_super_"),_tag_filter_:c(()=>Eo,"_tag_filter_"),_top:c(()=>R,"_top"),asyncLoad:c(()=>un,"asyncLoad"),captureFalseTouch:c(()=>ss,"captureFalseTouch"),componentLoader:c(()=>Bn,"componentLoader"),componentsStack:c(()=>fn,"componentsStack"),findPackageNodePath:c(()=>mn,"findPackageNodePath"),get:c(()=>le,"get"),getDocumentLayout:c(()=>ia,"getDocumentLayout"),global:c(()=>R,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>Uo,"isNodeCommonJS"),isQCObjects_Class:c(()=>Kn,"isQCObjects_Class"),isQCObjects_Object:c(()=>nt,"isQCObjects_Object"),is_a:c(()=>Ce,"is_a"),is_phonegap:c(()=>yo,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>sa,"qcobjects"),range:c(()=>Wn,"range"),ready:c(()=>us,"ready"),resetTop:c(()=>fo,"resetTop"),serviceLoader:c(()=>no,"serviceLoader"),set:c(()=>gn,"set"),setDefaultProcessors:c(()=>is,"setDefaultProcessors"),shortCode:c(()=>ps,"shortCode"),subelements:c(()=>rn,"subelements"),waitUntil:c(()=>hs,"waitUntil")});dn.exports=Zi(gr);var oa={};typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:p(c(function(t,e){"use strict";if(t===null)throw new TypeError("Cannot convert undefined or null to object");let n=Object(t);for(let o=1;o<arguments.length;o++){let i=arguments[o];if(i!==null)for(let r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},"assign"),"assign"),writable:!0,configurable:!0});X();var sa=Qi(na());X();Oe();be();ge();ke();P();q();hr();Qn();Vo();vo();zo();Zn();fe();eo();Oo();pr();Se();Yn();$();me();ot();Jo();U();ur();lr();wn();je();ir();or();So();Yo();xo();rr();sr();dr();cs();Le();be();to();U();P();$();var Be,mr=(Be=class extends G{constructor({domain:t=yn,basePath:e=he,body:n=null,stream:o=null,request:i=null}){super({domain:t,basePath:e,body:n,stream:o,request:i}),d.debug("Initializing BackendMicroservice...");let r=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),r.stream=o,o?.on("data",u=>{let h=i?.method.toLowerCase(),f={post:r.post.bind(r)};Object.hasOwn(f,h)&&f[h].call(r,u)});let a=i?.method.toLowerCase(),l={get:r.get.bind(r),head:r.head.bind(r),put:r.put.bind(r),delete:r.delete.bind(r),connect:r.connect.bind(r),options:r.options.bind(r),trace:r.trace.bind(r),patch:r.patch.bind(r)};Object.hasOwn(l,a)&&l[a].call(r)}cors(){if(this.route.cors){d.debug("Validating CORS...");let{allow_origins:t,allow_credentials:e,allow_methods:n,allow_headers:o}=this.route.cors,i=this;if(typeof i.headers!="object"&&(i.headers={}),typeof i.route.responseHeaders!="object"&&(i.route.responseHeaders={}),typeof t<"u")if(d.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof i.request.headers.origin>"u"||[...t].indexOf(i.request.headers.origin)!==-1)d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{d.debug("CORS: Origin is not allowed: "+i.request.headers.origin),d.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(r){d.debug(`It was not possible to finish the call to the microservice: ${r}`)}}else d.debug("CORS: no allow_origins available. Allowing all origins..."),d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof e<"u"?(d.debug(`CORS: allow_credentials present. Allowing ${e}...`),i.route.responseHeaders["Access-Control-Allow-Credentials"]=e.toString()):(d.debug("CORS: No allow_credentials present. Allowing all credentials."),i.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof n<"u"?(d.debug(`CORS: allow_methods present. Allowing ${n}...`),i.route.responseHeaders["Access-Control-Allow-Methods"]=[...n].join(",")):(d.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),i.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof o<"u"?(d.debug(`CORS: allow_headers present. Allowing ${o}...`),i.route.responseHeaders["Access-Control-Allow-Headers"]=[...o].join(",")):(d.debug("CORS: No allow_headers present. Allowing all headers..."),i.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else d.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(t){d.debug(`[BackendMicroservice.head] Data received: ${T(t)}`),this.done()}get(t){d.debug(`[BackendMicroservice.get] Data received: ${T(t)}`),this.done()}post(t){d.debug(`[BackendMicroservice.post] Data received: ${T(t)}`),this.done()}put(t){d.debug(`[BackendMicroservice.put] Data received: ${T(t)}`),this.done()}delete(t){d.debug(`[BackendMicroservice.delete] Data received: ${T(t)}`),this.done()}connect(t){d.debug(`[BackendMicroservice.connect] Data received: ${T(t)}`),this.done()}options(t){d.debug(`[BackendMicroservice.options] Data received: ${T(t)}`),this.done()}trace(t){d.debug(`[BackendMicroservice.trace] Data received: ${T(t)}`),this.done()}patch(t){d.debug(`[BackendMicroservice.patch] Data received: ${T(t)}`),this.done()}finishWithBody(t){try{d.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),d.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=T(this.body)),d.debug(`[BackendMicroservice.finishWithBody]
21
- body: ${this.body} `),t?.write(this.body),t?.end(),d.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(e){d.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`)}}done(){d.debug("[BackendMicroservice.done] Finalizing the response...");let t=this,e=t.stream;try{if(d.debug("[BackendMicroservice.done] Sending response headers..."),t.route.responseHeaders)d.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(t.route.responseHeaders).join(",")}`),e.respond(t.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${n}`)}if(t.body!==null)try{d.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),t.finishWithBody.call(t,e)}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${n}`)}else d.debug("[BackendMicroservice.done] No body present. Ending stream..."),e.end()}},c(Be,"BackendMicroservice"),p(Be,"BackendMicroservice"),Be);k("com.qcobjects.api",[mr]);es();Co();P();wn();_o();Oe();var fs=p(function(s,t){return qn(s,t)},"RegisterClass");Xn(fs);var Pe,br=(Pe=class{constructor({component:t,template:e}){this.template="",this.__definition={},this.component=t,this.template=e}assign(t){let e=this;if(typeof e.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof e.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");let n=e.component.processorHandler;n.component=e.component;let o=typeof e.template<"u"?e.template:"";typeof t=="object"?[...Object.keys(t)].map(i=>{let r=t[i];if(typeof r=="string"||typeof r=="number"||!isNaN(r))try{r=we.processObject.bind(n).call(n,r,e.component),o=o.replace(new RegExp(`{{${i}}}`,"g"),r)}catch(a){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${a.message}`)}return i}):d.debug(`${e.component?.name}.data is not an object`);try{o=we.processObject.call(n,o,e.component)}catch(i){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${i.message}`)}return o}},c(Pe,"DefaultTemplateHandler"),p(Pe,"DefaultTemplateHandler"),Pe.__definition={},Pe);fs(br,"com.qcobjects");Le();Se();to();ge();U();$();P();var Ue,_r=(Ue=class extends G{constructor(t){super(t),this.domain=yn,this.basePath=he,this.type="text/javascript",this.containerTag="body",this.url="",this.data={},this.async=!1,this.external=!1,this.status=!1,this.body=ee("script")}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}fail(){}rebuild(){let t=this;try{document.getElementsByTagName(t.containerTag)[0].appendChild((function(e,n,o){return e.type=o.type,e.src=n,e.crossOrigin=Object.hasOwn(o,"crossOrigin")?o.crossOrigin:"anonymous",e.async=o.async,e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=function(i){o.status=!0,o.done.call(o,i)},e.onerror=function(i){o.status=!1,o.fail.call(o,i)},o.body=e,e}).call(this,ee("script"),this.external?this.url:this.basePath+this.url,t))}catch(e){t.status=!1,d.debug(`An error ocurred: ${e}`),t.fail()}}Cast(t){return ve(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(Ue,"SourceJS"),p(Ue,"SourceJS"),Ue);k("com.qcobjects",[_r]);Le();Se();to();ge();U();q();$();var We,yr=(We=class extends G{constructor(t){super(t),this.domain=yn,this.basePath=he,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return ve(this,t)}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}rebuild(){let t=this;y&&window.document.getElementsByTagName("head")[0].appendChild((function(e,n,o){return e.type="text/css",e.rel="stylesheet",e.href=n,e.crossOrigin="anonymous",e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=o.done,o.body=e,e}).call(this,ee("link"),this.external?this.url:this.basePath+this.url,t))}},c(We,"SourceCSS"),p(We,"SourceCSS"),We);k("com.qcobjects",[yr]);ts();ge();ot();ke();q();var ze,ra=(ze=class{attachInternals(){throw new Error("Method not implemented.")}click(){throw new Error("Method not implemented.")}hidePopover(){throw new Error("Method not implemented.")}showPopover(){throw new Error("Method not implemented.")}togglePopover(t){throw new Error("Method not implemented.")}addEventListener(t,e,n){throw new Error("Method not implemented.")}removeEventListener(t,e,n){throw new Error("Method not implemented.")}attachShadow(t){throw new Error("Method not implemented.")}checkVisibility(t){throw new Error("Method not implemented.")}closest(t){throw new Error("Method not implemented.")}computedStyleMap(){throw new Error("Method not implemented.")}getAttribute(t){throw new Error("Method not implemented.")}getAttributeNS(t,e){throw new Error("Method not implemented.")}getAttributeNames(){throw new Error("Method not implemented.")}getAttributeNode(t){throw new Error("Method not implemented.")}getAttributeNodeNS(t,e){throw new Error("Method not implemented.")}getBoundingClientRect(){throw new Error("Method not implemented.")}getClientRects(){throw new Error("Method not implemented.")}getElementsByClassName(t){throw new Error("Method not implemented.")}getElementsByTagName(t){throw new Error("Method not implemented.")}getElementsByTagNameNS(t,e){throw new Error("Method not implemented.")}getHTML(t){throw new Error("Method not implemented.")}hasAttribute(t){throw new Error("Method not implemented.")}hasAttributeNS(t,e){throw new Error("Method not implemented.")}hasAttributes(){throw new Error("Method not implemented.")}hasPointerCapture(t){throw new Error("Method not implemented.")}insertAdjacentElement(t,e){throw new Error("Method not implemented.")}insertAdjacentHTML(t,e){throw new Error("Method not implemented.")}insertAdjacentText(t,e){throw new Error("Method not implemented.")}matches(t){throw new Error("Method not implemented.")}releasePointerCapture(t){throw new Error("Method not implemented.")}removeAttribute(t){throw new Error("Method not implemented.")}removeAttributeNS(t,e){throw new Error("Method not implemented.")}removeAttributeNode(t){throw new Error("Method not implemented.")}requestFullscreen(t){throw new Error("Method not implemented.")}requestPointerLock(t){throw new Error("Method not implemented.")}scroll(t,e){throw new Error("Method not implemented.")}scrollBy(t,e){throw new Error("Method not implemented.")}scrollIntoView(t){throw new Error("Method not implemented.")}scrollTo(t,e){throw new Error("Method not implemented.")}setAttribute(t,e){throw new Error("Method not implemented.")}setAttributeNS(t,e,n){throw new Error("Method not implemented.")}setAttributeNode(t){throw new Error("Method not implemented.")}setAttributeNodeNS(t){throw new Error("Method not implemented.")}setHTMLUnsafe(t){throw new Error("Method not implemented.")}setPointerCapture(t){throw new Error("Method not implemented.")}toggleAttribute(t,e){throw new Error("Method not implemented.")}webkitMatchesSelector(t){throw new Error("Method not implemented.")}appendChild(t){throw new Error("Method not implemented.")}cloneNode(t){throw new Error("Method not implemented.")}compareDocumentPosition(t){throw new Error("Method not implemented.")}contains(t){throw new Error("Method not implemented.")}getRootNode(t){throw new Error("Method not implemented.")}hasChildNodes(){throw new Error("Method not implemented.")}insertBefore(t,e){throw new Error("Method not implemented.")}isDefaultNamespace(t){throw new Error("Method not implemented.")}isEqualNode(t){throw new Error("Method not implemented.")}isSameNode(t){throw new Error("Method not implemented.")}lookupNamespaceURI(t){throw new Error("Method not implemented.")}lookupPrefix(t){throw new Error("Method not implemented.")}normalize(){throw new Error("Method not implemented.")}removeChild(t){throw new Error("Method not implemented.")}replaceChild(t,e){throw new Error("Method not implemented.")}dispatchEvent(t){throw new Error("Method not implemented.")}animate(t,e){throw new Error("Method not implemented.")}getAnimations(t){throw new Error("Method not implemented.")}after(...t){throw new Error("Method not implemented.")}before(...t){throw new Error("Method not implemented.")}remove(){throw new Error("Method not implemented.")}replaceWith(...t){throw new Error("Method not implemented.")}append(...t){throw new Error("Method not implemented.")}prepend(...t){throw new Error("Method not implemented.")}querySelector(t){throw new Error("Method not implemented.")}querySelectorAll(t){throw new Error("Method not implemented.")}replaceChildren(...t){throw new Error("Method not implemented.")}blur(){throw new Error("Method not implemented.")}focus(t){throw new Error("Method not implemented.")}},c(ze,"QCObjectsWidgetNode"),p(ze,"QCObjectsWidgetNode"),ze),Vn,Ve,Je;y?Vn=(Ve=class extends HTMLElement{constructor(){super();let t=this,e=t.nodeName.toLowerCase(),n=ee("quick-component"),o=t.getAttributeNames();n.setAttribute("name",e),t.hasAttribute("shadowed")||n.setAttribute("shadowed","true"),o.forEach(r=>{t.hasAttribute(r)&&(n.setAttribute(r,t?.getAttribute(r)),t.removeAttribute(r))}),t.getAttributeNames().filter(function(r){return r.startsWith("data-")}).map(function(r){return r.split("-")[1]}).forEach(function(r){n.setAttribute("data-"+r,t?.getAttribute("data-"+r)),t.removeAttribute("data-"+r)}),[...t.children].forEach(r=>{n.appendChild(r.cloneNode(!0)),r.remove()}),t.append(n)}},c(Ve,"_ComponentWidget_"),p(Ve,"_ComponentWidget_"),Ve):Vn=(Je=class extends ra{constructor(){throw super(),new Error("Class not implemented.")}},c(Je,"_ComponentWidget_"),p(Je,"_ComponentWidget_"),Je);S(Vn);var No=p(s=>{if(y)customElements.define(s,class extends Vn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),gs=p((...s)=>{[...s].filter(function(e){return typeof e=="string"}).map(function(e){return No(e)})},"RegisterWidgets");M(No);M(gs);S(No);S(gs);ce();me();fe();U();P();je();$();q();var Qe,wr=(Qe=class extends G{constructor({component:t,dependencies:e}){if(super({component:t,dependencies:e}),this.dependencies=[],this.component=t,this.dependencies=e,typeof this.component>"u"||this.component===null)throw Error(`${Z(this)} must be called with a component`)}fail(...t){throw new Error("Method not implemented.")}routingSelectedAttr(t){return this.component?.routingSelected.map(e=>e[t]).filter(function(e){return e}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,e){if(y)try{this.isTouchable()?(this.component?.componentRoot?.subelements(t))[0].addEventListener("touchstart",e,{passive:!0}):(this.component?.componentRoot?.subelements(t))[0].addEventListener("click",e,{passive:!0})}catch(n){d.debug(`An error ocurred: ${n}.`),d.debug("No button to assign press event")}}createRoutingController(){let t=this,e=t.component,n=t.routingSelectedAttr("controllerclass");if(typeof n<"u"){let o=D(n);typeof o<"u"&&e!==null&&(e.routingController=Q(o,{component:e}),typeof e.routingController<"u"&&Object.hasOwn(e.routingController,"done")&&typeof e.routingController.done=="function"&&e.routingController.done.call(e.routingController))}}done(){}},c(Qe,"Controller"),p(Qe,"Controller"),Qe);k("com.qcobjects.controllers",[wr]);fe();U();$();var Ze,Cr=(Ze=class extends G{constructor({component:t=void 0,dependencies:e=[]}){if(super({component:t,dependencies:e}),typeof this.component>"u"||this.component==="null")throw Error(`${Z(this)} must be called with a component`)}},c(Ze,"View"),p(Ze,"View"),Ze);k("com.qcobjects.views",[Cr]);tr();U();$();var Xe,vr=(Xe=class extends G{},c(Xe,"VO"),p(Xe,"VO"),Xe);k("com.qcobjects.valueObjects",[vr]);U();$();ke();me();var Me,ms=(Me=class extends G{constructor(){super(...arguments),this.duration=1e3}done(...t){throw new Error("Method not implemented.")}apply(...t){throw new Error("Method not implemented.")}static animate(t){Me.prototype.animate.call({},t)}animate({timing:t,draw:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function r(a){let l=(a-i)/n;l>1&&(l=1);let u=t(l);e(Math.round(u*100)),l<1?requestAnimationFrame(r):typeof o<"u"&&o!==null&&Object.hasOwn(o,"done")&&(typeof o.done).toLowerCase()==="function"&&o.done.call(o)},"animate"),"animate"))}},c(Me,"_Effect"),p(Me,"Effect"),Me);k("com.qcobjects.effects.base",[ms]);pe(D("Effect")).map(s=>(M(s),s));P();$();me();var Ke,Or=(Ke=class extends ms{constructor(){super(...arguments),this.duration=385,this.defaultParams={alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1},this.fitToHeight=!1,this.fitToWidth=!1}apply({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:r,scaleFrom:a,scaleTo:l}){let u=this;d.info("EXECUTING TransitionEffect ");let h=u.component.componentRoot,f=typeof h<"u"&&h!==null&&typeof h.getBoundingClientRect!="function"?h.host??h:h;typeof h<"u"&&h!==null&&(u.fitToHeight&&(f.height=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollHeight:f.getBoundingClientRect().height),u.fitToWidth&&(f.width=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollWidth:f.getBoundingClientRect().width),u.component.shadowed?h.host.style.display="block":h.style.display="block",u.effects.map(g=>{let m=D(g);if(typeof m>"u")return d.debug(`Transition effect ${g} was not found`),g;let C=m.apply,b,O=u;if(typeof C=="function")b=C;else try{let ie=new m({});typeof ie.apply=="function"&&(b=ie.apply.bind(ie),O=ie)}catch(ie){d.debug(`Transition effect ${g} could not be instantiated: ${ie}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let A=u.component.shadowed?h.host:h,B={alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:r,scaleFrom:a,scaleTo:l};return b.call(O,A,...Object.values(B)),g}))}},c(Ke,"TransitionEffect"),p(Ke,"TransitionEffect"),Ke);k("com.qcobjects.effects.transitions.base",[Or]);U();$();var Ye,Sr=(Ye=class extends G{constructor(){super(...arguments),this.duration=1e3,this.alive=!0}thread({timing:t,intervalInterceptor:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function r(a){let l=a-i,u=l/n;u>1&&(u=1);let h=t(u,l);e(Math.round(h*100)),(u<1||n===-1)&&o.alive&&requestAnimationFrame(r)},"thread"),"thread"))}},c(Ye,"Timer"),p(Ye,"Timer"),Ye);k("com.qcobjects.timing",[Sr]);Ko();rs();cr();ot();U();P();Zn();var et,Er=(et=class extends G{constructor({instance:t,name:e,fget:n,fset:o,value:i}){super({instance:t,name:e,fget:n,fset:o,value:i}),this._new_({instance:t,name:e,fget:n,fset:o,value:i})}_new_({instance:t,name:r,fget:n,fset:o}){var r=typeof r>"u"?_n(this):r;Object.defineProperty(t,r,{set(a){let l=a;d.debug("value changed "+r);let u;typeof o<"u"&&typeof o=="function"?u=o(l):u=l,t["_"+r]=u},get(){let a=t["_"+r];d.debug("returning value "+r);let l=p(h=>typeof h=="object"&&Object.hasOwn(h,"value")?h.value:h,"is_ddo"),u;return typeof n<"u"&&typeof n=="function"?u=n(l(a)):u=l(a),u}})}},c(et,"DDO"),p(et,"DDO"),et);S(Er);U();P();$();var tt,xr=(tt=class extends G{constructor(t,e,n){super({positive:t,negative:e,args:n}),this._toggle=!1,this._inverse=!0,this._positive=null,this._negative=null,this._dispatched=null,this._args={},this._new_({positive:t,negative:e,args:n})}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:e,args:n}){this._positive=t,this._negative=e,this._args=n}fire(){let t=this;var e=new Promise(function(n,o){return typeof t._positive=="function"&&typeof t._negative=="function"?(t._inverse?t._dispatched=t._toggle?t._negative.bind(t):t._positive.bind(t):t._dispatched=t._toggle?t._positive.bind(t):t._negative.bind(t),t._dispatched?.call(t,t._args),n.call(e,t)):(d.debug("Toggle functions are not declared"),o.call(e,t)),t}).then(function(n){return n.changeToggle(),n}).catch(function(n){return d.debug(n.toString()),t}).finally(()=>t);return e}},c(tt,"Toggle"),p(tt,"Toggle"),tt);k("com.qcobjects.tools.essentials",[xr]);as();var ia=p(function(){let s=p((n,o)=>n>o?"landscape":null,"h"),t=p((n,o)=>o>n?"portrait":null,"v"),e=p((n,o)=>n===o?"square":null,"square");return[s(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight),e(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(n=>n!==null).pop()},"getDocumentLayout");ds();X();_o();X()});var As=ae((Ea,wi)=>{"use strict";var Po=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,ca=Object.getOwnPropertyNames,da=Object.prototype.hasOwnProperty,_=c((s,t)=>Po(s,"name",{value:t,configurable:!0}),"__name"),la=c((s,t)=>{for(var e in t)Po(s,e,{get:t[e],enumerable:!0})},"__export"),ua=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ca(t))!da.call(s,o)&&o!==e&&Po(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=aa(t,o))||n.enumerable});return s},"__copyProps"),pa=c(s=>ua(Po({},"__esModule",{value:!0}),s),"__toCommonJS"),Nr={};la(Nr,{BasicLayout:c(()=>_i,"BasicLayout"),ButtonField:c(()=>Gr,"ButtonField"),CanvasTool:c(()=>bi,"CanvasTool"),Contact:c(()=>Ir,"Contact"),CubeSplashScreenComponent:c(()=>ni,"CubeSplashScreenComponent"),DataGridController:c(()=>ai,"DataGridController"),EmailField:c(()=>Ur,"EmailField"),Fade:c(()=>Ne,"Fade"),FormController:c(()=>li,"FormController"),FormField:c(()=>on,"FormField"),FormValidations:c(()=>di,"FormValidations"),GenericController:c(()=>si,"GenericController"),GridComponent:c(()=>Jr,"GridComponent"),GridController:c(()=>ii,"GridController"),GridItemComponent:c(()=>Vr,"GridItemComponent"),GridView:c(()=>gi,"GridView"),InputField:c(()=>Hr,"InputField"),ListComponent:c(()=>Zr,"ListComponent"),ListController:c(()=>ri,"ListController"),ListItemComponent:c(()=>Qr,"ListItemComponent"),ModalComponent:c(()=>Es,"ModalComponent"),ModalController:c(()=>hi,"ModalController"),ModalEnclosureComponent:c(()=>Wr,"ModalEnclosureComponent"),ModalFade:c(()=>Io,"ModalFade"),ModalMoveDown:c(()=>Ss,"ModalMoveDown"),ModalMoveUp:c(()=>Os,"ModalMoveUp"),Move:c(()=>oe,"Move"),MoveXInFromLeft:c(()=>ws,"MoveXInFromLeft"),MoveXInFromRight:c(()=>ys,"MoveXInFromRight"),MoveYInFromBottom:c(()=>Cs,"MoveYInFromBottom"),MoveYInFromTop:c(()=>Tr,"MoveYInFromTop"),NotificationComponent:c(()=>ei,"NotificationComponent"),Radius:c(()=>Lr,"Radius"),Resize:c(()=>vs,"Resize"),Rotate:c(()=>kr,"Rotate"),RotateX:c(()=>Pr,"RotateX"),RotateY:c(()=>Mr,"RotateY"),RotateZ:c(()=>Rr,"RotateZ"),SessionData:c(()=>yi,"SessionData"),SessionUserToken:c(()=>To,"SessionUserToken"),ShadowedComponent:c(()=>Fr,"ShadowedComponent"),SlideItemComponent:c(()=>Kr,"SlideItemComponent"),SlideListComponent:c(()=>Xr,"SlideListComponent"),SliderComponent:c(()=>Yr,"SliderComponent"),SliderController:c(()=>ci,"SliderController"),SplashScreenComponent:c(()=>oo,"SplashScreenComponent"),SwaggerUIComponent:c(()=>zr,"SwaggerUIComponent"),SwaggerUIController:c(()=>ui,"SwaggerUIController"),TextField:c(()=>Br,"TextField"),VideoSplashScreenComponent:c(()=>ti,"VideoSplashScreenComponent"),WipeDown:c(()=>$r,"WipeDown"),WipeLeft:c(()=>jr,"WipeLeft"),WipeRight:c(()=>Dr,"WipeRight"),WipeUp:c(()=>qr,"WipeUp"),default:c(()=>fa,"default"),i18n_messages:c(()=>_s,"i18n_messages")});wi.exports=pa(Nr);var Ao=x(),_e=x(),st,_s=(st=class extends _e.InheritClass{constructor({messages:t=[]}){super({messages:t}),_e.CONFIG.get("use_i18n",!1)&&(_e.CONFIG.set("lang","en"),(0,_e.get)("i18n")?(0,_e.set)("i18n",{messages:(0,_e.get)("i18n").messages.concat(t)}):(0,_e.set)("i18n",{messages:t}))}_load_i18n_packages_(){return _e.CONFIG.get("i18n_languages",[]).map(t=>{(0,_e.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(st,"i18n_messages"),_(st,"i18n_messages"),st);(0,_e.Package)("org.qcobjects.i18n_messages",[_s]);new _s({})._load_i18n_packages_();var Ar=x(),rt,Ir=(rt=class extends Ar.VO{},c(rt,"Contact"),_(rt,"Contact"),rt);(0,Ar.Package)("org.qcobjects.models",[Ir]);var F=x(),xe=x(),it,Ne=(it=class extends xe.Effect{constructor(t){super(t),this.duration=1e3,this.duration=t?.duration}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){xe.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;xe.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){xe.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;xe.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}},c(it,"Fade"),_(it,"Fade"),it),at,oe=(at=class extends xe.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n,o,i){let r=o-e,a=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(l){return l},draw(l){xe.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*r/100;xe.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(at,"Move"),_(at,"Move"),at);(0,xe.Package)("org.qcobjects.effects.base",[Ne,oe]);var I=x(),ct,ys=(ct=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,t.width,0,0,0)}},c(ct,"MoveXInFromRight"),_(ct,"MoveXInFromRight"),ct),dt,ws=(dt=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,-t.width,0,0,0)}},c(dt,"MoveXInFromLeft"),_(dt,"MoveXInFromLeft"),dt),lt,Cs=(lt=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,t.height,0,0)}},c(lt,"MoveYInFromBottom"),_(lt,"MoveYInFromBottom"),lt),ut,Tr=(ut=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,-t.height,0,0)}},c(ut,"MoveYInFromTop"),_(ut,"MoveYInFromTop"),ut),pt,Pr=(pt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,0,0,"+r.toString()+"deg)"}})}},c(pt,"RotateX"),_(pt,"RotateX"),pt),ht,Mr=(ht=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,1,0,"+r.toString()+"deg)"}})}},c(ht,"RotateY"),_(ht,"RotateY"),ht),ft,Rr=(ft=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,0,1,"+r.toString()+"deg)"}})}},c(ft,"RotateZ"),_(ft,"RotateZ"),ft),gt,kr=(gt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,1,1,"+r.toString()+"deg)"}})}},c(gt,"Rotate"),_(gt,"Rotate"),gt),mt,Lr=(mt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("radius: "+r.toString()),t.style.borderRadius=r.toString()+"px"}})}},c(mt,"Radius"),_(mt,"Radius"),mt),bt,vs=(bt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("resize: "+r.toString()),t.style.transformOrigin="center",t.style.transform="scale("+r+","+r+")"}})}},c(bt,"Resize"),_(bt,"Resize"),bt),_t,jr=(_t=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+r+")"}})}},c(_t,"WipeLeft"),_(_t,"WipeLeft"),_t),yt,Dr=(yt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+r+")"}})}},c(yt,"WipeRight"),_(yt,"WipeRight"),yt),wt,qr=(wt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+r+")"}})}},c(wt,"WipeUp"),_(wt,"WipeUp"),wt),Ct,$r=(Ct=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+r+")"}})}},c(Ct,"WipeDown"),_(Ct,"WipeDown"),Ct);(0,I.Package)("org.qcobjects.effects.extended",[ys,ws,Cs,Tr,Pr,Mr,Rr,kr,Lr,vs,jr,Dr,qr,$r]);var ha=x(),vt,Io=(vt=class extends Ne{constructor(){super(...arguments),this.duration=500}},c(vt,"ModalFade"),_(vt,"ModalFade"),vt),Ot,Os=(Ot=class extends oe{constructor(){super(...arguments),this.duration=800}},c(Ot,"ModalMoveUp"),_(Ot,"ModalMoveUp"),Ot),St,Ss=(St=class extends oe{constructor(){super(...arguments),this.duration=300}},c(St,"ModalMoveDown"),_(St,"ModalMoveDown"),St);(0,ha.Package)("org.qcobjects.modal.effects",[Io,Ss,Os]);var Ee=x(),Et,on=(Et=class extends Ee.Component{constructor(t){t.name=typeof t.name<"u"?t.name:"form-field",super(t),this.cached=!1,this.reload=!0}createBindingEvents(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e];n.addEventListener("change",()=>{Ee.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Ee.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Ee.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Ee.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Ee.logger.debug("Binding "+e+" for "+this.name),this.data[e]=t.value}executeBindings(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e],o=n.getAttribute("data-field");Ee.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Ee.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(Et,"FormField"),_(Et,"FormField"),Et);(0,Ee.Package)("org.qcobjects.base.components",[on]);var xt,Fr=(xt=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.container=null,this.shadowed=!0,this.cached=!1,this.controller=null,this.view=null,this.data={}}},c(xt,"ShadowedComponent"),_(xt,"ShadowedComponent"),xt),Nt,Gr=(Nt=class extends on{constructor(t){t.fieldType="button",super(t)}},c(Nt,"ButtonField"),_(Nt,"ButtonField"),Nt),At,Hr=(At=class extends on{constructor(t){t.fieldType="input",super(t)}},c(At,"InputField"),_(At,"InputField"),At),It,Br=(It=class extends on{constructor(t){t.fieldType="textarea",super(t)}},c(It,"TextField"),_(It,"TextField"),It),Tt,Ur=(Tt=class extends on{constructor(t){t.fieldType="input",super(t)}},c(Tt,"EmailField"),_(Tt,"EmailField"),Tt),Pt,Wr=(Pt=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.name="modalenclosure",this.tplsource="inline",this.cached=!1,this.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),this.template=`
20
+ `,portrait:l};return Object.hasOwn(h,r)?h[r]:""},"layout");we.setProcessor(t);let e=p((i,r,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<component name="${r}" componentClass="${a}" ${h}></component>`},"component");we.setProcessor(e);let n=p((i,r,a,...l)=>{let u=[...l].map(function(f){return{[f.split("=")[0]]:f.split("=")[1]}}).reduce(function(f,g){return Object.assign(f,g)}),h=[...Object.keys(u)].map(function(f){return`${f}=${u[f]}`}).join(" ");return`<quick-component name="${r}" componentClass="${a}" ${h}></quick-component>`},"quick_component");we.setProcessor(n);let o=p((i,r,a)=>Wn(r).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");we.setProcessor(o)})()},"setDefaultProcessors")}}),mn,as=w({"src/findPackageNodePath.ts"(){"use strict";ce(),ot(),P(),q(),mn=p(function(s){let t=null;if(!y){let e=null;try{let r=jn("node:fs");r&&typeof r.existsSync=="function"&&(e=r)}catch(r){d.debug(`findPackageNodePath could not load node:fs: ${r}`)}let n=typeof dn<"u"&&Array.isArray(dn.paths)?dn.paths:[],o=typeof process<"u"&&typeof process.cwd=="function"?process.cwd():"",i=[`${C.get("projectPath")}${C.get("relativeImportPath")}`,`${C.get("basePath")}${C.get("relativeImportPath")}`,`${C.get("projectPath")}`,`${C.get("basePath")}`,`${C.get("relativeImportPath")}`,`${o}${C.get("relativeImportPath")}`,`${o}/node_modules/`,`${o}/node_modules`,`${o}`,"node_modules","./",""].concat(n).filter(r=>typeof r=="string"&&r!=="undefined");e!==null?(i=i.filter(r=>e.existsSync(r+"/"+s)),i.length>0?(t=i[0],d.info(s+" is Installed.")):(t="",d.info(`${s} is not in a standard path.`))):(t=`${o}/node_modules`,d.debug(`findPackageNodePath could not verify ${s}, assuming ${t}`))}return t},"findPackageNodePath"),S(mn)}}),zn,cs=w({"src/Import.ts"(){"use strict";Le(),ce(),be(),ge(),as(),P(),q(),Oe(),zn=p(function(s,t,e){e!==void 0&&d.debug(`[Import] Setting external=${e.toString()} resource to import: ${s}`),e?d.debug(`[Import] Registering external resource to import: ${s}`):d.debug(`[Import] Registering local resource to import: ${s}`);let n;return y?(n=new Promise(function(o,i){let r=p(function(){let l=!1,u=0;for(let h in J)u++;return u<Dn.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){Dn.push(t),r()&&Dn.map(u=>Fe.push(u)),y&&C.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:s})},"readyImported");if(!Object.hasOwn(J,s)){let l=ee("script");l.type=C.get("sourceType","text/javascript"),l.async=!!C.get("asynchronousImportsLoad"),l.onreadystatechange=function(){l.readyState==="complete"&&a(l)},l.onload=a,l.onerror=function(u){d.debug(`An error ocurred: ${u}.`),i.call(n,{_imported_:l,_package_name_:s})},l.src=e?C.get("remoteImportsPath")+s+".js":he+C.get("relativeImportPath")+s+".js",document.getElementsByTagName("head")[0].appendChild(l)}}),n.catch(function(){d.debug("Import: Error loading a package ")})):n=new Promise(function(o,i){try{let r=mn(s),a="";if(r!==null)a=r+"/"+s;else{let l=mn(s+".js");l!==null?a=l+"/"+s+".js":a=he+C.get("relativeImportPath")+s}try{o.call(n,{_imported_:Te(`${a}`),_package_name_:s})}catch(l){i.call(n,{_imported_:null,_package_name_:s,error:l})}}catch(r){i.call(n,{_imported_:null,_package_name_:s,error:r})}}).catch(function(o){d.debug("Something happened when importing "+s),console.warn(o)}),n.catch(function(o){d.warn(T(o))}),n},"Import"),zn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,ds=w({"src/mathFunctions.ts"(){"use strict";W=p(function(s){return isNaN(s)?new Number(0):new Number(s)},"__to_number")}}),ls,rr=w({"src/NamespaceRef.ts"(){"use strict";Yn(),$(),ls=p(function(s){let e=(k(s)||[]).filter(n=>Kn(n)).map(n=>({[n.__definition.__classType]:n})).reduce((n,o)=>Object.assign(n,o));return s.split(".").map(n=>({[n]:e})).reverse().reduce((n,o)=>(o[Object.keys(o).join(".")]=n,o))},"NamespaceRef")}}),Ge,us,Gn,ir=w({"src/Ready.ts"(){"use strict";ce(),q(),Oe(),X(),Ge=p(s=>{y?Fe.push(s.bind(window)):typeof global<"u"&&Fe.push(s.bind(global))},"Ready"),us=Ge,Gn=p(s=>{let t=p(()=>{Fe.map(function(e,n){typeof e=="function"&&(e(),Fe.splice(n,1))})},"_execReady");C.get("delayForReady")>0?y?setTimeout(t.bind(window),C.get("delayForReady")):typeof global<"u"&&setTimeout(t.bind(global),C.get("delayForReady")):t.call(R)},"_Ready")}}),go,ar,cr=w({"src/ArrayCollection.ts"(){"use strict";var s,t;me(),P(),je(),ds(),go=(s=class extends Array{unique(){return this.filter(function(n,o,i){return i.indexOf(n)===o})}table(){console.table(this)}sum(){return this.reduce((n,o)=>W(n)+W(o),0)}avg(){return this.length<1?0:this.reduce((n,o)=>(W(n)+W(o))/2)}min(){return this.reduce((n,o)=>W(n)<=W(o)?n:o,1/0)}max(){return this.reduce((n,o)=>W(n)>=W(o)?n:o,0)}sortBy(n,o){let i=o?(function(r,a){return a[n]<r[n]?1:-1}):(function(r,a){return a[n]>r[n]?1:-1});return this.sort(i)}matrix(n,o){return Array.from({length:n},p(()=>o,"x_func"))}matrix2d(n,o){let i=p(function(){return o},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}matrix3d(n,o){let i=p(function(){return Array.from({length:n},function(){return o})},"y_func");return Array.from({length:n},p(function(){return Array.from({length:n},i)},"x_func"))}},c(s,"ArrayList"),p(s,"ArrayList"),s),ar=(t=class{constructor(){this.source=Q(go,[])}changed(n,o){d.debug("VALUE CHANGED"),d.debug(n),d.debug(o)}push(n){let o=this;return d.debug("VALUE ADDED"),d.debug(n),o.source.push(n)}pop(){let n=this;return d.debug("VALUE POPPED"),n.source.pop()}_new_(n){let o=this,i=0;o.source=Q(D("ArrayList"),n);for(let r of Object.keys(o.source))isNaN(r)||(d.debug("binding "+r.toString()),(function(a){Object.defineProperty(o,a,{set(l){d.debug("setting "+a+"="+l),o.source[a]=l,o.changed(a,l)},get(){return o.source[a]}})})(r),i++);o.source.length=i,Object.defineProperty(o,"length",{get(){return o.source.length}})}},c(t,"ArrayCollection"),p(t,"ArrayCollection"),t)}}),lo,mo,dr=w({"src/Tag.ts"(){"use strict";var s;me(),je(),$(),q(),cr(),lo=(s=class extends go{show(){this.map(function(e){return e.style.opacity=1})}hide(){this.map(function(e){return e.style.opacity=0})}effect(...e){let n=[...e].slice(1),o=e[0],i;(typeof o).toLowerCase()==="string"&&(i=D(o)),this.map(function(r){return i.apply.apply(i,[r].concat(n))})}findElements(e){let n=Q(D("TagElements"));if(y)for(let o of Object.keys(this))typeof o=="number"&&typeof this[o]!="function"&&Object.hasOwn(this[o],"subelements")&&n.push(this[o].subelements(e));return n}},c(s,"TagElements"),p(s,"TagElements"),s),mo=p(function(t,e){let n=Q(lo);if(y){let o=document.subelements(t),i=[];for(let r=0;r<o.length;r++)typeof e<"u"&&Object.hasOwn(o[r],"innerHTML")&&(o[r].innerHTML=e),i.indexOf(r)<0&&(n.push(o[r]),i.push(r))}return n},"Tag"),k("com.qcobjects",[lo,mo])}}),ps,lr=w({"src/shortCode.ts"(){"use strict";vo(),ps=p(()=>{let t=ue.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...ue.encrypt((Math.random()*1e3).toString().replace(".",""),new Date(new Date().getTime()-1e3*1e3).getTime().toString())].map((o,i)=>[...t][i]===o?null:o).filter(o=>o!==null).join("")},"shortCode")}}),bo,ur=w({"src/super.ts"(){"use strict";me(),bo=p(function(s,t){return D(s)[t]},"_super_"),bo.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),hs,pr=w({"src/waitUntil.ts"(){"use strict";P(),hs=p((s,t)=>{let e=p((n,o)=>{let r=0;var a=setInterval(function(){o()?(clearInterval(a),n(),d.debug("Ejecuting "+n.name+" after wait")):r<2e3?(r+=1,d.debug("WAIT UNTIL "+n.name+" is true, "+r.toString()+" cycles")):(d.debug("Max execution time for "+n.name+" expression until true"),clearInterval(a))},1)},"_waitUntil");setTimeout(function(){e(s,t)},1)},"waitUntil")}}),rn,hr=w({"src/subelements.ts"(){"use strict";rn=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),Bs,fr,ta=w({"src/loadSDK.ts"(){"use strict";ce(),as(),cs(),P(),q(),X(),Bs=p(()=>{if(typeof R._sdk_<"u"){d.debug("The SDK is already present in this bundle, skipping the dynamic import");return}C.get("useSDK")&&(function(){let s=C.get("remoteImportsPath"),t=!C.get("useLocalSDK");C.set("remoteImportsPath",C.get("remoteSDKPath"));let e=!1,n="QCObjects-SDK";if(y)e=!0;else{let o=mn("qcobjects-sdk");o!==null?(n="qcobjects-sdk",e=!0):o!==""?(n="node_modules/qcobjects-sdk/QCObjects-SDK",e=!0):e=!1}e?(d.info("Importing SDK... "+n),Uo&&typeof jn<"u"?Te("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):zn(n,function(){t?d.debug("QCObjects-SDK.js loaded from remote location"):d.debug("QCObjects-SDK.js loaded from local"),C.set("remoteImportsPath",s)},t)?.catch(o=>{throw new Error(`An error ocurred when trying to import: ${o}`)})):d.debug("SDK has not been imported as it is not available at the moment")})()},"loadSDK"),fr=Bs}}),na=Ji({"src/MainProcess.ts"(){"use strict";X(),Co(),or(),Se(),Jo(),me(),es(),xo(),Yo(),ce(),be(),sr(),ot(),cs(),ke(),Yn(),P(),ds(),rr(),je(),Zn(),$(),q(),ir(),So(),dr(),wn(),eo(),fe(),lr(),ge(),Oo(),ur(),pr(),hr(),ts(),ta(),rs(),p(c((function s(t){if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:s})}catch(e){d.debug(`An error ocurred: ${e}`),typeof t.__qcobjects__<"u"&&(t.__qcobjects__.loaded=!0)}typeof t.__qcobjects__.loaded>"u"&&(t.__qcobjects__.loaded=!0,y&&(Element.prototype.subelements=rn,Document.prototype.subelements=rn,HTMLElement.prototype.subelements=rn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=rn)),d.debugEnabled=!1,d.infoEnabled=!0,y&&(Element.prototype.find=function(e){let n=this,o=[],i=document.subelements(e);return i.map((r,a)=>(typeof i[a]<"u"&&i[a].parentNode.tagName===n.parentNode.tagName&&o.push(Ce(r,new Object)),r)),o}),y&&(Element.prototype.append=p(c(function(n){nt(n)||typeof n.body<"u"?this.appendChild(n.body):this.appendChild(n)},"QC_Append"),"QC_Append"),Element.prototype.render=p(c(function(n){let o=this,i=p((r,a)=>{if(typeof document.implementation.createHTMLDocument<"u"){let l=document.implementation.createHTMLDocument("");l.body.innerHTML=a,l.body.subelements("*").map(u=>r.append(u))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=n}catch(r){d.debug(`An error ocurred: ${r}`),i(o,n)}else i(o,n)},"QC_Render"),"QC_Render")),S(hs),S(bo),S(pn),S(D),S(ee),S(ps),S(Z),S(ve),k("com.qcobjects",[cn]),y&&(Element.prototype.Cast=p(c(function(n){return Ce(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=Gn,yo&&document.addEventListener("deviceready",Gn,ss)):global.onload=Gn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),He.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(no),S(Bn),S(Un),S(_n),S(T),S(Kn),S(nt),S(ls),Array.prototype.unique=function(){return this.filter(function(e,n,o){return o.indexOf(e)===n})},Array.unique=function(e){return e.unique()},M(Array.unique),M(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){e.table()},M(Array.table),M(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return W(e)+W(n)},0)},Array.sum=function(e){return e.sum()},M(Array.sum),M(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(W(e)+W(n))/2})},Array.avg=function(e){return e.avg()},M(Array.avg),M(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return W(e)<=W(n)?e:n},1/0)},Array.min=function(e){return e.min()},M(Array.min),M(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return W(e)>=W(n)?e:n},0)},Array.max=function(e){return e.max()},M(Array.max),M(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){let o=n?(function(i,r){return r[e]<i[e]?1:-1}):(function(i,r){return r[e]>i[e]?1:-1});return this.sort(o)},Array.sortBy=function(e,n,o=!0){return e.sortBy(n,o)},M(Array.sortBy),M(Array.prototype.sortBy),Array.prototype.matrix=function(e,n=0){return Array.from({length:e},p(function(i=void 0){return n},"x_func"))},Array.matrix=function(e,n,o=0){return e.matrix(n,o)},M(Array.matrix),M(Array.prototype.matrix),Array.prototype.matrix2d=function(e,n=0){let o=p(function(r){return n},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix2d=function(e,n,o=0){return e.matrix2d(n,o)},M(Array.matrix2d),M(Array.prototype.matrix2d),Array.prototype.matrix3d=function(e,n=0){let o=p(function(r){return Array.from({length:e},function(){return n})},"y_func");return Array.from({length:e},p(function(r){return Array.from({length:e},o)},"x_func"))},Array.matrix3d=function(e,n,o=0){return e.matrix3d(n,o)},M(Array.matrix3d),M(Array.prototype.matrix3d),String.prototype.list=function(){let e=this;return Wn(0,e.length-1).map(function(n){return e[n]})},M(String.prototype.list),is(),Ge(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):fr(),C.get("useSDK")||hn.__start__().catch(e=>{throw Error(e)})}),S(S),S(zn),S(k),S(an),S(Q),S(mo),S(Ge),S(us),S(y),S(pe),S(hn),y&&un(function(){Ge(function(){(function(e){let n=!1,o=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function r(a){let l=Math.round(e.scrollY*100/o),u=Math.round(e.scrollX*100/i),h=new CustomEvent("scrollpercent",{detail:{percentX:u,percentY:l}});a.target.dispatchEvent(h);let f="defaultscroll";[0,5,10,25,50,75,90,95,100].filter(function(m){return m===l}).map(function(m){f="percentY"+l.toString();let v=new CustomEvent(f,{detail:{percentX:u,percentY:l}});return a.target.dispatchEvent(v),m})}c(r,"scrollDispatcher"),p(r,"scrollDispatcher"),document.addEventListener("scroll",function(a){n||(requestAnimationFrame(function(){r(a),n=!1}),n=!0)})})(t)})},[]),y||(typeof t._fireAsyncLoad<"u"&&Xo.call(t),typeof t.onload<"u"&&t.onload.call(t)),(function(e){let n=p(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&C.get("secureObjects",!1)?Ge(function(){n()}):C.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(R)}}),gr={};Us(gr,{ArrayCollection:c(()=>ar,"ArrayCollection"),ArrayList:c(()=>go,"ArrayList"),AssignPolyfill:c(()=>oa,"AssignPolyfill"),BackendMicroservice:c(()=>mr,"BackendMicroservice"),CONFIG:c(()=>C,"CONFIG"),Class:c(()=>an,"Class"),ClassFactory:c(()=>D,"ClassFactory"),ComplexStorageCache:c(()=>pn,"ComplexStorageCache"),Component:c(()=>He,"Component"),ComponentURI:c(()=>Un,"ComponentURI"),ConfigService:c(()=>ho,"ConfigService"),Controller:c(()=>wr,"Controller"),DDO:c(()=>Er,"DDO"),DefaultTemplateHandler:c(()=>br,"DefaultTemplateHandler"),Effect:c(()=>ms,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>hn,"GlobalSettings"),Import:c(()=>zn,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>co,"JSONService"),Logger:c(()=>uo,"Logger"),NamespaceRef:c(()=>ls,"NamespaceRef"),New:c(()=>Q,"New"),ObjectName:c(()=>_n,"ObjectName"),Package:c(()=>k,"Package"),Processor:c(()=>cn,"Processor"),Ready:c(()=>Ge,"Ready"),RegisterClass:c(()=>fs,"RegisterClass"),RegisterWidget:c(()=>No,"RegisterWidget"),RegisterWidgets:c(()=>gs,"RegisterWidgets"),Service:c(()=>ao,"Service"),SourceCSS:c(()=>yr,"SourceCSS"),SourceJS:c(()=>_r,"SourceJS"),Tag:c(()=>mo,"Tag"),TagElements:c(()=>lo,"TagElements"),Timer:c(()=>Sr,"Timer"),Toggle:c(()=>xr,"Toggle"),TransitionEffect:c(()=>Or,"TransitionEffect"),VO:c(()=>Cr,"VO"),View:c(()=>vr,"View"),_Cast:c(()=>Ce,"_Cast"),_CastProps:c(()=>Re,"_CastProps"),_ComponentWidget_:c(()=>Vn,"_ComponentWidget_"),_Crypt:c(()=>ue,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>T,"_DataStringify"),_LegacyCopy:c(()=>wo,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>J,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>Dn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>Fe,"_QC_READY_LISTENERS"),_Ready:c(()=>Gn,"_Ready"),__attributeNotSet_:c(()=>io,"__attributeNotSet_"),__booleanAttribute_:c(()=>$n,"__booleanAttribute_"),__getType__:c(()=>Z,"__getType__"),__instanceID:c(()=>Ie,"__instanceID"),__is_raw_class__:c(()=>bn,"__is_raw_class__"),__make_global__:c(()=>Xn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>nr,"__top__"),_buildComponentsFromElements_:c(()=>po,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>Xo,"_fireAsyncLoad"),_methods_:c(()=>pe,"_methods_"),_protected_code_:c(()=>M,"_protected_code_"),_require_:c(()=>Te,"_require_"),_super_:c(()=>bo,"_super_"),_tag_filter_:c(()=>Eo,"_tag_filter_"),_top:c(()=>R,"_top"),asyncLoad:c(()=>un,"asyncLoad"),captureFalseTouch:c(()=>ss,"captureFalseTouch"),componentLoader:c(()=>Bn,"componentLoader"),componentsStack:c(()=>fn,"componentsStack"),findPackageNodePath:c(()=>mn,"findPackageNodePath"),get:c(()=>le,"get"),getDocumentLayout:c(()=>ia,"getDocumentLayout"),global:c(()=>R,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>Uo,"isNodeCommonJS"),isQCObjects_Class:c(()=>Kn,"isQCObjects_Class"),isQCObjects_Object:c(()=>nt,"isQCObjects_Object"),is_a:c(()=>ve,"is_a"),is_phonegap:c(()=>yo,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>sa,"qcobjects"),range:c(()=>Wn,"range"),ready:c(()=>us,"ready"),resetTop:c(()=>fo,"resetTop"),serviceLoader:c(()=>no,"serviceLoader"),set:c(()=>gn,"set"),setDefaultProcessors:c(()=>is,"setDefaultProcessors"),shortCode:c(()=>ps,"shortCode"),subelements:c(()=>rn,"subelements"),waitUntil:c(()=>hs,"waitUntil")});dn.exports=Zi(gr);var oa={};typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:p(c(function(t,e){"use strict";if(t===null)throw new TypeError("Cannot convert undefined or null to object");let n=Object(t);for(let o=1;o<arguments.length;o++){let i=arguments[o];if(i!==null)for(let r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},"assign"),"assign"),writable:!0,configurable:!0});X();var sa=Qi(na());X();Oe();be();ge();ke();P();q();hr();Qn();Vo();Co();zo();Zn();fe();eo();Oo();pr();Se();Yn();$();me();ot();Jo();U();ur();lr();wn();je();ir();or();So();Yo();xo();rr();sr();dr();cs();Le();be();to();U();P();$();var Be,mr=(Be=class extends G{constructor({domain:t=yn,basePath:e=he,body:n=null,stream:o=null,request:i=null}){super({domain:t,basePath:e,body:n,stream:o,request:i}),d.debug("Initializing BackendMicroservice...");let r=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),r.stream=o,o?.on("data",u=>{let h=i?.method.toLowerCase(),f={post:r.post.bind(r)};Object.hasOwn(f,h)&&f[h].call(r,u)});let a=i?.method.toLowerCase(),l={get:r.get.bind(r),head:r.head.bind(r),put:r.put.bind(r),delete:r.delete.bind(r),connect:r.connect.bind(r),options:r.options.bind(r),trace:r.trace.bind(r),patch:r.patch.bind(r)};Object.hasOwn(l,a)&&l[a].call(r)}cors(){if(this.route.cors){d.debug("Validating CORS...");let{allow_origins:t,allow_credentials:e,allow_methods:n,allow_headers:o}=this.route.cors,i=this;if(typeof i.headers!="object"&&(i.headers={}),typeof i.route.responseHeaders!="object"&&(i.route.responseHeaders={}),typeof t<"u")if(d.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof i.request.headers.origin>"u"||[...t].indexOf(i.request.headers.origin)!==-1)d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{d.debug("CORS: Origin is not allowed: "+i.request.headers.origin),d.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(r){d.debug(`It was not possible to finish the call to the microservice: ${r}`)}}else d.debug("CORS: no allow_origins available. Allowing all origins..."),d.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof e<"u"?(d.debug(`CORS: allow_credentials present. Allowing ${e}...`),i.route.responseHeaders["Access-Control-Allow-Credentials"]=e.toString()):(d.debug("CORS: No allow_credentials present. Allowing all credentials."),i.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof n<"u"?(d.debug(`CORS: allow_methods present. Allowing ${n}...`),i.route.responseHeaders["Access-Control-Allow-Methods"]=[...n].join(",")):(d.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),i.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof o<"u"?(d.debug(`CORS: allow_headers present. Allowing ${o}...`),i.route.responseHeaders["Access-Control-Allow-Headers"]=[...o].join(",")):(d.debug("CORS: No allow_headers present. Allowing all headers..."),i.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else d.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(t){d.debug(`[BackendMicroservice.head] Data received: ${T(t)}`),this.done()}get(t){d.debug(`[BackendMicroservice.get] Data received: ${T(t)}`),this.done()}post(t){d.debug(`[BackendMicroservice.post] Data received: ${T(t)}`),this.done()}put(t){d.debug(`[BackendMicroservice.put] Data received: ${T(t)}`),this.done()}delete(t){d.debug(`[BackendMicroservice.delete] Data received: ${T(t)}`),this.done()}connect(t){d.debug(`[BackendMicroservice.connect] Data received: ${T(t)}`),this.done()}options(t){d.debug(`[BackendMicroservice.options] Data received: ${T(t)}`),this.done()}trace(t){d.debug(`[BackendMicroservice.trace] Data received: ${T(t)}`),this.done()}patch(t){d.debug(`[BackendMicroservice.patch] Data received: ${T(t)}`),this.done()}finishWithBody(t){try{d.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),d.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=T(this.body)),d.debug(`[BackendMicroservice.finishWithBody]
21
+ body: ${this.body} `),t?.write(this.body),t?.end(),d.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(e){d.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`)}}done(){d.debug("[BackendMicroservice.done] Finalizing the response...");let t=this,e=t.stream;try{if(d.debug("[BackendMicroservice.done] Sending response headers..."),t.route.responseHeaders)d.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(t.route.responseHeaders).join(",")}`),e.respond(t.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${n}`)}if(t.body!==null)try{d.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),t.finishWithBody.call(t,e)}catch(n){d.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${n}`)}else d.debug("[BackendMicroservice.done] No body present. Ending stream..."),e.end()}},c(Be,"BackendMicroservice"),p(Be,"BackendMicroservice"),Be);k("com.qcobjects.api",[mr]);es();vo();P();wn();_o();Oe();var fs=p(function(s,t){return qn(s,t)},"RegisterClass");Xn(fs);var Pe,br=(Pe=class{constructor({component:t,template:e}){this.template="",this.__definition={},this.component=t,this.template=e}assign(t){let e=this;if(typeof e.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof e.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");let n=e.component.processorHandler;n.component=e.component;let o=typeof e.template<"u"?e.template:"";typeof t=="object"?[...Object.keys(t)].map(i=>{let r=t[i];if(typeof r=="string"||typeof r=="number"||!isNaN(r))try{r=we.processObject.bind(n).call(n,r,e.component),o=o.replace(new RegExp(`{{${i}}}`,"g"),r)}catch(a){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${a.message}`)}return i}):d.debug(`${e.component?.name}.data is not an object`);try{o=we.processObject.call(n,o,e.component)}catch(i){throw d.warn(`${e.component?.name} could not parse processors.`),Error(`${e.component?.name} could not parse processors. Reason: ${i.message}`)}return o}},c(Pe,"DefaultTemplateHandler"),p(Pe,"DefaultTemplateHandler"),Pe.__definition={},Pe);fs(br,"com.qcobjects");Le();Se();to();ge();U();$();P();var Ue,_r=(Ue=class extends G{constructor(t){super(t),this.domain=yn,this.basePath=he,this.type="text/javascript",this.containerTag="body",this.url="",this.data={},this.async=!1,this.external=!1,this.status=!1,this.body=ee("script")}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}fail(){}rebuild(){let t=this;try{document.getElementsByTagName(t.containerTag)[0].appendChild((function(e,n,o){return e.type=o.type,e.src=n,e.crossOrigin=Object.hasOwn(o,"crossOrigin")?o.crossOrigin:"anonymous",e.async=o.async,e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=function(i){o.status=!0,o.done.call(o,i)},e.onerror=function(i){o.status=!1,o.fail.call(o,i)},o.body=e,e}).call(this,ee("script"),this.external?this.url:this.basePath+this.url,t))}catch(e){t.status=!1,d.debug(`An error ocurred: ${e}`),t.fail()}}Cast(t){return Ce(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(Ue,"SourceJS"),p(Ue,"SourceJS"),Ue);k("com.qcobjects",[_r]);Le();Se();to();ge();U();q();$();var We,yr=(We=class extends G{constructor(t){super(t),this.domain=yn,this.basePath=he,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return Ce(this,t)}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}rebuild(){let t=this;y&&window.document.getElementsByTagName("head")[0].appendChild((function(e,n,o){return e.type="text/css",e.rel="stylesheet",e.href=n,e.crossOrigin="anonymous",e.onreadystatechange=function(){this.readyState==="complete"&&o.done.call(o)},e.onload=o.done,o.body=e,e}).call(this,ee("link"),this.external?this.url:this.basePath+this.url,t))}},c(We,"SourceCSS"),p(We,"SourceCSS"),We);k("com.qcobjects",[yr]);ts();ge();ot();ke();q();var ze,ra=(ze=class{attachInternals(){throw new Error("Method not implemented.")}click(){throw new Error("Method not implemented.")}hidePopover(){throw new Error("Method not implemented.")}showPopover(){throw new Error("Method not implemented.")}togglePopover(t){throw new Error("Method not implemented.")}addEventListener(t,e,n){throw new Error("Method not implemented.")}removeEventListener(t,e,n){throw new Error("Method not implemented.")}attachShadow(t){throw new Error("Method not implemented.")}checkVisibility(t){throw new Error("Method not implemented.")}closest(t){throw new Error("Method not implemented.")}computedStyleMap(){throw new Error("Method not implemented.")}getAttribute(t){throw new Error("Method not implemented.")}getAttributeNS(t,e){throw new Error("Method not implemented.")}getAttributeNames(){throw new Error("Method not implemented.")}getAttributeNode(t){throw new Error("Method not implemented.")}getAttributeNodeNS(t,e){throw new Error("Method not implemented.")}getBoundingClientRect(){throw new Error("Method not implemented.")}getClientRects(){throw new Error("Method not implemented.")}getElementsByClassName(t){throw new Error("Method not implemented.")}getElementsByTagName(t){throw new Error("Method not implemented.")}getElementsByTagNameNS(t,e){throw new Error("Method not implemented.")}getHTML(t){throw new Error("Method not implemented.")}hasAttribute(t){throw new Error("Method not implemented.")}hasAttributeNS(t,e){throw new Error("Method not implemented.")}hasAttributes(){throw new Error("Method not implemented.")}hasPointerCapture(t){throw new Error("Method not implemented.")}insertAdjacentElement(t,e){throw new Error("Method not implemented.")}insertAdjacentHTML(t,e){throw new Error("Method not implemented.")}insertAdjacentText(t,e){throw new Error("Method not implemented.")}matches(t){throw new Error("Method not implemented.")}releasePointerCapture(t){throw new Error("Method not implemented.")}removeAttribute(t){throw new Error("Method not implemented.")}removeAttributeNS(t,e){throw new Error("Method not implemented.")}removeAttributeNode(t){throw new Error("Method not implemented.")}requestFullscreen(t){throw new Error("Method not implemented.")}requestPointerLock(t){throw new Error("Method not implemented.")}scroll(t,e){throw new Error("Method not implemented.")}scrollBy(t,e){throw new Error("Method not implemented.")}scrollIntoView(t){throw new Error("Method not implemented.")}scrollTo(t,e){throw new Error("Method not implemented.")}setAttribute(t,e){throw new Error("Method not implemented.")}setAttributeNS(t,e,n){throw new Error("Method not implemented.")}setAttributeNode(t){throw new Error("Method not implemented.")}setAttributeNodeNS(t){throw new Error("Method not implemented.")}setHTMLUnsafe(t){throw new Error("Method not implemented.")}setPointerCapture(t){throw new Error("Method not implemented.")}toggleAttribute(t,e){throw new Error("Method not implemented.")}webkitMatchesSelector(t){throw new Error("Method not implemented.")}appendChild(t){throw new Error("Method not implemented.")}cloneNode(t){throw new Error("Method not implemented.")}compareDocumentPosition(t){throw new Error("Method not implemented.")}contains(t){throw new Error("Method not implemented.")}getRootNode(t){throw new Error("Method not implemented.")}hasChildNodes(){throw new Error("Method not implemented.")}insertBefore(t,e){throw new Error("Method not implemented.")}isDefaultNamespace(t){throw new Error("Method not implemented.")}isEqualNode(t){throw new Error("Method not implemented.")}isSameNode(t){throw new Error("Method not implemented.")}lookupNamespaceURI(t){throw new Error("Method not implemented.")}lookupPrefix(t){throw new Error("Method not implemented.")}normalize(){throw new Error("Method not implemented.")}removeChild(t){throw new Error("Method not implemented.")}replaceChild(t,e){throw new Error("Method not implemented.")}dispatchEvent(t){throw new Error("Method not implemented.")}animate(t,e){throw new Error("Method not implemented.")}getAnimations(t){throw new Error("Method not implemented.")}after(...t){throw new Error("Method not implemented.")}before(...t){throw new Error("Method not implemented.")}remove(){throw new Error("Method not implemented.")}replaceWith(...t){throw new Error("Method not implemented.")}append(...t){throw new Error("Method not implemented.")}prepend(...t){throw new Error("Method not implemented.")}querySelector(t){throw new Error("Method not implemented.")}querySelectorAll(t){throw new Error("Method not implemented.")}replaceChildren(...t){throw new Error("Method not implemented.")}blur(){throw new Error("Method not implemented.")}focus(t){throw new Error("Method not implemented.")}},c(ze,"QCObjectsWidgetNode"),p(ze,"QCObjectsWidgetNode"),ze),Vn,Ve,Je;y?Vn=(Ve=class extends HTMLElement{constructor(){super();let t=this,e=t.nodeName.toLowerCase(),n=ee("quick-component"),o=t.getAttributeNames();n.setAttribute("name",e),t.hasAttribute("shadowed")||n.setAttribute("shadowed","true"),o.forEach(r=>{t.hasAttribute(r)&&(n.setAttribute(r,t?.getAttribute(r)),t.removeAttribute(r))}),t.getAttributeNames().filter(function(r){return r.startsWith("data-")}).map(function(r){return r.split("-")[1]}).forEach(function(r){n.setAttribute("data-"+r,t?.getAttribute("data-"+r)),t.removeAttribute("data-"+r)}),[...t.children].forEach(r=>{n.appendChild(r.cloneNode(!0)),r.remove()}),t.parentElement?(t.parentElement?.append(n),t.remove()):t.append(n)}},c(Ve,"_ComponentWidget_"),p(Ve,"_ComponentWidget_"),Ve):Vn=(Je=class extends ra{constructor(){throw super(),new Error("Class not implemented.")}},c(Je,"_ComponentWidget_"),p(Je,"_ComponentWidget_"),Je);S(Vn);var No=p(s=>{if(y)customElements.define(s,class extends Vn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),gs=p((...s)=>{[...s].filter(function(e){return typeof e=="string"}).map(function(e){return No(e)})},"RegisterWidgets");M(No);M(gs);S(No);S(gs);ce();me();fe();U();P();je();$();q();var Qe,wr=(Qe=class extends G{constructor({component:t,dependencies:e}){if(super({component:t,dependencies:e}),this.dependencies=[],this.component=t,this.dependencies=e,typeof this.component>"u"||this.component===null)throw Error(`${Z(this)} must be called with a component`)}fail(...t){throw new Error("Method not implemented.")}routingSelectedAttr(t){return this.component?.routingSelected.map(e=>e[t]).filter(function(e){return e}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,e){if(y)try{this.isTouchable()?(this.component?.componentRoot?.subelements(t))[0].addEventListener("touchstart",e,{passive:!0}):(this.component?.componentRoot?.subelements(t))[0].addEventListener("click",e,{passive:!0})}catch(n){d.debug(`An error ocurred: ${n}.`),d.debug("No button to assign press event")}}createRoutingController(){let t=this,e=t.component,n=t.routingSelectedAttr("controllerclass");if(typeof n<"u"){let o=D(n);typeof o<"u"&&e!==null&&(e.routingController=Q(o,{component:e}),typeof e.routingController<"u"&&Object.hasOwn(e.routingController,"done")&&typeof e.routingController.done=="function"&&e.routingController.done.call(e.routingController))}}done(){}},c(Qe,"Controller"),p(Qe,"Controller"),Qe);k("com.qcobjects.controllers",[wr]);fe();U();$();var Ze,vr=(Ze=class extends G{constructor({component:t=void 0,dependencies:e=[]}){if(super({component:t,dependencies:e}),typeof this.component>"u"||this.component==="null")throw Error(`${Z(this)} must be called with a component`)}},c(Ze,"View"),p(Ze,"View"),Ze);k("com.qcobjects.views",[vr]);tr();U();$();var Xe,Cr=(Xe=class extends G{},c(Xe,"VO"),p(Xe,"VO"),Xe);k("com.qcobjects.valueObjects",[Cr]);U();$();ke();me();var Me,ms=(Me=class extends G{constructor(){super(...arguments),this.duration=1e3}done(...t){throw new Error("Method not implemented.")}apply(...t){throw new Error("Method not implemented.")}static animate(t){Me.prototype.animate.call({},t)}animate({timing:t,draw:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function r(a){let l=(a-i)/n;l>1&&(l=1);let u=t(l);e(Math.round(u*100)),l<1?requestAnimationFrame(r):typeof o<"u"&&o!==null&&Object.hasOwn(o,"done")&&(typeof o.done).toLowerCase()==="function"&&o.done.call(o)},"animate"),"animate"))}},c(Me,"_Effect"),p(Me,"Effect"),Me);k("com.qcobjects.effects.base",[ms]);pe(D("Effect")).map(s=>(M(s),s));P();$();me();var Ke,Or=(Ke=class extends ms{constructor(){super(...arguments),this.duration=385,this.defaultParams={alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1},this.fitToHeight=!1,this.fitToWidth=!1}apply({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:r,scaleFrom:a,scaleTo:l}){let u=this;d.info("EXECUTING TransitionEffect ");let h=u.component.componentRoot,f=typeof h<"u"&&h!==null&&typeof h.getBoundingClientRect!="function"?h.host??h:h;typeof h<"u"&&h!==null&&(u.fitToHeight&&(f.height=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollHeight:f.getBoundingClientRect().height),u.fitToWidth&&(f.width=typeof f.offsetParent=="object"&&f.offsetParent!==null?f.offsetParent?.scrollWidth:f.getBoundingClientRect().width),u.component.shadowed?h.host.style.display="block":h.style.display="block",u.effects.map(g=>{let m=D(g);if(typeof m>"u")return d.debug(`Transition effect ${g} was not found`),g;let v=m.apply,b,O=u;if(typeof v=="function")b=v;else try{let ie=new m({});typeof ie.apply=="function"&&(b=ie.apply.bind(ie),O=ie)}catch(ie){d.debug(`Transition effect ${g} could not be instantiated: ${ie}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let A=u.component.shadowed?h.host:h,B={alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:o,radiusFrom:i,radiusTo:r,scaleFrom:a,scaleTo:l};return b.call(O,A,...Object.values(B)),g}))}},c(Ke,"TransitionEffect"),p(Ke,"TransitionEffect"),Ke);k("com.qcobjects.effects.transitions.base",[Or]);U();$();var Ye,Sr=(Ye=class extends G{constructor(){super(...arguments),this.duration=1e3,this.alive=!0}thread({timing:t,intervalInterceptor:e,duration:n}){let o=this,i=performance.now();requestAnimationFrame(p(c(function r(a){let l=a-i,u=l/n;u>1&&(u=1);let h=t(u,l);e(Math.round(h*100)),(u<1||n===-1)&&o.alive&&requestAnimationFrame(r)},"thread"),"thread"))}},c(Ye,"Timer"),p(Ye,"Timer"),Ye);k("com.qcobjects.timing",[Sr]);Ko();rs();cr();ot();U();P();Zn();var et,Er=(et=class extends G{constructor({instance:t,name:e,fget:n,fset:o,value:i}){super({instance:t,name:e,fget:n,fset:o,value:i}),this._new_({instance:t,name:e,fget:n,fset:o,value:i})}_new_({instance:t,name:r,fget:n,fset:o}){var r=typeof r>"u"?_n(this):r;Object.defineProperty(t,r,{set(a){let l=a;d.debug("value changed "+r);let u;typeof o<"u"&&typeof o=="function"?u=o(l):u=l,t["_"+r]=u},get(){let a=t["_"+r];d.debug("returning value "+r);let l=p(h=>typeof h=="object"&&Object.hasOwn(h,"value")?h.value:h,"is_ddo"),u;return typeof n<"u"&&typeof n=="function"?u=n(l(a)):u=l(a),u}})}},c(et,"DDO"),p(et,"DDO"),et);S(Er);U();P();$();var tt,xr=(tt=class extends G{constructor(t,e,n){super({positive:t,negative:e,args:n}),this._toggle=!1,this._inverse=!0,this._positive=null,this._negative=null,this._dispatched=null,this._args={},this._new_({positive:t,negative:e,args:n})}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:e,args:n}){this._positive=t,this._negative=e,this._args=n}fire(){let t=this;var e=new Promise(function(n,o){return typeof t._positive=="function"&&typeof t._negative=="function"?(t._inverse?t._dispatched=t._toggle?t._negative.bind(t):t._positive.bind(t):t._dispatched=t._toggle?t._positive.bind(t):t._negative.bind(t),t._dispatched?.call(t,t._args),n.call(e,t)):(d.debug("Toggle functions are not declared"),o.call(e,t)),t}).then(function(n){return n.changeToggle(),n}).catch(function(n){return d.debug(n.toString()),t}).finally(()=>t);return e}},c(tt,"Toggle"),p(tt,"Toggle"),tt);k("com.qcobjects.tools.essentials",[xr]);as();var ia=p(function(){let s=p((n,o)=>n>o?"landscape":null,"h"),t=p((n,o)=>o>n?"portrait":null,"v"),e=p((n,o)=>n===o?"square":null,"square");return[s(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight),e(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(n=>n!==null).pop()},"getDocumentLayout");ds();X();_o();X()});var As=ae((Ea,wi)=>{"use strict";var Po=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,ca=Object.getOwnPropertyNames,da=Object.prototype.hasOwnProperty,_=c((s,t)=>Po(s,"name",{value:t,configurable:!0}),"__name"),la=c((s,t)=>{for(var e in t)Po(s,e,{get:t[e],enumerable:!0})},"__export"),ua=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ca(t))!da.call(s,o)&&o!==e&&Po(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=aa(t,o))||n.enumerable});return s},"__copyProps"),pa=c(s=>ua(Po({},"__esModule",{value:!0}),s),"__toCommonJS"),Nr={};la(Nr,{BasicLayout:c(()=>_i,"BasicLayout"),ButtonField:c(()=>Gr,"ButtonField"),CanvasTool:c(()=>bi,"CanvasTool"),Contact:c(()=>Ir,"Contact"),CubeSplashScreenComponent:c(()=>ni,"CubeSplashScreenComponent"),DataGridController:c(()=>ai,"DataGridController"),EmailField:c(()=>Ur,"EmailField"),Fade:c(()=>Ne,"Fade"),FormController:c(()=>li,"FormController"),FormField:c(()=>on,"FormField"),FormValidations:c(()=>di,"FormValidations"),GenericController:c(()=>si,"GenericController"),GridComponent:c(()=>Jr,"GridComponent"),GridController:c(()=>ii,"GridController"),GridItemComponent:c(()=>Vr,"GridItemComponent"),GridView:c(()=>gi,"GridView"),InputField:c(()=>Hr,"InputField"),ListComponent:c(()=>Zr,"ListComponent"),ListController:c(()=>ri,"ListController"),ListItemComponent:c(()=>Qr,"ListItemComponent"),ModalComponent:c(()=>Es,"ModalComponent"),ModalController:c(()=>hi,"ModalController"),ModalEnclosureComponent:c(()=>Wr,"ModalEnclosureComponent"),ModalFade:c(()=>Io,"ModalFade"),ModalMoveDown:c(()=>Ss,"ModalMoveDown"),ModalMoveUp:c(()=>Os,"ModalMoveUp"),Move:c(()=>oe,"Move"),MoveXInFromLeft:c(()=>ws,"MoveXInFromLeft"),MoveXInFromRight:c(()=>ys,"MoveXInFromRight"),MoveYInFromBottom:c(()=>vs,"MoveYInFromBottom"),MoveYInFromTop:c(()=>Tr,"MoveYInFromTop"),NotificationComponent:c(()=>ei,"NotificationComponent"),Radius:c(()=>Lr,"Radius"),Resize:c(()=>Cs,"Resize"),Rotate:c(()=>kr,"Rotate"),RotateX:c(()=>Pr,"RotateX"),RotateY:c(()=>Mr,"RotateY"),RotateZ:c(()=>Rr,"RotateZ"),SessionData:c(()=>yi,"SessionData"),SessionUserToken:c(()=>To,"SessionUserToken"),ShadowedComponent:c(()=>Fr,"ShadowedComponent"),SlideItemComponent:c(()=>Kr,"SlideItemComponent"),SlideListComponent:c(()=>Xr,"SlideListComponent"),SliderComponent:c(()=>Yr,"SliderComponent"),SliderController:c(()=>ci,"SliderController"),SplashScreenComponent:c(()=>oo,"SplashScreenComponent"),SwaggerUIComponent:c(()=>zr,"SwaggerUIComponent"),SwaggerUIController:c(()=>ui,"SwaggerUIController"),TextField:c(()=>Br,"TextField"),VideoSplashScreenComponent:c(()=>ti,"VideoSplashScreenComponent"),WipeDown:c(()=>$r,"WipeDown"),WipeLeft:c(()=>jr,"WipeLeft"),WipeRight:c(()=>Dr,"WipeRight"),WipeUp:c(()=>qr,"WipeUp"),default:c(()=>fa,"default"),i18n_messages:c(()=>_s,"i18n_messages")});wi.exports=pa(Nr);var Ao=x(),_e=x(),st,_s=(st=class extends _e.InheritClass{constructor({messages:t=[]}){super({messages:t}),_e.CONFIG.get("use_i18n",!1)&&(_e.CONFIG.set("lang","en"),(0,_e.get)("i18n")?(0,_e.set)("i18n",{messages:(0,_e.get)("i18n").messages.concat(t)}):(0,_e.set)("i18n",{messages:t}))}_load_i18n_packages_(){return _e.CONFIG.get("i18n_languages",[]).map(t=>{(0,_e.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(st,"i18n_messages"),_(st,"i18n_messages"),st);(0,_e.Package)("org.qcobjects.i18n_messages",[_s]);new _s({})._load_i18n_packages_();var Ar=x(),rt,Ir=(rt=class extends Ar.VO{},c(rt,"Contact"),_(rt,"Contact"),rt);(0,Ar.Package)("org.qcobjects.models",[Ir]);var F=x(),xe=x(),it,Ne=(it=class extends xe.Effect{constructor(t){super(t),this.duration=1e3,this.duration=t?.duration}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){xe.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;xe.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){xe.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;xe.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}},c(it,"Fade"),_(it,"Fade"),it),at,oe=(at=class extends xe.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n,o,i){let r=o-e,a=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(l){return l},draw(l){xe.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*r/100;xe.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(at,"Move"),_(at,"Move"),at);(0,xe.Package)("org.qcobjects.effects.base",[Ne,oe]);var I=x(),ct,ys=(ct=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,t.width,0,0,0)}},c(ct,"MoveXInFromRight"),_(ct,"MoveXInFromRight"),ct),dt,ws=(dt=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,-t.width,0,0,0)}},c(dt,"MoveXInFromLeft"),_(dt,"MoveXInFromLeft"),dt),lt,vs=(lt=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,t.height,0,0)}},c(lt,"MoveYInFromBottom"),_(lt,"MoveYInFromBottom"),lt),ut,Tr=(ut=class extends oe{constructor(){super(...arguments),this.duration=1e3}static apply(t){oe.apply.call(this,t,0,-t.height,0,0)}},c(ut,"MoveYInFromTop"),_(ut,"MoveYInFromTop"),ut),pt,Pr=(pt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,0,0,"+r.toString()+"deg)"}})}},c(pt,"RotateX"),_(pt,"RotateX"),pt),ht,Mr=(ht=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}static apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,1,0,"+r.toString()+"deg)"}})}},c(ht,"RotateY"),_(ht,"RotateY"),ht),ft,Rr=(ft=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,0,1,"+r.toString()+"deg)"}})}},c(ft,"RotateZ"),_(ft,"RotateZ"),ft),gt,kr=(gt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,1,1,"+r.toString()+"deg)"}})}},c(gt,"Rotate"),_(gt,"Rotate"),gt),mt,Lr=(mt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("radius: "+r.toString()),t.style.borderRadius=r.toString()+"px"}})}},c(mt,"Radius"),_(mt,"Radius"),mt),bt,Cs=(bt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("resize: "+r.toString()),t.style.transformOrigin="center",t.style.transform="scale("+r+","+r+")"}})}},c(bt,"Resize"),_(bt,"Resize"),bt),_t,jr=(_t=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+r+")"}})}},c(_t,"WipeLeft"),_(_t,"WipeLeft"),_t),yt,Dr=(yt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+r+")"}})}},c(yt,"WipeRight"),_(yt,"WipeRight"),yt),wt,qr=(wt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+r+")"}})}},c(wt,"WipeUp"),_(wt,"WipeUp"),wt),vt,$r=(vt=class extends I.Effect{constructor(){super(...arguments),this.duration=1e3}apply(t,e,n){let o=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){I.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;I.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+r+")"}})}},c(vt,"WipeDown"),_(vt,"WipeDown"),vt);(0,I.Package)("org.qcobjects.effects.extended",[ys,ws,vs,Tr,Pr,Mr,Rr,kr,Lr,Cs,jr,Dr,qr,$r]);var ha=x(),Ct,Io=(Ct=class extends Ne{constructor(){super(...arguments),this.duration=500}},c(Ct,"ModalFade"),_(Ct,"ModalFade"),Ct),Ot,Os=(Ot=class extends oe{constructor(){super(...arguments),this.duration=800}},c(Ot,"ModalMoveUp"),_(Ot,"ModalMoveUp"),Ot),St,Ss=(St=class extends oe{constructor(){super(...arguments),this.duration=300}},c(St,"ModalMoveDown"),_(St,"ModalMoveDown"),St);(0,ha.Package)("org.qcobjects.modal.effects",[Io,Ss,Os]);var Ee=x(),Et,on=(Et=class extends Ee.Component{constructor(t){t.name=typeof t.name<"u"?t.name:"form-field",super(t),this.cached=!1,this.reload=!0}createBindingEvents(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e];n.addEventListener("change",()=>{Ee.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Ee.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Ee.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Ee.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Ee.logger.debug("Binding "+e+" for "+this.name),this.data[e]=t.value}executeBindings(){let t;typeof this.fieldType>"u"||this.fieldType==null?t=this.body.subelements("*[data-field]"):t=this.body.subelements(this.fieldType+"[data-field]");for(let e=0;e<t.length;e++){let n=t[e],o=n.getAttribute("data-field");Ee.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Ee.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(Et,"FormField"),_(Et,"FormField"),Et);(0,Ee.Package)("org.qcobjects.base.components",[on]);var xt,Fr=(xt=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.container=null,this.shadowed=!0,this.cached=!1,this.controller=null,this.view=null,this.data={}}},c(xt,"ShadowedComponent"),_(xt,"ShadowedComponent"),xt),Nt,Gr=(Nt=class extends on{constructor(t){t.fieldType="button",super(t)}},c(Nt,"ButtonField"),_(Nt,"ButtonField"),Nt),At,Hr=(At=class extends on{constructor(t){t.fieldType="input",super(t)}},c(At,"InputField"),_(At,"InputField"),At),It,Br=(It=class extends on{constructor(t){t.fieldType="textarea",super(t)}},c(It,"TextField"),_(It,"TextField"),It),Tt,Ur=(Tt=class extends on{constructor(t){t.fieldType="input",super(t)}},c(Tt,"EmailField"),_(Tt,"EmailField"),Tt),Pt,Wr=(Pt=class extends F.Component{constructor(t){t.body=(0,F._DOMCreateElement)("div"),super(t),this.name="modalenclosure",this.tplsource="inline",this.cached=!1,this.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),this.template=`
22
22
  <!-- The Modal -->
23
23
  <style>
24
24
  @import url('https://sdk.qcobjects.dev/css/modal.css');
@@ -208,7 +208,7 @@
208
208
  <p><strong>{{title}}</strong> {{message}}</p>
209
209
  </div>
210
210
  </div>
211
- `,this.kinds=["danger","success","info","warning"]}display(t){let e=_(function(n){n.style.display="block";let o=(0,z.New)(oe,{duration:900,apply(r){(0,z._super_)("Fade","apply").call(this,r,0,1),(0,z._super_)("Move","apply").call(this,r,0,-document.body.clientHeight,0,0)}}),i=(0,z.New)(oe,{duration:650,apply(r){(0,z._super_)("Fade","apply").call(this,r,1,0),(0,z._super_)("Move","apply").call(this,r,0,0,0,-document.body.clientHeight)}});o.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new Ne({duration:500}).apply(n,0,1)),t.subelements("div.notification").map(n=>e(n)),setTimeout(function(){t.remove()},2200)}static success(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static danger(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static info(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static warning(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}},c(de,"_NotificationComponent"),_(de,"NotificationComponent"),de);(0,z.Package)("org.quickcorp.components.notifications",[ei]);var ne=x(),Gt,oo=(Gt=class extends ne.Component{constructor(t){t.name=typeof t.name>"u"?"splashscreen":t.name;let e=typeof window<"u"&&typeof window.self<"u"&&window===window.self,n=location.hash===""&&location.pathname==="/"&&location.search===""||ne.CONFIG.get("routingWay","pathname")==="hash"&&ne.CONFIG.get("start_url","/")===location.hash||ne.CONFIG.get("routingWay","pathname")==="pathname"&&ne.CONFIG.get("start_url","/")===location.pathname||ne.CONFIG.get("routingWay","pathname")==="search"&&ne.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=ne.CONFIG.get("splashscreenBasePath",ne.CONFIG.get("remoteSDKPath","")),typeof t.data>"u"&&(t.data={}),t.data.basePath=t.basePath):typeof t<"u"&&typeof t.body<"u"&&(t.body.style.display="none"),super(t),this.cached=!1,this.shadowed=!0,this._bgcolor="",this._enabled_=o,this._enabled_){let r=this.body?.getAttribute("duration"),a=r==null?1e3:parseInt(r.toString());this._bgcolor=this.body?.style?.backgroundColor??"";let l=_(()=>{setTimeout(()=>{if(!l.executed){let u=this.shadowed?this.shadowRoot?.host:this.body;typeof ne.componentsStack<"u"&&ne.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{ne.logger.debug(`Splash Screen of Main Component: ${h.name}`),h.splashScreenComponent=this;let f=_(()=>{if(!f.executed){let g=h.splashScreenComponent,m=h.shadowed?h.shadowRoot?.host:h.body;h._mainPosition=m.style.position,typeof m<"u"&&(m.style.position="fixed"),h._mainOpacity=m.style.opacity,u.style.width="100%",u.style.height="100%",document.body.style.backgroundColor="#111111",m.style.opacity="0",setTimeout(function(){typeof u<"u"&&(document.body.style.backgroundColor=g?._bgcolor,u.subelements("#slot-logo").map(C=>(C.style.display="block",C.style.transformOrigin="center",new vs().apply(C,1,0))),new Ne().apply(u,1,0))},a-1e3),setTimeout(function(){new Ne().apply(m,0,1),m.style.position=h._mainPosition,document.body.style.backgroundColor=g._bgcolor,u.parentElement!==null&&u.parentElement.remove()},a)}f.executed=!0},"SplashScreenHandler");return h.addComponentHelper(f.bind(h))}),l.executed=!0}})},"_helper_");l.executed=!1,this.addComponentHelper(l.bind(t))}}},c(Gt,"SplashScreenComponent"),_(Gt,"SplashScreenComponent"),Gt);(0,ne.Package)("org.qcobjects.components.base",[oo]);var Ht,ti=(Ht=class extends oo{constructor(t){t.name="videosplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
211
+ `,this.kinds=["danger","success","info","warning"]}display(t){let e=_(function(n){n.style.display="block";let o=(0,z.New)(oe,{duration:900,apply(r){(0,z._super_)("Fade","apply").call(this,r,0,1),(0,z._super_)("Move","apply").call(this,r,0,-document.body.clientHeight,0,0)}}),i=(0,z.New)(oe,{duration:650,apply(r){(0,z._super_)("Fade","apply").call(this,r,1,0),(0,z._super_)("Move","apply").call(this,r,0,0,0,-document.body.clientHeight)}});o.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new Ne({duration:500}).apply(n,0,1)),t.subelements("div.notification").map(n=>e(n)),setTimeout(function(){t.remove()},2200)}static success(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static danger(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static info(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}static warning(t){let e=(0,z.New)(de,{name:"notification",shadowed:!0,body:(0,z._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${t}...`}});document.body.append(e);let n=e.shadowed?e.shadowRoot.host:e.body;e.display(n)}},c(de,"_NotificationComponent"),_(de,"NotificationComponent"),de);(0,z.Package)("org.quickcorp.components.notifications",[ei]);var ne=x(),Gt,oo=(Gt=class extends ne.Component{constructor(t){t.name=typeof t.name>"u"?"splashscreen":t.name;let e=typeof window<"u"&&typeof window.self<"u"&&window===window.self,n=location.hash===""&&location.pathname==="/"&&location.search===""||ne.CONFIG.get("routingWay","pathname")==="hash"&&ne.CONFIG.get("start_url","/")===location.hash||ne.CONFIG.get("routingWay","pathname")==="pathname"&&ne.CONFIG.get("start_url","/")===location.pathname||ne.CONFIG.get("routingWay","pathname")==="search"&&ne.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=ne.CONFIG.get("splashscreenBasePath",ne.CONFIG.get("remoteSDKPath","")),typeof t.data>"u"&&(t.data={}),t.data.basePath=t.basePath):typeof t<"u"&&typeof t.body<"u"&&(t.body.style.display="none"),super(t),this.cached=!1,this.shadowed=!0,this._bgcolor="",this._enabled_=o,this._enabled_){let r=this.body?.getAttribute("duration"),a=r==null?1e3:parseInt(r.toString());this._bgcolor=this.body?.style?.backgroundColor??"";let l=_(()=>{setTimeout(()=>{if(!l.executed){let u=this.shadowed?this.shadowRoot?.host:this.body;typeof ne.componentsStack<"u"&&ne.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{ne.logger.debug(`Splash Screen of Main Component: ${h.name}`),h.splashScreenComponent=this;let f=_(()=>{if(!f.executed){let g=h.splashScreenComponent,m=h.shadowed?h.shadowRoot?.host:h.body;h._mainPosition=m.style.position,typeof m<"u"&&(m.style.position="fixed"),h._mainOpacity=m.style.opacity,u.style.width="100%",u.style.height="100%",document.body.style.backgroundColor="#111111",m.style.opacity="0",setTimeout(function(){typeof u<"u"&&(document.body.style.backgroundColor=g?._bgcolor,u.subelements("#slot-logo").map(v=>(v.style.display="block",v.style.transformOrigin="center",new Cs().apply(v,1,0))),new Ne().apply(u,1,0))},a-1e3),setTimeout(function(){new Ne().apply(m,0,1),m.style.position=h._mainPosition,document.body.style.backgroundColor=g._bgcolor,u.parentElement!==null&&u.parentElement.remove()},a)}f.executed=!0},"SplashScreenHandler");return h.addComponentHelper(f.bind(h))}),l.executed=!0}})},"_helper_");l.executed=!1,this.addComponentHelper(l.bind(t))}}},c(Gt,"SplashScreenComponent"),_(Gt,"SplashScreenComponent"),Gt);(0,ne.Package)("org.qcobjects.components.base",[oo]);var Ht,ti=(Ht=class extends oo{constructor(t){t.name="videosplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
212
212
  <style>
213
213
  :host * {
214
214
  box-sizing: border-box;
@@ -683,9 +683,9 @@
683
683
  </div>
684
684
  </div>
685
685
 
686
- `}},c(Bt,"CubeSplashScreenComponent"),_(Bt,"CubeSplashScreenComponent"),Bt);(0,ne.Package)("org.qcobjects.components.splashscreen",[oo,ti,ni]);var oi=x(),Ut,si=(Ut=class extends oi.Controller{},c(Ut,"GenericController"),_(Ut,"GenericController"),Ut);(0,oi.Package)("org.qcobjects.controllers",[si]);var N=x(),Wt,ri=(Wt=class extends N.Controller{constructor({component:t,dependencies:e=[],valueField:n=void 0,labelField:o=void 0}){super({component:t,dependencies:e,valueField:n,labelField:o}),this.component=t,this._componentRoot=this.component.shadowed?this.component.shadowRoot:this.component.body,this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=1,N.logger.debug("ListController INIT")}getPageIndex(t,e,n){return t=t>0?t-1:0,[n*t/e,n*t/e+n/e]}addSubcomponents(){this.component.subcomponents=[];let t=this.component.body.getAttribute("layout"),e=N.CONFIG.get("listBasePath",N.CONFIG.get("remoteSDKPath","")),n="";this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),t==="horizontal"?n=`@import url("${e}css/components/horizontal-list.css");`:n=`@import url("${e}css/components/list.css");`,typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=`<style>${n}</style><ul></ul>`),N.logger.debug((0,N._DataStringify)(this.component.data));try{let o=this.component.body.getAttribute("subcomponentClass");if(o!=null){let i,r,a,l=[...this.component.data],u=this.component.body.getAttribute("paginate-in");u=u!==null?u:"client";let h;u==="client"?(h=this.component.body.getAttribute("page-number"),h=isNaN(h)||h===null?-1:h,h!==-1?(a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,i=this.getPageIndex(h,a,l.length)[0],r=this.getPageIndex(h,a,l.length)[1]):(i=0,r=l.length,a=1),l=l.slice(i,r)):(i=0,r=l.length,a=1),l.map((f,g)=>{try{let C=(0,N._DOMCreateElement)("li");f.label=f[this.labelField],f.value=f[this.valueField];let b=(0,N.New)((0,N.ClassFactory)(o),{name:"list-item",data:{label:f[this.labelField],value:f[this.valueField],__dataIndex:g,__page:h,__totalPages:a,__limit:r,__offset:i},templateURI:(0,N.ComponentURI)({COMPONENTS_BASE_PATH:N.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,N.ClassFactory)(o).name,TPLEXTENSION:N.CONFIG.get("tplextension",""),TPL_SOURCE:(0,N.ClassFactory)(o).tplsource}),body:C,template:(0,N.ClassFactory)(o).template});b.done=this.component.done.bind(b);try{if(b){b.data.__dataIndex=g,Object.hasOwnProperty.call(this.component.data,"length")&&(b.data.__dataLength=this.component.data.length),N.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(O=>O.append(b));try{this.component.subcomponents.push(b)}catch(O){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${O}`)}}else N.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(O){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${O}`)}}catch(C){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${C}`)}})}else N.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(o){N.logger.debug(`No data for component: ${o}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,N._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
686
+ `}},c(Bt,"CubeSplashScreenComponent"),_(Bt,"CubeSplashScreenComponent"),Bt);(0,ne.Package)("org.qcobjects.components.splashscreen",[oo,ti,ni]);var oi=x(),Ut,si=(Ut=class extends oi.Controller{},c(Ut,"GenericController"),_(Ut,"GenericController"),Ut);(0,oi.Package)("org.qcobjects.controllers",[si]);var N=x(),Wt,ri=(Wt=class extends N.Controller{constructor({component:t,dependencies:e=[],valueField:n=void 0,labelField:o=void 0}){super({component:t,dependencies:e,valueField:n,labelField:o}),this.component=t,this._componentRoot=this.component.shadowed?this.component.shadowRoot:this.component.body,this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=1,N.logger.debug("ListController INIT")}getPageIndex(t,e,n){return t=t>0?t-1:0,[n*t/e,n*t/e+n/e]}addSubcomponents(){this.component.subcomponents=[];let t=this.component.body.getAttribute("layout"),e=N.CONFIG.get("listBasePath",N.CONFIG.get("remoteSDKPath","")),n="";this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),t==="horizontal"?n=`@import url("${e}css/components/horizontal-list.css");`:n=`@import url("${e}css/components/list.css");`,typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=`<style>${n}</style><ul></ul>`),N.logger.debug((0,N._DataStringify)(this.component.data));try{let o=this.component.body.getAttribute("subcomponentClass");if(o!=null){let i,r,a,l=[...this.component.data],u=this.component.body.getAttribute("paginate-in");u=u!==null?u:"client";let h;u==="client"?(h=this.component.body.getAttribute("page-number"),h=isNaN(h)||h===null?-1:h,h!==-1?(a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,i=this.getPageIndex(h,a,l.length)[0],r=this.getPageIndex(h,a,l.length)[1]):(i=0,r=l.length,a=1),l=l.slice(i,r)):(i=0,r=l.length,a=1),l.map((f,g)=>{try{let v=(0,N._DOMCreateElement)("li");f.label=f[this.labelField],f.value=f[this.valueField];let b=(0,N.New)((0,N.ClassFactory)(o),{name:"list-item",data:{label:f[this.labelField],value:f[this.valueField],__dataIndex:g,__page:h,__totalPages:a,__limit:r,__offset:i},templateURI:(0,N.ComponentURI)({COMPONENTS_BASE_PATH:N.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,N.ClassFactory)(o).name,TPLEXTENSION:N.CONFIG.get("tplextension",""),TPL_SOURCE:(0,N.ClassFactory)(o).tplsource}),body:v,template:(0,N.ClassFactory)(o).template});b.done=this.component.done.bind(b);try{if(b){b.data.__dataIndex=g,Object.hasOwnProperty.call(this.component.data,"length")&&(b.data.__dataLength=this.component.data.length),N.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(O=>O.append(b));try{this.component.subcomponents.push(b)}catch(O){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${O}`)}}else N.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(O){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${O}`)}}catch(v){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${v}`)}})}else N.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(o){N.logger.debug(`No data for component: ${o}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,N._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
687
687
  display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(r)}}done(){this.cssGrid();let t=this.component;N.logger.debug("ListController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,o,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let r=t.body.getAttribute("page-number");r=isNaN(r)||r===null?-1:r;let a;if(r!==-1){let l=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,n=this.getPageIndex(r,a,l)[0],o=this.getPageIndex(r,a,l)[1],t.serviceData=typeof t.serviceData<"u"?t.serviceData:{},t.serviceData.params=typeof t.serviceData.params<"u"?t.serviceData.params:{},t.serviceData.params.offset=n,t.serviceData.params.limit=o}}(0,N.serviceLoader)((0,N.New)((0,N.ClassFactory)(e),{data:t.serviceData}),!1).then(r=>{N.logger.debug("DONE SERVICE COMPONENT"),r.service.JSONresponse=JSON.parse(r.service.template),typeof r.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(r.service.JSONresponse.result)),t.data=r.service.JSONresponse.result):t.data=r.service.JSONresponse,this.addSubcomponents()},r=>{N.logger.debug(r)}).catch(r=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(r.message)})}}},c(Wt,"ListController"),_(Wt,"ListController"),Wt);(0,N.Package)("org.qcobjects.controllers.list",[ri]);var E=x(),zt,ii=(zt=class extends E.Controller{constructor(t){super(t),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=this.component.body.getAttribute("cols"),this.cols=this.cols!==null?this.cols:this.component.cols}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,E._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
688
- display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(r):e.classList.add(r)}}done(){this.cssGrid(),E.logger.debug("GridComponent built")}},c(zt,"GridController"),_(zt,"GridController"),zt),Vt,ai=(Vt=class extends E.Controller{constructor(t){super(t),this._componentRoot=t.component.shadowed?t.component.shadowRoot:t.component.body,this.rows=t.component.body.getAttribute("rows"),this.rows=t.rows!==null?t.rows:t.component.rows,this.cols=t.component.body.getAttribute("cols"),this.cols=t.cols!==null?t.cols:t.component.cols,E.logger.debug("DataGridController INIT")}getPageIndex(t,e,n){return t=t>0?t-1:0,[n*t/e,n*t/e+n/e]}addSubcomponents(){this.component.subcomponents=[],typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=""),this.cssGrid(),E.logger.debug((0,E._DataStringify)(this.component.data));try{let t=this.component.body.getAttribute("subcomponentClass");if(t!=null){let e,n,o,i=[...this.component.data],r=this.component.body.getAttribute("paginate-in"),a;r=r!==null?r:"client",r==="client"?(a=this.component.body.getAttribute("page-number"),a=isNaN(a)||a===null?-1:a,a!==-1?(o=this.component.body.getAttribute("total-pages"),o=isNaN(o)?1:o,e=this.getPageIndex(a,o,i.length)[0],n=this.getPageIndex(a,o,i.length)[1]):(e=0,n=i.length,o=1),i=i.slice(e,n)):(e=0,n=i.length,o=1),i.map((l,u,h)=>{try{let g=(0,E._DOMCreateElement)("component");g.setAttribute("name",(0,E.ClassFactory)(t).name),g.setAttribute("shadowed",(0,E.ClassFactory)(t).shadowed),g.setAttribute("cached",(0,E.ClassFactory)(t).cached),l=Object.assign(l,{__dataIndex:u,__dataLength:h.length,__page:a,__totalPages:o,__limit:n,__offset:e});let m=(0,E.New)((0,E.ClassFactory)(t),{name:"item",data:l,templateURI:(0,E.ComponentURI)({COMPONENTS_BASE_PATH:E.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,E.ClassFactory)(t).name,TPLEXTENSION:E.CONFIG.get("tplextension",""),TPL_SOURCE:(0,E.ClassFactory)(t).tplsource}),body:g,template:(0,E.ClassFactory)(t).template});m.done=this.component.done.bind(m);try{if(m){m.data.__dataIndex=u,Object.hasOwnProperty.call(this.component.data,"length")&&(m.data.__dataLength=this.component.data.length),E.logger.debug("adding subcomponent to body"),this._componentRoot?.append(m.body);try{this.component.subcomponents.push(m)}catch(C){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${C}`)}}else E.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(C){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${C}`)}}catch(g){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${g}`)}})}else E.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(t){E.logger.debug(`No data for component: ${t}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,E._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
688
+ display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(r):e.classList.add(r)}}done(){this.cssGrid(),E.logger.debug("GridComponent built")}},c(zt,"GridController"),_(zt,"GridController"),zt),Vt,ai=(Vt=class extends E.Controller{constructor(t){super(t),this._componentRoot=t.component.shadowed?t.component.shadowRoot:t.component.body,this.rows=t.component.body.getAttribute("rows"),this.rows=t.rows!==null?t.rows:t.component.rows,this.cols=t.component.body.getAttribute("cols"),this.cols=t.cols!==null?t.cols:t.component.cols,E.logger.debug("DataGridController INIT")}getPageIndex(t,e,n){return t=t>0?t-1:0,[n*t/e,n*t/e+n/e]}addSubcomponents(){this.component.subcomponents=[],typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=""),this.cssGrid(),E.logger.debug((0,E._DataStringify)(this.component.data));try{let t=this.component.body.getAttribute("subcomponentClass");if(t!=null){let e,n,o,i=[...this.component.data],r=this.component.body.getAttribute("paginate-in"),a;r=r!==null?r:"client",r==="client"?(a=this.component.body.getAttribute("page-number"),a=isNaN(a)||a===null?-1:a,a!==-1?(o=this.component.body.getAttribute("total-pages"),o=isNaN(o)?1:o,e=this.getPageIndex(a,o,i.length)[0],n=this.getPageIndex(a,o,i.length)[1]):(e=0,n=i.length,o=1),i=i.slice(e,n)):(e=0,n=i.length,o=1),i.map((l,u,h)=>{try{let g=(0,E._DOMCreateElement)("component");g.setAttribute("name",(0,E.ClassFactory)(t).name),g.setAttribute("shadowed",(0,E.ClassFactory)(t).shadowed),g.setAttribute("cached",(0,E.ClassFactory)(t).cached),l=Object.assign(l,{__dataIndex:u,__dataLength:h.length,__page:a,__totalPages:o,__limit:n,__offset:e});let m=(0,E.New)((0,E.ClassFactory)(t),{name:"item",data:l,templateURI:(0,E.ComponentURI)({COMPONENTS_BASE_PATH:E.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,E.ClassFactory)(t).name,TPLEXTENSION:E.CONFIG.get("tplextension",""),TPL_SOURCE:(0,E.ClassFactory)(t).tplsource}),body:g,template:(0,E.ClassFactory)(t).template});m.done=this.component.done.bind(m);try{if(m){m.data.__dataIndex=u,Object.hasOwnProperty.call(this.component.data,"length")&&(m.data.__dataLength=this.component.data.length),E.logger.debug("adding subcomponent to body"),this._componentRoot?.append(m.body);try{this.component.subcomponents.push(m)}catch(v){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${v}`)}}else E.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(v){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${v}`)}}catch(g){E.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${g}`)}})}else E.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(t){E.logger.debug(`No data for component: ${t}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,E._DOMCreateElement)("style"),o="auto ".repeat(this.rows),i="auto ".repeat(this.cols),r="grid"+this.__instanceID.toString();n.innerHTML=`.${r}{
689
689
  display: grid; grid-template-rows: ${o}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(r)):(e?.append(n),e.classList.add(r))}}done(){let t=this.component;E.logger.debug("DataGridController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,o,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let r=t.body.getAttribute("page-number");r=isNaN(r)||r===null?-1:r;let a;if(r!==-1){let l=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,n=this.getPageIndex(r,a,l)[0],o=this.getPageIndex(r,a,l)[1],t.serviceData=typeof t.serviceData<"u"?t.serviceData:{},t.serviceData.params=typeof t.serviceData.params<"u"?t.serviceData.params:{},t.serviceData.params.offset=n,t.serviceData.params.limit=o}}(0,E.serviceLoader)((0,E.New)((0,E.ClassFactory)(e),{data:t.serviceData}),!1).then(r=>{E.logger.debug("DONE SERVICE COMPONENT"),r.service.JSONresponse=JSON.parse(r.service.template),typeof r.service.JSONresponse.result<"u"?(E.logger.debug((0,E._DataStringify)(r.service.JSONresponse.result)),t.data=r.service.JSONresponse.result):t.data=r.service.JSONresponse,this.addSubcomponents()},r=>{E.logger.debug(r)}).catch(r=>{E.logger.debug("Something went wrong when calling the service from: "+e),E.logger.debug(r.message)})}}},c(Vt,"DataGridController"),_(Vt,"DataGridController"),Vt);(0,E.Package)("org.qcobjects.controllers.grid",[ii,ai]);var De=x(),Jt,ci=(Jt=class extends De.Controller{constructor({component:t,dependencies:e=[],duration:n=7100,slideIndex:o=0,interval:i=null,sliderHandlerName:r=null}){super({component:t,dependencies:e,duration:n,slideIndex:o,interval:i,sliderHandlerName:r}),this.slideIndex=0,this.duration=7100,this.interval=null,this.sliderHandlerName="",this.component=t,this._componentRoot=t.shadowed?t.shadowRoot:t.body,this.sliderHandlerName="slider_"+this.component.__instanceID.toString()}stop(){this.interval!=null&&clearInterval(this.interval)}plusSlidesAndStop(t){this.stop(),this.plusSlides(t)}plusSlides(t){this.showSlides(this.slideIndex+=t)}currentSlide(t){this.stop(),this.showSlides(this.slideIndex=t)}automate(){this.interval=setInterval(()=>{this.plusSlides(1)},this.duration)}showSlides(t){let e=this._componentRoot?.subelements(".qcoSlides"),n=this._componentRoot?.subelements(".qcoSlider__dots--dot");t>e.length-1&&(this.slideIndex=0),t<0&&(this.slideIndex=0),e.filter((o,i)=>i!==this.slideIndex).map(o=>(0,De.New)((0,De.ClassFactory)("Fade"),{}).apply(o,1,0)),n.filter((o,i)=>i!==this.slideIndex).map(o=>o.classList.remove("active"));try{n[this.slideIndex].classList.add("active")}catch(o){De.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${o.message}`)}setTimeout(()=>{e.filter((o,i)=>i!==this.slideIndex).map(o=>(o.style.display="none",o.style.display));try{e[this.slideIndex].style.display="block",(0,De.New)((0,De.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(o){De.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${o.message}`)}},700)}fillDots(){(this._componentRoot?.subelements(".qcoSlides")).map((e,n)=>{let o=document.createElement("span");return o.className="qcoSlider__dots--dot",o.addEventListener("click",()=>this.currentSlide(n)),this._componentRoot?.subelements(".qcoSlider__dots")[0].append(o)})}bindControls(){let t=this._componentRoot?.subelements(".prev"),e=this._componentRoot?.subelements(".next");t?.map(n=>n.addEventListener("click",()=>this.plusSlidesAndStop(-1))),e?.map(n=>n.addEventListener("click",()=>this.plusSlidesAndStop(1)))}done(){(this._componentRoot?.subelements(".qcoSlides")).filter((e,n)=>n!==this.slideIndex).map(e=>(e.style.display="none",e.style.display)),setTimeout(()=>{this.fillDots(),this.bindControls(),this.slideIndex=0,this.showSlides(this.slideIndex),this.automate()},3e3)}},c(Jt,"SliderController"),_(Jt,"SliderController"),Jt);(0,De.Package)("org.qcobjects.controllers.slider",[ci]);var V=x(),Qt,di=(Qt=class extends V.Controller{getDefault(){return function(t,e,n){let o={name:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$",email:"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$"},i=n.getAttribute("pattern")||o[t];return new RegExp(i).test(e)}}},c(Qt,"FormValidations"),_(Qt,"FormValidations"),Qt),Zt,li=(Zt=class extends V.Controller{constructor(t){super(t),this.validations=[],this.serviceClass="",this.formSettings={backRouting:"#",loadingRouting:"#loading",nextRouting:"#signupsuccessful"},this.component=t.component,this.component=this.component.Cast(on)}hasValidation(t){let e=t.getAttribute("data-field"),n=!1;return typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,e)&&(n=!0),n}isInvalid(t){let e=!1,n=t.getAttribute("data-field"),o=this.component.data[n],i=_((r,a,l)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,r)&&this.validations[r].call(null,r,a,l),"_execValidation");return typeof this.validations<"u"&&!i(n,o,t)&&(e=!0),e}isValid(t){return!this.isInvalid(t)}save(){this.serviceClass!==""?(location.href=this.formSettings.loadingRouting,(0,V.serviceLoader)((0,V.New)((0,V.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(()=>{V.logger.info("DONE SERVICE COMPONENT"),location.href=this.formSettings.nextRouting},t=>{V.logger.debug(t),location.href=this.formSettings.backRouting})):V.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){V.logger.debug("Saving data...");let t=this.component.shadowed?(this.component?.shadowRoot).host:this.component.body;if(this.component.executeBindings(),this.formValidatorModal!=null){let n=t.subelements("*[data-field]").filter(a=>this.hasValidation(a)),o=_(function(a,l){return _((h,f)=>f.getAttribute("aria-labelledby")!==null?(f.getAttribute("aria-labelledby")||"").split(" ").map(g=>h.subelements(`#${g}`).map(m=>m.innerHTML)).join(" "):null,"_arialabelledby")(a,l)||l.getAttribute("aria-label")||l.getAttribute("placeholder")||l.getAttribute("name")||l.getAttribute("data-field")},"_labelledby"),i=_(function(a){return a.getAttribute("title")||a.getAttribute("aria-title")||""},"_ariatitle"),r=n.filter(a=>this.isInvalid(a));if(r.length>0){let a=`
690
690
  <details>
691
691
  <summary>Please verify the following incorrect fields:</summary>
@@ -695,7 +695,7 @@
695
695
  </div>
696
696
  </ul>
697
697
  </details>
698
- `;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=a,this.formValidatorModal.modal()}else this.save()}else V.logger.debug("Unable to find the modal validator..."),V.logger.debug("Saving data..."),this.save()}done(){V.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,V._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,V.New)(Es,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,V.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){V.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},c(Zt,"FormController"),_(Zt,"FormController"),Zt);(0,V.Package)("org.qcobjects.controllers.form",[li,di]);var te=x(),Xt,ui=(Xt=class extends te.Controller{startSwaggerUI(){if(typeof SwaggerUIBundle<"u"){let t=SwaggerUIBundle({url:te.CONFIG.get("swagger-ui-url","https://petstore.swagger.io/v2/swagger.json"),dom_id:"#"+te.CONFIG.get("swagger-ui-dom_id","swagger-ui"),deepLinking:!0,presets:[SwaggerUIBundle.presets.apis,SwaggerUIStandalonePreset],plugins:[SwaggerUIBundle.plugins.DownloadUrl],layout:"StandaloneLayout"});window.ui=t}}done(){this.component.body.innerHTML='<div id="'+te.CONFIG.get("swagger-ui-dom_id","swagger-ui")+'"></div>';let t=te.CONFIG.get("swagger-ui-package-path","node_modules/swagger-ui-dist/");this.dependencies?.push((0,te.New)(te.SourceJS,{url:t+"swagger-ui-standalone-preset.js",external:te.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,te.New)(te.SourceCSS,{url:t+"swagger-ui.css",external:te.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,te.New)(te.SourceJS,{url:t+"swagger-ui-bundle.js",external:te.CONFIG.get("swagger-ui-external",!1),done:_(()=>{this.startSwaggerUI()},"done")}))}},c(Xt,"SwaggerUIController"),_(Xt,"SwaggerUIController"),Xt);(0,te.Package)("org.qcobjects.controllers.swagger",[ui]);var pi=x(),Kt,hi=(Kt=class extends pi.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(Kt,"ModalController"),_(Kt,"ModalController"),Kt);(0,pi.Package)("org.qcobjects.modal.controllers",[hi]);var fi=x(),Yt,gi=(Yt=class extends fi.View{},c(Yt,"GridView"),_(Yt,"GridView"),Yt);(0,fi.Package)("org.qcobjects.views",[gi]);var mi=x(),en,bi=(en=class extends mi.InheritClass{drawImageFilled(t,e,n=1,o=0,i=0){let r=Math.max(e.width/t.width,e.height/t.height);r=r*n;let a=e.width/2-t.width/2*r,l=e.height/2-t.height/2*r;e.getContext("2d")?.drawImage(t,o+a,i+l,t.width*r,t.height*r)}getImageResized(t,e,n,o,i=1,r=0,a=0){let l=document.createElement("canvas");return l.width=e,l.height=n,l.style.width=e.toString(),l.style.height=n.toString(),this.drawImageFilled(t,l,i,r,a),o.src=l.toDataURL("image/png"),l}},c(en,"CanvasTool"),_(en,"CanvasTool"),en);(0,mi.Package)("org.qcobjects.tools.canvas",[bi]);var L=x(),tn,_i=(tn=class extends L.InheritClass{constructor({component:t=null,dependencies:e=[]}){super({component:t,dependencies:e}),this.dependencies=[]}load(){this.dependencies.push((0,L.New)(L.SourceCSS,{external:!L.CONFIG.get("useLocalSDK",!1),url:L.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":L.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,L.Tag)("nav").map(t=>{t.style.border="20px solid #3333"}),(0,L.Tag)("nav").map(t=>{t.style.backgroundColor="#129999"}),(0,L.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,L.Tag)("component>div").map(t=>{t.style.border="3px dashed #fff"}),(0,L.Tag)("component>section").map(t=>{t.style.border="3px solid #000"}),(0,L.Tag)("component>section").map(t=>{t.style.backgroundColor="#fffaaa"}),(0,L.Tag)("component>article").map(t=>{t.style.border="3px dotted #000"}),(0,L.Tag)("component>header").map(t=>{t.style.background="#789"}),(0,L.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,L.Tag)("component>article:nth-child(1)").map(t=>{t.style.border="1px solid #444"}),(0,L.Tag)("component>article:nth-child(1)").map(t=>{t.style.backgroundColor="#555aaa"}),(0,L.Tag)("component>article:nth-child(2)").map(t=>{t.style.backgroundColor="#aaa333"}),(0,L.Tag)("component>article:nth-child(3)").map(t=>{t.style.backgroundColor="#54da82"}),(0,L.Tag)("*").map(t=>{t.style.color="#fff"}),(0,L.Tag)("component>article").map(t=>Ne.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>Ne.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>Ne.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),ws.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),Cs.apply(t)}),(0,L.Tag)("component>article:nth-child(2)").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),ys.apply(t)})},300)}},c(tn,"BasicLayout"),_(tn,"BasicLayout"),tn);(0,L.Package)("org.qcobjects.tools.layouts",[_i]);var K=x(),H,To=(H=class extends K.InheritClass{constructor(t){super(t);let e=this;this.__cache__=new K.ComplexStorageCache({index:e.__instanceID.toString(),load(){let n;return typeof navigator<"u"&&typeof origin<"u"?n=K._Crypt.encrypt(`${navigator.userAgent}|${t.username}|${(+new Date).toString()}`,origin):n=K._Crypt.encrypt(`${t.username}|${(+new Date).toString()}`,K.CONFIG.get("domain","localhost")),H.user={priority:e.__instanceID.toString(),token:n},H.user},alternate(n){H.user=n?.cache.getCached(e.__instanceID.toString())}})}static generateIndex(t){return typeof Buffer<"u"?Buffer.from(t,"ascii").toString("base64"):btoa(t)}static getGlobalUser(...t){let e=[t].join("|"),n="userToken_"+H.generateIndex(e);return(typeof(0,K.get)(n)>"u"||(0,K.get)(n)===null)&&(0,K.set)(n,(0,K.New)(H,{username:e})),H.user=(0,K.get)(n).user,(0,K.get)(n).user}static getGlobalUserToken(...t){return H.getGlobalUser(t).token}static getGlobalUserId(...t){return H.getGlobalUser(t).id}static getGlobalUserPriority(...t){return H.getGlobalUser(t).priority}static getLoginCredentialsToken(t,e){return K._Crypt.encrypt(`${t}${e}`,H.getGlobalUserToken(t))}static closeGlobalSession(...t){H.getGlobalUser(t);let e=[t].join("|"),n="userToken_"+H.generateIndex(e);typeof(0,K.get)(n)<"u"&&((0,K.get)(n).__cache__.clear(),(0,K.set)(n,null),H.user={})}},c(H,"_SessionUserToken"),_(H,"SessionUserToken"),H.user={},H);(0,K.Package)("org.qcobjects.cloud.auth.session.usertoken",[To]);var bs=x(),nn,yi=(nn=class extends bs.InheritClass{constructor(){super(...arguments),this.__session_container__=null}setSessionContainer(){this.__session_container__=[...arguments]}getSessionContainer(){if(typeof this.__session_container__>"u"||this.__session_container__===null)throw new Error("You need to set a session container first: sessionData.setSessionContainer(...arguments)");return this.__session_container__}getSessionData(...t){let e=sessionStorage.getItem(`${this.index(t)}`),n;return e!==null&&(n=JSON.parse(e)),(typeof n>"u"||n===null)&&(n={}),n}index(...t){if(typeof To>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(To.getGlobalUserToken(t))}`}save(...t){let e=(0,bs._DataStringify)(this.sessionData);sessionStorage.setItem(`${this.index(t)}`,e)}get(t,e){let n=this.getSessionData(this.getSessionContainer());return typeof n[t]<"u"?n[t]:e}set(t,e){let n=this.getSessionContainer(),o=this.getSessionData(n);this.sessionData=o,this.sessionData[t]=e,this.save(n)}},c(nn,"SessionData"),_(nn,"SessionData"),nn);(0,bs.Package)("org.qcobjects.cloud.auth.session.data",[yi]);_(c((function s(t){"use strict";if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:s})}catch{typeof t.__qcobjects_sdk__<"u"&&(t.__qcobjects_sdk__.__loaded__=!0)}if(typeof t.__qcobjects_sdk__.__loaded__>"u"){if(t.__qcobjects_sdk__.__loaded__=!0,typeof t>"u")throw Error("Top context empty: It should either global, module or window");let e=Ao.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{Ao.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(Ao._top);var fa=Ao._top});var vi=ae(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});var se=x(),ga=As(),Cn;(0,se.Package)("com.qcobjects.installer",[(Cn=class extends se.InheritClass{constructor(t){super(),this.root=t,window.addEventListener("beforeinstallprompt",()=>this.beforeinstallprompt.bind(this),!1),window.addEventListener("appinstalled",()=>this.installed.bind(this),!1),t.addEventListener("click",()=>this.install.bind(this)),t.addEventListener("touchend",()=>this.install.bind(this)),window.matchMedia("(display-mode: standalone)").addEventListener("change",e=>{let n="browser";e.matches&&(n="standalone"),ga.NotificationComponent.success(`TWA in ${n} Mode`)}),(0,se.set)("installer",this)}beforeinstallprompt(t){return se.logger.debug("registering installer event"),t.preventDefault(),(0,se.set)("promptEvent",t),this.root.classList.add("available"),!1}installed(){se.logger.debug("app is already installed"),(0,se.set)("promptEvent",null),this.root.classList.remove("available")}install(){let t=this.root;se.logger.debug("installer actioned");let e=(0,se.get)("promptEvent",null);e?(se.logger.debug("prompt event"),e.prompt(),e.userChoice.then(function(n){n.outcome==="accepted"?t.classList.remove("available"):se.logger.debug("User has chosen not to install the PWA"),e=null}).catch(function(n){e=null,t.classList.remove("available"),se.logger.warn(`Error during install: ${n.toString()}`)})):se.logger.debug("It is not possible to get the prompt event for install ")}},c(Cn,"Installer"),Cn)])});var Si=ae(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});var Ro=x(),vn,On,Sn;(0,Ro.Package)("org.quickcorp.custom.effects",[(vn=class extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}},c(vn,"MainTransitionEffect"),vn),(On=class extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}},c(On,"SlideLeftTransitionEffect"),On),(Sn=class extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}},c(Sn,"SlideRightTransitionEffect"),Sn)])});var Ni=ae(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});var Ei=x(),En;(0,Ei.Package)("org.quickcorp.custom.models",[(En=class extends Ei.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}},c(En,"ContactVO"),En)])});var Ii=ae(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var ye=x(),Rs=class Rs extends ye.Component{constructor(){super(...arguments),this.name="github-grid",this.tplsource="inline",this.template=`
698
+ `;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=a,this.formValidatorModal.modal()}else this.save()}else V.logger.debug("Unable to find the modal validator..."),V.logger.debug("Saving data..."),this.save()}done(){V.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,V._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,V.New)(Es,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,V.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){V.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},c(Zt,"FormController"),_(Zt,"FormController"),Zt);(0,V.Package)("org.qcobjects.controllers.form",[li,di]);var te=x(),Xt,ui=(Xt=class extends te.Controller{startSwaggerUI(){if(typeof SwaggerUIBundle<"u"){let t=SwaggerUIBundle({url:te.CONFIG.get("swagger-ui-url","https://petstore.swagger.io/v2/swagger.json"),dom_id:"#"+te.CONFIG.get("swagger-ui-dom_id","swagger-ui"),deepLinking:!0,presets:[SwaggerUIBundle.presets.apis,SwaggerUIStandalonePreset],plugins:[SwaggerUIBundle.plugins.DownloadUrl],layout:"StandaloneLayout"});window.ui=t}}done(){this.component.body.innerHTML='<div id="'+te.CONFIG.get("swagger-ui-dom_id","swagger-ui")+'"></div>';let t=te.CONFIG.get("swagger-ui-package-path","node_modules/swagger-ui-dist/");this.dependencies?.push((0,te.New)(te.SourceJS,{url:t+"swagger-ui-standalone-preset.js",external:te.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,te.New)(te.SourceCSS,{url:t+"swagger-ui.css",external:te.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,te.New)(te.SourceJS,{url:t+"swagger-ui-bundle.js",external:te.CONFIG.get("swagger-ui-external",!1),done:_(()=>{this.startSwaggerUI()},"done")}))}},c(Xt,"SwaggerUIController"),_(Xt,"SwaggerUIController"),Xt);(0,te.Package)("org.qcobjects.controllers.swagger",[ui]);var pi=x(),Kt,hi=(Kt=class extends pi.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(Kt,"ModalController"),_(Kt,"ModalController"),Kt);(0,pi.Package)("org.qcobjects.modal.controllers",[hi]);var fi=x(),Yt,gi=(Yt=class extends fi.View{},c(Yt,"GridView"),_(Yt,"GridView"),Yt);(0,fi.Package)("org.qcobjects.views",[gi]);var mi=x(),en,bi=(en=class extends mi.InheritClass{drawImageFilled(t,e,n=1,o=0,i=0){let r=Math.max(e.width/t.width,e.height/t.height);r=r*n;let a=e.width/2-t.width/2*r,l=e.height/2-t.height/2*r;e.getContext("2d")?.drawImage(t,o+a,i+l,t.width*r,t.height*r)}getImageResized(t,e,n,o,i=1,r=0,a=0){let l=document.createElement("canvas");return l.width=e,l.height=n,l.style.width=e.toString(),l.style.height=n.toString(),this.drawImageFilled(t,l,i,r,a),o.src=l.toDataURL("image/png"),l}},c(en,"CanvasTool"),_(en,"CanvasTool"),en);(0,mi.Package)("org.qcobjects.tools.canvas",[bi]);var L=x(),tn,_i=(tn=class extends L.InheritClass{constructor({component:t=null,dependencies:e=[]}){super({component:t,dependencies:e}),this.dependencies=[]}load(){this.dependencies.push((0,L.New)(L.SourceCSS,{external:!L.CONFIG.get("useLocalSDK",!1),url:L.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":L.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,L.Tag)("nav").map(t=>{t.style.border="20px solid #3333"}),(0,L.Tag)("nav").map(t=>{t.style.backgroundColor="#129999"}),(0,L.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,L.Tag)("component>div").map(t=>{t.style.border="3px dashed #fff"}),(0,L.Tag)("component>section").map(t=>{t.style.border="3px solid #000"}),(0,L.Tag)("component>section").map(t=>{t.style.backgroundColor="#fffaaa"}),(0,L.Tag)("component>article").map(t=>{t.style.border="3px dotted #000"}),(0,L.Tag)("component>header").map(t=>{t.style.background="#789"}),(0,L.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,L.Tag)("component>article:nth-child(1)").map(t=>{t.style.border="1px solid #444"}),(0,L.Tag)("component>article:nth-child(1)").map(t=>{t.style.backgroundColor="#555aaa"}),(0,L.Tag)("component>article:nth-child(2)").map(t=>{t.style.backgroundColor="#aaa333"}),(0,L.Tag)("component>article:nth-child(3)").map(t=>{t.style.backgroundColor="#54da82"}),(0,L.Tag)("*").map(t=>{t.style.color="#fff"}),(0,L.Tag)("component>article").map(t=>Ne.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>Ne.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>Ne.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),ws.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),vs.apply(t)}),(0,L.Tag)("component>article:nth-child(2)").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),ys.apply(t)})},300)}},c(tn,"BasicLayout"),_(tn,"BasicLayout"),tn);(0,L.Package)("org.qcobjects.tools.layouts",[_i]);var K=x(),H,To=(H=class extends K.InheritClass{constructor(t){super(t);let e=this;this.__cache__=new K.ComplexStorageCache({index:e.__instanceID.toString(),load(){let n;return typeof navigator<"u"&&typeof origin<"u"?n=K._Crypt.encrypt(`${navigator.userAgent}|${t.username}|${(+new Date).toString()}`,origin):n=K._Crypt.encrypt(`${t.username}|${(+new Date).toString()}`,K.CONFIG.get("domain","localhost")),H.user={priority:e.__instanceID.toString(),token:n},H.user},alternate(n){H.user=n?.cache.getCached(e.__instanceID.toString())}})}static generateIndex(t){return typeof Buffer<"u"?Buffer.from(t,"ascii").toString("base64"):btoa(t)}static getGlobalUser(...t){let e=[t].join("|"),n="userToken_"+H.generateIndex(e);return(typeof(0,K.get)(n)>"u"||(0,K.get)(n)===null)&&(0,K.set)(n,(0,K.New)(H,{username:e})),H.user=(0,K.get)(n).user,(0,K.get)(n).user}static getGlobalUserToken(...t){return H.getGlobalUser(t).token}static getGlobalUserId(...t){return H.getGlobalUser(t).id}static getGlobalUserPriority(...t){return H.getGlobalUser(t).priority}static getLoginCredentialsToken(t,e){return K._Crypt.encrypt(`${t}${e}`,H.getGlobalUserToken(t))}static closeGlobalSession(...t){H.getGlobalUser(t);let e=[t].join("|"),n="userToken_"+H.generateIndex(e);typeof(0,K.get)(n)<"u"&&((0,K.get)(n).__cache__.clear(),(0,K.set)(n,null),H.user={})}},c(H,"_SessionUserToken"),_(H,"SessionUserToken"),H.user={},H);(0,K.Package)("org.qcobjects.cloud.auth.session.usertoken",[To]);var bs=x(),nn,yi=(nn=class extends bs.InheritClass{constructor(){super(...arguments),this.__session_container__=null}setSessionContainer(){this.__session_container__=[...arguments]}getSessionContainer(){if(typeof this.__session_container__>"u"||this.__session_container__===null)throw new Error("You need to set a session container first: sessionData.setSessionContainer(...arguments)");return this.__session_container__}getSessionData(...t){let e=sessionStorage.getItem(`${this.index(t)}`),n;return e!==null&&(n=JSON.parse(e)),(typeof n>"u"||n===null)&&(n={}),n}index(...t){if(typeof To>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(To.getGlobalUserToken(t))}`}save(...t){let e=(0,bs._DataStringify)(this.sessionData);sessionStorage.setItem(`${this.index(t)}`,e)}get(t,e){let n=this.getSessionData(this.getSessionContainer());return typeof n[t]<"u"?n[t]:e}set(t,e){let n=this.getSessionContainer(),o=this.getSessionData(n);this.sessionData=o,this.sessionData[t]=e,this.save(n)}},c(nn,"SessionData"),_(nn,"SessionData"),nn);(0,bs.Package)("org.qcobjects.cloud.auth.session.data",[yi]);_(c((function s(t){"use strict";if(typeof Object.defineProperty<"u"&&typeof t<"u")try{Object.defineProperty(t,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:s})}catch{typeof t.__qcobjects_sdk__<"u"&&(t.__qcobjects_sdk__.__loaded__=!0)}if(typeof t.__qcobjects_sdk__.__loaded__>"u"){if(t.__qcobjects_sdk__.__loaded__=!0,typeof t>"u")throw Error("Top context empty: It should either global, module or window");let e=Ao.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{Ao.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(Ao._top);var fa=Ao._top});var Ci=ae(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});var se=x(),ga=As(),vn;(0,se.Package)("com.qcobjects.installer",[(vn=class extends se.InheritClass{constructor(t){super(),this.root=t,window.addEventListener("beforeinstallprompt",()=>this.beforeinstallprompt.bind(this),!1),window.addEventListener("appinstalled",()=>this.installed.bind(this),!1),t.addEventListener("click",()=>this.install.bind(this)),t.addEventListener("touchend",()=>this.install.bind(this)),window.matchMedia("(display-mode: standalone)").addEventListener("change",e=>{let n="browser";e.matches&&(n="standalone"),ga.NotificationComponent.success(`TWA in ${n} Mode`)}),(0,se.set)("installer",this)}beforeinstallprompt(t){return se.logger.debug("registering installer event"),t.preventDefault(),(0,se.set)("promptEvent",t),this.root.classList.add("available"),!1}installed(){se.logger.debug("app is already installed"),(0,se.set)("promptEvent",null),this.root.classList.remove("available")}install(){let t=this.root;se.logger.debug("installer actioned");let e=(0,se.get)("promptEvent",null);e?(se.logger.debug("prompt event"),e.prompt(),e.userChoice.then(function(n){n.outcome==="accepted"?t.classList.remove("available"):se.logger.debug("User has chosen not to install the PWA"),e=null}).catch(function(n){e=null,t.classList.remove("available"),se.logger.warn(`Error during install: ${n.toString()}`)})):se.logger.debug("It is not possible to get the prompt event for install ")}},c(vn,"Installer"),vn)])});var Si=ae(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});var Ro=x(),Cn,On,Sn;(0,Ro.Package)("org.quickcorp.custom.effects",[(Cn=class extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}},c(Cn,"MainTransitionEffect"),Cn),(On=class extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}},c(On,"SlideLeftTransitionEffect"),On),(Sn=class extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}},c(Sn,"SlideRightTransitionEffect"),Sn)])});var Ni=ae(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});var Ei=x(),En;(0,Ei.Package)("org.quickcorp.custom.models",[(En=class extends Ei.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}},c(En,"ContactVO"),En)])});var Ii=ae(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var ye=x(),Rs=class Rs extends ye.Component{constructor(){super(...arguments),this.name="github-grid",this.tplsource="inline",this.template=`
699
699
  <style>
700
700
  $layout(landscape,css/desktop/components/github-grid.css)
701
701
  $layout(portrait,css/mobile/components/github-grid.css)
@@ -808,5 +808,5 @@
808
808
  </div>
809
809
  `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?ye.logger.debug("Admin module is present"):(ye.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove())}catch(n){ye.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove()}return super.done(t)}};c(Ds,"AdminButton");var Ms=Ds;(0,ye.Package)("org.quickcorp.custom.components",[Ms,Ps,Ts,Is])});var Pi=ae(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});var re=x(),ma=As(),qe,xn,Nn;(0,re.Package)("org.quickcorp.custom.controllers",[(qe=class extends re.Controller{constructor(t){re.logger.debug("Initializing MainController..."),super(t)}done(...t){let e=super.done(t);if(!qe.loaded){let n=(0,re._DOMCreateElement)("style");n.innerHTML=`
810
810
  @import url(css/body-layout.css);
811
- `,document.body.append(n),re.logger.debug("MainController loaded"),qe.loaded=!0}return e}},c(qe,"MainController"),qe),(xn=class extends re.Controller{constructor(t){re.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,re.set)("sideNavController",this),this.effect=new ma.Fade({duration:300})}done(...t){let e=super.done(t);return this.bindControls(),this.close(),e}bindControls(){this.componentRoot&&this.componentRoot?.subelements("a[href]")?.map(e=>(e.addEventListener("click",()=>this.close()),e))}open(){return this.componentRoot!==null&&(this.effect!=null&&this.effect.apply(this.componentRoot,0,1),this.componentRoot?.classList.add("open"),this.componentRoot?.parentElement&&this.componentRoot.parentElement!==null&&(this.componentRoot.parentElement.subelements(".navbtn")[0].style.display="none",this.componentRoot.parentElement.subelements(".closebtn")[0].style.display="block")),this.visibility=!0,this.visibility}close(){return typeof this.componentRoot<"u"&&this.componentRoot!==null&&(this.effect!=null&&this.effect.apply(this.componentRoot,1,0),this.componentRoot?.classList.remove("open"),this.componentRoot?.parentElement&&(this.componentRoot.parentElement.subelements(".navbtn")[0].style.display="block",this.componentRoot.parentElement.subelements(".closebtn")[0].style.display="none")),this.visibility=!1,this.visibility}toggle(){this.visibility?this.close():this.open()}},c(xn,"SideNavController"),xn),(Nn=class extends re.Controller{constructor(t){super(t),re.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){re.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,re.New)((0,re.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done(t);return this.loadInstallerButton(),e}},c(Nn,"HeaderController"),Nn)])});var ki=ae(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});var Mi=x(),An;(0,Mi.Package)("org.quickcorp.custom.views",[(An=class extends Mi.View{done(...t){let e=super.done(t),n=this.component;return n!==void 0&&n.body!==void 0&&(n.body.style.display="block",n.body.style.width="100px",n.body.style.height="100px"),e}},c(An,"CardView"),An)])});var ji=ae(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});var In=x(),Tn,Pn,Mn,Rn;(0,In.Package)("com.qcobjects.services.github",[(Tn=class extends In.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1}done({request:t,service:e}){let n=JSON.parse(e.template).reverse().map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}},c(Tn,"GitHubService"),Tn),(Pn=class extends In.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1}done({request:t,service:e}){In.logger.debug(t);let n=JSON.parse(e.template).items.map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}},c(Pn,"GitHubTagService"),Pn),(Mn=class extends In.Service{constructor(){super(...arguments),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1}done({service:t}){let e=JSON.parse(t.template)[0];t.template={version:e.name}}},c(Mn,"QCObjectsVersionService"),Mn),(Rn=class extends In.Service{constructor(){super(...arguments),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1}done({service:t}){let e=JSON.parse(t.template);t.template={forks:e.forks_count,stars:e.stargazers_count,watchers:e.watchers_count,size:Math.round(e.size/1e3)}}},c(Rn,"QCObjectsStarsForksService"),Rn)])});var qi=ae(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});var Lo=x(),kn;(0,Lo.Package)("com.qcobjects.services.newapp",[(kn=class extends Lo.Service{constructor(){super(...arguments),this.url="/admin"}done(t){let e=c(n=>/<base href="\/admin\/" target="_self">/.test(n),"hasAdmin");t.service.template=(0,Lo._DataStringify)({hasAdmin:e(t.service.template)})}fail(t){t.service.template=(0,Lo._DataStringify)({hasAdmin:!1})}},c(kn,"AdminCheckService"),kn)])});var ba=ae($i=>{Object.defineProperty($i,"__esModule",{value:!0});vi();Si();Ni();Ii();Pi();ki();ji();qi()});return ba();})();
811
+ `,document.body.append(n),re.logger.debug("MainController loaded"),qe.loaded=!0}return e}},c(qe,"MainController"),qe),(xn=class extends re.Controller{constructor(t){re.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,re.set)("sideNavController",this),this.effect=new ma.Fade({duration:300})}done(...t){let e=super.done(t);return this.bindControls(),this.close(),e}bindControls(){this.componentRoot&&this.componentRoot?.subelements("a[href]")?.map(e=>(e.addEventListener("click",()=>this.close()),e))}open(){return this.componentRoot!==null&&(this.effect!=null&&this.effect.apply(this.componentRoot,0,1),this.componentRoot?.classList.add("open"),this.componentRoot?.parentElement&&this.componentRoot.parentElement!==null&&(this.componentRoot.parentElement.subelements(".navbtn")[0].style.display="none",this.componentRoot.parentElement.subelements(".closebtn")[0].style.display="block")),this.visibility=!0,this.visibility}close(){return typeof this.componentRoot<"u"&&this.componentRoot!==null&&(this.effect!=null&&this.effect.apply(this.componentRoot,1,0),this.componentRoot?.classList.remove("open"),this.componentRoot?.parentElement&&(this.componentRoot.parentElement.subelements(".navbtn")[0].style.display="block",this.componentRoot.parentElement.subelements(".closebtn")[0].style.display="none")),this.visibility=!1,this.visibility}toggle(){this.visibility?this.close():this.open()}},c(xn,"SideNavController"),xn),(Nn=class extends re.Controller{constructor(t){super(t),re.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){re.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,re.New)((0,re.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done(t);return this.loadInstallerButton(),e}},c(Nn,"HeaderController"),Nn)])});var ki=ae(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});var Mi=x(),An;(0,Mi.Package)("org.quickcorp.custom.views",[(An=class extends Mi.View{done(...t){let e=super.done(t),n=this.component;return n!==void 0&&n.body!==void 0&&(n.body.style.display="block",n.body.style.width="100px",n.body.style.height="100px"),e}},c(An,"CardView"),An)])});var ji=ae(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});var In=x(),Tn,Pn,Mn,Rn;(0,In.Package)("com.qcobjects.services.github",[(Tn=class extends In.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1}done({request:t,service:e}){let n=JSON.parse(e.template).reverse().map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}},c(Tn,"GitHubService"),Tn),(Pn=class extends In.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1}done({request:t,service:e}){In.logger.debug(t);let n=JSON.parse(e.template).items.map(function(o){return{id:o.id,description:o.description,title:o.name,url:o.html_url,repo_stargazers_count:o.stargazers_count,repo_watchers_count:o.watchers_count}});return e.template=JSON.stringify({result:n}),super.done({request:t,service:e})}},c(Pn,"GitHubTagService"),Pn),(Mn=class extends In.Service{constructor(){super(...arguments),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1}done({service:t}){let e=JSON.parse(t.template)[0];t.template={version:e.name}}},c(Mn,"QCObjectsVersionService"),Mn),(Rn=class extends In.Service{constructor(){super(...arguments),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1}done({service:t}){let e=JSON.parse(t.template);t.template={forks:e.forks_count,stars:e.stargazers_count,watchers:e.watchers_count,size:Math.round(e.size/1e3)}}},c(Rn,"QCObjectsStarsForksService"),Rn)])});var qi=ae(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});var Lo=x(),kn;(0,Lo.Package)("com.qcobjects.services.newapp",[(kn=class extends Lo.Service{constructor(){super(...arguments),this.url="/admin"}done(t){let e=c(n=>/<base href="\/admin\/" target="_self">/.test(n),"hasAdmin");t.service.template=(0,Lo._DataStringify)({hasAdmin:e(t.service.template)})}fail(t){t.service.template=(0,Lo._DataStringify)({hasAdmin:!1})}},c(kn,"AdminCheckService"),kn)])});var ba=ae($i=>{Object.defineProperty($i,"__esModule",{value:!0});Ci();Si();Ni();Ii();Pi();ki();ji();qi()});return ba();})();
812
812
  //# sourceMappingURL=org.quickcorp.custom.js.map