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