qcobjects 2.4.103-ts → 2.4.105-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/.eslintignore +2 -0
- package/VERSION +1 -1
- package/browser/QCObjects.js +2 -0
- package/browser/QCObjects.js.map +7 -0
- package/browser/chunks/chunk-O2PFFZVJ.js +713 -0
- package/browser/chunks/chunk-O2PFFZVJ.js.map +7 -0
- package/browser/chunks/chunk-TBLBK5VV.js +713 -0
- package/browser/chunks/chunk-TBLBK5VV.js.map +7 -0
- package/browser/chunks/chunk-ZYLXOA35.js +713 -0
- package/browser/chunks/chunk-ZYLXOA35.js.map +7 -0
- package/browser/index.js +2 -0
- package/browser/index.js.map +7 -0
- package/build/QCObjects.js +4868 -0
- package/build/index.cjs +4 -0
- package/build/index.js +7 -0
- package/build/index.mjs +2 -0
- package/package.json +18 -16
- package/src/QCObjects.js +4531 -4547
- package/src/index.d.ts +8 -11
- package/tsconfig.d.json +2 -2
- package/tsconfig.json +7 -2
- package/types/index.d.ts +472 -0
- package/src/types.d.ts +0 -20
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
var Wt=Object.defineProperty;var Jt=(Me,j,y)=>j in Me?Wt(Me,j,{enumerable:!0,configurable:!0,writable:!0,value:y}):Me[j]=y;var O=(Me,j)=>Wt(Me,"name",{value:j,configurable:!0}),at=(Me=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Me,{get:(j,y)=>(typeof require<"u"?require:j)[y]}):Me)(function(Me){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+Me+'" is not supported')});var Ht=(Me,j)=>()=>(j||Me((j={exports:{}}).exports,j),j.exports);var W=(Me,j,y)=>(Jt(Me,typeof j!="symbol"?j+"":j,y),y);var Bt=Ht(()=>{"use strict";var ae=(()=>{var Me=Object.defineProperty,j=O((A,f,d)=>f in A?Me(A,f,{enumerable:!0,configurable:!0,writable:!0,value:d}):A[f]=d,"Zn"),y=O((A,f)=>Me(A,"name",{value:f,configurable:!0}),"c"),_t=(A=>typeof at<"u"?at:typeof Proxy<"u"?new Proxy(A,{get:(f,d)=>(typeof at<"u"?at:f)[d]}):A)(function(A){if(typeof at<"u")return at.apply(this,arguments);throw new Error('Dynamic require of "'+A+'" is not supported')}),L=O((A,f)=>()=>(f||A((f={exports:{}}).exports,f),f.exports),"V"),U=O((A,f,d)=>(j(A,typeof f!="symbol"?f+"":f,d),d),"S"),jt=L((A,f)=>{y(O(function d(l){"use strict";if(typeof Object.defineProperty<"u"&&typeof l<"u")try{Object.defineProperty(l,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:d})}catch{typeof l.__qcobjects_sdk__<"u"&&(l.__qcobjects_sdk__.__loaded__=!0)}if(typeof l.__qcobjects_sdk__.__loaded__>"u"){if(l.__qcobjects_sdk__.__loaded__=!0,typeof l>"u")throw Error("Top context empty: It should either global, module or window");var S=l;l.global=S;var x=typeof window<"u"&&typeof window.self<"u"&&window===window.self,C=typeof f<"u",T=CONFIG.get("remoteImportsPath"),M=CONFIG.get("relativeImportPath"),P=!CONFIG.get("useLocalSDK");P&&!C?CONFIG.set("remoteImportsPath","https://sdk.qcobjects.dev/v2.4/src/js/"):CONFIG.set("relativeImportPath","qcobjects-sdk/src/js/"),typeof l._DOMCreateElement>"u"&&(l._DOMCreateElement=function(V){var ue;return x?ue=document.createElement(V):ue={},ue});var F;if(x&&!C)F=[Import("org.qcobjects.i18n_messages",function(){},P),Import("org.qcobjects.models",function(){},P),Import("org.qcobjects.components",function(){},P),Import("org.qcobjects.components.grid",function(){},P),Import("org.qcobjects.components.list",function(){},P),Import("org.qcobjects.components.slider",function(){},P),Import("org.qcobjects.components.notifications",function(){},P),Import("org.qcobjects.components.splashscreen",function(){},P),Import("org.qcobjects.controllers",function(){},P),Import("org.qcobjects.controllers.grid",function(){},P),Import("org.qcobjects.controllers.list",function(){},P),Import("org.qcobjects.controllers.slider",function(){},P),Import("org.qcobjects.controllers.form",function(){},P),Import("org.qcobjects.controllers.swagger",function(){},P),Import("org.qcobjects.effects",function(){},P),Import("org.qcobjects.modal.controllers",function(){},P),Import("org.qcobjects.views",function(){},P),Import("org.qcobjects.tools.canvas",function(){},P),Import("org.qcobjects.tools.layouts",function(){},P),Import("org.qcobjects.cloud.auth.session.usertoken",function(){},P),Import("org.qcobjects.cloud.auth.session.data",function(){},P)];else{C&&CONFIG.set("remoteImportsPath",CONFIG.get("basePath",""));var oe="qcobjects-sdk/src/js/";F=[Import(oe+"org.qcobjects.models",function(){},P),Import(oe+"org.qcobjects.components",function(){},P),Import(oe+"org.qcobjects.controllers",function(){},P),Import(oe+"org.qcobjects.views",function(){},P),Import(oe+"org.qcobjects.effects",function(){},P),Import(oe+"org.qcobjects.tools.canvas",function(){},P),Import(oe+"org.qcobjects.tools.layouts",function(){},P),Import(oe+"org.qcobjects.cloud.auth.session.usertoken",function(){},P),Import(oe+"org.qcobjects.cloud.auth.session.data",function(){},P)]}let ce=GlobalSettings.__start__.bind(l);l._sdk_=Promise.all(F).then(()=>{CONFIG.set("useSDK",!0),CONFIG.set("remoteImportsPath",T),CONFIG.set("relativeImportPath",M),ce()})}},"w"),"__qcobjects_sdk__").call(null,typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Ke=L((A,f)=>{var d=jt();f.exports=d}),ve=L((A,f)=>{y(O(function d(l){"use strict";if(typeof Object.defineProperty<"u"&&typeof l<"u")try{Object.defineProperty(l,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:d})}catch{typeof l.__qcobjects__<"u"&&(l.__qcobjects__.loaded=!0)}if(typeof l.__qcobjects__.loaded>"u"){let mt=O(function(e){C?Xe.push(e.bind(window)):typeof S<"u"&&Xe.push(e.bind(S))},"$e");y(mt,"Ready"),l.__qcobjects__.loaded=!0;var S=l;l.global=S;var x=typeof window<"u"&&"Deno"in window,C=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!x,T=typeof f<"u",M=y(function(){},"deno_require"),P=y(function(){return x?M(...arguments):_t(...arguments)},"_require_"),F=y(function(e){var n=typeof e.prototype<"u"?e.prototype.toString:function(){return""};typeof e.prototype<"u"&&(e.prototype.toString=function(){var s=["__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"],c;return s.includes(this.name)?c=this.name+"{ [QCObjects native code] }":c=n.call(this),c})},"_protected_code_");F(Function);var oe=y(function(e){var n=[];for(var s in e)(typeof e[s]).toLowerCase()==="function"&&n.push(e[s]);return n},"_methods_");String.prototype.__mAll__=function(e){var n=[];return this.replace(e,function(){var s=Array.prototype.slice.call(arguments,0,-2);s.input=arguments[arguments.length-1],s.index=arguments[arguments.length-2],n.push(s)}),n},typeof String.prototype.matchAll>"u"&&(String.prototype.matchAll=String.prototype.__mAll__);var ce=y(function(e){var n;return C?n=document.createElement(e):n={},n},"_DOMCreateElement");if(!C){let e=P("fs")}var V=y(function(e){var n=y(function(){var s=new WeakSet,c=0;return function(p,m){if(typeof m=="object"&&m!==null){if(s.has(m))return c+=1,c<=3?ot(m):null;s.add(m)}return m}},"getCircularReplacer");return JSON.stringify(e,n())},"_DataStringify");if(C){var ue=y(function(e){return[...this.querySelectorAll(e)]},"subelements");Element.prototype.subelements=ue,HTMLDocument.prototype.subelements=ue,HTMLElement.prototype.subelements=ue,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=ue)}if(C)try{l=typeof window.top<"u"?window.top:window,l._allowed_=!0}catch{try{l=document,l._allowed_=!0}catch{try{l=S,l._allowed_=!0}catch{l={},l._allowed_=!0}}}else typeof S<"u"&&(l=S);var R,Oe,de="quick-component:not([loaded]),component:not([loaded])";if(Oe=function(){var e="";if(C){var n=l.document.baseURI.split("?")[0].split("/");n.pop(),e=n.join("/")+"/"}else{var s;try{s=P("process")}catch{}typeof s<"u"?e=`${s.cwd()}/`:e=""}return e}(),C){"Promise"in l||(l.Promise=function(e){var n={then(){},catch(){},_then(s){this.then.call(n,s)},_catch(s){this.catch.call(n,s)}};return e.call(n,n._then,n._catch),n}),typeof l.console>"u"&&(l.console=function(){},l.console.prototype.log=function(e){}),R=function(){return typeof document<"u"&&document.domain!==""?document.domain:"localhost"}();var K=function(){var e=l[(![]+[])[+!+[]+ +!+[]]+(typeof![])[+!+[]]+(typeof[])[(+!+[]+ +!+[])*(+!+[]+ +!+[])]+(![]+[])[+!+[]]+(!![]+[])[+[]]+([]+[]+[][[]])[+[+!+[]+[+[]]]/(+!+[]+ +!+[])]+(typeof![])[+!+[]]+([]+[]+[][[]])[+!+[]]]["h"+(typeof![])[+!+[]]+(![]+[])[+!+[]+(+!+[]+ +!+[])]+(!![]+[])[+[]]].toLowerCase();return e}(),xe=function(){return typeof cordova<"u"}()}else{var K="secret";R="localhost"}l._asyncLoad=[];var we=y(function(e,n){var s={func:e,args:n,dispatch(){this.func.apply(null,this.args)}};return l._asyncLoad.push(s),s},"asyncLoad");if(C){var Fe=y(function(){document.readyState==="complete"&&l._asyncLoad.map(function(e){e.dispatch.call(e)})},"_fireAsyncLoad");document.onreadystatechange=Fe}else typeof l.global<"u"&&(l.global._fireAsyncLoad=function(){l._asyncLoad.map(function(e){e.dispatch.call(e)})});l.asyncLoad=we;var $e=y(function(){return{debugEnabled:!0,infoEnabled:!0,warnEnabled:!0,debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)},info(e){var n;this.infoEnabled&&(C?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))},warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}}},"Logger"),v=new $e;v.debugEnabled=!1,v.infoEnabled=!0,l.logger=v;var fe={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(e){var n="",s,c,p,m,_,b,E,k=0;for(e=fe._utf8_encode(e);k<e.length;)s=e.charCodeAt(k++),c=e.charCodeAt(k++),p=e.charCodeAt(k++),m=s>>2,_=(s&3)<<4|c>>4,b=(c&15)<<2|p>>6,E=p&63,isNaN(c)?b=E=64:isNaN(p)&&(E=64),n=n+this._keyStr.charAt(m)+this._keyStr.charAt(_)+this._keyStr.charAt(b)+this._keyStr.charAt(E);return n},decode(e){var n="",s,c,p,m,_,b,E,k=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");k<e.length;)m=this._keyStr.indexOf(e.charAt(k++)),_=this._keyStr.indexOf(e.charAt(k++)),b=this._keyStr.indexOf(e.charAt(k++)),E=this._keyStr.indexOf(e.charAt(k++)),s=m<<2|_>>4,c=(_&15)<<4|b>>2,p=(b&3)<<6|E,n=n+String.fromCharCode(s),b!==64&&(n=n+String.fromCharCode(c)),E!==64&&(n=n+String.fromCharCode(p));return n=fe._utf8_decode(n),n},_utf8_encode(e){e=e.replace(/rn/g,"n");for(var n="",s=0;s<e.length;s++){var c=e.charCodeAt(s);c<128?n+=String.fromCharCode(c):c>127&&c<2048?(n+=String.fromCharCode(c>>6|192),n+=String.fromCharCode(c&63|128)):(n+=String.fromCharCode(c>>12|224),n+=String.fromCharCode(c>>6&63|128),n+=String.fromCharCode(c&63|128))}return n},_utf8_decode(e){for(var n="",s=0,c=0,p=0,m=0,_;s<e.length;)c=e.charCodeAt(s),c<128?(n+=String.fromCharCode(c),s++):c>191&&c<224?(m=e.charCodeAt(s+1),n+=String.fromCharCode((c&31)<<6|m&63),s+=2):(m=e.charCodeAt(s+1),_=e.charCodeAt(s+2),n+=String.fromCharCode((c&15)<<12|(m&63)<<6|_&63),s+=3);return n}},B=y(function(e,n){var s=y(function(c,p){var m=2e3,_=0,b=setInterval(function(){p.call()?(clearInterval(b),c.call(),v.debug("Ejecuting "+c.name+" after wait")):_<m?(_+=1,v.debug("WAIT UNTIL "+c.name+" is true, "+_.toString()+" cycles")):(v.debug("Max execution time for "+c.name+" expression until true"),clearInterval(b))},1)},"_waitUntil");setTimeout(function(){s(e,n)},1)},"waitUntil");if(typeof z>"u")var z={getItem(e){return Object.hasOwnProperty.call(this,e)?this[e]:null},setItem(e,n){this[e]=n},removeItem(e){delete this[e]}};var Ce=y(function(e){var n,s,c;if(n=e.index,typeof n<"u"){s=e.load,c=e.alternate;var p=this.getID(n),m=z.getItem(p);if(this.isEmpty(m)){var _=s.call(null,{cachedObjectID:p,cachedResponse:m,cache:this});this.save(n,_),v.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",p))}else{var b=c.call(null,{cachedObjectID:p,cachedResponse:m,cache:this});v.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",p))}}else throw new Error("ComplexStorageCache: index is undefined");return this},"ComplexStorageCache");if(Ce.prototype.getItem=function(e){var n=z.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)},Ce.prototype.setItem=function(e,n){z.setItem(e,V(n))},Ce.prototype.isEmpty=function(e){var n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n},Ce.prototype.getID=function(e){var n;return typeof e<"u"&&(n="cachedObject_"+fe.encode(V(e).replace(/\{|\}|,/g,"_"))),n},Ce.prototype.save=function(e,n){var s=this.getID(e);v.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",s)),this.setItem(s,n)},Ce.prototype.getCached=function(e){var n=this.getID(e);return this.getItem(n)},Ce.prototype.clear=function(){Object.keys(z).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){z.removeItem(e)})},C){var qe=!1;try{var dt=Object.defineProperty({},"passive",{get(){return qe=!0,qe}});window.addEventListener("testPassive",null,dt),window.removeEventListener("testPassive",null,dt)}catch{}var ht=y(function(){return qe?{passive:!0}:!1},"captureFalse")}C&&(Element.prototype.find=function(e){var n=[],s=document.subelements(e);return s.map(function(c,p){typeof s[p]<"u"&&s[p].parentNode.tagName===this.parentNode.tagName&&n.push(Ye(c,new Object))}),n});var ze,bt=function(){var e=Object.prototype.hasOwnProperty;return function(n){if(typeof n!="object")throw TypeError("Object prototype may only be an Object or null. The type is "+typeof n);var s=y(function(){},"QCObjects");s.prototype=n;var c=new s;if(arguments.length>1){var p=Object(arguments[1]);for(var m in p)e.call(p,m)&&(c[m]=p[m])}return c}}();typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:y(function(e,n){"use strict";if(e===null)throw new TypeError("Cannot convert undefined or null to object");for(var s=Object(e),c=1;c<arguments.length;c++){var p=arguments[c];if(p!==null)for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(s[m]=p[m])}return s},"assign"),writable:!0,configurable:!0});var pt=y(function(e){return!!(typeof e=="function"&&e.toString().startsWith("class"))},"__is_raw_class__"),ot=y(function(e){var n;switch(!0){case typeof e=="string":n=e;break;case typeof e=="number":n=e;break;case typeof e=="object":n=Object.assign({},e);break;case typeof e=="function":n=e.bind({});break;case pt(e):n=y(class extends e{},"_value_");break;default:break}return n},"_LegacyCopy"),Pe={},Ie={},Qe=[],Xe=[],Je=y(function(e){var n="";return typeof e=="function"&&Object.hasOwnProperty.call(e,"name")&&e.name!==""?n=e.name:typeof e<"u"&&typeof e.constructor=="function"&&e.constructor.name!==""?n=e.constructor.name:typeof e<"u"&&typeof e.constructor=="object"&&(n=e.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),n},"ObjectName"),Ye=y(function(e,n){for(var s in e)if(typeof e[s]<"u")try{n[s]=e[s]}catch{}return n},"_Cast"),Ue=y(function(e,n){for(var s in e)if(typeof e[s]<"u"&&typeof e[s]!="function")try{n[s]=e[s]}catch{}else if(typeof e[s]=="function")try{n[s]=e[s].bind(n)}catch(c){v.warn(c)}return n},"_CastProps"),Ae=y(function(){return["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID"].indexOf(arguments[0])!==-1},"__is__forbidden_name__"),Y=y(function(e){var n="";switch(!0){case(pt(e)&&!!e.name):n=e.name;break;case(typeof e=="object"&&!!e.constructor&&!!e.constructor.name&&e.constructor.name!==""):n=e.constructor.name;break;case(!!e&&!!e.__classType&&e.__classType!==""):n=e.__classType;break;case(!!e&&!!e.__definition&&!!e.__definition.__classType&&e.__definition.__classType!==""):n=e.__definition.__classType;break;case(typeof e=="function"&&!!e.name):n=e.name;break;default:n=Je(e);break}return n},"__getType__"),X=y(function(e,n){return!!(typeof e<"u"&&e!==null&&((I(e)||g(e))&&e.hierarchy().includes(n)||Y(e)===n||Je(e)===n||typeof e===n))},"is_a"),pe=y(function(e){if(typeof e<"u")if(C)try{l[e.name]=e,window[e.name]=e}catch{}else typeof S<"u"&&(Object.hasOwnProperty.call(S,e.name)||(S[e.name]=e))},"__make_global__"),me=y(function(e,n){var s=e.name||Y(e);return e.__definition.__classType=s,typeof n<"u"&&(e.__definition.__namespace=n),Pe[s]=e,l[s]=Pe[s],l[s]},"__register_class__"),J=y(function(e,n){return me(e,n)},"RegisterClass");pe(J);var Q=y(function(){var e={},n,s,c;switch(arguments.length){case 0:return class{};case 1:n=arguments[0],s=y(class{},"type"),c={};break;case 2:n=arguments[0],s=y(class{},"type"),c=arguments[1];break;case 3:n=arguments[0],s=arguments[1],c=arguments[2];break;default:break}if(typeof s!="function")throw new Error("Class type must be a function or class");if(Ae.call(this,n))throw new Error(`${n} is not an allowed word in the name of a class`);return typeof s.__definition<"u"&&(c.__definition=Object.assign(ot(s.__definition),s)),e[s.name]=s,typeof c>"u"||c===null?c={}:c=ot(c),typeof c.__instanceID<"u"&&delete c.__instanceID,Pe[n]=class extends e[s.name]{constructor(){var p;arguments.length>0?p={...arguments[0]}:p={},super(p),U(this,"__classType",n),U(this,"__definition",{...c});let m=this;if(ze=typeof ze>"u"||ze===null?0:ze+1,m.__instanceID||Object.defineProperty(m,"__instanceID",{value:ze,writable:!1}),typeof m.__definition<"u"&&Object.keys(m.__definition).filter(function(_){return isNaN(_)&&!["name","__instanceID","__classType","__definition"].includes(_)}).forEach(function(_){typeof m.__definition[_]=="function"?m[_]=m.__definition[_].bind(m):m[_]=m.__definition[_]}),oe(Pe[m.__classType]).map(function(_){m[_.name]=_.bind(m)}),oe(m.__definition).map(function(_){m[_.name]=_.bind(m)}),m.body)if(typeof m.__definition>"u"||!Object.hasOwnProperty.call(m.__definition,"body")||typeof m.__definition.body>"u")try{C?m.body=ce(m.__definition.__classType):m.body={}}catch{m.body={}}else Object.hasOwnProperty.call(m.__definition,"body")&&(m.body=m.__definition.body);try{if(typeof m.__new__=="function"?m.__new__.call(m,p):typeof super.__new__=="function"&&(m.__new__=super.__new__.bind(m),m.__new__.call(m,p)),typeof m=="object"&&Object.hasOwnProperty.call(m,"_new_")&&typeof m._new_.isCalled>"u")try{m._new_.call(m,p),m._new_.isCalled=!0}catch(_){v.warn(`${m.__classType}._new_() failed with error: ${_}`)}}catch(_){v.warn(_)}}static hierarchy(p){var m=y(function(E){return Object.hasOwnProperty.call(E,"__classType")?E.__classType:Y.call(p,E)},"__classType"),_=y(E=>typeof E<"u"&&typeof E.__proto__<"u"&&E.__proto__!==null?(m(E)!==""?[m(E)]:[]).concat(_(E.__proto__)):[],"__hierarchy__proto__");(typeof p>"u"||p===null)&&(p=this);var b=[];return b.push(m(p)),b=b.concat(_(p.__proto__)),b}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(p){Ue(p,this)}_new_(){}getClass(){return Object.getPrototypeOf(this.constructor)}css(p){return typeof this.body<"u"&&this.body.style!=="undefined"&&(v.debug("body style"),this.body.style=Ye(p,this.body.style)),this.body.style}hierarchy(){var p=this;return this.getClass().hierarchy(p)}append(m){v.debug("append: start"),X(m,"Component")&&(v.debug("append: child is a Component"),v.debug(`appending the body of ${m.name}`));var m=arguments.length>0?arguments[0]:this.body;typeof this.body<"u"&&(v.debug("append element"),arguments.lenght>0?(v.debug("append to element"),this.body.append(m),typeof this.childs>"u"&&(this.childs=[]),this.childs.push(m)):C&&(v.debug("append to body"),document.body.append(m)))}attachIn(p){if(C)for(var m=document.subelements(p),_=0,b=m.length;_<b;_++)m[_].append(this);else throw new Error("attachIn not yet implemented for non browser platforms")}},Pe[n]=Ue(c,Pe[n]),Pe[n].__definition=c,Pe[n].__definition.__classType=n,Pe[n].__definition.__new__=y(function(p){Ue(p,this)},"__new__"),l[n]=Pe[n],l[n]},"Class");Q.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"};var G=y(function(e){var n;if(e!==null&&e.indexOf(".")>-1){var s=e.split(".").slice(0,e.split(".").length-1).join("."),c=e.split(".").slice(-1).join(""),p=N(s),m=typeof p<"u"?p.filter(_=>I(_)&&(_.__definition.__classType===c||typeof _=="function"&&!!_.name)).reverse():[];if(m.length>0)n=m[0];else throw Error(`Class ${e} not found.`)}else e!==null&&Object.hasOwnProperty.call(Pe,e)&&(n=Pe[e]);return n},"ClassFactory");C&&(Element.prototype.append=y(function(e){g(e)||typeof e.body<"u"?this.appendChild(e.body):this.appendChild(e)},"QC_Append"),Element.prototype.render=y(function(e){var n=this,s=y(function(c,p){if(typeof document.implementation.createHTMLDocument<"u"){var m=document.implementation.createHTMLDocument("");m.innerHTML=p,m.body.subelements("*").map(function(_){return c.append(_)})}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=e}catch{s(n,e)}else s(n,e)},"QC_Render"));var Ze=y(function(e,n,s){return G(e)[n]},"_super_");Ze.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"};var o=y(function(e,n){return n=arguments.length>1?n:{},typeof e>"u"?new Object:new e(n)},"New");o.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"};var r=y(function(e){return pe(e)},"Export");if(r.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"},!C){var t=y(function(e){let n=P("fs");var s=null;try{var c=[`${l.CONFIG.get("projectPath")}${l.CONFIG.get("relativeImportPath")}`,`${l.CONFIG.get("basePath")}${l.CONFIG.get("relativeImportPath")}`,`${l.CONFIG.get("projectPath")}`,`${l.CONFIG.get("basePath")}`,`${l.CONFIG.get("relativeImportPath")}`,`${process.cwd()}${l.CONFIG.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+e,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(f.paths);c=c.filter(p=>n.existsSync(p+"/"+e)),c.length>0&&(s=c[0],v.info(e+" is Installed."))}catch(p){console.log(p)}return s},"findPackageNodePath");r(t)}Q("_Crypt",Object,{last_string:"",last_key:"",construct:!1,_new_(e){var n=e.string,s=e.hasOwnProperty.call(e,"key")?e.key:null;this.__new__(e),s=s===null?this.__instanceID:s,this.last_key=s,this.last_string=n,this.construct=!0},_encrypt(){for(var e=this.string,n=this.key,s="",c,p,m=0;m<e.length;m++)c=e.substr(m,1),p=n.substr(m%n.length-1,1),c=String.fromCharCode(c.charCodeAt(0)+p.charCodeAt(0)),s+=c;return this.last_string=fe.encode(s),this.last_string},_decrypt(){var e=this.string,n=this.key,s="",c,p;e=fe.decode(e);for(var m=0;m<e.length;m++)c=e.substr(m,1),p=n.substr(m%n.length-1,1),c=String.fromCharCode(c.charCodeAt(0)-p.charCodeAt(0)),s+=c;return this.last_string=s,this.last_string},encrypt(e,n){var s=o(G("_Crypt"),{string:e,key:n!==""?n:"12345678ABC"});return s._encrypt()},decrypt(e,n){var s=o(G("_Crypt"),{string:e,key:n!==""?n:"12345678ABC"});return s._decrypt()}});var a=y(function(e){return G("_Crypt").encrypt(V(e),K)},"_CryptObject"),u=y(function(e){return e===""?{}:JSON.parse(G("_Crypt").decrypt(e,K))},"_DecryptObject"),h=y(function(){var e=1e3,n=G("_Crypt").encrypt((Math.random()*e).toString().replace(".",""),new Date().getTime().toString()),s=G("_Crypt").encrypt((Math.random()*e).toString().replace(".",""),new Date(new Date().getTime()-1e3*1e3).getTime().toString()),c=s.list().map((p,m)=>n.list()[m]===p?null:p).filter(p=>p!==null).join("");return c},"shortCode"),i=h;Q("InheritClass",class{},{});let ft=O(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"component",null),U(this,"__definition",{}),U(this,"__classType","Processor"),this.processors=ft.processors,this.process=ft.process.bind(this),this.processObject=ft.processObject.bind(this),this.setProcessor=ft.setProcessor.bind(this),this.execute=ft.execute.bind(this)}static setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static execute(e,n,s){var c=typeof e<"u"&&e!==null?e.processorHandler:this;return c.processors[n].bind(c).apply(c,[e,...s.split(",")])}static process(e,n=null){var s=n!==null?n.processorHandler:o(ft,{component:null});return typeof e=="string"&&Object.keys(s.processors).map(function(c){[...e.matchAll(new RegExp("\\$"+c+"\\((.*)\\).*","g"))].map(function(p){var m=`$${c}(${p[1]})`;e=e.replace(m,s.execute.bind(s).call(s,n,c,p[1]))})}),e}static processObject(e,n=null){var s=n===null?this:n.processorHandler;return typeof s>"u"&&(s=new ft({component:n})),typeof e=="object"?Object.keys(e).map(function(c){typeof e[c]=="object"&&!e[c].hasOwnProperty.call(e[c],"call")?e[c]=s.processObject.bind(s)(e[c],n):typeof e[c]=="string"&&(e[c]=s.process.bind(s)(e[c],n))}):typeof e=="string"&&(e=s.process.bind(s)(e,n)),e}},"we"),Re=ft;y(Re,"Processor"),U(Re,"processors",{config(e,n){return l.CONFIG.get(n,"")},ENV(e,n){return typeof process<"u"?process.env[n]:""},global(e,n){return typeof S<"u"?S[n]:""}}),Re.__definition={},Re.__classType="Processor",J(Re,"com.qcobjects"),pe(Re);let qt=O(class{static get instance(){if(this._instance===null){var e=new qt;e._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/v2.4/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:Oe},e._CONFIG_ENC=null,this._instance=e}return this._instance}static set instance(e){this._instance=e}},"Ot"),Tt=qt;y(Tt,"ConfigSettings"),U(Tt,"_instance",null),U(Tt,"_CONFIG_ENC",null),Pe.ConfigSettings=Tt,Q("CONFIG",Object,{get _CONFIG_ENC(){return G("ConfigSettings").instance._CONFIG_ENC},get _CONFIG(){return G("ConfigSettings").instance._CONFIG},set(e,n){v.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&(Oe=n);var s;try{s=function(c){c._CONFIG_ENC===null&&(c._CONFIG_ENC=G("_Crypt").encrypt(V({}),K));var p=c._CONFIG_ENC.valueOf(),m=c._CONFIG.valueOf();return Ue(m,u(p))}(G("ConfigSettings").instance)}catch(c){s={},console.error(c),v.debug("failed to encrypt config")}s[e]=n,G("ConfigSettings").instance._CONFIG_ENC=a(s),Object.hasOwnProperty.call(G("ConfigSettings").instance,"_CONFIG")&&Object.hasOwnProperty.call(G("ConfigSettings").instance._CONFIG,e)&&(G("ConfigSettings").instance._CONFIG[e]=n)},get(e,n){var s;try{var c=function(p){p._CONFIG_ENC===null&&(p._CONFIG_ENC=G("_Crypt").encrypt(V({}),K));var m=p._CONFIG_ENC.valueOf(),_=p._CONFIG.valueOf();return Ue(_,u(m))}(G("ConfigSettings").instance);typeof c[e]<"u"?s=c[e]:typeof n<"u"&&(s=n)}catch(p){console.error(p),v.debug("Something wrong when trying to get CONFIG values"),v.debug("No config value for: "+e),s=n}return Re.processObject.call(Re,s)}}),r(B),r(Ze),r(Ce),r(G),r(ce),r(h),r(Y),r(X);var g=y(function(e){return!!(typeof e=="object"&&Object.hasOwnProperty.call(e,"__classType")&&e.__instanceID&&Object.hasOwnProperty.call(e,"__definition")&&typeof e.__definition<"u")},"isQCObjects_Object"),I=y(function(e){return!!(typeof e=="function"&&!e.__instanceID&&e.__definition&&typeof e.__definition<"u"&&e.__definition.__classType)},"isQCObjects_Class"),N=y(function(e,n){return Ie.hasOwnProperty.call(Ie,e)&&typeof Ie[e]<"u"&&Ie[e].hasOwnProperty.call(Ie[e],"length")&&Ie[e].length>0&&typeof n<"u"&&n.hasOwnProperty.call(n,"length")&&n.length>0?(n.filter(function(s){return I(s)}).map(function(s){s.__definition.__namespace=e,s.__namespace=e}),Ie[e]=Ie[e].concat(n)):typeof n<"u"&&(typeof n=="object"&&n.hasOwnProperty.call(n,"length")?n.filter(function(s){return I(s)}).map(function(s){s.__definition.__namespace=e,s.__namespace=e}):I(n)&&(n.__definition.__namespace=e,n.__namespace=e),Ie[e]=n),Object.hasOwnProperty.call(Ie,e)&&Ie[e].map(function(s){me(s,e)}),Object.hasOwnProperty.call(Ie,e)?Ie[e]:void 0},"Package");N.prototype.toString=function(){return"Package(namespace, classes) { [QCObjects native code] }"},N("com.qcobjects",[Re]);var D=y(function(e){let n=N(e).filter(s=>I(s)).map(s=>({[s.__definition.__classType]:s})).reduce((s,c)=>Object.assign(s,c));return e.split(".").map(s=>({[s]:n})).reverse().reduce((s,c)=>(c[Object.keys(c)]=s,c))},"NamespaceRef"),H=y(function(){var e,n=y(function(){},"ready"),s=!1;if(!(arguments.length<1)){arguments.length===1?e=arguments[0]:arguments.length===2?(e=arguments[0],n=arguments[1]):arguments.length>2&&(e=arguments[0],n=arguments[1],s=arguments[2],v.debug("[Import] Setting external="+s.toString()+" resource to import: "+e)),s?v.debug("[Import] Registering external resource to import: "+e):v.debug("[Import] Registering local resource to import: "+e);var c;return C?(c=new Promise(function(p,m){var _=y(function(){var k=!1,q=0;for(var re in Ie)q++;return q<Qe.length?k=!1:k=!0,k},"allPackagesImported"),b=y(function(k){Qe.push(n),_()&&Qe.map(function(q){Xe.push(q)}),C&&l.CONFIG.get("removePackageScriptAfterLoading")&&k.target.remove(),p.call(c,{_imported_:k.target,_package_name_:e})},"readyImported");if(!Ie.hasOwnProperty.call(Ie,e)){var E=ce("script");E.type=l.CONFIG.get("sourceType","text/javascript"),E.async=!!l.CONFIG.get("asynchronousImportsLoad"),E.onreadystatechange=function(){E.readyState==="complete"&&b.call()},E.onload=b,E.onerror=function(k){m.call(c,{_imported_:E,_package_name_:e})},E.src=s?l.CONFIG.get("remoteImportsPath")+e+".js":Oe+l.CONFIG.get("relativeImportPath")+e+".js",document.getElementsByTagName("head")[0].appendChild(E)}}),c.catch(function(){v.debug("Import: Error loading a package ")})):c=new Promise(function(p,m){try{var _=t(e),b="";if(_!==null)b=_+"/"+e;else{var E=t(e+".js");E!==null?b=E+"/"+e+".js":b=Oe+l.CONFIG.get("relativeImportPath")+e}try{p.call(c,{_imported_:P(`${b}`),_package_name_:e})}catch(k){m.call(c,{_imported_:null,_package_name_:e,error:k})}}catch(k){m.call(c,{_imported_:null,_package_name_:e,error:k})}}).catch(function(p){v.debug("Something happened when importing "+e),console.warn(p)}),c.catch(function(p){v.warn(V(p))}),c}},"Import");H.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"},C&&(Element.prototype.Cast=y(function(n){n.__definition.body=this;var n=o(n);return n},"QC_Object")),Q("TagElements",Array,{show(){this.map(function(e){return e.style.opacity=1})},hide(){this.map(function(e){return e.style.opacity=0})},effect(){var e=[...arguments].slice(1),n=arguments[0];(typeof n).toLowerCase()==="string"&&(n=G(n)),this.map(function(s){return n.apply.apply(n,[s].concat(e))})},findElements(e){var n=o(G("TagElements"));if(C)for(var s in this)typeof s=="number"&&typeof this[s]!="function"&&this[s].hasOwnProperty.call(this[s],"subelements")&&n.push(this[s].subelements(e));return n}});var $=y(function(e,n){var s=o(G("TagElements"));if(C)for(var c=document.subelements(e),p=[],m=0;m<c.length;m++)typeof n<"u"&&c[m].hasOwnProperty.call(c[m],"innerHTML")&&(c[m].innerHTML=n),p.indexOf(m)<0&&(s.push(c[m]),p.push(m));return s},"Tag"),le=mt,te=y(function(e){var n=y(function(){Xe.map(function(s,c){typeof s=="function"&&(s.call(),delete Xe[c])})},"_execReady");l.CONFIG.get("delayForReady")>0?C?setTimeout(n.bind(window),l.CONFIG.get("delayForReady")):typeof S<"u"&&setTimeout(n.bind(S),l.CONFIG.get("delayForReady")):n.call(l)},"_Ready");C?(window.onload=te,xe&&document.addEventListener("deviceready",te,ht)):S.onload=te;class Ft extends G("InheritClass"){constructor({instance:n,name:s,fget:c,fset:p,value:m}){super({instance:n,name:s,fget:c,fset:p,value:m}),this._new_({instance:n,name:s,fget:c,fset:p,value:m})}_new_({instance:n,name:b,fget:c,fset:p,value:m}){var _=this,b=typeof b>"u"?Je(_):b;Object.defineProperty(n,b,{set(E){let k=E;v.debug("value changed "+b);var q;typeof p<"u"&&typeof p=="function"?q=p(k):q=k,n["_"+b]=q},get(){let E=n["_"+b];v.debug("returning value "+b);var k=y(function(re){return typeof re=="object"&&Object.hasOwnProperty.call(re,"value")?re.value:re},"is_ddo"),q;return typeof c<"u"&&typeof c=="function"?q=c(k(E)):q=k(E),q}})}}O(Ft,"Ut"),y(Ft,"DDO"),r(Ft);class Et{constructor({component:n,template:s}){U(this,"template",""),U(this,"__definition",{}),this.component=n,this.template=s}assign(n){var s=this;if(typeof s.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof s.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");var c=s.component.processorHandler;c.component=s.component;var p=typeof s.template<"u"?s.template:"";typeof n=="object"?[...Object.keys(n)].map(function(m){var _=n[m];if(typeof _=="string"||typeof _=="number"||!isNaN(_))try{_=Re.processObject.bind(c).call(c,_,s.component),p=p.replace(new RegExp(`{{${m}}}`,"g"),_)}catch(b){throw v.warn(`${s.component.name} could not parse processors.`),Error(`${s.component.name} could not parse processors. Reason: ${b.message}`)}}):v.debug(`${s.component.name}.data is not an object`);try{p=Re.processObject.call(c,p,s.component)}catch(m){throw v.warn(`${s.component.name} could not parse processors.`),Error(`${s.component.name} could not parse processors. Reason: ${m.message}`)}return p}}O(Et,"wt"),y(Et,"DefaultTemplateHandler"),Et.__definition={},J(Et,"com.qcobjects");var ee=y(function(e,n){let s=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...n.matchAll(new RegExp(s,"g"))][0].groups}},"__routing_params__"),be=y(function(e,n){return e.filter(function(s){var c=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(c,"g").test(n)}).reverse()},"__valid_routings__"),ge=y(function(e,n){return e.includes(n)},"__valid_routing_way__"),Se=y(function(e,n){var s=e.getAttribute("shadowed")===null,c=e.getAttribute("template-source")===null,p=e.getAttribute("shadowed")==="true",m=e.getAttribute("cached")===null,_=e.getAttribute("cached")==="true",b=typeof l.CONFIG.get("tplextension")<"u"?l.CONFIG.get("tplextension"):"html";b=e.getAttribute("tplextension")!==null?e.getAttribute("tplextension"):b;var E=e.getAttribute("name"),k=e.getAttribute("componentClass")!==null?e.getAttribute("componentClass"):"Component";let q=l.CONFIG.get("preserveComponentBodyTag")?E!==null?"com.qcobjects.components."+E+".ComponentBody":"com.qcobjects.components.ComponentBody":k;E=E!==null?E:G(q)&&typeof G(q).name<"u"?G(q).name:"";var re=G(q),Z=q!=="Component"&&typeof re<"u"&&typeof re.tplsource=="string"&&re.tplsource!=="",he=c&&Z?re.tplsource:c?"default":e.getAttribute("template-source");v.debug(`template source for ${E} is ${he} `),v.debug(`type for ${E} is ${Y(re)} `);var ie;ie=We({COMPONENTS_BASE_PATH:l.CONFIG.get("componentsBasePath"),COMPONENT_NAME:E,TPLEXTENSION:b,TPL_SOURCE:he}),l.CONFIG.get("preserveComponentBodyTag")&&N(E!==""?"com.qcobjects.components."+E:"com.qcobjects.components",[Q("ComponentBody",G("Component"),{name:E,tplsource:he,tplextension:b,reload:!0})]);var se=y(function(){var Te=s?re&&re.shadowed||G("Component").shadowed:p,ne={__parent__:n,name:E,cached:m?G("Component").cached:_,shadowed:Te,tplextension:b,body:l.CONFIG.get("preserveComponentBodyTag")?ce("componentBody"):e,templateURI:ie,tplsource:he};(typeof E>"u"||E===""||E===null)&&delete ne.name,ie===""&&delete ne.templateURI;var je=o(re,ne);return l.CONFIG.get("preserveComponentBodyTag")&&e.append(je),je},"__create_component_instance_"),Le=se.call(this);return Le},"_buildComponentFromElement_"),Ne=y(function(e,n){var s=[];return C?s=e.map(function(c){return Se(c,n)}):v.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),s},"_buildComponentsFromElements_");N("com.qcobjects",[y(class extends G("InheritClass"){constructor({templateURI:e="",template:n,tplsource:s="default",url:c="",name:p="",method:m="GET",data:_={},reload:b=!1,shadowed:E=!1,cached:k=!0,_body:q=ce("div"),__promise__:re=null,__shadowRoot:Z,body:he,shadowRoot:ie,splashScreenComponent:se,controller:Le,view:Te}){super(...arguments),U(this,"validRoutingWays",["pathname","hash","search"]),U(this,"basePath",Oe),U(this,"domain",R),U(this,"templateHandler","DefaultTemplateHandler"),U(this,"processorHandler",null),U(this,"routingWay",null),U(this,"routingNodes",[]),U(this,"routings",[]),U(this,"routingPath",""),U(this,"routingPaths",[]),U(this,"_componentHelpers",[]),U(this,"subcomponents",[]),U(this,"splashScreenComponent"),U(this,"controller"),U(this,"view"),U(this,"effect"),U(this,"method","GET"),U(this,"cached",!0),U(this,"__promise__",null),U(this,"__namespace");var ne=this;typeof ne.name>"u"&&v.warn("A name is not defined for "+Y(ne)),ne.routingWay=l.CONFIG.get("routingWay"),ne.processorHandler=o(Re,{component:ne}),ne.data=typeof ne.data>"u"||ne.data===null?{}:ne.data,ne.data=Object.assign(ne.data,ne.dataAttributes),ne.createServiceInstance().then(function(je){typeof ne.__new__=="function"&&ne.__new__.call(ne,ne),ne._generateRoutingPaths(ne.body).then(function(){ne._reroute_().then(function(){return ne.rebuild().then(function(){v.info(`Component._new_ The component ${ne.name} was built successfully!`)}).catch(function(rt){v.warn(`Component._new_ Something went wrong building the component ${ne.name}`),console.error(rt)})})})})}set body(e){var n=this;n._body=e}get body(){var e=this;return e._body}set cacheIndex(e){v.debug("[cacheIndex] This property is readonly")}get cacheIndex(){var e=this,n=V(e.routingPath);return fe.encode(e.name+n)}set parsedAssignmentText(e){v.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){var 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){var n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:v.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){var e=this;return e.__shadowRoot}set routingSelected(e){v.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){var e=this;return be(e.routings,e.routingPath)}set routingParams(e){v.debug("[routingParams] This is a read-only property of the component")}get routingParams(){var e=this;return[{}].concat(e.routingSelected.map(function(n){return ee(n,e.routingPath)})).reduce(function(n,s,c){return Object.assign(n,s)})}createServiceInstance(){var e=this,n=e.body,s=this.data,c,p=e.getClass().__definition,m=C&&n.getAttribute("serviceClass")!==null?n.getAttribute("serviceClass"):null;return new Promise(function(_,b){var E=!!(Object.hasOwnProperty.call(n,"enableServiceClass")&&n.enableServiceClass||!Object.hasOwnProperty.call(n,"enableServiceClass")),k=!!(C&&n.getAttribute("response-to")!==null&&n.getAttribute("response-to")==="data"),q=!!(C&&n.getAttribute("response-to")!==null&&n.getAttribute("response-to")==="template");if(E&&m!==null&&(c=G(m)),!k&&p&&Object.hasOwnProperty.call(p,"responseTo")?k=p.responseTo==="data":!k&&Object.hasOwnProperty.call(G("Component"),"responseTo")&&(k=G("Component").responseTo==="data"),!q&&p&&Object.hasOwnProperty.call(p,"responseTo")?q=p.responseTo==="template":!q&&Object.hasOwnProperty.call(G("Component"),"responseTo")&&(q=G("Component").responseTo==="template"),typeof c<"u"&&typeof E<"u"&&E===!0&&(k||q)){v.info("Loading service "+m);var re=o(c,{data:s});ye(re).then(function({request:Z,service:he}){var ie;typeof he.JSONresponse<"u"&&he.JSONresponse!==null?ie=he.JSONresponse:ie=he.template,k&&(typeof s=="object"&&typeof ie=="object"?s=Object.assign(s,ie):s=ie,e.data=s),e.serviceInstance=re,e.serviceData=s,q&&(e.template=ie),_(ie)},function(Z){v.debug(`Service loading rejected for ${m} in ${e.name}`),b(Z)}).catch(function(Z){throw v.debug("Something went wroing while trying to load the service "+m),Error(`Error loading ${m} for ${e.name}. Detail: ${Z}`)})}else _(null)})}_bindroute_(){var e=this;e._bindroute_.loaded?v.debug(`Routes already bound to popstate events for ${e.name}`):(C&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(s){var c=!0;l.global.get("routingPaths")||l.global.set("routingPaths",[]);var p=l.CONFIG.get("routingWay"),m=s.target[p];return l.global.get("routingPaths").includes(m)&&s.target[p]!==document.location[p]&&s.target.href!==document.location.href?(v.debug("A ROUTING WAS FOUND: "+m),window.history.pushState({href:s.target.href},s.target.href,s.target.href),G("Component").route(),c=!1):v.debug("NO ROUTING FOUND FOR: "+m),typeof s.target.oldclick<"u"&&typeof s.target.oldclick=="function"&&s.target.oldclick.call(s.target,s),c},null}),this._bindroute_.loaded=!0)}done(e){var n;if(typeof e<"u"){var{request:s,component:c}=e;n=Promise.resolve({request:s,component:c})}return n}createControllerInstance(){var e;if(C){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=G(n),typeof e<"u"&&(this.controller=o(e,{component:this}))}return new Promise((s,c)=>{if(C&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(p){throw Error(p)}else v.debug(`${n} does not have a done() method.`),c(`${n} does not have a done() method.`);typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):v.debug(`${n} does not have a createRoutingController() method.`)}s({component:this,controller:this.controller})})}createEffectInstance(){var e=this;return new Promise(function(n,s){if(C){var c=e.body.getAttribute("effectClass"),p=e.body.getAttribute("apply-effect-to");p=p!==null?p:"load",c!==null&&p==="observe"?e.applyObserveTransitionEffect(c):c!==null&&p==="load"&&e.applyTransitionEffect(c)}n({component:e,effect:e.effect})})}createViewInstance(){var e=this;return new Promise(function(n,s){var c=C?e.body.getAttribute("viewClass"):null;if(c!==null){var p=G(c);typeof p<"u"&&(e.view=o(p,{component:e}),Object.hasOwnProperty.call(e.view,"done")&&typeof e.view.done=="function"&&e.view.done.call(e.view))}n({component:e,view:e.view})})}__done__(){var e=this,n=y(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");e.createViewInstance(),e.createControllerInstance(),e.createEffectInstance(),v.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),v.debug(`Component helpers for ${e.name} executed.`)}catch(s){throw v.debug(`Component helpers for ${e.name} could not be executed.`),Error(s)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),e.body.setAttribute("loaded",!0)},"componentDone");return new Promise(function(s,c){try{Promise.resolve(n.call(e))}catch(p){c(p)}})}hostElements(e){var n=this,s=n.shadowed&&typeof n.shadowRoot<"u"?n.shadowRoot.subelements(e):n.body.subelements(e);return s}get subtags(){var e=this,n=de;return e.hostElements(n)}get bodyAttributes(){var e=this,n=e.body;return C?[...n.getAttributeNames()].map(s=>({[s]:n.getAttribute(s)})).reduce((s,c,p)=>Object.assign(s,c)):{}}get dataAttributes(){var e=this,n=e.body;return C?[{}].concat([...n.getAttributeNames()].filter(s=>s.startsWith("data-")).map(s=>({[s.split("-")[1]]:n.getAttribute(s)}))).reduce((s,c,p)=>Object.assign(s,c)):{}}__buildSubComponents__(e=!1){var n=this,s=n.subtags;return e||(s=s.filter(c=>c.getAttribute("loaded")!=="true")),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=Ne(s,n)),n.subcomponents}fail(e){var n;if(typeof e<"u"){var{error:s,component:c}=e;n=Promise.resolve({error:s,component:c})}return n}set(e,n){this[e]=n}get(e){return this[e]}feedComponent(){var e=this;v.debug(`[Component][${this.name}][feedComponent] start feeding component...`);var n=y(function(p){if(typeof p.container>"u"&&typeof p.body>"u"){v.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",p.name));return}var m=typeof p.container>"u"||p.container===null?p.body:p.container,_=p.parsedAssignmentText;if(p.innerHTML=_,p.shadowed){v.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",p.name)),v.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",p.name));var b=ce("div");m.subelements("[slot]").map(function(q){q.parentElement===m&&b.appendChild(q)}),v.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",p.name));var E=ce("div");E.classList.add("shadowHost");try{p.shadowRoot=E.attachShadow({mode:"open"})}catch{try{v.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",p.name)),p.shadowRoot=E.shadowRoot}catch{v.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",p.name))}}if(typeof p.shadowRoot<"u"&&p.shadowRoot!==null){p.reload?(v.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",p.name)),E.shadowRoot.innerHTML=p.innerHTML):(b.innerHTML=p.parseTemplate(b.innerHTML),v.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),E.shadowRoot.innerHTML+=p.innerHTML),v.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),E.innerHTML+=b.innerHTML,v.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",p.name));var k=m.querySelector(".shadowHost");typeof k<"u"&&k!==null?(v.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",p.name)),p.shadowRoot.innerHTML=E.shadowRoot.innerHTML):m.appendChild(E)}else v.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",p.name))}else p.reload?(v.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",p.name)),m.innerHTML=p.innerHTML):m&&p?(v.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),m.innerHTML+=p.innerHTML):v.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",p.name))},"_feedComponent_InBrowser"),s=y(function(p){var m=p.parsedAssignmentText;p.innerHTML=m},"_feedComponent_InNode"),c;if(!X(e,"Component")){v.warn("Trying to feed a non component object");return}return C?c=n(e):c=s(e),c}rebuild(){var e=this,n=new Promise(function(s,c){if((typeof e>"u"||e===null)&&c("Component is undefined"),g(e)&&X(e,"Component"))switch(!0){case e.get("tplsource")==="none":v.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var p={request:null,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,p),s.call(n,p)},function(){c.call(n,p)});break;case e.get("tplsource")==="inline":v.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),async function(m){m.feedComponent.bind(m)()}(e);var p={request:null,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,p),s.call(n,p)},function(){c.call(n,p)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),st(e,!1).then(function(m){s.call(n,m)},function(m){c.call(n,m)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),st(e,!1).then(function(m){s.call(n,m)},function(m){c.call(n,m)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):v.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),c.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:v.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),c.call(n,{request:null,component:e});break}});return n}Cast(e){let n=oe(e).map(s=>s.name.replace(/bound /g,"")).map(s=>({[s]:e[s].bind(this)})).reduce((s,c)=>Object.assign(s,c),{});return Ye(this,n)}static route(){var e=this,n,s=!!(g(e)&&X(e,"Component")),c=y(function(p){var m=[],_=p.filter(function(b){return typeof b<"u"}).map(function(b){if(typeof b.name<"u")m.push(b.name);else throw new Error(Y(b)+" does not have a name");return new Promise(function(E,k){var q;return typeof b<"u"&&b._reroute_?q=b._reroute_().then(function(){return b.reload=!0,b.rebuild()}).then(function(re){if(Object.hasOwnProperty.call(b,"subcomponents")&&typeof b.subcomponents<"u"&&b.subcomponents.length>0)return v.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+b.name),c.call(b,b.subcomponents);v.debug("No subcomponents to look for routings in: "+b.name),b.subtags.length>0&&(b.subcomponents=b.__buildSubComponents__(!0)),E(b)}):typeof b<"u"&&k("Component "+b.name+" is not an instance of Component"),q})});return Promise.all(_).then(function(){v.debug("ROUTING COMPLETED FOR "+m.join(", "))}).catch(function(b){v.warn("ROUTING FAILED FOR "+m.join(", ")+": "+b)})},"__route__");if(s||l.componentsStack)s&&v.debug("loading routings for instance "+e.name),n=c.call(e,s?e.subcomponents:l.componentsStack);else throw v.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(C){var e=this.body;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){C&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){var n=this;return new Promise(function(s,c){C&&ge(n.validRoutingWays,n.routingWay)&&typeof e<"u"&&(n.innerHTML=e.innerHTML,n.routingNodes=e.subelements("routing"),n.routings=[],n.routingNodes.map(function(p,m){var _=p.getAttributeNames(),b={};_.map(function(E,k){b[_[k]]=p.getAttribute(_[k])}),n.routings.push(b),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(b.path)||n.routingPaths.push(b.path),l.global.get("routingPaths")||l.global.set("routingPaths",[]),l.global.get("routingPaths").includes(b.path)||l.global.get("routingPaths").push(b.path)})),s()})}parseTemplate(e){var n=this,s,c=e;if(Object.hasOwnProperty.call(n,"templateHandler")){var p=n.templateHandler;v.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${p} ...`);var m=G(p),_=o(m,{component:n,template:c});_.component=n;var b=n.data;if(Object.hasOwnProperty.call(n,"assignRoutingParams")&&n.assignRoutingParams)try{b=Object.assign(b,n.routingParams)}catch{v.debug("[parseTemplate] it was not possible to assign the routing params to the template")}s=_.assign(b)}else v.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),s=c;return s}_reroute_(){var e=this;return new Promise(function(n,s){C&&ge(e.validRoutingWays,e.routingWay)&&(e.routingPath=document.location[e.routingWay],e.routingSelected.map(function(c,p){var m=We({COMPONENTS_BASE_PATH:l.CONFIG.get("componentsBasePath"),COMPONENT_NAME:c.name.toString(),TPLEXTENSION:Object.hasOwnProperty.call(c,"tplextension")?c.tplextension:e.tplextension,TPL_SOURCE:"default"});e.templateURI=m}),e.routingSelected.length>0&&(e.template="",e.body.innerHTML="")),n(e)})}lazyLoadImages(){if(C){var e=this,n=e.shadowed?e.shadowRoot:e.body,s=[...n.subelements("img[lazy-src]")],c=y(function(m){m.setAttribute("src",m.getAttribute("lazy-src")),m.onload=()=>{m.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){var p=new IntersectionObserver((m,_)=>{m.forEach(b=>{b.isIntersecting&&(c(b.target),_.unobserve(b.target))})});s.map(function(m){return p.observe(m)})}else s.map(c)}return null}applyTransitionEffect(e){var n=G(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&X(n,"TransitionEffect")?(this.effect=o(n,{component:this}),this.effect.apply(this.effect.defaultParams)):v.debug(`${e} is ${Y(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(C){var n=this,s=n.shadowed?n.shadowRoot.host:n.body,c=y(function(m){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){var p=new IntersectionObserver((m,_)=>{m.forEach(b=>{b.isIntersecting&&(c(b.target),_.unobserve(b.target))})});p.observe(s)}else c(s)}return null}scrollIntoHash(){if(C){var e=this;if(document.location.hash!==""){var n=e.shadowed?e.shadowRoot:e.body;n.subelements(document.location.hash).map(function(s){typeof s.scrollIntoView=="function"&&s.scrollIntoView(l.CONFIG.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"}))})}}}i18n_translate(){if(C&&l.CONFIG.get("use_i18n")){var e=this,n=e.shadowed?e.shadowRoot:e.body,s=l.CONFIG.get("lang","en"),c=navigator.language.slice(0,2),p=l.global.get("i18n");if(s!==c&&typeof p=="object"&&Object.hasOwnProperty.call(p,"messages")){var m=y(function(){var _=this;return new Promise(function(b,E){var k=p.messages.filter(function(q){return Object.hasOwnProperty.call(q,s)&&Object.hasOwnProperty.call(q,c)});n.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component").map(function(q){return k.map(function(re){var Z=q.innerHTML;return Z=Z.replace(new RegExp(`${re[s]}`,"g"),re[c]),q.innerHTML=Z,null}),q}),b()})},"callback_i18n");m.call(e).then(function(){v.debug("i18n loaded for component: "+e.name)})}}}addComponentHelper(e){var n=this;n._componentHelpers.push(e)}runComponentHelpers(){if(C){var 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(function(s){v.debug(`Executing ${s.name} as component helper for ${e.name}...`),s()})}}},"Component")]),oe(G("Component")).map(function(e){F(e)}),C&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),G("Component").route()}),N("com.qcobjects.controllers",[y(class extends G("InheritClass"){constructor({component:e,dependencies:n}){if(super({component:e,dependencies:n}),U(this,"component",null),U(this,"dependencies",[]),this.component=e,this.dependencies=n,typeof this.component>"u"||this.component==="null")throw Error(`${Y(this)} must be called with a component`)}routingSelectedAttr(e){return this.component.routingSelected.map(function(n){return n[e]}).filter(function(n){return n}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(e,n){try{this.isTouchable()?this.component.body.subelements(e)[0].addEventListener("touchstart",n,{passive:!0}):this.component.body.subelements(e)[0].addEventListener("click",n,{passive:!0})}catch{v.debug("No button to assign press event")}}createRoutingController(){var e=this,n=e.component,s=e.routingSelectedAttr("controllerclass");if(typeof s<"u"){var c=G(s);typeof c<"u"&&(n.routingController=o(c,{component:n}),Object.hasOwnProperty.call(n.routingController,"done")&&typeof n.routingController.done=="function"&&n.routingController.done.call(n.routingController))}}done(){}},"Controller")]),N("com.qcobjects.views",[y(class extends G("InheritClass"){constructor({component:e=void 0,dependencies:n=[]}){if(super(...arguments),typeof this.component>"u"||this.component==="null")throw Error(`${Y(this)} must be called with a component`)}},"View")]),N("com.qcobjects.api",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"kind","rest"),U(this,"domain",R),U(this,"basePath",Oe),U(this,"url",""),U(this,"method","GET"),U(this,"data",{}),U(this,"reload",!1),U(this,"cached",!1)}set(e,n){this[e]=n}get(e){return this[e]}},"Service")]),N("com.qcobjects.api.services",[y(class extends G("Service"){constructor(){super(...arguments),U(this,"method","GET"),U(this,"cached",!1),U(this,"headers",{"Content-Type":"application/json",charset:"utf-8"}),U(this,"JSONresponse",null)}done(e){v.debug("***** RECEIVED RESPONSE:"),v.debug(e.service.template),this.JSONresponse=JSON.parse(e.service.template)}},"JSONService")]),N("com.qcobjects.api.config",[y(class extends G("JSONService"){constructor(){super(...arguments),U(this,"method","GET"),U(this,"cached",!1),U(this,"configFileName","config.json"),U(this,"headers",{"Content-Type":"application/json",charset:"utf-8"}),U(this,"JSONresponse",null),this.set("url",this.get("basePath")+this.get("configFileName"))}done(e){v.debug("***** CONFIG LOADED:"),v.debug(e.service.template),this.JSONresponse=JSON.parse(e.service.template),Object.hasOwnProperty.call(this.JSONresponse,"__encoded__")&&(this.JSONresponse=JSON.parse(G("_Crypt").decrypt(this.JSONresponse.__encoded__,K)));for(var n in this.JSONresponse)l.CONFIG.set(n,this.JSONresponse[n]);this.configLoaded.call(this)}fail(e){this.configLoaded.call(this)}},"ConfigService")]),N("com.qcobjects.valueObjects",[y(class extends G("InheritClass"){constructor(){super(...arguments)}},"VO")]);var We=y(function(e){var n="";if(e.TPL_SOURCE==="default"){n="{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.{{TPLEXTENSION}}";for(var s in e){var c=e[s];n=n.replace("{{"+s+"}}",e[s])}}return n},"ComponentURI"),st=y(function(e,n){var s,c=y(function(_,b){return s=new Promise(function(E,k){var q=_.__promise__,re=Object.hasOwnProperty.call(_,"container")&&typeof _.container<"u"&&_.container!==null?_.container:_.body;if(re!==null){var Z=y(function(je){je.feedComponent();var rt={request:se,component:je};E.call(q,rt)},"_feedComponent_");v.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(_.data)).replace("{{URL}}",_.url));var he=y(function(){var je=ie?0:200;if(se.status===je){var rt=se.responseText;v.debug("Data received {{DATA}}".replace("{{DATA}}",V(rt))),v.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",_.name)),_.template=rt,_.cached&&typeof ne<"u"&&ne.save(_.name,_.template),Z.call(this,_)}else{var Gt={request:se,component:_};k.call(q,Gt)}},"_componentLoaded");if(typeof _.template=="string"&&_.template!=="")Z.call(this,_);else{var ie=!!_.url.startsWith("file:"),se=new XMLHttpRequest;if(ie){if("fetch"in l){v.debug("I can use fetch..."),v.debug("It is a file to be loaded, so I will try to use fetch");var Le=fetch(_.url).then(je=>{v.debug("I got a response from fetch, so I'll feed the component"),je.text().then(rt=>{_.template=rt,Z.call(this,_)})})}}else try{v.debug("Calling the url of component in async mode."),se.open(_.method,_.url,!0)}catch{v.debug("Last try has failed... The component cannot be loaded.")}!xe&&!ie&&se.setRequestHeader("Content-Type","text/html"),ie||(se.onload=he);var Te=y(function(je){je=!(typeof je>"u"||!je),v.debug("SENDING THE NORMAL REQUEST "),je?"fetch"in l||(v.debug("I have to try to load the file using xhr... "),se.send(null),se.status===XMLHttpRequest.DONE&&he.call(this)):(v.debug("Trying to send the data to the component... "),se.send(V(_.data)))},"_directLoad");if(_.cached&&!ie){v.debug("USING CACHE FOR COMPONENT: "+_.name);var ne=new Ce({index:_.cacheIndex,load(je){Te.call(this,ie)},alternate(je){_.method==="GET"?(_.template=je.cache.getCached(_.cacheIndex),Z.call(this,_)):Te.call(this,ie)}});S.lastCache=ne}else v.debug("NOT USING CACHE FOR COMPONENT: "+_.name),Te.call(this,ie)}}else v.debug("CONTAINER DOESNT EXIST")}),s.then(function(E){return _.__done__().then(function(){var k;return typeof _.done=="function"&&(k=_.done.call(_,E)),Promise.resolve(k)})},function(E){var k;return typeof _.fail=="function"&&(k=_.fail.call(_,E)),Promise.reject(k)}).catch(function(E){v.debug("Something wrong loading the component")}),s},"_componentLoaderInBrowser"),p=y(function(_,b){return s=new Promise(function(E,k){var q=s,re=y(function(se){se.feedComponent();var Le={request:null,component:se};E.call(q,Le)},"_feedComponent_");v.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(_.data)).replace("{{URL}}",_.url));var Z=y(function(se,Le){if(se){var Te={request:null,component:_};k.call(q,Te)}else{var ne=Le.toString();v.debug("Data received {{DATA}}".replace("{{DATA}}",V(ne))),v.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",_.name)),_.template=ne,_.cached&&typeof ie<"u"&&ie.save(_.name,_.template),re.call(this,_)}},"_componentLoaded");if(typeof _.template=="string"&&_.template!=="")re.call(this,_);else{v.debug("Loading the component as a local file in server...");var he=y(function(se){let Le=P("fs");v.debug("SENDING THE NORMAL REQUEST "),Le.readFile(_.url,Z)},"_directLoad");if(_.cached){v.debug("USING CACHE FOR COMPONENT: "+_.name);var ie=new Ce({index:_.cacheIndex,load(se){he.call(this)},alternate(se){_.method==="GET"?(_.template=se.cache.getCached(_.cacheIndex),re.call(this,_)):he.call(this)}});S.lastCache=ie}else v.debug("NOT USING CACHE FOR COMPONENT: "+_.name),he.call(this)}}),s.then(function(E){return _.__done__().then(function(){var k;return typeof _.done=="function"&&(k=_.done.call(_,E)),Promise.resolve(k)})},function(E){var k;return typeof _.fail=="function"&&(k=_.fail.call(_,E)),Promise.reject(k)}).catch(function(E){v.debug("Something wrong loading the component")}),s},"_componentLoaderInNode"),m;return C?typeof n<"u"&&n?m=we(c,arguments):m=c(e,n):m=p(e,n),m},"componentLoader"),ye=y(function(e,n){var s=y(function(b,E){var k=new Promise(function(q,re){v.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(b.data)).replace("{{URL}}",b.url));var Z=new XMLHttpRequest;Z.withCredentials=b.withCredentials;var he=!0;Z.open(b.method,b.url,he);for(var ie in b.headers)try{typeof b.headers[ie]!="function"&&Z.setRequestHeader(ie,b.headers[ie])}catch{v.debug("Something went wrong when assign the header "+ie)}Z.onload=function(){if(Z.status===200){var Te=Z.responseText;if(v.debug("Data received {{DATA}}".replace("{{DATA}}",V(Te))),v.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",b.name)),b.template=Te,b.cached&&typeof Le<"u"&&Le.save(b.name,b.template),typeof b.done=="function"){var ne={request:Z,service:b};b.done.call(b,ne),q.call(k,ne)}}else if(typeof b.fail=="function"){var ne={request:Z,service:b};b.fail.call(b,ne),re.call(k,ne)}};var se=y(function(){v.debug("SENDING THE NORMAL REQUEST ");try{Z.send(V(b.data))}catch{v.debug("SOMETHING WRONG WITH REQUEST "),re.call(k,{request:Z,service:b})}},"_directLoad");if(b.cached){var Le=new Ce({index:b.data,load(Te){se.call(this)},alternate(Te){if(b.method==="GET"){if(b.template=Te.cache.getCached(b.name),typeof b.done=="function"){var ne={request:Z,service:b};b.done.call(b,ne),q.call(k,ne)}}else se.call(this)}});S.lastCache=Le}else se.call(this);return Z});return k},"_serviceLoaderInBrowser"),c=y(function(b,E){var k=new Promise(function(q,re){if(typeof URL>"u"){S.URL=P("url").URL;let De=S.URL}var Z=new URL(b.url),he;b.useHTTP2=Object.hasOwnProperty.call(b,"useHTTP2")&&b.useHTTP2;var ie=y(function(De){v.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(b.data)).replace("{{URL}}",b.url));var Ot,Dt={http2Client:Te,request:De,service:b,responseHeaders:null};if(typeof b.data=="object"&&b.data!==null&&b.useHTTP2)try{v.debug("Sending data...");let Ct=new Buffer(V(b.data));De.write(Ct)}catch{v.debug("It was not possible to send any data")}Ot="",De.on("response",(Ct,Kt)=>{v.debug("receiving response..."),Dt.responseHeaders=Ct,Ot=""}),De.on("data",Ct=>{v.debug("receiving data..."),Ot+=""+Ct.toString(),b.template=Ot}),b.useHTTP2&&De.resume(),De.on("end",()=>{v.debug("ending call..."),b.template=Ot,Object.hasOwnProperty.call(b,"useHTTP2")&&b.useHTTP2?Te.destroy():De.destroy(),b.done.call(b,Dt),q.call(k,Dt)}),b.useHTTP2&&De.end()},"captureEvents");try{var se;if(b.useHTTP2){v.debug("using http2");var Le=P("http2"),Te=Le.connect(Z.origin);se=Object.assign({":method":b.method,":path":Z.pathname},b.options),se=Object.assign(se,b.headers),he=Te.request(se),he.setEncoding("utf8"),ie(he)}else if(Z.protocol==="http:"){var ne=P("http"),je=ne.request;se=Object.assign({url:b.url,headers:b.headers},b.options);var he=je(b.url);ie(he)}else if(Z.protocol==="https:"){var rt=P("https");se=Object.assign({hostname:Z.hostname,port:Z.port,path:Z.pathname,method:b.method,headers:b.headers},b.options);var Gt=rt.request(se,function(De){ie(De)});Gt.end()}else{var Ut="Protocol not supported: "+Z.protocol;throw v.debug(Ut),new Error(Ut)}}catch(De){v.debug(De),b.fail.call(b,De),re.call(k,De)}}).catch(function(q){console.log(q),v.debug("Something happened when trying to call the service: "+b.name),b.fail.call(b,q)});return k},"_serviceLoaderInNode"),p=y(function(b,E){var k=new Promise(function(q,re){v.debug(`Calling mockup service ${b.name} ...`);var Z={request:null,service:b,responseHeaders:b.responseHeaders};typeof b.mockup=="function"?b.mockup.call(b,Z):b.done.call(b,Z),q.call(k,Z)});return k},"_serviceLoaderMockup"),m=y(function(b,E){var k=new Promise(function(q,re){v.debug(`Calling local service ${b.name} ...`);var Z={request:null,service:b,responseHeaders:b.responseHeaders};typeof b.local=="function"?b.local.call(b,Z):b.done.call(b,Z),q.call(k,Z)});return k},"_serviceLoaderLocal"),_;switch(e.kind){case"rest":C?typeof n<"u"&&n?_=we(s,arguments):_=s(e,n):_=c(e,n);break;case"mockup":_=p(e,n);break;case"local":_=m(e,n);break;default:v.debug(`The value of the kind property of the service ${e.name} is not valid`);break}return _},"serviceLoader");if(r(ye),r(st),r(We),r(Je),r(V),r(I),r(g),r(D),C){Element.prototype.buildComponents=function(e=!1){var n=de,s=this,c=s.subelements(n);return Ne(c,null)},HTMLDocument.prototype.buildComponents=Element.prototype.buildComponents,HTMLElement.prototype.buildComponents=Element.prototype.buildComponents;var ke=y(class extends HTMLElement{constructor(){super(...arguments);let e=this,n=e.nodeName.toLowerCase(),s=ce("quick-component"),c=e.getAttributeNames();s.setAttribute("name",n),e.hasAttribute("shadowed")||s.setAttribute("shadowed","true"),c.map(function(m){e.hasAttribute(m)&&(s.setAttribute(m,e.getAttribute(m)),e.removeAttribute(m))});var p=e.getAttributeNames().filter(function(m){return m.startsWith("data-")}).map(function(m){return m.split("-")[1]});p.map(function(m){s.setAttribute("data-"+m,e.getAttribute("data-"+m)),e.removeAttribute("data-"+m)}),[...e.children].map(function(m){s.appendChild(m.cloneNode(!0)),m.remove()}),e.append(s)}},"_ComponentWidget_");r(ke);var et=y(function(e){customElements.define(e,class extends ke{})},"RegisterWidget"),yt=y(function(){var e=[...arguments];e.filter(function(n){return typeof n=="string"}).map(function(n){et(n)})},"RegisterWidgets");F(et),F(yt),r(et),r(yt)}C||N("com.qcobjects.api",[y(class extends G("InheritClass"){constructor({domain:e=R,basePath:n=Oe,body:s=null,stream:c=null,request:p=null}){super(...arguments),v.debug("Initializing BackendMicroservice...");let m=this;typeof this.body>"u"&&(this.body=null),typeof s<"u"&&(this.body=s),this.cors(),m.stream=c,c.on("data",E=>{var k=p.method.toLowerCase(),q={post:m.post};Object.hasOwnProperty.call(q,k)&&q[k].call(m,E)});var _=p.method.toLowerCase(),b={get:m.get,head:m.head,put:m.put,delete:m.delete,connect:m.connect,options:m.options,trace:m.trace,patch:m.patch};Object.hasOwnProperty.call(b,_)&&b[_].call(m)}cors(){if(this.route.cors){v.debug("Validating CORS...");let{allow_origins:n,allow_credentials:s,allow_methods:c,allow_headers:p}=this.route.cors;var e=this;if(typeof e.headers!="object"&&(e.headers={}),typeof e.route.responseHeaders!="object"&&(e.route.responseHeaders={}),typeof n<"u")if(v.debug("CORS: allow_origins available. Validating origins..."),n==="*"||typeof e.request.headers.origin>"u"||[...n].indexOf(e.request.headers.origin)!==-1)v.debug("CORS: Adding header Access-Control-Allow-Origin=*"),e.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{v.debug("CORS: Origin is not allowed: "+e.request.headers.origin),v.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(m){v.debug(`It was not possible to finish the call to the microservice: ${m}`)}}else v.debug("CORS: no allow_origins available. Allowing all origins..."),v.debug("CORS: Adding header Access-Control-Allow-Origin=*"),e.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof s<"u"?(v.debug(`CORS: allow_credentials present. Allowing ${s}...`),e.route.responseHeaders["Access-Control-Allow-Credentials"]=s.toString()):(v.debug("CORS: No allow_credentials present. Allowing all credentials."),e.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof c<"u"?(v.debug(`CORS: allow_methods present. Allowing ${c}...`),e.route.responseHeaders["Access-Control-Allow-Methods"]=[...c].join(",")):(v.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),e.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof p<"u"?(v.debug(`CORS: allow_headers present. Allowing ${p}...`),e.route.responseHeaders["Access-Control-Allow-Headers"]=[...p].join(",")):(v.debug("CORS: No allow_headers present. Allowing all headers..."),e.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else v.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(e){this.done()}get(e){v.debug(`[BackendMicroservice.get] Data received: ${V(e)}`),this.done()}post(e){this.done()}put(e){this.done()}delete(e){this.done()}connect(e){this.done()}options(e){this.done()}trace(e){this.done()}patch(e){this.done()}finishWithBody(e){try{v.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),v.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=V(this.body)),v.debug(`[BackendMicroservice.finishWithBody]
|
|
2
|
+
body: ${this.body} `),e.write(this.body),e.end(),v.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(n){v.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${n}`)}}done(){v.debug("[BackendMicroservice.done] Finalizing the response...");var e=this,n=e.stream;try{if(v.debug("[BackendMicroservice.done] Sending response headers..."),e.route.responseHeaders)v.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(e.route.responseHeaders)}`),n.respond(e.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(s){v.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${s}`)}if(e.body!==null)try{v.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),e.finishWithBody.call(e,n)}catch(s){v.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${s}`)}else v.debug("[BackendMicroservice.done] No body present. Ending stream..."),n.end()}},"BackendMicroservice")]),Q("SourceJS",Object,{domain:R,basePath:Oe,body:ce("script"),type:"text/javascript",containerTag:"body",url:"",data:{},async:!1,external:!1,set(e,n){this[e]=n},get(e){return this[e]},status:!1,done(){},fail(){},rebuild(){var e=this;try{document.getElementsByTagName(e.containerTag)[0].appendChild(function(n,s,c){return n.type=c.type,n.src=s,n.crossOrigin=Object.hasOwnProperty.call(c,"crossOrigin")?c.crossOrigin:"anonymous",n.async=c.async,n.onreadystatechange=function(){this.readyState==="complete"&&c.done.call(c)},n.onload=function(p){c.status=!0,c.done.call(c,p)},n.onerror=function(p){c.status=!1,c.fail.call(c,p)},c.body=n,n}.call(this,ce("script"),this.external?this.url:this.basePath+this.url,e))}catch(n){e.status=!1,e.fail.call(e,n)}},Cast(e){return Ye(this,e)},_new_(e){this.__new__(e),this.rebuild()}}),Q("SourceCSS",Object,{domain:R,basePath:Oe,body:ce("link"),url:"",data:{},async:!1,external:!1,set(e,n){this[e]=n},get(e){return this[e]},done(){},rebuild(){var e=this;C&&window.document.getElementsByTagName("head")[0].appendChild(function(n,s,c){return n.type="text/css",n.rel="stylesheet",n.href=s,n.crossOrigin="anonymous",n.onreadystatechange=function(){this.readyState==="complete"&&c.done.call(c)},n.onload=c.done,c.body=n,n}.call(this,ce("link"),this.external?this.url:this.basePath+this.url,e))},Cast(e){return Ye(this,e)},_new_(e){this.__new__(e),this.rebuild()}});var Ge=y(function(e){return isNaN(e)?new Number(0):new Number(e)},"__to_number");Array.prototype.unique=function(){return this.filter(function(e,n,s){return s.indexOf(e)===n})},Array.unique=function(e){return e.unique()},F(Array.unique),F(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){return e.table()},F(Array.table),F(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return Ge(e)+Ge(n)},0)},Array.sum=function(e){return e.sum()},F(Array.sum),F(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(Ge(e)+Ge(n))/2})},Array.avg=function(e){return e.avg()},F(Array.avg),F(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return Ge(e)<=Ge(n)?e:n},1/0)},Array.min=function(e){return e.min()},F(Array.min),F(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return Ge(e)>=Ge(n)?e:n},0)},Array.max=function(e){return e.max()},F(Array.max),F(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){var s=n?function(c,p){return p[e]<c[e]?1:-1}:function(c,p){return p[e]>c[e]?1:-1};return this.sort(s)},Array.sortBy=function(e,n,s=!0){return e.sortBy(n,s)},F(Array.sortBy),F(Array.prototype.sortBy),Array.matrix=function(e,n=0){var s=y(function(c){return n},"x_func");return Array.from({length:e},s)},F(Array.matrix),Array.matrix2d=function(e,n=0){var s=y(function(p){return n},"y_func"),c=y(function(p){return Array.from({length:e},s)},"x_func");return Array.from({length:e},c)},F(Array.matrix2d),Array.matrix3d=function(e,n=0){var s=y(function(p){return Array.from({length:e},function(){return n})},"y_func"),c=y(function(p){return Array.from({length:e},s)},"x_func");return Array.from({length:e},c)},F(Array.matrix3d),l.range=function(e,n=0,s=1){return(n===0||typeof n>"u")&&(n=e,e=0),Array.from({length:(n-e)/s+1},function(c,p){return e+p*s})},F(l.range),String.prototype.list=function(){var e=this;return l.range(0,e.length-1).map(function(n){return e[n]})},F(String.prototype.list),l.getDocumentLayout=function(){var e=y((c,p)=>c>p?"landscape":null,"h"),n=y((c,p)=>p>c?"portrait":null,"v"),s=y((c,p)=>c===p?"square":null,"square");return[e(document.documentElement.clientWidth,document.documentElement.clientHeight),n(document.documentElement.clientWidth,document.documentElement.clientHeight),s(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(c=>c!==null).pop()},Q("ArrayList",Array,[]),G("ArrayList").matrix=Array.matrix,G("ArrayList").matrix2d=Array.matrix2d,G("ArrayList").matrix3d=Array.matrix3d,F(G("ArrayList").matrix),F(G("ArrayList").matrix2d),F(G("ArrayList").matrix3d),Q("ArrayCollection",Object,{source:o(G("ArrayList"),[]),changed(e,n){v.debug("VALUE CHANGED"),v.debug(e),v.debug(n)},push(e){var n=this;v.debug("VALUE ADDED"),v.debug(e),n.source.push(e)},pop(e){var n=this;v.debug("VALUE POPPED"),v.debug(e),n.source.pop(e)},_new_(e){var n=this,s=0;n.source=o(G("ArrayList"),e);for(var c in n.source)isNaN(c)||(v.debug("binding "+c.toString()),function(p){Object.defineProperty(n,p,{set(m){v.debug("setting "+p+"="+m),n.source[p]=m,n.changed(p,m)},get(){return n.source[p]}})}(c),s++);n.source.length=s,Object.defineProperty(n,"length",{get(){return n.source.length}})}}),N("com.qcobjects.effects.base",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"duration",1e3)}animate({timing:e,draw:n,duration:s}){let c=performance.now();requestAnimationFrame(y(O(function p(m){let _=(m-c)/s;_>1&&(_=1);let b=e(_);n(Math.round(b*100)),_<1?requestAnimationFrame(p):typeof this<"u"&&this!==null&&Object.hasOwnProperty.call(this,"done")&&(typeof this.done).toLowerCase()==="function"&&this.done.call(this)},"i"),"animate"))}},"Effect")]),N("com.qcobjects.effects.transitions.base",[y(class extends G("Effect"){constructor(){super(...arguments),U(this,"duration",385),U(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1}),U(this,"fitToHeight",!1),U(this,"fitToWidth",!1),U(this,"effects",[]),v.info("DECLARING TransitionEffect "),this.component.defaultParams=this.defaultParams}apply({alphaFrom:e,alphaTo:n,angleFrom:s,angleTo:c,radiusFrom:p,radiusTo:m,scaleFrom:_,scaleTo:b}){var E=this;v.info("EXECUTING TransitionEffect ");var k=E.component.shadowed?E.component.shadowRoot.host:E.component.body;E.fitToHeight&&(k.height=typeof k.offsetParent=="object"&&k.offsetParent!==null?k.offsetParent.scrollHeight:k.getBoundingClientRect().height),E.fitToWidth&&(k.width=typeof k.offsetParent=="object"&&k.offsetParent!==null?k.offsetParent.scrollWidth:k.getBoundingClientRect().width),k.style.display="block",E.effects.map(function(q,re){var Z=G(q),he=new Z,ie=he.apply,se=[k].concat(Object.values({alphaFrom:e,alphaTo:n,angleFrom:s,angleTo:c,radiusFrom:p,radiusTo:m,scaleFrom:_,scaleTo:b}));ie.apply(E,se)})}},"TransitionEffect")]),N("com.qcobjects.timing",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"duration",1e3),U(this,"alive",!0)}thread({timing:e,intervalInterceptor:n,duration:s}){var c=this;let p=performance.now();requestAnimationFrame(y(O(function m(_){let b=_-p,E=b/s;E>1&&(E=1);let k=e(E,b);n(Math.round(k*100)),(E<1||s===-1)&&c.alive&&requestAnimationFrame(m)},"d"),"thread"))}},"Timer")]),N("com.qcobjects.tools.essentials",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"_toggle",!1),U(this,"_inverse",!0),U(this,"_positive",null),U(this,"_negative",null),U(this,"_dispatched",null),U(this,"_args",{}),this._new_(...arguments)}changeToggle(){this._toggle=!this._toggle}_new_({positive:e,negative:n,args:s}){this._positive=e,this._negative=n,this._args=s}fire(){var e=this,n=new Promise(function(s,c){typeof e._positive=="function"&&typeof e._negative=="function"?(e._inverse?e._dispatched=e._toggle?e._negative.bind(e):e._positive.bind(e):e._dispatched=e._toggle?e._positive.bind(e):e._negative.bind(e),e._dispatched.call(e,e._args),s.call(n,e)):(v.debug("Toggle functions are not declared"),c.call(n,e))}).then(function(s){s.changeToggle()}).catch(function(s){v.debug(s.toString())});return n}},"Toggle")]),function(e){let n=y(function(_,b,E){var k=this;if(typeof _>"u"||_===null)throw Error(`mapper.${b}.${E} does not have a component instance or it is null.`);let q=e.global.get(E),re=_.get(E),Z=_.data[E],he=typeof Z<"u"?Z:typeof re<"u"?re:q,ie="";return typeof he<"u"&&typeof he.map<"u"?ie=he.map(function(se){let Le=[...Object.keys(se)].map(Te=>` data-${Te}="${typeof se[Te]<"u"&&se[Te]!==null?se[Te].toString():""}"`).join("");return`<quick-component name="${b}" ${Le} ></quick-component>`}).join(""):v.debug(`${b}.${E} does not have a map property`),ie},"mapper");Re.setProcessor(n);let s=y(function(_,b,E){var k=`
|
|
3
|
+
/* CSS Document for Mobile Imports */
|
|
4
|
+
@import url("${E}") (orientation:portrait);
|
|
5
|
+
@import url("${E}") (max-width:460px);
|
|
6
|
+
@import url("${E}") (aspect-ratio: 9/16);
|
|
7
|
+
@import url("${E}") (aspect-ratio: 10/16);
|
|
8
|
+
@import url("${E}") (aspect-ratio: 5/8);
|
|
9
|
+
@import url("${E}") (aspect-ratio: 3/4);
|
|
10
|
+
@import url("${E}") (aspect-ratio: 2/3);
|
|
11
|
+
`,q=`
|
|
12
|
+
@import url("${E}") (orientation:landscape) and (min-width:460px);
|
|
13
|
+
@import url("${E}") (aspect-ratio: 16/9) and (min-width:460px);
|
|
14
|
+
@import url("${E}") (aspect-ratio: 16/10) and (min-width:460px);
|
|
15
|
+
@import url("${E}") (aspect-ratio: 8/5) and (min-width:460px);
|
|
16
|
+
@import url("${E}") (aspect-ratio: 4/3) and (min-width:460px);
|
|
17
|
+
@import url("${E}") (aspect-ratio: 3/2) and (min-width:460px);
|
|
18
|
+
`,re={landscape:q,portrait:k};return Object.hasOwnProperty.call(re,b)?re[b]:""},"layout");Re.setProcessor(s);let c=y(function(){let _=[...arguments].slice(1).map(function(b){return{[b.split("=")[0]]:b.split("=")[1]}}).reduce(function(b,E){return Object.assign(b,E)});return`<component ${[...Object.keys(_)].map(function(b){return`${b}=${_[b]}`}).join(" ")}></component>`},"component");Re.setProcessor(c);let p=y(function(){let _=[...arguments].slice(1).map(function(b){return{[b.split("=")[0]]:b.split("=")[1]}}).reduce(function(b,E){return Object.assign(b,E)});return`<quick-component ${[...Object.keys(_)].map(function(b){return`${b}=${_[b]}`}).join(" ")}></quick-component>`},"quick_component");Re.setProcessor(p);let m=y(function(_,b,E){return e.range(b).map(function(k){return E.replace("{{index}}",k.toString())}).join("")},"repeat");Re.setProcessor(m)}(l),mt(function(){l.CONFIG.get("useSDK")||l.__start__()}),r(r),r(H),r(N),r(Q),r(o),r($),r(mt),r(le),r(C),r(oe),function(e){N("com.qcobjects",[y(O(class xt extends G("InheritClass"){constructor(){super(...arguments),U(this,"_GLOBAL",{}),U(this,"__definition",{}),U(this,"__classType","GlobalSettings"),this.set=xt.set.bind(this),this.get=xt.get.bind(this),this.__start__=xt.__start__.bind(this)}static set(s,c){this._GLOBAL[s]=c}static get(s,c){var p;return typeof this._GLOBAL[s]<"u"?p=this._GLOBAL[s]:typeof c<"u"&&(p=c),p}static __start__(){var s=y(function(){var p;return C&&(p=new Promise(function(m,_){"serviceWorker"in navigator&&typeof e.CONFIG.get("serviceWorkerURI")<"u"&&(e.CONFIG.set("serviceWorkerScope",e.CONFIG.get("serviceWorkerScope")?e.CONFIG.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(e.CONFIG.get("serviceWorkerURI"),{scope:e.CONFIG.get("serviceWorkerScope")}).then(function(b){v.debug("Service Worker Registered"),m.call(p,b)},function(b){v.debug("Error registering Service Worker"),_.call(p,b)}),navigator.serviceWorker.ready.then(function(b){v.debug("Service Worker Ready"),m.call(p,b)},function(b){v.debug("Error loading Service Worker"),_.call(p,b)}))})),p},"__load__serviceWorker"),c=y(function(){return new Promise((p,m)=>{if(C){v.debug("Starting to building components");try{e.componentsStack=document.buildComponents.call(document)}catch(_){throw Error(`Something went wrong trying to start components tree: ${_.message}`)}v.debug("Initializing the service worker"),s.call(e).catch(function(_){v.debug(`error loading the service worker ${_}`)})}p()})},"_buildComponents");v.debug("Starting to load the config settings..."),e.CONFIG.get("useConfigService",!1)?(v.debug("Loading settings using local configuration file..."),e.global.configService=o(G("ConfigService")),e.global.configService.configLoaded=c,ye(e.global.configService)):(v.debug("Starting to load the components..."),c.call(this))}},"Ye"),"GlobalSettings")]),r(G("GlobalSettings")),S=o(G("GlobalSettings")),e=Ue(S,e),Object.defineProperty(e,"PackagesNameList",{set(n){v.debug("PackagesNameList is readonly")},get(){var n=y(function(s){var c=[];for(var p in s)typeof s[p]<"u"&&typeof s[p]!="function"&&Object.hasOwnProperty.call(s[p],"length")&&s[p].length>0&&(c.push(p),c=c.concat(n(s[p])));return c},"_get_packages_names");return n(Ie)}}),Object.defineProperty(e,"PackagesList",{set(n){v.debug("PackagesList is readonly")},get(){return e.PackagesNameList.map(function(n){let s=N(n),c;return s&&(c={packageName:n,classesList:s.filter(function(p){return I(p)})}),c}).filter(function(n){return typeof n<"u"})}}),Object.defineProperty(e,"ClassesList",{set(n){v.debug("ClassesList is readonly")},get(){var n=[];return e.PackagesList.map(function(s){return n=n.concat(s.classesList.map(function(c){return{packageName:s.packageName,className:s.packageName+"."+c.__definition.__classType,classFactory:c}})),s}),n}}),Object.defineProperty(e,"ClassesNameList",{set(n){v.debug("ClassesNameList is readonly")},get(){return e.ClassesList.map(function(n){return n.className})}}),C&&(Q("GLOBAL",Pe.global),r(G("GLOBAL"))),r(S),e.CONFIG.get("useSDK")&&function(n){var s=n.CONFIG.get("remoteImportsPath"),c=!n.CONFIG.get("useLocalSDK");n.CONFIG.set("remoteImportsPath",n.CONFIG.get("remoteSDKPath"));var p=!1,m="QCObjects-SDK";if(C)p=!0;else{var _=t("qcobjects-sdk");_!==null?(m="qcobjects-sdk",p=!0):(m="node_modules/qcobjects-sdk/QCObjects-SDK",p=!0)}if(p)if(v.info("Importing SDK... "+m),T&&typeof _t<"u"){let b=Ke()}else H(m,function(){c?v.debug("QCObjects-SDK.js loaded from remote location"):v.debug("QCObjects-SDK.js loaded from local"),n.CONFIG.set("remoteImportsPath",s)},c);else v.debug("SDK has not been imported as it is not available at the moment")}(e)}(l),C&&we(function(){mt(function(){(function(e){let n=0,s=!1,c=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function m(_){var b=Math.round(e.scrollY*100/c),E=Math.round(e.scrollX*100/p),k=new CustomEvent("scrollpercent",{detail:{percentX:E,percentY:b}});_.target.dispatchEvent(k);var q="defaultscroll",re=[0,5,10,25,50,75,90,95,100];re.filter(function(Z){return Z===b}).map(function(Z){q="percentY"+b.toString();var he=new CustomEvent(q,{detail:{percentX:E,percentY:b}});_.target.dispatchEvent(he)})}O(m,"a"),y(m,"scrollDispatcher"),document.addEventListener("scroll",function(_){s||(requestAnimationFrame(function(){m(_),s=!1}),s=!0)})})(l)})},null),C||(typeof l.global<"u"&&Object.hasOwnProperty.call(l.global,"_fireAsyncLoad")&&l.global._fireAsyncLoad.call(this),typeof l.global<"u"&&Object.hasOwnProperty.call(l.global,"onload")&&l.global.onload.call(this)),function(e){var n=y(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&l.CONFIG.get("secureObjects",!1)?mt(function(){n()}):l.CONFIG.get("secureObjects",!1)&&n()}(C)}},"w"),"__qcobjects__").call(null,typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),_e=L((A,f)=>{var d=ve();f.exports=d}),He=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var d=_e();(function(l){"use strict";class S extends d.InheritClass{constructor({messages:C=[]}){super({messages:C}),d.CONFIG.get("use_i18n",!1)&&(d.CONFIG.set("lang","en"),l.get("i18n")?l.set("i18n",{messages:l.get("i18n").messages.concat(C)}):l.set("i18n",{messages:C}))}_load_i18n_packages_(){return d.CONFIG.get("i18n_languages",[]).map(C=>{(0,d.Import)(`org.quickcorp.i18n_messages.${C}`)})}}O(S,"r"),y(S,"i18n_messages"),(0,d.Package)("org.qcobjects.i18n_messages",[S]),new S({})._load_i18n_packages_()})(typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Ee=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.models",[y(class extends f.VO{},"Contact")])})()}),tt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.ModalMoveUp=A.ModalMoveDown=A.ModalFade=A.WipeDown=A.WipeUp=A.WipeRight=A.WipeLeft=A.Resize=A.Radius=A.Rotate=A.RotateZ=A.RotateY=A.RotateX=A.MoveYInFromTop=A.MoveYInFromBottom=A.MoveXInFromLeft=A.MoveXInFromRight=A.Move=A.Fade=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(){"use strict";class v extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("alpha: "+Q.toString()),Y.style.opacity=Q.toString()}})}}O(v,"w"),y(v,"Fade");class fe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe,me,J){let Q=me-X,G=J-pe;Y.style.transform="translate("+X+"px,"+pe+"px)",this.animate({duration:this.duration,timing(Ze){return Ze},draw(Ze){d.logger.debug("animation progress: "+Ze.toString());let o=pe+Ze*G/100,r=X+Ze*Q/100;d.logger.debug("x: "+r.toString()+" y:"+o.toString()),Y.style.transform="translate("+r+"px,"+o+"px)"}})}}O(fe,"r"),y(fe,"Move"),(0,d.Package)("org.qcobjects.effects.base",[v,fe]);class B extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,Y.width,0,0,0)}}O(B,"f"),y(B,"MoveXInFromRight");class z extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,-Y.width,0,0,0)}}O(z,"p"),y(z,"MoveXInFromLeft");class Ce extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,0,Y.height,0,0)}}O(Ce,"u"),y(Ce,"MoveYInFromBottom");class qe extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,0,-Y.height,0,0)}}O(qe,"v"),y(qe,"MoveYInFromTop");class dt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(1,0,0,"+Q.toString()+"deg)"}})}}O(dt,"g"),y(dt,"RotateX");class ht extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(0,1,0,"+Q.toString()+"deg)"}})}}O(ht,"b"),y(ht,"RotateY");class ze extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(0,0,1,"+Q.toString()+"deg)"}})}}O(ze,"O"),y(ze,"RotateZ");class bt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(1,1,1,"+Q.toString()+"deg)"}})}}O(bt,"G"),y(bt,"Rotate");class pt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("radius: "+Q.toString()),Y.style.borderRadius=Q.toString()+"px"}})}}O(pt,"P"),y(pt,"Radius");class ot extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("resize: "+Q.toString()),Y.style.transformOrigin="center",Y.style.transform="scale("+Q+","+Q+")"}})}}O(ot,"y"),y(ot,"Resize");class Pe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="right",Y.style.transform="scaleX("+Q+")"}})}}O(Pe,"T"),y(Pe,"WipeLeft");class Ie extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="left",Y.style.transform="scaleX("+Q+")"}})}}O(Ie,"L"),y(Ie,"WipeRight");class Qe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="bottom",Y.style.transform="scaleY("+Q+")"}})}}O(Qe,"D"),y(Qe,"WipeUp");class Xe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="top",Y.style.transform="scaleY("+Q+")"}})}}O(Xe,"ae"),y(Xe,"WipeDown"),(0,d.Package)("org.qcobjects.effects.extended",[B,z,Ce,qe,dt,ht,ze,bt,pt,ot,Pe,Ie,Qe,Xe]);class Je extends v{constructor(){super(...arguments),this.duration=500}}O(Je,"le"),y(Je,"ModalFade");class Ye extends fe{constructor(){super(...arguments),this.duration=300}}O(Ye,"he"),y(Ye,"ModalMoveDown");class Ue extends fe{constructor(){super(...arguments),this.duration=800}}O(Ue,"be"),y(Ue,"ModalMoveUp"),(0,d.Package)("org.qcobjects.modal.effects",[Je,Ye,Ue])})();var S=l.Fade;A.Fade=S;var x=l.Fade;A.Move=x;var C=l.MoveXInFromRight;A.MoveXInFromRight=C;var T=l.MoveXInFromLeft;A.MoveXInFromLeft=T;var M=l.MoveYInFromBottom;A.MoveYInFromBottom=M;var P=l.MoveYInFromTop;A.MoveYInFromTop=P;var F=l.RotateX;A.RotateX=F;var oe=l.RotateY;A.RotateY=oe;var ce=l.RotateZ;A.RotateZ=ce;var V=l.Rotate;A.Rotate=V;var ue=l.Radius;A.Radius=ue;var R=l.Resize;A.Resize=R;var Oe=l.WipeLeft;A.WipeLeft=Oe;var de=l.WipeRight;A.WipeRight=de;var K=l.WipeUp;A.WipeUp=K;var xe=l.WipeDown;A.WipeDown=xe;var we=l.ModalFade;A.ModalFade=we;var Fe=l.ModalMoveDown;A.ModalMoveDown=Fe;var $e=l.ModalMoveUp;A.ModalMoveUp=$e}),nt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.SwaggerUIComponent=A.ModalEnclosureComponent=A.ModalComponent=A.EmailField=A.TextField=A.InputField=A.ButtonField=A.ShadowedComponent=A.FormField=void 0;var d=_e(),l=tt(),S=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(ue){class R extends d.Component{constructor(B){B.name=typeof B.name<"u"?B.name:"form-field",super(B),this.cached=!1,this.reload=!0}createBindingEvents(){let B;typeof this.fieldType>"u"||this.fieldType==null?B=this.body.subelements("*[data-field]"):B=this.body.subelements(this.fieldType+"[data-field]");for(let z=0;z<B.length;z++){let Ce=B[z];Ce.addEventListener("change",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("blur",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("focus",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("keydown",()=>{d.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(B){let z=B.getAttribute("data-field");d.logger.debug("Binding "+z+" for "+this.name),this.data[z]=B.value}executeBindings(){let B;typeof this.fieldType>"u"||this.fieldType==null?B=this.body.subelements("*[data-field]"):B=this.body.subelements(this.fieldType+"[data-field]");for(let z=0;z<B.length;z++){let Ce=B[z],qe=Ce.getAttribute("data-field");d.logger.debug("Binding "+qe+" for "+this.name),this.data[qe]=Ce.value}}done(B){let z=super.done(B);return this.executeBindings(),this.createBindingEvents(),d.logger.debug("Field loaded: "+this.fieldType+"[name="+this.name+"]"),z}}O(R,"r"),y(R,"FormField"),(0,d.Package)("org.qcobjects.base.components",[R]);class Oe extends d.Component{constructor(B){B.body=(0,d._DOMCreateElement)("div"),super(B),this.container=null,this.shadowed=!0,this.cached=!1,this.controller=null,this.view=null,this.data={}}}O(Oe,"f"),y(Oe,"ShadowedComponent");class de extends R{constructor(B){B.fieldType="button",super(B)}}O(de,"p"),y(de,"ButtonField");class K extends R{constructor(B){B.fieldType="input",super(B)}}O(K,"u"),y(K,"InputField");class xe extends R{constructor(B){B.fieldType="textarea",super(B)}}O(xe,"v"),y(xe,"TextField");class we extends R{constructor(B){B.fieldType="input",super(B)}}O(we,"g"),y(we,"EmailField");class Fe extends d.Component{constructor(B){B.body=(0,d._DOMCreateElement)("div"),super(B),this.name="modalenclosure",this.tplsource="inline",this.cached=!1,this.basePath=d.CONFIG.get("modalBasePath",d.CONFIG.get("remoteSDKPath","")),this.template=`
|
|
19
|
+
<!-- The Modal -->
|
|
20
|
+
<style>
|
|
21
|
+
@import url('https://sdk.qcobjects.dev/css/modal.css');
|
|
22
|
+
</style>
|
|
23
|
+
<div id="modalInstance_{{modalId}}" class="modal">
|
|
24
|
+
|
|
25
|
+
<!-- Modal content -->
|
|
26
|
+
<div class="modal-content">
|
|
27
|
+
<span class="close">×</span>
|
|
28
|
+
{{content}}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
`,this.data={}}}O(Fe,"b"),y(Fe,"ModalEnclosureComponent");class $e extends d.Component{constructor(B){B.basePath=d.CONFIG.get("modalBasePath",d.CONFIG.get("remoteSDKPath","")),super(B),this.name="modal",this.cached=!1,this.modalEnclosureComponentClass="ModalEnclosureComponent",this.controller=null,this.view=null,this.tplsource="none",this.closeOnClickOutside=!1,this.data={content:"",modalId:0},this.submodal=null,this.data.modalId=this.__instanceID;let z=(0,d.New)((0,d.ClassFactory)(this.modalEnclosureComponentClass),{name:this.name,basePath:this.basePath,data:this.data});this.subcomponents.push(z),this.submodal=z,z.tplsource==="none"?this.body.innerHTML=z.parsedAssignmentText:this.body.append(z.body)}modal(){let B=this.data.modalId;(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="block",new l.ModalFade({}).apply(z,0,1))),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content").map(z=>new l.ModalMoveDown({}).apply(z,0,-document.body.clientHeight,0,0)),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content .close").map(z=>z.addEventListener("click",()=>{this.close()},!1)),this.closeOnClickOutside&&window.addEventListener("click",()=>{this.close()},!1)}close(){let B=this.data.modalId;(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="block",new l.ModalFade({}).apply(z,1,0))),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content").map(function(z){return new l.ModalMoveUp({}).apply(z,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="none",!0))},900)}rebuild(){let B=super.rebuild();return this.templateURI=(0,d.ComponentURI)({COMPONENTS_BASE_PATH:d.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:d.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),B}}O($e,"O"),y($e,"ModalComponent");class v extends d.Component{constructor(){super(...arguments),this.cached=!1,this.basePath=d.CONFIG.get("remoteSDKPath",""),this.tplextension="tpl.html",this.name="swagger-ui"}}O(v,"G"),y(v,"SwaggerUIComponent"),(0,d.Package)("org.qcobjects.form.components",[Oe,de,K,xe,we,Fe,$e,v]),ue.FormField=R,ue.ShadowedComponent=Oe,ue.ButtonField=de,ue.InputField=K,ue.TextField=xe,ue.EmailField=we,ue.ModalEnclosureComponent=Fe,ue.ModalComponent=$e,ue.SwaggerUIComponent=v})(S);var x=S.FormField;A.FormField=x;var C=S.ShadowedComponent;A.ShadowedComponent=C;var T=S.ButtonField;A.ButtonField=T;var M=S.InputField;A.InputField=M;var P=S.TextField;A.TextField=P;var F=S.EmailField;A.EmailField=F;var oe=S.ModalEnclosureComponent;A.ModalEnclosureComponent=oe;var ce=S.ModalComponent;A.ModalComponent=ce;var V=S.SwaggerUIComponent;A.SwaggerUIComponent=V}),Ve=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.GridItemComponent=A.GridComponent=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(C){"use strict";class T extends d.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=`
|
|
33
|
+
<img src="{{image}}" />
|
|
34
|
+
<p>{{description}}</p>
|
|
35
|
+
`,this.cached=!1}}O(T,"r"),y(T,"GridItemComponent");class M extends d.Component{constructor(F){super(F),this.name="grid",this.cached=!1,this.view=null,this.shadowed=!0,this.rows=3,this.cols=3,this.templateURI="",this.data={},this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","DataGridController");let oe=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",oe)}}O(M,"f"),y(M,"GridComponent"),(0,d.Package)("org.qcobjects.components.grid",[M,T]),C.GridComponent=M,C.GridItemComponent=T})(l);var S=l.GridComponent;A.GridComponent=S;var x=l.GridItemComponent;A.GridItemComponent=x}),Nt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.ListItemComponent=A.ListComponent=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(C){"use strict";class T extends d.Component{constructor(F){F.name="list-item",super(F),this.shadowed=!1,this.tplsource="inline",this.template='<a href="{{value}}">{{label}}</a>',this.cached=!1}}O(T,"r"),y(T,"ListItemComponent");class M extends d.Component{constructor(F){F.name="list",super(F),this.shadowed=!0,this.tplsource="inline",this.template="<p>Loading...</p>",this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}}O(M,"f"),y(M,"ListComponent"),(0,d.Package)("org.qcobjects.components.list",[T,M]),C.ListComponent=M,C.ListItemComponent=T})(l);var S=l.ListComponent;A.ListComponent=S;var x=l.ListItemComponent;A.ListItemComponent=x}),it=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.components.slider",[y(class extends f.Component{constructor(d){super(d),this.tplsource="inline",this.template="<p>Loading...</p>",this.name="slidelist",this.body.setAttribute("controllerClass","DataGridController");let l=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",l)}},"SlideListComponent"),y(class extends f.Component{constructor(d){super(d),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=`
|
|
36
|
+
<div class="qcoSlides" style="display:none">
|
|
37
|
+
<div class="qco-slider__numbertext">{{slideNumber}} / {{__dataLength}}</div>
|
|
38
|
+
<img src="{{image}}" alt="{{title}}"/>
|
|
39
|
+
<div class="qco-slider__text">
|
|
40
|
+
<p>{{label}} <a href="{{link}}">{{category}}</a></p>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
`,this.tplsource="inline"}},"SlideItemComponent"),y(class extends f.Component{constructor(d){super(d),this.name="slider",this.template=`
|
|
44
|
+
<style>
|
|
45
|
+
/* Slideshow container */
|
|
46
|
+
|
|
47
|
+
:host a:hover,
|
|
48
|
+
:host a:active,
|
|
49
|
+
:host a:visited {
|
|
50
|
+
color: #ffffff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
{
|
|
54
|
+
color: #ffffff;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host .prev {left:0;}
|
|
58
|
+
.qco-slider__container {
|
|
59
|
+
max-width: 100%;
|
|
60
|
+
position: relative;
|
|
61
|
+
margin: auto;
|
|
62
|
+
height: 300px;
|
|
63
|
+
}
|
|
64
|
+
:host .qco-slider__container .qcoSlides img {
|
|
65
|
+
object-fit: cover;
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 300px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Next & previous buttons */
|
|
71
|
+
:host .prev,
|
|
72
|
+
:host .next {
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
width: auto;
|
|
77
|
+
margin-top: -22px;
|
|
78
|
+
padding: 16px;
|
|
79
|
+
color: white;
|
|
80
|
+
font-weight: bold;
|
|
81
|
+
font-size: 18px;
|
|
82
|
+
transition: 0.6s ease;
|
|
83
|
+
border-radius: 0 3px 3px 0;
|
|
84
|
+
background-color: rgba(1, 1, 1, 0.1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Position the "next button" to the right */
|
|
88
|
+
:host .next {
|
|
89
|
+
right: 0;
|
|
90
|
+
border-radius: 3px 0 0 3px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* On hover, add a black background color with a little bit see-through */
|
|
94
|
+
:host .prev:hover,
|
|
95
|
+
:host .next:hover {
|
|
96
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Caption text */
|
|
100
|
+
:host .qco-slider__text {
|
|
101
|
+
color: #f2f2f2;
|
|
102
|
+
font-size: 15px;
|
|
103
|
+
/* padding: 8px 12px;*/
|
|
104
|
+
position: absolute;
|
|
105
|
+
bottom: 8px;
|
|
106
|
+
width: 100%;
|
|
107
|
+
text-align: center;
|
|
108
|
+
text-shadow: -1px 1px 3px #111111;
|
|
109
|
+
background-color: rgba(1,1,1,0.7);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Number text (1/3 etc) */
|
|
113
|
+
:host .qco-slider__numbertext {
|
|
114
|
+
color: #f2f2f2;
|
|
115
|
+
text-shadow: 0px 2px 3px #111111;
|
|
116
|
+
font-size: 12px;
|
|
117
|
+
padding: 8px 12px;
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: 0;
|
|
120
|
+
padding-top: 0;
|
|
121
|
+
margin-top: 10px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* The dots/bullets/indicators */
|
|
125
|
+
:host .qcoSlider__dots {
|
|
126
|
+
text-align: center;
|
|
127
|
+
margin: 0 auto;
|
|
128
|
+
padding: 0;
|
|
129
|
+
}
|
|
130
|
+
:host .qcoSlider__dots--dot {
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
height: 10px;
|
|
133
|
+
width: 10px;
|
|
134
|
+
margin: 0 2px;
|
|
135
|
+
background-color: #bbb;
|
|
136
|
+
border-radius: 50%;
|
|
137
|
+
display: inline-block;
|
|
138
|
+
transition: background-color 0.6s ease;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:host .active,
|
|
142
|
+
:host .qcoSlider__dots--dot:hover {
|
|
143
|
+
background-color: #717171;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host .qco-slider__container .qcoSlides img {
|
|
147
|
+
border-radius: 30px 30px 0px 0px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
</style>
|
|
151
|
+
|
|
152
|
+
<div class="qco-slider__container">
|
|
153
|
+
<component name="slidelist" componentClass="SlideListComponent" subcomponentClass="SlideItemComponent" serviceClass="{{SERVICE_CLASS}}" ></component>
|
|
154
|
+
|
|
155
|
+
<a class="prev" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(-1)">❮</a>
|
|
156
|
+
<a class="next" onclick="global.get('{{sliderHandler}}').plusSlidesAndStop(1)">❯</a>
|
|
157
|
+
</div>
|
|
158
|
+
<br>
|
|
159
|
+
|
|
160
|
+
<div class="qcoSlider__dots" style="text-align:center">
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
`,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")}},"SliderComponent")])})()}),It=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=tt();(function(){"use strict";class l extends f.Component{constructor(x){x.name="notification",x.body=(0,f._DOMCreateElement)("div"),super(x),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=`
|
|
164
|
+
<style>
|
|
165
|
+
div.notification_background {
|
|
166
|
+
display: block; /* Hidden by default */
|
|
167
|
+
position: fixed; /* Stay in place */
|
|
168
|
+
z-index: 1; /* Sit on top */
|
|
169
|
+
padding-top: 100px; /* Location of the box */
|
|
170
|
+
left: 0;
|
|
171
|
+
top: 0;
|
|
172
|
+
bottom:0;
|
|
173
|
+
right:0;
|
|
174
|
+
width: 100%; /* Full width */
|
|
175
|
+
height: 100%; /* Full height */
|
|
176
|
+
overflow: auto; /* Enable scroll if needed */
|
|
177
|
+
background-color: rgb(0,0,0); /* Fallback color */
|
|
178
|
+
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
179
|
+
border: none !important;
|
|
180
|
+
}
|
|
181
|
+
div.notification {
|
|
182
|
+
border-radius: 12px !important;
|
|
183
|
+
margin-bottom: 15px;
|
|
184
|
+
padding: 4px 12px;
|
|
185
|
+
}
|
|
186
|
+
.notification.danger {
|
|
187
|
+
background-color: #ffdddd;
|
|
188
|
+
border-left: 6px solid #f44336;
|
|
189
|
+
}
|
|
190
|
+
.notification.success {
|
|
191
|
+
background-color: #ddffdd;
|
|
192
|
+
border-left: 6px solid #4CAF50;
|
|
193
|
+
}
|
|
194
|
+
.notification.info {
|
|
195
|
+
background-color: #e7f3fe;
|
|
196
|
+
border-left: 6px solid #2196F3;
|
|
197
|
+
}
|
|
198
|
+
.notification.warning {
|
|
199
|
+
background-color: #ffffcc;
|
|
200
|
+
border-left: 6px solid #ffeb3b;
|
|
201
|
+
}
|
|
202
|
+
</style>
|
|
203
|
+
<div class="notification_background">
|
|
204
|
+
<div class="notification {{kind}}">
|
|
205
|
+
<p><strong>{{title}}</strong> {{message}}</p>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
`,this.kinds=["danger","success","info","warning"]}display(x){let C=y(function(T){T.style.display="block";let M=(0,f.New)(d.Move,{duration:900,apply(F){(0,f._super_)("Fade","apply").call(this,F,0,1),(0,f._super_)("Move","apply").call(this,F,0,-document.body.clientHeight,0,0)}}),P=(0,f.New)(d.Move,{duration:650,apply(F){(0,f._super_)("Fade","apply").call(this,F,1,0),(0,f._super_)("Move","apply").call(this,F,0,0,0,-document.body.clientHeight)}});M.apply(T),setTimeout(function(){P.apply(T)},2e3)},"_display_");x.subelements("div.notification_background").map(T=>(0,f.New)(d.Fade,{duration:500}).apply(T,0,1)),x.subelements("div.notification").map(T=>C(T)),setTimeout(function(){x.remove()},2200)}static success(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static danger(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static info(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static warning(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}}O(l,"w"),y(l,"NotificationComponent"),(0,f.Package)("org.quickcorp.components.notifications",[l])})()}),gt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.CubeSplashScreenComponent=A.VideoSplashScreenComponent=A.SplashScreenComponent=void 0;var d=_e(),l=tt(),S=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};y(function(M){"use strict";class P extends d.Component{constructor(V){V.name=typeof V.name>"u"?"splashscreen":V.name;let ue=typeof window<"u"&&typeof window.self<"u"&&window===window.self,R=location.hash===""&&location.pathname==="/"&&location.search===""||d.CONFIG.get("routingWay","pathname")==="hash"&&d.CONFIG.get("start_url","/")===location.hash||d.CONFIG.get("routingWay","pathname")==="pathname"&&d.CONFIG.get("start_url","/")===location.pathname||d.CONFIG.get("routingWay","pathname")==="search"&&d.CONFIG.get("start_url","/")===location.search,Oe=ue&&R;if(Oe?(V.basePath=d.CONFIG.get("splashscreenBasePath",d.CONFIG.get("remoteSDKPath","")),typeof V.data>"u"&&(V.data={}),V.data.basePath=V.basePath):typeof V<"u"&&typeof V.body<"u"&&(V.body.style.display="none"),super(V),this.cached=!1,this.shadowed=!0,this._bgcolor="",this._enabled_=Oe,this._enabled_){let de=this.body.getAttribute("duration");de===null?de=1e3:de=parseInt(de.toString()),this._bgcolor=this.body.style.backgroundColor;let K=y(()=>{setTimeout(()=>{if(!K.executed){let xe=this.shadowed?this.shadowRoot?.host:this.body;typeof M.componentsStack<"u"&&M.componentsStack.filter(we=>we.body.hasAttribute("splashscreen")).map(we=>{d.logger.debug(`Splash Screen of Main Component: ${we.name}`),we.splashScreenComponent=this;let Fe=y(()=>{if(!Fe.executed){let $e=we.splashScreenComponent,v=we.shadowed?we.shadowRoot?.host:we.body;we._mainPosition=v.style.position,typeof v<"u"&&(v.style.position="fixed"),we._mainOpacity=v.style.opacity,xe.style.width="100%",xe.style.height="100%",document.body.style.backgroundColor="#111111",v.style.opacity="0",setTimeout(function(){typeof xe<"u"&&(document.body.style.backgroundColor=$e?._bgcolor,xe.subelements("#slot-logo").map(fe=>(fe.style.display="block",fe.style.transformOrigin="center",new l.Resize().apply(fe,1,0))),new l.Fade().apply(xe,1,0))},de-1e3),setTimeout(function(){new l.Fade().apply(v,0,1),v.style.position=we._mainPosition,document.body.style.backgroundColor=$e._bgcolor,xe.parentElement!==null&&xe.parentElement.remove()},de)}Fe.executed=!0},"SplashScreenHandler");return we.addComponentHelper(Fe.bind(we))}),K.executed=!0}})},"_helper_");K.executed=!1,this.addComponentHelper(K.bind(V))}}}O(P,"f"),y(P,"SplashScreenComponent"),(0,d.Package)("org.qcobjects.components.base",[P]);class F extends P{constructor(V){V.name="videosplashscreen",super(V),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
|
|
209
|
+
<style>
|
|
210
|
+
:host * {
|
|
211
|
+
box-sizing: border-box;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host {
|
|
215
|
+
zoom: 1.0;
|
|
216
|
+
width: device-width;
|
|
217
|
+
margin: 0;
|
|
218
|
+
top: 0;
|
|
219
|
+
left: 0;
|
|
220
|
+
right: 0;
|
|
221
|
+
bottom: 0;
|
|
222
|
+
position: absolute;
|
|
223
|
+
padding: 0;
|
|
224
|
+
min-width: 100vw;
|
|
225
|
+
min-height: 100vh;
|
|
226
|
+
width: 100vw;
|
|
227
|
+
height: 100vh;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
background-color: black;
|
|
230
|
+
}
|
|
231
|
+
#slot-logo::slotted(img) {
|
|
232
|
+
vertical-align: middle;
|
|
233
|
+
display: block;
|
|
234
|
+
width: 40vw;
|
|
235
|
+
left: 0;
|
|
236
|
+
margin: 0;
|
|
237
|
+
padding: 0;
|
|
238
|
+
z-index: 9999999999;
|
|
239
|
+
transform-origin: center;
|
|
240
|
+
transform-style: preserve-3d;
|
|
241
|
+
filter: blur(0em);
|
|
242
|
+
transition: filter 0.5s;
|
|
243
|
+
max-width: 300px;
|
|
244
|
+
position: absolute;
|
|
245
|
+
top: 50%;
|
|
246
|
+
left: 50%;
|
|
247
|
+
transform: translate(-50%, -50%);
|
|
248
|
+
animation: fadeIn 5s;
|
|
249
|
+
-webkit-animation: fadeIn 5s;
|
|
250
|
+
-moz-animation: fadeIn 5s;
|
|
251
|
+
-o-animation: fadeIn 5s;
|
|
252
|
+
-ms-animation: fadeIn 5s;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:host * {
|
|
256
|
+
-webkit-user-select: none;
|
|
257
|
+
-moz-user-select: none;
|
|
258
|
+
-ms-user-select: none;
|
|
259
|
+
user-select: none;
|
|
260
|
+
-webkit-touch-callout: none;
|
|
261
|
+
/* prevent callout to copy image, etc when tap to hold */
|
|
262
|
+
-webkit-text-size-adjust: none;
|
|
263
|
+
/* prevent webkit from resizing text to fit */
|
|
264
|
+
-webkit-user-select: none;
|
|
265
|
+
/* prevent copy paste, to allow, change 'none' to 'text' */
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* FOCUS */
|
|
269
|
+
:host summary:focus,
|
|
270
|
+
:host a:focus,
|
|
271
|
+
:host button:focus {
|
|
272
|
+
outline: none;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.splashscreen,
|
|
276
|
+
.fullscreen-bg {
|
|
277
|
+
padding: 0;
|
|
278
|
+
margin: 0;
|
|
279
|
+
top: 0;
|
|
280
|
+
left: 0;
|
|
281
|
+
right: 0;
|
|
282
|
+
bottom: 0;
|
|
283
|
+
padding: 0;
|
|
284
|
+
background-attachment: fixed;
|
|
285
|
+
background-position: center;
|
|
286
|
+
background-clip: content-box;
|
|
287
|
+
background-size: cover;
|
|
288
|
+
position: absolute;
|
|
289
|
+
min-width: 100vw;
|
|
290
|
+
min-height: 100vh;
|
|
291
|
+
width: 100vw;
|
|
292
|
+
height: 100vh;
|
|
293
|
+
z-index: 0;
|
|
294
|
+
overflow: hidden;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.splashscreen .splashcontent {
|
|
298
|
+
top: 0;
|
|
299
|
+
left: 0;
|
|
300
|
+
right: 0;
|
|
301
|
+
bottom: 0;
|
|
302
|
+
margin: 0 auto;
|
|
303
|
+
width: 100vw;
|
|
304
|
+
height: 100vh;
|
|
305
|
+
padding: 0;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
z-index: 1;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.splashscreen .splashcontent p {
|
|
311
|
+
color: white;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
video.fullscreen-bg__video {
|
|
315
|
+
top: 0;
|
|
316
|
+
left: 0;
|
|
317
|
+
bottom: 0;
|
|
318
|
+
right: 0;
|
|
319
|
+
margin: 0;
|
|
320
|
+
padding: 0;
|
|
321
|
+
position: absolute;
|
|
322
|
+
min-width: 100vw;
|
|
323
|
+
min-height: 100vh;
|
|
324
|
+
overflow: hidden;
|
|
325
|
+
z-index: 0;
|
|
326
|
+
object-fit: cover;
|
|
327
|
+
filter: brightness(0.3);
|
|
328
|
+
}
|
|
329
|
+
.splashscreen,
|
|
330
|
+
.fullscreen-bg {
|
|
331
|
+
background-image: url('{{background}}');
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@keyframes fadeIn {
|
|
335
|
+
0% {opacity:0;}
|
|
336
|
+
100% {opacity:1;}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@-moz-keyframes fadeIn {
|
|
340
|
+
0% {opacity:0;}
|
|
341
|
+
100% {opacity:1;}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
@-webkit-keyframes fadeIn {
|
|
345
|
+
0% {opacity:0;}
|
|
346
|
+
100% {opacity:1;}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@-o-keyframes fadeIn {
|
|
350
|
+
0% {opacity:0;}
|
|
351
|
+
100% {opacity:1;}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@-ms-keyframes fadeIn {
|
|
355
|
+
0% {opacity:0;}
|
|
356
|
+
100% {opacity:1;}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
</style>
|
|
360
|
+
<div class="splashscreen">
|
|
361
|
+
<div class="fullscreen-bg splashcontent">
|
|
362
|
+
<video loop muted autoplay playsinline name="media" poster="{{background}}" class="fullscreen-bg__video" data-setup="{}" height="100%">
|
|
363
|
+
<source src="{{video_mp4}}" type="video/mp4">
|
|
364
|
+
<source src="{{video_ogg}}" type="video/ogg">
|
|
365
|
+
<source src="{{video_webm}}" type="video/webm">
|
|
366
|
+
</video>
|
|
367
|
+
<slot id="slot-logo" name="logo"></slot>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
`}}O(F,"p"),y(F,"VideoSplashScreenComponent");class oe extends P{constructor(V){V.name="cubesplashscreen",super(V),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=`
|
|
372
|
+
<style>
|
|
373
|
+
@keyframes spin {
|
|
374
|
+
0% {
|
|
375
|
+
transform: translateZ(-100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
16% {
|
|
379
|
+
transform: translateZ(-100px) rotateX(180deg) rotateY(180deg) rotateZ(0deg);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
33% {
|
|
383
|
+
transform: translateZ(-100px) rotateX(360deg) rotateY(90deg) rotateZ(180deg);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
50% {
|
|
387
|
+
transform: translateZ(-100px) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
66% {
|
|
391
|
+
transform: translateZ(-100px) rotateX(180deg) rotateY(360deg) rotateZ(270deg);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
83% {
|
|
395
|
+
transform: translateZ(-100px) rotateX(270deg) rotateY(180deg) rotateZ(180deg);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
100% {
|
|
399
|
+
transform: translateZ(-100px) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@keyframes spin-duplicate {
|
|
404
|
+
0% {
|
|
405
|
+
transform: translateZ(-100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
16% {
|
|
409
|
+
transform: translateZ(-100px) rotateX(180deg) rotateY(180deg) rotateZ(0deg);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
33% {
|
|
413
|
+
transform: translateZ(-100px) rotateX(360deg) rotateY(90deg) rotateZ(180deg);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
50% {
|
|
417
|
+
transform: translateZ(-100px) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
66% {
|
|
421
|
+
transform: translateZ(-100px) rotateX(180deg) rotateY(360deg) rotateZ(270deg);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
83% {
|
|
425
|
+
transform: translateZ(-100px) rotateX(270deg) rotateY(180deg) rotateZ(180deg);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
100% {
|
|
429
|
+
transform: translateZ(-100px) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@keyframes roll {
|
|
434
|
+
0% {
|
|
435
|
+
transform: translate3d(-200px, -50px, -400px)
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
12% {
|
|
439
|
+
transform: translate3d(0px, 0, -100px)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
25% {
|
|
443
|
+
transform: translate3d(200px, -50px, -400px)
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
37% {
|
|
447
|
+
transform: translate3d(0px, -100px, -800px)
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
50% {
|
|
451
|
+
transform: translate3d(-200px, -50px, -400px)
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
62% {
|
|
455
|
+
transform: translate3d(0px, 0, -100px)
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
75% {
|
|
459
|
+
transform: translate3d(200px, -50px, -400px)
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
87% {
|
|
463
|
+
transform: translate3d(0px, -100px, -800px)
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
100% {
|
|
467
|
+
transform: translate3d(-200px, -50px, -400px)
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
#wrapper {
|
|
472
|
+
position: relative;
|
|
473
|
+
width: 200px;
|
|
474
|
+
padding-top: 100px;
|
|
475
|
+
margin: 0 auto;
|
|
476
|
+
perspective: 1200px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
#platform {
|
|
480
|
+
margin-top: 100px;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
#dice span {
|
|
484
|
+
position: absolute;
|
|
485
|
+
margin: 100px 0 0 100px;
|
|
486
|
+
display: block;
|
|
487
|
+
font-size: 2.5em;
|
|
488
|
+
padding: 10px;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
#dice {
|
|
492
|
+
position: absolute;
|
|
493
|
+
width: 200px;
|
|
494
|
+
height: 200px;
|
|
495
|
+
transform-style: preserve-3d;
|
|
496
|
+
animation: spin 50s infinite linear;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.side {
|
|
500
|
+
position: absolute;
|
|
501
|
+
width: 200px;
|
|
502
|
+
height: 200px;
|
|
503
|
+
background: none;
|
|
504
|
+
box-shadow: inset 0 0 40px #fff0;
|
|
505
|
+
border-radius: 40px;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
#dice .cover, #dice .inner {
|
|
509
|
+
background: #e0e0e0;
|
|
510
|
+
box-shadow: none;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
#dice .cover {
|
|
514
|
+
border-radius: 0;
|
|
515
|
+
transform-origin: center;
|
|
516
|
+
transform: translateZ(0px);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
#dice .cover.x {
|
|
520
|
+
transform-origin: center;
|
|
521
|
+
transform: rotateY(90deg);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
#dice .cover.z {
|
|
525
|
+
transform-origin: center;
|
|
526
|
+
transform: rotateX(90deg);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
#dice .front {
|
|
530
|
+
transform-origin: center;
|
|
531
|
+
transform: translateZ(100px);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
#dice .front.inner {
|
|
535
|
+
transform-origin: center;
|
|
536
|
+
transform: translateZ(98px);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
#dice .back {
|
|
540
|
+
transform-origin: center;
|
|
541
|
+
transform: rotateX(-180deg) translateZ(100px);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
#dice .back.inner {
|
|
545
|
+
transform-origin: center;
|
|
546
|
+
transform: rotateX(-180deg) translateZ(98px);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
#dice .right {
|
|
550
|
+
transform-origin: center;
|
|
551
|
+
transform: rotateY(90deg) translateZ(100px);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
#dice .right.inner {
|
|
555
|
+
transform-origin: center;
|
|
556
|
+
transform: rotateY(90deg) translateZ(98px);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
#dice .left {
|
|
560
|
+
transform-origin: center;
|
|
561
|
+
transform: rotateY(-90deg) translateZ(100px);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
#dice .left.inner {
|
|
565
|
+
transform-origin: center;
|
|
566
|
+
transform: rotateY(-90deg) translateZ(98px);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
#dice .top {
|
|
570
|
+
transform-origin: center;
|
|
571
|
+
transform: rotateX(90deg) translateZ(100px);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
#dice .top.inner {
|
|
575
|
+
transform-origin: center;
|
|
576
|
+
transform: rotateX(90deg) translateZ(98px);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
#dice .bottom {
|
|
580
|
+
transform-origin: center;
|
|
581
|
+
transform: rotateX(-90deg) translateZ(100px);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
#dice .bottom.inner {
|
|
585
|
+
transform-origin: center;
|
|
586
|
+
transform: rotateX(-90deg) translateZ(98px);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.dot {
|
|
590
|
+
position: absolute;
|
|
591
|
+
width: 46px;
|
|
592
|
+
height: 46px;
|
|
593
|
+
border-radius: 23px;
|
|
594
|
+
background: #444;
|
|
595
|
+
box-shadow: inset 5px 0 10px #000;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.dot.center {
|
|
599
|
+
margin: 77px 0 0 77px;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.dot.dtop {
|
|
603
|
+
margin-top: 20px;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.dot.dleft {
|
|
607
|
+
margin-left: 134px;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.dot.dright {
|
|
611
|
+
margin-left: 20px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.dot.dbottom {
|
|
615
|
+
margin-top: 134px;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.dot.center.dleft {
|
|
619
|
+
margin: 77px 0 0 20px;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.dot.center.dright {
|
|
623
|
+
margin: 77px 0 0 134px;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
#background {
|
|
627
|
+
top: 0px;
|
|
628
|
+
left: 0px;
|
|
629
|
+
position: fixed;
|
|
630
|
+
z-index: -1;
|
|
631
|
+
width: 100%;
|
|
632
|
+
height: 100%;
|
|
633
|
+
background: var(--root-background, transparent);
|
|
634
|
+
background-size: cover;
|
|
635
|
+
background-origin: border-box;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
#dice .side.front,
|
|
639
|
+
#dice .side.top,
|
|
640
|
+
#dice .side.right,
|
|
641
|
+
#dice .side.left,
|
|
642
|
+
#dice .side.bottom,
|
|
643
|
+
#dice .side.back {
|
|
644
|
+
background-image: var(--background-3d-cube-image, "none");
|
|
645
|
+
background-size: cover;
|
|
646
|
+
background-origin: border-box;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
:root, :host {
|
|
651
|
+
--background-3d-cube-image: url('{{cube_image}}');
|
|
652
|
+
--box-width: 200px;
|
|
653
|
+
font-size:.9em;
|
|
654
|
+
font-family:sans-serif;
|
|
655
|
+
--root-background: {{background}};
|
|
656
|
+
}
|
|
657
|
+
</style>
|
|
658
|
+
|
|
659
|
+
<div id="background"></div>
|
|
660
|
+
<div id="wrapper">
|
|
661
|
+
<div id="platform">
|
|
662
|
+
<div id="dice">
|
|
663
|
+
<div class="side front">
|
|
664
|
+
</div>
|
|
665
|
+
<div class="side front inner"></div>
|
|
666
|
+
<div class="side top"></div>
|
|
667
|
+
<div class="side top inner"></div>
|
|
668
|
+
<div class="side right"></div>
|
|
669
|
+
<div class="side right inner"></div>
|
|
670
|
+
<div class="side left"></div>
|
|
671
|
+
<div class="side left inner"></div>
|
|
672
|
+
<div class="side bottom"></div>
|
|
673
|
+
<div class="side bottom inner"></div>
|
|
674
|
+
<div class="side back"></div>
|
|
675
|
+
<div class="side back inner"></div>
|
|
676
|
+
<div class="side cover x"></div>
|
|
677
|
+
<div class="side cover y"></div>
|
|
678
|
+
<div class="side cover z"></div>
|
|
679
|
+
</div>
|
|
680
|
+
</div>
|
|
681
|
+
</div>
|
|
682
|
+
|
|
683
|
+
`}}O(oe,"u"),y(oe,"CubeSplashScreenComponent"),(0,d.Package)("org.qcobjects.components.splashscreen",[F,oe])},"__splash_screen__")(S);var x=S.SplashScreenComponent;A.SplashScreenComponent=x;var C=S.VideoSplashScreenComponent;A.VideoSplashScreenComponent=C;var T=S.CubeSplashScreenComponent;A.CubeSplashScreenComponent=T}),Mt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers",[y(class extends f.Controller{},"GenericController")])})()}),kt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.grid",[y(class extends f.Controller{constructor(d){super(d),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 d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{
|
|
684
|
+
display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,l?.append(S),d.shadowed?l?.host.classList.add(T):l.classList.add(T)}}done(){this.cssGrid(),f.logger.debug("GridComponent built")}},"GridController"),y(class extends f.Controller{constructor(d){super(d),this._componentRoot=d.component.shadowed?d.component.shadowRoot:d.component.body,this.rows=d.component.body.getAttribute("rows"),this.rows=d.rows!==null?d.rows:d.component.rows,this.cols=d.component.body.getAttribute("cols"),this.cols=d.cols!==null?d.cols:d.component.cols,f.logger.debug("DataGridController INIT")}getPageIndex(d,l,S){return d=d>0?d-1:0,[S*d/l,S*d/l+S/l]}addSubcomponents(){this.component.subcomponents=[],typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=""),this.cssGrid(),f.logger.debug((0,f._DataStringify)(this.component.data));try{let d=this.component.body.getAttribute("subcomponentClass");if(d!=null){let l,S,x,C=[...this.component.data],T=this.component.body.getAttribute("paginate-in"),M;T=T!==null?T:"client",T==="client"?(M=this.component.body.getAttribute("page-number"),M=isNaN(M)||M===null?-1:M,M!==-1?(x=this.component.body.getAttribute("total-pages"),x=isNaN(x)?1:x,l=this.getPageIndex(M,x,C.length)[0],S=this.getPageIndex(M,x,C.length)[1]):(l=0,S=C.length,x=1),C=C.slice(l,S)):(l=0,S=C.length,x=1),C.map((P,F,oe)=>{try{let ce=(0,f._DOMCreateElement)("component");ce.setAttribute("name",(0,f.ClassFactory)(d).name),ce.setAttribute("shadowed",(0,f.ClassFactory)(d).shadowed),ce.setAttribute("cached",(0,f.ClassFactory)(d).cached),P=Object.assign(P,{__dataIndex:F,__dataLength:oe.length,__page:M,__totalPages:x,__limit:S,__offset:l});let V=(0,f.New)((0,f.ClassFactory)(d),{name:"item",data:P,templateURI:(0,f.ComponentURI)({COMPONENTS_BASE_PATH:f.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,f.ClassFactory)(d).name,TPLEXTENSION:f.CONFIG.get("tplextension",""),TPL_SOURCE:(0,f.ClassFactory)(d).tplsource}),body:ce,template:(0,f.ClassFactory)(d).template});V.done=this.component.done.bind(V);try{if(V){V.data.__dataIndex=F,Object.hasOwnProperty.call(this.component.data,"length")&&(V.data.__dataLength=this.component.data.length),f.logger.debug("adding subcomponent to body"),this._componentRoot?.append(V.body);try{this.component.subcomponents.push(V)}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}else f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}})}else f.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch{f.logger.debug("No data for component")}}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{
|
|
685
|
+
display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,d.shadowed?(d.body.append(S),l.host.classList.add(T)):(l?.append(S),l.classList.add(T))}}done(){let d=this.component;f.logger.debug("DataGridController DONE");let l=this.component.body.getAttribute("serviceClass");if(l!=null){let S,x,C=d.body.getAttribute("paginate-in");if(C=C!==null?C:"client",C==="server"){let T=d.body.getAttribute("page-number");T=isNaN(T)||T===null?-1:T;let M;if(T!==-1){let P=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,S=this.getPageIndex(T,M,P)[0],x=this.getPageIndex(T,M,P)[1],d.serviceData=typeof d.serviceData<"u"?d.serviceData:{},d.serviceData.params=typeof d.serviceData.params<"u"?d.serviceData.params:{},d.serviceData.params.offset=S,d.serviceData.params.limit=x}}(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(l),{data:d.serviceData}),!1).then(T=>{f.logger.debug("DONE SERVICE COMPONENT"),T.service.JSONresponse=JSON.parse(T.service.template),typeof T.service.JSONresponse.result<"u"?(f.logger.debug((0,f._DataStringify)(T.service.JSONresponse.result)),d.data=T.service.JSONresponse.result):d.data=T.service.JSONresponse,this.addSubcomponents()},T=>{f.logger.debug(T)}).catch(T=>{f.logger.debug("Something went wrong when calling the service from: "+l),f.logger.debug(T.message)})}}},"DataGridController")])})()}),w=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.list",[y(class extends f.Controller{constructor({component:d,dependencies:l=[],valueField:S=void 0,labelField:x=void 0}){super({component:d,dependencies:l,valueField:S,labelField:x}),this.component=d,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,f.logger.debug("ListController INIT")}getPageIndex(d,l,S){return d=d>0?d-1:0,[S*d/l,S*d/l+S/l]}addSubcomponents(){this.component.subcomponents=[];let d=this.component.body.getAttribute("layout"),l=f.CONFIG.get("listBasePath",f.CONFIG.get("remoteSDKPath","")),S="";this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),d==="horizontal"?S=`@import url("${l}css/components/horizontal-list.css");`:S=`@import url("${l}css/components/list.css");`,typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=`<style>${S}</style><ul></ul>`),f.logger.debug((0,f._DataStringify)(this.component.data));try{let x=this.component.body.getAttribute("subcomponentClass");if(x!=null){let C,T,M,P=[...this.component.data],F=this.component.body.getAttribute("paginate-in");F=F!==null?F:"client";let oe;F==="client"?(oe=this.component.body.getAttribute("page-number"),oe=isNaN(oe)||oe===null?-1:oe,oe!==-1?(M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,C=this.getPageIndex(oe,M,P.length)[0],T=this.getPageIndex(oe,M,P.length)[1]):(C=0,T=P.length,M=1),P=P.slice(C,T)):(C=0,T=P.length,M=1),P.map((ce,V)=>{try{let ue=(0,f._DOMCreateElement)("li");ce.label=ce[this.labelField],ce.value=ce[this.valueField];let R=(0,f.New)((0,f.ClassFactory)(x),{name:"list-item",data:{label:ce[this.labelField],value:ce[this.valueField],__dataIndex:V,__page:oe,__totalPages:M,__limit:T,__offset:C},templateURI:(0,f.ComponentURI)({COMPONENTS_BASE_PATH:f.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,f.ClassFactory)(x).name,TPLEXTENSION:f.CONFIG.get("tplextension",""),TPL_SOURCE:(0,f.ClassFactory)(x).tplsource}),body:ue,template:(0,f.ClassFactory)(x).template});R.done=this.component.done.bind(R);try{if(R){R.data.__dataIndex=V,Object.hasOwnProperty.call(this.component.data,"length")&&(R.data.__dataLength=this.component.data.length),f.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(Oe=>Oe.append(R));try{this.component.subcomponents.push(R)}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}else f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}})}else f.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch{f.logger.debug("No data for component")}}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{
|
|
686
|
+
display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,l.append(S),l.classList.add(T)}}done(){this.cssGrid();let d=this.component;f.logger.debug("ListController DONE");let l=this.component.body.getAttribute("serviceClass");if(l!=null){let S,x,C=d.body.getAttribute("paginate-in");if(C=C!==null?C:"client",C==="server"){let T=d.body.getAttribute("page-number");T=isNaN(T)||T===null?-1:T;let M;if(T!==-1){let P=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,S=this.getPageIndex(T,M,P)[0],x=this.getPageIndex(T,M,P)[1],d.serviceData=typeof d.serviceData<"u"?d.serviceData:{},d.serviceData.params=typeof d.serviceData.params<"u"?d.serviceData.params:{},d.serviceData.params.offset=S,d.serviceData.params.limit=x}}(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(l),{data:d.serviceData}),!1).then(T=>{f.logger.debug("DONE SERVICE COMPONENT"),T.service.JSONresponse=JSON.parse(T.service.template),typeof T.service.JSONresponse.result<"u"?(f.logger.debug((0,f._DataStringify)(T.service.JSONresponse.result)),d.data=T.service.JSONresponse.result):d.data=T.service.JSONresponse,this.addSubcomponents()},T=>{f.logger.debug(T)}).catch(T=>{f.logger.debug("Something went wrong when calling the service from: "+l),f.logger.debug(T.message)})}}},"ListController")])})()}),ct=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var d=_e();(function(l){"use strict";(0,d.Package)("org.qcobjects.controllers.slider",[y(class extends d.Controller{constructor({component:S,dependencies:x=[],duration:C=7100,slideIndex:T=0,interval:M=null,sliderHandlerName:P=null}){super({component:S,dependencies:x,duration:C,slideIndex:T,interval:M,sliderHandlerName:P}),this.slideIndex=0,this.duration=7100,this.interval=null,this.sliderHandlerName="",this.component=S,this._componentRoot=S.shadowed?S.shadowRoot:S.body,this.sliderHandlerName="slider_"+this.component.__instanceID.toString(),l.set(this.sliderHandlerName,this)}stop(){this.interval!=null&&clearInterval(this.interval)}plusSlidesAndStop(S){this.stop(),this.plusSlides(S)}plusSlides(S){this.showSlides(this.slideIndex+=S)}currentSlide(S){this.stop(),this.showSlides(this.slideIndex=S)}automate(){this.interval=setInterval(()=>{this.plusSlides(1)},this.duration)}showSlides(S){let x=this._componentRoot?.subelements(".qcoSlides"),C=this._componentRoot?.subelements(".qcoSlider__dots--dot");S>x.length-1&&(this.slideIndex=0),S<0&&(this.slideIndex=0),x.filter((T,M)=>M!==this.slideIndex).map(T=>(0,d.New)((0,d.ClassFactory)("Fade"),{}).apply(T,1,0)),C.filter((T,M)=>M!==this.slideIndex).map(T=>T.classList.remove("active"));try{C[this.slideIndex].classList.add("active")}catch(T){d.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${T.message}`)}setTimeout(()=>{x.filter((T,M)=>M!==this.slideIndex).map(T=>(T.style.display="none",T.style.display));try{x[this.slideIndex].style.display="block",(0,d.New)((0,d.ClassFactory)("Fade"),{}).apply(x[this.slideIndex],0,1)}catch(T){d.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${T.message}`)}},700)}fillDots(){(this._componentRoot?.subelements(".qcoSlides")).map((S,x)=>{let C=document.createElement("span"),T=`<span class="qcoSlider__dots--dot" onclick="global.get('${this.sliderHandlerName}').currentSlide(${x})"></span>`;return C.innerHTML=T,this._componentRoot?.subelements(".qcoSlider__dots")[0].append(C)})}done(){(this._componentRoot?.subelements(".qcoSlides")).filter((S,x)=>x!==this.slideIndex).map(S=>(S.style.display="none",S.style.display)),setTimeout(()=>{this.fillDots(),this.slideIndex=0,this.showSlides(this.slideIndex),this.automate()},3e3)}},"SliderController")])})(typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Rt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=nt();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.form",[y(class extends f.Controller{getDefault(){return function(l,S,x){let C={name:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$",email:"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$"},T=x.getAttribute("pattern")||C[l];return new RegExp(T).test(S)}}},"FormValidations"),y(class extends f.Controller{hasValidation(l){let S=l.getAttribute("data-field"),x=!1;return typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,S)&&(x=!0),x}isInvalid(l){let S=!1,x=l.getAttribute("data-field"),C=this.component.data[x],T=y((M,P,F)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,M)&&this.validations[M].call(null,M,P,F),"_execValidation");return typeof this.validations<"u"&&!T(x,C,l)&&(S=!0),S}isValid(l){return!this.isInvalid(l)}save(){this.serviceClass!==""?(location.href=this.formSettings.loadingRouting,(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(l=>{console.log("DONE SERVICE COMPONENT");try{console.log(l.service.JSONresponse)}catch{}location.href=this.formSettings.nextRouting},l=>{f.logger.debug(l),location.href=this.formSettings.backRouting})):f.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){f.logger.debug("Saving data...");let l=this.component.shadowed?(this.component?.shadowRoot).host:this.component.body;if(this.component.executeBindings(),this.formValidatorModal!=null){let S=l.subelements("*[data-field]").filter(M=>this.hasValidation(M)),x=y(function(M,P){return y((F,oe)=>oe.getAttribute("aria-labelledby")!==null?(oe.getAttribute("aria-labelledby")||"").split(" ").map(ce=>F.subelements(`#${ce}`).map(V=>V.innerHTML)).join(" "):null,"_arialabelledby")(M,P)||P.getAttribute("aria-label")||P.getAttribute("placeholder")||P.getAttribute("name")||P.getAttribute("data-field")},"_labelledby"),C=y(function(M){return M.getAttribute("title")||M.getAttribute("aria-title")||""},"_ariatitle"),T=S.filter(M=>this.isInvalid(M));if(T.length>0){let M=`
|
|
687
|
+
<details>
|
|
688
|
+
<summary>Please verify the following incorrect fields:</summary>
|
|
689
|
+
<ul>
|
|
690
|
+
<div>
|
|
691
|
+
${T.map(P=>"<li><div>"+x(l,P)+"</div><div>"+C(P)+"</div></li>").join("")}
|
|
692
|
+
</div>
|
|
693
|
+
</ul>
|
|
694
|
+
</details>
|
|
695
|
+
`;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=M,this.formValidatorModal.modal()}else this.save()}else f.logger.debug("Unable to find the modal validator..."),f.logger.debug("Saving data..."),this.save()}constructor(l){super(l),this.validations=[],this.serviceClass="",this.formSettings={backRouting:"#",loadingRouting:"#loading",nextRouting:"#signupsuccessful"},this.component=l.component,this.component=this.component.Cast(d.FormField)}done(){f.logger.debugEnabled=!0;try{this.component.createBindingEvents();let l=(0,f._DOMCreateElement)("div");l.className="modal_body",this.formValidatorModal=(0,f.New)(d.ModalComponent,{body:l,subcomponents:[],data:{content:'<div class="validationMessage"></div>'}}),(0,f.Tag)(".modal_body").map(S=>document.body.removeChild(S)),document.body.append(this.formValidatorModal)}catch{f.logger.debug("Unable to create the modal")}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},"FormController")])})()}),lt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.swagger",[y(class extends f.Controller{startSwaggerUI(){if(typeof SwaggerUIBundle<"u"){let d=SwaggerUIBundle({url:f.CONFIG.get("swagger-ui-url","https://petstore.swagger.io/v2/swagger.json"),dom_id:"#"+f.CONFIG.get("swagger-ui-dom_id","swagger-ui"),deepLinking:!0,presets:[SwaggerUIBundle.presets.apis,SwaggerUIStandalonePreset],plugins:[SwaggerUIBundle.plugins.DownloadUrl],layout:"StandaloneLayout"});window.ui=d}}done(){this.component.body.innerHTML='<div id="'+f.CONFIG.get("swagger-ui-dom_id","swagger-ui")+'"></div>';let d=f.CONFIG.get("swagger-ui-package-path","node_modules/swagger-ui-dist/");this.dependencies?.push((0,f.New)(f.SourceJS,{url:d+"swagger-ui-standalone-preset.js",external:f.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,f.New)(f.SourceCSS,{url:d+"swagger-ui.css",external:f.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,f.New)(f.SourceJS,{url:d+"swagger-ui-bundle.js",external:f.CONFIG.get("swagger-ui-external",!1),done:()=>{this.startSwaggerUI()}}))}},"SwaggerUIController")])})()}),Be=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.modal.controllers",[y(class extends f.Controller{done(){let d=this.component;d.body.innerHTML=d.body.innerHTML.replace("/{{content}}/g",d.submodal.template)}},"ModalController")])})()}),wt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.views",[y(class extends f.View{},"GridView")])})()}),St=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){(0,f.Package)("org.qcobjects.tools.canvas",[y(class extends f.InheritClass{drawImageFilled(d,l,S=1,x=0,C=0){let T=Math.max(l.width/d.width,l.height/d.height);T=T*S;let M=l.width/2-d.width/2*T,P=l.height/2-d.height/2*T;l.getContext("2d")?.drawImage(d,x+M,C+P,d.width*T,d.height*T)}getImageResized(d,l,S,x,C=1,T=0,M=0){let P=document.createElement("canvas");return P.width=l,P.height=S,P.style.width=l.toString(),P.style.height=S.toString(),this.drawImageFilled(d,P,C,T,M),x.src=P.toDataURL("image/png"),P}},"CanvasTool")])})()}),Lt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=tt();(function(){(0,f.Package)("org.qcobjects.tools.layouts",[y(class extends f.InheritClass{constructor({component:l=null,dependencies:S=[]}){super({component:l,dependencies:S}),this.dependencies=[]}load(){this.dependencies.push((0,f.New)(f.SourceCSS,{external:!f.CONFIG.get("useLocalSDK",!1),url:f.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":f.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,f.Tag)("nav").map(l=>{l.style.border="20px solid #3333"}),(0,f.Tag)("nav").map(l=>{l.style.backgroundColor="#129999"}),(0,f.Tag)("component>footer").map(l=>{l.style.background="#876"}),(0,f.Tag)("component>div").map(l=>{l.style.border="3px dashed #fff"}),(0,f.Tag)("component>section").map(l=>{l.style.border="3px solid #000"}),(0,f.Tag)("component>section").map(l=>{l.style.backgroundColor="#fffaaa"}),(0,f.Tag)("component>article").map(l=>{l.style.border="3px dotted #000"}),(0,f.Tag)("component>header").map(l=>{l.style.background="#789"}),(0,f.Tag)("component>footer").map(l=>{l.style.background="#876"}),(0,f.Tag)("component>article:nth-child(1)").map(l=>{l.style.border="1px solid #444"}),(0,f.Tag)("component>article:nth-child(1)").map(l=>{l.style.backgroundColor="#555aaa"}),(0,f.Tag)("component>article:nth-child(2)").map(l=>{l.style.backgroundColor="#aaa333"}),(0,f.Tag)("component>article:nth-child(3)").map(l=>{l.style.backgroundColor="#54da82"}),(0,f.Tag)("*").map(l=>{l.style.color="#fff"}),(0,f.Tag)("component>article").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("component>footer").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("component>header").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("nav").map(l=>{l.style.display="block",l.style.width=l.offsetParent?.scrollWidth.toString()||l.clientWidth.toString(),d.MoveXInFromLeft.apply(l)}),(0,f.Tag)("component>article").map(l=>{l.style.display="block",l.style.height=l.offsetParent?.scrollHeight.toString()||l.clientHeight.toString(),d.MoveYInFromBottom.apply(l)}),(0,f.Tag)("component>article:nth-child(2)").map(l=>{l.style.display="block",l.style.width=l.offsetParent?.scrollWidth.toString()||l.clientWidth.toString(),d.MoveXInFromRight.apply(l)})},300)}},"BasicLayout")])})()}),ut=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.SessionUserToken=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(x){"use strict";class C extends d.InheritClass{constructor(M){super(M);let P=this;this.__cache__=new d.ComplexStorageCache({index:P.__instanceID.toString(),load(){let F;return typeof navigator<"u"&&typeof origin<"u"?F=d._Crypt.encrypt(`${navigator.userAgent}|${M.username}|${(+new Date).toString()}`,origin):F=d._Crypt.encrypt(`${M.username}|${(+new Date).toString()}`,d.CONFIG.get("domain","localhost")),C.user={priority:P.__instanceID.toString(),token:F},C.user},alternate(F){C.user=F?.cache.getCached(P.__instanceID.toString())}})}static generateIndex(M){return typeof Buffer<"u"?Buffer.from(M,"ascii").toString("base64"):btoa(M)}getGlobalUser(...M){let P=[M].join("|"),F="userToken_"+C.generateIndex(P);return(typeof x.get(F)>"u"||x.get(F)===null)&&x.set(F,(0,d.New)(C,{username:P})),C.user=x.get(F).user,x.get(F).user}getGlobalUserToken(...M){return this.getGlobalUser(M).token}getGlobalUserId(...M){return this.getGlobalUser(M).id}getGlobalUserPriority(...M){return this.getGlobalUser(M).priority}getLoginCredentialsToken(M,P){return d._Crypt.encrypt(`${M}${P}`,this.getGlobalUserToken(M))}closeGlobalSession(...M){this.getGlobalUser(M);let P=[M].join("|"),F="userToken_"+C.generateIndex(P);typeof x.get(F)<"u"&&(x.get(F).__cache__.clear(),x.set(F,null),C.user={})}}O(C,"r"),y(C,"SessionUserToken"),C.user={},(0,d.Package)("org.qcobjects.cloud.auth.session.usertoken",[C])})(l);var S=l.SessionUserToken;A.SessionUserToken=S}),$t=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=ut();(function(){"use strict";(0,f.Package)("org.qcobjects.cloud.auth.session.data",[y(class extends f.InheritClass{constructor(){super(...arguments),this.__session_container__=null}setSessionContainer(){this.__session_container__=[...arguments]}getSessionContainer(){if(typeof this.__session_container__>"u"||this.__session_container__===null)throw new Error("You need to set a session container first: sessionData.setSessionContainer(...arguments)");return this.__session_container__}getSessionData(...l){let S=sessionStorage.getItem(`${this.index(l)}`),x;return S!==null&&(x=JSON.parse(S)),(typeof x>"u"||x===null)&&(x={}),x}index(...l){if(typeof d.SessionUserToken>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(d.SessionUserToken.getGlobalUserToken(l))}`}save(...l){let S=(0,f._DataStringify)(this.sessionData);sessionStorage.setItem(`${this.index(l)}`,S)}get(l,S){let x=this.getSessionData(this.getSessionContainer());return typeof x[l]<"u"?x[l]:S}set(l,S){let x=this.getSessionContainer(),C=this.getSessionData(x);this.sessionData=C,this.sessionData[l]=S,this.save(x)}},"SessionData")])})()}),At=L((A,f)=>{Object.defineProperty(A,"__esModule",{value:!0});var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};y(O(function S(x){"use strict";if(typeof Object.defineProperty<"u"&&typeof x<"u")try{Object.defineProperty(x,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:S})}catch{typeof x.__qcobjects_sdk__<"u"&&(x.__qcobjects_sdk__.__loaded__=!0)}if(typeof x.__qcobjects_sdk__.__loaded__>"u"){if(x.__qcobjects_sdk__.__loaded__=!0,typeof x>"u")throw Error("Top context empty: It should either global, module or window");let C=d.GlobalSettings.__start__.bind(x),T=[];T=[new Promise(M=>{He(),Ee(),nt(),Ve(),Nt(),it(),It(),gt(),Mt(),kt(),w(),ct(),Rt(),lt(),tt(),Be(),wt(),St(),Lt(),ut(),$t(),M()})],x._sdk_=Promise.all(T).then(()=>{d.CONFIG.set("useSDK",!0),C()})}},"w"),"__qcobjects_sdk__")(l),A.default=l});return At()})()});var Vt=Ht((zt,Xt)=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});var Yt=Bt();Xt.exports=Yt});var Zt=Ht((to,vt)=>{O(function Me(j){"use strict";if(typeof Object.defineProperty<"u"&&typeof j<"u")try{Object.defineProperty(j,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:Me})}catch{typeof j.__qcobjects__<"u"&&(j.__qcobjects__.loaded=!0)}if(typeof j.__qcobjects__.loaded>"u"){let me=function(o){L?S.push(o.bind(window)):typeof y<"u"&&S.push(o.bind(y))};O(me,"Ready"),j.__qcobjects__.loaded=!0;var y=j;j.global=y;var _t=typeof window<"u"&&"Deno"in window,L=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!_t,U=typeof vt<"u",jt=O(function(){},"deno_require"),Ke=O(function(){return _t?jt(...arguments):at(...arguments)},"_require_"),ve=O(function(o){var r=typeof o.prototype<"u"?o.prototype.toString:function(){return""};typeof o.prototype<"u"&&(o.prototype.toString=function(){var 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"],a;return t.includes(this.name)?a=this.name+"{ [QCObjects native code] }":a=r.call(this),a})},"_protected_code_");ve(Function);var _e=O(function(o){var r=[];for(var t in o)(typeof o[t]).toLowerCase()==="function"&&r.push(o[t]);return r},"_methods_");String.prototype.__mAll__=function(o){var r=[];return this.replace(o,function(){var t=Array.prototype.slice.call(arguments,0,-2);t.input=arguments[arguments.length-1],t.index=arguments[arguments.length-2],r.push(t)}),r},typeof String.prototype.matchAll>"u"&&(String.prototype.matchAll=String.prototype.__mAll__);var He=O(function(o){var r;return L?r=document.createElement(o):r={},r},"_DOMCreateElement");if(!L){let o=Ke("fs")}var Ee=O(function(o){var r=O(function(){var t=new WeakSet,a=0;return function(u,h){if(typeof h=="object"&&h!==null){if(t.has(h))return a+=1,a<=3?A(h):null;t.add(h)}return h}},"getCircularReplacer");return JSON.stringify(o,r())},"_DataStringify");if(L){var tt=O(function(r){return[...this.querySelectorAll(r)]},"subelements");Element.prototype.subelements=tt,HTMLDocument.prototype.subelements=tt,HTMLElement.prototype.subelements=tt,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=tt)}if(L)try{j=typeof window.top<"u"?window.top:window,j._allowed_=!0}catch{try{j=document,j._allowed_=!0}catch{try{j=y,j._allowed_=!0}catch{j={},j._allowed_=!0}}}else typeof y<"u"&&(j=y);var nt,Ve,Nt="quick-component:not([loaded]),component:not([loaded])";if(Ve=function(){var o="";if(L){var r=j.document.baseURI.split("?")[0].split("/");r.pop(),o=r.join("/")+"/"}else{var t;try{t=Ke("process")}catch{}typeof t<"u"?o=`${t.cwd()}/`:o=""}return o}(),L){"Promise"in j||(j.Promise=function(o){var r={then(){},catch(){},_then(t){this.then.call(r,t)},_catch(t){this.catch.call(r,t)}};return o.call(r,r._then,r._catch),r}),typeof j.console>"u"&&(j.console=function(){},j.console.prototype.log=function(o){}),nt=function(){return typeof document<"u"&&document.domain!==""?document.domain:"localhost"}();var it=function(){var o=j[(![]+[])[+!+[]+ +!+[]]+(typeof![])[+!+[]]+(typeof[])[(+!+[]+ +!+[])*(+!+[]+ +!+[])]+(![]+[])[+!+[]]+(!![]+[])[+[]]+([]+[]+[][[]])[+[+!+[]+[+[]]]/(+!+[]+ +!+[])]+(typeof![])[+!+[]]+([]+[]+[][[]])[+!+[]]]["h"+(typeof![])[+!+[]]+(![]+[])[+!+[]+(+!+[]+ +!+[])]+(!![]+[])[+[]]].toLowerCase();return o}(),It=function(){return typeof cordova<"u"}()}else{var it="secret";nt="localhost"}j._asyncLoad=[];var gt=O(function(o,r){var t={func:o,args:r,dispatch(){this.func.apply(null,this.args)}};return j._asyncLoad.push(t),t},"asyncLoad");if(L){var Mt=O(function(){document.readyState==="complete"&&j._asyncLoad.map(function(o){o.dispatch.call(o)})},"_fireAsyncLoad");document.onreadystatechange=Mt}else typeof j.global<"u"&&(j.global._fireAsyncLoad=function(){j._asyncLoad.map(function(o){o.dispatch.call(o)})});j.asyncLoad=gt;var kt=O(function(){return{debugEnabled:!0,infoEnabled:!0,warnEnabled:!0,debug(o){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${o}`)},info(o){var r;this.infoEnabled&&(L?r="\x1B[103m%s\x1B[0m":r="\x1B[33m%s\x1B[0m",console.info(r,`[INFO][${performance.now().toLocaleString()}] ${o}`))},warn(o){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${o}`)}}},"Logger"),w=new kt;w.debugEnabled=!1,w.infoEnabled=!0,j.logger=w;var ct={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(o){var r="",t,a,u,h,i,g,I,N=0;for(o=ct._utf8_encode(o);N<o.length;)t=o.charCodeAt(N++),a=o.charCodeAt(N++),u=o.charCodeAt(N++),h=t>>2,i=(t&3)<<4|a>>4,g=(a&15)<<2|u>>6,I=u&63,isNaN(a)?g=I=64:isNaN(u)&&(I=64),r=r+this._keyStr.charAt(h)+this._keyStr.charAt(i)+this._keyStr.charAt(g)+this._keyStr.charAt(I);return r},decode(o){var r="",t,a,u,h,i,g,I,N=0;for(o=o.replace(/[^A-Za-z0-9+/=]/g,"");N<o.length;)h=this._keyStr.indexOf(o.charAt(N++)),i=this._keyStr.indexOf(o.charAt(N++)),g=this._keyStr.indexOf(o.charAt(N++)),I=this._keyStr.indexOf(o.charAt(N++)),t=h<<2|i>>4,a=(i&15)<<4|g>>2,u=(g&3)<<6|I,r=r+String.fromCharCode(t),g!==64&&(r=r+String.fromCharCode(a)),I!==64&&(r=r+String.fromCharCode(u));return r=ct._utf8_decode(r),r},_utf8_encode(o){o=o.replace(/rn/g,"n");for(var r="",t=0;t<o.length;t++){var a=o.charCodeAt(t);a<128?r+=String.fromCharCode(a):a>127&&a<2048?(r+=String.fromCharCode(a>>6|192),r+=String.fromCharCode(a&63|128)):(r+=String.fromCharCode(a>>12|224),r+=String.fromCharCode(a>>6&63|128),r+=String.fromCharCode(a&63|128))}return r},_utf8_decode(o){for(var r="",t=0,a=0,u=0,h=0,i;t<o.length;)a=o.charCodeAt(t),a<128?(r+=String.fromCharCode(a),t++):a>191&&a<224?(h=o.charCodeAt(t+1),r+=String.fromCharCode((a&31)<<6|h&63),t+=2):(h=o.charCodeAt(t+1),i=o.charCodeAt(t+2),r+=String.fromCharCode((a&15)<<12|(h&63)<<6|i&63),t+=3);return r}},Rt=O(function(o,r){var t=O(function(a,u){var h=2e3,i=0,g=setInterval(function(){u.call()?(clearInterval(g),a.call(),w.debug("Ejecuting "+a.name+" after wait")):i<h?(i+=1,w.debug("WAIT UNTIL "+a.name+" is true, "+i.toString()+" cycles")):(w.debug("Max execution time for "+a.name+" expression until true"),clearInterval(g))},1)},"_waitUntil");setTimeout(function(){t(o,r)},1)},"waitUntil");if(typeof lt>"u")var lt={getItem(o){return Object.hasOwnProperty.call(this,o)?this[o]:null},setItem(o,r){this[o]=r},removeItem(o){delete this[o]}};var Be=O(function(o){var r,t,a;if(r=o.index,typeof r<"u"){t=o.load,a=o.alternate;var u=this.getID(r),h=lt.getItem(u);if(this.isEmpty(h)){var i=t.call(null,{cachedObjectID:u,cachedResponse:h,cache:this});this.save(r,i),w.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",u))}else{var g=a.call(null,{cachedObjectID:u,cachedResponse:h,cache:this});w.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",u))}}else throw new Error("ComplexStorageCache: index is undefined");return this},"ComplexStorageCache");if(Be.prototype.getItem=function(o){var r=lt.getItem(o);return this.isEmpty(r)?null:JSON.parse(r)},Be.prototype.setItem=function(o,r){lt.setItem(o,Ee(r))},Be.prototype.isEmpty=function(o){var r=!1;switch(!0){case typeof o>"u":case(typeof o=="string"&&o===""):case(typeof o=="string"&&o==="undefined"):case(typeof o=="number"&&o===0):case o===null:r=!0;break;default:r=!1}return r},Be.prototype.getID=function(o){var r;return typeof o<"u"&&(r="cachedObject_"+ct.encode(Ee(o).replace(/\{|\}|,/g,"_"))),r},Be.prototype.save=function(o,r){var t=this.getID(o);w.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",t)),this.setItem(t,r)},Be.prototype.getCached=function(o){var r=this.getID(o);return this.getItem(r)},Be.prototype.clear=function(){Object.keys(lt).filter(function(o){return o.startsWith("cachedObject_")}).map(function(o){lt.removeItem(o)})},L){var wt=!1;try{var St=Object.defineProperty({},"passive",{get(){return wt=!0,wt}});window.addEventListener("testPassive",null,St),window.removeEventListener("testPassive",null,St)}catch{}var Lt=O(function(){return wt?{passive:!0}:!1},"captureFalse")}L&&(Element.prototype.find=function(o){var r=[],t=document.subelements(o);return t.map(function(a,u){typeof t[u]<"u"&&t[u].parentNode.tagName===this.parentNode.tagName&&r.push(C(a,new Object))}),r});var ut,$t=function(){var o=Object.prototype.hasOwnProperty;return function(r){if(typeof r!="object")throw TypeError("Object prototype may only be an Object or null. The type is "+typeof r);var t=O(function(){},"QCObjects");t.prototype=r;var a=new t;if(arguments.length>1){var u=Object(arguments[1]);for(var h in u)o.call(u,h)&&(a[h]=u[h])}return a}}();typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:O(function(r,t){"use strict";if(r===null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(r),u=1;u<arguments.length;u++){var h=arguments[u];if(h!==null)for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(a[i]=h[i])}return a},"assign"),writable:!0,configurable:!0});var At=O(function(o){return!!(typeof o=="function"&&o.toString().startsWith("class"))},"__is_raw_class__"),A=O(function(o){var r;switch(!0){case typeof o=="string":r=o;break;case typeof o=="number":r=o;break;case typeof o=="object":r=Object.assign({},o);break;case typeof o=="function":r=o.bind({});break;case At(o):r=O(class extends o{},"_value_");break;default:break}return r},"_LegacyCopy"),f={},d={},l=[],S=[],x=O(function(o){var r="";return typeof o=="function"&&Object.hasOwnProperty.call(o,"name")&&o.name!==""?r=o.name:typeof o<"u"&&typeof o.constructor=="function"&&o.constructor.name!==""?r=o.constructor.name:typeof o<"u"&&typeof o.constructor=="object"&&(r=o.constructor.toString().replace(/\[(.*?)\]/g,"$1").split(" ").slice(1).join("")),r},"ObjectName"),C=O(function(o,r){for(var t in o)if(typeof o[t]<"u")try{r[t]=o[t]}catch{}return r},"_Cast"),T=O(function(o,r){for(var t in o)if(typeof o[t]<"u"&&typeof o[t]!="function")try{r[t]=o[t]}catch{}else if(typeof o[t]=="function")try{r[t]=o[t].bind(r)}catch(a){w.warn(a)}return r},"_CastProps"),M=O(function(){return["__proto__","prototype","Object","Map","defineProperty","indexOf","toString","__instanceID"].indexOf(arguments[0])!==-1},"__is__forbidden_name__"),P=O(function(r){var t="";switch(!0){case(At(r)&&!!r.name):t=r.name;break;case(typeof r=="object"&&!!r.constructor&&!!r.constructor.name&&r.constructor.name!==""):t=r.constructor.name;break;case(!!r&&!!r.__classType&&r.__classType!==""):t=r.__classType;break;case(!!r&&!!r.__definition&&!!r.__definition.__classType&&r.__definition.__classType!==""):t=r.__definition.__classType;break;case(typeof r=="function"&&!!r.name):t=r.name;break;default:t=x(r);break}return t},"__getType__"),F=O(function(r,t){return!!(typeof r<"u"&&r!==null&&((B(r)||fe(r))&&r.hierarchy().includes(t)||P(r)===t||x(r)===t||typeof r===t))},"is_a"),oe=O(function(o){if(typeof o<"u")if(L)try{j[o.name]=o,window[o.name]=o}catch{}else typeof y<"u"&&(Object.hasOwnProperty.call(y,o.name)||(y[o.name]=o))},"__make_global__"),ce=O(function(o,r){var t=o.name||P(o);return typeof o.__definition>"u"&&(o.__definition={}),o.__definition.__classType=t,typeof r<"u"&&(o.__definition.__namespace=r),f[t]=o,j[t]=f[t],j[t]},"__register_class__"),V=O(function(o,r){return ce(o,r)},"RegisterClass");oe(V);var ue=O(function(){var o={},r,t,a;switch(arguments.length){case 0:return class{};case 1:r=arguments[0],t=O(class{},"type"),a={};break;case 2:r=arguments[0],t=O(class{},"type"),a=arguments[1];break;case 3:r=arguments[0],t=arguments[1],a=arguments[2];break;default:break}if(typeof t!="function")throw new Error("Class type must be a function or class");if(M.call(this,r))throw new Error(`${r} is not an allowed word in the name of a class`);return typeof t.__definition<"u"&&(a.__definition=Object.assign(A(t.__definition),t)),o[t.name]=t,typeof a>"u"||a===null?a={}:a=A(a),typeof a.__instanceID<"u"&&delete a.__instanceID,f[r]=class extends o[t.name]{constructor(){var h;arguments.length>0?h={...arguments[0]}:h={};super(h);W(this,"__classType",r);W(this,"__definition",{...a});let i=this;if(ut=typeof ut>"u"||ut===null?0:ut+1,i.__instanceID||Object.defineProperty(i,"__instanceID",{value:ut,writable:!1}),typeof i.__definition<"u"&&Object.keys(i.__definition).filter(function(g){return isNaN(g)&&!["name","__instanceID","__classType","__definition"].includes(g)}).forEach(function(g){typeof i.__definition[g]=="function"?i[g]=i.__definition[g].bind(i):i[g]=i.__definition[g]}),_e(f[i.__classType]).map(function(g){i[g.name]=g.bind(i)}),_e(i.__definition).map(function(g){i[g.name]=g.bind(i)}),i.body)if(typeof i.__definition>"u"||!Object.hasOwnProperty.call(i.__definition,"body")||typeof i.__definition.body>"u")try{L?i.body=He(i.__definition.__classType):i.body={}}catch{i.body={}}else Object.hasOwnProperty.call(i.__definition,"body")&&(i.body=i.__definition.body);try{if(typeof i.__new__=="function"?i.__new__.call(i,h):typeof super.__new__=="function"&&(i.__new__=super.__new__.bind(i),i.__new__.call(i,h)),typeof i=="object"&&Object.hasOwnProperty.call(i,"_new_")&&typeof i._new_.isCalled>"u")try{i._new_.call(i,h),i._new_.isCalled=!0}catch(g){w.warn(`${i.__classType}._new_() failed with error: ${g}`)}}catch(g){w.warn(g)}}static hierarchy(h){var i=O(function(N){return Object.hasOwnProperty.call(N,"__classType")?N.__classType:P.call(h,N)},"__classType"),g=O(N=>typeof N<"u"&&typeof N.__proto__<"u"&&N.__proto__!==null?(i(N)!==""?[i(N)]:[]).concat(g(N.__proto__)):[],"__hierarchy__proto__");(typeof h>"u"||h===null)&&(h=this);var I=[];return I.push(i(h)),I=I.concat(g(h.__proto__)),I}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(h){T(h,this)}_new_(){}getClass(){return Object.getPrototypeOf(this.constructor)}css(h){return typeof this.body<"u"&&this.body.style!=="undefined"&&(w.debug("body style"),this.body.style=C(h,this.body.style)),this.body.style}hierarchy(){var h=this;return this.getClass().hierarchy(h)}append(i){w.debug("append: start"),F(i,"Component")&&(w.debug("append: child is a Component"),w.debug(`appending the body of ${i.name}`));var i=arguments.length>0?arguments[0]:this.body;typeof this.body<"u"&&(w.debug("append element"),arguments.lenght>0?(w.debug("append to element"),this.body.append(i),typeof this.childs>"u"&&(this.childs=[]),this.childs.push(i)):L&&(w.debug("append to body"),document.body.append(i)))}attachIn(h){if(L)for(var i=document.subelements(h),g=0,I=i.length;g<I;g++)i[g].append(this);else throw new Error("attachIn not yet implemented for non browser platforms")}},f[r]=T(a,f[r]),f[r].__definition=a,f[r].__definition.__classType=r,f[r].__definition.__new__=O(function(h){T(h,this)},"__new__"),j[r]=f[r],j[r]},"Class");ue.prototype.toString=function(){return"Class(name, type, definition) { [QCObjects native code] }"};var R=O(function(o){var r;if(o!==null&&o.indexOf(".")>-1){var t=o.split(".").slice(0,o.split(".").length-1).join("."),a=o.split(".").slice(-1).join(""),u=z(t),h=typeof u<"u"?u.filter(i=>B(i)&&(i.__definition.__classType===a||typeof i=="function"&&!!i.name)).reverse():[];if(h.length>0)r=h[0];else throw Error(`Class ${o} not found.`)}else o!==null&&Object.hasOwnProperty.call(f,o)&&(r=f[o]);return r},"ClassFactory");L&&(Element.prototype.append=O(function(r){fe(r)||typeof r.body<"u"?this.appendChild(r.body):this.appendChild(r)},"QC_Append"),Element.prototype.render=O(function(r){var t=this,a=O(function(u,h){if(typeof document.implementation.createHTMLDocument<"u"){var i=document.implementation.createHTMLDocument("");i.innerHTML=h,i.body.subelements("*").map(function(g){return u.append(g)})}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=r}catch{a(t,r)}else a(t,r)},"QC_Render"));var Oe=O(function(o,r,t){return R(o)[r]},"_super_");Oe.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"};var de=O(function(o,r){return r=arguments.length>1?r:{},typeof o>"u"?new Object:new o(r)},"New");de.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"};var K=O(function(o){return oe(o)},"Export");if(K.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"},!L){var xe=O(function(o){let r=Ke("fs");var t=null;try{var a=[`${j.CONFIG.get("projectPath")}${j.CONFIG.get("relativeImportPath")}`,`${j.CONFIG.get("basePath")}${j.CONFIG.get("relativeImportPath")}`,`${j.CONFIG.get("projectPath")}`,`${j.CONFIG.get("basePath")}`,`${j.CONFIG.get("relativeImportPath")}`,`${process.cwd()}${j.CONFIG.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+o,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(vt.paths);a=a.filter(u=>r.existsSync(u+"/"+o)),a.length>0&&(t=a[0],w.info(o+" is Installed."))}catch(u){console.log(u)}return t},"findPackageNodePath");K(xe)}ue("_Crypt",Object,{last_string:"",last_key:"",construct:!1,_new_(o){var r=o.string,t=o.hasOwnProperty.call(o,"key")?o.key:null;this.__new__(o),t=t===null?this.__instanceID:t,this.last_key=t,this.last_string=r,this.construct=!0},_encrypt(){for(var o=this.string,r=this.key,t="",a,u,h=0;h<o.length;h++)a=o.substr(h,1),u=r.substr(h%r.length-1,1),a=String.fromCharCode(a.charCodeAt(0)+u.charCodeAt(0)),t+=a;return this.last_string=ct.encode(t),this.last_string},_decrypt(){var o=this.string,r=this.key,t="",a,u;o=ct.decode(o);for(var h=0;h<o.length;h++)a=o.substr(h,1),u=r.substr(h%r.length-1,1),a=String.fromCharCode(a.charCodeAt(0)-u.charCodeAt(0)),t+=a;return this.last_string=t,this.last_string},encrypt(o,r){var t=de(R("_Crypt"),{string:o,key:r!==""?r:"12345678ABC"});return t._encrypt()},decrypt(o,r){var t=de(R("_Crypt"),{string:o,key:r!==""?r:"12345678ABC"});return t._decrypt()}});var we=O(function(o){return R("_Crypt").encrypt(Ee(o),it)},"_CryptObject"),Fe=O(function(o){return o===""?{}:JSON.parse(R("_Crypt").decrypt(o,it))},"_DecryptObject"),$e=O(function(){var o=1e3,r=R("_Crypt").encrypt((Math.random()*o).toString().replace(".",""),new Date().getTime().toString()),t=R("_Crypt").encrypt((Math.random()*o).toString().replace(".",""),new Date(new Date().getTime()-1e3*1e3).getTime().toString()),a=t.list().map((u,h)=>r.list()[h]===u?null:u).filter(u=>u!==null).join("");return a},"shortCode"),v=$e;ue("InheritClass",class{},{});let G=class extends R("InheritClass"){constructor(){super(...arguments);W(this,"component",null);W(this,"__definition",{});W(this,"__classType","Processor");this.processors=G.processors,this.process=G.process.bind(this),this.processObject=G.processObject.bind(this),this.setProcessor=G.setProcessor.bind(this),this.execute=G.execute.bind(this)}static setProcessor(t){typeof t=="function"&&t.name!==""&&(this.processors[t.name]=t)}static execute(t,a,u){var h=typeof t<"u"&&t!==null?t.processorHandler:this;return h.processors[a].bind(h).apply(h,[t,...u.split(",")])}static process(t,a=null){var u=a!==null?a.processorHandler:de(G,{component:null});return typeof t=="string"&&Object.keys(u.processors).map(function(h){[...t.matchAll(new RegExp("\\$"+h+"\\((.*)\\).*","g"))].map(function(i){var g=`$${h}(${i[1]})`;t=t.replace(g,u.execute.bind(u).call(u,a,h,i[1]))})}),t}static processObject(t,a=null){var u=a===null?this:a.processorHandler;return typeof u>"u"&&(u=new G({component:a})),typeof t=="object"?Object.keys(t).map(function(h){typeof t[h]=="object"&&!t[h].hasOwnProperty.call(t[h],"call")?t[h]=u.processObject.bind(u)(t[h],a):typeof t[h]=="string"&&(t[h]=u.process.bind(u)(t[h],a))}):typeof t=="string"&&(t=u.process.bind(u)(t,a)),t}},X=G;O(X,"Processor"),W(X,"processors",{config(t,a){return j.CONFIG.get(a,"")},ENV(t,a){return typeof process<"u"?process.env[a]:""},global(t,a){return typeof y<"u"?y[a]:""}}),X.__definition={},X.__classType="Processor",V(X,"com.qcobjects"),oe(X);let Ze=class{static get instance(){if(this._instance===null){var r=new Ze;r._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:Ve},r._CONFIG_ENC=null,this._instance=r}return this._instance}static set instance(r){this._instance=r}},pe=Ze;O(pe,"ConfigSettings"),W(pe,"_instance",null),W(pe,"_CONFIG_ENC",null),f.ConfigSettings=pe,ue("CONFIG",Object,{get _CONFIG_ENC(){return R("ConfigSettings").instance._CONFIG_ENC},get _CONFIG(){return R("ConfigSettings").instance._CONFIG},set(o,r){w.debug(`CONFIG.set ${o}: ${r}`),o==="basePath"&&(Ve=r);var t;try{t=function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=R("_Crypt").encrypt(Ee({}),it));var u=a._CONFIG_ENC.valueOf(),h=a._CONFIG.valueOf();return T(h,Fe(u))}(R("ConfigSettings").instance)}catch(a){t={},console.error(a),w.debug("failed to encrypt config")}t[o]=r,R("ConfigSettings").instance._CONFIG_ENC=we(t),Object.hasOwnProperty.call(R("ConfigSettings").instance,"_CONFIG")&&Object.hasOwnProperty.call(R("ConfigSettings").instance._CONFIG,o)&&(R("ConfigSettings").instance._CONFIG[o]=r)},get(o,r){var t;try{var a=function(u){u._CONFIG_ENC===null&&(u._CONFIG_ENC=R("_Crypt").encrypt(Ee({}),it));var h=u._CONFIG_ENC.valueOf(),i=u._CONFIG.valueOf();return T(i,Fe(h))}(R("ConfigSettings").instance);typeof a[o]<"u"?t=a[o]:typeof r<"u"&&(t=r)}catch(u){console.error(u),w.debug("Something wrong when trying to get CONFIG values"),w.debug("No config value for: "+o),t=r}return X.processObject.call(X,t)}}),K(Rt),K(Oe),K(Be),K(R),K(He),K($e),K(P),K(F);var fe=O(function(o){return!!(typeof o=="object"&&Object.hasOwnProperty.call(o,"__classType")&&o.__instanceID&&Object.hasOwnProperty.call(o,"__definition")&&typeof o.__definition<"u")},"isQCObjects_Object"),B=O(function(o){return!!(typeof o=="function"&&!o.__instanceID&&o.__definition&&typeof o.__definition<"u"&&o.__definition.__classType)},"isQCObjects_Class"),z=O(function(o,r){return d.hasOwnProperty.call(d,o)&&typeof d[o]<"u"&&d[o].hasOwnProperty.call(d[o],"length")&&d[o].length>0&&typeof r<"u"&&r.hasOwnProperty.call(r,"length")&&r.length>0?(r.filter(function(t){return B(t)}).map(function(t){t.__definition.__namespace=o,t.__namespace=o}),d[o]=d[o].concat(r)):typeof r<"u"&&(typeof r=="object"&&r.hasOwnProperty.call(r,"length")?r.filter(function(t){return B(t)}).map(function(t){t.__definition.__namespace=o,t.__namespace=o}):B(r)&&(r.__definition.__namespace=o,r.__namespace=o),d[o]=r),Object.hasOwnProperty.call(d,o)&&d[o].map(function(t){ce(t,o)}),Object.hasOwnProperty.call(d,o)?d[o]:void 0},"Package");z.prototype.toString=function(){return"Package(namespace, classes) { [QCObjects native code] }"},z("com.qcobjects",[X]);var Ce=O(function(o){let t=z(o).filter(a=>B(a)).map(a=>({[a.__definition.__classType]:a})).reduce((a,u)=>Object.assign(a,u));return o.split(".").map(a=>({[a]:t})).reverse().reduce((a,u)=>(u[Object.keys(u)]=a,u))},"NamespaceRef"),qe=O(function(){var o,r=O(function(){},"ready"),t=!1;if(!(arguments.length<1)){arguments.length===1?o=arguments[0]:arguments.length===2?(o=arguments[0],r=arguments[1]):arguments.length>2&&(o=arguments[0],r=arguments[1],t=arguments[2],w.debug("[Import] Setting external="+t.toString()+" resource to import: "+o)),t?w.debug("[Import] Registering external resource to import: "+o):w.debug("[Import] Registering local resource to import: "+o);var a;return L?(a=new Promise(function(u,h){var i=O(function(){var N=!1,D=0;for(var H in d)D++;return D<l.length?N=!1:N=!0,N},"allPackagesImported"),g=O(function(N){l.push(r),i()&&l.map(function(D){S.push(D)}),L&&j.CONFIG.get("removePackageScriptAfterLoading")&&N.target.remove(),u.call(a,{_imported_:N.target,_package_name_:o})},"readyImported");if(!d.hasOwnProperty.call(d,o)){var I=He("script");I.type=j.CONFIG.get("sourceType","text/javascript"),I.async=!!j.CONFIG.get("asynchronousImportsLoad"),I.onreadystatechange=function(){I.readyState==="complete"&&g.call()},I.onload=g,I.onerror=function(N){h.call(a,{_imported_:I,_package_name_:o})},I.src=t?j.CONFIG.get("remoteImportsPath")+o+".js":Ve+j.CONFIG.get("relativeImportPath")+o+".js",document.getElementsByTagName("head")[0].appendChild(I)}}),a.catch(function(){w.debug("Import: Error loading a package ")})):a=new Promise(function(u,h){try{var i=xe(o),g="";if(i!==null)g=i+"/"+o;else{var I=xe(o+".js");I!==null?g=I+"/"+o+".js":g=Ve+j.CONFIG.get("relativeImportPath")+o}try{u.call(a,{_imported_:Ke(`${g}`),_package_name_:o})}catch(N){h.call(a,{_imported_:null,_package_name_:o,error:N})}}catch(N){h.call(a,{_imported_:null,_package_name_:o,error:N})}}).catch(function(u){w.debug("Something happened when importing "+o),console.warn(u)}),a.catch(function(u){w.warn(Ee(u))}),a}},"Import");qe.prototype.toString=function(){return"Import(packagename,ready,external) { [QCObjects native code] }"},L&&(Element.prototype.Cast=O(function(t){t.__definition.body=this;var t=de(t);return t},"QC_Object")),ue("TagElements",Array,{show(){this.map(function(o){return o.style.opacity=1})},hide(){this.map(function(o){return o.style.opacity=0})},effect(){var o=[...arguments].slice(1),r=arguments[0];(typeof r).toLowerCase()==="string"&&(r=R(r)),this.map(function(t){return r.apply.apply(r,[t].concat(o))})},findElements(o){var r=de(R("TagElements"));if(L)for(var t in this)typeof t=="number"&&typeof this[t]!="function"&&this[t].hasOwnProperty.call(this[t],"subelements")&&r.push(this[t].subelements(o));return r}});var dt=O(function(o,r){var t=de(R("TagElements"));if(L)for(var a=document.subelements(o),u=[],h=0;h<a.length;h++)typeof r<"u"&&a[h].hasOwnProperty.call(a[h],"innerHTML")&&(a[h].innerHTML=r),u.indexOf(h)<0&&(t.push(a[h]),u.push(h));return t},"Tag"),ht=me,ze=O(function(o){var r=O(function(){S.map(function(t,a){typeof t=="function"&&(t.call(),delete S[a])})},"_execReady");j.CONFIG.get("delayForReady")>0?L?setTimeout(r.bind(window),j.CONFIG.get("delayForReady")):typeof y<"u"&&setTimeout(r.bind(y),j.CONFIG.get("delayForReady")):r.call(j)},"_Ready");L?(window.onload=ze,It&&document.addEventListener("deviceready",ze,Lt)):y.onload=ze;class J extends R("InheritClass"){constructor({instance:r,name:t,fget:a,fset:u,value:h}){super({instance:r,name:t,fget:a,fset:u,value:h}),this._new_({instance:r,name:t,fget:a,fset:u,value:h})}_new_({instance:r,name:g,fget:a,fset:u,value:h}){var i=this,g=typeof g>"u"?x(i):g;Object.defineProperty(r,g,{set(I){let N=I;w.debug("value changed "+g);var D;typeof u<"u"&&typeof u=="function"?D=u(N):D=N,r["_"+g]=D},get(){let I=r["_"+g];w.debug("returning value "+g);var N=O(function(H){return typeof H=="object"&&Object.hasOwnProperty.call(H,"value")?H.value:H},"is_ddo"),D;return typeof a<"u"&&typeof a=="function"?D=a(N(I)):D=N(I),D}})}}O(J,"DDO"),K(J);class Q{constructor({component:r,template:t}){W(this,"template","");W(this,"__definition",{});this.component=r,this.template=t}assign(r){var 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");var a=t.component.processorHandler;a.component=t.component;var u=typeof t.template<"u"?t.template:"";typeof r=="object"?[...Object.keys(r)].map(function(h){var i=r[h];if(typeof i=="string"||typeof i=="number"||!isNaN(i))try{i=X.processObject.bind(a).call(a,i,t.component),u=u.replace(new RegExp(`{{${h}}}`,"g"),i)}catch(g){throw w.warn(`${t.component.name} could not parse processors.`),Error(`${t.component.name} could not parse processors. Reason: ${g.message}`)}}):w.debug(`${t.component.name}.data is not an object`);try{u=X.processObject.call(a,u,t.component)}catch(h){throw w.warn(`${t.component.name} could not parse processors.`),Error(`${t.component.name} could not parse processors. Reason: ${h.message}`)}return u}}O(Q,"DefaultTemplateHandler"),Q.__definition={},V(Q,"com.qcobjects");var bt=O(function(o,r){let t=o.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...r.matchAll(new RegExp(t,"g"))][0].groups}},"__routing_params__"),pt=O(function(o,r){return o.filter(function(t){var a=t.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(a,"g").test(r)}).reverse()},"__valid_routings__"),ot=O(function(o,r){return o.includes(r)},"__valid_routing_way__"),Pe=O(function(o,r){var t=o.getAttribute("shadowed")===null,a=o.getAttribute("template-source")===null,u=o.getAttribute("shadowed")==="true",h=o.getAttribute("cached")===null,i=o.getAttribute("cached")==="true",g=typeof j.CONFIG.get("tplextension")<"u"?j.CONFIG.get("tplextension"):"html";g=o.getAttribute("tplextension")!==null?o.getAttribute("tplextension"):g;var I=o.getAttribute("name"),N=o.getAttribute("componentClass")!==null?o.getAttribute("componentClass"):"Component";let D=j.CONFIG.get("preserveComponentBodyTag")?I!==null?"com.qcobjects.components."+I+".ComponentBody":"com.qcobjects.components.ComponentBody":N;I=I!==null?I:R(D)&&typeof R(D).name<"u"?R(D).name:"";var H=R(D),$=D!=="Component"&&typeof H<"u"&&typeof H.tplsource=="string"&&H.tplsource!=="",le=a&&$?H.tplsource:a?"default":o.getAttribute("template-source");w.debug(`template source for ${I} is ${le} `),w.debug(`type for ${I} is ${P(H)} `);var te;te=Qe({COMPONENTS_BASE_PATH:j.CONFIG.get("componentsBasePath"),COMPONENT_NAME:I,TPLEXTENSION:g,TPL_SOURCE:le}),j.CONFIG.get("preserveComponentBodyTag")&&z(I!==""?"com.qcobjects.components."+I:"com.qcobjects.components",[ue("ComponentBody",R("Component"),{name:I,tplsource:le,tplextension:g,reload:!0})]);var ee=O(function(){var ge=t?H&&H.shadowed||R("Component").shadowed:u,Se={__parent__:r,name:I,cached:h?R("Component").cached:i,shadowed:ge,tplextension:g,body:j.CONFIG.get("preserveComponentBodyTag")?He("componentBody"):o,templateURI:te,tplsource:le};(typeof I>"u"||I===""||I===null)&&delete Se.name,te===""&&delete Se.templateURI;var Ne=de(H,Se);return j.CONFIG.get("preserveComponentBodyTag")&&o.append(Ne),Ne},"__create_component_instance_"),be=ee.call(this);return be},"_buildComponentFromElement_"),Ie=O(function(o,r){var t=[];return L?t=o.map(function(a){return Pe(a,r)}):w.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),t},"_buildComponentsFromElements_");z("com.qcobjects",[O(class extends R("InheritClass"){constructor({__parent__:t,templateURI:a="",template:u,tplsource:h="default",tplextension:i,url:g="",name:I="",method:N="GET",data:D={},reload:H=!1,shadowed:$=!1,cached:le=!0,_body:te=He("div"),__promise__:ee=null,__shadowRoot:be,body:ge,shadowRoot:Se,splashScreenComponent:Ne,controller:We,view:st}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:t,templateURI:a,template:u,tplextension:i,tplsource:h,url:g,name:I,method:N,data:D,reload:H,shadowed:$,cached:le,_body:te,__promise__:ee,__shadowRoot:be,body:ge,shadowRoot:Se,splashScreenComponent:Ne,controller:We,view:st});W(this,"validRoutingWays",["pathname","hash","search"]);W(this,"basePath",Ve);W(this,"domain",nt);W(this,"templateHandler","DefaultTemplateHandler");W(this,"processorHandler",null);W(this,"routingWay",null);W(this,"routingNodes",[]);W(this,"routings",[]);W(this,"routingPath","");W(this,"routingPaths",[]);W(this,"_componentHelpers",[]);W(this,"subcomponents",[]);W(this,"splashScreenComponent");W(this,"controller");W(this,"view");W(this,"effect");W(this,"method","GET");W(this,"cached",!0);W(this,"__promise__",null);W(this,"__namespace");var ye=this;typeof ye.name>"u"&&w.warn("A name is not defined for "+P(ye)),ye.routingWay=j.CONFIG.get("routingWay"),ye.processorHandler=de(X,{component:ye}),ye.data=typeof ye.data>"u"||ye.data===null?{}:ye.data,ye.data=Object.assign(ye.data,ye.dataAttributes),ye.createServiceInstance().then(function(ke){typeof ye.__new__=="function"&&ye.__new__.call(ye,ye),ye._generateRoutingPaths(ye.body).then(function(){ye._reroute_().then(function(){return ye.rebuild().then(function(){w.info(`Component._new_ The component ${ye.name} was built successfully!`)}).catch(function(et){w.warn(`Component._new_ Something went wrong building the component ${ye.name}`),console.error(et)})})})})}set body(t){var a=this;a._body=t}get body(){var t=this;return t._body}set cacheIndex(t){w.debug("[cacheIndex] This property is readonly")}get cacheIndex(){var t=this,a=Ee(t.routingPath);return ct.encode(t.name+a)}set parsedAssignmentText(t){w.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){var t=this;if(t._parsedAssignmentText=t.parseTemplate(t.template),typeof t._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return t._parsedAssignmentText}set shadowRoot(t){var a=this;typeof a.__shadowRoot>"u"?a.__shadowRoot=t:w.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){var t=this;return t.__shadowRoot}set routingSelected(t){w.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){var t=this;return pt(t.routings,t.routingPath)}set routingParams(t){w.debug("[routingParams] This is a read-only property of the component")}get routingParams(){var t=this;return[{}].concat(t.routingSelected.map(function(a){return bt(a,t.routingPath)})).reduce(function(a,u,h){return Object.assign(a,u)})}createServiceInstance(){var t=this,a=t.body,u=this.data,h,i=t.getClass().__definition,g=L&&a.getAttribute("serviceClass")!==null?a.getAttribute("serviceClass"):null;return new Promise(function(I,N){var D=!!(Object.hasOwnProperty.call(a,"enableServiceClass")&&a.enableServiceClass||!Object.hasOwnProperty.call(a,"enableServiceClass")),H=!!(L&&a.getAttribute("response-to")!==null&&a.getAttribute("response-to")==="data"),$=!!(L&&a.getAttribute("response-to")!==null&&a.getAttribute("response-to")==="template");if(D&&g!==null&&(h=R(g)),!H&&i&&Object.hasOwnProperty.call(i,"responseTo")?H=i.responseTo==="data":!H&&Object.hasOwnProperty.call(R("Component"),"responseTo")&&(H=R("Component").responseTo==="data"),!$&&i&&Object.hasOwnProperty.call(i,"responseTo")?$=i.responseTo==="template":!$&&Object.hasOwnProperty.call(R("Component"),"responseTo")&&($=R("Component").responseTo==="template"),typeof h<"u"&&typeof D<"u"&&D===!0&&(H||$)){w.info("Loading service "+g);var le=de(h,{data:u});Je(le).then(function({request:te,service:ee}){var be;typeof ee.JSONresponse<"u"&&ee.JSONresponse!==null?be=ee.JSONresponse:be=ee.template,H&&(typeof u=="object"&&typeof be=="object"?u=Object.assign(u,be):u=be,t.data=u),t.serviceInstance=le,t.serviceData=u,$&&(t.template=be),I(be)},function(te){w.debug(`Service loading rejected for ${g} in ${t.name}`),N(te)}).catch(function(te){throw w.debug("Something went wroing while trying to load the service "+g),Error(`Error loading ${g} for ${t.name}. Detail: ${te}`)})}else I(null)})}_bindroute_(){var t=this;t._bindroute_.loaded?w.debug(`Routes already bound to popstate events for ${t.name}`):(L&&t.hostElements("a").map(function(a){return a.oldclick=a.onclick,a.onclick=function(u){var h=!0;j.global.get("routingPaths")||j.global.set("routingPaths",[]);var i=j.CONFIG.get("routingWay"),g=u.target[i];return j.global.get("routingPaths").includes(g)&&u.target[i]!==document.location[i]&&u.target.href!==document.location.href?(w.debug("A ROUTING WAS FOUND: "+g),window.history.pushState({href:u.target.href},u.target.href,u.target.href),R("Component").route(),h=!1):w.debug("NO ROUTING FOUND FOR: "+g),typeof u.target.oldclick<"u"&&typeof u.target.oldclick=="function"&&u.target.oldclick.call(u.target,u),h},null}),this._bindroute_.loaded=!0)}done(t){var a;if(typeof t<"u"){var{request:u,component:h}=t;a=Promise.resolve({request:u,component:h})}return a}createControllerInstance(){var t;if(L){if(typeof this.body>"u")throw new Error("The component has no body");var a=this.body.getAttribute("controllerClass");a||(a="Controller"),t=R(a),typeof t<"u"&&(this.controller=de(t,{component:this}))}return new Promise((u,h)=>{if(L&&typeof t<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(i){throw Error(i)}else w.debug(`${a} does not have a done() method.`),h(`${a} does not have a done() method.`);typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):w.debug(`${a} does not have a createRoutingController() method.`)}u({component:this,controller:this.controller})})}createEffectInstance(){var t=this;return new Promise(function(a,u){if(L){var h=t.body.getAttribute("effectClass"),i=t.body.getAttribute("apply-effect-to");i=i!==null?i:"load",h!==null&&i==="observe"?t.applyObserveTransitionEffect(h):h!==null&&i==="load"&&t.applyTransitionEffect(h)}a({component:t,effect:t.effect})})}createViewInstance(){var t=this;return new Promise(function(a,u){var h=L?t.body.getAttribute("viewClass"):null;if(h!==null){var i=R(h);typeof i<"u"&&(t.view=de(i,{component:t}),Object.hasOwnProperty.call(t.view,"done")&&typeof t.view.done=="function"&&t.view.done.call(t.view))}a({component:t,view:t.view})})}__done__(){var t=this,a=O(function(){if(typeof t>"u")throw new Error("componentDone() has lost its context");if(typeof t.body>"u")throw new Error("The component has no body");t.createViewInstance(),t.createControllerInstance(),t.createEffectInstance(),w.debug(`Trying to run component helpers for ${t.name}...`);try{t.runComponentHelpers(),w.debug(`Component helpers for ${t.name} executed.`)}catch(u){throw w.debug(`Component helpers for ${t.name} could not be executed.`),Error(u)}t.subcomponents=t.__buildSubComponents__(),t._bindroute_(),L&&t.body.setAttribute("loaded",!0)},"componentDone");return new Promise(function(u,h){try{u(a.call(t))}catch(i){h(i)}})}hostElements(t){var a=this,u=[];return L&&(u=a.shadowed&&typeof a.shadowRoot<"u"?a.shadowRoot.subelements(t):a.body.subelements(t)),u}get subtags(){var t=this,a=Nt;return t.hostElements(a)}get bodyAttributes(){var t=this,a=t.body;return L?[...a.getAttributeNames()].map(u=>({[u]:a.getAttribute(u)})).reduce((u,h,i)=>Object.assign(u,h)):{}}get dataAttributes(){var t=this,a=t.body;return L?[{}].concat([...a.getAttributeNames()].filter(u=>u.startsWith("data-")).map(u=>({[u.split("-")[1]]:a.getAttribute(u)}))).reduce((u,h,i)=>Object.assign(u,h)):{}}__buildSubComponents__(t=!1){var a=this,u=a.subtags;return t||(u=u.filter(h=>h.getAttribute("loaded")!=="true")),(typeof a<"u"||a.subcomponents.length<1)&&(a.subcomponents=Ie(u,a)),a.subcomponents}fail(t){var a;if(typeof t<"u"){var{error:u,component:h}=t;a=Promise.resolve({error:u,component:h})}return a}set(t,a){this[t]=a}get(t){return this[t]}feedComponent(){var t=this;w.debug(`[Component][${this.name}][feedComponent] start feeding component...`);var a=O(function(i){if(typeof i.container>"u"&&typeof i.body>"u"){w.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",i.name));return}var g=typeof i.container>"u"||i.container===null?i.body:i.container,I=i.parsedAssignmentText;if(i.innerHTML=I,i.shadowed){w.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",i.name)),w.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",i.name));var N=He("div");g.subelements("[slot]").map(function($){$.parentElement===g&&N.appendChild($)}),w.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",i.name));var D=He("div");D.classList.add("shadowHost");try{i.shadowRoot=D.attachShadow({mode:"open"})}catch{try{w.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",i.name)),i.shadowRoot=D.shadowRoot}catch{w.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",i.name))}}if(typeof i.shadowRoot<"u"&&i.shadowRoot!==null){i.reload?(w.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),D.shadowRoot.innerHTML=i.innerHTML):(N.innerHTML=i.parseTemplate(N.innerHTML),w.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),D.shadowRoot.innerHTML+=i.innerHTML),w.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),D.innerHTML+=N.innerHTML,w.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",i.name));var H=g.querySelector(".shadowHost");typeof H<"u"&&H!==null?(w.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",i.name)),i.shadowRoot.innerHTML=D.shadowRoot.innerHTML):g.appendChild(D)}else w.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",i.name))}else i.reload?(w.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),g.innerHTML=i.innerHTML):g&&i?(w.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),g.innerHTML+=i.innerHTML):w.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",i.name))},"_feedComponent_InBrowser"),u=O(function(i){var g=i.parsedAssignmentText;i.innerHTML=g},"_feedComponent_InNode"),h;if(!F(t,"Component")){w.warn("Trying to feed a non component object");return}return L?h=a(t):h=u(t),h}rebuild(){var t=this,a=new Promise(function(u,h){if((typeof t>"u"||t===null)&&h("Component is undefined"),fe(t)&&F(t,"Component"))switch(!0){case t.get("tplsource")==="none":w.debug("Component "+t.name+" has specified template-source=none, so no template load was done");var i={request:null,component:t};t.__done__().then(function(){typeof t.done=="function"&&t.done.call(t,i),u.call(a,i)},function(){h.call(a,i)});break;case t.get("tplsource")==="inline":w.debug("Component "+t.name+" has specified template-source=inline, so it is assumed that template is already declared"),async function(g){g.feedComponent.bind(g)()}(t);var i={request:null,component:t};t.__done__().then(function(){typeof t.done=="function"&&t.done.call(t,i),u.call(a,i)},function(){h.call(a,i)});break;case(t.get("tplsource")==="default"&&t.get("templateURI")!==""):t.set("url",t.get("basePath")+t.get("templateURI")),Xe(t,!1).then(function(g){u.call(a,g)},function(g){h.call(a,g)});break;case(t.get("tplsource")==="external"&&t.get("templateURI")!==""):t.set("url",t.get("templateURI")),Xe(t,!1).then(function(g){u.call(a,g)},function(g){h.call(a,g)});break;case(t.get("tplsource")==="default"&&t.get("templateURI","")===""):w.debug(`Component ${t.name} template-source is ${t.get("tplsource")} and no templateURI is present`),h.call(a,`Component ${t.name} template-source is ${t.get("tplsource")} and no templateURI is present`);break;default:w.debug("Component "+t.name+" will not be rebuilt because no templateURI is present"),h.call(a,{request:null,component:t});break}});return a}Cast(t){let a=_e(t).map(u=>u.name.replace(/bound /g,"")).map(u=>({[u]:t[u].bind(this)})).reduce((u,h)=>Object.assign(u,h),{});return C(this,a)}static route(){var t=this,a,u=!!(fe(t)&&F(t,"Component")),h=O(function(i){var g=[],I=i.filter(function(N){return typeof N<"u"}).map(function(N){if(typeof N.name<"u")g.push(N.name);else throw new Error(P(N)+" does not have a name");return new Promise(function(D,H){var $;return typeof N<"u"&&N._reroute_?$=N._reroute_().then(function(){return N.reload=!0,N.rebuild()}).then(function(le){if(Object.hasOwnProperty.call(N,"subcomponents")&&typeof N.subcomponents<"u"&&N.subcomponents.length>0)return w.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+N.name),h.call(N,N.subcomponents);w.debug("No subcomponents to look for routings in: "+N.name),N.subtags.length>0&&(N.subcomponents=N.__buildSubComponents__(!0)),D(N)}):typeof N<"u"&&H("Component "+N.name+" is not an instance of Component"),$})});return Promise.all(I).then(function(){w.debug("ROUTING COMPLETED FOR "+g.join(", "))}).catch(function(N){w.warn("ROUTING FAILED FOR "+g.join(", ")+": "+N)})},"__route__");if(u||j.componentsStack)u&&w.debug("loading routings for instance "+t.name),a=h.call(t,u?t.subcomponents:j.componentsStack);else throw w.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 a}fullscreen(){if(L){var t=this.body;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}}closefullscreen(){L&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(t){var a=this;return new Promise(function(u,h){L&&ot(a.validRoutingWays,a.routingWay)&&typeof t<"u"&&(a.innerHTML=t.innerHTML,a.routingNodes=t.subelements("routing"),a.routings=[],a.routingNodes.map(function(i,g){var I=i.getAttributeNames(),N={};I.map(function(D,H){N[I[H]]=i.getAttribute(I[H])}),a.routings.push(N),a.routingPaths||(a.routingPaths=[]),a.routingPaths.includes(N.path)||a.routingPaths.push(N.path),j.global.get("routingPaths")||j.global.set("routingPaths",[]),j.global.get("routingPaths").includes(N.path)||j.global.get("routingPaths").push(N.path)})),u()})}parseTemplate(t){var a=this,u,h=t;if(Object.hasOwnProperty.call(a,"templateHandler")){var i=a.templateHandler;w.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${i} ...`);var g=R(i),I=de(g,{component:a,template:h});I.component=a;var N=a.data;if(Object.hasOwnProperty.call(a,"assignRoutingParams")&&a.assignRoutingParams)try{N=Object.assign(N,a.routingParams)}catch{w.debug("[parseTemplate] it was not possible to assign the routing params to the template")}u=I.assign(N)}else w.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),u=h;return u}_reroute_(){var t=this;return new Promise(function(a,u){L&&ot(t.validRoutingWays,t.routingWay)&&(t.routingPath=document.location[t.routingWay],t.routingSelected.map(function(h,i){var g=Qe({COMPONENTS_BASE_PATH:j.CONFIG.get("componentsBasePath"),COMPONENT_NAME:h.name.toString(),TPLEXTENSION:Object.hasOwnProperty.call(h,"tplextension")?h.tplextension:t.tplextension,TPL_SOURCE:"default"});t.templateURI=g}),t.routingSelected.length>0&&(t.template="",t.body.innerHTML="")),a(t)})}lazyLoadImages(){if(L){var t=this,a=t.shadowed?t.shadowRoot:t.body,u=[...a.subelements("img[lazy-src]")],h=O(function(g){g.setAttribute("src",g.getAttribute("lazy-src")),g.onload=()=>{g.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){var i=new IntersectionObserver((g,I)=>{g.forEach(N=>{N.isIntersecting&&(h(N.target),I.unobserve(N.target))})});u.map(function(g){return i.observe(g)})}else u.map(h)}return null}applyTransitionEffect(t){var a=R(t);if(typeof a>"u")throw Error(`${t} not found.`);typeof a<"u"&&F(a,"TransitionEffect")?(this.effect=de(a,{component:this}),this.effect.apply(this.effect.defaultParams)):w.debug(`${t} is ${P(a)} but is not a TransitionEffect`)}applyObserveTransitionEffect(t){if(L){var a=this,u=a.shadowed?a.shadowRoot.host:a.body,h=O(function(g){a.applyTransitionEffect(t)},"_applyEffect_");if("IntersectionObserver"in window){var i=new IntersectionObserver((g,I)=>{g.forEach(N=>{N.isIntersecting&&(h(N.target),I.unobserve(N.target))})});i.observe(u)}else h(u)}return null}scrollIntoHash(){if(L){var t=this;if(document.location.hash!==""){var a=t.shadowed?t.shadowRoot:t.body;a.subelements(document.location.hash).map(function(u){typeof u.scrollIntoView=="function"&&u.scrollIntoView(j.CONFIG.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"}))})}}}i18n_translate(){if(L&&j.CONFIG.get("use_i18n")){var t=this,a=t.shadowed?t.shadowRoot:t.body,u=j.CONFIG.get("lang","en"),h=navigator.language.slice(0,2),i=j.global.get("i18n");if(u!==h&&typeof i=="object"&&Object.hasOwnProperty.call(i,"messages")){var g=O(function(){var I=this;return new Promise(function(N,D){var H=i.messages.filter(function($){return Object.hasOwnProperty.call($,u)&&Object.hasOwnProperty.call($,h)});a.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component").map(function($){return H.map(function(le){var te=$.innerHTML;return te=te.replace(new RegExp(`${le[u]}`,"g"),le[h]),$.innerHTML=te,null}),$}),N()})},"callback_i18n");g.call(t).then(function(){w.debug("i18n loaded for component: "+t.name)})}}}addComponentHelper(t){var a=this;a._componentHelpers.push(t)}runComponentHelpers(){if(L){var t=this,a=[];a.push(t.i18n_translate.bind(t)),a.push(t.scrollIntoHash.bind(t)),a.push(t.lazyLoadImages.bind(t)),a=a.concat(t._componentHelpers),a.map(function(u){w.debug(`Executing ${u.name} as component helper for ${t.name}...`),u()})}}},"Component")]),_e(R("Component")).map(function(o){ve(o)}),L&&window.addEventListener("popstate",function(o){o.stopImmediatePropagation(),o.stopPropagation(),R("Component").route()}),z("com.qcobjects.controllers",[O(class extends R("InheritClass"){constructor({component:t,dependencies:a}){super({component:t,dependencies:a});W(this,"component",null);W(this,"dependencies",[]);if(this.component=t,this.dependencies=a,typeof this.component>"u"||this.component==="null")throw Error(`${P(this)} must be called with a component`)}routingSelectedAttr(t){return this.component.routingSelected.map(function(a){return a[t]}).filter(function(a){return a}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,a){try{this.isTouchable()?this.component.body.subelements(t)[0].addEventListener("touchstart",a,{passive:!0}):this.component.body.subelements(t)[0].addEventListener("click",a,{passive:!0})}catch{w.debug("No button to assign press event")}}createRoutingController(){var t=this,a=t.component,u=t.routingSelectedAttr("controllerclass");if(typeof u<"u"){var h=R(u);typeof h<"u"&&(a.routingController=de(h,{component:a}),Object.hasOwnProperty.call(a.routingController,"done")&&typeof a.routingController.done=="function"&&a.routingController.done.call(a.routingController))}}done(){}},"Controller")]),z("com.qcobjects.views",[O(class extends R("InheritClass"){constructor({component:r=void 0,dependencies:t=[]}){if(super(...arguments),typeof this.component>"u"||this.component==="null")throw Error(`${P(this)} must be called with a component`)}},"View")]),z("com.qcobjects.api",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"kind","rest");W(this,"domain",nt);W(this,"basePath",Ve);W(this,"url","");W(this,"method","GET");W(this,"data",{});W(this,"reload",!1);W(this,"cached",!1)}set(t,a){this[t]=a}get(t){return this[t]}},"Service")]),z("com.qcobjects.api.services",[O(class extends R("Service"){constructor(){super(...arguments);W(this,"method","GET");W(this,"cached",!1);W(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});W(this,"JSONresponse",null)}done(t){w.debug("***** RECEIVED RESPONSE:"),w.debug(t.service.template),this.JSONresponse=JSON.parse(t.service.template)}},"JSONService")]),z("com.qcobjects.api.config",[O(class extends R("JSONService"){constructor(){super(...arguments);W(this,"method","GET");W(this,"cached",!1);W(this,"configFileName","config.json");W(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});W(this,"JSONresponse",null);this.set("url",this.get("basePath")+this.get("configFileName"))}done(t){w.debug("***** CONFIG LOADED:"),w.debug(t.service.template),this.JSONresponse=JSON.parse(t.service.template),Object.hasOwnProperty.call(this.JSONresponse,"__encoded__")&&(this.JSONresponse=JSON.parse(R("_Crypt").decrypt(this.JSONresponse.__encoded__,it)));for(var a in this.JSONresponse)j.CONFIG.set(a,this.JSONresponse[a]);this.configLoaded.call(this)}fail(t){this.configLoaded.call(this)}},"ConfigService")]),z("com.qcobjects.valueObjects",[O(class extends R("InheritClass"){constructor(){super(...arguments)}},"VO")]);var Qe=O(({TPL_SOURCE:o,COMPONENTS_BASE_PATH:r,COMPONENT_NAME:t,TPLEXTENSION:a})=>o==="default"?`${r}${t}.${a}`:"","ComponentURI"),Xe=O(function(o,r){var t,a=O(function(i,g){return t=new Promise(function(I,N){var D=i.__promise__,H=Object.hasOwnProperty.call(i,"container")&&typeof i.container<"u"&&i.container!==null?i.container:i.body;if(H!==null){var $=O(function(Ne){Ne.feedComponent();var We={request:ee,component:Ne};I.call(D,We)},"_feedComponent_");w.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(i.data)).replace("{{URL}}",i.url));var le=O(function(){var Ne=te?0:200;if(ee.status===Ne){var We=ee.responseText;w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(We))),w.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=We,i.cached&&typeof Se<"u"&&Se.save(i.name,i.template),$.call(this,i)}else{var st={request:ee,component:i};N.call(D,st)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")$.call(this,i);else{var te=!!i.url.startsWith("file:"),ee=new XMLHttpRequest;if(te){if("fetch"in j){w.debug("I can use fetch..."),w.debug("It is a file to be loaded, so I will try to use fetch");var be=fetch(i.url).then(Ne=>{w.debug("I got a response from fetch, so I'll feed the component"),Ne.text().then(We=>{i.template=We,$.call(this,i)})})}}else try{w.debug("Calling the url of component in async mode."),ee.open(i.method,i.url,!0)}catch{w.debug("Last try has failed... The component cannot be loaded.")}!It&&!te&&ee.setRequestHeader("Content-Type","text/html"),te||(ee.onload=le);var ge=O(function(Ne){Ne=!(typeof Ne>"u"||!Ne),w.debug("SENDING THE NORMAL REQUEST "),Ne?"fetch"in j||(w.debug("I have to try to load the file using xhr... "),ee.send(null),ee.status===XMLHttpRequest.DONE&&le.call(this)):(w.debug("Trying to send the data to the component... "),ee.send(Ee(i.data)))},"_directLoad");if(i.cached&&!te){w.debug("USING CACHE FOR COMPONENT: "+i.name);var Se=new Be({index:i.cacheIndex,load(Ne){ge.call(this,te)},alternate(Ne){i.method==="GET"?(i.template=Ne.cache.getCached(i.cacheIndex),$.call(this,i)):ge.call(this,te)}});y.lastCache=Se}else w.debug("NOT USING CACHE FOR COMPONENT: "+i.name),ge.call(this,te)}}else w.debug("CONTAINER DOESNT EXIST")}),t.then(function(I){return i.__done__().then(function(){var N;return typeof i.done=="function"&&(N=i.done.call(i,I)),Promise.resolve(N)})},function(I){var N;return typeof i.fail=="function"&&(N=i.fail.call(i,I)),Promise.reject(N)}).catch(function(I){w.debug("Something wrong loading the component")}),t},"_componentLoaderInBrowser"),u=O(function(i,g){return t=new Promise(function(I,N){var D=t,H=O(function(ee){ee.feedComponent();var be={request:null,component:ee};I.call(D,be)},"_feedComponent_");w.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(i.data)).replace("{{URL}}",i.url));var $=O(function(ee,be){if(ee){var Se={request:null,component:i};N.call(D,Se)}else{var ge=be.toString();w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(ge))),w.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=ge,i.cached&&typeof te<"u"&&te.save(i.name,i.template),H.call(this,i)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")H.call(this,i);else{w.debug("Loading the component as a local file in server...");var le=O(function(ee){let be=Ke("fs");w.debug("SENDING THE NORMAL REQUEST "),be.readFile(i.url,$)},"_directLoad");if(i.cached){w.debug("USING CACHE FOR COMPONENT: "+i.name);var te=new Be({index:i.cacheIndex,load(ee){le.call(this)},alternate(ee){i.method==="GET"?(i.template=ee.cache.getCached(i.cacheIndex),H.call(this,i)):le.call(this)}});y.lastCache=te}else w.debug("NOT USING CACHE FOR COMPONENT: "+i.name),le.call(this)}}),t.then(function(I){return i.__done__().then(function(){var N;return typeof i.done=="function"&&(N=i.done.call(i,I)),Promise.resolve(N)})},function(I){var N;return typeof i.fail=="function"&&(N=i.fail.call(i,I)),Promise.reject(N)}).catch(function(I){w.debug(`Something wrong loading the component: ${I}`)}),t},"_componentLoaderInNode"),h;return L?typeof r<"u"&&r?h=gt(a,arguments):h=a(o,r):h=u(o,r),h},"componentLoader"),Je=O(function(o,r){var t=O(function(g,I){var N=new Promise(function(D,H){w.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(g.data)).replace("{{URL}}",g.url));var $=new XMLHttpRequest;$.withCredentials=g.withCredentials;var le=!0;$.open(g.method,g.url,le);for(var te in g.headers)try{typeof g.headers[te]!="function"&&$.setRequestHeader(te,g.headers[te])}catch{w.debug("Something went wrong when assign the header "+te)}$.onload=function(){if($.status===200){var ge=$.responseText;if(w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(ge))),w.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",g.name)),g.template=ge,g.cached&&typeof be<"u"&&be.save(g.name,g.template),typeof g.done=="function"){var Se={request:$,service:g};g.done.call(g,Se),D.call(N,Se)}}else if(typeof g.fail=="function"){var Se={request:$,service:g};g.fail.call(g,Se),H.call(N,Se)}};var ee=O(function(){w.debug("SENDING THE NORMAL REQUEST ");try{$.send(Ee(g.data))}catch{w.debug("SOMETHING WRONG WITH REQUEST "),H.call(N,{request:$,service:g})}},"_directLoad");if(g.cached){var be=new Be({index:g.data,load(ge){ee.call(this)},alternate(ge){if(g.method==="GET"){if(g.template=ge.cache.getCached(g.name),typeof g.done=="function"){var Se={request:$,service:g};g.done.call(g,Se),D.call(N,Se)}}else ee.call(this)}});y.lastCache=be}else ee.call(this);return $});return N},"_serviceLoaderInBrowser"),a=O(function(g,I){var N=new Promise(function(D,H){if(typeof URL>"u"){y.URL=Ke("url").URL;let ke=y.URL}var $=new URL(g.url),le;g.useHTTP2=Object.hasOwnProperty.call(g,"useHTTP2")&&g.useHTTP2;var te=O(function(ke){w.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(g.data)).replace("{{URL}}",g.url));var et,yt={http2Client:ge,request:ke,service:g,responseHeaders:null};if(typeof g.data=="object"&&g.data!==null&&g.useHTTP2)try{w.debug("Sending data...");let Ge=new Buffer(Ee(g.data));ke.write(Ge)}catch{w.debug("It was not possible to send any data")}et="",ke.on("response",(Ge,mt)=>{w.debug("receiving response..."),yt.responseHeaders=Ge,et=""}),ke.on("data",Ge=>{w.debug("receiving data..."),et+=""+Ge.toString(),g.template=et}),g.useHTTP2&&ke.resume(),ke.on("end",()=>{w.debug("ending call..."),g.template=et,Object.hasOwnProperty.call(g,"useHTTP2")&&g.useHTTP2?ge.destroy():ke.destroy(),g.done.call(g,yt),D.call(N,yt)}),g.useHTTP2&&ke.end()},"captureEvents");try{var ee;if(g.useHTTP2){w.debug("using http2");var be=Ke("http2"),ge=be.connect($.origin);ee=Object.assign({":method":g.method,":path":$.pathname},g.options),ee=Object.assign(ee,g.headers),le=ge.request(ee),le.setEncoding("utf8"),te(le)}else if($.protocol==="http:"){var Se=Ke("http"),Ne=Se.request;ee=Object.assign({url:g.url,headers:g.headers},g.options);var le=Ne(g.url);te(le)}else if($.protocol==="https:"){var We=Ke("https");ee=Object.assign({hostname:$.hostname,port:$.port,path:$.pathname,method:g.method,headers:g.headers},g.options);var st=We.request(ee,function(ke){te(ke)});st.end()}else{var ye="Protocol not supported: "+$.protocol;throw w.debug(ye),new Error(ye)}}catch(ke){w.debug(ke),g.fail.call(g,ke),H.call(N,ke)}}).catch(function(D){console.log(D),w.debug("Something happened when trying to call the service: "+g.name),g.fail.call(g,D)});return N},"_serviceLoaderInNode"),u=O(function(g,I){var N=new Promise(function(D,H){w.debug(`Calling mockup service ${g.name} ...`);var $={request:null,service:g,responseHeaders:g.responseHeaders};typeof g.mockup=="function"?g.mockup.call(g,$):g.done.call(g,$),D.call(N,$)});return N},"_serviceLoaderMockup"),h=O(function(g,I){var N=new Promise(function(D,H){w.debug(`Calling local service ${g.name} ...`);var $={request:null,service:g,responseHeaders:g.responseHeaders};typeof g.local=="function"?g.local.call(g,$):g.done.call(g,$),D.call(N,$)});return N},"_serviceLoaderLocal"),i;switch(o.kind){case"rest":L?typeof r<"u"&&r?i=gt(t,arguments):i=t(o,r):i=a(o,r);break;case"mockup":i=u(o,r);break;case"local":i=h(o,r);break;default:w.debug(`The value of the kind property of the service ${o.name} is not valid`);break}return i},"serviceLoader");if(K(Je),K(Xe),K(Qe),K(x),K(Ee),K(B),K(fe),K(Ce),L){Element.prototype.buildComponents=function(o=!1){var r=Nt,t=this,a=t.subelements(r);return Ie(a,null)},HTMLDocument.prototype.buildComponents=Element.prototype.buildComponents,HTMLElement.prototype.buildComponents=Element.prototype.buildComponents;var Ye=O(class extends HTMLElement{constructor(){super(...arguments);let o=this,r=o.nodeName.toLowerCase(),t=He("quick-component"),a=o.getAttributeNames();t.setAttribute("name",r),o.hasAttribute("shadowed")||t.setAttribute("shadowed","true"),a.map(function(h){o.hasAttribute(h)&&(t.setAttribute(h,o.getAttribute(h)),o.removeAttribute(h))});var u=o.getAttributeNames().filter(function(h){return h.startsWith("data-")}).map(function(h){return h.split("-")[1]});u.map(function(h){t.setAttribute("data-"+h,o.getAttribute("data-"+h)),o.removeAttribute("data-"+h)}),[...o.children].map(function(h){t.appendChild(h.cloneNode(!0)),h.remove()}),o.append(t)}},"_ComponentWidget_");K(Ye);var Ue=O(function(o){customElements.define(o,class extends Ye{})},"RegisterWidget"),Ae=O(function(){var o=[...arguments];o.filter(function(r){return typeof r=="string"}).map(function(r){Ue(r)})},"RegisterWidgets");ve(Ue),ve(Ae),K(Ue),K(Ae)}L||z("com.qcobjects.api",[O(class extends R("InheritClass"){constructor({domain:r=nt,basePath:t=Ve,body:a=null,stream:u=null,request:h=null}){super(...arguments),w.debug("Initializing BackendMicroservice...");let i=this;typeof this.body>"u"&&(this.body=null),typeof a<"u"&&(this.body=a),this.cors(),i.stream=u,u.on("data",N=>{var D=h.method.toLowerCase(),H={post:i.post};Object.hasOwnProperty.call(H,D)&&H[D].call(i,N)});var g=h.method.toLowerCase(),I={get:i.get,head:i.head,put:i.put,delete:i.delete,connect:i.connect,options:i.options,trace:i.trace,patch:i.patch};Object.hasOwnProperty.call(I,g)&&I[g].call(i)}cors(){if(this.route.cors){w.debug("Validating CORS...");let{allow_origins:t,allow_credentials:a,allow_methods:u,allow_headers:h}=this.route.cors;var r=this;if(typeof r.headers!="object"&&(r.headers={}),typeof r.route.responseHeaders!="object"&&(r.route.responseHeaders={}),typeof t<"u")if(w.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof r.request.headers.origin>"u"||[...t].indexOf(r.request.headers.origin)!==-1)w.debug("CORS: Adding header Access-Control-Allow-Origin=*"),r.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{w.debug("CORS: Origin is not allowed: "+r.request.headers.origin),w.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(i){w.debug(`It was not possible to finish the call to the microservice: ${i}`)}}else w.debug("CORS: no allow_origins available. Allowing all origins..."),w.debug("CORS: Adding header Access-Control-Allow-Origin=*"),r.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof a<"u"?(w.debug(`CORS: allow_credentials present. Allowing ${a}...`),r.route.responseHeaders["Access-Control-Allow-Credentials"]=a.toString()):(w.debug("CORS: No allow_credentials present. Allowing all credentials."),r.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof u<"u"?(w.debug(`CORS: allow_methods present. Allowing ${u}...`),r.route.responseHeaders["Access-Control-Allow-Methods"]=[...u].join(",")):(w.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),r.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof h<"u"?(w.debug(`CORS: allow_headers present. Allowing ${h}...`),r.route.responseHeaders["Access-Control-Allow-Headers"]=[...h].join(",")):(w.debug("CORS: No allow_headers present. Allowing all headers..."),r.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else w.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(r){this.done()}get(r){w.debug(`[BackendMicroservice.get] Data received: ${Ee(r)}`),this.done()}post(r){this.done()}put(r){this.done()}delete(r){this.done()}connect(r){this.done()}options(r){this.done()}trace(r){this.done()}patch(r){this.done()}finishWithBody(r){try{w.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),w.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=Ee(this.body)),w.debug(`[BackendMicroservice.finishWithBody]
|
|
696
|
+
body: ${this.body} `),r.write(this.body),r.end(),w.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(t){w.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${t}`)}}done(){w.debug("[BackendMicroservice.done] Finalizing the response...");var r=this,t=r.stream;try{if(w.debug("[BackendMicroservice.done] Sending response headers..."),r.route.responseHeaders)w.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(r.route.responseHeaders)}`),t.respond(r.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(a){w.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${a}`)}if(r.body!==null)try{w.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),r.finishWithBody.call(r,t)}catch(a){w.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${a}`)}else w.debug("[BackendMicroservice.done] No body present. Ending stream..."),t.end()}},"BackendMicroservice")]),ue("SourceJS",Object,{domain:nt,basePath:Ve,body:He("script"),type:"text/javascript",containerTag:"body",url:"",data:{},async:!1,external:!1,set(o,r){this[o]=r},get(o){return this[o]},status:!1,done(){},fail(){},rebuild(){var o=this;try{document.getElementsByTagName(o.containerTag)[0].appendChild(function(r,t,a){return r.type=a.type,r.src=t,r.crossOrigin=Object.hasOwnProperty.call(a,"crossOrigin")?a.crossOrigin:"anonymous",r.async=a.async,r.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},r.onload=function(u){a.status=!0,a.done.call(a,u)},r.onerror=function(u){a.status=!1,a.fail.call(a,u)},a.body=r,r}.call(this,He("script"),this.external?this.url:this.basePath+this.url,o))}catch(r){o.status=!1,o.fail.call(o,r)}},Cast(o){return C(this,o)},_new_(o){this.__new__(o),this.rebuild()}}),ue("SourceCSS",Object,{domain:nt,basePath:Ve,body:He("link"),url:"",data:{},async:!1,external:!1,set(o,r){this[o]=r},get(o){return this[o]},done(){},rebuild(){var o=this;L&&window.document.getElementsByTagName("head")[0].appendChild(function(r,t,a){return r.type="text/css",r.rel="stylesheet",r.href=t,r.crossOrigin="anonymous",r.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},r.onload=a.done,a.body=r,r}.call(this,He("link"),this.external?this.url:this.basePath+this.url,o))},Cast(o){return C(this,o)},_new_(o){this.__new__(o),this.rebuild()}});var Y=O(function(o){return isNaN(o)?new Number(0):new Number(o)},"__to_number");Array.prototype.unique=function(){return this.filter(function(o,r,t){return t.indexOf(o)===r})},Array.unique=function(o){return o.unique()},ve(Array.unique),ve(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(o){return o.table()},ve(Array.table),ve(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(o,r){return Y(o)+Y(r)},0)},Array.sum=function(o){return o.sum()},ve(Array.sum),ve(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(o,r){return(Y(o)+Y(r))/2})},Array.avg=function(o){return o.avg()},ve(Array.avg),ve(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(o,r){return Y(o)<=Y(r)?o:r},1/0)},Array.min=function(o){return o.min()},ve(Array.min),ve(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(o,r){return Y(o)>=Y(r)?o:r},0)},Array.max=function(o){return o.max()},ve(Array.max),ve(Array.prototype.max),Array.prototype.sortBy=function(o,r=!0){var t=r?function(a,u){return u[o]<a[o]?1:-1}:function(a,u){return u[o]>a[o]?1:-1};return this.sort(t)},Array.sortBy=function(o,r,t=!0){return o.sortBy(r,t)},ve(Array.sortBy),ve(Array.prototype.sortBy),Array.matrix=function(o,r=0){var t=O(function(a){return r},"x_func");return Array.from({length:o},t)},ve(Array.matrix),Array.matrix2d=function(o,r=0){var t=O(function(u){return r},"y_func"),a=O(function(u){return Array.from({length:o},t)},"x_func");return Array.from({length:o},a)},ve(Array.matrix2d),Array.matrix3d=function(o,r=0){var t=O(function(u){return Array.from({length:o},function(){return r})},"y_func"),a=O(function(u){return Array.from({length:o},t)},"x_func");return Array.from({length:o},a)},ve(Array.matrix3d),j.range=function(o,r=0,t=1){return(r===0||typeof r>"u")&&(r=o,o=0),Array.from({length:(r-o)/t+1},function(a,u){return o+u*t})},ve(j.range),String.prototype.list=function(){var o=this;return j.range(0,o.length-1).map(function(r){return o[r]})},ve(String.prototype.list),j.getDocumentLayout=function(){var o=O((a,u)=>a>u?"landscape":null,"h"),r=O((a,u)=>u>a?"portrait":null,"v"),t=O((a,u)=>a===u?"square":null,"square");return[o(document.documentElement.clientWidth,document.documentElement.clientHeight),r(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(a=>a!==null).pop()},ue("ArrayList",Array,[]),R("ArrayList").matrix=Array.matrix,R("ArrayList").matrix2d=Array.matrix2d,R("ArrayList").matrix3d=Array.matrix3d,ve(R("ArrayList").matrix),ve(R("ArrayList").matrix2d),ve(R("ArrayList").matrix3d),ue("ArrayCollection",Object,{source:de(R("ArrayList"),[]),changed(o,r){w.debug("VALUE CHANGED"),w.debug(o),w.debug(r)},push(o){var r=this;w.debug("VALUE ADDED"),w.debug(o),r.source.push(o)},pop(o){var r=this;w.debug("VALUE POPPED"),w.debug(o),r.source.pop(o)},_new_(o){var r=this,t=0;r.source=de(R("ArrayList"),o);for(var a in r.source)isNaN(a)||(w.debug("binding "+a.toString()),function(u){Object.defineProperty(r,u,{set(h){w.debug("setting "+u+"="+h),r.source[u]=h,r.changed(u,h)},get(){return r.source[u]}})}(a),t++);r.source.length=t,Object.defineProperty(r,"length",{get(){return r.source.length}})}}),z("com.qcobjects.effects.base",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"duration",1e3)}animate({timing:t,draw:a,duration:u}){let h=performance.now();requestAnimationFrame(O(function i(g){let I=(g-h)/u;I>1&&(I=1);let N=t(I);a(Math.round(N*100)),I<1?requestAnimationFrame(i):typeof this<"u"&&this!==null&&Object.hasOwnProperty.call(this,"done")&&(typeof this.done).toLowerCase()==="function"&&this.done.call(this)},"animate"))}},"Effect")]),z("com.qcobjects.effects.transitions.base",[O(class extends R("Effect"){constructor(){super(...arguments);W(this,"duration",385);W(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1});W(this,"fitToHeight",!1);W(this,"fitToWidth",!1);W(this,"effects",[]);w.info("DECLARING TransitionEffect "),this.component.defaultParams=this.defaultParams}apply({alphaFrom:t,alphaTo:a,angleFrom:u,angleTo:h,radiusFrom:i,radiusTo:g,scaleFrom:I,scaleTo:N}){var D=this;w.info("EXECUTING TransitionEffect ");var H=D.component.shadowed?D.component.shadowRoot.host:D.component.body;D.fitToHeight&&(H.height=typeof H.offsetParent=="object"&&H.offsetParent!==null?H.offsetParent.scrollHeight:H.getBoundingClientRect().height),D.fitToWidth&&(H.width=typeof H.offsetParent=="object"&&H.offsetParent!==null?H.offsetParent.scrollWidth:H.getBoundingClientRect().width),H.style.display="block",D.effects.map(function($,le){var te=R($),ee=new te({}),be=ee.apply,ge=[H].concat(Object.values({alphaFrom:t,alphaTo:a,angleFrom:u,angleTo:h,radiusFrom:i,radiusTo:g,scaleFrom:I,scaleTo:N}));be.apply(D,ge)})}},"TransitionEffect")]),z("com.qcobjects.timing",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"duration",1e3);W(this,"alive",!0)}thread({timing:t,intervalInterceptor:a,duration:u}){var h=this;let i=performance.now();requestAnimationFrame(O(function g(I){let N=I-i,D=N/u;D>1&&(D=1);let H=t(D,N);a(Math.round(H*100)),(D<1||u===-1)&&h.alive&&requestAnimationFrame(g)},"thread"))}},"Timer")]),z("com.qcobjects.tools.essentials",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"_toggle",!1);W(this,"_inverse",!0);W(this,"_positive",null);W(this,"_negative",null);W(this,"_dispatched",null);W(this,"_args",{});this._new_(...arguments)}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:a,args:u}){this._positive=t,this._negative=a,this._args=u}fire(){var t=this,a=new Promise(function(u,h){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),u.call(a,t)):(w.debug("Toggle functions are not declared"),h.call(a,t))}).then(function(u){u.changeToggle()}).catch(function(u){w.debug(u.toString())});return a}},"Toggle")]),function(o){let r=O(function(i,g,I){var N=this;if(typeof i>"u"||i===null)throw Error(`mapper.${g}.${I} does not have a component instance or it is null.`);let D=o.global.get(I),H=i.get(I),$=i.data[I],le=typeof $<"u"?$:typeof H<"u"?H:D,te="";return typeof le<"u"&&typeof le.map<"u"?te=le.map(function(ee){let be=[...Object.keys(ee)].map(ge=>` data-${ge}="${typeof ee[ge]<"u"&&ee[ge]!==null?ee[ge].toString():""}"`).join("");return`<quick-component name="${g}" ${be} ></quick-component>`}).join(""):w.debug(`${g}.${I} does not have a map property`),te},"mapper");X.setProcessor(r);let t=O(function(i,g,I){var N=`
|
|
697
|
+
/* CSS Document for Mobile Imports */
|
|
698
|
+
@import url("${I}") (orientation:portrait);
|
|
699
|
+
@import url("${I}") (max-width:460px);
|
|
700
|
+
@import url("${I}") (aspect-ratio: 9/16);
|
|
701
|
+
@import url("${I}") (aspect-ratio: 10/16);
|
|
702
|
+
@import url("${I}") (aspect-ratio: 5/8);
|
|
703
|
+
@import url("${I}") (aspect-ratio: 3/4);
|
|
704
|
+
@import url("${I}") (aspect-ratio: 2/3);
|
|
705
|
+
`,D=`
|
|
706
|
+
@import url("${I}") (orientation:landscape) and (min-width:460px);
|
|
707
|
+
@import url("${I}") (aspect-ratio: 16/9) and (min-width:460px);
|
|
708
|
+
@import url("${I}") (aspect-ratio: 16/10) and (min-width:460px);
|
|
709
|
+
@import url("${I}") (aspect-ratio: 8/5) and (min-width:460px);
|
|
710
|
+
@import url("${I}") (aspect-ratio: 4/3) and (min-width:460px);
|
|
711
|
+
@import url("${I}") (aspect-ratio: 3/2) and (min-width:460px);
|
|
712
|
+
`,H={landscape:D,portrait:N};return Object.hasOwnProperty.call(H,g)?H[g]:""},"layout");X.setProcessor(t);let a=O(function(){let i=[...arguments].slice(1).map(function(I){return{[I.split("=")[0]]:I.split("=")[1]}}).reduce(function(I,N){return Object.assign(I,N)});return`<component ${[...Object.keys(i)].map(function(I){return`${I}=${i[I]}`}).join(" ")}></component>`},"component");X.setProcessor(a);let u=O(function(){let i=[...arguments].slice(1).map(function(I){return{[I.split("=")[0]]:I.split("=")[1]}}).reduce(function(I,N){return Object.assign(I,N)});return`<quick-component ${[...Object.keys(i)].map(function(I){return`${I}=${i[I]}`}).join(" ")}></quick-component>`},"quick_component");X.setProcessor(u);let h=O(function(i,g,I){return o.range(g).map(function(N){return I.replace("{{index}}",N.toString())}).join("")},"repeat");X.setProcessor(h)}(j),me(function(){j.CONFIG.get("useSDK")||j.__start__()}),K(K),K(qe),K(z),K(ue),K(de),K(dt),K(me),K(ht),K(L),K(_e),function(o){z("com.qcobjects",[O(class Pt extends R("InheritClass"){constructor(){super(...arguments);W(this,"_GLOBAL",{});W(this,"__definition",{});W(this,"__classType","GlobalSettings");this.set=Pt.set.bind(this),this.get=Pt.get.bind(this),this.__start__=Pt.__start__.bind(this)}static set(a,u){this._GLOBAL[a]=u}static get(a,u){var h;return typeof this._GLOBAL[a]<"u"?h=this._GLOBAL[a]:typeof u<"u"&&(h=u),h}static __start__(){var a=O(function(){var h;return L&&(h=new Promise(function(i,g){"serviceWorker"in navigator&&typeof o.CONFIG.get("serviceWorkerURI")<"u"&&(o.CONFIG.set("serviceWorkerScope",o.CONFIG.get("serviceWorkerScope")?o.CONFIG.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(o.CONFIG.get("serviceWorkerURI"),{scope:o.CONFIG.get("serviceWorkerScope")}).then(function(I){w.debug("Service Worker Registered"),i.call(h,I)},function(I){w.debug("Error registering Service Worker"),g.call(h,I)}),navigator.serviceWorker.ready.then(function(I){w.debug("Service Worker Ready"),i.call(h,I)},function(I){w.debug("Error loading Service Worker"),g.call(h,I)}))})),h},"__load__serviceWorker"),u=O(function(){return new Promise((h,i)=>{if(L){w.debug("Starting to building components");try{o.componentsStack=document.buildComponents.call(document)}catch(g){throw Error(`Something went wrong trying to start components tree: ${g.message}`)}w.debug("Initializing the service worker"),a.call(o).catch(function(g){w.debug(`error loading the service worker ${g}`)})}h()})},"_buildComponents");w.debug("Starting to load the config settings..."),o.CONFIG.get("useConfigService",!1)?(w.debug("Loading settings using local configuration file..."),o.global.configService=de(R("ConfigService")),o.global.configService.configLoaded=u,Je(o.global.configService)):(w.debug("Starting to load the components..."),u.call(this))}},"GlobalSettings")]),K(R("GlobalSettings")),y=de(R("GlobalSettings")),o=T(y,o),Object.defineProperty(o,"PackagesNameList",{set(r){w.debug("PackagesNameList is readonly")},get(){var r=O(function(t){var a=[];for(var u in t)typeof t[u]<"u"&&typeof t[u]!="function"&&Object.hasOwnProperty.call(t[u],"length")&&t[u].length>0&&(a.push(u),a=a.concat(r(t[u])));return a},"_get_packages_names");return r(d)}}),Object.defineProperty(o,"PackagesList",{set(r){w.debug("PackagesList is readonly")},get(){return o.PackagesNameList.map(function(r){let t=z(r),a;return t&&(a={packageName:r,classesList:t.filter(function(u){return B(u)})}),a}).filter(function(r){return typeof r<"u"})}}),Object.defineProperty(o,"ClassesList",{set(r){w.debug("ClassesList is readonly")},get(){var r=[];return o.PackagesList.map(function(t){return r=r.concat(t.classesList.map(function(a){return{packageName:t.packageName,className:t.packageName+"."+a.__definition.__classType,classFactory:a}})),t}),r}}),Object.defineProperty(o,"ClassesNameList",{set(r){w.debug("ClassesNameList is readonly")},get(){return o.ClassesList.map(function(r){return r.className})}}),L&&(ue("GLOBAL",f.global),K(R("GLOBAL"))),K(y),o.CONFIG.get("useSDK")&&function(r){var t=r.CONFIG.get("remoteImportsPath"),a=!r.CONFIG.get("useLocalSDK");r.CONFIG.set("remoteImportsPath",r.CONFIG.get("remoteSDKPath"));var u=!1,h="QCObjects-SDK";if(L)u=!0;else{var i=xe("qcobjects-sdk");i!==null?(h="qcobjects-sdk",u=!0):(h="node_modules/qcobjects-sdk/QCObjects-SDK",u=!0)}if(u)if(w.info("Importing SDK... "+h),U&&typeof at<"u"){let g=Vt()}else qe(h,function(){a?w.debug("QCObjects-SDK.js loaded from remote location"):w.debug("QCObjects-SDK.js loaded from local"),r.CONFIG.set("remoteImportsPath",t)},a);else w.debug("SDK has not been imported as it is not available at the moment")}(o)}(j),L&>(function(){me(function(){(function(o){let r=0,t=!1,a=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),u=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function h(i){var g=Math.round(o.scrollY*100/a),I=Math.round(o.scrollX*100/u),N=new CustomEvent("scrollpercent",{detail:{percentX:I,percentY:g}});i.target.dispatchEvent(N);var D="defaultscroll",H=[0,5,10,25,50,75,90,95,100];H.filter(function($){return $===g}).map(function($){D="percentY"+g.toString();var le=new CustomEvent(D,{detail:{percentX:I,percentY:g}});i.target.dispatchEvent(le)})}O(h,"scrollDispatcher"),document.addEventListener("scroll",function(i){t||(requestAnimationFrame(function(){h(i),t=!1}),t=!0)})})(j)})},null),L||(typeof j.global<"u"&&Object.hasOwnProperty.call(j.global,"_fireAsyncLoad")&&j.global._fireAsyncLoad.call(this),typeof j.global<"u"&&Object.hasOwnProperty.call(j.global,"onload")&&j.global.onload.call(this)),function(o){var r=O(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");o&&j.CONFIG.get("secureObjects",!1)?me(function(){r()}):j.CONFIG.get("secureObjects",!1)&&r()}(L)}},"__qcobjects__").call(null,typeof vt=="object"&&typeof vt.exports=="object"?vt.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}:typeof global=="object"?global:typeof window=="object"?window:{})});export{Ht as a,Zt as b};
|
|
713
|
+
//# sourceMappingURL=chunk-O2PFFZVJ.js.map
|