qcobjectsnewapp 2.5.23-ts → 2.5.25-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.
Files changed (35) hide show
  1. package/VERSION +1 -1
  2. package/package.json +2 -1
  3. package/public/js/init.js +20 -20
  4. package/public/js/init.js.map +4 -4
  5. package/public/js/packages/com.qcobjects.installer.js +15 -15
  6. package/public/js/packages/com.qcobjects.installer.js.map +3 -3
  7. package/public/js/packages/com.qcobjects.services.newapp.js +4 -4
  8. package/public/js/packages/com.qcobjects.services.newapp.js.map +3 -3
  9. package/public/js/packages/org.quickcorp.custom.components.js +8 -8
  10. package/public/js/packages/org.quickcorp.custom.components.js.map +2 -2
  11. package/public/js/packages/org.quickcorp.custom.controllers.js +16 -16
  12. package/public/js/packages/org.quickcorp.custom.controllers.js.map +3 -3
  13. package/public/js/packages/org.quickcorp.custom.effects.js +4 -4
  14. package/public/js/packages/org.quickcorp.custom.effects.js.map +3 -3
  15. package/public/js/packages/org.quickcorp.custom.js +20 -20
  16. package/public/js/packages/org.quickcorp.custom.js.map +4 -4
  17. package/public/js/packages/org.quickcorp.custom.models.js +4 -4
  18. package/public/js/packages/org.quickcorp.custom.models.js.map +3 -3
  19. package/public/js/packages/org.quickcorp.custom.views.js +4 -4
  20. package/public/js/packages/org.quickcorp.custom.views.js.map +3 -3
  21. package/public/sw.js +0 -2
  22. package/src/js/packages/com.qcobjects.installer.ts +83 -81
  23. package/src/js/packages/com.qcobjects.services.newapp.ts +20 -18
  24. package/src/js/packages/org.quickcorp.custom.components.ts +5 -7
  25. package/src/js/packages/org.quickcorp.custom.controllers.ts +115 -111
  26. package/src/js/packages/org.quickcorp.custom.d.ts +1 -1
  27. package/src/js/packages/org.quickcorp.custom.effects.ts +23 -21
  28. package/src/js/packages/org.quickcorp.custom.models.ts +12 -11
  29. package/src/js/packages/org.quickcorp.custom.ts +1 -1
  30. package/src/js/packages/org.quickcorp.custom.views.ts +13 -12
  31. package/src/sw.js +0 -2
  32. package/public/js/packages/com.qcobjects.services.github.js +0 -22
  33. package/public/js/packages/com.qcobjects.services.github.js.map +0 -7
  34. package/src/js/packages/com.qcobjects.services.github.d.ts +0 -1
  35. package/src/js/packages/com.qcobjects.services.github.ts +0 -213
