@gudhub/core 1.2.1 → 1.2.2

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.
@@ -46,7 +46,7 @@ var e=require("process"),r=require("./utils"),t=require("./helpers/normalizeHead
46
46
  },{"./../utils":"Feqj","./transformData":"IAOH","../cancel/isCancel":"mXc0","../defaults":"A14q"}],"fBI1":[function(require,module,exports) {
47
47
  "use strict";var e=require("../utils");module.exports=function(n,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(n,t){return e.isPlainObject(n)&&e.isPlainObject(t)?e.merge(n,t):e.isPlainObject(t)?e.merge({},t):e.isArray(t)?t.slice():t}function d(o){e.isUndefined(t[o])?e.isUndefined(n[o])||(r[o]=c(void 0,n[o])):r[o]=c(n[o],t[o])}e.forEach(o,function(n){e.isUndefined(t[n])||(r[n]=c(void 0,t[n]))}),e.forEach(i,d),e.forEach(a,function(o){e.isUndefined(t[o])?e.isUndefined(n[o])||(r[o]=c(void 0,n[o])):r[o]=c(void 0,t[o])}),e.forEach(s,function(e){e in t?r[e]=c(n[e],t[e]):e in n&&(r[e]=c(void 0,n[e]))});var f=o.concat(i).concat(a).concat(s),u=Object.keys(n).concat(Object.keys(t)).filter(function(e){return-1===f.indexOf(e)});return e.forEach(u,d),r};
48
48
  },{"../utils":"Feqj"}],"b3VU":[function(require,module,exports) {
49
- module.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};
49
+ module.exports={_from:"axios@^0.21.0",_id:"axios@0.21.4",_inBundle:!1,_integrity:"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",_location:"/axios",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"axios@^0.21.0",name:"axios",escapedName:"axios",rawSpec:"^0.21.0",saveSpec:null,fetchSpec:"^0.21.0"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",_shasum:"c67b90dc0568e5c1cf2b0b858c43ba28e2eda575",_spec:"axios@^0.21.0",_where:"/home/atlasiko/Projects/gudhubclient/override_npm/gudhub",author:{name:"Matt Zabriskie"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs:{url:"https://github.com/axios/axios/issues"},bundleDependencies:!1,bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies:{"follow-redirects":"^1.14.0"},deprecated:!1,description:"Promise based HTTP client for the browser and node.js",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},homepage:"https://axios-http.com",jsdelivr:"dist/axios.min.js",keywords:["xhr","http","ajax","promise","node"],license:"MIT",main:"index.js",name:"axios",repository:{type:"git",url:"git+https://github.com/axios/axios.git"},scripts:{build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings:"./index.d.ts",unpkg:"dist/axios.min.js",version:"0.21.4"};
50
50
  },{}],"bSmC":[function(require,module,exports) {
51
51
  "use strict";var r=require("./../../package.json"),n={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){n[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});var e={},o=r.version.split(".");function t(r,n){for(var e=n?n.split("."):o,t=r.split("."),i=0;i<3;i++){if(e[i]>t[i])return!0;if(e[i]<t[i])return!1}return!1}function i(r,n,e){if("object"!=typeof r)throw new TypeError("options must be an object");for(var o=Object.keys(r),t=o.length;t-- >0;){var i=o[t],s=n[i];if(s){var a=r[i],u=void 0===a||s(a,i,r);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==e)throw Error("Unknown option "+i)}}n.transitional=function(n,o,i){var s=o&&t(o);function a(n,e){return"[Axios v"+r.version+"] Transitional option '"+n+"'"+e+(i?". "+i:"")}return function(r,t,i){if(!1===n)throw new Error(a(t," has been removed in "+o));return s&&!e[t]&&(e[t]=!0,console.warn(a(t," has been deprecated since v"+o+" and will be removed in the near future"))),!n||n(r,t,i)}},module.exports={isOlderVersion:t,assertOptions:i,validators:n};
52
52
  },{"./../../package.json":"b3VU"}],"trUU":[function(require,module,exports) {
@@ -65,26 +65,12 @@ module.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP cl
65
65
  module.exports=require("./lib/axios");
66
66
  },{"./lib/axios":"Wzmt"}],"EgeI":[function(require,module,exports) {
67
67
  "use strict";function r(r,n){return i(r)||o(r,n)||e(r,n)||t()}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e(r,t){if(r){if("string"==typeof r)return n(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(r,t):void 0}}function n(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function o(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=i.call(e)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function i(r){if(Array.isArray(r))return r}function a(r){return JSON.stringify(r).replace(/\+|&|%/g,function(r){switch(r){case"+":return"%2B";case"&":return"%26";case"%":return"%25"}})}function l(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(function(r){return null!=r.field_value})}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.entries(t);return e.length?"&".concat(e.map(function(t){var e=r(t,2),n=e[0],o=e[1];return"".concat(n,"=").concat(o)}).join("&")):""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.convertObjToUrlParams=u,exports.filterFields=l,exports.replaceSpecialCharacters=a;
68
- },{}],"ZzPn":[function(require,module,exports) {
69
- "use strict";module.exports=Error;
70
- },{}],"VfWL":[function(require,module,exports) {
71
- "use strict";module.exports=EvalError;
72
- },{}],"swZI":[function(require,module,exports) {
73
- "use strict";module.exports=RangeError;
74
- },{}],"uS63":[function(require,module,exports) {
75
- "use strict";module.exports=ReferenceError;
76
- },{}],"HWda":[function(require,module,exports) {
77
- "use strict";module.exports=SyntaxError;
78
- },{}],"aoYB":[function(require,module,exports) {
79
- "use strict";module.exports=TypeError;
80
- },{}],"fdKl":[function(require,module,exports) {
81
- "use strict";module.exports=URIError;
82
68
  },{}],"Ht9r":[function(require,module,exports) {
83
69
  "use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0};
84
70
  },{}],"khja":[function(require,module,exports) {
85
71
  "use strict";var o="undefined"!=typeof Symbol&&Symbol,e=require("./shams");module.exports=function(){return"function"==typeof o&&("function"==typeof Symbol&&("symbol"==typeof o("foo")&&("symbol"==typeof Symbol("bar")&&e())))};
86
72
  },{"./shams":"Ht9r"}],"U7E0":[function(require,module,exports) {
87
- "use strict";var o={__proto__:null,foo:{}},t=Object;module.exports=function(){return{__proto__:o}.foo===o.foo&&!(o instanceof t)};
73
+ "use strict";var o={foo:{}},t=Object;module.exports=function(){return{__proto__:o}.foo===o.foo&&!({__proto__:null}instanceof t)};
88
74
  },{}],"sg3h":[function(require,module,exports) {
89
75
  "use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",e=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var e=0;e<n.length;e+=1)r[e+t.length]=n[e];return r},i=function(t,n){for(var r=[],o=n||0,e=0;o<t.length;o+=1,e+=1)r[e]=t[o];return r},p=function(t,n){for(var r="",o=0;o<t.length;o+=1)r+=t[o],o+1<t.length&&(r+=n);return r};module.exports=function(u){var a=this;if("function"!=typeof a||n.apply(a)!==o)throw new TypeError(t+a);for(var c,f=i(arguments,1),l=r(0,a.length-f.length),h=[],y=0;y<l;y++)h[y]="$"+y;if(c=Function("binder","return function ("+p(h,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof c){var t=a.apply(this,e(f,arguments));return Object(t)===t?t:this}return a.apply(u,e(f,arguments))}),a.prototype){var g=function(){};g.prototype=a.prototype,c.prototype=new g,g.prototype=null}return c};
90
76
  },{}],"KNOk":[function(require,module,exports) {
@@ -92,21 +78,19 @@ module.exports=require("./lib/axios");
92
78
  },{"./implementation":"sg3h"}],"bKRI":[function(require,module,exports) {
93
79
  "use strict";var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,o=require("function-bind");module.exports=o.call(t,e);
94
80
  },{"function-bind":"KNOk"}],"aOC8":[function(require,module,exports) {
95
- "use strict";var r,e=require("es-errors"),t=require("es-errors/eval"),o=require("es-errors/range"),n=require("es-errors/ref"),a=require("es-errors/syntax"),y=require("es-errors/type"),p=require("es-errors/uri"),i=Function,f=function(r){try{return i('"use strict"; return ('+r+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(G){c=null}var u=function(){throw new y},s=c?function(){try{return arguments.callee,u}catch(r){try{return c(arguments,"callee").get}catch(e){return u}}}():u,l=require("has-symbols")(),A=require("has-proto")(),d=Object.getPrototypeOf||(A?function(r){return r.__proto__}:null),P={},g="undefined"!=typeof Uint8Array&&d?d(Uint8Array):r,m={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":l&&d?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":t,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&d?d(d([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&d?d((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":n,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&d?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&d?d(""[Symbol.iterator]()):r,"%Symbol%":l?Symbol:r,"%SyntaxError%":a,"%ThrowTypeError%":s,"%TypedArray%":g,"%TypeError%":y,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(d)try{null.error}catch(G){var S=d(d(G));m["%Error.prototype%"]=S}var h=function r(e){var t;if("%AsyncFunction%"===e)t=f("async function () {}");else if("%GeneratorFunction%"===e)t=f("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=f("async function* () {}");else if("%AsyncGenerator%"===e){var o=r("%AsyncGeneratorFunction%");o&&(t=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=r("%AsyncGenerator%");n&&d&&(t=d(n.prototype))}return m[e]=t,t},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=require("function-bind"),b=require("hasown"),E=F.call(Function.call,Array.prototype.concat),U=F.call(Function.apply,Array.prototype.splice),v=F.call(Function.call,String.prototype.replace),w=F.call(Function.call,String.prototype.slice),R=F.call(Function.call,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_=/\\(\\)?/g,x=function(r){var e=w(r,0,1),t=w(r,-1);if("%"===e&&"%"!==t)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var o=[];return v(r,B,function(r,e,t,n){o[o.length]=t?v(n,_,"$1"):e||r}),o},O=function(r,e){var t,o=r;if(b(I,o)&&(o="%"+(t=I[o])[0]+"%"),b(m,o)){var n=m[o];if(n===P&&(n=h(o)),void 0===n&&!e)throw new y("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new a("intrinsic "+r+" does not exist!")};module.exports=function(r,e){if("string"!=typeof r||0===r.length)throw new y("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new y('"allowMissing" argument must be a boolean');if(null===R(/^%?[^%]*%?$/,r))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=x(r),o=t.length>0?t[0]:"",n=O("%"+o+"%",e),p=n.name,i=n.value,f=!1,u=n.alias;u&&(o=u[0],U(t,E([0,1],u)));for(var s=1,l=!0;s<t.length;s+=1){var A=t[s],d=w(A,0,1),P=w(A,-1);if(('"'===d||"'"===d||"`"===d||'"'===P||"'"===P||"`"===P)&&d!==P)throw new a("property names with quotes must have matching quotes");if("constructor"!==A&&l||(f=!0),b(m,p="%"+(o+="."+A)+"%"))i=m[p];else if(null!=i){if(!(A in i)){if(!e)throw new y("base intrinsic for "+r+" exists, but the property is not available.");return}if(c&&s+1>=t.length){var g=c(i,A);i=(l=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[A]}else l=b(i,A),i=i[A];l&&!f&&(m[p]=i)}}return i};
96
- },{"es-errors":"ZzPn","es-errors/eval":"VfWL","es-errors/range":"swZI","es-errors/ref":"uS63","es-errors/syntax":"HWda","es-errors/type":"aoYB","es-errors/uri":"fdKl","has-symbols":"khja","has-proto":"U7E0","function-bind":"KNOk","hasown":"bKRI"}],"pdg1":[function(require,module,exports) {
97
- "use strict";var e=require("get-intrinsic"),r=e("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(t){r=!1}module.exports=r;
81
+ "use strict";var r,t=SyntaxError,e=Function,o=TypeError,n=function(r){try{return e('"use strict"; return ('+r+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(w){a=null}var y=function(){throw new o},p=a?function(){try{return arguments.callee,y}catch(r){try{return a(arguments,"callee").get}catch(t){return y}}}():y,i=require("has-symbols")(),f=require("has-proto")(),c=Object.getPrototypeOf||(f?function(r){return r.__proto__}:null),l={},u="undefined"!=typeof Uint8Array&&c?c(Uint8Array):r,s={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":i&&c?c([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":l,"%AsyncGenerator%":l,"%AsyncGeneratorFunction%":l,"%AsyncIteratorPrototype%":l,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":e,"%GeneratorFunction%":l,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":i&&c?c(c([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&i&&c?c((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&i&&c?c((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":i&&c?c(""[Symbol.iterator]()):r,"%Symbol%":i?Symbol:r,"%SyntaxError%":t,"%ThrowTypeError%":p,"%TypedArray%":u,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(c)try{null.error}catch(w){var A=c(c(w));s["%Error.prototype%"]=A}var d=function r(t){var e;if("%AsyncFunction%"===t)e=n("async function () {}");else if("%GeneratorFunction%"===t)e=n("function* () {}");else if("%AsyncGeneratorFunction%"===t)e=n("async function* () {}");else if("%AsyncGenerator%"===t){var o=r("%AsyncGeneratorFunction%");o&&(e=o.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=r("%AsyncGenerator%");a&&c&&(e=c(a.prototype))}return s[t]=e,e},P={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=require("function-bind"),m=require("hasown"),S=g.call(Function.call,Array.prototype.concat),E=g.call(Function.apply,Array.prototype.splice),h=g.call(Function.call,String.prototype.replace),I=g.call(Function.call,String.prototype.slice),F=g.call(Function.call,RegExp.prototype.exec),b=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,v=function(r){var e=I(r,0,1),o=I(r,-1);if("%"===e&&"%"!==o)throw new t("invalid intrinsic syntax, expected closing `%`");if("%"===o&&"%"!==e)throw new t("invalid intrinsic syntax, expected opening `%`");var n=[];return h(r,b,function(r,t,e,o){n[n.length]=e?h(o,U,"$1"):t||r}),n},R=function(r,e){var n,a=r;if(m(P,a)&&(a="%"+(n=P[a])[0]+"%"),m(s,a)){var y=s[a];if(y===l&&(y=d(a)),void 0===y&&!e)throw new o("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:y}}throw new t("intrinsic "+r+" does not exist!")};module.exports=function(r,e){if("string"!=typeof r||0===r.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/,r))throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=v(r),y=n.length>0?n[0]:"",p=R("%"+y+"%",e),i=p.name,f=p.value,c=!1,l=p.alias;l&&(y=l[0],E(n,S([0,1],l)));for(var u=1,A=!0;u<n.length;u+=1){var d=n[u],P=I(d,0,1),g=I(d,-1);if(('"'===P||"'"===P||"`"===P||'"'===g||"'"===g||"`"===g)&&P!==g)throw new t("property names with quotes must have matching quotes");if("constructor"!==d&&A||(c=!0),m(s,i="%"+(y+="."+d)+"%"))f=s[i];else if(null!=f){if(!(d in f)){if(!e)throw new o("base intrinsic for "+r+" exists, but the property is not available.");return}if(a&&u+1>=n.length){var h=a(f,d);f=(A=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:f[d]}else A=m(f,d),f=f[d];A&&!c&&(s[i]=f)}}return f};
82
+ },{"has-symbols":"khja","has-proto":"U7E0","function-bind":"KNOk","hasown":"bKRI"}],"h9S1":[function(require,module,exports) {
83
+ "use strict";var r=require("get-intrinsic"),e=r("%Object.defineProperty%",!0),t=function(){if(e)try{return e({},"a",{value:1}),!0}catch(r){return!1}return!1};t.hasArrayLengthDefineBug=function(){if(!t())return null;try{return 1!==e([],"length",{value:1}).length}catch(r){return!0}},module.exports=t;
98
84
  },{"get-intrinsic":"aOC8"}],"Bp8W":[function(require,module,exports) {
99
85
  "use strict";var t=require("get-intrinsic"),e=t("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(r){e=null}module.exports=e;
100
86
  },{"get-intrinsic":"aOC8"}],"O3My":[function(require,module,exports) {
101
- "use strict";var e=require("es-define-property"),o=require("es-errors/syntax"),n=require("es-errors/type"),l=require("gopd");module.exports=function(r,t,i){if(!r||"object"!=typeof r&&"function"!=typeof r)throw new n("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,b=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],s=!!l&&l(r,t);if(e)e(r,t,{configurable:null===b&&s?s.configurable:!b,enumerable:null===u&&s?s.enumerable:!u,value:i,writable:null===a&&s?s.writable:!a});else{if(!f&&(u||a||b))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");r[t]=i}};
102
- },{"es-define-property":"pdg1","es-errors/syntax":"HWda","es-errors/type":"aoYB","gopd":"Bp8W"}],"h9S1":[function(require,module,exports) {
103
- "use strict";var e=require("es-define-property"),r=function(){return!!e};r.hasArrayLengthDefineBug=function(){if(!e)return null;try{return 1!==e([],"length",{value:1}).length}catch(r){return!0}},module.exports=r;
104
- },{"es-define-property":"pdg1"}],"TyPq":[function(require,module,exports) {
87
+ "use strict";var e=require("has-property-descriptors")(),o=require("get-intrinsic"),n=e&&o("%Object.defineProperty%",!0);if(n)try{n({},"a",{value:1})}catch(i){n=!1}var r=o("%SyntaxError%"),l=o("%TypeError%"),t=require("gopd");module.exports=function(e,o,i){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new l("`obj` must be an object or a function`");if("string"!=typeof o&&"symbol"!=typeof o)throw new l("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new l("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new l("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new l("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new l("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,b=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],p=!!t&&t(e,o);if(n)n(e,o,{configurable:null===b&&p?p.configurable:!b,enumerable:null===a&&p?p.enumerable:!a,value:i,writable:null===u&&p?p.writable:!u});else{if(!f&&(a||u||b))throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[o]=i}};
88
+ },{"has-property-descriptors":"h9S1","get-intrinsic":"aOC8","gopd":"Bp8W"}],"TyPq":[function(require,module,exports) {
105
89
 
106
- "use strict";var e=require("get-intrinsic"),r=require("define-data-property"),t=require("has-property-descriptors")(),i=require("gopd"),n=require("es-errors/type"),o=e("%Math.floor%");module.exports=function(e,u){if("function"!=typeof e)throw new n("`fn` is not a function");if("number"!=typeof u||u<0||u>4294967295||o(u)!==u)throw new n("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],s=!0,a=!0;if("length"in e&&i){var p=i(e,"length");p&&!p.configurable&&(s=!1),p&&!p.writable&&(a=!1)}return(s||a||!f)&&(t?r(e,"length",u,!0,!0):r(e,"length",u)),e};
107
- },{"get-intrinsic":"aOC8","define-data-property":"O3My","has-property-descriptors":"h9S1","gopd":"Bp8W","es-errors/type":"aoYB"}],"VqWc":[function(require,module,exports) {
108
- "use strict";var e=require("function-bind"),r=require("get-intrinsic"),t=require("set-function-length"),n=require("es-errors/type"),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||e.call(o,i),p=require("es-define-property"),l=r("%Math.max%");module.exports=function(r){if("function"!=typeof r)throw new n("a function is required");var i=u(e,o,arguments);return t(i,1+l(0,r.length-(arguments.length-1)),!0)};var a=function(){return u(e,i,arguments)};p?p(module.exports,"apply",{value:a}):module.exports.apply=a;
109
- },{"function-bind":"KNOk","get-intrinsic":"aOC8","set-function-length":"TyPq","es-errors/type":"aoYB","es-define-property":"pdg1"}],"nnGn":[function(require,module,exports) {
90
+ "use strict";var e=require("get-intrinsic"),r=require("define-data-property"),t=require("has-property-descriptors")(),i=require("gopd"),n=e("%TypeError%"),o=e("%Math.floor%");module.exports=function(e,u){if("function"!=typeof e)throw new n("`fn` is not a function");if("number"!=typeof u||u<0||u>4294967295||o(u)!==u)throw new n("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],a=!0,p=!0;if("length"in e&&i){var g=i(e,"length");g&&!g.configurable&&(a=!1),g&&!g.writable&&(p=!1)}return(a||p||!f)&&(t?r(e,"length",u,!0,!0):r(e,"length",u)),e};
91
+ },{"get-intrinsic":"aOC8","define-data-property":"O3My","has-property-descriptors":"h9S1","gopd":"Bp8W"}],"VqWc":[function(require,module,exports) {
92
+ "use strict";var e=require("function-bind"),t=require("get-intrinsic"),r=require("set-function-length"),n=t("%TypeError%"),o=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),u=t("%Reflect.apply%",!0)||e.call(i,o),l=t("%Object.defineProperty%",!0),p=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch(c){l=null}module.exports=function(t){if("function"!=typeof t)throw new n("a function is required");var o=u(e,i,arguments);return r(o,1+p(0,t.length-(arguments.length-1)),!0)};var a=function(){return u(e,o,arguments)};l?l(module.exports,"apply",{value:a}):module.exports.apply=a;
93
+ },{"function-bind":"KNOk","get-intrinsic":"aOC8","set-function-length":"TyPq"}],"nnGn":[function(require,module,exports) {
110
94
  "use strict";var r=require("get-intrinsic"),t=require("./"),e=t(r("String.prototype.indexOf"));module.exports=function(i,n){var o=r(i,!!n);return"function"==typeof o&&e(i,".prototype.")>-1?t(o):o};
111
95
  },{"get-intrinsic":"aOC8","./":"VqWc"}],"sC8V":[function(require,module,exports) {
112
96
 
@@ -114,8 +98,8 @@ module.exports=require("./lib/axios");
114
98
  var global = arguments[3];
115
99
  var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&r&&"function"==typeof r.get?r.get:null,o=e&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&u&&"function"==typeof u.get?u.get:null,l=i&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype,a=f?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype,y=p?WeakSet.prototype.has:null,g="function"==typeof WeakRef&&WeakRef.prototype,b=g?WeakRef.prototype.deref:null,s=Boolean.prototype.valueOf,S=Object.prototype.toString,h=Function.prototype.toString,m=String.prototype.match,d=String.prototype.slice,v=String.prototype.replace,j=String.prototype.toUpperCase,O=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,W=Array.prototype.join,k=Array.prototype.slice,E=Math.floor,M="function"==typeof BigInt?BigInt.prototype.valueOf:null,_=Object.getOwnPropertySymbols,L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,$="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function I(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-E(-t):E(t);if(n!==t){var o=String(n),i=d.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var N=require("./util.inspect"),P=N.custom,R=K(P)?P:null;function D(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return v.call(String(t),/"/g,"&quot;")}function C(t){return!("[object Array]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function z(t){return!("[object Date]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function F(t){return!("[object RegExp]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function H(t){return!("[object Error]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function U(t){return!("[object String]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function G(t){return!("[object Number]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function J(t){return!("[object Boolean]"!==Y(t)||$&&"object"==typeof t&&$ in t)}function K(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!L)return!1;try{return L.call(t),!0}catch(e){}return!1}function Q(t){if(!t||"object"!=typeof t||!M)return!1;try{return M.call(t),!0}catch(e){}return!1}module.exports=function e(r,i,u,f){var a=i||{};if(X(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=!X(a,"customInspect")||a.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return ct(r,a);if("number"==typeof r){if(0===r)return 1/0/r>0?"0":"-0";var g=String(r);return y?I(r,g):g}if("bigint"==typeof r){var b=String(r)+"n";return y?I(r,b):b}var S=void 0===a.depth?5:a.depth;if(void 0===u&&(u=0),u>=S&&S>0&&"object"==typeof r)return C(r)?"[Array]":"[Object]";var h=gt(a,u);if(void 0===f)f=[];else if(tt(f,r)>=0)return"[Circular]";function m(t,r,n){if(r&&(f=k.call(f)).push(r),n){var o={depth:a.depth};return X(a,"quoteStyle")&&(o.quoteStyle=a.quoteStyle),e(t,o,u+1,f)}return e(t,a,u+1,f)}if("function"==typeof r&&!F(r)){var j=Z(r),w=st(r,m);return"[Function"+(j?": "+j:" (anonymous)")+"]"+(w.length>0?" { "+W.call(w,", ")+" }":"")}if(K(r)){var E=T?v.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(r);return"object"!=typeof r||T?E:ft(E)}if(ut(r)){for(var _="<"+O.call(String(r.nodeName)),P=r.attributes||[],V=0;V<P.length;V++)_+=" "+P[V].name+"="+D(B(P[V].value),"double",a);return _+=">",r.childNodes&&r.childNodes.length&&(_+="..."),_+="</"+O.call(String(r.nodeName))+">"}if(C(r)){if(0===r.length)return"[]";var lt=st(r,m);return h&&!yt(lt)?"["+bt(lt,h)+"]":"[ "+W.call(lt,", ")+" ]"}if(H(r)){var St=st(r,m);return"cause"in Error.prototype||!("cause"in r)||q.call(r,"cause")?0===St.length?"["+String(r)+"]":"{ ["+String(r)+"] "+W.call(St,", ")+" }":"{ ["+String(r)+"] "+W.call(x.call("[cause]: "+m(r.cause),St),", ")+" }"}if("object"==typeof r&&p){if(R&&"function"==typeof r[R]&&N)return N(r,{depth:S-u});if("symbol"!==p&&"function"==typeof r.inspect)return r.inspect()}if(et(r)){var ht=[];return o&&o.call(r,function(t,e){ht.push(m(e,r,!0)+" => "+m(t,r))}),pt("Map",n.call(r),ht,h)}if(ot(r)){var mt=[];return l&&l.call(r,function(t){mt.push(m(t,r))}),pt("Set",c.call(r),mt,h)}if(rt(r))return at("WeakMap");if(it(r))return at("WeakSet");if(nt(r))return at("WeakRef");if(G(r))return ft(m(Number(r)));if(Q(r))return ft(m(M.call(r)));if(J(r))return ft(s.call(r));if(U(r))return ft(m(String(r)));if("undefined"!=typeof window&&r===window)return"{ [object Window] }";if(r===t)return"{ [object globalThis] }";if(!z(r)&&!F(r)){var dt=st(r,m),vt=A?A(r)===Object.prototype:r instanceof Object||r.constructor===Object,jt=r instanceof Object?"":"null prototype",Ot=!vt&&$&&Object(r)===r&&$ in r?d.call(Y(r),8,-1):jt?"Object":"",wt=(vt||"function"!=typeof r.constructor?"":r.constructor.name?r.constructor.name+" ":"")+(Ot||jt?"["+W.call(x.call([],Ot||[],jt||[]),": ")+"] ":"");return 0===dt.length?wt+"{}":h?wt+"{"+bt(dt,h)+"}":wt+"{ "+W.call(dt,", ")+" }"}return String(r)};var V=Object.prototype.hasOwnProperty||function(t){return t in this};function X(t,e){return V.call(t,e)}function Y(t){return S.call(t)}function Z(t){if(t.name)return t.name;var e=m.call(h.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function tt(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function et(t){if(!n||!t||"object"!=typeof t)return!1;try{n.call(t);try{c.call(t)}catch(e){return!0}return t instanceof Map}catch(r){}return!1}function rt(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t,a);try{y.call(t,y)}catch(e){return!0}return t instanceof WeakMap}catch(r){}return!1}function nt(t){if(!b||!t||"object"!=typeof t)return!1;try{return b.call(t),!0}catch(e){}return!1}function ot(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{n.call(t)}catch(e){return!0}return t instanceof Set}catch(r){}return!1}function it(t){if(!y||!t||"object"!=typeof t)return!1;try{y.call(t,y);try{a.call(t,a)}catch(e){return!0}return t instanceof WeakSet}catch(r){}return!1}function ut(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}function ct(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ct(d.call(t,0,e.maxStringLength),e)+n}return D(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lt),"single",e)}function lt(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+j.call(e.toString(16))}function ft(t){return"Object("+t+")"}function at(t){return t+" { ? }"}function pt(t,e,r,n){return t+" ("+e+") {"+(n?bt(r,n):W.call(r,", "))+"}"}function yt(t){for(var e=0;e<t.length;e++)if(tt(t[e],"\n")>=0)return!1;return!0}function gt(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=W.call(Array(t.indent+1)," ")}return{base:r,prev:W.call(Array(e+1),r)}}function bt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+W.call(t,","+r)+"\n"+e.prev}function st(t,e){var r=C(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=X(t,o)?e(t[o],t):""}var i,u="function"==typeof _?_(t):[];if(T){i={};for(var c=0;c<u.length;c++)i["$"+u[c]]=u[c]}for(var l in t)X(t,l)&&(r&&String(Number(l))===l&&l<t.length||T&&i["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if("function"==typeof _)for(var f=0;f<u.length;f++)q.call(t,u[f])&&n.push("["+e(u[f])+"]: "+e(t[u[f]],t));return n}
116
100
  },{"./util.inspect":"sC8V"}],"lzf1":[function(require,module,exports) {
117
- "use strict";var e=require("get-intrinsic"),t=require("call-bind/callBound"),n=require("object-inspect"),r=require("es-errors/type"),o=e("%WeakMap%",!0),i=e("%Map%",!0),u=t("WeakMap.prototype.get",!0),f=t("WeakMap.prototype.set",!0),a=t("WeakMap.prototype.has",!0),p=t("Map.prototype.get",!0),c=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},y=function(e,t){var n=l(e,t);return n&&n.value},x=function(e,t,n){var r=l(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},v=function(e,t){return!!l(e,t)};module.exports=function(){var e,t,l,M={assert:function(e){if(!M.has(e))throw new r("Side channel does not contain "+n(e))},get:function(n){if(o&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(i){if(t)return p(t,n)}else if(l)return y(l,n)},has:function(n){if(o&&n&&("object"==typeof n||"function"==typeof n)){if(e)return a(e,n)}else if(i){if(t)return s(t,n)}else if(l)return v(l,n);return!1},set:function(n,r){o&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new o),f(e,n,r)):i?(t||(t=new i),c(t,n,r)):(l||(l={key:{},next:null}),x(l,n,r))}};return M};
118
- },{"get-intrinsic":"aOC8","call-bind/callBound":"nnGn","object-inspect":"nksM","es-errors/type":"aoYB"}],"XaX2":[function(require,module,exports) {
101
+ "use strict";var e=require("get-intrinsic"),t=require("call-bind/callBound"),n=require("object-inspect"),r=e("%TypeError%"),o=e("%WeakMap%",!0),i=e("%Map%",!0),u=t("WeakMap.prototype.get",!0),f=t("WeakMap.prototype.set",!0),a=t("WeakMap.prototype.has",!0),p=t("Map.prototype.get",!0),c=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},y=function(e,t){var n=l(e,t);return n&&n.value},x=function(e,t,n){var r=l(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},v=function(e,t){return!!l(e,t)};module.exports=function(){var e,t,l,M={assert:function(e){if(!M.has(e))throw new r("Side channel does not contain "+n(e))},get:function(n){if(o&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(i){if(t)return p(t,n)}else if(l)return y(l,n)},has:function(n){if(o&&n&&("object"==typeof n||"function"==typeof n)){if(e)return a(e,n)}else if(i){if(t)return s(t,n)}else if(l)return v(l,n);return!1},set:function(n,r){o&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new o),f(e,n,r)):i?(t||(t=new i),c(t,n,r)):(l||(l={key:{},next:null}),x(l,n,r))}};return M};
102
+ },{"get-intrinsic":"aOC8","call-bind/callBound":"nnGn","object-inspect":"nksM"}],"XaX2":[function(require,module,exports) {
119
103
  "use strict";var t=String.prototype.replace,r=/%20/g,C={RFC1738:"RFC1738",RFC3986:"RFC3986"};module.exports={default:C.RFC3986,formatters:{RFC1738:function(C){return t.call(C,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:C.RFC1738,RFC3986:C.RFC3986};
120
104
  },{}],"Qri1":[function(require,module,exports) {
121
105
  "use strict";var r=require("./formats"),e=Object.prototype.hasOwnProperty,t=Array.isArray,o=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),n=function(r){for(;r.length>1;){var e=r.pop(),o=e.obj[e.prop];if(t(o)){for(var n=[],c=0;c<o.length;++c)void 0!==o[c]&&n.push(o[c]);e.obj[e.prop]=n}}},c=function(r,e){for(var t=e&&e.plainObjects?Object.create(null):{},o=0;o<r.length;++o)void 0!==r[o]&&(t[o]=r[o]);return t},u=function r(o,n,u){if(!n)return o;if("object"!=typeof n){if(t(o))o.push(n);else{if(!o||"object"!=typeof o)return[o,n];(u&&(u.plainObjects||u.allowPrototypes)||!e.call(Object.prototype,n))&&(o[n]=!0)}return o}if(!o||"object"!=typeof o)return[o].concat(n);var f=o;return t(o)&&!t(n)&&(f=c(o,u)),t(o)&&t(n)?(n.forEach(function(t,n){if(e.call(o,n)){var c=o[n];c&&"object"==typeof c&&t&&"object"==typeof t?o[n]=r(c,t,u):o.push(t)}else o[n]=t}),o):Object.keys(n).reduce(function(t,o){var c=n[o];return e.call(t,o)?t[o]=r(t[o],c,u):t[o]=c,t},f)},f=function(r,e){return Object.keys(e).reduce(function(r,t){return r[t]=e[t],r},r)},p=function(r,e,t){var o=r.replace(/\+/g," ");if("iso-8859-1"===t)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(n){return o}},a=function(e,t,n,c,u){if(0===e.length)return e;var f=e;if("symbol"==typeof e?f=Symbol.prototype.toString.call(e):"string"!=typeof e&&(f=String(e)),"iso-8859-1"===n)return escape(f).replace(/%u[0-9a-f]{4}/gi,function(r){return"%26%23"+parseInt(r.slice(2),16)+"%3B"});for(var p="",a=0;a<f.length;++a){var i=f.charCodeAt(a);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||u===r.RFC1738&&(40===i||41===i)?p+=f.charAt(a):i<128?p+=o[i]:i<2048?p+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?p+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(a+=1,i=65536+((1023&i)<<10|1023&f.charCodeAt(a)),p+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return p},i=function(r){for(var e=[{obj:{o:r},prop:"o"}],t=[],o=0;o<e.length;++o)for(var c=e[o],u=c.obj[c.prop],f=Object.keys(u),p=0;p<f.length;++p){var a=f[p],i=u[a];"object"==typeof i&&null!==i&&-1===t.indexOf(i)&&(e.push({obj:u,prop:a}),t.push(i))}return n(e),r},s=function(r){return"[object RegExp]"===Object.prototype.toString.call(r)},l=function(r){return!(!r||"object"!=typeof r)&&!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))},b=function(r,e){return[].concat(r,e)},y=function(r,e){if(t(r)){for(var o=[],n=0;n<r.length;n+=1)o.push(e(r[n]));return o}return e(r)};module.exports={arrayToObject:c,assign:f,combine:b,compact:i,decode:p,encode:a,isBuffer:l,isRegExp:s,maybeMap:y,merge:u};
@@ -126,29 +110,29 @@ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnProper
126
110
  },{"./utils":"Qri1"}],"hIRQ":[function(require,module,exports) {
127
111
  "use strict";var r=require("./stringify"),e=require("./parse"),s=require("./formats");module.exports={formats:s,parse:e,stringify:r};
128
112
  },{"./stringify":"mwZo","./parse":"snX5","./formats":"XaX2"}],"hDvy":[function(require,module,exports) {
129
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHubHttpsService=void 0;var t=n(require("axios")),e=require("./utils.js"),r=n(require("qs"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),u=new q(n||[]);return a(i,"_invoke",{value:O(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var P={};l(P,s,function(){return this});var x=Object.getPrototypeOf,L=x&&x(x(H([])));L&&L!==r&&n.call(L,s)&&(P=L);var T=E.prototype=w.prototype=Object.create(P);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function S(t,e){function r(i,a,u,s){var c=p(t[i],t,a);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==o(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,u,s)},function(t){r("throw",t,u,s)}):e.resolve(l).then(function(t){f.value=t,u(f)},function(t){return r("throw",t,u,s)})}s(c.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=R(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=p(e,r,n);if("normal"===c.type){if(o=n.done?m:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function H(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return b.prototype=E,a(T,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},e.awrap=function(t){return{__await:t}},k(S.prototype),l(S.prototype,c,function(){return this}),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(T),l(T,f,"Generator"),l(T,s,function(){return this}),l(T,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=H,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:H(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,s,"next",t)}function s(t){a(i,n,o,u,s,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=h(t,"string");return"symbol"==o(e)?e:String(e)}function h(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p=exports.GudHubHttpsService=function(){function n(t){s(this,n),this.root=t,this.requestPromises=[]}return f(n,[{key:"init",value:function(t){this.getToken=t}},{key:"get",value:function(){var r=u(i().mark(function r(n){var o,a,u,s=this;return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getToken();case 2:if(o=r.sent,a=this.getHashCode(n),!this.requestPromises[a]){r.next=6;break}return r.abrupt("return",this.requestPromises[a].promise);case 6:return u=new Promise(function(r,i){var a;n.externalResource?a=n.url:(a=s.root+n.url,a="".concat(a).concat(/\?/.test(a)?"&":"?","token=").concat(o).concat((0,e.convertObjToUrlParams)(n.params))),t.default.get(a,{validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.status),t),r(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),t.response&&t.response.data&&console.log("Error response data: ",t.response.data),i(t)})}),this.pushPromise(u,a),r.abrupt("return",u);case 9:case"end":return r.stop()}},r,this)}));return function(t){return r.apply(this,arguments)}}()},{key:"post",value:function(){var e=u(i().mark(function e(n){var o,a,u=this;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getHashCode(n),e.next=3,this.getToken();case 3:if(n.form.token=e.sent,!this.requestPromises[o]){e.next=6;break}return e.abrupt("return",this.requestPromises[o].promise);case 6:return a=new Promise(function(e,o){t.default.post(u.root+n.url,r.default.stringify(n.form),{maxBodyLength:1/0,headers:n.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.status),t),e(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),o(t)})}),this.pushPromise(a,o),e.abrupt("return",a);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"axiosRequest",value:function(e){var n=this.getHashCode(e);if(this.requestPromises[n])return this.requestPromises[n].promise;var o=e.method?e.method.toLowerCase():"get",a=e.url,s=e.headers||{};e.form&&(s["Content-Type"]="application/x-www-form-urlencoded");var c=new Promise(function(){var n=u(i().mark(function n(u,c){var f,l;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.default[o](a,"post"===o?r.default.stringify(e.form)||e.body:{headers:s},"post"===o?{headers:s}:{});case 3:f=n.sent,l=f.data,u(l),n.next=13;break;case 8:n.prev=8,n.t0=n.catch(0),console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",n.t0.message),console.log("Request message: ",e),c(n.t0);case 13:case"end":return n.stop()}},n,null,[[0,8]])}));return function(t,e){return n.apply(this,arguments)}}());return this.pushPromise(c,n),c}},{key:"pushPromise",value:function(t,e){var r=this;this.requestPromises[e]={promise:t,hesh:e,callback:t.then(function(){r.destroyPromise(e)}).catch(function(t){r.destroyPromise(e)})}}},{key:"destroyPromise",value:function(t){this.requestPromises=this.requestPromises.filter(function(e){return e.hesh!==t})}},{key:"getHashCode",value:function(t){var e=0,n=r.default.stringify(t);if(0==n.length)return e;for(var o=0;o<n.length;o++){e=(e<<5)-e+n.charCodeAt(o),e&=e}return"h"+e}}]),n}();
113
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHubHttpsService=void 0;var t=n(require("axios")),e=require("./utils.js"),r=n(require("qs"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),u=new q(n||[]);return a(i,"_invoke",{value:O(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var P={};l(P,s,function(){return this});var x=Object.getPrototypeOf,L=x&&x(x(H([])));L&&L!==r&&n.call(L,s)&&(P=L);var T=E.prototype=w.prototype=Object.create(P);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function S(t,e){function r(i,a,u,s){var c=p(t[i],t,a);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==o(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,u,s)},function(t){r("throw",t,u,s)}):e.resolve(l).then(function(t){f.value=t,u(f)},function(t){return r("throw",t,u,s)})}s(c.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=R(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=p(e,r,n);if("normal"===c.type){if(o=n.done?m:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function H(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return b.prototype=E,a(T,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},e.awrap=function(t){return{__await:t}},k(S.prototype),l(S.prototype,c,function(){return this}),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(T),l(T,f,"Generator"),l(T,s,function(){return this}),l(T,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=H,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:H(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,s,"next",t)}function s(t){a(i,n,o,u,s,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=h(t,"string");return"symbol"===o(e)?e:String(e)}function h(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p=exports.GudHubHttpsService=function(){function n(t){s(this,n),this.root=t,this.requestPromises=[]}return f(n,[{key:"init",value:function(t){this.getToken=t}},{key:"get",value:function(){var r=u(i().mark(function r(n){var o,a,u,s=this;return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getToken();case 2:if(o=r.sent,a=this.getHashCode(n),!this.requestPromises[a]){r.next=6;break}return r.abrupt("return",this.requestPromises[a].promise);case 6:return u=new Promise(function(r,i){var a;n.externalResource?a=n.url:(a=s.root+n.url,a="".concat(a).concat(/\?/.test(a)?"&":"?","token=").concat(o).concat((0,e.convertObjToUrlParams)(n.params))),t.default.get(a,{validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.status),t),r(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),t.response&&t.response.data&&console.log("Error response data: ",t.response.data),i(t)})}),this.pushPromise(u,a),r.abrupt("return",u);case 9:case"end":return r.stop()}},r,this)}));return function(t){return r.apply(this,arguments)}}()},{key:"post",value:function(){var e=u(i().mark(function e(n){var o,a,u=this;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getHashCode(n),e.next=3,this.getToken();case 3:if(n.form.token=e.sent,!this.requestPromises[o]){e.next=6;break}return e.abrupt("return",this.requestPromises[o].promise);case 6:return a=new Promise(function(e,o){t.default.post(u.root+n.url,r.default.stringify(n.form),{maxBodyLength:1/0,headers:n.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.status),t),e(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),o(t)})}),this.pushPromise(a,o),e.abrupt("return",a);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"axiosRequest",value:function(e){var n=this.getHashCode(e);if(this.requestPromises[n])return this.requestPromises[n].promise;var o=e.method?e.method.toLowerCase():"get",a=e.url,s=e.headers||{};e.form&&(s["Content-Type"]="application/x-www-form-urlencoded");var c=new Promise(function(){var n=u(i().mark(function n(u,c){var f,l;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.default[o](a,"post"===o?r.default.stringify(e.form)||e.body:{headers:s},"post"===o?{headers:s}:{});case 3:f=n.sent,l=f.data,u(l),n.next=13;break;case 8:n.prev=8,n.t0=n.catch(0),console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",n.t0.message),console.log("Request message: ",e),c(n.t0);case 13:case"end":return n.stop()}},n,null,[[0,8]])}));return function(t,e){return n.apply(this,arguments)}}());return this.pushPromise(c,n),c}},{key:"pushPromise",value:function(t,e){var r=this;this.requestPromises[e]={promise:t,hesh:e,callback:t.then(function(){r.destroyPromise(e)}).catch(function(t){r.destroyPromise(e)})}}},{key:"destroyPromise",value:function(t){this.requestPromises=this.requestPromises.filter(function(e){return e.hesh!==t})}},{key:"getHashCode",value:function(t){var e=0,n=r.default.stringify(t);if(0==n.length)return e;for(var o=0;o<n.length;o++){e=(e<<5)-e+n.charCodeAt(o),e&=e}return"h"+e}}]),n}();
130
114
  },{"axios":"O4Aa","./utils.js":"EgeI","qs":"hIRQ"}],"Lc8J":[function(require,module,exports) {
131
115
  "use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(e)}function e(o){var e="";for(var t in o)o.hasOwnProperty(t)&&o[t]&&(e+="."+o[t]);return e?e.substring(1):"any"}function t(e,t,n){return null==e||"string"!=typeof e?(console.log("Listener type is \"undefined\" or not have actual 'type' for subscribe"),!1):null==t||"object"!==o(t)?(console.log("Listener destination is \"undefined\" or not have actual 'type' for subscribe"),!1):"function"==typeof n||(console.log("Listener is not a function for subscribe!"),!1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkParams=t,exports.createId=e;
132
116
  },{}],"E3xI":[function(require,module,exports) {
133
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PipeService=void 0;var e=require("./utils.js");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e){return s(e)||i(e)||o(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,r){if(e){if("string"==typeof e)return u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,r):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function c(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,r,t){return r&&c(e.prototype,r),t&&c(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=b(e,"string");return"symbol"==r(t)?t:String(t)}function b(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=exports.PipeService=function(){function r(){a(this,r),this.subscribers={},this.messageBox={}}return f(r,[{key:"on",value:function(r,t,n){var o=this;return(0,e.checkParams)(r,t,n)&&r.split(" ").map(function(r){return r+":"+(0,e.createId)(t)}).forEach(function(e){o.subscribers[e]||(o.subscribers[e]=new Set),o.subscribers[e].add(n),o.checkMessageBox(e)}),this}},{key:"emit",value:function(r,t,n,o){var i=this;return r.split(" ").forEach(function(s){var u=s+":"+(0,e.createId)(t);if(i.subscribers[u]){if(0==i.subscribers[u].size)return i.messageBox[u]=[r,t,n,o,!1],i;i.subscribers[u].forEach(function(e){e(null,n,o)})}else i.messageBox[u]=[r,t,n,o,!1]}),this}},{key:"onRoot",value:function(e,r,t){return this.on(e,r,t)}},{key:"destroy",value:function(r,t,n){var o=this;return r.split(" ").forEach(function(r){var i=r+":"+(0,e.createId)(t);o.subscribers[i]&&n&&o.subscribers[i].delete(n),o.subscribers[i]&&!n&&delete o.subscribers[i]}),this}},{key:"checkMessageBox",value:function(e){var r=this;this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(function(){r.messageBox[e]&&(r.emit.apply(r,t(r.messageBox[e])),r.messageBox[e][4]=!0)},0)}},{key:"cleanMesssageBox",value:function(){for(var e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}]),r}();
117
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PipeService=void 0;var e=require("./utils.js");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e){return s(e)||i(e)||o(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,r){if(e){if("string"==typeof e)return u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,r):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function c(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,r,t){return r&&c(e.prototype,r),t&&c(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=b(e,"string");return"symbol"===r(t)?t:String(t)}function b(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=exports.PipeService=function(){function r(){a(this,r),this.subscribers={},this.messageBox={}}return f(r,[{key:"on",value:function(r,t,n){var o=this;return(0,e.checkParams)(r,t,n)&&r.split(" ").map(function(r){return r+":"+(0,e.createId)(t)}).forEach(function(e){o.subscribers[e]||(o.subscribers[e]=new Set),o.subscribers[e].add(n),o.checkMessageBox(e)}),this}},{key:"emit",value:function(r,t,n,o){var i=this;return r.split(" ").forEach(function(s){var u=s+":"+(0,e.createId)(t);if(i.subscribers[u]){if(0==i.subscribers[u].size)return i.messageBox[u]=[r,t,n,o,!1],i;i.subscribers[u].forEach(function(e){e(null,n,o)})}else i.messageBox[u]=[r,t,n,o,!1]}),this}},{key:"onRoot",value:function(e,r,t){return this.on(e,r,t)}},{key:"destroy",value:function(r,t,n){var o=this;return r.split(" ").forEach(function(r){var i=r+":"+(0,e.createId)(t);o.subscribers[i]&&n&&o.subscribers[i].delete(n),o.subscribers[i]&&!n&&delete o.subscribers[i]}),this}},{key:"checkMessageBox",value:function(e){var r=this;this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(function(){r.messageBox[e]&&(r.emit.apply(r,t(r.messageBox[e])),r.messageBox[e][4]=!0)},0)}},{key:"cleanMesssageBox",value:function(){for(var e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}]),r}();
134
118
  },{"./utils.js":"Lc8J"}],"FJWL":[function(require,module,exports) {
135
119
  "use strict";function e(e,t,a){return[{data_type:"text",name:"Text",icon:"text_icon",url:t+"/"+e+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:t+"/"+e+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:t+"/"+e+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:t+"/"+e+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:t+"/"+e+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:t+"/"+e+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:t+"/"+e+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:t+"/"+e+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:t+"/"+e+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:t+"/"+e+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:t+"/"+e+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:t+"/"+e+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:t+"/"+e+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:t+"/"+e+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:t+"/"+e+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:t+"/"+e+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:t+"/"+e+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=4",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:t+"/"+e+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:t+"/"+e+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:t+"/"+e+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:t+"/"+e+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:t+"/"+e+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:t+"/"+e+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:t+"/"+e+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:t+"/"+e+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:t+"/"+e+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:t+"/"+e+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:t+"/"+e+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:t+"/"+e+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:t+"/"+e+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:t+"/"+e+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:t+"/"+e+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:t+"/"+e+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:t+"/"+e+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:t+"/"+e+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:t+"/"+e+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:t+"/"+e+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:t+"/"+e+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:t+"/"+e+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:t+"/"+e+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:t+"/"+e+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:t+"/"+e+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:t+"/"+e+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:t+"/"+e+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:t+"/"+e+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:t+"/"+e+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:t+"/"+e+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:t+"/"+e+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:t+"/"+e+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:t+"/"+e+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:t+"/"+e+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:t+"/"+e+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:t+"/"+e+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:t+"/"+e+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:t+"/"+e+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:t+"/"+e+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:t+"/"+e+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:t+"/"+e+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:t+"/"+e+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:t+"/"+e+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:t+"/"+e+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:t+"/"+e+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:t+"/"+e+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:t+"/"+e+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:t+"/"+e+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:t+"/"+e+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:t+"/"+e+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:t+"/"+e+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:t+"/"+e+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:t+"/"+e+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:t+"/"+e+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:t+"/"+e+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:t+"/"+e+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:t+"/"+e+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:t+"/"+e+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:t+"/"+e+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:t+"/"+e+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:t+"/"+e+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:t+"/"+e+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:t+"/"+e+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:t+"/"+e+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:t+"/"+e+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:t+"/"+e+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:t+"/"+e+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:t+"/"+e+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:t+"/"+e+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:t+"/"+e+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:t+"/"+e+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:t+"/"+e+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:t+"/"+e+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:t+"/"+e+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:t+"/"+e+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:t+"/"+e+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:t+"/"+e+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:t+"/"+e+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:t+"/"+e+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:t+"/"+e+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:t+"/"+e+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:t+"/"+e+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:t+"/"+e+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:t+"/"+e+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:t+"/"+e+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:t+"/"+e+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=1",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"API",name:"API",url:t+"/"+a+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:t+"/"+a+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:t+"/"+a+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:t+"/"+a+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:t+"/"+a+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:t+"/"+a+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:t+"/"+a+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:t+"/"+a+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:t+"/"+a+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:t+"/"+a+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:t+"/"+a+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:t+"/"+a+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:t+"/"+a+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:t+"/"+a+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:t+"/"+a+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:t+"/"+a+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:t+"/"+a+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:t+"/"+a+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:t+"/"+a+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:t+"/"+a+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:t+"/"+a+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:t+"/"+a+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:t+"/"+a+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:t+"/"+a+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:t+"/"+a+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:t+"/"+a+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:t+"/"+a+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:t+"/"+a+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:t+"/"+a+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:t+"/"+a+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:t+"/"+a+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:t+"/"+a+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:t+"/"+a+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:t+"/"+a+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:t+"/"+a+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:t+"/"+a+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:t+"/"+a+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:t+"/"+a+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:t+"/"+a+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:t+"/"+a+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:t+"/"+a+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:t+"/"+a+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:t+"/"+a+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:t+"/"+a+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:t+"/"+a+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:t+"/"+a+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:t+"/"+a+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:t+"/"+a+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:t+"/"+a+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:t+"/"+a+"turbo_sms.js",type:"automation",icon:"email"}]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
136
120
  },{}],"CSHe":[function(require,module,exports) {
137
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Storage=void 0;var t=e(require("./ModulesList.js"));function e(t){return t&&t.__esModule?t:{default:t}}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t){return u(t)||a(t)||o(t)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return s(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function _(){}var L={};f(L,u,function(){return this});var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==n&&i.call(j,u)&&(L=j);var x=_.prototype=b.prototype=Object.create(L);function k(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){function n(o,a,u,s){var c=h(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,s)})}s(c.arg)}var a;o(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,i){n(t,r,e,i)})}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=y;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=_,o(x,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(E.prototype),f(E.prototype,s,function(){return this}),e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new E(p(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(x),f(x,l,"Generator"),f(x,u,function(){return this}),f(x,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,u,"next",t)}function u(t){l(o,n,i,a,u,"throw",t)}a(void 0)})}}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){y(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function y(t,e,r){return(e=g(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g(n.key),n)}}function m(t,e,r){return e&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t){var e=b(t,"string");return"symbol"==r(e)?e:String(e)}function b(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=exports.Storage=function(){function e(r,n,i){v(this,e),this.apps_list=[],this.users_list=[],this.user={},this.modulesList=(0,t.default)(r,n,i),this.ghComponentsPromises=[]}return m(e,[{key:"getMainStorage",value:function(){return this}},{key:"getAppsList",value:function(){return this.apps_list}},{key:"getUser",value:function(){return this.user}},{key:"getUsersList",value:function(){return this.users_list}},{key:"getModulesList",value:function(t,e,r){return void 0===t?this.modulesList:0==e?this.modulesList.filter(function(e){return e.created_for?e.type===t&&e.private&&e.created_for.includes(r):e.type===t&&!e.private}):this.modulesList.filter(function(e){return e.type===t})}},{key:"getModuleUrl",value:function(t){return this.modulesList.find(function(e){return e.data_type==t})}},{key:"setUser",value:function(t){this.user=t,this.users_list.push(t)}},{key:"updateUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.avatar_128&&(t.avatar_128=t.avatar_128+"?"+(new Date).getTime()),t.avatar_512&&(t.avatar_512=t.avatar_512+"?"+(new Date).getTime()),this.user=h(h({},this.user),t),this.users_list=this.users_list.filter(function(e){return e.user_id!=t.user_id}),this.users_list.push(this.user)}},{key:"unsetUser",value:function(){this.user={}}},{key:"getApp",value:function(t){for(var e=0;e<this.apps_list.length;e++)if(this.apps_list[e].app_id==t)return this.apps_list[e]}},{key:"unsetApps",value:function(){this.apps_list=[]}},{key:"updateApp",value:function(t){return this.apps_list=this.apps_list.map(function(e){return e.app_id==t.app_id?t:e}),this.apps_list}},{key:"deleteApp",value:function(t){return this.apps_list=this.apps_list.filter(function(e){return e.app_id!=t}),this.apps_list}},{key:"updateItemsInApp",value:function(){var t=f(c().mark(function t(e,r){var n;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(n=t.sent)&&(n.items_list=updateItems(e,n.items_list,this.pipeService.emit.bind(this.pipeService),r),this.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"addItemsToApp",value:function(){var t=f(c().mark(function t(e,r){var i,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(i=t.sent)&&((o=i.items_list).push.apply(o,n(e)),this.updateApp(i),this.pipeService.emit("gh_items_update",{app_id:r},e)),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsInApp",value:function(){var t=f(c().mark(function t(e,r){var n;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(n=t.sent)&&(n.items_list=n.items_list.filter(function(t){return!e.find(function(e){return e.item_id==t.item_id})}),this.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}]),e}();
121
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Storage=void 0;var t=e(require("./ModulesList.js"));function e(t){return t&&t.__esModule?t:{default:t}}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t){return u(t)||a(t)||o(t)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return s(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function _(){}var L={};f(L,u,function(){return this});var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==n&&i.call(j,u)&&(L=j);var x=_.prototype=b.prototype=Object.create(L);function k(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){function n(o,a,u,s){var c=h(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,s)})}s(c.arg)}var a;o(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,i){n(t,r,e,i)})}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=y;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=_,o(x,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(E.prototype),f(E.prototype,s,function(){return this}),e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new E(p(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(x),f(x,l,"Generator"),f(x,u,function(){return this}),f(x,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,u,"next",t)}function u(t){l(o,n,i,a,u,"throw",t)}a(void 0)})}}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){y(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function y(t,e,r){return(e=g(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g(n.key),n)}}function m(t,e,r){return e&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t){var e=b(t,"string");return"symbol"===r(e)?e:String(e)}function b(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=exports.Storage=function(){function e(r,n,i){v(this,e),this.apps_list=[],this.users_list=[],this.user={},this.modulesList=(0,t.default)(r,n,i),this.ghComponentsPromises=[]}return m(e,[{key:"getMainStorage",value:function(){return this}},{key:"getAppsList",value:function(){return this.apps_list}},{key:"getUser",value:function(){return this.user}},{key:"getUsersList",value:function(){return this.users_list}},{key:"getModulesList",value:function(t,e,r){return void 0===t?this.modulesList:0==e?this.modulesList.filter(function(e){return e.created_for?e.type===t&&e.private&&e.created_for.includes(r):e.type===t&&!e.private}):this.modulesList.filter(function(e){return e.type===t})}},{key:"getModuleUrl",value:function(t){return this.modulesList.find(function(e){return e.data_type==t})}},{key:"setUser",value:function(t){this.user=t,this.users_list.push(t)}},{key:"updateUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.avatar_128&&(t.avatar_128=t.avatar_128+"?"+(new Date).getTime()),t.avatar_512&&(t.avatar_512=t.avatar_512+"?"+(new Date).getTime()),this.user=h(h({},this.user),t),this.users_list=this.users_list.filter(function(e){return e.user_id!=t.user_id}),this.users_list.push(this.user)}},{key:"unsetUser",value:function(){this.user={}}},{key:"getApp",value:function(t){for(var e=0;e<this.apps_list.length;e++)if(this.apps_list[e].app_id==t)return this.apps_list[e]}},{key:"unsetApps",value:function(){this.apps_list=[]}},{key:"updateApp",value:function(t){return this.apps_list=this.apps_list.map(function(e){return e.app_id==t.app_id?t:e}),this.apps_list}},{key:"deleteApp",value:function(t){return this.apps_list=this.apps_list.filter(function(e){return e.app_id!=t}),this.apps_list}},{key:"updateItemsInApp",value:function(){var t=f(c().mark(function t(e,r){var n;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(n=t.sent)&&(n.items_list=updateItems(e,n.items_list,this.pipeService.emit.bind(this.pipeService),r),this.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"addItemsToApp",value:function(){var t=f(c().mark(function t(e,r){var i,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(i=t.sent)&&((o=i.items_list).push.apply(o,n(e)),this.updateApp(i),this.pipeService.emit("gh_items_update",{app_id:r},e)),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsInApp",value:function(){var t=f(c().mark(function t(e,r){var n;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(n=t.sent)&&(n.items_list=n.items_list.filter(function(t){return!e.find(function(e){return e.item_id==t.item_id})}),this.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}]),e}();
138
122
  },{"./ModulesList.js":"FJWL"}],"p58b":[function(require,module,exports) {
139
123
  "use strict";module.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};
140
124
  },{}],"pHMV":[function(require,module,exports) {
141
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketApi=void 0;var t=e(require("ws"));function e(t){return t&&t.__esModule?t:{default:t}}function r(){r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var v="suspendedStart",y="suspendedYield",d="executing",w="completed",g={};function m(){}function b(){}function k(){}var x={};f(x,s,function(){return this});var E=Object.getPrototypeOf,L=E&&E(E(H([])));L&&L!==n&&o.call(L,s)&&(x=L);var _=k.prototype=m.prototype=Object.create(x);function S(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function T(t,e){function r(n,a,c,s){var u=p(t[n],t,a);if("throw"!==u.type){var h=u.arg,f=h.value;return f&&"object"==i(f)&&o.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,c,s)},function(t){r("throw",t,c,s)}):e.resolve(f).then(function(t){h.value=t,c(h)},function(t){return r("throw",t,c,s)})}s(u.arg)}var n;a(this,"_invoke",{value:function(t,o){function i(){return new e(function(e,n){r(t,o,e,n)})}return n=n?n.then(i,i):i()}})}function O(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===w){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=j(c,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=p(e,r,n);if("normal"===u.type){if(o=n.done?w:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=w,n.method="throw",n.arg=u.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function H(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=k,a(_,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:b,configurable:!0}),b.displayName=f(k,h,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,f(t,h,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(T.prototype),f(T.prototype,u,function(){return this}),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(_),f(_,h,"Generator"),f(_,s,function(){return this}),f(_,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=H,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:H(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)})}}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=h(t,"string");return"symbol"==i(e)?e:String(e)}function h(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f=exports.WebSocketApi=function(){function e(t,r){a(this,e),this.websocket=null,this.connected=!1,this.queue=[],this.url=t,this.auth=r,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=!["undefined"==typeof window?"undefined":i(window),"undefined"==typeof document?"undefined":i(document)].includes("undefined")}return s(e,[{key:"addSubscription",value:function(){var t=o(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.auth.getToken();case 2:n=t.sent,o="token=".concat(n,"/~/app_id=").concat(e),this.connected&&this.websocket.send(o),this.queue.push(e);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"onOpen",value:function(){var t=o(r().mark(function t(){var e,n=this;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.reload=!0,console.log("websocket opened"),this.connected=!0,t.next=5,this.auth.getToken();case 5:e=t.sent,this.queue.forEach(function(t){var r="token=".concat(e,"/~/app_id=").concat(t);n.websocket.send(r)});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onError",value:function(t){console.log("websocket error: ",t),this.websocket.close()}},{key:"onClose",value:function(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(t){console.log(t)}}},{key:"onMessage",value:function(){var t=o(r().mark(function t(e){var n,o,i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=this.isBrowser?e.data:e).match(/HeartBeat/)){t.next=10;break}if(o=(new Date).getTime()-this.heartBeatTimeStemp,!(this.ALLOWED_HEART_BEAT_DELEY<o)){t.next=8;break}return t.next=6,this.onConnectionLost();case 6:t.next=10;break;case 8:this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=(new Date).getTime();case 10:if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),!n.match(/[{}]/)){t.next=17;break}return i=JSON.parse(n),t.next=15,this.auth.getToken();case 15:a=t.sent,i.token!=a&&this.onMassageHandler(i);case 17:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"initWebSocket",value:function(e,r){this.onMassageHandler=e,this.refreshAppsHandler=r,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new t.default(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}},{key:"connectionChecker",value:function(){var t=this;setInterval(o(r().mark(function e(){var n;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new Date).getTime()-t.heartBeatTimeStemp,!(t.ALLOWED_HEART_BEAT_DELEY<n)){e.next=4;break}return e.next=4,t.onConnectionLost();case 4:case"end":return e.stop()}},e)})),1e3)}},{key:"onConnectionLost",value:function(){var t=o(r().mark(function t(){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.auth.getVersion();case 3:this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close()),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0);case 9:case"end":return t.stop()}},t,this,[[0,6]])}));return function(){return t.apply(this,arguments)}}()}]),e}();
125
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketApi=void 0;var t=e(require("ws"));function e(t){return t&&t.__esModule?t:{default:t}}function r(){r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var v="suspendedStart",y="suspendedYield",d="executing",w="completed",g={};function m(){}function b(){}function k(){}var x={};l(x,s,function(){return this});var E=Object.getPrototypeOf,L=E&&E(E(H([])));L&&L!==n&&o.call(L,s)&&(x=L);var _=k.prototype=m.prototype=Object.create(x);function S(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function T(t,e){function r(n,a,c,s){var u=p(t[n],t,a);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==i(l)&&o.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,c,s)},function(t){r("throw",t,c,s)}):e.resolve(l).then(function(t){h.value=t,c(h)},function(t){return r("throw",t,c,s)})}s(u.arg)}var n;a(this,"_invoke",{value:function(t,o){function i(){return new e(function(e,n){r(t,o,e,n)})}return n=n?n.then(i,i):i()}})}function O(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===w){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=j(c,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=p(e,r,n);if("normal"===u.type){if(o=n.done?w:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=w,n.method="throw",n.arg=u.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function H(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=k,a(_,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:b,configurable:!0}),b.displayName=l(k,h,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,l(t,h,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(T.prototype),l(T.prototype,u,function(){return this}),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(_),l(_,h,"Generator"),l(_,s,function(){return this}),l(_,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=H,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:H(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)})}}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=h(t,"string");return"symbol"===i(e)?e:String(e)}function h(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var l=exports.WebSocketApi=function(){function e(t,r){a(this,e),this.websocket=null,this.connected=!1,this.queue=[],this.url=t,this.auth=r,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=!["undefined"==typeof window?"undefined":i(window),"undefined"==typeof document?"undefined":i(document)].includes("undefined")}return s(e,[{key:"addSubscription",value:function(){var t=o(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.auth.getToken();case 2:n=t.sent,o="token=".concat(n,"/~/app_id=").concat(e),this.connected&&this.websocket.send(o),this.queue.push(e);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"onOpen",value:function(){var t=o(r().mark(function t(){var e,n=this;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.reload=!0,console.log("websocket opened"),this.connected=!0,t.next=5,this.auth.getToken();case 5:e=t.sent,this.queue.forEach(function(t){var r="token=".concat(e,"/~/app_id=").concat(t);n.websocket.send(r)});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onError",value:function(t){console.log("websocket error: ",t),this.websocket.close()}},{key:"onClose",value:function(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(t){console.log(t)}}},{key:"onMessage",value:function(){var t=o(r().mark(function t(e){var n,o,i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=this.isBrowser?e.data:e).match(/HeartBeat/)){t.next=10;break}if(o=(new Date).getTime()-this.heartBeatTimeStemp,!(this.ALLOWED_HEART_BEAT_DELEY<o)){t.next=8;break}return t.next=6,this.onConnectionLost();case 6:t.next=10;break;case 8:this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=(new Date).getTime();case 10:if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),!n.match(/[{}]/)){t.next=17;break}return i=JSON.parse(n),t.next=15,this.auth.getToken();case 15:a=t.sent,i.token!=a&&this.onMassageHandler(i);case 17:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"initWebSocket",value:function(e,r){this.onMassageHandler=e,this.refreshAppsHandler=r,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new t.default(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}},{key:"connectionChecker",value:function(){var t=this;setInterval(o(r().mark(function e(){var n;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new Date).getTime()-t.heartBeatTimeStemp,!(t.ALLOWED_HEART_BEAT_DELEY<n)){e.next=4;break}return e.next=4,t.onConnectionLost();case 4:case"end":return e.stop()}},e)})),1e3)}},{key:"onConnectionLost",value:function(){var t=o(r().mark(function t(){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.auth.getVersion();case 3:this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close()),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0);case 9:case"end":return t.stop()}},t,this,[[0,6]])}));return function(){return t.apply(this,arguments)}}()}]),e}();
142
126
  },{"ws":"p58b"}],"TPH7":[function(require,module,exports) {
143
127
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wss_url=exports.server_url=exports.port=exports.node_server_url=exports.file_server_url=exports.cache_chunk_requests=exports.cache_app_requests=exports.automation_modules_path=exports.async_modules_path=void 0;var e=exports.server_url="https://gudhub.com/GudHub_Test",s=exports.wss_url="wss://gudhub.com/GudHub/ws/app/",r=exports.node_server_url="https://gudhub.com/api/services/prod",t=exports.async_modules_path="build/latest/async_modules_node/",o=exports.automation_modules_path="build/latest/automation_modules/",u=exports.file_server_url="https://gudhub.com",p=exports.cache_chunk_requests=!0,_=exports.cache_app_requests=!0,a=exports.port=9e3;
144
128
  },{}],"DvAj":[function(require,module,exports) {
145
129
  "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(r){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),u=new G(n||[]);return i(a,"_invoke",{value:O(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function _(){}var x={};s(x,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(I([])));E&&E!==o&&a.call(E,c)&&(x=E);var S=_.prototype=b.prototype=Object.create(x);function k(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function A(e,r){function n(o,i,u,c){var l=p(e[o],e,i);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==t(s)&&a.call(s,"__await")?r.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(s).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(l.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(a,a):a()}})}function O(t,e,n){var o=y;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(t,e,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function j(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,m;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=_,i(S,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:w,configurable:!0}),w.displayName=s(_,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s(t,f,"GeneratorFunction")),t.prototype=Object.create(S),t},n.awrap=function(t){return{__await:t}},k(A.prototype),s(A.prototype,l,function(){return this}),n.AsyncIterator=A,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new A(h(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},k(S),s(S,f,"Generator"),s(S,c,function(){return this}),s(S,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=I,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t){return a(t)||o(t)||u(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return c(t)}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=u(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function f(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){l(a,n,o,i,u,"next",t)}function u(t){l(a,n,o,i,u,"throw",t)}i(void 0)})}}function s(t,e,r){return h.apply(this,arguments)}function h(){return(h=f(e().mark(function t(n,o,a){var u,c,l,f,s,h,p,y,v,d,g,m,b,w,_,x=arguments;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(_=function(t){return new Promise(function(e){a.on("gh_value_get",t,function r(n,o){a.destroy("gh_value_get",t,r),e(o)}).emit("gh_value_get",{},t)})},u=x.length>3&&void 0!==x[3]?x[3]:{},c=[],l={variableMethodcurrent_app:function(){return[u.current_app_id||u.app_id]},variableMethodelement_app:function(){return[u.element_app_id]},variableMethodcurrent_item:function(){return["".concat(u.current_app_id||u.app_id,".").concat(u.item_id)]},variableMethoduser_id:function(){return[o.getUser().user_id]},variableMethoduser_email:function(t){return[o.getUser().username]},variableMethodtoday:function(t){var e=new Date,r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);return[r.valueOf().toString()+":"+n.valueOf().toString()]},variableMethodvariable:function(t){return[u[t]]}},!n){t.next=40;break}f=i(n),t.prev=6,f.s();case 8:if((s=f.n()).done){t.next=32;break}if(!(h=s.value)){t.next=29;break}t.t0=h.input_type,t.next="variable"===t.t0?14:"field"===t.t0?19:25;break;case 14:h.valuesArray=[],p=i(null==h?void 0:h.input_value.split(","));try{for(p.s();!(y=p.n()).done;)v=y.value,d=h.input_type+"Method"+v,"function"==typeof(g=l[d])?h.valuesArray?(m=h.valuesArray).push.apply(m,r(g())):h.valuesArray=g():h.valuesArray?(b=h.valuesArray).push.apply(b,r(l.variableMethodvariable(v))):h.valuesArray=l.variableMethodvariable(v)}catch(e){p.e(e)}finally{p.f()}return c.push(h),t.abrupt("break",27);case 19:return t.next=21,_({app_id:u.current_app_id||u.app_id,item_id:u.item_id,field_id:h.input_value});case 21:return null!=(w=t.sent)&&h.valuesArray.push(w),c.push(h),t.abrupt("break",27);case 25:return c.push(h),t.abrupt("break",27);case 27:t.next=30;break;case 29:c.push(h);case 30:t.next=8;break;case 32:t.next=37;break;case 34:t.prev=34,t.t1=t.catch(6),f.e(t.t1);case 37:return t.prev=37,f.f(),t.finish(37);case 40:return t.abrupt("return",c);case 41:case"end":return t.stop()}},t,null,[[6,34,37,40]])}))).apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterPreparation=s;
146
130
  },{}],"jqRt":[function(require,module,exports) {
147
- "use strict";function e(e,n,o){return n=i(n),t(e,r()?Reflect.construct(n,o||[],i(e).constructor):n.apply(e,o))}function t(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)}function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return l(e)||h(e)||u(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e){var t=M(e,"string");return"symbol"==b(t)?t:String(t)}function M(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){return Array.isArray?Array.isArray(e):"[object Array]"===$(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var w=1/0;function S(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-w?"-0":t}function L(e){return null==e?"":S(e)}function _(e){return"string"==typeof e}function O(e){return"number"==typeof e}function A(e){return!0===e||!1===e||E(e)&&"[object Boolean]"==$(e)}function j(e){return"object"===b(e)}function E(e){return j(e)&&null!==e}function I(e){return null!=e}function C(e){return!e.trim().length}function $(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var N="Extended search is not available",P="Incorrect 'index' type",R=function(e){return"Invalid value for key ".concat(e)},F=function(e){return"Pattern length exceeds max of ".concat(e,".")},W=function(e){return"Missing ".concat(e," property in key")},T=function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")},D=Object.prototype.hasOwnProperty,z=function(){function e(t){var n=this;y(this,e),this._keys=[],this._keyMap={};var r=0;t.forEach(function(e){var t=K(e);r+=t.weight,n._keys.push(t),n._keyMap[t.id]=t,r+=t.weight}),this._keys.forEach(function(e){e.weight/=r})}return m(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function K(e){var t=null,n=null,r=null,i=1,o=null;if(_(e)||x(e))r=e,t=q(e),n=B(e);else{if(!D.call(e,"name"))throw new Error(W("name"));var c=e.name;if(r=c,D.call(e,"weight")&&(i=e.weight)<=0)throw new Error(T(c));t=q(c),n=B(c),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function q(e){return x(e)?e:e.split(".")}function B(e){return x(e)?e.join("."):e}function H(e,t){var n=[],r=!1;return function e(t,i,o){if(I(t))if(i[o]){var c=t[i[o]];if(!I(c))return;if(o===i.length-1&&(_(c)||O(c)||A(c)))n.push(L(c));else if(x(c)){r=!0;for(var a=0,s=c.length;a<s;a+=1)e(c[a],i,o+1)}else i.length&&e(c,i,o+1)}else n.push(t)}(e,_(t)?t.split("."):t,0),r?n:n[0]}var J={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},U={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},V={location:0,threshold:.6,distance:100},Q={useExtendedSearch:!1,getFn:H,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},G=v(v(v(v({},U),J),V),Q),X=/[^ ]+/g;function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(X).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),c=parseFloat(Math.round(o*r)/r);return n.set(i,c),c},clear:function(){n.clear()}}}var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,r=void 0===n?G.getFn:n,i=t.fieldNormWeight,o=void 0===i?G.fieldNormWeight:i;y(this,e),this.norm=Y(o,3),this.getFn=r,this.isCreated=!1,this.setIndexRecords()}return m(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach(function(t,n){e._keysMap[t.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,_(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();_(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(I(e)&&!C(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach(function(t,i){var o=t.getFn?t.getFn(e):n.getFn(e,t.path);if(I(o))if(x(o)){for(var c=[],a=[{nestedArrIndex:-1,value:o}];a.length;){var s=a.pop(),u=s.nestedArrIndex,h=s.value;if(I(h))if(_(h)&&!C(h)){var l={v:h,i:u,n:n.norm.get(h)};c.push(l)}else x(h)&&h.forEach(function(e,t){a.push({nestedArrIndex:t,value:e})})}r.$[i]=c}else if(_(o)&&!C(o)){var f={v:o,n:n.norm.get(o)};r.$[i]=f}}),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?G.getFn:r,o=n.fieldNormWeight,c=void 0===o?G.fieldNormWeight:o,a=new Z({getFn:i,fieldNormWeight:c});return a.setKeys(e.map(K)),a.setSources(t),a.create(),a}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?G.getFn:n,i=t.fieldNormWeight,o=void 0===i?G.fieldNormWeight:i,c=e.keys,a=e.records,s=new Z({getFn:r,fieldNormWeight:o});return s.setKeys(c),s.setIndexRecords(a),s}function ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?G.distance:s,h=t.ignoreLocation,l=void 0===h?G.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(a-o);return u?f+d/u:d?1:f}function re(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}var ie=32;function oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?G.location:i,c=r.distance,a=void 0===c?G.distance:c,s=r.threshold,u=void 0===s?G.threshold:s,h=r.findAllMatches,l=void 0===h?G.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?G.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?G.includeMatches:v,y=r.ignoreLocation,p=void 0===y?G.ignoreLocation:y;if(t.length>ie)throw new Error(F(ie));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,w=b,S=d>1||g,L=S?Array(M):[];(m=e.indexOf(t,w))>-1;){var _=ne(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(_,x),w=m+k,S)for(var O=0;O<k;)L[m+O]=1,O+=1}w=-1;for(var A=[],j=1,E=k+M,I=1<<k-1,C=0;C<k;C+=1){for(var $=0,N=E;$<N;){ne(t,{errors:C,currentLocation:b+N,expectedLocation:b,distance:a,ignoreLocation:p})<=x?$=N:E=N,N=Math.floor((E-$)/2+$)}E=N;var P=Math.max(1,b-N+1),R=l?M:Math.min(b+N,M)+k,W=Array(R+2);W[R+1]=(1<<C)-1;for(var T=R;T>=P;T-=1){var D=T-1,z=n[e.charAt(D)];if(S&&(L[D]=+!!z),W[T]=(W[T+1]<<1|1)&z,C&&(W[T]|=(A[T+1]|A[T])<<1|1|A[T+1]),W[T]&I&&(j=ne(t,{errors:C,currentLocation:D,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=j,(w=D)<=b)break;P=Math.max(1,2*b-w)}}if(ne(t,{errors:C+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p})>x)break;A=W}var K={isMatch:w>=0,score:Math.max(.001,j)};if(S){var q=re(L,d);q.length?g&&(K.indices=q):K.isMatch=!1}return K}function ce(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var ae=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?G.location:i,c=r.threshold,a=void 0===c?G.threshold:c,s=r.distance,u=void 0===s?G.distance:s,h=r.includeMatches,l=void 0===h?G.includeMatches:h,f=r.findAllMatches,d=void 0===f?G.findAllMatches:f,v=r.minMatchCharLength,g=void 0===v?G.minMatchCharLength:v,p=r.isCaseSensitive,m=void 0===p?G.isCaseSensitive:p,k=r.ignoreLocation,M=void 0===k?G.ignoreLocation:k;if(y(this,e),this.options={location:o,threshold:a,distance:u,includeMatches:l,findAllMatches:d,minMatchCharLength:g,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){n.chunks.push({pattern:e,alphabet:ce(e),startIndex:t})},x=this.pattern.length;if(x>ie){for(var w=0,S=x%ie,L=x-S;w<L;)b(this.pattern.substr(w,ie),w),w+=ie;if(S){var _=x-ie;b(this.pattern.substr(_),_)}}else b(this.pattern,0)}}return m(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,s=o.distance,u=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength,f=o.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach(function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,y=oe(e,n,i,{location:c+o,distance:s,threshold:u,findAllMatches:h,minMatchCharLength:l,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(a(d),a(k)))});var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),se=function(){function e(t){y(this,e),this.pattern=t}return m(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return ue(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return ue(e,this.singleRegex)}}]),e}();function ue(e,t){var n=e.match(t);return n?n[1]:null}var he=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),n}(),le=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),n}(),fe=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),n}(),de=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),n}(),ve=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),n}(),ge=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),n}(),ye=function(t){function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?G.location:o,a=i.threshold,s=void 0===a?G.threshold:a,u=i.distance,h=void 0===u?G.distance:u,l=i.includeMatches,f=void 0===l?G.includeMatches:l,d=i.findAllMatches,v=void 0===d?G.findAllMatches:d,g=i.minMatchCharLength,p=void 0===g?G.minMatchCharLength:g,m=i.isCaseSensitive,k=void 0===m?G.isCaseSensitive:m,M=i.ignoreLocation,b=void 0===M?G.ignoreLocation:M;return y(this,n),(r=e(this,n,[t]))._bitapSearch=new ae(t,{location:c,threshold:s,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),r}return o(n,se),m(n,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),n}(),pe=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),n}(),me=[he,pe,fe,de,ge,ve,le,ye],ke=me.length,Me=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,be="|";function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split(be).map(function(e){for(var n=e.trim().split(Me).filter(function(e){return e&&!!e.trim()}),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<ke;){var u=me[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<ke;){var l=me[s],f=l.isSingleMatch(c);if(f){r.push(new l(f,t));break}}}return r})}var we=new Set([ye.type,pe.type]),Se=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isCaseSensitive,i=void 0===r?G.isCaseSensitive:r,o=n.includeMatches,c=void 0===o?G.includeMatches:o,a=n.minMatchCharLength,s=void 0===a?G.minMatchCharLength:a,u=n.ignoreLocation,h=void 0===u?G.ignoreLocation:u,l=n.findAllMatches,f=void 0===l?G.findAllMatches:l,d=n.location,v=void 0===d?G.location:d,g=n.threshold,p=void 0===g?G.threshold:g,m=n.distance,k=void 0===m?G.distance:m;y(this,e),this.query=null,this.options={isCaseSensitive:i,includeMatches:c,minMatchCharLength:s,findAllMatches:f,ignoreLocation:h,location:v,threshold:p,distance:k},this.pattern=i?t:t.toLowerCase(),this.query=xe(this.pattern,this.options)}return m(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,s=0,u=t.length;s<u;s+=1){var h=t[s];o.length=0,i=0;for(var l=0,f=h.length;l<f;l+=1){var d=h[l],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=d.constructor.type;we.has(m)?o=[].concat(a(o),a(y)):o.push(y)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),Le=[];function _e(){Le.push.apply(Le,arguments)}function Oe(e,t){for(var n=0,r=Le.length;n<r;n+=1){var i=Le[n];if(i.condition(e,t))return new i(e,t)}return new ae(e,t)}var Ae={AND:"$and",OR:"$or"},je={PATH:"$path",PATTERN:"$val"},Ee=function(e){return!(!e[Ae.AND]&&!e[Ae.OR])},Ie=function(e){return!!e[je.PATH]},Ce=function(e){return!x(e)&&j(e)&&!Ee(e)},$e=function(e){return g({},Ae.AND,Object.keys(e).map(function(t){return g({},t,e[t])}))};function Ne(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n;return Ee(e)||(e=$e(e)),function e(n){var i=Object.keys(n),o=Ie(n);if(!o&&i.length>1&&!Ee(n))return e($e(n));if(Ce(n)){var c=o?n[je.PATH]:i[0],a=o?n[je.PATTERN]:n[c];if(!_(a))throw new Error(R(c));var s={keyId:B(c),pattern:a};return r&&(s.searcher=Oe(a,t)),s}var u={children:[],operator:i[0]};return i.forEach(function(t){var r=n[t];x(r)&&r.forEach(function(t){u.children.push(e(t))})}),u}(e)}function Pe(e,t){var n=t.ignoreFieldNorm,r=void 0===n?G.ignoreFieldNorm:n;e.forEach(function(e){var t=1;e.matches.forEach(function(e){var n=e.key,i=e.norm,o=e.score,c=n?n.weight:null;t*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*(r?1:i))}),e.score=t})}function Re(e,t){var n=e.matches;t.matches=[],I(n)&&n.forEach(function(e){if(I(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}})}function Fe(e,t){t.score=e.score}function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?G.includeMatches:r,o=n.includeScore,c=void 0===o?G.includeScore:o,a=[];return i&&a.push(Re),c&&a.push(Fe),e.map(function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach(function(t){t(e,r)}),r})}var Te=exports.default=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;y(this,e),this.options=v(v({},G),n),this.options.useExtendedSearch,this._keyStore=new z(this.options.keys),this.setCollection(t,r)}return m(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof Z))throw new Error(P);this._myIndex=t||ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){I(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,o=r.includeScore,c=r.shouldSort,a=r.sortFn,s=r.ignoreFieldNorm,u=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Pe(u,{ignoreFieldNorm:s}),c&&u.sort(a),O(n)&&n>-1&&(u=u.slice(0,n)),We(u,this._docs,{includeMatches:i,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=Oe(e,this.options),n=this._myIndex.records,r=[];return n.forEach(function(e){var n=e.v,i=e.i,o=e.n;if(I(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}}),r}},{key:"_searchLogical",value:function(e){var t=this,n=Ne(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach(function(e){var r=e.$,c=e.i;if(I(r)){var s=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,s=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return s&&s.length?[{idx:i,item:r,matches:s}]:[]}for(var u=[],h=0,l=n.children.length;h<l;h+=1){var f=e(n.children[h],r,i);if(f.length)u.push.apply(u,a(f));else if(n.operator===Ae.AND)return[]}return u}(n,r,c);s.length&&(i[c]||(i[c]={idx:c,item:r,matches:[]},o.push(i[c])),s.forEach(function(e){var t,n=e.matches;(t=i[c].matches).push.apply(t,a(n))}))}}),o}},{key:"_searchObjectList",value:function(e){var t=this,n=Oe(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach(function(e){var r=e.$,o=e.i;if(I(r)){var s=[];i.forEach(function(e,i){s.push.apply(s,a(t._findMatches({key:e,value:r[i],searcher:n})))}),s.length&&c.push({idx:o,item:r,matches:s})}}),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!I(n))return[];var i=[];if(x(n))n.forEach(function(e){var n=e.v,o=e.i,c=e.n;if(I(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}});else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();Te.version="6.6.2",Te.createIndex=ee,Te.parseIndex=te,Te.config=G,Te.parseQuery=Ne,_e(Se);
131
+ "use strict";function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&t(e,n)}function t(e,n){return(t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,n)}function n(e){var t=o();return function(){var n,i=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return r(this,n)}}function r(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e){return l(e)||h(e)||u(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e){var t=M(e,"string");return"symbol"===b(t)?t:String(t)}function M(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){return Array.isArray?Array.isArray(e):"[object Array]"===R(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var w=1/0;function S(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-w?"-0":t}function L(e){return null==e?"":S(e)}function _(e){return"string"==typeof e}function O(e){return"number"==typeof e}function A(e){return!0===e||!1===e||E(e)&&"[object Boolean]"==R(e)}function j(e){return"object"===b(e)}function E(e){return j(e)&&null!==e}function I(e){return null!=e}function C(e){return!e.trim().length}function R(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var $="Extended search is not available",P="Incorrect 'index' type",N=function(e){return"Invalid value for key ".concat(e)},F=function(e){return"Pattern length exceeds max of ".concat(e,".")},W=function(e){return"Missing ".concat(e," property in key")},T=function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")},D=Object.prototype.hasOwnProperty,z=function(){function e(t){var n=this;y(this,e),this._keys=[],this._keyMap={};var r=0;t.forEach(function(e){var t=K(e);r+=t.weight,n._keys.push(t),n._keyMap[t.id]=t,r+=t.weight}),this._keys.forEach(function(e){e.weight/=r})}return m(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function K(e){var t=null,n=null,r=null,i=1,o=null;if(_(e)||x(e))r=e,t=q(e),n=B(e);else{if(!D.call(e,"name"))throw new Error(W("name"));var c=e.name;if(r=c,D.call(e,"weight")&&(i=e.weight)<=0)throw new Error(T(c));t=q(c),n=B(c),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function q(e){return x(e)?e:e.split(".")}function B(e){return x(e)?e.join("."):e}function H(e,t){var n=[],r=!1;return function e(t,i,o){if(I(t))if(i[o]){var c=t[i[o]];if(!I(c))return;if(o===i.length-1&&(_(c)||O(c)||A(c)))n.push(L(c));else if(x(c)){r=!0;for(var a=0,s=c.length;a<s;a+=1)e(c[a],i,o+1)}else i.length&&e(c,i,o+1)}else n.push(t)}(e,_(t)?t.split("."):t,0),r?n:n[0]}var J={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},U={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},V={location:0,threshold:.6,distance:100},Q={useExtendedSearch:!1,getFn:H,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},G=v(v(v(v({},U),J),V),Q),X=/[^ ]+/g;function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(X).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),c=parseFloat(Math.round(o*r)/r);return n.set(i,c),c},clear:function(){n.clear()}}}var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,r=void 0===n?G.getFn:n,i=t.fieldNormWeight,o=void 0===i?G.fieldNormWeight:i;y(this,e),this.norm=Y(o,3),this.getFn=r,this.isCreated=!1,this.setIndexRecords()}return m(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach(function(t,n){e._keysMap[t.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,_(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();_(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(I(e)&&!C(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach(function(t,i){var o=t.getFn?t.getFn(e):n.getFn(e,t.path);if(I(o))if(x(o)){for(var c=[],a=[{nestedArrIndex:-1,value:o}];a.length;){var s=a.pop(),u=s.nestedArrIndex,h=s.value;if(I(h))if(_(h)&&!C(h)){var l={v:h,i:u,n:n.norm.get(h)};c.push(l)}else x(h)&&h.forEach(function(e,t){a.push({nestedArrIndex:t,value:e})})}r.$[i]=c}else if(_(o)&&!C(o)){var f={v:o,n:n.norm.get(o)};r.$[i]=f}}),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?G.getFn:r,o=n.fieldNormWeight,c=void 0===o?G.fieldNormWeight:o,a=new Z({getFn:i,fieldNormWeight:c});return a.setKeys(e.map(K)),a.setSources(t),a.create(),a}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?G.getFn:n,i=t.fieldNormWeight,o=void 0===i?G.fieldNormWeight:i,c=e.keys,a=e.records,s=new Z({getFn:r,fieldNormWeight:o});return s.setKeys(c),s.setIndexRecords(a),s}function ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?G.distance:s,h=t.ignoreLocation,l=void 0===h?G.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(a-o);return u?f+d/u:d?1:f}function re(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}var ie=32;function oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?G.location:i,c=r.distance,a=void 0===c?G.distance:c,s=r.threshold,u=void 0===s?G.threshold:s,h=r.findAllMatches,l=void 0===h?G.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?G.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?G.includeMatches:v,y=r.ignoreLocation,p=void 0===y?G.ignoreLocation:y;if(t.length>ie)throw new Error(F(ie));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,w=b,S=d>1||g,L=S?Array(M):[];(m=e.indexOf(t,w))>-1;){var _=ne(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(_,x),w=m+k,S)for(var O=0;O<k;)L[m+O]=1,O+=1}w=-1;for(var A=[],j=1,E=k+M,I=1<<k-1,C=0;C<k;C+=1){for(var R=0,$=E;R<$;){ne(t,{errors:C,currentLocation:b+$,expectedLocation:b,distance:a,ignoreLocation:p})<=x?R=$:E=$,$=Math.floor((E-R)/2+R)}E=$;var P=Math.max(1,b-$+1),N=l?M:Math.min(b+$,M)+k,W=Array(N+2);W[N+1]=(1<<C)-1;for(var T=N;T>=P;T-=1){var D=T-1,z=n[e.charAt(D)];if(S&&(L[D]=+!!z),W[T]=(W[T+1]<<1|1)&z,C&&(W[T]|=(A[T+1]|A[T])<<1|1|A[T+1]),W[T]&I&&(j=ne(t,{errors:C,currentLocation:D,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=j,(w=D)<=b)break;P=Math.max(1,2*b-w)}}if(ne(t,{errors:C+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p})>x)break;A=W}var K={isMatch:w>=0,score:Math.max(.001,j)};if(S){var q=re(L,d);q.length?g&&(K.indices=q):K.isMatch=!1}return K}function ce(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var ae=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?G.location:i,c=r.threshold,a=void 0===c?G.threshold:c,s=r.distance,u=void 0===s?G.distance:s,h=r.includeMatches,l=void 0===h?G.includeMatches:h,f=r.findAllMatches,d=void 0===f?G.findAllMatches:f,v=r.minMatchCharLength,g=void 0===v?G.minMatchCharLength:v,p=r.isCaseSensitive,m=void 0===p?G.isCaseSensitive:p,k=r.ignoreLocation,M=void 0===k?G.ignoreLocation:k;if(y(this,e),this.options={location:o,threshold:a,distance:u,includeMatches:l,findAllMatches:d,minMatchCharLength:g,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){n.chunks.push({pattern:e,alphabet:ce(e),startIndex:t})},x=this.pattern.length;if(x>ie){for(var w=0,S=x%ie,L=x-S;w<L;)b(this.pattern.substr(w,ie),w),w+=ie;if(S){var _=x-ie;b(this.pattern.substr(_),_)}}else b(this.pattern,0)}}return m(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,s=o.distance,u=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength,f=o.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach(function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,y=oe(e,n,i,{location:c+o,distance:s,threshold:u,findAllMatches:h,minMatchCharLength:l,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(a(d),a(k)))});var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),se=function(){function e(t){y(this,e),this.pattern=t}return m(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return ue(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return ue(e,this.singleRegex)}}]),e}();function ue(e,t){var n=e.match(t);return n?n[1]:null}var he=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),i}(),le=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}(),fe=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}(),de=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}(),ve=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}(),ge=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}(),ye=function(t){e(i,se);var r=n(i);function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.location,c=void 0===o?G.location:o,a=n.threshold,s=void 0===a?G.threshold:a,u=n.distance,h=void 0===u?G.distance:u,l=n.includeMatches,f=void 0===l?G.includeMatches:l,d=n.findAllMatches,v=void 0===d?G.findAllMatches:d,g=n.minMatchCharLength,p=void 0===g?G.minMatchCharLength:g,m=n.isCaseSensitive,k=void 0===m?G.isCaseSensitive:m,M=n.ignoreLocation,b=void 0===M?G.ignoreLocation:M;return y(this,i),(t=r.call(this,e))._bitapSearch=new ae(e,{location:c,threshold:s,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),t}return m(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}(),pe=function(t){e(i,se);var r=n(i);function i(e){return y(this,i),r.call(this,e)}return m(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(),me=[he,pe,fe,de,ge,ve,le,ye],ke=me.length,Me=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,be="|";function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split(be).map(function(e){for(var n=e.trim().split(Me).filter(function(e){return e&&!!e.trim()}),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<ke;){var u=me[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<ke;){var l=me[s],f=l.isSingleMatch(c);if(f){r.push(new l(f,t));break}}}return r})}var we=new Set([ye.type,pe.type]),Se=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isCaseSensitive,i=void 0===r?G.isCaseSensitive:r,o=n.includeMatches,c=void 0===o?G.includeMatches:o,a=n.minMatchCharLength,s=void 0===a?G.minMatchCharLength:a,u=n.ignoreLocation,h=void 0===u?G.ignoreLocation:u,l=n.findAllMatches,f=void 0===l?G.findAllMatches:l,d=n.location,v=void 0===d?G.location:d,g=n.threshold,p=void 0===g?G.threshold:g,m=n.distance,k=void 0===m?G.distance:m;y(this,e),this.query=null,this.options={isCaseSensitive:i,includeMatches:c,minMatchCharLength:s,findAllMatches:f,ignoreLocation:h,location:v,threshold:p,distance:k},this.pattern=i?t:t.toLowerCase(),this.query=xe(this.pattern,this.options)}return m(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,s=0,u=t.length;s<u;s+=1){var h=t[s];o.length=0,i=0;for(var l=0,f=h.length;l<f;l+=1){var d=h[l],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=d.constructor.type;we.has(m)?o=[].concat(a(o),a(y)):o.push(y)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),Le=[];function _e(){Le.push.apply(Le,arguments)}function Oe(e,t){for(var n=0,r=Le.length;n<r;n+=1){var i=Le[n];if(i.condition(e,t))return new i(e,t)}return new ae(e,t)}var Ae={AND:"$and",OR:"$or"},je={PATH:"$path",PATTERN:"$val"},Ee=function(e){return!(!e[Ae.AND]&&!e[Ae.OR])},Ie=function(e){return!!e[je.PATH]},Ce=function(e){return!x(e)&&j(e)&&!Ee(e)},Re=function(e){return g({},Ae.AND,Object.keys(e).map(function(t){return g({},t,e[t])}))};function $e(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n;return Ee(e)||(e=Re(e)),function e(n){var i=Object.keys(n),o=Ie(n);if(!o&&i.length>1&&!Ee(n))return e(Re(n));if(Ce(n)){var c=o?n[je.PATH]:i[0],a=o?n[je.PATTERN]:n[c];if(!_(a))throw new Error(N(c));var s={keyId:B(c),pattern:a};return r&&(s.searcher=Oe(a,t)),s}var u={children:[],operator:i[0]};return i.forEach(function(t){var r=n[t];x(r)&&r.forEach(function(t){u.children.push(e(t))})}),u}(e)}function Pe(e,t){var n=t.ignoreFieldNorm,r=void 0===n?G.ignoreFieldNorm:n;e.forEach(function(e){var t=1;e.matches.forEach(function(e){var n=e.key,i=e.norm,o=e.score,c=n?n.weight:null;t*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*(r?1:i))}),e.score=t})}function Ne(e,t){var n=e.matches;t.matches=[],I(n)&&n.forEach(function(e){if(I(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}})}function Fe(e,t){t.score=e.score}function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?G.includeMatches:r,o=n.includeScore,c=void 0===o?G.includeScore:o,a=[];return i&&a.push(Ne),c&&a.push(Fe),e.map(function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach(function(t){t(e,r)}),r})}var Te=exports.default=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;y(this,e),this.options=v(v({},G),n),this.options.useExtendedSearch,this._keyStore=new z(this.options.keys),this.setCollection(t,r)}return m(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof Z))throw new Error(P);this._myIndex=t||ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){I(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,o=r.includeScore,c=r.shouldSort,a=r.sortFn,s=r.ignoreFieldNorm,u=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Pe(u,{ignoreFieldNorm:s}),c&&u.sort(a),O(n)&&n>-1&&(u=u.slice(0,n)),We(u,this._docs,{includeMatches:i,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=Oe(e,this.options),n=this._myIndex.records,r=[];return n.forEach(function(e){var n=e.v,i=e.i,o=e.n;if(I(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}}),r}},{key:"_searchLogical",value:function(e){var t=this,n=$e(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach(function(e){var r=e.$,c=e.i;if(I(r)){var s=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,s=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return s&&s.length?[{idx:i,item:r,matches:s}]:[]}for(var u=[],h=0,l=n.children.length;h<l;h+=1){var f=e(n.children[h],r,i);if(f.length)u.push.apply(u,a(f));else if(n.operator===Ae.AND)return[]}return u}(n,r,c);s.length&&(i[c]||(i[c]={idx:c,item:r,matches:[]},o.push(i[c])),s.forEach(function(e){var t,n=e.matches;(t=i[c].matches).push.apply(t,a(n))}))}}),o}},{key:"_searchObjectList",value:function(e){var t=this,n=Oe(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach(function(e){var r=e.$,o=e.i;if(I(r)){var s=[];i.forEach(function(e,i){s.push.apply(s,a(t._findMatches({key:e,value:r[i],searcher:n})))}),s.length&&c.push({idx:o,item:r,matches:s})}}),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!I(n))return[];var i=[];if(x(n))n.forEach(function(e){var n=e.v,o=e.i,c=e.n;if(I(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}});else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();Te.version="6.6.2",Te.createIndex=ee,Te.parseIndex=te,Te.config=G,Te.parseQuery=$e,_e(Se);
148
132
  },{}],"zsiC":[function(require,module,exports) {
149
133
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDate=c,exports.getDistanceFromLatLonInKm=l,exports.isSimilarStrings=g,exports.searchValue=d;var e=t(require("fuse.js"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return i(e)||u(e,t)||a(e,t)||n()}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,u,i=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(s)throw a}}return i}}function i(e){if(Array.isArray(e))return e}function l(e,t){var n=r(e.split(":"),3),a=n[0],o=n[1],u=n[2],i=r(t.split(":"),2),l=i[0],c=i[1],f=s(l-a),h=s(c-o),d=Math.sin(f/2)*Math.sin(f/2)+Math.cos(s(a))*Math.cos(s(l))*Math.sin(h/2)*Math.sin(h/2),v=6371*(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)));return Number(u)>=v}function s(e){return e*(Math.PI/180)}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,n=e.date,a=void 0===n?0:n,o=e.match,u=void 0===o||o,i=arguments.length>1?arguments[1]:void 0;if(!i&&t)return!1;var l=new Date,s=!0;switch(t){case"day":var c=h(a),d=h(a+1);s=c<=i&&i<d;break;case"days":if(a<0){var v=h(1);s=h(-6)<=i&&i<v}else{var g=h(),y=h(7);s=g<=i&&i<y}break;case"day_week":s=a===new Date(i).getDay();break;case"week":var w=l.getDate()-l.getDay(),b=w+(-2==a?13:6),p=r(f(l.setDate(w+7*a),(new Date).setDate(b+7*a)),2),D=p[0],m=p[1];s=D<=i&&i<=m;break;case"month":if(l.getFullYear()!==new Date(i).getFullYear())return!1;s=l.getMonth()+a===new Date(i).getMonth();break;case"year":s=l.getFullYear()+a===new Date(i).getFullYear();break;default:return!0}return u?s:!s}function f(e,t){return[new Date(e),new Date(t)]}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e).valueOf()}function d(e,t){if(e&&e.length)return t?e.filter(function(e){return e.fields.find(function(e){return e.index_value&&-1!==e.index_value.toLowerCase().indexOf(t.toLowerCase())})}):e}var v=new e.default([]);function g(e,t){return v.setCollection(t),Boolean(v.search(e).length)}
150
134
  },{"fuse.js":"jqRt"}],"mbGN":[function(require,module,exports) {
151
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=m;var e=require("./utils.js");function t(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}function n(e,t){return c(e)||i(e,t)||u(e,t)||r()}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,o,i,c=[],a=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);a=!0);}catch(e){s=!0,u=e}finally{try{if(!a&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw u}}return c}}function c(e){if(Array.isArray(e))return e}function a(e,t,n){return t=h(t),s(e,l()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function s(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function p(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=k(e,"string");return"symbol"==v(t)?t:String(t)}function k(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t){var n=new E;return e&&e.length?n.filter(t,e):[]}var S=function(){function t(){b(this,t)}return p(t,[{key:"changeBehavior",value:function(t){switch(t){case"contain_or":this._checkFn=function(e,t){return t.some(function(t){return e.some(function(e){return-1!==e.indexOf(t)})})};break;case"contain_and":this._checkFn=function(e,t){return t.every(function(t){return e.some(function(e){return-1!==e.indexOf(t)})})};break;case"not_contain_or":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return-1===e.indexOf(t)})})};break;case"not_contain_and":this._checkFn=function(e,t){return t.every(function(t){return e.every(function(e){return-1===e.indexOf(t)})})};break;case"equal_or":this._checkFn=function(e,t){return!!e.length&&e.some(function(e){return t.some(function(t){return e==t})})};break;case"equal_and":this._checkFn=function(e,t){if(!e.length)return!1;for(var n=new Set(t);e.length&&n.size;){var r=e.pop();n.has(r)&&n.delete(r)}return!n.size};break;case"not_equal_or":this._checkFn=function(e,t){if(!e.length)return!0;for(var n=new Set(t);e.length&&n.size;){var r=e.pop();if(!n.has(r))return!0}return!1};break;case"not_equal_and":this._checkFn=function(e,t){for(var n=new Set(t);e.length&&n.size;){var r=e.pop();if(n.has(r))return!1}return!0};break;case"bigger":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return e>t})})};break;case"lower":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return e<t})})};break;case"range":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return t.start<=e&&e<t.end})})};break;case"value":this._checkFn=function(e,t){return t.some(function(t){return e.some(function(e){return e==t})})};break;case"search":this._checkFn=function(t,n){return n.some(function(n){return(0,e.isSimilarStrings)(n,t)})};break;case"phone_equal_or":this._checkFn=function(e,t){return!!e.length&&t.some(function(t){return e.some(function(e){return-1!==e.replace(/[^0-9]/g,"").indexOf(t.replace(/[^0-9]/g,""))})})};break;case"distance":this._checkFn=function(t,n){return n.some(function(n){return t.some(function(t){return(0,e.getDistanceFromLatLonInKm)(n,t)})})};break;case"date_in":case"date_out":this._checkFn=function(t,n){return n.some(function(n){return t.some(function(t){return(0,e.getDate)(n,t)})})};break;case"recurring_date":this._checkFn=function(e,t){return t.some(function(t){return e.some(function(e){return gudhub.checkRecurringDate(e,t)})})}}return this}},{key:"check",value:function(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}]),t}(),w=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return[Number(e)]}},{key:"convertFilterValue",value:function(e){return Number(e)}}]),e}(),F=function(e){function t(){return b(this,t),a(this,t,arguments)}return y(t,w),p(t,[{key:"convertFilterValue",value:function(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}]),t}(),O=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return String(null!=e?e:"").toLowerCase().split(",")}},{key:"convertFilterValue",value:function(e){return 0===e?"0":String(e||"").toLowerCase()}}]),e}(),j=function(e){function t(){return b(this,t),a(this,t,arguments)}return y(t,w),p(t,[{key:"convertFilterValue",value:function(e){var t=n(e.split(":"),3),r=t[0],u=t[1],o=t[2];return{type:r,date:Number(u),match:!!Number(o)}}}]),t}(),A=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return[String(Boolean(e))]}},{key:"convertFilterValue",value:function(e){return String(e)}}]),e}(),V=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return[Number(e)]}},{key:"convertFilterValue",value:function(e){return String(e)}}]),e}(),q=function(){function e(){b(this,e),this._strategies={stringStrategy:new O,numberStrategy:new w,booleanStrategy:new A,rangeStrategy:new F,dateStrategy:new j,recurringDateStrategy:new V}}return p(e,[{key:"setStrategy",value:function(e){switch(this._checkOption=e,e){case"contain_or":case"contain_and":case"not_contain_or":case"not_contain_and":case"equal_or":case"equal_and":case"not_equal_or":case"not_equal_and":case"phone_equal_or":case"distance":case"search":this._currentStrategy=this._strategies.stringStrategy;break;case"bigger":case"lower":this._currentStrategy=this._strategies.numberStrategy;break;case"range":this._currentStrategy=this._strategies.rangeStrategy;break;case"date_in":case"date_out":this._currentStrategy=this._strategies.dateStrategy;break;case"value":this._currentStrategy=this._strategies.booleanStrategy;break;case"recurring_date":this._currentStrategy=this._strategies.recurringDateStrategy}return this}},{key:"setEntity",value:function(e){return this._entity=this._currentStrategy.convert(e),this}},{key:"getEntity",value:function(){return this._entity}},{key:"setFilterValues",value:function(e){var t=this,n=Array.isArray(e)?e:[e];return this._filterValues=n.map(function(e){return t._currentStrategy.convertFilterValue(e)}),this}},{key:"getFilterValues",value:function(){return this._filterValues}},{key:"getCheckOption",value:function(){return this._checkOption}}]),e}(),E=function(){function e(){b(this,e)}return p(e,[{key:"filter",value:function(e,n){var r,u=this.checkIfAllFiltersHaveAndStrategy(e),o=[],i=e.filter(function(e){return e.valuesArray.length}),c=t(n);try{for(c.s();!(r=c.n()).done;){for(var a=r.value,s=!0,f=function(){var e=i[l],t=a.fields.find(function(t){return e.field_id==t.field_id}),n=new q,r=new S;switch(n.setStrategy(e.search_type).setEntity(t&&null!=t.field_value?t.field_value:null).setFilterValues(e.valuesArray),e.boolean_strategy){case"and":s=s&&r.check(n);break;case"or":s=s||r.check(n);break;default:s=s&&r.check(n)}if(!s&&u)return 1},l=0;l<i.length&&!f();l++);s&&o.push(a)}}catch(h){c.e(h)}finally{c.f()}return o.length||e.length&&!o.length?o:n}},{key:"checkIfAllFiltersHaveAndStrategy",value:function(e){return e.every(function(e){return!e.boolean_strategy||"and"==e.boolean_strategy})}}]),e}();
135
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=m;var e=require("./utils.js");function t(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw o}}}}function n(e,t){return c(e)||o(e,t)||u(e,t)||r()}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,i,o,c=[],a=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);a=!0);}catch(e){s=!0,u=e}finally{try{if(!a&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw u}}return c}}function c(e){if(Array.isArray(e))return e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=y();return function(){var n,r=v(e);if(t){var u=v(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function p(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){var t=k(e,"string");return"symbol"===g(t)?t:String(t)}function k(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t){var n=new q;return e&&e.length?n.filter(t,e):[]}var S=function(){function t(){b(this,t)}return p(t,[{key:"changeBehavior",value:function(t){switch(t){case"contain_or":this._checkFn=function(e,t){return t.some(function(t){return e.some(function(e){return-1!==e.indexOf(t)})})};break;case"contain_and":this._checkFn=function(e,t){return t.every(function(t){return e.some(function(e){return-1!==e.indexOf(t)})})};break;case"not_contain_or":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return-1===e.indexOf(t)})})};break;case"not_contain_and":this._checkFn=function(e,t){return t.every(function(t){return e.every(function(e){return-1===e.indexOf(t)})})};break;case"equal_or":this._checkFn=function(e,t){return!!e.length&&e.some(function(e){return t.some(function(t){return e==t})})};break;case"equal_and":this._checkFn=function(e,t){if(!e.length)return!1;for(var n=new Set(t);e.length&&n.size;){var r=e.pop();n.has(r)&&n.delete(r)}return!n.size};break;case"not_equal_or":this._checkFn=function(e,t){if(!e.length)return!0;for(var n=new Set(t);e.length&&n.size;){var r=e.pop();if(!n.has(r))return!0}return!1};break;case"not_equal_and":this._checkFn=function(e,t){for(var n=new Set(t);e.length&&n.size;){var r=e.pop();if(n.has(r))return!1}return!0};break;case"bigger":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return e>t})})};break;case"lower":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return e<t})})};break;case"range":this._checkFn=function(e,t){return t.some(function(t){return e.every(function(e){return t.start<=e&&e<t.end})})};break;case"value":this._checkFn=function(e,t){return t.some(function(t){return e.some(function(e){return e==t})})};break;case"search":this._checkFn=function(t,n){return n.some(function(n){return(0,e.isSimilarStrings)(n,t)})};break;case"phone_equal_or":this._checkFn=function(e,t){return!!e.length&&t.some(function(t){return e.some(function(e){return-1!==e.replace(/[^0-9]/g,"").indexOf(t.replace(/[^0-9]/g,""))})})};break;case"distance":this._checkFn=function(t,n){return n.some(function(n){return t.some(function(t){return(0,e.getDistanceFromLatLonInKm)(n,t)})})};break;case"date_in":case"date_out":this._checkFn=function(t,n){return n.some(function(n){return t.some(function(t){return(0,e.getDate)(n,t)})})};break;case"recurring_date":this._checkFn=function(e,t){return t.some(function(t){return e.some(function(e){return gudhub.checkRecurringDate(e,t)})})}}return this}},{key:"check",value:function(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}]),t}(),w=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return[Number(e)]}},{key:"convertFilterValue",value:function(e){return Number(e)}}]),e}(),F=function(e){a(n,w);var t=f(n);function n(){return b(this,n),t.apply(this,arguments)}return p(n,[{key:"convertFilterValue",value:function(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}]),n}(),O=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return String(null!=e?e:"").toLowerCase().split(",")}},{key:"convertFilterValue",value:function(e){return 0===e?"0":String(e||"").toLowerCase()}}]),e}(),j=function(e){a(r,w);var t=f(r);function r(){return b(this,r),t.apply(this,arguments)}return p(r,[{key:"convertFilterValue",value:function(e){var t=n(e.split(":"),3),r=t[0],u=t[1],i=t[2];return{type:r,date:Number(u),match:!!Number(i)}}}]),r}(),A=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return[String(Boolean(e))]}},{key:"convertFilterValue",value:function(e){return String(e)}}]),e}(),V=function(){function e(){b(this,e)}return p(e,[{key:"convert",value:function(e){return[Number(e)]}},{key:"convertFilterValue",value:function(e){return String(e)}}]),e}(),P=function(){function e(){b(this,e),this._strategies={stringStrategy:new O,numberStrategy:new w,booleanStrategy:new A,rangeStrategy:new F,dateStrategy:new j,recurringDateStrategy:new V}}return p(e,[{key:"setStrategy",value:function(e){switch(this._checkOption=e,e){case"contain_or":case"contain_and":case"not_contain_or":case"not_contain_and":case"equal_or":case"equal_and":case"not_equal_or":case"not_equal_and":case"phone_equal_or":case"distance":case"search":this._currentStrategy=this._strategies.stringStrategy;break;case"bigger":case"lower":this._currentStrategy=this._strategies.numberStrategy;break;case"range":this._currentStrategy=this._strategies.rangeStrategy;break;case"date_in":case"date_out":this._currentStrategy=this._strategies.dateStrategy;break;case"value":this._currentStrategy=this._strategies.booleanStrategy;break;case"recurring_date":this._currentStrategy=this._strategies.recurringDateStrategy}return this}},{key:"setEntity",value:function(e){return this._entity=this._currentStrategy.convert(e),this}},{key:"getEntity",value:function(){return this._entity}},{key:"setFilterValues",value:function(e){var t=this,n=Array.isArray(e)?e:[e];return this._filterValues=n.map(function(e){return t._currentStrategy.convertFilterValue(e)}),this}},{key:"getFilterValues",value:function(){return this._filterValues}},{key:"getCheckOption",value:function(){return this._checkOption}}]),e}(),q=function(){function e(){b(this,e)}return p(e,[{key:"filter",value:function(e,n){var r,u=this.checkIfAllFiltersHaveAndStrategy(e),i=[],o=e.filter(function(e){return e.valuesArray.length}),c=t(n);try{for(c.s();!(r=c.n()).done;){for(var a=r.value,s=!0,f=function(){var e=o[l],t=a.fields.find(function(t){return e.field_id==t.field_id}),n=new P,r=new S;switch(n.setStrategy(e.search_type).setEntity(t&&null!=t.field_value?t.field_value:null).setFilterValues(e.valuesArray),e.boolean_strategy){case"and":s=s&&r.check(n);break;case"or":s=s||r.check(n);break;default:s=s&&r.check(n)}if(!s&&u)return 1},l=0;l<o.length&&!f();l++);s&&i.push(a)}}catch(h){c.e(h)}finally{c.f()}return i.length||e.length&&!i.length?i:n}},{key:"checkIfAllFiltersHaveAndStrategy",value:function(e){return e.every(function(e){return!e.boolean_strategy||"and"==e.boolean_strategy})}}]),e}();
152
136
  },{"./utils.js":"zsiC"}],"LXWr":[function(require,module,exports) {
153
137
  "use strict";function e(e,r){var i=[],t=[];if(e.length>0?e.forEach(function(e){t.push(e)}):t=r,t.length>0){t.forEach(function(e,f){for(var n=0;n<r.length;n++)e.field_id==r[n].field_id&&(i.push(e.field_id),t[f]=gudhub.mergeObjects(r[n],e))});for(var f=0;f<r.length;f++)i.includes(r[f].field_id)||t.push(r[f])}return t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeFilters=e;
154
138
  },{}],"h8f7":[function(require,module,exports) {
@@ -159,7 +143,7 @@ var e,t=arguments[3],n=require("process");!function(n){if("object"==typeof expor
159
143
  },{"process":"g5IB"}],"UCDv":[function(require,module,exports) {
160
144
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonToItems=n;var t=e(require("jsonpath"));function e(t){return t&&t.__esModule?t:{default:t}}function n(e,n){var o=[];return n.forEach(function(n){var a=[];try{a=t.default.paths(e,n.json_path),o.push({field_id:n.field_id,json_paths:a,json_paths_length:a.length})}catch(f){console.log(f)}}),o.sort(function(t,e){return e.json_paths_length-t.json_paths_length}),a(o).map(function(n){return{fields:n.fields.map(function(n){return{field_id:n.field_id,field_value:t.default.value(e,n.json_path)}})}})}function o(t,e){var n=[];return e.forEach(function(t){n.push({path_to_compare:t,match_coefficient:0})}),t.forEach(function(t,e){for(var o=0;o<n.length;o++)n[o].path_to_compare[e]==t&&(n[o].match_coefficient+=1/(e+1))}),n.sort(function(t,e){return e.match_coefficient-t.match_coefficient}),n[0].path_to_compare}function a(t){var e=[];return t.length&&t[0].json_paths.forEach(function(n){var a={fields:[]};t.forEach(function(t){a.fields.push({field_id:t.field_id,json_path:o(n,t.json_paths)})}),e.push(a)}),e}
161
145
  },{"jsonpath":"h8f7"}],"xDLX":[function(require,module,exports) {
162
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(e){var r=o(e,"string");return"symbol"==t(r)?r:String(r)}function o(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function u(t,e){return c(t)||s(t,e)||a(t,e)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,u,f=[],a=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=o.call(r)).done)&&(f.push(n.value),f.length!==e);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw i}}return f}}function c(t){if(Array.isArray(t))return t}function m(t,e,r,n,i,o){var u=[],f=function(t,e){var r=g(e,i);r&&(r.field_value=o+"."+t.item_id,u.push(e))};return r.forEach(function(r){t.forEach(function(t){b(t,r,e,n,f)})}),u}function p(t,e,r){var n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o=[],u=function(t,e){o.push(d(t,e))},f=function(t){o.push(t)},a=function(t){o.push(t)};return r?v(n,i,r,u,f,a):h(n,i,u,f,a,function(t){o.push(t)}),o}function y(t,e,r){var n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[]},u=function(t){o.diff_src_items.push(t)},f=function(t){o.same_items.push(t)},a=function(t){o.new_src_items.push(t)};return r?v(n,i,r,u,f,a):h(n,i,u,f,a),o.is_items_diff=o.new_src_items.length>0||o.diff_src_items.length>0,o}function d(t,e){return t.fields.forEach(function(t){var r=g(e,t.field_id);r?(r.field_value=t.field_value,t.history&&r.history&&(r.history=t.history.concat(r.history))):e.fields.push(t)}),e}function v(t,e,r,n,i,o){t.forEach(function(t){var u=!0,f=g(t,r).field_value;e.forEach(function(e){var o=g(e,r).field_value;f==o&&(u=!1,_(t,e,n,i))}),u&&o(t)})}function h(t,e,r,n,i,o){var f=new S(e);if(t.forEach(function(t){var o=f.pullItemIndex(t.item_id);null!=o?_(t,e[o],r,n):i(t)}),o)for(var a=0,l=Object.entries(f.itemsMap);a<l.length;a++){var s=u(l[a],2),c=(s[0],s[1]);o(e[c])}}function _(t,e,r,n){for(var i=!0,o=0;o<t.fields.length;o++){var u=g(e,t.fields[o].field_id);u?u.field_value!=t.fields[o].field_value&&(i=i&&!1):i=i&&!1}i?n(t,e):r(t,e)}function b(t,e,r,n,i){g(t,r).field_value==g(e,n).field_value&&i(t,e)}function g(t,e){for(var r=null,n=0;n<t.fields.length;n++)e==t.fields[n].field_id&&(r=t.fields[n]);return r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareItems=y,exports.mergeItems=p,exports.populateWithItemRef=m;var S=function(){function t(r){var n=this;e(this,t),this._itemsMap={},r.forEach(function(t,e){n._itemsMap[t.item_id]=e})}return n(t,[{key:"pullItemIndex",value:function(t){var e=this._itemsMap[t];return delete this._itemsMap[t],e}},{key:"getItemIndex",value:function(t){return this._itemsMap[t]}},{key:"itemsMap",get:function(){return this._itemsMap}}]),t}();
146
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(e){var r=o(e,"string");return"symbol"===t(r)?r:String(r)}function o(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function u(t,e){return c(t)||s(t,e)||a(t,e)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,u,f=[],a=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=o.call(r)).done)&&(f.push(n.value),f.length!==e);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw i}}return f}}function c(t){if(Array.isArray(t))return t}function m(t,e,r,n,i,o){var u=[],f=function(t,e){var r=g(e,i);r&&(r.field_value=o+"."+t.item_id,u.push(e))};return r.forEach(function(r){t.forEach(function(t){b(t,r,e,n,f)})}),u}function p(t,e,r){var n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o=[],u=function(t,e){o.push(d(t,e))},f=function(t){o.push(t)},a=function(t){o.push(t)};return r?v(n,i,r,u,f,a):h(n,i,u,f,a,function(t){o.push(t)}),o}function y(t,e,r){var n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[]},u=function(t){o.diff_src_items.push(t)},f=function(t){o.same_items.push(t)},a=function(t){o.new_src_items.push(t)};return r?v(n,i,r,u,f,a):h(n,i,u,f,a),o.is_items_diff=o.new_src_items.length>0||o.diff_src_items.length>0,o}function d(t,e){return t.fields.forEach(function(t){var r=g(e,t.field_id);r?(r.field_value=t.field_value,t.history&&r.history&&(r.history=t.history.concat(r.history))):e.fields.push(t)}),e}function v(t,e,r,n,i,o){t.forEach(function(t){var u=!0,f=g(t,r).field_value;e.forEach(function(e){var o=g(e,r).field_value;f==o&&(u=!1,_(t,e,n,i))}),u&&o(t)})}function h(t,e,r,n,i,o){var f=new S(e);if(t.forEach(function(t){var o=f.pullItemIndex(t.item_id);null!=o?_(t,e[o],r,n):i(t)}),o)for(var a=0,l=Object.entries(f.itemsMap);a<l.length;a++){var s=u(l[a],2),c=(s[0],s[1]);o(e[c])}}function _(t,e,r,n){for(var i=!0,o=0;o<t.fields.length;o++){var u=g(e,t.fields[o].field_id);u?u.field_value!=t.fields[o].field_value&&(i=i&&!1):i=i&&!1}i?n(t,e):r(t,e)}function b(t,e,r,n,i){g(t,r).field_value==g(e,n).field_value&&i(t,e)}function g(t,e){for(var r=null,n=0;n<t.fields.length;n++)e==t.fields[n].field_id&&(r=t.fields[n]);return r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareItems=y,exports.mergeItems=p,exports.populateWithItemRef=m;var S=function(){function t(r){var n=this;e(this,t),this._itemsMap={},r.forEach(function(t,e){n._itemsMap[t.item_id]=e})}return n(t,[{key:"pullItemIndex",value:function(t){var e=this._itemsMap[t];return delete this._itemsMap[t],e}},{key:"getItemIndex",value:function(t){return this._itemsMap[t]}},{key:"itemsMap",get:function(){return this._itemsMap}}]),t}();
163
147
  },{}],"VgUi":[function(require,module,exports) {
164
148
  "use strict";function e(e,r){var n,t=[];e?n=e.split(","):t=r;var u=new Set;return e&&r.forEach(function(e){var r="";n.forEach(function(i,f){var o=e.fields.find(function(e){return e.field_id==i});(o&&(r+=o.field_value),n.length-1==f)&&(function(e){var r=!u.has(e);r&&u.add(e);return r}(r)&&t.push(e))})}),t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.group=e;
165
149
  },{}],"EzAv":[function(require,module,exports) {
@@ -193,21 +177,21 @@ function o(e){return module.exports=o="function"==typeof Symbol&&"symbol"==typeo
193
177
  },{"date-fns/add/index.js":"YNMJ","date-fns/setDay/index.js":"kCXN","date-fns/isSameWeek/index.js":"DPrY"}],"EE1j":[function(require,module,exports) {
194
178
  "use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function t(r,t,e){return i(r,t,e)}function e(t){return t&&"object"===r(t)&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function o(r){return Array.isArray(r)?[]:{}}function n(r,t){return t&&!0===t.clone&&e(r)?i(o(r),r,t):r}function c(r,t,o){var c=r.slice();return t.forEach(function(t,u){void 0===c[u]?c[u]=n(t,o):e(t)?c[u]=i(r[u],t,o):-1===r.indexOf(t)&&c.push(n(t,o))}),c}function u(r,t,o){var c={};return e(r)&&Object.keys(r).forEach(function(t){c[t]=n(r[t],o)}),Object.keys(t).forEach(function(u){e(t[u])&&r[u]?c[u]=i(r[u],t[u],o):c[u]=n(t[u],o)}),c}function i(r,t,e){r=void 0!==r?r:{},t=void 0!==t?t:{};var o=Array.isArray(t),i=(e||{arrayMerge:c}).arrayMerge||c;return o?Array.isArray(r)?i(r,t,e):n(t,e):u(r,t,e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeObjects=t,i.all=function(r,t){if(!Array.isArray(r)||r.length<2)throw new Error("first argument should be an array with at least two elements");return r.reduce(function(r,e){return i(r,e,t)})};
195
179
  },{}],"AMYJ":[function(require,module,exports) {
196
- "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function n(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(t){var r=i(t,"string");return"symbol"==e(r)?r:String(r)}function i(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function u(e){var t={};return e.forEach(function(e){e.items_list.forEach(function(e){var n=t[e.item_id];return n?(n.trash=e.trash,e.fields.forEach(function(e){var t=!0;n.fields=n.fields.map(function(n){return Number(n.field_id)===Number(e.field_id)?(t=!1,n.field_value!=e.field_value?r(r({},e),{},{history:e.history.concat(n.history)}):n):n}),t&&n.fields.push(e)})):t[e.item_id]=e})}),Object.values(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeChunks=u;
180
+ "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function n(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(t){var r=i(t,"string");return"symbol"===e(r)?r:String(r)}function i(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function u(e){var t={};return e.forEach(function(e){e.items_list.forEach(function(e){var n=t[e.item_id];return n?(n.trash=e.trash,e.fields.forEach(function(e){var t=!0;n.fields=n.fields.map(function(n){return Number(n.field_id)===Number(e.field_id)?(t=!1,n.field_value!=e.field_value?r(r({},e),{},{history:e.history.concat(n.history)}):n):n}),t&&n.fields.push(e)})):t[e.item_id]=e})}),Object.values(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeChunks=u;
197
181
  },{}],"S7Iy":[function(require,module,exports) {
198
182
  "use strict";function e(e,n,o,t,r){var c,i=JSON.parse(JSON.stringify(e)),s=Boolean(t)?t:"children",u=!!Boolean(r)&&r;for(c=0;c<i.length;c++)i[c][o]&&0!==i[c][o]&&i.forEach(function(e){i[c][o]==e[n]?(e[s]||(e[s]=[]),e[s].push(i[c]),i.splice(c,1),0==c?c=0:c--):e[s]&&f(e)});function f(e){e[s].forEach(function(e){e[n]==i[c][o]?(e[s]||(e[s]=[]),e[s].push(i[c]),i.splice(c,1),0==c?c=0:c--):e[s]&&f(e)})}return u&&function e(n){n.sort(function(e,n){return e[u]-n[u]}),n.forEach(function(n){n[s]&&e(n[s])})}(i),i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeNestedList=e;
199
183
  },{}],"vno1":[function(require,module,exports) {
200
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(r){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,o=Object.create(i.prototype),u=new F(n||[]);return a(o,"_invoke",{value:S(t,r,u)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var p="suspendedStart",y="suspendedYield",v="executing",g="completed",m={};function w(){}function b(){}function _(){}var x={};l(x,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(G([])));E&&E!==i&&o.call(E,c)&&(x=E);var O=_.prototype=w.prototype=Object.create(x);function j(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function P(e,r){function n(i,a,u,c){var f=d(e[i],e,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==t(l)&&o.call(l,"__await")?r.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(l).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(f.arg)}var i;a(this,"_invoke",{value:function(t,e){function o(){return new r(function(r,i){n(t,e,r,i)})}return i=i?i.then(o,o):o()}})}function S(t,e,n){var i=p;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:r,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var f=d(t,e,n);if("normal"===f.type){if(i=n.done?g:y,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(i=g,n.method="throw",n.arg=f.arg)}}}function k(t,e){var n=e.method,i=t.iterator[n];if(i===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(i,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=_,a(O,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},j(P.prototype),l(P.prototype,f,function(){return this}),n.AsyncIterator=P,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var a=new P(h(t,e,r,i),o);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(O),l(O,s,"Generator"),l(O,c,function(){return this}),l(O,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=G,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return u.type="throw",u.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(f){return void r(f)}u.done?e(c):Promise.resolve(c).then(n,i)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var a=t.apply(e,n);function u(t){r(a,i,o,u,c,"next",t)}function c(t){r(a,i,o,u,c,"throw",t)}u(void 0)})}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(e){var r=c(e,"string");return"symbol"==t(r)?r:String(r)}function c(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f=exports.default=function(){function t(e){i(this,t),this.gudhub=e}return a(t,[{key:"mergeFieldLists",value:function(t,e){var r=this,n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o=i.map(function(t){return t.field_id});return i.length?i.reduce(function(t,e){var n=null;if(t.find(function(t,r){return e.field_id==t.field_id&&(n=r,!0)}))t[n]=r.gudhub.util.mergeObjects(t[n],e);else{var i=e.data_model&&e.data_model.interpretation&&e.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}};if(i.settings.show_field){var o=r.gudhub.util.mergeObjects({show:1},i),a=r.gudhub.util.mergeObjects(o,e);t.push(a)}}return t},n).filter(function(t){return t.show&&-1!=o.indexOf(t.field_id)}):[]}},{key:"createFieldsListToView",value:function(t,r){var i=this,o=this;return new Promise(function(){var a=n(e().mark(function n(a){var u,c,f;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=function(t){var e=0;u.forEach(function(r,n){t.find(function(t){return r.field_id==t.field_id})?(e==u.length-1&&a(t),e++):o.gudhub.ghconstructor.getInstance(r.data_type).then(function(n){if(n){var i=n.getTemplate().model.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),t.push({field_id:r.field_id,show:i.settings.show_field}),e==u.length-1&&a(t)}e++},function(t){e++})})},e.next=3,i.gudhub.getFieldModels(t);case 3:u=e.sent,0!==r.length?(c=[],r.forEach(function(t,e){var n=u.find(function(e){return t.field_id==e.field_id});if(n){var i=n.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),c.push({field_id:n.field_id,show:t.show,width:t.width?t.width:"150px"})}e+1==r.length&&f(c)})):f(r);case 5:case"end":return e.stop()}},n)}));return function(t){return a.apply(this,arguments)}}())}},{key:"createFieldsListToViewWithDataType",value:function(t,r){var i=this;return new Promise(function(){var o=n(e().mark(function o(a){var u,c,f,s;return e().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return u=[],o.next=3,i.gudhub.getFieldModels(t);case 3:c=o.sent,f=c.map(function(t){return+t.field_id}),s=[],u=c.reduce(function(t,r){return t.find(function(t,e){return r.field_id==t.field_id})||(t.push({field_id:r.field_id,data_type:r.data_type}),s.push(new Promise(function(){var o=n(e().mark(function n(o){var a,u,c;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.gudhub.ghconstructor.getInstance(r.data_type);case 2:a=e.sent,u=a.getTemplate(),c=u.model.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}},t.find(function(t){return t.field_id==r.field_id}).show=c.settings.show_field,o(!0);case 7:case"end":return e.stop()}},n)}));return function(t){return o.apply(this,arguments)}}()))),t},r),Promise.all(s).then(function(){u=u.filter(function(t){return-1!=f.indexOf(t.field_id)}),a(u)});case 8:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())}}]),t}();
184
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(r){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,o=Object.create(i.prototype),u=new F(n||[]);return a(o,"_invoke",{value:S(t,r,u)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var p="suspendedStart",y="suspendedYield",v="executing",g="completed",m={};function w(){}function b(){}function _(){}var x={};s(x,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(G([])));E&&E!==i&&o.call(E,c)&&(x=E);var O=_.prototype=w.prototype=Object.create(x);function j(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function P(e,r){function n(i,a,u,c){var f=d(e[i],e,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==t(s)&&o.call(s,"__await")?r.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(s).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(f.arg)}var i;a(this,"_invoke",{value:function(t,e){function o(){return new r(function(r,i){n(t,e,r,i)})}return i=i?i.then(o,o):o()}})}function S(t,e,n){var i=p;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:r,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var f=d(t,e,n);if("normal"===f.type){if(i=n.done?g:y,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(i=g,n.method="throw",n.arg=f.arg)}}}function k(t,e){var n=e.method,i=t.iterator[n];if(i===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(i,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=_,a(O,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=s(_,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s(t,l,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},j(P.prototype),s(P.prototype,f,function(){return this}),n.AsyncIterator=P,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var a=new P(h(t,e,r,i),o);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(O),s(O,l,"Generator"),s(O,c,function(){return this}),s(O,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=G,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return u.type="throw",u.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(f){return void r(f)}u.done?e(c):Promise.resolve(c).then(n,i)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var a=t.apply(e,n);function u(t){r(a,i,o,u,c,"next",t)}function c(t){r(a,i,o,u,c,"throw",t)}u(void 0)})}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(e){var r=c(e,"string");return"symbol"===t(r)?r:String(r)}function c(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f=exports.default=function(){function t(e){i(this,t),this.gudhub=e}return a(t,[{key:"mergeFieldLists",value:function(t,e){var r=this,n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o=i.map(function(t){return t.field_id});return i.length?i.reduce(function(t,e){var n=null;if(t.find(function(t,r){return e.field_id==t.field_id&&(n=r,!0)}))t[n]=r.gudhub.util.mergeObjects(t[n],e);else{var i=e.data_model&&e.data_model.interpretation&&e.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}};if(i.settings.show_field){var o=r.gudhub.util.mergeObjects({show:1},i),a=r.gudhub.util.mergeObjects(o,e);t.push(a)}}return t},n).filter(function(t){return t.show&&-1!=o.indexOf(t.field_id)}):[]}},{key:"createFieldsListToView",value:function(t,r){var i=this,o=this;return new Promise(function(){var a=n(e().mark(function n(a){var u,c,f;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=function(t){var e=0;u.forEach(function(r,n){t.find(function(t){return r.field_id==t.field_id})?(e==u.length-1&&a(t),e++):o.gudhub.ghconstructor.getInstance(r.data_type).then(function(n){if(n){var i=n.getTemplate().model.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),t.push({field_id:r.field_id,show:i.settings.show_field}),e==u.length-1&&a(t)}e++},function(t){e++})})},e.next=3,i.gudhub.getFieldModels(t);case 3:u=e.sent,0!==r.length?(c=[],r.forEach(function(t,e){var n=u.find(function(e){return t.field_id==e.field_id});if(n){var i=n.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),c.push({field_id:n.field_id,show:t.show,width:t.width?t.width:"150px"})}e+1==r.length&&f(c)})):f(r);case 5:case"end":return e.stop()}},n)}));return function(t){return a.apply(this,arguments)}}())}},{key:"createFieldsListToViewWithDataType",value:function(t,r){var i=this;return new Promise(function(){var o=n(e().mark(function o(a){var u,c,f,l;return e().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return u=[],o.next=3,i.gudhub.getFieldModels(t);case 3:c=o.sent,f=c.map(function(t){return+t.field_id}),l=[],u=c.reduce(function(t,r){return t.find(function(t,e){return r.field_id==t.field_id})||(t.push({field_id:r.field_id,data_type:r.data_type}),l.push(new Promise(function(){var o=n(e().mark(function n(o){var a,u,c;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.gudhub.ghconstructor.getInstance(r.data_type);case 2:a=e.sent,u=a.getTemplate(),c=u.model.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}},t.find(function(t){return t.field_id==r.field_id}).show=c.settings.show_field,o(!0);case 7:case"end":return e.stop()}},n)}));return function(t){return o.apply(this,arguments)}}()))),t},r),Promise.all(l).then(function(){u=u.filter(function(t){return-1!=f.indexOf(t.field_id)}),a(u)});case 8:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())}}]),t}();
201
185
  },{}],"DfIi":[function(require,module,exports) {
202
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new G(n||[]);return a(i,"_invoke",{value:I(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var L={};f(L,u,function(){return this});var E=Object.getPrototypeOf,O=E&&E(E(T([])));O&&O!==o&&i.call(O,u)&&(L=O);var _=x.prototype=w.prototype=Object.create(L);function j(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function S(e,r){function n(o,a,c,u){var s=p(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,c,u)},function(t){n("throw",t,c,u)}):r.resolve(f).then(function(t){l.value=t,c(l)},function(t){return n("throw",t,c,u)})}u(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function I(t,e,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?m:v,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function k(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},j(S.prototype),f(S.prototype,s,function(){return this}),n.AsyncIterator=S,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new S(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(_),f(_,l,"Generator"),f(_,u,function(){return this}),f(_,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(e){var r=u(e,"string");return"symbol"==t(r)?r:String(r)}function u(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var s=exports.default=function(){function t(e){o(this,t),this.gudhub=e,this.selectedItems={}}return a(t,[{key:"selectItems",value:function(){var t=n(e().mark(function t(r,n){var o,i,a;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.selectedItems.hasOwnProperty(r)){t.next=6;break}return this.selectedItems[r]={items:[],app:[]},t.next=4,this.gudhub.getApp(r);case 4:o=t.sent,this.selectedItems[r].app=o;case 6:i=this.selectedItems[r],a=i.items.map(function(t){return t.item_id}),n.forEach(function(t){-1!=a.indexOf(t.item_id)?i.items.splice(a.indexOf(t.item_id),1):i.items[i.items.length]=t});case 9:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getSelectedItems",value:function(t){return this.selectedItems[t]?this.selectedItems[t]:{items:[],app:[]}}},{key:"clearSelectedItems",value:function(t){this.selectedItems[t]&&(this.selectedItems[t].items=[])}},{key:"isItemSelected",value:function(t,e){var r=this.getSelectedItems(t);return null!==r&&-1!=(r=r.items.map(function(t){return t.item_id})).indexOf(e)}}]),t}();
186
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new G(n||[]);return a(i,"_invoke",{value:I(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var L={};f(L,u,function(){return this});var E=Object.getPrototypeOf,O=E&&E(E(T([])));O&&O!==o&&i.call(O,u)&&(L=O);var _=x.prototype=w.prototype=Object.create(L);function j(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function S(e,r){function n(o,a,c,u){var s=p(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,c,u)},function(t){n("throw",t,c,u)}):r.resolve(f).then(function(t){l.value=t,c(l)},function(t){return n("throw",t,c,u)})}u(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function I(t,e,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?m:v,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function k(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},j(S.prototype),f(S.prototype,s,function(){return this}),n.AsyncIterator=S,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new S(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(_),f(_,l,"Generator"),f(_,u,function(){return this}),f(_,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(e){var r=u(e,"string");return"symbol"===t(r)?r:String(r)}function u(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var s=exports.default=function(){function t(e){o(this,t),this.gudhub=e,this.selectedItems={}}return a(t,[{key:"selectItems",value:function(){var t=n(e().mark(function t(r,n){var o,i,a;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.selectedItems.hasOwnProperty(r)){t.next=6;break}return this.selectedItems[r]={items:[],app:[]},t.next=4,this.gudhub.getApp(r);case 4:o=t.sent,this.selectedItems[r].app=o;case 6:i=this.selectedItems[r],a=i.items.map(function(t){return t.item_id}),n.forEach(function(t){-1!=a.indexOf(t.item_id)?i.items.splice(a.indexOf(t.item_id),1):i.items[i.items.length]=t});case 9:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getSelectedItems",value:function(t){return this.selectedItems[t]?this.selectedItems[t]:{items:[],app:[]}}},{key:"clearSelectedItems",value:function(t){this.selectedItems[t]&&(this.selectedItems[t].items=[])}},{key:"isItemSelected",value:function(t,e){var r=this.getSelectedItems(t);return null!==r&&-1!=(r=r.items.map(function(t){return t.item_id})).indexOf(e)}}]),t}();
203
187
  },{}],"xR4c":[function(require,module,exports) {
204
188
  "use strict";function e(){return'function createList(items) {\n return items.reduce(\n (acc, item) => {\n acc.list[item.item_id] = item;\n acc.ids.push(item.item_id);\n return acc;\n },\n { ids: [], list: {} }\n );\n };\n function compareItemsLists(oldItems, newItems) {\n const { ids: oldIds, list: oldList } = createList(oldItems);\n const { ids: newIds, list: newList } = createList(newItems);\n\n const deletedItemsIds = oldIds.filter((id) => !newIds.includes(id));\n const recentItemsIds = oldIds.filter((id) => !deletedItemsIds.includes(id));\n const newItemsIds = newIds.filter((id) => !oldIds.includes(id));\n\n const diff_fields_items = {};\n const diff_fields_items_Ids = [];\n \n recentItemsIds.forEach((id) => {\n const newItem = newList[id];\n const oldItem = oldList[id];\n\n oldItem.fields.forEach((field1) => {\n const sameField = newItem.fields.find(\n (field2) => Number(field2.field_id) === Number(field1.field_id)\n );\n\n if (!sameField) {\n if (!diff_fields_items[newItem.item_id]) {\n diff_fields_items[newItem.item_id] = [];\n diff_fields_items_Ids.push(newItem.item_id);\n }\n\n return diff_fields_items[newItem.item_id].push(field1);\n }\n\n if (field1.field_value != sameField.field_value) {\n if (!diff_fields_items[newItem.item_id]) {\n diff_fields_items[newItem.item_id] = [];\n diff_fields_items_Ids.push(newItem.item_id);\n }\n return diff_fields_items[newItem.item_id].push(field1);\n }\n });\n });\n\n return {\n newItems: newItemsIds.reduce((acc, id) => {\n acc.push(newList[id]);\n return acc;\n }, []),\n deletedItems: deletedItemsIds.reduce((acc, id) => {\n acc.push(oldList[id]);\n return acc;\n }, []),\n diff_fields_items_Ids,\n diff_fields_items,\n diff_items: diff_fields_items_Ids.reduce((acc, id) => {\n acc.push(oldList[id]);\n return acc;\n }, []),\n };\n }\n\n self.addEventListener("message", (event) => {\n const { items_list1, items_list2 } = event.data;\n\n const diff = compareItemsLists(items_list1, items_list2);\n self.postMessage({ diff });\n });'}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compare_items_lists_Worker=e;
205
189
  },{}],"nKaW":[function(require,module,exports) {
206
- "use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r(t){return a(t)||o(t)||i(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new I(n||[]);return i(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",y="suspendedYield",v="executing",b="completed",m={};function g(){}function _(){}function w(){}var x={};f(x,a,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(T([])));k&&k!==r&&n.call(k,a)&&(x=k);var j=w.prototype=g.prototype=Object.create(x);function L(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){function r(i,o,a,u){var c=h(t[i],t,o);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==p(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,a,u)},function(t){r("throw",t,a,u)}):e.resolve(f).then(function(t){s.value=t,a(s)},function(t){return r("throw",t,a,u)})}u(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function S(e,r,n){var i=d;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===b){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=h(e,r,n);if("normal"===s.type){if(i=n.done?b:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=b,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(p(e)+" is not iterable")}return _.prototype=w,i(j,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},L(E.prototype),f(E.prototype,u,function(){return this}),e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new E(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(j),f(j,s,"Generator"),f(j,a,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function s(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){var e=l(t,"string");return"symbol"==p(e)?e:String(e)}function l(t,e){if("object"!=p(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,u,"next",t)}function u(t){h(o,n,i,a,u,"throw",t)}a(void 0)})}}function y(t,n,i,o,a){function u(t,e,r){return f.apply(this,arguments)}function f(){return(f=d(c().mark(function t(e,r,n){var i,o,a,f,h;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=null,"array"!==e.type){t.next=13;break}if(!Number(e.is_static)){t.next=10;break}return t.t0=Array,t.next=6,b(e.childs,r,n);case 6:t.t1=t.sent,i=new t.t0(t.t1),t.next=13;break;case 10:return t.next=12,l(e,r,n);case 12:i=t.sent;case 13:if("object"!==e.type){t.next=23;break}if(!Number(e.current_item)){t.next=20;break}return t.next=17,y(e,r);case 17:i=t.sent,t.next=23;break;case 20:return t.next=22,b(e.childs,r,n);case 22:i=t.sent;case 23:if("property"!==e.type){t.next=27;break}return t.next=26,g(e,r,n);case 26:i=t.sent;case 27:if("object"!==p(e)||void 0!==e.type){t.next=41;break}o={},t.t2=c().keys(e);case 30:if((t.t3=t.t2()).done){t.next=40;break}if(a=t.t3.value,!e.hasOwnProperty(a)){t.next=38;break}return f=e[a],t.next=36,u(f,r,n);case 36:h=t.sent,o[a]=h[f.property_name];case 38:t.next=30;break;case 40:return t.abrupt("return",o);case 41:return t.abrupt("return",s({},e.property_name,i));case 42:case"end":return t.stop()}},t)}))).apply(this,arguments)}function l(t,e,r){return h.apply(this,arguments)}function h(){return(h=d(c().mark(function t(e,n,a){var u,s,f,l,p,h,y;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.getApp(Number(e.app_id));case 2:return u=t.sent,t.next=5,O(e.filter,u.items_list,a,n);case 5:return s=t.sent,e.isSortable&&e.field_id_to_sort&&""!==e.field_id_to_sort&&(f=s.flatMap(function(t){var r=t.fields.find(function(t){return t.field_id==e.field_id_to_sort});return r&&""!=r.field_value?t:[]}),l=s.filter(function(t){if(!f.includes(t))return t}),f=f.sort(function(t,r){return"desc"==e.sortType?r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value:t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value}),s=[].concat(r(f),r(l))),e.offset&&(p=e.use_variables_for_limit_and_offset&&o?o[e.offset]:/^[0-9]+$/.test(e.offset)?e.offset:0,s=s.slice(p)),e.limit&&0!==(h=e.use_variables_for_limit_and_offset&&o?o[e.limit]:/^[0-9]+$/.test(e.limit)||0)&&(s=s.slice(0,h)),y=s.map(function(){var t=d(c().mark(function t(r){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",b(e.childs,r,u.app_id));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),t.abrupt("return",Promise.all(y));case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function y(t,e){return v.apply(this,arguments)}function v(){return(v=d(c().mark(function t(e,r){var n,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.getApp(e.app_id);case 2:return n=t.sent,o=n.items_list||[],t.abrupt("return",b(e.childs,r||o[0],n.app_id));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function b(t,e,r){return m.apply(this,arguments)}function m(){return(m=d(c().mark(function t(r,n,i){var o,a;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.map(function(){var t=d(c().mark(function t(e){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(e,n,i));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}());case 2:return o=t.sent,t.next=5,Promise.all(o);case 5:return a=t.sent,t.abrupt("return",a.reduce(function(t,r){return e(e({},t),r)},{}));case 7:case"end":return t.stop()}},t)}))).apply(this,arguments)}function g(t,e,r){return _.apply(this,arguments)}function _(){return(_=d(c().mark(function t(e,n,o){var a,u,s,f,l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.property_type,t.next="static"===t.t0?3:"variable"===t.t0?4:"field_id"===t.t0?9:"function"===t.t0?10:(t.t0,20);break;case 3:return t.abrupt("return",e.static_field_value);case 4:t.t1=e.variable_type,t.next="app_id"===t.t1?7:(t.t1,8);break;case 7:return t.abrupt("return",o);case 8:return t.abrupt("return","".concat(o,".").concat(n.item_id));case 9:return t.abrupt("return",e.field_id);case 10:if("function"!=typeof e.function){t.next=15;break}return a=e.function.apply(e,[n,o,i.gudhub].concat(r(e.args))),t.abrupt("return",a);case 15:return u=new Function("item, appId, gudhub","return (async "+e.function+")(item, appId, gudhub)"),t.next=18,u(n,o,i.gudhub);case 18:return s=t.sent,t.abrupt("return",s);case 20:if(e.field_id||!e.name_space){t.next=24;break}return t.next=23,i.gudhub.getFieldIdByNameSpace(o,e.name_space);case 23:e.field_id=t.sent;case 24:if(!Boolean(Number(e.interpretation))){t.next=31;break}return t.next=27,i.gudhub.getInterpretationById(Number(o),Number(n.item_id),Number(e.field_id),"value");case 27:return f=t.sent,t.abrupt("return",f);case 31:return t.next=33,i.gudhub.getFieldValue(Number(o),Number(n.item_id),Number(e.field_id));case 33:return l=t.sent,t.abrupt("return",l);case 35:case"end":return t.stop()}},t)}))).apply(this,arguments)}function w(t,e,r,n,i){return x.apply(this,arguments)}function x(){return(x=d(c().mark(function t(n,a,u,s,f){var l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.prefilter(JSON.parse(JSON.stringify(n)),e({element_app_id:a,app_id:u,item_id:s},o));case 2:return l=t.sent,t.abrupt("return",i.gudhub.filter(f,[].concat(r(l),r(n))));case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function O(){return k.apply(this,arguments)}function k(){return(k=d(c().mark(function t(){var e,n,i,o,a=arguments;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:[],n=a.length>1&&void 0!==a[1]?a[1]:[],i=a.length>2&&void 0!==a[2]?a[2]:"",o=a.length>3&&void 0!==a[3]?a[3]:{},t.abrupt("return",e.length?w(e,i,i,o.item_id,n):r(n));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}return u(t,n,a,o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compiler=y;
190
+ "use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r(t){return a(t)||o(t)||i(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new I(n||[]);return i(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",y="suspendedYield",v="executing",b="completed",m={};function g(){}function _(){}function w(){}var x={};f(x,a,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(T([])));k&&k!==r&&n.call(k,a)&&(x=k);var j=w.prototype=g.prototype=Object.create(x);function L(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){function r(i,o,a,u){var c=h(t[i],t,o);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==p(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,a,u)},function(t){r("throw",t,a,u)}):e.resolve(f).then(function(t){s.value=t,a(s)},function(t){return r("throw",t,a,u)})}u(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function S(e,r,n){var i=d;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===b){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=h(e,r,n);if("normal"===s.type){if(i=n.done?b:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=b,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(p(e)+" is not iterable")}return _.prototype=w,i(j,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},L(E.prototype),f(E.prototype,u,function(){return this}),e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new E(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(j),f(j,s,"Generator"),f(j,a,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function s(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){var e=l(t,"string");return"symbol"===p(e)?e:String(e)}function l(t,e){if("object"!==p(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,u,"next",t)}function u(t){h(o,n,i,a,u,"throw",t)}a(void 0)})}}function y(t,n,i,o,a){function u(t,e,r){return f.apply(this,arguments)}function f(){return(f=d(c().mark(function t(e,r,n){var i,o,a,f,h;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=null,"array"!==e.type){t.next=13;break}if(!Number(e.is_static)){t.next=10;break}return t.t0=Array,t.next=6,b(e.childs,r,n);case 6:t.t1=t.sent,i=new t.t0(t.t1),t.next=13;break;case 10:return t.next=12,l(e,r,n);case 12:i=t.sent;case 13:if("object"!==e.type){t.next=23;break}if(!Number(e.current_item)){t.next=20;break}return t.next=17,y(e,r);case 17:i=t.sent,t.next=23;break;case 20:return t.next=22,b(e.childs,r,n);case 22:i=t.sent;case 23:if("property"!==e.type){t.next=27;break}return t.next=26,g(e,r,n);case 26:i=t.sent;case 27:if("object"!==p(e)||void 0!==e.type){t.next=41;break}o={},t.t2=c().keys(e);case 30:if((t.t3=t.t2()).done){t.next=40;break}if(a=t.t3.value,!e.hasOwnProperty(a)){t.next=38;break}return f=e[a],t.next=36,u(f,r,n);case 36:h=t.sent,o[a]=h[f.property_name];case 38:t.next=30;break;case 40:return t.abrupt("return",o);case 41:return t.abrupt("return",s({},e.property_name,i));case 42:case"end":return t.stop()}},t)}))).apply(this,arguments)}function l(t,e,r){return h.apply(this,arguments)}function h(){return(h=d(c().mark(function t(e,n,a){var u,s,f,l,p,h,y;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.getApp(Number(e.app_id));case 2:return u=t.sent,t.next=5,O(e.filter,u.items_list,a,n);case 5:return s=t.sent,e.isSortable&&e.field_id_to_sort&&""!==e.field_id_to_sort&&(f=s.flatMap(function(t){var r=t.fields.find(function(t){return t.field_id==e.field_id_to_sort});return r&&""!=r.field_value?t:[]}),l=s.filter(function(t){if(!f.includes(t))return t}),f=f.sort(function(t,r){return"desc"==e.sortType?r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value:t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value}),s=[].concat(r(f),r(l))),e.offset&&(p=e.use_variables_for_limit_and_offset&&o?o[e.offset]:/^[0-9]+$/.test(e.offset)?e.offset:0,s=s.slice(p)),e.limit&&0!==(h=e.use_variables_for_limit_and_offset&&o?o[e.limit]:/^[0-9]+$/.test(e.limit)||0)&&(s=s.slice(0,h)),y=s.map(function(){var t=d(c().mark(function t(r){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",b(e.childs,r,u.app_id));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),t.abrupt("return",Promise.all(y));case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function y(t,e){return v.apply(this,arguments)}function v(){return(v=d(c().mark(function t(e,r){var n,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.getApp(e.app_id);case 2:return n=t.sent,o=n.items_list||[],t.abrupt("return",b(e.childs,r||o[0],n.app_id));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function b(t,e,r){return m.apply(this,arguments)}function m(){return(m=d(c().mark(function t(r,n,i){var o,a;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.map(function(){var t=d(c().mark(function t(e){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(e,n,i));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}());case 2:return o=t.sent,t.next=5,Promise.all(o);case 5:return a=t.sent,t.abrupt("return",a.reduce(function(t,r){return e(e({},t),r)},{}));case 7:case"end":return t.stop()}},t)}))).apply(this,arguments)}function g(t,e,r){return _.apply(this,arguments)}function _(){return(_=d(c().mark(function t(e,n,o){var a,u,s,f,l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.property_type,t.next="static"===t.t0?3:"variable"===t.t0?4:"field_id"===t.t0?9:"function"===t.t0?10:(t.t0,20);break;case 3:return t.abrupt("return",e.static_field_value);case 4:t.t1=e.variable_type,t.next="app_id"===t.t1?7:(t.t1,8);break;case 7:return t.abrupt("return",o);case 8:return t.abrupt("return","".concat(o,".").concat(n.item_id));case 9:return t.abrupt("return",e.field_id);case 10:if("function"!=typeof e.function){t.next=15;break}return a=e.function.apply(e,[n,o,i.gudhub].concat(r(e.args))),t.abrupt("return",a);case 15:return u=new Function("item, appId, gudhub","return (async "+e.function+")(item, appId, gudhub)"),t.next=18,u(n,o,i.gudhub);case 18:return s=t.sent,t.abrupt("return",s);case 20:if(e.field_id||!e.name_space){t.next=24;break}return t.next=23,i.gudhub.getFieldIdByNameSpace(o,e.name_space);case 23:e.field_id=t.sent;case 24:if(!Boolean(Number(e.interpretation))){t.next=31;break}return t.next=27,i.gudhub.getInterpretationById(Number(o),Number(n.item_id),Number(e.field_id),"value");case 27:return f=t.sent,t.abrupt("return",f);case 31:return t.next=33,i.gudhub.getFieldValue(Number(o),Number(n.item_id),Number(e.field_id));case 33:return l=t.sent,t.abrupt("return",l);case 35:case"end":return t.stop()}},t)}))).apply(this,arguments)}function w(t,e,r,n,i){return x.apply(this,arguments)}function x(){return(x=d(c().mark(function t(n,a,u,s,f){var l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.prefilter(JSON.parse(JSON.stringify(n)),e({element_app_id:a,app_id:u,item_id:s},o));case 2:return l=t.sent,t.abrupt("return",i.gudhub.filter(f,[].concat(r(l),r(n))));case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function O(){return k.apply(this,arguments)}function k(){return(k=d(c().mark(function t(){var e,n,i,o,a=arguments;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:[],n=a.length>1&&void 0!==a[1]?a[1]:[],i=a.length>2&&void 0!==a[2]?a[2]:"",o=a.length>3&&void 0!==a[3]?a[3]:{},t.abrupt("return",e.length?w(e,i,i,o.item_id,n):r(n));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}return u(t,n,a,o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compiler=y;
207
191
  },{}],"zqOZ":[function(require,module,exports) {
208
- "use strict";function e(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=t(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw o}}}}function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(){r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new T(r||[]);return a(o,"_invoke",{value:I(e,n,c)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",_="suspendedYield",v="executing",m="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,u,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==n&&i.call(k,u)&&(E=k);var O=b.prototype=g.prototype=Object.create(E);function A(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function P(e,t){function n(r,a,c,u){var s=d(e[r],e,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==o(l)&&i.call(l,"__await")?t.resolve(l.__await).then(function(e){n("next",e,c,u)},function(e){n("throw",e,c,u)}):t.resolve(l).then(function(e){f.value=e,c(f)},function(e){return n("throw",e,c,u)})}u(s.arg)}var r;a(this,"_invoke",{value:function(e,i){function a(){return new t(function(t,r){n(e,i,t,r)})}return r=r?r.then(a,a):a()}})}function I(t,n,r){var i=h;return function(a,o){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var c=r.delegate;if(c){var u=L(c,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?m:_,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=m,r.method="throw",r.arg=s.arg)}}}function L(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(o(t)+" is not iterable")}return w.prototype=b,a(O,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,f,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,f,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},A(P.prototype),l(P.prototype,s,function(){return this}),t.AsyncIterator=P,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new P(p(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},A(O),l(O,f,"Generator"),l(O,u,function(){return this}),l(O,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],c=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,a,o){try{var c=e[a](o),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function c(e){i(o,r,a,c,u,"next",e)}function u(e){i(o,r,a,c,u,"throw",e)}c(void 0)})}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=l(e,"string");return"symbol"==o(t)?t:String(t)}function l(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var p=exports.default=function(){function t(e){c(this,t),this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}return s(t,[{key:"createAppsFromTemplate",value:function(e,t,n,r){var i=this,a=this;return new Promise(function(c){var u=100/(6*e.apps.length),s=0;a.createApps(e,function(e){s+=1,n&&n.call(i,{percent:s*u,status:e})},r).then(function(e){a.createItems(e,t,function(e){"string"==typeof e?(s+=1,n&&n.call(i,{percent:s*u,status:e})):"object"===o(e)&&(n&&n.call(i,{status:"Done",apps:e}),c())},r)})})}},{key:"createItems",value:function(e,t,n,i){var o=this;return new Promise(function(){var c=a(r().mark(function c(u){var s,f,l,p,d,h;return r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return s=t||1e5,f=o,l=[],p=[],c.next=6,f.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 6:d=c.sent,h=d.accesstoken,e.forEach(function(e){p.push(new Promise(function(){var t=a(r().mark(function t(a){var c,u,p;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!i){t.next=6;break}return t.next=3,f.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(f._searchOldAppId(e.app_id,f.appsConnectingMap.apps)),method:"GET"});case 3:c=t.sent,t.next=9;break;case 6:return t.next=8,f.gudhub.getApp(f._searchOldAppId(e.app_id,f.appsConnectingMap.apps));case 8:c=t.sent;case 9:n&&n.call(o,"GET APP: ".concat(c.app_name," (Items steps)")),u=JSON.parse(JSON.stringify(c)),p=u.items_list.map(function(e){return{index_number:e.index_number,item_id:0,fields:[]}}).filter(function(e,t){return t<=s}),f.gudhub.addNewItems(e.app_id,p).then(function(t){n&&n.call(o,"ADD NEW ITEMS: ".concat(c.app_name," (Items steps)")),e.items_list=t,f._updateMap(e.items_list,u.items_list),f._addFieldValue(u.items_list,e.items_list,f.appsConnectingMap),l.push(e),a()});case 13:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()))}),Promise.all(p).then(function(){l.forEach(function(e){e.items_list.forEach(function(e){e.fields.forEach(function(e){f.appsConnectingMap.fields.forEach(function(t){e.field_id===t.old_field_id&&(e.field_id=t.new_field_id,e.element_id=t.new_field_id)})})})}),f.deleteField(l),f.replaceValue(l,f.appsConnectingMap).then(function(){var e=[];l.forEach(function(t){e.push(new Promise(function(e){var r=t.items_list.map(function(e){return e.fields.forEach(function(e){delete e.data_id}),e});f.gudhub.updateItems(t.app_id,r).then(function(){n&&n.call(o,"REPLACE VALUE: ".concat(t.app_name," (Items steps)")),e()})}))}),Promise.all(e).then(function(){n.call(o,l),u()})})});case 10:case"end":return c.stop()}},c)}));return function(e){return c.apply(this,arguments)}}())}},{key:"deleteField",value:function(e){e.forEach(function(e){e.items_list.forEach(function(t){t.fields=t.fields.filter(function(t){return e.field_list.findIndex(function(e){return e.field_id==t.field_id})>-1})})})}},{key:"replaceValue",value:function(e,t){var n=this;return new Promise(function(){var i=a(r().mark(function i(a){var o,c;return r().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:o=[],c=n,e.forEach(function(e){e.field_list.forEach(function(n){"item_ref"===n.data_type&&c._replaceValueItemRef(e,n,t),o.push(new Promise(function(t){c.gudhub.ghconstructor.getInstance(n.data_type).then(function(r){return void 0===r?(console.log("ERROR WHILE GETTING INSTANCE OF ",n.data_type),void t({type:n.data_type})):"file"==r.getTemplate().constructor?c.gudhub.util.fileInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(e)}):void("document"==r.getTemplate().constructor?c.documentInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(r)}):t(r))})}))})}),o.length>0?Promise.all(o).then(function(e){a(e)}):a(result);case 4:case"end":return r.stop()}},i)}));return function(e){return i.apply(this,arguments)}}())}},{key:"documentInstallerHelper",value:function(t,n,i){var o=this;return new Promise(function(){var c=a(r().mark(function a(c){var u,s,f,l,p,d,h;return r().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:u=e(n),r.prev=1,u.s();case 3:if((s=u.n()).done){r.next=18;break}if(f=s.value,l=f.item_id,!((p=f.fields.find(function(e){return e.element_id===i}))&&p.field_value&&p.field_value.length>0)){r.next=16;break}return r.next=10,o.gudhub.getDocument({_id:p.field_value});case 10:if(!(d=r.sent)||!d.data){r.next=16;break}return r.next=14,o.gudhub.createDocument({app_id:t,item_id:l,element_id:i,data:d.data});case 14:h=r.sent,p.field_value=h._id;case 16:r.next=3;break;case 18:r.next=23;break;case 20:r.prev=20,r.t0=r.catch(1),u.e(r.t0);case 23:return r.prev=23,u.f(),r.finish(23);case 26:c();case 27:case"end":return r.stop()}},a,null,[[1,20,23,26]])}));return function(e){return c.apply(this,arguments)}}())}},{key:"_replaceValueItemRef",value:function(e,t,n){e.items_list.forEach(function(e){e.fields.forEach(function(e){if(e.field_id===t.field_id&&e.field_value){var r=e.field_value.split(",");r.forEach(function(e,t){var i=e.split(".");n.apps.forEach(function(e){i[0]==e.old_app_id&&(i[0]=e.new_app_id)}),n.items.forEach(function(e){i[1]==e.old_item_id&&(i[1]=e.new_item_id)}),r[t]=i.join(".")}),e.field_value=r.join(",")}})})}},{key:"_addFieldValue",value:function(e,t,n){t.forEach(function(t){n.items.forEach(function(n){t.item_id===n.new_item_id&&e.forEach(function(e){n.old_item_id===e.item_id&&(t.fields=e.fields)})})})}},{key:"_updateMap",value:function(e,t){var n=this;t.forEach(function(t){e.forEach(function(e){t.index_number===e.index_number&&n.appsConnectingMap.items.push({old_item_id:t.item_id,new_item_id:e.item_id})})})}},{key:"_searchOldAppId",value:function(e,t){var n=0;return t.forEach(function(t){t.new_app_id===e&&(n=t.old_app_id)}),n}},{key:"createApps",value:function(t,n,i){var o=this,c=this,u={step_size:100/(3*t.apps.length),apps:[]};return new Promise(function(){var s=a(r().mark(function a(s){var f,l,p,d,h,_,v,m;return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return f={},l=[],p=[],a.next=5,c.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 5:d=a.sent,h=d.accesstoken,_=e(t.apps),a.prev=8,m=r().mark(function e(){var a,d,_,m;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=v.value,!i){e.next=7;break}return e.next=4,c.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(a),method:"GET"});case 4:d=e.sent,e.next=10;break;case 7:return e.next=9,c.gudhub.getApp(a);case 9:d=e.sent;case 10:n&&n.call(o,"GET APP: ".concat(d.app_name," (App steps)")),_=JSON.parse(JSON.stringify(d)),f[_.app_id]=_,u.apps.push(_.icon),(m=c.prepareAppTemplate(_)).app_name=m.app_name+" New",m.privacy=1,t.data_to_change&&(t.data_to_change.name&&(m.app_name=t.data_to_change.name),t.data_to_change.icon&&(m.icon=t.data_to_change.icon)),c.resetViewsIds(m),c.gudhub.createNewApp(m).then(function(e){n&&n.call(o,"CREATE NEW APP: ".concat(d.app_name," (App steps)")),l.push(e),c.mapApp(_,e,c.appsConnectingMap),t.apps.length==l.length&&(c.connectApps(l,c.appsConnectingMap,f),l.forEach(function(e){c.gudhub.updateApp(e).then(function(e){n&&n.call(o,"UPDATE APP: ".concat(d.app_name," (App steps)")),p.push(e),t.apps.length==p.length&&s(p)})}))});case 20:case"end":return e.stop()}},e)}),_.s();case 11:if((v=_.n()).done){a.next=15;break}return a.delegateYield(m(),"t0",13);case 13:a.next=11;break;case 15:a.next=20;break;case 17:a.prev=17,a.t1=a.catch(8),_.e(a.t1);case 20:return a.prev=20,_.f(),a.finish(20);case 23:case"end":return a.stop()}},a,null,[[8,17,20,23]])}));return function(e){return s.apply(this,arguments)}}())}},{key:"mapApp",value:function(e,t,n){n.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(function(e){t.field_list.forEach(function(t){e.name_space==t.name_space&&n.fields.push({name_space:e.name_space,old_field_id:e.field_id,new_field_id:t.field_id})})}),e.views_list.forEach(function(e){t.views_list.forEach(function(t){e.name==t.name&&n.views.push({name:e.name,old_view_id:e.view_id,new_view_id:t.view_id})})})}},{key:"crawling",value:function(e,t){var n=null===e?[]:Object.keys(e),r=this;n.length>0&&n.forEach(function(n){var i=e[n];void 0!==i&&"string"!=typeof e&&(t(n,i,e),r.crawling(i,t))})}},{key:"resetViewsIds",value:function(e){e.view_init=0,this.crawling(e.views_list,function(e,t,n){"view_id"!=e&&"container_id"!=e||(n[e]=0)})}},{key:"connectApps",value:function(e,t,n){var r=this;return e.forEach(function(e){t.apps.forEach(function(n){e.view_init===n.new_view_init&&t.views.forEach(function(t){n.old_view_init===t.old_view_id&&(e.view_init=t.new_view_id)})}),r.crawling(e.field_list,function(i,a,o){if(-1!==i.indexOf("field_id")||-1!==i.indexOf("FieldId")||-1!==i.indexOf("destination_field")){var c=String(a).split(","),u=[];t.fields.forEach(function(e){c.forEach(function(t){t==e.old_field_id&&u.push(e.new_field_id)})}),u.length&&(o[i]=u.join(","))}if(-1==i.indexOf("app_id")&&-1==i.indexOf("AppId")&&-1==i.indexOf("destination_app")||t.apps.forEach(function(e){a==e.old_app_id&&(o[i]=e.new_app_id)}),-1!==i.indexOf("view_id")&&t.views.forEach(function(e){a==e.old_view_id&&(o[i]=e.new_view_id)}),-1!==i.indexOf("src")&&isFinite(a)){var s=t.apps.find(function(t){return t.new_app_id===e.app_id}).old_app_id,f=r.findPath(n[s].views_list,"container_id",a);o[i]="".concat(r.getValueByPath(e.views_list,f,"container_id"))}})}),e}},{key:"getValueByPath",value:function(e,t,n){var r=e;return t.split(".").forEach(function(e){r=r[e]}),r[n]}},{key:"findPath",value:function(e,t,n){var r=!1,i=!1,a=[];return this.crawling(e,function(e,c,u){i&&a.reverse().forEach(function(e){i&&(e.delete=!0,e.parent===u&&(i=!1,(a=a.filter(function(e){return!e.delete})).reverse()))}),r||("object"===o(u[e])&&a.push({prop:e,parent:u}),c==n&&t===e?r=!0:Object.keys(u).pop()===e&&"object"!==o(u[e])&&(i=!0))}),a.map(function(e){return e.prop}).join(".")}},{key:"prepareAppTemplate",value:function(e){var t=JSON.parse(JSON.stringify(e));return this.crawling(t.views_list,function(e,t,n){"element_id"==e&&(n.element_id=-Number(t),n.create_element=-Number(t))}),t.field_list.forEach(function(e){e.create_field=-Number(e.field_id),e.element_id=-Number(e.field_id),e.field_id=-Number(e.field_id),e.field_value=""}),t.items_list=[],delete t.app_id,delete t.icon.id,delete t.group_id,delete t.trash,delete t.last_update,delete t.file_list,t}}]),t}();
192
+ "use strict";function e(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=t(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw o}}}}function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(){r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new T(r||[]);return a(o,"_invoke",{value:I(e,n,c)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",_="suspendedYield",v="executing",m="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,u,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==n&&i.call(k,u)&&(E=k);var O=b.prototype=g.prototype=Object.create(E);function A(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function P(e,t){function n(r,a,c,u){var s=d(e[r],e,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==o(l)&&i.call(l,"__await")?t.resolve(l.__await).then(function(e){n("next",e,c,u)},function(e){n("throw",e,c,u)}):t.resolve(l).then(function(e){f.value=e,c(f)},function(e){return n("throw",e,c,u)})}u(s.arg)}var r;a(this,"_invoke",{value:function(e,i){function a(){return new t(function(t,r){n(e,i,t,r)})}return r=r?r.then(a,a):a()}})}function I(t,n,r){var i=h;return function(a,o){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var c=r.delegate;if(c){var u=L(c,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?m:_,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=m,r.method="throw",r.arg=s.arg)}}}function L(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(o(t)+" is not iterable")}return w.prototype=b,a(O,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,f,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,f,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},A(P.prototype),l(P.prototype,s,function(){return this}),t.AsyncIterator=P,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new P(p(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},A(O),l(O,f,"Generator"),l(O,u,function(){return this}),l(O,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],c=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,a,o){try{var c=e[a](o),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function c(e){i(o,r,a,c,u,"next",e)}function u(e){i(o,r,a,c,u,"throw",e)}c(void 0)})}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=l(e,"string");return"symbol"===o(t)?t:String(t)}function l(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var p=exports.default=function(){function t(e){c(this,t),this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}return s(t,[{key:"createAppsFromTemplate",value:function(e,t,n,r){var i=this,a=this;return new Promise(function(c){var u=100/(6*e.apps.length),s=0;a.createApps(e,function(e){s+=1,n&&n.call(i,{percent:s*u,status:e})},r).then(function(e){a.createItems(e,t,function(e){"string"==typeof e?(s+=1,n&&n.call(i,{percent:s*u,status:e})):"object"===o(e)&&(n&&n.call(i,{status:"Done",apps:e}),c())},r)})})}},{key:"createItems",value:function(e,t,n,i){var o=this;return new Promise(function(){var c=a(r().mark(function c(u){var s,f,l,p,d,h;return r().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return s=t||1e5,f=o,l=[],p=[],c.next=6,f.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 6:d=c.sent,h=d.accesstoken,e.forEach(function(e){p.push(new Promise(function(){var t=a(r().mark(function t(a){var c,u,p;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!i){t.next=6;break}return t.next=3,f.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(f._searchOldAppId(e.app_id,f.appsConnectingMap.apps)),method:"GET"});case 3:c=t.sent,t.next=9;break;case 6:return t.next=8,f.gudhub.getApp(f._searchOldAppId(e.app_id,f.appsConnectingMap.apps));case 8:c=t.sent;case 9:n&&n.call(o,"GET APP: ".concat(c.app_name," (Items steps)")),u=JSON.parse(JSON.stringify(c)),p=u.items_list.map(function(e){return{index_number:e.index_number,item_id:0,fields:[]}}).filter(function(e,t){return t<=s}),f.gudhub.addNewItems(e.app_id,p).then(function(t){n&&n.call(o,"ADD NEW ITEMS: ".concat(c.app_name," (Items steps)")),e.items_list=t,f._updateMap(e.items_list,u.items_list),f._addFieldValue(u.items_list,e.items_list,f.appsConnectingMap),l.push(e),a()});case 13:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()))}),Promise.all(p).then(function(){l.forEach(function(e){e.items_list.forEach(function(e){e.fields.forEach(function(e){f.appsConnectingMap.fields.forEach(function(t){e.field_id===t.old_field_id&&(e.field_id=t.new_field_id,e.element_id=t.new_field_id)})})})}),f.deleteField(l),f.replaceValue(l,f.appsConnectingMap).then(function(){var e=[];l.forEach(function(t){e.push(new Promise(function(e){var r=t.items_list.map(function(e){return e.fields.forEach(function(e){delete e.data_id}),e});f.gudhub.updateItems(t.app_id,r).then(function(){n&&n.call(o,"REPLACE VALUE: ".concat(t.app_name," (Items steps)")),e()})}))}),Promise.all(e).then(function(){n.call(o,l),u()})})});case 10:case"end":return c.stop()}},c)}));return function(e){return c.apply(this,arguments)}}())}},{key:"deleteField",value:function(e){e.forEach(function(e){e.items_list.forEach(function(t){t.fields=t.fields.filter(function(t){return e.field_list.findIndex(function(e){return e.field_id==t.field_id})>-1})})})}},{key:"replaceValue",value:function(e,t){var n=this;return new Promise(function(){var i=a(r().mark(function i(a){var o,c;return r().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:o=[],c=n,e.forEach(function(e){e.field_list.forEach(function(n){"item_ref"===n.data_type&&c._replaceValueItemRef(e,n,t),o.push(new Promise(function(t){c.gudhub.ghconstructor.getInstance(n.data_type).then(function(r){return void 0===r?(console.log("ERROR WHILE GETTING INSTANCE OF ",n.data_type),void t({type:n.data_type})):"file"==r.getTemplate().constructor?c.gudhub.util.fileInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(e)}):void("document"==r.getTemplate().constructor?c.documentInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(r)}):t(r))})}))})}),o.length>0?Promise.all(o).then(function(e){a(e)}):a(result);case 4:case"end":return r.stop()}},i)}));return function(e){return i.apply(this,arguments)}}())}},{key:"documentInstallerHelper",value:function(t,n,i){var o=this;return new Promise(function(){var c=a(r().mark(function a(c){var u,s,f,l,p,d,h;return r().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:u=e(n),r.prev=1,u.s();case 3:if((s=u.n()).done){r.next=18;break}if(f=s.value,l=f.item_id,!((p=f.fields.find(function(e){return e.element_id===i}))&&p.field_value&&p.field_value.length>0)){r.next=16;break}return r.next=10,o.gudhub.getDocument({_id:p.field_value});case 10:if(!(d=r.sent)||!d.data){r.next=16;break}return r.next=14,o.gudhub.createDocument({app_id:t,item_id:l,element_id:i,data:d.data});case 14:h=r.sent,p.field_value=h._id;case 16:r.next=3;break;case 18:r.next=23;break;case 20:r.prev=20,r.t0=r.catch(1),u.e(r.t0);case 23:return r.prev=23,u.f(),r.finish(23);case 26:c();case 27:case"end":return r.stop()}},a,null,[[1,20,23,26]])}));return function(e){return c.apply(this,arguments)}}())}},{key:"_replaceValueItemRef",value:function(e,t,n){e.items_list.forEach(function(e){e.fields.forEach(function(e){if(e.field_id===t.field_id&&e.field_value){var r=e.field_value.split(",");r.forEach(function(e,t){var i=e.split(".");n.apps.forEach(function(e){i[0]==e.old_app_id&&(i[0]=e.new_app_id)}),n.items.forEach(function(e){i[1]==e.old_item_id&&(i[1]=e.new_item_id)}),r[t]=i.join(".")}),e.field_value=r.join(",")}})})}},{key:"_addFieldValue",value:function(e,t,n){t.forEach(function(t){n.items.forEach(function(n){t.item_id===n.new_item_id&&e.forEach(function(e){n.old_item_id===e.item_id&&(t.fields=e.fields)})})})}},{key:"_updateMap",value:function(e,t){var n=this;t.forEach(function(t){e.forEach(function(e){t.index_number===e.index_number&&n.appsConnectingMap.items.push({old_item_id:t.item_id,new_item_id:e.item_id})})})}},{key:"_searchOldAppId",value:function(e,t){var n=0;return t.forEach(function(t){t.new_app_id===e&&(n=t.old_app_id)}),n}},{key:"createApps",value:function(t,n,i){var o=this,c=this,u={step_size:100/(3*t.apps.length),apps:[]};return new Promise(function(){var s=a(r().mark(function a(s){var f,l,p,d,h,_,v,m;return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return f={},l=[],p=[],a.next=5,c.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 5:d=a.sent,h=d.accesstoken,_=e(t.apps),a.prev=8,m=r().mark(function e(){var a,d,_,m;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=v.value,!i){e.next=7;break}return e.next=4,c.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(a),method:"GET"});case 4:d=e.sent,e.next=10;break;case 7:return e.next=9,c.gudhub.getApp(a);case 9:d=e.sent;case 10:n&&n.call(o,"GET APP: ".concat(d.app_name," (App steps)")),_=JSON.parse(JSON.stringify(d)),f[_.app_id]=_,u.apps.push(_.icon),(m=c.prepareAppTemplate(_)).app_name=m.app_name+" New",m.privacy=1,t.data_to_change&&(t.data_to_change.name&&(m.app_name=t.data_to_change.name),t.data_to_change.icon&&(m.icon=t.data_to_change.icon)),c.resetViewsIds(m),c.gudhub.createNewApp(m).then(function(e){n&&n.call(o,"CREATE NEW APP: ".concat(d.app_name," (App steps)")),l.push(e),c.mapApp(_,e,c.appsConnectingMap),t.apps.length==l.length&&(c.connectApps(l,c.appsConnectingMap,f),l.forEach(function(e){c.gudhub.updateApp(e).then(function(e){n&&n.call(o,"UPDATE APP: ".concat(d.app_name," (App steps)")),p.push(e),t.apps.length==p.length&&s(p)})}))});case 20:case"end":return e.stop()}},e)}),_.s();case 11:if((v=_.n()).done){a.next=15;break}return a.delegateYield(m(),"t0",13);case 13:a.next=11;break;case 15:a.next=20;break;case 17:a.prev=17,a.t1=a.catch(8),_.e(a.t1);case 20:return a.prev=20,_.f(),a.finish(20);case 23:case"end":return a.stop()}},a,null,[[8,17,20,23]])}));return function(e){return s.apply(this,arguments)}}())}},{key:"mapApp",value:function(e,t,n){n.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(function(e){t.field_list.forEach(function(t){e.name_space==t.name_space&&n.fields.push({name_space:e.name_space,old_field_id:e.field_id,new_field_id:t.field_id})})}),e.views_list.forEach(function(e){t.views_list.forEach(function(t){e.name==t.name&&n.views.push({name:e.name,old_view_id:e.view_id,new_view_id:t.view_id})})})}},{key:"crawling",value:function(e,t){var n=null===e?[]:Object.keys(e),r=this;n.length>0&&n.forEach(function(n){var i=e[n];void 0!==i&&"string"!=typeof e&&(t(n,i,e),r.crawling(i,t))})}},{key:"resetViewsIds",value:function(e){e.view_init=0,this.crawling(e.views_list,function(e,t,n){"view_id"!=e&&"container_id"!=e||(n[e]=0)})}},{key:"connectApps",value:function(e,t,n){var r=this;return e.forEach(function(e){t.apps.forEach(function(n){e.view_init===n.new_view_init&&t.views.forEach(function(t){n.old_view_init===t.old_view_id&&(e.view_init=t.new_view_id)})}),r.crawling(e.field_list,function(i,a,o){if(-1!==i.indexOf("field_id")||-1!==i.indexOf("FieldId")||-1!==i.indexOf("destination_field")){var c=String(a).split(","),u=[];t.fields.forEach(function(e){c.forEach(function(t){t==e.old_field_id&&u.push(e.new_field_id)})}),u.length&&(o[i]=u.join(","))}if(-1==i.indexOf("app_id")&&-1==i.indexOf("AppId")&&-1==i.indexOf("destination_app")||t.apps.forEach(function(e){a==e.old_app_id&&(o[i]=e.new_app_id)}),-1!==i.indexOf("view_id")&&t.views.forEach(function(e){a==e.old_view_id&&(o[i]=e.new_view_id)}),-1!==i.indexOf("src")&&isFinite(a)){var s=t.apps.find(function(t){return t.new_app_id===e.app_id}).old_app_id,f=r.findPath(n[s].views_list,"container_id",a);o[i]="".concat(r.getValueByPath(e.views_list,f,"container_id"))}})}),e}},{key:"getValueByPath",value:function(e,t,n){var r=e;return t.split(".").forEach(function(e){r=r[e]}),r[n]}},{key:"findPath",value:function(e,t,n){var r=!1,i=!1,a=[];return this.crawling(e,function(e,c,u){i&&a.reverse().forEach(function(e){i&&(e.delete=!0,e.parent===u&&(i=!1,(a=a.filter(function(e){return!e.delete})).reverse()))}),r||("object"===o(u[e])&&a.push({prop:e,parent:u}),c==n&&t===e?r=!0:Object.keys(u).pop()===e&&"object"!==o(u[e])&&(i=!0))}),a.map(function(e){return e.prop}).join(".")}},{key:"prepareAppTemplate",value:function(e){var t=JSON.parse(JSON.stringify(e));return this.crawling(t.views_list,function(e,t,n){"element_id"==e&&(n.element_id=-Number(t),n.create_element=-Number(t))}),t.field_list.forEach(function(e){e.create_field=-Number(e.field_id),e.element_id=-Number(e.field_id),e.field_id=-Number(e.field_id),e.field_value=""}),t.items_list=[],delete t.app_id,delete t.icon.id,delete t.group_id,delete t.trash,delete t.last_update,delete t.file_list,t}}]),t}();
209
193
  },{}],"E7yc":[function(require,module,exports) {
210
- "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e){return o(e)||i(e)||n(e)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function a(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(t){var r=s(t,"string");return"symbol"==e(r)?r:String(r)}function s(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileHelper=void 0;var p=exports.FileHelper=function(){function e(t){l(this,e),this.gudhub=t}return a(e,[{key:"fileInstallerHelper",value:function(e,r,n){var i=this;return new Promise(function(o){var u=[[]],l=Promise.resolve(),f=[];r.forEach(function(t){var r=t.item_id,i=t.fields.find(function(e){return e.element_id===n});i&&i.field_value&&i.field_value.split(".").forEach(function(t){var i={source:t,destination:{app_id:e,item_id:r,element_id:n}};10!==u[u.length-1].length?u[u.length-1].push(i):u.push([i])})}),u.forEach(function(e){l=l.then(function(){return i.gudhub.duplicateFile(e)}).then(function(e){f=[].concat(t(f),t(e))})}),l.then(function(){r.forEach(function(e){var t=e.item_id,r=e.fields.find(function(e){return e.element_id===n});r&&r.field_value&&(r.field_value="",f.forEach(function(e){e.item_id===t&&(r.field_value=r.field_value.split(",").filter(function(e){return e}).concat(e.file_id).join(","))}))}),o()})})}}]),e}();
194
+ "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e){return o(e)||i(e)||r(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function a(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(t){var n=s(t,"string");return"symbol"===e(n)?n:String(n)}function s(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileHelper=void 0;var p=exports.FileHelper=function(){function e(t){l(this,e),this.gudhub=t}return a(e,[{key:"fileInstallerHelper",value:function(e,n,r){var i=this;return new Promise(function(o){var u=[[]],l=Promise.resolve(),f=[];n.forEach(function(t){var n=t.item_id,i=t.fields.find(function(e){return e.element_id===r});i&&i.field_value&&i.field_value.split(".").forEach(function(t){var i={source:t,destination:{app_id:e,item_id:n,element_id:r}};10!==u[u.length-1].length?u[u.length-1].push(i):u.push([i])})}),u.forEach(function(e){l=l.then(function(){return i.gudhub.duplicateFile(e)}).then(function(e){f=[].concat(t(f),t(e))})}),l.then(function(){n.forEach(function(e){var t=e.item_id,n=e.fields.find(function(e){return e.element_id===r});n&&n.field_value&&(n.field_value="",f.forEach(function(e){e.item_id===t&&(n.field_value=n.field_value.split(",").filter(function(e){return e}).concat(e.file_id).join(","))}))}),o()})})}}]),e}();
211
195
  },{}],"AefJ":[function(require,module,exports) {
212
196
  "use strict";function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareObjects=e;
213
197
  },{}],"ndUf":[function(require,module,exports) {
@@ -215,9 +199,9 @@ function o(e){return module.exports=o="function"==typeof Symbol&&"symbol"==typeo
215
199
  },{}],"Owq4":[function(require,module,exports) {
216
200
  "use strict";function e(e,t){if(!e||!e.length)return[];if(!e[0].fields.length)return e;var r=t&&t.sort_field_id||e[0].fields[0].field_id;function s(e){for(var t=null,s=0;s<e.fields.length;s++)if(e.fields[s].field_id==r){t=e.fields[s].field_value;break}return t}return e.sort(function(e,t){var r=s(e),d=s(t);return null===r?-1:null===d?1:/^\d+$/.test(r)&&/^\d+$/.test(d)?Number(r)<Number(d)?-1:1:/^\d+$/.test(r)||/^\d+$/.test(d)?/^\d+$/.test(r)?-1:1:r.toLowerCase()>d.toLowerCase()?1:-1}),t&&t.descending?e.reverse():e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.sortItems=e;
217
201
  },{}],"mWlG":[function(require,module,exports) {
218
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Utils=void 0;var e=require("./filter/filterPreparation.js"),t=k(require("./filter/filter.js")),r=require("./filter/mergeFilters.js"),n=require("./json_to_items/json_to_items.js"),i=require("./merge_compare_items/merge_compare_items.js"),o=require("./filter/group.js"),u=require("./filter/utils.js"),a=k(require("./populate_items/populate_items.js")),c=require("./get_date/get_date.js"),s=require("./merge_objects/merge_objects.js"),l=require("./merge_chunks/merge_chunks.js"),f=require("./nested_list/nested_list.js"),p=k(require("./MergeFields/MergeFields.js")),h=k(require("./ItemsSelection/ItemsSelection.js")),m=require("./compare_items_lists_worker/compare_items_lists.worker.js"),v=require("./json_constructor/json_constructor.js"),y=k(require("./AppsTemplateService/AppsTemplateService.js")),d=require("./FIleHelper/FileHelper.js"),g=require("./compareObjects/compareObjects.js"),w=require("./dynamicPromiseAll/dynamicPromiseAll.js"),b=require("./filter/sortItems.js");function k(e){return e&&e.__esModule?e:{default:e}}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof d?t:d,u=Object.create(o.prototype),a=new q(n||[]);return i(u,"_invoke",{value:F(e,r,a)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",m="executing",v="completed",y={};function d(){}function g(){}function w(){}var b={};s(b,u,function(){return this});var k=Object.getPrototypeOf,L=k&&k(k(P([])));L&&L!==r&&n.call(L,u)&&(b=L);var I=w.prototype=d.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){function r(i,o,u,a){var c=f(e[i],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==j(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,u,a)},function(e){r("throw",e,u,a)}):t.resolve(l).then(function(e){s.value=e,u(s)},function(e){return r("throw",e,u,a)})}a(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,i){r(e,n,t,i)})}return o=o?o.then(i,i):i()}})}function F(t,r,n){var i=p;return function(o,u){if(i===m)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var s=f(t,r,n);if("normal"===s.type){if(i=n.done?v:h,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=v,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=w,i(I,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},S(x.prototype),s(x.prototype,a,function(){return this}),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new x(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},S(I),s(I,c,"Generator"),s(I,u,function(){return this}),s(I,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function L(e,t,r,n,i,o,u){try{var a=e[o](u),c=a.value}catch(s){return void r(s)}a.done?t(c):Promise.resolve(c).then(n,i)}function I(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){L(o,n,i,u,a,"next",e)}function a(e){L(o,n,i,u,a,"throw",e)}u(void 0)})}}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function F(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var t=T(e,"string");return"symbol"==j(t)?t:String(t)}function T(e,t){if("object"!=j(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O=exports.Utils=function(){function k(e){S(this,k),this.gudhub=e,this.MergeFields=new p.default(e),this.ItemsSelection=new h.default(e),this.AppsTemplateService=new y.default(e),this.FileHelper=new d.FileHelper(e)}return F(k,[{key:"prefilter",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.filterPreparation)(t,this.gudhub.storage,this.gudhub.pipeService,r)}},{key:"filter",value:function(e,r){return(0,t.default)(e,r)}},{key:"mergeFilters",value:function(e,t){return(0,r.mergeFilters)(e,t)}},{key:"group",value:function(e,t){return(0,o.group)(e,t)}},{key:"getFilteredItems",value:function(){var e=I(_().mark(function e(){var t,r,n,i,o,a,c,s,l,f,p,h=arguments;return _().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:[],r=h.length>1&&void 0!==h[1]?h[1]:[],n=h.length>2?h[2]:void 0,i=h.length>3?h[3]:void 0,o=h.length>4?h[4]:void 0,a=h.length>5&&void 0!==h[5]?h[5]:"",c=h.length>6?h[6]:void 0,s=h.length>7?h[7]:void 0,e.next=10,this.prefilter(r,{element_app_id:n,app_id:i,item_id:o});case 10:return l=e.sent,f=this.filter(t,l),p=this.group(a,f),e.abrupt("return",p.filter(function(e){return!c||1===(0,u.searchValue)([e],c).length}).filter(function(e){return!s||1===(0,u.searchValue)([e],s).length}));case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"jsonToItems",value:function(e,t){return(0,n.jsonToItems)(e,t)}},{key:"getDate",value:function(e){return(0,c.getDate)(e)}},{key:"checkRecurringDate",value:function(e,t){return(0,c.checkRecurringDate)(e,t)}},{key:"populateItems",value:function(e,t,r){return(0,a.default)(e,t,r)}},{key:"populateWithDate",value:function(e,t){return(0,c.populateWithDate)(e,t)}},{key:"populateWithItemRef",value:function(e,t,r,n,o,u){return(0,i.populateWithItemRef)(e,t,r,n,o,u)}},{key:"compareItems",value:function(e,t,r){return(0,i.compareItems)(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return(0,i.mergeItems)(e,t,r)}},{key:"mergeObjects",value:function(e,t,r){return(0,s.mergeObjects)(e,t,r)}},{key:"makeNestedList",value:function(e,t,r,n,i){return(0,f.makeNestedList)(e,t,r,n,i)}},{key:"mergeChunks",value:function(e){return(0,l.mergeChunks)(e)}},{key:"mergeFieldLists",value:function(e,t){return this.MergeFields.mergeFieldLists(e,t)}},{key:"createFieldsListToView",value:function(e,t){return this.MergeFields.createFieldsListToView(e,t)}},{key:"createFieldsListToViewWithDataType",value:function(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}},{key:"selectItems",value:function(e,t){return this.ItemsSelection.selectItems(e,t)}},{key:"getSelectedItems",value:function(e){return this.ItemsSelection.getSelectedItems(e)}},{key:"clearSelectedItems",value:function(e){return this.ItemsSelection.clearSelectedItems(e)}},{key:"isItemSelected",value:function(e,t){return this.ItemsSelection.isItemSelected(e,t)}},{key:"jsonConstructor",value:function(e,t,r,n){return(0,v.compiler)(e,t,this,r,n)}},{key:"fileInstallerHelper",value:function(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}},{key:"createAppsFromTemplate",value:function(e,t,r,n){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,n)}},{key:"createApps",value:function(e){return this.AppsTemplateService.createApps(e)}},{key:"createItems",value:function(e,t){return this.AppsTemplateService.createItems(e,t)}},{key:"compareObjects",value:function(e,t){return(0,g.compareObjects)(e,t)}},{key:"compareAppsItemsLists",value:function(e,t,r){var n=new Blob([(0,m.compare_items_lists_Worker)()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",function(e){var t=e.data.diff;r(t)})}},{key:"dynamicPromiseAll",value:function(e){return(0,w.dynamicPromiseAll)(e)}},{key:"sortItems",value:function(e,t){return(0,b.sortItems)(e,t)}},{key:"debounce",value:function(e,t){var r;return function(){for(var n=this,i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];clearTimeout(r),r=setTimeout(function(){e.apply(n,o)},t)}}}]),k}();
202
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Utils=void 0;var e=require("./filter/filterPreparation.js"),t=k(require("./filter/filter.js")),r=require("./filter/mergeFilters.js"),n=require("./json_to_items/json_to_items.js"),i=require("./merge_compare_items/merge_compare_items.js"),o=require("./filter/group.js"),u=require("./filter/utils.js"),a=k(require("./populate_items/populate_items.js")),c=require("./get_date/get_date.js"),s=require("./merge_objects/merge_objects.js"),l=require("./merge_chunks/merge_chunks.js"),f=require("./nested_list/nested_list.js"),p=k(require("./MergeFields/MergeFields.js")),h=k(require("./ItemsSelection/ItemsSelection.js")),m=require("./compare_items_lists_worker/compare_items_lists.worker.js"),v=require("./json_constructor/json_constructor.js"),y=k(require("./AppsTemplateService/AppsTemplateService.js")),d=require("./FIleHelper/FileHelper.js"),g=require("./compareObjects/compareObjects.js"),w=require("./dynamicPromiseAll/dynamicPromiseAll.js"),b=require("./filter/sortItems.js");function k(e){return e&&e.__esModule?e:{default:e}}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof d?t:d,u=Object.create(o.prototype),a=new q(n||[]);return i(u,"_invoke",{value:F(e,r,a)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",m="executing",v="completed",y={};function d(){}function g(){}function w(){}var b={};s(b,u,function(){return this});var k=Object.getPrototypeOf,L=k&&k(k(P([])));L&&L!==r&&n.call(L,u)&&(b=L);var I=w.prototype=d.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){function r(i,o,u,a){var c=f(e[i],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==j(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,u,a)},function(e){r("throw",e,u,a)}):t.resolve(l).then(function(e){s.value=e,u(s)},function(e){return r("throw",e,u,a)})}a(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,i){r(e,n,t,i)})}return o=o?o.then(i,i):i()}})}function F(t,r,n){var i=p;return function(o,u){if(i===m)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var s=f(t,r,n);if("normal"===s.type){if(i=n.done?v:h,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=v,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=w,i(I,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},S(x.prototype),s(x.prototype,a,function(){return this}),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new x(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},S(I),s(I,c,"Generator"),s(I,u,function(){return this}),s(I,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function L(e,t,r,n,i,o,u){try{var a=e[o](u),c=a.value}catch(s){return void r(s)}a.done?t(c):Promise.resolve(c).then(n,i)}function I(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){L(o,n,i,u,a,"next",e)}function a(e){L(o,n,i,u,a,"throw",e)}u(void 0)})}}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function F(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var t=T(e,"string");return"symbol"===j(t)?t:String(t)}function T(e,t){if("object"!==j(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O=exports.Utils=function(){function k(e){S(this,k),this.gudhub=e,this.MergeFields=new p.default(e),this.ItemsSelection=new h.default(e),this.AppsTemplateService=new y.default(e),this.FileHelper=new d.FileHelper(e)}return F(k,[{key:"prefilter",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.filterPreparation)(t,this.gudhub.storage,this.gudhub.pipeService,r)}},{key:"filter",value:function(e,r){return(0,t.default)(e,r)}},{key:"mergeFilters",value:function(e,t){return(0,r.mergeFilters)(e,t)}},{key:"group",value:function(e,t){return(0,o.group)(e,t)}},{key:"getFilteredItems",value:function(){var e=I(_().mark(function e(){var t,r,n,i,o,a,c,s,l,f,p,h=arguments;return _().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:[],r=h.length>1&&void 0!==h[1]?h[1]:[],n=h.length>2?h[2]:void 0,i=h.length>3?h[3]:void 0,o=h.length>4?h[4]:void 0,a=h.length>5&&void 0!==h[5]?h[5]:"",c=h.length>6?h[6]:void 0,s=h.length>7?h[7]:void 0,e.next=10,this.prefilter(r,{element_app_id:n,app_id:i,item_id:o});case 10:return l=e.sent,f=this.filter(t,l),p=this.group(a,f),e.abrupt("return",p.filter(function(e){return!c||1===(0,u.searchValue)([e],c).length}).filter(function(e){return!s||1===(0,u.searchValue)([e],s).length}));case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"jsonToItems",value:function(e,t){return(0,n.jsonToItems)(e,t)}},{key:"getDate",value:function(e){return(0,c.getDate)(e)}},{key:"checkRecurringDate",value:function(e,t){return(0,c.checkRecurringDate)(e,t)}},{key:"populateItems",value:function(e,t,r){return(0,a.default)(e,t,r)}},{key:"populateWithDate",value:function(e,t){return(0,c.populateWithDate)(e,t)}},{key:"populateWithItemRef",value:function(e,t,r,n,o,u){return(0,i.populateWithItemRef)(e,t,r,n,o,u)}},{key:"compareItems",value:function(e,t,r){return(0,i.compareItems)(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return(0,i.mergeItems)(e,t,r)}},{key:"mergeObjects",value:function(e,t,r){return(0,s.mergeObjects)(e,t,r)}},{key:"makeNestedList",value:function(e,t,r,n,i){return(0,f.makeNestedList)(e,t,r,n,i)}},{key:"mergeChunks",value:function(e){return(0,l.mergeChunks)(e)}},{key:"mergeFieldLists",value:function(e,t){return this.MergeFields.mergeFieldLists(e,t)}},{key:"createFieldsListToView",value:function(e,t){return this.MergeFields.createFieldsListToView(e,t)}},{key:"createFieldsListToViewWithDataType",value:function(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}},{key:"selectItems",value:function(e,t){return this.ItemsSelection.selectItems(e,t)}},{key:"getSelectedItems",value:function(e){return this.ItemsSelection.getSelectedItems(e)}},{key:"clearSelectedItems",value:function(e){return this.ItemsSelection.clearSelectedItems(e)}},{key:"isItemSelected",value:function(e,t){return this.ItemsSelection.isItemSelected(e,t)}},{key:"jsonConstructor",value:function(e,t,r,n){return(0,v.compiler)(e,t,this,r,n)}},{key:"fileInstallerHelper",value:function(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}},{key:"createAppsFromTemplate",value:function(e,t,r,n){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,n)}},{key:"createApps",value:function(e){return this.AppsTemplateService.createApps(e)}},{key:"createItems",value:function(e,t){return this.AppsTemplateService.createItems(e,t)}},{key:"compareObjects",value:function(e,t){return(0,g.compareObjects)(e,t)}},{key:"compareAppsItemsLists",value:function(e,t,r){var n=new Blob([(0,m.compare_items_lists_Worker)()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",function(e){var t=e.data.diff;r(t)})}},{key:"dynamicPromiseAll",value:function(e){return(0,w.dynamicPromiseAll)(e)}},{key:"sortItems",value:function(e,t){return(0,b.sortItems)(e,t)}},{key:"debounce",value:function(e,t){var r;return function(){for(var n=this,i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];clearTimeout(r),r=setTimeout(function(){e.apply(n,o)},t)}}}]),k}();
219
203
  },{"./filter/filterPreparation.js":"DvAj","./filter/filter.js":"mbGN","./filter/mergeFilters.js":"LXWr","./json_to_items/json_to_items.js":"UCDv","./merge_compare_items/merge_compare_items.js":"xDLX","./filter/group.js":"VgUi","./filter/utils.js":"zsiC","./populate_items/populate_items.js":"EzAv","./get_date/get_date.js":"VzfS","./merge_objects/merge_objects.js":"EE1j","./merge_chunks/merge_chunks.js":"AMYJ","./nested_list/nested_list.js":"S7Iy","./MergeFields/MergeFields.js":"vno1","./ItemsSelection/ItemsSelection.js":"DfIi","./compare_items_lists_worker/compare_items_lists.worker.js":"xR4c","./json_constructor/json_constructor.js":"nKaW","./AppsTemplateService/AppsTemplateService.js":"zqOZ","./FIleHelper/FileHelper.js":"E7yc","./compareObjects/compareObjects.js":"AefJ","./dynamicPromiseAll/dynamicPromiseAll.js":"ndUf","./filter/sortItems.js":"Owq4"}],"rK64":[function(require,module,exports) {
220
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(e){h=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new P(n||[]);return a(i,"_invoke",{value:_(t,e,u)}),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function x(){}var k={};h(k,s,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(q([])));E&&E!==o&&i.call(E,s)&&(k=E);var U=x.prototype=w.prototype=Object.create(k);function S(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,s){var c=l(r[o],r,a);if("throw"!==c.type){var f=c.arg,h=f.value;return h&&"object"==t(h)&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=v;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=A(u,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=l(t,r,n);if("normal"===c.type){if(o=n.done?d:y,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=l(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(U,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=h(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,f,"GeneratorFunction")),t.prototype=Object.create(U),t},n.awrap=function(t){return{__await:t}},S(O.prototype),h(O.prototype,c,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(p(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(U),h(U,f,"Generator"),h(U,s,function(){return this}),h(U,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void e(c)}u.done?r(s):Promise.resolve(s).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,s,"next",t)}function s(t){e(a,o,i,u,s,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=s(r,"string");return"symbol"==t(e)?e:String(e)}function s(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Auth=void 0;var c=exports.Auth=function(){function t(r,e){o(this,t),this.req=r,this.storage=e}return a(t,[{key:"login",value:function(){var t=n(r().mark(function t(){var e,n,o,i,a=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},n=e.username,o=e.password,t.next=3,this.loginApi(n,o);case 3:return i=t.sent,this.storage.updateUser(i),t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"logout",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.logoutApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"signup",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.signupApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateToken",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateTokenApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUser",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateUserApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAvatar",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.avatarUploadApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getUsersList",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getUsersListApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"loginApi",value:function(){var t=n(r().mark(function t(e,n){var o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{username:e,password:n}});case 3:return o=t.sent,t.abrupt("return",o);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"updateTokenApi",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{auth_key:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r){return t.apply(this,arguments)}}()},{key:"logoutApi",value:function(t){return this.req.post({url:"/auth/logout",form:{token:t}})}},{key:"signupApi",value:function(t){return this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/singup"),form:{user:JSON.stringify(t)}})}},{key:"getUsersListApi",value:function(t){return this.req.get({url:"/auth/userlist",params:{keyword:t}})}},{key:"updateUserApi",value:function(t){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(t)}})}},{key:"avatarUploadApi",value:function(t){return this.req.post({url:"/auth/avatar-upload",form:{image:t}})}},{key:"getUserByIdApi",value:function(t){return this.req.get({url:"/auth/getuserbyid",params:{id:t}})}},{key:"getVersion",value:function(){return this.req.get({url:"/version"})}},{key:"getUserFromStorage",value:function(t){return this.storage.getUsersList().find(function(r){return r.user_id==t})}},{key:"saveUserToStorage",value:function(t){var r=this.storage.getUsersList(),e=r.find(function(r){return r.user_id==t.user_id});return e||(r.push(t),t)}},{key:"getUserById",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.getUserFromStorage(e)){t.next=9;break}return t.next=4,this.getUserByIdApi(e);case 4:if(o=t.sent){t.next=7;break}return t.abrupt("return",null);case 7:(n=this.getUserFromStorage(e))||(this.saveUserToStorage(o),n=o);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getToken",value:function(){var t=n(r().mark(function t(){var e,n,o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new Date(this.storage.getUser().expirydate),n=new Date,o=this.storage.getUser().accesstoken,!(e<n)&&o){t.next=9;break}return t.next=6,this.updateToken(this.storage.getUser().auth_key);case 6:i=t.sent,this.storage.updateUser(i),o=i.accesstoken;case 9:return t.abrupt("return",o);case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();
204
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(e){h=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new j(n||[]);return a(i,"_invoke",{value:O(t,e,u)}),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function k(){}var x={};h(x,s,function(){return this});var L=Object.getPrototypeOf,U=L&&L(L(P([])));U&&U!==o&&i.call(U,s)&&(x=U);var E=k.prototype=w.prototype=Object.create(x);function S(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function A(r,e){function n(o,a,u,s){var c=l(r[o],r,a);if("throw"!==c.type){var f=c.arg,h=f.value;return h&&"object"==t(h)&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function O(t,r,n){var o=v;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=l(t,r,n);if("normal"===c.type){if(o=n.done?d:y,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=l(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function q(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=k,a(E,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:b,configurable:!0}),b.displayName=h(k,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,h(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},S(A.prototype),h(A.prototype,c,function(){return this}),n.AsyncIterator=A,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new A(p(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(E),h(E,f,"Generator"),h(E,s,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),q(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;q(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),s=u.value}catch(c){return void e(c)}u.done?r(s):Promise.resolve(s).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,s,"next",t)}function s(t){e(a,o,i,u,s,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=s(r,"string");return"symbol"===t(e)?e:String(e)}function s(r,e){if("object"!==t(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Auth=void 0;var c=exports.Auth=function(){function t(r,e){o(this,t),this.req=r,this.storage=e}return a(t,[{key:"login",value:function(){var t=n(r().mark(function t(){var e,n,o,i,a=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},n=e.username,o=e.password,t.next=3,this.loginApi(n,o);case 3:return i=t.sent,this.storage.updateUser(i),t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"loginWithToken",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loginWithTokenApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"logout",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.logoutApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"signup",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.signupApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateToken",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateTokenApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUser",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateUserApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAvatar",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.avatarUploadApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getUsersList",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getUsersListApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"loginApi",value:function(){var t=n(r().mark(function t(e,n){var o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{username:e,password:n}});case 3:return o=t.sent,t.abrupt("return",o);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"loginWithTokenApi",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login?accesstoken=").concat(e)});case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateTokenApi",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{auth_key:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r){return t.apply(this,arguments)}}()},{key:"logoutApi",value:function(t){return this.req.post({url:"/auth/logout",form:{token:t}})}},{key:"signupApi",value:function(t){return this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/singup"),form:{user:JSON.stringify(t)}})}},{key:"getUsersListApi",value:function(t){return this.req.get({url:"/auth/userlist",params:{keyword:t}})}},{key:"updateUserApi",value:function(t){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(t)}})}},{key:"avatarUploadApi",value:function(t){return this.req.post({url:"/auth/avatar-upload",form:{image:t}})}},{key:"getUserByIdApi",value:function(t){return this.req.get({url:"/auth/getuserbyid",params:{id:t}})}},{key:"getVersion",value:function(){return this.req.get({url:"/version"})}},{key:"getUserFromStorage",value:function(t){return this.storage.getUsersList().find(function(r){return r.user_id==t})}},{key:"saveUserToStorage",value:function(t){var r=this.storage.getUsersList(),e=r.find(function(r){return r.user_id==t.user_id});return e||(r.push(t),t)}},{key:"getUserById",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.getUserFromStorage(e)){t.next=9;break}return t.next=4,this.getUserByIdApi(e);case 4:if(o=t.sent){t.next=7;break}return t.abrupt("return",null);case 7:(n=this.getUserFromStorage(e))||(this.saveUserToStorage(o),n=o);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getToken",value:function(){var t=n(r().mark(function t(){var e,n,o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new Date(this.storage.getUser().expirydate),n=new Date,o=this.storage.getUser().accesstoken,!(e<n)&&o){t.next=9;break}return t.next=6,this.updateToken(this.storage.getUser().auth_key);case 6:i=t.sent,this.storage.updateUser(i),o=i.accesstoken;case 9:return t.abrupt("return",o);case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();
221
205
  },{}],"UV2u":[function(require,module,exports) {
222
206
  "use strict";function e(o){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.IS_WEB=void 0;var o=exports.IS_WEB=!["undefined"==typeof window?"undefined":e(window),"undefined"==typeof document?"undefined":e(document)].includes("undefined");
223
207
  },{}],"osSN":[function(require,module,exports) {
@@ -229,59 +213,59 @@ var define;
229
213
  var global = arguments[3];
230
214
  var t,e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var r=o(require("axios")),n=require("./../consts.js");function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){"use strict";i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var a=e&&e.prototype instanceof w?e:w,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:P(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var d="suspendedStart",y="suspendedYield",v="executing",g="completed",m={};function w(){}function x(){}function b(){}var E={};f(E,u,function(){return this});var L=Object.getPrototypeOf,S=L&&L(L(N([])));S&&S!==r&&n.call(S,u)&&(E=S);var k=b.prototype=w.prototype=Object.create(E);function O(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function _(t,e){function r(o,i,c,u){var s=h(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,c,u)},function(t){r("throw",t,c,u)}):e.resolve(f).then(function(t){l.value=t,c(l)},function(t){return r("throw",t,c,u)})}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=d;return function(a,i){if(o===v)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return x.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:x,configurable:!0}),x.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(_.prototype),f(_.prototype,s,function(){return this}),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(p(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(k),f(k,l,"Generator"),f(k,u,function(){return this}),f(k,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function c(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){c(a,n,o,i,u,"next",t)}function u(t){c(a,n,o,i,u,"throw",t)}i(void 0)})}}function s(t,e,r,n,o){return l.apply(this,arguments)}function l(){return(l=u(i().mark(function t(o,a,c,s,l){var f,p,h,d,y,v;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,c||console.error("JS link must be provided for this data type - ".concat(a)),f=function(t){return n.IS_WEB||e.hasOwnProperty("window")||(e.window=proxy,e.document=l.document,e.Element=l.Element,e.CharacterData=l.CharacterData,e.this=proxy,e.self=proxy,e.Blob=l.Blob,e.Node=l.Node,e.navigator=l.navigator,e.HTMLElement=l.HTMLElement,e.XMLHttpRequest=l.XMLHttpRequest,e.WebSocket=l.WebSocket,e.crypto=l.crypto,e.DOMParser=l.DOMParser,e.Symbol=l.Symbol,e.document.queryCommandSupported=function(t){return console.log("QUERY COMMAND SUPPORTED: ",t),!1},e.angular=angular),new Promise(function(){var e=u(i().mark(function e(n){var o,c;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get(t).catch(function(e){console.log("Failed to fetch: ".concat(t," in ghconstructor. Module id: ").concat(a))});case 2:o=e.sent,c=encodeURIComponent(o.data),n("data:text/javascript;charset=utf-8,"+c);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},t.next=5,f(c);case 5:return p=t.sent,t.prev=6,t.next=9,import(p);case 9:h=t.sent,t.next=16;break;case 12:t.prev=12,t.t0=t.catch(6),console.log("Error while importing module: ".concat(a)),console.log(t.t0);case 16:return d=new h.default(a),s&&n.IS_WEB&&((y=document.createElement("link")).href=s,y.setAttribute("data-module",a),y.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(y)),v={type:a,getTemplate:function(t,e,r,n,o,a){var i="false"!==r;return d.getTemplate(t,e,i,n,o,a)},getDefaultValue:function(t,e,r,n){return new Promise(function(){var o=u(i().mark(function o(a){var c,u;return i().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(c=d.getDefaultValue)){o.next=8;break}return o.next=4,c(t,e,r,n);case 4:u=o.sent,a(u),o.next=9;break;case 8:a(null);case 9:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())},getSettings:function(t,e,r){return d.getSettings(t,e,r)},filter:{getSearchOptions:function(t){var e=d;return e.filter&&e.filter.getSearchOptions?d.filter.getSearchOptions(t):[]},getDropdownValues:function(){var t=d;return t.filter&&t.filter.getDropdownValues?t.filter.getDropdownValues():[]}},getInterpretation:function(t,e,r,n,c,s){return new Promise(function(){var l=u(i().mark(function u(l){var f,p,h,y;return i().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return f=d,i.prev=1,i.next=4,f.getInterpretation(o,t,s,c,n,r);case 4:return p=i.sent,h=p.find(function(t){return t.id==e})||p.find(function(t){return"default"==t.id}),i.next=8,h.content();case 8:y=i.sent,l({html:y}),i.next=16;break;case 12:i.prev=12,i.t0=i.catch(1),console.log("ERROR IN ".concat(a),i.t0),l({html:"<span>no interpretation</span>"});case 16:case"end":return i.stop()}},u,null,[[1,12]])}));return function(t){return l.apply(this,arguments)}}())},getInterpretationsList:function(t,e,r,n){return d.getInterpretation(t,e,r,n)},getInterpretatedValue:function(t,e,r,n){return new Promise(function(){var o=u(i().mark(function o(a){var c,u;return i().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(c=d.getInterpretatedValue)){o.next=8;break}return o.next=4,c(t,e,r,n);case 4:u=o.sent,a(u),o.next=9;break;case 8:a(t);case 9:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())},onMessage:function(t,e,r){return new Promise(function(){var n=u(i().mark(function n(o){var a,c;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a=d.onMessage)){n.next=6;break}return n.next=4,a(t,e,r);case 4:c=n.sent,o(c);case 6:o(null);case 7:case"end":return n.stop()}},n)}));return function(t){return n.apply(this,arguments)}}())},extendController:function(t){d.getActionScope(t)},runAction:function(t){try{d.runAction(t)}catch(e){}},getWindowScope:function(t){return d.getWindowScope(t)},getWindowHTML:function(t){return d.getWindowHTML(t)}},t.abrupt("return",v);case 22:t.prev=22,t.t1=t.catch(0),console.log(t.t1),console.log("Failed in createClassInstance (ghconstructor). Module id: ".concat(a,". JS url: ").concat(c));case 26:case"end":return t.stop()}},t,null,[[0,22],[6,12]])}))).apply(this,arguments)}
231
215
  },{"axios":"O4Aa","./../consts.js":"UV2u"}],"Htuh":[function(require,module,exports) {
232
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GHConstructor=void 0;var t=r(require("./createAngularModuleInstance.js")),e=r(require("./createClassInstance.js"));function r(t){return t&&t.__esModule?t:{default:t}}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:P(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function x(){}var L={};f(L,c,function(){return this});var j=Object.getPrototypeOf,k=j&&j(j(T([])));k&&k!==r&&i.call(k,c)&&(L=k);var E=x.prototype=b.prototype=Object.create(L);function _(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,u,c)},function(t){r("throw",t,u,c)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return r("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,o){r(t,n,e,o)})}return o=o?o.then(i,i):i()}})}function P(e,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?g:v,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},_(O.prototype),f(O.prototype,s,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},_(E),f(E,l,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)})}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=f(t,"string");return"symbol"==n(e)?e:String(e)}function f(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var h=exports.GHConstructor=function(){function r(t){u(this,r),this.gudhub=t,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}return s(r,[{key:"getInstance",value:function(){var t=a(o().mark(function t(e){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.getCached(e)){t.next=4;break}return t.abrupt("return",this.getCached(e));case 4:if(!this.modulesQueue[e]){t.next=9;break}return t.next=7,this.modulesQueue[e];case 7:t.next=12;break;case 9:return this.modulesQueue[e]=this.createInstance(e),t.next=12,this.modulesQueue[e];case 12:return t.abrupt("return",this.getCached(e));case 13:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"pupToCache",value:function(t,e){this.cache[t]=e}},{key:"getCached",value:function(t){return this.cache[t]}},{key:"initAngularInjector",value:function(t){this.angularInjector=t}},{key:"initJsdomWindow",value:function(t){this.nodeWindow=t}},{key:"createInstance",value:function(){var r=a(o().mark(function r(n){var i,a;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.gudhub.storage.getModuleUrl(n)){r.next=4;break}return console.log("Cannot find module: ".concat(n)),r.abrupt("return");case 4:if("gh_element"!==i.type){r.next=15;break}if("angular"!==i.technology){r.next=11;break}return r.next=8,(0,t.default)(this.gudhub,n,i.url,this.angularInjector,this.nodeWindow);case 8:a=r.sent,r.next=15;break;case 11:if("class"!==i.technology){r.next=15;break}return r.next=14,(0,e.default)(this.gudhub,n,i.js,i.css,this.nodeWindow);case 14:a=r.sent;case 15:return a&&this.pupToCache(n,a),r.abrupt("return",a);case 17:case"end":return r.stop()}},r,this)}));return function(t){return r.apply(this,arguments)}}()}]),r}();
216
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GHConstructor=void 0;var t=r(require("./createAngularModuleInstance.js")),e=r(require("./createClassInstance.js"));function r(t){return t&&t.__esModule?t:{default:t}}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:P(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function x(){}var L={};f(L,c,function(){return this});var j=Object.getPrototypeOf,k=j&&j(j(T([])));k&&k!==r&&i.call(k,c)&&(L=k);var E=x.prototype=b.prototype=Object.create(L);function _(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,u,c)},function(t){r("throw",t,u,c)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return r("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,o){r(t,n,e,o)})}return o=o?o.then(i,i):i()}})}function P(e,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?g:v,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},_(O.prototype),f(O.prototype,s,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},_(E),f(E,l,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)})}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=f(t,"string");return"symbol"===n(e)?e:String(e)}function f(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var h=exports.GHConstructor=function(){function r(t){u(this,r),this.gudhub=t,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}return s(r,[{key:"getInstance",value:function(){var t=a(o().mark(function t(e){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.getCached(e)){t.next=4;break}return t.abrupt("return",this.getCached(e));case 4:if(!this.modulesQueue[e]){t.next=9;break}return t.next=7,this.modulesQueue[e];case 7:t.next=12;break;case 9:return this.modulesQueue[e]=this.createInstance(e),t.next=12,this.modulesQueue[e];case 12:return t.abrupt("return",this.getCached(e));case 13:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"pupToCache",value:function(t,e){this.cache[t]=e}},{key:"getCached",value:function(t){return this.cache[t]}},{key:"initAngularInjector",value:function(t){this.angularInjector=t}},{key:"initJsdomWindow",value:function(t){this.nodeWindow=t}},{key:"createInstance",value:function(){var r=a(o().mark(function r(n){var i,a;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.gudhub.storage.getModuleUrl(n)){r.next=4;break}return console.log("Cannot find module: ".concat(n)),r.abrupt("return");case 4:if("gh_element"!==i.type){r.next=15;break}if("angular"!==i.technology){r.next=11;break}return r.next=8,(0,t.default)(this.gudhub,n,i.url,this.angularInjector,this.nodeWindow);case 8:a=r.sent,r.next=15;break;case 11:if("class"!==i.technology){r.next=15;break}return r.next=14,(0,e.default)(this.gudhub,n,i.js,i.css,this.nodeWindow);case 14:a=r.sent;case 15:return a&&this.pupToCache(n,a),r.abrupt("return",a);case 17:case"end":return r.stop()}},r,this)}));return function(t){return r.apply(this,arguments)}}()}]),r}();
233
217
  },{"./createAngularModuleInstance.js":"osSN","./createClassInstance.js":"DsUm"}],"q0my":[function(require,module,exports) {
234
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppProcessor=void 0;var t=require("../consts.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return a(t)||i(t)||c(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return f(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function s(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,p=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){p=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(p)throw a}}}}function c(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(){l=function(){return r};var t,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},p=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),p=new N(n||[]);return a(o,"_invoke",{value:O(t,r,p)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var v="suspendedStart",d="suspendedYield",g="executing",_="completed",m={};function y(){}function w(){}function b(){}var A={};c(A,p,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(F([])));k&&k!==n&&i.call(k,p)&&(A=k);var S=b.prototype=y.prototype=Object.create(A);function L(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function j(t,r){function n(a,o,p,s){var u=h(t[a],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,p,s)},function(t){n("throw",t,p,s)}):r.resolve(f).then(function(t){c.value=t,p(c)},function(t){return n("throw",t,p,s)})}s(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return o=o?o.then(i,i):i()}})}function O(e,r,n){var i=v;return function(a,o){if(i===g)throw new Error("Generator is already running");if(i===_){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var p=n.delegate;if(p){var s=E(p,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?_:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=_,n.method="throw",n.arg=u.arg)}}}function E(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[p];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,o=function e(){for(;++a<r.length;)if(i.call(r,a))return e.value=r[a],e.done=!1,e;return e.value=t,e.done=!0,e};return o.next=o}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=c(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},L(j.prototype),c(j.prototype,s,function(){return this}),r.AsyncIterator=j,r.async=function(t,e,n,i,a){void 0===a&&(a=Promise);var o=new j(f(t,e,n,i),a);return r.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(S),c(S,u,"Generator"),c(S,p,function(){return this}),c(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return p.type="throw",p.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],p=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function h(t,e,r,n,i,a,o){try{var p=t[a](o),s=p.value}catch(u){return void r(u)}p.done?e(s):Promise.resolve(s).then(n,i)}function v(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(t){h(a,n,i,o,p,"next",t)}function p(t){h(a,n,i,o,p,"throw",t)}o(void 0)})}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function _(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function m(t){var r=y(t,"string");return"symbol"==e(r)?r:String(r)}function y(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var w=exports.AppProcessor=function(){function e(t,r,n,i,a,o,p,s){d(this,e),this.storage=t,this.pipeService=r,this.req=n,this.ws=i,this.applistReceived=!1,this.activateSW=p,this.chunksManager=a,this.util=o,this.appListeners(),this.dataService=s}return _(e,[{key:"createNewAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});case 3:return(r=t.sent).from_apps_list=!0,t.abrupt("return",r);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/delete",form:{app_id:e}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListApi",value:function(){var t=v(l().mark(function t(){var e;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/api/applist/get"});case 3:return e=t.sent,t.abrupt("return",e.apps_list.map(function(t){return t.from_apps_list=!0,t}));case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}()},{key:"getAppApi",value:function(){var t=v(l().mark(function t(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.dataService.getApp(e));case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListFromStorage",value:function(){return this.storage.getAppsList()}},{key:"getAppFromStorage",value:function(t){var e=this.storage.getApp(t);return e&&e.field_list.length?e:null}},{key:"addNewAppToStorage",value:function(t){return this.storage.getAppsList().push(t)}},{key:"saveAppInStorage",value:function(t){t.items_object={};for(var e=0;e<t.items_list.length;e++){t.items_object[t.items_list[e].item_id]={};for(var r=0;r<t.items_list[e].fields.length;r++)t.items_object[t.items_list[e].item_id][t.items_list[e].fields[r].field_id]=t.items_list[e].fields[r]}var n=this.storage.getApp(t.app_id);return n?(t.from_apps_list=n.from_apps_list,t.permission=n.permission,this.storage.updateApp(t)):(t.from_apps_list=!1,this.addNewAppToStorage(t)),this.getAppFromStorage(t.app_id)}},{key:"updateAppFieldsAndViews",value:function(t){var e=this,r=this.getAppFromStorage(t.app_id);t.items_list=r.items_list,t.file_list=r.file_list,t.from_apps_list=r.from_apps_list,t.items_object=r.items_object,this.storage.updateApp(t),this.pipeService.emit("gh_app_views_update",{app_id:t.app_id},t.views_list),t.field_list.forEach(function(r){e.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:r.field_id},r)})}},{key:"updateAppInStorage",value:function(t){this.storage.getApp(t.app_id)?(this.storage.updateApp(t),this.pipeService.emit("gh_app_update",{app_id:t.app_id},t),this.pipeService.emit("gh_items_update",{app_id:t.app_id},t.items_list)):this.addNewAppToStorage(t)}},{key:"deletingAppFromStorage",value:function(t){var e=this.storage.getAppsList();return e.forEach(function(r,n){r.app_id==t&&e.splice(n)}),e}},{key:"updateAppsListInStorage",value:function(){var t,e=u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(e.s();!(t=e.n()).done;){var r=t.value,n=this.storage.getApp(r.app_id);n?(n.from_apps_list=r.from_apps_list,n.permission=r.permission):this.addNewAppToStorage(r)}}catch(i){e.e(i)}finally{e.f()}}},{key:"refreshApps",value:function(){var t=v(l().mark(function t(){var e,r,n,i,a,o,p,s=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s.length>0&&void 0!==s[0]?s[0]:[],r=u(e),t.prev=2,r.s();case 4:if((n=r.n()).done){t.next=19;break}if(null==(i=n.value)){t.next=17;break}return t.prev=7,t.next=10,this.getAppApi(i);case 10:if(a=t.sent){for(a.items_object={},o=0;o<a.items_list.length;o++)for(a.items_object[a.items_list[o].item_id]={},p=0;p<a.items_list[o].fields.length;p++)a.items_object[a.items_list[o].item_id][a.items_list[o].fields[p].field_id]=a.items_list[o].fields[p];this.updateAppInStorage(a),this.pipeService.emit("gh_app_views_update",{app_id:a.app_id},a.views_list)}t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),console.log(t.t0);case 17:t.next=4;break;case 19:t.next=24;break;case 21:t.prev=21,t.t1=t.catch(2),r.e(t.t1);case 24:return t.prev=24,r.f(),t.finish(24);case 27:console.log("Apps refreshed: ",JSON.stringify(e));case 28:case"end":return t.stop()}},t,this,[[2,21,24,27],[7,14]])}));return function(){return t.apply(this,arguments)}}()},{key:"refreshAppsList",value:function(){var t=v(l().mark(function t(){var e,r,n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAppListFromStorage(),t.next=3,this.getAppListApi();case 3:r=t.sent,n=r.map(function(t){return p(p({},t),e.find(function(e){return e.app_id===t.app_id}))}),this.updateAppsListInStorage(n),this.pipeService.emit("gh_apps_list_refreshed",{});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppsList",value:function(){var t=v(l().mark(function t(){var e,r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getAppListFromStorage(),this.applistReceived){t.next=11;break}return t.next=4,this.getAppListApi();case 4:if(r=t.sent){t.next=7;break}return t.abrupt("return",null);case 7:this.updateAppsListInStorage(r),this.applistReceived=!0,e=r,this.getApp(this.storage.getUser().app_init);case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppInfo",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getAppsList();case 2:return r=t.sent,t.abrupt("return",r?r.find(function(t){return t.app_id==e}):null);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteApp",value:function(){var t=v(l().mark(function t(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deleteAppApi(e);case 2:return t.abrupt("return",this.deletingAppFromStorage(e));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getApp",value:function(){var t=v(l().mark(function t(e){var n,i,a,o=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o.length>1&&void 0!==o[1]&&o[1],e){t.next=3;break}return t.abrupt("return",null);case 3:if(!(n=this.getAppFromStorage(e))){t.next=6;break}return t.abrupt("return",n);case 6:return t.next=8,this.getAppApi(e);case 8:if(i=t.sent){t.next=11;break}return t.abrupt("return");case 11:if(!i.chunks||!i.chunks.length){t.next=16;break}return t.next=14,this.chunksManager.getChunks(e,i.chunks);case 14:a=t.sent,i.items_list=this.util.mergeChunks([].concat(r(a),[i]));case 16:return this.saveAppInStorage(i),this.ws.addSubscription(e),t.abrupt("return",i);case 19:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateApp",value:function(){var t=v(l().mark(function t(e){var r,n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.views_list&&e.views_list.length&&e.show){t.next=6;break}return t.next=3,this.getApp(e.app_id);case 3:r=t.sent,e.views_list&&e.views_list.length||(e.views_list=r.views_list),void 0===e.show&&(e.show=r.show);case 6:return t.next=8,this.updateAppApi(e);case 8:return n=t.sent,this.updateAppFieldsAndViews(n),t.abrupt("return",n);case 11:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppInfo",value:function(){var t=v(l().mark(function t(){var e,r=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),t.abrupt("return",this.updateApp(e));case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"createNewApp",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.createNewAppApi(e);case 2:return(r=t.sent).items_object={},this.addNewAppToStorage(r),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppViews",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,this.getApp(e);case 3:return r=t.sent,t.abrupt("return",r.views_list);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"clearAppProcessor",value:function(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}},{key:"appListeners",value:function(){var e=this;this.pipeService.onRoot("gh_app_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app_id){t.next=5;break}return t.next=3,e.getApp(n.app_id);case 3:i=t.sent,e.pipeService.emit("gh_app_get",n,i);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_apps_list_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAppsList();case 2:i=t.sent,e.pipeService.emit("gh_apps_list_get",n,i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_delete_app",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.deleteApp(n.app_id);case 2:i=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_update",{},function(){var t=v(l().mark(function t(r,n){var i,a;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.app.items_list=[],n.app.file_list=[],t.next=4,e.updateApp(n.app);case 4:return i=t.sent,e.pipeService.emit("gh_app_views_update",{app_id:i.app_id},i.views_list),t.next=8,e.getAppsList();case 8:a=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},a),i.field_list.forEach(function(t){e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:t.field_id},t)});case 11:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_view_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app_id){t.next=5;break}return t.next=3,e.getApp(n.app_id);case 3:(i=t.sent).views_list.forEach(function(t,r){t.view_id==n.view_id&&e.pipeService.emit("gh_app_view_get",n,i.views_list[r])});case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAppInfo(n.app_id);case 2:(i=t.sent)&&e.pipeService.emit("gh_app_info_get",n,i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_update",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app){t.next=5;break}return t.next=3,e.updateAppInfo(n.app);case 3:i=t.sent,e.pipeService.emit("gh_app_info_update",{app_id:n.app.app_id},i);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_create",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.createNewApp(n.app);case 2:return t.next=4,e.getAppsList();case 4:i=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},i);case 6:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),t.IS_WEB&&this.activateSW&&navigator.serviceWorker.addEventListener("message",function(){var t=v(l().mark(function t(r){var n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("refresh app"!==r.data.type){t.next=7;break}return t.next=3,e.getApp(r.data.payload.app_id);case 3:(n=t.sent)&&e.util.compareAppsItemsLists(n.items_list,r.data.payload.items_list.filter(function(t){return!t.trash}),function(t){var n=t.diff_fields_items,i=t.diff_fields_items_Ids,a=t.diff_items,o=t.newItems,p=t.deletedItems;(a.length||o.length||p.length)&&(e.pipeService.emit("gh_items_update",{app_id:r.data.payload.app_id},r.data.payload.items_list.filter(function(t){return!t.trash})),a.forEach(function(t){return e.pipeService.emit("gh_item_update",{app_id:r.data.payload.app_id,item_id:t.item_id},t)})),i.forEach(function(t){var i=n[t];i&&i.forEach(function(n){e.pipeService.emit("gh_value_update",{app_id:r.data.payload.app_id,item_id:t,field_id:n.field_id},n.field_value)})})}),r.data.payload.items_list=e.util.mergeChunks([n,r.data.payload]),e.saveAppInStorage(r.data.payload);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}())}}]),e}();
218
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppProcessor=void 0;var t=require("../consts.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return a(t)||i(t)||c(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return f(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function s(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,p=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){p=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(p)throw a}}}}function c(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(){l=function(){return r};var t,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},p=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),p=new N(n||[]);return a(o,"_invoke",{value:O(t,r,p)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var v="suspendedStart",d="suspendedYield",g="executing",_="completed",m={};function y(){}function w(){}function b(){}var A={};c(A,p,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(F([])));k&&k!==n&&i.call(k,p)&&(A=k);var S=b.prototype=y.prototype=Object.create(A);function L(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function j(t,r){function n(a,o,p,s){var u=h(t[a],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,p,s)},function(t){n("throw",t,p,s)}):r.resolve(f).then(function(t){c.value=t,p(c)},function(t){return n("throw",t,p,s)})}s(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return o=o?o.then(i,i):i()}})}function O(e,r,n){var i=v;return function(a,o){if(i===g)throw new Error("Generator is already running");if(i===_){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var p=n.delegate;if(p){var s=E(p,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?_:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=_,n.method="throw",n.arg=u.arg)}}}function E(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[p];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,o=function e(){for(;++a<r.length;)if(i.call(r,a))return e.value=r[a],e.done=!1,e;return e.value=t,e.done=!0,e};return o.next=o}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=c(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},L(j.prototype),c(j.prototype,s,function(){return this}),r.AsyncIterator=j,r.async=function(t,e,n,i,a){void 0===a&&(a=Promise);var o=new j(f(t,e,n,i),a);return r.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(S),c(S,u,"Generator"),c(S,p,function(){return this}),c(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return p.type="throw",p.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],p=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function h(t,e,r,n,i,a,o){try{var p=t[a](o),s=p.value}catch(u){return void r(u)}p.done?e(s):Promise.resolve(s).then(n,i)}function v(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(t){h(a,n,i,o,p,"next",t)}function p(t){h(a,n,i,o,p,"throw",t)}o(void 0)})}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function _(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function m(t){var r=y(t,"string");return"symbol"===e(r)?r:String(r)}function y(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var w=exports.AppProcessor=function(){function e(t,r,n,i,a,o,p,s){d(this,e),this.storage=t,this.pipeService=r,this.req=n,this.ws=i,this.applistReceived=!1,this.activateSW=p,this.chunksManager=a,this.util=o,this.appListeners(),this.dataService=s}return _(e,[{key:"createNewAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});case 3:return(r=t.sent).from_apps_list=!0,t.abrupt("return",r);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/delete",form:{app_id:e}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListApi",value:function(){var t=v(l().mark(function t(){var e;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/api/applist/get"});case 3:return e=t.sent,t.abrupt("return",e.apps_list.map(function(t){return t.from_apps_list=!0,t}));case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}()},{key:"getAppApi",value:function(){var t=v(l().mark(function t(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.dataService.getApp(e));case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListFromStorage",value:function(){return this.storage.getAppsList()}},{key:"getAppFromStorage",value:function(t){var e=this.storage.getApp(t);return e&&e.field_list.length?e:null}},{key:"addNewAppToStorage",value:function(t){return this.storage.getAppsList().push(t)}},{key:"saveAppInStorage",value:function(t){t.items_object={};for(var e=0;e<t.items_list.length;e++){t.items_object[t.items_list[e].item_id]={};for(var r=0;r<t.items_list[e].fields.length;r++)t.items_object[t.items_list[e].item_id][t.items_list[e].fields[r].field_id]=t.items_list[e].fields[r]}var n=this.storage.getApp(t.app_id);return n?(t.from_apps_list=n.from_apps_list,t.permission=n.permission,this.storage.updateApp(t)):(t.from_apps_list=!1,this.addNewAppToStorage(t)),this.getAppFromStorage(t.app_id)}},{key:"updateAppFieldsAndViews",value:function(t){var e=this,r=this.getAppFromStorage(t.app_id);t.items_list=r.items_list,t.file_list=r.file_list,t.from_apps_list=r.from_apps_list,t.items_object=r.items_object,this.storage.updateApp(t),this.pipeService.emit("gh_app_views_update",{app_id:t.app_id},t.views_list),t.field_list.forEach(function(r){e.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:r.field_id},r)})}},{key:"updateAppInStorage",value:function(t){this.storage.getApp(t.app_id)?(this.storage.updateApp(t),this.pipeService.emit("gh_app_update",{app_id:t.app_id},t),this.pipeService.emit("gh_items_update",{app_id:t.app_id},t.items_list)):this.addNewAppToStorage(t)}},{key:"deletingAppFromStorage",value:function(t){var e=this.storage.getAppsList();return e.forEach(function(r,n){r.app_id==t&&e.splice(n)}),e}},{key:"updateAppsListInStorage",value:function(){var t,e=u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(e.s();!(t=e.n()).done;){var r=t.value,n=this.storage.getApp(r.app_id);n?(n.from_apps_list=r.from_apps_list,n.permission=r.permission):this.addNewAppToStorage(r)}}catch(i){e.e(i)}finally{e.f()}}},{key:"refreshApps",value:function(){var t=v(l().mark(function t(){var e,r,n,i,a,o,p,s=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s.length>0&&void 0!==s[0]?s[0]:[],r=u(e),t.prev=2,r.s();case 4:if((n=r.n()).done){t.next=19;break}if(null==(i=n.value)){t.next=17;break}return t.prev=7,t.next=10,this.getAppApi(i);case 10:if(a=t.sent){for(a.items_object={},o=0;o<a.items_list.length;o++)for(a.items_object[a.items_list[o].item_id]={},p=0;p<a.items_list[o].fields.length;p++)a.items_object[a.items_list[o].item_id][a.items_list[o].fields[p].field_id]=a.items_list[o].fields[p];this.updateAppInStorage(a),this.pipeService.emit("gh_app_views_update",{app_id:a.app_id},a.views_list)}t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),console.log(t.t0);case 17:t.next=4;break;case 19:t.next=24;break;case 21:t.prev=21,t.t1=t.catch(2),r.e(t.t1);case 24:return t.prev=24,r.f(),t.finish(24);case 27:console.log("Apps refreshed: ",JSON.stringify(e));case 28:case"end":return t.stop()}},t,this,[[2,21,24,27],[7,14]])}));return function(){return t.apply(this,arguments)}}()},{key:"refreshAppsList",value:function(){var t=v(l().mark(function t(){var e,r,n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAppListFromStorage(),t.next=3,this.getAppListApi();case 3:r=t.sent,n=r.map(function(t){return p(p({},t),e.find(function(e){return e.app_id===t.app_id}))}),this.updateAppsListInStorage(n),this.pipeService.emit("gh_apps_list_refreshed",{});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppsList",value:function(){var t=v(l().mark(function t(){var e,r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getAppListFromStorage(),this.applistReceived){t.next=11;break}return t.next=4,this.getAppListApi();case 4:if(r=t.sent){t.next=7;break}return t.abrupt("return",null);case 7:this.updateAppsListInStorage(r),this.applistReceived=!0,e=r,this.getApp(this.storage.getUser().app_init);case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppInfo",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getAppsList();case 2:return r=t.sent,t.abrupt("return",r?r.find(function(t){return t.app_id==e}):null);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteApp",value:function(){var t=v(l().mark(function t(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deleteAppApi(e);case 2:return t.abrupt("return",this.deletingAppFromStorage(e));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getApp",value:function(){var t=v(l().mark(function t(e){var n,i,a,o=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o.length>1&&void 0!==o[1]&&o[1],e){t.next=3;break}return t.abrupt("return",null);case 3:if(!(n=this.getAppFromStorage(e))){t.next=6;break}return t.abrupt("return",n);case 6:return t.next=8,this.getAppApi(e);case 8:if(i=t.sent){t.next=11;break}return t.abrupt("return");case 11:if(!i.chunks||!i.chunks.length){t.next=16;break}return t.next=14,this.chunksManager.getChunks(e,i.chunks);case 14:a=t.sent,i.items_list=this.util.mergeChunks([].concat(r(a),[i]));case 16:return this.saveAppInStorage(i),this.ws.addSubscription(e),t.abrupt("return",i);case 19:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateApp",value:function(){var t=v(l().mark(function t(e){var r,n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.views_list&&e.views_list.length&&e.show){t.next=6;break}return t.next=3,this.getApp(e.app_id);case 3:r=t.sent,e.views_list&&e.views_list.length||(e.views_list=r.views_list),void 0===e.show&&(e.show=r.show);case 6:return t.next=8,this.updateAppApi(e);case 8:return n=t.sent,this.updateAppFieldsAndViews(n),t.abrupt("return",n);case 11:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppInfo",value:function(){var t=v(l().mark(function t(){var e,r=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),t.abrupt("return",this.updateApp(e));case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"createNewApp",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.createNewAppApi(e);case 2:return(r=t.sent).items_object={},this.addNewAppToStorage(r),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppViews",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,this.getApp(e);case 3:return r=t.sent,t.abrupt("return",r.views_list);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"clearAppProcessor",value:function(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}},{key:"appListeners",value:function(){var e=this;this.pipeService.onRoot("gh_app_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app_id){t.next=5;break}return t.next=3,e.getApp(n.app_id);case 3:i=t.sent,e.pipeService.emit("gh_app_get",n,i);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_apps_list_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAppsList();case 2:i=t.sent,e.pipeService.emit("gh_apps_list_get",n,i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_delete_app",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.deleteApp(n.app_id);case 2:i=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_update",{},function(){var t=v(l().mark(function t(r,n){var i,a;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.app.items_list=[],n.app.file_list=[],t.next=4,e.updateApp(n.app);case 4:return i=t.sent,e.pipeService.emit("gh_app_views_update",{app_id:i.app_id},i.views_list),t.next=8,e.getAppsList();case 8:a=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},a),i.field_list.forEach(function(t){e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:t.field_id},t)});case 11:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_view_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app_id){t.next=5;break}return t.next=3,e.getApp(n.app_id);case 3:(i=t.sent).views_list.forEach(function(t,r){t.view_id==n.view_id&&e.pipeService.emit("gh_app_view_get",n,i.views_list[r])});case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAppInfo(n.app_id);case 2:(i=t.sent)&&e.pipeService.emit("gh_app_info_get",n,i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_update",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app){t.next=5;break}return t.next=3,e.updateAppInfo(n.app);case 3:i=t.sent,e.pipeService.emit("gh_app_info_update",{app_id:n.app.app_id},i);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_create",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.createNewApp(n.app);case 2:return t.next=4,e.getAppsList();case 4:i=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},i);case 6:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),t.IS_WEB&&this.activateSW&&navigator.serviceWorker.addEventListener("message",function(){var t=v(l().mark(function t(r){var n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("refresh app"!==r.data.type){t.next=7;break}return t.next=3,e.getApp(r.data.payload.app_id);case 3:(n=t.sent)&&e.util.compareAppsItemsLists(n.items_list,r.data.payload.items_list.filter(function(t){return!t.trash}),function(t){var n=t.diff_fields_items,i=t.diff_fields_items_Ids,a=t.diff_items,o=t.newItems,p=t.deletedItems;(a.length||o.length||p.length)&&(e.pipeService.emit("gh_items_update",{app_id:r.data.payload.app_id},r.data.payload.items_list.filter(function(t){return!t.trash})),a.forEach(function(t){return e.pipeService.emit("gh_item_update",{app_id:r.data.payload.app_id,item_id:t.item_id},t)})),i.forEach(function(t){var i=n[t];i&&i.forEach(function(n){e.pipeService.emit("gh_value_update",{app_id:r.data.payload.app_id,item_id:t,field_id:n.field_id},n.field_value)})})}),r.data.payload.items_list=e.util.mergeChunks([n,r.data.payload]),e.saveAppInStorage(r.data.payload);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}())}}]),e}();
235
219
  },{"../consts.js":"UV2u"}],"UUd3":[function(require,module,exports) {
236
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ItemProcessor=void 0;var t=require("../utils.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(){o=function(){return r};var t,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),u=new N(n||[]);return a(o,"_invoke",{value:I(t,r,u)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var d="suspendedStart",v="suspendedYield",m="executing",y="completed",_={};function g(){}function w(){}function b(){}var x={};f(x,s,function(){return this});var S=Object.getPrototypeOf,k=S&&S(S(F([])));k&&k!==n&&i.call(k,s)&&(x=k);var O=b.prototype=g.prototype=Object.create(x);function j(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,r){function n(o,a,u,s){var c=h(t[o],t,a);if("throw"!==c.type){var p=c.arg,f=p.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):r.resolve(f).then(function(t){p.value=t,u(p)},function(t){return n("throw",t,u,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return o=o?o.then(i,i):i()}})}function I(e,r,n){var i=d;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=L(u,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function L(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,_;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=b,a(O,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,p,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,p,"GeneratorFunction")),t.prototype=Object.create(O),t},r.awrap=function(t){return{__await:t}},j(E.prototype),f(E.prototype,c,function(){return this}),r.AsyncIterator=E,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new E(l(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(O),f(O,p,"Generator"),f(O,s,function(){return this}),f(O,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),_}},r}function a(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function u(t){a(o,n,i,u,s,"next",t)}function s(t){a(o,n,i,u,s,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function p(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t){var r=l(t,"string");return"symbol"==e(r)?r:String(r)}function l(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var h=exports.ItemProcessor=function(){function e(t,r,n,i,o){s(this,e),this.storage=t,this.pipeService=r,this.req=n,this.appProcessor=i,this.util=o,this.itemListeners()}return p(e,[{key:"addItemsApi",value:function(){var t=u(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/items/add",form:{items:JSON.stringify(r),app_id:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItemsApi",value:function(){var t=u(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/items/update",form:{items:JSON.stringify(r),app_id:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsApi",value:function(t){try{var e=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(t)}});return e.from_apps_list=!0,e}catch(r){return console.log(r),null}}},{key:"addItemsToStorage",value:function(){var t=u(o().mark(function t(e,r){var n,i=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appProcessor.getApp(e);case 2:return(n=t.sent)&&(r.forEach(function(t){n.items_list.push(t),n.items_object[t.item_id]={};for(var r=0;r<t.fields.length;r++)n.items_object[t.item_id][t.fields[r].field_id]=t.fields[r];i.pipeService.emit("gh_item_update",{app_id:e},[t])}),this.pipeService.emit("gh_items_update",{app_id:e},n.items_list),this.storage.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItemsInStorage",value:function(){var t=u(o().mark(function t(e,r){var n,i=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.pipeService.emit("gh_items_update",{app_id:e},r),t.next=3,this.appProcessor.getApp(e);case 3:return(n=t.sent)&&r&&r.forEach(function(t){var r={app_id:e};i.pipeService.emit("gh_item_update",r,[t]),r.item_id=t.item_id,i.pipeService.emit("gh_item_update",r,t);var o=n.items_list.find(function(e){return e.item_id==t.item_id});o&&t.fields.forEach(function(t){var e=o.fields.find(function(e){return e.field_id==t.field_id});r.field_id=t.field_id,e?e.field_value!=t.field_value&&(e.field_value=t.field_value,n.items_object[o.item_id][e.field_id]=e,i.pipeService.emit("gh_value_update",r,t.field_value)):(o.fields.push(t),n.items_object[o.item_id][t.field_id]=t,i.pipeService.emit("gh_value_update",r,t.field_value))})}),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsFromStorage",value:function(){var t=u(o().mark(function t(e){var r,n,i=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.next=3,this.appProcessor.getApp(e);case 3:(n=t.sent)&&(n.items_list=n.items_list.filter(function(t){return!r.find(function(e){return t.item_id==e.item_id})||(delete n.items_object[t.item_id],!1)}),this.pipeService.emit("gh_items_update",{app_id:e},n.items_list),this.storage.updateApp(n));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getItems",value:function(){var t=u(o().mark(function t(e){var r,n,i=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],t.next=3,this.appProcessor.getApp(e,r);case 3:if(n=t.sent){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",n.items_list);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"addNewItems",value:function(){var e=u(o().mark(function e(r,i){var a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.map(function(e){return n(n({},e),{},{fields:(0,t.filterFields)(e.fields)})}),e.next=3,this.addItemsApi(r,a);case 3:return u=e.sent,e.next=6,this.addItemsToStorage(r,u);case 6:return this.pipeService.emit("gh_items_add",{app_id:r},u),e.abrupt("return",u);case 8:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateItems",value:function(){var e=u(o().mark(function e(r,i){var a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.map(function(e){return n(n({},e),{},{fields:(0,t.filterFields)(e.fields)})}),e.next=3,this.updateItemsApi(r,a);case 3:return u=e.sent,e.next=6,this.updateItemsInStorage(r,u);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteItems",value:function(){var t=u(o().mark(function t(e,r){var n=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.deleteItemsApi(r).then(function(){var t=u(o().mark(function t(r){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.deleteItemsFromStorage(e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){var t=this;this.pipeService.onRoot("gh_items_get",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.app_id){e.next=5;break}return e.next=3,t.getItems(n.app_id);case 3:(i=e.sent)?t.pipeService.emit("gh_items_get",n,i):t.pipeService.emit("gh_items_get",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_add",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n&&n.app_id&&n.items)){e.next=5;break}return e.next=3,t.addNewItems(n.app_id,n.items);case 3:(i=e.sent)?t.pipeService.emit("gh_items_add",n,i):t.pipeService.emit("gh_items_add",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_update",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n&&n.app_id&&n.items)){e.next=5;break}return e.next=3,t.updateItems(n.app_id,n.items);case 3:(i=e.sent)?t.pipeService.emit("gh_items_update",n,i):t.pipeService.emit("gh_items_update",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_item_get",{},function(){var e=u(o().mark(function e(r,n){var i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.app_id){e.next=6;break}return e.next=3,t.getItems(n.app_id);case 3:i=e.sent,a=i.find(function(t){return t.item_id==n.item_id}),t.pipeService.emit("gh_item_get",n,a);case 6:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filtered_items_get",{},function(){var e=u(o().mark(function e(r,n){var i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.element_app_id){e.next=8;break}return e.next=3,t.getItems(n.element_app_id);case 3:return i=e.sent,e.next=6,t.util.getFilteredItems(i,n.filters_list,n.element_app_id,n.app_id,n.item_id,n.field_groupe,n.search,n.search_params);case 6:a=e.sent,t.pipeService.emit("gh_filtered_items_get",n,a);case 8:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filter_items",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.items){e.next=5;break}return e.next=3,t.util.getFilteredItems(n.items,n.filters_list,n.element_app_id,n.app_id,n.item_id,n.field_groupe,n.search,n.search_params);case 3:i=e.sent,t.pipeService.emit("gh_filter_items",n,i);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}())}}]),e}();
220
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ItemProcessor=void 0;var t=require("../utils.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(){o=function(){return r};var t,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),u=new N(n||[]);return a(o,"_invoke",{value:I(t,r,u)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var d="suspendedStart",v="suspendedYield",m="executing",y="completed",_={};function g(){}function w(){}function b(){}var x={};f(x,s,function(){return this});var S=Object.getPrototypeOf,k=S&&S(S(F([])));k&&k!==n&&i.call(k,s)&&(x=k);var O=b.prototype=g.prototype=Object.create(x);function j(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,r){function n(o,a,u,s){var c=h(t[o],t,a);if("throw"!==c.type){var p=c.arg,f=p.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):r.resolve(f).then(function(t){p.value=t,u(p)},function(t){return n("throw",t,u,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return o=o?o.then(i,i):i()}})}function I(e,r,n){var i=d;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=L(u,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?y:v,c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function L(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,_;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=b,a(O,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,p,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,p,"GeneratorFunction")),t.prototype=Object.create(O),t},r.awrap=function(t){return{__await:t}},j(E.prototype),f(E.prototype,c,function(){return this}),r.AsyncIterator=E,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new E(l(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(O),f(O,p,"Generator"),f(O,s,function(){return this}),f(O,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),_}},r}function a(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function u(t){a(o,n,i,u,s,"next",t)}function s(t){a(o,n,i,u,s,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function p(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t){var r=l(t,"string");return"symbol"===e(r)?r:String(r)}function l(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var h=exports.ItemProcessor=function(){function e(t,r,n,i,o){s(this,e),this.storage=t,this.pipeService=r,this.req=n,this.appProcessor=i,this.util=o,this.itemListeners()}return p(e,[{key:"addItemsApi",value:function(){var t=u(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/items/add",form:{items:JSON.stringify(r),app_id:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItemsApi",value:function(){var t=u(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/items/update",form:{items:JSON.stringify(r),app_id:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsApi",value:function(t){try{var e=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(t)}});return e.from_apps_list=!0,e}catch(r){return console.log(r),null}}},{key:"addItemsToStorage",value:function(){var t=u(o().mark(function t(e,r){var n,i=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appProcessor.getApp(e);case 2:return(n=t.sent)&&(r.forEach(function(t){n.items_list.push(t),n.items_object[t.item_id]={};for(var r=0;r<t.fields.length;r++)n.items_object[t.item_id][t.fields[r].field_id]=t.fields[r];i.pipeService.emit("gh_item_update",{app_id:e},[t])}),this.pipeService.emit("gh_items_update",{app_id:e},n.items_list),this.storage.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItemsInStorage",value:function(){var t=u(o().mark(function t(e,r){var n,i=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.pipeService.emit("gh_items_update",{app_id:e},r),t.next=3,this.appProcessor.getApp(e);case 3:return(n=t.sent)&&r&&r.forEach(function(t){var r={app_id:e};i.pipeService.emit("gh_item_update",r,[t]),r.item_id=t.item_id,i.pipeService.emit("gh_item_update",r,t);var o=n.items_list.find(function(e){return e.item_id==t.item_id});o&&t.fields.forEach(function(t){var e=o.fields.find(function(e){return e.field_id==t.field_id});r.field_id=t.field_id,e?e.field_value!=t.field_value&&(e.field_value=t.field_value,n.items_object[o.item_id][e.field_id]=e,i.pipeService.emit("gh_value_update",r,t.field_value)):(o.fields.push(t),n.items_object[o.item_id][t.field_id]=t,i.pipeService.emit("gh_value_update",r,t.field_value))})}),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsFromStorage",value:function(){var t=u(o().mark(function t(e){var r,n,i=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.next=3,this.appProcessor.getApp(e);case 3:(n=t.sent)&&(n.items_list=n.items_list.filter(function(t){return!r.find(function(e){return t.item_id==e.item_id})||(delete n.items_object[t.item_id],!1)}),this.pipeService.emit("gh_items_update",{app_id:e},n.items_list),this.storage.updateApp(n));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getItems",value:function(){var t=u(o().mark(function t(e){var r,n,i=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],t.next=3,this.appProcessor.getApp(e,r);case 3:if(n=t.sent){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",n.items_list);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"addNewItems",value:function(){var e=u(o().mark(function e(r,i){var a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.map(function(e){return n(n({},e),{},{fields:(0,t.filterFields)(e.fields)})}),e.next=3,this.addItemsApi(r,a);case 3:return u=e.sent,e.next=6,this.addItemsToStorage(r,u);case 6:return this.pipeService.emit("gh_items_add",{app_id:r},u),e.abrupt("return",u);case 8:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateItems",value:function(){var e=u(o().mark(function e(r,i){var a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.map(function(e){return n(n({},e),{},{fields:(0,t.filterFields)(e.fields)})}),e.next=3,this.updateItemsApi(r,a);case 3:return u=e.sent,e.next=6,this.updateItemsInStorage(r,u);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteItems",value:function(){var t=u(o().mark(function t(e,r){var n=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.deleteItemsApi(r).then(function(){var t=u(o().mark(function t(r){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.deleteItemsFromStorage(e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){var t=this;this.pipeService.onRoot("gh_items_get",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.app_id){e.next=5;break}return e.next=3,t.getItems(n.app_id);case 3:(i=e.sent)?t.pipeService.emit("gh_items_get",n,i):t.pipeService.emit("gh_items_get",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_add",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n&&n.app_id&&n.items)){e.next=5;break}return e.next=3,t.addNewItems(n.app_id,n.items);case 3:(i=e.sent)?t.pipeService.emit("gh_items_add",n,i):t.pipeService.emit("gh_items_add",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_update",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n&&n.app_id&&n.items)){e.next=5;break}return e.next=3,t.updateItems(n.app_id,n.items);case 3:(i=e.sent)?t.pipeService.emit("gh_items_update",n,i):t.pipeService.emit("gh_items_update",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_item_get",{},function(){var e=u(o().mark(function e(r,n){var i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.app_id){e.next=6;break}return e.next=3,t.getItems(n.app_id);case 3:i=e.sent,a=i.find(function(t){return t.item_id==n.item_id}),t.pipeService.emit("gh_item_get",n,a);case 6:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filtered_items_get",{},function(){var e=u(o().mark(function e(r,n){var i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.element_app_id){e.next=8;break}return e.next=3,t.getItems(n.element_app_id);case 3:return i=e.sent,e.next=6,t.util.getFilteredItems(i,n.filters_list,n.element_app_id,n.app_id,n.item_id,n.field_groupe,n.search,n.search_params);case 6:a=e.sent,t.pipeService.emit("gh_filtered_items_get",n,a);case 8:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filter_items",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.items){e.next=5;break}return e.next=3,t.util.getFilteredItems(n.items,n.filters_list,n.element_app_id,n.app_id,n.item_id,n.field_groupe,n.search,n.search_params);case 3:i=e.sent,t.pipeService.emit("gh_filter_items",n,i);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}())}}]),e}();
237
221
  },{"../utils.js":"EgeI"}],"PoPF":[function(require,module,exports) {
238
- "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(){t=function(){return n};var r,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(r){p=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),u=new N(n||[]);return a(o,"_invoke",{value:j(e,r,u)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var h="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function _(){}function b(){}function w(){}var x={};p(x,c,function(){return this});var k=Object.getPrototypeOf,O=k&&k(k(I([])));O&&O!==i&&o.call(O,c)&&(x=O);var P=w.prototype=_.prototype=Object.create(x);function F(e){["next","throw","return"].forEach(function(t){p(e,t,function(e){return this._invoke(t,e)})})}function S(t,r){function n(i,a,u,c){var s=d(t[i],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==e(p)&&o.call(p,"__await")?r.resolve(p.__await).then(function(e){n("next",e,u,c)},function(e){n("throw",e,u,c)}):r.resolve(p).then(function(e){l.value=e,u(l)},function(e){return n("throw",e,u,c)})}c(s.arg)}var i;a(this,"_invoke",{value:function(e,t){function o(){return new r(function(r,i){n(e,t,r,i)})}return i=i?i.then(o,o):o()}})}function j(e,t,n){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:r,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var s=d(e,t,n);if("normal"===s.type){if(i=n.done?g:v,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function L(e,t){var n=t.method,i=e.iterator[n];if(i===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,L(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){for(;++i<t.length;)if(o.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}throw new TypeError(e(t)+" is not iterable")}return b.prototype=w,a(P,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=p(w,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,l,"GeneratorFunction")),e.prototype=Object.create(P),e},n.awrap=function(e){return{__await:e}},F(S.prototype),p(S.prototype,s,function(){return this}),n.AsyncIterator=S,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new S(f(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},F(P),p(P,l,"Generator"),p(P,c,function(){return this}),p(P,"toString",function(){return"[object Generator]"}),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return u.type="throw",u.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t,r,n,i,o,a){try{var u=e[o](a),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function s(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(t){var r=p(t,"string");return"symbol"==e(r)?r:String(r)}function p(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldProcessor=void 0;var f=exports.FieldProcessor=function(){function e(t,r,n,i,o){u(this,e),this.storage=t,this.req=r,this.appProcessor=n,this.itemProcessor=i,this.pipeService=o,this.fieldListeners()}return s(e,[{key:"deleteFieldApi",value:function(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}},{key:"updatedFieldApi",value:function(){var e=a(t().mark(function e(r){var i,o,a,u=arguments;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>1&&void 0!==u[1]?u[1]:{},e.next=3,this.appProcessor.getApp(r);case 3:return o=e.sent,a={app_id:r,app_name:o.app_name,group_id:o.group_id,icon:o.icon,field_list:o.field_list.map(function(e){return e.field_id==i.field_id?n(n({},e),i):e}),views_list:o.views_list},e.abrupt("return",this.appProcessor.updateApp(a));case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"setFieldValueApi",value:function(e,t,r,n){var i=[{item_id:t,fields:[{field_id:r,field_value:n}]}];return this.itemProcessor.updateItems(e,i)}},{key:"deleteFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.filter(function(e){return e.file_id!=t}),r.items_list=r.items_list.map(function(e){return e.fields=e.fields.filter(function(e){return e.field_id!=t}),e}),this.storage.updateApp(r),!0}},{key:"updateFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.map(function(e){return e.field_id==t.field_id?n(n({},e),t):e}),this.storage.updateApp(r),t}},{key:"updateFieldValue",value:function(e,t,r,n){var i=this.storage.getApp(e);return i.items_list.forEach(function(e){e.item_id==t&&e.fields.forEach(function(t){t.field_id==r&&(t.field_value=n,i.items_object[e.item_id][t.field_id]=t)})}),this.storage.updateApp(i),n}},{key:"getField",value:function(){var e=a(t().mark(function e(r,n){var i,o;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:o=0;case 6:if(!(o<i.field_list.length)){e.next=12;break}if(i.field_list[o].field_id!=n){e.next=9;break}return e.abrupt("return",i.field_list[o]);case 9:o++,e.next=6;break;case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldIdByNameSpace",value:function(){var e=a(t().mark(function e(r,n){var i,o;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:o=0;case 6:if(!(o<i.field_list.length)){e.next=12;break}if(i.field_list[o].name_space!=n){e.next=9;break}return e.abrupt("return",i.field_list[o].field_id);case 9:o++,e.next=6;break;case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldModels",value:function(){var e=a(t().mark(function e(r){var n;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:return e.abrupt("return",n.field_list);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updateField",value:function(){var e=a(t().mark(function e(r,n){var i;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&n){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.updatedFieldApi(r,n);case 4:return i=e.sent,e.abrupt("return",this.updateFieldInStorage(r,i));case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteField",value:function(){var e=a(t().mark(function e(r,n){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.deleteFieldApi(n);case 2:return e.abrupt("return",this.deleteFieldInStorage(r,n));case 3:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldValue",value:function(){var e=a(t().mark(function e(r,n,i){var o,a;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=null,e.next=3,this.appProcessor.getApp(r);case 3:a=e.sent;try{o=a.items_object[n][i].field_value}catch(t){}return e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"setFieldValue",value:function(){var e=a(t().mark(function e(r,n,i,o){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&n&&i){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.setFieldValueApi(r,n,i,o);case 4:return e.abrupt("return",this.updateFieldValue(r,n,i,o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"fieldListeners",value:function(){var e=this;this.pipeService.onRoot("gh_value_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(i.app_id&&i.item_id&&i.field_id)){t.next=5;break}return t.next=3,e.getFieldValue(i.app_id,i.item_id,i.field_id);case 3:o=t.sent,e.pipeService.emit("gh_value_get",i,o);case 5:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_value_set",{},function(){var r=a(t().mark(function r(n,i){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.item_id&&(e.setFieldValue(i.app_id,i.item_id,i.field_id,i.new_value),delete i.new_value);case 1:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getField(i.app_id,i.field_id);case 3:o=t.sent,e.pipeService.emit("gh_model_get",i,o),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log("Field model: ",t.t0);case 10:case"end":return t.stop()}},r,null,[[0,7]])}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_update",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.updateField(i.app_id,i.field_model);case 2:o=t.sent,e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:i.field_id},o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_models_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFieldModels(i.app_id);case 2:o=t.sent,e.pipeService.emit("gh_models_get",i,o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_delete",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.deleteField(i.app_id,i.field_id);case 2:o=t.sent,e.pipeService.emit("gh_model_delete",i,o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}())}}]),e}();
222
+ "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(){t=function(){return n};var r,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(r){p=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),u=new N(n||[]);return a(o,"_invoke",{value:j(e,r,u)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var h="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function _(){}function b(){}function w(){}var x={};p(x,c,function(){return this});var k=Object.getPrototypeOf,O=k&&k(k(I([])));O&&O!==i&&o.call(O,c)&&(x=O);var P=w.prototype=_.prototype=Object.create(x);function F(e){["next","throw","return"].forEach(function(t){p(e,t,function(e){return this._invoke(t,e)})})}function S(t,r){function n(i,a,u,c){var s=d(t[i],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==e(p)&&o.call(p,"__await")?r.resolve(p.__await).then(function(e){n("next",e,u,c)},function(e){n("throw",e,u,c)}):r.resolve(p).then(function(e){l.value=e,u(l)},function(e){return n("throw",e,u,c)})}c(s.arg)}var i;a(this,"_invoke",{value:function(e,t){function o(){return new r(function(r,i){n(e,t,r,i)})}return i=i?i.then(o,o):o()}})}function j(e,t,n){var i=h;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:r,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var s=d(e,t,n);if("normal"===s.type){if(i=n.done?g:v,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function L(e,t){var n=t.method,i=e.iterator[n];if(i===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,L(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){for(;++i<t.length;)if(o.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}throw new TypeError(e(t)+" is not iterable")}return b.prototype=w,a(P,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=p(w,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,l,"GeneratorFunction")),e.prototype=Object.create(P),e},n.awrap=function(e){return{__await:e}},F(S.prototype),p(S.prototype,s,function(){return this}),n.AsyncIterator=S,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new S(f(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},F(P),p(P,l,"Generator"),p(P,c,function(){return this}),p(P,"toString",function(){return"[object Generator]"}),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return u.type="throw",u.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t,r,n,i,o,a){try{var u=e[o](a),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function s(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(t){var r=p(t,"string");return"symbol"===e(r)?r:String(r)}function p(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldProcessor=void 0;var f=exports.FieldProcessor=function(){function e(t,r,n,i,o){u(this,e),this.storage=t,this.req=r,this.appProcessor=n,this.itemProcessor=i,this.pipeService=o,this.fieldListeners()}return s(e,[{key:"deleteFieldApi",value:function(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}},{key:"updatedFieldApi",value:function(){var e=a(t().mark(function e(r){var i,o,a,u=arguments;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>1&&void 0!==u[1]?u[1]:{},e.next=3,this.appProcessor.getApp(r);case 3:return o=e.sent,a={app_id:r,app_name:o.app_name,group_id:o.group_id,icon:o.icon,field_list:o.field_list.map(function(e){return e.field_id==i.field_id?n(n({},e),i):e}),views_list:o.views_list},e.abrupt("return",this.appProcessor.updateApp(a));case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"setFieldValueApi",value:function(e,t,r,n){var i=[{item_id:t,fields:[{field_id:r,field_value:n}]}];return this.itemProcessor.updateItems(e,i)}},{key:"deleteFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.filter(function(e){return e.file_id!=t}),r.items_list=r.items_list.map(function(e){return e.fields=e.fields.filter(function(e){return e.field_id!=t}),e}),this.storage.updateApp(r),!0}},{key:"updateFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.map(function(e){return e.field_id==t.field_id?n(n({},e),t):e}),this.storage.updateApp(r),t}},{key:"updateFieldValue",value:function(e,t,r,n){var i=this.storage.getApp(e);return i.items_list.forEach(function(e){e.item_id==t&&e.fields.forEach(function(t){t.field_id==r&&(t.field_value=n,i.items_object[e.item_id][t.field_id]=t)})}),this.storage.updateApp(i),n}},{key:"getField",value:function(){var e=a(t().mark(function e(r,n){var i,o;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:o=0;case 6:if(!(o<i.field_list.length)){e.next=12;break}if(i.field_list[o].field_id!=n){e.next=9;break}return e.abrupt("return",i.field_list[o]);case 9:o++,e.next=6;break;case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldIdByNameSpace",value:function(){var e=a(t().mark(function e(r,n){var i,o;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:o=0;case 6:if(!(o<i.field_list.length)){e.next=12;break}if(i.field_list[o].name_space!=n){e.next=9;break}return e.abrupt("return",i.field_list[o].field_id);case 9:o++,e.next=6;break;case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldModels",value:function(){var e=a(t().mark(function e(r){var n;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:return e.abrupt("return",n.field_list);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updateField",value:function(){var e=a(t().mark(function e(r,n){var i;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&n){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.updatedFieldApi(r,n);case 4:return i=e.sent,e.abrupt("return",this.updateFieldInStorage(r,i));case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteField",value:function(){var e=a(t().mark(function e(r,n){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.deleteFieldApi(n);case 2:return e.abrupt("return",this.deleteFieldInStorage(r,n));case 3:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldValue",value:function(){var e=a(t().mark(function e(r,n,i){var o,a;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=null,e.next=3,this.appProcessor.getApp(r);case 3:a=e.sent;try{o=a.items_object[n][i].field_value}catch(t){}return e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"setFieldValue",value:function(){var e=a(t().mark(function e(r,n,i,o){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&n&&i){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.setFieldValueApi(r,n,i,o);case 4:return e.abrupt("return",this.updateFieldValue(r,n,i,o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"fieldListeners",value:function(){var e=this;this.pipeService.onRoot("gh_value_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(i.app_id&&i.item_id&&i.field_id)){t.next=5;break}return t.next=3,e.getFieldValue(i.app_id,i.item_id,i.field_id);case 3:o=t.sent,e.pipeService.emit("gh_value_get",i,o);case 5:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_value_set",{},function(){var r=a(t().mark(function r(n,i){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.item_id&&(e.setFieldValue(i.app_id,i.item_id,i.field_id,i.new_value),delete i.new_value);case 1:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getField(i.app_id,i.field_id);case 3:o=t.sent,e.pipeService.emit("gh_model_get",i,o),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log("Field model: ",t.t0);case 10:case"end":return t.stop()}},r,null,[[0,7]])}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_update",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.updateField(i.app_id,i.field_model);case 2:o=t.sent,e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:i.field_id},o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_models_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFieldModels(i.app_id);case 2:o=t.sent,e.pipeService.emit("gh_models_get",i,o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_delete",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.deleteField(i.app_id,i.field_id);case 2:o=t.sent,e.pipeService.emit("gh_model_delete",i,o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}())}}]),e}();
239
223
  },{}],"XUT2":[function(require,module,exports) {
240
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t){return o(t)||i(t)||n(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(){u=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:L(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var v="suspendedStart",d="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function x(){}var _={};f(_,c,function(){return this});var F=Object.getPrototypeOf,k=F&&F(F(N([])));k&&k!==n&&i.call(k,c)&&(_=k);var S=x.prototype=w.prototype=Object.create(_);function E(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function A(e,r){function n(o,a,u,c){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(s.arg)}var a;o(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return a=a?a.then(i,i):i()}})}function L(t,r,n){var i=v;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=O(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var s=h(t,r,n);if("normal"===s.type){if(i=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,o(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},E(A.prototype),f(A.prototype,s,function(){return this}),r.AsyncIterator=A,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new A(p(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(S),f(S,l,"Generator"),f(S,c,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return u.type="throw",u.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},r}function c(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,u,"next",t)}function u(t){c(o,n,i,a,u,"throw",t)}a(void 0)})}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function p(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(e){var r=v(e,"string");return"symbol"==t(r)?r:String(r)}function v(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileManager=void 0;var d=exports.FileManager=function(){function t(e,r,n,i){l(this,t),this.storage=e,this.pipeService=r,this.req=n,this.appProcessor=i}return p(t,[{key:"uploadFileApi",value:function(){var t=s(u().mark(function t(e,r,n){var i,o;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={"file-0":e,app_id:r,item_id:n},t.next=4,this.req.post({url:"/file/formupload",form:i});case 4:return o=t.sent,t.abrupt("return",o);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromStringApi",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromStringApi",value:function(){var t=s(u().mark(function t(e,r,n,i,o){var a,c;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a={file_name:n,extension:i,file_id:r,format:o,source:e},t.next=4,this.req.post({url:"/file/update",form:{file:JSON.stringify(a)}});case 4:return c=t.sent,t.abrupt("return",c);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e,r,n,i,o){return t.apply(this,arguments)}}()},{key:"duplicateFileApi",value:function(){var t=s(u().mark(function t(e){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}}));case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"downloadFileFromString",value:function(){var t=s(u().mark(function t(e,r){var n,i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isFileExists(e,r);case 2:if(!t.sent){t.next=12;break}return t.next=5,this.getFile(e,r);case 5:return n=t.sent,t.next=8,this.req.get({url:n.url+"?timestamp="+n.last_update,externalResource:!0});case 8:return i=t.sent,t.abrupt("return",{file:n,data:i,type:"file"});case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"duplicateFile",value:function(){var t=s(u().mark(function t(e){var r,n=this;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.duplicateFileApi(e);case 2:return(r=t.sent).forEach(function(t){n.addFileToStorage(t.app_id,t)}),t.abrupt("return",r);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteFileApi",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/file/delete?file_id=".concat(e)});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"addFileToStorage",value:function(t,e){var r=this.storage.getApp(t);r&&(r.file_list.push(e),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e))}},{key:"addFilesToStorage",value:function(t,r){var n,i=this,o=this.storage.getApp(t);o&&((n=o.file_list).push.apply(n,e(r)),this.storage.updateApp(o),r.forEach(function(e){i.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e)}))}},{key:"deleteFileFromStorage",value:function(t,e){var r,n=this.storage.getApp(e);n&&(n.file_list=n.file_list.filter(function(e){return e.file_id!=t||(r=e,!1)}),this.storage.updateApp(n),this.pipeService.emit("gh_file_delete",{file_id:t},r))}},{key:"updateFileInStorage",value:function(t,e,r){var n=this.storage.getApp(e);n&&(n.file_list=n.file_list.map(function(e){return e.file_id==t?r:e}),this.storage.updateApp(n),this.pipeService.emit("gh_file_update",{file_id:t}))}},{key:"getFile",value:function(){var t=s(u().mark(function t(e,r){var n;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appProcessor.getApp(e);case 2:return n=t.sent,t.abrupt("return",new Promise(function(t,e){var i=n.file_list.find(function(t){return t.file_id==r});t(i||"")}));case 4:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getFiles",value:function(){var t=s(u().mark(function t(e){var r,n,i=arguments;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.next=3,this.appProcessor.getApp(e);case 3:return n=t.sent,t.abrupt("return",new Promise(function(t,e){var i=n.file_list.filter(function(t){return r.some(function(e){return e==t.file_id})});t(i||"")}));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"uploadFile",value:function(){var t=s(u().mark(function t(e,r,n){var i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.uploadFileApi(e,r,n);case 2:return i=t.sent,this.addFileToStorage(r,i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromString",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.uploadFileFromStringApi(e);case 2:return r=t.sent,this.addFileToStorage(r.app_id,r),t.abrupt("return",r);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromString",value:function(){var t=s(u().mark(function t(e,r,n,i,o){var a;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateFileFromStringApi(e,r,n,i,o);case 2:return a=t.sent,this.updateFileInStorage(r,a.app_id,a),t.abrupt("return",a);case 5:case"end":return t.stop()}},t,this)}));return function(e,r,n,i,o){return t.apply(this,arguments)}}()},{key:"deleteFile",value:function(){var t=s(u().mark(function t(e,r){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deleteFileApi(e);case 2:return this.deleteFileFromStorage(e,r),t.abrupt("return",!0);case 4:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"isFileExists",value:function(){var t=s(u().mark(function t(e,r){var n,i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,!Boolean(r)){t.next=12;break}return t.next=4,this.getFile(e,r);case 4:if(i=t.sent,!Boolean(i)){t.next=9;break}return t.abrupt("return",n.test(i.url));case 9:return t.abrupt("return",!1);case 10:t.next=13;break;case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}]),t}();
224
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t){return o(t)||i(t)||n(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(){u=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:L(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var v="suspendedStart",d="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function x(){}var _={};f(_,c,function(){return this});var F=Object.getPrototypeOf,k=F&&F(F(N([])));k&&k!==n&&i.call(k,c)&&(_=k);var S=x.prototype=w.prototype=Object.create(_);function E(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function A(e,r){function n(o,a,u,c){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(s.arg)}var a;o(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return a=a?a.then(i,i):i()}})}function L(t,r,n){var i=v;return function(o,a){if(i===y)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=O(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var s=h(t,r,n);if("normal"===s.type){if(i=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,o(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},E(A.prototype),f(A.prototype,s,function(){return this}),r.AsyncIterator=A,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new A(p(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(S),f(S,l,"Generator"),f(S,c,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return u.type="throw",u.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},r}function c(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,u,"next",t)}function u(t){c(o,n,i,a,u,"throw",t)}a(void 0)})}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function p(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(e){var r=v(e,"string");return"symbol"===t(r)?r:String(r)}function v(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileManager=void 0;var d=exports.FileManager=function(){function t(e,r,n,i){l(this,t),this.storage=e,this.pipeService=r,this.req=n,this.appProcessor=i}return p(t,[{key:"uploadFileApi",value:function(){var t=s(u().mark(function t(e,r,n){var i,o;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={"file-0":e,app_id:r,item_id:n},t.next=4,this.req.post({url:"/file/formupload",form:i});case 4:return o=t.sent,t.abrupt("return",o);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromStringApi",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromStringApi",value:function(){var t=s(u().mark(function t(e,r,n,i,o){var a,c;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a={file_name:n,extension:i,file_id:r,format:o,source:e},t.next=4,this.req.post({url:"/file/update",form:{file:JSON.stringify(a)}});case 4:return c=t.sent,t.abrupt("return",c);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e,r,n,i,o){return t.apply(this,arguments)}}()},{key:"duplicateFileApi",value:function(){var t=s(u().mark(function t(e){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}}));case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"downloadFileFromString",value:function(){var t=s(u().mark(function t(e,r){var n,i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isFileExists(e,r);case 2:if(!t.sent){t.next=12;break}return t.next=5,this.getFile(e,r);case 5:return n=t.sent,t.next=8,this.req.get({url:n.url+"?timestamp="+n.last_update,externalResource:!0});case 8:return i=t.sent,t.abrupt("return",{file:n,data:i,type:"file"});case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"duplicateFile",value:function(){var t=s(u().mark(function t(e){var r,n=this;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.duplicateFileApi(e);case 2:return(r=t.sent).forEach(function(t){n.addFileToStorage(t.app_id,t)}),t.abrupt("return",r);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteFileApi",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/file/delete?file_id=".concat(e)});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"addFileToStorage",value:function(t,e){var r=this.storage.getApp(t);r&&(r.file_list.push(e),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e))}},{key:"addFilesToStorage",value:function(t,r){var n,i=this,o=this.storage.getApp(t);o&&((n=o.file_list).push.apply(n,e(r)),this.storage.updateApp(o),r.forEach(function(e){i.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e)}))}},{key:"deleteFileFromStorage",value:function(t,e){var r,n=this.storage.getApp(e);n&&(n.file_list=n.file_list.filter(function(e){return e.file_id!=t||(r=e,!1)}),this.storage.updateApp(n),this.pipeService.emit("gh_file_delete",{file_id:t},r))}},{key:"updateFileInStorage",value:function(t,e,r){var n=this.storage.getApp(e);n&&(n.file_list=n.file_list.map(function(e){return e.file_id==t?r:e}),this.storage.updateApp(n),this.pipeService.emit("gh_file_update",{file_id:t}))}},{key:"getFile",value:function(){var t=s(u().mark(function t(e,r){var n;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appProcessor.getApp(e);case 2:return n=t.sent,t.abrupt("return",new Promise(function(t,e){var i=n.file_list.find(function(t){return t.file_id==r});t(i||"")}));case 4:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getFiles",value:function(){var t=s(u().mark(function t(e){var r,n,i=arguments;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.next=3,this.appProcessor.getApp(e);case 3:return n=t.sent,t.abrupt("return",new Promise(function(t,e){var i=n.file_list.filter(function(t){return r.some(function(e){return e==t.file_id})});t(i||"")}));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"uploadFile",value:function(){var t=s(u().mark(function t(e,r,n){var i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.uploadFileApi(e,r,n);case 2:return i=t.sent,this.addFileToStorage(r,i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromString",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.uploadFileFromStringApi(e);case 2:return r=t.sent,this.addFileToStorage(r.app_id,r),t.abrupt("return",r);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromString",value:function(){var t=s(u().mark(function t(e,r,n,i,o){var a;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateFileFromStringApi(e,r,n,i,o);case 2:return a=t.sent,this.updateFileInStorage(r,a.app_id,a),t.abrupt("return",a);case 5:case"end":return t.stop()}},t,this)}));return function(e,r,n,i,o){return t.apply(this,arguments)}}()},{key:"deleteFile",value:function(){var t=s(u().mark(function t(e,r){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deleteFileApi(e);case 2:return this.deleteFileFromStorage(e,r),t.abrupt("return",!0);case 4:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"isFileExists",value:function(){var t=s(u().mark(function t(e,r){var n,i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,!Boolean(r)){t.next=12;break}return t.next=4,this.getFile(e,r);case 4:if(i=t.sent,!Boolean(i)){t.next=9;break}return t.abrupt("return",n.test(i.url));case 9:return t.abrupt("return",!1);case 10:t.next=13;break;case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}]),t}();
241
225
  },{}],"baS4":[function(require,module,exports) {
242
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:P(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var L={};l(L,c,function(){return this});var E=Object.getPrototypeOf,k=E&&E(E(q([])));k&&k!==o&&i.call(k,c)&&(L=k);var j=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){l(t,r,function(t){return this._invoke(r,t)})})}function _(r,e){function n(o,a,u,c){var f=p(r[o],r,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==t(l)&&i.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(l).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function P(t,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function S(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function G(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(j,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=l(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},O(_.prototype),l(_.prototype,f,function(){return this}),n.AsyncIterator=_,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new _(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(j),l(j,s,"Generator"),l(j,c,function(){return this}),l(j,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:String(e)}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunkAPI=void 0;var f=exports.ChunkAPI=function(){function t(r){o(this,t),this.req=r}return a(t,[{key:"getChunk",value:function(){var t=n(r().mark(function t(e,n){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.get({url:"".concat(this.req.root,"/api/get-items-chunk/").concat(e,"/").concat(n),method:"GET"}));case 1:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getLastChunk",value:function(){var t=n(r().mark(function t(e){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-last-items-chunk/").concat(e),method:"GET"}));case 1:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}]),t}();
226
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(e){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:P(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var L={};s(L,c,function(){return this});var E=Object.getPrototypeOf,k=E&&E(E(q([])));k&&k!==o&&i.call(k,c)&&(L=k);var j=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function _(r,e){function n(o,a,u,c){var f=p(r[o],r,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==t(s)&&i.call(s,"__await")?e.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(s).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function P(t,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function S(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function G(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(j,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=s(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,s(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},O(_.prototype),s(_.prototype,f,function(){return this}),n.AsyncIterator=_,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new _(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(j),s(j,l,"Generator"),s(j,c,function(){return this}),s(j,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"===t(e)?e:String(e)}function c(r,e){if("object"!==t(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunkAPI=void 0;var f=exports.ChunkAPI=function(){function t(r){o(this,t),this.req=r}return a(t,[{key:"getChunk",value:function(){var t=n(r().mark(function t(e,n){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.get({url:"".concat(this.req.root,"/api/get-items-chunk/").concat(e,"/").concat(n),method:"GET"}));case 1:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getLastChunk",value:function(){var t=n(r().mark(function t(e){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-last-items-chunk/").concat(e),method:"GET"}));case 1:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}]),t}();
243
227
  },{}],"KHGc":[function(require,module,exports) {
244
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunksManager=void 0;var t=require("../api/ChunkApi.js");function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function e(){e=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(t){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:O(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function x(){}var k={};h(k,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(G([])));E&&E!==o&&i.call(E,c)&&(k=E);var P=x.prototype=w.prototype=Object.create(k);function S(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function j(t,e){function n(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==r(h)&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function O(r,e,n){var o=v;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=p(r,e,n);if("normal"===s.type){if(o=n.done?d:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function _(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,_(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function C(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return b.prototype=x,a(P,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=h(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,f,"GeneratorFunction")),t.prototype=Object.create(P),t},n.awrap=function(t){return{__await:t}},S(j.prototype),h(j.prototype,s,function(){return this}),n.AsyncIterator=j,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new j(l(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(P),h(P,f,"Generator"),h(P,c,function(){return this}),h(P,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=G,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),C(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;C(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},n}function n(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise(function(o,i){var a=t.apply(r,e);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)})}}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function a(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function u(t,r,e){return r&&a(t.prototype,r),e&&a(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=s(t,"string");return"symbol"==r(e)?e:String(e)}function s(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f=exports.ChunksManager=function(){function r(e,n,o,a,u){i(this,r),this.storage=e,this.pipeService=n,this.req=o,this.util=a,this.dataService=u,this.chunkApi=new t.ChunkAPI(o),this.itemListeners()}return u(r,[{key:"getChunk",value:function(){var t=o(e().mark(function t(r,n){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.dataService.getChunk(r,n));case 4:return t.prev=4,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 8:case"end":return t.stop()}},t,this,[[0,4]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getLastChunk",value:function(){var t=o(e().mark(function t(r){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.chunkApi.getLastChunk(r));case 4:return t.prev=4,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 8:case"end":return t.stop()}},t,this,[[0,4]])}));return function(r){return t.apply(this,arguments)}}()},{key:"getChunks",value:function(){var t=o(e().mark(function t(r,n){var o,i=this;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=[],!n){t.next=5;break}return t.next=4,Promise.all(n.map(function(t){return i.getChunk(r,t)}));case 4:o=t.sent;case 5:return t.abrupt("return",o);case 6:case"end":return t.stop()}},t)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){}},{key:"getApp",value:function(){var t=o(e().mark(function t(r){var n;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return",null);case 2:if(n=this.getAppFromStorage(r)){t.next=16;break}if(!this.getAppPromises[r]){t.next=6;break}return t.abrupt("return",this.getAppPromises[r]);case 6:return this.getAppPromises[r]=this.getAppApi(r),t.next=9,this.getAppPromises[r];case 9:if(!(n=t.sent)){t.next=15;break}this.saveAppInStorage(n),this.ws.addSubscription(r),t.next=16;break;case 15:return t.abrupt("return",null);case 16:return t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}]),r}();
228
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunksManager=void 0;var t=require("../api/ChunkApi.js");function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function e(){e=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(t){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:O(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function x(){}var k={};h(k,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(G([])));E&&E!==o&&i.call(E,c)&&(k=E);var P=x.prototype=w.prototype=Object.create(k);function S(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function j(t,e){function n(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==r(h)&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function O(r,e,n){var o=v;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=p(r,e,n);if("normal"===s.type){if(o=n.done?d:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function _(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,_(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function C(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return b.prototype=x,a(P,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=h(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,f,"GeneratorFunction")),t.prototype=Object.create(P),t},n.awrap=function(t){return{__await:t}},S(j.prototype),h(j.prototype,s,function(){return this}),n.AsyncIterator=j,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new j(l(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(P),h(P,f,"Generator"),h(P,c,function(){return this}),h(P,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=G,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),C(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;C(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},n}function n(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise(function(o,i){var a=t.apply(r,e);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)})}}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function a(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function u(t,r,e){return r&&a(t.prototype,r),e&&a(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=s(t,"string");return"symbol"===r(e)?e:String(e)}function s(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f=exports.ChunksManager=function(){function r(e,n,o,a,u){i(this,r),this.storage=e,this.pipeService=n,this.req=o,this.util=a,this.dataService=u,this.chunkApi=new t.ChunkAPI(o),this.itemListeners()}return u(r,[{key:"getChunk",value:function(){var t=o(e().mark(function t(r,n){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.dataService.getChunk(r,n));case 4:return t.prev=4,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 8:case"end":return t.stop()}},t,this,[[0,4]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getLastChunk",value:function(){var t=o(e().mark(function t(r){return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.chunkApi.getLastChunk(r));case 4:return t.prev=4,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 8:case"end":return t.stop()}},t,this,[[0,4]])}));return function(r){return t.apply(this,arguments)}}()},{key:"getChunks",value:function(){var t=o(e().mark(function t(r,n){var o,i=this;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=[],!n){t.next=5;break}return t.next=4,Promise.all(n.map(function(t){return i.getChunk(r,t)}));case 4:o=t.sent;case 5:return t.abrupt("return",o);case 6:case"end":return t.stop()}},t)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){}},{key:"getApp",value:function(){var t=o(e().mark(function t(r){var n;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return",null);case 2:if(n=this.getAppFromStorage(r)){t.next=16;break}if(!this.getAppPromises[r]){t.next=6;break}return t.abrupt("return",this.getAppPromises[r]);case 6:return this.getAppPromises[r]=this.getAppApi(r),t.next=9,this.getAppPromises[r];case 9:if(!(n=t.sent)){t.next=15;break}this.saveAppInStorage(n),this.ws.addSubscription(r),t.next=16;break;case 15:return t.abrupt("return",null);case 16:return t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}]),r}();
245
229
  },{"../api/ChunkApi.js":"baS4"}],"K1Gs":[function(require,module,exports) {
246
- "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=i(t,"string");return"symbol"==e(n)?n:String(n)}function i(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DocumentManager=void 0;var u=exports.DocumentManager=function(){function e(n,r){t(this,e),this.req=n,this.pipeService=r}return r(e,[{key:"createDocument",value:function(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"emitDocumentInsert",value:function(e){var t="string"==typeof e.data?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}},{key:"getDocument",value:function(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"getDocuments",value:function(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"deleteDocument",value:function(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}]),e}();
230
+ "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=i(t,"string");return"symbol"===e(n)?n:String(n)}function i(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DocumentManager=void 0;var u=exports.DocumentManager=function(){function e(n,r){t(this,e),this.req=n,this.pipeService=r}return r(e,[{key:"createDocument",value:function(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"emitDocumentInsert",value:function(e){var t="string"==typeof e.data?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}},{key:"getDocument",value:function(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"getDocuments",value:function(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"deleteDocument",value:function(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}]),e}();
247
231
  },{}],"X4Dt":[function(require,module,exports) {
248
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(r){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:I(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",g="completed",m={};function b(){}function w(){}function x(){}var _={};l(_,c,function(){return this});var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==o&&i.call(L,c)&&(_=L);var E=x.prototype=b.prototype=Object.create(_);function j(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function O(e,r){function n(o,a,u,c){var s=p(e[o],e,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==t(l)&&i.call(l,"__await")?r.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(l).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function I(t,e,n){var o=y;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new O(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),l(E,f,"Generator"),l(E,c,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(G),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),G(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;G(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(e){var r=c(e,"string");return"symbol"==t(r)?r:String(r)}function c(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Interpritate=void 0;var s=exports.Interpritate=function(){function t(e){o(this,t),this.gudhub=e}return a(t,[{key:"getInterpretationObj",value:function(){var t=n(e().mark(function t(r,n,o,i,a,u){var c,s,f,l,h;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(c=[],s=n.data_model.interpretation.find(function(t){return t.src==o})||n.data_model.interpretation.find(function(t){return"table"==t.src})||{id:"default"},f=s,!r.data_model||!r.data_model.interpretation){t.next=22;break}for(l=0;l<r.data_model.interpretation.length;l++)r.data_model.interpretation[l].src!=o&&r.data_model.interpretation[l].src!=i||c.push(r.data_model.interpretation[l]);l=0;case 6:if(!(l<c.length)){t.next=22;break}if(!(c[l].settings&&c[l].settings.condition_filter&&c[l].settings.filters_list.length>0)){t.next=18;break}return t.next=10,gudhub.getItem(u,a);case 10:if(!(h=t.sent)){t.next=16;break}if(!(gudhub.filter([h],c[l].settings.filters_list).length>0)){t.next=16;break}return f=c[l],t.abrupt("break",22);case 16:t.next=19;break;case 18:f=gudhub.mergeObjects(f,c[l]);case 19:l++,t.next=6;break;case 22:return t.abrupt("return",f);case 23:case"end":return t.stop()}},t)}));return function(e,r,n,o,i,a){return t.apply(this,arguments)}}()},{key:"getInterpretation",value:function(t,r,o,i,a,u,c){var s=this;return new Promise(function(){var f=n(e().mark(function f(l,h){var p;return e().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:(p=r&&r.data_type?r.data_type:o)?gudhub.ghconstructor.getInstance(p).then(function(){var o=n(e().mark(function n(o){var f;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=5;break}return e.next=3,s.getInterpretationObj(r,o.getTemplate().model,i,c,a,u);case 3:f=e.sent,o.getInterpretation(t,f.id,p,r,a,u).then(function(t){l(gudhub.mergeObjects(t,f))},function(t){h()});case 5:case"end":return e.stop()}},n)}));return function(t){return o.apply(this,arguments)}}(),function(t){}):console.error("Get Interpretation: data_type is undefined",o,r);case 2:case"end":return f.stop()}},f)}));return function(t,e){return f.apply(this,arguments)}}())}},{key:"getInterpretationById",value:function(){var t=n(e().mark(function t(r,n,o,i){var a,u,c,s,f,l,h=arguments;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=h.length>4&&void 0!==h[4]?h[4]:null,u=h.length>5&&void 0!==h[5]?h[5]:null,null!=a){t.next=8;break}return t.next=5,this.gudhub.getFieldValue(r,n,o);case 5:t.t0=t.sent,t.next=9;break;case 8:t.t0=a;case 9:if(c=t.t0,null!=u){t.next=16;break}return t.next=13,this.gudhub.getField(r,o);case 13:t.t1=t.sent,t.next=17;break;case 16:t.t1=u;case 17:if(null!=(s=t.t1)){t.next=20;break}return t.abrupt("return","");case 20:return t.next=22,this.gudhub.ghconstructor.getInstance(s.data_type);case 22:return f=t.sent,t.next=25,f.getInterpretation(c,i,s.data_type,s,n,r);case 25:if("<span>no interpretation</span>"!=(l=t.sent).html){t.next=30;break}return t.abrupt("return",c);case 30:return t.abrupt("return",l.html);case 31:case"end":return t.stop()}},t,this)}));return function(e,r,n,o){return t.apply(this,arguments)}}()}]),t}();
232
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(r){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:I(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",g="completed",m={};function b(){}function w(){}function x(){}var _={};l(_,c,function(){return this});var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==o&&i.call(L,c)&&(_=L);var E=x.prototype=b.prototype=Object.create(_);function j(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function O(e,r){function n(o,a,u,c){var s=p(e[o],e,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==t(l)&&i.call(l,"__await")?r.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(l).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function I(t,e,n){var o=y;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new O(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),l(E,f,"Generator"),l(E,c,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(G),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),G(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;G(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(e){var r=c(e,"string");return"symbol"===t(r)?r:String(r)}function c(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Interpritate=void 0;var s=exports.Interpritate=function(){function t(e){o(this,t),this.gudhub=e}return a(t,[{key:"getInterpretationObj",value:function(){var t=n(e().mark(function t(r,n,o,i,a,u){var c,s,f,l,h;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(c=[],s=n.data_model.interpretation.find(function(t){return t.src==o})||n.data_model.interpretation.find(function(t){return"table"==t.src})||{id:"default"},f=s,!r.data_model||!r.data_model.interpretation){t.next=22;break}for(l=0;l<r.data_model.interpretation.length;l++)r.data_model.interpretation[l].src!=o&&r.data_model.interpretation[l].src!=i||c.push(r.data_model.interpretation[l]);l=0;case 6:if(!(l<c.length)){t.next=22;break}if(!(c[l].settings&&c[l].settings.condition_filter&&c[l].settings.filters_list.length>0)){t.next=18;break}return t.next=10,gudhub.getItem(u,a);case 10:if(!(h=t.sent)){t.next=16;break}if(!(gudhub.filter([h],c[l].settings.filters_list).length>0)){t.next=16;break}return f=c[l],t.abrupt("break",22);case 16:t.next=19;break;case 18:f=gudhub.mergeObjects(f,c[l]);case 19:l++,t.next=6;break;case 22:return t.abrupt("return",f);case 23:case"end":return t.stop()}},t)}));return function(e,r,n,o,i,a){return t.apply(this,arguments)}}()},{key:"getInterpretation",value:function(t,r,o,i,a,u,c){var s=this;return new Promise(function(){var f=n(e().mark(function f(l,h){var p;return e().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:(p=r&&r.data_type?r.data_type:o)?gudhub.ghconstructor.getInstance(p).then(function(){var o=n(e().mark(function n(o){var f;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=5;break}return e.next=3,s.getInterpretationObj(r,o.getTemplate().model,i,c,a,u);case 3:f=e.sent,o.getInterpretation(t,f.id,p,r,a,u).then(function(t){l(gudhub.mergeObjects(t,f))},function(t){h()});case 5:case"end":return e.stop()}},n)}));return function(t){return o.apply(this,arguments)}}(),function(t){}):console.error("Get Interpretation: data_type is undefined",o,r);case 2:case"end":return f.stop()}},f)}));return function(t,e){return f.apply(this,arguments)}}())}},{key:"getInterpretationById",value:function(){var t=n(e().mark(function t(r,n,o,i){var a,u,c,s,f,l,h=arguments;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=h.length>4&&void 0!==h[4]?h[4]:null,u=h.length>5&&void 0!==h[5]?h[5]:null,null!=a){t.next=8;break}return t.next=5,this.gudhub.getFieldValue(r,n,o);case 5:t.t0=t.sent,t.next=9;break;case 8:t.t0=a;case 9:if(c=t.t0,null!=u){t.next=16;break}return t.next=13,this.gudhub.getField(r,o);case 13:t.t1=t.sent,t.next=17;break;case 16:t.t1=u;case 17:if(null!=(s=t.t1)){t.next=20;break}return t.abrupt("return","");case 20:return t.next=22,this.gudhub.ghconstructor.getInstance(s.data_type);case 22:return f=t.sent,t.next=25,f.getInterpretation(c,i,s.data_type,s,n,r);case 25:if("<span>no interpretation</span>"!=(l=t.sent).html){t.next=30;break}return t.abrupt("return",c);case 30:return t.abrupt("return",l.html);case 31:case"end":return t.stop()}},t,this)}));return function(e,r,n,o){return t.apply(this,arguments)}}()}]),t}();
249
233
  },{}],"sPce":[function(require,module,exports) {
250
234
  "use strict";function e(e,s){switch(s.api){case"/items/update":console.log("/items/update - ",s),e.itemProcessor.updateItemsInStorage(s.app_id,s.response);break;case"/items/add":console.log("/items/add - ",s),e.itemProcessor.addItemsToStorage(s.app_id,s.response);break;case"/items/delete":console.log("/items/delete - ",s),e.itemProcessor.deleteItemsFromStorage(s.app_id,s.response);break;case"/app/update":console.log("/app/update - ",s),e.appProcessor.updateAppFieldsAndViews(s.response);break;case"/file/delete":console.log("file/delete - ",s),e.fileManager.deleteFileFromStorage(s.response.file_id,s.app_id);break;case"/file/upload":console.log("file/upload - ",s),e.fileManager.addFileToStorage(s.app_id,s.response);break;case"/file/formupload":console.log("file/formupload - ",s);break;case"/file/update":e.fileManager.updateFileInStorage(s.response.file_id,s.response.app_id,s.response),console.log("file/update - ",s);break;case"/new/file/duplicate":e.fileManager.addFilesToStorage(s.app_id,s.response),console.log("new/file/duplicate - ",s);break;case"/api/new/document/insert-one":e.documentManager.emitDocumentInsert(s.response),console.log("/api/new/document/insert-one - ",s);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",s);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",s);var o=JSON.parse(s.response);if(!o.data_type)return;e.ghconstructor.getInstance(o.data_type).then(function(e){e.onMessage(s.app_id,s.user_id,o)});break;default:console.warn("WEBSOCKETS is not process this API:",s.api)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebsocketHandler=e;
251
235
  },{}],"qJXG":[function(require,module,exports) {
252
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,u=o.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",p=a.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(e){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,u=Object.create(o.prototype),a=new A(n||[]);return i(u,"_invoke",{value:O(t,e,a)}),u}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",g="suspendedYield",y="executing",d="completed",m={};function b(){}function w(){}function x(){}var k={};h(k,c,function(){return this});var _=Object.getPrototypeOf,L=_&&_(_(q([])));L&&L!==o&&u.call(L,c)&&(k=L);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function G(r,e){function n(o,i,a,c){var s=f(r[o],r,i);if("throw"!==s.type){var p=s.arg,h=p.value;return h&&"object"==t(h)&&u.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(h).then(function(t){p.value=t,a(p)},function(t){return n("throw",t,a,c)})}c(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function u(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(u,u):u()}})}function O(t,r,n){var o=v;return function(u,i){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===u)throw i;return{value:e,done:!0}}for(n.method=u,n.arg=i;;){var a=n.delegate;if(a){var c=T(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=f(t,r,n);if("normal"===s.type){if(o=n.done?d:g,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var u=f(o,t.iterator,r.arg);if("throw"===u.type)return r.method="throw",r.arg=u.arg,r.delegate=null,m;var i=u.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(u.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,i(E,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=h(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(G.prototype),h(G.prototype,s,function(){return this}),n.AsyncIterator=G,n.async=function(t,r,e,o,u){void 0===u&&(u=Promise);var i=new G(l(t,r,e,o),u);return n.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},j(E),h(E,p,"Generator"),h(E,c,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&u.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=u.call(i,"catchLoc"),s=u.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,u,i){try{var a=t[u](i),c=a.value}catch(s){return void e(s)}a.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=t.apply(r,n);function a(t){e(i,o,u,a,c,"next",t)}function c(t){e(i,o,u,a,c,"throw",t)}a(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function i(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(r){var e=c(r,"string");return"symbol"==t(e)?e:String(e)}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupManager=void 0;var s=exports.GroupManager=function(){function t(r,e){o(this,t),this.req=e,this.gudhub=r}return i(t,[{key:"createGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_name:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/create-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateGroupApi",value:function(){var t=n(r().mark(function t(e,n){var o,u;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,o={token:t.t0,group_name:t.t1,group_id:t.t2},t.next=9,this.req.post({url:"/api/sharing-group/update-group",form:o});case 9:return u=t.sent,t.abrupt("return",u);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"deleteGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/delete-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addUserToGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var u,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,u={token:t.t0,group_id:t.t1,user_id:t.t2,group_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/add-user-to-group",form:u});case 10:return i=t.sent,t.abrupt("return",i);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getUsersByGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-users-by-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUserInGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var u,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,u={token:t.t0,user_id:t.t1,group_id:t.t2,group_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/update-user-in-group",form:u});case 10:return i=t.sent,t.abrupt("return",i);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteUserFromGroupApi",value:function(){var t=n(r().mark(function t(e,n){var o,u;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,user_id:t.t1,group_id:t.t2},t.next=9,this.req.post({url:"/api/sharing-group/delete-user-from-group",form:o});case 9:return u=t.sent,t.abrupt("return",u);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getGroupsByUserApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,user_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-groups-by-user",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()}]),t}();
236
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,u=o.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",p=a.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,u=Object.create(o.prototype),a=new A(n||[]);return i(u,"_invoke",{value:O(t,e,a)}),u}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",g="suspendedYield",y="executing",d="completed",m={};function b(){}function w(){}function x(){}var k={};l(k,c,function(){return this});var _=Object.getPrototypeOf,L=_&&_(_(q([])));L&&L!==o&&u.call(L,c)&&(k=L);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){l(t,r,function(t){return this._invoke(r,t)})})}function G(r,e){function n(o,i,a,c){var s=f(r[o],r,i);if("throw"!==s.type){var p=s.arg,l=p.value;return l&&"object"==t(l)&&u.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){p.value=t,a(p)},function(t){return n("throw",t,a,c)})}c(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function u(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(u,u):u()}})}function O(t,r,n){var o=v;return function(u,i){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===u)throw i;return{value:e,done:!0}}for(n.method=u,n.arg=i;;){var a=n.delegate;if(a){var c=T(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=f(t,r,n);if("normal"===s.type){if(o=n.done?d:g,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var u=f(o,t.iterator,r.arg);if("throw"===u.type)return r.method="throw",r.arg=u.arg,r.delegate=null,m;var i=u.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(u.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,i(E,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(G.prototype),l(G.prototype,s,function(){return this}),n.AsyncIterator=G,n.async=function(t,r,e,o,u){void 0===u&&(u=Promise);var i=new G(h(t,r,e,o),u);return n.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},j(E),l(E,p,"Generator"),l(E,c,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&u.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=u.call(i,"catchLoc"),s=u.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,u,i){try{var a=t[u](i),c=a.value}catch(s){return void e(s)}a.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=t.apply(r,n);function a(t){e(i,o,u,a,c,"next",t)}function c(t){e(i,o,u,a,c,"throw",t)}a(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function i(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(r){var e=c(r,"string");return"symbol"===t(e)?e:String(e)}function c(r,e){if("object"!==t(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupManager=void 0;var s=exports.GroupManager=function(){function t(r,e){o(this,t),this.req=e,this.gudhub=r}return i(t,[{key:"createGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_name:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/create-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateGroupApi",value:function(){var t=n(r().mark(function t(e,n){var o,u;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,o={token:t.t0,group_name:t.t1,group_id:t.t2},t.next=9,this.req.post({url:"/api/sharing-group/update-group",form:o});case 9:return u=t.sent,t.abrupt("return",u);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"deleteGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/delete-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addUserToGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var u,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,u={token:t.t0,group_id:t.t1,user_id:t.t2,group_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/add-user-to-group",form:u});case 10:return i=t.sent,t.abrupt("return",i);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getUsersByGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-users-by-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUserInGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var u,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,u={token:t.t0,user_id:t.t1,group_id:t.t2,group_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/update-user-in-group",form:u});case 10:return i=t.sent,t.abrupt("return",i);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteUserFromGroupApi",value:function(){var t=n(r().mark(function t(e,n){var o,u;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,user_id:t.t1,group_id:t.t2},t.next=9,this.req.post({url:"/api/sharing-group/delete-user-from-group",form:o});case 9:return u=t.sent,t.abrupt("return",u);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getGroupsByUserApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,user_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-groups-by-user",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()}]),t}();
253
237
  },{}],"Z7AV":[function(require,module,exports) {
254
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function b(){}function w(){}function x(){}var k={};f(k,c,function(){return this});var L=Object.getPrototypeOf,_=L&&L(L(N([])));_&&_!==o&&i.call(_,c)&&(k=_);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=h(r[o],r,a);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(f).then(function(t){p.value=t,u(p)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=v;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=G(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(t,r,n);if("normal"===s.type){if(o=n.done?d:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function G(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,G(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),f(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(l(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),f(E,p,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:String(e)}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppGroupSharing=void 0;var s=exports.AppGroupSharing=function(){function t(r,e){o(this,t),this.req=e,this.gudhub=r}return a(t,[{key:"addAppToGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,group_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/add-app-to-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getAppsByGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-apps-by-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAppInGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,t.t3=o,i={token:t.t0,group_id:t.t1,app_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/update-app-in-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteAppFromGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,t.t3=o,i={token:t.t0,group_id:t.t1,app_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/delete-app-from-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getGroupsByAppApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,app_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-groups-by-app",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()}]),t}();
238
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function f(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=f;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function b(){}function w(){}function x(){}var k={};l(k,c,function(){return this});var L=Object.getPrototypeOf,_=L&&L(L(N([])));_&&_!==o&&i.call(_,c)&&(k=_);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){l(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=h(r[o],r,a);if("throw"!==s.type){var p=s.arg,l=p.value;return l&&"object"==t(l)&&i.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(l).then(function(t){p.value=t,u(p)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=v;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=G(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(t,r,n);if("normal"===s.type){if(o=n.done?d:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function G(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,G(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(f(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),l(E,p,"Generator"),l(E,c,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"===t(e)?e:String(e)}function c(r,e){if("object"!==t(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppGroupSharing=void 0;var s=exports.AppGroupSharing=function(){function t(r,e){o(this,t),this.req=e,this.gudhub=r}return a(t,[{key:"addAppToGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,group_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/add-app-to-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getAppsByGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-apps-by-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAppInGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,t.t3=o,i={token:t.t0,group_id:t.t1,app_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/update-app-in-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteAppFromGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,t.t3=o,i={token:t.t0,group_id:t.t1,app_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/delete-app-from-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getGroupsByAppApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,app_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-groups-by-app",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()}]),t}();
255
239
  },{}],"LS0j":[function(require,module,exports) {
256
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupSharing=void 0;var t=require("../groupManager/GroupManager.js"),r=require("./AppGroupSharing.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(){n=function(){return r};var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",p=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:E(t,e,u)}),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",v="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function G(){}var x={};f(x,c,function(){return this});var _=Object.getPrototypeOf,L=_&&_(_(T([])));L&&L!==o&&i.call(L,c)&&(x=L);var S=G.prototype=w.prototype=Object.create(x);function A(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function k(t,r){function n(o,a,u,c){var p=l(t[o],t,a);if("throw"!==p.type){var s=p.arg,f=s.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(f).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(p.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function E(r,e,n){var o=y;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var p=l(r,e,n);if("normal"===p.type){if(o=n.done?d:v,p.arg===m)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=d,n.method="throw",n.arg=p.arg)}}}function j(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,j(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=l(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return b.prototype=G,a(S,"constructor",{value:G,configurable:!0}),a(G,"constructor",{value:b,configurable:!0}),b.displayName=f(G,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,G):(t.__proto__=G,f(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},A(k.prototype),f(k.prototype,p,function(){return this}),r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},A(S),f(S,s,"Generator"),f(S,c,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,M.prototype={constructor:M,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),p=i.call(a,"finallyLoc");if(c&&p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:T(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function o(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(p){return void e(p)}u.done?r(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var r=this,e=arguments;return new Promise(function(n,i){var a=t.apply(r,e);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)})}}function a(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function c(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var r=s(t,"string");return"symbol"==e(r)?r:String(r)}function s(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var f=exports.GroupSharing=function(){function e(n,o,i){a(this,e),this.req=o,this.gudhub=n,this.pipeService=i,this.groupManager=new t.GroupManager(n,o),this.appGroupSharing=new r.AppGroupSharing(n,o)}return c(e,[{key:"createGroup",value:function(t){return this.groupManager.createGroupApi(t)}},{key:"updateGroup",value:function(t,r){return this.groupManager.updateGroupApi(t,r)}},{key:"deleteGroup",value:function(t){return this.groupManager.deleteGroupApi(t)}},{key:"addUserToGroup",value:function(){var t=i(n().mark(function t(r,e,o){var i;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.addUserToGroupApi(r,e,o);case 2:return i=t.sent,this.pipeService.emit("group_members_add",{app_id:"group_sharing"},i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getUsersByGroup",value:function(t){return this.groupManager.getUsersByGroupApi(t)}},{key:"updateUserInGroup",value:function(){var t=i(n().mark(function t(r,e,o){var i;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.updateUserInGroupApi(r,e,o);case 2:return i=t.sent,this.pipeService.emit("group_members_update",{app_id:"group_sharing"},i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteUserFromGroup",value:function(){var t=i(n().mark(function t(r,e){var o;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.deleteUserFromGroupApi(r,e);case 2:return o=t.sent,this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},o),t.abrupt("return",o);case 5:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getGroupsByUser",value:function(t){return this.groupManager.getGroupsByUserApi(t)}},{key:"addAppToGroup",value:function(t,r,e){return this.appGroupSharing.addAppToGroupApi(t,r,e)}},{key:"getAppsByGroup",value:function(t){return this.appGroupSharing.getAppsByGroupApi(t)}},{key:"updateAppInGroup",value:function(t,r,e){return this.appGroupSharing.updateAppInGroupApi(t,r,e)}},{key:"deleteAppFromGroup",value:function(t,r,e){return this.appGroupSharing.deleteAppFromGroupApi(t,r,e)}},{key:"getGroupsByApp",value:function(t){return this.appGroupSharing.getGroupsByAppApi(t)}}]),e}();
240
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupSharing=void 0;var t=require("../groupManager/GroupManager.js"),r=require("./AppGroupSharing.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(){n=function(){return r};var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",p=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:E(t,e,u)}),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",v="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function G(){}var x={};f(x,c,function(){return this});var _=Object.getPrototypeOf,L=_&&_(_(T([])));L&&L!==o&&i.call(L,c)&&(x=L);var S=G.prototype=w.prototype=Object.create(x);function A(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function k(t,r){function n(o,a,u,c){var p=l(t[o],t,a);if("throw"!==p.type){var s=p.arg,f=s.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(f).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(p.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function E(r,e,n){var o=y;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var p=l(r,e,n);if("normal"===p.type){if(o=n.done?d:v,p.arg===m)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=d,n.method="throw",n.arg=p.arg)}}}function j(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,j(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=l(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return b.prototype=G,a(S,"constructor",{value:G,configurable:!0}),a(G,"constructor",{value:b,configurable:!0}),b.displayName=f(G,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,G):(t.__proto__=G,f(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},A(k.prototype),f(k.prototype,p,function(){return this}),r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},A(S),f(S,s,"Generator"),f(S,c,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,M.prototype={constructor:M,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),p=i.call(a,"finallyLoc");if(c&&p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:T(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function o(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(p){return void e(p)}u.done?r(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var r=this,e=arguments;return new Promise(function(n,i){var a=t.apply(r,e);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)})}}function a(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function c(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var r=s(t,"string");return"symbol"===e(r)?r:String(r)}function s(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var f=exports.GroupSharing=function(){function e(n,o,i){a(this,e),this.req=o,this.gudhub=n,this.pipeService=i,this.groupManager=new t.GroupManager(n,o),this.appGroupSharing=new r.AppGroupSharing(n,o)}return c(e,[{key:"createGroup",value:function(t){return this.groupManager.createGroupApi(t)}},{key:"updateGroup",value:function(t,r){return this.groupManager.updateGroupApi(t,r)}},{key:"deleteGroup",value:function(t){return this.groupManager.deleteGroupApi(t)}},{key:"addUserToGroup",value:function(){var t=i(n().mark(function t(r,e,o){var i;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.addUserToGroupApi(r,e,o);case 2:return i=t.sent,this.pipeService.emit("group_members_add",{app_id:"group_sharing"},i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getUsersByGroup",value:function(t){return this.groupManager.getUsersByGroupApi(t)}},{key:"updateUserInGroup",value:function(){var t=i(n().mark(function t(r,e,o){var i;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.updateUserInGroupApi(r,e,o);case 2:return i=t.sent,this.pipeService.emit("group_members_update",{app_id:"group_sharing"},i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteUserFromGroup",value:function(){var t=i(n().mark(function t(r,e){var o;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.deleteUserFromGroupApi(r,e);case 2:return o=t.sent,this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},o),t.abrupt("return",o);case 5:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getGroupsByUser",value:function(t){return this.groupManager.getGroupsByUserApi(t)}},{key:"addAppToGroup",value:function(t,r,e){return this.appGroupSharing.addAppToGroupApi(t,r,e)}},{key:"getAppsByGroup",value:function(t){return this.appGroupSharing.getAppsByGroupApi(t)}},{key:"updateAppInGroup",value:function(t,r,e){return this.appGroupSharing.updateAppInGroupApi(t,r,e)}},{key:"deleteAppFromGroup",value:function(t,r,e){return this.appGroupSharing.deleteAppFromGroupApi(t,r,e)}},{key:"getGroupsByApp",value:function(t){return this.appGroupSharing.getGroupsByAppApi(t)}}]),e}();
257
241
  },{"../groupManager/GroupManager.js":"qJXG","./AppGroupSharing.js":"Z7AV"}],"XaHW":[function(require,module,exports) {
258
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var k={};f(k,c,function(){return this});var L=Object.getPrototypeOf,_=L&&L(L(q([])));_&&_!==o&&i.call(_,c)&&(k=_);var E=x.prototype=w.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=p(r[o],r,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),f(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),f(E,l,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:String(e)}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sharing=void 0;var s=exports.Sharing=function(){function t(r,e){o(this,t),this.req=e,this.gudhub=r}return a(t,[{key:"add",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,user_id:t.t2,sharing_permission:t.t3},t.next=10,this.req.post({url:"/sharing/add",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,user_id:t.t2,sharing_permission:t.t3},t.next=10,this.req.post({url:"/sharing/update",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=n(r().mark(function t(e,n){var o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,app_id:t.t1,user_id:t.t2},t.next=9,this.req.post({url:"/sharing/delete",form:o});case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getAppUsers",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,app_id:t.t1},t.next=8,this.req.post({url:"/sharing/get-app-users",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addInvitation",value:function(){var t=n(r().mark(function t(e,n){var o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,guests_emails:t.t1,apps:t.t2},t.next=9,this.req.post({url:"/api/invitation/add",form:o});case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()}]),t}();
242
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var k={};f(k,c,function(){return this});var L=Object.getPrototypeOf,_=L&&L(L(q([])));_&&_!==o&&i.call(_,c)&&(k=_);var E=x.prototype=w.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=p(r[o],r,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),f(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),f(E,l,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void e(s)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"===t(e)?e:String(e)}function c(r,e){if("object"!==t(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sharing=void 0;var s=exports.Sharing=function(){function t(r,e){o(this,t),this.req=e,this.gudhub=r}return a(t,[{key:"add",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,user_id:t.t2,sharing_permission:t.t3},t.next=10,this.req.post({url:"/sharing/add",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,user_id:t.t2,sharing_permission:t.t3},t.next=10,this.req.post({url:"/sharing/update",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=n(r().mark(function t(e,n){var o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,app_id:t.t1,user_id:t.t2},t.next=9,this.req.post({url:"/sharing/delete",form:o});case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getAppUsers",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,app_id:t.t1},t.next=8,this.req.post({url:"/sharing/get-app-users",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addInvitation",value:function(){var t=n(r().mark(function t(e,n){var o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,guests_emails:t.t1,apps:t.t2},t.next=9,this.req.post({url:"/api/invitation/add",form:o});case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()}]),t}();
259
243
  },{}],"quyV":[function(require,module,exports) {
260
- "use strict";function t(){t=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:k(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var L={};l(L,c,function(){return this});var E=Object.getPrototypeOf,_=E&&E(E(F([])));_&&_!==o&&i.call(_,c)&&(L=_);var j=x.prototype=b.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){l(t,r,function(t){return this._invoke(r,t)})})}function S(t,e){function n(o,a,u,c){var f=p(t[o],t,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==r(l)&&i.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(l).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?m:v,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return w.prototype=x,a(j,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,f,function(){return this}),n.AsyncIterator=S,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(j),l(j,s,"Generator"),l(j,c,function(){return this}),l(j,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=F,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=c(t,"string");return"symbol"==r(e)?e:String(e)}function c(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketEmitter=void 0;var f=exports.WebSocketEmitter=function(){function e(t){o(this,e),this.gudhub=t}return a(e,[{key:"emitToUser",value:function(){var e=n(t().mark(function e(n,o){var i,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={user_id:n,data:"object"===r(o)?JSON.stringify(o):o},t.next=3,this.gudhub.req.post({url:"/ws/emit-to-user",form:i});case 3:return a=t.sent,t.abrupt("return",a);case 5:case"end":return t.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"broadcastToAppSubscribers",value:function(){var r=n(t().mark(function r(e,n,o){var i,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={app_id:e,data:JSON.stringify({data_type:n,data:o})},t.next=3,this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i});case 3:return a=t.sent,t.abrupt("return",a);case 5:case"end":return t.stop()}},r,this)}));return function(t,e,n){return r.apply(this,arguments)}}()}]),e}();
244
+ "use strict";function t(){t=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:k(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var L={};l(L,c,function(){return this});var E=Object.getPrototypeOf,_=E&&E(E(F([])));_&&_!==o&&i.call(_,c)&&(L=_);var j=x.prototype=b.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){l(t,r,function(t){return this._invoke(r,t)})})}function S(t,e){function n(o,a,u,c){var f=p(t[o],t,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==r(l)&&i.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(l).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?m:v,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return w.prototype=x,a(j,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,f,function(){return this}),n.AsyncIterator=S,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(j),l(j,s,"Generator"),l(j,c,function(){return this}),l(j,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=F,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=c(t,"string");return"symbol"===r(e)?e:String(e)}function c(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketEmitter=void 0;var f=exports.WebSocketEmitter=function(){function e(t){o(this,e),this.gudhub=t}return a(e,[{key:"emitToUser",value:function(){var e=n(t().mark(function e(n,o){var i,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={user_id:n,data:"object"===r(o)?JSON.stringify(o):o},t.next=3,this.gudhub.req.post({url:"/ws/emit-to-user",form:i});case 3:return a=t.sent,t.abrupt("return",a);case 5:case"end":return t.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"broadcastToAppSubscribers",value:function(){var r=n(t().mark(function r(e,n,o){var i,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={app_id:e,data:JSON.stringify({data_type:n,data:o})},t.next=3,this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i});case 3:return a=t.sent,t.abrupt("return",a);case 5:case"end":return t.stop()}},r,this)}));return function(t,e,n){return r.apply(this,arguments)}}()}]),e}();
261
245
  },{}],"wc2J":[function(require,module,exports) {
262
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function r(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(e){var r=n(e,"string");return"symbol"==t(r)?r:String(r)}function n(e,r){if("object"!=t(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,r||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataService=void 0;var u=exports.DataService=r(function t(){i(this,t)});
246
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function r(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(e){var r=n(e,"string");return"symbol"===t(r)?r:String(r)}function n(e,r){if("object"!==t(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,r||"default");if("object"!==t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataService=void 0;var u=exports.DataService=r(function t(){i(this,t)});
263
247
  },{}],"RQNC":[function(require,module,exports) {
264
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppDataService=void 0;var t=require("./DataService.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function o(t,e,o){return e&&r(t.prototype,e),o&&r(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(t){var r=i(t,"string");return"symbol"==e(r)?r:String(r)}function i(t,r){if("object"!=e(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,r||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e,r){return e=l(e),f(t,p()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}function f(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var s=exports.AppDataService=function(e){function r(){return u(this,r),c(this,r,arguments)}return y(r,t.DataService),o(r)}();
248
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppDataService=void 0;var t=require("./DataService.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var r=i(t,"string");return"symbol"===e(r)?r:String(r)}function i(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=y();return function(){var r,n=s(t);if(e){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=exports.AppDataService=function(e){c(o,t.DataService);var r=a(o);function o(){return u(this,o),r.apply(this,arguments)}return n(o)}();
265
249
  },{"./DataService.js":"wc2J"}],"VAmb":[function(require,module,exports) {
266
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunkDataService=void 0;var t=require("./DataService.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var r=i(t,"string");return"symbol"==e(r)?r:String(r)}function i(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e,r){return e=p(e),f(t,l()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function f(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}function b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var s=exports.ChunkDataService=function(e){function r(){return u(this,r),c(this,r,arguments)}return y(r,t.DataService),n(r)}();
250
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunkDataService=void 0;var t=require("./DataService.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var r=i(t,"string");return"symbol"===e(r)?r:String(r)}function i(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=y();return function(){var r,n=s(t);if(e){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=exports.ChunkDataService=function(e){c(o,t.DataService);var r=a(o);function o(){return u(this,o),r.apply(this,arguments)}return n(o)}();
267
251
  },{"./DataService.js":"wc2J"}],"PrkT":[function(require,module,exports) {
268
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(e){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var L={};s(L,c,function(){return this});var E=Object.getPrototypeOf,j=E&&E(E(A([])));j&&j!==o&&i.call(j,c)&&(L=j);var _=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function P(r,e){function n(o,a,u,c){var f=p(r[o],r,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==t(s)&&i.call(s,"__await")?e.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(s).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function G(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function A(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=s(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,s(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},O(P.prototype),s(P.prototype,f,function(){return this}),n.AsyncIterator=P,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new P(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(_),s(_,l,"Generator"),s(_,c,function(){return this}),s(_,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(G),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),G(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;G(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:String(e)}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppAPI=void 0;var f=exports.AppAPI=function(){function t(r){o(this,t),this.req=r}return a(t,[{key:"getApp",value:function(){var t=n(r().mark(function t(e){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.get({url:"".concat(this.req.root,"/api/app/get"),params:{app_id:e}}));case 1:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}]),t}();
252
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(e){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var L={};s(L,c,function(){return this});var E=Object.getPrototypeOf,j=E&&E(E(A([])));j&&j!==o&&i.call(j,c)&&(L=j);var _=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function P(r,e){function n(o,a,u,c){var f=p(r[o],r,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==t(s)&&i.call(s,"__await")?e.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(s).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function G(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function A(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=s(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,s(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},O(P.prototype),s(P.prototype,f,function(){return this}),n.AsyncIterator=P,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new P(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(_),s(_,l,"Generator"),s(_,c,function(){return this}),s(_,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(G),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),G(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;G(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"===t(e)?e:String(e)}function c(r,e){if("object"!==t(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppAPI=void 0;var f=exports.AppAPI=function(){function t(r){o(this,t),this.req=r}return a(t,[{key:"getApp",value:function(){var t=n(r().mark(function t(e){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.get({url:"".concat(this.req.root,"/api/app/get"),params:{app_id:e}}));case 1:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}]),t}();
269
253
  },{}],"hg0N":[function(require,module,exports) {
270
254
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.objectAssignWithoutOverride=exports.objectAssignWithOverride=exports.checkInstanceModifier=void 0;var e=exports.objectAssignWithoutOverride=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];for(var n=0,i=t;n<i.length;n++){var c=i[n];if(c)for(var a=0,s=Object.keys(c);a<s.length;a++){var v=s[a];if(!(v in e)){var f=Object.getOwnPropertyDescriptor(c,v);f.enumerable&&Object.defineProperty(e,v,f)}}}},r=exports.objectAssignWithOverride=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];for(var n=0,i=t;n<i.length;n++){var c=i[n];if(c)for(var a=0,s=Object.keys(c);a<s.length;a++){var v=s[a],f=Object.getOwnPropertyDescriptor(c,v);f.enumerable&&Object.defineProperty(e,v,f)}}},t=exports.checkInstanceModifier=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];for(var n=0,i=t;n<i.length;n++){var c=i[n];if(c)for(var a=0,s=Object.keys(c);a<s.length;a++){var v=s[a],f=Object.getOwnPropertyDescriptor(c,v);f.enumerable&&Object.defineProperty(e,v,f)}}};
271
255
  },{}],"t7L1":[function(require,module,exports) {
272
- "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function r(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(e){var r=n(e,"string");return"symbol"==t(r)?r:String(r)}function n(e,r){if("object"!=t(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,r||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpService=void 0;var u=exports.HttpService=r(function t(){i(this,t)});
256
+ "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function r(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(e){var r=n(e,"string");return"symbol"===t(r)?r:String(r)}function n(e,r){if("object"!==t(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,r||"default");if("object"!==t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpService=void 0;var u=exports.HttpService=r(function t(){i(this,t)});
273
257
  },{}],"gUcM":[function(require,module,exports) {
274
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppHttpService=void 0;var t=require("../../api/AppApi.js"),r=require("../AppDataService.js"),e=require("../utils.js"),n=require("./HttpService.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),c=new N(n||[]);return a(i,"_invoke",{value:P(t,e,c)}),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function j(){}var x={};s(x,u,function(){return this});var O=Object.getPrototypeOf,E=O&&O(O(G([])));E&&E!==e&&n.call(E,u)&&(x=E);var L=j.prototype=w.prototype=Object.create(x);function _(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function S(t,r){function e(i,a,c,u){var f=h(t[i],t,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==o(s)&&n.call(s,"__await")?r.resolve(s.__await).then(function(t){e("next",t,c,u)},function(t){e("throw",t,c,u)}):r.resolve(s).then(function(t){l.value=t,c(l)},function(t){return e("throw",t,c,u)})}u(f.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new r(function(r,o){e(t,n,r,o)})}return i=i?i.then(o,o):o()}})}function P(r,e,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=h(r,e,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function A(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,A(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function G(r){if(r||""===r){var e=r[u];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function e(){for(;++i<r.length;)if(n.call(r,i))return e.value=r[i],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(o(r)+" is not iterable")}return b.prototype=j,a(L,"constructor",{value:j,configurable:!0}),a(j,"constructor",{value:b,configurable:!0}),b.displayName=s(j,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},_(S.prototype),s(S.prototype,f,function(){return this}),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},_(L),s(L,l,"Generator"),s(L,u,function(){return this}),s(L,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=G,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function a(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(f){return void e(f)}c.done?r(u):Promise.resolve(u).then(n,o)}function c(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var i=t.apply(r,e);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)})}}function u(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function f(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function l(t,r,e){return r&&f(t.prototype,r),e&&f(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var r=p(t,"string");return"symbol"==o(r)?r:String(r)}function p(t,r){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function h(t,r,e){return r=d(r),y(t,v()?Reflect.construct(r,e||[],d(t).constructor):r.apply(t,e))}function y(t,r){if(r&&("object"===o(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(v=function(){return!!t})()}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&w(t,r)}function w(t,r){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t})(t,r)}var b=exports.AppHttpService=function(r,o){function a(r,o){var i;u(this,a),(i=h(this,a)).appApi=new t.AppAPI(r);var c=new n.HttpService(o);return(0,e.objectAssignWithOverride)(g(i),c),i}return m(a,r),l(a,[{key:"getApp",value:function(){var t=c(i().mark(function t(r){return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.appApi.getApp(r));case 1:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"putApp",value:function(){var t=c(i().mark(function t(r,e){return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}));return function(r,e){return t.apply(this,arguments)}}()}],[{key:o,value:function(t){return t instanceof a||t.chunkDataService instanceof n.HttpService}}]),a}(r.AppDataService,Symbol.hasInstance);
258
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppHttpService=void 0;var t=require("../../api/AppApi.js"),r=require("../AppDataService.js"),e=require("../utils.js"),n=require("./HttpService.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),c=new N(n||[]);return a(i,"_invoke",{value:P(t,e,c)}),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function j(){}var x={};s(x,u,function(){return this});var O=Object.getPrototypeOf,E=O&&O(O(G([])));E&&E!==e&&n.call(E,u)&&(x=E);var L=j.prototype=w.prototype=Object.create(x);function _(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function S(t,r){function e(i,a,c,u){var f=h(t[i],t,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==o(s)&&n.call(s,"__await")?r.resolve(s.__await).then(function(t){e("next",t,c,u)},function(t){e("throw",t,c,u)}):r.resolve(s).then(function(t){l.value=t,c(l)},function(t){return e("throw",t,c,u)})}u(f.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new r(function(r,o){e(t,n,r,o)})}return i=i?i.then(o,o):o()}})}function P(r,e,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=h(r,e,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function A(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,A(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function G(r){if(r||""===r){var e=r[u];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function e(){for(;++i<r.length;)if(n.call(r,i))return e.value=r[i],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(o(r)+" is not iterable")}return b.prototype=j,a(L,"constructor",{value:j,configurable:!0}),a(j,"constructor",{value:b,configurable:!0}),b.displayName=s(j,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},_(S.prototype),s(S.prototype,f,function(){return this}),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},_(L),s(L,l,"Generator"),s(L,u,function(){return this}),s(L,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=G,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function a(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(f){return void e(f)}c.done?r(u):Promise.resolve(u).then(n,o)}function c(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var i=t.apply(r,e);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)})}}function u(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function f(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function l(t,r,e){return r&&f(t.prototype,r),e&&f(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var r=p(t,"string");return"symbol"===o(r)?r:String(r)}function p(t,r){if("object"!==o(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function h(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&y(t,r)}function y(t,r){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t})(t,r)}function v(t){var r=m();return function(){var e,n=w(t);if(r){var o=w(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return d(this,e)}}function d(t,r){if(r&&("object"===o(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=exports.AppHttpService=function(r,o){h(f,r);var a=v(f);function f(r,o){var i;u(this,f),(i=a.call(this)).appApi=new t.AppAPI(r);var c=new n.HttpService(o);return(0,e.objectAssignWithOverride)(g(i),c),i}return l(f,[{key:"getApp",value:function(){var t=c(i().mark(function t(r){return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.appApi.getApp(r));case 1:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"putApp",value:function(){var t=c(i().mark(function t(r,e){return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}));return function(r,e){return t.apply(this,arguments)}}()}],[{key:o,value:function(t){return t instanceof f||t.chunkDataService instanceof n.HttpService}}]),f}(r.AppDataService,Symbol.hasInstance);
275
259
  },{"../../api/AppApi.js":"PrkT","../AppDataService.js":"RQNC","../utils.js":"hg0N","./HttpService.js":"t7L1"}],"vsBf":[function(require,module,exports) {
276
- "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function r(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var r=n(t,"string");return"symbol"==e(r)?r:String(r)}function n(t,r){if("object"!=e(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,r||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBService=void 0;var u=exports.IndexedDBService=r(function e(t){i(this,e),this.store=t.store,this.dbName=t.dbName,this.dbVersion=t.dbVersion});
260
+ "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function r(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var r=n(t,"string");return"symbol"===e(r)?r:String(r)}function n(t,r){if("object"!==e(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,r||"default");if("object"!==e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBService=void 0;var u=exports.IndexedDBService=r(function e(t){i(this,e),this.store=t.store,this.dbName=t.dbName,this.dbVersion=t.dbVersion});
277
261
  },{}],"YqNA":[function(require,module,exports) {
278
262
  var define;
279
- var t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBAppService=void 0;var e=require("../AppDataService.js"),r=require("../ChunkDataService.js"),n=require("../httpService/AppHttpService.js"),o=require("../utils.js"),i=require("./IndexedDBService.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){"use strict";c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:P(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",y="suspendedYield",d="executing",b="completed",g={};function m(){}function w(){}function x(){}var j={};l(j,u,function(){return this});var S=Object.getPrototypeOf,O=S&&S(S(T([])));O&&O!==r&&n.call(O,u)&&(j=O);var E=x.prototype=m.prototype=Object.create(j);function L(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function _(t,e){function r(o,i,c,u){var s=h(t[o],t,i);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==a(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,c,u)},function(t){r("throw",t,c,u)}):e.resolve(l).then(function(t){f.value=t,c(f)},function(t){return r("throw",t,c,u)})}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?b:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=x,o(E,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,s,function(){return this}),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(E),l(E,f,"Generator"),l(E,u,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function u(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)})}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function p(t,e,r){return e&&l(t.prototype,e),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=v(t,"string");return"symbol"==a(e)?e:String(e)}function v(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function y(t,e,r){return e=g(e),d(t,b()?Reflect.construct(e,r||[],g(t).constructor):e.apply(t,r))}function d(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&x(t,e)}function x(t,e){return(x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var j=exports.IndexedDBAppService=function(t,e){function r(t,e){var a;f(this,r),(a=y(this,r,[t,e])).dataService=new n.AppHttpService(t);var c=new i.IndexedDBService(e);return(0,o.objectAssignWithOverride)(m(a),c),a}return w(r,t),p(r,[{key:"getApp",value:function(){var t=s(c().mark(function t(e){var r,n,o,i,a,u=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(r=this.dataService.getApp(e)).then(function(t){return u.putApp(e,t)}),t.prev=2,t.next=5,this.openDatabase();case 5:return n=t.sent,o=n.transaction(this.store,"readonly"),i=o.objectStore(this.store),a=i.get(e),t.next=11,new Promise(function(t,e){a.onsuccess=function(r){var n=r.target.result;n||e(),n&&t(n)},a.onerror=e});case 11:return t.abrupt("return",t.sent);case 14:return t.prev=14,t.t0=t.catch(2),t.abrupt("return",r);case 17:case"end":return t.stop()}},t,this,[[2,14]])}));return function(e){return t.apply(this,arguments)}}()},{key:"putApp",value:function(){var t=s(c().mark(function t(e,r){var n,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.openDatabase();case 3:n=t.sent,o=n.transaction(this.store,"readwrite"),o.objectStore(this.store).put(r,e),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}},t,this,[[0,9]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"openDatabase",value:function(){var t=s(c().mark(function t(){var e=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){var n=indexedDB.open(e.dbName,e.dbVersion);n.onsuccess=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)}}));case 1:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()}],[{key:e,value:function(t){return t instanceof i.IndexedDBService||t.chunkDataService instanceof r}}]),r}(e.AppDataService,Symbol.hasInstance);
263
+ var t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBAppService=void 0;var e=require("../AppDataService.js"),r=require("../ChunkDataService.js"),n=require("../httpService/AppHttpService.js"),o=require("../utils.js"),i=require("./IndexedDBService.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){"use strict";c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:P(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",y="suspendedYield",d="executing",b="completed",g={};function m(){}function w(){}function x(){}var j={};l(j,u,function(){return this});var S=Object.getPrototypeOf,O=S&&S(S(T([])));O&&O!==r&&n.call(O,u)&&(j=O);var E=x.prototype=m.prototype=Object.create(j);function L(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function _(t,e){function r(o,i,c,u){var s=h(t[o],t,i);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==a(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,c,u)},function(t){r("throw",t,c,u)}):e.resolve(l).then(function(t){f.value=t,c(f)},function(t){return r("throw",t,c,u)})}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?b:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=x,o(E,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,s,function(){return this}),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(E),l(E,f,"Generator"),l(E,u,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function u(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)})}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function p(t,e,r){return e&&l(t.prototype,e),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=v(t,"string");return"symbol"===a(e)?e:String(e)}function v(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function d(t,e){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function b(t){var e=w();return function(){var r,n=x(t);if(e){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}function g(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var j=exports.IndexedDBAppService=function(t,e){y(a,t);var r=b(a);function a(t,e){var c;f(this,a),(c=r.call(this,t,e)).dataService=new n.AppHttpService(t);var u=new i.IndexedDBService(e);return(0,o.objectAssignWithOverride)(m(c),u),c}return p(a,[{key:"getApp",value:function(){var t=s(c().mark(function t(e){var r,n,o,i,a,u=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(r=this.dataService.getApp(e)).then(function(t){return u.putApp(e,t)}),t.prev=2,t.next=5,this.openDatabase();case 5:return n=t.sent,o=n.transaction(this.store,"readonly"),i=o.objectStore(this.store),a=i.get(e),t.next=11,new Promise(function(t,e){a.onsuccess=function(r){var n=r.target.result;n||e(),n&&t(n)},a.onerror=e});case 11:return t.abrupt("return",t.sent);case 14:return t.prev=14,t.t0=t.catch(2),t.abrupt("return",r);case 17:case"end":return t.stop()}},t,this,[[2,14]])}));return function(e){return t.apply(this,arguments)}}()},{key:"putApp",value:function(){var t=s(c().mark(function t(e,r){var n,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.openDatabase();case 3:n=t.sent,o=n.transaction(this.store,"readwrite"),o.objectStore(this.store).put(r,e),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}},t,this,[[0,9]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"openDatabase",value:function(){var t=s(c().mark(function t(){var e=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){var n=indexedDB.open(e.dbName,e.dbVersion);n.onsuccess=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)}}));case 1:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()}],[{key:e,value:function(t){return t instanceof i.IndexedDBService||t.chunkDataService instanceof a}}]),a}(e.AppDataService,Symbol.hasInstance);
280
264
  },{"../AppDataService.js":"RQNC","../ChunkDataService.js":"VAmb","../httpService/AppHttpService.js":"gUcM","../utils.js":"hg0N","./IndexedDBService.js":"vsBf"}],"Q7LR":[function(require,module,exports) {
281
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunkHttpService=void 0;var t=require("../../api/ChunkApi.js"),r=require("../ChunkDataService.js"),e=require("../utils.js"),n=require("./HttpService.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function j(){}var O={};s(O,c,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(G([])));E&&E!==e&&n.call(E,c)&&(O=E);var L=j.prototype=b.prototype=Object.create(O);function k(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function _(t,r){function e(i,a,u,c){var f=p(t[i],t,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==o(s)&&n.call(s,"__await")?r.resolve(s.__await).then(function(t){e("next",t,u,c)},function(t){e("throw",t,u,c)}):r.resolve(s).then(function(t){l.value=t,u(l)},function(t){return e("throw",t,u,c)})}c(f.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new r(function(r,o){e(t,n,r,o)})}return i=i?i.then(o,o):o()}})}function S(r,e,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(r,e,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function P(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,P(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function C(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function G(r){if(r||""===r){var e=r[c];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function e(){for(;++i<r.length;)if(n.call(r,i))return e.value=r[i],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(o(r)+" is not iterable")}return w.prototype=j,a(L,"constructor",{value:j,configurable:!0}),a(j,"constructor",{value:w,configurable:!0}),w.displayName=s(j,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},k(_.prototype),s(_.prototype,f,function(){return this}),r.AsyncIterator=_,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new _(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(L),s(L,l,"Generator"),s(L,c,function(){return this}),s(L,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=G,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function a(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var i=t.apply(r,e);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)})}}function c(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function f(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function l(t,r,e){return r&&f(t.prototype,r),e&&f(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var r=h(t,"string");return"symbol"==o(r)?r:String(r)}function h(t,r){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function p(t,r,e){return r=d(r),y(t,v()?Reflect.construct(r,e||[],d(t).constructor):r.apply(t,e))}function y(t,r){if(r&&("object"===o(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(v=function(){return!!t})()}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&b(t,r)}function b(t,r){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t})(t,r)}var w=exports.ChunkHttpService=function(r,o){function a(r,o){var i;c(this,a),(i=p(this,a)).chunkApi=new t.ChunkAPI(r);var u=new n.HttpService(o);return(0,e.objectAssignWithOverride)(g(i),u),i}return m(a,r),l(a,[{key:"getChunk",value:function(){var t=u(i().mark(function t(r,e){return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.chunkApi.getChunk(r,e));case 1:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"putChunk",value:function(){}}],[{key:o,value:function(t){return t instanceof a||t.chunkDataService instanceof n.HttpService}}]),a}(r.ChunkDataService,Symbol.hasInstance);
265
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunkHttpService=void 0;var t=require("../../api/ChunkApi.js"),r=require("../ChunkDataService.js"),e=require("../utils.js"),n=require("./HttpService.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){i=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function j(){}var x={};s(x,c,function(){return this});var O=Object.getPrototypeOf,E=O&&O(O(G([])));E&&E!==e&&n.call(E,c)&&(x=E);var L=j.prototype=b.prototype=Object.create(x);function k(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function _(t,r){function e(i,a,u,c){var f=p(t[i],t,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==o(s)&&n.call(s,"__await")?r.resolve(s.__await).then(function(t){e("next",t,u,c)},function(t){e("throw",t,u,c)}):r.resolve(s).then(function(t){l.value=t,u(l)},function(t){return e("throw",t,u,c)})}c(f.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new r(function(r,o){e(t,n,r,o)})}return i=i?i.then(o,o):o()}})}function S(r,e,n){var o=y;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(r,e,n);if("normal"===f.type){if(o=n.done?g:v,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=g,n.method="throw",n.arg=f.arg)}}}function P(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,P(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function C(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function G(r){if(r||""===r){var e=r[c];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function e(){for(;++i<r.length;)if(n.call(r,i))return e.value=r[i],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(o(r)+" is not iterable")}return w.prototype=j,a(L,"constructor",{value:j,configurable:!0}),a(j,"constructor",{value:w,configurable:!0}),w.displayName=s(j,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},k(_.prototype),s(_.prototype,f,function(){return this}),r.AsyncIterator=_,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new _(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(L),s(L,l,"Generator"),s(L,c,function(){return this}),s(L,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=G,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function a(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var i=t.apply(r,e);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)})}}function c(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function f(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function l(t,r,e){return r&&f(t.prototype,r),e&&f(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var r=h(t,"string");return"symbol"===o(r)?r:String(r)}function h(t,r){if("object"!==o(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function p(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&y(t,r)}function y(t,r){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t})(t,r)}function v(t){var r=m();return function(){var e,n=b(t);if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return d(this,e)}}function d(t,r){if(r&&("object"===o(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=exports.ChunkHttpService=function(r,o){p(f,r);var a=v(f);function f(r,o){var i;c(this,f),(i=a.call(this)).chunkApi=new t.ChunkAPI(r);var u=new n.HttpService(o);return(0,e.objectAssignWithOverride)(g(i),u),i}return l(f,[{key:"getChunk",value:function(){var t=u(i().mark(function t(r,e){return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.chunkApi.getChunk(r,e));case 1:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"putChunk",value:function(){}}],[{key:o,value:function(t){return t instanceof f||t.chunkDataService instanceof n.HttpService}}]),f}(r.ChunkDataService,Symbol.hasInstance);
282
266
  },{"../../api/ChunkApi.js":"baS4","../ChunkDataService.js":"VAmb","../utils.js":"hg0N","./HttpService.js":"t7L1"}],"KFHD":[function(require,module,exports) {
283
267
  var define;
284
- var t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBChunkService=void 0;var e=require("../ChunkDataService.js"),r=require("../httpService/ChunkHttpService.js"),n=require("../utils.js"),o=require("./IndexedDBService.js");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){"use strict";a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new N(n||[]);return o(a,"_invoke",{value:_(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",b="completed",g={};function m(){}function w(){}function x(){}var j={};l(j,c,function(){return this});var O=Object.getPrototypeOf,S=O&&O(O(T([])));S&&S!==r&&n.call(S,c)&&(j=S);var k=x.prototype=m.prototype=Object.create(j);function E(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function L(t,e){function r(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==i(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,u,c)},function(t){r("throw",t,u,c)}):e.resolve(l).then(function(t){f.value=t,u(f)},function(t){return r("throw",t,u,c)})}c(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?b:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},E(L.prototype),l(L.prototype,s,function(){return this}),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(k),l(k,f,"Generator"),l(k,c,function(){return this}),l(k,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function l(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=p(t,"string");return"symbol"==i(e)?e:String(e)}function p(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function v(t,e,r){return e=b(e),y(t,d()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r))}function y(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&w(t,e)}function w(t,e){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var x=exports.IndexedDBChunkService=function(t,e){function i(t,e){var a;s(this,i),(a=v(this,i,[t,e])).dataService=new r.ChunkHttpService(t);var u=new o.IndexedDBService(e);return(0,n.objectAssignWithOverride)(g(a),u),a}return m(i,t),l(i,[{key:"putChunk",value:function(){var t=c(a().mark(function t(e,r){var n,o;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.openDatabase();case 3:n=t.sent,o=n.transaction(this.store,"readwrite"),o.objectStore(this.store).put(r,e),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}},t,this,[[0,9]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getChunk",value:function(){var t=c(a().mark(function t(e,r){var n,o,i,u,c;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.openDatabase();case 3:return n=t.sent,o=n.transaction(this.store,"readonly"),i=o.objectStore(this.store),u=i.get(r),t.next=9,new Promise(function(t,e){u.onsuccess=function(r){var n=r.target.result;n||e(),n&&t(n)},u.onerror=e});case 9:return t.abrupt("return",t.sent);case 12:return t.prev=12,t.t0=t.catch(0),t.next=16,this.dataService.getChunk(e,r);case 16:return c=t.sent,t.next=19,this.putChunk(r,c);case 19:return t.abrupt("return",c);case 20:case"end":return t.stop()}},t,this,[[0,12]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"openDatabase",value:function(){var t=c(a().mark(function t(){var e=this;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){var n=indexedDB.open(e.dbName,e.dbVersion);n.onsuccess=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)}}));case 1:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()}],[{key:e,value:function(t){return t instanceof o.IndexedDBService||t.chunkDataService instanceof i}}]),i}(e.ChunkDataService,Symbol.hasInstance);
268
+ var t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBChunkService=void 0;var e=require("../ChunkDataService.js"),r=require("../httpService/ChunkHttpService.js"),n=require("../utils.js"),o=require("./IndexedDBService.js");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){"use strict";a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),u=new N(n||[]);return o(a,"_invoke",{value:_(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",b="completed",g={};function m(){}function w(){}function x(){}var j={};l(j,c,function(){return this});var O=Object.getPrototypeOf,S=O&&O(O(T([])));S&&S!==r&&n.call(S,c)&&(j=S);var k=x.prototype=m.prototype=Object.create(j);function E(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function L(t,e){function r(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==i(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,u,c)},function(t){r("throw",t,u,c)}):e.resolve(l).then(function(t){f.value=t,u(f)},function(t){return r("throw",t,u,c)})}c(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?b:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},E(L.prototype),l(L.prototype,s,function(){return this}),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(k),l(k,f,"Generator"),l(k,c,function(){return this}),l(k,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function l(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=p(t,"string");return"symbol"===i(e)?e:String(e)}function p(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=m();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b(this,r)}}function b(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var x=exports.IndexedDBChunkService=function(t,e){v(u,t);var i=d(u);function u(t,e){var a;s(this,u),(a=i.call(this,t,e)).dataService=new r.ChunkHttpService(t);var c=new o.IndexedDBService(e);return(0,n.objectAssignWithOverride)(g(a),c),a}return l(u,[{key:"putChunk",value:function(){var t=c(a().mark(function t(e,r){var n,o;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.openDatabase();case 3:n=t.sent,o=n.transaction(this.store,"readwrite"),o.objectStore(this.store).put(r,e),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}},t,this,[[0,9]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getChunk",value:function(){var t=c(a().mark(function t(e,r){var n,o,i,u,c;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.openDatabase();case 3:return n=t.sent,o=n.transaction(this.store,"readonly"),i=o.objectStore(this.store),u=i.get(r),t.next=9,new Promise(function(t,e){u.onsuccess=function(r){var n=r.target.result;n||e(),n&&t(n)},u.onerror=e});case 9:return t.abrupt("return",t.sent);case 12:return t.prev=12,t.t0=t.catch(0),t.next=16,this.dataService.getChunk(e,r);case 16:return c=t.sent,t.next=19,this.putChunk(r,c);case 19:return t.abrupt("return",c);case 20:case"end":return t.stop()}},t,this,[[0,12]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"openDatabase",value:function(){var t=c(a().mark(function t(){var e=this;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){var n=indexedDB.open(e.dbName,e.dbVersion);n.onsuccess=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)}}));case 1:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()}],[{key:e,value:function(t){return t instanceof o.IndexedDBService||t.chunkDataService instanceof u}}]),u}(e.ChunkDataService,Symbol.hasInstance);
285
269
  },{"../ChunkDataService.js":"VAmb","../httpService/ChunkHttpService.js":"Q7LR","../utils.js":"hg0N","./IndexedDBService.js":"vsBf"}],"QBs9":[function(require,module,exports) {
286
270
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.dbVersion=exports.dbName=void 0;var e=exports.dbName="gudhub",r=exports.dbVersion=7;
287
271
  },{}],"NKir":[function(require,module,exports) {
@@ -293,7 +277,7 @@ var t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.IndexedDBCh
293
277
  },{"../../consts.js":"UV2u","./appDataConf.js":"NKir","./chunkDataConf.js":"YaEO","./consts.js":"QBs9"}],"F1EO":[function(require,module,exports) {
294
278
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.chunkDataServiceConf=exports.appDataServiceConf=exports.ChunkDataService=exports.AppDataService=void 0;var e,r,t,p,i=require("../config.js"),a=require("../consts.js"),c=require("./IndexedDB/IndexedDBAppService.js"),n=require("./IndexedDB/IndexedDBChunkService.js"),s=require("./IndexedDB/appDataConf.js"),u=require("./IndexedDB/chunkDataConf.js"),o=require("./httpService/AppHttpService.js"),v=require("./httpService/ChunkHttpService.js");require("./IndexedDB/init.js"),a.IS_WEB&&i.cache_chunk_requests?(exports.ChunkDataService=r=n.IndexedDBChunkService,exports.chunkDataServiceConf=p=u.chunksConf):exports.ChunkDataService=r=v.ChunkHttpService,a.IS_WEB&&i.cache_app_requests?(exports.AppDataService=e=c.IndexedDBAppService,exports.appDataServiceConf=t=s.appsConf):exports.AppDataService=e=o.AppHttpService;
295
279
  },{"../config.js":"TPH7","../consts.js":"UV2u","./IndexedDB/IndexedDBAppService.js":"YqNA","./IndexedDB/IndexedDBChunkService.js":"KFHD","./IndexedDB/appDataConf.js":"NKir","./IndexedDB/chunkDataConf.js":"YaEO","./httpService/AppHttpService.js":"gUcM","./httpService/ChunkHttpService.js":"Q7LR","./IndexedDB/init.js":"BtEV"}],"U9gy":[function(require,module,exports) {
296
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHub=void 0;var e=require("./gudhub-https-service.js"),t=require("./PipeService/PipeService.js"),r=require("./Storage/Storage.js"),n=require("./WebSocket/WebSocket.js"),i=require("./config.js"),o=require("./Utils/Utils.js"),u=require("./Auth/Auth.js"),a=require("./GHConstructor/ghconstructor.js"),s=require("./AppProcessor/AppProcessor.js"),c=require("./ItemProcessor/ItemProcessor.js"),l=require("./FieldProcessor/FieldProcessor.js"),h=require("./FileManager/FileManager.js"),p=require("./ChunksManager/ChunksManager.js"),f=require("./DocumentManager/DocumentManager.js"),d=require("./GHConstructor/interpritate.js"),v=require("./consts.js"),g=require("./WebSocket/WebsocketHandler.js"),y=require("./Utils/sharing/GroupSharing.js"),m=require("./Utils/sharing/Sharing.js"),k=require("./WebSocket/WebSocketEmitter.js"),w=require("./DataService/export.js");function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,u=Object.create(o.prototype),a=new W(n||[]);return i(u,"_invoke",{value:j(e,r,a)}),u}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",f="suspendedYield",d="executing",v="completed",g={};function y(){}function m(){}function k(){}var w={};c(w,u,function(){return this});var P=Object.getPrototypeOf,_=P&&P(P(E([])));_&&_!==r&&n.call(_,u)&&(w=_);var F=k.prototype=y.prototype=Object.create(w);function x(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){function r(i,o,u,a){var s=h(e[i],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==b(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,u,a)},function(e){r("throw",e,u,a)}):t.resolve(l).then(function(e){c.value=e,u(c)},function(e){return r("throw",e,u,a)})}a(s.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,i){r(e,n,t,i)})}return o=o?o.then(i,i):i()}})}function j(t,r,n){var i=p;return function(o,u){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var a=n.delegate;if(a){var s=L(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?v:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function L(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function q(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function W(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(q,this),this.reset(!0)}function E(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(b(t)+" is not iterable")}return m.prototype=k,i(F,"constructor",{value:k,configurable:!0}),i(k,"constructor",{value:m,configurable:!0}),m.displayName=c(k,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,c(e,s,"GeneratorFunction")),e.prototype=Object.create(F),e},t.awrap=function(e){return{__await:e}},x(I.prototype),c(I.prototype,a,function(){return this}),t.AsyncIterator=I,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new I(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},x(F),c(F,s,"Generator"),c(F,u,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,W.prototype={constructor:W,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var s=n.call(u,"catchLoc"),c=n.call(u,"finallyLoc");if(s&&c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function P(e,t,r,n,i,o,u){try{var a=e[o](u),s=a.value}catch(c){return void r(c)}a.done?t(s):Promise.resolve(s).then(n,i)}function _(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){P(o,n,i,u,a,"next",e)}function a(e){P(o,n,i,u,a,"throw",e)}u(void 0)})}}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j(n.key),n)}}function I(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function j(e){var t=L(e,"string");return"symbol"==b(t)?t:String(t)}function L(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var q=exports.GudHub=function(){function b(v){var S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{server_url:i.server_url,wss_url:i.wss_url,node_server_url:i.node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:i.async_modules_path,file_server_url:i.file_server_url,automation_modules_path:i.automation_modules_path};if(F(this,b),this.config=S,this.ghconstructor=new a.GHConstructor(this),this.interpritate=new d.Interpritate(this),this.pipeService=new t.PipeService,this.storage=new r.Storage(S.async_modules_path,S.file_server_url,S.automation_modules_path),this.util=new o.Utils(this),this.req=new e.GudHubHttpsService(S.server_url),this.auth=new u.Auth(this.req,this.storage),this.sharing=new m.Sharing(this,this.req),this.groupSharing=new y.GroupSharing(this,this.req,this.pipeService),v&&this.storage.setUser({auth_key:v}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new n.WebSocketApi(S.wss_url,this.auth),this.chunksManager=new p.ChunksManager(this.storage,this.pipeService,this.req,this.util,new w.ChunkDataService(this.req,w.chunkDataServiceConf)),this.appProcessor=new s.AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,S.activateSW,new w.AppDataService(this.req,w.appDataServiceConf)),this.itemProcessor=new c.ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new l.FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new h.FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new f.DocumentManager(this.req,this.pipeService),this.websocketsemitter=new k.WebSocketEmitter(this),S.initWebsocket){this.ws.initWebSocket(g.WebsocketHandler.bind(this,this),this.appProcessor.refreshApps.bind(this.appProcessor))}S.activateSW&&this.activateSW(S.swLink)}return I(b,[{key:"activateSW",value:function(){var e=_(S().mark(function e(t){var r;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(v.IS_WEB&&"serviceWorker"in window.navigator)){e.next=14;break}return e.prev=1,e.next=4,window.navigator.serviceWorker.register(t);case 4:(r=e.sent).update().then(function(){return console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}).catch(function(){return console.warn("SW ->>> Service worker is not updated")}),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",e.t0);case 12:e.next=15;break;case 14:console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;");case 15:case"end":return e.stop()}},e,null,[[1,9]])}));return function(t){return e.apply(this,arguments)}}()},{key:"on",value:function(e,t,r){return this.pipeService.on(e,t,r),this}},{key:"emit",value:function(e,t,r,n){return this.pipeService.emit(e,t,r,n),this}},{key:"destroy",value:function(e,t,r){return this.pipeService.destroy(e,t,r),this}},{key:"prefilter",value:function(e,t){return this.util.prefilter(e,t)}},{key:"debounce",value:function(e,t){return this.util.debounce(e,t)}},{key:"emitToUser",value:function(e,t){return this.websocketsemitter.emitToUser(e,t)}},{key:"broadcastToAppSubscribers",value:function(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}},{key:"getInterpretation",value:function(e,t,r,n,i,o,u){return this.interpritate.getInterpretation(e,t,r,n,i,o,u)}},{key:"getInterpretationById",value:function(e,t,r,n,i,o){return this.interpritate.getInterpretationById(e,t,r,n,i,o)}},{key:"filter",value:function(e,t){return this.util.filter(e,t)}},{key:"mergeFilters",value:function(e,t){return this.util.mergeFilters(e,t)}},{key:"group",value:function(e,t){return this.util.group(e,t)}},{key:"getFilteredItems",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}},{key:"sortItems",value:function(e,t){return this.util.sortItems(e,t)}},{key:"jsonToItems",value:function(e,t){return this.util.jsonToItems(e,t)}},{key:"getDate",value:function(e){return this.util.getDate(e)}},{key:"populateWithDate",value:function(e,t){return this.util.populateWithDate(e,t)}},{key:"checkRecurringDate",value:function(e,t){return this.util.checkRecurringDate(e,t)}},{key:"populateItems",value:function(e,t,r){return this.util.populateItems(e,t,r)}},{key:"populateWithItemRef",value:function(e,t,r,n,i,o){return this.util.populateWithItemRef(e,t,r,n,i,o)}},{key:"compareItems",value:function(e,t,r){return this.util.compareItems(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return this.util.mergeItems(e,t,r)}},{key:"mergeObjects",value:function(e,t){return this.util.mergeObjects(e,t)}},{key:"makeNestedList",value:function(e,t,r,n,i){return this.util.makeNestedList(e,t,r,n,i)}},{key:"jsonConstructor",value:function(e,t,r,n){return this.util.jsonConstructor(e,t,r,n)}},{key:"getAppsList",value:function(){return this.appProcessor.getAppsList()}},{key:"getAppInfo",value:function(e){return this.appProcessor.getAppInfo(e)}},{key:"deleteApp",value:function(e){return this.appProcessor.deleteApp(e)}},{key:"getApp",value:function(e){return this.appProcessor.getApp(e)}},{key:"updateApp",value:function(e){return this.appProcessor.updateApp(e)}},{key:"updateAppInfo",value:function(e){return this.appProcessor.updateAppInfo(e)}},{key:"createNewApp",value:function(e){return this.appProcessor.createNewApp(e)}},{key:"getItems",value:function(e){return this.itemProcessor.getItems(e)}},{key:"getItem",value:function(){var e=_(S().mark(function e(t,r){var n;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItems(t);case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.find(function(e){return e.item_id==r}));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(e,t){return this.itemProcessor.addNewItems(e,t)}},{key:"updateItems",value:function(e,t){return this.itemProcessor.updateItems(e,t)}},{key:"deleteItems",value:function(e,t){return this.itemProcessor.deleteItems(e,t)}},{key:"getField",value:function(e,t){return this.fieldProcessor.getField(e,t)}},{key:"getFieldIdByNameSpace",value:function(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}},{key:"getFieldModels",value:function(e){return this.fieldProcessor.getFieldModels(e)}},{key:"updateField",value:function(e,t){return this.fieldProcessor.updateField(e,t)}},{key:"deleteField",value:function(e,t){return this.fieldProcessor.deleteField(e,t)}},{key:"getFieldValue",value:function(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}},{key:"setFieldValue",value:function(e,t,r,n){return this.fieldProcessor.setFieldValue(e,t,r,n)}},{key:"getFile",value:function(e,t){return this.fileManager.getFile(e,t)}},{key:"getFiles",value:function(e,t){return this.fileManager.getFiles(e,t)}},{key:"uploadFile",value:function(e,t,r){return this.fileManager.uploadFile(e,t,r)}},{key:"uploadFileFromString",value:function(e,t,r,n,i,o,u){return this.fileManager.uploadFileFromString(e,t,r,n,i,o,u)}},{key:"updateFileFromString",value:function(e,t,r,n,i){return this.fileManager.updateFileFromString(e,t,r,n,i)}},{key:"deleteFile",value:function(e,t){return this.fileManager.deleteFile(e,t)}},{key:"duplicateFile",value:function(e){return this.fileManager.duplicateFile(e)}},{key:"downloadFileFromString",value:function(e,t){return this.fileManager.downloadFileFromString(e,t)}},{key:"createDocument",value:function(e){return this.documentManager.createDocument(e)}},{key:"getDocument",value:function(e){return this.documentManager.getDocument(e)}},{key:"getDocuments",value:function(e){return this.documentManager.getDocuments(e)}},{key:"deleteDocument",value:function(e){return this.documentManager.deleteDocument(e)}},{key:"login",value:function(e){return this.auth.login(e)}},{key:"logout",value:function(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}},{key:"signup",value:function(e){return this.auth.signup(e)}},{key:"getUsersList",value:function(e){return this.auth.getUsersList(e)}},{key:"updateToken",value:function(e){return this.auth.updateToken(e)}},{key:"avatarUploadApi",value:function(e){return this.auth.avatarUploadApi(e)}},{key:"getVersion",value:function(){return this.auth.getVersion()}},{key:"getUserById",value:function(e){return this.auth.getUserById(e)}},{key:"getToken",value:function(){return this.auth.getToken()}},{key:"updateUser",value:function(e){return this.auth.updateUser(e)}},{key:"updateAvatar",value:function(e){return this.auth.updateAvatar(e)}}]),b}();
280
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHub=void 0;var e=require("./gudhub-https-service.js"),t=require("./PipeService/PipeService.js"),r=require("./Storage/Storage.js"),n=require("./WebSocket/WebSocket.js"),i=require("./config.js"),o=require("./Utils/Utils.js"),u=require("./Auth/Auth.js"),a=require("./GHConstructor/ghconstructor.js"),s=require("./AppProcessor/AppProcessor.js"),c=require("./ItemProcessor/ItemProcessor.js"),l=require("./FieldProcessor/FieldProcessor.js"),h=require("./FileManager/FileManager.js"),p=require("./ChunksManager/ChunksManager.js"),f=require("./DocumentManager/DocumentManager.js"),d=require("./GHConstructor/interpritate.js"),v=require("./consts.js"),g=require("./WebSocket/WebsocketHandler.js"),y=require("./Utils/sharing/GroupSharing.js"),m=require("./Utils/sharing/Sharing.js"),k=require("./WebSocket/WebSocketEmitter.js"),w=require("./DataService/export.js");function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,u=Object.create(o.prototype),a=new W(n||[]);return i(u,"_invoke",{value:j(e,r,a)}),u}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",f="suspendedYield",d="executing",v="completed",g={};function y(){}function m(){}function k(){}var w={};c(w,u,function(){return this});var P=Object.getPrototypeOf,x=P&&P(P(E([])));x&&x!==r&&n.call(x,u)&&(w=x);var _=k.prototype=y.prototype=Object.create(w);function F(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){function r(i,o,u,a){var s=h(e[i],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==b(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,u,a)},function(e){r("throw",e,u,a)}):t.resolve(l).then(function(e){c.value=e,u(c)},function(e){return r("throw",e,u,a)})}a(s.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,i){r(e,n,t,i)})}return o=o?o.then(i,i):i()}})}function j(t,r,n){var i=p;return function(o,u){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var a=n.delegate;if(a){var s=L(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?v:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function L(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function q(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function W(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(q,this),this.reset(!0)}function E(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(b(t)+" is not iterable")}return m.prototype=k,i(_,"constructor",{value:k,configurable:!0}),i(k,"constructor",{value:m,configurable:!0}),m.displayName=c(k,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,c(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},F(I.prototype),c(I.prototype,a,function(){return this}),t.AsyncIterator=I,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new I(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},F(_),c(_,s,"Generator"),c(_,u,function(){return this}),c(_,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,W.prototype={constructor:W,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var s=n.call(u,"catchLoc"),c=n.call(u,"finallyLoc");if(s&&c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function P(e,t,r,n,i,o,u){try{var a=e[o](u),s=a.value}catch(c){return void r(c)}a.done?t(s):Promise.resolve(s).then(n,i)}function x(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){P(o,n,i,u,a,"next",e)}function a(e){P(o,n,i,u,a,"throw",e)}u(void 0)})}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j(n.key),n)}}function I(e,t,r){return t&&F(e.prototype,t),r&&F(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function j(e){var t=L(e,"string");return"symbol"===b(t)?t:String(t)}function L(e,t){if("object"!==b(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var q=exports.GudHub=function(){function b(v){var S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{server_url:i.server_url,wss_url:i.wss_url,node_server_url:i.node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:i.async_modules_path,file_server_url:i.file_server_url,automation_modules_path:i.automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};if(_(this,b),this.config=S,this.ghconstructor=new a.GHConstructor(this),this.interpritate=new d.Interpritate(this),this.pipeService=new t.PipeService,this.storage=new r.Storage(S.async_modules_path,S.file_server_url,S.automation_modules_path),this.util=new o.Utils(this),this.req=new e.GudHubHttpsService(S.server_url),this.auth=new u.Auth(this.req,this.storage),this.sharing=new m.Sharing(this,this.req),this.groupSharing=new y.GroupSharing(this,this.req,this.pipeService),v?this.storage.setUser({auth_key:v}):S.accesstoken&&S.expirydate&&this.storage.setUser({accesstoken:S.accesstoken,expirydate:S.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new n.WebSocketApi(S.wss_url,this.auth),this.chunksManager=new p.ChunksManager(this.storage,this.pipeService,this.req,this.util,new w.ChunkDataService(this.req,w.chunkDataServiceConf)),this.appProcessor=new s.AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,S.activateSW,new w.AppDataService(this.req,w.appDataServiceConf)),this.itemProcessor=new c.ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new l.FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new h.FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new f.DocumentManager(this.req,this.pipeService),this.websocketsemitter=new k.WebSocketEmitter(this),S.initWebsocket){this.ws.initWebSocket(g.WebsocketHandler.bind(this,this),this.appProcessor.refreshApps.bind(this.appProcessor))}S.activateSW&&this.activateSW(S.swLink)}return I(b,[{key:"activateSW",value:function(){var e=x(S().mark(function e(t){var r;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(v.IS_WEB&&"serviceWorker"in window.navigator)){e.next=14;break}return e.prev=1,e.next=4,window.navigator.serviceWorker.register(t);case 4:(r=e.sent).update().then(function(){return console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}).catch(function(){return console.warn("SW ->>> Service worker is not updated")}),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",e.t0);case 12:e.next=15;break;case 14:console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;");case 15:case"end":return e.stop()}},e,null,[[1,9]])}));return function(t){return e.apply(this,arguments)}}()},{key:"on",value:function(e,t,r){return this.pipeService.on(e,t,r),this}},{key:"emit",value:function(e,t,r,n){return this.pipeService.emit(e,t,r,n),this}},{key:"destroy",value:function(e,t,r){return this.pipeService.destroy(e,t,r),this}},{key:"prefilter",value:function(e,t){return this.util.prefilter(e,t)}},{key:"debounce",value:function(e,t){return this.util.debounce(e,t)}},{key:"emitToUser",value:function(e,t){return this.websocketsemitter.emitToUser(e,t)}},{key:"broadcastToAppSubscribers",value:function(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}},{key:"getInterpretation",value:function(e,t,r,n,i,o,u){return this.interpritate.getInterpretation(e,t,r,n,i,o,u)}},{key:"getInterpretationById",value:function(e,t,r,n,i,o){return this.interpritate.getInterpretationById(e,t,r,n,i,o)}},{key:"filter",value:function(e,t){return this.util.filter(e,t)}},{key:"mergeFilters",value:function(e,t){return this.util.mergeFilters(e,t)}},{key:"group",value:function(e,t){return this.util.group(e,t)}},{key:"getFilteredItems",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}},{key:"sortItems",value:function(e,t){return this.util.sortItems(e,t)}},{key:"jsonToItems",value:function(e,t){return this.util.jsonToItems(e,t)}},{key:"getDate",value:function(e){return this.util.getDate(e)}},{key:"populateWithDate",value:function(e,t){return this.util.populateWithDate(e,t)}},{key:"checkRecurringDate",value:function(e,t){return this.util.checkRecurringDate(e,t)}},{key:"populateItems",value:function(e,t,r){return this.util.populateItems(e,t,r)}},{key:"populateWithItemRef",value:function(e,t,r,n,i,o){return this.util.populateWithItemRef(e,t,r,n,i,o)}},{key:"compareItems",value:function(e,t,r){return this.util.compareItems(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return this.util.mergeItems(e,t,r)}},{key:"mergeObjects",value:function(e,t){return this.util.mergeObjects(e,t)}},{key:"makeNestedList",value:function(e,t,r,n,i){return this.util.makeNestedList(e,t,r,n,i)}},{key:"jsonConstructor",value:function(e,t,r,n){return this.util.jsonConstructor(e,t,r,n)}},{key:"getAppsList",value:function(){return this.appProcessor.getAppsList()}},{key:"getAppInfo",value:function(e){return this.appProcessor.getAppInfo(e)}},{key:"deleteApp",value:function(e){return this.appProcessor.deleteApp(e)}},{key:"getApp",value:function(e){return this.appProcessor.getApp(e)}},{key:"updateApp",value:function(e){return this.appProcessor.updateApp(e)}},{key:"updateAppInfo",value:function(e){return this.appProcessor.updateAppInfo(e)}},{key:"createNewApp",value:function(e){return this.appProcessor.createNewApp(e)}},{key:"getItems",value:function(e){return this.itemProcessor.getItems(e)}},{key:"getItem",value:function(){var e=x(S().mark(function e(t,r){var n;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItems(t);case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.find(function(e){return e.item_id==r}));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(e,t){return this.itemProcessor.addNewItems(e,t)}},{key:"updateItems",value:function(e,t){return this.itemProcessor.updateItems(e,t)}},{key:"deleteItems",value:function(e,t){return this.itemProcessor.deleteItems(e,t)}},{key:"getField",value:function(e,t){return this.fieldProcessor.getField(e,t)}},{key:"getFieldIdByNameSpace",value:function(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}},{key:"getFieldModels",value:function(e){return this.fieldProcessor.getFieldModels(e)}},{key:"updateField",value:function(e,t){return this.fieldProcessor.updateField(e,t)}},{key:"deleteField",value:function(e,t){return this.fieldProcessor.deleteField(e,t)}},{key:"getFieldValue",value:function(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}},{key:"setFieldValue",value:function(e,t,r,n){return this.fieldProcessor.setFieldValue(e,t,r,n)}},{key:"getFile",value:function(e,t){return this.fileManager.getFile(e,t)}},{key:"getFiles",value:function(e,t){return this.fileManager.getFiles(e,t)}},{key:"uploadFile",value:function(e,t,r){return this.fileManager.uploadFile(e,t,r)}},{key:"uploadFileFromString",value:function(e,t,r,n,i,o,u){return this.fileManager.uploadFileFromString(e,t,r,n,i,o,u)}},{key:"updateFileFromString",value:function(e,t,r,n,i){return this.fileManager.updateFileFromString(e,t,r,n,i)}},{key:"deleteFile",value:function(e,t){return this.fileManager.deleteFile(e,t)}},{key:"duplicateFile",value:function(e){return this.fileManager.duplicateFile(e)}},{key:"downloadFileFromString",value:function(e,t){return this.fileManager.downloadFileFromString(e,t)}},{key:"createDocument",value:function(e){return this.documentManager.createDocument(e)}},{key:"getDocument",value:function(e){return this.documentManager.getDocument(e)}},{key:"getDocuments",value:function(e){return this.documentManager.getDocuments(e)}},{key:"deleteDocument",value:function(e){return this.documentManager.deleteDocument(e)}},{key:"login",value:function(e){return this.auth.login(e)}},{key:"loginWithToken",value:function(e){return this.auth.loginWithToken(e)}},{key:"logout",value:function(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}},{key:"signup",value:function(e){return this.auth.signup(e)}},{key:"getUsersList",value:function(e){return this.auth.getUsersList(e)}},{key:"updateToken",value:function(e){return this.auth.updateToken(e)}},{key:"avatarUploadApi",value:function(e){return this.auth.avatarUploadApi(e)}},{key:"getVersion",value:function(){return this.auth.getVersion()}},{key:"getUserById",value:function(e){return this.auth.getUserById(e)}},{key:"getToken",value:function(){return this.auth.getToken()}},{key:"updateUser",value:function(e){return this.auth.updateUser(e)}},{key:"updateAvatar",value:function(e){return this.auth.updateAvatar(e)}}]),b}();
297
281
  },{"./gudhub-https-service.js":"hDvy","./PipeService/PipeService.js":"E3xI","./Storage/Storage.js":"CSHe","./WebSocket/WebSocket.js":"pHMV","./config.js":"TPH7","./Utils/Utils.js":"mWlG","./Auth/Auth.js":"rK64","./GHConstructor/ghconstructor.js":"Htuh","./AppProcessor/AppProcessor.js":"q0my","./ItemProcessor/ItemProcessor.js":"UUd3","./FieldProcessor/FieldProcessor.js":"PoPF","./FileManager/FileManager.js":"XUT2","./ChunksManager/ChunksManager.js":"KHGc","./DocumentManager/DocumentManager.js":"K1Gs","./GHConstructor/interpritate.js":"X4Dt","./consts.js":"UV2u","./WebSocket/WebsocketHandler.js":"sPce","./Utils/sharing/GroupSharing.js":"LS0j","./Utils/sharing/Sharing.js":"XaHW","./WebSocket/WebSocketEmitter.js":"quyV","./DataService/export.js":"F1EO"}],"iRRN":[function(require,module,exports) {
298
282
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"GudHub",{enumerable:!0,get:function(){return e.GudHub}}),exports.default=void 0,require("regenerator-runtime/runtime.js");var e=require("./GUDHUB/gudhub.js"),r=exports.default=e.GudHub;
299
283
  },{"regenerator-runtime/runtime.js":"KA2S","./GUDHUB/gudhub.js":"U9gy"}]},{},["iRRN"], "GudHubLibrary")