qcobjectsnewapp 2.5.7-ts → 2.5.8-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.
- package/CHANGELOG.md +6 -0
- package/VERSION +1 -1
- package/package.json +2 -2
- package/public/js/config.js +4 -4
- package/public/js/config.js.map +2 -2
- package/public/js/customWidgets.js +4 -4
- package/public/js/customWidgets.js.map +2 -2
- package/public/js/init.js +15 -15
- package/public/js/init.js.map +2 -2
- package/public/js/packages/com.qcobjects.installer.js +8 -8
- package/public/js/packages/com.qcobjects.installer.js.map +2 -2
- package/public/js/packages/com.qcobjects.services.github.js +17 -17
- package/public/js/packages/com.qcobjects.services.github.js.map +2 -2
- package/public/js/packages/com.qcobjects.services.newapp.js +4 -4
- package/public/js/packages/com.qcobjects.services.newapp.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.components.js +7 -7
- package/public/js/packages/org.quickcorp.custom.components.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.controllers.js +29 -29
- package/public/js/packages/org.quickcorp.custom.controllers.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.effects.js +4 -4
- package/public/js/packages/org.quickcorp.custom.effects.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.js +10 -10
- package/public/js/packages/org.quickcorp.custom.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.models.js +4 -4
- package/public/js/packages/org.quickcorp.custom.models.js.map +2 -2
- package/public/js/packages/org.quickcorp.custom.views.js +4 -4
- package/public/js/packages/org.quickcorp.custom.views.js.map +2 -2
package/public/js/init.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var global=(()=>{var Fr=Object.defineProperty;var Xi=(o,s,t)=>s in o?Fr(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var l=(o,s)=>Fr(o,"name",{value:s,configurable:!0}),jn=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(s,t)=>(typeof require<"u"?require:s)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var ne=(o,s)=>()=>{try{return s||o((s={exports:{}}).exports,s),s.exports}catch(t){throw s=0,t}};var r=(o,s,t)=>Xi(o,typeof s!="symbol"?s+"":s,t);var I=ne((ka,Ze)=>{"use strict";var Yi=Object.create,Qn=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,Uo=Object.getOwnPropertyNames,ta=Object.getPrototypeOf,na=Object.prototype.hasOwnProperty,f=l((o,s)=>Qn(o,"name",{value:s,configurable:!0}),"__name"),v=l((o,s)=>l(function(){return o&&(s=(0,o[Uo(o)[0]])(o=0)),s},"__init"),"__esm"),oa=l((o,s)=>l(function(){return s||(0,o[Uo(o)[0]])((s={exports:{}}).exports,s),s.exports},"__require"),"__commonJS"),Vr=l((o,s)=>{for(var t in s)Qn(o,t,{get:s[t],enumerable:!0})},"__export"),zr=l((o,s,t,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of Uo(s))!na.call(o,n)&&n!==t&&Qn(o,n,{get:l(()=>s[n],"get"),enumerable:!(e=ea(s,n))||e.enumerable});return o},"__copyProps"),ra=l((o,s,t)=>(t=o!=null?Yi(ta(o)):{},zr(s||!o||!o.__esModule?Qn(t,"default",{value:o,enumerable:!0}):t,o)),"__toESM"),sa=l(o=>zr(Qn({},"__esModule",{value:!0}),o),"__toCommonJS"),_n,Zn=v({"src/is_raw_class.ts"(){"use strict";_n=f(o=>!!(typeof o=="function"&&o.toString().startsWith("class")),"__is_raw_class__")}}),yn,Kn=v({"src/ObjectName.ts"(){"use strict";yn=f(o=>{let s="";return typeof o=="function"&&Object.hasOwn(o,"name")&&o.name!==""?s=o.name:typeof o<"u"&&typeof o.constructor=="function"&&o.constructor.name!==""?s=o.constructor.name:typeof o<"u"&&typeof o.constructor=="object"&&(s=o.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),s},"ObjectName")}}),oe,ge=v({"src/getType.ts"(){"use strict";Zn(),Kn(),oe=f(l(function(s){let t="";switch(!0){case(typeof s=="object"&&!!s.constructor&&!!s.constructor.name&&s.constructor.name!==""):t=s.constructor.name;break;case(typeof s=="function"&&!!s.name):t=s.name;break;case(_n(s)&&!!s.name):t=s.name;break;case(!!s&&!!s.__classType&&s.__classType!==""):t=s.__classType;break;case(!!s&&!!s.__definition&&!!s.__definition.__classType&&s.__definition.__classType!==""):t=s.__definition.__classType;break;default:t=yn(s);break}return t},"__getType__2"),"__getType__")}}),Xn,_o=v({"src/make_global.ts"(){"use strict";ee(),Xn=f(o=>{o&&o.name&&(typeof T<"u"&&typeof o<"u"&&T!==null&&!Object.hasOwn(T,o.name)?pn(o.name,o):typeof global<"u"?global[o.name]=o:typeof globalThis<"u"&&(globalThis[o.name]=o))},"__make_global__")}}),Q,Z,qn,Ve,Fn,Jr,jo,Fo,$o,Go,Qr,so,Oe=v({"src/PrimaryCollections.ts"(){"use strict";ge(),_o(),Q={},Z={},qn=[],Ve=[],Fn=f(function(o,s){let t=oe(o),e=o.name||t;return e.toLowerCase()==="function"&&(e=t),typeof o.__definition>"u"&&(o.__definition={}),o.__definition.__classType=t,typeof s<"u"&&(o.__definition.__namespace=s),Q[e]=o,Xn(o),Q[e]},"__register_class__"),Jr=f(o=>Q[o],"get_QC_CLASS"),jo=f(function(o){let s=[];for(let t of Object.keys(o))typeof o[t]<"u"&&typeof o[t]!="function"&&Object.hasOwn(o[t],"length")&&o[t].length>0&&(s.push(t),s=s.concat(jo(o[t])));return s},"_get_packages_names"),Fo=f(()=>jo(Z),"getPackagesNamesList"),$o=f(()=>[...Fo()].map(o=>{let s=Z[o],t;return s&&(t={packageName:o,classesList:s.filter(function(){return!0})}),t}).filter(function(o){return typeof o<"u"}),"getPackagesList"),Go=f(()=>{let o=[];return[...$o()].forEach(function(s){return o=o.concat(s.classesList.map(t=>({packageName:s.packageName,className:`${s.packageName}.${oe(t)}`,classFactory:t}))),s}),o},"getClassesList"),Qr=f(()=>[...Go()].map(o=>o.className),"getClassesNamesList"),so=f((o,s)=>{Z[o]=s},"set_QC_PACKAGE")}}),S,Re=v({"src/Export.ts"(){"use strict";_o(),S=f(function(o){return Xn(o)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Zr(o){u.debug(`Importing ${o}...`);function s(t){return u.debug(`Validating if ${t} is a package name...`),!t.startsWith(".")&&!t.startsWith("/")&&!t.includes("/")}l(s,"isPackage"),f(s,"isPackage");try{return!/\.[^/\\]+$/.test(o)&&!s(o)&&(u.debug(`${o} does not have an extension and is not a package. Adding js extension.`),o+=".js"),await import(o)}catch(t){u.warn(`Failed to load module: ${t}`)}}l(Zr,"_import_");var ia=v({"src/_import_.ts"(){"use strict";R(),f(Zr,"_import_")}}),qo,y,Wo,$r,Ae,yo,F=v({"src/platform.ts"(){"use strict";ia(),R(),qo=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!qo,Wo=typeof Ze<"u",$r=f(o=>{},"deno_require"),Ae=f(o=>qo?$r(o):(s=>{let t;try{(async()=>{t=await Zr(s)})().then(e=>{t=e&&e.default||e}).catch(e=>{u.warn(`An error ocurred: ${e}`)})}catch(e){u.debug(`An error ocurred importing module. ${e}`),t={export:{}}}return t})(o),"_require_"),yo=(function(){return typeof cordova<"u"})()}}),uo,u,R=v({"src/Logger.ts"(){"use strict";var o;Re(),F(),uo=(o=class{constructor(){r(this,"debugEnabled",!0);r(this,"infoEnabled",!0);r(this,"warnEnabled",!0);r(this,"errorEnabled",!0)}debug(t){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${t}`)}info(t){let e;this.infoEnabled&&(y?e="\x1B[103m%s\x1B[0m":e="\x1B[33m%s\x1B[0m",console.info(e,`[INFO][${performance.now().toLocaleString()}] ${t}`))}warn(t){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${t}`)}error(t){this.errorEnabled&&console.error("\x1B[31m%s\x1B[0m",`[ERROR][${performance.now().toLocaleString()}] ${t}`)}},l(o,"Logger"),f(o,"Logger"),o),u=new uo,S(u)}}),ve,Me,Ee=v({"src/Cast.ts"(){"use strict";R(),ve=f(function(o,s){for(let t in o)if(typeof o[t]<"u")try{s[t]=o[t]}catch(e){u.debug(`An error ocurred: ${e}.`),u.warn(`Unable to cast ${(typeof o).toString()}.${typeof t.toString()} to ${(typeof s).toString()}.${typeof t.toString()}`)}return s},"_Cast"),Me=f(function(o,s,t=!0){for(let e in o)if(typeof o[e]<"u"&&typeof o[e]!="function")try{s[e]=o[e]}catch(n){t||u.debug(`An error ocurred: ${n}.`)}else if(typeof o[e]=="function")try{s[e]=o[e].bind(s)}catch(n){u.warn(n)}return s},"_CastProps")}}),Y,Gr,Hr,me=v({"src/DOMCreateElement.ts"(){"use strict";F(),Y=f(function(o,s,t){let e;return y?e=Hr(o,s,t):e={},e},"_DOMCreateElement"),Gr=f((o,{props:s,children:t})=>o({props:s,children:t}),"ComplexTypeCall"),Hr=f((o,s,t)=>{if(typeof o!="string")return Gr(o,{props:s,children:t});let e=document.createElement(o);return s&&Object.entries(s).forEach(([n,a])=>{typeof a=="string"||typeof a=="number"?e.setAttribute(n,a.toString()):typeof a=="function"&&n.toLowerCase().startsWith("on")&&e.addEventListener(n.slice(2).toLowerCase(),a.bind(e))}),Array.isArray(t)?t.filter((n=>n instanceof Node)).forEach(n=>{e.appendChild(n)}):t instanceof Node?e.appendChild(t):typeof t=="string"&&(e.innerHTML=t),e},"_DOMCreateComplexElement")}}),Te,Vo,zo=v({"src/IncrementInstanceID.ts"(){"use strict";Te=0,Vo=f(()=>{Te=typeof Te>"u"||Te===null?0:Te+1},"IncrementInstanceID")}}),k,fe,ke=v({"src/introspection.ts"(){"use strict";k=f(o=>{let s=typeof o.prototype<"u"?o.prototype.toString:(function(){return""});typeof o.prototype<"u"&&(o.prototype.toString=function(){let t=["__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"],e;return t.includes(this.name)?e=this.name+"{ [QCObjects native code] }":e=s.call(this),e})},"_protected_code_"),k(Function),fe=f(function(o){let s=[];for(let t in o)(typeof o[t]).toLowerCase()==="function"&&s.push(o[t]);return s},"_methods_")}}),D,$=v({"src/Package.ts"(){"use strict";Zn(),Oe(),D=f((o,s=[])=>{if(Object.hasOwn(Z,o)&&typeof Z[o]<"u"&&typeof Z[o]!="string"&&Object.hasOwn(Z[o],"length")&&Z[o].length>0&&typeof s<"u"&&Object.hasOwn(s,"length")&&s.length>0)s.forEach(t=>{Fn(t,o)}),so(o,Z[o].concat(s));else if(typeof s<"u"&&typeof s<"u"&&Object.hasOwn(s,"length")&&s.length>0)s.forEach(t=>{Fn(t,o)}),so(o,s);else if(_n(s))typeof s.__definition>"u"&&(s.__definition={}),s.__definition.__namespace=o,s.__namespace=o,Fn(s,o),so(o,[s]);else throw new Error(`An error ocurred. It was not possible to add classes to ${o}.`);return Object.hasOwn(Z,o)?Z[o]:[]},"Package")}}),H,W=v({"src/InheritClass.ts"(){"use strict";var o;R(),zo(),Ee(),me(),ge(),ke(),to(),F(),Oe(),$(),H=(o=class{constructor(t){r(this,"__definition");r(this,"_body");r(this,"childs");r(this,"__instanceID");r(this,"__namespace");typeof t<"u"&&typeof t.__definition<"u"&&(this.__definition={...t.__definition});let e=this;if(typeof t<"u"&&t!==null&&Object.keys(t).filter(function(n){return isNaN(n)&&!["__instanceID","__classType","__definition"].includes(n)}).forEach(function(n){typeof e[n]=="function"?e[n]=t[n].bind(e):e[n]=t[n]}),Vo(),e.__instanceID||Object.defineProperty(e,"__instanceID",{value:Te,writable:!1}),typeof e.__definition<"u"&&Object.keys(e.__definition).filter(function(n){return isNaN(n)&&!["name","__instanceID","__classType","__definition"].includes(n)}).forEach(function(n){typeof e.__definition[n]=="function"?e[n]=e.__definition[n].bind(e):e[n]=e.__definition[n]}),fe(Q[e.__classType]).map(function(n){return e[n.name]=n.bind(e),n}),fe(e.__definition).map(function(n){return e[n.name]=n.bind(e),n}),e.body)if(typeof e.__definition>"u"||!Object.hasOwn(e.__definition,"body")||typeof e.__definition.body>"u")try{y?e.body=Y(e.__definition.__classType):e.body={}}catch(n){u.debug(`An error ocurred: ${n}.`),e.body={}}else Object.hasOwn(e.__definition,"body")&&(e.body=e.__definition.body);try{if(e.__new__.call(e,t),typeof e=="object"&&Object.hasOwn(e,"_new_")&&typeof e._new_.isCalled>"u")try{e._new_(t),e._new_.isCalled=!0}catch(n){u.warn(`${e.__classType}._new_() failed with error: ${n}`)}}catch(n){u.warn(n)}}get body(){return this._body}set body(t){this._body=t}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(t){let e=f(function(i){return Object.hasOwn(i,"__classType")?i.__classType:oe.call(t,i)},"__classType"),n=f(i=>typeof i<"u"&&typeof i.__proto__<"u"&&i.__proto__!==null?(e(i)!==""?[e(i)]:[]).concat(n(i.__proto__)):[],"__hierarchy__proto__");(typeof t>"u"||t===null)&&(t=this);let a=[];return a.push(e(t)),a=a.concat(n(t.__proto__)),a}__new__(t){Me(t,this)}_new_(t){}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(t){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(u.debug("body style"),this.body&&(this.body.style=ve(t,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let t=this;return this.constructor.hierarchy(t)}append(t){let e=t||this.body;if(u.debug("append: start"),Ce(e,"Component")&&(u.debug("append: child is a Component"),u.debug(`appending the body of ${e.name}`)),typeof this.body<"u")if(u.debug("append element"),arguments.length>0){if(u.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(e);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(e);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(e)}else y&&(u.debug("append to body"),document.body.append(e))}attachIn(t){if(y){let e=document.subelements(t);for(let n=0,a=e.length;n<a;n++)e[n].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},l(o,"InheritClass"),f(o,"InheritClass"),o),D("com.qcobjects",[H])}}),ut,Yn,eo=v({"src/isQCObjects.ts"(){"use strict";W(),ut=f(function(o){return!!(typeof o=="object"&&Object.hasOwn(o,"__classType")&&o.__instanceID&&Object.hasOwn(o,"__definition")&&typeof o.__definition<"u")||o instanceof H},"isQCObjects_Object"),Yn=f(function(o){return!!(typeof o=="function"&&!o.__instanceID&&o.__definition&&typeof o.__definition<"u"&&o.__definition.__classType)||o.prototype instanceof H},"isQCObjects_Class")}}),Ce,to=v({"src/is_a.ts"(){"use strict";ge(),eo(),Kn(),Ce=f((o,s)=>!!(typeof o<"u"&&o!==null&&((Yn(o)||ut(o))&&o.hierarchy().includes(s)||oe(o)===s||yn(o)===s||typeof o===s)),"is_a")}}),Kr,aa=v({"src/is_forbidden_name.ts"(){"use strict";Kr=f(o=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(o)!==-1,"__is__forbidden_name__")}}),wo,Jo=v({"src/LegacyCopy.ts"(){"use strict";Zn(),wo=f(function(o,s){var e;let t;switch(!0){case typeof o=="string":t=o;break;case typeof o=="number":t=o;break;case typeof o=="object":t=[{...Object.keys(o).filter(n=>!s?.includes(n))}].map(n=>({[n]:o[n]})).reduce((n,a)=>Object.assign(n,a));break;case typeof o=="function":t=o.bind({});break;case _n(o):t=(e=class extends o{},l(e,"_value_"),f(e,"_value_"),e);break;default:break}return t},"_LegacyCopy")}}),Je,Co=v({"src/Class.ts"(){"use strict";Oe(),Ee(),me(),ge(),zo(),ke(),to(),aa(),Jo(),R(),F(),ee(),Je=f((o,s,t)=>{var i,c;let e={},n,a;switch(!0){case(!o&&!s&&!t):return class{};case(!!o&&!s&&!t):n=(i=class{},l(i,"type"),f(i,"type"),i),a={};break;case(!!o&&!s&&!!t):n=(c=class{},l(c,"type"),f(c,"type"),c),a=t;break;case(!!o&&!!s&&!!t):n=s,a=t;break;default:return class{}}if(typeof o!="string")throw new Error("Class name must be a string");if(typeof n!="function")throw new Error("Class type must be a function or class");if(Kr(o))throw new Error(`${o} is not an allowed word in the name of a class`);return typeof n.__definition=="object"&&n.__definition&&Object.keys(n.__definition).length!==0&&(a.__definition=Object.assign(wo(n.__definition,["name"]),n)),e[n.name]=n,typeof a>"u"||a===null?a={}:a={...a},typeof a.__instanceID<"u"&&delete a.__instanceID,Q[o]=class extends e[n.name]{constructor(g){super(g||{});r(this,"__instanceID");r(this,"__namespace");r(this,"__definition",{...a});r(this,"childs");r(this,"_body");let p=this;if(Vo(),p.__instanceID||Object.defineProperty(p,"__instanceID",{value:Te,writable:!1}),typeof p.__definition<"u"&&Object.keys(p.__definition).filter(function(h){return isNaN(h)&&!["name","__instanceID","__classType","__definition"].includes(h)}).forEach(function(h){typeof p.__definition[h]=="function"?p[h]=p.__definition[h].bind(p):p[h]=p.__definition[h]}),fe(Q[p.__classType]).map(function(h){return p[h.name]=h.bind(p),h}),fe(p.__definition).map(function(h){return p[h.name]=h.bind(p),h}),p.body)if(typeof p.__definition>"u"||!Object.hasOwn(p.__definition,"body")||typeof p.__definition.body>"u")try{y?p.body=Y(p.__definition.__classType):p.body={}}catch(h){u.debug(`An error ocurred: ${h}.`),p.body={}}else Object.hasOwn(p.__definition,"body")&&(p.body=p.__definition.body);try{if(typeof p.__new__=="function"?p.__new__.call(p,g):typeof super.__new__=="function"&&(p.__new__=super.__new__.bind(p),p.__new__.call(p,g)),typeof p=="object"&&Object.hasOwn(p,"_new_")&&typeof p._new_.isCalled>"u")try{p._new_(g),p._new_.isCalled=!0}catch(h){u.warn(`${p.__classType}._new_() failed with error: ${h}`)}}catch(h){u.warn(h)}}get body(){return this._body}set body(g){this._body=g}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(g){let p=f(function(b){return Object.hasOwn(b,"__classType")?b.__classType:oe.call(g,b)},"__classType"),h=f(b=>typeof b<"u"&&typeof b.__proto__<"u"&&b.__proto__!==null?(p(b)!==""?[p(b)]:[]).concat(h(b.__proto__)):[],"__hierarchy__proto__");(typeof g>"u"||g===null)&&(g=this);let m=[];return m.push(p(g)),m=m.concat(h(g.__proto__)),m}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(g){Me(g,this)}_new_(g){}getClass(){return Object.getPrototypeOf(this.constructor)}css(g){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(u.debug("body style"),this.body&&(this.body.style=ve(g,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let g=this;return this.getClass()?.hierarchy(g)}append(g){let p=g||this.body;if(u.debug("append: start"),Ce(p,"Component")&&(u.debug("append: child is a Component"),u.debug(`appending the body of ${p.name}`)),typeof this.body<"u")if(u.debug("append element"),arguments.length>0){if(u.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(p);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(p);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(p)}else y&&(u.debug("append to body"),document.body.append(p))}attachIn(g){if(y){let p=document.subelements(g);for(let h=0,m=p.length;h<m;h++)p[h].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},Q[o]=Me(a,Q[o]),Q[o].__definition=a,Q[o].__definition.__classType=o,T[o]=Q[o],Q[o]},"Class"),typeof Je.prototype<"u"&&(Je.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),j,le=v({"src/ClassFactory.ts"(){"use strict";Zn(),Oe(),j=f(o=>{let s;if(typeof o>"u"||o===null)throw Error("You need to pass a parameter {className}");if(o!==null&&o.indexOf(".")!==-1){let t=o.split(".").slice(0,o.split(".").length-1).join("."),e=o.split(".").slice(-1).join(""),a=(Z[t]||[]).filter(i=>_n(i)).reverse();if(a.length>0)s=a[0];else throw Error(`Class ${e} not found. Found classes: ${JSON.stringify(a)} in package ${t}`)}else if(o!==null){if(s=Jr(o),typeof s>"u")throw new Error(`${o} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
|
|
1
|
+
"use strict";var global=(()=>{var Fr=Object.defineProperty;var Xi=(o,s,t)=>s in o?Fr(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var l=(o,s)=>Fr(o,"name",{value:s,configurable:!0}),Ln=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(s,t)=>(typeof require<"u"?require:s)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var ne=(o,s)=>()=>{try{return s||o((s={exports:{}}).exports,s),s.exports}catch(t){throw s=0,t}};var r=(o,s,t)=>Xi(o,typeof s!="symbol"?s+"":s,t);var T=ne((ka,Ze)=>{"use strict";var Yi=Object.create,Jn=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,Uo=Object.getOwnPropertyNames,ta=Object.getPrototypeOf,na=Object.prototype.hasOwnProperty,f=l((o,s)=>Jn(o,"name",{value:s,configurable:!0}),"__name"),v=l((o,s)=>l(function(){return o&&(s=(0,o[Uo(o)[0]])(o=0)),s},"__init"),"__esm"),oa=l((o,s)=>l(function(){return s||(0,o[Uo(o)[0]])((s={exports:{}}).exports,s),s.exports},"__require"),"__commonJS"),Vr=l((o,s)=>{for(var t in s)Jn(o,t,{get:s[t],enumerable:!0})},"__export"),zr=l((o,s,t,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of Uo(s))!na.call(o,n)&&n!==t&&Jn(o,n,{get:l(()=>s[n],"get"),enumerable:!(e=ea(s,n))||e.enumerable});return o},"__copyProps"),ra=l((o,s,t)=>(t=o!=null?Yi(ta(o)):{},zr(s||!o||!o.__esModule?Jn(t,"default",{value:o,enumerable:!0}):t,o)),"__toESM"),sa=l(o=>zr(Jn({},"__esModule",{value:!0}),o),"__toCommonJS"),bn,Qn=v({"src/is_raw_class.ts"(){"use strict";bn=f(o=>!!(typeof o=="function"&&o.toString().startsWith("class")),"__is_raw_class__")}}),_n,Zn=v({"src/ObjectName.ts"(){"use strict";_n=f(o=>{let s="";return typeof o=="function"&&Object.hasOwn(o,"name")&&o.name!==""?s=o.name:typeof o<"u"&&typeof o.constructor=="function"&&o.constructor.name!==""?s=o.constructor.name:typeof o<"u"&&typeof o.constructor=="object"&&(s=o.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),s},"ObjectName")}}),oe,ge=v({"src/getType.ts"(){"use strict";Qn(),Zn(),oe=f(l(function(s){let t="";switch(!0){case(typeof s=="object"&&!!s.constructor&&!!s.constructor.name&&s.constructor.name!==""):t=s.constructor.name;break;case(typeof s=="function"&&!!s.name):t=s.name;break;case(bn(s)&&!!s.name):t=s.name;break;case(!!s&&!!s.__classType&&s.__classType!==""):t=s.__classType;break;case(!!s&&!!s.__definition&&!!s.__definition.__classType&&s.__definition.__classType!==""):t=s.__definition.__classType;break;default:t=_n(s);break}return t},"__getType__2"),"__getType__")}}),Kn,bo=v({"src/make_global.ts"(){"use strict";ee(),Kn=f(o=>{o&&o.name&&(typeof I<"u"&&typeof o<"u"&&I!==null&&!Object.hasOwn(I,o.name)?xo(o.name,o):typeof global<"u"?global[o.name]=o:typeof globalThis<"u"&&(globalThis[o.name]=o))},"__make_global__")}}),Q,Z,jn,Ve,qn,Jr,jo,Fo,$o,Go,Qr,ro,Oe=v({"src/PrimaryCollections.ts"(){"use strict";ge(),bo(),Q={},Z={},jn=[],Ve=[],qn=f(function(o,s){let t=oe(o),e=o.name||t;return e.toLowerCase()==="function"&&(e=t),typeof o.__definition>"u"&&(o.__definition={}),o.__definition.__classType=t,typeof s<"u"&&(o.__definition.__namespace=s),Q[e]=o,Kn(o),Q[e]},"__register_class__"),Jr=f(o=>Q[o],"get_QC_CLASS"),jo=f(function(o){let s=[];for(let t of Object.keys(o))typeof o[t]<"u"&&typeof o[t]!="function"&&Object.hasOwn(o[t],"length")&&o[t].length>0&&(s.push(t),s=s.concat(jo(o[t])));return s},"_get_packages_names"),Fo=f(()=>jo(Z),"getPackagesNamesList"),$o=f(()=>[...Fo()].map(o=>{let s=Z[o],t;return s&&(t={packageName:o,classesList:s.filter(function(){return!0})}),t}).filter(function(o){return typeof o<"u"}),"getPackagesList"),Go=f(()=>{let o=[];return[...$o()].forEach(function(s){return o=o.concat(s.classesList.map(t=>({packageName:s.packageName,className:`${s.packageName}.${oe(t)}`,classFactory:t}))),s}),o},"getClassesList"),Qr=f(()=>[...Go()].map(o=>o.className),"getClassesNamesList"),ro=f((o,s)=>{Z[o]=s},"set_QC_PACKAGE")}}),S,Re=v({"src/Export.ts"(){"use strict";bo(),S=f(function(o){return Kn(o)},"Export"),S.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"}}});async function Zr(o){u.debug(`Importing ${o}...`);function s(t){return u.debug(`Validating if ${t} is a package name...`),!t.startsWith(".")&&!t.startsWith("/")&&!t.includes("/")}l(s,"isPackage"),f(s,"isPackage");try{return!/\.[^/\\]+$/.test(o)&&!s(o)&&(u.debug(`${o} does not have an extension and is not a package. Adding js extension.`),o+=".js"),await import(o)}catch(t){u.warn(`Failed to load module: ${t}`)}}l(Zr,"_import_");var ia=v({"src/_import_.ts"(){"use strict";R(),f(Zr,"_import_")}}),qo,y,Wo,$r,Ae,_o,F=v({"src/platform.ts"(){"use strict";ia(),R(),qo=typeof window<"u"&&"Deno"in window,y=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!qo,Wo=typeof Ze<"u",$r=f(o=>{},"deno_require"),Ae=f(o=>qo?$r(o):(s=>{let t;try{(async()=>{t=await Zr(s)})().then(e=>{t=e&&e.default||e}).catch(e=>{u.warn(`An error ocurred: ${e}`)})}catch(e){u.debug(`An error ocurred importing module. ${e}`),t={export:{}}}return t})(o),"_require_"),_o=(function(){return typeof cordova<"u"})()}}),lo,u,R=v({"src/Logger.ts"(){"use strict";var o;Re(),F(),lo=(o=class{constructor(){r(this,"debugEnabled",!0);r(this,"infoEnabled",!0);r(this,"warnEnabled",!0);r(this,"errorEnabled",!0)}debug(t){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${t}`)}info(t){let e;this.infoEnabled&&(y?e="\x1B[103m%s\x1B[0m":e="\x1B[33m%s\x1B[0m",console.info(e,`[INFO][${performance.now().toLocaleString()}] ${t}`))}warn(t){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${t}`)}error(t){this.errorEnabled&&console.error("\x1B[31m%s\x1B[0m",`[ERROR][${performance.now().toLocaleString()}] ${t}`)}},l(o,"Logger"),f(o,"Logger"),o),u=new lo,S(u)}}),ve,Me,Ee=v({"src/Cast.ts"(){"use strict";R(),ve=f(function(o,s){for(let t in o)if(typeof o[t]<"u")try{s[t]=o[t]}catch(e){u.debug(`An error ocurred: ${e}.`),u.warn(`Unable to cast ${(typeof o).toString()}.${typeof t.toString()} to ${(typeof s).toString()}.${typeof t.toString()}`)}return s},"_Cast"),Me=f(function(o,s,t=!0){for(let e in o)if(typeof o[e]<"u"&&typeof o[e]!="function")try{s[e]=o[e]}catch(n){t||u.debug(`An error ocurred: ${n}.`)}else if(typeof o[e]=="function")try{s[e]=o[e].bind(s)}catch(n){u.warn(n)}return s},"_CastProps")}}),Y,Gr,Hr,me=v({"src/DOMCreateElement.ts"(){"use strict";F(),Y=f(function(o,s,t){let e;return y?e=Hr(o,s,t):e={},e},"_DOMCreateElement"),Gr=f((o,{props:s,children:t})=>o({props:s,children:t}),"ComplexTypeCall"),Hr=f((o,s,t)=>{if(typeof o!="string")return Gr(o,{props:s,children:t});let e=document.createElement(o);return s&&Object.entries(s).forEach(([n,a])=>{typeof a=="string"||typeof a=="number"?e.setAttribute(n,a.toString()):typeof a=="function"&&n.toLowerCase().startsWith("on")&&e.addEventListener(n.slice(2).toLowerCase(),a.bind(e))}),Array.isArray(t)?t.filter((n=>n instanceof Node)).forEach(n=>{e.appendChild(n)}):t instanceof Node?e.appendChild(t):typeof t=="string"&&(e.innerHTML=t),e},"_DOMCreateComplexElement")}}),Te,Vo,zo=v({"src/IncrementInstanceID.ts"(){"use strict";Te=0,Vo=f(()=>{Te=typeof Te>"u"||Te===null?0:Te+1},"IncrementInstanceID")}}),k,fe,ke=v({"src/introspection.ts"(){"use strict";k=f(o=>{let s=typeof o.prototype<"u"?o.prototype.toString:(function(){return""});typeof o.prototype<"u"&&(o.prototype.toString=function(){let t=["__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"],e;return t.includes(this.name)?e=this.name+"{ [QCObjects native code] }":e=s.call(this),e})},"_protected_code_"),k(Function),fe=f(function(o){let s=[];for(let t in o)(typeof o[t]).toLowerCase()==="function"&&s.push(o[t]);return s},"_methods_")}}),D,$=v({"src/Package.ts"(){"use strict";Qn(),Oe(),D=f((o,s=[])=>{if(Object.hasOwn(Z,o)&&typeof Z[o]<"u"&&typeof Z[o]!="string"&&Object.hasOwn(Z[o],"length")&&Z[o].length>0&&typeof s<"u"&&Object.hasOwn(s,"length")&&s.length>0)s.forEach(t=>{qn(t,o)}),ro(o,Z[o].concat(s));else if(typeof s<"u"&&typeof s<"u"&&Object.hasOwn(s,"length")&&s.length>0)s.forEach(t=>{qn(t,o)}),ro(o,s);else if(bn(s))typeof s.__definition>"u"&&(s.__definition={}),s.__definition.__namespace=o,s.__namespace=o,qn(s,o),ro(o,[s]);else throw new Error(`An error ocurred. It was not possible to add classes to ${o}.`);return Object.hasOwn(Z,o)?Z[o]:[]},"Package")}}),H,W=v({"src/InheritClass.ts"(){"use strict";var o;R(),zo(),Ee(),me(),ge(),ke(),eo(),F(),Oe(),$(),H=(o=class{constructor(t){r(this,"__definition");r(this,"_body");r(this,"childs");r(this,"__instanceID");r(this,"__namespace");typeof t<"u"&&typeof t.__definition<"u"&&(this.__definition={...t.__definition});let e=this;if(typeof t<"u"&&t!==null&&Object.keys(t).filter(function(n){return isNaN(n)&&!["__instanceID","__classType","__definition"].includes(n)}).forEach(function(n){typeof e[n]=="function"?e[n]=t[n].bind(e):e[n]=t[n]}),Vo(),e.__instanceID||Object.defineProperty(e,"__instanceID",{value:Te,writable:!1}),typeof e.__definition<"u"&&Object.keys(e.__definition).filter(function(n){return isNaN(n)&&!["name","__instanceID","__classType","__definition"].includes(n)}).forEach(function(n){typeof e.__definition[n]=="function"?e[n]=e.__definition[n].bind(e):e[n]=e.__definition[n]}),fe(Q[e.__classType]).map(function(n){return e[n.name]=n.bind(e),n}),fe(e.__definition).map(function(n){return e[n.name]=n.bind(e),n}),e.body)if(typeof e.__definition>"u"||!Object.hasOwn(e.__definition,"body")||typeof e.__definition.body>"u")try{y?e.body=Y(e.__definition.__classType):e.body={}}catch(n){u.debug(`An error ocurred: ${n}.`),e.body={}}else Object.hasOwn(e.__definition,"body")&&(e.body=e.__definition.body);try{if(e.__new__.call(e,t),typeof e=="object"&&Object.hasOwn(e,"_new_")&&typeof e._new_.isCalled>"u")try{e._new_(t),e._new_.isCalled=!0}catch(n){u.warn(`${e.__classType}._new_() failed with error: ${n}`)}}catch(n){u.warn(n)}}get body(){return this._body}set body(t){this._body=t}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(t){let e=f(function(i){return Object.hasOwn(i,"__classType")?i.__classType:oe.call(t,i)},"__classType"),n=f(i=>typeof i<"u"&&typeof i.__proto__<"u"&&i.__proto__!==null?(e(i)!==""?[e(i)]:[]).concat(n(i.__proto__)):[],"__hierarchy__proto__");(typeof t>"u"||t===null)&&(t=this);let a=[];return a.push(e(t)),a=a.concat(n(t.__proto__)),a}__new__(t){Me(t,this)}_new_(t){}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(t){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(u.debug("body style"),this.body&&(this.body.style=ve(t,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let t=this;return this.constructor.hierarchy(t)}append(t){let e=t||this.body;if(u.debug("append: start"),Ce(e,"Component")&&(u.debug("append: child is a Component"),u.debug(`appending the body of ${e.name}`)),typeof this.body<"u")if(u.debug("append element"),arguments.length>0){if(u.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(e);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(e);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(e)}else y&&(u.debug("append to body"),document.body.append(e))}attachIn(t){if(y){let e=document.subelements(t);for(let n=0,a=e.length;n<a;n++)e[n].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},l(o,"InheritClass"),f(o,"InheritClass"),o),D("com.qcobjects",[H])}}),ut,Xn,Yn=v({"src/isQCObjects.ts"(){"use strict";W(),ut=f(function(o){return!!(typeof o=="object"&&Object.hasOwn(o,"__classType")&&o.__instanceID&&Object.hasOwn(o,"__definition")&&typeof o.__definition<"u")||o instanceof H},"isQCObjects_Object"),Xn=f(function(o){return!!(typeof o=="function"&&!o.__instanceID&&o.__definition&&typeof o.__definition<"u"&&o.__definition.__classType)||o.prototype instanceof H},"isQCObjects_Class")}}),Ce,eo=v({"src/is_a.ts"(){"use strict";ge(),Yn(),Zn(),Ce=f((o,s)=>!!(typeof o<"u"&&o!==null&&((Xn(o)||ut(o))&&o.hierarchy().includes(s)||oe(o)===s||_n(o)===s||typeof o===s)),"is_a")}}),Kr,aa=v({"src/is_forbidden_name.ts"(){"use strict";Kr=f(o=>["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID","function","Function"].indexOf(o)!==-1,"__is__forbidden_name__")}}),yo,Jo=v({"src/LegacyCopy.ts"(){"use strict";Qn(),yo=f(function(o,s){var e;let t;switch(!0){case typeof o=="string":t=o;break;case typeof o=="number":t=o;break;case typeof o=="object":t=[{...Object.keys(o).filter(n=>!s?.includes(n))}].map(n=>({[n]:o[n]})).reduce((n,a)=>Object.assign(n,a));break;case typeof o=="function":t=o.bind({});break;case bn(o):t=(e=class extends o{},l(e,"_value_"),f(e,"_value_"),e);break;default:break}return t},"_LegacyCopy")}}),Je,wo=v({"src/Class.ts"(){"use strict";Oe(),Ee(),me(),ge(),zo(),ke(),eo(),aa(),Jo(),R(),F(),ee(),Je=f((o,s,t)=>{var i,c;let e={},n,a;switch(!0){case(!o&&!s&&!t):return class{};case(!!o&&!s&&!t):n=(i=class{},l(i,"type"),f(i,"type"),i),a={};break;case(!!o&&!s&&!!t):n=(c=class{},l(c,"type"),f(c,"type"),c),a=t;break;case(!!o&&!!s&&!!t):n=s,a=t;break;default:return class{}}if(typeof o!="string")throw new Error("Class name must be a string");if(typeof n!="function")throw new Error("Class type must be a function or class");if(Kr(o))throw new Error(`${o} is not an allowed word in the name of a class`);return typeof n.__definition=="object"&&n.__definition&&Object.keys(n.__definition).length!==0&&(a.__definition=Object.assign(yo(n.__definition,["name"]),n)),e[n.name]=n,typeof a>"u"||a===null?a={}:a={...a},typeof a.__instanceID<"u"&&delete a.__instanceID,Q[o]=class extends e[n.name]{constructor(g){super(g||{});r(this,"__instanceID");r(this,"__namespace");r(this,"__definition",{...a});r(this,"childs");r(this,"_body");let p=this;if(Vo(),p.__instanceID||Object.defineProperty(p,"__instanceID",{value:Te,writable:!1}),typeof p.__definition<"u"&&Object.keys(p.__definition).filter(function(h){return isNaN(h)&&!["name","__instanceID","__classType","__definition"].includes(h)}).forEach(function(h){typeof p.__definition[h]=="function"?p[h]=p.__definition[h].bind(p):p[h]=p.__definition[h]}),fe(Q[p.__classType]).map(function(h){return p[h.name]=h.bind(p),h}),fe(p.__definition).map(function(h){return p[h.name]=h.bind(p),h}),p.body)if(typeof p.__definition>"u"||!Object.hasOwn(p.__definition,"body")||typeof p.__definition.body>"u")try{y?p.body=Y(p.__definition.__classType):p.body={}}catch(h){u.debug(`An error ocurred: ${h}.`),p.body={}}else Object.hasOwn(p.__definition,"body")&&(p.body=p.__definition.body);try{if(typeof p.__new__=="function"?p.__new__.call(p,g):typeof super.__new__=="function"&&(p.__new__=super.__new__.bind(p),p.__new__.call(p,g)),typeof p=="object"&&Object.hasOwn(p,"_new_")&&typeof p._new_.isCalled>"u")try{p._new_(g),p._new_.isCalled=!0}catch(h){u.warn(`${p.__classType}._new_() failed with error: ${h}`)}}catch(h){u.warn(h)}}get body(){return this._body}set body(g){this._body=g}static get __classType(){return Object.getPrototypeOf(this.constructor).name}get __classType(){return this.constructor.name}static hierarchy(g){let p=f(function(b){return Object.hasOwn(b,"__classType")?b.__classType:oe.call(g,b)},"__classType"),h=f(b=>typeof b<"u"&&typeof b.__proto__<"u"&&b.__proto__!==null?(p(b)!==""?[p(b)]:[]).concat(h(b.__proto__)):[],"__hierarchy__proto__");(typeof g>"u"||g===null)&&(g=this);let m=[];return m.push(p(g)),m=m.concat(h(g.__proto__)),m}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(g){Me(g,this)}_new_(g){}getClass(){return Object.getPrototypeOf(this.constructor)}css(g){return typeof this.body<"u"&&typeof this?.body!="string"&&typeof this?.body?.style<"u"&&(u.debug("body style"),this.body&&(this.body.style=ve(g,this?.body?.style))),typeof this.body!="string"?this?.body?.style:{}}hierarchy(){let g=this;return this.getClass()?.hierarchy(g)}append(g){let p=g||this.body;if(u.debug("append: start"),Ce(p,"Component")&&(u.debug("append: child is a Component"),u.debug(`appending the body of ${p.name}`)),typeof this.body<"u")if(u.debug("append element"),arguments.length>0){if(u.debug("append to element"),typeof this.body!="string")if(typeof this.body?.append<"u")this?.body?.append(p);else throw Error("body.append is undefined. That means the body is not well formed.");else this.append(p);typeof this.childs>"u"&&(this.childs=[]),this.childs.push(p)}else y&&(u.debug("append to body"),document.body.append(p))}attachIn(g){if(y){let p=document.subelements(g);for(let h=0,m=p.length;h<m;h++)p[h].append(this)}else throw new Error("attachIn not yet implemented for non browser platforms")}},Q[o]=Me(a,Q[o]),Q[o].__definition=a,Q[o].__definition.__classType=o,I[o]=Q[o],Q[o]},"Class"),typeof Je.prototype<"u"&&(Je.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"})}}),j,le=v({"src/ClassFactory.ts"(){"use strict";Qn(),Oe(),j=f(o=>{let s;if(typeof o>"u"||o===null)throw Error("You need to pass a parameter {className}");if(o!==null&&o.indexOf(".")!==-1){let t=o.split(".").slice(0,o.split(".").length-1).join("."),e=o.split(".").slice(-1).join(""),a=(Z[t]||[]).filter(i=>bn(i)).reverse();if(a.length>0)s=a[0];else throw Error(`Class ${e} not found. Found classes: ${JSON.stringify(a)} in package ${t}`)}else if(o!==null){if(s=Jr(o),typeof s>"u")throw new Error(`${o} is undefined.`)}else throw Error(`className is null. Unable to retrieve the class factory.
|
|
2
2
|
Not found in:
|
|
3
3
|
${Object.keys(Q).join(`
|
|
4
|
-
`)}`);return s},"ClassFactory")}}),Hn,Qo=v({"src/Base64.ts"(){"use strict";var o;Hn=(o=class{static encode(t){let e="",n,a,i,c,d,g,p,h=0;for(t=o._utf8_encode(t);h<t.length;)n=t.charCodeAt(h++),a=t.charCodeAt(h++),i=t.charCodeAt(h++),c=n>>2,d=(n&3)<<4|a>>4,g=(a&15)<<2|i>>6,p=i&63,isNaN(a)?g=p=64:isNaN(i)&&(p=64),e=e+this._keyStr.charAt(c)+this._keyStr.charAt(d)+this._keyStr.charAt(g)+this._keyStr.charAt(p);return e}static decode(t){let e="",n,a,i,c,d,g,p,h=0;for(t=t.replace(/[^A-Za-z0-9+/=]/g,"");h<t.length;)c=this._keyStr.indexOf(t.charAt(h++)),d=this._keyStr.indexOf(t.charAt(h++)),g=this._keyStr.indexOf(t.charAt(h++)),p=this._keyStr.indexOf(t.charAt(h++)),n=c<<2|d>>4,a=(d&15)<<4|g>>2,i=(g&3)<<6|p,e=e+String.fromCharCode(n),g!==64&&(e=e+String.fromCharCode(a)),p!==64&&(e=e+String.fromCharCode(i));return e=o._utf8_decode(e),e}static _utf8_encode(t){t=t.replace(/rn/g,"n");let e="";for(let n=0;n<t.length;n++){let a=t.charCodeAt(n);a<128?e+=String.fromCharCode(a):a>127&&a<2048?(e+=String.fromCharCode(a>>6|192),e+=String.fromCharCode(a&63|128)):(e+=String.fromCharCode(a>>12|224),e+=String.fromCharCode(a>>6&63|128),e+=String.fromCharCode(a&63|128))}return e}static _utf8_decode(t){let e="",n=0,a=0,i=0,c;for(;n<t.length;)a=t.charCodeAt(n),a<128?(e+=String.fromCharCode(a),n++):a>191&&a<224?(i=t.charCodeAt(n+1),e+=String.fromCharCode((a&31)<<6|i&63),n+=2):(i=t.charCodeAt(n+1),c=t.charCodeAt(n+2),e+=String.fromCharCode((a&15)<<12|(i&63)<<6|c&63),n+=3);return e}},l(o,"_Base64"),f(o,"Base64"),r(o,"_keyStr","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),o)}}),he,Xr,De=v({"src/basePath.ts"(){"use strict";F(),he=(function(){let o="";if(y){let s=document.baseURI.split("?")[0].split("/");s.pop(),o=s.join("/")+"/"}else try{let s=jn("node:process");typeof s<"u"?o=`${s.cwd()}/`:o=""}catch{o=""}return o})(),Xr=f(o=>{he=o},"setBasePath")}}),M,be=v({"src/DataStringify.ts"(){"use strict";Jo(),M=f(o=>JSON.stringify(o,f(function(){let t=new WeakSet,e=0;return function(n,a){if(typeof a=="object"&&a!==null){if(t.has(a))return e+=1,e<=3?wo(a):null;t.add(a)}return a}},"getCircularReplacer")()),"_DataStringify")}}),wn,no=v({"src/domain.ts"(){"use strict";wn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),K,Le=v({"src/New.ts"(){"use strict";K=f(function(o,s={}){return s=arguments.length>1?s:{},typeof o>"u"?new Object:new o(s)},"New"),K.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),fn,Zo=v({"src/secretKey.ts"(){"use strict";F(),fn=y?location.host:"secret"}}),pe,Yr,Ho,vo=v({"src/Crypt.ts"(){"use strict";var o;Qo(),be(),W(),$(),Zo(),pe=(o=class extends H{constructor(){super(...arguments);r(this,"string","");r(this,"key","");r(this,"last_string","");r(this,"last_key","");r(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,a=Object.hasOwn(e,"key")?e.key:"";this.__new__(e),a=a===""?this.__instanceID.toString():a,this.last_key=a,this.last_string=n,this.construct=!0}_encrypt(){let e=this.string,n=this.key,a="",i,c;for(let d=0;d<e.length;d++)i=e.substr(d,1),c=n.substr(d%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+c.charCodeAt(0)),a+=i;return this.last_string=Hn.encode(a),this.last_string}_decrypt(){let e=this.string,n=this.key,a="",i,c;e=Hn.decode(e);for(let d=0;d<e.length;d++)i=e.substr(d,1),c=n.substr(d%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-c.charCodeAt(0)),a+=i;return this.last_string=a,this.last_string}static encrypt(e,n){return new o({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new o({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},l(o,"__Crypt"),f(o,"_Crypt"),o),Yr=f(function(s){return pe.encrypt(M(s),fn)},"_CryptObject"),Ho=f(function(s){return s===""?{}:JSON.parse(pe.decrypt(s,fn))},"_DecryptObject"),D("com.qcobjects",[pe])}}),Ie,ca=v({"src/ConfigSettings.ts"(){"use strict";var o;De(),W(),$(),Ie=(o=class extends H{constructor(){super(...arguments);r(this,"_CONFIG",{relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:he});r(this,"_CONFIG_ENC","")}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof o._instance>"u"&&(o._instance=new o),o._instance}},l(o,"_ConfigSettings"),f(o,"ConfigSettings"),r(o,"_instance"),o),D("com.qcobjects",[Ie])}}),O,de=v({"src/CONFIG.ts"(){"use strict";var o;De(),Ee(),vo(),be(),R(),Cn(),Zo(),$(),W(),ca(),O=(o=class extends H{get _CONFIG_ENC(){return Ie.instance._CONFIG_ENC}get _CONFIG(){return Ie.instance._CONFIG}set(t,e){u.debug(`CONFIG.set ${t}: ${e}`),t==="basePath"&&Xr(e);let n;try{n=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=pe.encrypt(M({}),fn));let i=a._CONFIG_ENC.valueOf(),c=a._CONFIG?.valueOf();return Me(c,Ho(i))})(Ie.instance)}catch(a){n={},console.error(a),u.debug("failed to encrypt config")}n[t]=e,Ie.instance._CONFIG_ENC=Yr(n),Ie.instance.set(t,e)}get(t,e){let n;try{let i=(function(c){c._CONFIG_ENC===null&&(c._CONFIG_ENC=pe.encrypt(M({}),fn));let d=c._CONFIG_ENC.valueOf(),g=c._CONFIG.valueOf();return Me(g,Ho(d))})(Ie.instance);typeof i[t]<"u"&&(n=i[t])}catch(i){console.error(i),u.debug("Something wrong when trying to get CONFIG values"),u.debug("No config value for: "+t),n=e}let a=we.processObject(n);return n===null&&a===null?null:a||e}static get instance(){return typeof o._instance>"u"&&(o._instance=new o),o._instance}static set(t,e){o.instance.set(t,e)}static get(t,e){return o.instance.get(t,e)}},l(o,"_CONFIG"),f(o,"CONFIG"),r(o,"_instance"),o),D("com.qcobjects",[O])}}),un,we,Cn=v({"src/Processor.ts"(){"use strict";var o;de(),W(),Le(),ee(),$(),un=(o=class extends H{constructor({component:e,processors:n}){super({component:e});r(this,"processors",{config(e,n){return O.get(n,"")},ENV(e,n){return typeof process<"u"?process.env[n]:""},global(e,n){return typeof T<"u"?T[n]:""}});r(this,"component");typeof n<"u"&&(this.processors=Object.assign(n,o.instance.processors))}static get instance(){return typeof o._instance>"u"&&(o._instance=new o({component:null})),o._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(o.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return o.instance.processors[e]}static getProcessorNames(){return Object.keys(o.instance.processors)}execute(e,n,a){let i=typeof e<"u"&&e!==null?e.processorHandler:this;return i?.processors[n].bind(i).apply(i,[e,a?.split(",")])}static process(e,n=null){return o.instance.process(e,n)}process(e,n=null){let a=n!==null?n.processorHandler:K(o,{component:null});return typeof e=="string"&&Object.keys(a.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(c){let d=`$${i}(${c[1]})`;return e=e.replace(d,a.execute.bind(a).call(a,n,i,c[1])),c})),e}static processObject(e,n){return e==null?e:o.instance.processObject(e,n)}processObject(e,n=null){if(e==null)return e;let a=n===null?this:n.processorHandler;return typeof a>"u"&&(a=new o({component:n})),typeof e=="object"?Object.keys(e).map(i=>(typeof e[i]=="object"&&!Object.hasOwn(e[i],"call")?e[i]=a?.processObject.bind(a)(e[i],n):typeof e[i]=="string"&&(e[i]=a?.process.bind(a)(e[i],n)),i)):typeof e=="string"&&(e=a.process.bind(a)(e,n)),e}},l(o,"_Processor"),f(o,"Processor"),r(o,"_instance"),o),we=un.instance,D("com.qcobjects",[un])}}),es,ts,Bo,la=v({"src/routings.ts"(){"use strict";es=f((o,s)=>{let t=o.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...s.matchAll(new RegExp(t,"g"))][0].groups}},"__routing_params__"),ts=f(function(o,s){return o.filter(function(t){let e=t.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(e,"g").test(s)}).reverse()},"__valid_routings__"),Bo=f((o,s)=>o.includes(s),"__valid_routing_way__")}});function hn(o,s){let e=class e{constructor(a,i=[]){r(this,"func");r(this,"args");this.func=a,this.args=i}dispatch(){this.func.apply(this,...s,this)}};l(e,"AsyncCallback"),f(e,"AsyncCallback");let t=e;return io.push(new t(o,s)),t}l(hn,"asyncLoad");var io,Ko,Oo=v({"src/asyncLoad.ts"(){"use strict";Re(),F(),ee(),io=[],f(hn,"asyncLoad"),Ko=f(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&io.map(function(o){o.dispatch.call(o)})}):typeof T.global<"u"&&io.map(function(o){o.dispatch.call(o)})},"_fireAsyncLoad"),S(hn)}}),gn,Eo=v({"src/ComplexStorageCache.ts"(){"use strict";var o;Qo(),be(),R(),gn=(o=class{constructor(t){let e,n,a=t.index;if(typeof a<"u"){e=t.load,n=t.alternate;let i=this.getID(a),c=localStorage.getItem(i);if(this.isEmpty(c)){let d=e.call(null,{cachedObjectID:i,cachedResponse:c,cache:this});this.save(a,d),u.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",i))}else n.call(null,{cachedObjectID:i,cachedResponse:c,cache:this}),u.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",i))}else throw new Error("ComplexStorageCache: index is undefined");return this}getItem(t){let e=localStorage.getItem(t);return this.isEmpty(e)?null:JSON.parse(e)}setItem(t,e){localStorage.setItem(t,M(e))}isEmpty(t){let e=!1;switch(!0){case typeof t>"u":case(typeof t=="string"&&t===""):case(typeof t=="string"&&t==="undefined"):case(typeof t=="number"&&t===0):case t===null:e=!0;break;default:e=!1}return e}getID(t){let e;return typeof t<"u"&&(e="cachedObject_"+Hn.encode(M(t).replace(/\{|\}|,/g,"_"))),e}save(t,e){let n=this.getID(t);u.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",n)),this.setItem(n,e)}getCached(t){let e=this.getID(t);return this.getItem(e)}clear(){Object.keys(localStorage).filter(function(t){return t.startsWith("cachedObject_")}).map(function(t){return localStorage.removeItem(t),t})}},l(o,"ComplexStorageCache"),f(o,"ComplexStorageCache"),o)}}),oo,So=v({"src/serviceLoader.ts"(){"use strict";Oo(),Eo(),be(),R(),F(),ee(),oo=f(function(o,s=!1){let t=f(function(c){var d=new Promise(function(g,p){u.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(c.data)).replace("{{URL}}",c.url));let h=new XMLHttpRequest;h.withCredentials=c.withCredentials,h.open(c.method,c.url,!0);for(let _ in c.headers)try{typeof c.headers[_]!="function"&&h.setRequestHeader(_,c.headers[_])}catch(E){u.debug("Something went wrong when assign the header "+_),u.debug(`An error ocurred: ${E}`)}h.onload=function(){if(h.status===200){let E=h.responseText;if(u.debug("Data received {{DATA}}".replace("{{DATA}}",M(E))),u.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",c.name)),c.template=E,c.cached&&typeof C<"u"&&C.save(c.name,c.template),typeof c.done=="function"){var _={request:h,service:c};c.done.call(c,_),g.call(d,_)}}else if(typeof c.fail=="function"){var _={request:h,service:c};c.fail.call(c,_),p.call(d,_)}};let b=f(function(){u.debug("SENDING THE NORMAL REQUEST ");try{h.send(M(c.data))}catch(_){u.debug("SOMETHING WRONG WITH REQUEST "),u.debug(`An error ocurred: ${_}`),p.call(d,{request:h,service:c})}},"_directLoad");if(c.cached){var C=new gn({index:c.data,load(){b.call(this)},alternate(_){if(c.method==="GET"){if(c.template=_.cache.getCached(c.name),typeof c.done=="function"){let E={request:h,service:c};c.done.call(c,E),g.call(d,E)}}else b()}});T.lastCache=C}else b();return h});return d},"_serviceLoaderInBrowser"),e=f(function(c){var d=new Promise(function(g,p){if(typeof URL>"u"){global.URL=Ae("url").URL;let _=global.URL}let h=new URL(c.url);var m;c.useHTTP2=Object.hasOwn(c,"useHTTP2")&&c.useHTTP2;let b=f(function(_){u.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(c.data)).replace("{{URL}}",c.url));let E,x={http2Client:C,request:_,service:c,responseHeaders:null};if(typeof c.data=="object"&&c.data!==null&&c.useHTTP2)try{u.debug("Sending data...");let U=new Buffer(M(c.data));_.write(U)}catch(U){u.debug("It was not possible to send any data"),u.debug(`An error ocurred: ${U}`)}E="",_.on("response",U=>{u.debug("receiving response..."),x.responseHeaders=U,E=""}),_.on("data",U=>{u.debug("receiving data..."),E+=""+U.toString(),c.template=E}),c.useHTTP2&&_.resume(),_.on("end",()=>{u.debug("ending call..."),c.template=E,Object.hasOwn(c,"useHTTP2")&&c.useHTTP2?C.destroy():_.destroy(),c.done.call(c,x),g.call(d,x)}),c.useHTTP2&&_.end()},"captureEvents");try{let _;if(c.useHTTP2){u.debug("using http2");var C=Ae("http2").connect(h.origin);_=Object.assign({":method":c.method,":path":h.pathname},c.options),_=Object.assign(_,c.headers),m=C.request(_),m.setEncoding("utf8"),b(m)}else if(h.protocol==="http:"){let x=Ae("http").request;_=Object.assign({url:c.url,headers:c.headers},c.options),m=x(c.url),b(m)}else if(h.protocol==="https:"){let E=Ae("https");_=Object.assign({hostname:h.hostname,port:h.port,path:h.pathname,method:c.method,headers:c.headers},c.options),E.request(_,function(U){b(U)}).end()}else{let E="Protocol not supported: "+h.protocol;throw u.debug(E),new Error(E)}}catch(_){u.debug(_),c.fail.call(c,_),p.call(d,_)}}).catch(g=>{u.debug(`Something happened when trying to call the service: ${c.name}. Error: ${g}`),c.fail.call(c,g)});return d},"_serviceLoaderInNode"),n=f(function(c){var d=new Promise(function(g){u.debug(`Calling mockup service ${c.name} ...`);let p={request:null,service:c,responseHeaders:c.responseHeaders};typeof c.mockup=="function"?c.mockup.call(c,p):c.done.call(c,p),g.call(d,p)});return d},"_serviceLoaderMockup"),a=f(function(c){var d=new Promise(function(g){u.debug(`Calling local service ${c.name} ...`);let p={request:null,service:c,responseHeaders:c.responseHeaders};typeof c.local=="function"?c.local.call(c,p):c.done.call(c,p),g.call(d,p)});return d},"_serviceLoaderLocal"),i;switch(o.kind){case"rest":y?typeof s<"u"&&s?i=hn(t,[o,s]):i=t(o):i=e(o);break;case"mockup":i=n(o);break;case"local":i=a(o);break;default:u.debug(`The value of the kind property of the service ${o.name} is not valid`),i=Promise.resolve();break}return i},"serviceLoader")}}),No,Xo=v({"src/tag_filter.ts"(){"use strict";No="quick-component:not([loaded]),component:not([loaded])"}}),Bn,Yo=v({"src/componentLoader.ts"(){"use strict";Oo(),Eo(),be(),R(),F(),ee(),Bn=f(function(o,s){let t,e=f(function(i){return t=new Promise(function(c,d){let g=i.__promise__;if((Object.hasOwn(i,"container")&&typeof i.container<"u"&&i.container!==null?i.container:i.body)!==null){let C=f(function(E){E.feedComponent();let x={request:m,component:E};c.call(g,x)},"_feedComponent_");u.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(i.data)).replace("{{URL}}",i.url));let _=f(function(){let E=h?0:200;if(m.status===E){let x=m.responseText;u.debug("Data received {{DATA}}".replace("{{DATA}}",M(x))),u.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=x,i.cached&&typeof b<"u"&&b.save(i.name,i.template),C(i)}else{let x={request:m,component:i};d.call(g,x)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")C(i);else{var h=!!i.url.startsWith("file:"),m=new XMLHttpRequest;if(h)"fetch"in T&&(u.debug("I can use fetch..."),u.debug("It is a file to be loaded, so I will try to use fetch"),fetch(i.url).then(x=>{u.debug("I got a response from fetch, so I'll feed the component"),x.text().then(U=>{i.template=U,C(i)}).catch(U=>{throw new Error(`An error ocurred: ${U}`)})}).catch(x=>{throw new Error(`An error ocurred: ${x}`)}));else try{u.debug("Calling the url of component in async mode."),m.open(i.method,i.url,!0)}catch(x){u.debug(`An error ocurred: ${x}.`),u.debug("Last try has failed... The component cannot be loaded.")}!yo&&!h&&m.setRequestHeader("Content-Type","text/html"),h||(m.onload=_);let E=f(function(x){x=!(typeof x>"u"||!x),u.debug("SENDING THE NORMAL REQUEST "),x?"fetch"in T||(u.debug("I have to try to load the file using xhr... "),m.send(null),m.status===XMLHttpRequest.DONE&&_()):(u.debug("Trying to send the data to the component... "),m.send(M(i.data)))},"_directLoad");if(i.cached&&!h){u.debug("USING CACHE FOR COMPONENT: "+i.name);var b=new gn({index:i.cacheIndex,load(){E.call(this,h)},alternate(x){i.method==="GET"?(i.template=x.cache.getCached(i.cacheIndex),C.call(this,i)):E.call(this,h)}});T.lastCache=b}else u.debug("NOT USING CACHE FOR COMPONENT: "+i.name),E(h)}}else u.debug("CONTAINER DOESNT EXIST")}),t.then(function(c){return i.__done__().then(function(){let d;return typeof i.done=="function"&&(d=i.done.call(i,c)),Promise.resolve(d)})},function(c){return typeof i.fail=="function"&&i.fail.call(i,c).catch(d=>{throw new Error(`${d}`)}),Promise.reject(new Error("An error ocurred"))}).catch(function(c){throw u.debug("Something wrong loading the component"),new Error(`An error ocurred: ${c}`)}),t},"_componentLoaderInBrowser"),n=f(function(i){return t=new Promise(function(c,d){let g=t,p=f(function(b){b.feedComponent().catch(_=>{throw new Error(`An error ocurred trying to feed the component: ${b.name}. Error: ${_}`)});let C={request:null,component:b};c.call(g,C)},"_feedComponent_");u.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(i.data)).replace("{{URL}}",i.url));let h=f(function(b,C){if(b){let _={request:null,component:i};d.call(g,_)}else{let _=C.toString();u.debug("Data received {{DATA}}".replace("{{DATA}}",M(_))),u.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=_,i.cached&&typeof m<"u"&&m.save(i.name,i.template),p(i)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")p(i);else{u.debug("Loading the component as a local file in server...");let b=f(function(){let{readFile:C}=jn("node:fs");u.debug("SENDING THE NORMAL REQUEST "),C(i.url,h)},"_directLoad");if(i.cached){u.debug("USING CACHE FOR COMPONENT: "+i.name);var m=new gn({index:i.cacheIndex,load(){b()},alternate(C){i.method==="GET"?(i.template=C.cache.getCached(i.cacheIndex),p.call(this,i)):b.call(this)}});T.lastCache=m}else u.debug("NOT USING CACHE FOR COMPONENT: "+i.name),b()}}),t.then(function(c){return i.__done__().then(function(){let d;return typeof i.done=="function"&&(d=i.done.call(i,c)),Promise.resolve(d)})},function(c){return typeof i.fail=="function"&&i.fail.call(i,c).catch(d=>{throw new Error(`An error ocurred: ${d}`)}),Promise.reject(new Error("An error ocurred."))}).catch(function(c){u.debug(`Something wrong loading the component: ${c}`)}),t},"_componentLoaderInNode"),a;return y?typeof s<"u"&&s?a=hn(e,[o,s]):a=e(o):a=n(o),a},"componentLoader")}}),Qe,er=v({"src/Component.ts"(){"use strict";var o;Qo(),De(),Ee(),le(),xo(),be(),no(),me(),ge(),W(),ke(),to(),eo(),R(),Le(),$(),F(),Cn(),la(),ee(),de(),So(),Xo(),Yo(),Qe=(o=class extends H{constructor({__parent__:e,templateURI:n="",template:a,tplsource:i="default",tplextension:c,url:d="",name:g="",method:p="GET",data:h={},reload:m=!1,shadowed:b=!1,cached:C=!0,enableServiceClass:_,assignRoutingParams:E=!0,_body:x=Y("div"),__promise__:U=null,__shadowRoot:Ln,body:zi,shadowRoot:Ji,splashScreenComponent:Qi,controller:Zi,view:Ki}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:e,templateURI:n,template:a,tplsource:i,tplextension:c,url:d,name:g,method:p,data:h,reload:m,shadowed:b,cached:C,enableServiceClass:_,assignRoutingParams:E,_body:x,__promise__:U,__shadowRoot:Ln,body:zi,shadowRoot:Ji,splashScreenComponent:Qi,controller:Zi,view:Ki});r(this,"name");r(this,"templateURI");r(this,"url");r(this,"tplsource");r(this,"tplextension");r(this,"template");r(this,"validRoutingWays",["pathname","hash","search"]);r(this,"basePath",he);r(this,"domain",wn);r(this,"templateHandler","DefaultTemplateHandler");r(this,"processorHandler");r(this,"routingWay",null);r(this,"routingNodes",[]);r(this,"routings",[]);r(this,"routingPath","");r(this,"routingPaths",[]);r(this,"_componentHelpers",[]);r(this,"subcomponents",[]);r(this,"splashScreenComponent");r(this,"controller");r(this,"routingController");r(this,"view");r(this,"effect");r(this,"effectClass");r(this,"method","GET");r(this,"cached",!0);r(this,"__promise__",null);r(this,"data");r(this,"__namespace");r(this,"_parsedAssignmentText");r(this,"__shadowRoot");r(this,"_serviceClassName",null);r(this,"enableServiceClass",!0);r(this,"serviceInstance");r(this,"serviceData");r(this,"shadowed",!1);r(this,"container");r(this,"innerHTML");r(this,"reload");r(this,"assignRoutingParams",!0);r(this,"responseTo");let q=this;typeof g<"u"&&(q.name=g),typeof q.name>"u"&&typeof g>"u"&&u.warn("A name is not defined for "+oe(q)),q.routingWay=O.get("routingWay"),q.processorHandler=new un({component:q}),q.data=typeof q.data>"u"||q.data===null?{}:q.data,q.data=Object.assign(q.data,q.dataAttributes),q.createServiceInstance().then(()=>{typeof q.__new__=="function"&&q.__new__(q),q._generateRoutingPaths(q.body).then(function(){q._reroute_().then(function(){return q.rebuild().then(function(){u.info(`Component._new_ The component ${q.name} was built successfully!`)}).catch(function(We){u.warn(`Component._new_ Something went wrong building the component ${q.name}`),console.error(`Component._new_ Something went wrong building the component ${q.name}`,We)})}).catch(We=>{throw Error(`Unexpected error ${We}`)})}).catch(We=>{throw Error(`Unexpected error ${We}`)})}).catch(We=>{throw Error(`Unexpected error. ${We}`)})}set cacheIndex(e){u.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=M(e.routingPath);return Hn.encode(e.name+n)}set parsedAssignmentText(e){u.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:u.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){return this.__shadowRoot}set routingSelected(e){u.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){let e=this;return ts(e.routings,e.routingPath)}set routingParams(e){u.debug("[routingParams] This is a read-only property of the component")}get routingParams(){let e=this;return[{}].concat(e.routingSelected.map(function(n){return es(n,e.routingPath)})).reduce(function(n,a){return Object.assign(n,a)})}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,a,i=e.getClass().__definition,c=e.serviceClassName;return new Promise(function(d,g){let p=e.enableServiceClass,h=e.responseToData,m=e.responseToTemplate;if(p&&c!==null&&(a=j(c)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(j("Component"),"responseTo")&&(h=j("Component").responseTo==="data"),!m&&i&&Object.hasOwn(i,"responseTo")?m=i.responseTo==="template":!m&&Object.hasOwn(j("Component"),"responseTo")&&(m=j("Component").responseTo==="template"),typeof a<"u"&&typeof p<"u"&&p===!0&&(h||m)){u.info("Loading service "+c);let b=K(a,{data:n});oo(b)?.then(function({service:C}){let _;typeof C.JSONresponse<"u"&&C.JSONresponse!==null?_=C.JSONresponse:_=C.template,h&&(typeof n=="object"&&typeof _=="object"?n=Object.assign(n,_):n=_,e.data=n),e.serviceInstance=b,e.serviceData=n,m&&(e.template=_),d(_)},function(C){u.debug(`Service loading rejected for ${c} in ${e.name}`),g(C)}).catch(function(C){throw u.debug("Something went wroing while trying to load the service "+c),Error(`Error loading ${c} for ${e.name}. Detail: ${C}`)})}else d(null)})}_bindroute_(){let e=this;e._bindroute_.loaded?u.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(a){let i=!0;T.global.get("routingPaths")||T.global.set("routingPaths",[]);let c=O.get("routingWay"),d=a.target[c];return T.global.get("routingPaths").includes(d)&&a.target[c]!==location[c]&&a.target.href!==document.location.href?(u.debug("A ROUTING WAS FOUND: "+d),window.history.pushState({href:a.target.href},a?.target?.href,a.target.href),o.route().catch(g=>{throw Error(`Unexpected error: ${g}`)}),i=!1):u.debug("NO ROUTING FOUND FOR: "+d),typeof a.target.oldclick<"u"&&typeof a.target.oldclick=="function"&&a.target.oldclick.call(a.target,a),i},null}),e._bindroute_.loaded=!0)}done(e){return new Promise(a=>{if(typeof e<"u"){let{request:i,component:c}=e;a({request:i,component:c})}else a({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=j(n),typeof e<"u"&&(this.controller=K(e,{component:this}))}return new Promise((a,i)=>{if(y&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(c){throw Error(c)}else u.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):u.debug(`${n} does not have a createRoutingController() method.`)}a({component:this,controller:this.controller})})}createEffectInstance(){let e=this;return new Promise(function(n){if(y){let a=e.body?.getAttribute("effectClass"),i=e.body?.getAttribute("apply-effect-to");i=i!==null?i:"load",a!==null&&i==="observe"?e.applyObserveTransitionEffect(a):a!==null&&i==="load"&&e.applyTransitionEffect(a)}n({component:e,effect:e.effect})})}createViewInstance(){let e=this;return new Promise(function(n){let a=y?e.body.getAttribute("viewClass"):null;if(a!==null){let i=j(a);typeof i<"u"&&(e.view=K(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=f(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(a=>{throw new Error(`Unknown error ${a}.`)}),u.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),u.debug(`Component helpers for ${e.name} executed.`)}catch(a){throw u.debug(`Component helpers for ${e.name} could not be executed.`),Error(a)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),y&&e.body.setAttribute("loaded","true")},"componentDone");return new Promise(function(a,i){try{a(n.call(e))}catch(c){i(new Error(c))}})}hostElements(e){let n=this,a=[];return y&&(a=n.shadowed&&typeof n.shadowRoot<"u"?n.shadowRoot.subelements(e):n.body.subelements(e)),a}get subtags(){let e=this,n=No;return e.hostElements(n)}get bodyAttributes(){let n=this.body;return y?[...n.getAttributeNames()].map(a=>({[a]:n.getAttribute(a)})).reduce((a,i)=>Object.assign(a,i)):{}}get dataAttributes(){let n=this.body;return y?[{}].concat([...n.getAttributeNames()].filter(a=>a.startsWith("data-")).map(a=>({[a.split("-")[1]]:n.getAttribute(a)}))).reduce((a,i)=>Object.assign(a,i)):{}}__buildSubComponents__(e=!1){let n=this,a=n.subtags;return e||(a=a.filter(i=>i.getAttribute("loaded")!=="true")),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=po(a,n)),n.subcomponents}fail(e){return new Promise((a,i)=>{if(typeof e<"u"){let{error:c,component:d}=e;a({error:c,component:d})}else i(new Error(" Unknown error."))})}set(e,n){this[e]=n}get(e,n){return this[e]||n}feedComponent(){let e=this;u.debug(`[Component][${this.name}][feedComponent] start feeding component...`);let n=f(function(c){if(typeof c.container>"u"&&typeof c.body>"u"){u.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",c.name));return}let d=typeof c.container>"u"||c.container===null?c.body:c.container,g=c.parsedAssignmentText;if(c.innerHTML=g,c.shadowed){u.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",c.name)),u.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",c.name));let p=Y("div");d.subelements("[slot]").map(m=>(m.parentElement===d&&p.appendChild(m),m)),u.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",c.name));let h=Y("div");h.classList.add("shadowHost");try{c.shadowRoot=h.attachShadow({mode:"open"})}catch(m){u.debug(`An error ocurred: ${m}.`);try{u.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",c.name)),c.shadowRoot=h.shadowRoot}catch(b){u.debug(`An error ocurred: ${b}.`),u.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",c.name))}}if(typeof c.shadowRoot<"u"&&c.shadowRoot!==null){c.reload?(u.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",c.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=c.innerHTML)):(p.innerHTML=c.parseTemplate(p.innerHTML),u.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",c.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=c.innerHTML)),u.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",c.name)),h.innerHTML+=p.innerHTML,u.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",c.name));let m=d.querySelector(".shadowHost");typeof m<"u"&&m!==null?(u.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",c.name)),c.shadowRoot!==null&&h.shadowRoot!==null&&(c.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):d.appendChild(h)}else u.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",c.name))}else c.reload?(u.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",c.name)),d.innerHTML=c.innerHTML):d&&c?(u.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",c.name)),d.innerHTML+=c.innerHTML):u.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",c.name))},"_feedComponent_InBrowser"),a=f(function(c){let d=c.parsedAssignmentText;c.innerHTML=d},"_feedComponent_InNode"),i;return Ce(e,"Component")?new Promise((c,d)=>{if(y)try{i=n(e),c(i)}catch(g){d(new Error(g))}else try{i=a(e),c(i)}catch(g){d(new Error(g))}}):(u.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(a,i){if((typeof e>"u"||e===null)&&i(new Error("Component is undefined")),ut(e)&&Ce(e,"Component"))switch(!0){case e.get("tplsource")==="none":u.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var c={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,c).catch(d=>{u.debug(`It was an error while calling done() in ${e.name}: ${d}`)}),a.call(n,c)},function(){i.call(n,c)});break;case e.get("tplsource")==="inline":u.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),(async d=>{await d.feedComponent.bind(d)()})(e).catch(d=>{u.debug(`It was not possible to feed the component ${e.name}: ${d}`)});var c={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(c),a.call(n,c)},function(){i.call(n,c)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),Bn(e,!1)?.then(function(d){a.call(n,d)},function(d){i.call(n,d)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),Bn(e,!1).then(function(d){a.call(n,d)},function(d){i.call(n,d)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):u.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:u.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(a=>a.name.replace(/bound /g,"")).map(a=>({[a]:e[a].bind(this)})).reduce((a,i)=>Object.assign(a,i),{});return ve(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,a=!!(ut(e)&&Ce(e,"Component")),i=f(function(c){let d=[],g=c.filter(function(p){return typeof p<"u"}).map(function(p){if(typeof p.name<"u")d.push(p.name);else throw new Error(oe(p)+" does not have a name");return new Promise(function(h,m){typeof p<"u"&&p._reroute_?p._reroute_().then(function(){p.reload=!0,p.rebuild().then(()=>{h()}).catch(b=>{u.debug(`Error ${b}`)})}).then(function(){if(Object.hasOwn(p,"subcomponents")&&typeof p.subcomponents<"u"&&p.subcomponents.length>0)return u.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+p.name),i.call(p,p.subcomponents);u.debug("No subcomponents to look for routings in: "+p.name),p.subtags.length>0&&(p.subcomponents=p.__buildSubComponents__(!0)),h()}).catch(b=>{u.debug(`Error: ${b}`)}):typeof p<"u"&&m(new Error("Component "+p.name+" is not an instance of Component"))})});return Promise.all(g).then(function(){u.debug("ROUTING COMPLETED FOR "+d.join(", "))}).catch(function(p){u.warn("ROUTING FAILED FOR "+d.join(", ")+": "+p)})},"__route__");if(a||Wn)a&&u.debug("loading routings for instance "+e.name),n=i.call(e,a?e.subcomponents:Wn);else throw u.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(a){y&&Bo(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let c=i.getAttributeNames(),d={};return c.map((g,p)=>(d[c[p]]=i.getAttribute(c[p]),g)),n.routings.push(d),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(d.path)||n.routingPaths.push(d.path),T.global.get("routingPaths")||T.global.set("routingPaths",[]),T.global.get("routingPaths").includes(d.path)||T.global.get("routingPaths").push(d.path),i})),a()})}parseTemplate(e){let n=this,a,i=e;if(Object.hasOwn(n,"templateHandler")){let c=n.templateHandler;u.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${c} ...`);let d=j(c),g=K(d,{component:n,template:i});g.component=n;let p=n.data;if(Object.hasOwn(n,"assignRoutingParams")&&n.assignRoutingParams)try{p=Object.assign(p,n.routingParams)}catch(h){u.debug(`An error ocurred: ${h}.`),u.debug("[parseTemplate] it was not possible to assign the routing params to the template")}a=g.assign(p)}else u.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),a=i;return a}_reroute_(){let e=this;return new Promise(function(n){y&&Bo(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(a=>{let i=Un({COMPONENTS_BASE_PATH:O.get("componentsBasePath"),COMPONENT_NAME:a.name.toString(),TPLEXTENSION:Object.hasOwn(a,"tplextension")?a.tplextension||"":e.tplextension,TPL_SOURCE:"default"});return e.templateURI=i,a}),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 a=[...n.subelements("img[lazy-src]")],i=f(function(c){c.setAttribute("src",c.getAttribute("lazy-src")?.toString()),c.onload=()=>{c.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let c=new IntersectionObserver((d,g)=>{d.forEach(p=>{p.isIntersecting&&(i(p.target),g.unobserve(p.target))})});a.map(function(d){return c.observe(d)})}else a.map(i)}}return null}applyTransitionEffect(e){let n=j(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&Ce(n,"TransitionEffect")?(this.effect=K(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):u.debug(`${e} is ${oe(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(y){let n=this,a=n.componentRoot,i=f(function(){n.applyTransitionEffect(e)},"_applyEffect_");"IntersectionObserver"in window?new IntersectionObserver((d,g)=>{d.forEach(p=>{p.isIntersecting&&(i(),g.unobserve(p.target))})}).observe(a):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(a=>(typeof a.scrollIntoView=="function"&&a.scrollIntoView(O.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"})),a))}}i18n_translate(){if(y&&O.get("use_i18n")){let e=this,n=e.componentRoot,a=O.get("lang","en"),i=navigator.language.slice(0,2),c=T.global.get("i18n");a!==i&&typeof c=="object"&&Object.hasOwn(c,"messages")&&f(()=>new Promise(function(g){let p=c.messages.filter(function(h){return Object.hasOwn(h,a)&&Object.hasOwn(h,i)});(n?.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component")).map(h=>(p.map(function(m){let b=h.innerHTML;return b=b?.replace(new RegExp(`${m[a]}`,"g"),m[i]),h.innerHTML=b,null}),h)),g()}),"callback_i18n").call(e).then(function(){u.debug("i18n loaded for component: "+e.name)}).catch(g=>{throw new Error(`An error ocurred when parsing i18n: ${g}.`)})}}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(a=>(u.debug(`Executing ${a.name} as component helper for ${e.name}...`),a(),a))}}},l(o,"_Component"),f(o,"Component"),r(o,"shadowed",!1),r(o,"cached",!0),r(o,"subcomponents"),r(o,"responseTo"),o),D("com.qcobjects",[Qe]),fe(j("Component")).map(s=>(k(s),s))}}),Un,Br,po,ns,xo=v({"src/ComponentFactory.ts"(){"use strict";Co(),le(),er(),de(),me(),ge(),R(),Le(),$(),F(),Xo(),Un=f(({TPL_SOURCE:o,COMPONENTS_BASE_PATH:s,COMPONENT_NAME:t,TPLEXTENSION:e})=>o==="default"?`${s}${t}.${e}`:"","ComponentURI"),Br=f((o,s)=>{let t=o.getAttribute("shadowed")===null,e=o.getAttribute("template-source")===null,n=o.getAttribute("shadowed")==="true",a=o.getAttribute("cached")===null,i=o.getAttribute("cached")==="true",c=typeof O.get("tplextension")<"u"?O.get("tplextension"):"html";c=o.getAttribute("tplextension")!==null?o.getAttribute("tplextension"):c;let d=o.getAttribute("name"),g=o.getAttribute("componentClass")!==null?o.getAttribute("componentClass"):"Component",p=O.get("preserveComponentBodyTag")?d!==null?"com.qcobjects.components."+d+".ComponentBody":"com.qcobjects.components.ComponentBody":g;d=d!==null?d:j(p)&&typeof j(p).name<"u"?j(p).name:"";let h=j(p),m=p!=="Component"&&typeof h<"u"&&typeof h.tplsource=="string"&&h.tplsource!=="",b=e&&m?h.tplsource:e?"default":o.getAttribute("template-source");u.debug(`template source for ${d} is ${b} `),u.debug(`type for ${d} is ${oe(h)} `);let C=Un({COMPONENTS_BASE_PATH:O.get("componentsBasePath"),COMPONENT_NAME:d,TPLEXTENSION:c,TPL_SOURCE:b});return O.get("preserveComponentBodyTag")&&D(d!==""?"com.qcobjects.components."+d:"com.qcobjects.components",[Je("ComponentBody",Qe,{name:d,tplsource:b,tplextension:c,reload:!0})]),f(function(){let x=t?h&&h.shadowed||Qe.shadowed:n,U={__parent__:s,name:d,cached:a?Qe.cached:i,shadowed:x,tplextension:c,body:O.get("preserveComponentBodyTag")?Y("componentBody"):o,templateURI:C,tplsource:b};(typeof d>"u"||d===""||d===null)&&delete U.name,C===""&&delete U.templateURI;let Ln=K(h,U);return O.get("preserveComponentBodyTag")&&typeof Ln<"u"&&o.append(Ln.body),Ln},"__create_component_instance_")()},"_buildComponentFromElement_"),po=f((o,s)=>{let t=[];return y?t=o.map(function(e){return Br(e,s)}):u.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),t},"_buildComponentsFromElements_"),ns=f(o=>{let s=No,t=o.subelements(s);return po(t,null)},"buildComponents")}}),ao,co,fo,os=v({"src/Service.ts"(){"use strict";var o,s,t;De(),vo(),no(),W(),R(),$(),Zo(),de(),ao=(o=class extends H{constructor(){super(...arguments);r(this,"options");r(this,"withCredentials");r(this,"useHTTP2");r(this,"name");r(this,"responseHeaders");r(this,"kind","rest");r(this,"domain",wn);r(this,"basePath",he);r(this,"url","");r(this,"method","GET");r(this,"data",{});r(this,"reload",!1);r(this,"cached",!1);r(this,"headers");r(this,"template")}mockup({request:a,service:i}){throw new Error("Method not implemented.")}local({request:a,service:i}){throw new Error("Method not implemented.")}done({request:a,service:i}){throw new Error("Method not implemented.")}fail(...a){throw new Error("Method not implemented.")}set(a,i){this[a]=i}get(a,i){return this[a]||i}},l(o,"Service"),f(o,"Service"),o),co=(s=class extends ao{constructor(){super(...arguments);r(this,"method","GET");r(this,"cached",!1);r(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});r(this,"JSONresponse")}done(a){u.debug("***** RECEIVED RESPONSE:"),u.debug(a.service.template),this.JSONresponse=JSON.parse(a.service.template)}},l(s,"JSONService"),f(s,"JSONService"),s),fo=(t=class extends co{constructor(){super();r(this,"method","GET");r(this,"cached",!1);r(this,"configFileName","config.json");r(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});r(this,"JSONresponse");this.set("url",`${this.get("basePath")}${this.get("configFileName")}`)}configLoaded(){throw Error("Method not implemented.")}done(a){if(u.debug("***** CONFIG LOADED:"),u.debug(a.service.template),this.JSONresponse=JSON.parse(a.service.template),Object.hasOwn(this.JSONresponse,"__encoded__")){let c=pe.decrypt(this.JSONresponse?.__encoded__,fn);this.JSONresponse=JSON.parse(c)}let i=this.JSONresponse;Object.keys(i).map(c=>(O.set(c,i[c]),c)),this.configLoaded().catch(c=>{throw new Error(`An error ocurred: ${c}`)})}fail(){this.configLoaded().catch(a=>{throw new Error(`An error ocurred: ${a}`)})}},l(t,"ConfigService"),f(t,"ConfigService"),t),D("com.qcobjects.api",[ao]),D("com.qcobjects.api.services",[co]),D("com.qcobjects.api.config",[fo])}}),mn,tr=v({"src/globalSettings.ts"(){"use strict";var o;de(),W(),R(),$(),F(),So(),ee(),os(),mn=(o=class extends H{constructor(){super(...arguments);r(this,"_GLOBAL",{});r(this,"_logger",new uo)}static __start__(){return o.instance.__start__()}static get instance(){return typeof o._instance>"u"&&(o._instance=new o),o._instance}get logger(){return this._logger}set logger(e){this._logger=e}set(e,n){this._GLOBAL[e]=n}get(e,n){let a;return typeof this._GLOBAL[e]<"u"?a=this._GLOBAL[e]:typeof n<"u"&&(a=n),a}__start__(){let e=f(function(){let a;return y?a=new Promise(function(i,c){"serviceWorker"in navigator&&typeof O.get("serviceWorkerURI")<"u"&&(O.set("serviceWorkerScope",O.get("serviceWorkerScope")?O.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(O.get("serviceWorkerURI"),{scope:O.get("serviceWorkerScope")}).then(function(d){u.debug("Service Worker Registered"),i.call(a,d)},function(d){u.debug("Error registering Service Worker"),c.call(a,d)}),navigator.serviceWorker.ready.then(function(d){u.debug("Service Worker Ready"),i.call(a,d)},function(d){u.debug("Error loading Service Worker"),c.call(a,d)}))}):a=Promise.resolve(),a},"__load__serviceWorker"),n=f(function(){return new Promise(a=>{if(y){u.debug("Starting to building components");try{nr()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}u.debug("Initializing the service worker"),e.call(T).catch(function(i){u.debug(`error loading the service worker ${i}`)})}a()})},"_buildComponents");return new Promise(a=>{u.debug("Starting to load the config settings..."),O.get("useConfigService",!1)?(u.debug("Loading settings using local configuration file..."),or(new fo),$n.configLoaded=n,oo($n)?.then(i=>{a(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${$n.url}: ${i}`)})):(u.debug("Starting to load the components..."),n.call(this).then(()=>{a({})}).catch(i=>{throw new Error(`An error ocurred while trying to build the components stack. ${i}`)}))})}},l(o,"_GlobalSettings"),f(o,"GlobalSettings"),r(o,"_instance"),o),D("com.qcobjects",[mn])}}),rs={};Vr(rs,{_top:l(()=>T,"_top"),buildComponentsStack:l(()=>nr,"buildComponentsStack"),componentsStack:l(()=>Wn,"componentsStack"),configService:l(()=>$n,"configService"),get:l(()=>rr,"get"),resetTop:l(()=>ho,"resetTop"),set:l(()=>pn,"set"),setConfigService:l(()=>or,"setConfigService")});var T,Wn,ho,nr,$n,or,pn,rr,Ur,ee=v({"src/top.ts"(){"use strict";xo(),Ee(),tr(),Co(),le(),Re(),F(),Oe(),R(),T=typeof Ze<"u"&&typeof Ze.exports<"u"&&Ze.exports||typeof global<"u"&&global||typeof globalThis<"u"&&globalThis||typeof window<"u"&&window||typeof self<"u"&&self!==null&&self||void 0,T.lastCache=void 0,Wn=[],ho=f(()=>{let o=mn.instance;T=Me(o,T,!0)},"resetTop"),nr=f(()=>{Wn=ns(document)},"buildComponentsStack"),or=f(o=>{T.global.configService=o,$n=o},"setConfigService"),pn=f((o,s)=>{T[o]=s},"set"),rr=f((o,s)=>T[o]||s,"get"),ho(),Ur=f(function(o){Object.hasOwn(o,"PackagesList")||Object.defineProperty(o,"PackagesList",{set:f(s=>{u.debug("PackagesList is readonly")},"set"),get:f(()=>$o(),"get")}),Object.hasOwn(o,"PackagesNameList")||Object.defineProperty(o,"PackagesNameList",{set:f(s=>{u.debug("PackagesNameList is readonly")},"set"),get:f(()=>Fo(),"get")}),Object.hasOwn(o,"ClassesList")||Object.defineProperty(o,"ClassesList",{set:f(s=>{u.debug("ClassesList is readonly")},"set"),get:f(()=>Go(),"get")}),Object.hasOwn(o,"ClassesNameList")||Object.defineProperty(o,"ClassesNameList",{set(s){u.debug("ClassesNameList is readonly")},get:f(()=>Qr(),"get")})},"_define_props"),y&&(Je("GLOBAL",Q.global),S(j("GLOBAL"))),y&&typeof window<"u"?pn("global",window):y&&typeof globalThis<"u"&&pn("global",globalThis),Ur(T)}}),ln,sr,ss=v({"src/captureFalseTouch.ts"(){"use strict";if(R(),F(),ln=!1,sr=f(()=>ln?{passive:!0}:!1,"captureFalseTouch"),y)try{let o=Object.defineProperty({},"passive",{get(){return ln=!0,ln}});window.addEventListener("testPassive",null,o),window.removeEventListener("testPassive",null,o)}catch(o){u.debug(`An error ocurred: ${o}.`),ln=!1}else ln=!1}}),Vn,ir=v({"src/range.ts"(){"use strict";ke(),Vn=f((o,s=0,t=1)=>((s===0||typeof s>"u")&&(s=o,o=0),Array.from({length:(s-o)/t+1},function(e,n){return o+n*t})),"range"),k(Vn)}}),ar,is=v({"src/defaultProcessors.ts"(){"use strict";R(),Cn(),ee(),ir(),ar=f(()=>{(function(o){let s=f((i,c,d)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${c}.${d} does not have a component instance or it is null.`);let g=o.global.get(d),p=i.get(d),h=i.data[d],m=typeof h<"u"?h:typeof p<"u"?p:g,b="";return typeof m<"u"&&typeof m.map<"u"?b=m.map(function(C){let _=[...Object.keys(C)].map(E=>` data-${E}="${typeof C[E]<"u"&&C[E]!==null?C[E].toString():""}"`).join("");return`<quick-component name="${c}" ${_} ></quick-component>`}).join(""):u.debug(`${c}.${d} does not have a map property`),b},"mapper");we.setProcessor(s);let t=f(function(i,c,d){let g=`
|
|
4
|
+
`)}`);return s},"ClassFactory")}}),Gn,Qo=v({"src/Base64.ts"(){"use strict";var o;Gn=(o=class{static encode(t){let e="",n,a,i,c,d,g,p,h=0;for(t=o._utf8_encode(t);h<t.length;)n=t.charCodeAt(h++),a=t.charCodeAt(h++),i=t.charCodeAt(h++),c=n>>2,d=(n&3)<<4|a>>4,g=(a&15)<<2|i>>6,p=i&63,isNaN(a)?g=p=64:isNaN(i)&&(p=64),e=e+this._keyStr.charAt(c)+this._keyStr.charAt(d)+this._keyStr.charAt(g)+this._keyStr.charAt(p);return e}static decode(t){let e="",n,a,i,c,d,g,p,h=0;for(t=t.replace(/[^A-Za-z0-9+/=]/g,"");h<t.length;)c=this._keyStr.indexOf(t.charAt(h++)),d=this._keyStr.indexOf(t.charAt(h++)),g=this._keyStr.indexOf(t.charAt(h++)),p=this._keyStr.indexOf(t.charAt(h++)),n=c<<2|d>>4,a=(d&15)<<4|g>>2,i=(g&3)<<6|p,e=e+String.fromCharCode(n),g!==64&&(e=e+String.fromCharCode(a)),p!==64&&(e=e+String.fromCharCode(i));return e=o._utf8_decode(e),e}static _utf8_encode(t){t=t.replace(/rn/g,"n");let e="";for(let n=0;n<t.length;n++){let a=t.charCodeAt(n);a<128?e+=String.fromCharCode(a):a>127&&a<2048?(e+=String.fromCharCode(a>>6|192),e+=String.fromCharCode(a&63|128)):(e+=String.fromCharCode(a>>12|224),e+=String.fromCharCode(a>>6&63|128),e+=String.fromCharCode(a&63|128))}return e}static _utf8_decode(t){let e="",n=0,a=0,i=0,c;for(;n<t.length;)a=t.charCodeAt(n),a<128?(e+=String.fromCharCode(a),n++):a>191&&a<224?(i=t.charCodeAt(n+1),e+=String.fromCharCode((a&31)<<6|i&63),n+=2):(i=t.charCodeAt(n+1),c=t.charCodeAt(n+2),e+=String.fromCharCode((a&15)<<12|(i&63)<<6|c&63),n+=3);return e}},l(o,"_Base64"),f(o,"Base64"),r(o,"_keyStr","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),o)}}),he,Xr,De=v({"src/basePath.ts"(){"use strict";F(),he=(function(){let o="";if(y){let s=document.baseURI.split("?")[0].split("/");s.pop(),o=s.join("/")+"/"}else try{let s=Ln("node:process");typeof s<"u"?o=`${s.cwd()}/`:o=""}catch{o=""}return o})(),Xr=f(o=>{he=o},"setBasePath")}}),M,be=v({"src/DataStringify.ts"(){"use strict";Jo(),M=f(o=>JSON.stringify(o,f(function(){let t=new WeakSet,e=0;return function(n,a){if(typeof a=="object"&&a!==null){if(t.has(a))return e+=1,e<=3?yo(a):null;t.add(a)}return a}},"getCircularReplacer")()),"_DataStringify")}}),yn,to=v({"src/domain.ts"(){"use strict";yn=typeof location<"u"&&location.hostname!==""?location.hostname:"localhost"}}),K,Le=v({"src/New.ts"(){"use strict";K=f(function(o,s={}){return s=arguments.length>1?s:{},typeof o>"u"?new Object:new o(s)},"New"),K.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"}}}),pn,Zo=v({"src/secretKey.ts"(){"use strict";F(),pn=y?location.host:"secret"}}),pe,Yr,Ho,Co=v({"src/Crypt.ts"(){"use strict";var o;Qo(),be(),W(),$(),Zo(),pe=(o=class extends H{constructor(){super(...arguments);r(this,"string","");r(this,"key","");r(this,"last_string","");r(this,"last_key","");r(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,a=Object.hasOwn(e,"key")?e.key:"";this.__new__(e),a=a===""?this.__instanceID.toString():a,this.last_key=a,this.last_string=n,this.construct=!0}_encrypt(){let e=this.string,n=this.key,a="",i,c;for(let d=0;d<e.length;d++)i=e.substr(d,1),c=n.substr(d%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)+c.charCodeAt(0)),a+=i;return this.last_string=Gn.encode(a),this.last_string}_decrypt(){let e=this.string,n=this.key,a="",i,c;e=Gn.decode(e);for(let d=0;d<e.length;d++)i=e.substr(d,1),c=n.substr(d%n.length-1,1),i=String.fromCharCode(i.charCodeAt(0)-c.charCodeAt(0)),a+=i;return this.last_string=a,this.last_string}static encrypt(e,n){return new o({string:e,key:n!==""?n:"12345678ABC"})._encrypt()}static decrypt(e,n){return new o({string:e,key:n!==""?n:"12345678ABC"})._decrypt()}},l(o,"__Crypt"),f(o,"_Crypt"),o),Yr=f(function(s){return pe.encrypt(M(s),pn)},"_CryptObject"),Ho=f(function(s){return s===""?{}:JSON.parse(pe.decrypt(s,pn))},"_DecryptObject"),D("com.qcobjects",[pe])}}),Ie,ca=v({"src/ConfigSettings.ts"(){"use strict";var o;De(),W(),$(),Ie=(o=class extends H{constructor(){super(...arguments);r(this,"_CONFIG",{relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:he});r(this,"_CONFIG_ENC","")}set(e,n){this._CONFIG[e]=n}get(e,n){return this._CONFIG[e]||n}static get instance(){return typeof o._instance>"u"&&(o._instance=new o),o._instance}},l(o,"_ConfigSettings"),f(o,"ConfigSettings"),r(o,"_instance"),o),D("com.qcobjects",[Ie])}}),O,de=v({"src/CONFIG.ts"(){"use strict";var o;De(),Ee(),Co(),be(),R(),wn(),Zo(),$(),W(),ca(),O=(o=class extends H{get _CONFIG_ENC(){return Ie.instance._CONFIG_ENC}get _CONFIG(){return Ie.instance._CONFIG}set(t,e){u.debug(`CONFIG.set ${t}: ${e}`),t==="basePath"&&Xr(e);let n;try{n=(function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=pe.encrypt(M({}),pn));let i=a._CONFIG_ENC.valueOf(),c=a._CONFIG?.valueOf();return Me(c,Ho(i))})(Ie.instance)}catch(a){n={},console.error(a),u.debug("failed to encrypt config")}n[t]=e,Ie.instance._CONFIG_ENC=Yr(n),Ie.instance.set(t,e)}get(t,e){let n;try{let i=(function(c){c._CONFIG_ENC===null&&(c._CONFIG_ENC=pe.encrypt(M({}),pn));let d=c._CONFIG_ENC.valueOf(),g=c._CONFIG.valueOf();return Me(g,Ho(d))})(Ie.instance);typeof i[t]<"u"&&(n=i[t])}catch(i){console.error(i),u.debug("Something wrong when trying to get CONFIG values"),u.debug("No config value for: "+t),n=e}let a=we.processObject(n);return n===null&&a===null?null:a||e}static get instance(){return typeof o._instance>"u"&&(o._instance=new o),o._instance}static set(t,e){o.instance.set(t,e)}static get(t,e){return o.instance.get(t,e)}},l(o,"_CONFIG"),f(o,"CONFIG"),r(o,"_instance"),o),D("com.qcobjects",[O])}}),un,we,wn=v({"src/Processor.ts"(){"use strict";var o;de(),W(),Le(),ee(),$(),un=(o=class extends H{constructor({component:e,processors:n}){super({component:e});r(this,"processors",{config(e,n){return O.get(n,"")},ENV(e,n){return typeof process<"u"?process.env[n]:""},global(e,n){return typeof I<"u"?I[n]:""}});r(this,"component");typeof n<"u"&&(this.processors=Object.assign(n,o.instance.processors))}static get instance(){return typeof o._instance>"u"&&(o._instance=new o({component:null})),o._instance}static setProcessor(e){typeof e=="function"&&e.name!==""&&(o.instance.processors[e.name]=e)}setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static getProcessor(e){return o.instance.processors[e]}static getProcessorNames(){return Object.keys(o.instance.processors)}execute(e,n,a){let i=typeof e<"u"&&e!==null?e.processorHandler:this;return i?.processors[n].bind(i).apply(i,[e,a?.split(",")])}static process(e,n=null){return o.instance.process(e,n)}process(e,n=null){let a=n!==null?n.processorHandler:K(o,{component:null});return typeof e=="string"&&Object.keys(a.processors).map(i=>[...e.matchAll(new RegExp("\\$"+i+"\\((.*)\\).*","g"))].map(function(c){let d=`$${i}(${c[1]})`;return e=e.replace(d,a.execute.bind(a).call(a,n,i,c[1])),c})),e}static processObject(e,n){return e==null?e:o.instance.processObject(e,n)}processObject(e,n=null){if(e==null)return e;let a=n===null?this:n.processorHandler;return typeof a>"u"&&(a=new o({component:n})),typeof e=="object"?Object.keys(e).map(i=>(typeof e[i]=="object"&&!Object.hasOwn(e[i],"call")?e[i]=a?.processObject.bind(a)(e[i],n):typeof e[i]=="string"&&(e[i]=a?.process.bind(a)(e[i],n)),i)):typeof e=="string"&&(e=a.process.bind(a)(e,n)),e}},l(o,"_Processor"),f(o,"Processor"),r(o,"_instance"),o),we=un.instance,D("com.qcobjects",[un])}}),es,ts,Bo,la=v({"src/routings.ts"(){"use strict";es=f((o,s)=>{let t=o.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...s.matchAll(new RegExp(t,"g"))][0].groups}},"__routing_params__"),ts=f(function(o,s){return o.filter(function(t){let e=t.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(e,"g").test(s)}).reverse()},"__valid_routings__"),Bo=f((o,s)=>o.includes(s),"__valid_routing_way__")}});function fn(o,s){let e=class e{constructor(a,i=[]){r(this,"func");r(this,"args");this.func=a,this.args=i}dispatch(){this.func.apply(this,...s,this)}};l(e,"AsyncCallback"),f(e,"AsyncCallback");let t=e;return so.push(new t(o,s)),t}l(fn,"asyncLoad");var so,Ko,vo=v({"src/asyncLoad.ts"(){"use strict";Re(),F(),ee(),so=[],f(fn,"asyncLoad"),Ko=f(()=>{y?document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&so.map(function(o){o.dispatch.call(o)})}):typeof I.global<"u"&&so.map(function(o){o.dispatch.call(o)})},"_fireAsyncLoad"),S(fn)}}),hn,Oo=v({"src/ComplexStorageCache.ts"(){"use strict";var o;Qo(),be(),R(),hn=(o=class{constructor(t){let e,n,a=t.index;if(typeof a<"u"){e=t.load,n=t.alternate;let i=this.getID(a),c=localStorage.getItem(i);if(this.isEmpty(c)){let d=e.call(null,{cachedObjectID:i,cachedResponse:c,cache:this});this.save(a,d),u.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",i))}else n.call(null,{cachedObjectID:i,cachedResponse:c,cache:this}),u.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",i))}else throw new Error("ComplexStorageCache: index is undefined");return this}getItem(t){let e=localStorage.getItem(t);return this.isEmpty(e)?null:JSON.parse(e)}setItem(t,e){localStorage.setItem(t,M(e))}isEmpty(t){let e=!1;switch(!0){case typeof t>"u":case(typeof t=="string"&&t===""):case(typeof t=="string"&&t==="undefined"):case(typeof t=="number"&&t===0):case t===null:e=!0;break;default:e=!1}return e}getID(t){let e;return typeof t<"u"&&(e="cachedObject_"+Gn.encode(M(t).replace(/\{|\}|,/g,"_"))),e}save(t,e){let n=this.getID(t);u.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",n)),this.setItem(n,e)}getCached(t){let e=this.getID(t);return this.getItem(e)}clear(){Object.keys(localStorage).filter(function(t){return t.startsWith("cachedObject_")}).map(function(t){return localStorage.removeItem(t),t})}},l(o,"ComplexStorageCache"),f(o,"ComplexStorageCache"),o)}}),no,Eo=v({"src/serviceLoader.ts"(){"use strict";vo(),Oo(),be(),R(),F(),ee(),no=f(function(o,s=!1){let t=f(function(c){var d=new Promise(function(g,p){u.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(c.data)).replace("{{URL}}",c.url));let h=new XMLHttpRequest;h.withCredentials=c.withCredentials,h.open(c.method,c.url,!0);for(let _ in c.headers)try{typeof c.headers[_]!="function"&&h.setRequestHeader(_,c.headers[_])}catch(E){u.debug("Something went wrong when assign the header "+_),u.debug(`An error ocurred: ${E}`)}h.onload=function(){if(h.status===200){let E=h.responseText;if(u.debug("Data received {{DATA}}".replace("{{DATA}}",M(E))),u.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",c.name)),c.template=E,c.cached&&typeof C<"u"&&C.save(c.name,c.template),typeof c.done=="function"){var _={request:h,service:c};c.done.call(c,_),g.call(d,_)}}else if(typeof c.fail=="function"){var _={request:h,service:c};c.fail.call(c,_),p.call(d,_)}};let b=f(function(){u.debug("SENDING THE NORMAL REQUEST ");try{h.send(M(c.data))}catch(_){u.debug("SOMETHING WRONG WITH REQUEST "),u.debug(`An error ocurred: ${_}`),p.call(d,{request:h,service:c})}},"_directLoad");if(c.cached){var C=new hn({index:c.data,load(){b.call(this)},alternate(_){if(c.method==="GET"){if(c.template=_.cache.getCached(c.name),typeof c.done=="function"){let E={request:h,service:c};c.done.call(c,E),g.call(d,E)}}else b()}});I.lastCache=C}else b();return h});return d},"_serviceLoaderInBrowser"),e=f(function(c){var d=new Promise(function(g,p){if(typeof URL>"u"){global.URL=Ae("url").URL;let _=global.URL}let h=new URL(c.url);var m;c.useHTTP2=Object.hasOwn(c,"useHTTP2")&&c.useHTTP2;let b=f(function(_){u.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(c.data)).replace("{{URL}}",c.url));let E,x={http2Client:C,request:_,service:c,responseHeaders:null};if(typeof c.data=="object"&&c.data!==null&&c.useHTTP2)try{u.debug("Sending data...");let U=new Buffer(M(c.data));_.write(U)}catch(U){u.debug("It was not possible to send any data"),u.debug(`An error ocurred: ${U}`)}E="",_.on("response",U=>{u.debug("receiving response..."),x.responseHeaders=U,E=""}),_.on("data",U=>{u.debug("receiving data..."),E+=""+U.toString(),c.template=E}),c.useHTTP2&&_.resume(),_.on("end",()=>{u.debug("ending call..."),c.template=E,Object.hasOwn(c,"useHTTP2")&&c.useHTTP2?C.destroy():_.destroy(),c.done.call(c,x),g.call(d,x)}),c.useHTTP2&&_.end()},"captureEvents");try{let _;if(c.useHTTP2){u.debug("using http2");var C=Ae("http2").connect(h.origin);_=Object.assign({":method":c.method,":path":h.pathname},c.options),_=Object.assign(_,c.headers),m=C.request(_),m.setEncoding("utf8"),b(m)}else if(h.protocol==="http:"){let x=Ae("http").request;_=Object.assign({url:c.url,headers:c.headers},c.options),m=x(c.url),b(m)}else if(h.protocol==="https:"){let E=Ae("https");_=Object.assign({hostname:h.hostname,port:h.port,path:h.pathname,method:c.method,headers:c.headers},c.options),E.request(_,function(U){b(U)}).end()}else{let E="Protocol not supported: "+h.protocol;throw u.debug(E),new Error(E)}}catch(_){u.debug(_),c.fail.call(c,_),p.call(d,_)}}).catch(g=>{u.debug(`Something happened when trying to call the service: ${c.name}. Error: ${g}`),c.fail.call(c,g)});return d},"_serviceLoaderInNode"),n=f(function(c){var d=new Promise(function(g){u.debug(`Calling mockup service ${c.name} ...`);let p={request:null,service:c,responseHeaders:c.responseHeaders};typeof c.mockup=="function"?c.mockup.call(c,p):c.done.call(c,p),g.call(d,p)});return d},"_serviceLoaderMockup"),a=f(function(c){var d=new Promise(function(g){u.debug(`Calling local service ${c.name} ...`);let p={request:null,service:c,responseHeaders:c.responseHeaders};typeof c.local=="function"?c.local.call(c,p):c.done.call(c,p),g.call(d,p)});return d},"_serviceLoaderLocal"),i;switch(o.kind){case"rest":y?typeof s<"u"&&s?i=fn(t,[o,s]):i=t(o):i=e(o);break;case"mockup":i=n(o);break;case"local":i=a(o);break;default:u.debug(`The value of the kind property of the service ${o.name} is not valid`),i=Promise.resolve();break}return i},"serviceLoader")}}),So,Xo=v({"src/tag_filter.ts"(){"use strict";So="quick-component:not([loaded]),component:not([loaded])"}}),Hn,Yo=v({"src/componentLoader.ts"(){"use strict";vo(),Oo(),be(),R(),F(),ee(),Hn=f(function(o,s){let t,e=f(function(i){return t=new Promise(function(c,d){let g=i.__promise__;if((Object.hasOwn(i,"container")&&typeof i.container<"u"&&i.container!==null?i.container:i.body)!==null){let C=f(function(E){E.feedComponent();let x={request:m,component:E};c.call(g,x)},"_feedComponent_");u.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(i.data)).replace("{{URL}}",i.url));let _=f(function(){let E=h?0:200;if(m.status===E){let x=m.responseText;u.debug("Data received {{DATA}}".replace("{{DATA}}",M(x))),u.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=x,i.cached&&typeof b<"u"&&b.save(i.name,i.template),C(i)}else{let x={request:m,component:i};d.call(g,x)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")C(i);else{var h=!!i.url.startsWith("file:"),m=new XMLHttpRequest;if(h)"fetch"in I&&(u.debug("I can use fetch..."),u.debug("It is a file to be loaded, so I will try to use fetch"),fetch(i.url).then(x=>{u.debug("I got a response from fetch, so I'll feed the component"),x.text().then(U=>{i.template=U,C(i)}).catch(U=>{throw new Error(`An error ocurred: ${U}`)})}).catch(x=>{throw new Error(`An error ocurred: ${x}`)}));else try{u.debug("Calling the url of component in async mode."),m.open(i.method,i.url,!0)}catch(x){u.debug(`An error ocurred: ${x}.`),u.debug("Last try has failed... The component cannot be loaded.")}!_o&&!h&&m.setRequestHeader("Content-Type","text/html"),h||(m.onload=_);let E=f(function(x){x=!(typeof x>"u"||!x),u.debug("SENDING THE NORMAL REQUEST "),x?"fetch"in I||(u.debug("I have to try to load the file using xhr... "),m.send(null),m.status===XMLHttpRequest.DONE&&_()):(u.debug("Trying to send the data to the component... "),m.send(M(i.data)))},"_directLoad");if(i.cached&&!h){u.debug("USING CACHE FOR COMPONENT: "+i.name);var b=new hn({index:i.cacheIndex,load(){E.call(this,h)},alternate(x){i.method==="GET"?(i.template=x.cache.getCached(i.cacheIndex),C.call(this,i)):E.call(this,h)}});I.lastCache=b}else u.debug("NOT USING CACHE FOR COMPONENT: "+i.name),E(h)}}else u.debug("CONTAINER DOESNT EXIST")}),t.then(function(c){return i.__done__().then(function(){let d;return typeof i.done=="function"&&(d=i.done.call(i,c)),Promise.resolve(d)})},function(c){return typeof i.fail=="function"&&i.fail.call(i,c).catch(d=>{throw new Error(`${d}`)}),Promise.reject(new Error("An error ocurred"))}).catch(function(c){throw u.debug("Something wrong loading the component"),new Error(`An error ocurred: ${c}`)}),t},"_componentLoaderInBrowser"),n=f(function(i){return t=new Promise(function(c,d){let g=t,p=f(function(b){b.feedComponent().catch(_=>{throw new Error(`An error ocurred trying to feed the component: ${b.name}. Error: ${_}`)});let C={request:null,component:b};c.call(g,C)},"_feedComponent_");u.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",M(i.data)).replace("{{URL}}",i.url));let h=f(function(b,C){if(b){let _={request:null,component:i};d.call(g,_)}else{let _=C.toString();u.debug("Data received {{DATA}}".replace("{{DATA}}",M(_))),u.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=_,i.cached&&typeof m<"u"&&m.save(i.name,i.template),p(i)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")p(i);else{u.debug("Loading the component as a local file in server...");let b=f(function(){let{readFile:C}=Ln("node:fs");u.debug("SENDING THE NORMAL REQUEST "),C(i.url,h)},"_directLoad");if(i.cached){u.debug("USING CACHE FOR COMPONENT: "+i.name);var m=new hn({index:i.cacheIndex,load(){b()},alternate(C){i.method==="GET"?(i.template=C.cache.getCached(i.cacheIndex),p.call(this,i)):b.call(this)}});I.lastCache=m}else u.debug("NOT USING CACHE FOR COMPONENT: "+i.name),b()}}),t.then(function(c){return i.__done__().then(function(){let d;return typeof i.done=="function"&&(d=i.done.call(i,c)),Promise.resolve(d)})},function(c){return typeof i.fail=="function"&&i.fail.call(i,c).catch(d=>{throw new Error(`An error ocurred: ${d}`)}),Promise.reject(new Error("An error ocurred."))}).catch(function(c){u.debug(`Something wrong loading the component: ${c}`)}),t},"_componentLoaderInNode"),a;return y?typeof s<"u"&&s?a=fn(e,[o,s]):a=e(o):a=n(o),a},"componentLoader")}}),Qe,er=v({"src/Component.ts"(){"use strict";var o;Qo(),De(),Ee(),le(),No(),be(),to(),me(),ge(),W(),ke(),eo(),Yn(),R(),Le(),$(),F(),wn(),la(),ee(),de(),Eo(),Xo(),Yo(),Qe=(o=class extends H{constructor({__parent__:e,templateURI:n="",template:a,tplsource:i="default",tplextension:c,url:d="",name:g="",method:p="GET",data:h={},reload:m=!1,shadowed:b=!1,cached:C=!0,enableServiceClass:_,assignRoutingParams:E=!0,_body:x=Y("div"),__promise__:U=null,__shadowRoot:Dn,body:zi,shadowRoot:Ji,splashScreenComponent:Qi,controller:Zi,view:Ki}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:e,templateURI:n,template:a,tplsource:i,tplextension:c,url:d,name:g,method:p,data:h,reload:m,shadowed:b,cached:C,enableServiceClass:_,assignRoutingParams:E,_body:x,__promise__:U,__shadowRoot:Dn,body:zi,shadowRoot:Ji,splashScreenComponent:Qi,controller:Zi,view:Ki});r(this,"name");r(this,"templateURI");r(this,"url");r(this,"tplsource");r(this,"tplextension");r(this,"template");r(this,"validRoutingWays",["pathname","hash","search"]);r(this,"basePath",he);r(this,"domain",yn);r(this,"templateHandler","DefaultTemplateHandler");r(this,"processorHandler");r(this,"routingWay",null);r(this,"routingNodes",[]);r(this,"routings",[]);r(this,"routingPath","");r(this,"routingPaths",[]);r(this,"_componentHelpers",[]);r(this,"subcomponents",[]);r(this,"splashScreenComponent");r(this,"controller");r(this,"routingController");r(this,"view");r(this,"effect");r(this,"effectClass");r(this,"method","GET");r(this,"cached",!0);r(this,"__promise__",null);r(this,"data");r(this,"__namespace");r(this,"_parsedAssignmentText");r(this,"__shadowRoot");r(this,"_serviceClassName",null);r(this,"enableServiceClass",!0);r(this,"serviceInstance");r(this,"serviceData");r(this,"shadowed",!1);r(this,"container");r(this,"innerHTML");r(this,"reload");r(this,"assignRoutingParams",!0);r(this,"responseTo");let q=this;typeof g<"u"&&(q.name=g),typeof q.name>"u"&&typeof g>"u"&&u.warn("A name is not defined for "+oe(q)),q.routingWay=O.get("routingWay"),q.processorHandler=new un({component:q}),q.data=typeof q.data>"u"||q.data===null?{}:q.data,q.data=Object.assign(q.data,q.dataAttributes),q.createServiceInstance().then(()=>{typeof q.__new__=="function"&&q.__new__(q),q._generateRoutingPaths(q.body).then(function(){q._reroute_().then(function(){return q.rebuild().then(function(){u.info(`Component._new_ The component ${q.name} was built successfully!`)}).catch(function(We){u.warn(`Component._new_ Something went wrong building the component ${q.name}`),console.error(`Component._new_ Something went wrong building the component ${q.name}`,We)})}).catch(We=>{throw Error(`Unexpected error ${We}`)})}).catch(We=>{throw Error(`Unexpected error ${We}`)})}).catch(We=>{throw Error(`Unexpected error. ${We}`)})}set cacheIndex(e){u.debug("[cacheIndex] This property is readonly")}get cacheIndex(){let e=this,n=M(e.routingPath);return Gn.encode(e.name+n)}set parsedAssignmentText(e){u.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:u.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){return this.__shadowRoot}set routingSelected(e){u.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){let e=this;return ts(e.routings,e.routingPath)}set routingParams(e){u.debug("[routingParams] This is a read-only property of the component")}get routingParams(){let e=this;return[{}].concat(e.routingSelected.map(function(n){return es(n,e.routingPath)})).reduce(function(n,a){return Object.assign(n,a)})}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,a,i=e.getClass().__definition,c=e.serviceClassName;return new Promise(function(d,g){let p=e.enableServiceClass,h=e.responseToData,m=e.responseToTemplate;if(p&&c!==null&&(a=j(c)),!h&&i&&Object.hasOwn(i,"responseTo")?h=i.responseTo==="data":!h&&Object.hasOwn(j("Component"),"responseTo")&&(h=j("Component").responseTo==="data"),!m&&i&&Object.hasOwn(i,"responseTo")?m=i.responseTo==="template":!m&&Object.hasOwn(j("Component"),"responseTo")&&(m=j("Component").responseTo==="template"),typeof a<"u"&&typeof p<"u"&&p===!0&&(h||m)){u.info("Loading service "+c);let b=K(a,{data:n});no(b)?.then(function({service:C}){let _;typeof C.JSONresponse<"u"&&C.JSONresponse!==null?_=C.JSONresponse:_=C.template,h&&(typeof n=="object"&&typeof _=="object"?n=Object.assign(n,_):n=_,e.data=n),e.serviceInstance=b,e.serviceData=n,m&&(e.template=_),d(_)},function(C){u.debug(`Service loading rejected for ${c} in ${e.name}`),g(C)}).catch(function(C){throw u.debug("Something went wroing while trying to load the service "+c),Error(`Error loading ${c} for ${e.name}. Detail: ${C}`)})}else d(null)})}_bindroute_(){let e=this;e._bindroute_.loaded?u.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(a){let i=!0;I.global.get("routingPaths")||I.global.set("routingPaths",[]);let c=O.get("routingWay"),d=a.target[c];return I.global.get("routingPaths").includes(d)&&a.target[c]!==location[c]&&a.target.href!==document.location.href?(u.debug("A ROUTING WAS FOUND: "+d),window.history.pushState({href:a.target.href},a?.target?.href,a.target.href),o.route().catch(g=>{throw Error(`Unexpected error: ${g}`)}),i=!1):u.debug("NO ROUTING FOUND FOR: "+d),typeof a.target.oldclick<"u"&&typeof a.target.oldclick=="function"&&a.target.oldclick.call(a.target,a),i},null}),e._bindroute_.loaded=!0)}done(e){return new Promise(a=>{if(typeof e<"u"){let{request:i,component:c}=e;a({request:i,component:c})}else a({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=j(n),typeof e<"u"&&(this.controller=K(e,{component:this}))}return new Promise((a,i)=>{if(y&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(c){throw Error(c)}else u.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):u.debug(`${n} does not have a createRoutingController() method.`)}a({component:this,controller:this.controller})})}createEffectInstance(){let e=this;return new Promise(function(n){if(y){let a=e.body?.getAttribute("effectClass"),i=e.body?.getAttribute("apply-effect-to");i=i!==null?i:"load",a!==null&&i==="observe"?e.applyObserveTransitionEffect(a):a!==null&&i==="load"&&e.applyTransitionEffect(a)}n({component:e,effect:e.effect})})}createViewInstance(){let e=this;return new Promise(function(n){let a=y?e.body.getAttribute("viewClass"):null;if(a!==null){let i=j(a);typeof i<"u"&&(e.view=K(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=f(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(a=>{throw new Error(`Unknown error ${a}.`)}),u.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),u.debug(`Component helpers for ${e.name} executed.`)}catch(a){throw u.debug(`Component helpers for ${e.name} could not be executed.`),Error(a)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),y&&e.body.setAttribute("loaded","true")},"componentDone");return new Promise(function(a,i){try{a(n.call(e))}catch(c){i(new Error(c))}})}hostElements(e){let n=this,a=[];return y&&(a=n.shadowed&&typeof n.shadowRoot<"u"?n.shadowRoot.subelements(e):n.body.subelements(e)),a}get subtags(){let e=this,n=So;return e.hostElements(n)}get bodyAttributes(){let n=this.body;return y?[...n.getAttributeNames()].map(a=>({[a]:n.getAttribute(a)})).reduce((a,i)=>Object.assign(a,i)):{}}get dataAttributes(){let n=this.body;return y?[{}].concat([...n.getAttributeNames()].filter(a=>a.startsWith("data-")).map(a=>({[a.split("-")[1]]:n.getAttribute(a)}))).reduce((a,i)=>Object.assign(a,i)):{}}__buildSubComponents__(e=!1){let n=this,a=n.subtags;return e||(a=a.filter(i=>i.getAttribute("loaded")!=="true")),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=uo(a,n)),n.subcomponents}fail(e){return new Promise((a,i)=>{if(typeof e<"u"){let{error:c,component:d}=e;a({error:c,component:d})}else i(new Error(" Unknown error."))})}set(e,n){this[e]=n}get(e,n){return this[e]||n}feedComponent(){let e=this;u.debug(`[Component][${this.name}][feedComponent] start feeding component...`);let n=f(function(c){if(typeof c.container>"u"&&typeof c.body>"u"){u.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",c.name));return}let d=typeof c.container>"u"||c.container===null?c.body:c.container,g=c.parsedAssignmentText;if(c.innerHTML=g,c.shadowed){u.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",c.name)),u.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",c.name));let p=Y("div");d.subelements("[slot]").map(m=>(m.parentElement===d&&p.appendChild(m),m)),u.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",c.name));let h=Y("div");h.classList.add("shadowHost");try{c.shadowRoot=h.attachShadow({mode:"open"})}catch(m){u.debug(`An error ocurred: ${m}.`);try{u.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",c.name)),c.shadowRoot=h.shadowRoot}catch(b){u.debug(`An error ocurred: ${b}.`),u.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",c.name))}}if(typeof c.shadowRoot<"u"&&c.shadowRoot!==null){c.reload?(u.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",c.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML=c.innerHTML)):(p.innerHTML=c.parseTemplate(p.innerHTML),u.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",c.name)),h!==null&&h.shadowRoot!==null&&(h.shadowRoot.innerHTML+=c.innerHTML)),u.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",c.name)),h.innerHTML+=p.innerHTML,u.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",c.name));let m=d.querySelector(".shadowHost");typeof m<"u"&&m!==null?(u.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",c.name)),c.shadowRoot!==null&&h.shadowRoot!==null&&(c.shadowRoot.innerHTML=h.shadowRoot.innerHTML)):d.appendChild(h)}else u.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",c.name))}else c.reload?(u.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",c.name)),d.innerHTML=c.innerHTML):d&&c?(u.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",c.name)),d.innerHTML+=c.innerHTML):u.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",c.name))},"_feedComponent_InBrowser"),a=f(function(c){let d=c.parsedAssignmentText;c.innerHTML=d},"_feedComponent_InNode"),i;return Ce(e,"Component")?new Promise((c,d)=>{if(y)try{i=n(e),c(i)}catch(g){d(new Error(g))}else try{i=a(e),c(i)}catch(g){d(new Error(g))}}):(u.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(a,i){if((typeof e>"u"||e===null)&&i(new Error("Component is undefined")),ut(e)&&Ce(e,"Component"))switch(!0){case e.get("tplsource")==="none":u.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var c={request:void 0,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,c).catch(d=>{u.debug(`It was an error while calling done() in ${e.name}: ${d}`)}),a.call(n,c)},function(){i.call(n,c)});break;case e.get("tplsource")==="inline":u.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),(async d=>{await d.feedComponent.bind(d)()})(e).catch(d=>{u.debug(`It was not possible to feed the component ${e.name}: ${d}`)});var c={request:void 0,component:e};e.__done__().then(async()=>{typeof e.done=="function"&&await e.done(c),a.call(n,c)},function(){i.call(n,c)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),Hn(e,!1)?.then(function(d){a.call(n,d)},function(d){i.call(n,d)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),Hn(e,!1).then(function(d){a.call(n,d)},function(d){i.call(n,d)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):u.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:u.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(a=>a.name.replace(/bound /g,"")).map(a=>({[a]:e[a].bind(this)})).reduce((a,i)=>Object.assign(a,i),{});return ve(this,n)}route(){return this.constructor.route()}static route(){let e=this,n,a=!!(ut(e)&&Ce(e,"Component")),i=f(function(c){let d=[],g=c.filter(function(p){return typeof p<"u"}).map(function(p){if(typeof p.name<"u")d.push(p.name);else throw new Error(oe(p)+" does not have a name");return new Promise(function(h,m){typeof p<"u"&&p._reroute_?p._reroute_().then(function(){p.reload=!0,p.rebuild().then(()=>{h()}).catch(b=>{u.debug(`Error ${b}`)})}).then(function(){if(Object.hasOwn(p,"subcomponents")&&typeof p.subcomponents<"u"&&p.subcomponents.length>0)return u.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+p.name),i.call(p,p.subcomponents);u.debug("No subcomponents to look for routings in: "+p.name),p.subtags.length>0&&(p.subcomponents=p.__buildSubComponents__(!0)),h()}).catch(b=>{u.debug(`Error: ${b}`)}):typeof p<"u"&&m(new Error("Component "+p.name+" is not an instance of Component"))})});return Promise.all(g).then(function(){u.debug("ROUTING COMPLETED FOR "+d.join(", "))}).catch(function(p){u.warn("ROUTING FAILED FOR "+d.join(", ")+": "+p)})},"__route__");if(a||Un)a&&u.debug("loading routings for instance "+e.name),n=i.call(e,a?e.subcomponents:Un);else throw u.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(a){y&&Bo(n.validRoutingWays,n.routingWay||"")&&typeof e<"u"&&(n.innerHTML=e?.innerHTML,n.routingNodes=e?.subelements("routing"),n.routings=[],n.routingNodes.map(i=>{let c=i.getAttributeNames(),d={};return c.map((g,p)=>(d[c[p]]=i.getAttribute(c[p]),g)),n.routings.push(d),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(d.path)||n.routingPaths.push(d.path),I.global.get("routingPaths")||I.global.set("routingPaths",[]),I.global.get("routingPaths").includes(d.path)||I.global.get("routingPaths").push(d.path),i})),a()})}parseTemplate(e){let n=this,a,i=e;if(Object.hasOwn(n,"templateHandler")){let c=n.templateHandler;u.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${c} ...`);let d=j(c),g=K(d,{component:n,template:i});g.component=n;let p=n.data;if(Object.hasOwn(n,"assignRoutingParams")&&n.assignRoutingParams)try{p=Object.assign(p,n.routingParams)}catch(h){u.debug(`An error ocurred: ${h}.`),u.debug("[parseTemplate] it was not possible to assign the routing params to the template")}a=g.assign(p)}else u.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),a=i;return a}_reroute_(){let e=this;return new Promise(function(n){y&&Bo(e.validRoutingWays,e.routingWay||"")&&(e.routingPath=location[e.routingWay],e.routingSelected.map(a=>{let i=Bn({COMPONENTS_BASE_PATH:O.get("componentsBasePath"),COMPONENT_NAME:a.name.toString(),TPLEXTENSION:Object.hasOwn(a,"tplextension")?a.tplextension||"":e.tplextension,TPL_SOURCE:"default"});return e.templateURI=i,a}),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 a=[...n.subelements("img[lazy-src]")],i=f(function(c){c.setAttribute("src",c.getAttribute("lazy-src")?.toString()),c.onload=()=>{c.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){let c=new IntersectionObserver((d,g)=>{d.forEach(p=>{p.isIntersecting&&(i(p.target),g.unobserve(p.target))})});a.map(function(d){return c.observe(d)})}else a.map(i)}}return null}applyTransitionEffect(e){let n=j(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&Ce(n,"TransitionEffect")?(this.effect=K(n,{component:this}),this.effect?.apply(this.effect?.defaultParams)):u.debug(`${e} is ${oe(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(y){let n=this,a=n.componentRoot,i=f(function(){n.applyTransitionEffect(e)},"_applyEffect_");"IntersectionObserver"in window?new IntersectionObserver((d,g)=>{d.forEach(p=>{p.isIntersecting&&(i(),g.unobserve(p.target))})}).observe(a):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(a=>(typeof a.scrollIntoView=="function"&&a.scrollIntoView(O.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"})),a))}}i18n_translate(){if(y&&O.get("use_i18n")){let e=this,n=e.componentRoot,a=O.get("lang","en"),i=navigator.language.slice(0,2),c=I.global.get("i18n");a!==i&&typeof c=="object"&&Object.hasOwn(c,"messages")&&f(()=>new Promise(function(g){let p=c.messages.filter(function(h){return Object.hasOwn(h,a)&&Object.hasOwn(h,i)});(n?.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component")).map(h=>(p.map(function(m){let b=h.innerHTML;return b=b?.replace(new RegExp(`${m[a]}`,"g"),m[i]),h.innerHTML=b,null}),h)),g()}),"callback_i18n").call(e).then(function(){u.debug("i18n loaded for component: "+e.name)}).catch(g=>{throw new Error(`An error ocurred when parsing i18n: ${g}.`)})}}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(a=>(u.debug(`Executing ${a.name} as component helper for ${e.name}...`),a(),a))}}},l(o,"_Component"),f(o,"Component"),r(o,"shadowed",!1),r(o,"cached",!0),r(o,"subcomponents"),r(o,"responseTo"),o),D("com.qcobjects",[Qe]),fe(j("Component")).map(s=>(k(s),s))}}),Bn,Br,uo,ns,No=v({"src/ComponentFactory.ts"(){"use strict";wo(),le(),er(),de(),me(),ge(),R(),Le(),$(),F(),Xo(),Bn=f(({TPL_SOURCE:o,COMPONENTS_BASE_PATH:s,COMPONENT_NAME:t,TPLEXTENSION:e})=>o==="default"?`${s}${t}.${e}`:"","ComponentURI"),Br=f((o,s)=>{let t=o.getAttribute("shadowed")===null,e=o.getAttribute("template-source")===null,n=o.getAttribute("shadowed")==="true",a=o.getAttribute("cached")===null,i=o.getAttribute("cached")==="true",c=typeof O.get("tplextension")<"u"?O.get("tplextension"):"html";c=o.getAttribute("tplextension")!==null?o.getAttribute("tplextension"):c;let d=o.getAttribute("name"),g=o.getAttribute("componentClass")!==null?o.getAttribute("componentClass"):"Component",p=O.get("preserveComponentBodyTag")?d!==null?"com.qcobjects.components."+d+".ComponentBody":"com.qcobjects.components.ComponentBody":g;d=d!==null?d:j(p)&&typeof j(p).name<"u"?j(p).name:"";let h=j(p),m=p!=="Component"&&typeof h<"u"&&typeof h.tplsource=="string"&&h.tplsource!=="",b=e&&m?h.tplsource:e?"default":o.getAttribute("template-source");u.debug(`template source for ${d} is ${b} `),u.debug(`type for ${d} is ${oe(h)} `);let C=Bn({COMPONENTS_BASE_PATH:O.get("componentsBasePath"),COMPONENT_NAME:d,TPLEXTENSION:c,TPL_SOURCE:b});return O.get("preserveComponentBodyTag")&&D(d!==""?"com.qcobjects.components."+d:"com.qcobjects.components",[Je("ComponentBody",Qe,{name:d,tplsource:b,tplextension:c,reload:!0})]),f(function(){let x=t?h&&h.shadowed||Qe.shadowed:n,U={__parent__:s,name:d,cached:a?Qe.cached:i,shadowed:x,tplextension:c,body:O.get("preserveComponentBodyTag")?Y("componentBody"):o,templateURI:C,tplsource:b};(typeof d>"u"||d===""||d===null)&&delete U.name,C===""&&delete U.templateURI;let Dn=K(h,U);return O.get("preserveComponentBodyTag")&&typeof Dn<"u"&&o.append(Dn.body),Dn},"__create_component_instance_")()},"_buildComponentFromElement_"),uo=f((o,s)=>{let t=[];return y?t=o.map(function(e){return Br(e,s)}):u.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),t},"_buildComponentsFromElements_"),ns=f(o=>{let s=So,t=o.subelements(s);return uo(t,null)},"buildComponents")}}),io,ao,po,os=v({"src/Service.ts"(){"use strict";var o,s,t;De(),Co(),to(),W(),R(),$(),Zo(),de(),io=(o=class extends H{constructor(){super(...arguments);r(this,"options");r(this,"withCredentials");r(this,"useHTTP2");r(this,"name");r(this,"responseHeaders");r(this,"kind","rest");r(this,"domain",yn);r(this,"basePath",he);r(this,"url","");r(this,"method","GET");r(this,"data",{});r(this,"reload",!1);r(this,"cached",!1);r(this,"headers");r(this,"template")}mockup({request:a,service:i}){throw new Error("Method not implemented.")}local({request:a,service:i}){throw new Error("Method not implemented.")}done({request:a,service:i}){throw new Error("Method not implemented.")}fail(...a){throw new Error("Method not implemented.")}set(a,i){this[a]=i}get(a,i){return this[a]||i}},l(o,"Service"),f(o,"Service"),o),ao=(s=class extends io{constructor(){super(...arguments);r(this,"method","GET");r(this,"cached",!1);r(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});r(this,"JSONresponse")}done(a){u.debug("***** RECEIVED RESPONSE:"),u.debug(a.service.template),this.JSONresponse=JSON.parse(a.service.template)}},l(s,"JSONService"),f(s,"JSONService"),s),po=(t=class extends ao{constructor(){super();r(this,"method","GET");r(this,"cached",!1);r(this,"configFileName","config.json");r(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});r(this,"JSONresponse");this.set("url",`${this.get("basePath")}${this.get("configFileName")}`)}configLoaded(){throw Error("Method not implemented.")}done(a){if(u.debug("***** CONFIG LOADED:"),u.debug(a.service.template),this.JSONresponse=JSON.parse(a.service.template),Object.hasOwn(this.JSONresponse,"__encoded__")){let c=pe.decrypt(this.JSONresponse?.__encoded__,pn);this.JSONresponse=JSON.parse(c)}let i=this.JSONresponse;Object.keys(i).map(c=>(O.set(c,i[c]),c)),this.configLoaded().catch(c=>{throw new Error(`An error ocurred: ${c}`)})}fail(){this.configLoaded().catch(a=>{throw new Error(`An error ocurred: ${a}`)})}},l(t,"ConfigService"),f(t,"ConfigService"),t),D("com.qcobjects.api",[io]),D("com.qcobjects.api.services",[ao]),D("com.qcobjects.api.config",[po])}}),gn,tr=v({"src/globalSettings.ts"(){"use strict";var o;de(),W(),R(),$(),F(),Eo(),ee(),os(),gn=(o=class extends H{constructor(){super(...arguments);r(this,"_GLOBAL",{});r(this,"_logger",new lo)}static __start__(){return o.instance.__start__()}static get instance(){return typeof o._instance>"u"&&(o._instance=new o),o._instance}get logger(){return this._logger}set logger(e){this._logger=e}set(e,n){this._GLOBAL[e]=n}get(e,n){let a;return typeof this._GLOBAL[e]<"u"?a=this._GLOBAL[e]:typeof n<"u"&&(a=n),a}__start__(){let e=f(function(){let a;return y?a=new Promise(function(i,c){"serviceWorker"in navigator&&typeof O.get("serviceWorkerURI")<"u"&&(O.set("serviceWorkerScope",O.get("serviceWorkerScope")?O.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(O.get("serviceWorkerURI"),{scope:O.get("serviceWorkerScope")}).then(function(d){u.debug("Service Worker Registered"),i.call(a,d)},function(d){u.debug("Error registering Service Worker"),c.call(a,d)}),navigator.serviceWorker.ready.then(function(d){u.debug("Service Worker Ready"),i.call(a,d)},function(d){u.debug("Error loading Service Worker"),c.call(a,d)}))}):a=Promise.resolve(),a},"__load__serviceWorker"),n=f(function(){return new Promise(a=>{if(y){u.debug("Starting to building components");try{nr()}catch(i){throw Error(`Something went wrong trying to start components tree: ${i.message}`)}u.debug("Initializing the service worker"),e.call(I).catch(function(i){u.debug(`error loading the service worker ${i}`)})}a()})},"_buildComponents");return new Promise(a=>{u.debug("Starting to load the config settings..."),O.get("useConfigService",!1)?(u.debug("Loading settings using local configuration file..."),or(new po),Fn.configLoaded=n,no(Fn)?.then(i=>{a(i)})?.catch(i=>{throw new Error(`An error ocurred while trying to load ${Fn.url}: ${i}`)})):(u.debug("Starting to load the components..."),n.call(this).then(()=>{a({})}).catch(i=>{throw new Error(`An error ocurred while trying to build the components stack. ${i}`)}))})}},l(o,"_GlobalSettings"),f(o,"GlobalSettings"),r(o,"_instance"),o),D("com.qcobjects",[gn])}}),rs={};Vr(rs,{_top:l(()=>I,"_top"),buildComponentsStack:l(()=>nr,"buildComponentsStack"),componentsStack:l(()=>Un,"componentsStack"),configService:l(()=>Fn,"configService"),get:l(()=>rr,"get"),resetTop:l(()=>fo,"resetTop"),set:l(()=>xo,"set"),setConfigService:l(()=>or,"setConfigService")});var I,Un,fo,nr,Fn,or,xo,rr,Ur,ee=v({"src/top.ts"(){"use strict";No(),Ee(),tr(),wo(),le(),Re(),F(),Oe(),R(),I=typeof Ze<"u"&&typeof Ze.exports<"u"&&Ze.exports||typeof global<"u"&&global||typeof globalThis<"u"&&globalThis||typeof window<"u"&&window||typeof self<"u"&&self!==null&&self||void 0,I.lastCache=void 0,Un=[],fo=f(()=>{let o=gn.instance;I=Me(o,I,!0)},"resetTop"),nr=f(()=>{Un=ns(document)},"buildComponentsStack"),or=f(o=>{I.global.configService=o,Fn=o},"setConfigService"),xo=f((o,s)=>{I[o]=s},"set"),rr=f((o,s)=>I[o]||s,"get"),fo(),Ur=f(function(o){Object.hasOwn(o,"PackagesList")||Object.defineProperty(o,"PackagesList",{set:f(s=>{u.debug("PackagesList is readonly")},"set"),get:f(()=>$o(),"get")}),Object.hasOwn(o,"PackagesNameList")||Object.defineProperty(o,"PackagesNameList",{set:f(s=>{u.debug("PackagesNameList is readonly")},"set"),get:f(()=>Fo(),"get")}),Object.hasOwn(o,"ClassesList")||Object.defineProperty(o,"ClassesList",{set:f(s=>{u.debug("ClassesList is readonly")},"set"),get:f(()=>Go(),"get")}),Object.hasOwn(o,"ClassesNameList")||Object.defineProperty(o,"ClassesNameList",{set(s){u.debug("ClassesNameList is readonly")},get:f(()=>Qr(),"get")})},"_define_props"),y&&(Je("GLOBAL",Q.global),S(j("GLOBAL"))),y&&typeof window<"u"?Object.defineProperty(I,"global",{writable:!0,configurable:!0,enumerable:!0,value:window}):y&&typeof globalThis<"u"&&Object.defineProperty(I,"global",{writable:!0,configurable:!0,enumerable:!0,value:globalThis}),Ur(I)}}),ln,sr,ss=v({"src/captureFalseTouch.ts"(){"use strict";if(R(),F(),ln=!1,sr=f(()=>ln?{passive:!0}:!1,"captureFalseTouch"),y)try{let o=Object.defineProperty({},"passive",{get(){return ln=!0,ln}});window.addEventListener("testPassive",null,o),window.removeEventListener("testPassive",null,o)}catch(o){u.debug(`An error ocurred: ${o}.`),ln=!1}else ln=!1}}),Wn,ir=v({"src/range.ts"(){"use strict";ke(),Wn=f((o,s=0,t=1)=>((s===0||typeof s>"u")&&(s=o,o=0),Array.from({length:(s-o)/t+1},function(e,n){return o+n*t})),"range"),k(Wn)}}),ar,is=v({"src/defaultProcessors.ts"(){"use strict";R(),wn(),ee(),ir(),ar=f(()=>{(function(o){let s=f((i,c,d)=>{if(typeof i>"u"||i===null)throw Error(`mapper.${c}.${d} does not have a component instance or it is null.`);let g=o.global.get(d),p=i.get(d),h=i.data[d],m=typeof h<"u"?h:typeof p<"u"?p:g,b="";return typeof m<"u"&&typeof m.map<"u"?b=m.map(function(C){let _=[...Object.keys(C)].map(E=>` data-${E}="${typeof C[E]<"u"&&C[E]!==null?C[E].toString():""}"`).join("");return`<quick-component name="${c}" ${_} ></quick-component>`}).join(""):u.debug(`${c}.${d} does not have a map property`),b},"mapper");we.setProcessor(s);let t=f(function(i,c,d){let g=`
|
|
5
5
|
/* CSS Document for Mobile Imports */
|
|
6
6
|
@import url("${d}") (orientation:portrait);
|
|
7
7
|
@import url("${d}") (max-width:460px);
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
@import url("${d}") (aspect-ratio: 8/5) and (min-width:460px);
|
|
18
18
|
@import url("${d}") (aspect-ratio: 4/3) and (min-width:460px);
|
|
19
19
|
@import url("${d}") (aspect-ratio: 3/2) and (min-width:460px);
|
|
20
|
-
`,portrait:g};return Object.hasOwn(h,c)?h[c]:""},"layout");we.setProcessor(t);let e=f((i,c,d,...g)=>{let p=[...g].map(function(m){return{[m.split("=")[0]]:m.split("=")[1]}}).reduce(function(m,b){return Object.assign(m,b)}),h=[...Object.keys(p)].map(function(m){return`${m}=${p[m]}`}).join(" ");return`<component name="${c}" componentClass="${d}" ${h}></component>`},"component");we.setProcessor(e);let n=f((i,c,d,...g)=>{let p=[...g].map(function(m){return{[m.split("=")[0]]:m.split("=")[1]}}).reduce(function(m,b){return Object.assign(m,b)}),h=[...Object.keys(p)].map(function(m){return`${m}=${p[m]}`}).join(" ");return`<quick-component name="${c}" componentClass="${d}" ${h}></quick-component>`},"quick_component");we.setProcessor(n);let a=f((i,c,d)=>Vn(c).map(function(g){return d.replace("{{index}}",g.toString())}).join(""),"repeat");we.setProcessor(a)})(T)},"setDefaultProcessors")}}),bn,cr=v({"src/findPackageNodePath.ts"(){"use strict";de(),Re(),R(),F(),bn=f(function(o){let s=null;if(!y)try{let t=jn("node:fs"),e=[`${O.get("projectPath")}${O.get("relativeImportPath")}`,`${O.get("basePath")}${O.get("relativeImportPath")}`,`${O.get("projectPath")}`,`${O.get("basePath")}`,`${O.get("relativeImportPath")}`,`${process.cwd()}${O.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+o,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(Ze.paths);e=e.filter(n=>t.existsSync(n+"/"+o)),e.length>0?(s=e[0],u.info(o+" is Installed.")):(s="",u.info(`${o} is not in a standard path.`))}catch(t){console.log(t)}return s},"findPackageNodePath"),S(bn)}}),zn,lr=v({"src/Import.ts"(){"use strict";De(),de(),be(),me(),cr(),R(),F(),Oe(),zn=f(function(o,s,t){t!==void 0&&u.debug(`[Import] Setting external=${t.toString()} resource to import: ${o}`),t?u.debug(`[Import] Registering external resource to import: ${o}`):u.debug(`[Import] Registering local resource to import: ${o}`);let e;return y?(e=new Promise(function(n,a){let i=f(function(){let d=!1,g=0;for(let p in Z)g++;return g<qn.length?d=!1:d=!0,d},"allPackagesImported"),c=f(function(d){qn.push(s),i()&&qn.map(g=>Ve.push(g)),y&&O.get("removePackageScriptAfterLoading")&&d.target.remove(),n.call(e,{_imported_:d.target,_package_name_:o})},"readyImported");if(!Object.hasOwn(Z,o)){let d=Y("script");d.type=O.get("sourceType","text/javascript"),d.async=!!O.get("asynchronousImportsLoad"),d.onreadystatechange=function(){d.readyState==="complete"&&c(d)},d.onload=c,d.onerror=function(g){u.debug(`An error ocurred: ${g}.`),a.call(e,{_imported_:d,_package_name_:o})},d.src=t?O.get("remoteImportsPath")+o+".js":he+O.get("relativeImportPath")+o+".js",document.getElementsByTagName("head")[0].appendChild(d)}}),e.catch(function(){u.debug("Import: Error loading a package ")})):e=new Promise(function(n,a){try{let i=bn(o),c="";if(i!==null)c=i+"/"+o;else{let d=bn(o+".js");d!==null?c=d+"/"+o+".js":c=he+O.get("relativeImportPath")+o}try{n.call(e,{_imported_:Ae(`${c}`),_package_name_:o})}catch(d){a.call(e,{_imported_:null,_package_name_:o,error:d})}}catch(i){a.call(e,{_imported_:null,_package_name_:o,error:i})}}).catch(function(n){u.debug("Something happened when importing "+o),console.warn(n)}),e.catch(function(n){u.warn(M(n))}),e},"Import"),zn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),V,dr=v({"src/mathFunctions.ts"(){"use strict";V=f(function(o){return isNaN(o)?new Number(0):new Number(o)},"__to_number")}}),ur,as=v({"src/NamespaceRef.ts"(){"use strict";eo(),$(),ur=f(function(o){let t=(D(o)||[]).filter(e=>Yn(e)).map(e=>({[e.__definition.__classType]:e})).reduce((e,n)=>Object.assign(e,n));return o.split(".").map(e=>({[e]:t})).reverse().reduce((e,n)=>(n[Object.keys(n).join(".")]=e,n))},"NamespaceRef")}}),ze,pr,Gn,cs=v({"src/Ready.ts"(){"use strict";de(),F(),Oe(),ee(),ze=f(o=>{y?Ve.push(o.bind(window)):typeof global<"u"&&Ve.push(o.bind(global))},"Ready"),pr=ze,Gn=f(o=>{let s=f(()=>{Ve.map(function(t,e){typeof t=="function"&&(t(),Ve.splice(e,1))})},"_execReady");O.get("delayForReady")>0?y?setTimeout(s.bind(window),O.get("delayForReady")):typeof global<"u"&&setTimeout(s.bind(global),O.get("delayForReady")):s.call(T)},"_Ready")}}),go,ls,ds=v({"src/ArrayCollection.ts"(){"use strict";var o,s;le(),R(),Le(),dr(),go=(o=class extends Array{constructor(){super(...arguments);r(this,"prototype")}unique(){return this.filter(function(n,a,i){return i.indexOf(n)===a})}table(){console.table(this)}sum(){return this.reduce((n,a)=>V(n)+V(a),0)}avg(){return this.length<1?0:this.reduce((n,a)=>(V(n)+V(a))/2)}min(){return this.reduce((n,a)=>V(n)<=V(a)?n:a,1/0)}max(){return this.reduce((n,a)=>V(n)>=V(a)?n:a,0)}sortBy(n,a){let i=a?(function(c,d){return d[n]<c[n]?1:-1}):(function(c,d){return d[n]>c[n]?1:-1});return this.sort(i)}matrix(n,a){return Array.from({length:n},f(()=>a,"x_func"))}matrix2d(n,a){let i=f(function(){return a},"y_func");return Array.from({length:n},f(function(){return Array.from({length:n},i)},"x_func"))}matrix3d(n,a){let i=f(function(){return Array.from({length:n},function(){return a})},"y_func");return Array.from({length:n},f(function(){return Array.from({length:n},i)},"x_func"))}},l(o,"ArrayList"),f(o,"ArrayList"),o),ls=(s=class{constructor(){r(this,"source",K(go,[]))}changed(e,n){u.debug("VALUE CHANGED"),u.debug(e),u.debug(n)}push(e){let n=this;return u.debug("VALUE ADDED"),u.debug(e),n.source.push(e)}pop(){let e=this;return u.debug("VALUE POPPED"),e.source.pop()}_new_(e){let n=this,a=0;n.source=K(j("ArrayList"),e);for(let i of Object.keys(n.source))isNaN(i)||(u.debug("binding "+i.toString()),(function(c){Object.defineProperty(n,c,{set(d){u.debug("setting "+c+"="+d),n.source[c]=d,n.changed(c,d)},get(){return n.source[c]}})})(i),a++);n.source.length=a,Object.defineProperty(n,"length",{get(){return n.source.length}})}},l(s,"ArrayCollection"),f(s,"ArrayCollection"),s)}}),lo,mo,us=v({"src/Tag.ts"(){"use strict";var o;le(),Le(),$(),F(),ds(),lo=(o=class extends go{show(){this.map(function(t){return t.style.opacity=1})}hide(){this.map(function(t){return t.style.opacity=0})}effect(...t){let e=[...t].slice(1),n=t[0],a;(typeof n).toLowerCase()==="string"&&(a=j(n)),this.map(function(i){return a.apply.apply(a,[i].concat(e))})}findElements(t){let e=K(j("TagElements"));if(y)for(let n of Object.keys(this))typeof n=="number"&&typeof this[n]!="function"&&Object.hasOwn(this[n],"subelements")&&e.push(this[n].subelements(t));return e}},l(o,"TagElements"),f(o,"TagElements"),o),mo=f(function(s,t){let e=K(lo);if(y){let n=document.subelements(s),a=[];for(let i=0;i<n.length;i++)typeof t<"u"&&Object.hasOwn(n[i],"innerHTML")&&(n[i].innerHTML=t),a.indexOf(i)<0&&(e.push(n[i]),a.push(i))}return e},"Tag"),D("com.qcobjects",[lo,mo])}}),fr,ps=v({"src/shortCode.ts"(){"use strict";vo(),fr=f(()=>{let s=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((n,a)=>[...s][a]===n?null:n).filter(n=>n!==null).join("")},"shortCode")}}),bo,fs=v({"src/super.ts"(){"use strict";le(),bo=f(function(o,s){return j(o)[s]},"_super_"),bo.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),hr,hs=v({"src/waitUntil.ts"(){"use strict";R(),hr=f((o,s)=>{let t=f((e,n)=>{let i=0;var c=setInterval(function(){n()?(clearInterval(c),e(),u.debug("Ejecuting "+e.name+" after wait")):i<2e3?(i+=1,u.debug("WAIT UNTIL "+e.name+" is true, "+i.toString()+" cycles")):(u.debug("Max execution time for "+e.name+" expression until true"),clearInterval(c))},1)},"_waitUntil");setTimeout(function(){t(o,s)},1)},"waitUntil")}}),dn,gs=v({"src/subelements.ts"(){"use strict";dn=f(l(function(s){return[...this.querySelectorAll(s)]},"subelements2"),"subelements")}}),Wr,ms,da=v({"src/loadSDK.ts"(){"use strict";de(),cr(),lr(),R(),F(),Wr=f(()=>{O.get("useSDK")&&(function(){let o=O.get("remoteImportsPath"),s=!O.get("useLocalSDK");O.set("remoteImportsPath",O.get("remoteSDKPath"));let t=!1,e="QCObjects-SDK";if(y)t=!0;else{let n=bn("qcobjects-sdk");n!==null?(e="qcobjects-sdk",t=!0):n!==""?(e="node_modules/qcobjects-sdk/QCObjects-SDK",t=!0):t=!1}t?(u.info("Importing SDK... "+e),Wo&&typeof jn<"u"?Ae("qcobjects-sdk")?u.debug("QCObjects SDK was loaded OK."):u.debug("QCObjects SDK could not be imported."):zn(e,function(){s?u.debug("QCObjects-SDK.js loaded from remote location"):u.debug("QCObjects-SDK.js loaded from local"),O.set("remoteImportsPath",o)},s)?.catch(n=>{throw new Error(`An error ocurred when trying to import: ${n}`)})):u.debug("SDK has not been imported as it is not available at the moment")})()},"loadSDK"),ms=Wr}}),ua=oa({"src/MainProcess.ts"(){"use strict";ee(),Oo(),ss(),Ee(),Co(),le(),er(),xo(),Yo(),de(),be(),is(),Re(),lr(),ke(),eo(),R(),dr(),as(),Le(),Kn(),$(),F(),cs(),So(),us(),Cn(),to(),ge(),ps(),me(),Eo(),fs(),hs(),gs(),tr(),da(),ir(),f(l((function o(s){if(typeof Object.defineProperty<"u"&&typeof s<"u")try{Object.defineProperty(s,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:o})}catch(t){u.debug(`An error ocurred: ${t}`),typeof s.__qcobjects__<"u"&&(s.__qcobjects__.loaded=!0)}typeof s.__qcobjects__.loaded>"u"&&(s.__qcobjects__.loaded=!0,y&&(Element.prototype.subelements=dn,Document.prototype.subelements=dn,HTMLElement.prototype.subelements=dn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=dn)),u.debugEnabled=!1,u.infoEnabled=!0,y&&(Element.prototype.find=function(t){let e=this,n=[],a=document.subelements(t);return a.map((i,c)=>(typeof a[c]<"u"&&a[c].parentNode.tagName===e.parentNode.tagName&&n.push(ve(i,new Object)),i)),n}),y&&(Element.prototype.append=f(l(function(e){ut(e)||typeof e.body<"u"?this.appendChild(e.body):this.appendChild(e)},"QC_Append"),"QC_Append"),Element.prototype.render=f(l(function(e){let n=this,a=f((i,c)=>{if(typeof document.implementation.createHTMLDocument<"u"){let d=document.implementation.createHTMLDocument("");d.body.innerHTML=c,d.body.subelements("*").map(g=>i.append(g))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=e}catch(i){u.debug(`An error ocurred: ${i}`),a(n,e)}else a(n,e)},"QC_Render"),"QC_Render")),S(hr),S(bo),S(gn),S(j),S(Y),S(fr),S(oe),S(Ce),D("com.qcobjects",[un]),y&&(Element.prototype.Cast=f(l(function(e){return ve(this,e)},"QC_Cast"),"QC_Cast")),y?(window.onload=Gn,yo&&document.addEventListener("deviceready",Gn,sr)):global.onload=Gn,y&&window.addEventListener("popstate",function(t){t.stopImmediatePropagation(),t.stopPropagation(),Qe.route().catch(e=>{throw new Error(`An error ocurred when trying to load initial routes. ${e}`)})}),S(oo),S(Bn),S(Un),S(yn),S(M),S(Yn),S(ut),S(ur),Array.prototype.unique=function(){return this.filter(function(t,e,n){return n.indexOf(t)===e})},Array.unique=function(t){return t.unique()},k(Array.unique),k(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(t){t.table()},k(Array.table),k(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(t,e){return V(t)+V(e)},0)},Array.sum=function(t){return t.sum()},k(Array.sum),k(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(t,e){return(V(t)+V(e))/2})},Array.avg=function(t){return t.avg()},k(Array.avg),k(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(t,e){return V(t)<=V(e)?t:e},1/0)},Array.min=function(t){return t.min()},k(Array.min),k(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(t,e){return V(t)>=V(e)?t:e},0)},Array.max=function(t){return t.max()},k(Array.max),k(Array.prototype.max),Array.prototype.sortBy=function(t,e=!0){let n=e?(function(a,i){return i[t]<a[t]?1:-1}):(function(a,i){return i[t]>a[t]?1:-1});return this.sort(n)},Array.sortBy=function(t,e,n=!0){return t.sortBy(e,n)},k(Array.sortBy),k(Array.prototype.sortBy),Array.prototype.matrix=function(t,e=0){return Array.from({length:t},f(function(a=void 0){return e},"x_func"))},Array.matrix=function(t,e,n=0){return t.matrix(e,n)},k(Array.matrix),k(Array.prototype.matrix),Array.prototype.matrix2d=function(t,e=0){let n=f(function(i){return e},"y_func");return Array.from({length:t},f(function(i){return Array.from({length:t},n)},"x_func"))},Array.matrix2d=function(t,e,n=0){return t.matrix2d(e,n)},k(Array.matrix2d),k(Array.prototype.matrix2d),Array.prototype.matrix3d=function(t,e=0){let n=f(function(i){return Array.from({length:t},function(){return e})},"y_func");return Array.from({length:t},f(function(i){return Array.from({length:t},n)},"x_func"))},Array.matrix3d=function(t,e,n=0){return t.matrix3d(e,n)},k(Array.matrix3d),k(Array.prototype.matrix3d),String.prototype.list=function(){let t=this;return Vn(0,t.length-1).map(function(e){return t[e]})},k(String.prototype.list),ar(),ze(function(){O.get("useSDK")||mn.__start__().catch(t=>{throw Error(t)})}),S(S),S(zn),S(D),S(Je),S(K),S(mo),S(ze),S(pr),S(y),S(fe),S(mn),ms(),y&&hn(function(){ze(function(){(function(t){let e=!1,n=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),a=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function i(c){let d=Math.round(t.scrollY*100/n),g=Math.round(t.scrollX*100/a),p=new CustomEvent("scrollpercent",{detail:{percentX:g,percentY:d}});c.target.dispatchEvent(p);let h="defaultscroll";[0,5,10,25,50,75,90,95,100].filter(function(b){return b===d}).map(function(b){h="percentY"+d.toString();let C=new CustomEvent(h,{detail:{percentX:g,percentY:d}});return c.target.dispatchEvent(C),b})}l(i,"scrollDispatcher"),f(i,"scrollDispatcher"),document.addEventListener("scroll",function(c){e||(requestAnimationFrame(function(){i(c),e=!1}),e=!0)})})(s)})},[]),y||(typeof s.global<"u"&&Object.hasOwn(s.global,"_fireAsyncLoad")&&Ko.call(s),typeof s.global<"u"&&Object.hasOwn(s.global,"onload")&&s.global.onload.call(s)),(function(t){let e=f(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");t&&O.get("secureObjects",!1)?ze(function(){e()}):O.get("secureObjects",!1)&&e()})(y))}),"__qcobjects__"),"__qcobjects__")(T)}}),bs={};Vr(bs,{ArrayCollection:l(()=>ls,"ArrayCollection"),ArrayList:l(()=>go,"ArrayList"),AssignPolyfill:l(()=>pa,"AssignPolyfill"),BackendMicroservice:l(()=>_s,"BackendMicroservice"),CONFIG:l(()=>O,"CONFIG"),Class:l(()=>Je,"Class"),ClassFactory:l(()=>j,"ClassFactory"),ComplexStorageCache:l(()=>gn,"ComplexStorageCache"),Component:l(()=>Qe,"Component"),ComponentURI:l(()=>Un,"ComponentURI"),ConfigService:l(()=>fo,"ConfigService"),Controller:l(()=>vs,"Controller"),DDO:l(()=>xs,"DDO"),DefaultTemplateHandler:l(()=>ys,"DefaultTemplateHandler"),Effect:l(()=>br,"Effect"),Export:l(()=>S,"Export"),GlobalSettings:l(()=>mn,"GlobalSettings"),Import:l(()=>zn,"Import"),InheritClass:l(()=>H,"InheritClass"),JSONService:l(()=>co,"JSONService"),Logger:l(()=>uo,"Logger"),NamespaceRef:l(()=>ur,"NamespaceRef"),New:l(()=>K,"New"),ObjectName:l(()=>yn,"ObjectName"),Package:l(()=>D,"Package"),Processor:l(()=>un,"Processor"),Ready:l(()=>ze,"Ready"),RegisterClass:l(()=>gr,"RegisterClass"),RegisterWidget:l(()=>Io,"RegisterWidget"),RegisterWidgets:l(()=>mr,"RegisterWidgets"),Service:l(()=>ao,"Service"),SourceCSS:l(()=>Cs,"SourceCSS"),SourceJS:l(()=>ws,"SourceJS"),Tag:l(()=>mo,"Tag"),TagElements:l(()=>lo,"TagElements"),Timer:l(()=>Ns,"Timer"),Toggle:l(()=>Is,"Toggle"),TransitionEffect:l(()=>Ss,"TransitionEffect"),VO:l(()=>Es,"VO"),View:l(()=>Os,"View"),_Cast:l(()=>ve,"_Cast"),_CastProps:l(()=>Me,"_CastProps"),_ComponentWidget_:l(()=>Jn,"_ComponentWidget_"),_Crypt:l(()=>pe,"_Crypt"),_DOMCreateElement:l(()=>Y,"_DOMCreateElement"),_DataStringify:l(()=>M,"_DataStringify"),_LegacyCopy:l(()=>wo,"_LegacyCopy"),_QC_CLASSES:l(()=>Q,"_QC_CLASSES"),_QC_PACKAGES:l(()=>Z,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:l(()=>qn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:l(()=>Ve,"_QC_READY_LISTENERS"),_Ready:l(()=>Gn,"_Ready"),__getType__:l(()=>oe,"__getType__"),__instanceID:l(()=>Te,"__instanceID"),__is_raw_class__:l(()=>_n,"__is_raw_class__"),__make_global__:l(()=>Xn,"__make_global__"),__to_number:l(()=>V,"__to_number"),__top__:l(()=>rs,"__top__"),_buildComponentsFromElements_:l(()=>po,"_buildComponentsFromElements_"),_fireAsyncLoad:l(()=>Ko,"_fireAsyncLoad"),_methods_:l(()=>fe,"_methods_"),_protected_code_:l(()=>k,"_protected_code_"),_require_:l(()=>Ae,"_require_"),_super_:l(()=>bo,"_super_"),_tag_filter_:l(()=>No,"_tag_filter_"),_top:l(()=>T,"_top"),asyncLoad:l(()=>hn,"asyncLoad"),captureFalseTouch:l(()=>sr,"captureFalseTouch"),componentLoader:l(()=>Bn,"componentLoader"),findPackageNodePath:l(()=>bn,"findPackageNodePath"),get:l(()=>rr,"get"),getDocumentLayout:l(()=>ga,"getDocumentLayout"),global:l(()=>T,"global"),isBrowser:l(()=>y,"isBrowser"),isNodeCommonJS:l(()=>Wo,"isNodeCommonJS"),isQCObjects_Class:l(()=>Yn,"isQCObjects_Class"),isQCObjects_Object:l(()=>ut,"isQCObjects_Object"),is_a:l(()=>Ce,"is_a"),is_phonegap:l(()=>yo,"is_phonegap"),logger:l(()=>u,"logger"),qcobjects:l(()=>fa,"qcobjects"),range:l(()=>Vn,"range"),ready:l(()=>pr,"ready"),resetTop:l(()=>ho,"resetTop"),serviceLoader:l(()=>oo,"serviceLoader"),set:l(()=>pn,"set"),setDefaultProcessors:l(()=>ar,"setDefaultProcessors"),shortCode:l(()=>fr,"shortCode"),subelements:l(()=>dn,"subelements"),waitUntil:l(()=>hr,"waitUntil")});Ze.exports=sa(bs);var pa={};typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:f(l(function(s,t){"use strict";if(s===null)throw new TypeError("Cannot convert undefined or null to object");let e=Object(s);for(let n=1;n<arguments.length;n++){let a=arguments[n];if(a!==null)for(let i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},"assign"),"assign"),writable:!0,configurable:!0});ee();var fa=ra(ua());ee();Oe();be();me();ke();R();F();gs();Zn();Jo();Oo();zo();Kn();ge();to();Eo();hs();Ee();eo();$();le();Re();Co();W();fs();ps();Cn();Le();cs();ss();So();Yo();xo();as();is();us();lr();De();be();no();W();R();$();var Ke,_s=(Ke=class extends H{constructor({domain:t=wn,basePath:e=he,body:n=null,stream:a=null,request:i=null}){super({domain:t,basePath:e,body:n,stream:a,request:i});r(this,"stream");r(this,"route");r(this,"headers");r(this,"request");u.debug("Initializing BackendMicroservice...");let c=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),c.stream=a,a?.on("data",p=>{let h=i?.method.toLowerCase(),m={post:c.post.bind(c)};Object.hasOwn(m,h)&&m[h].call(c,p)});let d=i?.method.toLowerCase(),g={get:c.get.bind(c),head:c.head.bind(c),put:c.put.bind(c),delete:c.delete.bind(c),connect:c.connect.bind(c),options:c.options.bind(c),trace:c.trace.bind(c),patch:c.patch.bind(c)};Object.hasOwn(g,d)&&g[d].call(c)}cors(){if(this.route.cors){u.debug("Validating CORS...");let{allow_origins:t,allow_credentials:e,allow_methods:n,allow_headers:a}=this.route.cors,i=this;if(typeof i.headers!="object"&&(i.headers={}),typeof i.route.responseHeaders!="object"&&(i.route.responseHeaders={}),typeof t<"u")if(u.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof i.request.headers.origin>"u"||[...t].indexOf(i.request.headers.origin)!==-1)u.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{u.debug("CORS: Origin is not allowed: "+i.request.headers.origin),u.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(c){u.debug(`It was not possible to finish the call to the microservice: ${c}`)}}else u.debug("CORS: no allow_origins available. Allowing all origins..."),u.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof e<"u"?(u.debug(`CORS: allow_credentials present. Allowing ${e}...`),i.route.responseHeaders["Access-Control-Allow-Credentials"]=e.toString()):(u.debug("CORS: No allow_credentials present. Allowing all credentials."),i.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof n<"u"?(u.debug(`CORS: allow_methods present. Allowing ${n}...`),i.route.responseHeaders["Access-Control-Allow-Methods"]=[...n].join(",")):(u.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),i.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof a<"u"?(u.debug(`CORS: allow_headers present. Allowing ${a}...`),i.route.responseHeaders["Access-Control-Allow-Headers"]=[...a].join(",")):(u.debug("CORS: No allow_headers present. Allowing all headers..."),i.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else u.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(t){u.debug(`[BackendMicroservice.head] Data received: ${M(t)}`),this.done()}get(t){u.debug(`[BackendMicroservice.get] Data received: ${M(t)}`),this.done()}post(t){u.debug(`[BackendMicroservice.post] Data received: ${M(t)}`),this.done()}put(t){u.debug(`[BackendMicroservice.put] Data received: ${M(t)}`),this.done()}delete(t){u.debug(`[BackendMicroservice.delete] Data received: ${M(t)}`),this.done()}connect(t){u.debug(`[BackendMicroservice.connect] Data received: ${M(t)}`),this.done()}options(t){u.debug(`[BackendMicroservice.options] Data received: ${M(t)}`),this.done()}trace(t){u.debug(`[BackendMicroservice.trace] Data received: ${M(t)}`),this.done()}patch(t){u.debug(`[BackendMicroservice.patch] Data received: ${M(t)}`),this.done()}finishWithBody(t){try{u.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),u.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=M(this.body)),u.debug(`[BackendMicroservice.finishWithBody]
|
|
21
|
-
body: ${this.body} `),t?.write(this.body),t?.end(),u.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(e){u.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`)}}done(){u.debug("[BackendMicroservice.done] Finalizing the response...");let t=this,e=t.stream;try{if(u.debug("[BackendMicroservice.done] Sending response headers..."),t.route.responseHeaders)u.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){u.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${n}`)}if(t.body!==null)try{u.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),t.finishWithBody.call(t,e)}catch(n){u.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${n}`)}else u.debug("[BackendMicroservice.done] No body present. Ending stream..."),e.end()}},l(Ke,"BackendMicroservice"),f(Ke,"BackendMicroservice"),Ke);D("com.qcobjects.api",[_s]);er();vo();R();Cn();_o();Oe();var gr=f(function(o,s){return Fn(o,s)},"RegisterClass");Xn(gr);var Pe,ys=(Pe=class{constructor({component:s,template:t}){r(this,"template","");r(this,"__definition",{});r(this,"component");this.component=s,this.template=t}assign(s){let t=this;if(typeof t.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof t.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");let e=t.component.processorHandler;e.component=t.component;let n=typeof t.template<"u"?t.template:"";typeof s=="object"?[...Object.keys(s)].map(a=>{let i=s[a];if(typeof i=="string"||typeof i=="number"||!isNaN(i))try{i=we.processObject.bind(e).call(e,i,t.component),n=n.replace(new RegExp(`{{${a}}}`,"g"),i)}catch(c){throw u.warn(`${t.component?.name} could not parse processors.`),Error(`${t.component?.name} could not parse processors. Reason: ${c.message}`)}return a}):u.debug(`${t.component?.name}.data is not an object`);try{n=we.processObject.call(e,n,t.component)}catch(a){throw u.warn(`${t.component?.name} could not parse processors.`),Error(`${t.component?.name} could not parse processors. Reason: ${a.message}`)}return n}},l(Pe,"DefaultTemplateHandler"),f(Pe,"DefaultTemplateHandler"),r(Pe,"__definition",{}),Pe);gr(ys,"com.qcobjects");De();Ee();no();me();W();$();R();var Xe,ws=(Xe=class extends H{constructor(t){super(t);r(this,"domain",wn);r(this,"basePath",he);r(this,"type","text/javascript");r(this,"containerTag","body");r(this,"url","");r(this,"data",{});r(this,"async",!1);r(this,"external",!1);r(this,"status",!1);this.body=Y("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,a){return e.type=a.type,e.src=n,e.crossOrigin=Object.hasOwn(a,"crossOrigin")?a.crossOrigin:"anonymous",e.async=a.async,e.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},e.onload=function(i){a.status=!0,a.done.call(a,i)},e.onerror=function(i){a.status=!1,a.fail.call(a,i)},a.body=e,e}).call(this,Y("script"),this.external?this.url:this.basePath+this.url,t))}catch(e){t.status=!1,u.debug(`An error ocurred: ${e}`),t.fail()}}Cast(t){return ve(this,t)}_new_(t){this.__new__(t),this.rebuild()}},l(Xe,"SourceJS"),f(Xe,"SourceJS"),Xe);D("com.qcobjects",[ws]);De();Ee();no();me();W();F();$();var Ye,Cs=(Ye=class extends H{constructor(t){super(t);r(this,"domain",wn);r(this,"basePath",he);r(this,"url","");r(this,"data",{});r(this,"async",!1);r(this,"external",!1);this.body=Y("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return ve(this,t)}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}rebuild(){let t=this;y&&window.document.getElementsByTagName("head")[0].appendChild((function(e,n,a){return e.type="text/css",e.rel="stylesheet",e.href=n,e.crossOrigin="anonymous",e.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},e.onload=a.done,a.body=e,e}).call(this,Y("link"),this.external?this.url:this.basePath+this.url,t))}},l(Ye,"SourceCSS"),f(Ye,"SourceCSS"),Ye);D("com.qcobjects",[Cs]);tr();me();Re();ke();F();var et,ha=(et=class{constructor(){r(this,"writingSuggestions");r(this,"currentCSSZoom");r(this,"ariaColIndexText");r(this,"ariaRowIndexText");r(this,"accessKey");r(this,"accessKeyLabel");r(this,"autocapitalize");r(this,"dir");r(this,"draggable");r(this,"hidden");r(this,"inert");r(this,"innerText");r(this,"lang");r(this,"offsetHeight");r(this,"offsetLeft");r(this,"offsetParent");r(this,"offsetTop");r(this,"offsetWidth");r(this,"outerText");r(this,"popover");r(this,"spellcheck");r(this,"title");r(this,"translate");r(this,"attributes");r(this,"classList");r(this,"className");r(this,"clientHeight");r(this,"clientLeft");r(this,"clientTop");r(this,"clientWidth");r(this,"id");r(this,"innerHTML");r(this,"localName");r(this,"namespaceURI");r(this,"onfullscreenchange");r(this,"onfullscreenerror");r(this,"outerHTML");r(this,"ownerDocument");r(this,"part");r(this,"prefix");r(this,"scrollHeight");r(this,"scrollLeft");r(this,"scrollTop");r(this,"scrollWidth");r(this,"shadowRoot");r(this,"slot");r(this,"tagName");r(this,"baseURI");r(this,"childNodes");r(this,"firstChild");r(this,"isConnected");r(this,"lastChild");r(this,"nextSibling");r(this,"nodeName");r(this,"nodeType");r(this,"nodeValue");r(this,"parentElement");r(this,"parentNode");r(this,"previousSibling");r(this,"textContent");r(this,"ELEMENT_NODE");r(this,"ATTRIBUTE_NODE");r(this,"TEXT_NODE");r(this,"CDATA_SECTION_NODE");r(this,"ENTITY_REFERENCE_NODE");r(this,"ENTITY_NODE");r(this,"PROCESSING_INSTRUCTION_NODE");r(this,"COMMENT_NODE");r(this,"DOCUMENT_NODE");r(this,"DOCUMENT_TYPE_NODE");r(this,"DOCUMENT_FRAGMENT_NODE");r(this,"NOTATION_NODE");r(this,"DOCUMENT_POSITION_DISCONNECTED");r(this,"DOCUMENT_POSITION_PRECEDING");r(this,"DOCUMENT_POSITION_FOLLOWING");r(this,"DOCUMENT_POSITION_CONTAINS");r(this,"DOCUMENT_POSITION_CONTAINED_BY");r(this,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC");r(this,"ariaAtomic");r(this,"ariaAutoComplete");r(this,"ariaBrailleLabel");r(this,"ariaBrailleRoleDescription");r(this,"ariaBusy");r(this,"ariaChecked");r(this,"ariaColCount");r(this,"ariaColIndex");r(this,"ariaColSpan");r(this,"ariaCurrent");r(this,"ariaDescription");r(this,"ariaDisabled");r(this,"ariaExpanded");r(this,"ariaHasPopup");r(this,"ariaHidden");r(this,"ariaInvalid");r(this,"ariaKeyShortcuts");r(this,"ariaLabel");r(this,"ariaLevel");r(this,"ariaLive");r(this,"ariaModal");r(this,"ariaMultiLine");r(this,"ariaMultiSelectable");r(this,"ariaOrientation");r(this,"ariaPlaceholder");r(this,"ariaPosInSet");r(this,"ariaPressed");r(this,"ariaReadOnly");r(this,"ariaRequired");r(this,"ariaRoleDescription");r(this,"ariaRowCount");r(this,"ariaRowIndex");r(this,"ariaRowSpan");r(this,"ariaSelected");r(this,"ariaSetSize");r(this,"ariaSort");r(this,"ariaValueMax");r(this,"ariaValueMin");r(this,"ariaValueNow");r(this,"ariaValueText");r(this,"role");r(this,"nextElementSibling");r(this,"previousElementSibling");r(this,"childElementCount");r(this,"children");r(this,"firstElementChild");r(this,"lastElementChild");r(this,"assignedSlot");r(this,"attributeStyleMap");r(this,"style");r(this,"contentEditable");r(this,"enterKeyHint");r(this,"inputMode");r(this,"isContentEditable");r(this,"onabort");r(this,"onanimationcancel");r(this,"onanimationend");r(this,"onanimationiteration");r(this,"onanimationstart");r(this,"onauxclick");r(this,"onbeforeinput");r(this,"onbeforetoggle");r(this,"onblur");r(this,"oncancel");r(this,"oncanplay");r(this,"oncanplaythrough");r(this,"onchange");r(this,"onclick");r(this,"onclose");r(this,"oncontextlost");r(this,"oncontextmenu");r(this,"oncontextrestored");r(this,"oncopy");r(this,"oncuechange");r(this,"oncut");r(this,"ondblclick");r(this,"ondrag");r(this,"ondragend");r(this,"ondragenter");r(this,"ondragleave");r(this,"ondragover");r(this,"ondragstart");r(this,"ondrop");r(this,"ondurationchange");r(this,"onemptied");r(this,"onended");r(this,"onerror");r(this,"onfocus");r(this,"onformdata");r(this,"ongotpointercapture");r(this,"oninput");r(this,"oninvalid");r(this,"onkeydown");r(this,"onkeypress");r(this,"onkeyup");r(this,"onload");r(this,"onloadeddata");r(this,"onloadedmetadata");r(this,"onloadstart");r(this,"onlostpointercapture");r(this,"onmousedown");r(this,"onmouseenter");r(this,"onmouseleave");r(this,"onmousemove");r(this,"onmouseout");r(this,"onmouseover");r(this,"onmouseup");r(this,"onpaste");r(this,"onpause");r(this,"onplay");r(this,"onplaying");r(this,"onpointercancel");r(this,"onpointerdown");r(this,"onpointerenter");r(this,"onpointerleave");r(this,"onpointermove");r(this,"onpointerout");r(this,"onpointerover");r(this,"onpointerup");r(this,"onprogress");r(this,"onratechange");r(this,"onreset");r(this,"onresize");r(this,"onscroll");r(this,"onscrollend");r(this,"onsecuritypolicyviolation");r(this,"onseeked");r(this,"onseeking");r(this,"onselect");r(this,"onselectionchange");r(this,"onselectstart");r(this,"onslotchange");r(this,"onstalled");r(this,"onsubmit");r(this,"onsuspend");r(this,"ontimeupdate");r(this,"ontoggle");r(this,"ontouchcancel");r(this,"ontouchend");r(this,"ontouchmove");r(this,"ontouchstart");r(this,"ontransitioncancel");r(this,"ontransitionend");r(this,"ontransitionrun");r(this,"ontransitionstart");r(this,"onvolumechange");r(this,"onwaiting");r(this,"onwebkitanimationend");r(this,"onwebkitanimationiteration");r(this,"onwebkitanimationstart");r(this,"onwebkittransitionend");r(this,"onwheel");r(this,"autofocus");r(this,"dataset");r(this,"nonce");r(this,"tabIndex")}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(s){throw new Error("Method not implemented.")}addEventListener(s,t,e){throw new Error("Method not implemented.")}removeEventListener(s,t,e){throw new Error("Method not implemented.")}attachShadow(s){throw new Error("Method not implemented.")}checkVisibility(s){throw new Error("Method not implemented.")}closest(s){throw new Error("Method not implemented.")}computedStyleMap(){throw new Error("Method not implemented.")}getAttribute(s){throw new Error("Method not implemented.")}getAttributeNS(s,t){throw new Error("Method not implemented.")}getAttributeNames(){throw new Error("Method not implemented.")}getAttributeNode(s){throw new Error("Method not implemented.")}getAttributeNodeNS(s,t){throw new Error("Method not implemented.")}getBoundingClientRect(){throw new Error("Method not implemented.")}getClientRects(){throw new Error("Method not implemented.")}getElementsByClassName(s){throw new Error("Method not implemented.")}getElementsByTagName(s){throw new Error("Method not implemented.")}getElementsByTagNameNS(s,t){throw new Error("Method not implemented.")}getHTML(s){throw new Error("Method not implemented.")}hasAttribute(s){throw new Error("Method not implemented.")}hasAttributeNS(s,t){throw new Error("Method not implemented.")}hasAttributes(){throw new Error("Method not implemented.")}hasPointerCapture(s){throw new Error("Method not implemented.")}insertAdjacentElement(s,t){throw new Error("Method not implemented.")}insertAdjacentHTML(s,t){throw new Error("Method not implemented.")}insertAdjacentText(s,t){throw new Error("Method not implemented.")}matches(s){throw new Error("Method not implemented.")}releasePointerCapture(s){throw new Error("Method not implemented.")}removeAttribute(s){throw new Error("Method not implemented.")}removeAttributeNS(s,t){throw new Error("Method not implemented.")}removeAttributeNode(s){throw new Error("Method not implemented.")}requestFullscreen(s){throw new Error("Method not implemented.")}requestPointerLock(s){throw new Error("Method not implemented.")}scroll(s,t){throw new Error("Method not implemented.")}scrollBy(s,t){throw new Error("Method not implemented.")}scrollIntoView(s){throw new Error("Method not implemented.")}scrollTo(s,t){throw new Error("Method not implemented.")}setAttribute(s,t){throw new Error("Method not implemented.")}setAttributeNS(s,t,e){throw new Error("Method not implemented.")}setAttributeNode(s){throw new Error("Method not implemented.")}setAttributeNodeNS(s){throw new Error("Method not implemented.")}setHTMLUnsafe(s){throw new Error("Method not implemented.")}setPointerCapture(s){throw new Error("Method not implemented.")}toggleAttribute(s,t){throw new Error("Method not implemented.")}webkitMatchesSelector(s){throw new Error("Method not implemented.")}appendChild(s){throw new Error("Method not implemented.")}cloneNode(s){throw new Error("Method not implemented.")}compareDocumentPosition(s){throw new Error("Method not implemented.")}contains(s){throw new Error("Method not implemented.")}getRootNode(s){throw new Error("Method not implemented.")}hasChildNodes(){throw new Error("Method not implemented.")}insertBefore(s,t){throw new Error("Method not implemented.")}isDefaultNamespace(s){throw new Error("Method not implemented.")}isEqualNode(s){throw new Error("Method not implemented.")}isSameNode(s){throw new Error("Method not implemented.")}lookupNamespaceURI(s){throw new Error("Method not implemented.")}lookupPrefix(s){throw new Error("Method not implemented.")}normalize(){throw new Error("Method not implemented.")}removeChild(s){throw new Error("Method not implemented.")}replaceChild(s,t){throw new Error("Method not implemented.")}dispatchEvent(s){throw new Error("Method not implemented.")}animate(s,t){throw new Error("Method not implemented.")}getAnimations(s){throw new Error("Method not implemented.")}after(...s){throw new Error("Method not implemented.")}before(...s){throw new Error("Method not implemented.")}remove(){throw new Error("Method not implemented.")}replaceWith(...s){throw new Error("Method not implemented.")}append(...s){throw new Error("Method not implemented.")}prepend(...s){throw new Error("Method not implemented.")}querySelector(s){throw new Error("Method not implemented.")}querySelectorAll(s){throw new Error("Method not implemented.")}replaceChildren(...s){throw new Error("Method not implemented.")}blur(){throw new Error("Method not implemented.")}focus(s){throw new Error("Method not implemented.")}},l(et,"QCObjectsWidgetNode"),f(et,"QCObjectsWidgetNode"),et),Jn,tt,nt;y?Jn=(tt=class extends HTMLElement{constructor(){super();let s=this,t=s.nodeName.toLowerCase(),e=Y("quick-component"),n=s.getAttributeNames();e.setAttribute("name",t),s.hasAttribute("shadowed")||e.setAttribute("shadowed","true"),n.forEach(i=>{s.hasAttribute(i)&&(e.setAttribute(i,s?.getAttribute(i)),s.removeAttribute(i))}),s.getAttributeNames().filter(function(i){return i.startsWith("data-")}).map(function(i){return i.split("-")[1]}).forEach(function(i){e.setAttribute("data-"+i,s?.getAttribute("data-"+i)),s.removeAttribute("data-"+i)}),[...s.children].forEach(i=>{e.appendChild(i.cloneNode(!0)),i.remove()}),s.append(e)}},l(tt,"_ComponentWidget_"),f(tt,"_ComponentWidget_"),tt):Jn=(nt=class extends ha{constructor(){throw super(),new Error("Class not implemented.")}},l(nt,"_ComponentWidget_"),f(nt,"_ComponentWidget_"),nt);S(Jn);var Io=f(o=>{if(y)customElements.define(o,class extends Jn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),mr=f((...o)=>{[...o].filter(function(t){return typeof t=="string"}).map(function(t){return Io(t)})},"RegisterWidgets");k(Io);k(mr);S(Io);S(mr);de();le();ge();W();R();Le();$();F();var ot,vs=(ot=class extends H{constructor({component:t,dependencies:e}){super({component:t,dependencies:e});r(this,"component");r(this,"dependencies",[]);if(this.component=t,this.dependencies=e,typeof this.component>"u"||this.component===null)throw Error(`${oe(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){u.debug(`An error ocurred: ${n}.`),u.debug("No button to assign press event")}}createRoutingController(){let t=this,e=t.component,n=t.routingSelectedAttr("controllerclass");if(typeof n<"u"){let a=j(n);typeof a<"u"&&e!==null&&(e.routingController=K(a,{component:e}),typeof e.routingController<"u"&&Object.hasOwn(e.routingController,"done")&&typeof e.routingController.done=="function"&&e.routingController.done.call(e.routingController))}}done(){}},l(ot,"Controller"),f(ot,"Controller"),ot);D("com.qcobjects.controllers",[vs]);ge();W();$();var rt,Os=(rt=class extends H{constructor({component:s=void 0,dependencies:t=[]}){if(super({component:s,dependencies:t}),typeof this.component>"u"||this.component==="null")throw Error(`${oe(this)} must be called with a component`)}},l(rt,"View"),f(rt,"View"),rt);D("com.qcobjects.views",[Os]);os();W();$();var st,Es=(st=class extends H{},l(st,"VO"),f(st,"VO"),st);D("com.qcobjects.valueObjects",[Es]);W();$();ke();le();var it,br=(it=class extends H{constructor(){super(...arguments);r(this,"duration",1e3)}done(...t){throw new Error("Method not implemented.")}apply(...t){throw new Error("Method not implemented.")}animate({timing:t,draw:e,duration:n}){let a=this,i=performance.now();requestAnimationFrame(f(l(function c(d){let g=(d-i)/n;g>1&&(g=1);let p=t(g);e(Math.round(p*100)),g<1?requestAnimationFrame(c):typeof a<"u"&&a!==null&&Object.hasOwn(a,"done")&&(typeof a.done).toLowerCase()==="function"&&a.done.call(a)},"animate"),"animate"))}},l(it,"Effect"),f(it,"Effect"),it);D("com.qcobjects.effects.base",[br]);fe(j("Effect")).map(o=>(k(o),o));R();$();le();var at,Ss=(at=class extends br{constructor(){super(...arguments);r(this,"duration",385);r(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1});r(this,"fitToHeight",!1);r(this,"fitToWidth",!1);r(this,"component");r(this,"effects")}apply({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:a,radiusFrom:i,radiusTo:c,scaleFrom:d,scaleTo:g}){let p=this;u.info("EXECUTING TransitionEffect ");let h=p.component.componentRoot;typeof h<"u"&&h!==null&&(p.fitToHeight&&(h.height=typeof h.offsetParent=="object"&&h.offsetParent!==null?h.offsetParent?.scrollHeight:h.getBoundingClientRect().height),p.fitToWidth&&(h.width=typeof h.offsetParent=="object"&&h.offsetParent!==null?h.offsetParent?.scrollWidth:h.getBoundingClientRect().width),p.component.shadowed?h.host.style.display="block":h.style.display="block",p.effects.map(m=>{let b=j(m),_=new b({}).apply.bind(p),E=p.component.shadowed?h.host:h;return _(E,...Object.values({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:a,radiusFrom:i,radiusTo:c,scaleFrom:d,scaleTo:g})),m}))}},l(at,"TransitionEffect"),f(at,"TransitionEffect"),at);D("com.qcobjects.effects.transitions.base",[Ss]);W();$();var ct,Ns=(ct=class extends H{constructor(){super(...arguments);r(this,"duration",1e3);r(this,"alive",!0)}thread({timing:t,intervalInterceptor:e,duration:n}){let a=this,i=performance.now();requestAnimationFrame(f(l(function c(d){let g=d-i,p=g/n;p>1&&(p=1);let h=t(p,g);e(Math.round(h*100)),(p<1||n===-1)&&a.alive&&requestAnimationFrame(c)},"thread"),"thread"))}},l(ct,"Timer"),f(ct,"Timer"),ct);D("com.qcobjects.timing",[Ns]);Xo();ir();ds();Re();W();R();Kn();var lt,xs=(lt=class extends H{constructor({instance:s,name:t,fget:e,fset:n,value:a}){super({instance:s,name:t,fget:e,fset:n,value:a}),this._new_({instance:s,name:t,fget:e,fset:n,value:a})}_new_({instance:s,name:i,fget:e,fset:n}){var i=typeof i>"u"?yn(this):i;Object.defineProperty(s,i,{set(c){let d=c;u.debug("value changed "+i);let g;typeof n<"u"&&typeof n=="function"?g=n(d):g=d,s["_"+i]=g},get(){let c=s["_"+i];u.debug("returning value "+i);let d=f(p=>typeof p=="object"&&Object.hasOwn(p,"value")?p.value:p,"is_ddo"),g;return typeof e<"u"&&typeof e=="function"?g=e(d(c)):g=d(c),g}})}},l(lt,"DDO"),f(lt,"DDO"),lt);S(xs);W();R();$();var dt,Is=(dt=class extends H{constructor(t,e,n){super({positive:t,negative:e,args:n});r(this,"_toggle",!1);r(this,"_inverse",!0);r(this,"_positive",null);r(this,"_negative",null);r(this,"_dispatched",null);r(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,a){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)):(u.debug("Toggle functions are not declared"),a.call(e,t)),t}).then(function(n){return n.changeToggle(),n}).catch(function(n){return u.debug(n.toString()),t}).finally(()=>t);return e}},l(dt,"Toggle"),f(dt,"Toggle"),dt);D("com.qcobjects.tools.essentials",[Is]);cr();var ga=f(function(){let o=f((e,n)=>e>n?"landscape":null,"h"),s=f((e,n)=>n>e?"portrait":null,"v"),t=f((e,n)=>e===n?"square":null,"square");return[o(document.documentElement.clientWidth,document.documentElement.clientHeight),s(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(e=>e!==null).pop()},"getDocumentLayout");dr();ee();_o();ee()});var As=ne(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var ie=I();ie.CONFIG.set("sourceType","module");ie.CONFIG.set("relativeImportPath","js/packages/");ie.CONFIG.set("componentsBasePath","templates/components/");ie.CONFIG.set("delayForReady",1);ie.CONFIG.set("preserveComponentBodyTag",!1);ie.CONFIG.set("useConfigService",!1);ie.CONFIG.set("routingWay","pathname");ie.CONFIG.set("useLocalSDK",!0);ie.CONFIG.set("tplextension","tpl.html");ie.CONFIG.set("asynchronousImportsLoad",!0);ie.CONFIG.set("serviceWorkerURI","/sw.js");ie.CONFIG.set("overrideComponentTag",!0);ie.Component.cached=!0});var Tr=ne((Ga,Ei)=>{"use strict";var Mo=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,ba=Object.getOwnPropertyNames,_a=Object.prototype.hasOwnProperty,w=l((o,s)=>Mo(o,"name",{value:s,configurable:!0}),"__name"),ya=l((o,s)=>{for(var t in s)Mo(o,t,{get:s[t],enumerable:!0})},"__export"),wa=l((o,s,t,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of ba(s))!_a.call(o,n)&&n!==t&&Mo(o,n,{get:l(()=>s[n],"get"),enumerable:!(e=ma(s,n))||e.enumerable});return o},"__copyProps"),Ca=l(o=>wa(Mo({},"__esModule",{value:!0}),o),"__toCommonJS"),Ps={};ya(Ps,{BasicLayout:l(()=>vi,"BasicLayout"),ButtonField:l(()=>Ws,"ButtonField"),CanvasTool:l(()=>Ci,"CanvasTool"),Contact:l(()=>Rs,"Contact"),CubeSplashScreenComponent:l(()=>ii,"CubeSplashScreenComponent"),DataGridController:l(()=>ui,"DataGridController"),EmailField:l(()=>Js,"EmailField"),Fade:l(()=>xe,"Fade"),FormController:l(()=>hi,"FormController"),FormField:l(()=>cn,"FormField"),FormValidations:l(()=>fi,"FormValidations"),GenericController:l(()=>ci,"GenericController"),GridComponent:l(()=>Xs,"GridComponent"),GridController:l(()=>di,"GridController"),GridItemComponent:l(()=>Ks,"GridItemComponent"),GridView:l(()=>yi,"GridView"),InputField:l(()=>Vs,"InputField"),ListComponent:l(()=>ei,"ListComponent"),ListController:l(()=>li,"ListController"),ListItemComponent:l(()=>Ys,"ListItemComponent"),ModalComponent:l(()=>Nr,"ModalComponent"),ModalController:l(()=>bi,"ModalController"),ModalEnclosureComponent:l(()=>Qs,"ModalEnclosureComponent"),ModalFade:l(()=>Ao,"ModalFade"),ModalMoveDown:l(()=>Sr,"ModalMoveDown"),ModalMoveUp:l(()=>Er,"ModalMoveUp"),Move:l(()=>se,"Move"),MoveXInFromLeft:l(()=>Cr,"MoveXInFromLeft"),MoveXInFromRight:l(()=>wr,"MoveXInFromRight"),MoveYInFromBottom:l(()=>vr,"MoveYInFromBottom"),MoveYInFromTop:l(()=>ks,"MoveYInFromTop"),NotificationComponent:l(()=>ri,"NotificationComponent"),Radius:l(()=>Fs,"Radius"),Resize:l(()=>Or,"Resize"),Rotate:l(()=>qs,"Rotate"),RotateX:l(()=>Ds,"RotateX"),RotateY:l(()=>Ls,"RotateY"),RotateZ:l(()=>js,"RotateZ"),SessionData:l(()=>Oi,"SessionData"),SessionUserToken:l(()=>Po,"SessionUserToken"),ShadowedComponent:l(()=>Us,"ShadowedComponent"),SlideItemComponent:l(()=>ni,"SlideItemComponent"),SlideListComponent:l(()=>ti,"SlideListComponent"),SliderComponent:l(()=>oi,"SliderComponent"),SliderController:l(()=>pi,"SliderController"),SplashScreenComponent:l(()=>ro,"SplashScreenComponent"),SwaggerUIComponent:l(()=>Zs,"SwaggerUIComponent"),SwaggerUIController:l(()=>gi,"SwaggerUIController"),TextField:l(()=>zs,"TextField"),VideoSplashScreenComponent:l(()=>si,"VideoSplashScreenComponent"),WipeDown:l(()=>Bs,"WipeDown"),WipeLeft:l(()=>$s,"WipeLeft"),WipeRight:l(()=>Gs,"WipeRight"),WipeUp:l(()=>Hs,"WipeUp"),default:l(()=>Oa,"default"),i18n_messages:l(()=>yr,"i18n_messages")});Ei.exports=Ca(Ps);var To=I(),_e=I(),pt,yr=(pt=class extends _e.InheritClass{constructor({messages:s=[]}){super({messages:s}),_e.CONFIG.get("use_i18n",!1)&&(_e.CONFIG.set("lang","en"),_e.global.get("i18n")?_e.global.set("i18n",{messages:_e.global.get("i18n").messages.concat(s)}):_e.global.set("i18n",{messages:s}))}_load_i18n_packages_(){return _e.CONFIG.get("i18n_languages",[]).map(s=>{(0,_e.Import)(`org.quickcorp.i18n_messages.${s}`)})}},l(pt,"i18n_messages"),w(pt,"i18n_messages"),pt);(0,_e.Package)("org.qcobjects.i18n_messages",[yr]);new yr({})._load_i18n_packages_();var Ms=I(),ft,Rs=(ft=class extends Ms.VO{},l(ft,"Contact"),w(ft,"Contact"),ft);(0,Ms.Package)("org.qcobjects.models",[Rs]);var G=I(),Ne=I(),qe,xe=(qe=class extends Ne.Effect{constructor(t){super(t);r(this,"duration",1e3);this.duration=t?.duration}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Ne.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;Ne.logger.debug("alpha: "+c.toString()),t.style.opacity=c.toString()}})}static apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Ne.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;Ne.logger.debug("alpha: "+c.toString()),t.style.opacity=c.toString()}})}},l(qe,"Fade"),w(qe,"Fade"),r(qe,"duration"),qe),Fe,se=(Fe=class extends Ne.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t,e,n,a,i){let c=a-e,d=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(g){return g},draw(g){Ne.logger.debug("animation progress: "+g.toString());let p=n+g*d/100,h=e+g*c/100;Ne.logger.debug("x: "+h.toString()+" y:"+p.toString()),t.style.transform="translate("+h+"px,"+p+"px)"}})}},l(Fe,"Move"),w(Fe,"Move"),r(Fe,"duration"),Fe);(0,Ne.Package)("org.qcobjects.effects.base",[xe,se]);var P=I(),ht,wr=(ht=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,t.width,0,0,0)}},l(ht,"MoveXInFromRight"),w(ht,"MoveXInFromRight"),ht),gt,Cr=(gt=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,-t.width,0,0,0)}},l(gt,"MoveXInFromLeft"),w(gt,"MoveXInFromLeft"),gt),mt,vr=(mt=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,0,t.height,0,0)}},l(mt,"MoveYInFromBottom"),w(mt,"MoveYInFromBottom"),mt),bt,ks=(bt=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,0,-t.height,0,0)}},l(bt,"MoveYInFromTop"),w(bt,"MoveYInFromTop"),bt),$e,Ds=($e=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(1,0,0,"+c.toString()+"deg)"}})}},l($e,"RotateX"),w($e,"RotateX"),r($e,"duration"),$e),Ge,Ls=(Ge=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(0,1,0,"+c.toString()+"deg)"}})}},l(Ge,"RotateY"),w(Ge,"RotateY"),r(Ge,"duration"),Ge),_t,js=(_t=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(0,0,1,"+c.toString()+"deg)"}})}},l(_t,"RotateZ"),w(_t,"RotateZ"),_t),yt,qs=(yt=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(1,1,1,"+c.toString()+"deg)"}})}},l(yt,"Rotate"),w(yt,"Rotate"),yt),wt,Fs=(wt=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("radius: "+c.toString()),t.style.borderRadius=c.toString()+"px"}})}},l(wt,"Radius"),w(wt,"Radius"),wt),Ct,Or=(Ct=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("resize: "+c.toString()),t.style.transformOrigin="center",t.style.transform="scale("+c+","+c+")"}})}},l(Ct,"Resize"),w(Ct,"Resize"),Ct),vt,$s=(vt=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+c+")"}})}},l(vt,"WipeLeft"),w(vt,"WipeLeft"),vt),Ot,Gs=(Ot=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+c+")"}})}},l(Ot,"WipeRight"),w(Ot,"WipeRight"),Ot),Et,Hs=(Et=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+c+")"}})}},l(Et,"WipeUp"),w(Et,"WipeUp"),Et),St,Bs=(St=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+c+")"}})}},l(St,"WipeDown"),w(St,"WipeDown"),St);(0,P.Package)("org.qcobjects.effects.extended",[wr,Cr,vr,ks,Ds,Ls,js,qs,Fs,Or,$s,Gs,Hs,Bs]);var va=I(),Nt,Ao=(Nt=class extends xe{constructor(){super(...arguments);r(this,"duration",500)}},l(Nt,"ModalFade"),w(Nt,"ModalFade"),Nt),xt,Er=(xt=class extends se{constructor(){super(...arguments);r(this,"duration",800)}},l(xt,"ModalMoveUp"),w(xt,"ModalMoveUp"),xt),It,Sr=(It=class extends se{constructor(){super(...arguments);r(this,"duration",300)}},l(It,"ModalMoveDown"),w(It,"ModalMoveDown"),It);(0,va.Package)("org.qcobjects.modal.effects",[Ao,Sr,Er]);var Se=I(),Tt,cn=(Tt=class extends Se.Component{constructor(t){t.name=typeof t.name<"u"?t.name:"form-field";super(t);r(this,"fieldType");r(this,"cached",!1);r(this,"reload",!0);r(this,"body");r(this,"name");r(this,"data")}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",()=>{Se.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Se.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Se.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Se.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Se.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],a=n.getAttribute("data-field");Se.logger.debug("Binding "+a+" for "+this.name),this.data[a]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Se.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},l(Tt,"FormField"),w(Tt,"FormField"),Tt);(0,Se.Package)("org.qcobjects.base.components",[cn]);var At,Us=(At=class extends G.Component{constructor(t){t.body=(0,G._DOMCreateElement)("div");super(t);r(this,"container",null);r(this,"shadowed",!0);r(this,"cached",!1);r(this,"controller",null);r(this,"view",null);r(this,"data",{})}},l(At,"ShadowedComponent"),w(At,"ShadowedComponent"),At),Pt,Ws=(Pt=class extends cn{constructor(s){s.fieldType="button",super(s)}},l(Pt,"ButtonField"),w(Pt,"ButtonField"),Pt),Mt,Vs=(Mt=class extends cn{constructor(s){s.fieldType="input",super(s)}},l(Mt,"InputField"),w(Mt,"InputField"),Mt),Rt,zs=(Rt=class extends cn{constructor(s){s.fieldType="textarea",super(s)}},l(Rt,"TextField"),w(Rt,"TextField"),Rt),kt,Js=(kt=class extends cn{constructor(s){s.fieldType="input",super(s)}},l(kt,"EmailField"),w(kt,"EmailField"),kt),Dt,Qs=(Dt=class extends G.Component{constructor(t){t.body=(0,G._DOMCreateElement)("div");super(t);r(this,"name","modalenclosure");r(this,"tplsource","inline");r(this,"cached",!1);r(this,"basePath",G.CONFIG.get("modalBasePath",G.CONFIG.get("remoteSDKPath","")));r(this,"template",`
|
|
20
|
+
`,portrait:g};return Object.hasOwn(h,c)?h[c]:""},"layout");we.setProcessor(t);let e=f((i,c,d,...g)=>{let p=[...g].map(function(m){return{[m.split("=")[0]]:m.split("=")[1]}}).reduce(function(m,b){return Object.assign(m,b)}),h=[...Object.keys(p)].map(function(m){return`${m}=${p[m]}`}).join(" ");return`<component name="${c}" componentClass="${d}" ${h}></component>`},"component");we.setProcessor(e);let n=f((i,c,d,...g)=>{let p=[...g].map(function(m){return{[m.split("=")[0]]:m.split("=")[1]}}).reduce(function(m,b){return Object.assign(m,b)}),h=[...Object.keys(p)].map(function(m){return`${m}=${p[m]}`}).join(" ");return`<quick-component name="${c}" componentClass="${d}" ${h}></quick-component>`},"quick_component");we.setProcessor(n);let a=f((i,c,d)=>Wn(c).map(function(g){return d.replace("{{index}}",g.toString())}).join(""),"repeat");we.setProcessor(a)})(I)},"setDefaultProcessors")}}),mn,cr=v({"src/findPackageNodePath.ts"(){"use strict";de(),Re(),R(),F(),mn=f(function(o){let s=null;if(!y)try{let t=Ln("node:fs"),e=[`${O.get("projectPath")}${O.get("relativeImportPath")}`,`${O.get("basePath")}${O.get("relativeImportPath")}`,`${O.get("projectPath")}`,`${O.get("basePath")}`,`${O.get("relativeImportPath")}`,`${process.cwd()}${O.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+o,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(Ze.paths);e=e.filter(n=>t.existsSync(n+"/"+o)),e.length>0?(s=e[0],u.info(o+" is Installed.")):(s="",u.info(`${o} is not in a standard path.`))}catch(t){console.log(t)}return s},"findPackageNodePath"),S(mn)}}),Vn,lr=v({"src/Import.ts"(){"use strict";De(),de(),be(),me(),cr(),R(),F(),Oe(),Vn=f(function(o,s,t){t!==void 0&&u.debug(`[Import] Setting external=${t.toString()} resource to import: ${o}`),t?u.debug(`[Import] Registering external resource to import: ${o}`):u.debug(`[Import] Registering local resource to import: ${o}`);let e;return y?(e=new Promise(function(n,a){let i=f(function(){let d=!1,g=0;for(let p in Z)g++;return g<jn.length?d=!1:d=!0,d},"allPackagesImported"),c=f(function(d){jn.push(s),i()&&jn.map(g=>Ve.push(g)),y&&O.get("removePackageScriptAfterLoading")&&d.target.remove(),n.call(e,{_imported_:d.target,_package_name_:o})},"readyImported");if(!Object.hasOwn(Z,o)){let d=Y("script");d.type=O.get("sourceType","text/javascript"),d.async=!!O.get("asynchronousImportsLoad"),d.onreadystatechange=function(){d.readyState==="complete"&&c(d)},d.onload=c,d.onerror=function(g){u.debug(`An error ocurred: ${g}.`),a.call(e,{_imported_:d,_package_name_:o})},d.src=t?O.get("remoteImportsPath")+o+".js":he+O.get("relativeImportPath")+o+".js",document.getElementsByTagName("head")[0].appendChild(d)}}),e.catch(function(){u.debug("Import: Error loading a package ")})):e=new Promise(function(n,a){try{let i=mn(o),c="";if(i!==null)c=i+"/"+o;else{let d=mn(o+".js");d!==null?c=d+"/"+o+".js":c=he+O.get("relativeImportPath")+o}try{n.call(e,{_imported_:Ae(`${c}`),_package_name_:o})}catch(d){a.call(e,{_imported_:null,_package_name_:o,error:d})}}catch(i){a.call(e,{_imported_:null,_package_name_:o,error:i})}}).catch(function(n){u.debug("Something happened when importing "+o),console.warn(n)}),e.catch(function(n){u.warn(M(n))}),e},"Import"),Vn.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"}}}),V,dr=v({"src/mathFunctions.ts"(){"use strict";V=f(function(o){return isNaN(o)?new Number(0):new Number(o)},"__to_number")}}),ur,as=v({"src/NamespaceRef.ts"(){"use strict";Yn(),$(),ur=f(function(o){let t=(D(o)||[]).filter(e=>Xn(e)).map(e=>({[e.__definition.__classType]:e})).reduce((e,n)=>Object.assign(e,n));return o.split(".").map(e=>({[e]:t})).reverse().reduce((e,n)=>(n[Object.keys(n).join(".")]=e,n))},"NamespaceRef")}}),ze,pr,$n,cs=v({"src/Ready.ts"(){"use strict";de(),F(),Oe(),ee(),ze=f(o=>{y?Ve.push(o.bind(window)):typeof global<"u"&&Ve.push(o.bind(global))},"Ready"),pr=ze,$n=f(o=>{let s=f(()=>{Ve.map(function(t,e){typeof t=="function"&&(t(),Ve.splice(e,1))})},"_execReady");O.get("delayForReady")>0?y?setTimeout(s.bind(window),O.get("delayForReady")):typeof global<"u"&&setTimeout(s.bind(global),O.get("delayForReady")):s.call(I)},"_Ready")}}),ho,ls,ds=v({"src/ArrayCollection.ts"(){"use strict";var o,s;le(),R(),Le(),dr(),ho=(o=class extends Array{constructor(){super(...arguments);r(this,"prototype")}unique(){return this.filter(function(n,a,i){return i.indexOf(n)===a})}table(){console.table(this)}sum(){return this.reduce((n,a)=>V(n)+V(a),0)}avg(){return this.length<1?0:this.reduce((n,a)=>(V(n)+V(a))/2)}min(){return this.reduce((n,a)=>V(n)<=V(a)?n:a,1/0)}max(){return this.reduce((n,a)=>V(n)>=V(a)?n:a,0)}sortBy(n,a){let i=a?(function(c,d){return d[n]<c[n]?1:-1}):(function(c,d){return d[n]>c[n]?1:-1});return this.sort(i)}matrix(n,a){return Array.from({length:n},f(()=>a,"x_func"))}matrix2d(n,a){let i=f(function(){return a},"y_func");return Array.from({length:n},f(function(){return Array.from({length:n},i)},"x_func"))}matrix3d(n,a){let i=f(function(){return Array.from({length:n},function(){return a})},"y_func");return Array.from({length:n},f(function(){return Array.from({length:n},i)},"x_func"))}},l(o,"ArrayList"),f(o,"ArrayList"),o),ls=(s=class{constructor(){r(this,"source",K(ho,[]))}changed(e,n){u.debug("VALUE CHANGED"),u.debug(e),u.debug(n)}push(e){let n=this;return u.debug("VALUE ADDED"),u.debug(e),n.source.push(e)}pop(){let e=this;return u.debug("VALUE POPPED"),e.source.pop()}_new_(e){let n=this,a=0;n.source=K(j("ArrayList"),e);for(let i of Object.keys(n.source))isNaN(i)||(u.debug("binding "+i.toString()),(function(c){Object.defineProperty(n,c,{set(d){u.debug("setting "+c+"="+d),n.source[c]=d,n.changed(c,d)},get(){return n.source[c]}})})(i),a++);n.source.length=a,Object.defineProperty(n,"length",{get(){return n.source.length}})}},l(s,"ArrayCollection"),f(s,"ArrayCollection"),s)}}),co,go,us=v({"src/Tag.ts"(){"use strict";var o;le(),Le(),$(),F(),ds(),co=(o=class extends ho{show(){this.map(function(t){return t.style.opacity=1})}hide(){this.map(function(t){return t.style.opacity=0})}effect(...t){let e=[...t].slice(1),n=t[0],a;(typeof n).toLowerCase()==="string"&&(a=j(n)),this.map(function(i){return a.apply.apply(a,[i].concat(e))})}findElements(t){let e=K(j("TagElements"));if(y)for(let n of Object.keys(this))typeof n=="number"&&typeof this[n]!="function"&&Object.hasOwn(this[n],"subelements")&&e.push(this[n].subelements(t));return e}},l(o,"TagElements"),f(o,"TagElements"),o),go=f(function(s,t){let e=K(co);if(y){let n=document.subelements(s),a=[];for(let i=0;i<n.length;i++)typeof t<"u"&&Object.hasOwn(n[i],"innerHTML")&&(n[i].innerHTML=t),a.indexOf(i)<0&&(e.push(n[i]),a.push(i))}return e},"Tag"),D("com.qcobjects",[co,go])}}),fr,ps=v({"src/shortCode.ts"(){"use strict";Co(),fr=f(()=>{let s=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((n,a)=>[...s][a]===n?null:n).filter(n=>n!==null).join("")},"shortCode")}}),mo,fs=v({"src/super.ts"(){"use strict";le(),mo=f(function(o,s){return j(o)[s]},"_super_"),mo.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"}}}),hr,hs=v({"src/waitUntil.ts"(){"use strict";R(),hr=f((o,s)=>{let t=f((e,n)=>{let i=0;var c=setInterval(function(){n()?(clearInterval(c),e(),u.debug("Ejecuting "+e.name+" after wait")):i<2e3?(i+=1,u.debug("WAIT UNTIL "+e.name+" is true, "+i.toString()+" cycles")):(u.debug("Max execution time for "+e.name+" expression until true"),clearInterval(c))},1)},"_waitUntil");setTimeout(function(){t(o,s)},1)},"waitUntil")}}),dn,gs=v({"src/subelements.ts"(){"use strict";dn=f(l(function(s){return[...this.querySelectorAll(s)]},"subelements2"),"subelements")}}),Wr,ms,da=v({"src/loadSDK.ts"(){"use strict";de(),cr(),lr(),R(),F(),Wr=f(()=>{O.get("useSDK")&&(function(){let o=O.get("remoteImportsPath"),s=!O.get("useLocalSDK");O.set("remoteImportsPath",O.get("remoteSDKPath"));let t=!1,e="QCObjects-SDK";if(y)t=!0;else{let n=mn("qcobjects-sdk");n!==null?(e="qcobjects-sdk",t=!0):n!==""?(e="node_modules/qcobjects-sdk/QCObjects-SDK",t=!0):t=!1}t?(u.info("Importing SDK... "+e),Wo&&typeof Ln<"u"?Ae("qcobjects-sdk")?u.debug("QCObjects SDK was loaded OK."):u.debug("QCObjects SDK could not be imported."):Vn(e,function(){s?u.debug("QCObjects-SDK.js loaded from remote location"):u.debug("QCObjects-SDK.js loaded from local"),O.set("remoteImportsPath",o)},s)?.catch(n=>{throw new Error(`An error ocurred when trying to import: ${n}`)})):u.debug("SDK has not been imported as it is not available at the moment")})()},"loadSDK"),ms=Wr}}),ua=oa({"src/MainProcess.ts"(){"use strict";ee(),vo(),ss(),Ee(),wo(),le(),er(),No(),Yo(),de(),be(),is(),Re(),lr(),ke(),Yn(),R(),dr(),as(),Le(),Zn(),$(),F(),cs(),Eo(),us(),wn(),eo(),ge(),ps(),me(),Oo(),fs(),hs(),gs(),tr(),da(),ir(),f(l((function o(s){if(typeof Object.defineProperty<"u"&&typeof s<"u")try{Object.defineProperty(s,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:o})}catch(t){u.debug(`An error ocurred: ${t}`),typeof s.__qcobjects__<"u"&&(s.__qcobjects__.loaded=!0)}typeof s.__qcobjects__.loaded>"u"&&(s.__qcobjects__.loaded=!0,y&&(Element.prototype.subelements=dn,Document.prototype.subelements=dn,HTMLElement.prototype.subelements=dn,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=dn)),u.debugEnabled=!1,u.infoEnabled=!0,y&&(Element.prototype.find=function(t){let e=this,n=[],a=document.subelements(t);return a.map((i,c)=>(typeof a[c]<"u"&&a[c].parentNode.tagName===e.parentNode.tagName&&n.push(ve(i,new Object)),i)),n}),y&&(Element.prototype.append=f(l(function(e){ut(e)||typeof e.body<"u"?this.appendChild(e.body):this.appendChild(e)},"QC_Append"),"QC_Append"),Element.prototype.render=f(l(function(e){let n=this,a=f((i,c)=>{if(typeof document.implementation.createHTMLDocument<"u"){let d=document.implementation.createHTMLDocument("");d.body.innerHTML=c,d.body.subelements("*").map(g=>i.append(g))}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=e}catch(i){u.debug(`An error ocurred: ${i}`),a(n,e)}else a(n,e)},"QC_Render"),"QC_Render")),S(hr),S(mo),S(hn),S(j),S(Y),S(fr),S(oe),S(Ce),D("com.qcobjects",[un]),y&&(Element.prototype.Cast=f(l(function(e){return ve(this,e)},"QC_Cast"),"QC_Cast")),y?(window.onload=$n,_o&&document.addEventListener("deviceready",$n,sr)):global.onload=$n,y&&window.addEventListener("popstate",function(t){t.stopImmediatePropagation(),t.stopPropagation(),Qe.route().catch(e=>{throw new Error(`An error ocurred when trying to load initial routes. ${e}`)})}),S(no),S(Hn),S(Bn),S(_n),S(M),S(Xn),S(ut),S(ur),Array.prototype.unique=function(){return this.filter(function(t,e,n){return n.indexOf(t)===e})},Array.unique=function(t){return t.unique()},k(Array.unique),k(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(t){t.table()},k(Array.table),k(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(t,e){return V(t)+V(e)},0)},Array.sum=function(t){return t.sum()},k(Array.sum),k(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(t,e){return(V(t)+V(e))/2})},Array.avg=function(t){return t.avg()},k(Array.avg),k(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(t,e){return V(t)<=V(e)?t:e},1/0)},Array.min=function(t){return t.min()},k(Array.min),k(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(t,e){return V(t)>=V(e)?t:e},0)},Array.max=function(t){return t.max()},k(Array.max),k(Array.prototype.max),Array.prototype.sortBy=function(t,e=!0){let n=e?(function(a,i){return i[t]<a[t]?1:-1}):(function(a,i){return i[t]>a[t]?1:-1});return this.sort(n)},Array.sortBy=function(t,e,n=!0){return t.sortBy(e,n)},k(Array.sortBy),k(Array.prototype.sortBy),Array.prototype.matrix=function(t,e=0){return Array.from({length:t},f(function(a=void 0){return e},"x_func"))},Array.matrix=function(t,e,n=0){return t.matrix(e,n)},k(Array.matrix),k(Array.prototype.matrix),Array.prototype.matrix2d=function(t,e=0){let n=f(function(i){return e},"y_func");return Array.from({length:t},f(function(i){return Array.from({length:t},n)},"x_func"))},Array.matrix2d=function(t,e,n=0){return t.matrix2d(e,n)},k(Array.matrix2d),k(Array.prototype.matrix2d),Array.prototype.matrix3d=function(t,e=0){let n=f(function(i){return Array.from({length:t},function(){return e})},"y_func");return Array.from({length:t},f(function(i){return Array.from({length:t},n)},"x_func"))},Array.matrix3d=function(t,e,n=0){return t.matrix3d(e,n)},k(Array.matrix3d),k(Array.prototype.matrix3d),String.prototype.list=function(){let t=this;return Wn(0,t.length-1).map(function(e){return t[e]})},k(String.prototype.list),ar(),ze(function(){O.get("useSDK")||gn.__start__().catch(t=>{throw Error(t)})}),S(S),S(Vn),S(D),S(Je),S(K),S(go),S(ze),S(pr),S(y),S(fe),S(gn),ms(),y&&fn(function(){ze(function(){(function(t){let e=!1,n=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),a=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function i(c){let d=Math.round(t.scrollY*100/n),g=Math.round(t.scrollX*100/a),p=new CustomEvent("scrollpercent",{detail:{percentX:g,percentY:d}});c.target.dispatchEvent(p);let h="defaultscroll";[0,5,10,25,50,75,90,95,100].filter(function(b){return b===d}).map(function(b){h="percentY"+d.toString();let C=new CustomEvent(h,{detail:{percentX:g,percentY:d}});return c.target.dispatchEvent(C),b})}l(i,"scrollDispatcher"),f(i,"scrollDispatcher"),document.addEventListener("scroll",function(c){e||(requestAnimationFrame(function(){i(c),e=!1}),e=!0)})})(s)})},[]),y||(typeof s.global<"u"&&Object.hasOwn(s.global,"_fireAsyncLoad")&&Ko.call(s),typeof s.global<"u"&&Object.hasOwn(s.global,"onload")&&s.global.onload.call(s)),(function(t){let e=f(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");t&&O.get("secureObjects",!1)?ze(function(){e()}):O.get("secureObjects",!1)&&e()})(y))}),"__qcobjects__"),"__qcobjects__")(I)}}),bs={};Vr(bs,{ArrayCollection:l(()=>ls,"ArrayCollection"),ArrayList:l(()=>ho,"ArrayList"),AssignPolyfill:l(()=>pa,"AssignPolyfill"),BackendMicroservice:l(()=>_s,"BackendMicroservice"),CONFIG:l(()=>O,"CONFIG"),Class:l(()=>Je,"Class"),ClassFactory:l(()=>j,"ClassFactory"),ComplexStorageCache:l(()=>hn,"ComplexStorageCache"),Component:l(()=>Qe,"Component"),ComponentURI:l(()=>Bn,"ComponentURI"),ConfigService:l(()=>po,"ConfigService"),Controller:l(()=>vs,"Controller"),DDO:l(()=>xs,"DDO"),DefaultTemplateHandler:l(()=>ys,"DefaultTemplateHandler"),Effect:l(()=>br,"Effect"),Export:l(()=>S,"Export"),GlobalSettings:l(()=>gn,"GlobalSettings"),Import:l(()=>Vn,"Import"),InheritClass:l(()=>H,"InheritClass"),JSONService:l(()=>ao,"JSONService"),Logger:l(()=>lo,"Logger"),NamespaceRef:l(()=>ur,"NamespaceRef"),New:l(()=>K,"New"),ObjectName:l(()=>_n,"ObjectName"),Package:l(()=>D,"Package"),Processor:l(()=>un,"Processor"),Ready:l(()=>ze,"Ready"),RegisterClass:l(()=>gr,"RegisterClass"),RegisterWidget:l(()=>Io,"RegisterWidget"),RegisterWidgets:l(()=>mr,"RegisterWidgets"),Service:l(()=>io,"Service"),SourceCSS:l(()=>Cs,"SourceCSS"),SourceJS:l(()=>ws,"SourceJS"),Tag:l(()=>go,"Tag"),TagElements:l(()=>co,"TagElements"),Timer:l(()=>Ns,"Timer"),Toggle:l(()=>Is,"Toggle"),TransitionEffect:l(()=>Ss,"TransitionEffect"),VO:l(()=>Es,"VO"),View:l(()=>Os,"View"),_Cast:l(()=>ve,"_Cast"),_CastProps:l(()=>Me,"_CastProps"),_ComponentWidget_:l(()=>zn,"_ComponentWidget_"),_Crypt:l(()=>pe,"_Crypt"),_DOMCreateElement:l(()=>Y,"_DOMCreateElement"),_DataStringify:l(()=>M,"_DataStringify"),_LegacyCopy:l(()=>yo,"_LegacyCopy"),_QC_CLASSES:l(()=>Q,"_QC_CLASSES"),_QC_PACKAGES:l(()=>Z,"_QC_PACKAGES"),_QC_PACKAGES_IMPORTED:l(()=>jn,"_QC_PACKAGES_IMPORTED"),_QC_READY_LISTENERS:l(()=>Ve,"_QC_READY_LISTENERS"),_Ready:l(()=>$n,"_Ready"),__getType__:l(()=>oe,"__getType__"),__instanceID:l(()=>Te,"__instanceID"),__is_raw_class__:l(()=>bn,"__is_raw_class__"),__make_global__:l(()=>Kn,"__make_global__"),__to_number:l(()=>V,"__to_number"),__top__:l(()=>rs,"__top__"),_buildComponentsFromElements_:l(()=>uo,"_buildComponentsFromElements_"),_fireAsyncLoad:l(()=>Ko,"_fireAsyncLoad"),_methods_:l(()=>fe,"_methods_"),_protected_code_:l(()=>k,"_protected_code_"),_require_:l(()=>Ae,"_require_"),_super_:l(()=>mo,"_super_"),_tag_filter_:l(()=>So,"_tag_filter_"),_top:l(()=>I,"_top"),asyncLoad:l(()=>fn,"asyncLoad"),captureFalseTouch:l(()=>sr,"captureFalseTouch"),componentLoader:l(()=>Hn,"componentLoader"),findPackageNodePath:l(()=>mn,"findPackageNodePath"),get:l(()=>rr,"get"),getDocumentLayout:l(()=>ga,"getDocumentLayout"),global:l(()=>I,"global"),isBrowser:l(()=>y,"isBrowser"),isNodeCommonJS:l(()=>Wo,"isNodeCommonJS"),isQCObjects_Class:l(()=>Xn,"isQCObjects_Class"),isQCObjects_Object:l(()=>ut,"isQCObjects_Object"),is_a:l(()=>Ce,"is_a"),is_phonegap:l(()=>_o,"is_phonegap"),logger:l(()=>u,"logger"),qcobjects:l(()=>fa,"qcobjects"),range:l(()=>Wn,"range"),ready:l(()=>pr,"ready"),resetTop:l(()=>fo,"resetTop"),serviceLoader:l(()=>no,"serviceLoader"),set:l(()=>xo,"set"),setDefaultProcessors:l(()=>ar,"setDefaultProcessors"),shortCode:l(()=>fr,"shortCode"),subelements:l(()=>dn,"subelements"),waitUntil:l(()=>hr,"waitUntil")});Ze.exports=sa(bs);var pa={};typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:f(l(function(s,t){"use strict";if(s===null)throw new TypeError("Cannot convert undefined or null to object");let e=Object(s);for(let n=1;n<arguments.length;n++){let a=arguments[n];if(a!==null)for(let i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},"assign"),"assign"),writable:!0,configurable:!0});ee();var fa=ra(ua());ee();Oe();be();me();ke();R();F();gs();Qn();Jo();vo();zo();Zn();ge();eo();Oo();hs();Ee();Yn();$();le();Re();wo();W();fs();ps();wn();Le();cs();ss();Eo();Yo();No();as();is();us();lr();De();be();to();W();R();$();var Ke,_s=(Ke=class extends H{constructor({domain:t=yn,basePath:e=he,body:n=null,stream:a=null,request:i=null}){super({domain:t,basePath:e,body:n,stream:a,request:i});r(this,"stream");r(this,"route");r(this,"headers");r(this,"request");u.debug("Initializing BackendMicroservice...");let c=this;typeof this.body>"u"&&(this.body=null),typeof n<"u"&&(this.body=n),this.cors(),c.stream=a,a?.on("data",p=>{let h=i?.method.toLowerCase(),m={post:c.post.bind(c)};Object.hasOwn(m,h)&&m[h].call(c,p)});let d=i?.method.toLowerCase(),g={get:c.get.bind(c),head:c.head.bind(c),put:c.put.bind(c),delete:c.delete.bind(c),connect:c.connect.bind(c),options:c.options.bind(c),trace:c.trace.bind(c),patch:c.patch.bind(c)};Object.hasOwn(g,d)&&g[d].call(c)}cors(){if(this.route.cors){u.debug("Validating CORS...");let{allow_origins:t,allow_credentials:e,allow_methods:n,allow_headers:a}=this.route.cors,i=this;if(typeof i.headers!="object"&&(i.headers={}),typeof i.route.responseHeaders!="object"&&(i.route.responseHeaders={}),typeof t<"u")if(u.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof i.request.headers.origin>"u"||[...t].indexOf(i.request.headers.origin)!==-1)u.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{u.debug("CORS: Origin is not allowed: "+i.request.headers.origin),u.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(c){u.debug(`It was not possible to finish the call to the microservice: ${c}`)}}else u.debug("CORS: no allow_origins available. Allowing all origins..."),u.debug("CORS: Adding header Access-Control-Allow-Origin=*"),i.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof e<"u"?(u.debug(`CORS: allow_credentials present. Allowing ${e}...`),i.route.responseHeaders["Access-Control-Allow-Credentials"]=e.toString()):(u.debug("CORS: No allow_credentials present. Allowing all credentials."),i.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof n<"u"?(u.debug(`CORS: allow_methods present. Allowing ${n}...`),i.route.responseHeaders["Access-Control-Allow-Methods"]=[...n].join(",")):(u.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),i.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof a<"u"?(u.debug(`CORS: allow_headers present. Allowing ${a}...`),i.route.responseHeaders["Access-Control-Allow-Headers"]=[...a].join(",")):(u.debug("CORS: No allow_headers present. Allowing all headers..."),i.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else u.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(t){u.debug(`[BackendMicroservice.head] Data received: ${M(t)}`),this.done()}get(t){u.debug(`[BackendMicroservice.get] Data received: ${M(t)}`),this.done()}post(t){u.debug(`[BackendMicroservice.post] Data received: ${M(t)}`),this.done()}put(t){u.debug(`[BackendMicroservice.put] Data received: ${M(t)}`),this.done()}delete(t){u.debug(`[BackendMicroservice.delete] Data received: ${M(t)}`),this.done()}connect(t){u.debug(`[BackendMicroservice.connect] Data received: ${M(t)}`),this.done()}options(t){u.debug(`[BackendMicroservice.options] Data received: ${M(t)}`),this.done()}trace(t){u.debug(`[BackendMicroservice.trace] Data received: ${M(t)}`),this.done()}patch(t){u.debug(`[BackendMicroservice.patch] Data received: ${M(t)}`),this.done()}finishWithBody(t){try{u.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),u.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=M(this.body)),u.debug(`[BackendMicroservice.finishWithBody]
|
|
21
|
+
body: ${this.body} `),t?.write(this.body),t?.end(),u.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(e){u.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`)}}done(){u.debug("[BackendMicroservice.done] Finalizing the response...");let t=this,e=t.stream;try{if(u.debug("[BackendMicroservice.done] Sending response headers..."),t.route.responseHeaders)u.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){u.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${n}`)}if(t.body!==null)try{u.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),t.finishWithBody.call(t,e)}catch(n){u.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${n}`)}else u.debug("[BackendMicroservice.done] No body present. Ending stream..."),e.end()}},l(Ke,"BackendMicroservice"),f(Ke,"BackendMicroservice"),Ke);D("com.qcobjects.api",[_s]);er();Co();R();wn();bo();Oe();var gr=f(function(o,s){return qn(o,s)},"RegisterClass");Kn(gr);var Pe,ys=(Pe=class{constructor({component:s,template:t}){r(this,"template","");r(this,"__definition",{});r(this,"component");this.component=s,this.template=t}assign(s){let t=this;if(typeof t.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof t.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");let e=t.component.processorHandler;e.component=t.component;let n=typeof t.template<"u"?t.template:"";typeof s=="object"?[...Object.keys(s)].map(a=>{let i=s[a];if(typeof i=="string"||typeof i=="number"||!isNaN(i))try{i=we.processObject.bind(e).call(e,i,t.component),n=n.replace(new RegExp(`{{${a}}}`,"g"),i)}catch(c){throw u.warn(`${t.component?.name} could not parse processors.`),Error(`${t.component?.name} could not parse processors. Reason: ${c.message}`)}return a}):u.debug(`${t.component?.name}.data is not an object`);try{n=we.processObject.call(e,n,t.component)}catch(a){throw u.warn(`${t.component?.name} could not parse processors.`),Error(`${t.component?.name} could not parse processors. Reason: ${a.message}`)}return n}},l(Pe,"DefaultTemplateHandler"),f(Pe,"DefaultTemplateHandler"),r(Pe,"__definition",{}),Pe);gr(ys,"com.qcobjects");De();Ee();to();me();W();$();R();var Xe,ws=(Xe=class extends H{constructor(t){super(t);r(this,"domain",yn);r(this,"basePath",he);r(this,"type","text/javascript");r(this,"containerTag","body");r(this,"url","");r(this,"data",{});r(this,"async",!1);r(this,"external",!1);r(this,"status",!1);this.body=Y("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,a){return e.type=a.type,e.src=n,e.crossOrigin=Object.hasOwn(a,"crossOrigin")?a.crossOrigin:"anonymous",e.async=a.async,e.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},e.onload=function(i){a.status=!0,a.done.call(a,i)},e.onerror=function(i){a.status=!1,a.fail.call(a,i)},a.body=e,e}).call(this,Y("script"),this.external?this.url:this.basePath+this.url,t))}catch(e){t.status=!1,u.debug(`An error ocurred: ${e}`),t.fail()}}Cast(t){return ve(this,t)}_new_(t){this.__new__(t),this.rebuild()}},l(Xe,"SourceJS"),f(Xe,"SourceJS"),Xe);D("com.qcobjects",[ws]);De();Ee();to();me();W();F();$();var Ye,Cs=(Ye=class extends H{constructor(t){super(t);r(this,"domain",yn);r(this,"basePath",he);r(this,"url","");r(this,"data",{});r(this,"async",!1);r(this,"external",!1);this.body=Y("link")}fail(){throw new Error("Method not implemented.")}Cast(t){return ve(this,t)}set(t,e){this[t]=e}get(t,e){return this[t]||e}done(){}rebuild(){let t=this;y&&window.document.getElementsByTagName("head")[0].appendChild((function(e,n,a){return e.type="text/css",e.rel="stylesheet",e.href=n,e.crossOrigin="anonymous",e.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},e.onload=a.done,a.body=e,e}).call(this,Y("link"),this.external?this.url:this.basePath+this.url,t))}},l(Ye,"SourceCSS"),f(Ye,"SourceCSS"),Ye);D("com.qcobjects",[Cs]);tr();me();Re();ke();F();var et,ha=(et=class{constructor(){r(this,"writingSuggestions");r(this,"currentCSSZoom");r(this,"ariaColIndexText");r(this,"ariaRowIndexText");r(this,"accessKey");r(this,"accessKeyLabel");r(this,"autocapitalize");r(this,"dir");r(this,"draggable");r(this,"hidden");r(this,"inert");r(this,"innerText");r(this,"lang");r(this,"offsetHeight");r(this,"offsetLeft");r(this,"offsetParent");r(this,"offsetTop");r(this,"offsetWidth");r(this,"outerText");r(this,"popover");r(this,"spellcheck");r(this,"title");r(this,"translate");r(this,"attributes");r(this,"classList");r(this,"className");r(this,"clientHeight");r(this,"clientLeft");r(this,"clientTop");r(this,"clientWidth");r(this,"id");r(this,"innerHTML");r(this,"localName");r(this,"namespaceURI");r(this,"onfullscreenchange");r(this,"onfullscreenerror");r(this,"outerHTML");r(this,"ownerDocument");r(this,"part");r(this,"prefix");r(this,"scrollHeight");r(this,"scrollLeft");r(this,"scrollTop");r(this,"scrollWidth");r(this,"shadowRoot");r(this,"slot");r(this,"tagName");r(this,"baseURI");r(this,"childNodes");r(this,"firstChild");r(this,"isConnected");r(this,"lastChild");r(this,"nextSibling");r(this,"nodeName");r(this,"nodeType");r(this,"nodeValue");r(this,"parentElement");r(this,"parentNode");r(this,"previousSibling");r(this,"textContent");r(this,"ELEMENT_NODE");r(this,"ATTRIBUTE_NODE");r(this,"TEXT_NODE");r(this,"CDATA_SECTION_NODE");r(this,"ENTITY_REFERENCE_NODE");r(this,"ENTITY_NODE");r(this,"PROCESSING_INSTRUCTION_NODE");r(this,"COMMENT_NODE");r(this,"DOCUMENT_NODE");r(this,"DOCUMENT_TYPE_NODE");r(this,"DOCUMENT_FRAGMENT_NODE");r(this,"NOTATION_NODE");r(this,"DOCUMENT_POSITION_DISCONNECTED");r(this,"DOCUMENT_POSITION_PRECEDING");r(this,"DOCUMENT_POSITION_FOLLOWING");r(this,"DOCUMENT_POSITION_CONTAINS");r(this,"DOCUMENT_POSITION_CONTAINED_BY");r(this,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC");r(this,"ariaAtomic");r(this,"ariaAutoComplete");r(this,"ariaBrailleLabel");r(this,"ariaBrailleRoleDescription");r(this,"ariaBusy");r(this,"ariaChecked");r(this,"ariaColCount");r(this,"ariaColIndex");r(this,"ariaColSpan");r(this,"ariaCurrent");r(this,"ariaDescription");r(this,"ariaDisabled");r(this,"ariaExpanded");r(this,"ariaHasPopup");r(this,"ariaHidden");r(this,"ariaInvalid");r(this,"ariaKeyShortcuts");r(this,"ariaLabel");r(this,"ariaLevel");r(this,"ariaLive");r(this,"ariaModal");r(this,"ariaMultiLine");r(this,"ariaMultiSelectable");r(this,"ariaOrientation");r(this,"ariaPlaceholder");r(this,"ariaPosInSet");r(this,"ariaPressed");r(this,"ariaReadOnly");r(this,"ariaRequired");r(this,"ariaRoleDescription");r(this,"ariaRowCount");r(this,"ariaRowIndex");r(this,"ariaRowSpan");r(this,"ariaSelected");r(this,"ariaSetSize");r(this,"ariaSort");r(this,"ariaValueMax");r(this,"ariaValueMin");r(this,"ariaValueNow");r(this,"ariaValueText");r(this,"role");r(this,"nextElementSibling");r(this,"previousElementSibling");r(this,"childElementCount");r(this,"children");r(this,"firstElementChild");r(this,"lastElementChild");r(this,"assignedSlot");r(this,"attributeStyleMap");r(this,"style");r(this,"contentEditable");r(this,"enterKeyHint");r(this,"inputMode");r(this,"isContentEditable");r(this,"onabort");r(this,"onanimationcancel");r(this,"onanimationend");r(this,"onanimationiteration");r(this,"onanimationstart");r(this,"onauxclick");r(this,"onbeforeinput");r(this,"onbeforetoggle");r(this,"onblur");r(this,"oncancel");r(this,"oncanplay");r(this,"oncanplaythrough");r(this,"onchange");r(this,"onclick");r(this,"onclose");r(this,"oncontextlost");r(this,"oncontextmenu");r(this,"oncontextrestored");r(this,"oncopy");r(this,"oncuechange");r(this,"oncut");r(this,"ondblclick");r(this,"ondrag");r(this,"ondragend");r(this,"ondragenter");r(this,"ondragleave");r(this,"ondragover");r(this,"ondragstart");r(this,"ondrop");r(this,"ondurationchange");r(this,"onemptied");r(this,"onended");r(this,"onerror");r(this,"onfocus");r(this,"onformdata");r(this,"ongotpointercapture");r(this,"oninput");r(this,"oninvalid");r(this,"onkeydown");r(this,"onkeypress");r(this,"onkeyup");r(this,"onload");r(this,"onloadeddata");r(this,"onloadedmetadata");r(this,"onloadstart");r(this,"onlostpointercapture");r(this,"onmousedown");r(this,"onmouseenter");r(this,"onmouseleave");r(this,"onmousemove");r(this,"onmouseout");r(this,"onmouseover");r(this,"onmouseup");r(this,"onpaste");r(this,"onpause");r(this,"onplay");r(this,"onplaying");r(this,"onpointercancel");r(this,"onpointerdown");r(this,"onpointerenter");r(this,"onpointerleave");r(this,"onpointermove");r(this,"onpointerout");r(this,"onpointerover");r(this,"onpointerup");r(this,"onprogress");r(this,"onratechange");r(this,"onreset");r(this,"onresize");r(this,"onscroll");r(this,"onscrollend");r(this,"onsecuritypolicyviolation");r(this,"onseeked");r(this,"onseeking");r(this,"onselect");r(this,"onselectionchange");r(this,"onselectstart");r(this,"onslotchange");r(this,"onstalled");r(this,"onsubmit");r(this,"onsuspend");r(this,"ontimeupdate");r(this,"ontoggle");r(this,"ontouchcancel");r(this,"ontouchend");r(this,"ontouchmove");r(this,"ontouchstart");r(this,"ontransitioncancel");r(this,"ontransitionend");r(this,"ontransitionrun");r(this,"ontransitionstart");r(this,"onvolumechange");r(this,"onwaiting");r(this,"onwebkitanimationend");r(this,"onwebkitanimationiteration");r(this,"onwebkitanimationstart");r(this,"onwebkittransitionend");r(this,"onwheel");r(this,"autofocus");r(this,"dataset");r(this,"nonce");r(this,"tabIndex")}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(s){throw new Error("Method not implemented.")}addEventListener(s,t,e){throw new Error("Method not implemented.")}removeEventListener(s,t,e){throw new Error("Method not implemented.")}attachShadow(s){throw new Error("Method not implemented.")}checkVisibility(s){throw new Error("Method not implemented.")}closest(s){throw new Error("Method not implemented.")}computedStyleMap(){throw new Error("Method not implemented.")}getAttribute(s){throw new Error("Method not implemented.")}getAttributeNS(s,t){throw new Error("Method not implemented.")}getAttributeNames(){throw new Error("Method not implemented.")}getAttributeNode(s){throw new Error("Method not implemented.")}getAttributeNodeNS(s,t){throw new Error("Method not implemented.")}getBoundingClientRect(){throw new Error("Method not implemented.")}getClientRects(){throw new Error("Method not implemented.")}getElementsByClassName(s){throw new Error("Method not implemented.")}getElementsByTagName(s){throw new Error("Method not implemented.")}getElementsByTagNameNS(s,t){throw new Error("Method not implemented.")}getHTML(s){throw new Error("Method not implemented.")}hasAttribute(s){throw new Error("Method not implemented.")}hasAttributeNS(s,t){throw new Error("Method not implemented.")}hasAttributes(){throw new Error("Method not implemented.")}hasPointerCapture(s){throw new Error("Method not implemented.")}insertAdjacentElement(s,t){throw new Error("Method not implemented.")}insertAdjacentHTML(s,t){throw new Error("Method not implemented.")}insertAdjacentText(s,t){throw new Error("Method not implemented.")}matches(s){throw new Error("Method not implemented.")}releasePointerCapture(s){throw new Error("Method not implemented.")}removeAttribute(s){throw new Error("Method not implemented.")}removeAttributeNS(s,t){throw new Error("Method not implemented.")}removeAttributeNode(s){throw new Error("Method not implemented.")}requestFullscreen(s){throw new Error("Method not implemented.")}requestPointerLock(s){throw new Error("Method not implemented.")}scroll(s,t){throw new Error("Method not implemented.")}scrollBy(s,t){throw new Error("Method not implemented.")}scrollIntoView(s){throw new Error("Method not implemented.")}scrollTo(s,t){throw new Error("Method not implemented.")}setAttribute(s,t){throw new Error("Method not implemented.")}setAttributeNS(s,t,e){throw new Error("Method not implemented.")}setAttributeNode(s){throw new Error("Method not implemented.")}setAttributeNodeNS(s){throw new Error("Method not implemented.")}setHTMLUnsafe(s){throw new Error("Method not implemented.")}setPointerCapture(s){throw new Error("Method not implemented.")}toggleAttribute(s,t){throw new Error("Method not implemented.")}webkitMatchesSelector(s){throw new Error("Method not implemented.")}appendChild(s){throw new Error("Method not implemented.")}cloneNode(s){throw new Error("Method not implemented.")}compareDocumentPosition(s){throw new Error("Method not implemented.")}contains(s){throw new Error("Method not implemented.")}getRootNode(s){throw new Error("Method not implemented.")}hasChildNodes(){throw new Error("Method not implemented.")}insertBefore(s,t){throw new Error("Method not implemented.")}isDefaultNamespace(s){throw new Error("Method not implemented.")}isEqualNode(s){throw new Error("Method not implemented.")}isSameNode(s){throw new Error("Method not implemented.")}lookupNamespaceURI(s){throw new Error("Method not implemented.")}lookupPrefix(s){throw new Error("Method not implemented.")}normalize(){throw new Error("Method not implemented.")}removeChild(s){throw new Error("Method not implemented.")}replaceChild(s,t){throw new Error("Method not implemented.")}dispatchEvent(s){throw new Error("Method not implemented.")}animate(s,t){throw new Error("Method not implemented.")}getAnimations(s){throw new Error("Method not implemented.")}after(...s){throw new Error("Method not implemented.")}before(...s){throw new Error("Method not implemented.")}remove(){throw new Error("Method not implemented.")}replaceWith(...s){throw new Error("Method not implemented.")}append(...s){throw new Error("Method not implemented.")}prepend(...s){throw new Error("Method not implemented.")}querySelector(s){throw new Error("Method not implemented.")}querySelectorAll(s){throw new Error("Method not implemented.")}replaceChildren(...s){throw new Error("Method not implemented.")}blur(){throw new Error("Method not implemented.")}focus(s){throw new Error("Method not implemented.")}},l(et,"QCObjectsWidgetNode"),f(et,"QCObjectsWidgetNode"),et),zn,tt,nt;y?zn=(tt=class extends HTMLElement{constructor(){super();let s=this,t=s.nodeName.toLowerCase(),e=Y("quick-component"),n=s.getAttributeNames();e.setAttribute("name",t),s.hasAttribute("shadowed")||e.setAttribute("shadowed","true"),n.forEach(i=>{s.hasAttribute(i)&&(e.setAttribute(i,s?.getAttribute(i)),s.removeAttribute(i))}),s.getAttributeNames().filter(function(i){return i.startsWith("data-")}).map(function(i){return i.split("-")[1]}).forEach(function(i){e.setAttribute("data-"+i,s?.getAttribute("data-"+i)),s.removeAttribute("data-"+i)}),[...s.children].forEach(i=>{e.appendChild(i.cloneNode(!0)),i.remove()}),s.append(e)}},l(tt,"_ComponentWidget_"),f(tt,"_ComponentWidget_"),tt):zn=(nt=class extends ha{constructor(){throw super(),new Error("Class not implemented.")}},l(nt,"_ComponentWidget_"),f(nt,"_ComponentWidget_"),nt);S(zn);var Io=f(o=>{if(y)customElements.define(o,class extends zn{});else throw new Error("RegisterWidget is not implemented for non browser ecosystems yet.")},"RegisterWidget"),mr=f((...o)=>{[...o].filter(function(t){return typeof t=="string"}).map(function(t){return Io(t)})},"RegisterWidgets");k(Io);k(mr);S(Io);S(mr);de();le();ge();W();R();Le();$();F();var ot,vs=(ot=class extends H{constructor({component:t,dependencies:e}){super({component:t,dependencies:e});r(this,"component");r(this,"dependencies",[]);if(this.component=t,this.dependencies=e,typeof this.component>"u"||this.component===null)throw Error(`${oe(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){u.debug(`An error ocurred: ${n}.`),u.debug("No button to assign press event")}}createRoutingController(){let t=this,e=t.component,n=t.routingSelectedAttr("controllerclass");if(typeof n<"u"){let a=j(n);typeof a<"u"&&e!==null&&(e.routingController=K(a,{component:e}),typeof e.routingController<"u"&&Object.hasOwn(e.routingController,"done")&&typeof e.routingController.done=="function"&&e.routingController.done.call(e.routingController))}}done(){}},l(ot,"Controller"),f(ot,"Controller"),ot);D("com.qcobjects.controllers",[vs]);ge();W();$();var rt,Os=(rt=class extends H{constructor({component:s=void 0,dependencies:t=[]}){if(super({component:s,dependencies:t}),typeof this.component>"u"||this.component==="null")throw Error(`${oe(this)} must be called with a component`)}},l(rt,"View"),f(rt,"View"),rt);D("com.qcobjects.views",[Os]);os();W();$();var st,Es=(st=class extends H{},l(st,"VO"),f(st,"VO"),st);D("com.qcobjects.valueObjects",[Es]);W();$();ke();le();var it,br=(it=class extends H{constructor(){super(...arguments);r(this,"duration",1e3)}done(...t){throw new Error("Method not implemented.")}apply(...t){throw new Error("Method not implemented.")}animate({timing:t,draw:e,duration:n}){let a=this,i=performance.now();requestAnimationFrame(f(l(function c(d){let g=(d-i)/n;g>1&&(g=1);let p=t(g);e(Math.round(p*100)),g<1?requestAnimationFrame(c):typeof a<"u"&&a!==null&&Object.hasOwn(a,"done")&&(typeof a.done).toLowerCase()==="function"&&a.done.call(a)},"animate"),"animate"))}},l(it,"Effect"),f(it,"Effect"),it);D("com.qcobjects.effects.base",[br]);fe(j("Effect")).map(o=>(k(o),o));R();$();le();var at,Ss=(at=class extends br{constructor(){super(...arguments);r(this,"duration",385);r(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1});r(this,"fitToHeight",!1);r(this,"fitToWidth",!1);r(this,"component");r(this,"effects")}apply({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:a,radiusFrom:i,radiusTo:c,scaleFrom:d,scaleTo:g}){let p=this;u.info("EXECUTING TransitionEffect ");let h=p.component.componentRoot;typeof h<"u"&&h!==null&&(p.fitToHeight&&(h.height=typeof h.offsetParent=="object"&&h.offsetParent!==null?h.offsetParent?.scrollHeight:h.getBoundingClientRect().height),p.fitToWidth&&(h.width=typeof h.offsetParent=="object"&&h.offsetParent!==null?h.offsetParent?.scrollWidth:h.getBoundingClientRect().width),p.component.shadowed?h.host.style.display="block":h.style.display="block",p.effects.map(m=>{let b=j(m),_=new b({}).apply.bind(p),E=p.component.shadowed?h.host:h;return _(E,...Object.values({alphaFrom:t,alphaTo:e,angleFrom:n,angleTo:a,radiusFrom:i,radiusTo:c,scaleFrom:d,scaleTo:g})),m}))}},l(at,"TransitionEffect"),f(at,"TransitionEffect"),at);D("com.qcobjects.effects.transitions.base",[Ss]);W();$();var ct,Ns=(ct=class extends H{constructor(){super(...arguments);r(this,"duration",1e3);r(this,"alive",!0)}thread({timing:t,intervalInterceptor:e,duration:n}){let a=this,i=performance.now();requestAnimationFrame(f(l(function c(d){let g=d-i,p=g/n;p>1&&(p=1);let h=t(p,g);e(Math.round(h*100)),(p<1||n===-1)&&a.alive&&requestAnimationFrame(c)},"thread"),"thread"))}},l(ct,"Timer"),f(ct,"Timer"),ct);D("com.qcobjects.timing",[Ns]);Xo();ir();ds();Re();W();R();Zn();var lt,xs=(lt=class extends H{constructor({instance:s,name:t,fget:e,fset:n,value:a}){super({instance:s,name:t,fget:e,fset:n,value:a}),this._new_({instance:s,name:t,fget:e,fset:n,value:a})}_new_({instance:s,name:i,fget:e,fset:n}){var i=typeof i>"u"?_n(this):i;Object.defineProperty(s,i,{set(c){let d=c;u.debug("value changed "+i);let g;typeof n<"u"&&typeof n=="function"?g=n(d):g=d,s["_"+i]=g},get(){let c=s["_"+i];u.debug("returning value "+i);let d=f(p=>typeof p=="object"&&Object.hasOwn(p,"value")?p.value:p,"is_ddo"),g;return typeof e<"u"&&typeof e=="function"?g=e(d(c)):g=d(c),g}})}},l(lt,"DDO"),f(lt,"DDO"),lt);S(xs);W();R();$();var dt,Is=(dt=class extends H{constructor(t,e,n){super({positive:t,negative:e,args:n});r(this,"_toggle",!1);r(this,"_inverse",!0);r(this,"_positive",null);r(this,"_negative",null);r(this,"_dispatched",null);r(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,a){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)):(u.debug("Toggle functions are not declared"),a.call(e,t)),t}).then(function(n){return n.changeToggle(),n}).catch(function(n){return u.debug(n.toString()),t}).finally(()=>t);return e}},l(dt,"Toggle"),f(dt,"Toggle"),dt);D("com.qcobjects.tools.essentials",[Is]);cr();var ga=f(function(){let o=f((e,n)=>e>n?"landscape":null,"h"),s=f((e,n)=>n>e?"portrait":null,"v"),t=f((e,n)=>e===n?"square":null,"square");return[o(document.documentElement.clientWidth,document.documentElement.clientHeight),s(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(e=>e!==null).pop()},"getDocumentLayout");dr();ee();bo();ee()});var As=ne(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var ie=T();ie.CONFIG.set("sourceType","module");ie.CONFIG.set("relativeImportPath","js/packages/");ie.CONFIG.set("componentsBasePath","templates/components/");ie.CONFIG.set("delayForReady",1);ie.CONFIG.set("preserveComponentBodyTag",!1);ie.CONFIG.set("useConfigService",!1);ie.CONFIG.set("routingWay","pathname");ie.CONFIG.set("useLocalSDK",!0);ie.CONFIG.set("tplextension","tpl.html");ie.CONFIG.set("asynchronousImportsLoad",!0);ie.CONFIG.set("serviceWorkerURI","/sw.js");ie.CONFIG.set("overrideComponentTag",!0);ie.Component.cached=!0});var Tr=ne((Ga,Ei)=>{"use strict";var Mo=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,ba=Object.getOwnPropertyNames,_a=Object.prototype.hasOwnProperty,w=l((o,s)=>Mo(o,"name",{value:s,configurable:!0}),"__name"),ya=l((o,s)=>{for(var t in s)Mo(o,t,{get:s[t],enumerable:!0})},"__export"),wa=l((o,s,t,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of ba(s))!_a.call(o,n)&&n!==t&&Mo(o,n,{get:l(()=>s[n],"get"),enumerable:!(e=ma(s,n))||e.enumerable});return o},"__copyProps"),Ca=l(o=>wa(Mo({},"__esModule",{value:!0}),o),"__toCommonJS"),Ps={};ya(Ps,{BasicLayout:l(()=>vi,"BasicLayout"),ButtonField:l(()=>Ws,"ButtonField"),CanvasTool:l(()=>Ci,"CanvasTool"),Contact:l(()=>Rs,"Contact"),CubeSplashScreenComponent:l(()=>ii,"CubeSplashScreenComponent"),DataGridController:l(()=>ui,"DataGridController"),EmailField:l(()=>Js,"EmailField"),Fade:l(()=>xe,"Fade"),FormController:l(()=>hi,"FormController"),FormField:l(()=>cn,"FormField"),FormValidations:l(()=>fi,"FormValidations"),GenericController:l(()=>ci,"GenericController"),GridComponent:l(()=>Xs,"GridComponent"),GridController:l(()=>di,"GridController"),GridItemComponent:l(()=>Ks,"GridItemComponent"),GridView:l(()=>yi,"GridView"),InputField:l(()=>Vs,"InputField"),ListComponent:l(()=>ei,"ListComponent"),ListController:l(()=>li,"ListController"),ListItemComponent:l(()=>Ys,"ListItemComponent"),ModalComponent:l(()=>Nr,"ModalComponent"),ModalController:l(()=>bi,"ModalController"),ModalEnclosureComponent:l(()=>Qs,"ModalEnclosureComponent"),ModalFade:l(()=>Ao,"ModalFade"),ModalMoveDown:l(()=>Sr,"ModalMoveDown"),ModalMoveUp:l(()=>Er,"ModalMoveUp"),Move:l(()=>se,"Move"),MoveXInFromLeft:l(()=>Cr,"MoveXInFromLeft"),MoveXInFromRight:l(()=>wr,"MoveXInFromRight"),MoveYInFromBottom:l(()=>vr,"MoveYInFromBottom"),MoveYInFromTop:l(()=>ks,"MoveYInFromTop"),NotificationComponent:l(()=>ri,"NotificationComponent"),Radius:l(()=>Fs,"Radius"),Resize:l(()=>Or,"Resize"),Rotate:l(()=>qs,"Rotate"),RotateX:l(()=>Ds,"RotateX"),RotateY:l(()=>Ls,"RotateY"),RotateZ:l(()=>js,"RotateZ"),SessionData:l(()=>Oi,"SessionData"),SessionUserToken:l(()=>Po,"SessionUserToken"),ShadowedComponent:l(()=>Us,"ShadowedComponent"),SlideItemComponent:l(()=>ni,"SlideItemComponent"),SlideListComponent:l(()=>ti,"SlideListComponent"),SliderComponent:l(()=>oi,"SliderComponent"),SliderController:l(()=>pi,"SliderController"),SplashScreenComponent:l(()=>oo,"SplashScreenComponent"),SwaggerUIComponent:l(()=>Zs,"SwaggerUIComponent"),SwaggerUIController:l(()=>gi,"SwaggerUIController"),TextField:l(()=>zs,"TextField"),VideoSplashScreenComponent:l(()=>si,"VideoSplashScreenComponent"),WipeDown:l(()=>Bs,"WipeDown"),WipeLeft:l(()=>$s,"WipeLeft"),WipeRight:l(()=>Gs,"WipeRight"),WipeUp:l(()=>Hs,"WipeUp"),default:l(()=>Oa,"default"),i18n_messages:l(()=>yr,"i18n_messages")});Ei.exports=Ca(Ps);var To=T(),_e=T(),pt,yr=(pt=class extends _e.InheritClass{constructor({messages:s=[]}){super({messages:s}),_e.CONFIG.get("use_i18n",!1)&&(_e.CONFIG.set("lang","en"),_e.global.get("i18n")?_e.global.set("i18n",{messages:_e.global.get("i18n").messages.concat(s)}):_e.global.set("i18n",{messages:s}))}_load_i18n_packages_(){return _e.CONFIG.get("i18n_languages",[]).map(s=>{(0,_e.Import)(`org.quickcorp.i18n_messages.${s}`)})}},l(pt,"i18n_messages"),w(pt,"i18n_messages"),pt);(0,_e.Package)("org.qcobjects.i18n_messages",[yr]);new yr({})._load_i18n_packages_();var Ms=T(),ft,Rs=(ft=class extends Ms.VO{},l(ft,"Contact"),w(ft,"Contact"),ft);(0,Ms.Package)("org.qcobjects.models",[Rs]);var G=T(),Ne=T(),qe,xe=(qe=class extends Ne.Effect{constructor(t){super(t);r(this,"duration",1e3);this.duration=t?.duration}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Ne.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;Ne.logger.debug("alpha: "+c.toString()),t.style.opacity=c.toString()}})}static apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){Ne.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;Ne.logger.debug("alpha: "+c.toString()),t.style.opacity=c.toString()}})}},l(qe,"Fade"),w(qe,"Fade"),r(qe,"duration"),qe),Fe,se=(Fe=class extends Ne.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t,e,n,a,i){let c=a-e,d=i-n;t.style.transform="translate("+e+"px,"+n+"px)",super.animate({duration:this.duration,timing(g){return g},draw(g){Ne.logger.debug("animation progress: "+g.toString());let p=n+g*d/100,h=e+g*c/100;Ne.logger.debug("x: "+h.toString()+" y:"+p.toString()),t.style.transform="translate("+h+"px,"+p+"px)"}})}},l(Fe,"Move"),w(Fe,"Move"),r(Fe,"duration"),Fe);(0,Ne.Package)("org.qcobjects.effects.base",[xe,se]);var P=T(),ht,wr=(ht=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,t.width,0,0,0)}},l(ht,"MoveXInFromRight"),w(ht,"MoveXInFromRight"),ht),gt,Cr=(gt=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,-t.width,0,0,0)}},l(gt,"MoveXInFromLeft"),w(gt,"MoveXInFromLeft"),gt),mt,vr=(mt=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,0,t.height,0,0)}},l(mt,"MoveYInFromBottom"),w(mt,"MoveYInFromBottom"),mt),bt,ks=(bt=class extends se{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t){se.apply.call(this,t,0,-t.height,0,0)}},l(bt,"MoveYInFromTop"),w(bt,"MoveYInFromTop"),bt),$e,Ds=($e=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(1,0,0,"+c.toString()+"deg)"}})}},l($e,"RotateX"),w($e,"RotateX"),r($e,"duration"),$e),Ge,Ls=(Ge=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}static apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(0,1,0,"+c.toString()+"deg)"}})}},l(Ge,"RotateY"),w(Ge,"RotateY"),r(Ge,"duration"),Ge),_t,js=(_t=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(0,0,1,"+c.toString()+"deg)"}})}},l(_t,"RotateZ"),w(_t,"RotateZ"),_t),yt,qs=(yt=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=Math.round(e+i*a/100);P.logger.debug("angle: "+c.toString()),t.style.transform="rotate3d(1,1,1,"+c.toString()+"deg)"}})}},l(yt,"Rotate"),w(yt,"Rotate"),yt),wt,Fs=(wt=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("radius: "+c.toString()),t.style.borderRadius=c.toString()+"px"}})}},l(wt,"Radius"),w(wt,"Radius"),wt),Ct,Or=(Ct=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("resize: "+c.toString()),t.style.transformOrigin="center",t.style.transform="scale("+c+","+c+")"}})}},l(Ct,"Resize"),w(Ct,"Resize"),Ct),vt,$s=(vt=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="right",t.style.transform="scaleX("+c+")"}})}},l(vt,"WipeLeft"),w(vt,"WipeLeft"),vt),Ot,Gs=(Ot=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="left",t.style.transform="scaleX("+c+")"}})}},l(Ot,"WipeRight"),w(Ot,"WipeRight"),Ot),Et,Hs=(Et=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="bottom",t.style.transform="scaleY("+c+")"}})}},l(Et,"WipeUp"),w(Et,"WipeUp"),Et),St,Bs=(St=class extends P.Effect{constructor(){super(...arguments);r(this,"duration",1e3)}apply(t,e,n){let a=n-e;super.animate({duration:this.duration,timing(i){return i},draw(i){P.logger.debug("animation progress: "+i.toString());let c=e+i*a/100;P.logger.debug("wipe: "+c.toString()),t.style.transformOrigin="top",t.style.transform="scaleY("+c+")"}})}},l(St,"WipeDown"),w(St,"WipeDown"),St);(0,P.Package)("org.qcobjects.effects.extended",[wr,Cr,vr,ks,Ds,Ls,js,qs,Fs,Or,$s,Gs,Hs,Bs]);var va=T(),Nt,Ao=(Nt=class extends xe{constructor(){super(...arguments);r(this,"duration",500)}},l(Nt,"ModalFade"),w(Nt,"ModalFade"),Nt),xt,Er=(xt=class extends se{constructor(){super(...arguments);r(this,"duration",800)}},l(xt,"ModalMoveUp"),w(xt,"ModalMoveUp"),xt),It,Sr=(It=class extends se{constructor(){super(...arguments);r(this,"duration",300)}},l(It,"ModalMoveDown"),w(It,"ModalMoveDown"),It);(0,va.Package)("org.qcobjects.modal.effects",[Ao,Sr,Er]);var Se=T(),Tt,cn=(Tt=class extends Se.Component{constructor(t){t.name=typeof t.name<"u"?t.name:"form-field";super(t);r(this,"fieldType");r(this,"cached",!1);r(this,"reload",!0);r(this,"body");r(this,"name");r(this,"data")}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",()=>{Se.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("blur",()=>{Se.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("focus",()=>{Se.logger.debug("Executing change event binding"),this.executeBindings()}),n.addEventListener("keydown",()=>{Se.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(t){let e=t.getAttribute("data-field");Se.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],a=n.getAttribute("data-field");Se.logger.debug("Binding "+a+" for "+this.name),this.data[a]=n.value}}done(t){let e=super.done(t);return this.executeBindings(),this.createBindingEvents(),Se.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),e}},l(Tt,"FormField"),w(Tt,"FormField"),Tt);(0,Se.Package)("org.qcobjects.base.components",[cn]);var At,Us=(At=class extends G.Component{constructor(t){t.body=(0,G._DOMCreateElement)("div");super(t);r(this,"container",null);r(this,"shadowed",!0);r(this,"cached",!1);r(this,"controller",null);r(this,"view",null);r(this,"data",{})}},l(At,"ShadowedComponent"),w(At,"ShadowedComponent"),At),Pt,Ws=(Pt=class extends cn{constructor(s){s.fieldType="button",super(s)}},l(Pt,"ButtonField"),w(Pt,"ButtonField"),Pt),Mt,Vs=(Mt=class extends cn{constructor(s){s.fieldType="input",super(s)}},l(Mt,"InputField"),w(Mt,"InputField"),Mt),Rt,zs=(Rt=class extends cn{constructor(s){s.fieldType="textarea",super(s)}},l(Rt,"TextField"),w(Rt,"TextField"),Rt),kt,Js=(kt=class extends cn{constructor(s){s.fieldType="input",super(s)}},l(kt,"EmailField"),w(kt,"EmailField"),kt),Dt,Qs=(Dt=class extends G.Component{constructor(t){t.body=(0,G._DOMCreateElement)("div");super(t);r(this,"name","modalenclosure");r(this,"tplsource","inline");r(this,"cached",!1);r(this,"basePath",G.CONFIG.get("modalBasePath",G.CONFIG.get("remoteSDKPath","")));r(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
|
-
`);r(this,"data",{})}},l(Dt,"ModalEnclosureComponent"),w(Dt,"ModalEnclosureComponent"),Dt),Lt,Nr=(Lt=class extends G.Component{constructor(t){t.basePath=G.CONFIG.get("modalBasePath",G.CONFIG.get("remoteSDKPath",""));super(t);r(this,"name","modal");r(this,"cached",!1);r(this,"modalEnclosureComponentClass","ModalEnclosureComponent");r(this,"controller",null);r(this,"view",null);r(this,"tplsource","none");r(this,"closeOnClickOutside",!1);r(this,"data",{content:"",modalId:0});r(this,"submodal",null);r(this,"__instanceID");r(this,"basePath");r(this,"subcomponents");r(this,"body");r(this,"templateURI");this.data.modalId=this.__instanceID;let e=(0,G.New)((0,G.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,G.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new Ao().apply(e,0,1))),(0,G.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>Sr.apply(e,0,-document.body.clientHeight,0,0)),(0,G.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,G.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new Ao({duration:3e3}).apply(e,1,0))),(0,G.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return Er.apply(e,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,G.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="none",!0))},900)}rebuild(){let t=super.rebuild();return this.templateURI=(0,G.ComponentURI)({COMPONENTS_BASE_PATH:G.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:G.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),t}},l(Lt,"ModalComponent"),w(Lt,"ModalComponent"),Lt),jt,Zs=(jt=class extends G.Component{constructor(){super(...arguments);r(this,"cached",!1);r(this,"basePath",G.CONFIG.get("remoteSDKPath",""));r(this,"tplextension","tpl.html");r(this,"name","swagger-ui")}},l(jt,"SwaggerUIComponent"),w(jt,"SwaggerUIComponent"),jt);(0,G.Package)("org.qcobjects.form.components",[Us,Ws,Vs,zs,Js,Qs,Nr,Zs]);var xr=
|
|
35
|
+
`);r(this,"data",{})}},l(Dt,"ModalEnclosureComponent"),w(Dt,"ModalEnclosureComponent"),Dt),Lt,Nr=(Lt=class extends G.Component{constructor(t){t.basePath=G.CONFIG.get("modalBasePath",G.CONFIG.get("remoteSDKPath",""));super(t);r(this,"name","modal");r(this,"cached",!1);r(this,"modalEnclosureComponentClass","ModalEnclosureComponent");r(this,"controller",null);r(this,"view",null);r(this,"tplsource","none");r(this,"closeOnClickOutside",!1);r(this,"data",{content:"",modalId:0});r(this,"submodal",null);r(this,"__instanceID");r(this,"basePath");r(this,"subcomponents");r(this,"body");r(this,"templateURI");this.data.modalId=this.__instanceID;let e=(0,G.New)((0,G.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,G.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new Ao().apply(e,0,1))),(0,G.Tag)("#modalInstance_"+t+".modal .modal-content").map(e=>Sr.apply(e,0,-document.body.clientHeight,0,0)),(0,G.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,G.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="block",new Ao({duration:3e3}).apply(e,1,0))),(0,G.Tag)("#modalInstance_"+t+".modal .modal-content").map(function(e){return Er.apply(e,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,G.Tag)("#modalInstance_"+t+".modal").map(e=>(e.style.display="none",!0))},900)}rebuild(){let t=super.rebuild();return this.templateURI=(0,G.ComponentURI)({COMPONENTS_BASE_PATH:G.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:G.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),t}},l(Lt,"ModalComponent"),w(Lt,"ModalComponent"),Lt),jt,Zs=(jt=class extends G.Component{constructor(){super(...arguments);r(this,"cached",!1);r(this,"basePath",G.CONFIG.get("remoteSDKPath",""));r(this,"tplextension","tpl.html");r(this,"name","swagger-ui")}},l(jt,"SwaggerUIComponent"),w(jt,"SwaggerUIComponent"),jt);(0,G.Package)("org.qcobjects.form.components",[Us,Ws,Vs,zs,Js,Qs,Nr,Zs]);var xr=T(),qt,Ks=(qt=class extends xr.Component{constructor(){super(...arguments);r(this,"name","grid-item");r(this,"shadowed",!0);r(this,"tplsource","inline");r(this,"template",`
|
|
36
36
|
<img src="{{image}}" />
|
|
37
37
|
<p>{{description}}</p>
|
|
38
|
-
`);r(this,"cached",!1)}},l(qt,"GridItemComponent"),w(qt,"GridItemComponent"),qt),Ft,Xs=(Ft=class extends xr.Component{constructor(t){super(t);r(this,"name","grid");r(this,"cached",!1);r(this,"view",null);r(this,"shadowed",!0);r(this,"rows",3);r(this,"cols",3);r(this,"templateURI","");r(this,"data",{});r(this,"tplsource","inline");r(this,"template","<p>Loading...</p>");r(this,"body");this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},l(Ft,"GridComponent"),w(Ft,"GridComponent"),Ft);(0,xr.Package)("org.qcobjects.components.grid",[Xs,Ks]);var Ir=
|
|
38
|
+
`);r(this,"cached",!1)}},l(qt,"GridItemComponent"),w(qt,"GridItemComponent"),qt),Ft,Xs=(Ft=class extends xr.Component{constructor(t){super(t);r(this,"name","grid");r(this,"cached",!1);r(this,"view",null);r(this,"shadowed",!0);r(this,"rows",3);r(this,"cols",3);r(this,"templateURI","");r(this,"data",{});r(this,"tplsource","inline");r(this,"template","<p>Loading...</p>");r(this,"body");this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},l(Ft,"GridComponent"),w(Ft,"GridComponent"),Ft);(0,xr.Package)("org.qcobjects.components.grid",[Xs,Ks]);var Ir=T(),$t,Ys=($t=class extends Ir.Component{constructor(t){t.name="list-item";super(t);r(this,"shadowed",!1);r(this,"tplsource","inline");r(this,"template",'<a href="{{value}}">{{label}}</a>');r(this,"cached",!1)}},l($t,"ListItemComponent"),w($t,"ListItemComponent"),$t),Gt,ei=(Gt=class extends Ir.Component{constructor(t){t.name="list";super(t);r(this,"data");r(this,"shadowed",!0);r(this,"tplsource","inline");r(this,"template","<p>Loading...</p>");r(this,"body");r(this,"shadowRoot");r(this,"rows");r(this,"subcomponents");r(this,"done");r(this,"serviceData");this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}},l(Gt,"ListComponent"),w(Gt,"ListComponent"),Gt);(0,Ir.Package)("org.qcobjects.components.list",[Ys,ei]);var Ro=T(),Ht,ti=(Ht=class extends Ro.Component{constructor(t){super(t);r(this,"tplsource","inline");r(this,"template","<p>Loading...</p>");r(this,"name","slidelist");r(this,"body");this.body.setAttribute("controllerClass","DataGridController");let e=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",e)}},l(Ht,"SlideListComponent"),w(Ht,"SlideListComponent"),Ht),Bt,ni=(Bt=class extends Ro.Component{constructor(t){super(t);r(this,"effectClass","Fade");r(this,"name","slider_item");r(this,"data");r(this,"template");r(this,"tplsource");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}}"/>
|
|
@@ -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.data.sliderHandler="slider_"+this.__instanceID.toString(),this.body.setAttribute("controllerClass","SliderController")}},l(Ut,"SliderComponent"),w(Ut,"SliderComponent"),Ut);(0,Ro.Package)("org.qcobjects.components.slider",[ti,ni,oi]);var z=
|
|
166
|
+
`,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.data.sliderHandler="slider_"+this.__instanceID.toString(),this.body.setAttribute("controllerClass","SliderController")}},l(Ut,"SliderComponent"),w(Ut,"SliderComponent"),Ut);(0,Ro.Package)("org.qcobjects.components.slider",[ti,ni,oi]);var z=T(),ue,ri=(ue=class extends z.Component{constructor(t){t.name="notification",t.body=(0,z._DOMCreateElement)("div");super(t);r(this,"cached",!1);r(this,"tplsource","inline");r(this,"shadowed",!1);r(this,"kinds");r(this,"template");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=w(function(n){n.style.display="block";let a=(0,z.New)(se,{duration:900,apply(c){(0,z._super_)("Fade","apply").call(this,c,0,1),(0,z._super_)("Move","apply").call(this,c,0,-document.body.clientHeight,0,0)}}),i=(0,z.New)(se,{duration:650,apply(c){(0,z._super_)("Fade","apply").call(this,c,1,0),(0,z._super_)("Move","apply").call(this,c,0,0,0,-document.body.clientHeight)}});a.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new xe({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)(ue,{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)(ue,{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)(ue,{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)(ue,{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)}},l(ue,"_NotificationComponent"),w(ue,"NotificationComponent"),ue);(0,z.Package)("org.quickcorp.components.notifications",[ri]);var re=
|
|
211
|
+
`,this.kinds=["danger","success","info","warning"]}display(t){let e=w(function(n){n.style.display="block";let a=(0,z.New)(se,{duration:900,apply(c){(0,z._super_)("Fade","apply").call(this,c,0,1),(0,z._super_)("Move","apply").call(this,c,0,-document.body.clientHeight,0,0)}}),i=(0,z.New)(se,{duration:650,apply(c){(0,z._super_)("Fade","apply").call(this,c,1,0),(0,z._super_)("Move","apply").call(this,c,0,0,0,-document.body.clientHeight)}});a.apply(n),setTimeout(function(){i.apply(n)},2e3)},"_display_");t.subelements("div.notification_background").map(n=>new xe({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)(ue,{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)(ue,{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)(ue,{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)(ue,{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)}},l(ue,"_NotificationComponent"),w(ue,"NotificationComponent"),ue);(0,z.Package)("org.quickcorp.components.notifications",[ri]);var re=T(),Wt,oo=(Wt=class extends re.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===""||re.CONFIG.get("routingWay","pathname")==="hash"&&re.CONFIG.get("start_url","/")===location.hash||re.CONFIG.get("routingWay","pathname")==="pathname"&&re.CONFIG.get("start_url","/")===location.pathname||re.CONFIG.get("routingWay","pathname")==="search"&&re.CONFIG.get("start_url","/")===location.search,a=e&&n;a?(t.basePath=re.CONFIG.get("splashscreenBasePath",re.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);r(this,"_enabled_");r(this,"_bgcolor");r(this,"cached",!1);r(this,"shadowed",!0);r(this,"body");r(this,"shadowRoot");if(this._bgcolor="",this._enabled_=a,this._enabled_){let c=this.body.getAttribute("duration");c===null?c=1e3:c=parseInt(c.toString()),this._bgcolor=this.body.style.backgroundColor;let d=w(()=>{setTimeout(()=>{if(!d.executed){let g=this.shadowed?this.shadowRoot?.host:this.body;typeof re.global.componentsStack<"u"&&re.global.componentsStack.filter(p=>p.body.hasAttribute("splashscreen")).map(p=>{re.logger.debug(`Splash Screen of Main Component: ${p.name}`),p.splashScreenComponent=this;let h=w(()=>{if(!h.executed){let m=p.splashScreenComponent,b=p.shadowed?p.shadowRoot?.host:p.body;p._mainPosition=b.style.position,typeof b<"u"&&(b.style.position="fixed"),p._mainOpacity=b.style.opacity,g.style.width="100%",g.style.height="100%",document.body.style.backgroundColor="#111111",b.style.opacity="0",setTimeout(function(){typeof g<"u"&&(document.body.style.backgroundColor=m?._bgcolor,g.subelements("#slot-logo").map(C=>(C.style.display="block",C.style.transformOrigin="center",new Or().apply(C,1,0))),new xe().apply(g,1,0))},c-1e3),setTimeout(function(){new xe().apply(b,0,1),b.style.position=p._mainPosition,document.body.style.backgroundColor=m._bgcolor,g.parentElement!==null&&g.parentElement.remove()},c)}h.executed=!0},"SplashScreenHandler");return p.addComponentHelper(h.bind(p))}),d.executed=!0}})},"_helper_");d.executed=!1,this.addComponentHelper(d.bind(t))}}addComponentHelper(t){throw new Error("Method not implemented.")}},l(Wt,"SplashScreenComponent"),w(Wt,"SplashScreenComponent"),Wt);(0,re.Package)("org.qcobjects.components.base",[oo]);var Vt,si=(Vt=class extends oo{constructor(t){t.name="videosplashscreen";super(t);r(this,"cached",!1);r(this,"shadowed",!0);r(this,"tplsource","inline");r(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
|
-
`)}},l(Vt,"VideoSplashScreenComponent"),w(Vt,"VideoSplashScreenComponent"),Vt),zt,ii=(zt=class extends
|
|
374
|
+
`)}},l(Vt,"VideoSplashScreenComponent"),w(Vt,"VideoSplashScreenComponent"),Vt),zt,ii=(zt=class extends oo{constructor(t){t.name="cubesplashscreen";super(t);r(this,"cached",!1);r(this,"shadowed",!0);r(this,"tplsource","inline");r(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
|
-
`)}},l(zt,"CubeSplashScreenComponent"),w(zt,"CubeSplashScreenComponent"),zt);(0,re.Package)("org.qcobjects.components.splashscreen",[
|
|
687
|
-
display: grid; grid-template-rows: ${a}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(c)}}done(){this.cssGrid();let t=this.component;A.logger.debug("ListController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,a,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let c=t.body.getAttribute("page-number");c=isNaN(c)||c===null?-1:c;let d;if(c!==-1){let g=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;d=this.component.body.getAttribute("total-pages"),d=isNaN(d)?1:d,n=this.getPageIndex(c,d,g)[0],a=this.getPageIndex(c,d,g)[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=a}}(0,A.serviceLoader)((0,A.New)((0,A.ClassFactory)(e),{data:t.serviceData}),!1).then(c=>{A.logger.debug("DONE SERVICE COMPONENT"),c.service.JSONresponse=JSON.parse(c.service.template),typeof c.service.JSONresponse.result<"u"?(A.logger.debug((0,A._DataStringify)(c.service.JSONresponse.result)),t.data=c.service.JSONresponse.result):t.data=c.service.JSONresponse,this.addSubcomponents()},c=>{A.logger.debug(c)}).catch(c=>{A.logger.debug("Something went wrong when calling the service from: "+e),A.logger.debug(c.message)})}}},l(Qt,"ListController"),w(Qt,"ListController"),Qt);(0,A.Package)("org.qcobjects.controllers.list",[li]);var N=
|
|
686
|
+
`)}},l(zt,"CubeSplashScreenComponent"),w(zt,"CubeSplashScreenComponent"),zt);(0,re.Package)("org.qcobjects.components.splashscreen",[oo,si,ii]);var ai=T(),Jt,ci=(Jt=class extends ai.Controller{},l(Jt,"GenericController"),w(Jt,"GenericController"),Jt);(0,ai.Package)("org.qcobjects.controllers",[ci]);var A=T(),Qt,li=(Qt=class extends A.Controller{constructor({component:t,dependencies:e=[],valueField:n=void 0,labelField:a=void 0}){super({component:t,dependencies:e,valueField:n,labelField:a});r(this,"__instanceID");r(this,"component");r(this,"valueField");r(this,"labelField");r(this,"rows");r(this,"cols");r(this,"_componentRoot");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,A.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=A.CONFIG.get("listBasePath",A.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>`),A.logger.debug((0,A._DataStringify)(this.component.data));try{let a=this.component.body.getAttribute("subcomponentClass");if(a!=null){let i,c,d,g=[...this.component.data],p=this.component.body.getAttribute("paginate-in");p=p!==null?p:"client";let h;p==="client"?(h=this.component.body.getAttribute("page-number"),h=isNaN(h)||h===null?-1:h,h!==-1?(d=this.component.body.getAttribute("total-pages"),d=isNaN(d)?1:d,i=this.getPageIndex(h,d,g.length)[0],c=this.getPageIndex(h,d,g.length)[1]):(i=0,c=g.length,d=1),g=g.slice(i,c)):(i=0,c=g.length,d=1),g.map((m,b)=>{try{let _=(0,A._DOMCreateElement)("li");m.label=m[this.labelField],m.value=m[this.valueField];let E=(0,A.New)((0,A.ClassFactory)(a),{name:"list-item",data:{label:m[this.labelField],value:m[this.valueField],__dataIndex:b,__page:h,__totalPages:d,__limit:c,__offset:i},templateURI:(0,A.ComponentURI)({COMPONENTS_BASE_PATH:A.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,A.ClassFactory)(a).name,TPLEXTENSION:A.CONFIG.get("tplextension",""),TPL_SOURCE:(0,A.ClassFactory)(a).tplsource}),body:_,template:(0,A.ClassFactory)(a).template});E.done=this.component.done.bind(E);try{if(E){E.data.__dataIndex=b,Object.hasOwnProperty.call(this.component.data,"length")&&(E.data.__dataLength=this.component.data.length),A.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(x=>x.append(E));try{this.component.subcomponents.push(E)}catch(x){A.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${x}`)}}else A.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(x){A.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${x}`)}}catch(_){A.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${_}`)}})}else A.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(a){A.logger.debug(`No data for component: ${a}`)}}cssGrid(){let t=this.component,e=t.shadowed?t.shadowRoot:t.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let n=(0,A._DOMCreateElement)("style"),a="auto ".repeat(this.rows),i="auto ".repeat(this.cols),c="grid"+this.__instanceID.toString();n.innerHTML=`.${c}{
|
|
687
|
+
display: grid; grid-template-rows: ${a}; grid-template-columns: ${i}; margin:0 auto; }`,e.append(n),e.classList.add(c)}}done(){this.cssGrid();let t=this.component;A.logger.debug("ListController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,a,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let c=t.body.getAttribute("page-number");c=isNaN(c)||c===null?-1:c;let d;if(c!==-1){let g=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;d=this.component.body.getAttribute("total-pages"),d=isNaN(d)?1:d,n=this.getPageIndex(c,d,g)[0],a=this.getPageIndex(c,d,g)[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=a}}(0,A.serviceLoader)((0,A.New)((0,A.ClassFactory)(e),{data:t.serviceData}),!1).then(c=>{A.logger.debug("DONE SERVICE COMPONENT"),c.service.JSONresponse=JSON.parse(c.service.template),typeof c.service.JSONresponse.result<"u"?(A.logger.debug((0,A._DataStringify)(c.service.JSONresponse.result)),t.data=c.service.JSONresponse.result):t.data=c.service.JSONresponse,this.addSubcomponents()},c=>{A.logger.debug(c)}).catch(c=>{A.logger.debug("Something went wrong when calling the service from: "+e),A.logger.debug(c.message)})}}},l(Qt,"ListController"),w(Qt,"ListController"),Qt);(0,A.Package)("org.qcobjects.controllers.list",[li]);var N=T(),Zt,di=(Zt=class extends N.Controller{constructor(t){super(t);r(this,"__instanceID");r(this,"rows");r(this,"cols");r(this,"component");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,N._DOMCreateElement)("style"),a="auto ".repeat(this.rows),i="auto ".repeat(this.cols),c="grid"+this.__instanceID.toString();n.innerHTML=`.${c}{
|
|
688
688
|
display: grid; grid-template-rows: ${a}; grid-template-columns: ${i}; margin:0 auto; }`,e?.append(n),t.shadowed?e?.host.classList.add(c):e.classList.add(c)}}done(){this.cssGrid(),N.logger.debug("GridComponent built")}},l(Zt,"GridController"),w(Zt,"GridController"),Zt),Kt,ui=(Kt=class extends N.Controller{constructor(t){super(t);r(this,"__instanceID");r(this,"rows");r(this,"cols");r(this,"_componentRoot");r(this,"component");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,N.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(),N.logger.debug((0,N._DataStringify)(this.component.data));try{let t=this.component.body.getAttribute("subcomponentClass");if(t!=null){let e,n,a,i=[...this.component.data],c=this.component.body.getAttribute("paginate-in"),d;c=c!==null?c:"client",c==="client"?(d=this.component.body.getAttribute("page-number"),d=isNaN(d)||d===null?-1:d,d!==-1?(a=this.component.body.getAttribute("total-pages"),a=isNaN(a)?1:a,e=this.getPageIndex(d,a,i.length)[0],n=this.getPageIndex(d,a,i.length)[1]):(e=0,n=i.length,a=1),i=i.slice(e,n)):(e=0,n=i.length,a=1),i.map((g,p,h)=>{try{let b=(0,N._DOMCreateElement)("component");b.setAttribute("name",(0,N.ClassFactory)(t).name),b.setAttribute("shadowed",(0,N.ClassFactory)(t).shadowed),b.setAttribute("cached",(0,N.ClassFactory)(t).cached),g=Object.assign(g,{__dataIndex:p,__dataLength:h.length,__page:d,__totalPages:a,__limit:n,__offset:e});let C=(0,N.New)((0,N.ClassFactory)(t),{name:"item",data:g,templateURI:(0,N.ComponentURI)({COMPONENTS_BASE_PATH:N.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,N.ClassFactory)(t).name,TPLEXTENSION:N.CONFIG.get("tplextension",""),TPL_SOURCE:(0,N.ClassFactory)(t).tplsource}),body:b,template:(0,N.ClassFactory)(t).template});C.done=this.component.done.bind(C);try{if(C){C.data.__dataIndex=p,Object.hasOwnProperty.call(this.component.data,"length")&&(C.data.__dataLength=this.component.data.length),N.logger.debug("adding subcomponent to body"),this._componentRoot?.append(C.body);try{this.component.subcomponents.push(C)}catch(_){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${_}`)}}else N.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch(_){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${_}`)}}catch(b){N.logger.debug(`ERROR LOADING SUBCOMPONENT IN DATAGRID: ${b}`)}})}else N.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch(t){N.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,N._DOMCreateElement)("style"),a="auto ".repeat(this.rows),i="auto ".repeat(this.cols),c="grid"+this.__instanceID.toString();n.innerHTML=`.${c}{
|
|
689
|
-
display: grid; grid-template-rows: ${a}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(c)):(e?.append(n),e.classList.add(c))}}done(){let t=this.component;N.logger.debug("DataGridController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,a,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let c=t.body.getAttribute("page-number");c=isNaN(c)||c===null?-1:c;let d;if(c!==-1){let g=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;d=this.component.body.getAttribute("total-pages"),d=isNaN(d)?1:d,n=this.getPageIndex(c,d,g)[0],a=this.getPageIndex(c,d,g)[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=a}}(0,N.serviceLoader)((0,N.New)((0,N.ClassFactory)(e),{data:t.serviceData}),!1).then(c=>{N.logger.debug("DONE SERVICE COMPONENT"),c.service.JSONresponse=JSON.parse(c.service.template),typeof c.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(c.service.JSONresponse.result)),t.data=c.service.JSONresponse.result):t.data=c.service.JSONresponse,this.addSubcomponents()},c=>{N.logger.debug(c)}).catch(c=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(c.message)})}}},l(Kt,"DataGridController"),w(Kt,"DataGridController"),Kt);(0,N.Package)("org.qcobjects.controllers.grid",[di,ui]);var je=
|
|
689
|
+
display: grid; grid-template-rows: ${a}; grid-template-columns: ${i}; margin:0 auto; }`,t.shadowed?(t.body.append(n),e.host.classList.add(c)):(e?.append(n),e.classList.add(c))}}done(){let t=this.component;N.logger.debug("DataGridController DONE");let e=this.component.body.getAttribute("serviceClass");if(e!=null){let n,a,i=t.body.getAttribute("paginate-in");if(i=i!==null?i:"client",i==="server"){let c=t.body.getAttribute("page-number");c=isNaN(c)||c===null?-1:c;let d;if(c!==-1){let g=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;d=this.component.body.getAttribute("total-pages"),d=isNaN(d)?1:d,n=this.getPageIndex(c,d,g)[0],a=this.getPageIndex(c,d,g)[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=a}}(0,N.serviceLoader)((0,N.New)((0,N.ClassFactory)(e),{data:t.serviceData}),!1).then(c=>{N.logger.debug("DONE SERVICE COMPONENT"),c.service.JSONresponse=JSON.parse(c.service.template),typeof c.service.JSONresponse.result<"u"?(N.logger.debug((0,N._DataStringify)(c.service.JSONresponse.result)),t.data=c.service.JSONresponse.result):t.data=c.service.JSONresponse,this.addSubcomponents()},c=>{N.logger.debug(c)}).catch(c=>{N.logger.debug("Something went wrong when calling the service from: "+e),N.logger.debug(c.message)})}}},l(Kt,"DataGridController"),w(Kt,"DataGridController"),Kt);(0,N.Package)("org.qcobjects.controllers.grid",[di,ui]);var je=T(),Xt,pi=(Xt=class extends je.Controller{constructor({component:t,dependencies:e=[],duration:n=7100,slideIndex:a=0,interval:i=null,sliderHandlerName:c=null}){super({component:t,dependencies:e,duration:n,slideIndex:a,interval:i,sliderHandlerName:c});r(this,"slideIndex",0);r(this,"duration",7100);r(this,"interval",null);r(this,"sliderHandlerName","");r(this,"_componentRoot");r(this,"component");this.component=t,this._componentRoot=t.shadowed?t.shadowRoot:t.body,this.sliderHandlerName="slider_"+this.component.__instanceID.toString(),global.set(this.sliderHandlerName,this)}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((a,i)=>i!==this.slideIndex).map(a=>(0,je.New)((0,je.ClassFactory)("Fade"),{}).apply(a,1,0)),n.filter((a,i)=>i!==this.slideIndex).map(a=>a.classList.remove("active"));try{n[this.slideIndex].classList.add("active")}catch(a){je.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${a.message}`)}setTimeout(()=>{e.filter((a,i)=>i!==this.slideIndex).map(a=>(a.style.display="none",a.style.display));try{e[this.slideIndex].style.display="block",(0,je.New)((0,je.ClassFactory)("Fade"),{}).apply(e[this.slideIndex],0,1)}catch(a){je.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${a.message}`)}},700)}fillDots(){(this._componentRoot?.subelements(".qcoSlides")).map((e,n)=>{let a=document.createElement("span"),i=`<span class="qcoSlider__dots--dot" onclick="global.get('${this.sliderHandlerName}').currentSlide(${n})"></span>`;return a.innerHTML=i,this._componentRoot?.subelements(".qcoSlider__dots")[0].append(a)})}done(){(this._componentRoot?.subelements(".qcoSlides")).filter((e,n)=>n!==this.slideIndex).map(e=>(e.style.display="none",e.style.display)),setTimeout(()=>{this.fillDots(),this.slideIndex=0,this.showSlides(this.slideIndex),this.automate()},3e3)}},l(Xt,"SliderController"),w(Xt,"SliderController"),Xt);(0,je.Package)("org.qcobjects.controllers.slider",[pi]);var J=T(),Yt,fi=(Yt=class extends J.Controller{getDefault(){return function(s,t,e){let n={name:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$",email:"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$"},a=e.getAttribute("pattern")||n[s];return new RegExp(a).test(t)}}},l(Yt,"FormValidations"),w(Yt,"FormValidations"),Yt),en,hi=(en=class extends J.Controller{constructor(t){super(t);r(this,"validations",[]);r(this,"formValidatorModal");r(this,"serviceClass","");r(this,"formSettings",{backRouting:"#",loadingRouting:"#loading",nextRouting:"#signupsuccessful"});r(this,"component");this.component=t.component,this.component=this.component.Cast(cn)}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"),a=this.component.data[n],i=w((c,d,g)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,c)&&this.validations[c].call(null,c,d,g),"_execValidation");return typeof this.validations<"u"&&!i(n,a,t)&&(e=!0),e}isValid(t){return!this.isInvalid(t)}save(){this.serviceClass!==""?(location.href=this.formSettings.loadingRouting,(0,J.serviceLoader)((0,J.New)((0,J.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(()=>{J.logger.info("DONE SERVICE COMPONENT"),location.href=this.formSettings.nextRouting},t=>{J.logger.debug(t),location.href=this.formSettings.backRouting})):J.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){J.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(d=>this.hasValidation(d)),a=w(function(d,g){return w((h,m)=>m.getAttribute("aria-labelledby")!==null?(m.getAttribute("aria-labelledby")||"").split(" ").map(b=>h.subelements(`#${b}`).map(C=>C.innerHTML)).join(" "):null,"_arialabelledby")(d,g)||g.getAttribute("aria-label")||g.getAttribute("placeholder")||g.getAttribute("name")||g.getAttribute("data-field")},"_labelledby"),i=w(function(d){return d.getAttribute("title")||d.getAttribute("aria-title")||""},"_ariatitle"),c=n.filter(d=>this.isInvalid(d));if(c.length>0){let d=`
|
|
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=d,this.formValidatorModal.modal()}else this.save()}else J.logger.debug("Unable to find the modal validator..."),J.logger.debug("Saving data..."),this.save()}done(){J.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,J._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,J.New)(Nr,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,J.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){J.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}onpress(t,e){throw new Error("Method not implemented.")}},l(en,"FormController"),w(en,"FormController"),en);(0,J.Package)("org.qcobjects.controllers.form",[hi,fi]);var te=I(),tn,gi=(tn=class extends te.Controller{constructor(){super(...arguments);r(this,"component");r(this,"dependencies")}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:w(()=>{this.startSwaggerUI()},"done")}))}},l(tn,"SwaggerUIController"),w(tn,"SwaggerUIController"),tn);(0,te.Package)("org.qcobjects.controllers.swagger",[gi]);var mi=I(),nn,bi=(nn=class extends mi.Controller{constructor(){super(...arguments);r(this,"component")}done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},l(nn,"ModalController"),w(nn,"ModalController"),nn);(0,mi.Package)("org.qcobjects.modal.controllers",[bi]);var _i=I(),on,yi=(on=class extends _i.View{},l(on,"GridView"),w(on,"GridView"),on);(0,_i.Package)("org.qcobjects.views",[yi]);var wi=I(),rn,Ci=(rn=class extends wi.InheritClass{drawImageFilled(s,t,e=1,n=0,a=0){let i=Math.max(t.width/s.width,t.height/s.height);i=i*e;let c=t.width/2-s.width/2*i,d=t.height/2-s.height/2*i;t.getContext("2d")?.drawImage(s,n+c,a+d,s.width*i,s.height*i)}getImageResized(s,t,e,n,a=1,i=0,c=0){let d=document.createElement("canvas");return d.width=t,d.height=e,d.style.width=t.toString(),d.style.height=e.toString(),this.drawImageFilled(s,d,a,i,c),n.src=d.toDataURL("image/png"),d}},l(rn,"CanvasTool"),w(rn,"CanvasTool"),rn);(0,wi.Package)("org.qcobjects.tools.canvas",[Ci]);var L=I(),sn,vi=(sn=class extends L.InheritClass{constructor({component:t=null,dependencies:e=[]}){super({component:t,dependencies:e});r(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=>xe.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>xe.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>xe.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),Cr.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),vr.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(),wr.apply(t)})},300)}},l(sn,"BasicLayout"),w(sn,"BasicLayout"),sn);(0,L.Package)("org.qcobjects.tools.layouts",[vi]);var X=I(),B,Po=(B=class extends X.InheritClass{constructor(t){super(t);r(this,"__cache__");r(this,"__instanceID");let e=this;this.__cache__=new X.ComplexStorageCache({index:e.__instanceID.toString(),load(){let n;return typeof navigator<"u"&&typeof origin<"u"?n=X._Crypt.encrypt(`${navigator.userAgent}|${t.username}|${(+new Date).toString()}`,origin):n=X._Crypt.encrypt(`${t.username}|${(+new Date).toString()}`,X.CONFIG.get("domain","localhost")),B.user={priority:e.__instanceID.toString(),token:n},B.user},alternate(n){B.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_"+B.generateIndex(e);return(typeof X.global.get(n)>"u"||X.global.get(n)===null)&&X.global.set(n,(0,X.New)(B,{username:e})),B.user=X.global.get(n).user,X.global.get(n).user}static getGlobalUserToken(...t){return B.getGlobalUser(t).token}static getGlobalUserId(...t){return B.getGlobalUser(t).id}static getGlobalUserPriority(...t){return B.getGlobalUser(t).priority}static getLoginCredentialsToken(t,e){return X._Crypt.encrypt(`${t}${e}`,B.getGlobalUserToken(t))}static closeGlobalSession(...t){B.getGlobalUser(t);let e=[t].join("|"),n="userToken_"+B.generateIndex(e);typeof X.global.get(n)<"u"&&(X.global.get(n).__cache__.clear(),X.global.set(n,null),B.user={})}},l(B,"_SessionUserToken"),w(B,"SessionUserToken"),r(B,"user",{}),B);(0,X.Package)("org.qcobjects.cloud.auth.session.usertoken",[Po]);var _r=I(),an,Oi=(an=class extends _r.InheritClass{constructor(){super(...arguments);r(this,"__session_container__",null);r(this,"sessionData")}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 Po>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(Po.getGlobalUserToken(t))}`}save(...t){let e=(0,_r._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(),a=this.getSessionData(n);this.sessionData=a,this.sessionData[t]=e,this.save(n)}},l(an,"SessionData"),w(an,"SessionData"),an);(0,_r.Package)("org.qcobjects.cloud.auth.session.data",[Oi]);w(l((function o(s){"use strict";if(typeof Object.defineProperty<"u"&&typeof s<"u")try{Object.defineProperty(s,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:o})}catch{typeof s.__qcobjects_sdk__<"u"&&(s.__qcobjects_sdk__.__loaded__=!0)}if(typeof s.__qcobjects_sdk__.__loaded__>"u"){if(s.__qcobjects_sdk__.__loaded__=!0,typeof s>"u")throw Error("Top context empty: It should either global, module or window");let t=To.GlobalSettings.__start__.bind(s);s._sdk_=Promise.resolve().then(()=>{To.CONFIG.set("useSDK",!0),t()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(To._top);var Oa=To._top});var Si=ne(He=>{"use strict";var Ea=He&&He.__createBinding||(Object.create?(function(o,s,t,e){e===void 0&&(e=t);var n=Object.getOwnPropertyDescriptor(s,t);(!n||("get"in n?!s.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:l(function(){return s[t]},"get")}),Object.defineProperty(o,e,n)}):(function(o,s,t,e){e===void 0&&(e=t),o[e]=s[t]})),Sa=He&&He.__setModuleDefault||(Object.create?(function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}):function(o,s){o.default=s}),Na=He&&He.__importStar||(function(){var o=l(function(s){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},o(s)},"ownKeys");return function(s){if(s&&s.__esModule)return s;var t={};if(s!=null)for(var e=o(s),n=0;n<e.length;n++)e[n]!=="default"&&Ea(t,s,e[n]);return Sa(t,s),t}})();Object.defineProperty(He,"__esModule",{value:!0});var ae=Na(I()),xa=Tr(),vn;(0,ae.Package)("com.qcobjects.installer",[(vn=class extends ae.InheritClass{constructor(s){super(),this.root=s,window.addEventListener("beforeinstallprompt",()=>this.beforeinstallprompt.bind(this),!1),window.addEventListener("appinstalled",()=>this.installed.bind(this),!1),s.addEventListener("click",()=>this.install.bind(this)),s.addEventListener("touchend",()=>this.install.bind(this)),window.matchMedia("(display-mode: standalone)").addEventListener("change",t=>{let e="browser";t.matches&&(e="standalone"),xa.NotificationComponent.success(`TWA in ${e} Mode`)}),ae.default.set("installer",this)}beforeinstallprompt(s){return ae.logger.debug("registering installer event"),s.preventDefault(),ae.default.set("promptEvent",s),this.root.classList.add("available"),!1}installed(){ae.logger.debug("app is already installed"),ae.default.set("promptEvent",null),this.root.classList.remove("available")}install(){let s=this.root;ae.logger.debug("installer actioned");let t=ae.default.get("promptEvent",null);t?(ae.logger.debug("prompt event"),t.prompt(),t.userChoice.then(function(e){e.outcome==="accepted"?s.classList.remove("available"):ae.logger.debug("User has chosen not to install the PWA"),t=null}).catch(function(e){t=null,s.classList.remove("available"),ae.logger.warn(`Error during install: ${e.toString()}`)})):ae.logger.debug("It is not possible to get the prompt event for install ")}},l(vn,"Installer"),vn)])});var xi=ne(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});var ko=I(),On,En,Sn;(0,ko.Package)("org.quickcorp.custom.effects",[(On=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}},l(On,"MainTransitionEffect"),On),(En=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}},l(En,"SlideLeftTransitionEffect"),En),(Sn=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}},l(Sn,"SlideRightTransitionEffect"),Sn)])});var Ai=ne(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});var Ii=I(),Nn;(0,Ii.Package)("org.quickcorp.custom.models",[(Nn=class extends Ii.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}},l(Nn,"ContactVO"),Nn)])});var Mi=ne(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var ye=I(),kr=class kr extends ye.Component{constructor(){super(...arguments),this.name="github-grid",this.tplsource="inline",this.template=`
|
|
698
|
+
`;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=d,this.formValidatorModal.modal()}else this.save()}else J.logger.debug("Unable to find the modal validator..."),J.logger.debug("Saving data..."),this.save()}done(){J.logger.debugEnabled=!0;try{this.component.createBindingEvents();let t=(0,J._DOMCreateElement)("div");t.className="modal_body",this.formValidatorModal=(0,J.New)(Nr,{body:t,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,J.Tag)(".modal_body").map(e=>document.body.removeChild(e)),document.body.append(this.formValidatorModal.body)}catch(t){J.logger.debug(`Unable to create the modal: ${t}`)}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}onpress(t,e){throw new Error("Method not implemented.")}},l(en,"FormController"),w(en,"FormController"),en);(0,J.Package)("org.qcobjects.controllers.form",[hi,fi]);var te=T(),tn,gi=(tn=class extends te.Controller{constructor(){super(...arguments);r(this,"component");r(this,"dependencies")}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:w(()=>{this.startSwaggerUI()},"done")}))}},l(tn,"SwaggerUIController"),w(tn,"SwaggerUIController"),tn);(0,te.Package)("org.qcobjects.controllers.swagger",[gi]);var mi=T(),nn,bi=(nn=class extends mi.Controller{constructor(){super(...arguments);r(this,"component")}done(){let t=this.component;t.body.innerHTML=t.body.innerHTML.replace("/{{content}}/g",t.submodal.template)}},l(nn,"ModalController"),w(nn,"ModalController"),nn);(0,mi.Package)("org.qcobjects.modal.controllers",[bi]);var _i=T(),on,yi=(on=class extends _i.View{},l(on,"GridView"),w(on,"GridView"),on);(0,_i.Package)("org.qcobjects.views",[yi]);var wi=T(),rn,Ci=(rn=class extends wi.InheritClass{drawImageFilled(s,t,e=1,n=0,a=0){let i=Math.max(t.width/s.width,t.height/s.height);i=i*e;let c=t.width/2-s.width/2*i,d=t.height/2-s.height/2*i;t.getContext("2d")?.drawImage(s,n+c,a+d,s.width*i,s.height*i)}getImageResized(s,t,e,n,a=1,i=0,c=0){let d=document.createElement("canvas");return d.width=t,d.height=e,d.style.width=t.toString(),d.style.height=e.toString(),this.drawImageFilled(s,d,a,i,c),n.src=d.toDataURL("image/png"),d}},l(rn,"CanvasTool"),w(rn,"CanvasTool"),rn);(0,wi.Package)("org.qcobjects.tools.canvas",[Ci]);var L=T(),sn,vi=(sn=class extends L.InheritClass{constructor({component:t=null,dependencies:e=[]}){super({component:t,dependencies:e});r(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=>xe.apply(t,0,1)),(0,L.Tag)("component>footer").map(t=>xe.apply(t,0,1)),(0,L.Tag)("component>header").map(t=>xe.apply(t,0,1)),(0,L.Tag)("nav").map(t=>{t.style.display="block",t.style.width=t.offsetParent?.scrollWidth.toString()||t.clientWidth.toString(),Cr.apply(t)}),(0,L.Tag)("component>article").map(t=>{t.style.display="block",t.style.height=t.offsetParent?.scrollHeight.toString()||t.clientHeight.toString(),vr.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(),wr.apply(t)})},300)}},l(sn,"BasicLayout"),w(sn,"BasicLayout"),sn);(0,L.Package)("org.qcobjects.tools.layouts",[vi]);var X=T(),B,Po=(B=class extends X.InheritClass{constructor(t){super(t);r(this,"__cache__");r(this,"__instanceID");let e=this;this.__cache__=new X.ComplexStorageCache({index:e.__instanceID.toString(),load(){let n;return typeof navigator<"u"&&typeof origin<"u"?n=X._Crypt.encrypt(`${navigator.userAgent}|${t.username}|${(+new Date).toString()}`,origin):n=X._Crypt.encrypt(`${t.username}|${(+new Date).toString()}`,X.CONFIG.get("domain","localhost")),B.user={priority:e.__instanceID.toString(),token:n},B.user},alternate(n){B.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_"+B.generateIndex(e);return(typeof X.global.get(n)>"u"||X.global.get(n)===null)&&X.global.set(n,(0,X.New)(B,{username:e})),B.user=X.global.get(n).user,X.global.get(n).user}static getGlobalUserToken(...t){return B.getGlobalUser(t).token}static getGlobalUserId(...t){return B.getGlobalUser(t).id}static getGlobalUserPriority(...t){return B.getGlobalUser(t).priority}static getLoginCredentialsToken(t,e){return X._Crypt.encrypt(`${t}${e}`,B.getGlobalUserToken(t))}static closeGlobalSession(...t){B.getGlobalUser(t);let e=[t].join("|"),n="userToken_"+B.generateIndex(e);typeof X.global.get(n)<"u"&&(X.global.get(n).__cache__.clear(),X.global.set(n,null),B.user={})}},l(B,"_SessionUserToken"),w(B,"SessionUserToken"),r(B,"user",{}),B);(0,X.Package)("org.qcobjects.cloud.auth.session.usertoken",[Po]);var _r=T(),an,Oi=(an=class extends _r.InheritClass{constructor(){super(...arguments);r(this,"__session_container__",null);r(this,"sessionData")}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 Po>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(Po.getGlobalUserToken(t))}`}save(...t){let e=(0,_r._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(),a=this.getSessionData(n);this.sessionData=a,this.sessionData[t]=e,this.save(n)}},l(an,"SessionData"),w(an,"SessionData"),an);(0,_r.Package)("org.qcobjects.cloud.auth.session.data",[Oi]);w(l((function o(s){"use strict";if(typeof Object.defineProperty<"u"&&typeof s<"u")try{Object.defineProperty(s,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:o})}catch{typeof s.__qcobjects_sdk__<"u"&&(s.__qcobjects_sdk__.__loaded__=!0)}if(typeof s.__qcobjects_sdk__.__loaded__>"u"){if(s.__qcobjects_sdk__.__loaded__=!0,typeof s>"u")throw Error("Top context empty: It should either global, module or window");let t=To.GlobalSettings.__start__.bind(s);s._sdk_=Promise.resolve().then(()=>{To.CONFIG.set("useSDK",!0),t()})}}),"__qcobjects_sdk__"),"__qcobjects_sdk__")(To._top);var Oa=To._top});var Si=ne(He=>{"use strict";var Ea=He&&He.__createBinding||(Object.create?(function(o,s,t,e){e===void 0&&(e=t);var n=Object.getOwnPropertyDescriptor(s,t);(!n||("get"in n?!s.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:l(function(){return s[t]},"get")}),Object.defineProperty(o,e,n)}):(function(o,s,t,e){e===void 0&&(e=t),o[e]=s[t]})),Sa=He&&He.__setModuleDefault||(Object.create?(function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}):function(o,s){o.default=s}),Na=He&&He.__importStar||(function(){var o=l(function(s){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},o(s)},"ownKeys");return function(s){if(s&&s.__esModule)return s;var t={};if(s!=null)for(var e=o(s),n=0;n<e.length;n++)e[n]!=="default"&&Ea(t,s,e[n]);return Sa(t,s),t}})();Object.defineProperty(He,"__esModule",{value:!0});var ae=Na(T()),xa=Tr(),Cn;(0,ae.Package)("com.qcobjects.installer",[(Cn=class extends ae.InheritClass{constructor(s){super(),this.root=s,window.addEventListener("beforeinstallprompt",()=>this.beforeinstallprompt.bind(this),!1),window.addEventListener("appinstalled",()=>this.installed.bind(this),!1),s.addEventListener("click",()=>this.install.bind(this)),s.addEventListener("touchend",()=>this.install.bind(this)),window.matchMedia("(display-mode: standalone)").addEventListener("change",t=>{let e="browser";t.matches&&(e="standalone"),xa.NotificationComponent.success(`TWA in ${e} Mode`)}),ae.default.set("installer",this)}beforeinstallprompt(s){return ae.logger.debug("registering installer event"),s.preventDefault(),ae.default.set("promptEvent",s),this.root.classList.add("available"),!1}installed(){ae.logger.debug("app is already installed"),ae.default.set("promptEvent",null),this.root.classList.remove("available")}install(){let s=this.root;ae.logger.debug("installer actioned");let t=ae.default.get("promptEvent",null);t?(ae.logger.debug("prompt event"),t.prompt(),t.userChoice.then(function(e){e.outcome==="accepted"?s.classList.remove("available"):ae.logger.debug("User has chosen not to install the PWA"),t=null}).catch(function(e){t=null,s.classList.remove("available"),ae.logger.warn(`Error during install: ${e.toString()}`)})):ae.logger.debug("It is not possible to get the prompt event for install ")}},l(Cn,"Installer"),Cn)])});var xi=ne(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});var ko=T(),vn,On,En;(0,ko.Package)("org.quickcorp.custom.effects",[(vn=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=780,this.defaultParams={alphaFrom:0,alphaTo:1},this.effects=["Fade","MoveYInFromBottom"],this.fitToHeight=!0}},l(vn,"MainTransitionEffect"),vn),(On=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromLeft"],this.fitToWidth=!0}},l(On,"SlideLeftTransitionEffect"),On),(En=class extends ko.TransitionEffect{constructor(){super(...arguments),this.duration=450,this.effects=["Fade","MoveXInFromRight"],this.fitToWidth=!0}},l(En,"SlideRightTransitionEffect"),En)])});var Ai=ne(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});var Ii=T(),Sn;(0,Ii.Package)("org.quickcorp.custom.models",[(Sn=class extends Ii.VO{constructor(){super(...arguments),this.first_name="",this.last_name="",this.address="",this.postalCode="",this.city="",this.country="",this.email="",this.phone=""}},l(Sn,"ContactVO"),Sn)])});var Mi=ne(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var ye=T(),kr=class kr extends ye.Component{constructor(){super(...arguments),this.name="github-grid",this.tplsource="inline",this.template=`
|
|
699
699
|
<style>
|
|
700
700
|
$layout(landscape,css/desktop/components/github-grid.css)
|
|
701
701
|
$layout(portrait,css/mobile/components/github-grid.css)
|
|
@@ -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(s){let t=s.component;console.log(t.serviceData);try{JSON.parse(t.serviceData)?.hasAdmin?ye.logger.debug("Admin module is present"):(ye.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove())}catch(e){ye.logger.debug(`It was not possible to check if admin module is present: ${e}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove()}return super.done(s)}};l(qr,"AdminButton");var Rr=qr;(0,ye.Package)("org.quickcorp.custom.components",[Rr,Mr,Pr,Ar])});var Ri=ne(Ue=>{"use strict";var Ia=Ue&&Ue.__createBinding||(Object.create?(function(o,s,t,e){e===void 0&&(e=t);var n=Object.getOwnPropertyDescriptor(s,t);(!n||("get"in n?!s.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:l(function(){return s[t]},"get")}),Object.defineProperty(o,e,n)}):(function(o,s,t,e){e===void 0&&(e=t),o[e]=s[t]})),Ta=Ue&&Ue.__setModuleDefault||(Object.create?(function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}):function(o,s){o.default=s}),Aa=Ue&&Ue.__importStar||(function(){var o=l(function(s){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},o(s)},"ownKeys");return function(s){if(s&&s.__esModule)return s;var t={};if(s!=null)for(var e=o(s),n=0;n<e.length;n++)e[n]!=="default"&&Ia(t,s,e[n]);return Ta(t,s),t}})();Object.defineProperty(Ue,"__esModule",{value:!0});var ce=Aa(
|
|
809
|
+
`}done(s){let t=s.component;console.log(t.serviceData);try{JSON.parse(t.serviceData)?.hasAdmin?ye.logger.debug("Admin module is present"):(ye.logger.debug("Admin module is NOT present. Install admin module in a dynamic served application (non-static server)"),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove())}catch(e){ye.logger.debug(`It was not possible to check if admin module is present: ${e}`),this.shadowRoot?.querySelector("style")?.remove(),this.shadowRoot?.querySelector(".admin_button_container")?.remove()}return super.done(s)}};l(qr,"AdminButton");var Rr=qr;(0,ye.Package)("org.quickcorp.custom.components",[Rr,Mr,Pr,Ar])});var Ri=ne(Ue=>{"use strict";var Ia=Ue&&Ue.__createBinding||(Object.create?(function(o,s,t,e){e===void 0&&(e=t);var n=Object.getOwnPropertyDescriptor(s,t);(!n||("get"in n?!s.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:l(function(){return s[t]},"get")}),Object.defineProperty(o,e,n)}):(function(o,s,t,e){e===void 0&&(e=t),o[e]=s[t]})),Ta=Ue&&Ue.__setModuleDefault||(Object.create?(function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}):function(o,s){o.default=s}),Aa=Ue&&Ue.__importStar||(function(){var o=l(function(s){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},o(s)},"ownKeys");return function(s){if(s&&s.__esModule)return s;var t={};if(s!=null)for(var e=o(s),n=0;n<e.length;n++)e[n]!=="default"&&Ia(t,s,e[n]);return Ta(t,s),t}})();Object.defineProperty(Ue,"__esModule",{value:!0});var ce=Aa(T()),Pa=Tr(),Be,Nn,xn;(0,ce.Package)("org.quickcorp.custom.controllers",[(Be=class extends ce.Controller{constructor(s){ce.logger.debug("Initializing MainController..."),super(s)}done(...s){let t=super.done(s);if(!Be.loaded){let e=(0,ce._DOMCreateElement)("style");e.innerHTML=`
|
|
810
810
|
@import url(css/body-layout.css);
|
|
811
|
-
`,document.body.append(e),ce.logger.debug("MainController loaded"),Be.loaded=!0}return t}},l(Be,"MainController"),Be),(
|
|
811
|
+
`,document.body.append(e),ce.logger.debug("MainController loaded"),Be.loaded=!0}return t}},l(Be,"MainController"),Be),(Nn=class extends ce.Controller{constructor(s){ce.logger.debug("Initializing SideNavController..."),super(s),this.component=s.component,this.component.shadowed?this.componentRoot=this.component.shadowRoot:this.componentRoot=this.component.body,ce.default.sideNavController=this,this.effect=new Pa.Fade({duration:300})}done(...s){let t=super.done(s);return this.close(),t}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()}},l(Nn,"SideNavController"),Nn),(xn=class extends ce.Controller{constructor(s){super(s),ce.logger.debug("Header controller initialized")}loadInstallerButton(){(this.component.shadowed!=null?this.component.shadowRoot:this.component.body).subelements("#installerbutton").map(t=>(this.installer=(0,ce.New)((0,ce.ClassFactory)("Installer"),t),t))}done(...s){let t=super.done(s);return this.loadInstallerButton(),t}},l(xn,"HeaderController"),xn)])});var Li=ne(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});var ki=T(),In;(0,ki.Package)("org.quickcorp.custom.views",[(In=class extends ki.View{done(...s){let t=super.done(s),e=this.component;return e!==void 0&&e.body!==void 0&&(e.body.style.display="block",e.body.style.width="100px",e.body.style.height="100px"),t}},l(In,"CardView"),In)])});var qi=ne(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});var Tn=T(),An,Pn,Mn,Rn;(0,Tn.Package)("com.qcobjects.services.github",[(An=class extends Tn.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/orgs/QuickCorp/repos",this.withCredentials=!1}done({request:s,service:t}){let e=JSON.parse(t.template).reverse().map(function(n){return{id:n.id,description:n.description,title:n.name,url:n.html_url,image:`https://via.placeholder.com/170/000000/FFFFFF?text=${encodeURI(n.name)}`}});return t.template=JSON.stringify({result:e}),super.done({request:s,service:t})}},l(An,"GitHubService"),An),(Pn=class extends Tn.JSONService{constructor(){super(...arguments),this.name="myservice",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/search/repositories?q=qcobjects",this.withCredentials=!1}done({request:s,service:t}){Tn.logger.debug(s);let e=JSON.parse(t.template).items.map(function(n){return{id:n.id,description:n.description,title:n.name,url:n.html_url,image:`https://via.placeholder.com/170/000000/FFFFFF?text=${encodeURI(n.name)}`}});return t.template=JSON.stringify({result:e}),super.done({request:s,service:t})}},l(Pn,"GitHubTagService"),Pn),(Mn=class extends Tn.Service{constructor(){super(...arguments),this.name="qcobjects_version_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects/tags",this.withCredentials=!1}done({service:s}){let t=JSON.parse(s.template)[0];s.template={version:t.name}}},l(Mn,"QCObjectsVersionService"),Mn),(Rn=class extends Tn.Service{constructor(){super(...arguments),this.name="qcobjects_stars_forks_service",this.external=!0,this.cached=!1,this.method="GET",this.headers={"Content-Type":"application/json"},this.url="https://api.github.com/repos/QuickCorp/QCObjects",this.withCredentials=!1}done({service:s}){let t=JSON.parse(s.template);s.template={forks:t.forks_count,stars:t.stargazers_count,watchers:t.watchers_count,size:Math.round(t.size/1e3)}}},l(Rn,"QCObjectsStarsForksService"),Rn)])});var $i=ne(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});var Lo=T(),kn;(0,Lo.Package)("com.qcobjects.services.newapp",[(kn=class extends Lo.Service{constructor(){super(...arguments),this.url="/admin"}done(s){let t=l(e=>/<base href="\/admin\/" target="_self">/.test(e),"hasAdmin");s.service.template=(0,Lo._DataStringify)({hasAdmin:t(s.service.template)})}fail(s){s.service.template=(0,Lo._DataStringify)({hasAdmin:!1})}},l(kn,"AdminCheckService"),kn)])});var Hi=ne(Gi=>{"use script";"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Si();xi();Ai();Mi();Ri();Li();qi();$i()});var Wi=ne(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});var Bi=T();(0,Bi.RegisterWidgets)("layout-basic","splash-screen","github-grid","octocat-icon","lib-list");(0,Bi.RegisterWidgets)("gitpod-button","netlify-button","aws-button","github-button","codespaces-button","deploy-grid")});var Ma=ne(Vi=>{Object.defineProperty(Vi,"__esModule",{value:!0});As();Hi();Wi()});return Ma();})();
|
|
812
812
|
//# sourceMappingURL=init.js.map
|