package/public/js/init.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var global=(()=>{var ta=Object.defineProperty;var c=(s,t)=>ta(s,"name",{value:t,configurable:!0}),kn=(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 ne=(s,t)=>()=>{try{return t||s((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var x=ne((Pa,un)=>{"use strict";var na=Object.create,zn=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,Wo=Object.getOwnPropertyNames,sa=Object.getPrototypeOf,ra=Object.prototype.hasOwnProperty,p=c((s,t)=>zn(s,"name",{value:t,configurable:!0}),"__name"),w=c((s,t)=>c(function(){return s&&(t=(0,s[Wo(s)[0]])(s=0)),t},"__init"),"__esm"),ia=c((s,t)=>c(function(){return t||(0,s[Wo(s)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Zs=c((s,t)=>{for(var e in t)zn(s,e,{get:t[e],enumerable:!0})},"__export"),Xs=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wo(t))!ra.call(s,o)&&o!==e&&zn(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=oa(t,o))||n.enumerable});return s},"__copyProps"),aa=c((s,t,e)=>(e=s!=null?na(sa(s)):{},Xs(t||!s||!s.__esModule?zn(e,"default",{value:s,enumerable:!0}):e,s)),"__toESM"),ca=c(s=>Xs(zn({},"__esModule",{value:!0}),s),"__toCommonJS"),yn,Vn=w({"src/is_raw_class.ts"(){"use strict";yn=p(s=>!!(typeof s=="function"&&s.toString().startsWith("class")),"__is_raw_class__")}}),wn,Jn=w({"src/ObjectName.ts"(){"use strict";wn=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,ge=w({"src/getType.ts"(){"use strict";Vn(),Jn(),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(yn(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=wn(t);break}return e},"__getType__2"),"__getType__")}}),Qn,mo=w({"src/make_global.ts"(){"use strict";X(),Qn=p(s=>{s&&s.name&&(typeof R<"u"&&typeof s<"u"&&R!==null&&!Object.hasOwn(R,s.name)?bn(s.name,s):typeof global<"u"?global[s.name]=s:typeof globalThis<"u"&&(globalThis[s.name]=s))},"__make_global__")}}),Y,J,Ln,He,jn,Ks,qo,Fo,Go,Ho,Ys,no,Ee=w({"src/PrimaryCollections.ts"(){"use strict";ge(),mo(),Y={},J={},Ln=[],He=[],jn=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,Qn(s),Y[n]},"__register_class__"),Ks=p(s=>Y[s],"get_QC_CLASS"),qo=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(qo(s[e])));return t},"_get_packages_names"),Fo=p(()=>qo(J),"getPackagesNamesList"),Go=p(()=>[...Fo()].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"),Ho=p(()=>{let s=[];return[...Go()].forEach(function(t){return s=s.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${Z(e)}`,classFactory:e}))),t}),s},"getClassesList"),Ys=p(()=>[...Ho()].map(s=>s.className),"getClassesNamesList"),no=p((s,t)=>{J[s]=t},"set_QC_PACKAGE")}}),S,rt=w({"src/Export.ts"(){"use strict";mo(),S=p(function(s){return Qn(s)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function er(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(er,"_import_");var da=w({"src/_import_.ts"(){"use strict";P(),p(er,"_import_")}}),$o,y,zo,Us,Me,bo,q=w({"src/platform.ts"(){"use strict";da(),P(),$o=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!$o,zo=typeof un<"u"&&typeof window>"u",Us=p(s=>{},"deno_require"),Me=p(s=>$o?Us(s):(t=>{let e;try{(async()=>{e=await er(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_"),bo=(function(){return typeof cordova<"u"})()}}),co,d,P=w({"src/Logger.ts"(){"use strict";var s;rt(),q(),co=(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 co,S(d)}}),Se,Le,xe=w({"src/Cast.ts"(){"use strict";P(),Se=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"),Le=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,Ws,zs,me=w({"src/DOMCreateElement.ts"(){"use strict";q(),ee=p(function(s,t,e){let n;return y?n=zs(s,t,e):n={},n},"_DOMCreateElement"),Ws=p((s,{props:t,children:e})=>s({props:t,children:e}),"ComplexTypeCall"),zs=p((s,t,e)=>{if(typeof s!="string")return Ws(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")}}),Pe,Vo,Jo=w({"src/IncrementInstanceID.ts"(){"use strict";Pe=0,Vo=p(()=>{Pe=typeof Pe>"u"||Pe===null?0:Pe+1},"IncrementInstanceID")}}),M,he,je=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),he=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";Vn(),Ee(),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=>{jn(e,s)}),no(s,J[s].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{jn(e,s)}),no(s,t);else if(yn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=s,t.__namespace=s,jn(t,s),no(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(),Jo(),xe(),me(),ge(),je(),Kn(),q(),Ee(),$(),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]}),Vo(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Pe,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]}),he(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),he(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){Le(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=Se(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"),Oe(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])}}),st,Zn,Xn=w({"src/isQCObjects.ts"(){"use strict";U(),st=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"),Zn=p(function(s){return!!(typeof s=="function"&&!s.__instanceID&&s.__definition&&typeof s.__definition<"u"&&s.__definition.__classType)||s.prototype instanceof G},"isQCObjects_Class")}}),Oe,Kn=w({"src/is_a.ts"(){"use strict";ge(),Xn(),Jn(),Oe=p((s,t)=>!!(typeof s<"u"&&s!==null&&((Zn(s)||st(s))&&s.hierarchy().includes(t)||Z(s)===t||wn(s)===t||typeof s===t)),"is_a")}}),tr,la=w({"src/is_forbidden_name.ts"(){"use strict";tr=p(s=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(s)!==-1,"__is__forbidden_name__")}}),_o,Qo=w({"src/LegacyCopy.ts"(){"use strict";Vn(),_o=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 yn(s):e=(n=class extends s{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),dn,Zo=w({"src/Class.ts"(){"use strict";Ee(),xe(),me(),ge(),Jo(),je(),Kn(),la(),Qo(),P(),q(),X(),dn=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(tr(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(_o(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(Vo(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Pe,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]}),he(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),he(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){Le(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=Se(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"),Oe(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]=Le(i,Y[s]),Y[s].__definition=i,Y[s].__definition.__classType=s,R[s]=Y[s],Y[s]},"Class"),typeof dn.prototype<"u"&&(dn.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),D,be=w({"src/ClassFactory.ts"(){"use strict";Vn(),Ee(),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=>yn(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=Ks(s),typeof t>"u")throw new Error(`${s} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
1
+ "use strict";var global=(()=>{var fa=Object.defineProperty;var c=(s,t)=>fa(s,"name",{value:t,configurable:!0}),Tn=(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 ne=(s,t)=>()=>{try{return t||s((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var x=ne((Za,mn)=>{"use strict";var ga=Object.create,Hn=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,ss=Object.getOwnPropertyNames,ba=Object.getPrototypeOf,_a=Object.prototype.hasOwnProperty,p=c((s,t)=>Hn(s,"name",{value:t,configurable:!0}),"__name"),w=c((s,t)=>c(function(){return s&&(t=(0,s[ss(s)[0]])(s=0)),t},"__init"),"__esm"),ya=c((s,t)=>c(function(){return t||(0,s[ss(s)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),lr=c((s,t)=>{for(var e in t)Hn(s,e,{get:t[e],enumerable:!0})},"__export"),ur=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ss(t))!_a.call(s,o)&&o!==e&&Hn(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=ma(t,o))||n.enumerable});return s},"__copyProps"),wa=c((s,t,e)=>(e=s!=null?ga(ba(s)):{},ur(t||!s||!s.__esModule?Hn(e,"default",{value:s,enumerable:!0}):e,s)),"__toESM"),va=c(s=>ur(Hn({},"__esModule",{value:!0}),s),"__toCommonJS"),Sn,Bn=w({"src/is_raw_class.ts"(){"use strict";Sn=p(s=>!!(typeof s=="function"&&s.toString().startsWith("class")),"__is_raw_class__")}}),En,Un=w({"src/ObjectName.ts"(){"use strict";En=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,me=w({"src/getType.ts"(){"use strict";Bn(),Un(),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(Sn(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=En(t);break}return e},"__getType__2"),"__getType__")}}),Wn,fo=w({"src/make_global.ts"(){"use strict";X(),Wn=p(s=>{s&&s.name&&(typeof k<"u"&&typeof s<"u"&&k!==null&&!Object.hasOwn(k,s.name)?Cn(s.name,s):typeof global<"u"?global[s.name]=s:typeof globalThis<"u"&&(globalThis[s.name]=s))},"__make_global__")}}),Y,Q,Pn,Be,Mn,pr,Xo,Yo,es,ts,hr,eo,Ee=w({"src/PrimaryCollections.ts"(){"use strict";me(),fo(),Y={},Q={},Pn=[],Be=[],Mn=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,Wn(s),Y[n]},"__register_class__"),pr=p(s=>Y[s],"get_QC_CLASS"),Xo=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(Xo(s[e])));return t},"_get_packages_names"),Yo=p(()=>Xo(Q),"getPackagesNamesList"),es=p(()=>[...Yo()].map(s=>{let t=Q[s],e;return t&&(e={packageName:s,classesList:t.filter(function(){return!0})}),e}).filter(function(s){return typeof s<"u"}),"getPackagesList"),ts=p(()=>{let s=[];return[...es()].forEach(function(t){return s=s.concat(t.classesList.map(e=>({packageName:t.packageName,className:`${t.packageName}.${Z(e)}`,classFactory:e}))),t}),s},"getClassesList"),hr=p(()=>[...ts()].map(s=>s.className),"getClassesNamesList"),eo=p((s,t)=>{Q[s]=t},"set_QC_PACKAGE")}}),S,it=w({"src/Export.ts"(){"use strict";fo(),S=p(function(s){return Wn(s)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function fr(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(fr,"_import_");var Ca=w({"src/_import_.ts"(){"use strict";P(),p(fr,"_import_")}}),Ko,y,rs,sr,Me,go,q=w({"src/platform.ts"(){"use strict";Ca(),P(),Ko=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!Ko,rs=typeof mn<"u"&&typeof window>"u",sr=p(s=>{},"deno_require"),Me=p(s=>Ko?sr(s):(t=>{let e;try{(async()=>{e=await fr(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_"),go=(function(){return typeof cordova<"u"})()}}),io,d,P=w({"src/Logger.ts"(){"use strict";var s;it(),q(),io=(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 io,S(d)}}),Se,je,xe=w({"src/Cast.ts"(){"use strict";P(),Se=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"),je=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,rr,ir,be=w({"src/DOMCreateElement.ts"(){"use strict";q(),ee=p(function(s,t,e){let n;return y?n=ir(s,t,e):n={},n},"_DOMCreateElement"),rr=p((s,{props:t,children:e})=>s({props:t,children:e}),"ComplexTypeCall"),ir=p((s,t,e)=>{if(typeof s!="string")return rr(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")}}),Pe,is,as=w({"src/IncrementInstanceID.ts"(){"use strict";Pe=0,is=p(()=>{Pe=typeof Pe>"u"||Pe===null?0:Pe+1},"IncrementInstanceID")}}),M,fe,Le=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),fe=p(function(s){let t=[];for(let e in s)(typeof s[e]).toLowerCase()==="function"&&t.push(s[e]);return t},"_methods_")}}),R,$=w({"src/Package.ts"(){"use strict";Bn(),Ee(),R=p((s,t=[])=>{if(Object.hasOwn(Q,s)&&typeof Q[s]<"u"&&typeof Q[s]!="string"&&Object.hasOwn(Q[s],"length")&&Q[s].length>0&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{Mn(e,s)}),eo(s,Q[s].concat(t));else if(typeof t<"u"&&typeof t<"u"&&Object.hasOwn(t,"length")&&t.length>0)t.forEach(e=>{Mn(e,s)}),eo(s,t);else if(Sn(t))typeof t.__definition>"u"&&(t.__definition={}),t.__definition.__namespace=s,t.__namespace=s,Mn(t,s),eo(s,[t]);else throw new Error(`An error ocurred. It was not possible to add classes to ${s}.`);return Object.hasOwn(Q,s)?Q[s]:[]},"Package")}}),G,U=w({"src/InheritClass.ts"(){"use strict";var s;P(),as(),xe(),be(),me(),Le(),Qn(),q(),Ee(),$(),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]}),is(),n.__instanceID||Object.defineProperty(n,"__instanceID",{value:Pe,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]}),fe(Y[n.__classType]).map(function(o){return n[o.name]=o.bind(n),o}),fe(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){je(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=Se(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"),Oe(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),R("com.qcobjects",[G])}}),rt,Vn,zn=w({"src/isQCObjects.ts"(){"use strict";U(),rt=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"),Vn=p(function(s){return!!(typeof s=="function"&&!s.__instanceID&&s.__definition&&typeof s.__definition<"u"&&s.__definition.__classType)||s.prototype instanceof G},"isQCObjects_Class")}}),Oe,Qn=w({"src/is_a.ts"(){"use strict";me(),zn(),Un(),Oe=p((s,t)=>!!(typeof s<"u"&&s!==null&&((Vn(s)||rt(s))&&s.hierarchy().includes(t)||Z(s)===t||En(s)===t||typeof s===t)),"is_a")}}),gr,Oa=w({"src/is_forbidden_name.ts"(){"use strict";gr=p(s=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(s)!==-1,"__is__forbidden_name__")}}),mo,cs=w({"src/LegacyCopy.ts"(){"use strict";Bn(),mo=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 Sn(s):e=(n=class extends s{},c(n,"_value_"),p(n,"_value_"),n);break;default:break}return e},"_LegacyCopy")}}),fn,ds=w({"src/Class.ts"(){"use strict";Ee(),xe(),be(),me(),as(),Le(),Qn(),Oa(),cs(),P(),q(),X(),fn=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(gr(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(mo(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(is(),u.__instanceID||Object.defineProperty(u,"__instanceID",{value:Pe,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]}),fe(Y[u.__classType]).map(function(h){return u[h.name]=h.bind(u),h}),fe(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){je(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=Se(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"),Oe(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]=je(i,Y[s]),Y[s].__definition=i,Y[s].__definition.__classType=s,k[s]=Y[s],Y[s]},"Class"),typeof fn.prototype<"u"&&(fn.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),D,_e=w({"src/ClassFactory.ts"(){"use strict";Bn(),Ee(),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=(Q[e]||[]).filter(r=>Sn(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=pr(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")}}),Fn,Xo=w({"src/Base64.ts"(){"use strict";var s;Fn=(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)}}),fe,nr,De=w({"src/basePath.ts"(){"use strict";q(),fe=(function(){let s="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),s=t.join("/")+"/"}else try{let t=kn("node:process");typeof t<"u"?s=`${t.cwd()}/`:s=""}catch{s=""}return s})(),nr=p(s=>{fe=s},"setBasePath")}}),T,_e=w({"src/DataStringify.ts"(){"use strict";Qo(),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?_o(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),Cn,Yn=w({"src/domain.ts"(){"use strict";Cn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),Q,qe=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] }"}}}),pn,Ko=w({"src/secretKey.ts"(){"use strict";q(),pn=y?location.host:"secret"}}),pe,or,Bo,yo=w({"src/Crypt.ts"(){"use strict";var s;Xo(),_e(),U(),$(),Ko(),pe=(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=Fn.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,r;e=Fn.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),or=p(function(t){return pe.encrypt(T(t),pn)},"_CryptObject"),Bo=p(function(t){return t===""?{}:JSON.parse(pe.decrypt(t,pn))},"_DecryptObject"),k("com.qcobjects",[pe])}}),Te,ua=w({"src/ConfigSettings.ts"(){"use strict";var s;De(),U(),$(),Te=(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:fe},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",[Te])}}),v,de=w({"src/CONFIG.ts"(){"use strict";var s;De(),xe(),yo(),_e(),P(),vn(),Ko(),$(),U(),ua(),v=(s=class extends G{get _CONFIG_ENC(){return Te.instance._CONFIG_ENC}get _CONFIG(){return Te.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&nr(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=pe.encrypt(T({}),pn));let r=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return Le(a,Bo(r))})(Te.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Te.instance._CONFIG_ENC=or(o),Te.instance.set(e,n)}get(e,n){let o;try{let r=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=pe.encrypt(T({}),pn));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return Le(u,Bo(l))})(Te.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=ve.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])}}),ln,ve,vn=w({"src/Processor.ts"(){"use strict";var s;de(),U(),qe(),X(),$(),ln=(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),ve=ln.instance,k("com.qcobjects",[ln])}}),sr,rr,Uo,pa=w({"src/routings.ts"(){"use strict";sr=p((s,t)=>{let e=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),rr=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__"),Uo=p((s,t)=>s.includes(t),"__valid_routing_way__")}});function hn(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 oo.push(new e(s,t)),e}c(hn,"asyncLoad");var oo,Yo,wo=w({"src/asyncLoad.ts"(){"use strict";rt(),q(),X(),oo=[],p(hn,"asyncLoad"),Yo=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&oo.map(function(s){s.dispatch.call(s)})}):typeof R<"u"&&oo.map(function(s){s.dispatch.call(s)})},"_fireAsyncLoad"),S(hn)}}),fn,Co=w({"src/ComplexStorageCache.ts"(){"use strict";var s;Xo(),_e(),P(),fn=(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_"+Fn.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)}}),eo,vo=w({"src/serviceLoader.ts"(){"use strict";wo(),Co(),_e(),P(),q(),X(),eo=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 fn({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=Me("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,I={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..."),I.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,I),u.call(l,I)}),a.useHTTP2&&b.end()},"captureEvents");try{let b;if(a.useHTTP2){d.debug("using http2");var C=Me("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 I=Me("http").request;b=Object.assign({url:a.url,headers:a.headers},a.options),g=I(a.url),m(g)}else if(f.protocol==="https:"){let O=Me("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=hn(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")}}),Oo,es=w({"src/tag_filter.ts"(){"use strict";Oo="quick-component:not([loaded]),component:not([loaded])"}}),Gn,ts=w({"src/componentLoader.ts"(){"use strict";wo(),Co(),_e(),P(),q(),X(),Gn=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 I={request:g,component:O};a.call(u,I)},"_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 I=g.responseText;d.debug("Data received {{DATA}}".replace("{{DATA}}",T(I))),d.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",r.name)),r.template=I,r.cached&&typeof m<"u"&&m.save(r.cacheIndex,r.template),C(r)}else{let I={request:g,component:r};l.call(u,I)}},"_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(I=>{d.debug("I got a response from fetch, so I'll feed the component"),I.text().then(B=>{r.template=B,C(r)}).catch(B=>{throw new Error(`An error ocurred: ${B}`)})}).catch(I=>{throw new Error(`An error ocurred: ${I}`)}));else try{d.debug("Calling the url of component in async mode."),g.open(r.method,r.url,!0)}catch(I){d.debug(`An error ocurred: ${I}.`),d.debug("Last try has failed... The component cannot be loaded.")}!bo&&!f&&g.setRequestHeader("Content-Type","text/html"),f||(g.onload=b);let O=p(function(I){I=!(typeof I>"u"||!I),d.debug("SENDING THE NORMAL REQUEST "),I?"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 fn({index:r.cacheIndex,load(){O.call(this,f)},alternate(I){r.method==="GET"?(r.template=I.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.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:C}=kn("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 fn({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=hn(n,[s,t]):i=n(s):i=o(s),i},"componentLoader")}}),Ue,ns=w({"src/Component.ts"(){"use strict";var s;Xo(),De(),xe(),be(),So(),_e(),Yn(),me(),ge(),U(),je(),Kn(),Xn(),P(),qe(),$(),q(),vn(),pa(),X(),de(),vo(),es(),ts(),Ue=(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__:I=null,__shadowRoot:B,body:ce,shadowRoot:Rn,splashScreenComponent:Ki,controller:Yi,view:ea}){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__:I,__shadowRoot:B,body:ce,shadowRoot:Rn,splashScreenComponent:Ki,controller:Yi,view:ea}),this.validRoutingWays=["pathname","hash","search"],this.basePath=fe,this.domain=Cn,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 ln({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(Ge){d.warn(`Component._new_ Something went wrong building the component ${j.name}`),console.error(`Component._new_ Something went wrong building the component ${j.name}`,Ge)})}).catch(Ge=>{throw Error(`Unexpected error ${Ge}`)})}).catch(Ge=>{throw Error(`Unexpected error ${Ge}`)})}).catch(Ge=>{throw Error(`Unexpected error. ${Ge}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=T(e.routingPath);return Fn.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 rr(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 sr(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});eo(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;ue("routingPaths")||bn("routingPaths",[]);let r=v.get("routingWay"),a=o.target[r];return ue("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=Oo;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=>!Dn(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=lo(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 Oe(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")),st(e)&&Oe(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")),Gn(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")),Gn(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=he(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return Se(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(st(e)&&Oe(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||mn)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:mn);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&&Uo(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),ue("routingPaths")||bn("routingPaths",[]),ue("routingPaths").includes(a.path)||ue("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&&Uo(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=Hn({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"&&Oe(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=ue("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",[Ue]),he(D("Component")).map(t=>(M(t),t))}}),Hn,Dn,so,Vs,lo,ir,So=w({"src/ComponentFactory.ts"(){"use strict";Zo(),be(),ns(),de(),me(),ge(),P(),qe(),$(),q(),es(),Hn=p(({TPL_SOURCE:s,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>s==="default"?`${t}${e}.${n}`:"","ComponentURI"),Dn=p((s,t)=>{let e=s.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),so=p((s,t)=>s.getAttribute(t)===null,"__attributeNotSet_"),Vs=p((s,t)=>{let e=so(s,"shadowed"),n=s.getAttribute("template-source")===null,o=Dn(s,"shadowed"),i=so(s,"cached"),r=Dn(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=Hn({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",[dn("ComponentBody",Ue,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let I=e?f&&f.shadowed||Ue.shadowed:o,B=i?(f&&f.cached)??Ue.cached:r,ce={__parent__:t,name:l,cached:B,shadowed:I,tplextension:a,body:v.get("preserveComponentBodyTag")?ee("componentBody"):s,templateURI:C,tplsource:m};(typeof l>"u"||l===""||l===null)&&delete ce.name,C===""&&delete ce.templateURI;let Rn=Q(f,ce);return v.get("preserveComponentBodyTag")&&typeof Rn<"u"&&s.append(Rn.body),Rn},"__create_component_instance_")()},"_buildComponentFromElement_"),lo=p((s,t)=>{let e=[];return y?e=s.map(function(n){return Vs(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),ir=p(s=>{let t=Oo,e=s.subelements(t);return lo(e,null)},"buildComponents")}}),ro,io,uo,ar=w({"src/Service.ts"(){"use strict";var s,t,e;De(),yo(),Yn(),U(),P(),$(),Ko(),de(),ro=(s=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=Cn,this.basePath=fe,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),io=(t=class extends ro{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),uo=(e=class extends io{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=pe.decrypt(this.JSONresponse?.__encoded__,pn);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",[ro]),k("com.qcobjects.api.services",[io]),k("com.qcobjects.api.config",[uo])}}),gn,os=w({"src/globalSettings.ts"(){"use strict";var s;de(),U(),P(),$(),q(),vo(),X(),ar(),gn=(s=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new co}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{ss()}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..."),rs(new uo),qn.configLoaded=n,eo(qn)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${qn.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",[gn])}}),cr={};Zs(cr,{_top:c(()=>R,"_top"),buildComponentsStack:c(()=>ss,"buildComponentsStack"),componentsStack:c(()=>mn,"componentsStack"),configService:c(()=>qn,"configService"),get:c(()=>ue,"get"),resetTop:c(()=>po,"resetTop"),set:c(()=>bn,"set"),setConfigService:c(()=>rs,"setConfigService")});var R,mn,po,ss,qn,rs,bn,ue,Js,X=w({"src/top.ts"(){"use strict";So(),xe(),os(),Ee(),P(),R={},R.lastCache=void 0,mn=[],po=p(()=>{let s=gn.instance;R=Le(s,R,!0)},"resetTop"),ss=p(()=>{mn=ir(document)},"buildComponentsStack"),rs=p(s=>{R.configService=s,qn=s},"setConfigService"),bn=p((s,t)=>{R[s]=t},"set"),ue=p((s,t)=>R[s]||t,"get"),po(),Js=p(function(s){Object.hasOwn(s,"PackagesList")||Object.defineProperty(s,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>Go(),"get")}),Object.hasOwn(s,"PackagesNameList")||Object.defineProperty(s,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>Fo(),"get")}),Object.hasOwn(s,"ClassesList")||Object.defineProperty(s,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>Ho(),"get")}),Object.hasOwn(s,"ClassesNameList")||Object.defineProperty(s,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>Ys(),"get")})},"_define_props"),Js(R)}}),an,is,dr=w({"src/captureFalseTouch.ts"(){"use strict";if(P(),q(),an=!1,is=p(()=>an?{passive:!0}:!1,"captureFalseTouch"),y)try{let s=Object.defineProperty({},"passive",{get(){return an=!0,an}});window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}catch(s){d.debug(`An error ocurred: ${s}.`),an=!1}else an=!1}}),Bn,as=w({"src/range.ts"(){"use strict";je(),Bn=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(Bn)}}),cs,lr=w({"src/defaultProcessors.ts"(){"use strict";P(),vn(),X(),as(),cs=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=ue(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");ve.setProcessor(s);let t=p(function(i,r,a){let l=`
4
+ `)}`);return t},"ClassFactory")}}),Ln,ls=w({"src/Base64.ts"(){"use strict";var s;Ln=(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)}}),ge,mr,De=w({"src/basePath.ts"(){"use strict";q(),ge=(function(){let s="";if(y){let t=document.baseURI.split("?")[0].split("/");t.pop(),s=t.join("/")+"/"}else try{let t=Tn("node:process");typeof t<"u"?s=`${t.cwd()}/`:s=""}catch{s=""}return s})(),mr=p(s=>{ge=s},"setBasePath")}}),T,ye=w({"src/DataStringify.ts"(){"use strict";cs(),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?mo(i):null;e.add(i)}return i}},"getCircularReplacer")()),"_DataStringify")}}),xn,Jn=w({"src/domain.ts"(){"use strict";xn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),J,qe=w({"src/New.ts"(){"use strict";J=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"),J.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),bn,us=w({"src/secretKey.ts"(){"use strict";q(),bn=y?location.host:"secret"}}),he,br,ns,bo=w({"src/Crypt.ts"(){"use strict";var s;ls(),ye(),U(),$(),us(),he=(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=Ln.encode(o),this.last_string}_decrypt(){let e=this.string,n=this.key,o="",i,r;e=Ln.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),br=p(function(t){return he.encrypt(T(t),bn)},"_CryptObject"),ns=p(function(t){return t===""?{}:JSON.parse(he.decrypt(t,bn))},"_DecryptObject"),R("com.qcobjects",[he])}}),Te,Sa=w({"src/ConfigSettings.ts"(){"use strict";var s;De(),U(),$(),Te=(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:ge},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),R("com.qcobjects",[Te])}}),C,le=w({"src/CONFIG.ts"(){"use strict";var s;De(),xe(),bo(),ye(),P(),Nn(),us(),$(),U(),Sa(),C=(s=class extends G{get _CONFIG_ENC(){return Te.instance._CONFIG_ENC}get _CONFIG(){return Te.instance._CONFIG}set(e,n){d.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&mr(n);let o;try{o=(function(i){i._CONFIG_ENC===null&&(i._CONFIG_ENC=he.encrypt(T({}),bn));let r=i._CONFIG_ENC.valueOf(),a=i._CONFIG?.valueOf();return je(a,ns(r))})(Te.instance)}catch(i){o={},console.error(i),d.debug("failed to encrypt config")}o[e]=n,Te.instance._CONFIG_ENC=br(o),Te.instance.set(e,n)}get(e,n){let o;try{let r=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=he.encrypt(T({}),bn));let l=a._CONFIG_ENC.valueOf(),u=a._CONFIG.valueOf();return je(u,ns(l))})(Te.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=Ce.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),R("com.qcobjects",[C])}}),gn,Ce,Nn=w({"src/Processor.ts"(){"use strict";var s;le(),U(),qe(),X(),$(),gn=(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 k<"u"?k[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:J(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),Ce=gn.instance,R("com.qcobjects",[gn])}}),_r,yr,os,Ea=w({"src/routings.ts"(){"use strict";_r=p((s,t)=>{let e=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...t.matchAll(new RegExp(e,"g"))][0].groups}},"__routing_params__"),yr=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__"),os=p((s,t)=>s.includes(t),"__valid_routing_way__")}});function _n(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 to.push(new e(s,t)),e}c(_n,"asyncLoad");var to,ps,_o=w({"src/asyncLoad.ts"(){"use strict";it(),q(),X(),to=[],p(_n,"asyncLoad"),ps=p(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&to.map(function(s){s.dispatch.call(s)})}):typeof k<"u"&&to.map(function(s){s.dispatch.call(s)})},"_fireAsyncLoad"),S(_n)}}),yn,yo=w({"src/ComplexStorageCache.ts"(){"use strict";var s;ls(),ye(),P(),yn=(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_"+Ln.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)}}),Zn,wo=w({"src/serviceLoader.ts"(){"use strict";_o(),yo(),ye(),P(),q(),X(),Zn=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 yn({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()}});k.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=Me("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=Me("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=Me("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=Me("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=_n(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")}}),vo,hs=w({"src/tag_filter.ts"(){"use strict";vo="quick-component:not([loaded]),component:not([loaded])"}}),Dn,fs=w({"src/componentLoader.ts"(){"use strict";_o(),yo(),ye(),P(),q(),X(),Dn=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 k&&(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.")}!go&&!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 k||(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 yn({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)}});k.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}=Tn("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 yn({index:r.cacheIndex,load(){m()},alternate(v){r.method==="GET"?(r.template=v.cache.getCached(r.cacheIndex),h.call(this,r)):m.call(this)}});k.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=_n(n,[s,t]):i=n(s):i=o(s),i},"componentLoader")}}),We,gs=w({"src/Component.ts"(){"use strict";var s;ls(),De(),xe(),_e(),Co(),ye(),Jn(),be(),me(),U(),Le(),Qn(),zn(),P(),qe(),$(),q(),Nn(),Ea(),X(),le(),wo(),hs(),fs(),We=(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:ce,shadowRoot:In,splashScreenComponent:ua,controller:pa,view:ha}){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:ce,shadowRoot:In,splashScreenComponent:ua,controller:pa,view:ha}),this.validRoutingWays=["pathname","hash","search"],this.basePath=ge,this.domain=xn,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 L=this;typeof l<"u"&&(L.name=l),typeof L.name>"u"&&typeof l>"u"&&d.warn("A name is not defined for "+Z(L)),L.routingWay=C.get("routingWay"),L.processorHandler=new gn({component:L}),L.data=typeof L.data>"u"||L.data===null?{}:L.data,L.data=Object.assign(L.data,L.dataAttributes),L.createServiceInstance().then(()=>{typeof L.__new__=="function"&&L.__new__(L),L._generateRoutingPaths(L.body).then(function(){L._reroute_().then(function(){return L.rebuild().then(function(){d.info(`Component._new_ The component ${L.name} was built successfully!`)}).catch(function(He){d.warn(`Component._new_ Something went wrong building the component ${L.name}`),console.error(`Component._new_ Something went wrong building the component ${L.name}`,He)})}).catch(He=>{throw Error(`Unexpected error ${He}`)})}).catch(He=>{throw Error(`Unexpected error ${He}`)})}).catch(He=>{throw Error(`Unexpected error. ${He}`)})}set cacheIndex(e){d.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=T(e.routingPath);return Ln.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 yr(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 _r(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=J(o,{data:n});Zn(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;pe("routingPaths")||Cn("routingPaths",[]);let r=C.get("routingWay"),a=o.target[r];return pe("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=J(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=J(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=vo;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=>!kn(i,"loaded"))),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=ao(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 Oe(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")),rt(e)&&Oe(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")),Dn(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")),Dn(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=fe(e).map(o=>o.name.replace(/bound /g,"")).map(o=>({[o]:e[o].bind(this)})).reduce((o,i)=>Object.assign(o,i),{});return Se(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,o=!!(rt(e)&&Oe(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||vn)o&&d.debug("loading routings for instance "+e.name),n=i.call(e,o?e.subcomponents:vn);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&&os(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),pe("routingPaths")||Cn("routingPaths",[]),pe("routingPaths").includes(a.path)||pe("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=J(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&&os(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(o=>{let i=qn({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"&&Oe(n,"TransitionEffect")?(this.effect=J(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=pe("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),R("com.qcobjects",[We]),fe(D("Component")).map(t=>(M(t),t))}}),qn,kn,no,ar,ao,wr,Co=w({"src/ComponentFactory.ts"(){"use strict";ds(),_e(),gs(),le(),be(),me(),P(),qe(),$(),q(),hs(),qn=p(({TPL_SOURCE:s,COMPONENTS_BASE_PATH:t,COMPONENT_NAME:e,TPLEXTENSION:n})=>s==="default"?`${t}${e}.${n}`:"","ComponentURI"),kn=p((s,t)=>{let e=s.getAttribute(t);if(e===null)return!1;let n=e.trim().toLowerCase();return n!=="false"&&n!=="0"},"__booleanAttribute_"),no=p((s,t)=>s.getAttribute(t)===null,"__attributeNotSet_"),ar=p((s,t)=>{let e=no(s,"shadowed"),n=s.getAttribute("template-source")===null,o=kn(s,"shadowed"),i=no(s,"cached"),r=kn(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=qn({COMPONENTS_BASE_PATH:C.get("componentsBasePath"),COMPONENT_NAME:l,TPLEXTENSION:a,TPL_SOURCE:m});return C.get("preserveComponentBodyTag")&&R(l!==""?"com.qcobjects.components."+l:"com.qcobjects.components",[fn("ComponentBody",We,{name:l,tplsource:m,tplextension:a,reload:!0})]),p(function(){let A=e?f&&f.shadowed||We.shadowed:o,B=i?(f&&f.cached)??We.cached:r,ce={__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 ce.name,v===""&&delete ce.templateURI;let In=J(f,ce);return C.get("preserveComponentBodyTag")&&typeof In<"u"&&s.append(In.body),In},"__create_component_instance_")()},"_buildComponentFromElement_"),ao=p((s,t)=>{let e=[];return y?e=s.map(function(n){return ar(n,t)}):d.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),e},"_buildComponentsFromElements_"),wr=p(s=>{let t=vo,e=s.subelements(t);return ao(e,null)},"buildComponents")}}),oo,so,co,vr=w({"src/Service.ts"(){"use strict";var s,t,e;De(),bo(),Jn(),U(),P(),$(),us(),le(),oo=(s=class extends G{constructor(){super(...arguments),this.kind="rest",this.domain=xn,this.basePath=ge,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),so=(t=class extends oo{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),co=(e=class extends so{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=he.decrypt(this.JSONresponse?.__encoded__,bn);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),R("com.qcobjects.api",[oo]),R("com.qcobjects.api.services",[so]),R("com.qcobjects.api.config",[co])}}),wn,ms=w({"src/globalSettings.ts"(){"use strict";var s;le(),U(),P(),$(),q(),wo(),X(),vr(),wn=(s=class extends G{constructor(){super(...arguments),this._GLOBAL={},this._logger=new io}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{bs()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}d.debug("Initializing the service worker"),e.call(k).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..."),_s(new co),Rn.configLoaded=n,Zn(Rn)?.then(i=>{o(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${Rn.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),R("com.qcobjects",[wn])}}),Cr={};lr(Cr,{_top:c(()=>k,"_top"),buildComponentsStack:c(()=>bs,"buildComponentsStack"),componentsStack:c(()=>vn,"componentsStack"),configService:c(()=>Rn,"configService"),get:c(()=>pe,"get"),resetTop:c(()=>lo,"resetTop"),set:c(()=>Cn,"set"),setConfigService:c(()=>_s,"setConfigService")});var k,vn,lo,bs,Rn,_s,Cn,pe,cr,X=w({"src/top.ts"(){"use strict";Co(),xe(),ms(),Ee(),P(),k={},k.lastCache=void 0,vn=[],lo=p(()=>{let s=wn.instance;k=je(s,k,!0)},"resetTop"),bs=p(()=>{vn=wr(document)},"buildComponentsStack"),_s=p(s=>{k.configService=s,Rn=s},"setConfigService"),Cn=p((s,t)=>{k[s]=t},"set"),pe=p((s,t)=>k[s]||t,"get"),lo(),cr=p(function(s){Object.hasOwn(s,"PackagesList")||Object.defineProperty(s,"PackagesList",{set:p(t=>{d.debug("PackagesList is readonly")},"set"),get:p(()=>es(),"get")}),Object.hasOwn(s,"PackagesNameList")||Object.defineProperty(s,"PackagesNameList",{set:p(t=>{d.debug("PackagesNameList is readonly")},"set"),get:p(()=>Yo(),"get")}),Object.hasOwn(s,"ClassesList")||Object.defineProperty(s,"ClassesList",{set:p(t=>{d.debug("ClassesList is readonly")},"set"),get:p(()=>ts(),"get")}),Object.hasOwn(s,"ClassesNameList")||Object.defineProperty(s,"ClassesNameList",{set(t){d.debug("ClassesNameList is readonly")},get:p(()=>hr(),"get")})},"_define_props"),cr(k)}}),pn,ys,Or=w({"src/captureFalseTouch.ts"(){"use strict";if(P(),q(),pn=!1,ys=p(()=>pn?{passive:!0}:!1,"captureFalseTouch"),y)try{let s=Object.defineProperty({},"passive",{get(){return pn=!0,pn}});window.addEventListener("testPassive",null,s),window.removeEventListener("testPassive",null,s)}catch(s){d.debug(`An error ocurred: ${s}.`),pn=!1}else pn=!1}}),$n,ws=w({"src/range.ts"(){"use strict";Le(),$n=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($n)}}),vs,Sr=w({"src/defaultProcessors.ts"(){"use strict";P(),Nn(),X(),ws(),vs=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=pe(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");Ce.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");ve.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");ve.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");ve.setProcessor(n);let o=p((i,r,a)=>Bn(r).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");ve.setProcessor(o)})()},"setDefaultProcessors")}}),_n,ds=w({"src/findPackageNodePath.ts"(){"use strict";de(),rt(),P(),q(),_n=p(function(s){let t=null;if(!y){let e=null;try{let r=kn("node:fs");r&&typeof r.existsSync=="function"&&(e=r)}catch(r){d.debug(`findPackageNodePath could not load node:fs: ${r}`)}let n=typeof un<"u"&&Array.isArray(un.paths)?un.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(_n)}}),Un,ls=w({"src/Import.ts"(){"use strict";De(),de(),_e(),me(),ds(),P(),q(),Ee(),Un=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<Ln.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){Ln.push(t),r()&&Ln.map(u=>He.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":fe+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=_n(s),a="";if(r!==null)a=r+"/"+s;else{let l=_n(s+".js");l!==null?a=l+"/"+s+".js":a=fe+v.get("relativeImportPath")+s}try{o.call(n,{_imported_:Me(`${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"),Un.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,us=w({"src/mathFunctions.ts"(){"use strict";W=p(function(s){return isNaN(s)?new Number(0):new Number(s)},"__to_number")}}),ps,ur=w({"src/NamespaceRef.ts"(){"use strict";Xn(),$(),ps=p(function(s){let e=(k(s)||[]).filter(n=>Zn(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")}}),Be,hs,$n,pr=w({"src/Ready.ts"(){"use strict";de(),q(),Ee(),X(),Be=p(s=>{y?He.push(s.bind(window)):typeof global<"u"&&He.push(s.bind(global))},"Ready"),hs=Be,$n=p(s=>{let t=p(()=>{He.map(function(e,n){typeof e=="function"&&(e(),He.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")}}),ho,hr,fr=w({"src/ArrayCollection.ts"(){"use strict";var s,t;be(),P(),qe(),us(),ho=(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),hr=(t=class{constructor(){this.source=Q(ho,[])}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)}}),ao,fo,gr=w({"src/Tag.ts"(){"use strict";var s;be(),qe(),$(),q(),fr(),ao=(s=class extends ho{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),fo=p(function(t,e){let n=Q(ao);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",[ao,fo])}}),fs,mr=w({"src/shortCode.ts"(){"use strict";yo(),fs=p(()=>{let t=pe.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...pe.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")}}),go,br=w({"src/super.ts"(){"use strict";be(),go=p(function(s,t){return D(s)[t]},"_super_"),go.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),gs,_r=w({"src/waitUntil.ts"(){"use strict";P(),gs=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")}}),cn,yr=w({"src/subelements.ts"(){"use strict";cn=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),Qs,wr,ha=w({"src/loadSDK.ts"(){"use strict";de(),ds(),ls(),P(),q(),X(),Qs=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=_n("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),zo&&typeof kn<"u"?Me("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):Un(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"),wr=Qs}}),fa=ia({"src/MainProcess.ts"(){"use strict";X(),wo(),dr(),xe(),Zo(),be(),ns(),So(),ts(),de(),_e(),lr(),rt(),ls(),je(),Xn(),P(),us(),ur(),qe(),Jn(),$(),q(),pr(),vo(),gr(),vn(),Kn(),ge(),mr(),me(),Co(),br(),_r(),yr(),os(),ha(),as(),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=cn,Document.prototype.subelements=cn,HTMLElement.prototype.subelements=cn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=cn)),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(Se(r,new Object)),r)),o}),y&&(Element.prototype.append=p(c(function(n){st(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(gs),S(go),S(fn),S(D),S(ee),S(fs),S(Z),S(Oe),k("com.qcobjects",[ln]),y&&(Element.prototype.Cast=p(c(function(n){return Se(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=$n,bo&&document.addEventListener("deviceready",$n,is)):global.onload=$n,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),Ue.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(eo),S(Gn),S(Hn),S(wn),S(T),S(Zn),S(st),S(ps),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 Bn(0,e.length-1).map(function(n){return e[n]})},M(String.prototype.list),cs(),Be(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):wr(),v.get("useSDK")||gn.__start__().catch(e=>{throw Error(e)})}),S(S),S(Un),S(k),S(dn),S(Q),S(fo),S(Be),S(hs),S(y),S(he),S(gn),y&&hn(function(){Be(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"&&Yo.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)?Be(function(){n()}):v.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(R)}}),Cr={};Zs(Cr,{ArrayCollection:c(()=>hr,"ArrayCollection"),ArrayList:c(()=>ho,"ArrayList"),AssignPolyfill:c(()=>ga,"AssignPolyfill"),BackendMicroservice:c(()=>vr,"BackendMicroservice"),CONFIG:c(()=>v,"CONFIG"),Class:c(()=>dn,"Class"),ClassFactory:c(()=>D,"ClassFactory"),ComplexStorageCache:c(()=>fn,"ComplexStorageCache"),Component:c(()=>Ue,"Component"),ComponentURI:c(()=>Hn,"ComponentURI"),ConfigService:c(()=>uo,"ConfigService"),Controller:c(()=>xr,"Controller"),DDO:c(()=>Pr,"DDO"),DefaultTemplateHandler:c(()=>Or,"DefaultTemplateHandler"),Effect:c(()=>_s,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>gn,"GlobalSettings"),Import:c(()=>Un,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>io,"JSONService"),Logger:c(()=>co,"Logger"),NamespaceRef:c(()=>ps,"NamespaceRef"),New:c(()=>Q,"New"),ObjectName:c(()=>wn,"ObjectName"),Package:c(()=>k,"Package"),Processor:c(()=>ln,"Processor"),Ready:c(()=>Be,"Ready"),RegisterClass:c(()=>ms,"RegisterClass"),RegisterWidget:c(()=>Eo,"RegisterWidget"),RegisterWidgets:c(()=>bs,"RegisterWidgets"),Service:c(()=>ro,"Service"),SourceCSS:c(()=>Er,"SourceCSS"),SourceJS:c(()=>Sr,"SourceJS"),Tag:c(()=>fo,"Tag"),TagElements:c(()=>ao,"TagElements"),Timer:c(()=>Tr,"Timer"),Toggle:c(()=>Mr,"Toggle"),TransitionEffect:c(()=>Ar,"TransitionEffect"),VO:c(()=>Ir,"VO"),View:c(()=>Nr,"View"),_Cast:c(()=>Se,"_Cast"),_CastProps:c(()=>Le,"_CastProps"),_ComponentWidget_:c(()=>Wn,"_ComponentWidget_"),_Crypt:c(()=>pe,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>T,"_DataStringify"),_LegacyCopy:c(()=>_o,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>J,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>Ln,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>He,"_QC_READY_LISTENERS"),_Ready:c(()=>$n,"_Ready"),__attributeNotSet_:c(()=>so,"__attributeNotSet_"),__booleanAttribute_:c(()=>Dn,"__booleanAttribute_"),__getType__:c(()=>Z,"__getType__"),__instanceID:c(()=>Pe,"__instanceID"),__is_raw_class__:c(()=>yn,"__is_raw_class__"),__make_global__:c(()=>Qn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>cr,"__top__"),_buildComponentsFromElements_:c(()=>lo,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>Yo,"_fireAsyncLoad"),_methods_:c(()=>he,"_methods_"),_protected_code_:c(()=>M,"_protected_code_"),_require_:c(()=>Me,"_require_"),_super_:c(()=>go,"_super_"),_tag_filter_:c(()=>Oo,"_tag_filter_"),_top:c(()=>R,"_top"),asyncLoad:c(()=>hn,"asyncLoad"),captureFalseTouch:c(()=>is,"captureFalseTouch"),componentLoader:c(()=>Gn,"componentLoader"),componentsStack:c(()=>mn,"componentsStack"),findPackageNodePath:c(()=>_n,"findPackageNodePath"),get:c(()=>ue,"get"),getDocumentLayout:c(()=>_a,"getDocumentLayout"),global:c(()=>R,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>zo,"isNodeCommonJS"),isQCObjects_Class:c(()=>Zn,"isQCObjects_Class"),isQCObjects_Object:c(()=>st,"isQCObjects_Object"),is_a:c(()=>Oe,"is_a"),is_phonegap:c(()=>bo,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>ma,"qcobjects"),range:c(()=>Bn,"range"),ready:c(()=>hs,"ready"),resetTop:c(()=>po,"resetTop"),serviceLoader:c(()=>eo,"serviceLoader"),set:c(()=>bn,"set"),setDefaultProcessors:c(()=>cs,"setDefaultProcessors"),shortCode:c(()=>fs,"shortCode"),subelements:c(()=>cn,"subelements"),waitUntil:c(()=>gs,"waitUntil")});un.exports=ca(Cr);var ga={};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 ma=aa(fa());X();Ee();_e();me();je();P();q();yr();Vn();Qo();wo();Jo();Jn();ge();Kn();Co();_r();xe();Xn();$();be();rt();Zo();U();br();mr();vn();qe();pr();dr();vo();ts();So();ur();lr();gr();ls();De();_e();Yn();U();P();$();var We,vr=(We=class extends G{constructor({domain:t=Cn,basePath:e=fe,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(We,"BackendMicroservice"),p(We,"BackendMicroservice"),We);k("com.qcobjects.api",[vr]);ns();yo();P();vn();mo();Ee();var ms=p(function(s,t){return jn(s,t)},"RegisterClass");Qn(ms);var Re,Or=(Re=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=ve.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=ve.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(Re,"DefaultTemplateHandler"),p(Re,"DefaultTemplateHandler"),Re.__definition={},Re);ms(Or,"com.qcobjects");De();xe();Yn();me();U();$();P();var ze,Sr=(ze=class extends G{constructor(t){super(t),this.domain=Cn,this.basePath=fe,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 Se(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(ze,"SourceJS"),p(ze,"SourceJS"),ze);k("com.qcobjects",[Sr]);De();xe();Yn();me();U();q();$();var Ve,Er=(Ve=class extends G{constructor(t){super(t),this.domain=Cn,this.basePath=fe,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return Se(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(Ve,"SourceCSS"),p(Ve,"SourceCSS"),Ve);k("com.qcobjects",[Er]);os();me();rt();je();q();var Je,ba=(Je=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(Je,"QCObjectsWidgetNode"),p(Je,"QCObjectsWidgetNode"),Je),Wn,Qe,Ze;y?Wn=(Qe=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(Qe,"_ComponentWidget_"),p(Qe,"_ComponentWidget_"),Qe):Wn=(Ze=class extends ba{constructor(){throw super(),new Error("Class not implemented.")}},c(Ze,"_ComponentWidget_"),p(Ze,"_ComponentWidget_"),Ze);S(Wn);var Eo=p(s=>{if(y)customElements.define(s,class extends Wn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),bs=p((...s)=>{[...s].filter(function(e){return typeof e=="string"}).map(function(e){return Eo(e)})},"RegisterWidgets");M(Eo);M(bs);S(Eo);S(bs);de();be();ge();U();P();qe();$();q();var Xe,xr=(Xe=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(Xe,"Controller"),p(Xe,"Controller"),Xe);k("com.qcobjects.controllers",[xr]);ge();U();$();var Ke,Nr=(Ke=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(Ke,"View"),p(Ke,"View"),Ke);k("com.qcobjects.views",[Nr]);ar();U();$();var Ye,Ir=(Ye=class extends G{},c(Ye,"VO"),p(Ye,"VO"),Ye);k("com.qcobjects.valueObjects",[Ir]);U();$();je();be();var ke,_s=(ke=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){ke.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(ke,"_Effect"),p(ke,"Effect"),ke);k("com.qcobjects.effects.base",[_s]);he(D("Effect")).map(s=>(M(s),s));P();$();be();var et,Ar=(et=class extends _s{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 ce=new m({});typeof ce.apply=="function"&&(b=ce.apply.bind(ce),O=ce)}catch(ce){d.debug(`Transition effect ${g} could not be instantiated: ${ce}`)}if(typeof b!="function")return d.debug(`Transition effect ${g} does not declare an apply() method`),g;let I=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,I,...Object.values(B)),g}))}},c(et,"TransitionEffect"),p(et,"TransitionEffect"),et);k("com.qcobjects.effects.transitions.base",[Ar]);U();$();var tt,Tr=(tt=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(tt,"Timer"),p(tt,"Timer"),tt);k("com.qcobjects.timing",[Tr]);es();as();fr();rt();U();P();Jn();var nt,Pr=(nt=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"?wn(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(nt,"DDO"),p(nt,"DDO"),nt);S(Pr);U();P();$();var ot,Mr=(ot=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(ot,"Toggle"),p(ot,"Toggle"),ot);k("com.qcobjects.tools.essentials",[Mr]);ds();var _a=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");us();X();mo();X()});var kr=ne(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});var re=x();re.CONFIG.set("sourceType","module");re.CONFIG.set("relativeImportPath","js/packages/");re.CONFIG.set("componentsBasePath","templates/components/");re.CONFIG.set("delayForReady",1);re.CONFIG.set("preserveComponentBodyTag",!1);re.CONFIG.set("useConfigService",!1);re.CONFIG.set("routingWay","pathname");re.CONFIG.set("useLocalSDK",!0);re.CONFIG.set("tplextension","tpl.html");re.CONFIG.set("asynchronousImportsLoad",!0);re.CONFIG.set("serviceWorkerURI","/sw.js");re.CONFIG.set("overrideComponentTag",!0);re.Component.cached=!0});var Ts=ne((qa,Ii)=>{"use strict";var Ao=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,wa=Object.getOwnPropertyNames,Ca=Object.prototype.hasOwnProperty,_=c((s,t)=>Ao(s,"name",{value:t,configurable:!0}),"__name"),va=c((s,t)=>{for(var e in t)Ao(s,e,{get:t[e],enumerable:!0})},"__export"),Oa=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wa(t))!Ca.call(s,o)&&o!==e&&Ao(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=ya(t,o))||n.enumerable});return s},"__copyProps"),Sa=c(s=>Oa(Ao({},"__esModule",{value:!0}),s),"__toCommonJS"),Lr={};va(Lr,{BasicLayout:c(()=>xi,"BasicLayout"),ButtonField:c(()=>Qr,"ButtonField"),CanvasTool:c(()=>Ei,"CanvasTool"),Contact:c(()=>Dr,"Contact"),CubeSplashScreenComponent:c(()=>li,"CubeSplashScreenComponent"),DataGridController:c(()=>gi,"DataGridController"),EmailField:c(()=>Kr,"EmailField"),Fade:c(()=>Ae,"Fade"),FormController:c(()=>_i,"FormController"),FormField:c(()=>rn,"FormField"),FormValidations:c(()=>bi,"FormValidations"),GenericController:c(()=>pi,"GenericController"),GridComponent:c(()=>ni,"GridComponent"),GridController:c(()=>fi,"GridController"),GridItemComponent:c(()=>ti,"GridItemComponent"),GridView:c(()=>Oi,"GridView"),InputField:c(()=>Zr,"InputField"),ListComponent:c(()=>si,"ListComponent"),ListController:c(()=>hi,"ListController"),ListItemComponent:c(()=>oi,"ListItemComponent"),ModalComponent:c(()=>Ns,"ModalComponent"),ModalController:c(()=>Ci,"ModalController"),ModalEnclosureComponent:c(()=>Yr,"ModalEnclosureComponent"),ModalFade:c(()=>No,"ModalFade"),ModalMoveDown:c(()=>xs,"ModalMoveDown"),ModalMoveUp:c(()=>Es,"ModalMoveUp"),Move:c(()=>se,"Move"),MoveXInFromLeft:c(()=>vs,"MoveXInFromLeft"),MoveXInFromRight:c(()=>Cs,"MoveXInFromRight"),MoveYInFromBottom:c(()=>Os,"MoveYInFromBottom"),MoveYInFromTop:c(()=>qr,"MoveYInFromTop"),NotificationComponent:c(()=>ci,"NotificationComponent"),Radius:c(()=>Br,"Radius"),Resize:c(()=>Ss,"Resize"),Rotate:c(()=>Hr,"Rotate"),RotateX:c(()=>$r,"RotateX"),RotateY:c(()=>Fr,"RotateY"),RotateZ:c(()=>Gr,"RotateZ"),SessionData:c(()=>Ni,"SessionData"),SessionUserToken:c(()=>Io,"SessionUserToken"),ShadowedComponent:c(()=>Jr,"ShadowedComponent"),SlideItemComponent:c(()=>ii,"SlideItemComponent"),SlideListComponent:c(()=>ri,"SlideListComponent"),SliderComponent:c(()=>ai,"SliderComponent"),SliderController:c(()=>mi,"SliderController"),SplashScreenComponent:c(()=>to,"SplashScreenComponent"),SwaggerUIComponent:c(()=>ei,"SwaggerUIComponent"),SwaggerUIController:c(()=>yi,"SwaggerUIController"),TextField:c(()=>Xr,"TextField"),VideoSplashScreenComponent:c(()=>di,"VideoSplashScreenComponent"),WipeDown:c(()=>Vr,"WipeDown"),WipeLeft:c(()=>Ur,"WipeLeft"),WipeRight:c(()=>Wr,"WipeRight"),WipeUp:c(()=>zr,"WipeUp"),default:c(()=>xa,"default"),i18n_messages:c(()=>ws,"i18n_messages")});Ii.exports=Sa(Lr);var xo=x(),ye=x(),it,ws=(it=class extends ye.InheritClass{constructor({messages:t=[]}){super({messages:t}),ye.CONFIG.get("use_i18n",!1)&&(ye.CONFIG.set("lang","en"),(0,ye.get)("i18n")?(0,ye.set)("i18n",{messages:(0,ye.get)("i18n").messages.concat(t)}):(0,ye.set)("i18n",{messages:t}))}_load_i18n_packages_(){return ye.CONFIG.get("i18n_languages",[]).map(t=>{(0,ye.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(it,"i18n_messages"),_(it,"i18n_messages"),it);(0,ye.Package)("org.qcobjects.i18n_messages",[ws]);new ws({})._load_i18n_packages_();var jr=x(),at,Dr=(at=class extends jr.VO{},c(at,"Contact"),_(at,"Contact"),at);(0,jr.Package)("org.qcobjects.models",[Dr]);var F=x(),Ie=x(),ct,Ae=(ct=class extends Ie.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){Ie.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ie.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){Ie.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ie.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}},c(ct,"Fade"),_(ct,"Fade"),ct),dt,se=(dt=class extends Ie.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){Ie.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*r/100;Ie.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(dt,"Move"),_(dt,"Move"),dt);(0,Ie.Package)("org.qcobjects.effects.base",[Ae,se]);var A=x(),lt,Cs=(lt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,t.width,0,0,0)}},c(lt,"MoveXInFromRight"),_(lt,"MoveXInFromRight"),lt),ut,vs=(ut=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,-t.width,0,0,0)}},c(ut,"MoveXInFromLeft"),_(ut,"MoveXInFromLeft"),ut),pt,Os=(pt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,t.height,0,0)}},c(pt,"MoveYInFromBottom"),_(pt,"MoveYInFromBottom"),pt),ht,qr=(ht=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,-t.height,0,0)}},c(ht,"MoveYInFromTop"),_(ht,"MoveYInFromTop"),ht),ft,$r=(ft=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,0,0,"+r.toString()+"deg)"}})}},c(ft,"RotateX"),_(ft,"RotateX"),ft),gt,Fr=(gt=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,1,0,"+r.toString()+"deg)"}})}},c(gt,"RotateY"),_(gt,"RotateY"),gt),mt,Gr=(mt=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,0,1,"+r.toString()+"deg)"}})}},c(mt,"RotateZ"),_(mt,"RotateZ"),mt),bt,Hr=(bt=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=Math.round(e+i*o/100);A.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,1,1,"+r.toString()+"deg)"}})}},c(bt,"Rotate"),_(bt,"Rotate"),bt),_t,Br=(_t=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;A.logger.debug("radius: "+r.toString()),t.style.borderRadius=r.toString()+"px"}})}},c(_t,"Radius"),_(_t,"Radius"),_t),yt,Ss=(yt=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;A.logger.debug("resize: "+r.toString()),t.style.transformOrigin="center",t.style.transform="scale("+r+","+r+")"}})}},c(yt,"Resize"),_(yt,"Resize"),yt),wt,Ur=(wt=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+r+")"}})}},c(wt,"WipeLeft"),_(wt,"WipeLeft"),wt),Ct,Wr=(Ct=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+r+")"}})}},c(Ct,"WipeRight"),_(Ct,"WipeRight"),Ct),vt,zr=(vt=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+r+")"}})}},c(vt,"WipeUp"),_(vt,"WipeUp"),vt),Ot,Vr=(Ot=class extends A.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){A.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;A.logger.debug("wipe: "+r.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+r+")"}})}},c(Ot,"WipeDown"),_(Ot,"WipeDown"),Ot);(0,A.Package)("org.qcobjects.effects.extended",[Cs,vs,Os,qr,$r,Fr,Gr,Hr,Br,Ss,Ur,Wr,zr,Vr]);var Ea=x(),St,No=(St=class extends Ae{constructor(){super(...arguments),this.duration=500}},c(St,"ModalFade"),_(St,"ModalFade"),St),Et,Es=(Et=class extends se{constructor(){super(...arguments),this.duration=800}},c(Et,"ModalMoveUp"),_(Et,"ModalMoveUp"),Et),xt,xs=(xt=class extends se{constructor(){super(...arguments),this.duration=300}},c(xt,"ModalMoveDown"),_(xt,"ModalMoveDown"),xt);(0,Ea.Package)("org.qcobjects.modal.effects",[No,xs,Es]);var Ne=x(),Nt,rn=(Nt=class extends Ne.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",()=>{Ne.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Ne.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Ne.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Ne.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Ne.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");Ne.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Ne.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(Nt,"FormField"),_(Nt,"FormField"),Nt);(0,Ne.Package)("org.qcobjects.base.components",[rn]);var It,Jr=(It=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(It,"ShadowedComponent"),_(It,"ShadowedComponent"),It),At,Qr=(At=class extends rn{constructor(t){t.fieldType="button",super(t)}},c(At,"ButtonField"),_(At,"ButtonField"),At),Tt,Zr=(Tt=class extends rn{constructor(t){t.fieldType="input",super(t)}},c(Tt,"InputField"),_(Tt,"InputField"),Tt),Pt,Xr=(Pt=class extends rn{constructor(t){t.fieldType="textarea",super(t)}},c(Pt,"TextField"),_(Pt,"TextField"),Pt),Mt,Kr=(Mt=class extends rn{constructor(t){t.fieldType="input",super(t)}},c(Mt,"EmailField"),_(Mt,"EmailField"),Mt),Rt,Yr=(Rt=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");Ce.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");Ce.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");Ce.setProcessor(n);let o=p((i,r,a)=>$n(r).map(function(l){return a.replace("{{index}}",l.toString())}).join(""),"repeat");Ce.setProcessor(o)})()},"setDefaultProcessors")}}),On,Cs=w({"src/findPackageNodePath.ts"(){"use strict";le(),it(),P(),q(),On=p(function(s){let t=null;if(!y){let e=null;try{let r=Tn("node:fs");r&&typeof r.existsSync=="function"&&(e=r)}catch(r){d.debug(`findPackageNodePath could not load node:fs: ${r}`)}let n=typeof mn<"u"&&Array.isArray(mn.paths)?mn.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(On)}}),Fn,Os=w({"src/Import.ts"(){"use strict";De(),le(),ye(),be(),Cs(),P(),q(),Ee(),Fn=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 Q)u++;return u<Pn.length?l=!1:l=!0,l},"allPackagesImported"),a=p(function(l){Pn.push(t),r()&&Pn.map(u=>Be.push(u)),y&&C.get("removePackageScriptAfterLoading")&&l.target.remove(),o.call(n,{_imported_:l.target,_package_name_:s})},"readyImported");if(!Object.hasOwn(Q,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":ge+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=On(s),a="";if(r!==null)a=r+"/"+s;else{let l=On(s+".js");l!==null?a=l+"/"+s+".js":a=ge+C.get("relativeImportPath")+s}try{o.call(n,{_imported_:Me(`${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"),Fn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),W,Ss=w({"src/mathFunctions.ts"(){"use strict";W=p(function(s){return isNaN(s)?new Number(0):new Number(s)},"__to_number")}}),Es,Er=w({"src/NamespaceRef.ts"(){"use strict";zn(),$(),Es=p(function(s){let e=(R(s)||[]).filter(n=>Vn(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")}}),Ue,xs,jn,xr=w({"src/Ready.ts"(){"use strict";le(),q(),Ee(),X(),Ue=p(s=>{y?Be.push(s.bind(window)):typeof global<"u"&&Be.push(s.bind(global))},"Ready"),xs=Ue,jn=p(s=>{let t=p(()=>{Be.map(function(e,n){typeof e=="function"&&(e(),Be.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(k)},"_Ready")}}),uo,Nr,Ar=w({"src/ArrayCollection.ts"(){"use strict";var s,t;_e(),P(),qe(),Ss(),uo=(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),Nr=(t=class{constructor(){this.source=J(uo,[])}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=J(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)}}),ro,po,Ir=w({"src/Tag.ts"(){"use strict";var s;_e(),qe(),$(),q(),Ar(),ro=(s=class extends uo{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=J(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),po=p(function(t,e){let n=J(ro);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"),R("com.qcobjects",[ro,po])}}),Ns,Tr=w({"src/shortCode.ts"(){"use strict";bo(),Ns=p(()=>{let t=he.encrypt((Math.random()*1e3).toString().replace(".",""),new Date().getTime().toString());return[...he.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")}}),ho,Pr=w({"src/super.ts"(){"use strict";_e(),ho=p(function(s,t){return D(s)[t]},"_super_"),ho.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),As,Mr=w({"src/waitUntil.ts"(){"use strict";P(),As=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")}}),hn,kr=w({"src/subelements.ts"(){"use strict";hn=p(c(function(t){return[...this.querySelectorAll(t)]},"subelements2"),"subelements")}}),dr,Rr,xa=w({"src/loadSDK.ts"(){"use strict";le(),Cs(),Os(),P(),q(),X(),dr=p(()=>{if(typeof k._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=On("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),rs&&typeof Tn<"u"?Me("qcobjects-sdk")?d.debug("QCObjects SDK was loaded OK."):d.debug("QCObjects SDK could not be imported."):Fn(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"),Rr=dr}}),Na=ya({"src/MainProcess.ts"(){"use strict";X(),_o(),Or(),xe(),ds(),_e(),gs(),Co(),fs(),le(),ye(),Sr(),it(),Os(),Le(),zn(),P(),Ss(),Er(),qe(),Un(),$(),q(),xr(),wo(),Ir(),Nn(),Qn(),me(),Tr(),be(),yo(),Pr(),Mr(),kr(),ms(),xa(),ws(),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=hn,Document.prototype.subelements=hn,HTMLElement.prototype.subelements=hn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=hn)),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(Se(r,new Object)),r)),o}),y&&(Element.prototype.append=p(c(function(n){rt(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(As),S(ho),S(yn),S(D),S(ee),S(Ns),S(Z),S(Oe),R("com.qcobjects",[gn]),y&&(Element.prototype.Cast=p(c(function(n){return Se(this,n)},"QC_Cast"),"QC_Cast")),y?(window.onload=jn,go&&document.addEventListener("deviceready",jn,ys)):global.onload=jn,y&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),We.route().catch(n=>{throw new Error(`An error ocurred when trying to load initial routes. ${n}`)})}),S(Zn),S(Dn),S(qn),S(En),S(T),S(Vn),S(rt),S(Es),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 $n(0,e.length-1).map(function(n){return e[n]})},M(String.prototype.list),vs(),Ue(function(){typeof t._sdk_<"u"?d.debug("The SDK is already present in this bundle, skipping the dynamic import"):Rr(),C.get("useSDK")||wn.__start__().catch(e=>{throw Error(e)})}),S(S),S(Fn),S(R),S(fn),S(J),S(po),S(Ue),S(xs),S(y),S(fe),S(wn),y&&_n(function(){Ue(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"&&ps.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)?Ue(function(){n()}):C.get("secureObjects",!1)&&n()})(y))}),"__qcobjects__"),"__qcobjects__")(k)}}),jr={};lr(jr,{ArrayCollection:c(()=>Nr,"ArrayCollection"),ArrayList:c(()=>uo,"ArrayList"),AssignPolyfill:c(()=>Aa,"AssignPolyfill"),BackendMicroservice:c(()=>Lr,"BackendMicroservice"),CONFIG:c(()=>C,"CONFIG"),Class:c(()=>fn,"Class"),ClassFactory:c(()=>D,"ClassFactory"),ComplexStorageCache:c(()=>yn,"ComplexStorageCache"),Component:c(()=>We,"Component"),ComponentURI:c(()=>qn,"ComponentURI"),ConfigService:c(()=>co,"ConfigService"),Controller:c(()=>Fr,"Controller"),DDO:c(()=>Wr,"DDO"),DefaultTemplateHandler:c(()=>Dr,"DefaultTemplateHandler"),Effect:c(()=>Ps,"Effect"),Export:c(()=>S,"Export"),GlobalSettings:c(()=>wn,"GlobalSettings"),Import:c(()=>Fn,"Import"),InheritClass:c(()=>G,"InheritClass"),JSONService:c(()=>so,"JSONService"),Logger:c(()=>io,"Logger"),NamespaceRef:c(()=>Es,"NamespaceRef"),New:c(()=>J,"New"),ObjectName:c(()=>En,"ObjectName"),Package:c(()=>R,"Package"),Processor:c(()=>gn,"Processor"),Ready:c(()=>Ue,"Ready"),RegisterClass:c(()=>Is,"RegisterClass"),RegisterWidget:c(()=>Oo,"RegisterWidget"),RegisterWidgets:c(()=>Ts,"RegisterWidgets"),Service:c(()=>oo,"Service"),SourceCSS:c(()=>$r,"SourceCSS"),SourceJS:c(()=>qr,"SourceJS"),Tag:c(()=>po,"Tag"),TagElements:c(()=>ro,"TagElements"),Timer:c(()=>Ur,"Timer"),Toggle:c(()=>Vr,"Toggle"),TransitionEffect:c(()=>Br,"TransitionEffect"),VO:c(()=>Hr,"VO"),View:c(()=>Gr,"View"),_Cast:c(()=>Se,"_Cast"),_CastProps:c(()=>je,"_CastProps"),_ComponentWidget_:c(()=>Gn,"_ComponentWidget_"),_Crypt:c(()=>he,"_Crypt"),_DOMCreateElement:c(()=>ee,"_DOMCreateElement"),_DataStringify:c(()=>T,"_DataStringify"),_LegacyCopy:c(()=>mo,"_LegacyCopy"),_QC_CLASSES:c(()=>Y,"_QC_CLASSES"),_QC_PACKAGES:c(()=>Q,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:c(()=>Pn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:c(()=>Be,"_QC_READY_LISTENERS"),_Ready:c(()=>jn,"_Ready"),__attributeNotSet_:c(()=>no,"__attributeNotSet_"),__booleanAttribute_:c(()=>kn,"__booleanAttribute_"),__getType__:c(()=>Z,"__getType__"),__instanceID:c(()=>Pe,"__instanceID"),__is_raw_class__:c(()=>Sn,"__is_raw_class__"),__make_global__:c(()=>Wn,"__make_global__"),__to_number:c(()=>W,"__to_number"),__top__:c(()=>Cr,"__top__"),_buildComponentsFromElements_:c(()=>ao,"_buildComponentsFromElements_"),_fireAsyncLoad:c(()=>ps,"_fireAsyncLoad"),_methods_:c(()=>fe,"_methods_"),_protected_code_:c(()=>M,"_protected_code_"),_require_:c(()=>Me,"_require_"),_super_:c(()=>ho,"_super_"),_tag_filter_:c(()=>vo,"_tag_filter_"),_top:c(()=>k,"_top"),asyncLoad:c(()=>_n,"asyncLoad"),captureFalseTouch:c(()=>ys,"captureFalseTouch"),componentLoader:c(()=>Dn,"componentLoader"),componentsStack:c(()=>vn,"componentsStack"),findPackageNodePath:c(()=>On,"findPackageNodePath"),get:c(()=>pe,"get"),getDocumentLayout:c(()=>Pa,"getDocumentLayout"),global:c(()=>k,"global"),isBrowser:c(()=>y,"isBrowser"),isNodeCommonJS:c(()=>rs,"isNodeCommonJS"),isQCObjects_Class:c(()=>Vn,"isQCObjects_Class"),isQCObjects_Object:c(()=>rt,"isQCObjects_Object"),is_a:c(()=>Oe,"is_a"),is_phonegap:c(()=>go,"is_phonegap"),logger:c(()=>d,"logger"),qcobjects:c(()=>Ia,"qcobjects"),range:c(()=>$n,"range"),ready:c(()=>xs,"ready"),resetTop:c(()=>lo,"resetTop"),serviceLoader:c(()=>Zn,"serviceLoader"),set:c(()=>Cn,"set"),setDefaultProcessors:c(()=>vs,"setDefaultProcessors"),shortCode:c(()=>Ns,"shortCode"),subelements:c(()=>hn,"subelements"),waitUntil:c(()=>As,"waitUntil")});mn.exports=va(jr);var Aa={};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 Ia=wa(Na());X();Ee();ye();be();Le();P();q();kr();Bn();cs();_o();as();Un();me();Qn();yo();Mr();xe();zn();$();_e();it();ds();U();Pr();Tr();Nn();qe();xr();Or();wo();fs();Co();Er();Sr();Ir();Os();De();ye();Jn();U();P();$();var Ve,Lr=(Ve=class extends G{constructor({domain:t=xn,basePath:e=ge,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(Ve,"BackendMicroservice"),p(Ve,"BackendMicroservice"),Ve);R("com.qcobjects.api",[Lr]);gs();bo();P();Nn();fo();Ee();var Is=p(function(s,t){return Mn(s,t)},"RegisterClass");Wn(Is);var ke,Dr=(ke=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=Ce.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=Ce.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(ke,"DefaultTemplateHandler"),p(ke,"DefaultTemplateHandler"),ke.__definition={},ke);Is(Dr,"com.qcobjects");De();xe();Jn();be();U();$();P();var ze,qr=(ze=class extends G{constructor(t){super(t),this.domain=xn,this.basePath=ge,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 Se(this,t)}_new_(t){this.__new__(t),this.rebuild()}},c(ze,"SourceJS"),p(ze,"SourceJS"),ze);R("com.qcobjects",[qr]);De();xe();Jn();be();U();q();$();var Qe,$r=(Qe=class extends G{constructor(t){super(t),this.domain=xn,this.basePath=ge,this.url="",this.data={},this.async=!1,this.external=!1,this.body=ee("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return Se(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(Qe,"SourceCSS"),p(Qe,"SourceCSS"),Qe);R("com.qcobjects",[$r]);ms();be();it();Le();q();var Je,Ta=(Je=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(Je,"QCObjectsWidgetNode"),p(Je,"QCObjectsWidgetNode"),Je),Gn,Ze,Xe;y?Gn=(Ze=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(Ze,"_ComponentWidget_"),p(Ze,"_ComponentWidget_"),Ze):Gn=(Xe=class extends Ta{constructor(){throw super(),new Error("Class not implemented.")}},c(Xe,"_ComponentWidget_"),p(Xe,"_ComponentWidget_"),Xe);S(Gn);var Oo=p(s=>{if(y)customElements.define(s,class extends Gn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),Ts=p((...s)=>{[...s].filter(function(e){return typeof e=="string"}).map(function(e){return Oo(e)})},"RegisterWidgets");M(Oo);M(Ts);S(Oo);S(Ts);le();_e();me();U();P();qe();$();q();var Ke,Fr=(Ke=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=J(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(Ke,"Controller"),p(Ke,"Controller"),Ke);R("com.qcobjects.controllers",[Fr]);me();U();$();var Ye,Gr=(Ye=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(Ye,"View"),p(Ye,"View"),Ye);R("com.qcobjects.views",[Gr]);vr();U();$();var et,Hr=(et=class extends G{},c(et,"VO"),p(et,"VO"),et);R("com.qcobjects.valueObjects",[Hr]);U();$();Le();_e();var Re,Ps=(Re=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){Re.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(Re,"_Effect"),p(Re,"Effect"),Re);R("com.qcobjects.effects.base",[Ps]);fe(D("Effect")).map(s=>(M(s),s));P();$();_e();var tt,Br=(tt=class extends Ps{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 ce=new m({});typeof ce.apply=="function"&&(b=ce.apply.bind(ce),O=ce)}catch(ce){d.debug(`Transition effect ${g} could not be instantiated: ${ce}`)}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(tt,"TransitionEffect"),p(tt,"TransitionEffect"),tt);R("com.qcobjects.effects.transitions.base",[Br]);U();$();var nt,Ur=(nt=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(nt,"Timer"),p(nt,"Timer"),nt);R("com.qcobjects.timing",[Ur]);hs();ws();Ar();it();U();P();Un();var ot,Wr=(ot=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"?En(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(ot,"DDO"),p(ot,"DDO"),ot);S(Wr);U();P();$();var st,Vr=(st=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(st,"Toggle"),p(st,"Toggle"),st);R("com.qcobjects.tools.essentials",[Vr]);Cs();var Pa=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");Ss();X();fo();X()});var Qr=ne(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});var re=x();re.CONFIG.set("sourceType","module");re.CONFIG.set("relativeImportPath","js/packages/");re.CONFIG.set("componentsBasePath","templates/components/");re.CONFIG.set("delayForReady",1);re.CONFIG.set("preserveComponentBodyTag",!1);re.CONFIG.set("useConfigService",!1);re.CONFIG.set("routingWay","pathname");re.CONFIG.set("useLocalSDK",!0);re.CONFIG.set("tplextension","tpl.html");re.CONFIG.set("asynchronousImportsLoad",!0);re.CONFIG.set("serviceWorkerURI","/sw.js");re.CONFIG.set("overrideComponentTag",!0);re.Component.cached=!0});var Bs=ne((oc,Hi)=>{"use strict";var No=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,ka=Object.getOwnPropertyNames,Ra=Object.prototype.hasOwnProperty,_=c((s,t)=>No(s,"name",{value:t,configurable:!0}),"__name"),ja=c((s,t)=>{for(var e in t)No(s,e,{get:t[e],enumerable:!0})},"__export"),La=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ka(t))!Ra.call(s,o)&&o!==e&&No(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=Ma(t,o))||n.enumerable});return s},"__copyProps"),Da=c(s=>La(No({},"__esModule",{value:!0}),s),"__toCommonJS"),Jr={};ja(Jr,{BasicLayout:c(()=>Fi,"BasicLayout"),ButtonField:c(()=>di,"ButtonField"),CanvasTool:c(()=>$i,"CanvasTool"),Contact:c(()=>Xr,"Contact"),CubeSplashScreenComponent:c(()=>Si,"CubeSplashScreenComponent"),DataGridController:c(()=>Ii,"DataGridController"),EmailField:c(()=>pi,"EmailField"),Fade:c(()=>Ie,"Fade"),FormController:c(()=>Mi,"FormController"),FormField:c(()=>an,"FormField"),FormValidations:c(()=>Pi,"FormValidations"),GenericController:c(()=>xi,"GenericController"),GridComponent:c(()=>mi,"GridComponent"),GridController:c(()=>Ai,"GridController"),GridItemComponent:c(()=>gi,"GridItemComponent"),GridView:c(()=>Di,"GridView"),InputField:c(()=>li,"InputField"),ListComponent:c(()=>_i,"ListComponent"),ListController:c(()=>Ni,"ListController"),ListItemComponent:c(()=>bi,"ListItemComponent"),ModalComponent:c(()=>Fs,"ModalComponent"),ModalController:c(()=>ji,"ModalController"),ModalEnclosureComponent:c(()=>hi,"ModalEnclosureComponent"),ModalFade:c(()=>Eo,"ModalFade"),ModalMoveDown:c(()=>$s,"ModalMoveDown"),ModalMoveUp:c(()=>qs,"ModalMoveUp"),Move:c(()=>se,"Move"),MoveXInFromLeft:c(()=>js,"MoveXInFromLeft"),MoveXInFromRight:c(()=>Rs,"MoveXInFromRight"),MoveYInFromBottom:c(()=>Ls,"MoveYInFromBottom"),MoveYInFromTop:c(()=>Kr,"MoveYInFromTop"),NotificationComponent:c(()=>Ci,"NotificationComponent"),Radius:c(()=>oi,"Radius"),Resize:c(()=>Ds,"Resize"),Rotate:c(()=>ni,"Rotate"),RotateX:c(()=>Yr,"RotateX"),RotateY:c(()=>ei,"RotateY"),RotateZ:c(()=>ti,"RotateZ"),SessionData:c(()=>Gi,"SessionData"),SessionUserToken:c(()=>xo,"SessionUserToken"),ShadowedComponent:c(()=>ci,"ShadowedComponent"),SlideItemComponent:c(()=>wi,"SlideItemComponent"),SlideListComponent:c(()=>yi,"SlideListComponent"),SliderComponent:c(()=>vi,"SliderComponent"),SliderController:c(()=>Ti,"SliderController"),SplashScreenComponent:c(()=>Xn,"SplashScreenComponent"),SwaggerUIComponent:c(()=>fi,"SwaggerUIComponent"),SwaggerUIController:c(()=>ki,"SwaggerUIController"),TextField:c(()=>ui,"TextField"),VideoSplashScreenComponent:c(()=>Oi,"VideoSplashScreenComponent"),WipeDown:c(()=>ai,"WipeDown"),WipeLeft:c(()=>si,"WipeLeft"),WipeRight:c(()=>ri,"WipeRight"),WipeUp:c(()=>ii,"WipeUp"),default:c(()=>$a,"default"),i18n_messages:c(()=>ks,"i18n_messages")});Hi.exports=Da(Jr);var So=x(),we=x(),at,ks=(at=class extends we.InheritClass{constructor({messages:t=[]}){super({messages:t}),we.CONFIG.get("use_i18n",!1)&&(we.CONFIG.set("lang","en"),(0,we.get)("i18n")?(0,we.set)("i18n",{messages:(0,we.get)("i18n").messages.concat(t)}):(0,we.set)("i18n",{messages:t}))}_load_i18n_packages_(){return we.CONFIG.get("i18n_languages",[]).map(t=>{(0,we.Import)(`org.quickcorp.i18n_messages.${t}`)})}},c(at,"i18n_messages"),_(at,"i18n_messages"),at);(0,we.Package)("org.qcobjects.i18n_messages",[ks]);new ks({})._load_i18n_packages_();var Zr=x(),ct,Xr=(ct=class extends Zr.VO{},c(ct,"Contact"),_(ct,"Contact"),ct);(0,Zr.Package)("org.qcobjects.models",[Xr]);var F=x(),Ae=x(),dt,Ie=(dt=class extends Ae.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){Ae.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ae.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){Ae.logger.debug("animation progress: "+i.toString());let r=e+i*o/100;Ae.logger.debug("alpha: "+r.toString()),t.style.opacity=r.toString()}})}},c(dt,"Fade"),_(dt,"Fade"),dt),lt,se=(lt=class extends Ae.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){Ae.logger.debug("animation progress: "+l.toString());let u=n+l*a/100,h=e+l*r/100;Ae.logger.debug("x: "+h.toString()+" y:"+u.toString()),t.style.transform="translate("+h+"px,"+u+"px)"}})}},c(lt,"Move"),_(lt,"Move"),lt);(0,Ae.Package)("org.qcobjects.effects.base",[Ie,se]);var I=x(),ut,Rs=(ut=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,t.width,0,0,0)}},c(ut,"MoveXInFromRight"),_(ut,"MoveXInFromRight"),ut),pt,js=(pt=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,-t.width,0,0,0)}},c(pt,"MoveXInFromLeft"),_(pt,"MoveXInFromLeft"),pt),ht,Ls=(ht=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,t.height,0,0)}},c(ht,"MoveYInFromBottom"),_(ht,"MoveYInFromBottom"),ht),ft,Kr=(ft=class extends se{constructor(){super(...arguments),this.duration=1e3}static apply(t){se.apply.call(this,t,0,-t.height,0,0)}},c(ft,"MoveYInFromTop"),_(ft,"MoveYInFromTop"),ft),gt,Yr=(gt=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(gt,"RotateX"),_(gt,"RotateX"),gt),mt,ei=(mt=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(mt,"RotateY"),_(mt,"RotateY"),mt),bt,ti=(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=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(0,0,1,"+r.toString()+"deg)"}})}},c(bt,"RotateZ"),_(bt,"RotateZ"),bt),_t,ni=(_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=Math.round(e+i*o/100);I.logger.debug("angle: "+r.toString()),t.style.transform="rotate3d(1,1,1,"+r.toString()+"deg)"}})}},c(_t,"Rotate"),_(_t,"Rotate"),_t),yt,oi=(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("radius: "+r.toString()),t.style.borderRadius=r.toString()+"px"}})}},c(yt,"Radius"),_(yt,"Radius"),yt),wt,Ds=(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("resize: "+r.toString()),t.style.transformOrigin="center",t.style.transform="scale("+r+","+r+")"}})}},c(wt,"Resize"),_(wt,"Resize"),wt),vt,si=(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="right",t.style.transform="scaleX("+r+")"}})}},c(vt,"WipeLeft"),_(vt,"WipeLeft"),vt),Ct,ri=(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="left",t.style.transform="scaleX("+r+")"}})}},c(Ct,"WipeRight"),_(Ct,"WipeRight"),Ct),Ot,ii=(Ot=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(Ot,"WipeUp"),_(Ot,"WipeUp"),Ot),St,ai=(St=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(St,"WipeDown"),_(St,"WipeDown"),St);(0,I.Package)("org.qcobjects.effects.extended",[Rs,js,Ls,Kr,Yr,ei,ti,ni,oi,Ds,si,ri,ii,ai]);var qa=x(),Et,Eo=(Et=class extends Ie{constructor(){super(...arguments),this.duration=500}},c(Et,"ModalFade"),_(Et,"ModalFade"),Et),xt,qs=(xt=class extends se{constructor(){super(...arguments),this.duration=800}},c(xt,"ModalMoveUp"),_(xt,"ModalMoveUp"),xt),Nt,$s=(Nt=class extends se{constructor(){super(...arguments),this.duration=300}},c(Nt,"ModalMoveDown"),_(Nt,"ModalMoveDown"),Nt);(0,qa.Package)("org.qcobjects.modal.effects",[Eo,$s,qs]);var Ne=x(),At,an=(At=class extends Ne.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",()=>{Ne.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Ne.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Ne.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Ne.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Ne.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");Ne.logger.debug("Binding "+o+" for "+this.name),this.data[o]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Ne.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},c(At,"FormField"),_(At,"FormField"),At);(0,Ne.Package)("org.qcobjects.base.components",[an]);var It,ci=(It=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(It,"ShadowedComponent"),_(It,"ShadowedComponent"),It),Tt,di=(Tt=class extends an{constructor(t){t.fieldType="button",super(t)}},c(Tt,"ButtonField"),_(Tt,"ButtonField"),Tt),Pt,li=(Pt=class extends an{constructor(t){t.fieldType="input",super(t)}},c(Pt,"InputField"),_(Pt,"InputField"),Pt),Mt,ui=(Mt=class extends an{constructor(t){t.fieldType="textarea",super(t)}},c(Mt,"TextField"),_(Mt,"TextField"),Mt),kt,pi=(kt=class extends an{constructor(t){t.fieldType="input",super(t)}},c(kt,"EmailField"),_(kt,"EmailField"),kt),Rt,hi=(Rt=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');
@@ -32,10 +32,10 @@
32
32
  </div>
33
33
 
34
34
  </div>
35
- `,this.data={}}},c(Rt,"ModalEnclosureComponent"),_(Rt,"ModalEnclosureComponent"),Rt),kt,Ns=(kt=class extends F.Component{constructor(t){t.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),super(t),this.name="modal",this.cached=!1,this.modalEnclosureComponentClass="ModalEnclosureComponent",this.controller=null,this.view=null,this.tplsource="none",this.closeOnClickOutside=!1,this.data={content:"",modalId:0},this.submodal=null,this.data.modalId=this.__instanceID;let e=(0,F.New)((0,F.ClassFactory)(this.modalEnclosureComponentClass),{name:this.name,basePath:this.basePath,data:this.data});this.subcomponents.push(e),this.submodal=e,e.tplsource==="none"?this.body.innerHTML=e.parsedAssignmentText:this.body.append(e.body)}modal(){let t=this.data.modalId;(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new No().apply(e,0,1))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>xs.apply(e,0,-document.body.clientHeight,0,0)),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content .close").map(e=>e.addEventListener("click",()=>{this.close()},!1)),this.closeOnClickOutside&&window.addEventListener("click",()=>{this.close()},!1)}close(){let t=this.data.modalId;(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new No({duration:3e3}).apply(e,1,0))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return Es.apply(e,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="none",!0))},900)}rebuild(){let t=super.rebuild();return this.templateURI=(0,F.ComponentURI)({COMPONENTS_BASE_PATH:F.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:F.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),t}},c(kt,"ModalComponent"),_(kt,"ModalComponent"),kt),Lt,ei=(Lt=class extends F.Component{constructor(){super(...arguments),this.cached=!1,this.basePath=F.CONFIG.get("remoteSDKPath",""),this.tplextension="tpl.html",this.name="swagger-ui"}},c(Lt,"SwaggerUIComponent"),_(Lt,"SwaggerUIComponent"),Lt);(0,F.Package)("org.qcobjects.form.components",[Jr,Qr,Zr,Xr,Kr,Yr,Ns,ei]);var Is=x(),jt,ti=(jt=class extends Is.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=`
35
+ `,this.data={}}},c(Rt,"ModalEnclosureComponent"),_(Rt,"ModalEnclosureComponent"),Rt),jt,Fs=(jt=class extends F.Component{constructor(t){t.basePath=F.CONFIG.get("modalBasePath",F.CONFIG.get("remoteSDKPath","")),super(t),this.name="modal",this.cached=!1,this.modalEnclosureComponentClass="ModalEnclosureComponent",this.controller=null,this.view=null,this.tplsource="none",this.closeOnClickOutside=!1,this.data={content:"",modalId:0},this.submodal=null,this.data.modalId=this.__instanceID;let e=(0,F.New)((0,F.ClassFactory)(this.modalEnclosureComponentClass),{name:this.name,basePath:this.basePath,data:this.data});this.subcomponents.push(e),this.submodal=e,e.tplsource==="none"?this.body.innerHTML=e.parsedAssignmentText:this.body.append(e.body)}modal(){let t=this.data.modalId;(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new Eo().apply(e,0,1))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>$s.apply(e,0,-document.body.clientHeight,0,0)),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content .close").map(e=>e.addEventListener("click",()=>{this.close()},!1)),this.closeOnClickOutside&&window.addEventListener("click",()=>{this.close()},!1)}close(){let t=this.data.modalId;(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new Eo({duration:3e3}).apply(e,1,0))),(0,F.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return qs.apply(e,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,F.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="none",!0))},900)}rebuild(){let t=super.rebuild();return this.templateURI=(0,F.ComponentURI)({COMPONENTS_BASE_PATH:F.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:F.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),t}},c(jt,"ModalComponent"),_(jt,"ModalComponent"),jt),Lt,fi=(Lt=class extends F.Component{constructor(){super(...arguments),this.cached=!1,this.basePath=F.CONFIG.get("remoteSDKPath",""),this.tplextension="tpl.html",this.name="swagger-ui"}},c(Lt,"SwaggerUIComponent"),_(Lt,"SwaggerUIComponent"),Lt);(0,F.Package)("org.qcobjects.form.components",[ci,di,li,ui,pi,hi,Fs,fi]);var Gs=x(),Dt,gi=(Dt=class extends Gs.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=`
36
36
  <img src="{{image}}" />
37
37
  <p>{{description}}</p>
38
- `,this.cached=!1}},c(jt,"GridItemComponent"),_(jt,"GridItemComponent"),jt),Dt,ni=(Dt=class extends Is.Component{constructor(t){super(t),this.name="grid",this.cached=!1,this.view=null,this.shadowed=!0,this.rows=3,this.cols=3,this.templateURI="",this.data={},this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},c(Dt,"GridComponent"),_(Dt,"GridComponent"),Dt);(0,Is.Package)("org.qcobjects.components.grid",[ni,ti]);var As=x(),qt,oi=(qt=class extends As.Component{constructor(t){t.name="list-item",super(t),this.shadowed=!1,this.tplsource="inline",this.template='<a href="{{value}}">{{label}}</a>',this.cached=!1}},c(qt,"ListItemComponent"),_(qt,"ListItemComponent"),qt),$t,si=($t=class extends As.Component{constructor(t){t.name="list",super(t),this.shadowed=!0,this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}},c($t,"ListComponent"),_($t,"ListComponent"),$t);(0,As.Package)("org.qcobjects.components.list",[oi,si]);var To=x(),Ft,ri=(Ft=class extends To.Component{constructor(t){super(t),this.tplsource="inline",this.template="<p>Loading...</p>",this.name="slidelist",this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},c(Ft,"SlideListComponent"),_(Ft,"SlideListComponent"),Ft),Gt,ii=(Gt=class extends To.Component{constructor(t){super(t),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=`
38
+ `,this.cached=!1}},c(Dt,"GridItemComponent"),_(Dt,"GridItemComponent"),Dt),qt,mi=(qt=class extends Gs.Component{constructor(t){super(t),this.name="grid",this.cached=!1,this.view=null,this.shadowed=!0,this.rows=3,this.cols=3,this.templateURI="",this.data={},this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},c(qt,"GridComponent"),_(qt,"GridComponent"),qt);(0,Gs.Package)("org.qcobjects.components.grid",[mi,gi]);var Hs=x(),$t,bi=($t=class extends Hs.Component{constructor(t){t.name="list-item",super(t),this.shadowed=!1,this.tplsource="inline",this.template='<a href="{{value}}">{{label}}</a>',this.cached=!1}},c($t,"ListItemComponent"),_($t,"ListItemComponent"),$t),Ft,_i=(Ft=class extends Hs.Component{constructor(t){t.name="list",super(t),this.shadowed=!0,this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}},c(Ft,"ListComponent"),_(Ft,"ListComponent"),Ft);(0,Hs.Package)("org.qcobjects.components.list",[bi,_i]);var Ao=x(),Gt,yi=(Gt=class extends Ao.Component{constructor(t){super(t),this.tplsource="inline",this.template="<p>Loading...</p>",this.name="slidelist",this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},c(Gt,"SlideListComponent"),_(Gt,"SlideListComponent"),Gt),Ht,wi=(Ht=class extends Ao.Component{constructor(t){super(t),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=`
39
39
  <div class="qcoSlides" style="display:none">
40
40
  <div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
41
41
  <img src="{{image}}" alt="{{title}}"/>
@@ -43,7 +43,7 @@
43
43
  <p>{{label}} <a href="{{link}}">{{category}}</a></p>
44
44
  </div>
45
45
  </div>
46
- `,this.tplsource="inline"}},c(Gt,"SlideItemComponent"),_(Gt,"SlideItemComponent"),Gt),Ht,ai=(Ht=class extends To.Component{constructor(t){super(t),this.name="slider",this.template=`
46
+ `,this.tplsource="inline"}},c(Ht,"SlideItemComponent"),_(Ht,"SlideItemComponent"),Ht),Bt,vi=(Bt=class extends Ao.Component{constructor(t){super(t),this.name="slider",this.template=`
47
47
  <style>
48
48
  /* Slideshow container */
49
49
 
@@ -163,7 +163,7 @@
163
163
  <div class="qcoSlider__dots" style="text-align:center">
164
164
  </div>
165
165
 
166
- `,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.body.setAttribute("controllerClass","SliderController")}},c(Ht,"SliderComponent"),_(Ht,"SliderComponent"),Ht);(0,To.Package)("org.qcobjects.components.slider",[ri,ii,ai]);var z=x(),le,ci=(le=class extends z.Component{constructor(t){t.name="notification",t.body=(0,z._DOMCreateElement)("div"),super(t),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=`
166
+ `,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.body.setAttribute("controllerClass","SliderController")}},c(Bt,"SliderComponent"),_(Bt,"SliderComponent"),Bt);(0,Ao.Package)("org.qcobjects.components.slider",[yi,wi,vi]);var V=x(),ue,Ci=(ue=class extends V.Component{constructor(t){t.name="notification",t.body=(0,V._DOMCreateElement)("div"),super(t),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=`
167
167
  <style>
168
168
  div.notification_background {
169
169
  display: block; /* Hidden by default */
@@ -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)(se,{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)(se,{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 Ae({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)(le,{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)(le,{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)(le,{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)(le,{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(le,"_NotificationComponent"),_(le,"NotificationComponent"),le);(0,z.Package)("org.quickcorp.components.notifications",[ci]);var oe=x(),Bt,to=(Bt=class extends oe.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===""||oe.CONFIG.get("routingWay","pathname")==="hash"&&oe.CONFIG.get("start_url","/")===location.hash||oe.CONFIG.get("routingWay","pathname")==="pathname"&&oe.CONFIG.get("start_url","/")===location.pathname||oe.CONFIG.get("routingWay","pathname")==="search"&&oe.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=oe.CONFIG.get("splashscreenBasePath",oe.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 oe.componentsStack<"u"&&oe.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{oe.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 Ss().apply(C,1,0))),new Ae().apply(u,1,0))},a-1e3),setTimeout(function(){new Ae().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(Bt,"SplashScreenComponent"),_(Bt,"SplashScreenComponent"),Bt);(0,oe.Package)("org.qcobjects.components.base",[to]);var Ut,di=(Ut=class extends to{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,V.New)(se,{duration:900,apply(r){(0,V._super_)("Fade","apply").call(this,r,0,1),(0,V._super_)("Move","apply").call(this,r,0,-document.body.clientHeight,0,0)}}),i=(0,V.New)(se,{duration:650,apply(r){(0,V._super_)("Fade","apply").call(this,r,1,0),(0,V._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 Ie({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,V.New)(ue,{name:"notification",shadowed:!0,body:(0,V._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,V.New)(ue,{name:"notification",shadowed:!0,body:(0,V._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,V.New)(ue,{name:"notification",shadowed:!0,body:(0,V._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,V.New)(ue,{name:"notification",shadowed:!0,body:(0,V._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(ue,"_NotificationComponent"),_(ue,"NotificationComponent"),ue);(0,V.Package)("org.quickcorp.components.notifications",[Ci]);var oe=x(),Ut,Xn=(Ut=class extends oe.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===""||oe.CONFIG.get("routingWay","pathname")==="hash"&&oe.CONFIG.get("start_url","/")===location.hash||oe.CONFIG.get("routingWay","pathname")==="pathname"&&oe.CONFIG.get("start_url","/")===location.pathname||oe.CONFIG.get("routingWay","pathname")==="search"&&oe.CONFIG.get("start_url","/")===location.search,o=e&&n;if(o?(t.basePath=oe.CONFIG.get("splashscreenBasePath",oe.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 oe.componentsStack<"u"&&oe.componentsStack.filter(h=>h.body.hasAttribute("splashscreen")).map(h=>{oe.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 Ds().apply(v,1,0))),new Ie().apply(u,1,0))},a-1e3),setTimeout(function(){new Ie().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(Ut,"SplashScreenComponent"),_(Ut,"SplashScreenComponent"),Ut);(0,oe.Package)("org.qcobjects.components.base",[Xn]);var Wt,Oi=(Wt=class extends Xn{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;
@@ -371,7 +371,7 @@
371
371
  </div>
372
372
  </div>
373
373
 
374
- `}},c(Ut,"VideoSplashScreenComponent"),_(Ut,"VideoSplashScreenComponent"),Ut),Wt,li=(Wt=class extends to{constructor(t){t.name="cubesplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
374
+ `}},c(Wt,"VideoSplashScreenComponent"),_(Wt,"VideoSplashScreenComponent"),Wt),Vt,Si=(Vt=class extends Xn{constructor(t){t.name="cubesplashscreen",super(t),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
375
375
  <style>
376
376
  @keyframes spin {
377
377
  0% {
@@ -683,10 +683,10 @@
683
683
  </div>
684
684
  </div>
685
685
 
686
- `}},c(Wt,"CubeSplashScreenComponent"),_(Wt,"CubeSplashScreenComponent"),Wt);(0,oe.Package)("org.qcobjects.components.splashscreen",[to,di,li]);var ui=x(),zt,pi=(zt=class extends ui.Controller{},c(zt,"GenericController"),_(zt,"GenericController"),zt);(0,ui.Package)("org.qcobjects.controllers",[pi]);var N=x(),Vt,hi=(Vt=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}{
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(Vt,"ListController"),_(Vt,"ListController"),Vt);(0,N.Package)("org.qcobjects.controllers.list",[hi]);var E=x(),Jt,fi=(Jt=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(Jt,"GridController"),_(Jt,"GridController"),Jt),Qt,gi=(Qt=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}{
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(Qt,"DataGridController"),_(Qt,"DataGridController"),Qt);(0,E.Package)("org.qcobjects.controllers.grid",[fi,gi]);var $e=x(),Zt,mi=(Zt=class extends $e.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,$e.New)((0,$e.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){$e.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,$e.New)((0,$e.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(o){$e.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(Zt,"SliderController"),_(Zt,"SliderController"),Zt);(0,$e.Package)("org.qcobjects.controllers.slider",[mi]);var V=x(),Xt,bi=(Xt=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(Xt,"FormValidations"),_(Xt,"FormValidations"),Xt),Kt,_i=(Kt=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(rn)}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=`
686
+ `}},c(Vt,"CubeSplashScreenComponent"),_(Vt,"CubeSplashScreenComponent"),Vt);(0,oe.Package)("org.qcobjects.components.splashscreen",[Xn,Oi,Si]);var Ei=x(),zt,xi=(zt=class extends Ei.Controller{},c(zt,"GenericController"),_(zt,"GenericController"),zt);(0,Ei.Package)("org.qcobjects.controllers",[xi]);var N=x(),Qt,Ni=(Qt=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
+ 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(Qt,"ListController"),_(Qt,"ListController"),Qt);(0,N.Package)("org.qcobjects.controllers.list",[Ni]);var E=x(),Jt,Ai=(Jt=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(Jt,"GridController"),_(Jt,"GridController"),Jt),Zt,Ii=(Zt=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
+ 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(Zt,"DataGridController"),_(Zt,"DataGridController"),Zt);(0,E.Package)("org.qcobjects.controllers.grid",[Ai,Ii]);var $e=x(),Xt,Ti=(Xt=class extends $e.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,$e.New)((0,$e.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){$e.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,$e.New)((0,$e.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(o){$e.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(Xt,"SliderController"),_(Xt,"SliderController"),Xt);(0,$e.Package)("org.qcobjects.controllers.slider",[Ti]);var z=x(),Kt,Pi=(Kt=class extends z.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(Kt,"FormValidations"),_(Kt,"FormValidations"),Kt),Yt,Mi=(Yt=class extends z.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(an)}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,z.serviceLoader)((0,z.New)((0,z.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(()=>{z.logger.info("DONE SERVICE COMPONENT"),location.href=this.formSettings.nextRouting},t=>{z.logger.debug(t),location.href=this.formSettings.backRouting})):z.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){z.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>
692
692
  <ul>
@@ -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)(Ns,{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(Kt,"FormController"),_(Kt,"FormController"),Kt);(0,V.Package)("org.qcobjects.controllers.form",[_i,bi]);var te=x(),Yt,yi=(Yt=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(Yt,"SwaggerUIController"),_(Yt,"SwaggerUIController"),Yt);(0,te.Package)("org.qcobjects.controllers.swagger",[yi]);var wi=x(),en,Ci=(en=class extends wi.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(en,"ModalController"),_(en,"ModalController"),en);(0,wi.Package)("org.qcobjects.modal.controllers",[Ci]);var vi=x(),tn,Oi=(tn=class extends vi.View{},c(tn,"GridView"),_(tn,"GridView"),tn);(0,vi.Package)("org.qcobjects.views",[Oi]);var Si=x(),nn,Ei=(nn=class extends Si.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(nn,"CanvasTool"),_(nn,"CanvasTool"),nn);(0,Si.Package)("org.qcobjects.tools.canvas",[Ei]);var L=x(),on,xi=(on=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=>Ae.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>Ae.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>Ae.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),vs.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),Os.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(),Cs.apply(t)})},300)}},c(on,"BasicLayout"),_(on,"BasicLayout"),on);(0,L.Package)("org.qcobjects.tools.layouts",[xi]);var K=x(),H,Io=(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",[Io]);var ys=x(),sn,Ni=(sn=class extends ys.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 Io>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(Io.getGlobalUserToken(t))}`}save(...t){let e=(0,ys._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(sn,"SessionData"),_(sn,"SessionData"),sn);(0,ys.Package)("org.qcobjects.cloud.auth.session.data",[Ni]);_(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=xo.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{xo.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(xo._top);var xa=xo._top});var Ti=ne(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var ie=x(),Na=Ts(),On;(0,ie.Package)("com.qcobjects.installer",[(On=class extends ie.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"),Na.NotificationComponent.success(`TWA in ${n} Mode`)}),(0,ie.set)("installer",this)}beforeinstallprompt(t){return ie.logger.debug("registering installer event"),t.preventDefault(),(0,ie.set)("promptEvent",t),this.root.classList.add("available"),!1}installed(){ie.logger.debug("app is already installed"),(0,ie.set)("promptEvent",null),this.root.classList.remove("available")}install(){let t=this.root;ie.logger.debug("installer actioned");let e=(0,ie.get)("promptEvent",null);e?(ie.logger.debug("prompt event"),e.prompt(),e.userChoice.then(function(n){n.outcome==="accepted"?t.classList.remove("available"):ie.logger.debug("User has chosen not to install the PWA"),e=null}).catch(function(n){e=null,t.classList.remove("available"),ie.logger.warn(`Error during install: ${n.toString()}`)})):ie.logger.debug("It is not possible to get the prompt event for install ")}},c(On,"Installer"),On)])});var Mi=ne(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var Po=x(),Sn,En,xn;(0,Po.Package)("org.quickcorp.custom.effects",[(Sn=class extends Po.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}},c(Sn,"MainTransitionEffect"),Sn),(En=class extends Po.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}},c(En,"SlideLeftTransitionEffect"),En),(xn=class extends Po.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}},c(xn,"SlideRightTransitionEffect"),xn)])});var Li=ne(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});var Ri=x(),Nn;(0,Ri.Package)("org.quickcorp.custom.models",[(Nn=class extends Ri.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}},c(Nn,"ContactVO"),Nn)])});var Di=ne(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});var we=x(),Ls=class Ls extends we.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 z.logger.debug("Unable to find the modal validator..."),z.logger.debug("Saving data..."),this.save()}done(){z.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,z._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,z.New)(Fs,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,z.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){z.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},c(Yt,"FormController"),_(Yt,"FormController"),Yt);(0,z.Package)("org.qcobjects.controllers.form",[Mi,Pi]);var te=x(),en,ki=(en=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(en,"SwaggerUIController"),_(en,"SwaggerUIController"),en);(0,te.Package)("org.qcobjects.controllers.swagger",[ki]);var Ri=x(),tn,ji=(tn=class extends Ri.Controller{done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},c(tn,"ModalController"),_(tn,"ModalController"),tn);(0,Ri.Package)("org.qcobjects.modal.controllers",[ji]);var Li=x(),nn,Di=(nn=class extends Li.View{},c(nn,"GridView"),_(nn,"GridView"),nn);(0,Li.Package)("org.qcobjects.views",[Di]);var qi=x(),on,$i=(on=class extends qi.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(on,"CanvasTool"),_(on,"CanvasTool"),on);(0,qi.Package)("org.qcobjects.tools.canvas",[$i]);var j=x(),sn,Fi=(sn=class extends j.InheritClass{constructor({component:t=null,dependencies:e=[]}){super({component:t,dependencies:e}),this.dependencies=[]}load(){this.dependencies.push((0,j.New)(j.SourceCSS,{external:!j.CONFIG.get("useLocalSDK",!1),url:j.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":j.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,j.Tag)("nav").map(t=>{t.style.border="20px solid #3333"}),(0,j.Tag)("nav").map(t=>{t.style.backgroundColor="#129999"}),(0,j.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,j.Tag)("component>div").map(t=>{t.style.border="3px dashed #fff"}),(0,j.Tag)("component>section").map(t=>{t.style.border="3px solid #000"}),(0,j.Tag)("component>section").map(t=>{t.style.backgroundColor="#fffaaa"}),(0,j.Tag)("component>article").map(t=>{t.style.border="3px dotted #000"}),(0,j.Tag)("component>header").map(t=>{t.style.background="#789"}),(0,j.Tag)("component>footer").map(t=>{t.style.background="#876"}),(0,j.Tag)("component>article:nth-child(1)").map(t=>{t.style.border="1px solid #444"}),(0,j.Tag)("component>article:nth-child(1)").map(t=>{t.style.backgroundColor="#555aaa"}),(0,j.Tag)("component>article:nth-child(2)").map(t=>{t.style.backgroundColor="#aaa333"}),(0,j.Tag)("component>article:nth-child(3)").map(t=>{t.style.backgroundColor="#54da82"}),(0,j.Tag)("*").map(t=>{t.style.color="#fff"}),(0,j.Tag)("component>article").map(t=>Ie.apply(t,0,1)),(0,j.Tag)("component>footer").map(t=>Ie.apply(t,0,1)),(0,j.Tag)("component>header").map(t=>Ie.apply(t,0,1)),(0,j.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),js.apply(t)}),(0,j.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),Ls.apply(t)}),(0,j.Tag)("component>article:nth-child(2)").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),Rs.apply(t)})},300)}},c(sn,"BasicLayout"),_(sn,"BasicLayout"),sn);(0,j.Package)("org.qcobjects.tools.layouts",[Fi]);var K=x(),H,xo=(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",[xo]);var Ms=x(),rn,Gi=(rn=class extends Ms.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 xo>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(xo.getGlobalUserToken(t))}`}save(...t){let e=(0,Ms._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(rn,"SessionData"),_(rn,"SessionData"),rn);(0,Ms.Package)("org.qcobjects.cloud.auth.session.data",[Gi]);_(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=So.GlobalSettings.__start__.bind(t);t._sdk_=Promise.resolve().then(()=>{So.CONFIG.set("useSDK",!0),e()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(So._top);var $a=So._top});var Bi=ne(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.Installer=void 0;var ie=x(),Fa=Bs(),Us=class Us extends ie.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"),Fa.NotificationComponent.success(`TWA in ${n} Mode`)}),(0,ie.set)("installer",this)}beforeinstallprompt(t){return ie.logger.debug("registering installer event"),t.preventDefault(),(0,ie.set)("promptEvent",t),this.root.classList.add("available"),!1}installed(){ie.logger.debug("app is already installed"),(0,ie.set)("promptEvent",null),this.root.classList.remove("available")}install(){let t=this.root;ie.logger.debug("installer actioned");let e=(0,ie.get)("promptEvent",null);e?(ie.logger.debug("prompt event"),e.prompt(),e.userChoice.then(function(n){n.outcome==="accepted"?t.classList.remove("available"):ie.logger.debug("User has chosen not to install the PWA"),e=null}).catch(function(n){e=null,t.classList.remove("available"),ie.logger.warn(`Error during install: ${n.toString()}`)})):ie.logger.debug("It is not possible to get the prompt event for install ")}};c(Us,"Installer");var Io=Us;To.Installer=Io;(0,ie.Package)("com.qcobjects.installer",[Io])});var Ui=ne(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.SlideRightTransitionEffect=Fe.SlideLeftTransitionEffect=Fe.MainTransitionEffect=void 0;var Ro=x(),Ws=class Ws extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}};c(Ws,"MainTransitionEffect");var Po=Ws;Fe.MainTransitionEffect=Po;var Vs=class Vs extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}};c(Vs,"SlideLeftTransitionEffect");var Mo=Vs;Fe.SlideLeftTransitionEffect=Mo;var zs=class zs extends Ro.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}};c(zs,"SlideRightTransitionEffect");var ko=zs;Fe.SlideRightTransitionEffect=ko;(0,Ro.Package)("org.quickcorp.custom.effects",[Po,Mo,ko])});var Vi=ne(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.ContactVO=void 0;var Wi=x(),Qs=class Qs extends Wi.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}};c(Qs,"ContactVO");var jo=Qs;Lo.ContactVO=jo;(0,Wi.Package)("org.quickcorp.custom.models",[jo])});var zi=ne(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.AdminButton=de.AdminSidebarOption=de.AdminCheckComponent=de.DeployGrid=de.GitHubGrid=void 0;var ve=x(),Js=class Js extends ve.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)
@@ -706,7 +706,7 @@
706
706
  }
707
707
  </style>
708
708
  $mapper(github-card,result)
709
- `}};c(Ls,"GitHubGrid");var Ps=Ls,js=class js extends we.Component{constructor(){super(...arguments),this.name="deploygrid",this.template=`
709
+ `}};c(Js,"GitHubGrid");var Do=Js;de.GitHubGrid=Do;var Zs=class Zs extends ve.Component{constructor(){super(...arguments),this.name="deploygrid",this.template=`
710
710
  <style>
711
711
  $layout(landscape,css/desktop/components/deploy-grid.css)
712
712
  $layout(portrait,css/mobile/components/deploy-grid.css)
@@ -724,7 +724,7 @@
724
724
  <netlify-button effectClass=SlideRightTransitionEffect apply-effect-to=observe></netlify-button>
725
725
  <github-button effectClass=SlideLeftTransitionEffect apply-effect-to=observe></github-button>
726
726
  </div>
727
- `}};c(js,"DeployGrid");var Ms=js,Ds=class Ds extends we.Component{constructor(t){t.body?.setAttribute("serviceClass","AdminCheckService"),t.body?.setAttribute("response-to","data"),super(t),this.shadowed=!0,this.tplsource="inline"}};c(Ds,"AdminCheckComponent");var Mo=Ds,qs=class qs extends Mo{constructor(){super(...arguments),this.name="admin-sidebar-option",this.template=`
727
+ `}};c(Zs,"DeployGrid");var qo=Zs;de.DeployGrid=qo;var Xs=class Xs extends ve.Component{constructor(t){t.body?.setAttribute("serviceClass","AdminCheckService"),t.body?.setAttribute("response-to","data"),super(t),this.shadowed=!0,this.tplsource="inline"}};c(Xs,"AdminCheckComponent");var Kn=Xs;de.AdminCheckComponent=Kn;var Ks=class Ks extends Kn{constructor(){super(...arguments),this.name="admin-sidebar-option",this.template=`
728
728
  <style>
729
729
  .admin_option_container {
730
730
  padding:0;
@@ -783,7 +783,7 @@
783
783
  </details>
784
784
 
785
785
  </div>
786
- `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?we.logger.debug("Admin module is present"):(we.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_option_container")?.remove())}catch(n){we.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_option_container")?.remove()}return super.done(t)}};c(qs,"AdminSidebarOption");var Rs=qs,$s=class $s extends Mo{constructor(){super(...arguments),this.name="admin-button",this.template=`
786
+ `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?ve.logger.debug("Admin module is present"):(ve.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_option_container")?.remove())}catch(n){ve.logger.debug(`It was not possible to check if admin module is present: ${n}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_option_container")?.remove()}return super.done(t)}};c(Ks,"AdminSidebarOption");var $o=Ks;de.AdminSidebarOption=$o;var Ys=class Ys extends Kn{constructor(){super(...arguments),this.name="admin-button",this.template=`
787
787
  <style>
788
788
  .admin_button_container {
789
789
  float: left;
@@ -806,7 +806,7 @@
806
806
  <div class="admin_button_container">
807
807
  <a href="/admin" class="topmenu">Admin</a>
808
808
  </div>
809
- `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?we.logger.debug("Admin module is present"):(we.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){we.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($s,"AdminButton");var ks=$s;(0,we.Package)("org.quickcorp.custom.components",[ks,Rs,Ms,Ps])});var $i=ne(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});var ae=x(),Ia=Ts(),Fe,In,An;(0,ae.Package)("org.quickcorp.custom.controllers",[(Fe=class extends ae.Controller{constructor(t){ae.logger.debug("Initializing MainController..."),super(t)}done(...t){let e=super.done();if(!Fe.loaded){let n=(0,ae._DOMCreateElement)("style");n.innerHTML=`
809
+ `}done(t){let e=t.component;console.log(e.serviceData);try{JSON.parse(e.serviceData)?.hasAdmin?ve.logger.debug("Admin module is present"):(ve.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){ve.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(Ys,"AdminButton");var Fo=Ys;de.AdminButton=Fo;(0,ve.Package)("org.quickcorp.custom.components",[Fo,$o,qo,Do])});var Qi=ne(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.HeaderController=Ge.SideNavController=Ge.MainController=void 0;var ae=x(),Ga=Bs(),Yn=class Yn extends ae.Controller{constructor(t){ae.logger.debug("Initializing MainController..."),super(t)}done(...t){let e=super.done();if(!Yn.loaded){let n=(0,ae._DOMCreateElement)("style");n.innerHTML=`
810
810
  @import url(css/body-layout.css);
811
- `,document.body.append(n),ae.logger.debug("MainController loaded"),Fe.loaded=!0}return e}},c(Fe,"MainController"),Fe),(In=class extends ae.Controller{constructor(t){ae.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,ae.set)("sideNavController",this),this.effect=new Ia.Fade({duration:300})}done(...t){let e=super.done();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(In,"SideNavController"),In),(An=class extends ae.Controller{constructor(t){super(t),ae.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){ae.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,ae.New)((0,ae.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done();return this.loadInstallerButton(),e}},c(An,"HeaderController"),An)])});var Hi=ne(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});var Fi=x(),Tn;(0,Fi.Package)("org.quickcorp.custom.views",[(Tn=class extends Fi.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(Tn,"CardView"),Tn)])});var Bi=ne(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.QCObjectsStarsForksService=Ce.QCObjectsVersionService=Ce.GitHubTagService=Ce.GitHubService=void 0;var Pn=x(),Fs=class Fs extends Pn.JSONService{constructor(){super(),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1,delete this.headers.charset}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(Fs,"GitHubService");var Ro=Fs;Ce.GitHubService=Ro;var Gs=class Gs extends Pn.JSONService{constructor(){super(),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1,delete this.headers.charset}done({request:t,service:e}){Pn.logger.debug(String(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(Gs,"GitHubTagService");var ko=Gs;Ce.GitHubTagService=ko;var Hs=class Hs extends Pn.Service{constructor(){super(),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1,delete this.headers.charset}done({service:t}){let e=JSON.parse(t.template)[0];t.template={version:e.name}}};c(Hs,"QCObjectsVersionService");var Lo=Hs;Ce.QCObjectsVersionService=Lo;var Bs=class Bs extends Pn.Service{constructor(){super(),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1,delete this.headers.charset}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(Bs,"QCObjectsStarsForksService");var jo=Bs;Ce.QCObjectsStarsForksService=jo;(0,Pn.Package)("com.qcobjects.services.github",[Ro,ko,Lo,jo])});var Wi=ne(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});var Do=x(),Mn;(0,Do.Package)("com.qcobjects.services.newapp",[(Mn=class extends Do.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,Do._DataStringify)({hasAdmin:e(t.service.template)})}fail(t){t.service.template=(0,Do._DataStringify)({hasAdmin:!1})}},c(Mn,"AdminCheckService"),Mn)])});var Vi=ne(zi=>{"use script";"use strict";Object.defineProperty(zi,"__esModule",{value:!0});Ti();Mi();Li();Di();$i();Hi();Bi();Wi()});var Zi=ne(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var Ji=x();(0,Ji.RegisterWidgets)("layout-basic","splash-screen","github-grid","octocat-icon","lib-list");(0,Ji.RegisterWidgets)("gitpod-button","netlify-button","aws-button","github-button","codespaces-button","deploy-grid")});var Aa=ne(Xi=>{Object.defineProperty(Xi,"__esModule",{value:!0});kr();Vi();Zi()});return Aa();})();
811
+ `,document.body.append(n),ae.logger.debug("MainController loaded"),Yn.loaded=!0}return e}};c(Yn,"MainController");var Go=Yn;Ge.MainController=Go;var er=class er extends ae.Controller{constructor(t){ae.logger.debug("Initializing SideNavController..."),super(t),this.component=t.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,(0,ae.set)("sideNavController",this),this.effect=new Ga.Fade({duration:300})}done(...t){let e=super.done();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(er,"SideNavController");var Ho=er;Ge.SideNavController=Ho;var tr=class tr extends ae.Controller{constructor(t){super(t),ae.logger.debug("Header controller initialized")}loadInstallerButton(){let t=this.component.shadowed?this.component.shadowRoot:this.component.body;if(typeof t>"u"||t===null){ae.logger.debug("HeaderController has no component root yet, skipping installer button");return}t.subelements("#installerbutton").map(e=>(this.installer=(0,ae.New)((0,ae.ClassFactory)("Installer"),e),e))}done(...t){let e=super.done();return this.loadInstallerButton(),e}};c(tr,"HeaderController");var Bo=tr;Ge.HeaderController=Bo;(0,ae.Package)("org.quickcorp.custom.controllers",[Go,Ho,Bo])});var Zi=ne(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.CardView=void 0;var Ji=x(),nr=class nr extends Ji.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(nr,"CardView");var Uo=nr;Wo.CardView=Uo;(0,Ji.Package)("org.quickcorp.custom.views",[Uo])});var oa=ne((bc,na)=>{var Vo=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,Ba=Object.getOwnPropertyNames,Ua=Object.prototype.hasOwnProperty,zo=c((s,t)=>Vo(s,"name",{value:t,configurable:!0}),"__name"),Wa=c((s,t)=>{for(var e in t)Vo(s,e,{get:t[e],enumerable:!0})},"__export"),Va=c((s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ba(t))!Ua.call(s,o)&&o!==e&&Vo(s,o,{get:c(()=>t[o],"get"),enumerable:!(n=Ha(t,o))||n.enumerable});return s},"__copyProps"),za=c(s=>Va(Vo({},"__esModule",{value:!0}),s),"__toCommonJS"),Xi={};Wa(Xi,{GitHubService:c(()=>Ki,"GitHubService"),GitHubTagService:c(()=>Yi,"GitHubTagService"),QCObjectsStarsForksService:c(()=>ta,"QCObjectsStarsForksService"),QCObjectsVersionService:c(()=>ea,"QCObjectsVersionService")});na.exports=za(Xi);var An=x(),cn,Ki=(cn=class extends An.JSONService{constructor(){super(),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1,delete this.headers.charset}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(cn,"GitHubService"),zo(cn,"GitHubService"),cn),dn,Yi=(dn=class extends An.JSONService{constructor(){super(),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1,delete this.headers.charset}done({request:t,service:e}){An.logger.debug(String(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(dn,"GitHubTagService"),zo(dn,"GitHubTagService"),dn),ln,ea=(ln=class extends An.Service{constructor(){super(),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1,delete this.headers.charset}done({service:t}){let e=JSON.parse(t.template)[0];t.template={version:e.name}}},c(ln,"QCObjectsVersionService"),zo(ln,"QCObjectsVersionService"),ln),un,ta=(un=class extends An.Service{constructor(){super(),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json",charset:"utf-8"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1,delete this.headers.charset}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(un,"QCObjectsStarsForksService"),zo(un,"QCObjectsStarsForksService"),un);(0,An.Package)("com.qcobjects.services.github",[Ki,Yi,ea,ta])});var sa=ne(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.AdminCheckService=void 0;var Qo=x(),or=class or extends Qo.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,Qo._DataStringify)({hasAdmin:e(t.service.template)})}fail(t){t.service.template=(0,Qo._DataStringify)({hasAdmin:!1})}};c(or,"AdminCheckService");var Jo=or;Zo.AdminCheckService=Jo;(0,Qo.Package)("com.qcobjects.services.newapp",[Jo])});var ia=ne(ra=>{"use script";"use strict";Object.defineProperty(ra,"__esModule",{value:!0});Bi();Ui();Vi();zi();Qi();Zi();oa();sa()});var da=ne(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});var aa=x();(0,aa.RegisterWidgets)("layout-basic","splash-screen","github-grid","octocat-icon","lib-list");(0,aa.RegisterWidgets)("gitpod-button","netlify-button","aws-button","github-button","codespaces-button","deploy-grid")});var Qa=ne(la=>{Object.defineProperty(la,"__esModule",{value:!0});Qr();ia();da()});return Qa();})();
812
812
  //# sourceMappingURL=init.js.map