!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","./ModuleLoader"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=e("tslib"),o=e("./ModuleLoader"),s={},d={},p={};t.getCachedFormElements=function(){return c.__assign({},p)};var i="http://",n="https://";function v(e,t){if((r=e).substr(0,i.length)!==i&&r.substr(0,n.length)!==n)return o.importModule(e+"main",t);var r,e=o.registerModuleName(e);return o.importModule(e+"/main",t,e)}function l(n,u,f,a){return c.__awaiter(this,void 0,void 0,function(){var r,o,i;return c.__generator(this,function(e){switch(e.label){case 0:return[4,v(u,{action:n,suite:f})];case 1:if("object"==typeof(r=e.sent())&&null!==r&&d[u]!==r)for(o in d[u]=r)!function(e){if("function"==typeof e){var t=e.prototype;return"object"==typeof t&&null!==t?"function"==typeof t.execute&&("string"==typeof e.action&&"string"==typeof e.suite):void 0}}(i=r[o])?"object"==typeof(t=i)&&t.component&&(p[i.id]=i,a(i)):h(i.action,u,i.suite,a,i);return[2]}var t})})}function h(e,t,r,o,i){for(var n=s[e],u=0,f=n=void 0===n?s[e]=[]:n;u<f.length;u++){var a=f[u];if(a.path===t&&a.suite===r)return void 0!==i&&(a.factory=i),a}var c={factory:i,path:t,suite:r};return n.push(c),void 0!==i?c.factory=i:c.promise=l(e,t,r,o),c}r.prototype.create=function(n,u,e){if("string"==typeof n){var f;if(void 0!==e){var t=r(e.program.references);if(void 0!==t)return t}t=r(this.references);return void 0!==t?t:void 0!==f?function(i){return c.__awaiter(this,void 0,void 0,function(){var t,r,o;return c.__generator(this,function(e){switch(e.label){case 0:t=0,r=i,e.label=1;case 1:return t<r.length?[4,(o=r[t]).promise]:[3,4];case 2:if(e.sent(),(o.promise=void 0)!==o.factory)return[2,new o.factory];e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}(f):void 0}function r(e){for(var t=0,r=e;t<r.length;t++){var o=r[t],i=o.path,o=o.suite,o=h(n,i,o,u);if(void 0===f){if(void 0!==o.factory)return new o.factory;void 0!==o.promise&&(f=[o])}else f.push(o)}}},r.defaultReference={path:"@geocortex/workflow/runtime/activities/",suite:"gcx:wf:builtin"},e=r;function r(){this.references=[]}t.ActivityLoader=e});