@gudhub/core 1.2.4-beta.1 → 1.2.4-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -9
- package/umd/library.min.js +2 -300
- package/umd/library.min.js.LICENSE.txt +13 -0
- package/umd/library.min.js.map +1 -1
- package/webpack.config.js +33 -0
package/umd/library.min.js
CHANGED
|
@@ -1,300 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var define;
|
|
3
|
-
var t,r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.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(S){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var i=r&&r.prototype instanceof d?r:d,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:O(t,e,c)}),a}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(S){return{type:"throw",arg:S}}}t.wrap=l;var s="suspendedStart",p="suspendedYield",y="executing",v="completed",g={};function d(){}function m(){}function w(){}var b={};h(b,a,function(){return this});var L=Object.getPrototypeOf,x=L&&L(L(T([])));x&&x!==e&&n.call(x,a)&&(b=x);var E=w.prototype=d.prototype=Object.create(b);function j(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function _(t,r){var e;o(this,"_invoke",{value:function(o,i){function a(){return new r(function(e,a){!function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):r.resolve(l).then(function(t){h.value=t,a(h)},function(t){return e("throw",t,a,c)})}c(u.arg)}(o,i,e,a)})}return e=e?e.then(a,a):a()}})}function O(t,r,e){var n=s;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return F()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=k(a,e);if(c){if(c===g)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===s)throw n=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=y;var u=f(t,r,e);if("normal"===u.type){if(n=e.done?v:p,u.arg===g)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=v,e.method="throw",e.arg=u.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)?g:("return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g);var i=f(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 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 N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}return{next:F}}function F(){return{value:r,done:!0}}return m.prototype=w,o(E,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:m,configurable:!0}),m.displayName=h(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===m||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,h(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},j(_.prototype),h(_.prototype,c,function(){return this}),t.AsyncIterator=_,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new _(l(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),h(E,u,"Generator"),h(E,a,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),t.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}},t.values=T,P.prototype={constructor:P,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)&&n.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 o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!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"),h=n.call(a,"finallyLoc");if(u&&h){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(!h)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,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),N(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;N(e)}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}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}
|
|
4
|
-
},{}],"hRTX":[function(require,module,exports) {
|
|
5
|
-
"use strict";module.exports=function(r,n){return function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];return r.apply(n,t)}};
|
|
6
|
-
},{}],"Feqj":[function(require,module,exports) {
|
|
7
|
-
"use strict";var r=require("./helpers/bind"),t=Object.prototype.toString;function n(r){return"[object Array]"===t.call(r)}function e(r){return void 0===r}function o(r){return null!==r&&!e(r)&&null!==r.constructor&&!e(r.constructor)&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}function i(r){return"[object ArrayBuffer]"===t.call(r)}function u(r){return"undefined"!=typeof FormData&&r instanceof FormData}function c(r){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer&&r.buffer instanceof ArrayBuffer}function f(r){return"string"==typeof r}function a(r){return"number"==typeof r}function l(r){return null!==r&&"object"==typeof r}function s(r){if("[object Object]"!==t.call(r))return!1;var n=Object.getPrototypeOf(r);return null===n||n===Object.prototype}function p(r){return"[object Date]"===t.call(r)}function d(r){return"[object File]"===t.call(r)}function y(r){return"[object Blob]"===t.call(r)}function b(r){return"[object Function]"===t.call(r)}function j(r){return l(r)&&b(r.pipe)}function m(r){return"undefined"!=typeof URLSearchParams&&r instanceof URLSearchParams}function v(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function B(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function g(r,t){if(null!=r)if("object"!=typeof r&&(r=[r]),n(r))for(var e=0,o=r.length;e<o;e++)t.call(null,r[e],e,r);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.call(null,r[i],i,r)}function A(){var r={};function t(t,e){s(r[e])&&s(t)?r[e]=A(r[e],t):s(t)?r[e]=A({},t):n(t)?r[e]=t.slice():r[e]=t}for(var e=0,o=arguments.length;e<o;e++)g(arguments[e],t);return r}function O(t,n,e){return g(n,function(n,o){t[o]=e&&"function"==typeof n?r(n,e):n}),t}function h(r){return 65279===r.charCodeAt(0)&&(r=r.slice(1)),r}module.exports={isArray:n,isArrayBuffer:i,isBuffer:o,isFormData:u,isArrayBufferView:c,isString:f,isNumber:a,isObject:l,isPlainObject:s,isUndefined:e,isDate:p,isFile:d,isBlob:y,isFunction:b,isStream:j,isURLSearchParams:m,isStandardBrowserEnv:B,forEach:g,merge:A,extend:O,trim:v,stripBOM:h};
|
|
8
|
-
},{"./helpers/bind":"hRTX"}],"phSU":[function(require,module,exports) {
|
|
9
|
-
"use strict";var e=require("./../utils");function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}module.exports=function(i,n,t){if(!n)return i;var a;if(t)a=t(n);else if(e.isURLSearchParams(n))a=n.toString();else{var c=[];e.forEach(n,function(i,n){null!=i&&(e.isArray(i)?n+="[]":i=[i],e.forEach(i,function(i){e.isDate(i)?i=i.toISOString():e.isObject(i)&&(i=JSON.stringify(i)),c.push(r(n)+"="+r(i))}))}),a=c.join("&")}if(a){var o=i.indexOf("#");-1!==o&&(i=i.slice(0,o)),i+=(-1===i.indexOf("?")?"?":"&")+a}return i};
|
|
10
|
-
},{"./../utils":"Feqj"}],"xpeW":[function(require,module,exports) {
|
|
11
|
-
"use strict";var n=require("./../utils");function e(){this.handlers=[]}e.prototype.use=function(n,e,t){return this.handlers.push({fulfilled:n,rejected:e,synchronous:!!t&&t.synchronous,runWhen:t?t.runWhen:null}),this.handlers.length-1},e.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)},e.prototype.forEach=function(e){n.forEach(this.handlers,function(n){null!==n&&e(n)})},module.exports=e;
|
|
12
|
-
},{"./../utils":"Feqj"}],"njyv":[function(require,module,exports) {
|
|
13
|
-
"use strict";var e=require("../utils");module.exports=function(t,r){e.forEach(t,function(e,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(t[r]=e,delete t[o])})};
|
|
14
|
-
},{"../utils":"Feqj"}],"Lpyz":[function(require,module,exports) {
|
|
15
|
-
"use strict";module.exports=function(e,i,s,t,n){return e.config=i,s&&(e.code=s),e.request=t,e.response=n,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};
|
|
16
|
-
},{}],"NZT3":[function(require,module,exports) {
|
|
17
|
-
"use strict";var r=require("./enhanceError");module.exports=function(e,n,o,t,u){var a=new Error(e);return r(a,n,o,t,u)};
|
|
18
|
-
},{"./enhanceError":"Lpyz"}],"Ztkp":[function(require,module,exports) {
|
|
19
|
-
"use strict";var t=require("./createError");module.exports=function(e,s,u){var a=u.config.validateStatus;u.status&&a&&!a(u.status)?s(t("Request failed with status code "+u.status,u.config,null,u.request,u)):e(u)};
|
|
20
|
-
},{"./createError":"NZT3"}],"MLCl":[function(require,module,exports) {
|
|
21
|
-
"use strict";var e=require("./../utils");module.exports=e.isStandardBrowserEnv()?{write:function(n,t,o,r,i,u){var s=[];s.push(n+"="+encodeURIComponent(t)),e.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),e.isString(r)&&s.push("path="+r),e.isString(i)&&s.push("domain="+i),!0===u&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};
|
|
22
|
-
},{"./../utils":"Feqj"}],"R56a":[function(require,module,exports) {
|
|
23
|
-
"use strict";module.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)};
|
|
24
|
-
},{}],"uRyQ":[function(require,module,exports) {
|
|
25
|
-
"use strict";module.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e};
|
|
26
|
-
},{}],"dm4E":[function(require,module,exports) {
|
|
27
|
-
"use strict";var e=require("../helpers/isAbsoluteURL"),r=require("../helpers/combineURLs");module.exports=function(s,u){return s&&!e(u)?r(s,u):u};
|
|
28
|
-
},{"../helpers/isAbsoluteURL":"R56a","../helpers/combineURLs":"uRyQ"}],"Zn5P":[function(require,module,exports) {
|
|
29
|
-
"use strict";var e=require("./../utils"),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];module.exports=function(r){var i,o,n,s={};return r?(e.forEach(r.split("\n"),function(r){if(n=r.indexOf(":"),i=e.trim(r.substr(0,n)).toLowerCase(),o=e.trim(r.substr(n+1)),i){if(s[i]&&t.indexOf(i)>=0)return;s[i]="set-cookie"===i?(s[i]?s[i]:[]).concat([o]):s[i]?s[i]+", "+o:o}}),s):s};
|
|
30
|
-
},{"./../utils":"Feqj"}],"Rpqp":[function(require,module,exports) {
|
|
31
|
-
"use strict";var t=require("./../utils");module.exports=t.isStandardBrowserEnv()?function(){var r,e=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function a(t){var r=t;return e&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return r=a(window.location.href),function(e){var o=t.isString(e)?a(e):e;return o.protocol===r.protocol&&o.host===r.host}}():function(){return!0};
|
|
32
|
-
},{"./../utils":"Feqj"}],"akUF":[function(require,module,exports) {
|
|
33
|
-
"use strict";var e=require("./../utils"),r=require("./../core/settle"),t=require("./../helpers/cookies"),o=require("./../helpers/buildURL"),s=require("../core/buildFullPath"),n=require("./../helpers/parseHeaders"),a=require("./../helpers/isURLSameOrigin"),i=require("../core/createError");module.exports=function(u){return new Promise(function(l,d){var p=u.data,c=u.headers,f=u.responseType;e.isFormData(p)&&delete c["Content-Type"];var m=new XMLHttpRequest;if(u.auth){var h=u.auth.username||"",E=u.auth.password?unescape(encodeURIComponent(u.auth.password)):"";c.Authorization="Basic "+btoa(h+":"+E)}var T=s(u.baseURL,u.url);function R(){if(m){var e="getAllResponseHeaders"in m?n(m.getAllResponseHeaders()):null,t={data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:e,config:u,request:m};r(l,d,t),m=null}}if(m.open(u.method.toUpperCase(),o(T,u.params,u.paramsSerializer),!0),m.timeout=u.timeout,"onloadend"in m?m.onloadend=R:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(R)},m.onabort=function(){m&&(d(i("Request aborted",u,"ECONNABORTED",m)),m=null)},m.onerror=function(){d(i("Network Error",u,null,m)),m=null},m.ontimeout=function(){var e="timeout of "+u.timeout+"ms exceeded";u.timeoutErrorMessage&&(e=u.timeoutErrorMessage),d(i(e,u,u.transitional&&u.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",m)),m=null},e.isStandardBrowserEnv()){var g=(u.withCredentials||a(T))&&u.xsrfCookieName?t.read(u.xsrfCookieName):void 0;g&&(c[u.xsrfHeaderName]=g)}"setRequestHeader"in m&&e.forEach(c,function(e,r){void 0===p&&"content-type"===r.toLowerCase()?delete c[r]:m.setRequestHeader(r,e)}),e.isUndefined(u.withCredentials)||(m.withCredentials=!!u.withCredentials),f&&"json"!==f&&(m.responseType=u.responseType),"function"==typeof u.onDownloadProgress&&m.addEventListener("progress",u.onDownloadProgress),"function"==typeof u.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",u.onUploadProgress),u.cancelToken&&u.cancelToken.promise.then(function(e){m&&(m.abort(),d(e),m=null)}),p||(p=null),m.send(p)})};
|
|
34
|
-
},{"./../utils":"Feqj","./../core/settle":"Ztkp","./../helpers/cookies":"MLCl","./../helpers/buildURL":"phSU","../core/buildFullPath":"dm4E","./../helpers/parseHeaders":"Zn5P","./../helpers/isURLSameOrigin":"Rpqp","../core/createError":"NZT3"}],"g5IB":[function(require,module,exports) {
|
|
35
|
-
|
|
36
|
-
var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
|
|
37
|
-
},{}],"A14q":[function(require,module,exports) {
|
|
38
|
-
var process = require("process");
|
|
39
|
-
var e=require("process"),r=require("./utils"),t=require("./helpers/normalizeHeaderName"),n=require("./core/enhanceError"),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var r;return"undefined"!=typeof XMLHttpRequest?r=require("./adapters/xhr"):void 0!==e&&"[object process]"===Object.prototype.toString.call(e)&&(r=require("./adapters/http")),r}function s(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}var c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:o(),transformRequest:[function(e,n){return t(n,"Accept"),t(n,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(n,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||n&&"application/json"===n["Content-Type"]?(a(n,"application/json"),s(e)):e}],transformResponse:[function(e){var t=this.transitional,i=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,o=!i&&"json"===this.responseType;if(o||a&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o){if("SyntaxError"===s.name)throw n(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){c.headers[e]={}}),r.forEach(["post","put","patch"],function(e){c.headers[e]=r.merge(i)}),module.exports=c;
|
|
40
|
-
},{"./utils":"Feqj","./helpers/normalizeHeaderName":"njyv","./core/enhanceError":"Lpyz","./adapters/xhr":"akUF","./adapters/http":"akUF","process":"g5IB"}],"IAOH":[function(require,module,exports) {
|
|
41
|
-
"use strict";var r=require("./../utils"),e=require("./../defaults");module.exports=function(t,u,i){var s=this||e;return r.forEach(i,function(r){t=r.call(s,t,u)}),t};
|
|
42
|
-
},{"./../utils":"Feqj","./../defaults":"A14q"}],"mXc0":[function(require,module,exports) {
|
|
43
|
-
"use strict";module.exports=function(t){return!(!t||!t.__CANCEL__)};
|
|
44
|
-
},{}],"HALK":[function(require,module,exports) {
|
|
45
|
-
"use strict";var e=require("./../utils"),r=require("./transformData"),a=require("../cancel/isCancel"),t=require("../defaults");function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}module.exports=function(n){return s(n),n.headers=n.headers||{},n.data=r.call(n,n.data,n.headers,n.transformRequest),n.headers=e.merge(n.headers.common||{},n.headers[n.method]||{},n.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(e){delete n.headers[e]}),(n.adapter||t.adapter)(n).then(function(e){return s(n),e.data=r.call(n,e.data,e.headers,n.transformResponse),e},function(e){return a(e)||(s(n),e&&e.response&&(e.response.data=r.call(n,e.response.data,e.response.headers,n.transformResponse))),Promise.reject(e)})};
|
|
46
|
-
},{"./../utils":"Feqj","./transformData":"IAOH","../cancel/isCancel":"mXc0","../defaults":"A14q"}],"fBI1":[function(require,module,exports) {
|
|
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
|
-
},{"../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"}]};
|
|
50
|
-
},{}],"bSmC":[function(require,module,exports) {
|
|
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
|
-
},{"./../../package.json":"b3VU"}],"trUU":[function(require,module,exports) {
|
|
53
|
-
"use strict";var t=require("./../utils"),e=require("../helpers/buildURL"),r=require("./InterceptorManager"),o=require("./dispatchRequest"),i=require("./mergeConfig"),n=require("../helpers/validator"),s=n.validators;function a(t){this.defaults=t,this.interceptors={request:new r,response:new r}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=i(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&n.assertOptions(e,{silentJSONParsing:s.transitional(s.boolean,"1.0.0"),forcedJSONParsing:s.transitional(s.boolean,"1.0.0"),clarifyTimeoutError:s.transitional(s.boolean,"1.0.0")},!1);var r=[],a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});var u,h=[];if(this.interceptors.response.forEach(function(t){h.push(t.fulfilled,t.rejected)}),!a){var f=[o,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(h),u=Promise.resolve(t);f.length;)u=u.then(f.shift(),f.shift());return u}for(var l=t;r.length;){var c=r.shift(),p=r.shift();try{l=c(l)}catch(d){p(d);break}}try{u=o(l)}catch(d){return Promise.reject(d)}for(;h.length;)u=u.then(h.shift(),h.shift());return u},a.prototype.getUri=function(t){return t=i(this.defaults,t),e(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},t.forEach(["delete","get","head","options"],function(t){a.prototype[t]=function(e,r){return this.request(i(r||{},{method:t,url:e,data:(r||{}).data}))}}),t.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,r,o){return this.request(i(o||{},{method:t,url:e,data:r}))}}),module.exports=a;
|
|
54
|
-
},{"./../utils":"Feqj","../helpers/buildURL":"phSU","./InterceptorManager":"xpeW","./dispatchRequest":"HALK","./mergeConfig":"fBI1","../helpers/validator":"bSmC"}],"qFUg":[function(require,module,exports) {
|
|
55
|
-
"use strict";function t(t){this.message=t}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,module.exports=t;
|
|
56
|
-
},{}],"VgQU":[function(require,module,exports) {
|
|
57
|
-
"use strict";var e=require("./Cancel");function n(n){if("function"!=typeof n)throw new TypeError("executor must be a function.");var o;this.promise=new Promise(function(e){o=e});var r=this;n(function(n){r.reason||(r.reason=new e(n),o(r.reason))})}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n(function(n){e=n}),cancel:e}},module.exports=n;
|
|
58
|
-
},{"./Cancel":"qFUg"}],"yisB":[function(require,module,exports) {
|
|
59
|
-
"use strict";module.exports=function(n){return function(t){return n.apply(null,t)}};
|
|
60
|
-
},{}],"FbOI":[function(require,module,exports) {
|
|
61
|
-
"use strict";module.exports=function(o){return"object"==typeof o&&!0===o.isAxiosError};
|
|
62
|
-
},{}],"Wzmt":[function(require,module,exports) {
|
|
63
|
-
"use strict";var e=require("./utils"),r=require("./helpers/bind"),i=require("./core/Axios"),n=require("./core/mergeConfig"),u=require("./defaults");function o(n){var u=new i(n),o=r(i.prototype.request,u);return e.extend(o,i.prototype,u),e.extend(o,u),o}var l=o(u);l.Axios=i,l.create=function(e){return o(n(l.defaults,e))},l.Cancel=require("./cancel/Cancel"),l.CancelToken=require("./cancel/CancelToken"),l.isCancel=require("./cancel/isCancel"),l.all=function(e){return Promise.all(e)},l.spread=require("./helpers/spread"),l.isAxiosError=require("./helpers/isAxiosError"),module.exports=l,module.exports.default=l;
|
|
64
|
-
},{"./utils":"Feqj","./helpers/bind":"hRTX","./core/Axios":"trUU","./core/mergeConfig":"fBI1","./defaults":"A14q","./cancel/Cancel":"qFUg","./cancel/CancelToken":"VgQU","./cancel/isCancel":"mXc0","./helpers/spread":"yisB","./helpers/isAxiosError":"FbOI"}],"O4Aa":[function(require,module,exports) {
|
|
65
|
-
module.exports=require("./lib/axios");
|
|
66
|
-
},{"./lib/axios":"Wzmt"}],"EgeI":[function(require,module,exports) {
|
|
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
|
-
},{}],"Ht9r":[function(require,module,exports) {
|
|
83
|
-
"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
|
-
},{}],"khja":[function(require,module,exports) {
|
|
85
|
-
"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
|
-
},{"./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)};
|
|
88
|
-
},{}],"sg3h":[function(require,module,exports) {
|
|
89
|
-
"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
|
-
},{}],"KNOk":[function(require,module,exports) {
|
|
91
|
-
"use strict";var e=require("./implementation");module.exports=Function.prototype.bind||e;
|
|
92
|
-
},{"./implementation":"sg3h"}],"bKRI":[function(require,module,exports) {
|
|
93
|
-
"use strict";var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,o=require("function-bind");module.exports=o.call(t,e);
|
|
94
|
-
},{"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;
|
|
98
|
-
},{"get-intrinsic":"aOC8"}],"Bp8W":[function(require,module,exports) {
|
|
99
|
-
"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
|
-
},{"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) {
|
|
105
|
-
|
|
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) {
|
|
110
|
-
"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
|
-
},{"get-intrinsic":"aOC8","./":"VqWc"}],"sC8V":[function(require,module,exports) {
|
|
112
|
-
|
|
113
|
-
},{}],"nksM":[function(require,module,exports) {
|
|
114
|
-
var global = arguments[3];
|
|
115
|
-
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,""")}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
|
-
},{"./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) {
|
|
119
|
-
"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
|
-
},{}],"Qri1":[function(require,module,exports) {
|
|
121
|
-
"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};
|
|
122
|
-
},{"./formats":"XaX2"}],"mwZo":[function(require,module,exports) {
|
|
123
|
-
"use strict";var e=require("side-channel"),r=require("./utils"),t=require("./formats"),o=Object.prototype.hasOwnProperty,n={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},i=Array.isArray,a=Array.prototype.push,l=function(e,r){a.apply(e,i(r)?r:[r])},f=Date.prototype.toISOString,s=t.default,c={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:s,formatter:t.formatters[s],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},u=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},d={},y=function t(o,n,a,f,s,y,p,m,v,h,b,g,w,D,k,N){for(var O=o,S=N,T=0,j=!1;void 0!==(S=S.get(d))&&!j;){var x=S.get(o);if(T+=1,void 0!==x){if(x===T)throw new RangeError("Cyclic object value");j=!0}void 0===S.get(d)&&(T=0)}if("function"==typeof m?O=m(n,O):O instanceof Date?O=b(O):"comma"===a&&i(O)&&(O=r.maybeMap(O,function(e){return e instanceof Date?b(e):e})),null===O){if(s)return p&&!D?p(n,c.encoder,k,"key",g):n;O=""}if(u(O)||r.isBuffer(O))return p?[w(D?n:p(n,c.encoder,k,"key",g))+"="+w(p(O,c.encoder,k,"value",g))]:[w(n)+"="+w(String(O))];var E,P=[];if(void 0===O)return P;if("comma"===a&&i(O))D&&p&&(O=r.maybeMap(O,p)),E=[{value:O.length>0?O.join(",")||null:void 0}];else if(i(m))E=m;else{var z=Object.keys(O);E=v?z.sort(v):z}for(var H=f&&i(O)&&1===O.length?n+"[]":n,Q=0;Q<E.length;++Q){var V=E[Q],R="object"==typeof V&&void 0!==V.value?V.value:O[V];if(!y||null!==R){var q=i(O)?"function"==typeof a?a(H,V):H:H+(h?"."+V:"["+V+"]");N.set(o,T);var A=e();A.set(d,N),l(P,t(R,q,a,f,s,y,"comma"===a&&D&&i(O)?null:p,m,v,h,b,g,w,D,k,A))}}return P},p=function(e){if(!e)return c;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||c.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=t.default;if(void 0!==e.format){if(!o.call(t.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var a=t.formatters[n],l=c.filter;return("function"==typeof e.filter||i(e.filter))&&(l=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:c.addQueryPrefix,allowDots:void 0===e.allowDots?c.allowDots:!!e.allowDots,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:c.charsetSentinel,delimiter:void 0===e.delimiter?c.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:c.encode,encoder:"function"==typeof e.encoder?e.encoder:c.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:c.encodeValuesOnly,filter:l,format:n,formatter:a,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:c.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:c.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:c.strictNullHandling}};module.exports=function(r,t){var o,a=r,f=p(t);"function"==typeof f.filter?a=(0,f.filter)("",a):i(f.filter)&&(o=f.filter);var s,c=[];if("object"!=typeof a||null===a)return"";s=t&&t.arrayFormat in n?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=n[s];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d="comma"===u&&t&&t.commaRoundTrip;o||(o=Object.keys(a)),f.sort&&o.sort(f.sort);for(var m=e(),v=0;v<o.length;++v){var h=o[v];f.skipNulls&&null===a[h]||l(c,y(a[h],h,u,d,f.strictNullHandling,f.skipNulls,f.encode?f.encoder:null,f.filter,f.sort,f.allowDots,f.serializeDate,f.format,f.formatter,f.encodeValuesOnly,f.charset,m))}var b=c.join(f.delimiter),g=!0===f.addQueryPrefix?"?":"";return f.charsetSentinel&&("iso-8859-1"===f.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),b.length>0?g+b:""};
|
|
124
|
-
},{"side-channel":"lzf1","./utils":"Qri1","./formats":"XaX2"}],"snX5":[function(require,module,exports) {
|
|
125
|
-
"use strict";var e=require("./utils"),r=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:e.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},a=function(e,r){return e&&"string"==typeof e&&r.comma&&e.indexOf(",")>-1?e.split(","):e},n="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",c=function(c,s){var p,d={__proto__:null},u=s.ignoreQueryPrefix?c.replace(/^\?/,""):c,f=s.parameterLimit===1/0?void 0:s.parameterLimit,m=u.split(s.delimiter,f),y=-1,h=s.charset;if(s.charsetSentinel)for(p=0;p<m.length;++p)0===m[p].indexOf("utf8=")&&(m[p]===l?h="utf-8":m[p]===n&&(h="iso-8859-1"),y=p,p=m.length);for(p=0;p<m.length;++p)if(p!==y){var b,g,w=m[p],O=w.indexOf("]="),v=-1===O?w.indexOf("="):O+1;-1===v?(b=s.decoder(w,i.decoder,h,"key"),g=s.strictNullHandling?null:""):(b=s.decoder(w.slice(0,v),i.decoder,h,"key"),g=e.maybeMap(a(w.slice(v+1),s),function(e){return s.decoder(e,i.decoder,h,"value")})),g&&s.interpretNumericEntities&&"iso-8859-1"===h&&(g=o(g)),w.indexOf("[]=")>-1&&(g=t(g)?[g]:g),r.call(d,b)?d[b]=e.combine(d[b],g):d[b]=g}return d},s=function(e,r,t,i){for(var o=i?r:a(r,t),n=e.length-1;n>=0;--n){var l,c=e[n];if("[]"===c&&t.parseArrays)l=[].concat(o);else{l=t.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,p=parseInt(s,10);t.parseArrays||""!==s?!isNaN(p)&&c!==s&&String(p)===s&&p>=0&&t.parseArrays&&p<=t.arrayLimit?(l=[])[p]=o:"__proto__"!==s&&(l[s]=o):l={0:o}}o=l}return o},p=function(e,t,i,o){if(e){var a=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,n=/(\[[^[\]]*])/g,l=i.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,p=[];if(c){if(!i.plainObjects&&r.call(Object.prototype,c)&&!i.allowPrototypes)return;p.push(c)}for(var d=0;i.depth>0&&null!==(l=n.exec(a))&&d<i.depth;){if(d+=1,!i.plainObjects&&r.call(Object.prototype,l[1].slice(1,-1))&&!i.allowPrototypes)return;p.push(l[1])}return l&&p.push("["+a.slice(l.index)+"]"),s(p,t,i,o)}},d=function(r){if(!r)return i;if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==r.charset&&"utf-8"!==r.charset&&"iso-8859-1"!==r.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===r.charset?i.charset:r.charset;return{allowDots:void 0===r.allowDots?i.allowDots:!!r.allowDots,allowPrototypes:"boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof r.allowSparse?r.allowSparse:i.allowSparse,arrayLimit:"number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof r.charsetSentinel?r.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof r.comma?r.comma:i.comma,decoder:"function"==typeof r.decoder?r.decoder:i.decoder,delimiter:"string"==typeof r.delimiter||e.isRegExp(r.delimiter)?r.delimiter:i.delimiter,depth:"number"==typeof r.depth||!1===r.depth?+r.depth:i.depth,ignoreQueryPrefix:!0===r.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof r.interpretNumericEntities?r.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,parseArrays:!1!==r.parseArrays,plainObjects:"boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling}};module.exports=function(r,t){var i=d(t);if(""===r||null==r)return i.plainObjects?Object.create(null):{};for(var o="string"==typeof r?c(r,i):r,a=i.plainObjects?Object.create(null):{},n=Object.keys(o),l=0;l<n.length;++l){var s=n[l],u=p(s,o[s],i,"string"==typeof r);a=e.merge(a,u,i)}return!0===i.allowSparse?a:e.compact(a)};
|
|
126
|
-
},{"./utils":"Qri1"}],"hIRQ":[function(require,module,exports) {
|
|
127
|
-
"use strict";var r=require("./stringify"),e=require("./parse"),s=require("./formats");module.exports={formats:s,parse:e,stringify:r};
|
|
128
|
-
},{"./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}();
|
|
130
|
-
},{"axios":"O4Aa","./utils.js":"EgeI","qs":"hIRQ"}],"Lc8J":[function(require,module,exports) {
|
|
131
|
-
"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
|
-
},{}],"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}();
|
|
134
|
-
},{"./utils.js":"Lc8J"}],"FJWL":[function(require,module,exports) {
|
|
135
|
-
"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
|
-
},{}],"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}();
|
|
138
|
-
},{"./ModulesList.js":"FJWL"}],"p58b":[function(require,module,exports) {
|
|
139
|
-
"use strict";module.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};
|
|
140
|
-
},{}],"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}();
|
|
142
|
-
},{"ws":"p58b"}],"TPH7":[function(require,module,exports) {
|
|
143
|
-
"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
|
-
},{}],"DvAj":[function(require,module,exports) {
|
|
145
|
-
"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
|
-
},{}],"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);
|
|
148
|
-
},{}],"zsiC":[function(require,module,exports) {
|
|
149
|
-
"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
|
-
},{"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}();
|
|
152
|
-
},{"./utils.js":"zsiC"}],"LXWr":[function(require,module,exports) {
|
|
153
|
-
"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
|
-
},{}],"h8f7":[function(require,module,exports) {
|
|
155
|
-
var define;
|
|
156
|
-
var global = arguments[3];
|
|
157
|
-
var process = require("process");
|
|
158
|
-
var e,t=arguments[3],n=require("process");!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof e&&e.amd)e([],n);else{("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).jsonpath=n()}}(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({"./aesprim":[function(e,t,n){!function(e,t){"use strict";t(void 0!==n?n:e.esprima={})}(this,function(e){"use strict";var t,n,r,i,a,o,s,c,u,l,p,f,h,d,y,m,g,v;function S(e,t){if(!e)throw new Error("ASSERT: "+t)}function E(e){return e>=48&&e<=57}function b(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function x(e){return"01234567".indexOf(e)>=0}function k(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function I(e){return 10===e||13===e||8232===e||8233===e}function _(e){return 64==e||36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&s.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function w(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&s.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function C(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function O(e){return"eval"===e||"arguments"===e}function N(e,t,n,r,i){var a;S("number"==typeof n,"Comment must have valid position"),g.lastCommentStart>=n||(g.lastCommentStart=n,a={type:e,value:t},v.range&&(a.range=[n,r]),v.loc&&(a.loc=i),v.comments.push(a),v.attachComment&&(v.leadingComments.push(a),v.trailingComments.push(a)))}function T(e){var t,n,r,i;for(t=p-e,n={start:{line:f,column:p-h-e}};p<d;)if(r=u.charCodeAt(p),++p,I(r))return v.comments&&(i=u.slice(t+e,p-1),n.end={line:f,column:p-h-1},N("Line",i,t,p-1,n)),13===r&&10===u.charCodeAt(p)&&++p,++f,void(h=p);v.comments&&(i=u.slice(t+e,p),n.end={line:f,column:p-h},N("Line",i,t,p,n))}function A(){var e,t,n,r;for(v.comments&&(e=p-2,t={start:{line:f,column:p-h-2}});p<d;)if(I(n=u.charCodeAt(p)))13===n&&10===u.charCodeAt(p+1)&&++p,++f,h=++p,p>=d&&W({},o.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===u.charCodeAt(p+1))return++p,++p,void(v.comments&&(r=u.slice(e+2,p-2),t.end={line:f,column:p-h},N("Block",r,e,p,t)));++p}else++p;W({},o.UnexpectedToken,"ILLEGAL")}function L(){var e,t;for(t=0===p;p<d;)if(k(e=u.charCodeAt(p)))++p;else if(I(e))++p,13===e&&10===u.charCodeAt(p)&&++p,++f,h=p,t=!0;else if(47===e)if(47===(e=u.charCodeAt(p+1)))++p,++p,T(2),t=!0;else{if(42!==e)break;++p,++p,A()}else if(t&&45===e){if(45!==u.charCodeAt(p+1)||62!==u.charCodeAt(p+2))break;p+=3,T(3)}else{if(60!==e)break;if("!--"!==u.slice(p+1,p+4))break;++p,++p,++p,++p,T(4)}}function P(e){var t,n,r,i=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(p<d&&b(u[p])))return"";r=u[p++],i=16*i+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(i)}function R(){var e,t;for(e=u.charCodeAt(p++),t=String.fromCharCode(e),92===e&&(117!==u.charCodeAt(p)&&W({},o.UnexpectedToken,"ILLEGAL"),++p,(e=P("u"))&&"\\"!==e&&_(e.charCodeAt(0))||W({},o.UnexpectedToken,"ILLEGAL"),t=e);p<d&&w(e=u.charCodeAt(p));)++p,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==u.charCodeAt(p)&&W({},o.UnexpectedToken,"ILLEGAL"),++p,(e=P("u"))&&"\\"!==e&&w(e.charCodeAt(0))||W({},o.UnexpectedToken,"ILLEGAL"),t+=e);return t}function D(){var e,n;return e=p,{type:1===(n=92===u.charCodeAt(p)?R():function(){var e,t;for(e=p++;p<d;){if(92===(t=u.charCodeAt(p)))return p=e,R();if(!w(t))break;++p}return u.slice(e,p)}()).length?t.Identifier:function(e){if(l&&C(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}(n)?t.Keyword:"null"===n?t.NullLiteral:"true"===n||"false"===n?t.BooleanLiteral:t.Identifier,value:n,lineNumber:f,lineStart:h,start:e,end:p}}function j(){var e,n,r,i,a=p,s=u.charCodeAt(p),c=u[p];switch(s){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++p,v.tokenize&&(40===s?v.openParenToken=v.tokens.length:123===s&&(v.openCurlyToken=v.tokens.length)),{type:t.Punctuator,value:String.fromCharCode(s),lineNumber:f,lineStart:h,start:a,end:p};default:if(61===(e=u.charCodeAt(p+1)))switch(s){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return p+=2,{type:t.Punctuator,value:String.fromCharCode(s)+String.fromCharCode(e),lineNumber:f,lineStart:h,start:a,end:p};case 33:case 61:return p+=2,61===u.charCodeAt(p)&&++p,{type:t.Punctuator,value:u.slice(a,p),lineNumber:f,lineStart:h,start:a,end:p}}}return">>>="===(i=u.substr(p,4))?(p+=4,{type:t.Punctuator,value:i,lineNumber:f,lineStart:h,start:a,end:p}):">>>"===(r=i.substr(0,3))||"<<="===r||">>="===r?(p+=3,{type:t.Punctuator,value:r,lineNumber:f,lineStart:h,start:a,end:p}):c===(n=r.substr(0,2))[1]&&"+-<>&|".indexOf(c)>=0||"=>"===n?(p+=2,{type:t.Punctuator,value:n,lineNumber:f,lineStart:h,start:a,end:p}):"<>=!+-*%&|^/".indexOf(c)>=0?(++p,{type:t.Punctuator,value:c,lineNumber:f,lineStart:h,start:a,end:p}):void W({},o.UnexpectedToken,"ILLEGAL")}function $(){var e,n,r;if(S(E((r=u[p]).charCodeAt(0))||"."===r,"Numeric literal must start with a decimal digit or a decimal point"),n=p,e="","."!==r){if(e=u[p++],r=u[p],"0"===e){if("x"===r||"X"===r)return++p,function(e){for(var n="";p<d&&b(u[p]);)n+=u[p++];return 0===n.length&&W({},o.UnexpectedToken,"ILLEGAL"),_(u.charCodeAt(p))&&W({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt("0x"+n,16),lineNumber:f,lineStart:h,start:e,end:p}}(n);if(x(r))return function(e){for(var n="0"+u[p++];p<d&&x(u[p]);)n+=u[p++];return(_(u.charCodeAt(p))||E(u.charCodeAt(p)))&&W({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(n,8),octal:!0,lineNumber:f,lineStart:h,start:e,end:p}}(n);r&&E(r.charCodeAt(0))&&W({},o.UnexpectedToken,"ILLEGAL")}for(;E(u.charCodeAt(p));)e+=u[p++];r=u[p]}if("."===r){for(e+=u[p++];E(u.charCodeAt(p));)e+=u[p++];r=u[p]}if("e"===r||"E"===r)if(e+=u[p++],"+"!==(r=u[p])&&"-"!==r||(e+=u[p++]),E(u.charCodeAt(p)))for(;E(u.charCodeAt(p));)e+=u[p++];else W({},o.UnexpectedToken,"ILLEGAL");return _(u.charCodeAt(p))&&W({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:f,lineStart:h,start:n,end:p}}function M(){var e,n,r,i;return m=null,L(),e=p,n=function(){var e,t,n,r;for(S("/"===(e=u[p]),"Regular expression literal must start with a slash"),t=u[p++],n=!1,r=!1;p<d;)if(t+=e=u[p++],"\\"===e)I((e=u[p++]).charCodeAt(0))&&W({},o.UnterminatedRegExp),t+=e;else if(I(e.charCodeAt(0)))W({},o.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||W({},o.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}}(),r=function(){var e,t,n,r;for(t="",n="";p<d&&w((e=u[p]).charCodeAt(0));)if(++p,"\\"===e&&p<d)if("u"===(e=u[p])){if(r=++p,e=P("u"))for(n+=e,t+="\\u";r<p;++r)t+=u[r];else p=r,n+="u",t+="\\u";K({},o.UnexpectedToken,"ILLEGAL")}else t+="\\",K({},o.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}(),i=function(e,t){var n;try{n=new RegExp(e,t)}catch(r){W({},o.InvalidRegExp)}return n}(n.value,r.value),v.tokenize?{type:t.RegularExpression,value:i,lineNumber:f,lineStart:h,start:e,end:p}:{literal:n.literal+r.literal,value:i,start:e,end:p}}function U(){var e,t,n,r;return L(),e=p,t={start:{line:f,column:p-h}},n=M(),t.end={line:f,column:p-h},v.tokenize||(v.tokens.length>0&&(r=v.tokens[v.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||v.tokens.pop()),v.tokens.push({type:"RegularExpression",value:n.literal,range:[e,p],loc:t})),n}function B(){var e;return L(),p>=d?{type:t.EOF,lineNumber:f,lineStart:h,start:p,end:p}:_(e=u.charCodeAt(p))?D():40===e||41===e||59===e?j():39===e||34===e?function(){var e,n,r,i,a,s,c,l,y="",m=!1;for(c=f,l=h,S("'"===(e=u[p])||'"'===e,"String literal must starts with a quote"),n=p,++p;p<d;){if((r=u[p++])===e){e="";break}if("\\"===r)if((r=u[p++])&&I(r.charCodeAt(0)))++f,"\r"===r&&"\n"===u[p]&&++p,h=p;else switch(r){case"u":case"x":s=p,(a=P(r))?y+=a:(p=s,y+=r);break;case"n":y+="\n";break;case"r":y+="\r";break;case"t":y+="\t";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;default:x(r)?(0!==(i="01234567".indexOf(r))&&(m=!0),p<d&&x(u[p])&&(m=!0,i=8*i+"01234567".indexOf(u[p++]),"0123".indexOf(r)>=0&&p<d&&x(u[p])&&(i=8*i+"01234567".indexOf(u[p++]))),y+=String.fromCharCode(i)):y+=r}else{if(I(r.charCodeAt(0)))break;y+=r}}return""!==e&&W({},o.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:y,octal:m,startLineNumber:c,startLineStart:l,lineNumber:f,lineStart:h,start:n,end:p}}():46===e?E(u.charCodeAt(p+1))?$():j():E(e)?$():v.tokenize&&47===e?function(){var e,t;if(!(e=v.tokens[v.tokens.length-1]))return U();if("Punctuator"===e.type){if("]"===e.value)return j();if(")"===e.value)return!(t=v.tokens[v.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?j():U();if("}"===e.value){if(v.tokens[v.openCurlyToken-3]&&"Keyword"===v.tokens[v.openCurlyToken-3].type){if(!(t=v.tokens[v.openCurlyToken-4]))return j()}else{if(!v.tokens[v.openCurlyToken-4]||"Keyword"!==v.tokens[v.openCurlyToken-4].type)return j();if(!(t=v.tokens[v.openCurlyToken-5]))return U()}return r.indexOf(t.value)>=0?j():U()}return U()}return"Keyword"===e.type?U():j()}():j()}function F(){var e,r,i;return L(),e={start:{line:f,column:p-h}},r=B(),e.end={line:f,column:p-h},r.type!==t.EOF&&(i=u.slice(r.start,r.end),v.tokens.push({type:n[r.type],value:i,range:[r.start,r.end],loc:e})),r}function z(){var e;return p=(e=m).end,f=e.lineNumber,h=e.lineStart,m=void 0!==v.tokens?F():B(),p=e.end,f=e.lineNumber,h=e.lineStart,e}function q(){var e,t,n;e=p,t=f,n=h,m=void 0!==v.tokens?F():B(),p=e,f=t,h=n}function G(e,t){this.line=e,this.column=t}function H(e,t,n,r){this.start=new G(e,t),this.end=new G(n,r)}function X(){var e,t,n,r;return e=p,t=f,n=h,L(),r=f!==t,p=e,f=t,h=n,r}function W(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return S(t<r.length,"Message reference must be in range"),r[t]});throw"number"==typeof e.lineNumber?((n=new Error("Line "+e.lineNumber+": "+i)).index=e.start,n.lineNumber=e.lineNumber,n.column=e.start-h+1):((n=new Error("Line "+f+": "+i)).index=p,n.lineNumber=f,n.column=p-h+1),n.description=i,n}function K(){try{W.apply(null,arguments)}catch(e){if(!v.errors)throw e;v.errors.push(e)}}function V(e){if(e.type===t.EOF&&W(e,o.UnexpectedEOS),e.type===t.NumericLiteral&&W(e,o.UnexpectedNumber),e.type===t.StringLiteral&&W(e,o.UnexpectedString),e.type===t.Identifier&&W(e,o.UnexpectedIdentifier),e.type===t.Keyword){if(function(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}(e.value))W(e,o.UnexpectedReserved);else if(l&&C(e.value))return void K(e,o.StrictReservedWord);W(e,o.UnexpectedToken,e.value)}W(e,o.UnexpectedToken,e.value)}function J(e){var n=z();n.type===t.Punctuator&&n.value===e||V(n)}function Q(e){var n=z();n.type===t.Keyword&&n.value===e||V(n)}function Z(e){return m.type===t.Punctuator&&m.value===e}function Y(e){return m.type===t.Keyword&&m.value===e}function ee(){var e;59===u.charCodeAt(p)||Z(";")?z():(e=f,L(),f===e&&(m.type===t.EOF||Z("}")||V(m)))}function te(e){return e.type===i.Identifier||e.type===i.MemberExpression}function ne(e,t){var n,r,i;return n=l,i=m,r=_e(),t&&l&&O(e[0].name)&&K(t,o.StrictParamName),l=n,y.markEnd(y.createFunctionExpression(null,e,[],r),i)}function re(){var e,n;return n=m,(e=z()).type===t.StringLiteral||e.type===t.NumericLiteral?(l&&e.octal&&K(e,o.StrictOctalLiteral),y.markEnd(y.createLiteral(e),n)):y.markEnd(y.createIdentifier(e.value),n)}function ie(){var e,n,r,i,a,s;return s=m,(e=m).type===t.Identifier?(r=re(),"get"!==e.value||Z(":")?"set"!==e.value||Z(":")?(J(":"),i=ye(),y.markEnd(y.createProperty("init",r,i),s)):(n=re(),J("("),(e=m).type!==t.Identifier?(J(")"),K(e,o.UnexpectedToken,e.value),i=ne([])):(a=[ve()],J(")"),i=ne(a,e)),y.markEnd(y.createProperty("set",n,i),s)):(n=re(),J("("),J(")"),i=ne([]),y.markEnd(y.createProperty("get",n,i),s))):e.type!==t.EOF&&e.type!==t.Punctuator?(n=re(),J(":"),i=ye(),y.markEnd(y.createProperty("init",n,i),s)):void V(e)}function ae(){var e,n,r,s;if(Z("("))return function(){var e;return J("("),e=me(),J(")"),e}();if(Z("["))return function(){var e,t=[];for(e=m,J("[");!Z("]");)Z(",")?(z(),t.push(null)):(t.push(ye()),Z("]")||J(","));return z(),y.markEnd(y.createArrayExpression(t),e)}();if(Z("{"))return function(){var e,t,n,r,s,c=[],u={},p=String;for(s=m,J("{");!Z("}");)t=(e=ie()).key.type===i.Identifier?e.key.name:p(e.key.value),r="init"===e.kind?a.Data:"get"===e.kind?a.Get:a.Set,n="$"+t,Object.prototype.hasOwnProperty.call(u,n)?(u[n]===a.Data?l&&r===a.Data?K({},o.StrictDuplicateProperty):r!==a.Data&&K({},o.AccessorDataProperty):r===a.Data?K({},o.AccessorDataProperty):u[n]&r&&K({},o.AccessorGetSet),u[n]|=r):u[n]=r,c.push(e),Z("}")||J(",");return J("}"),y.markEnd(y.createObjectExpression(c),s)}();if(e=m.type,s=m,e===t.Identifier)r=y.createIdentifier(z().value);else if(e===t.StringLiteral||e===t.NumericLiteral)l&&m.octal&&K(m,o.StrictOctalLiteral),r=y.createLiteral(z());else if(e===t.Keyword){if(Y("function"))return function(){var e,t,n,r,i,a,s,c,u=null,p=[];c=m,Q("function"),Z("(")||(e=m,u=ve(),l?O(e.value)&&K(e,o.StrictFunctionName):O(e.value)?(n=e,r=o.StrictFunctionName):C(e.value)&&(n=e,r=o.StrictReservedWord));i=we(n),p=i.params,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message);s=l,a=_e(),l&&n&&W(n,r);l&&t&&K(t,r);return l=s,y.markEnd(y.createFunctionExpression(u,p,[],a),c)}();Y("this")?(z(),r=y.createThisExpression()):V(z())}else e===t.BooleanLiteral?((n=z()).value="true"===n.value,r=y.createLiteral(n)):e===t.NullLiteral?((n=z()).value=null,r=y.createLiteral(n)):Z("/")||Z("/=")?(r=void 0!==v.tokens?y.createLiteral(U()):y.createLiteral(M()),q()):V(z());return y.markEnd(r,s)}function oe(){var e=[];if(J("("),!Z(")"))for(;p<d&&(e.push(ye()),!Z(")"));)J(",");return J(")"),e}function se(){var e,n;return n=m,function(e){return e.type===t.Identifier||e.type===t.Keyword||e.type===t.BooleanLiteral||e.type===t.NullLiteral}(e=z())||V(e),y.markEnd(y.createIdentifier(e.value),n)}function ce(){return J("."),se()}function ue(){var e;return J("["),e=me(),J("]"),e}function le(){var e,t,n;return n=m,Q("new"),e=function(){var e,t,n,r;r=m,e=g.allowIn,t=Y("new")?le():ae(),g.allowIn=e;for(;Z(".")||Z("[");)Z("[")?(n=ue(),t=y.createMemberExpression("[",t,n)):(n=ce(),t=y.createMemberExpression(".",t,n)),y.markEnd(t,r);return t}(),t=Z("(")?oe():[],y.markEnd(y.createNewExpression(e,t),n)}function pe(){var e,n,r=m;return e=function(){var e,t,n,r,i;for(i=m,e=g.allowIn,g.allowIn=!0,t=Y("new")?le():ae(),g.allowIn=e;;){if(Z("."))r=ce(),t=y.createMemberExpression(".",t,r);else if(Z("("))n=oe(),t=y.createCallExpression(t,n);else{if(!Z("["))break;r=ue(),t=y.createMemberExpression("[",t,r)}y.markEnd(t,i)}return t}(),m.type===t.Punctuator&&(!Z("++")&&!Z("--")||X()||(l&&e.type===i.Identifier&&O(e.name)&&K({},o.StrictLHSPostfix),te(e)||K({},o.InvalidLHSInAssignment),n=z(),e=y.markEnd(y.createPostfixExpression(n.value,e),r))),e}function fe(){var e,n,r;return m.type!==t.Punctuator&&m.type!==t.Keyword?n=pe():Z("++")||Z("--")?(r=m,e=z(),n=fe(),l&&n.type===i.Identifier&&O(n.name)&&K({},o.StrictLHSPrefix),te(n)||K({},o.InvalidLHSInAssignment),n=y.createUnaryExpression(e.value,n),n=y.markEnd(n,r)):Z("+")||Z("-")||Z("~")||Z("!")?(r=m,e=z(),n=fe(),n=y.createUnaryExpression(e.value,n),n=y.markEnd(n,r)):Y("delete")||Y("void")||Y("typeof")?(r=m,e=z(),n=fe(),n=y.createUnaryExpression(e.value,n),n=y.markEnd(n,r),l&&"delete"===n.operator&&n.argument.type===i.Identifier&&K({},o.StrictDelete)):n=pe(),n}function he(e,n){var r=0;if(e.type!==t.Punctuator&&e.type!==t.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=n?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function de(){var e,t,n,r,i;return i=m,e=function(){var e,t,n,r,i,a,o,s,c,u;if(e=m,c=fe(),0===(i=he(r=m,g.allowIn)))return c;for(r.prec=i,z(),t=[e,m],a=[c,r,o=fe()];(i=he(m,g.allowIn))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,c=a.pop(),n=y.createBinaryExpression(s,c,o),t.pop(),e=t[t.length-1],y.markEnd(n,e),a.push(n);(r=z()).prec=i,a.push(r),t.push(m),n=fe(),a.push(n)}for(n=a[u=a.length-1],t.pop();u>1;)n=y.createBinaryExpression(a[u-1].value,a[u-2],n),u-=2,e=t.pop(),y.markEnd(n,e);return n}(),Z("?")&&(z(),t=g.allowIn,g.allowIn=!0,n=ye(),g.allowIn=t,J(":"),r=ye(),e=y.createConditionalExpression(e,n,r),y.markEnd(e,i)),e}function ye(){var e,n,r,a,s,c;return e=m,s=m,a=n=de(),m.type!==t.Punctuator||"="!==(c=m.value)&&"*="!==c&&"/="!==c&&"%="!==c&&"+="!==c&&"-="!==c&&"<<="!==c&&">>="!==c&&">>>="!==c&&"&="!==c&&"^="!==c&&"|="!==c||(te(n)||K({},o.InvalidLHSInAssignment),l&&n.type===i.Identifier&&O(n.name)&&K(e,o.StrictLHSAssignment),e=z(),r=ye(),a=y.markEnd(y.createAssignmentExpression(e.value,n,r),s)),a}function me(){var e,t=m;if(e=ye(),Z(",")){for(e=y.createSequenceExpression([e]);p<d&&Z(",");)z(),e.expressions.push(ye());y.markEnd(e,t)}return e}function ge(){var e,t;return t=m,J("{"),e=function(){for(var e,t=[];p<d&&!Z("}")&&void 0!==(e=Oe());)t.push(e);return t}(),J("}"),y.markEnd(y.createBlockStatement(e),t)}function ve(){var e,n;return n=m,(e=z()).type!==t.Identifier&&V(e),y.markEnd(y.createIdentifier(e.value),n)}function Se(e){var t,n,r=null;return n=m,t=ve(),l&&O(t.name)&&K({},o.StrictVarName),"const"===e?(J("="),r=ye()):Z("=")&&(z(),r=ye()),y.markEnd(y.createVariableDeclarator(t,r),n)}function Ee(e){var t=[];do{if(t.push(Se(e)),!Z(","))break;z()}while(p<d);return t}function be(){var e,t,n,r,i,a,s,c,u,l;return e=t=n=null,Q("for"),J("("),Z(";")?z():(Y("var")||Y("let")?(g.allowIn=!1,l=m,c=z(),u=Ee(),e=y.markEnd(y.createVariableDeclaration(u,c.value),l),g.allowIn=!0,1===e.declarations.length&&Y("in")&&(z(),r=e,i=me(),e=null)):(g.allowIn=!1,e=me(),g.allowIn=!0,Y("in")&&(te(e)||K({},o.InvalidLHSInForIn),z(),r=e,i=me(),e=null)),void 0===r&&J(";")),void 0===r&&(Z(";")||(t=me()),J(";"),Z(")")||(n=me())),J(")"),s=g.inIteration,g.inIteration=!0,a=Ie(),g.inIteration=s,void 0===r?y.createForStatement(e,t,n,a):y.createForInStatement(r,i,a)}function xe(){var e,t,n,r=[];for(n=m,Y("default")?(z(),e=null):(Q("case"),e=me()),J(":");p<d&&!(Z("}")||Y("default")||Y("case"));)t=Ie(),r.push(t);return y.markEnd(y.createSwitchCase(e,r),n)}function ke(){var e,t,n,r,i=[],a=null;return Q("try"),e=ge(),Y("catch")&&i.push((r=m,Q("catch"),J("("),Z(")")&&V(m),t=ve(),l&&O(t.name)&&K({},o.StrictCatchVariable),J(")"),n=ge(),y.markEnd(y.createCatchClause(t,n),r))),Y("finally")&&(z(),a=ge()),0!==i.length||a||W({},o.NoCatchOrFinally),y.createTryStatement(e,[],i,a)}function Ie(){var e,n,r,a,s,c,f,h,v,S=m.type;if(S===t.EOF&&V(m),S===t.Punctuator&&"{"===m.value)return ge();if(a=m,S===t.Punctuator)switch(m.value){case";":return y.markEnd((J(";"),y.createEmptyStatement()),a);case"(":return y.markEnd(function(){var e=me();return ee(),y.createExpressionStatement(e)}(),a)}if(S===t.Keyword)switch(m.value){case"break":return y.markEnd(function(){var e,n=null;return Q("break"),59===u.charCodeAt(p)?(z(),g.inIteration||g.inSwitch||W({},o.IllegalBreak),y.createBreakStatement(null)):X()?(g.inIteration||g.inSwitch||W({},o.IllegalBreak),y.createBreakStatement(null)):(m.type===t.Identifier&&(e="$"+(n=ve()).name,Object.prototype.hasOwnProperty.call(g.labelSet,e)||W({},o.UnknownLabel,n.name)),ee(),null!==n||g.inIteration||g.inSwitch||W({},o.IllegalBreak),y.createBreakStatement(n))}(),a);case"continue":return y.markEnd(function(){var e,n=null;return Q("continue"),59===u.charCodeAt(p)?(z(),g.inIteration||W({},o.IllegalContinue),y.createContinueStatement(null)):X()?(g.inIteration||W({},o.IllegalContinue),y.createContinueStatement(null)):(m.type===t.Identifier&&(e="$"+(n=ve()).name,Object.prototype.hasOwnProperty.call(g.labelSet,e)||W({},o.UnknownLabel,n.name)),ee(),null!==n||g.inIteration||W({},o.IllegalContinue),y.createContinueStatement(n))}(),a);case"debugger":return y.markEnd((Q("debugger"),ee(),y.createDebuggerStatement()),a);case"do":return y.markEnd((Q("do"),v=g.inIteration,g.inIteration=!0,f=Ie(),g.inIteration=v,Q("while"),J("("),h=me(),J(")"),Z(";")&&z(),y.createDoWhileStatement(f,h)),a);case"for":return y.markEnd(be(),a);case"function":return y.markEnd(Ce(),a);case"if":return y.markEnd(function(){var e,t,n;return Q("if"),J("("),e=me(),J(")"),t=Ie(),Y("else")?(z(),n=Ie()):n=null,y.createIfStatement(e,t,n)}(),a);case"return":return y.markEnd((c=null,Q("return"),g.inFunctionBody||K({},o.IllegalReturn),32===u.charCodeAt(p)&&_(u.charCodeAt(p+1))?(c=me(),ee(),y.createReturnStatement(c)):X()?y.createReturnStatement(null):(Z(";")||Z("}")||m.type===t.EOF||(c=me()),ee(),y.createReturnStatement(c))),a);case"switch":return y.markEnd(function(){var e,t,n,r,i;if(Q("switch"),J("("),e=me(),J(")"),J("{"),t=[],Z("}"))return z(),y.createSwitchStatement(e,t);for(r=g.inSwitch,g.inSwitch=!0,i=!1;p<d&&!Z("}");)null===(n=xe()).test&&(i&&W({},o.MultipleDefaultsInSwitch),i=!0),t.push(n);return g.inSwitch=r,J("}"),y.createSwitchStatement(e,t)}(),a);case"throw":return y.markEnd(function(){var e;return Q("throw"),X()&&W({},o.NewlineAfterThrow),e=me(),ee(),y.createThrowStatement(e)}(),a);case"try":return y.markEnd(ke(),a);case"var":return y.markEnd((Q("var"),s=Ee(),ee(),y.createVariableDeclaration(s,"var")),a);case"while":return y.markEnd(function(){var e,t,n;return Q("while"),J("("),e=me(),J(")"),n=g.inIteration,g.inIteration=!0,t=Ie(),g.inIteration=n,y.createWhileStatement(e,t)}(),a);case"with":return y.markEnd(function(){var e,t;return l&&(L(),K({},o.StrictModeWith)),Q("with"),J("("),e=me(),J(")"),t=Ie(),y.createWithStatement(e,t)}(),a)}return(e=me()).type===i.Identifier&&Z(":")?(z(),r="$"+e.name,Object.prototype.hasOwnProperty.call(g.labelSet,r)&&W({},o.Redeclaration,"Label",e.name),g.labelSet[r]=!0,n=Ie(),delete g.labelSet[r],y.markEnd(y.createLabeledStatement(e,n),a)):(ee(),y.markEnd(y.createExpressionStatement(e),a))}function _e(){var e,n,r,a,s,c,f,h,v=[];for(h=m,J("{");p<d&&m.type===t.StringLiteral&&(n=m,e=Oe(),v.push(e),e.expression.type===i.Literal);)"use strict"===u.slice(n.start+1,n.end-1)?(l=!0,r&&K(r,o.StrictOctalLiteral)):!r&&n.octal&&(r=n);for(a=g.labelSet,s=g.inIteration,c=g.inSwitch,f=g.inFunctionBody,g.labelSet={},g.inIteration=!1,g.inSwitch=!1,g.inFunctionBody=!0;p<d&&!Z("}")&&void 0!==(e=Oe());)v.push(e);return J("}"),g.labelSet=a,g.inIteration=s,g.inSwitch=c,g.inFunctionBody=f,y.markEnd(y.createBlockStatement(v),h)}function we(e){var t,n,r,i,a,s,c=[];if(J("("),!Z(")"))for(i={};p<d&&(n=m,t=ve(),a="$"+n.value,l?(O(n.value)&&(r=n,s=o.StrictParamName),Object.prototype.hasOwnProperty.call(i,a)&&(r=n,s=o.StrictParamDupe)):e||(O(n.value)?(e=n,s=o.StrictParamName):C(n.value)?(e=n,s=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,a)&&(e=n,s=o.StrictParamDupe)),c.push(t),i[a]=!0,!Z(")"));)J(",");return J(")"),{params:c,stricted:r,firstRestricted:e,message:s}}function Ce(){var e,t,n,r,i,a,s,c,u,p;return p=m,Q("function"),r=m,e=ve(),l?O(r.value)&&K(r,o.StrictFunctionName):O(r.value)?(s=r,c=o.StrictFunctionName):C(r.value)&&(s=r,c=o.StrictReservedWord),t=(a=we(s)).params,i=a.stricted,s=a.firstRestricted,a.message&&(c=a.message),u=l,n=_e(),l&&s&&W(s,c),l&&i&&K(i,c),l=u,y.markEnd(y.createFunctionDeclaration(e,t,[],n),p)}function Oe(){if(m.type===t.Keyword)switch(m.value){case"const":case"let":return e=m.value,r=m,Q(e),n=Ee(e),ee(),y.markEnd(y.createVariableDeclaration(n,e),r);case"function":return Ce();default:return Ie()}var e,n,r;if(m.type!==t.EOF)return Ie()}function Ne(){var e,n;return L(),q(),n=m,l=!1,e=function(){for(var e,n,r,a=[];p<d&&(n=m).type===t.StringLiteral&&(e=Oe(),a.push(e),e.expression.type===i.Literal);)"use strict"===u.slice(n.start+1,n.end-1)?(l=!0,r&&K(r,o.StrictOctalLiteral)):!r&&n.octal&&(r=n);for(;p<d&&void 0!==(e=Oe());)a.push(e);return a}(),y.markEnd(y.createProgram(e),n)}function Te(){var e,t,n,r=[];for(e=0;e<v.tokens.length;++e)n={type:(t=v.tokens[e]).type,value:t.value},v.range&&(n.range=t.range),v.loc&&(n.loc=t.loc),r.push(n);v.tokens=r}(n={})[(t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",n[t.EOF]="<end>",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",n[t.RegularExpression]="RegularExpression",r=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},a={Data:1,Get:2,Set:4},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},s={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},c={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===i.Program&&e.body.length>0)){for(v.trailingComments.length>0?v.trailingComments[0].range[0]>=e.range[1]?(n=v.trailingComments,v.trailingComments=[]):v.trailingComments.length=0:v.bottomRightStack.length>0&&v.bottomRightStack[v.bottomRightStack.length-1].trailingComments&&v.bottomRightStack[v.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=v.bottomRightStack[v.bottomRightStack.length-1].trailingComments,delete v.bottomRightStack[v.bottomRightStack.length-1].trailingComments);v.bottomRightStack.length>0&&v.bottomRightStack[v.bottomRightStack.length-1].range[0]>=e.range[0];)t=v.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):v.leadingComments.length>0&&v.leadingComments[v.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=v.leadingComments,v.leadingComments=[]),n&&(e.trailingComments=n),v.bottomRightStack.push(e)}},markEnd:function(e,t){return v.range&&(e.range=[t.start,p]),v.loc&&(e.loc=new H(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),f,p-h),this.postProcess(e)),v.attachComment&&this.processComment(e),e},postProcess:function(e){return v.source&&(e.loc.source=v.source),e},createArrayExpression:function(e){return{type:i.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:i.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?i.LogicalExpression:i.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:i.BlockStatement,body:e}},createBreakStatement:function(e){return{type:i.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:i.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:i.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:i.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:i.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:i.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(e){return{type:i.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:i.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:i.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:i.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:i.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:i.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:i.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:i.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:i.Literal,value:e.value,raw:u.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:i.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:i.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:i.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:i.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:i.Program,body:e}},createProperty:function(e,t,n){return{type:i.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:i.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:i.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:i.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:i.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(e){return{type:i.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:i.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:i.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:i.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:i.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:i.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:i.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:i.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=function(e,n){var r,i;r=String,"string"==typeof e||e instanceof String||(e=r(e)),y=c,p=0,f=(u=e).length>0?1:0,h=0,d=u.length,m=null,g={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},v={},(n=n||{}).tokens=!0,v.tokens=[],v.tokenize=!0,v.openParenToken=-1,v.openCurlyToken=-1,v.range="boolean"==typeof n.range&&n.range,v.loc="boolean"==typeof n.loc&&n.loc,"boolean"==typeof n.comment&&n.comment&&(v.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(v.errors=[]);try{if(q(),m.type===t.EOF)return v.tokens;for(z();m.type!==t.EOF;)try{z()}catch(a){if(v.errors){v.errors.push(a);break}throw a}Te(),i=v.tokens,void 0!==v.comments&&(i.comments=v.comments),void 0!==v.errors&&(i.errors=v.errors)}catch(o){throw o}finally{v={}}return i},e.parse=function(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),y=c,p=0,f=(u=e).length>0?1:0,h=0,d=u.length,m=null,g={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},v={},void 0!==t&&(v.range="boolean"==typeof t.range&&t.range,v.loc="boolean"==typeof t.loc&&t.loc,v.attachComment="boolean"==typeof t.attachComment&&t.attachComment,v.loc&&null!==t.source&&void 0!==t.source&&(v.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(v.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(v.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(v.errors=[]),v.attachComment&&(v.range=!0,v.comments=[],v.bottomRightStack=[],v.trailingComments=[],v.leadingComments=[]));try{n=Ne(),void 0!==v.comments&&(n.comments=v.comments),void 0!==v.tokens&&(Te(),n.tokens=v.tokens),void 0!==v.errors&&(n.errors=v.errors)}catch(i){throw i}finally{v={}}return n},e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),i)i.hasOwnProperty(e)&&(t[e]=i[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})},{}],1:[function(e,t,n){(function(r){var i=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,n,r,i,a,o,s){i.ast||(i.ast=t,t.initialize());var c=o.length-1;switch(a){case 1:return i.ast.set({expression:{type:"root",value:o[c]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:o[c-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:o[c-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:i.ast.set({scope:"child"});break;case 10:i.ast.set({scope:"descendant"});break;case 11:break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 13:break;case 14:i.ast.set({expression:{type:"wildcard",value:o[c]}});break;case 15:i.ast.set({expression:{type:"identifier",value:o[c]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:o[c]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(o[c])}});break;case 18:break;case 19:i.ast.set({scope:"child"});break;case 20:i.ast.set({scope:"descendant"});break;case 21:case 22:case 23:break;case 24:o[c].length>1?i.ast.set({expression:{type:"union",value:o[c]}}):this.$=o[c];break;case 25:this.$=[o[c]];break;case 26:this.$=o[c-2].concat(o[c]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(o[c])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:o[c]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:o[c]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:o[c]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:o[c]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:o[c]}},i.ast.set(this.$);break;case 33:case 34:this.$=o[c]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],a=this.table,o="",s=0,c=0,u=0,l=1,p=i.slice.call(arguments,1);this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var f=this.lexer.yylloc;i.push(f);var h=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var d,y,m,g,v,S,E,b,x,k,I={};;){if(m=n[n.length-1],this.defaultActions[m]?g=this.defaultActions[m]:(null==d&&(k=void 0,"number"!=typeof(k=t.lexer.lex()||l)&&(k=t.symbols_[k]||k),d=k),g=a[m]&&a[m][d]),void 0===g||!g.length||!g[0]){var _="";for(S in x=[],a[m])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");_=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(s+1)+": Unexpected "+(d==l?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:f,expected:x})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+d);switch(g[0]){case 1:n.push(d),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),d=null,y?(d=y,y=null):(c=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,f=this.lexer.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[g[1]][1],I.$=r[r.length-E],I._$={first_line:i[i.length-(E||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(E||1)].first_column,last_column:i[i.length-1].last_column},h&&(I._$.range=[i[i.length-(E||1)].range[0],i[i.length-1].range[1]]),void 0!==(v=this.performAction.apply(I,[o,c,s,this.yy,g[1],r,i].concat(p))))return v;E&&(n=n.slice(0,-1*E*2),r=r.slice(0,-1*E),i=i.slice(0,-1*E)),n.push(this.productions_[g[1]][0]),r.push(I.$),i.push(I._$),b=a[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}},t={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},n={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function r(){this.yy={}}return e.lexer=n,r.prototype=e,e.Parser=r,new r}();void 0!==e&&void 0!==n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return n.parser.parse(i)},void 0!==t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:14,fs:12,path:13}],2:[function(e,t,n){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,n){var r=e("./dict"),i=e("fs"),a={lex:{macros:{esc:"\\\\",int:r.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(a.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),a.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=a},{"./dict":2,fs:12}],4:[function(e,t,n){var r=e("./aesprim"),i=e("./slice"),a=e("static-eval"),o=e("underscore").uniq,s=function(){return this.initialize.apply(this,arguments)};function c(t,n,i){var a=e("./index"),o=h(r.parse(n).body[0].expression,{"@":t.value}),s=i.replace(/\{\{\s*value\s*\}\}/g,o),c=a.nodes(t.value,s);return c.forEach(function(e){e.path=t.path.concat(e.path.slice(1))}),c}function u(e){return Array.isArray(e)}function l(e){return function(t,n,r,i){var a=t.value,o=t.path,s=[],c=function(t,a){var o;u(t)?(t.forEach(function(e,t){s.length>=i||r(t,e,n)&&s.push({path:a.concat(t),value:e})}),t.forEach(function(t,n){s.length>=i||e&&c(t,a.concat(n))})):(o=t)&&!(o instanceof Array)&&o instanceof Object&&(this.keys(t).forEach(function(e){s.length>=i||r(e,t[e],n)&&s.push({path:a.concat(e),value:t[e]})}),this.keys(t).forEach(function(n){s.length>=i||e&&c(t[n],a.concat(n))}))}.bind(this);return c(a,o),s}}function p(e){return function(t,n,r){return this.descend(n,t.expression.value,e,r)}}function f(e){return function(t,n,r){return this.traverse(n,t.expression.value,e,r)}}function h(){try{return a.apply(this,arguments)}catch(e){}}function d(e){return e=e.filter(function(e){return e}),o(e,function(e){return e.path.map(function(e){return String(e).replace("-","--")}).join("-")})}function y(e){var t=String(e);return t.match(/^-?[0-9]+$/)?parseInt(t):null}s.prototype.initialize=function(){this.traverse=l(!0),this.descend=l()},s.prototype.keys=Object.keys,s.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},s.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},s.prototype._fns={"member-child-identifier":function(e,t){var n=e.expression.value,r=t.value;if(r instanceof Object&&n in r)return[{value:r[n],path:t.path.concat(n)}]},"member-descendant-identifier":f(function(e,t,n){return e==n}),"subscript-child-numeric_literal":p(function(e,t,n){return e===n}),"member-child-numeric_literal":p(function(e,t,n){return String(e)===String(n)}),"subscript-descendant-numeric_literal":f(function(e,t,n){return e===n}),"member-child-wildcard":p(function(){return!0}),"member-descendant-wildcard":f(function(){return!0}),"subscript-descendant-wildcard":f(function(){return!0}),"subscript-child-wildcard":p(function(){return!0}),"subscript-child-slice":function(e,t){if(u(t.value)){var n=e.expression.value.split(":").map(y),r=t.value.map(function(e,n){return{value:e,path:t.path.concat(n)}});return i.apply(null,[r].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach(function(e){var r={operation:"subscript",scope:"child",expression:e.expression},i=this.resolve(r)(r,t);i&&(n=n.concat(i))},this),d(n)},"subscript-descendant-union":function(t,n,r){var i=e(".."),a=this,o=[];return i.nodes(n,"$..*").slice(1).forEach(function(e){o.length>=r||t.expression.value.forEach(function(t){var n={operation:"subscript",scope:"child",expression:t.expression},r=a.resolve(n)(n,e);o=o.concat(r)})}),d(o)},"subscript-child-filter_expression":function(e,t,n){var i=e.expression.value.slice(2,-1),a=r.parse(i).body[0].expression;return this.descend(t,null,function(e,t){return h(a,{"@":t})},n)},"subscript-descendant-filter_expression":function(e,t,n){var i=e.expression.value.slice(2,-1),a=r.parse(i).body[0].expression;return this.traverse(t,null,function(e,t){return h(a,{"@":t})},n)},"subscript-child-script_expression":function(e,t){return c(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return c(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return c(t,e.expression.value.slice(1,-1),"$..value")}},s.prototype._fns["subscript-child-string_literal"]=s.prototype._fns["member-child-identifier"],s.prototype._fns["member-descendant-numeric_literal"]=s.prototype._fns["subscript-descendant-string_literal"]=s.prototype._fns["member-descendant-identifier"],t.exports=s},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(e,t,n){var r=e("assert"),i=e("./dict"),a=e("./parser"),o=e("./handlers"),s=function(){this.initialize.apply(this,arguments)};function c(e){return"[object String]"==Object.prototype.toString.call(e)}s.prototype.initialize=function(){this.parser=new a,this.handlers=new o},s.prototype.parse=function(e){return r.ok(c(e),"we need a path"),this.parser.parse(e)},s.prototype.parent=function(e,t){r.ok(e instanceof Object,"obj needs to be an object"),r.ok(t,"we need a path");var n=this.nodes(e,t)[0];n.path.pop();return this.value(e,n.path)},s.prototype.apply=function(e,t,n){r.ok(e instanceof Object,"obj needs to be an object"),r.ok(t,"we need a path"),r.equal(typeof n,"function","fn needs to be function");var i=this.nodes(e,t).sort(function(e,t){return t.path.length-e.path.length});return i.forEach(function(t){var r=t.path.pop(),i=this.value(e,this.stringify(t.path)),a=t.value=n.call(e,i[r]);i[r]=a},this),i},s.prototype.value=function(e,t,n){if(r.ok(e instanceof Object,"obj needs to be an object"),r.ok(t,"we need a path"),arguments.length>=3){var i=this.nodes(e,t).shift();if(!i)return this._vivify(e,t,n);var a=i.path.slice(-1).shift();this.parent(e,this.stringify(i.path))[a]=n}return this.query(e,this.stringify(t),1).shift()},s.prototype._vivify=function(e,t,n){var i=this;r.ok(e instanceof Object,"obj needs to be an object"),r.ok(t,"we need a path");var a=this.parser.parse(t).map(function(e){return e.expression.value}),o=function(t,n){var r=t.pop(),a=i.value(e,t);a||(o(t.concat(),"string"==typeof r?{}:[]),a=i.value(e,t)),a[r]=n};return o(a,n),this.query(e,t)[0]},s.prototype.query=function(e,t,n){return r.ok(e instanceof Object,"obj needs to be an object"),r.ok(c(t),"we need a path"),this.nodes(e,t,n).map(function(e){return e.value})},s.prototype.paths=function(e,t,n){return r.ok(e instanceof Object,"obj needs to be an object"),r.ok(t,"we need a path"),this.nodes(e,t,n).map(function(e){return e.path})},s.prototype.nodes=function(e,t,n){if(r.ok(e instanceof Object,"obj needs to be an object"),r.ok(t,"we need a path"),0===n)return[];var i=this.parser.parse(t),a=this.handlers,o=[{path:["$"],value:e}],s=[];return i.length&&"root"==i[0].expression.type&&i.shift(),i.length?(i.forEach(function(e,t){if(!(s.length>=n)){var r=a.resolve(e),c=[];o.forEach(function(a){if(!(s.length>=n)){var o=r(e,a,n);t==i.length-1?s=s.concat(o||[]):c=c.concat(o||[])}}),o=c}}),n?s.slice(0,n):s):o},s.prototype.stringify=function(e){r.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach(function(e){if("root"!=e.expression.type){var r,i=[e.scope,e.operation].join("-"),a=n[i];if(r="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value,!a)throw new Error("couldn't find template "+i);t+=a.replace(/{{value}}/,r)}}),t},s.prototype._normalize=function(e){if(r.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);if(Array.isArray(e)&&"string"==typeof e[0]){var t=[{expression:{type:"root",value:"$"}}];return e.forEach(function(e,n){if("$"!=e||0!==n)if("string"==typeof e&&e.match("^"+i.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}});else{var r="number"==typeof e?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:e,type:r}})}}),t}if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},s.Handlers=o,s.Parser=a;var u=new s;u.JSONPath=s,t.exports=u},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,n){var r=e("./grammar"),i=e("../generated/parser"),a=function(){var e=new i.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e};a.grammar=r,t.exports=a},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,n){function r(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,n,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof n)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var a=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?r(i):1,n=n<0?a+n:n,t=r(0===(t=t<0?a+t:t)?0:t||(i>0?0:a-1)),n=r(0===n?0:n||(i>0?a:-1)),t=i>0?Math.max(0,t):Math.min(a,t),n=i>0?Math.min(n,a):Math.max(-1,n),i>0&&n<=t)return[];if(i<0&&t<=n)return[];for(var o=[],s=t;s!=n&&!(i<0&&s<=n||i>0&&s>=n);s+=i)o.push(e[s]);return o}},{}],8:[function(e,t,n){var r=e("util/"),i=Array.prototype.slice,a=Object.prototype.hasOwnProperty,o=t.exports=l;function s(e,t){return r.isUndefined(t)?""+t:r.isNumber(t)&&!isFinite(t)?t.toString():r.isFunction(t)||r.isRegExp(t)?t.toString():t}function c(e,t){return r.isString(e)?e.length<t?e:e.slice(0,t):e}function u(e,t,n,r,i){throw new o.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function l(e,t){e||u(e,!0,t,"==",o.ok)}function p(e,t){if(e===t)return!0;if(r.isBuffer(e)&&r.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return r.isDate(e)&&r.isDate(t)?e.getTime()===t.getTime():r.isRegExp(e)&&r.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:r.isObject(e)||r.isObject(t)?function(e,t){if(r.isNullOrUndefined(e)||r.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(r.isPrimitive(e)||r.isPrimitive(t))return e===t;var n=f(e),a=f(t);if(n&&!a||!n&&a)return!1;if(n)return e=i.call(e),t=i.call(t),p(e,t);var o,s,c=y(e),u=y(t);if(c.length!=u.length)return!1;for(c.sort(),u.sort(),s=c.length-1;s>=0;s--)if(c[s]!=u[s])return!1;for(s=c.length-1;s>=0;s--)if(o=c[s],!p(e[o],t[o]))return!1;return!0}(e,t):e==t}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function h(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function d(e,t,n,i){var a;r.isString(n)&&(i=n,n=null);try{t()}catch(o){a=o}if(i=(n&&n.name?" ("+n.name+").":".")+(i?" "+i:"."),e&&!a&&u(a,n,"Missing expected exception"+i),!e&&h(a,n)&&u(a,n,"Got unwanted exception"+i),e&&a&&n&&!h(a,n)||!e&&a)throw a}o.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=(t=this,c(JSON.stringify(t.actual,s),128)+" "+t.operator+" "+c(JSON.stringify(t.expected,s),128)),this.generatedMessage=!0);var n=e.stackStartFunction||u;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,a=n.name,o=i.indexOf("\n"+a);if(o>=0){var l=i.indexOf("\n",o+1);i=i.substring(l+1)}this.stack=i}}},r.inherits(o.AssertionError,Error),o.fail=u,o.ok=l,o.equal=function(e,t,n){e!=t&&u(e,t,n,"==",o.equal)},o.notEqual=function(e,t,n){e==t&&u(e,t,n,"!=",o.notEqual)},o.deepEqual=function(e,t,n){p(e,t)||u(e,t,n,"deepEqual",o.deepEqual)},o.notDeepEqual=function(e,t,n){p(e,t)&&u(e,t,n,"notDeepEqual",o.notDeepEqual)},o.strictEqual=function(e,t,n){e!==t&&u(e,t,n,"===",o.strictEqual)},o.notStrictEqual=function(e,t,n){e===t&&u(e,t,n,"!==",o.notStrictEqual)},o.throws=function(e,t,n){d.apply(this,[!0].concat(i.call(arguments)))},o.doesNotThrow=function(e,t){d.apply(this,[!1].concat(i.call(arguments)))},o.ifError=function(e){if(e)throw e};var y=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}},{"util/":11}],9:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],10:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],11:[function(e,n,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!g(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,a=r.length,o=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),c=r[n];n<a;c=r[++n])y(c)||!E(c)?o+=" "+c:o+=" "+s(c);return o},r.deprecate=function(e,i){if(v(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return function(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}};var a,o={};function s(e,t){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,e,n.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,t,n){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return g(i)||(i=l(e,i,n)),i}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(g(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(m(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,t);if(a)return a;var o=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),x(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(t);if(0===o.length){if(k(t)){var c=t.name?": "+t.name:"";return e.stylize("[Function"+c+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(x(t))return p(t)}var u,E="",I=!1,_=["{","}"];(h(t)&&(I=!0,_=["[","]"]),k(t))&&(E=" [Function"+(t.name?": "+t.name:"")+"]");return S(t)&&(E=" "+RegExp.prototype.toString.call(t)),b(t)&&(E=" "+Date.prototype.toUTCString.call(t)),x(t)&&(E=" "+p(t)),0!==o.length||I&&0!=t.length?n<0?S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=I?function(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)C(t,String(o))?a.push(f(e,t,n,r,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(f(e,t,n,r,i,!0))}),a}(e,t,n,s,o):o.map(function(r){return f(e,t,n,s,r,I)}),e.seen.pop(),function(e,t,n){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,E,_)):_[0]+E+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),C(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=y(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return"number"==typeof e}function g(e){return"string"==typeof e}function v(e){return void 0===e}function S(e){return E(e)&&"[object RegExp]"===I(e)}function E(e){return"object"==typeof e&&null!==e}function b(e){return E(e)&&"[object Date]"===I(e)}function x(e){return E(e)&&("[object Error]"===I(e)||e instanceof Error)}function k(e){return"function"==typeof e}function I(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(v(a)&&(a=""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=t.pid;o[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else o[e]=function(){};return o[e]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=d,r.isNull=y,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=g,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=S,r.isObject=E,r.isDate=b,r.isError=x,r.isFunction=k,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":"),[e.getDate(),w[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(e,t,n){},{}],13:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return(i?"/":"")+(n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"))||"."},n.normalize=function(e){var a=n.isAbsolute(e),o="/"===i(e,-1);return(e=t(r(e.split("/"),function(e){return!!e}),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),a=r(t.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},n.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:14}],14:[function(e,t,n){var r,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var u,l=[],p=!1,f=-1;function h(){p&&u&&(p=!1,u.length?l=u.concat(l):f=-1,l.length&&d())}function d(){if(!p){var e=c(h);p=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u&&u[f].run();f=-1,t=l.length}u=null,p=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new y(e,t)),1!==l.length||p||c(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],15:[function(e,t,n){var r=e("escodegen").generate;t.exports=function(e,t){t||(t={});var n={},i=function e(i,a){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var o=e(i.argument);return"+"===i.operator?+o:"-"===i.operator?-o:"~"===i.operator?~o:"!"===i.operator?!o:n}if("ArrayExpression"===i.type){for(var s=[],c=0,u=i.elements.length;c<u;c++){if((g=e(i.elements[c]))===n)return n;s.push(g)}return s}if("ObjectExpression"===i.type){var l={};for(c=0;c<i.properties.length;c++){var p=null===(v=i.properties[c]).value?v.value:e(v.value);if(p===n)return n;l[v.key.value||v.key.name]=p}return l}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((u=e(i.left))===n)return n;var f=e(i.right);if(f===n)return n;var h=i.operator;return"=="===h?u==f:"==="===h?u===f:"!="===h?u!=f:"!=="===h?u!==f:"+"===h?u+f:"-"===h?u-f:"*"===h?u*f:"/"===h?u/f:"%"===h?u%f:"<"===h?u<f:"<="===h?u<=f:">"===h?u>f:">="===h?u>=f:"|"===h?u|f:"&"===h?u&f:"^"===h?u^f:"&&"===h?u&&f:"||"===h?u||f:n}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:n;if("ThisExpression"===i.type)return{}.hasOwnProperty.call(t,"this")?t.this:n;if("CallExpression"===i.type){var d=e(i.callee);if(d===n)return n;if("function"!=typeof d)return n;var y=i.callee.object?e(i.callee.object):n;y===n&&(y=null);var m=[];for(c=0,u=i.arguments.length;c<u;c++){var g;if((g=e(i.arguments[c]))===n)return n;m.push(g)}return d.apply(y,m)}var v;if("MemberExpression"===i.type)return(l=e(i.object))===n||"function"==typeof l?n:"Identifier"===i.property.type?l[i.property.name]:(v=e(i.property))===n?n:l[v];if("ConditionalExpression"===i.type)return(o=e(i.test))===n?n:e(o?i.consequent:i.alternate);if("ExpressionStatement"===i.type)return(o=e(i.expression))===n?n:o;if("ReturnStatement"===i.type)return e(i.argument);if("FunctionExpression"===i.type){var S=i.body.body,E={};Object.keys(t).forEach(function(e){E[e]=t[e]});for(c=0;c<i.params.length;c++){var b=i.params[c];if("Identifier"!=b.type)return n;t[b.name]=null}for(var c in S)if(e(S[c])===n)return n;t=E;var x=Object.keys(t),k=x.map(function(e){return t[e]});return Function(x.join(", "),"return "+r(i)).apply(null,k)}if("TemplateLiteral"===i.type){var I="";for(c=0;c<i.expressions.length;c++)I+=e(i.quasis[c]),I+=e(i.expressions[c]);return I+=e(i.quasis[c])}if("TaggedTemplateExpression"===i.type){var _=e(i.tag),w=i.quasi,C=w.quasis.map(e),O=w.expressions.map(e);return _.apply(null,[C].concat(O))}return"TemplateElement"===i.type?i.value.cooked:n}(e);return i===n?void 0:i}},{escodegen:12}],jsonpath:[function(e,t,n){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")});
|
|
159
|
-
},{"process":"g5IB"}],"UCDv":[function(require,module,exports) {
|
|
160
|
-
"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
|
-
},{"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}();
|
|
163
|
-
},{}],"VgUi":[function(require,module,exports) {
|
|
164
|
-
"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
|
-
},{}],"EzAv":[function(require,module,exports) {
|
|
166
|
-
"use strict";function e(e,i,f){var r=JSON.parse(JSON.stringify(e));return f?n(r,i):t(r,i)}function n(e,n){return e.forEach(function(e){n.forEach(function(n){var t=e.fields.find(function(e){return e.element_id==n.element_id});t?t.field_value=n.field_value:(n.field_id=n.element_id,e.fields.push(n))})}),e}function t(e,n){return e.forEach(function(e){e.fields=[].concat(n)}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
167
|
-
},{}],"kvRt":[function(require,module,exports) {
|
|
168
|
-
function e(e){return e&&e.__esModule?e:{default:e}}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
169
|
-
},{}],"LNzP":[function(require,module,exports) {
|
|
170
|
-
function o(e){return module.exports=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},module.exports.__esModule=!0,module.exports.default=module.exports,o(e)}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
171
|
-
},{}],"Rltm":[function(require,module,exports) {
|
|
172
|
-
"use strict";function e(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default;
|
|
173
|
-
},{}],"wNNf":[function(require,module,exports) {
|
|
174
|
-
"use strict";function e(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default;
|
|
175
|
-
},{}],"dYQD":[function(require,module,exports) {
|
|
176
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var t=e(require("@babel/runtime/helpers/typeof")),r=e(require("../_lib/requiredArgs/index.js"));function a(e){(0,r.default)(1,arguments);var a=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,t.default)(e)&&"[object Date]"===a?new Date(e.getTime()):"number"==typeof e||"[object Number]"===a?new Date(e):("string"!=typeof e&&"[object String]"!==a||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}module.exports=exports.default;
|
|
177
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","@babel/runtime/helpers/typeof":"LNzP","../_lib/requiredArgs/index.js":"wNNf"}],"gKTe":[function(require,module,exports) {
|
|
178
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var r=e(require("../_lib/toInteger/index.js")),t=e(require("../toDate/index.js")),u=e(require("../_lib/requiredArgs/index.js"));function a(e,a){(0,u.default)(2,arguments);var i=(0,t.default)(e),l=(0,r.default)(a);return isNaN(l)?new Date(NaN):l?(i.setDate(i.getDate()+l),i):i}module.exports=exports.default;
|
|
179
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","../_lib/toInteger/index.js":"Rltm","../toDate/index.js":"dYQD","../_lib/requiredArgs/index.js":"wNNf"}],"aD4K":[function(require,module,exports) {
|
|
180
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var t=e(require("../_lib/toInteger/index.js")),r=e(require("../toDate/index.js")),u=e(require("../_lib/requiredArgs/index.js"));function a(e,a){(0,u.default)(2,arguments);var i=(0,r.default)(e),l=(0,t.default)(a);if(isNaN(l))return new Date(NaN);if(!l)return i;var n=i.getDate(),s=new Date(i.getTime());return s.setMonth(i.getMonth()+l+1,0),n>=s.getDate()?s:(i.setFullYear(s.getFullYear(),s.getMonth(),n),i)}module.exports=exports.default;
|
|
181
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","../_lib/toInteger/index.js":"Rltm","../toDate/index.js":"dYQD","../_lib/requiredArgs/index.js":"wNNf"}],"YNMJ":[function(require,module,exports) {
|
|
182
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var t=e(require("@babel/runtime/helpers/typeof")),r=e(require("../addDays/index.js")),u=e(require("../addMonths/index.js")),a=e(require("../toDate/index.js")),s=e(require("../_lib/requiredArgs/index.js")),d=e(require("../_lib/toInteger/index.js"));function i(e,i){if((0,s.default)(2,arguments),!i||"object"!==(0,t.default)(i))return new Date(NaN);var l=i.years?(0,d.default)(i.years):0,n=i.months?(0,d.default)(i.months):0,f=i.weeks?(0,d.default)(i.weeks):0,o=i.days?(0,d.default)(i.days):0,p=i.hours?(0,d.default)(i.hours):0,q=i.minutes?(0,d.default)(i.minutes):0,x=i.seconds?(0,d.default)(i.seconds):0,b=(0,a.default)(e),m=n||l?(0,u.default)(b,n+12*l):b,h=o||f?(0,r.default)(m,o+7*f):m,j=1e3*(x+60*(q+60*p));return new Date(h.getTime()+j)}module.exports=exports.default;
|
|
183
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","@babel/runtime/helpers/typeof":"LNzP","../addDays/index.js":"gKTe","../addMonths/index.js":"aD4K","../toDate/index.js":"dYQD","../_lib/requiredArgs/index.js":"wNNf","../_lib/toInteger/index.js":"Rltm"}],"QwsN":[function(require,module,exports) {
|
|
184
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDefaultOptions=t,exports.setDefaultOptions=o;var e={};function t(){return e}function o(t){e=t}
|
|
185
|
-
},{}],"kCXN":[function(require,module,exports) {
|
|
186
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var t=e(require("../addDays/index.js")),l=e(require("../toDate/index.js")),r=e(require("../_lib/toInteger/index.js")),i=e(require("../_lib/requiredArgs/index.js")),u=require("../_lib/defaultOptions/index.js");function n(e,n,d){var o,a,s,v,f,p,x,b;(0,i.default)(2,arguments);var q=(0,u.getDefaultOptions)(),w=(0,r.default)(null!==(o=null!==(a=null!==(s=null!==(v=null==d?void 0:d.weekStartsOn)&&void 0!==v?v:null==d?void 0:null===(f=d.locale)||void 0===f?void 0:null===(p=f.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==s?s:q.weekStartsOn)&&void 0!==a?a:null===(x=q.locale)||void 0===x?void 0:null===(b=x.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==o?o:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var O=(0,l.default)(e),c=(0,r.default)(n),j=O.getDay(),g=7-w,k=c<0||c>6?c-(j+g)%7:((c%7+7)%7+g)%7-(j+g)%7;return(0,t.default)(O,k)}module.exports=exports.default;
|
|
187
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","../addDays/index.js":"gKTe","../toDate/index.js":"dYQD","../_lib/toInteger/index.js":"Rltm","../_lib/requiredArgs/index.js":"wNNf","../_lib/defaultOptions/index.js":"QwsN"}],"Brhy":[function(require,module,exports) {
|
|
188
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var t=e(require("../toDate/index.js")),l=e(require("../_lib/toInteger/index.js")),r=e(require("../_lib/requiredArgs/index.js")),i=require("../_lib/defaultOptions/index.js");function o(e,o){var u,n,d,a,s,v,f,p;(0,r.default)(1,arguments);var b=(0,i.getDefaultOptions)(),w=(0,l.default)(null!==(u=null!==(n=null!==(d=null!==(a=null==o?void 0:o.weekStartsOn)&&void 0!==a?a:null==o?void 0:null===(s=o.locale)||void 0===s?void 0:null===(v=s.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==d?d:b.weekStartsOn)&&void 0!==n?n:null===(f=b.locale)||void 0===f?void 0:null===(p=f.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==u?u:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var x=(0,t.default)(e),O=x.getDay(),q=(O<w?7:0)+O-w;return x.setDate(x.getDate()-q),x.setHours(0,0,0,0),x}module.exports=exports.default;
|
|
189
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","../toDate/index.js":"dYQD","../_lib/toInteger/index.js":"Rltm","../_lib/requiredArgs/index.js":"wNNf","../_lib/defaultOptions/index.js":"QwsN"}],"DPrY":[function(require,module,exports) {
|
|
190
|
-
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var r=e(require("../startOfWeek/index.js")),t=e(require("../_lib/requiredArgs/index.js"));function u(e,u,i){(0,t.default)(2,arguments);var a=(0,r.default)(e,i),l=(0,r.default)(u,i);return a.getTime()===l.getTime()}module.exports=exports.default;
|
|
191
|
-
},{"@babel/runtime/helpers/interopRequireDefault":"kvRt","../startOfWeek/index.js":"Brhy","../_lib/requiredArgs/index.js":"wNNf"}],"VzfS":[function(require,module,exports) {
|
|
192
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkRecurringDate=d,exports.getDate=s,exports.populateWithDate=u;var e=r(require("date-fns/add/index.js")),t=r(require("date-fns/setDay/index.js")),a=r(require("date-fns/isSameWeek/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return e.forEach(function(e){t.forEach(function(t){var a=e.fields.find(function(e){return e.element_id==t.element_id});a?t.data_range?(t.date_type.includes("calendar"),a.field_value="".concat(n(t.date_type),":").concat(s(t.date_type))):a.field_value=s(t.date_type):e.fields.push({field_id:t.element_id,element_id:t.element_id,field_value:s(t.date_type)})})}),e}function n(t){var a=new Date;function r(e){var a,r=e.getDay();t.includes("week_current,current")&&(a=0),t.includes("week_next,future")&&(a=7),t.includes("week_past,past")&&(a=-7);var u=e.getDate()-r+a+(0==r?-6:1);return new Date(e.setDate(u))}function u(e){var a,r,u=Math.floor(e.getMonth()/3),n=e.getFullYear();return t.includes("quarter_current,current")&&(a=0,r=0),t.includes("quarter_next,future")&&(a=3,r=0),t.includes("quarter_past,past")&&(a=-3,r=0),new Date(n,3*u+a,1+r)}switch(t){case"week_current,current":return r(new Date).getTime();case"month_current,current":return new Date(a.getFullYear(),a.getMonth(),1).getTime();case"quarter_current,current":return u(new Date).getTime();case"year_current,current":return(0,e.default)(new Date(a.getFullYear(),0,1),{years:0}).getTime();case"week_next,future":return r(new Date).getTime();case"month_next,future":return new Date(a.getFullYear(),a.getMonth()+1,1).getTime();case"quarter_next,future":return u(new Date).getTime();case"year_next,future":return(0,e.default)(a,{days:0}).getTime();case"week_past,past":return r(new Date).getTime();case"month_past,past":return new Date(a.getFullYear(),a.getMonth()-1,1).getTime();case"quarter_past,past":return u(new Date).getTime();case"year_past,past":return(0,e.default)(a,{years:-1}).getTime();case"year_past,past,calendar":return(0,e.default)(new Date(a.getFullYear(),0,1),{years:-1}).getTime();case"year_future,future,calendar":return(0,e.default)(new Date(a.getFullYear()+1,0,1),{years:0}).getTime();case"today_current,current":return(0,e.default)(a,{days:0}).getTime();case"tomorrow,future":return(0,e.default)(a,{days:1}).getTime();case"7_days_future,future":case"10_days_future,future":case"14_days_future,future":case"30_days_future,future":return(0,e.default)(a,{days:0}).getTime();case"yesterday,past":return(0,e.default)(a,{days:-1}).getTime();case"7_days_past,past":return(0,e.default)(a,{days:-7}).getTime();case"10_days_past,past":return(0,e.default)(a,{days:-10}).getTime();case"14_days_past,past":return(0,e.default)(a,{days:-14}).getTime();case"30_days_past,past":return(0,e.default)(a,{days:-30}).getTime()}}function s(a){var r=new Date;var u,n,s,d=Math.floor(r.getMonth()/3),c=r.getFullYear();switch(a){case"next_day":return(0,e.default)(r,{days:1}).getTime();case"two_days_after":return(0,e.default)(r,{days:2}).getTime();case"three_days_after":return(0,e.default)(r,{days:3}).getTime();case"four_days_after":return(0,e.default)(r,{days:4}).getTime();case"next_week":return(0,e.default)(r,{weeks:1}).getTime();case"two_weeks_after":return(0,e.default)(r,{weeks:2}).getTime();case"three_weeks_after":return(0,e.default)(r,{weeks:3}).getTime();case"this_sunday":return(0,t.default)(r,0,{weekStartsOn:1});case"this_monday":return(0,t.default)(r,1,{weekStartsOn:1});case"this_tuesday":return(0,t.default)(r,2,{weekStartsOn:1});case"this_wednesday":return(0,t.default)(r,3,{weekStartsOn:1});case"this_thursday":return(0,t.default)(r,4,{weekStartsOn:1});case"this_friday":return(0,t.default)(r,5,{weekStartsOn:1});case"this_saturday":return(0,t.default)(r,6,{weekStartsOn:1});case"today_current,current":return(0,e.default)(r,{days:0}).getTime();case"tomorrow,future":return(0,e.default)(r,{days:1}).getTime();case"7_days_future,future":return(0,e.default)(r,{days:7}).getTime();case"10_days_future,future":return(0,e.default)(r,{days:10}).getTime();case"14_days_future,future":return(0,e.default)(r,{days:14}).getTime();case"30_days_future,future":return(0,e.default)(r,{days:30}).getTime();case"yesterday,past":return(0,e.default)(r,{days:-1}).getTime();case"7_days_past,past":case"10_days_past,past":case"14_days_past,past":case"30_days_past,past":return(0,e.default)(r,{days:0}).getTime();case"year_future,future,calendar":return(0,e.default)(new Date(r.getFullYear()+1,0,0),{years:1}).getTime();case"year_past,past,calendar":return(0,e.default)(new Date(r.getFullYear(),0,0),{years:0}).getTime();case"week_current,current":return(u=new Date,n=(u=new Date(u)).getDay(),s=u.getDate()-n+6+(0==n?6:1),new Date(u.setDate(s))).getTime();case"month_current,current":return new Date(r.getFullYear(),r.getMonth()+1,0).getTime();case"quarter_current,current":return new Date(c,3*(d+1),0).getTime();case"year_current,current":return(0,e.default)(new Date(r.getFullYear()+1,0,0),{years:0}).getTime();case"week_next,future":return function(e){var t=(e=new Date(e)).getDay(),a=e.getDate()-t+13+(0==t?-6:1);return new Date(e.setDate(a))}(new Date).getTime();case"month_next,future":return new Date(r.getFullYear(),r.getMonth()+2,0).getTime();case"quarter_next,future":return new Date(c,3*(d+1)+3,0).getTime();case"year_next,future":return(0,e.default)(r,{years:1}).getTime();case"week_past,past":return function(e){var t=(e=new Date(e)).getDay(),a=e.getDate()-t-1+(0==t?-6:1);return new Date(e.setDate(a))}(new Date).getTime();case"month_past,past":return new Date(r.getFullYear(),r.getMonth(),0,0).getTime();case"quarter_past,past":return new Date(c,3*(d+1)-3,0).getTime();case"year_past,past":return(0,e.default)(r,{days:0}).getTime();case"now":default:return r.getTime()}}function d(e,t){e=new Date(e);var r=new Date;switch(t){case"day":return e.getDate()+"."+e.getMonth()==r.getDate()+"."+r.getMonth();case"week":var u=(new Date).getFullYear(),n=new Date(u,e.getMonth(),e.getDate());return(0,a.default)(n,r);case"month":return e.getMonth()===r.getMonth();default:return!0}}
|
|
193
|
-
},{"date-fns/add/index.js":"YNMJ","date-fns/setDay/index.js":"kCXN","date-fns/isSameWeek/index.js":"DPrY"}],"EE1j":[function(require,module,exports) {
|
|
194
|
-
"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
|
-
},{}],"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;
|
|
197
|
-
},{}],"S7Iy":[function(require,module,exports) {
|
|
198
|
-
"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
|
-
},{}],"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}();
|
|
201
|
-
},{}],"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}();
|
|
203
|
-
},{}],"xR4c":[function(require,module,exports) {
|
|
204
|
-
"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
|
-
},{}],"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;
|
|
207
|
-
},{}],"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}();
|
|
209
|
-
},{}],"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}();
|
|
211
|
-
},{}],"AefJ":[function(require,module,exports) {
|
|
212
|
-
"use strict";function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareObjects=e;
|
|
213
|
-
},{}],"ndUf":[function(require,module,exports) {
|
|
214
|
-
"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},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(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),c=new N(n||[]);return a(i,"_invoke",{value:S(t,e,c)}),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 w(){}function b(){}function x(){}var L={};s(L,u,function(){return this});var E=Object.getPrototypeOf,j=E&&E(E(T([])));j&&j!==o&&i.call(j,u)&&(L=j);var O=x.prototype=w.prototype=Object.create(L);function _(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function k(r,e){function n(o,a,c,u){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,c,u)},function(t){n("throw",t,c,u)}):e.resolve(s).then(function(t){l.value=t,c(l)},function(t){return n("throw",t,c,u)})}u(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===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(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 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 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 G(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 T(r){if(r||""===r){var n=r[u];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(O,"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(O),t},n.awrap=function(t){return{__await:t}},_(k.prototype),s(k.prototype,f,function(){return this}),n.AsyncIterator=k,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new k(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(O,l,"Generator"),s(O,u,function(){return this}),s(O,"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=T,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(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 c.type="throw",c.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],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(u&&f){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(!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),G(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;G(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function e(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=n(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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,c=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==e.return||e.return()}finally{if(u)throw a}}}}function n(t,r){if(t){if("string"==typeof t)return o(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,r):void 0}}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function i(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 a(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var a=t.apply(r,e);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)})}}function c(t){return u.apply(this,arguments)}function u(){return(u=a(r().mark(function t(n){var o,i,a,u,l;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(n);case 2:o=!0,i=e(n),t.prev=4,i.s();case 6:if((a=i.n()).done){t.next=19;break}return u=a.value,t.next=10,f(u);case 10:if("pending"!==(l=t.sent).state){t.next=14;break}return o=!1,t.abrupt("break",19);case 14:if("rejected"!==l.state){t.next=17;break}throw l.reason;case 17:t.next=6;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(4),i.e(t.t0);case 24:return t.prev=24,i.f(),t.finish(24);case 27:if(!o){t.next=29;break}return t.abrupt("return",!0);case 29:return t.abrupt("return",c(n));case 30:case"end":return t.stop()}},t,null,[[4,21,24,27]])}))).apply(this,arguments)}function f(t){var r={state:"pending"};return Promise.race([t,r]).then(function(t){return t===r?t:{state:"resolved",value:t}},function(t){return{state:"rejected",reason:t}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.dynamicPromiseAll=c;
|
|
215
|
-
},{}],"Owq4":[function(require,module,exports) {
|
|
216
|
-
"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
|
-
},{}],"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}();
|
|
219
|
-
},{"./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 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)||!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
|
-
},{}],"UV2u":[function(require,module,exports) {
|
|
222
|
-
"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
|
-
},{}],"osSN":[function(require,module,exports) {
|
|
224
|
-
var define;
|
|
225
|
-
var global = arguments[3];
|
|
226
|
-
var define,global=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=createAngularModuleInstance;var _axios=_interopRequireDefault(require("axios")),_consts=require("./../consts.js");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,u=Object.create(a.prototype),i=new C(n||[]);return o(u,"_invoke",{value:S(e,r,i)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",p="suspendedYield",g="executing",h="completed",m={};function y(){}function v(){}function _(){}var x={};l(x,u,function(){return this});var w=Object.getPrototypeOf,b=w&&w(w(O([])));b&&b!==r&&n.call(b,u)&&(x=b);var L=_.prototype=y.prototype=Object.create(x);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function R(e,t){function r(o,a,u,i){var c=f(e[o],e,a);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_typeof(s)&&n.call(s,"__await")?t.resolve(s.__await).then(function(e){r("next",e,u,i)},function(e){r("throw",e,u,i)}):t.resolve(s).then(function(e){l.value=e,u(l)},function(e){return r("throw",e,u,i)})}i(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t(function(t,o){r(e,n,t,o)})}return a=a?a.then(o,o):o()}})}function S(t,r,n){var o=d;return function(a,u){if(o===g)throw new Error("Generator is already running");if(o===h){if("throw"===a)throw u;return{value:e,done:!0}}for(n.method=a,n.arg=u;;){var i=n.delegate;if(i){var c=k(i,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===d)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.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 a=f(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var u=a.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,m):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(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 M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function O(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 o=-1,a=function r(){for(;++o<t.length;)if(n.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(_typeof(t)+" is not iterable")}return v.prototype=_,o(L,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:v,configurable:!0}),v.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},E(R.prototype),l(R.prototype,i,function(){return this}),t.AsyncIterator=R,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var u=new R(s(e,r,n,o),a);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},E(L),l(L,c,"Generator"),l(L,u,function(){return this}),l(L,"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=O,C.prototype={constructor:C,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(M),!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 o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],i=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),l=n.call(u,"finallyLoc");if(c&&l){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):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),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),M(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 o=n.arg;M(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function asyncGeneratorStep(e,t,r,n,o,a,u){try{var i=e[a](u),c=i.value}catch(l){return void r(l)}i.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function u(e){asyncGeneratorStep(a,n,o,u,i,"next",e)}function i(e){asyncGeneratorStep(a,n,o,u,i,"throw",e)}u(void 0)})}}function _typeof(e){return(_typeof="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)}var $q={when:function(e){return new Promise(function(t){t(e)})}},factoryReturns={},angular={module:function(){return angular},directive:function(){return angular},factory:function(e,t){try{"object"===_typeof(t)?factoryReturns[e]=t[t.length-1]($q):factoryReturns[e]=t($q)}catch(r){console.log("Errror in data type: ",e),console.log(r)}return angular},service:function(){return angular},run:function(){return angular},filter:function(){return angular},controller:function(){return angular},value:function(){return angular},element:function(){return angular},injector:function(){return angular},invoke:function(){return angular}};function createAngularModuleInstance(e,t,r,n,o){return _createAngularModuleInstance.apply(this,arguments)}function _createAngularModuleInstance(){return _createAngularModuleInstance=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(gudhub,module_id,module_url,angularInjector,nodeWindow){var angularModule,importedClass,module,_module,proxy,response,code,encodedCode,_module2,result;return _regeneratorRuntime().wrap(function _callee5$(_context5){for(;;)switch(_context5.prev=_context5.next){case 0:if(_context5.prev=0,!_consts.IS_WEB){_context5.next=25;break}if(!window.angular){_context5.next=17;break}if(angularInjector.has(module_id)){_context5.next=6;break}return _context5.next=6,angularInjector.get("$ocLazyLoad").load(module_url);case 6:return _context5.next=8,angularInjector.get(module_id);case 8:return angularModule=_context5.sent,_context5.next=11,_axios.default.get(module_url);case 11:module=_context5.sent,module=module.data;try{eval(module)}catch(error){console.error("ERROR WHILE EVAL() IN GHCONSTRUCTOR. MODULE ID: ".concat(module_id)),console.log(error)}importedClass=factoryReturns[module_id],_context5.next=23;break;case 17:return _context5.next=19,_axios.default.get(module_url);case 19:_module=_context5.sent,_module=_module.data;try{eval(_module)}catch(err){console.log("Error while importing module: ".concat(module_id)),console.log(err)}importedClass=factoryReturns[module_id];case 23:_context5.next=44;break;case 25:return proxy=new Proxy(nodeWindow,{get:function(e,t){return e[t]},set:function(e,t,r){return e[t]=r,global[t]=r,!0}}),global.hasOwnProperty("window")||(global.window=proxy,global.document=nodeWindow.document,global.Element=nodeWindow.Element,global.CharacterData=nodeWindow.CharacterData,global.this=proxy,global.self=proxy,global.Blob=nodeWindow.Blob,global.Node=nodeWindow.Node,global.navigator=nodeWindow.navigator,global.HTMLElement=nodeWindow.HTMLElement,global.XMLHttpRequest=nodeWindow.XMLHttpRequest,global.WebSocket=nodeWindow.WebSocket,global.crypto=nodeWindow.crypto,global.DOMParser=nodeWindow.DOMParser,global.Symbol=nodeWindow.Symbol,global.document.queryCommandSupported=function(e){return!1},global.angular=angular),_context5.next=29,_axios.default.get(module_url);case 29:return response=_context5.sent,code=response.data,encodedCode=encodeURIComponent(code),encodedCode="data:text/javascript;charset=utf-8,"+encodedCode,_context5.prev=33,_context5.next=36,import(encodedCode);case 36:_module2=_context5.sent,_context5.next=43;break;case 39:_context5.prev=39,_context5.t0=_context5.catch(33),console.log("Error while importing module: ".concat(module_id)),console.log(_context5.t0);case 43:importedClass=new _module2.default;case 44:return result={type:module_id,getTemplate:function(e,t,r,n,o,a){var u="false"!==r;return importedClass.getTemplate(e,t,u,n,o,a)},getDefaultValue:function(e,t,r,n){return new Promise(function(){var o=_asyncToGenerator(_regeneratorRuntime().mark(function o(a){var u,i;return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(u=importedClass.getDefaultValue)){o.next=8;break}return o.next=4,u(e,t,r,n);case 4:i=o.sent,a(i),o.next=9;break;case 8:a(null);case 9:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}())},getSettings:function(e,t,r){return importedClass.getSettings(e,t,r)},filter:{getSearchOptions:function(e){var t=importedClass;return t.filter&&t.filter.getSearchOptions?importedClass.filter.getSearchOptions(e)||null:[]},getDropdownValues:function(){var e=importedClass;return e.filter&&e.filter.getDropdownValues?e.filter.getDropdownValues()||null:[]}},getInterpretation:function(e,t,r,n,o,a){return new Promise(function(){var u=_asyncToGenerator(_regeneratorRuntime().mark(function u(i){var c,l,s,f;return _regeneratorRuntime().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return c=importedClass,u.prev=1,u.next=4,c.getInterpretation(gudhub,e,a,o,n,r);case 4:return l=u.sent,s=l.find(function(e){return e.id==t})||l.find(function(e){return"default"==e.id}),u.next=8,s.content();case 8:f=u.sent,i({html:f}),u.next=16;break;case 12:u.prev=12,u.t0=u.catch(1),console.log("ERROR IN ".concat(module_id),u.t0),i({html:"<span>no interpretation</span>"});case 16:case"end":return u.stop()}},u,null,[[1,12]])}));return function(e){return u.apply(this,arguments)}}())},getInterpretationsList:function(e,t,r,n){return importedClass.getInterpretation(e,t,r,n)},getInterpretatedValue:function(e,t,r,n){return new Promise(function(){var o=_asyncToGenerator(_regeneratorRuntime().mark(function o(a){var u,i;return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(u=importedClass.getInterpretatedValue)){o.next=8;break}return o.next=4,u(e,t,r,n);case 4:i=o.sent,a(i),o.next=9;break;case 8:a(e);case 9:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}())},onMessage:function(e,t,r){return new Promise(function(){var n=_asyncToGenerator(_regeneratorRuntime().mark(function n(o){var a,u;return _regeneratorRuntime().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a=importedClass.onMessage)){n.next=6;break}return n.next=4,a(e,t,r);case 4:u=n.sent,o(u);case 6:o(null);case 7:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}())}},_consts.IS_WEB&&(result.extendController=function(e){angularModule.getActionScope(e)},result.runAction=function(e){try{angularModule.runAction(e)}catch(t){}},result.getWindowScope=function(e){return angularModule.getWindowScope(e)},result.getWindowHTML=function(e){return angularModule.getWindowHTML(e)}),_context5.abrupt("return",result);case 49:_context5.prev=49,_context5.t1=_context5.catch(0),console.log(_context5.t1),console.log("Failed in createAngularModuleInstance (ghconstructor). Module id: ".concat(module_id,"."));case 53:case"end":return _context5.stop()}},_callee5,null,[[0,49],[33,39]])})),_createAngularModuleInstance.apply(this,arguments)}
|
|
227
|
-
},{"axios":"O4Aa","./../consts.js":"UV2u"}],"DsUm":[function(require,module,exports) {
|
|
228
|
-
var define;
|
|
229
|
-
var global = arguments[3];
|
|
230
|
-
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
|
-
},{"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}();
|
|
233
|
-
},{"./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",_="executing",g="completed",m={};function y(){}function w(){}function b(){}var A={};c(A,p,function(){return this});var x=Object.getPrototypeOf,S=x&&x(x(F([])));S&&S!==n&&i.call(S,p)&&(A=S);var k=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===_)throw new Error("Generator is already running");if(i===g){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=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=_;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?g:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=g,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(k,"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(k),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(k),c(k,u,"Generator"),c(k,p,function(){return this}),c(k,"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 _(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 g(t,e,r){return e&&_(t.prototype,e),r&&_(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 g(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:"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.dataService.getApp(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.dataService.getApp(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
|
-
},{"../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}();
|
|
237
|
-
},{"../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}();
|
|
239
|
-
},{}],"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}();
|
|
241
|
-
},{}],"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}();
|
|
243
|
-
},{}],"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}();
|
|
245
|
-
},{"../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}();
|
|
247
|
-
},{}],"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}();
|
|
249
|
-
},{}],"sPce":[function(require,module,exports) {
|
|
250
|
-
"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
|
-
},{}],"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}();
|
|
253
|
-
},{}],"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}();
|
|
255
|
-
},{}],"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}();
|
|
257
|
-
},{"../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}();
|
|
259
|
-
},{}],"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}();
|
|
261
|
-
},{}],"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)});
|
|
263
|
-
},{}],"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)}();
|
|
265
|
-
},{"./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)}();
|
|
267
|
-
},{"./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:"/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
|
-
},{}],"hg0N":[function(require,module,exports) {
|
|
270
|
-
"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
|
-
},{}],"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)});
|
|
273
|
-
},{}],"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){try{return t instanceof a||t instanceof n.HttpService}catch(r){return!1}}}]),a}(r.AppDataService,Symbol.hasInstance);
|
|
275
|
-
},{"../../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,this.requestCache=new Map});
|
|
277
|
-
},{}],"YqNA":[function(require,module,exports) {
|
|
278
|
-
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 p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function l(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=l;var v="suspendedStart",y="suspendedYield",d="executing",b="completed",g={};function m(){}function w(){}function x(){}var j={};p(j,u,function(){return this});var O=Object.getPrototypeOf,S=O&&O(O(T([])));S&&S!==r&&n.call(S,u)&&(j=S);var E=x.prototype=m.prototype=Object.create(j);function L(t){["next","throw","return"].forEach(function(e){p(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,p=f.value;return p&&"object"==a(p)&&n.call(p,"__await")?e.resolve(p.__await).then(function(t){r("next",t,c,u)},function(t){r("throw",t,c,u)}):e.resolve(p).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 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 D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,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=p(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,p(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(_.prototype),p(_.prototype,s,function(){return this}),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(E),p(E,f,"Generator"),p(E,u,function(){return this}),p(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(D),!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),D(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;D(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 p(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&&p(t.prototype,e),r&&p(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),l(r,[{key:"getApp",value:function(){var t=s(c().mark(function t(e){var r,n,o,i=this;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.requestCache.has(e)){t.next=2;break}return t.abrupt("return",this.requestCache.get(e));case 2:return(r=this.dataService.getApp(e)).then(function(t){return i.putApp(e,t)}),t.prev=4,n=this,o=new Promise(function(){var t=s(c().mark(function t(r,o){var i,a,u,s;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.openDatabase();case 3:i=t.sent,a=i.transaction(n.store,"readonly"),u=a.objectStore(n.store),(s=u.get(e)).onsuccess=function(t){var e=t.target.result;e||o(),e&&r(e)},s.onerror=o,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),o();case 14:case"end":return t.stop()}},t,null,[[0,11]])}));return function(e,r){return t.apply(this,arguments)}}()),n.requestCache.set(e,o),t.next=10,o;case 10:return t.abrupt("return",o);case 13:return t.prev=13,t.t0=t.catch(4),this.requestCache.set(e,r),t.abrupt("return",r);case 17:case"end":return t.stop()}},t,this,[[4,13]])}));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){try{return t instanceof r||t instanceof i.IndexedDBService}catch(e){return!1}}}]),r}(e.AppDataService,Symbol.hasInstance);
|
|
280
|
-
},{"../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 _(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function k(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(k.prototype,f,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()})},_(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){try{return t instanceof a||t instanceof n.HttpService}catch(r){return!1}}}]),a}(r.ChunkDataService,Symbol.hasInstance);
|
|
282
|
-
},{"../../api/ChunkApi.js":"baS4","../ChunkDataService.js":"VAmb","../utils.js":"hg0N","./HttpService.js":"t7L1"}],"KFHD":[function(require,module,exports) {
|
|
283
|
-
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 h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function l(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=l;var v="suspendedStart",y="suspendedYield",d="executing",b="completed",g={};function m(){}function w(){}function x(){}var j={};h(j,c,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(T([])));k&&k!==r&&n.call(k,c)&&(j=k);var S=x.prototype=m.prototype=Object.create(j);function E(t){["next","throw","return"].forEach(function(e){h(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,h=f.value;return h&&"object"==i(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){r("next",t,u,c)},function(t){r("throw",t,u,c)}):e.resolve(h).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 C(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 D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,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(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=h(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,h(t,f,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},E(L.prototype),h(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(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(S),h(S,f,"Generator"),h(S,c,function(){return this}),h(S,"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(D),!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),D(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;D(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,l(n.key),n)}}function h(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(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),h(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;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.requestCache.has(r)){t.next=2;break}return t.abrupt("return",this.requestCache.get(r));case 2:return t.prev=2,n=this,o=new Promise(function(){var t=c(a().mark(function t(e,o){var i,u,c,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.openDatabase();case 3:i=t.sent,u=i.transaction(n.store,"readonly"),c=u.objectStore(n.store),(s=c.get(r)).onsuccess=function(t){var r=t.target.result;r||o(),r&&e(r)},s.onerror=o,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),o();case 14:case"end":return t.stop()}},t,null,[[0,11]])}));return function(e,r){return t.apply(this,arguments)}}()),n.requestCache.set(r,o),t.next=8,o;case 8:return t.abrupt("return",o);case 11:return t.prev=11,t.t0=t.catch(2),i=this.dataService.getChunk(e,r),this.requestCache.set(r,i),t.next=17,i;case 17:return u=t.sent,this.putChunk(r,u),t.abrupt("return",i);case 20:case"end":return t.stop()}},t,this,[[2,11]])}));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){try{return t instanceof i||t instanceof o.IndexedDBService}catch(e){return!1}}}]),i}(e.ChunkDataService,Symbol.hasInstance);
|
|
285
|
-
},{"../ChunkDataService.js":"VAmb","../httpService/ChunkHttpService.js":"Q7LR","../utils.js":"hg0N","./IndexedDBService.js":"vsBf"}],"QBs9":[function(require,module,exports) {
|
|
286
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.dbVersion=exports.dbName=void 0;var e=exports.dbName="gudhub",r=exports.dbVersion=7;
|
|
287
|
-
},{}],"NKir":[function(require,module,exports) {
|
|
288
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.appsConf=void 0;var e=require("./consts.js"),s=exports.appsConf={dbName:e.dbName,dbVersion:e.dbVersion,store:"apps"};
|
|
289
|
-
},{"./consts.js":"QBs9"}],"YaEO":[function(require,module,exports) {
|
|
290
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.chunksConf=void 0;var e=require("./consts.js"),s=exports.chunksConf={dbName:e.dbName,dbVersion:e.dbVersion,store:"chunks"};
|
|
291
|
-
},{"./consts.js":"QBs9"}],"BtEV":[function(require,module,exports) {
|
|
292
|
-
"use strict";var e=require("../../consts.js"),r=require("./appDataConf.js"),t=require("./chunkDataConf.js"),n=require("./consts.js");if(e.IS_WEB){var s=indexedDB.open(n.dbName,n.dbVersion);s.onupgradeneeded=function(e){for(var n=e.target.result,s=0,o=[r.appsConf.store,t.chunksConf.store];s<o.length;s++){var a=o[s];n.objectStoreNames.contains(a)||n.createObjectStore(a)}}}
|
|
293
|
-
},{"../../consts.js":"UV2u","./appDataConf.js":"NKir","./chunkDataConf.js":"YaEO","./consts.js":"QBs9"}],"F1EO":[function(require,module,exports) {
|
|
294
|
-
"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
|
-
},{"../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,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)||!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
|
-
},{"./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
|
-
"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
|
-
},{"regenerator-runtime/runtime.js":"KA2S","./GUDHUB/gudhub.js":"U9gy"}]},{},["iRRN"], "GudHubLibrary")
|
|
300
|
-
//# sourceMappingURL=/library.min.js.map
|
|
1
|
+
/*! For license information please see library.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GudHubLibrary=t():e.GudHubLibrary=t()}(this,(()=>(()=>{var __webpack_modules__={9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var n=r(4867),i=r(6026),a=r(4372),o=r(5327),s=r(4097),l=r(4109),c=r(7985),u=r(5061);e.exports=function(e){return new Promise((function(t,r){var p=e.data,d=e.headers,h=e.responseType;n.isFormData(p)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+g)}var y=s(e.baseURL,e.url);function _(){if(f){var n="getAllResponseHeaders"in f?l(f.getAllResponseHeaders()):null,a={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};i(t,r,a),f=null}}if(f.open(e.method.toUpperCase(),o(y,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=_:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(_)},f.onabort=function(){f&&(r(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){r(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(y))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}"setRequestHeader"in f&&n.forEach(d,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),h&&"json"!==h&&(f.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),r(e),f=null)})),p||(p=null),f.send(p)}))}},1609:(e,t,r)=>{"use strict";var n=r(4867),i=r(1849),a=r(321),o=r(7185);function s(e){var t=new a(e),r=i(a.prototype.request,t);return n.extend(r,a.prototype,t),n.extend(r,t),r}var l=s(r(5655));l.Axios=a,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=r(5263),l.CancelToken=r(4972),l.isCancel=r(6502),l.all=function(e){return Promise.all(e)},l.spread=r(8713),l.isAxiosError=r(6268),e.exports=l,e.exports.default=l},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,r)=>{"use strict";var n=r(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(4867),i=r(5327),a=r(782),o=r(3572),s=r(7185),l=r(4875),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!n){var u=[o,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(a),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var p=e;r.length;){var d=r.shift(),h=r.shift();try{p=d(p)}catch(e){h(e);break}}try{i=o(p)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=u},782:(e,t,r)=>{"use strict";var n=r(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,r)=>{"use strict";var n=r(1793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},5061:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,i,a){var o=new Error(e);return n(o,t,r,i,a)}},3572:(e,t,r)=>{"use strict";var n=r(4867),i=r(8527),a=r(6502),o=r(5655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){t=t||{};var r={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["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 l(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=l(void 0,e[i])):r[i]=l(e[i],t[i])}n.forEach(i,(function(e){n.isUndefined(t[e])||(r[e]=l(void 0,t[e]))})),n.forEach(a,c),n.forEach(o,(function(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=l(void 0,e[i])):r[i]=l(void 0,t[i])})),n.forEach(s,(function(n){n in t?r[n]=l(e[n],t[n]):n in e&&(r[n]=l(void 0,e[n]))}));var u=i.concat(a).concat(o).concat(s),p=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return n.forEach(p,c),r}},6026:(e,t,r)=>{"use strict";var n=r(5061);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var n=r(4867),i=r(5655);e.exports=function(e,t,r){var a=this||i;return n.forEach(r,(function(r){e=r.call(a,e,t)})),e}},5655:(e,t,r)=>{"use strict";var n=r(4867),i=r(6016),a=r(481),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=r(5448)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(o)})),e.exports=c},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},5327:(e,t,r)=>{"use strict";var n=r(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4109:(e,t,r)=>{"use strict";var n=r(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,r)=>{"use strict";var n=r(8593),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var a={},o=n.version.split(".");function s(e,t){for(var r=t?t.split("."):o,n=e.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}i.transitional=function(e,t,r){var i=t&&s(t);function o(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new Error(o(n," has been removed in "+t));return i&&!a[n]&&(a[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var a=n[i],o=t[a];if(o){var s=e[a],l=void 0===s||o(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==r)throw Error("Unknown option "+a)}},validators:i}},4867:(e,t,r)=>{"use strict";var n=r(1849),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:l,isUndefined:o,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function r(r,n){l(t[n])&&l(r)?t[n]=e(t[n],r):l(r)?t[n]=e({},r):a(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)u(arguments[n],r);return t},extend:function(e,t,r){return u(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),a=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),a=r(7771),o=r(4453),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),u=r(4429),p=i("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new o("a function is required");var t=c(n,l,arguments);return a(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(n,s,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},8729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultOptions=function(){return r},t.setDefaultOptions=function(e){r=e};var r={}},8734:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default},2084:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default},5430:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,l.default)(2,arguments),!t||"object"!==(0,i.default)(t))return new Date(NaN);var r=t.years?(0,c.default)(t.years):0,n=t.months?(0,c.default)(t.months):0,u=t.weeks?(0,c.default)(t.weeks):0,p=t.days?(0,c.default)(t.days):0,d=t.hours?(0,c.default)(t.hours):0,h=t.minutes?(0,c.default)(t.minutes):0,f=t.seconds?(0,c.default)(t.seconds):0,m=(0,s.default)(e),g=n||r?(0,o.default)(m,n+12*r):m,y=p||u?(0,a.default)(g,p+7*u):g,_=1e3*(f+60*(h+60*d));return new Date(y.getTime()+_)};var i=n(r(8698)),a=n(r(7262)),o=n(r(6581)),s=n(r(1171)),l=n(r(8734)),c=n(r(2084));e.exports=t.default},7262:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var r=(0,a.default)(e),n=(0,i.default)(t);return isNaN(n)?new Date(NaN):n?(r.setDate(r.getDate()+n),r):r};var i=n(r(2084)),a=n(r(1171)),o=n(r(8734));e.exports=t.default},6581:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var r=(0,a.default)(e),n=(0,i.default)(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var s=r.getDate(),l=new Date(r.getTime());return l.setMonth(r.getMonth()+n+1,0),s>=l.getDate()?l:(r.setFullYear(l.getFullYear(),l.getMonth(),s),r)};var i=n(r(2084)),a=n(r(1171)),o=n(r(8734));e.exports=t.default},5276:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,a.default)(2,arguments);var n=(0,i.default)(e,r),o=(0,i.default)(t,r);return n.getTime()===o.getTime()};var i=n(r(2466)),a=n(r(8734));e.exports=t.default},8933:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n,c,u,p,d,h,f,m;(0,s.default)(2,arguments);var g=(0,l.getDefaultOptions)(),y=(0,o.default)(null!==(n=null!==(c=null!==(u=null!==(p=null==r?void 0:r.weekStartsOn)&&void 0!==p?p:null==r||null===(d=r.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==u?u:g.weekStartsOn)&&void 0!==c?c:null===(f=g.locale)||void 0===f||null===(m=f.options)||void 0===m?void 0:m.weekStartsOn)&&void 0!==n?n:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=(0,a.default)(e),b=(0,o.default)(t),v=_.getDay(),w=7-y,S=b<0||b>6?b-(v+w)%7:((b%7+7)%7+w)%7-(v+w)%7;return(0,i.default)(_,S)};var i=n(r(7262)),a=n(r(1171)),o=n(r(2084)),s=n(r(8734)),l=r(8729);e.exports=t.default},2466:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,n,l,c,u,p,d,h;(0,o.default)(1,arguments);var f=(0,s.getDefaultOptions)(),m=(0,a.default)(null!==(r=null!==(n=null!==(l=null!==(c=null==t?void 0:t.weekStartsOn)&&void 0!==c?c:null==t||null===(u=t.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==l?l:f.weekStartsOn)&&void 0!==n?n:null===(d=f.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==r?r:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,i.default)(e),y=g.getDay(),_=(y<m?7:0)+y-m;return g.setDate(g.getDate()-_),g.setHours(0,0,0,0),g};var i=n(r(1171)),a=n(r(2084)),o=n(r(8734)),s=r(8729);e.exports=t.default},1171:(e,t,r)=>{"use strict";var n=r(4836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,i.default)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))};var i=n(r(8698)),a=n(r(8734));e.exports=t.default},2296:(e,t,r)=>{"use strict";var n=r(4429),i=r(3464),a=r(4453),o=r(7296);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!o&&o(e,t);if(n)n(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===s&&p?p.enumerable:!s,value:r,writable:null===l&&p?p.writable:!l});else{if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},4429:(e,t,r)=>{"use strict";var n=r(210)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},3981:e=>{"use strict";e.exports=EvalError},1648:e=>{"use strict";e.exports=Error},4726:e=>{"use strict";e.exports=RangeError},6712:e=>{"use strict";e.exports=ReferenceError},3464:e=>{"use strict";e.exports=SyntaxError},4453:e=>{"use strict";e.exports=TypeError},3915:e=>{"use strict";e.exports=URIError},7648:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var a,o=function(e,t){for(var r=[],n=1,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r}(arguments),s=r(0,i.length-o.length),l=[],c=0;c<s;c++)l[c]="$"+c;if(a=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=",");return r}(l)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof a){var t=i.apply(this,n(o,arguments));return Object(t)===t?t:this}return i.apply(e,n(o,arguments))})),i.prototype){var u=function(){};u.prototype=i.prototype,a.prototype=new u,u.prototype=null}return a}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,i=r(1648),a=r(3981),o=r(4726),s=r(6712),l=r(3464),c=r(4453),u=r(3915),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var f=function(){throw new c},m=h?function(){try{return f}catch(e){try{return h(arguments,"callee").get}catch(e){return f}}}():f,g=r(1405)(),y=r(8185)(),_=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),b={},v="undefined"!=typeof Uint8Array&&_?_(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&_?_([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&_?_(_([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&_?_((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&_?_((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&_?_(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":v,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(_)try{null.error}catch(e){var S=_(_(e));w["%Error.prototype%"]=S}var E=function e(t){var r;if("%AsyncFunction%"===t)r=d("async function () {}");else if("%GeneratorFunction%"===t)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=d("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&_&&(r=_(i.prototype))}return w[t]=r,r},x={__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"]},k=r(8612),A=r(8824),I=k.call(Function.call,Array.prototype.concat),j=k.call(Function.apply,Array.prototype.splice),O=k.call(Function.call,String.prototype.replace),P=k.call(Function.call,String.prototype.slice),T=k.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,L=function(e,t){var r,n=e;if(A(x,n)&&(n="%"+(r=x[n])[0]+"%"),A(w,n)){var i=w[n];if(i===b&&(i=E(n)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=P(e,0,1),r=P(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,C,(function(e,t,r,i){n[n.length]=r?O(i,N,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=L("%"+n+"%",t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(n=u[0],j(r,I([0,1],u)));for(var p=1,d=!0;p<r.length;p+=1){var f=r[p],m=P(f,0,1),g=P(f,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==f&&d||(s=!0),A(w,a="%"+(n+="."+f)+"%"))o=w[a];else if(null!=o){if(!(f in o)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&p+1>=r.length){var y=h(o,f);o=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:o[f]}else d=A(o,f),o=o[f];d&&!s&&(w[a]=o)}}return o}},7296:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1044:(e,t,r)=>{"use strict";var n=r(4429),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},8185:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},8824:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,a=r(8612);e.exports=a.call(n,i)},9832:(e,t,r)=>{e.exports=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,r,n)}return r[o].exports}for(var a=void 0,o=0;o<n.length;o++)i(n[o]);return i}({"./aesprim":[function(e,t,r){!function(e,t){"use strict";t(void 0!==r?r:e.esprima={})}(this,(function(e){"use strict";var t,r,n,i,a,o,s,l,c,u,p,d,h,f,m,g,y,_;function b(e,t){if(!e)throw new Error("ASSERT: "+t)}function v(e){return e>=48&&e<=57}function w(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function S(e){return"01234567".indexOf(e)>=0}function E(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function x(e){return 10===e||13===e||8232===e||8233===e}function k(e){return 64==e||36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&s.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function A(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&s.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function I(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function j(e){return"eval"===e||"arguments"===e}function O(e){if(u&&I(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function P(e,t,r,n,i){var a;b("number"==typeof r,"Comment must have valid position"),y.lastCommentStart>=r||(y.lastCommentStart=r,a={type:e,value:t},_.range&&(a.range=[r,n]),_.loc&&(a.loc=i),_.comments.push(a),_.attachComment&&(_.leadingComments.push(a),_.trailingComments.push(a)))}function T(e){var t,r,n,i;for(t=p-e,r={start:{line:d,column:p-h-e}};p<f;)if(n=c.charCodeAt(p),++p,x(n))return _.comments&&(i=c.slice(t+e,p-1),r.end={line:d,column:p-h-1},P("Line",i,t,p-1,r)),13===n&&10===c.charCodeAt(p)&&++p,++d,void(h=p);_.comments&&(i=c.slice(t+e,p),r.end={line:d,column:p-h},P("Line",i,t,p,r))}function C(){var e,t,r,n;for(_.comments&&(e=p-2,t={start:{line:d,column:p-h-2}});p<f;)if(x(r=c.charCodeAt(p)))13===r&&10===c.charCodeAt(p+1)&&++p,++d,++p,h=p,p>=f&&J({},o.UnexpectedToken,"ILLEGAL");else if(42===r){if(47===c.charCodeAt(p+1))return++p,++p,void(_.comments&&(n=c.slice(e+2,p-2),t.end={line:d,column:p-h},P("Block",n,e,p,t)));++p}else++p;J({},o.UnexpectedToken,"ILLEGAL")}function N(){var e,t;for(t=0===p;p<f;)if(E(e=c.charCodeAt(p)))++p;else if(x(e))++p,13===e&&10===c.charCodeAt(p)&&++p,++d,h=p,t=!0;else if(47===e)if(47===(e=c.charCodeAt(p+1)))++p,++p,T(2),t=!0;else{if(42!==e)break;++p,++p,C()}else if(t&&45===e){if(45!==c.charCodeAt(p+1)||62!==c.charCodeAt(p+2))break;p+=3,T(3)}else{if(60!==e)break;if("!--"!==c.slice(p+1,p+4))break;++p,++p,++p,++p,T(4)}}function L(e){var t,r,n,i=0;for(r="u"===e?4:2,t=0;t<r;++t){if(!(p<f&&w(c[p])))return"";n=c[p++],i=16*i+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(i)}function M(){var e,t;for(e=c.charCodeAt(p++),t=String.fromCharCode(e),92===e&&(117!==c.charCodeAt(p)&&J({},o.UnexpectedToken,"ILLEGAL"),++p,(e=L("u"))&&"\\"!==e&&k(e.charCodeAt(0))||J({},o.UnexpectedToken,"ILLEGAL"),t=e);p<f&&A(e=c.charCodeAt(p));)++p,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==c.charCodeAt(p)&&J({},o.UnexpectedToken,"ILLEGAL"),++p,(e=L("u"))&&"\\"!==e&&A(e.charCodeAt(0))||J({},o.UnexpectedToken,"ILLEGAL"),t+=e);return t}function F(){var e,t;for(e=p++;p<f;){if(92===(t=c.charCodeAt(p)))return p=e,M();if(!A(t))break;++p}return c.slice(e,p)}function R(){var e,r,n,i,a=p,s=c.charCodeAt(p),l=c[p];switch(s){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++p,_.tokenize&&(40===s?_.openParenToken=_.tokens.length:123===s&&(_.openCurlyToken=_.tokens.length)),{type:t.Punctuator,value:String.fromCharCode(s),lineNumber:d,lineStart:h,start:a,end:p};default:if(61===(e=c.charCodeAt(p+1)))switch(s){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return p+=2,{type:t.Punctuator,value:String.fromCharCode(s)+String.fromCharCode(e),lineNumber:d,lineStart:h,start:a,end:p};case 33:case 61:return p+=2,61===c.charCodeAt(p)&&++p,{type:t.Punctuator,value:c.slice(a,p),lineNumber:d,lineStart:h,start:a,end:p}}}return">>>="===(i=c.substr(p,4))?(p+=4,{type:t.Punctuator,value:i,lineNumber:d,lineStart:h,start:a,end:p}):">>>"===(n=i.substr(0,3))||"<<="===n||">>="===n?(p+=3,{type:t.Punctuator,value:n,lineNumber:d,lineStart:h,start:a,end:p}):l===(r=n.substr(0,2))[1]&&"+-<>&|".indexOf(l)>=0||"=>"===r?(p+=2,{type:t.Punctuator,value:r,lineNumber:d,lineStart:h,start:a,end:p}):"<>=!+-*%&|^/".indexOf(l)>=0?(++p,{type:t.Punctuator,value:l,lineNumber:d,lineStart:h,start:a,end:p}):void J({},o.UnexpectedToken,"ILLEGAL")}function D(){var e,r,n;if(b(v((n=c[p]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),r=p,e="","."!==n){if(e=c[p++],n=c[p],"0"===e){if("x"===n||"X"===n)return++p,function(e){for(var r="";p<f&&w(c[p]);)r+=c[p++];return 0===r.length&&J({},o.UnexpectedToken,"ILLEGAL"),k(c.charCodeAt(p))&&J({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt("0x"+r,16),lineNumber:d,lineStart:h,start:e,end:p}}(r);if(S(n))return function(e){for(var r="0"+c[p++];p<f&&S(c[p]);)r+=c[p++];return(k(c.charCodeAt(p))||v(c.charCodeAt(p)))&&J({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(r,8),octal:!0,lineNumber:d,lineStart:h,start:e,end:p}}(r);n&&v(n.charCodeAt(0))&&J({},o.UnexpectedToken,"ILLEGAL")}for(;v(c.charCodeAt(p));)e+=c[p++];n=c[p]}if("."===n){for(e+=c[p++];v(c.charCodeAt(p));)e+=c[p++];n=c[p]}if("e"===n||"E"===n)if(e+=c[p++],"+"!==(n=c[p])&&"-"!==n||(e+=c[p++]),v(c.charCodeAt(p)))for(;v(c.charCodeAt(p));)e+=c[p++];else J({},o.UnexpectedToken,"ILLEGAL");return k(c.charCodeAt(p))&&J({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:d,lineStart:h,start:r,end:p}}function q(){var e,r,n,i;return g=null,N(),e=p,r=function(){var e,t,r,n;for(b("/"===(e=c[p]),"Regular expression literal must start with a slash"),t=c[p++],r=!1,n=!1;p<f;)if(t+=e=c[p++],"\\"===e)x((e=c[p++]).charCodeAt(0))&&J({},o.UnterminatedRegExp),t+=e;else if(x(e.charCodeAt(0)))J({},o.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){n=!0;break}"["===e&&(r=!0)}return n||J({},o.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}}(),n=function(){var e,t,r,n;for(t="",r="";p<f&&A((e=c[p]).charCodeAt(0));)if(++p,"\\"===e&&p<f)if("u"===(e=c[p])){if(n=++p,e=L("u"))for(r+=e,t+="\\u";n<p;++n)t+=c[n];else p=n,r+="u",t+="\\u";X({},o.UnexpectedToken,"ILLEGAL")}else t+="\\",X({},o.UnexpectedToken,"ILLEGAL");else r+=e,t+=e;return{value:r,literal:t}}(),i=function(e,t){var r;try{r=new RegExp(e,t)}catch(e){J({},o.InvalidRegExp)}return r}(r.value,n.value),_.tokenize?{type:t.RegularExpression,value:i,lineNumber:d,lineStart:h,start:e,end:p}:{literal:r.literal+n.literal,value:i,start:e,end:p}}function U(){var e,t,r,n;return N(),e=p,t={start:{line:d,column:p-h}},r=q(),t.end={line:d,column:p-h},_.tokenize||(_.tokens.length>0&&(n=_.tokens[_.tokens.length-1]).range[0]===e&&"Punctuator"===n.type&&("/"!==n.value&&"/="!==n.value||_.tokens.pop()),_.tokens.push({type:"RegularExpression",value:r.literal,range:[e,p],loc:t})),r}function B(){var e,r,i;return N(),p>=f?{type:t.EOF,lineNumber:d,lineStart:h,start:p,end:p}:k(e=c.charCodeAt(p))?(r=p,{type:1===(i=92===c.charCodeAt(p)?M():F()).length?t.Identifier:O(i)?t.Keyword:"null"===i?t.NullLiteral:"true"===i||"false"===i?t.BooleanLiteral:t.Identifier,value:i,lineNumber:d,lineStart:h,start:r,end:p}):40===e||41===e||59===e?R():39===e||34===e?function(){var e,r,n,i,a,s,l,u,m="",g=!1;for(l=d,u=h,b("'"===(e=c[p])||'"'===e,"String literal must starts with a quote"),r=p,++p;p<f;){if((n=c[p++])===e){e="";break}if("\\"===n)if((n=c[p++])&&x(n.charCodeAt(0)))++d,"\r"===n&&"\n"===c[p]&&++p,h=p;else switch(n){case"u":case"x":s=p,(a=L(n))?m+=a:(p=s,m+=n);break;case"n":m+="\n";break;case"r":m+="\r";break;case"t":m+="\t";break;case"b":m+="\b";break;case"f":m+="\f";break;case"v":m+="\v";break;default:S(n)?(0!==(i="01234567".indexOf(n))&&(g=!0),p<f&&S(c[p])&&(g=!0,i=8*i+"01234567".indexOf(c[p++]),"0123".indexOf(n)>=0&&p<f&&S(c[p])&&(i=8*i+"01234567".indexOf(c[p++]))),m+=String.fromCharCode(i)):m+=n}else{if(x(n.charCodeAt(0)))break;m+=n}}return""!==e&&J({},o.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:m,octal:g,startLineNumber:l,startLineStart:u,lineNumber:d,lineStart:h,start:r,end:p}}():46===e?v(c.charCodeAt(p+1))?D():R():v(e)?D():_.tokenize&&47===e?function(){var e,t;if(!(e=_.tokens[_.tokens.length-1]))return U();if("Punctuator"===e.type){if("]"===e.value)return R();if(")"===e.value)return!(t=_.tokens[_.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?R():U();if("}"===e.value){if(_.tokens[_.openCurlyToken-3]&&"Keyword"===_.tokens[_.openCurlyToken-3].type){if(!(t=_.tokens[_.openCurlyToken-4]))return R()}else{if(!_.tokens[_.openCurlyToken-4]||"Keyword"!==_.tokens[_.openCurlyToken-4].type)return R();if(!(t=_.tokens[_.openCurlyToken-5]))return U()}return n.indexOf(t.value)>=0?R():U()}return U()}return"Keyword"===e.type?U():R()}():R()}function $(){var e,n,i;return N(),e={start:{line:d,column:p-h}},n=B(),e.end={line:d,column:p-h},n.type!==t.EOF&&(i=c.slice(n.start,n.end),_.tokens.push({type:r[n.type],value:i,range:[n.start,n.end],loc:e})),n}function G(){var e;return p=(e=g).end,d=e.lineNumber,h=e.lineStart,g=void 0!==_.tokens?$():B(),p=e.end,d=e.lineNumber,h=e.lineStart,e}function W(){var e,t,r;e=p,t=d,r=h,g=void 0!==_.tokens?$():B(),p=e,d=t,h=r}function H(e,t){this.line=e,this.column=t}function V(e,t,r,n){this.start=new H(e,t),this.end=new H(r,n)}function z(){var e,t,r,n;return e=p,t=d,r=h,N(),n=d!==t,p=e,d=t,h=r,n}function J(e,t){var r,n=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(function(e,t){return b(t<n.length,"Message reference must be in range"),n[t]}));throw"number"==typeof e.lineNumber?((r=new Error("Line "+e.lineNumber+": "+i)).index=e.start,r.lineNumber=e.lineNumber,r.column=e.start-h+1):((r=new Error("Line "+d+": "+i)).index=p,r.lineNumber=d,r.column=p-h+1),r.description=i,r}function X(){try{J.apply(null,arguments)}catch(e){if(!_.errors)throw e;_.errors.push(e)}}function Q(e){if(e.type===t.EOF&&J(e,o.UnexpectedEOS),e.type===t.NumericLiteral&&J(e,o.UnexpectedNumber),e.type===t.StringLiteral&&J(e,o.UnexpectedString),e.type===t.Identifier&&J(e,o.UnexpectedIdentifier),e.type===t.Keyword){if(function(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}(e.value))J(e,o.UnexpectedReserved);else if(u&&I(e.value))return void X(e,o.StrictReservedWord);J(e,o.UnexpectedToken,e.value)}J(e,o.UnexpectedToken,e.value)}function Y(e){var r=G();r.type===t.Punctuator&&r.value===e||Q(r)}function K(e){var r=G();r.type===t.Keyword&&r.value===e||Q(r)}function Z(e){return g.type===t.Punctuator&&g.value===e}function ee(e){return g.type===t.Keyword&&g.value===e}function te(){var e;59===c.charCodeAt(p)||Z(";")?G():(e=d,N(),d===e&&(g.type===t.EOF||Z("}")||Q(g)))}function re(e){return e.type===i.Identifier||e.type===i.MemberExpression}function ne(e,t){var r,n,i;return r=u,i=g,n=Ae(),t&&u&&j(e[0].name)&&X(t,o.StrictParamName),u=r,m.markEnd(m.createFunctionExpression(null,e,[],n),i)}function ie(){var e,r;return r=g,(e=G()).type===t.StringLiteral||e.type===t.NumericLiteral?(u&&e.octal&&X(e,o.StrictOctalLiteral),m.markEnd(m.createLiteral(e),r)):m.markEnd(m.createIdentifier(e.value),r)}function ae(){var e,r,n,i,a,s;return s=g,(e=g).type===t.Identifier?(n=ie(),"get"!==e.value||Z(":")?"set"!==e.value||Z(":")?(Y(":"),i=ge(),m.markEnd(m.createProperty("init",n,i),s)):(r=ie(),Y("("),(e=g).type!==t.Identifier?(Y(")"),X(e,o.UnexpectedToken,e.value),i=ne([])):(a=[be()],Y(")"),i=ne(a,e)),m.markEnd(m.createProperty("set",r,i),s)):(r=ie(),Y("("),Y(")"),i=ne([]),m.markEnd(m.createProperty("get",r,i),s))):e.type!==t.EOF&&e.type!==t.Punctuator?(r=ie(),Y(":"),i=ge(),m.markEnd(m.createProperty("init",r,i),s)):void Q(e)}function oe(){var e,r,n,s;if(Z("("))return function(){var e;return Y("("),e=ye(),Y(")"),e}();if(Z("["))return function(){var e,t=[];for(e=g,Y("[");!Z("]");)Z(",")?(G(),t.push(null)):(t.push(ge()),Z("]")||Y(","));return G(),m.markEnd(m.createArrayExpression(t),e)}();if(Z("{"))return function(){var e,t,r,n,s,l=[],c={},p=String;for(s=g,Y("{");!Z("}");)t=(e=ae()).key.type===i.Identifier?e.key.name:p(e.key.value),n="init"===e.kind?a.Data:"get"===e.kind?a.Get:a.Set,r="$"+t,Object.prototype.hasOwnProperty.call(c,r)?(c[r]===a.Data?u&&n===a.Data?X({},o.StrictDuplicateProperty):n!==a.Data&&X({},o.AccessorDataProperty):n===a.Data?X({},o.AccessorDataProperty):c[r]&n&&X({},o.AccessorGetSet),c[r]|=n):c[r]=n,l.push(e),Z("}")||Y(",");return Y("}"),m.markEnd(m.createObjectExpression(l),s)}();if(e=g.type,s=g,e===t.Identifier)n=m.createIdentifier(G().value);else if(e===t.StringLiteral||e===t.NumericLiteral)u&&g.octal&&X(g,o.StrictOctalLiteral),n=m.createLiteral(G());else if(e===t.Keyword){if(ee("function"))return function(){var e,t,r,n,i,a,s,l,c=null,p=[];return l=g,K("function"),Z("(")||(e=g,c=be(),u?j(e.value)&&X(e,o.StrictFunctionName):j(e.value)?(r=e,n=o.StrictFunctionName):I(e.value)&&(r=e,n=o.StrictReservedWord)),p=(i=Ie(r)).params,t=i.stricted,r=i.firstRestricted,i.message&&(n=i.message),s=u,a=Ae(),u&&r&&J(r,n),u&&t&&X(t,n),u=s,m.markEnd(m.createFunctionExpression(c,p,[],a),l)}();ee("this")?(G(),n=m.createThisExpression()):Q(G())}else e===t.BooleanLiteral?((r=G()).value="true"===r.value,n=m.createLiteral(r)):e===t.NullLiteral?((r=G()).value=null,n=m.createLiteral(r)):Z("/")||Z("/=")?(n=void 0!==_.tokens?m.createLiteral(U()):m.createLiteral(q()),W()):Q(G());return m.markEnd(n,s)}function se(){var e=[];if(Y("("),!Z(")"))for(;p<f&&(e.push(ge()),!Z(")"));)Y(",");return Y(")"),e}function le(){var e,r;return r=g,function(e){return e.type===t.Identifier||e.type===t.Keyword||e.type===t.BooleanLiteral||e.type===t.NullLiteral}(e=G())||Q(e),m.markEnd(m.createIdentifier(e.value),r)}function ce(){return Y("."),le()}function ue(){var e;return Y("["),e=ye(),Y("]"),e}function pe(){var e,t,r;return r=g,K("new"),e=function(){var e,t,r,n;for(n=g,e=y.allowIn,t=ee("new")?pe():oe(),y.allowIn=e;Z(".")||Z("[");)Z("[")?(r=ue(),t=m.createMemberExpression("[",t,r)):(r=ce(),t=m.createMemberExpression(".",t,r)),m.markEnd(t,n);return t}(),t=Z("(")?se():[],m.markEnd(m.createNewExpression(e,t),r)}function de(){var e,r,n=g;return e=function(){var e,t,r,n,i;for(i=g,e=y.allowIn,y.allowIn=!0,t=ee("new")?pe():oe(),y.allowIn=e;;){if(Z("."))n=ce(),t=m.createMemberExpression(".",t,n);else if(Z("("))r=se(),t=m.createCallExpression(t,r);else{if(!Z("["))break;n=ue(),t=m.createMemberExpression("[",t,n)}m.markEnd(t,i)}return t}(),g.type===t.Punctuator&&(!Z("++")&&!Z("--")||z()||(u&&e.type===i.Identifier&&j(e.name)&&X({},o.StrictLHSPostfix),re(e)||X({},o.InvalidLHSInAssignment),r=G(),e=m.markEnd(m.createPostfixExpression(r.value,e),n))),e}function he(){var e,r,n;return g.type!==t.Punctuator&&g.type!==t.Keyword?r=de():Z("++")||Z("--")?(n=g,e=G(),r=he(),u&&r.type===i.Identifier&&j(r.name)&&X({},o.StrictLHSPrefix),re(r)||X({},o.InvalidLHSInAssignment),r=m.createUnaryExpression(e.value,r),r=m.markEnd(r,n)):Z("+")||Z("-")||Z("~")||Z("!")?(n=g,e=G(),r=he(),r=m.createUnaryExpression(e.value,r),r=m.markEnd(r,n)):ee("delete")||ee("void")||ee("typeof")?(n=g,e=G(),r=he(),r=m.createUnaryExpression(e.value,r),r=m.markEnd(r,n),u&&"delete"===r.operator&&r.argument.type===i.Identifier&&X({},o.StrictDelete)):r=de(),r}function fe(e,r){var n=0;if(e.type!==t.Punctuator&&e.type!==t.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=r?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function me(){var e,t,r,n,i;return i=g,e=function(){var e,t,r,n,i,a,o,s,l,c;if(e=g,l=he(),0===(i=fe(n=g,y.allowIn)))return l;for(n.prec=i,G(),t=[e,g],a=[l,n,o=he()];(i=fe(g,y.allowIn))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,l=a.pop(),r=m.createBinaryExpression(s,l,o),t.pop(),e=t[t.length-1],m.markEnd(r,e),a.push(r);(n=G()).prec=i,a.push(n),t.push(g),r=he(),a.push(r)}for(r=a[c=a.length-1],t.pop();c>1;)r=m.createBinaryExpression(a[c-1].value,a[c-2],r),c-=2,e=t.pop(),m.markEnd(r,e);return r}(),Z("?")&&(G(),t=y.allowIn,y.allowIn=!0,r=ge(),y.allowIn=t,Y(":"),n=ge(),e=m.createConditionalExpression(e,r,n),m.markEnd(e,i)),e}function ge(){var e,r,n,a,s,l;return e=g,s=g,a=r=me(),g.type===t.Punctuator&&("="===(l=g.value)||"*="===l||"/="===l||"%="===l||"+="===l||"-="===l||"<<="===l||">>="===l||">>>="===l||"&="===l||"^="===l||"|="===l)&&(re(r)||X({},o.InvalidLHSInAssignment),u&&r.type===i.Identifier&&j(r.name)&&X(e,o.StrictLHSAssignment),e=G(),n=ge(),a=m.markEnd(m.createAssignmentExpression(e.value,r,n),s)),a}function ye(){var e,t=g;if(e=ge(),Z(",")){for(e=m.createSequenceExpression([e]);p<f&&Z(",");)G(),e.expressions.push(ge());m.markEnd(e,t)}return e}function _e(){var e,t;return t=g,Y("{"),e=function(){for(var e,t=[];p<f&&!Z("}")&&void 0!==(e=Oe());)t.push(e);return t}(),Y("}"),m.markEnd(m.createBlockStatement(e),t)}function be(){var e,r;return r=g,(e=G()).type!==t.Identifier&&Q(e),m.markEnd(m.createIdentifier(e.value),r)}function ve(e){var t,r,n=null;return r=g,t=be(),u&&j(t.name)&&X({},o.StrictVarName),"const"===e?(Y("="),n=ge()):Z("=")&&(G(),n=ge()),m.markEnd(m.createVariableDeclarator(t,n),r)}function we(e){var t=[];do{if(t.push(ve(e)),!Z(","))break;G()}while(p<f);return t}function Se(){var e,t,r,n,i,a,s,l,c,u;return e=t=r=null,K("for"),Y("("),Z(";")?G():(ee("var")||ee("let")?(y.allowIn=!1,u=g,l=G(),c=we(),e=m.markEnd(m.createVariableDeclaration(c,l.value),u),y.allowIn=!0,1===e.declarations.length&&ee("in")&&(G(),n=e,i=ye(),e=null)):(y.allowIn=!1,e=ye(),y.allowIn=!0,ee("in")&&(re(e)||X({},o.InvalidLHSInForIn),G(),n=e,i=ye(),e=null)),void 0===n&&Y(";")),void 0===n&&(Z(";")||(t=ye()),Y(";"),Z(")")||(r=ye())),Y(")"),s=y.inIteration,y.inIteration=!0,a=ke(),y.inIteration=s,void 0===n?m.createForStatement(e,t,r,a):m.createForInStatement(n,i,a)}function Ee(){var e,t,r,n=[];for(r=g,ee("default")?(G(),e=null):(K("case"),e=ye()),Y(":");p<f&&!(Z("}")||ee("default")||ee("case"));)t=ke(),n.push(t);return m.markEnd(m.createSwitchCase(e,n),r)}function xe(){var e,t,r,n,i=[],a=null;return K("try"),e=_e(),ee("catch")&&i.push((n=g,K("catch"),Y("("),Z(")")&&Q(g),t=be(),u&&j(t.name)&&X({},o.StrictCatchVariable),Y(")"),r=_e(),m.markEnd(m.createCatchClause(t,r),n))),ee("finally")&&(G(),a=_e()),0!==i.length||a||J({},o.NoCatchOrFinally),m.createTryStatement(e,[],i,a)}function ke(){var e,r,n,a,s,l,d,h,_,b=g.type;if(b===t.EOF&&Q(g),b===t.Punctuator&&"{"===g.value)return _e();if(a=g,b===t.Punctuator)switch(g.value){case";":return m.markEnd((Y(";"),m.createEmptyStatement()),a);case"(":return m.markEnd(function(){var e=ye();return te(),m.createExpressionStatement(e)}(),a)}if(b===t.Keyword)switch(g.value){case"break":return m.markEnd(function(){var e,r=null;return K("break"),59===c.charCodeAt(p)?(G(),y.inIteration||y.inSwitch||J({},o.IllegalBreak),m.createBreakStatement(null)):z()?(y.inIteration||y.inSwitch||J({},o.IllegalBreak),m.createBreakStatement(null)):(g.type===t.Identifier&&(e="$"+(r=be()).name,Object.prototype.hasOwnProperty.call(y.labelSet,e)||J({},o.UnknownLabel,r.name)),te(),null!==r||y.inIteration||y.inSwitch||J({},o.IllegalBreak),m.createBreakStatement(r))}(),a);case"continue":return m.markEnd(function(){var e,r=null;return K("continue"),59===c.charCodeAt(p)?(G(),y.inIteration||J({},o.IllegalContinue),m.createContinueStatement(null)):z()?(y.inIteration||J({},o.IllegalContinue),m.createContinueStatement(null)):(g.type===t.Identifier&&(e="$"+(r=be()).name,Object.prototype.hasOwnProperty.call(y.labelSet,e)||J({},o.UnknownLabel,r.name)),te(),null!==r||y.inIteration||J({},o.IllegalContinue),m.createContinueStatement(r))}(),a);case"debugger":return m.markEnd((K("debugger"),te(),m.createDebuggerStatement()),a);case"do":return m.markEnd((K("do"),_=y.inIteration,y.inIteration=!0,d=ke(),y.inIteration=_,K("while"),Y("("),h=ye(),Y(")"),Z(";")&&G(),m.createDoWhileStatement(d,h)),a);case"for":return m.markEnd(Se(),a);case"function":return m.markEnd(je(),a);case"if":return m.markEnd(function(){var e,t,r;return K("if"),Y("("),e=ye(),Y(")"),t=ke(),ee("else")?(G(),r=ke()):r=null,m.createIfStatement(e,t,r)}(),a);case"return":return m.markEnd((l=null,K("return"),y.inFunctionBody||X({},o.IllegalReturn),32===c.charCodeAt(p)&&k(c.charCodeAt(p+1))?(l=ye(),te(),m.createReturnStatement(l)):z()?m.createReturnStatement(null):(Z(";")||Z("}")||g.type===t.EOF||(l=ye()),te(),m.createReturnStatement(l))),a);case"switch":return m.markEnd(function(){var e,t,r,n,i;if(K("switch"),Y("("),e=ye(),Y(")"),Y("{"),t=[],Z("}"))return G(),m.createSwitchStatement(e,t);for(n=y.inSwitch,y.inSwitch=!0,i=!1;p<f&&!Z("}");)null===(r=Ee()).test&&(i&&J({},o.MultipleDefaultsInSwitch),i=!0),t.push(r);return y.inSwitch=n,Y("}"),m.createSwitchStatement(e,t)}(),a);case"throw":return m.markEnd(function(){var e;return K("throw"),z()&&J({},o.NewlineAfterThrow),e=ye(),te(),m.createThrowStatement(e)}(),a);case"try":return m.markEnd(xe(),a);case"var":return m.markEnd((K("var"),s=we(),te(),m.createVariableDeclaration(s,"var")),a);case"while":return m.markEnd(function(){var e,t,r;return K("while"),Y("("),e=ye(),Y(")"),r=y.inIteration,y.inIteration=!0,t=ke(),y.inIteration=r,m.createWhileStatement(e,t)}(),a);case"with":return m.markEnd(function(){var e,t;return u&&(N(),X({},o.StrictModeWith)),K("with"),Y("("),e=ye(),Y(")"),t=ke(),m.createWithStatement(e,t)}(),a)}return(e=ye()).type===i.Identifier&&Z(":")?(G(),n="$"+e.name,Object.prototype.hasOwnProperty.call(y.labelSet,n)&&J({},o.Redeclaration,"Label",e.name),y.labelSet[n]=!0,r=ke(),delete y.labelSet[n],m.markEnd(m.createLabeledStatement(e,r),a)):(te(),m.markEnd(m.createExpressionStatement(e),a))}function Ae(){var e,r,n,a,s,l,d,h,_=[];for(h=g,Y("{");p<f&&g.type===t.StringLiteral&&(r=g,e=Oe(),_.push(e),e.expression.type===i.Literal);)"use strict"===c.slice(r.start+1,r.end-1)?(u=!0,n&&X(n,o.StrictOctalLiteral)):!n&&r.octal&&(n=r);for(a=y.labelSet,s=y.inIteration,l=y.inSwitch,d=y.inFunctionBody,y.labelSet={},y.inIteration=!1,y.inSwitch=!1,y.inFunctionBody=!0;p<f&&!Z("}")&&void 0!==(e=Oe());)_.push(e);return Y("}"),y.labelSet=a,y.inIteration=s,y.inSwitch=l,y.inFunctionBody=d,m.markEnd(m.createBlockStatement(_),h)}function Ie(e){var t,r,n,i,a,s,l=[];if(Y("("),!Z(")"))for(i={};p<f&&(r=g,t=be(),a="$"+r.value,u?(j(r.value)&&(n=r,s=o.StrictParamName),Object.prototype.hasOwnProperty.call(i,a)&&(n=r,s=o.StrictParamDupe)):e||(j(r.value)?(e=r,s=o.StrictParamName):I(r.value)?(e=r,s=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,a)&&(e=r,s=o.StrictParamDupe)),l.push(t),i[a]=!0,!Z(")"));)Y(",");return Y(")"),{params:l,stricted:n,firstRestricted:e,message:s}}function je(){var e,t,r,n,i,a,s,l,c,p;return c=g,K("function"),r=g,e=be(),u?j(r.value)&&X(r,o.StrictFunctionName):j(r.value)?(a=r,s=o.StrictFunctionName):I(r.value)&&(a=r,s=o.StrictReservedWord),p=(i=Ie(a)).params,n=i.stricted,a=i.firstRestricted,i.message&&(s=i.message),l=u,t=Ae(),u&&a&&J(a,s),u&&n&&X(n,s),u=l,m.markEnd(m.createFunctionDeclaration(e,p,[],t),c)}function Oe(){if(g.type===t.Keyword)switch(g.value){case"const":case"let":return e=g.value,n=g,K(e),r=we(e),te(),m.markEnd(m.createVariableDeclaration(r,e),n);case"function":return je();default:return ke()}var e,r,n;if(g.type!==t.EOF)return ke()}function Pe(){var e,r;return N(),W(),r=g,u=!1,e=function(){for(var e,r,n,a=[];p<f&&(r=g).type===t.StringLiteral&&(e=Oe(),a.push(e),e.expression.type===i.Literal);)"use strict"===c.slice(r.start+1,r.end-1)?(u=!0,n&&X(n,o.StrictOctalLiteral)):!n&&r.octal&&(n=r);for(;p<f&&void 0!==(e=Oe());)a.push(e);return a}(),m.markEnd(m.createProgram(e),r)}function Te(){var e,t,r,n=[];for(e=0;e<_.tokens.length;++e)r={type:(t=_.tokens[e]).type,value:t.value},_.range&&(r.range=t.range),_.loc&&(r.loc=t.loc),n.push(r);_.tokens=n}(r={})[(t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",r[t.EOF]="<end>",r[t.Identifier]="Identifier",r[t.Keyword]="Keyword",r[t.NullLiteral]="Null",r[t.NumericLiteral]="Numeric",r[t.Punctuator]="Punctuator",r[t.StringLiteral]="String",r[t.RegularExpression]="RegularExpression",n=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},a={Data:1,Get:2,Set:4},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},s={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},l={name:"SyntaxTree",processComment:function(e){var t,r;if(!(e.type===i.Program&&e.body.length>0)){for(_.trailingComments.length>0?_.trailingComments[0].range[0]>=e.range[1]?(r=_.trailingComments,_.trailingComments=[]):_.trailingComments.length=0:_.bottomRightStack.length>0&&_.bottomRightStack[_.bottomRightStack.length-1].trailingComments&&_.bottomRightStack[_.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(r=_.bottomRightStack[_.bottomRightStack.length-1].trailingComments,delete _.bottomRightStack[_.bottomRightStack.length-1].trailingComments);_.bottomRightStack.length>0&&_.bottomRightStack[_.bottomRightStack.length-1].range[0]>=e.range[0];)t=_.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):_.leadingComments.length>0&&_.leadingComments[_.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=_.leadingComments,_.leadingComments=[]),r&&(e.trailingComments=r),_.bottomRightStack.push(e)}},markEnd:function(e,t){return _.range&&(e.range=[t.start,p]),_.loc&&(e.loc=new V(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),d,p-h),this.postProcess(e)),_.attachComment&&this.processComment(e),e},postProcess:function(e){return _.source&&(e.loc.source=_.source),e},createArrayExpression:function(e){return{type:i.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,r){return{type:i.AssignmentExpression,operator:e,left:t,right:r}},createBinaryExpression:function(e,t,r){return{type:"||"===e||"&&"===e?i.LogicalExpression:i.BinaryExpression,operator:e,left:t,right:r}},createBlockStatement:function(e){return{type:i.BlockStatement,body:e}},createBreakStatement:function(e){return{type:i.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:i.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:i.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,r){return{type:i.ConditionalExpression,test:e,consequent:t,alternate:r}},createContinueStatement:function(e){return{type:i.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:i.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(e){return{type:i.ExpressionStatement,expression:e}},createForStatement:function(e,t,r,n){return{type:i.ForStatement,init:e,test:t,update:r,body:n}},createForInStatement:function(e,t,r){return{type:i.ForInStatement,left:e,right:t,body:r,each:!1}},createFunctionDeclaration:function(e,t,r,n){return{type:i.FunctionDeclaration,id:e,params:t,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,r,n){return{type:i.FunctionExpression,id:e,params:t,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:i.Identifier,name:e}},createIfStatement:function(e,t,r){return{type:i.IfStatement,test:e,consequent:t,alternate:r}},createLabeledStatement:function(e,t){return{type:i.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:i.Literal,value:e.value,raw:c.slice(e.start,e.end)}},createMemberExpression:function(e,t,r){return{type:i.MemberExpression,computed:"["===e,object:t,property:r}},createNewExpression:function(e,t){return{type:i.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:i.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:i.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:i.Program,body:e}},createProperty:function(e,t,r){return{type:i.Property,key:t,value:r,kind:e}},createReturnStatement:function(e){return{type:i.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:i.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:i.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:i.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(e){return{type:i.ThrowStatement,argument:e}},createTryStatement:function(e,t,r,n){return{type:i.TryStatement,block:e,guardedHandlers:t,handlers:r,finalizer:n}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:i.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:i.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:i.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:i.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:i.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:i.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=function(e,r){var n;"string"==typeof e||e instanceof String||(e=String(e)),m=l,p=0,d=(c=e).length>0?1:0,h=0,f=c.length,g=null,y={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},_={},(r=r||{}).tokens=!0,_.tokens=[],_.tokenize=!0,_.openParenToken=-1,_.openCurlyToken=-1,_.range="boolean"==typeof r.range&&r.range,_.loc="boolean"==typeof r.loc&&r.loc,"boolean"==typeof r.comment&&r.comment&&(_.comments=[]),"boolean"==typeof r.tolerant&&r.tolerant&&(_.errors=[]);try{if(W(),g.type===t.EOF)return _.tokens;for(G();g.type!==t.EOF;)try{G()}catch(e){if(_.errors){_.errors.push(e);break}throw e}Te(),n=_.tokens,void 0!==_.comments&&(n.comments=_.comments),void 0!==_.errors&&(n.errors=_.errors)}catch(e){throw e}finally{_={}}return n},e.parse=function(e,t){var r,n;n=String,"string"==typeof e||e instanceof String||(e=n(e)),m=l,p=0,d=(c=e).length>0?1:0,h=0,f=c.length,g=null,y={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},_={},void 0!==t&&(_.range="boolean"==typeof t.range&&t.range,_.loc="boolean"==typeof t.loc&&t.loc,_.attachComment="boolean"==typeof t.attachComment&&t.attachComment,_.loc&&null!==t.source&&void 0!==t.source&&(_.source=n(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(_.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(_.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(_.errors=[]),_.attachComment&&(_.range=!0,_.comments=[],_.bottomRightStack=[],_.trailingComments=[],_.leadingComments=[]));try{r=Pe(),void 0!==_.comments&&(r.comments=_.comments),void 0!==_.tokens&&(Te(),r.tokens=_.tokens),void 0!==_.errors&&(r.errors=_.errors)}catch(e){throw e}finally{_={}}return r},e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),i)i.hasOwnProperty(e)&&(t[e]=i[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}))},{}],1:[function(e,t,r){(function(n){var i=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,r,n,i,a,o,s){i.ast||(i.ast=t,t.initialize());var l=o.length-1;switch(a){case 1:return i.ast.set({expression:{type:"root",value:o[l]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:o[l-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:o[l-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:o[l]}});break;case 15:i.ast.set({expression:{type:"identifier",value:o[l]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:o[l]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(o[l])}});break;case 24:o[l].length>1?i.ast.set({expression:{type:"union",value:o[l]}}):this.$=o[l];break;case 25:this.$=[o[l]];break;case 26:this.$=o[l-2].concat(o[l]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(o[l])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:o[l]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:o[l]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:o[l]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:o[l]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:o[l]}},i.ast.set(this.$);break;case 33:case 34:this.$=o[l]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){var t=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,l=0,c=0,u=i.slice.call(arguments,1);this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var p=this.lexer.yylloc;i.push(p);var d,h=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,g,y,_,b,v,w,S,E={};;){if(g=r[r.length-1],this.defaultActions[g]?y=this.defaultActions[g]:(null==f&&(d=void 0,"number"!=typeof(d=t.lexer.lex()||1)&&(d=t.symbols_[d]||d),f=d),y=a[g]&&a[g][f]),void 0===y||!y.length||!y[0]){var x;for(b in S=[],a[g])this.terminals_[b]&&b>2&&S.push("'"+this.terminals_[b]+"'");x=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:p,expected:S})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+f);switch(y[0]){case 1:r.push(f),n.push(this.lexer.yytext),i.push(this.lexer.yylloc),r.push(y[1]),f=null,m?(f=m,m=null):(l=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,p=this.lexer.yylloc,c>0&&c--);break;case 2:if(v=this.productions_[y[1]][1],E.$=n[n.length-v],E._$={first_line:i[i.length-(v||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(v||1)].first_column,last_column:i[i.length-1].last_column},h&&(E._$.range=[i[i.length-(v||1)].range[0],i[i.length-1].range[1]]),void 0!==(_=this.performAction.apply(E,[o,l,s,this.yy,y[1],n,i].concat(u))))return _;v&&(r=r.slice(0,-1*v*2),n=n.slice(0,-1*v),i=i.slice(0,-1*v)),r.push(this.productions_[y[1]][0]),n.push(E.$),i.push(E._$),w=a[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}},t={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},r={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,r,n){switch(r){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function n(){this.yy={}}return e.lexer=r,n.prototype=e,e.Parser=n,new n}();void 0!==e&&void 0!==r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},void 0!==t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("_process"))},{_process:14,fs:12,path:13}],2:[function(e,t,r){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,r){var n=e("./dict"),i=e("fs"),a={lex:{macros:{esc:"\\\\",int:n.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[n.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[n.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[n.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(a.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),a.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=a},{"./dict":2,fs:12}],4:[function(e,t,r){var n=e("./aesprim"),i=e("./slice"),a=e("static-eval"),o=e("underscore").uniq,s=function(){return this.initialize.apply(this,arguments)};function l(t,r,i){var a=e("./index"),o=h(n.parse(r).body[0].expression,{"@":t.value}),s=i.replace(/\{\{\s*value\s*\}\}/g,o),l=a.nodes(t.value,s);return l.forEach((function(e){e.path=t.path.concat(e.path.slice(1))})),l}function c(e){return Array.isArray(e)}function u(e){return function(t,r,n,i){var a=t.value,o=t.path,s=[],l=function(t,a){var o;c(t)?(t.forEach((function(e,t){s.length>=i||n(t,e,r)&&s.push({path:a.concat(t),value:e})})),t.forEach((function(t,r){s.length>=i||e&&l(t,a.concat(r))}))):(o=t)&&!(o instanceof Array)&&o instanceof Object&&(this.keys(t).forEach((function(e){s.length>=i||n(e,t[e],r)&&s.push({path:a.concat(e),value:t[e]})})),this.keys(t).forEach((function(r){s.length>=i||e&&l(t[r],a.concat(r))})))}.bind(this);return l(a,o),s}}function p(e){return function(t,r,n){return this.descend(r,t.expression.value,e,n)}}function d(e){return function(t,r,n){return this.traverse(r,t.expression.value,e,n)}}function h(){try{return a.apply(this,arguments)}catch(e){}}function f(e){return e=e.filter((function(e){return e})),o(e,(function(e){return e.path.map((function(e){return String(e).replace("-","--")})).join("-")}))}function m(e){var t=String(e);return t.match(/^-?[0-9]+$/)?parseInt(t):null}s.prototype.initialize=function(){this.traverse=u(!0),this.descend=u()},s.prototype.keys=Object.keys,s.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),r=this._fns[t];if(!r)throw new Error("couldn't resolve key: "+t);return r.bind(this)},s.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},s.prototype._fns={"member-child-identifier":function(e,t){var r=e.expression.value,n=t.value;if(n instanceof Object&&r in n)return[{value:n[r],path:t.path.concat(r)}]},"member-descendant-identifier":d((function(e,t,r){return e==r})),"subscript-child-numeric_literal":p((function(e,t,r){return e===r})),"member-child-numeric_literal":p((function(e,t,r){return String(e)===String(r)})),"subscript-descendant-numeric_literal":d((function(e,t,r){return e===r})),"member-child-wildcard":p((function(){return!0})),"member-descendant-wildcard":d((function(){return!0})),"subscript-descendant-wildcard":d((function(){return!0})),"subscript-child-wildcard":p((function(){return!0})),"subscript-child-slice":function(e,t){if(c(t.value)){var r=e.expression.value.split(":").map(m),n=t.value.map((function(e,r){return{value:e,path:t.path.concat(r)}}));return i.apply(null,[n].concat(r))}},"subscript-child-union":function(e,t){var r=[];return e.expression.value.forEach((function(e){var n={operation:"subscript",scope:"child",expression:e.expression},i=this.resolve(n)(n,t);i&&(r=r.concat(i))}),this),f(r)},"subscript-descendant-union":function(t,r,n){var i=e(".."),a=this,o=[];return i.nodes(r,"$..*").slice(1).forEach((function(e){o.length>=n||t.expression.value.forEach((function(t){var r={operation:"subscript",scope:"child",expression:t.expression},n=a.resolve(r)(r,e);o=o.concat(n)}))})),f(o)},"subscript-child-filter_expression":function(e,t,r){var i=e.expression.value.slice(2,-1),a=n.parse(i).body[0].expression;return this.descend(t,null,(function(e,t){return h(a,{"@":t})}),r)},"subscript-descendant-filter_expression":function(e,t,r){var i=e.expression.value.slice(2,-1),a=n.parse(i).body[0].expression;return this.traverse(t,null,(function(e,t){return h(a,{"@":t})}),r)},"subscript-child-script_expression":function(e,t){return l(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return l(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return l(t,e.expression.value.slice(1,-1),"$..value")}},s.prototype._fns["subscript-child-string_literal"]=s.prototype._fns["member-child-identifier"],s.prototype._fns["member-descendant-numeric_literal"]=s.prototype._fns["subscript-descendant-string_literal"]=s.prototype._fns["member-descendant-identifier"],t.exports=s},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(e,t,r){var n=e("assert"),i=e("./dict"),a=e("./parser"),o=e("./handlers"),s=function(){this.initialize.apply(this,arguments)};function l(e){return"[object String]"==Object.prototype.toString.call(e)}s.prototype.initialize=function(){this.parser=new a,this.handlers=new o},s.prototype.parse=function(e){return n.ok(l(e),"we need a path"),this.parser.parse(e)},s.prototype.parent=function(e,t){n.ok(e instanceof Object,"obj needs to be an object"),n.ok(t,"we need a path");var r=this.nodes(e,t)[0];return r.path.pop(),this.value(e,r.path)},s.prototype.apply=function(e,t,r){n.ok(e instanceof Object,"obj needs to be an object"),n.ok(t,"we need a path"),n.equal(typeof r,"function","fn needs to be function");var i=this.nodes(e,t).sort((function(e,t){return t.path.length-e.path.length}));return i.forEach((function(t){var n=t.path.pop(),i=this.value(e,this.stringify(t.path)),a=t.value=r.call(e,i[n]);i[n]=a}),this),i},s.prototype.value=function(e,t,r){if(n.ok(e instanceof Object,"obj needs to be an object"),n.ok(t,"we need a path"),arguments.length>=3){var i=this.nodes(e,t).shift();if(!i)return this._vivify(e,t,r);var a=i.path.slice(-1).shift();this.parent(e,this.stringify(i.path))[a]=r}return this.query(e,this.stringify(t),1).shift()},s.prototype._vivify=function(e,t,r){var i=this;n.ok(e instanceof Object,"obj needs to be an object"),n.ok(t,"we need a path");var a=this.parser.parse(t).map((function(e){return e.expression.value})),o=function(t,r){var n=t.pop(),a=i.value(e,t);a||(o(t.concat(),"string"==typeof n?{}:[]),a=i.value(e,t)),a[n]=r};return o(a,r),this.query(e,t)[0]},s.prototype.query=function(e,t,r){return n.ok(e instanceof Object,"obj needs to be an object"),n.ok(l(t),"we need a path"),this.nodes(e,t,r).map((function(e){return e.value}))},s.prototype.paths=function(e,t,r){return n.ok(e instanceof Object,"obj needs to be an object"),n.ok(t,"we need a path"),this.nodes(e,t,r).map((function(e){return e.path}))},s.prototype.nodes=function(e,t,r){if(n.ok(e instanceof Object,"obj needs to be an object"),n.ok(t,"we need a path"),0===r)return[];var i=this.parser.parse(t),a=this.handlers,o=[{path:["$"],value:e}],s=[];return i.length&&"root"==i[0].expression.type&&i.shift(),i.length?(i.forEach((function(e,t){if(!(s.length>=r)){var n=a.resolve(e),l=[];o.forEach((function(a){if(!(s.length>=r)){var o=n(e,a,r);t==i.length-1?s=s.concat(o||[]):l=l.concat(o||[])}})),o=l}})),r?s.slice(0,r):s):o},s.prototype.stringify=function(e){n.ok(e,"we need a path");var t="$",r={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach((function(e){if("root"!=e.expression.type){var n,i=[e.scope,e.operation].join("-"),a=r[i];if(n="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value,!a)throw new Error("couldn't find template "+i);t+=a.replace(/{{value}}/,n)}})),t},s.prototype._normalize=function(e){if(n.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);if(Array.isArray(e)&&"string"==typeof e[0]){var t=[{expression:{type:"root",value:"$"}}];return e.forEach((function(e,r){if("$"!=e||0!==r)if("string"==typeof e&&e.match("^"+i.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}});else{var n="number"==typeof e?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:e,type:n}})}})),t}if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},s.Handlers=o,s.Parser=a;var c=new s;c.JSONPath=s,t.exports=c},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,r){var n=e("./grammar"),i=e("../generated/parser"),a=function(){var e=new i.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e};a.grammar=n,t.exports=a},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,r){function n(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,r,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof r)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var a=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?n(i):1,r=r<0?a+r:r,t=n(0===(t=t<0?a+t:t)?0:t||(i>0?0:a-1)),r=n(0===r?0:r||(i>0?a:-1)),t=i>0?Math.max(0,t):Math.min(a,t),r=i>0?Math.min(r,a):Math.max(-1,r),i>0&&r<=t)return[];if(i<0&&t<=r)return[];for(var o=[],s=t;s!=r&&!(i<0&&s<=r||i>0&&s>=r);s+=i)o.push(e[s]);return o}},{}],8:[function(e,t,r){var n=e("util/"),i=Array.prototype.slice,a=Object.prototype.hasOwnProperty,o=t.exports=u;function s(e,t){return n.isUndefined(t)?""+t:n.isNumber(t)&&!isFinite(t)||n.isFunction(t)||n.isRegExp(t)?t.toString():t}function l(e,t){return n.isString(e)?e.length<t?e:e.slice(0,t):e}function c(e,t,r,n,i){throw new o.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function u(e,t){e||c(e,!0,t,"==",o.ok)}function p(e,t){if(e===t)return!0;if(n.isBuffer(e)&&n.isBuffer(t)){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return n.isDate(e)&&n.isDate(t)?e.getTime()===t.getTime():n.isRegExp(e)&&n.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:n.isObject(e)||n.isObject(t)?function(e,t){if(n.isNullOrUndefined(e)||n.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(n.isPrimitive(e)||n.isPrimitive(t))return e===t;var r=d(e),a=d(t);if(r&&!a||!r&&a)return!1;if(r)return p(e=i.call(e),t=i.call(t));var o,s,l=m(e),c=m(t);if(l.length!=c.length)return!1;for(l.sort(),c.sort(),s=l.length-1;s>=0;s--)if(l[s]!=c[s])return!1;for(s=l.length-1;s>=0;s--)if(!p(e[o=l[s]],t[o]))return!1;return!0}(e,t):e==t}function d(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function h(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function f(e,t,r,i){var a;n.isString(r)&&(i=r,r=null);try{t()}catch(e){a=e}if(i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),e&&!a&&c(a,r,"Missing expected exception"+i),!e&&h(a,r)&&c(a,r,"Got unwanted exception"+i),e&&a&&r&&!h(a,r)||!e&&a)throw a}o.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return l(JSON.stringify(e.actual,s),128)+" "+e.operator+" "+l(JSON.stringify(e.expected,s),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=t.name,a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},n.inherits(o.AssertionError,Error),o.fail=c,o.ok=u,o.equal=function(e,t,r){e!=t&&c(e,t,r,"==",o.equal)},o.notEqual=function(e,t,r){e==t&&c(e,t,r,"!=",o.notEqual)},o.deepEqual=function(e,t,r){p(e,t)||c(e,t,r,"deepEqual",o.deepEqual)},o.notDeepEqual=function(e,t,r){p(e,t)&&c(e,t,r,"notDeepEqual",o.notDeepEqual)},o.strictEqual=function(e,t,r){e!==t&&c(e,t,r,"===",o.strictEqual)},o.notStrictEqual=function(e,t,r){e===t&&c(e,t,r,"!==",o.notStrictEqual)},o.throws=function(e,t,r){f.apply(this,[!0].concat(i.call(arguments)))},o.doesNotThrow=function(e,t){f.apply(this,[!1].concat(i.call(arguments)))},o.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}},{"util/":11}],9:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],10:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],11:[function(e,t,n){(function(t,r){var i=/%[sdj%]/g;n.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,a=n.length,o=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r<a;l=n[++r])m(l)||!v(l)?o+=" "+l:o+=" "+s(l);return o},n.deprecate=function(e,i){if(_(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return function(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}};var a,o={};function s(e,t){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(t)?r.showHidden=t:t&&n._extend(r,t),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,t,r){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return y(i)||(i=u(e,i,r)),i}var a=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,t);if(a)return a;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),S(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(t);if(0===o.length){if(E(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return p(t)}var c,v="",x=!1,k=["{","}"];return h(t)&&(x=!0,k=["[","]"]),E(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),b(t)&&(v=" "+RegExp.prototype.toString.call(t)),w(t)&&(v=" "+Date.prototype.toUTCString.call(t)),S(t)&&(v=" "+p(t)),0!==o.length||x&&0!=t.length?r<0?b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=x?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)I(t,String(o))?a.push(d(e,t,r,n,String(o),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(d(e,t,r,n,i,!0))})),a}(e,t,r,s,o):o.map((function(n){return d(e,t,r,s,n,x)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,v,k)):k[0]+v+k[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),I(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function _(e){return void 0===e}function b(e){return v(e)&&"[object RegExp]"===x(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===x(e)}function S(e){return v(e)&&("[object Error]"===x(e)||e instanceof Error)}function E(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(_(a)&&(a=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=t.pid;o[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else o[e]=function(){};return o[e]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=f,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=y,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=_,n.isRegExp=b,n.isObject=v,n.isDate=w,n.isError=S,n.isFunction=E,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),A[e.getMonth()],t].join(" ")),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(e,t,r){},{}],13:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}r.resolve=function(){for(var r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return(i?"/":"")+(r=t(n(r.split("/"),(function(e){return!!e})),!i).join("/"))||"."},r.normalize=function(e){var a=r.isAbsolute(e),o="/"===i(e,-1);return(e=t(n(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),a=n(t.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l<o;l++)if(i[l]!==a[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(a.slice(s))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){n=a;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},r.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=o+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)};var i=function(e,t,r){return e.substr(t,r)}}).call(this,e("_process"))},{_process:14}],14:[function(e,t,r){var n,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],p=!1,d=-1;function h(){p&&c&&(p=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!p){var e=l(h);p=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,p=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new m(e,t)),1!==u.length||p||l(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],15:[function(e,t,r){var n=e("escodegen").generate;t.exports=function(e,t){t||(t={});var r={},i=function e(i,a){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var o=e(i.argument);return"+"===i.operator?+o:"-"===i.operator?-o:"~"===i.operator?~o:"!"===i.operator?!o:r}if("ArrayExpression"===i.type){for(var s=[],l=0,c=i.elements.length;l<c;l++){if((y=e(i.elements[l]))===r)return r;s.push(y)}return s}if("ObjectExpression"===i.type){var u={};for(l=0;l<i.properties.length;l++){var p=null===(_=i.properties[l]).value?_.value:e(_.value);if(p===r)return r;u[_.key.value||_.key.name]=p}return u}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((c=e(i.left))===r)return r;var d=e(i.right);if(d===r)return r;var h=i.operator;return"=="===h?c==d:"==="===h?c===d:"!="===h?c!=d:"!=="===h?c!==d:"+"===h?c+d:"-"===h?c-d:"*"===h?c*d:"/"===h?c/d:"%"===h?c%d:"<"===h?c<d:"<="===h?c<=d:">"===h?c>d:">="===h?c>=d:"|"===h?c|d:"&"===h?c&d:"^"===h?c^d:"&&"===h?c&&d:"||"===h?c||d:r}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:r;if("ThisExpression"===i.type)return{}.hasOwnProperty.call(t,"this")?t.this:r;if("CallExpression"===i.type){var f=e(i.callee);if(f===r)return r;if("function"!=typeof f)return r;var m=i.callee.object?e(i.callee.object):r;m===r&&(m=null);var g=[];for(l=0,c=i.arguments.length;l<c;l++){var y;if((y=e(i.arguments[l]))===r)return r;g.push(y)}return f.apply(m,g)}var _;if("MemberExpression"===i.type)return(u=e(i.object))===r||"function"==typeof u?r:"Identifier"===i.property.type?u[i.property.name]:(_=e(i.property))===r?r:u[_];if("ConditionalExpression"===i.type)return(o=e(i.test))===r?r:e(o?i.consequent:i.alternate);if("ExpressionStatement"===i.type)return(o=e(i.expression))===r?r:o;if("ReturnStatement"===i.type)return e(i.argument);if("FunctionExpression"===i.type){var b=i.body.body,v={};for(Object.keys(t).forEach((function(e){v[e]=t[e]})),l=0;l<i.params.length;l++){var w=i.params[l];if("Identifier"!=w.type)return r;t[w.name]=null}for(var l in b)if(e(b[l])===r)return r;t=v;var S=Object.keys(t),E=S.map((function(e){return t[e]}));return Function(S.join(", "),"return "+n(i)).apply(null,E)}if("TemplateLiteral"===i.type){var x="";for(l=0;l<i.expressions.length;l++)x+=e(i.quasis[l]),x+=e(i.expressions[l]);return x+e(i.quasis[l])}if("TaggedTemplateExpression"===i.type){var k=e(i.tag),A=i.quasi,I=A.quasis.map(e),j=A.expressions.map(e);return k.apply(null,[I].concat(j))}return"TemplateElement"===i.type?i.value.cooked:r}(e);return i===r?void 0:i}},{escodegen:12}],jsonpath:[function(e,t,r){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=n&&i&&"function"==typeof i.get?i.get:null,o=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,_=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,x=Array.prototype.join,k=Array.prototype.slice,A=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,j=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-A(-e):A(e);if(n!==e){var i=String(n),a=_.call(t,i.length+1);return b.call(i,r,"$&_")+"."+b.call(b.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var M=r(4654),F=M.custom,R=$(F)?F:null;function D(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function q(e){return b.call(String(e),/"/g,""")}function U(e){return!("[object Array]"!==H(e)||T&&"object"==typeof e&&T in e)}function B(e){return!("[object RegExp]"!==H(e)||T&&"object"==typeof e&&T in e)}function $(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,i,s){var l=n||{};if(W(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!W(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return v?L(t,S):S}if("bigint"==typeof t){var A=String(t)+"n";return v?L(t,A):A}var j=void 0===l.depth?5:l.depth;if(void 0===i&&(i=0),i>=j&&j>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var F,G=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=x.call(Array(e.indent+1)," ")}return{base:r,prev:x.call(Array(t+1),r)}}(l,i);if(void 0===s)s=[];else if(V(s,t)>=0)return"[Circular]";function J(t,r,n){if(r&&(s=k.call(s)).push(r),n){var a={depth:l.depth};return W(l,"quoteStyle")&&(a.quoteStyle=l.quoteStyle),e(t,a,i+1,s)}return e(t,l,i+1,s)}if("function"==typeof t&&!B(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=Z(t,J);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+x.call(te,", ")+" }":"")}if($(t)){var re=P?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||P?re:X(re)}if((F=t)&&"object"==typeof F&&("undefined"!=typeof HTMLElement&&F instanceof HTMLElement||"string"==typeof F.nodeName&&"function"==typeof F.getAttribute)){for(var ne="<"+w.call(String(t.nodeName)),ie=t.attributes||[],ae=0;ae<ie.length;ae++)ne+=" "+ie[ae].name+"="+D(q(ie[ae].value),"double",l);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+w.call(String(t.nodeName))+">"}if(U(t)){if(0===t.length)return"[]";var oe=Z(t,J);return G&&!function(e){for(var t=0;t<e.length;t++)if(V(e[t],"\n")>=0)return!1;return!0}(oe)?"["+K(oe,G)+"]":"[ "+x.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==H(e)||T&&"object"==typeof e&&T in e)}(t)){var se=Z(t,J);return"cause"in Error.prototype||!("cause"in t)||C.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+x.call(se,", ")+" }":"{ ["+String(t)+"] "+x.call(E.call("[cause]: "+J(t.cause),se),", ")+" }"}if("object"==typeof t&&m){if(R&&"function"==typeof t[R]&&M)return M(t,{depth:j-i});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var le=[];return o&&o.call(t,(function(e,r){le.push(J(r,t,!0)+" => "+J(e,t))})),Y("Map",a.call(t),le,G)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return u&&u.call(t,(function(e){ce.push(J(e,t))})),Y("Set",c.call(t),ce,G)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==H(e)||T&&"object"==typeof e&&T in e)}(t))return X(J(Number(t)));if(function(e){if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return X(J(I.call(t)));if(function(e){return!("[object Boolean]"!==H(e)||T&&"object"==typeof e&&T in e)}(t))return X(f.call(t));if(function(e){return!("[object String]"!==H(e)||T&&"object"==typeof e&&T in e)}(t))return X(J(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==H(e)||T&&"object"==typeof e&&T in e)}(t)&&!B(t)){var ue=Z(t,J),pe=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!pe&&T&&Object(t)===t&&T in t?_.call(H(t),8,-1):de?"Object":"",fe=(pe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+x.call(E.call([],he||[],de||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":G?fe+"{"+K(ue,G)+"}":fe+"{ "+x.call(ue,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return G.call(e,t)}function H(e){return m.call(e)}function V(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(_.call(e,0,t.maxStringLength),t)+n}return D(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+v.call(t.toString(16))}function X(e){return"Object("+e+")"}function Q(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?K(r,n):x.call(r,", "))+"}"}function K(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+x.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=U(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=W(e,i)?t(e[i],e):""}var a,o="function"==typeof j?j(e):[];if(P){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var l in e)W(e,l)&&(r&&String(Number(l))===l&&l<e.length||P&&a["$"+l]instanceof Symbol||(S.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if("function"==typeof j)for(var c=0;c<o.length;c++)C.call(e,o[c])&&n.push("["+t(o[c])+"]: "+t(e[o[c]],e));return n}},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},129:(e,t,r)=>{"use strict";var n=r(8261),i=r(5235),a=r(5798);e.exports={formats:a,parse:i,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),i=Object.prototype.hasOwnProperty,a=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(a),c=s?a.slice(0,s.index):a,u=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var p=0;r.depth>0&&null!==(s=o.exec(a))&&p<r.depth;){if(p+=1,!r.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+a.slice(s.index)+"]"),function(e,t,r,n){for(var i=n?t:l(t,r),a=e.length-1;a>=0;--a){var o,s=e[a];if("[]"===s&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[])[u]=i:"__proto__"!==c&&(o[c]=i):o={0:i}}i=o}return i}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,p),h=-1,f=t.charset;if(t.charsetSentinel)for(r=0;r<d.length;++r)0===d[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[r]?f="utf-8":"utf8=%26%2310003%3B"===d[r]&&(f="iso-8859-1"),h=r,r=d.length);for(r=0;r<d.length;++r)if(r!==h){var m,g,y=d[r],_=y.indexOf("]="),b=-1===_?y.indexOf("="):_+1;-1===b?(m=t.decoder(y,o.decoder,f,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(y.slice(0,b),o.decoder,f,"key"),g=n.maybeMap(l(y.slice(b+1),t),(function(e){return t.decoder(e,o.decoder,f,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=s(g)),y.indexOf("[]=")>-1&&(g=a(g)?[g]:g),i.call(c,m)?c[m]=n.combine(c[m],g):c[m]=g}return c}(e,r):e,p=r.plainObjects?Object.create(null):{},d=Object.keys(u),h=0;h<d.length;++h){var f=d[h],m=c(f,u[f],r,"string"==typeof e);p=n.merge(p,m,r)}return!0===r.allowSparse?p:n.compact(p)}},8261:(e,t,r)=>{"use strict";var n=r(7478),i=r(2769),a=r(5798),o=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},p=Date.prototype.toISOString,d=a.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:a.formatters[d],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,r,a,o,s,c,p,d,m,g,y,_,b,v,w,S){for(var E,x=t,k=S,A=0,I=!1;void 0!==(k=k.get(f))&&!I;){var j=k.get(t);if(A+=1,void 0!==j){if(j===A)throw new RangeError("Cyclic object value");I=!0}void 0===k.get(f)&&(A=0)}if("function"==typeof d?x=d(r,x):x instanceof Date?x=y(x):"comma"===a&&l(x)&&(x=i.maybeMap(x,(function(e){return e instanceof Date?y(e):e}))),null===x){if(s)return p&&!v?p(r,h.encoder,w,"key",_):r;x=""}if("string"==typeof(E=x)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(x))return p?[b(v?r:p(r,h.encoder,w,"key",_))+"="+b(p(x,h.encoder,w,"value",_))]:[b(r)+"="+b(String(x))];var O,P=[];if(void 0===x)return P;if("comma"===a&&l(x))v&&p&&(x=i.maybeMap(x,p)),O=[{value:x.length>0?x.join(",")||null:void 0}];else if(l(d))O=d;else{var T=Object.keys(x);O=m?T.sort(m):T}for(var C=o&&l(x)&&1===x.length?r+"[]":r,N=0;N<O.length;++N){var L=O[N],M="object"==typeof L&&void 0!==L.value?L.value:x[L];if(!c||null!==M){var F=l(x)?"function"==typeof a?a(C,L):C:C+(g?"."+L:"["+L+"]");S.set(t,A);var R=n();R.set(f,S),u(P,e(M,F,a,o,s,c,"comma"===a&&v&&l(x)?null:p,d,m,g,y,_,b,v,w,R))}}return P};e.exports=function(e,t){var r,i=e,c=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=a.default;if(void 0!==e.format){if(!o.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=a.formatters[r],i=h.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):l(c.filter)&&(r=c.filter);var p,d=[];if("object"!=typeof i||null===i)return"";p=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[p];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===f&&t&&t.commaRoundTrip;r||(r=Object.keys(i)),c.sort&&r.sort(c.sort);for(var y=n(),_=0;_<r.length;++_){var b=r[_];c.skipNulls&&null===i[b]||u(d,m(i[b],b,f,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,y))}var v=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),v.length>0?w+v:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],s=Object.keys(o),l=0;l<s.length;++l){var c=s[l],u=o[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:o,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,a){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<s.length;++c){var u=s.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===n.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=o[u]:u<2048?l+=o[192|u>>6]+o[128|63&u]:u<55296||u>=57344?l+=o[224|u>>12]+o[128|u>>6&63]+o[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(a(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return a(t)&&!a(r)&&(o=s(t,n)),a(t)&&a(r)?(r.forEach((function(r,a){if(i.call(t,a)){var o=t[a];o&&"object"==typeof o&&r&&"object"==typeof r?t[a]=e(o,r,n):t.push(r)}else t[a]=r})),t):Object.keys(r).reduce((function(t,a){var o=r[a];return i.call(t,a)?t[a]=e(t[a],o,n):t[a]=o,t}),o)}}},5666:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.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 u(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),s=new P(n||[]);return i(o,"_invoke",{value:A(e,r,s)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function y(){}function _(){}function b(){}var v={};c(v,o,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(T([])));S&&S!==r&&n.call(S,o)&&(v=S);var E=b.prototype=y.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,a,o,s){var l=p(e[i],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(u).then((function(e){c.value=e,o(c)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function A(e,t,r){var n=d;return function(i,a){if(n===f)throw new Error("Generator is already running");if(n===m){if("throw"===i)throw a;return C()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=I(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var l=p(e,t,r);if("normal"===l.type){if(n=r.done?m:h,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=m,r.method="throw",r.arg=l.arg)}}}function I(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,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;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,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function T(e){if(e){var r=e[o];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}}return{next:C}}function C(){return{value:t,done:!0}}return _.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:_,configurable:!0}),_.displayName=c(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},x(k.prototype),c(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new k(u(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(E),c(E,l,"Generator"),c(E,o,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,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(O),!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 e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.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],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.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 a=i;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,g):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),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),O(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;O(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),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},7771:(e,t,r)=>{"use strict";var n=r(210),i=r(2296),a=r(1044)(),o=r(7296),s=r(4453),l=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&o){var u=o(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(c=!1)}return(n||c||!r)&&(a?i(e,"length",t,!0,!0):i(e,"length",t)),e}},7478:(e,t,r)=>{"use strict";var n=r(210),i=r(1924),a=r(631),o=r(4453),s=n("%WeakMap%",!0),l=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),p=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),f=i("Map.prototype.has",!0),m=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new o("Side channel does not contain "+a(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(l){if(t)return d(t,n)}else if(r)return function(e,t){var r=m(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return p(e,n)}else if(l){if(t)return f(t,n)}else if(r)return function(e,t){return!!m(e,t)}(r,n);return!1},set:function(n,i){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),u(e,n,i)):l?(t||(t=new l),h(t,n,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=m(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,i))}};return n}},7026:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},4654:()=>{},4836:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},8698:e=>{function t(r){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},960:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>createAngularModuleInstance});var axios__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(9669),_consts_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(738);let $q={when:function(e){return new Promise((t=>{t(e)}))}},factoryReturns={},angular={module:()=>angular,directive:()=>angular,factory(e,t){try{factoryReturns[e]="object"==typeof t?t[t.length-1]($q):t($q)}catch(t){console.log("Errror in data type: ",e),console.log(t)}return angular},service:()=>angular,run:()=>angular,filter:()=>angular,controller:()=>angular,value:()=>angular,element:()=>angular,injector:()=>angular,invoke:()=>angular};async function createAngularModuleInstance(gudhub,module_id,module_url,angularInjector,nodeWindow){try{let angularModule,importedClass;if(_consts_js__WEBPACK_IMPORTED_MODULE_1__.P)if(window.angular){angularInjector.has(module_id)||await angularInjector.get("$ocLazyLoad").load(module_url),angularModule=await angularInjector.get(module_id);let module=await axios__WEBPACK_IMPORTED_MODULE_0__.get(module_url);module=module.data;try{eval(module)}catch(e){console.error(`ERROR WHILE EVAL() IN GHCONSTRUCTOR. MODULE ID: ${module_id}`),console.log(e)}importedClass=factoryReturns[module_id]}else{let module=await axios__WEBPACK_IMPORTED_MODULE_0__.get(module_url);module=module.data;try{eval(module)}catch(e){console.log(`Error while importing module: ${module_id}`),console.log(e)}importedClass=factoryReturns[module_id]}else{const e=new Proxy(nodeWindow,{get:(e,t)=>e[t],set:(e,t,r)=>(e[t]=r,global[t]=r,!0)});global.hasOwnProperty("window")||(global.window=e,global.document=nodeWindow.document,global.Element=nodeWindow.Element,global.CharacterData=nodeWindow.CharacterData,global.this=e,global.self=e,global.Blob=nodeWindow.Blob,global.Node=nodeWindow.Node,global.navigator=nodeWindow.navigator,global.HTMLElement=nodeWindow.HTMLElement,global.XMLHttpRequest=nodeWindow.XMLHttpRequest,global.WebSocket=nodeWindow.WebSocket,global.crypto=nodeWindow.crypto,global.DOMParser=nodeWindow.DOMParser,global.Symbol=nodeWindow.Symbol,global.document.queryCommandSupported=e=>!1,global.angular=angular);let t=await axios__WEBPACK_IMPORTED_MODULE_0__.get(module_url),r=t.data,n=encodeURIComponent(r),i;n="data:text/javascript;charset=utf-8,"+n;try{i=await import(n)}catch(e){console.log(`Error while importing module: ${module_id}`),console.log(e)}importedClass=new i.default}let result={type:module_id,getTemplate:function(e,t,r,n,i,a){let o="false"!==r;return importedClass.getTemplate(e,t,o,n,i,a)},getDefaultValue:function(e,t,r,n){return new Promise((async i=>{let a=importedClass.getDefaultValue;i(a?await a(e,t,r,n):null)}))},getSettings:function(e,t,r){return importedClass.getSettings(e,t,r)},filter:{getSearchOptions:function(e){let t=importedClass;return t.filter&&t.filter.getSearchOptions?importedClass.filter.getSearchOptions(e)||null:[]},getDropdownValues:function(){let e=importedClass;return e.filter&&e.filter.getDropdownValues?e.filter.getDropdownValues()||null:[]}},getInterpretation:function(e,t,r,n,i,a){return new Promise((async o=>{let s=importedClass;try{let l=await s.getInterpretation(gudhub,e,a,i,n,r),c=l.find((e=>e.id==t))||l.find((e=>"default"==e.id));o({html:await c.content()})}catch(e){console.log(`ERROR IN ${module_id}`,e),o({html:"<span>no interpretation</span>"})}}))},getInterpretationsList:function(e,t,r,n){return importedClass.getInterpretation(e,t,r,n)},getInterpretatedValue:function(e,t,r,n){return new Promise((async i=>{let a=importedClass.getInterpretatedValue;i(a?await a(e,t,r,n):e)}))},onMessage:function(e,t,r){return new Promise((async n=>{const i=importedClass.onMessage;i&&n(await i(e,t,r)),n(null)}))}};return _consts_js__WEBPACK_IMPORTED_MODULE_1__.P&&(result.extendController=function(e){angularModule.getActionScope(e)},result.runAction=function(e){try{angularModule.runAction(e)}catch(e){}},result.getWindowScope=function(e){return angularModule.getWindowScope(e)},result.getWindowHTML=function(e){return angularModule.getWindowHTML(e)}),result}catch(e){console.log(e),console.log(`Failed in createAngularModuleInstance (ghconstructor). Module id: ${module_id}.`)}}},738:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n=![typeof window,typeof document].includes("undefined")},8593:e=>{"use strict";e.exports=JSON.parse('{"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"}]}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{GudHub:()=>dt,default:()=>ht}),__webpack_require__(5666);var e=__webpack_require__(9669);function t(e=[]){return e.filter((e=>null!=e.field_value))}var r=__webpack_require__(129);class n{constructor(e){this.root=e,this.requestPromises=[]}init(e){this.getToken=e}async get(t){const r=await this.getToken(),n=this.getHashCode(t);if(this.requestPromises[n])return this.requestPromises[n].promise;const i=new Promise(((n,i)=>{let a;t.externalResource?a=t.url:(a=this.root+t.url,a=`${a}${/\?/.test(a)?"&":"?"}token=${r}${function(e={}){const t=Object.entries(e);return t.length?`&${t.map((([e,t])=>`${e}=${t}`)).join("&")}`:""}(t.params)}`),e.get(a,{validateStatus:function(e){return e<400}}).then((function(e){200!=e.status&&console.error(`GUDHUB HTTP SERVICE: GET ERROR: ${e.status}`,e),n(e.data)})).catch((function(e){console.error(`GUDHUB HTTP SERVICE: GET ERROR: ${e.response.status}\n`,e),console.log("Request message: ",t),e.response&&e.response.data&&console.log("Error response data: ",e.response.data),i(e)}))}));return this.pushPromise(i,n),i}async post(t){const n=this.getHashCode(t);if(t.form.token=await this.getToken(),this.requestPromises[n])return this.requestPromises[n].promise;const i=new Promise(((n,i)=>{e.post(this.root+t.url,r.stringify(t.form),{maxBodyLength:1/0,headers:t.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(e){return e<400}}).then((function(e){200!=e.status&&console.error(`GUDHUB HTTP SERVICE: POST ERROR: ${e.status}`,e),n(e.data)})).catch((function(e){console.error(`GUDHUB HTTP SERVICE: POST ERROR: ${e.response.status}\n`,e),console.log("Request message: ",t),i(e)}))}));return this.pushPromise(i,n),i}axiosRequest(t){const n=this.getHashCode(t);if(this.requestPromises[n])return this.requestPromises[n].promise;let i=t.method?t.method.toLowerCase():"get",a=t.url,o=t.headers||{};t.form&&(o["Content-Type"]="application/x-www-form-urlencoded");const s=new Promise((async(n,s)=>{try{const{data:s}=await e[i](a,"post"===i?r.stringify(t.form)||t.body:{headers:o},"post"===i?{headers:o}:{});n(s)}catch(e){console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",e.message),console.log("Request message: ",t),s(e)}}));return this.pushPromise(s,n),s}pushPromise(e,t){this.requestPromises[t]={promise:e,hesh:t,callback:e.then((()=>{this.destroyPromise(t)})).catch((e=>{this.destroyPromise(t)}))}}destroyPromise(e){this.requestPromises=this.requestPromises.filter((t=>t.hesh!==e))}getHashCode(e){let t=0,n=r.stringify(e);if(0==n.length)return t;for(let e=0;e<n.length;e++)t=(t<<5)-t+n.charCodeAt(e),t&=t;return"h"+t}}function i(e){let t="";for(let r in e)e.hasOwnProperty(r)&&e[r]&&(t+="."+e[r]);return t?t.substring(1):"any"}class a{constructor(){this.subscribers={},this.messageBox={}}on(e,t,r){return function(e,t,r){return null==e||"string"!=typeof e?(console.log("Listener type is \"undefined\" or not have actual 'type' for subscribe"),!1):null==t||"object"!=typeof t?(console.log("Listener destination is \"undefined\" or not have actual 'type' for subscribe"),!1):"function"==typeof r||(console.log("Listener is not a function for subscribe!"),!1)}(e,t,r)&&e.split(" ").map((e=>e+":"+i(t))).forEach((e=>{this.subscribers[e]||(this.subscribers[e]=new Set),this.subscribers[e].add(r),this.checkMessageBox(e)})),this}emit(e,t,r,n){return e.split(" ").forEach((a=>{const o=a+":"+i(t);if(this.subscribers[o]){if(0==this.subscribers[o].size)return this.messageBox[o]=[e,t,r,n,!1],this;this.subscribers[o].forEach((function(e){e(null,r,n)}))}else this.messageBox[o]=[e,t,r,n,!1]})),this}onRoot(e,t,r){return this.on(e,t,r)}destroy(e,t,r){return e.split(" ").forEach((e=>{const n=e+":"+i(t);this.subscribers[n]&&r&&this.subscribers[n].delete(r),this.subscribers[n]&&!r&&delete this.subscribers[n]})),this}checkMessageBox(e){this.cleanMesssageBox(),this.messageBox[e]&&setTimeout((()=>{this.messageBox[e]&&(this.emit(...this.messageBox[e]),this.messageBox[e][4]=!0)}),0)}cleanMesssageBox(){for(let e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}class o{constructor(e,t,r){this.apps_list=[],this.users_list=[],this.user={},this.modulesList=function(e,t,r){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+"/"+r+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:t+"/"+r+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:t+"/"+r+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:t+"/"+r+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:t+"/"+r+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:t+"/"+r+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:t+"/"+r+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:t+"/"+r+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:t+"/"+r+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:t+"/"+r+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:t+"/"+r+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:t+"/"+r+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:t+"/"+r+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:t+"/"+r+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:t+"/"+r+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:t+"/"+r+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:t+"/"+r+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:t+"/"+r+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:t+"/"+r+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:t+"/"+r+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:t+"/"+r+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:t+"/"+r+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:t+"/"+r+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:t+"/"+r+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:t+"/"+r+"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+"/"+r+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:t+"/"+r+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:t+"/"+r+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:t+"/"+r+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:t+"/"+r+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:t+"/"+r+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:t+"/"+r+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:t+"/"+r+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:t+"/"+r+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:t+"/"+r+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:t+"/"+r+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:t+"/"+r+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:t+"/"+r+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:t+"/"+r+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:t+"/"+r+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:t+"/"+r+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:t+"/"+r+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:t+"/"+r+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:t+"/"+r+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:t+"/"+r+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:t+"/"+r+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:t+"/"+r+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:t+"/"+r+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:t+"/"+r+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:t+"/"+r+"turbo_sms.js",type:"automation",icon:"email"}]}(e,t,r),this.ghComponentsPromises=[]}getMainStorage(){return this}getAppsList(){return this.apps_list}getUser(){return this.user}getUsersList(){return this.users_list}getModulesList(e,t,r){return void 0===e?this.modulesList:0==t?this.modulesList.filter((t=>t.created_for?t.type===e&&t.private&&t.created_for.includes(r):t.type===e&&!t.private)):this.modulesList.filter((t=>t.type===e))}getModuleUrl(e){return this.modulesList.find((t=>t.data_type==e))}setUser(e){this.user=e,this.users_list.push(e)}updateUser(e={}){e.avatar_128&&(e.avatar_128=e.avatar_128+"?"+(new Date).getTime()),e.avatar_512&&(e.avatar_512=e.avatar_512+"?"+(new Date).getTime()),this.user={...this.user,...e},this.users_list=this.users_list.filter((t=>t.user_id!=e.user_id)),this.users_list.push(this.user)}unsetUser(){this.user={}}getApp(e){for(let t=0;t<this.apps_list.length;t++)if(this.apps_list[t].app_id==e)return this.apps_list[t]}unsetApps(){this.apps_list=[]}updateApp(e){return this.apps_list=this.apps_list.map((t=>t.app_id==e.app_id?e:t)),this.apps_list}deleteApp(e){return this.apps_list=this.apps_list.filter((t=>t.app_id!=e)),this.apps_list}async updateItemsInApp(e,t){const r=await this.getApp(t);return r&&(r.items_list=updateItems(e,r.items_list,this.pipeService.emit.bind(this.pipeService),t),this.updateApp(r)),r}async addItemsToApp(e,t){const r=await this.getApp(t);return r&&(r.items_list.push(...e),this.updateApp(r),this.pipeService.emit("gh_items_update",{app_id:t},e)),r}async deleteItemsInApp(e,t){const r=await this.getApp(t);return r&&(r.items_list=r.items_list.filter((t=>!e.find((e=>e.item_id==t.item_id)))),this.updateApp(r)),r}}var s=__webpack_require__(7026);class l{constructor(e,t){this.websocket=null,this.connected=!1,this.queue=[],this.url=e,this.auth=t,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=![typeof window,typeof document].includes("undefined")}async addSubscription(e){const t=`token=${await this.auth.getToken()}/~/app_id=${e}`;this.connected&&this.websocket.send(t),this.queue.push(e)}async onOpen(){this.reload=!0,console.log("websocket opened"),this.connected=!0;const e=await this.auth.getToken();this.queue.forEach((t=>{const r=`token=${e}/~/app_id=${t}`;this.websocket.send(r)}))}onError(e){console.log("websocket error: ",e),this.websocket.close()}onClose(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(e){console.log(e)}}async onMessage(e){const t=this.isBrowser?e.data:e;if(t.match(/HeartBeat/)){const e=(new Date).getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<e?await this.onConnectionLost():(this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=(new Date).getTime())}if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),t.match(/[{}]/)){let e=JSON.parse(t);const r=await this.auth.getToken();e.token!=r&&this.onMassageHandler(e)}}initWebSocket(e,t){this.onMassageHandler=e,this.refreshAppsHandler=t,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 s(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")}connectionChecker(){setInterval((async()=>{let e=(new Date).getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<e&&await this.onConnectionLost()}),1e3)}async onConnectionLost(){try{await this.auth.getVersion(),this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close())}catch(e){console.log(e)}}}function c(e){return Array.isArray?Array.isArray(e):"[object Array]"===m(e)}function u(e){return"string"==typeof e}function p(e){return"number"==typeof e}function d(e){return"object"==typeof e}function h(e){return null!=e}function f(e){return!e.trim().length}function m(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const g=e=>`Missing ${e} property in key`,y=e=>`Property 'weight' in key '${e}' must be a positive integer`,_=Object.prototype.hasOwnProperty;class b{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let r=v(e);t+=r.weight,this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function v(e){let t=null,r=null,n=null,i=1,a=null;if(u(e)||c(e))n=e,t=w(e),r=S(e);else{if(!_.call(e,"name"))throw new Error(g("name"));const o=e.name;if(n=o,_.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(y(o));t=w(o),r=S(o),a=e.getFn}return{path:t,id:r,weight:i,src:n,getFn:a}}function w(e){return c(e)?e:e.split(".")}function S(e){return c(e)?e.join("."):e}var E={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(e,t){let r=[],n=!1;const i=(e,t,a)=>{if(h(e))if(t[a]){const o=e[t[a]];if(!h(o))return;if(a===t.length-1&&(u(o)||p(o)||function(e){return!0===e||!1===e||function(e){return d(e)&&null!==e}(e)&&"[object Boolean]"==m(e)}(o)))r.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(o));else if(c(o)){n=!0;for(let e=0,r=o.length;e<r;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}else r.push(e)};return i(e,u(t)?t.split("."):t,0),n?r:r[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const x=/[^ ]+/g;class k{constructor({getFn:e=E.getFn,fieldNormWeight:t=E.fieldNormWeight}={}){this.norm=function(e=1,t=3){const r=new Map,n=Math.pow(10,t);return{get(t){const i=t.match(x).length;if(r.has(i))return r.get(i);const a=1/Math.pow(i,.5*e),o=parseFloat(Math.round(a*n)/n);return r.set(i,o),o},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,u(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!h(e)||f(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach(((t,n)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(h(i))if(c(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:r,value:n}=t.pop();if(h(n))if(u(n)&&!f(n)){let t={v:n,i:r,n:this.norm.get(n)};e.push(t)}else c(n)&&n.forEach(((e,r)=>{t.push({nestedArrIndex:r,value:e})}))}r.$[n]=e}else if(u(i)&&!f(i)){let e={v:i,n:this.norm.get(i)};r.$[n]=e}})),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function A(e,t,{getFn:r=E.getFn,fieldNormWeight:n=E.fieldNormWeight}={}){const i=new k({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(v)),i.setSources(t),i.create(),i}function I(e,{errors:t=0,currentLocation:r=0,expectedLocation:n=0,distance:i=E.distance,ignoreLocation:a=E.ignoreLocation}={}){const o=t/e.length;if(a)return o;const s=Math.abs(n-r);return i?o+s/i:s?1:o}const j=32;function O(e){let t={};for(let r=0,n=e.length;r<n;r+=1){const i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}class P{constructor(e,{location:t=E.location,threshold:r=E.threshold,distance:n=E.distance,includeMatches:i=E.includeMatches,findAllMatches:a=E.findAllMatches,minMatchCharLength:o=E.minMatchCharLength,isCaseSensitive:s=E.isCaseSensitive,ignoreLocation:l=E.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreLocation:l},this.pattern=s?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:O(e),startIndex:t})},u=this.pattern.length;if(u>j){let e=0;const t=u%j,r=u-t;for(;e<r;)c(this.pattern.substr(e,j),e),e+=j;if(t){const e=u-j;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:r}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}const{location:n,distance:i,threshold:a,findAllMatches:o,minMatchCharLength:s,ignoreLocation:l}=this.options;let c=[],u=0,p=!1;this.chunks.forEach((({pattern:t,alphabet:d,startIndex:h})=>{const{isMatch:f,score:m,indices:g}=function(e,t,r,{location:n=E.location,distance:i=E.distance,threshold:a=E.threshold,findAllMatches:o=E.findAllMatches,minMatchCharLength:s=E.minMatchCharLength,includeMatches:l=E.includeMatches,ignoreLocation:c=E.ignoreLocation}={}){if(t.length>j)throw new Error("Pattern length exceeds max of 32.");const u=t.length,p=e.length,d=Math.max(0,Math.min(n,p));let h=a,f=d;const m=s>1||l,g=m?Array(p):[];let y;for(;(y=e.indexOf(t,f))>-1;){let e=I(t,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:c});if(h=Math.min(e,h),f=y+u,m){let e=0;for(;e<u;)g[y+e]=1,e+=1}}f=-1;let _=[],b=1,v=u+p;const w=1<<u-1;for(let n=0;n<u;n+=1){let a=0,s=v;for(;a<s;)I(t,{errors:n,currentLocation:d+s,expectedLocation:d,distance:i,ignoreLocation:c})<=h?a=s:v=s,s=Math.floor((v-a)/2+a);v=s;let l=Math.max(1,d-s+1),y=o?p:Math.min(d+s,p)+u,S=Array(y+2);S[y+1]=(1<<n)-1;for(let a=y;a>=l;a-=1){let o=a-1,s=r[e.charAt(o)];if(m&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,n&&(S[a]|=(_[a+1]|_[a])<<1|1|_[a+1]),S[a]&w&&(b=I(t,{errors:n,currentLocation:o,expectedLocation:d,distance:i,ignoreLocation:c}),b<=h)){if(h=b,f=o,f<=d)break;l=Math.max(1,2*d-f)}}if(I(t,{errors:n+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:c})>h)break;_=S}const S={isMatch:f>=0,score:Math.max(.001,b)};if(m){const e=function(e=[],t=E.minMatchCharLength){let r=[],n=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&-1===n?n=a:o||-1===n||(i=a-1,i-n+1>=t&&r.push([n,i]),n=-1)}return e[a-1]&&a-n>=t&&r.push([n,a-1]),r}(g,s);e.length?l&&(S.indices=e):S.isMatch=!1}return S}(e,t,d,{location:n+h,distance:i,threshold:a,findAllMatches:o,minMatchCharLength:s,includeMatches:r,ignoreLocation:l});f&&(p=!0),u+=m,f&&g&&(c=[...c,...g])}));let d={isMatch:p,score:p?u/this.chunks.length:1};return p&&r&&(d.indices=c),d}}class T{constructor(e){this.pattern=e}static isMultiMatch(e){return C(e,this.multiRegex)}static isSingleMatch(e){return C(e,this.singleRegex)}search(){}}function C(e,t){const r=e.match(t);return r?r[1]:null}class N extends T{constructor(e,{location:t=E.location,threshold:r=E.threshold,distance:n=E.distance,includeMatches:i=E.includeMatches,findAllMatches:a=E.findAllMatches,minMatchCharLength:o=E.minMatchCharLength,isCaseSensitive:s=E.isCaseSensitive,ignoreLocation:l=E.ignoreLocation}={}){super(e),this._bitapSearch=new P(e,{location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class L extends T{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0;const n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,n.push([t,r-1]);const a=!!n.length;return{isMatch:a,score:a?0:1,indices:n}}}const M=[class extends T{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},L,class extends T{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends T{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends T{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends T{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends T{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},N],F=M.length,R=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,D=new Set([N.type,L.type]);const q=[];function U(e,t){for(let r=0,n=q.length;r<n;r+=1){let n=q[r];if(n.condition(e,t))return new n(e,t)}return new P(e,t)}const B="$and",$="$path",G=e=>!(!e[B]&&!e.$or),W=e=>({[B]:Object.keys(e).map((t=>({[t]:e[t]})))});function H(e,t,{auto:r=!0}={}){const n=e=>{let i=Object.keys(e);const a=(e=>!!e[$])(e);if(!a&&i.length>1&&!G(e))return n(W(e));if((e=>!c(e)&&d(e)&&!G(e))(e)){const n=a?e[$]:i[0],o=a?e.$val:e[n];if(!u(o))throw new Error((e=>`Invalid value for key ${e}`)(n));const s={keyId:S(n),pattern:o};return r&&(s.searcher=U(o,t)),s}let o={children:[],operator:i[0]};return i.forEach((t=>{const r=e[t];c(r)&&r.forEach((e=>{o.children.push(n(e))}))})),o};return G(e)||(e=W(e)),n(e)}function V(e,t){const r=e.matches;t.matches=[],h(r)&&r.forEach((e=>{if(!h(e.indices)||!e.indices.length)return;const{indices:r,value:n}=e;let i={indices:r,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function z(e,t){t.score=e.score}class J{constructor(e,t={},r){this.options={...E,...t},this.options.useExtendedSearch,this._keyStore=new b(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof k))throw new Error("Incorrect 'index' type");this._myIndex=t||A(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){h(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let r=0,n=this._docs.length;r<n;r+=1){const i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,n-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:r,includeScore:n,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options;let s=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=E.ignoreFieldNorm}){e.forEach((e=>{let r=1;e.matches.forEach((({key:e,norm:n,score:i})=>{const a=e?e.weight:null;r*=Math.pow(0===i&&a?Number.EPSILON:i,(a||1)*(t?1:n))})),e.score=r}))}(s,{ignoreFieldNorm:o}),i&&s.sort(a),p(t)&&t>-1&&(s=s.slice(0,t)),function(e,t,{includeMatches:r=E.includeMatches,includeScore:n=E.includeScore}={}){const i=[];return r&&i.push(V),n&&i.push(z),e.map((e=>{const{idx:r}=e,n={item:t[r],refIndex:r};return i.length&&i.forEach((t=>{t(e,n)})),n}))}(s,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const t=U(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach((({v:e,i:r,n:i})=>{if(!h(e))return;const{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&n.push({item:e,idx:r,matches:[{score:o,value:e,norm:i,indices:s}]})})),n}_searchLogical(e){const t=H(e,this.options),r=(e,t,n)=>{if(!e.children){const{keyId:r,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:i});return a&&a.length?[{idx:n,item:t,matches:a}]:[]}const i=[];for(let a=0,o=e.children.length;a<o;a+=1){const o=e.children[a],s=r(o,t,n);if(s.length)i.push(...s);else if(e.operator===B)return[]}return i},n=this._myIndex.records,i={},a=[];return n.forEach((({$:e,i:n})=>{if(h(e)){let o=r(t,e,n);o.length&&(i[n]||(i[n]={idx:n,item:e,matches:[]},a.push(i[n])),o.forEach((({matches:e})=>{i[n].matches.push(...e)})))}})),a}_searchObjectList(e){const t=U(e,this.options),{keys:r,records:n}=this._myIndex,i=[];return n.forEach((({$:e,i:n})=>{if(!h(e))return;let a=[];r.forEach(((r,n)=>{a.push(...this._findMatches({key:r,value:e[n],searcher:t}))})),a.length&&i.push({idx:n,item:e,matches:a})})),i}_findMatches({key:e,value:t,searcher:r}){if(!h(t))return[];let n=[];if(c(t))t.forEach((({v:t,i,n:a})=>{if(!h(t))return;const{isMatch:o,score:s,indices:l}=r.searchIn(t);o&&n.push({score:s,key:e,value:t,idx:i,norm:a,indices:l})}));else{const{v:i,n:a}=t,{isMatch:o,score:s,indices:l}=r.searchIn(i);o&&n.push({score:s,key:e,value:i,norm:a,indices:l})}return n}}function X(e){return e*(Math.PI/180)}function Q(e=0){const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e).valueOf()}function Y(e,t){if(e&&e.length)return t?e.filter((e=>e.fields.find((e=>e.index_value&&-1!==e.index_value.toLowerCase().indexOf(t.toLowerCase()))))):e}J.version="6.6.2",J.createIndex=A,J.parseIndex=function(e,{getFn:t=E.getFn,fieldNormWeight:r=E.fieldNormWeight}={}){const{keys:n,records:i}=e,a=new k({getFn:t,fieldNormWeight:r});return a.setKeys(n),a.setIndexRecords(i),a},J.config=E,J.parseQuery=H,function(...e){q.push(...e)}(class{constructor(e,{isCaseSensitive:t=E.isCaseSensitive,includeMatches:r=E.includeMatches,minMatchCharLength:n=E.minMatchCharLength,ignoreLocation:i=E.ignoreLocation,findAllMatches:a=E.findAllMatches,location:o=E.location,threshold:s=E.threshold,distance:l=E.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:r,minMatchCharLength:n,findAllMatches:a,ignoreLocation:i,location:o,threshold:s,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let r=e.trim().split(R).filter((e=>e&&!!e.trim())),n=[];for(let e=0,i=r.length;e<i;e+=1){const i=r[e];let a=!1,o=-1;for(;!a&&++o<F;){const e=M[o];let r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),a=!0)}if(!a)for(o=-1;++o<F;){const e=M[o];let r=e.isSingleMatch(i);if(r){n.push(new e(r,t));break}}}return n}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let i=0,a=[],o=0;for(let n=0,s=t.length;n<s;n+=1){const s=t[n];a.length=0,i=0;for(let t=0,n=s.length;t<n;t+=1){const n=s[t],{isMatch:l,indices:c,score:u}=n.search(e);if(!l){o=0,i=0,a.length=0;break}if(i+=1,o+=u,r){const e=n.constructor.type;D.has(e)?a=[...a,...c]:a.push(c)}}if(i){let e={isMatch:!0,score:o/i};return r&&(e.indices=a),e}}return{isMatch:!1,score:1}}});const K=new J([]);class Z{changeBehavior(e){switch(e){case"contain_or":this._checkFn=function(e,t){return t.some((t=>e.some((e=>-1!==e.indexOf(t)))))};break;case"contain_and":this._checkFn=function(e,t){return t.every((t=>e.some((e=>-1!==e.indexOf(t)))))};break;case"not_contain_or":this._checkFn=function(e,t){return t.some((t=>e.every((e=>-1===e.indexOf(t)))))};break;case"not_contain_and":this._checkFn=function(e,t){return t.every((t=>e.every((e=>-1===e.indexOf(t)))))};break;case"equal_or":this._checkFn=function(e,t){return!!e.length&&e.some((e=>t.some((t=>e==t))))};break;case"equal_and":this._checkFn=function(e,t){if(!e.length)return!1;let r=new Set(t);for(;e.length&&r.size;){let t=e.pop();r.has(t)&&r.delete(t)}return!r.size};break;case"not_equal_or":this._checkFn=function(e,t){if(!e.length)return!0;let r=new Set(t);for(;e.length&&r.size;){let t=e.pop();if(!r.has(t))return!0}return!1};break;case"not_equal_and":this._checkFn=function(e,t){let r=new Set(t);for(;e.length&&r.size;){let t=e.pop();if(r.has(t))return!1}return!0};break;case"bigger":this._checkFn=function(e,t){return t.some((t=>e.every((e=>e>t))))};break;case"lower":this._checkFn=function(e,t){return t.some((t=>e.every((e=>e<t))))};break;case"range":this._checkFn=function(e,t){return t.some((t=>e.every((e=>t.start<=e&&e<t.end))))};break;case"value":this._checkFn=function(e,t){return t.some((t=>e.some((e=>e==t))))};break;case"search":this._checkFn=function(e,t){return t.some((t=>{return r=t,n=e,K.setCollection(n),Boolean(K.search(r).length);var r,n}))};break;case"phone_equal_or":this._checkFn=function(e,t){return!!e.length&&t.some((t=>e.some((e=>-1!==e.replace(/[^0-9]/g,"").indexOf(t.replace(/[^0-9]/g,""))))))};break;case"distance":this._checkFn=function(e,t){return t.some((t=>e.some((e=>function(e,t){const[r,n,i]=e.split(":"),[a,o]=t.split(":"),s=X(a-r),l=X(o-n),c=Math.sin(s/2)*Math.sin(s/2)+Math.cos(X(r))*Math.cos(X(a))*Math.sin(l/2)*Math.sin(l/2),u=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))*6371;return Number(i)>=u}(t,e)))))};break;case"date_in":case"date_out":this._checkFn=function(e,t){return t.some((t=>e.some((e=>function({type:e,date:t=0,match:r=!0}={},n){if(!n&&e)return!1;const i=new Date;let a=!0;switch(e){case"day":const e=Q(t),r=Q(t+1);a=e<=n&&n<r;break;case"days":if(t<0){const e=Q(1);a=Q(-6)<=n&&n<e}else{const e=Q(),t=Q(7);a=e<=n&&n<t}break;case"day_week":a=t===new Date(n).getDay();break;case"week":const s=i.getDate()-i.getDay(),l=s+(-2==t?13:6),c=i.setDate(s+7*t),u=(new Date).setDate(l+7*t),[p,d]=(o=u,[new Date(c),new Date(o)]);a=p<=n&&n<=d;break;case"month":if(i.getFullYear()!==new Date(n).getFullYear())return!1;a=i.getMonth()+t===new Date(n).getMonth();break;case"year":a=i.getFullYear()+t===new Date(n).getFullYear();break;default:return!0}var o;return r?a:!a}(t,e)))))};break;case"recurring_date":this._checkFn=function(e,t){return t.some((t=>e.some((e=>gudhub.checkRecurringDate(e,t)))))}}return this}check(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}class ee{convert(e){return[Number(e)]}convertFilterValue(e){return Number(e)}}class te extends ee{convertFilterValue(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}class re{convert(e){return String(null!=e?e:"").toLowerCase().split(",")}convertFilterValue(e){return 0===e?"0":String(e||"").toLowerCase()}}class ne extends ee{convertFilterValue(e){const[t,r,n]=e.split(":");return{type:t,date:Number(r),match:!!Number(n)}}}class ie{convert(e){return[String(Boolean(e))]}convertFilterValue(e){return String(e)}}class ae{convert(e){return[Number(e)]}convertFilterValue(e){return String(e)}}class oe{constructor(){this._strategies={stringStrategy:new re,numberStrategy:new ee,booleanStrategy:new ie,rangeStrategy:new te,dateStrategy:new ne,recurringDateStrategy:new ae}}setStrategy(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}setEntity(e){return this._entity=this._currentStrategy.convert(e),this}getEntity(){return this._entity}setFilterValues(e){let t=Array.isArray(e)?e:[e];return this._filterValues=t.map((e=>this._currentStrategy.convertFilterValue(e))),this}getFilterValues(){return this._filterValues}getCheckOption(){return this._checkOption}}class se{constructor(){}filter(e,t){const r=this.checkIfAllFiltersHaveAndStrategy(e),n=[],i=e.filter((function(e){return e.valuesArray.length}));for(let e of t){let t=!0;for(let n=0;n<i.length;n++){const a=i[n],o=e.fields.find((function(e){return a.field_id==e.field_id})),s=new oe,l=new Z;switch(s.setStrategy(a.search_type).setEntity(o&&null!=o.field_value?o.field_value:null).setFilterValues(a.valuesArray),a.boolean_strategy){case"and":default:t=t&&l.check(s);break;case"or":t=t||l.check(s)}if(!t&&r)break}t&&n.push(e)}return n.length||e.length&&!n.length?n:t}checkIfAllFiltersHaveAndStrategy(e){return e.every((e=>!e.boolean_strategy||"and"==e.boolean_strategy))}}var le=__webpack_require__(9832);function ce(e,t){let r=[];return t.forEach((e=>{r.push({path_to_compare:e,match_coefficient:0})})),e.forEach(((e,t)=>{for(var n=0;n<r.length;n++)r[n].path_to_compare[t]==e&&(r[n].match_coefficient+=1/(t+1))})),r.sort(((e,t)=>t.match_coefficient-e.match_coefficient)),r[0].path_to_compare}function ue(e,t,r,n,i,a){e.forEach((e=>{let o=!0,s=he(e,r).field_value;t.forEach((t=>{let a=he(t,r).field_value;s==a&&(o=!1,de(e,t,n,i))})),o&&a(e)}))}function pe(e,t,r,n,i,a){let o=new fe(t);if(e.forEach((e=>{let a=o.pullItemIndex(e.item_id);null!=a?de(e,t[a],r,n):i(e)})),a)for(const[e,r]of Object.entries(o.itemsMap))a(t[r])}function de(e,t,r,n){let i=!0;for(let r=0;r<e.fields.length;r++){let n=he(t,e.fields[r].field_id);n?n.field_value!=e.fields[r].field_value&&(i=i&&!1):i=i&&!1}i?n(e,t):r(e,t)}function he(e,t){let r=null;for(let n=0;n<e.fields.length;n++)t==e.fields[n].field_id&&(r=e.fields[n]);return r}class fe{constructor(e){this._itemsMap={},e.forEach(((e,t)=>{this._itemsMap[e.item_id]=t}))}pullItemIndex(e){let t=this._itemsMap[e];return delete this._itemsMap[e],t}getItemIndex(e){return this._itemsMap[e]}get itemsMap(){return this._itemsMap}}var me=__webpack_require__(5430),ge=__webpack_require__(8933),ye=__webpack_require__(5276);function _e(e){var t=new Date;let r=Math.floor(t.getMonth()/3),n=t.getFullYear();switch(e){case"next_day":case"tomorrow,future":return me(t,{days:1}).getTime();case"two_days_after":return me(t,{days:2}).getTime();case"three_days_after":return me(t,{days:3}).getTime();case"four_days_after":return me(t,{days:4}).getTime();case"next_week":return me(t,{weeks:1}).getTime();case"two_weeks_after":return me(t,{weeks:2}).getTime();case"three_weeks_after":return me(t,{weeks:3}).getTime();case"this_sunday":return ge(t,0,{weekStartsOn:1});case"this_monday":return ge(t,1,{weekStartsOn:1});case"this_tuesday":return ge(t,2,{weekStartsOn:1});case"this_wednesday":return ge(t,3,{weekStartsOn:1});case"this_thursday":return ge(t,4,{weekStartsOn:1});case"this_friday":return ge(t,5,{weekStartsOn:1});case"this_saturday":return ge(t,6,{weekStartsOn:1});case"today_current,current":case"7_days_past,past":case"10_days_past,past":case"14_days_past,past":case"30_days_past,past":case"year_past,past":return me(t,{days:0}).getTime();case"7_days_future,future":return me(t,{days:7}).getTime();case"10_days_future,future":return me(t,{days:10}).getTime();case"14_days_future,future":return me(t,{days:14}).getTime();case"30_days_future,future":return me(t,{days:30}).getTime();case"yesterday,past":return me(t,{days:-1}).getTime();case"year_future,future,calendar":return me(new Date(t.getFullYear()+1,0,0),{years:1}).getTime();case"year_past,past,calendar":return me(new Date(t.getFullYear(),0,0),{years:0}).getTime();case"week_current,current":return(i=new Date,a=(i=new Date(i)).getDay(),o=i.getDate()-a+6+(0==a?6:1),new Date(i.setDate(o))).getTime();case"month_current,current":return new Date(t.getFullYear(),t.getMonth()+1,0).getTime();case"quarter_current,current":return new Date(n,3*(r+1),0).getTime();case"year_current,current":return me(new Date(t.getFullYear()+1,0,0),{years:0}).getTime();case"week_next,future":return function(e){var t=(e=new Date(e)).getDay(),r=e.getDate()-t+13+(0==t?-6:1);return new Date(e.setDate(r))}(new Date).getTime();case"month_next,future":return new Date(t.getFullYear(),t.getMonth()+2,0).getTime();case"quarter_next,future":return new Date(n,3*(r+1)+3,0).getTime();case"year_next,future":return me(t,{years:1}).getTime();case"week_past,past":return function(e){var t=(e=new Date(e)).getDay(),r=e.getDate()-t-1+(0==t?-6:1);return new Date(e.setDate(r))}(new Date).getTime();case"month_past,past":return new Date(t.getFullYear(),t.getMonth(),0,0).getTime();case"quarter_past,past":return new Date(n,3*(r+1)-3,0).getTime();default:return t.getTime()}var i,a,o}function be(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function ve(e,t){var r;return t&&!0===t.clone&&be(e)?Se((r=e,Array.isArray(r)?[]:{}),e,t):e}function we(e,t,r){var n=e.slice();return t.forEach((function(t,i){void 0===n[i]?n[i]=ve(t,r):be(t)?n[i]=Se(e[i],t,r):-1===e.indexOf(t)&&n.push(ve(t,r))})),n}function Se(e,t,r){e=void 0!==e?e:{},t=void 0!==t?t:{};var n=Array.isArray(t),i=(r||{arrayMerge:we}).arrayMerge||we;return n?Array.isArray(e)?i(e,t,r):ve(t,r):function(e,t,r){var n={};return be(e)&&Object.keys(e).forEach((function(t){n[t]=ve(e[t],r)})),Object.keys(t).forEach((function(i){be(t[i])&&e[i]?n[i]=Se(e[i],t[i],r):n[i]=ve(t[i],r)})),n}(e,t,r)}Se.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,r){return Se(e,r,t)}))};class Ee{constructor(e){this.gudhub=e}mergeFieldLists(e,t){let r=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(t)),i=n.map((e=>e.field_id));return n.length?n.reduce(((e,t)=>{let r=null;if(e.find(((e,n)=>t.field_id==e.field_id&&(r=n,!0))))e[r]=this.gudhub.util.mergeObjects(e[r],t);else{let r=t.data_model&&t.data_model.interpretation&&t.data_model.interpretation.find((e=>"table"==e.src))||{settings:{show_field:1}};if(r.settings.show_field){let n=this.gudhub.util.mergeObjects({show:1},r),i=this.gudhub.util.mergeObjects(n,t);e.push(i)}}return e}),r).filter((function(e){return e.show&&-1!=i.indexOf(e.field_id)})):[]}createFieldsListToView(e,t){const r=this;return new Promise((async n=>{let i=await this.gudhub.getFieldModels(e);if(0!==t.length){let e=[];t.forEach(((r,n)=>{let o=i.find((e=>r.field_id==e.field_id));if(o){let t=o.data_model.interpretation.find((e=>"table"==e.src));t||(t={settings:{show_field:1}}),e.push({field_id:o.field_id,show:r.show,width:r.width?r.width:"150px"})}n+1==t.length&&a(e)}))}else a(t);function a(e){let t=0;i.forEach(((a,o)=>{e.find((e=>a.field_id==e.field_id))?(t==i.length-1&&n(e),t++):r.gudhub.ghconstructor.getInstance(a.data_type).then((r=>{if(r){let o=r.getTemplate().model.data_model.interpretation.find((e=>"table"==e.src));o||(o={settings:{show_field:1}}),e.push({field_id:a.field_id,show:o.settings.show_field}),t==i.length-1&&n(e)}t++}),(function(e){t++}))}))}}))}createFieldsListToViewWithDataType(e,t){return new Promise((async r=>{let n=[],i=await this.gudhub.getFieldModels(e),a=i.map((e=>+e.field_id));const o=[];n=i.reduce(((e,t)=>(e.find(((e,r)=>t.field_id==e.field_id))||(e.push({field_id:t.field_id,data_type:t.data_type}),o.push(new Promise((async r=>{const n=(await this.gudhub.ghconstructor.getInstance(t.data_type)).getTemplate().model.data_model.interpretation.find((e=>"table"==e.src))||{settings:{show_field:1}};e.find((e=>e.field_id==t.field_id)).show=n.settings.show_field,r(!0)})))),e)),t),Promise.all(o).then((()=>{n=n.filter((e=>-1!=a.indexOf(e.field_id))),r(n)}))}))}}class xe{constructor(e){this.gudhub=e,this.selectedItems={}}async selectItems(e,t){if(!this.selectedItems.hasOwnProperty(e)){this.selectedItems[e]={items:[],app:[]};let t=await this.gudhub.getApp(e);this.selectedItems[e].app=t}let r=this.selectedItems[e],n=r.items.map((e=>e.item_id));t.forEach((e=>{-1!=n.indexOf(e.item_id)?r.items.splice(n.indexOf(e.item_id),1):r.items[r.items.length]=e}))}getSelectedItems(e){return this.selectedItems[e]?this.selectedItems[e]:{items:[],app:[]}}clearSelectedItems(e){this.selectedItems[e]&&(this.selectedItems[e].items=[])}isItemSelected(e,t){let r=this.getSelectedItems(e);return null!==r&&(r=r.items.map((e=>e.item_id)),-1!=r.indexOf(t))}}class ke{constructor(e){this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}createAppsFromTemplate(e,t,r,n){const i=this;return new Promise((a=>{const o=100/(6*e.apps.length);let s=0;i.createApps(e,(e=>{s+=1,r&&r.call(this,{percent:s*o,status:e})}),n).then((e=>{i.createItems(e,t,(e=>{"string"==typeof e?(s+=1,r&&r.call(this,{percent:s*o,status:e})):"object"==typeof e&&(r&&r.call(this,{status:"Done",apps:e}),a())}),n)}))}))}createItems(e,t,r,n){return new Promise((async i=>{const a=t||1e5,o=this;let s=[],l=[];const{accesstoken:c}=await o.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});e.forEach((e=>{l.push(new Promise((async t=>{let i;i=n?await o.gudhub.req.axiosRequest({url:`https://gudhub.com/GudHub_Test/api/app/get?token=${c}&app_id=${o._searchOldAppId(e.app_id,o.appsConnectingMap.apps)}`,method:"GET"}):await o.gudhub.getApp(o._searchOldAppId(e.app_id,o.appsConnectingMap.apps)),r&&r.call(this,`GET APP: ${i.app_name} (Items steps)`);let l=JSON.parse(JSON.stringify(i)),u=l.items_list.map((e=>({index_number:e.index_number,item_id:0,fields:[]}))).filter(((e,t)=>t<=a));o.gudhub.addNewItems(e.app_id,u).then((n=>{r&&r.call(this,`ADD NEW ITEMS: ${i.app_name} (Items steps)`),e.items_list=n,o._updateMap(e.items_list,l.items_list),o._addFieldValue(l.items_list,e.items_list,o.appsConnectingMap),s.push(e),t()}))})))})),Promise.all(l).then((()=>{s.forEach((e=>{e.items_list.forEach((e=>{e.fields.forEach((e=>{o.appsConnectingMap.fields.forEach((t=>{e.field_id===t.old_field_id&&(e.field_id=t.new_field_id,e.element_id=t.new_field_id)}))}))}))})),o.deleteField(s),o.replaceValue(s,o.appsConnectingMap).then((()=>{const e=[];s.forEach((t=>{e.push(new Promise((e=>{let n=t.items_list.map((e=>(e.fields.forEach((e=>{delete e.data_id})),e)));o.gudhub.updateItems(t.app_id,n).then((()=>{r&&r.call(this,`REPLACE VALUE: ${t.app_name} (Items steps)`),e()}))})))})),Promise.all(e).then((()=>{r.call(this,s),i()}))}))}))}))}deleteField(e){e.forEach((e=>{e.items_list.forEach((t=>{t.fields=t.fields.filter((t=>e.field_list.findIndex((e=>e.field_id==t.field_id))>-1))}))}))}replaceValue(e,t){return new Promise((async r=>{const n=[],i=this;e.forEach((e=>{e.field_list.forEach((r=>{"item_ref"===r.data_type&&i._replaceValueItemRef(e,r,t),n.push(new Promise((t=>{i.gudhub.ghconstructor.getInstance(r.data_type).then((n=>void 0===n?(console.log("ERROR WHILE GETTING INSTANCE OF ",r.data_type),void t({type:r.data_type})):"file"==n.getTemplate().constructor?i.gudhub.util.fileInstallerHelper(e.app_id,e.items_list,r.field_id).then((e=>{t(e)})):void("document"==n.getTemplate().constructor?i.documentInstallerHelper(e.app_id,e.items_list,r.field_id).then((e=>{t(n)})):t(n))))})))}))})),n.length>0?Promise.all(n).then((e=>{r(e)})):r(result)}))}documentInstallerHelper(e,t,r){const n=this;return new Promise((async i=>{for(const i of t){const t=i.item_id,a=i.fields.find((e=>e.element_id===r));if(a&&a.field_value&&a.field_value.length>0){const i=await n.gudhub.getDocument({_id:a.field_value});if(i&&i.data){const o=await n.gudhub.createDocument({app_id:e,item_id:t,element_id:r,data:i.data});a.field_value=o._id}}}i()}))}_replaceValueItemRef(e,t,r){e.items_list.forEach((e=>{e.fields.forEach((e=>{if(e.field_id===t.field_id&&e.field_value){let t=e.field_value.split(",");t.forEach(((e,n)=>{let i=e.split(".");r.apps.forEach((e=>{i[0]==e.old_app_id&&(i[0]=e.new_app_id)})),r.items.forEach((e=>{i[1]==e.old_item_id&&(i[1]=e.new_item_id)})),t[n]=i.join(".")})),e.field_value=t.join(",")}}))}))}_addFieldValue(e,t,r){t.forEach((t=>{r.items.forEach((r=>{t.item_id===r.new_item_id&&e.forEach((e=>{r.old_item_id===e.item_id&&(t.fields=e.fields)}))}))}))}_updateMap(e,t){t.forEach((t=>{e.forEach((e=>{t.index_number===e.index_number&&this.appsConnectingMap.items.push({old_item_id:t.item_id,new_item_id:e.item_id})}))}))}_searchOldAppId(e,t){let r=0;return t.forEach((t=>{t.new_app_id===e&&(r=t.old_app_id)})),r}createApps(e,t,r){const n=this;let i={step_size:100/(3*e.apps.length),apps:[]};return new Promise((async a=>{let o={},s=[],l=[];const{accesstoken:c}=await n.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});for(const u of e.apps){let p;p=r?await n.gudhub.req.axiosRequest({url:`https://gudhub.com/GudHub_Test/api/app/get?token=${c}&app_id=${u}`,method:"GET"}):await n.gudhub.getApp(u),t&&t.call(this,`GET APP: ${p.app_name} (App steps)`);let d=JSON.parse(JSON.stringify(p));o[d.app_id]=d,i.apps.push(d.icon);let h=n.prepareAppTemplate(d);h.app_name=h.app_name+" New",h.privacy=1,e.data_to_change&&(e.data_to_change.name&&(h.app_name=e.data_to_change.name),e.data_to_change.icon&&(h.icon=e.data_to_change.icon)),n.resetViewsIds(h),n.gudhub.createNewApp(h).then((r=>{t&&t.call(this,`CREATE NEW APP: ${p.app_name} (App steps)`),s.push(r),n.mapApp(d,r,n.appsConnectingMap),e.apps.length==s.length&&(n.connectApps(s,n.appsConnectingMap,o),s.forEach((r=>{n.gudhub.updateApp(r).then((r=>{t&&t.call(this,`UPDATE APP: ${p.app_name} (App steps)`),l.push(r),e.apps.length==l.length&&a(l)}))})))}))}}))}mapApp(e,t,r){r.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((e=>{t.field_list.forEach((t=>{e.name_space==t.name_space&&r.fields.push({name_space:e.name_space,old_field_id:e.field_id,new_field_id:t.field_id})}))})),e.views_list.forEach((e=>{t.views_list.forEach((t=>{e.name==t.name&&r.views.push({name:e.name,old_view_id:e.view_id,new_view_id:t.view_id})}))}))}crawling(e,t){let r=null===e?[]:Object.keys(e);const n=this;r.length>0&&r.forEach((r=>{let i=e[r];void 0!==i&&"string"!=typeof e&&(t(r,i,e),n.crawling(i,t))}))}resetViewsIds(e){e.view_init=0,this.crawling(e.views_list,(function(e,t,r){"view_id"!=e&&"container_id"!=e||(r[e]=0)}))}connectApps(e,t,r){const n=this;return e.forEach((e=>{t.apps.forEach((r=>{e.view_init===r.new_view_init&&t.views.forEach((t=>{r.old_view_init===t.old_view_id&&(e.view_init=t.new_view_id)}))})),n.crawling(e.field_list,(function(i,a,o){if(-1!==i.indexOf("field_id")||-1!==i.indexOf("FieldId")||-1!==i.indexOf("destination_field")){let e=String(a).split(","),r=[];t.fields.forEach((t=>{e.forEach((e=>{e==t.old_field_id&&r.push(t.new_field_id)}))})),r.length&&(o[i]=r.join(","))}if(-1==i.indexOf("app_id")&&-1==i.indexOf("AppId")&&-1==i.indexOf("destination_app")||t.apps.forEach((e=>{a==e.old_app_id&&(o[i]=e.new_app_id)})),-1!==i.indexOf("view_id")&&t.views.forEach((e=>{a==e.old_view_id&&(o[i]=e.new_view_id)})),-1!==i.indexOf("src")&&isFinite(a)){const s="container_id",l=t.apps.find((t=>t.new_app_id===e.app_id)).old_app_id,c=n.findPath(r[l].views_list,s,a);o[i]=`${n.getValueByPath(e.views_list,c,s)}`}}))})),e}getValueByPath(e,t,r){let n=e;return t.split(".").forEach((e=>{n=n[e]})),n[r]}findPath(e,t,r){let n=!1,i=!1,a=[];return this.crawling(e,(function(e,o,s){i&&a.reverse().forEach((e=>{i&&(e.delete=!0,e.parent===s&&(i=!1,a=a.filter((e=>!e.delete)),a.reverse()))})),n||("object"==typeof s[e]&&a.push({prop:e,parent:s}),o==r&&t===e?n=!0:Object.keys(s).pop()===e&&"object"!=typeof s[e]&&(i=!0))})),a.map((e=>e.prop)).join(".")}prepareAppTemplate(e){let t=JSON.parse(JSON.stringify(e));return this.crawling(t.views_list,(function(e,t,r){"element_id"==e&&(r.element_id=-Number(t),r.create_element=-Number(t))})),t.field_list.forEach((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}}class Ae{constructor(e){this.gudhub=e}fileInstallerHelper(e,t,r){const n=this;return new Promise((i=>{const a=[[]];let o=Promise.resolve(),s=[];t.forEach((t=>{const n=t.item_id,i=t.fields.find((e=>e.element_id===r));i&&i.field_value&&i.field_value.split(".").forEach((t=>{const i={source:t,destination:{app_id:e,item_id:n,element_id:r}};10!==a[a.length-1].length?a[a.length-1].push(i):a.push([i])}))})),a.forEach((e=>{o=o.then((()=>n.gudhub.duplicateFile(e))).then((e=>{s=[...s,...e]}))})),o.then((()=>{t.forEach((e=>{const t=e.item_id,n=e.fields.find((e=>e.element_id===r));n&&n.field_value&&(n.field_value="",s.forEach((e=>{e.item_id===t&&(n.field_value=n.field_value.split(",").filter((e=>e)).concat(e.file_id).join(","))})))})),i()}))}))}}async function Ie(e){await Promise.all(e);let t=!0;for(const r of e){const e=await je(r);if("pending"===e.state){t=!1;break}if("rejected"===e.state)throw e.reason}return!!t||Ie(e)}function je(e){const t={state:"pending"};return Promise.race([e,t]).then((e=>e===t?e:{state:"resolved",value:e}),(e=>({state:"rejected",reason:e})))}class Oe{constructor(e){this.gudhub=e,this.MergeFields=new Ee(e),this.ItemsSelection=new xe(e),this.AppsTemplateService=new ke(e),this.FileHelper=new Ae(e)}prefilter(e,t={}){return async function(e,t,r,n={}){const i=[],a={variableMethodcurrent_app:()=>[n.current_app_id||n.app_id],variableMethodelement_app:()=>[n.element_app_id],variableMethodcurrent_item:()=>[`${n.current_app_id||n.app_id}.${n.item_id}`],variableMethoduser_id:()=>[t.getUser().user_id],variableMethoduser_email:e=>[t.getUser().username],variableMethodtoday(e){const t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1);return[r.valueOf().toString()+":"+n.valueOf().toString()]},variableMethodvariable:e=>[n[e]]};if(e)for(const t of e)if(t)switch(t.input_type){case"variable":t.valuesArray=[];for(const e of t?.input_value.split(",")){const r=a[t.input_type+"Method"+e];"function"==typeof r?t.valuesArray?t.valuesArray.push(...r()):t.valuesArray=r():t.valuesArray?t.valuesArray.push(...a.variableMethodvariable(e)):t.valuesArray=a.variableMethodvariable(e)}i.push(t);break;case"field":const e=await o({app_id:n.current_app_id||n.app_id,item_id:n.item_id,field_id:t.input_value});null!=e&&t.valuesArray.push(e),i.push(t);break;default:i.push(t)}else i.push(t);function o(e){return new Promise((t=>{r.on("gh_value_get",e,(function n(i,a){r.destroy("gh_value_get",e,n),t(a)})).emit("gh_value_get",{},e)}))}return i}(e,this.gudhub.storage,this.gudhub.pipeService,t)}filter(e,t){return function(e,t){const r=new se;return e&&e.length?r.filter(t,e):[]}(e,t)}mergeFilters(e,t){return function(e,t){const r=[];let n=[];if(e.length>0?e.forEach((e=>{n.push(e)})):n=t,n.length>0){n.forEach(((e,i)=>{for(let a=0;a<t.length;a++)e.field_id==t[a].field_id&&(r.push(e.field_id),n[i]=gudhub.mergeObjects(t[a],e))}));for(let e=0;e<t.length;e++)r.includes(t[e].field_id)||n.push(t[e])}return n}(e,t)}group(e,t){return function(e,t){let r,n=[];e?r=e.split(","):n=t;let i=new Set;return e&&t.forEach((e=>{let t="";r.forEach(((a,o)=>{const s=e.fields.find((e=>e.field_id==a));s&&(t+=s.field_value),r.length-1==o&&function(e){const t=!i.has(e);return t&&i.add(e),t}(t)&&n.push(e)}))})),n}(e,t)}async getFilteredItems(e=[],t=[],r,n,i,a="",o,s){const l=await this.prefilter(t,{element_app_id:r,app_id:n,item_id:i}),c=this.filter(e,l);return this.group(a,c).filter((e=>!o||1===Y([e],o).length)).filter((e=>!s||1===Y([e],s).length))}jsonToItems(e,t){return function(e,t){let r=[];t.forEach((t=>{let n=[];try{n=le.paths(e,t.json_path),r.push({field_id:t.field_id,json_paths:n,json_paths_length:n.length})}catch(e){console.log(e)}})),r.sort(((e,t)=>t.json_paths_length-e.json_paths_length));let n=function(e){let t=[];return e.length&&e[0].json_paths.forEach((r=>{let n={fields:[]};e.forEach((e=>{n.fields.push({field_id:e.field_id,json_path:ce(r,e.json_paths)})})),t.push(n)})),t}(r).map((t=>({fields:t.fields.map((t=>({field_id:t.field_id,field_value:le.value(e,t.json_path)})))})));return n}(e,t)}getDate(e){return _e(e)}checkRecurringDate(e,t){return function(e,t){e=new Date(e);let r=new Date;switch(t){case"day":return e.getDate()+"."+e.getMonth()==r.getDate()+"."+r.getMonth();case"week":let t=(new Date).getFullYear(),n=new Date(t,e.getMonth(),e.getDate());return ye(n,r);case"month":return e.getMonth()===r.getMonth();default:return!0}}(e,t)}populateItems(e,t,r){return function(e,t,r){var n=JSON.parse(JSON.stringify(e));return r?function(e,t){return e.forEach((e=>{t.forEach((t=>{let r=e.fields.find((e=>e.element_id==t.element_id));r?r.field_value=t.field_value:(t.field_id=t.element_id,e.fields.push(t))}))})),e}(n,t):function(e,t){return e.forEach((e=>{e.fields=[].concat(t)})),e}(n,t)}(e,t,r)}populateWithDate(e,t){return function(e,t){return e.forEach((e=>{t.forEach((t=>{let r=e.fields.find((e=>e.element_id==t.element_id));r?t.data_range?(t.date_type.includes("calendar"),r.field_value=`${function(e){let t=new Date;switch(e){case"week_current,current":case"week_next,future":case"week_past,past":return function(t){var r=t.getDay();let n;e.includes("week_current,current")&&(n=0),e.includes("week_next,future")&&(n=7),e.includes("week_past,past")&&(n=-7);let i=t.getDate()-r+n+(0==r?-6:1);return new Date(t.setDate(i))}(new Date).getTime();case"month_current,current":return new Date(t.getFullYear(),t.getMonth(),1).getTime();case"quarter_current,current":case"quarter_next,future":case"quarter_past,past":return function(t){let r,n,i=Math.floor(t.getMonth()/3),a=t.getFullYear();return e.includes("quarter_current,current")&&(r=0,n=0),e.includes("quarter_next,future")&&(r=3,n=0),e.includes("quarter_past,past")&&(r=-3,n=0),new Date(a,3*i+r,1+n)}(new Date).getTime();case"year_current,current":return me(new Date(t.getFullYear(),0,1),{years:0}).getTime();case"month_next,future":return new Date(t.getFullYear(),t.getMonth()+1,1).getTime();case"year_next,future":case"today_current,current":case"7_days_future,future":case"10_days_future,future":case"14_days_future,future":case"30_days_future,future":return me(t,{days:0}).getTime();case"month_past,past":return new Date(t.getFullYear(),t.getMonth()-1,1).getTime();case"year_past,past":return me(t,{years:-1}).getTime();case"year_past,past,calendar":return me(new Date(t.getFullYear(),0,1),{years:-1}).getTime();case"year_future,future,calendar":return me(new Date(t.getFullYear()+1,0,1),{years:0}).getTime();case"tomorrow,future":return me(t,{days:1}).getTime();case"yesterday,past":return me(t,{days:-1}).getTime();case"7_days_past,past":return me(t,{days:-7}).getTime();case"10_days_past,past":return me(t,{days:-10}).getTime();case"14_days_past,past":return me(t,{days:-14}).getTime();case"30_days_past,past":return me(t,{days:-30}).getTime()}}(t.date_type)}:${_e(t.date_type)}`):r.field_value=_e(t.date_type):e.fields.push({field_id:t.element_id,element_id:t.element_id,field_value:_e(t.date_type)})}))})),e}(e,t)}populateWithItemRef(e,t,r,n,i,a){return function(e,t,r,n,i,a){let o=[];const s=function(e,t){let r=he(t,i);r&&(r.field_value=a+"."+e.item_id,o.push(t))};return r.forEach((r=>{e.forEach((e=>{!function(e,t,r,n,i){he(e,r).field_value==he(t,n).field_value&&i(e,t)}(e,r,t,n,s)}))})),o}(e,t,r,n,i,a)}compareItems(e,t,r){return function(e,t,r){const n=JSON.parse(JSON.stringify(e)),i=JSON.parse(JSON.stringify(t));let a={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[]};const o=function(e){a.diff_src_items.push(e)},s=function(e){a.same_items.push(e)},l=function(e){a.new_src_items.push(e)};return r?ue(n,i,r,o,s,l):pe(n,i,o,s,l),a.is_items_diff=a.new_src_items.length>0||a.diff_src_items.length>0,a}(e,t,r)}mergeItems(e,t,r){return function(e,t,r){let n=JSON.parse(JSON.stringify(e)),i=JSON.parse(JSON.stringify(t)),a=[];const o=function(e,t){a.push(function(e,t){return e.fields.forEach((e=>{let r=he(t,e.field_id);r?(r.field_value=e.field_value,e.history&&r.history&&(r.history=e.history.concat(r.history))):t.fields.push(e)})),t}(e,t))},s=function(e){a.push(e)},l=function(e){a.push(e)};return r?ue(n,i,r,o,s,l):pe(n,i,o,s,l,(function(e){a.push(e)})),a}(e,t,r)}mergeObjects(e,t,r){return function(e,t,r){return Se(e,t,r)}(e,t,r)}makeNestedList(e,t,r,n,i){return function(e,t,r,n,i){let a,o=JSON.parse(JSON.stringify(e)),s=Boolean(n)?n:"children",l=!!Boolean(i)&&i;for(a=0;a<o.length;a++)o[a][r]&&0!==o[a][r]&&o.forEach((e=>{o[a][r]==e[t]?(e[s]||(e[s]=[]),e[s].push(o[a]),o.splice(a,1),0==a?a=0:a--):e[s]&&c(e)}));function c(e){e[s].forEach((e=>{e[t]==o[a][r]?(e[s]||(e[s]=[]),e[s].push(o[a]),o.splice(a,1),0==a?a=0:a--):e[s]&&c(e)}))}return l&&function e(t){t.sort(((e,t)=>e[l]-t[l])),t.forEach((t=>{t[s]&&e(t[s])}))}(o),o}(e,t,r,n,i)}mergeChunks(e){return function(e){const t={};return e.forEach((e=>{e.items_list.forEach((e=>{const r=t[e.item_id];return r?(r.trash=e.trash,e.fields.forEach((e=>{let t=!0;r.fields=r.fields.map((r=>Number(r.field_id)===Number(e.field_id)?(t=!1,r.field_value!=e.field_value?{...e,history:e.history.concat(r.history)}:r):r)),t&&r.fields.push(e)}))):t[e.item_id]=e}))})),Object.values(t)}(e)}mergeFieldLists(e,t){return this.MergeFields.mergeFieldLists(e,t)}createFieldsListToView(e,t){return this.MergeFields.createFieldsListToView(e,t)}createFieldsListToViewWithDataType(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}selectItems(e,t){return this.ItemsSelection.selectItems(e,t)}getSelectedItems(e){return this.ItemsSelection.getSelectedItems(e)}clearSelectedItems(e){return this.ItemsSelection.clearSelectedItems(e)}isItemSelected(e,t){return this.ItemsSelection.isItemSelected(e,t)}jsonConstructor(e,t,r,n){return function(e,t,r,n,i){async function a(e,t,i){let s=null;if("array"===e.type&&(s=Number(e.is_static)?new Array(await o(e.childs,t,i)):await async function(e,t,i){const a=await r.gudhub.getApp(Number(e.app_id));let s=await async function(e=[],t=[],i="",a={}){return e.length?async function(e,t,i,a,o){const s=await r.gudhub.prefilter(JSON.parse(JSON.stringify(e)),{element_app_id:t,app_id:i,item_id:a,...n});return r.gudhub.filter(o,[...s,...e])}(e,i,i,a.item_id,t):[...t]}(e.filter,a.items_list,i,t);if(e.isSortable&&e.field_id_to_sort&&""!==e.field_id_to_sort){let t=s.flatMap((t=>{let r=t.fields.find((t=>t.field_id==e.field_id_to_sort));return r&&""!=r.field_value?t:[]})),r=s.filter((e=>{if(!t.includes(e))return e}));t=t.sort(((t,r)=>"desc"==e.sortType?r.fields.find((t=>t.field_id==e.field_id_to_sort)).field_value-t.fields.find((t=>t.field_id==e.field_id_to_sort)).field_value:t.fields.find((t=>t.field_id==e.field_id_to_sort)).field_value-r.fields.find((t=>t.field_id==e.field_id_to_sort)).field_value)),s=[...t,...r]}if(e.offset){let t;t=e.use_variables_for_limit_and_offset&&n?n[e.offset]:/^[0-9]+$/.test(e.offset)?e.offset:0,s=s.slice(t)}if(e.limit){let t;t=e.use_variables_for_limit_and_offset&&n?n[e.limit]:/^[0-9]+$/.test(e.limit)||0,0!==t&&(s=s.slice(0,t))}const l=s.map((async t=>o(e.childs,t,a.app_id)));return Promise.all(l)}(e,t,i)),"object"===e.type&&(s=Number(e.current_item)?await async function(e,t){const n=await r.gudhub.getApp(e.app_id),i=n.items_list||[];return o(e.childs,t||i[0],n.app_id)}(e,t):await o(e.childs,t,i)),"property"===e.type&&(s=await async function(e,t,n){switch(e.property_type){case"static":return e.static_field_value;case"variable":return"app_id"===e.variable_type?n:`${n}.${t.item_id}`;case"field_id":return e.field_id;case"function":if("function"==typeof e.function)return e.function(t,n,r.gudhub,...e.args);{const i=new Function("item, appId, gudhub","return (async "+e.function+")(item, appId, gudhub)");return await i(t,n,r.gudhub)}default:return!e.field_id&&e.name_space&&(e.field_id=await r.gudhub.getFieldIdByNameSpace(n,e.name_space)),Boolean(Number(e.interpretation))?await r.gudhub.getInterpretationById(Number(n),Number(t.item_id),Number(e.field_id),"value"):await r.gudhub.getFieldValue(Number(n),Number(t.item_id),Number(e.field_id))}}(e,t,i)),"object"==typeof e&&void 0===e.type){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=await a(o,t,i);r[n]=s[o.property_name]}return r}return{[e.property_name]:s}}async function o(e,t,r){const n=await e.map((async e=>a(e,t,r)));return(await Promise.all(n)).reduce(((e,t)=>({...e,...t})),{})}return a(e,t,i)}(e,t,this,r,n)}fileInstallerHelper(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}createAppsFromTemplate(e,t,r,n){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,n)}createApps(e){return this.AppsTemplateService.createApps(e)}createItems(e,t){return this.AppsTemplateService.createItems(e,t)}compareObjects(e,t){return r=e,n=t,JSON.stringify(r)===JSON.stringify(n);var r,n}compareAppsItemsLists(e,t,r){const n=new Blob(['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 });'],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",(e=>{const{diff:t}=e.data;r(t)}))}dynamicPromiseAll(e){return Ie(e)}sortItems(e,t){return function(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 n(e){for(var t=null,n=0;n<e.fields.length;n++)if(e.fields[n].field_id==r){t=e.fields[n].field_value;break}return t}return e.sort((function(e,t){var r=n(e),i=n(t);return null===r?-1:null===i?1:/^\d+$/.test(r)&&/^\d+$/.test(i)?Number(r)<Number(i)?-1:1:/^\d+$/.test(r)||/^\d+$/.test(i)?/^\d+$/.test(r)?-1:1:r.toLowerCase()>i.toLowerCase()?1:-1})),t&&t.descending?e.reverse():e}(e,t)}debounce(e,t){let r;return function(...n){clearTimeout(r),r=setTimeout((()=>{e.apply(this,n)}),t)}}}class Pe{constructor(e,t){this.req=e,this.storage=t}async login({username:e,password:t}={}){const r=await this.loginApi(e,t);return this.storage.updateUser(r),r}async loginWithToken(e){const t=await this.loginWithTokenApi(e);return this.storage.updateUser(t),t}async logout(e){return await this.logoutApi(e)}async signup(e){return await this.signupApi(e)}async updateToken(e){return await this.updateTokenApi(e)}async updateUser(e){const t=await this.updateUserApi(e);return this.storage.updateUser(t),t}async updateAvatar(e){const t=await this.avatarUploadApi(e);return this.storage.updateUser(t),t}async getUsersList(e){return await this.getUsersListApi(e)}async loginApi(e,t){try{return await this.req.axiosRequest({method:"POST",url:`${this.req.root}/auth/login`,form:{username:e,password:t}})}catch(e){console.log(e)}}async loginWithTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:`${this.req.root}/auth/login?accesstoken=${e}`})}catch(e){console.log(e)}}async updateTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:`${this.req.root}/auth/login`,form:{auth_key:e}})}catch(e){console.log(e)}}logoutApi(e){return this.req.post({url:"/auth/logout",form:{token:e}})}signupApi(e){return this.req.axiosRequest({method:"POST",url:`${this.req.root}/auth/singup`,form:{user:JSON.stringify(e)}})}getUsersListApi(e){return this.req.get({url:"/auth/userlist",params:{keyword:e}})}updateUserApi(e){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(e)}})}avatarUploadApi(e){return this.req.post({url:"/auth/avatar-upload",form:{image:e}})}getUserByIdApi(e){return this.req.get({url:"/auth/getuserbyid",params:{id:e}})}getVersion(){return this.req.get({url:"/version"})}getUserFromStorage(e){return this.storage.getUsersList().find((t=>t.user_id==e))}saveUserToStorage(e){const t=this.storage.getUsersList();return t.find((t=>t.user_id==e.user_id))||(t.push(e),e)}async getUserById(e){let t=this.getUserFromStorage(e);if(!t){let r=await this.getUserByIdApi(e);if(!r)return null;t=this.getUserFromStorage(e),t||(this.saveUserToStorage(r),t=r)}return t}async getToken(){const e=new Date(this.storage.getUser().expirydate),t=new Date;let r=this.storage.getUser().accesstoken;if(e<t||!r){const e=await this.updateToken(this.storage.getUser().auth_key);this.storage.updateUser(e),r=e.accesstoken}return r}}var Te=__webpack_require__(960),Ce=__webpack_require__(738);class Ne{constructor(e){this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}async getInstance(e){return this.getCached(e)||(this.modulesQueue[e]||(this.modulesQueue[e]=this.createInstance(e)),await this.modulesQueue[e]),this.getCached(e)}pupToCache(e,t){this.cache[e]=t}getCached(e){return this.cache[e]}initAngularInjector(e){this.angularInjector=e}initJsdomWindow(e){this.nodeWindow=e}async createInstance(t){let r,n=this.gudhub.storage.getModuleUrl(t);if(n)return"gh_element"===n.type&&("angular"===n.technology?r=await(0,Te.Z)(this.gudhub,t,n.url,this.angularInjector,this.nodeWindow):"class"===n.technology&&(r=await async function(t,r,n,i,a){try{n||console.error(`JS link must be provided for this data type - ${r}`);let o,s=t=>(Ce.P||global.hasOwnProperty("window")||(global.window=proxy,global.document=a.document,global.Element=a.Element,global.CharacterData=a.CharacterData,global.this=proxy,global.self=proxy,global.Blob=a.Blob,global.Node=a.Node,global.navigator=a.navigator,global.HTMLElement=a.HTMLElement,global.XMLHttpRequest=a.XMLHttpRequest,global.WebSocket=a.WebSocket,global.crypto=a.crypto,global.DOMParser=a.DOMParser,global.Symbol=a.Symbol,global.document.queryCommandSupported=e=>(console.log("QUERY COMMAND SUPPORTED: ",e),!1),global.angular=angular),new Promise((async n=>{let i=await e.get(t).catch((e=>{console.log(`Failed to fetch: ${t} in ghconstructor. Module id: ${r}`)}));n("data:text/javascript;charset=utf-8,"+encodeURIComponent(i.data))}))),l=await s(n);try{o=await import(l)}catch(e){console.log(`Error while importing module: ${r}`),console.log(e)}let c=new o.default(r);if(i&&Ce.P){const e=document.createElement("link");e.href=i,e.setAttribute("data-module",r),e.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(e)}return{type:r,getTemplate:function(e,t,r,n,i,a){let o="false"!==r;return c.getTemplate(e,t,o,n,i,a)},getDefaultValue:function(e,t,r,n){return new Promise((async i=>{let a=c.getDefaultValue;i(a?await a(e,t,r,n):null)}))},getSettings:function(e,t,r){return c.getSettings(e,t,r)},filter:{getSearchOptions:function(e){let t=c;return t.filter&&t.filter.getSearchOptions?c.filter.getSearchOptions(e):[]},getDropdownValues:function(){let e=c;return e.filter&&e.filter.getDropdownValues?e.filter.getDropdownValues():[]}},getInterpretation:function(e,n,i,a,o,s){return new Promise((async l=>{let u=c;try{let r=await u.getInterpretation(t,e,s,o,a,i),c=r.find((e=>e.id==n))||r.find((e=>"default"==e.id));l({html:await c.content()})}catch(e){console.log(`ERROR IN ${r}`,e),l({html:"<span>no interpretation</span>"})}}))},getInterpretationsList:function(e,t,r,n){return c.getInterpretation(e,t,r,n)},getInterpretatedValue:function(e,t,r,n){return new Promise((async i=>{let a=c.getInterpretatedValue;i(a?await a(e,t,r,n):e)}))},onMessage:function(e,t,r){return new Promise((async n=>{const i=c.onMessage;i&&n(await i(e,t,r)),n(null)}))},extendController:function(e){c.getActionScope(e)},runAction:function(e){try{c.runAction(e)}catch(e){}},getWindowScope:function(e){return c.getWindowScope(e)},getWindowHTML:function(e){return c.getWindowHTML(e)}}}catch(e){console.log(e),console.log(`Failed in createClassInstance (ghconstructor). Module id: ${r}. JS url: ${n}`)}}(this.gudhub,t,n.js,n.css,this.nodeWindow))),r&&this.pupToCache(t,r),r;console.log(`Cannot find module: ${t}`)}}class Le{constructor(e,t,r,n,i,a,o,s){this.storage=e,this.pipeService=t,this.req=r,this.ws=n,this.applistReceived=!1,this.activateSW=o,this.chunksManager=i,this.util=a,this.appListeners(),this.dataService=s}async createNewAppApi(e){try{const t=await this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(e){return console.log(e),null}}async updateAppApi(e){try{return await this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}})}catch(e){return console.log(e),null}}async deleteAppApi(e){try{return await this.req.post({url:"/api/app/delete",form:{app_id:e}})}catch(e){return console.log(e),null}}async getAppListApi(){try{return(await this.req.get({url:"/api/applist/get"})).apps_list.map((e=>(e.from_apps_list=!0,e)))}catch(e){return console.log(e),null}}getAppListFromStorage(){return this.storage.getAppsList()}getAppFromStorage(e){const t=this.storage.getApp(e);return t&&t.field_list.length?t:null}addNewAppToStorage(e){return this.storage.getAppsList().push(e)}saveAppInStorage(e){e.items_object={};for(let t=0;t<e.items_list.length;t++){e.items_object[e.items_list[t].item_id]={};for(let r=0;r<e.items_list[t].fields.length;r++)e.items_object[e.items_list[t].item_id][e.items_list[t].fields[r].field_id]=e.items_list[t].fields[r]}const t=this.storage.getApp(e.app_id);return t?(e.from_apps_list=t.from_apps_list,e.permission=t.permission,this.storage.updateApp(e)):(e.from_apps_list=!1,this.addNewAppToStorage(e)),this.getAppFromStorage(e.app_id)}updateAppFieldsAndViews(e){const t=this.getAppFromStorage(e.app_id);e.items_list=t.items_list,e.file_list=t.file_list,e.from_apps_list=t.from_apps_list,e.items_object=t.items_object,this.storage.updateApp(e),this.pipeService.emit("gh_app_views_update",{app_id:e.app_id},e.views_list),e.field_list.forEach((t=>{this.pipeService.emit("gh_model_update",{app_id:e.app_id,field_id:t.field_id},t)}))}updateAppInStorage(e){this.storage.getApp(e.app_id)?(this.storage.updateApp(e),this.pipeService.emit("gh_app_update",{app_id:e.app_id},e),this.pipeService.emit("gh_items_update",{app_id:e.app_id},e.items_list)):this.addNewAppToStorage(e)}deletingAppFromStorage(e){let t=this.storage.getAppsList();return t.forEach(((r,n)=>{r.app_id==e&&t.splice(n)})),t}updateAppsListInStorage(e=[]){for(const t of e){const e=this.storage.getApp(t.app_id);e?(e.from_apps_list=t.from_apps_list,e.permission=t.permission):this.addNewAppToStorage(t)}}async refreshApps(e=[]){for(const t of e)if(null!=t)try{const e=await this.dataService.getApp(t);if(e){e.items_object={};for(let t=0;t<e.items_list.length;t++){e.items_object[e.items_list[t].item_id]={};for(let r=0;r<e.items_list[t].fields.length;r++)e.items_object[e.items_list[t].item_id][e.items_list[t].fields[r].field_id]=e.items_list[t].fields[r]}this.updateAppInStorage(e),this.pipeService.emit("gh_app_views_update",{app_id:e.app_id},e.views_list)}}catch(e){console.log(e)}console.log("Apps refreshed: ",JSON.stringify(e))}async refreshAppsList(){let e=this.getAppListFromStorage(),t=(await this.getAppListApi()).map((t=>({...t,...e.find((e=>e.app_id===t.app_id))})));this.updateAppsListInStorage(t),this.pipeService.emit("gh_apps_list_refreshed",{})}async getAppsList(){let e=this.getAppListFromStorage();if(!this.applistReceived){let t=await this.getAppListApi();if(!t)return null;this.updateAppsListInStorage(t),this.applistReceived=!0,e=t,this.getApp(this.storage.getUser().app_init)}return e}async getAppInfo(e){const t=await this.getAppsList();return t?t.find((t=>t.app_id==e)):null}async deleteApp(e){return await this.deleteAppApi(e),this.deletingAppFromStorage(e)}async getApp(e,t=!1){if(!e)return null;let r=this.getAppFromStorage(e);if(r)return r;let n=await this.dataService.getApp(e);if(n){if(n.chunks&&n.chunks.length){let t=await this.chunksManager.getChunks(e,n.chunks);n.items_list=this.util.mergeChunks([...t,n])}return this.saveAppInStorage(n),this.ws.addSubscription(e),n}}async updateApp(e){if(!e.views_list||!e.views_list.length||!e.show){const t=await this.getApp(e.app_id);e.views_list&&e.views_list.length||(e.views_list=t.views_list),void 0===e.show&&(e.show=t.show)}const t=await this.updateAppApi(e);return this.updateAppFieldsAndViews(t),t}async updateAppInfo(e={}){return this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),this.updateApp(e)}async createNewApp(e){const t=await this.createNewAppApi(e);return t.items_object={},this.addNewAppToStorage(t),t}async getAppViews(e){if(e)return(await this.getApp(e)).views_list}clearAppProcessor(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}appListeners(){this.pipeService.onRoot("gh_app_get",{},(async(e,t)=>{if(t&&t.app_id){const e=await this.getApp(t.app_id);this.pipeService.emit("gh_app_get",t,e)}})),this.pipeService.onRoot("gh_apps_list_get",{},(async(e,t)=>{const r=await this.getAppsList();this.pipeService.emit("gh_apps_list_get",t,r)})),this.pipeService.onRoot("gh_delete_app",{},(async(e,t)=>{const r=await this.deleteApp(t.app_id);this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)})),this.pipeService.onRoot("gh_app_update",{},(async(e,t)=>{t.app.items_list=[],t.app.file_list=[];const r=await this.updateApp(t.app);this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list);const n=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},n),r.field_list.forEach((e=>{this.pipeService.emit("gh_model_update",{app_id:r.app_id,field_id:e.field_id},e)}))})),this.pipeService.onRoot("gh_app_view_get",{},(async(e,t)=>{if(t&&t.app_id){const e=await this.getApp(t.app_id);e.views_list.forEach(((r,n)=>{r.view_id==t.view_id&&this.pipeService.emit("gh_app_view_get",t,e.views_list[n])}))}})),this.pipeService.onRoot("gh_app_info_get",{},(async(e,t)=>{const r=await this.getAppInfo(t.app_id);r&&this.pipeService.emit("gh_app_info_get",t,r)})),this.pipeService.onRoot("gh_app_info_update",{},(async(e,t)=>{if(t&&t.app){const e=await this.updateAppInfo(t.app);this.pipeService.emit("gh_app_info_update",{app_id:t.app.app_id},e)}})),this.pipeService.onRoot("gh_app_create",{},(async(e,t)=>{await this.createNewApp(t.app);const r=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)})),Ce.P&&this.activateSW&&navigator.serviceWorker.addEventListener("message",(async e=>{if("refresh app"===e.data.type){const t=await this.getApp(e.data.payload.app_id);t&&this.util.compareAppsItemsLists(t.items_list,e.data.payload.items_list.filter((e=>!e.trash)),(({diff_fields_items:t,diff_fields_items_Ids:r,diff_items:n,newItems:i,deletedItems:a})=>{(n.length||i.length||a.length)&&(this.pipeService.emit("gh_items_update",{app_id:e.data.payload.app_id},e.data.payload.items_list.filter((e=>!e.trash))),n.forEach((t=>this.pipeService.emit("gh_item_update",{app_id:e.data.payload.app_id,item_id:t.item_id},t)))),r.forEach((r=>{const n=t[r];n&&n.forEach((t=>{this.pipeService.emit("gh_value_update",{app_id:e.data.payload.app_id,item_id:r,field_id:t.field_id},t.field_value)}))}))})),e.data.payload.items_list=this.util.mergeChunks([t,e.data.payload]),this.saveAppInStorage(e.data.payload)}}))}}class Me{constructor(e,t,r,n,i){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=n,this.util=i,this.itemListeners()}async addItemsApi(e,t){try{return await this.req.post({url:"/api/items/add",form:{items:JSON.stringify(t),app_id:e}})}catch(e){return console.log(e),null}}async updateItemsApi(e,t){try{return await this.req.post({url:"/api/items/update",form:{items:JSON.stringify(t),app_id:e}})}catch(e){return console.log(e),null}}deleteItemsApi(e){try{const t=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(e){return console.log(e),null}}async addItemsToStorage(e,t){const r=await this.appProcessor.getApp(e);return r&&(t.forEach((t=>{r.items_list.push(t),r.items_object[t.item_id]={};for(let e=0;e<t.fields.length;e++)r.items_object[t.item_id][t.fields[e].field_id]=t.fields[e];this.pipeService.emit("gh_item_update",{app_id:e},[t])})),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r)),r}async updateItemsInStorage(e,t){this.pipeService.emit("gh_items_update",{app_id:e},t);const r=await this.appProcessor.getApp(e);return r&&t&&t.forEach((t=>{const n={app_id:e};this.pipeService.emit("gh_item_update",n,[t]),n.item_id=t.item_id,this.pipeService.emit("gh_item_update",n,t);const i=r.items_list.find((e=>e.item_id==t.item_id));i&&t.fields.forEach((e=>{const t=i.fields.find((t=>t.field_id==e.field_id));n.field_id=e.field_id,t?t.field_value!=e.field_value&&(t.field_value=e.field_value,r.items_object[i.item_id][t.field_id]=t,this.pipeService.emit("gh_value_update",n,e.field_value)):(i.fields.push(e),r.items_object[i.item_id][e.field_id]=e,this.pipeService.emit("gh_value_update",n,e.field_value))}))})),t}async deleteItemsFromStorage(e,t=[]){const r=await this.appProcessor.getApp(e);r&&(r.items_list=r.items_list.filter((e=>!t.find((t=>e.item_id==t.item_id))||(delete r.items_object[e.item_id],!1))),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r))}async getItems(e,t=!1){const r=await this.appProcessor.getApp(e,t);return r?r.items_list:null}async addNewItems(e,r){const n=r.map((e=>({...e,fields:t(e.fields)}))),i=await this.addItemsApi(e,n);return await this.addItemsToStorage(e,i),this.pipeService.emit("gh_items_add",{app_id:e},i),i}async updateItems(e,r){const n=r.map((e=>({...e,fields:t(e.fields)}))),i=await this.updateItemsApi(e,n);return await this.updateItemsInStorage(e,i)}async deleteItems(e,t){return this.deleteItemsApi(t).then((async t=>await this.deleteItemsFromStorage(e,t)))}itemListeners(){this.pipeService.onRoot("gh_items_get",{},(async(e,t)=>{if(t&&t.app_id){const e=await this.getItems(t.app_id);e?this.pipeService.emit("gh_items_get",t,e):this.pipeService.emit("gh_items_get",t,[])}})),this.pipeService.onRoot("gh_items_add",{},(async(e,t)=>{if(t&&t.app_id&&t.items){const e=await this.addNewItems(t.app_id,t.items);e?this.pipeService.emit("gh_items_add",t,e):this.pipeService.emit("gh_items_add",t,[])}})),this.pipeService.onRoot("gh_items_update",{},(async(e,t)=>{if(t&&t.app_id&&t.items){const e=await this.updateItems(t.app_id,t.items);e?this.pipeService.emit("gh_items_update",t,e):this.pipeService.emit("gh_items_update",t,[])}})),this.pipeService.onRoot("gh_item_get",{},(async(e,t)=>{if(t&&t.app_id){const e=(await this.getItems(t.app_id)).find((e=>e.item_id==t.item_id));this.pipeService.emit("gh_item_get",t,e)}})),this.pipeService.onRoot("gh_filtered_items_get",{},(async(e,t)=>{if(t&&t.element_app_id){const e=await this.getItems(t.element_app_id),r=await this.util.getFilteredItems(e,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filtered_items_get",t,r)}})),this.pipeService.onRoot("gh_filter_items",{},(async(e,t)=>{if(t&&t.items){const e=await this.util.getFilteredItems(t.items,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filter_items",t,e)}}))}}class Fe{constructor(e,t,r,n,i){this.storage=e,this.req=t,this.appProcessor=r,this.itemProcessor=n,this.pipeService=i,this.fieldListeners()}deleteFieldApi(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}async updatedFieldApi(e,t={}){const r=await this.appProcessor.getApp(e),n={app_id:e,app_name:r.app_name,group_id:r.group_id,icon:r.icon,field_list:r.field_list.map((e=>e.field_id==t.field_id?{...e,...t}:e)),views_list:r.views_list};return this.appProcessor.updateApp(n)}setFieldValueApi(e,t,r,n){const i=[{item_id:t,fields:[{field_id:r,field_value:n}]}];return this.itemProcessor.updateItems(e,i)}deleteFieldInStorage(e,t){const r=this.storage.getApp(e);return r.field_list=r.field_list.filter((e=>e.file_id!=t)),r.items_list=r.items_list.map((e=>(e.fields=e.fields.filter((e=>e.field_id!=t)),e))),this.storage.updateApp(r),!0}updateFieldInStorage(e,t){const r=this.storage.getApp(e);return r.field_list=r.field_list.map((e=>e.field_id==t.field_id?{...e,...t}:e)),this.storage.updateApp(r),t}updateFieldValue(e,t,r,n){const i=this.storage.getApp(e);return i.items_list.forEach((e=>{e.item_id==t&&e.fields.forEach((t=>{t.field_id==r&&(t.field_value=n,i.items_object[e.item_id][t.field_id]=t)}))})),this.storage.updateApp(i),n}async getField(e,t){const r=await this.appProcessor.getApp(e);if(!r)return null;for(let e=0;e<r.field_list.length;e++)if(r.field_list[e].field_id==t)return r.field_list[e];return null}async getFieldIdByNameSpace(e,t){const r=await this.appProcessor.getApp(e);if(!r)return null;for(let e=0;e<r.field_list.length;e++)if(r.field_list[e].name_space==t)return r.field_list[e].field_id;return null}async getFieldModels(e){const t=await this.appProcessor.getApp(e);return t?t.field_list:null}async updateField(e,t){if(!e||!t)return;const r=await this.updatedFieldApi(e,t);return this.updateFieldInStorage(e,r)}async deleteField(e,t){return await this.deleteFieldApi(t),this.deleteFieldInStorage(e,t)}async getFieldValue(e,t,r){let n=null;const i=await this.appProcessor.getApp(e);try{n=i.items_object[t][r].field_value}catch(e){}return n}async setFieldValue(e,t,r,n){if(e&&t&&r)return await this.setFieldValueApi(e,t,r,n),this.updateFieldValue(e,t,r,n)}fieldListeners(){this.pipeService.onRoot("gh_value_get",{},(async(e,t)=>{if(t.app_id&&t.item_id&&t.field_id){let e=await this.getFieldValue(t.app_id,t.item_id,t.field_id);this.pipeService.emit("gh_value_get",t,e)}})),this.pipeService.onRoot("gh_value_set",{},(async(e,t)=>{t.item_id&&(this.setFieldValue(t.app_id,t.item_id,t.field_id,t.new_value),delete t.new_value)})),this.pipeService.onRoot("gh_model_get",{},(async(e,t)=>{try{let e=await this.getField(t.app_id,t.field_id);this.pipeService.emit("gh_model_get",t,e)}catch(e){console.log("Field model: ",e)}})),this.pipeService.onRoot("gh_model_update",{},(async(e,t)=>{let r=await this.updateField(t.app_id,t.field_model);this.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:t.field_id},r)})),this.pipeService.onRoot("gh_models_get",{},(async(e,t)=>{let r=await this.getFieldModels(t.app_id);this.pipeService.emit("gh_models_get",t,r)})),this.pipeService.onRoot("gh_model_delete",{},(async(e,t)=>{let r=await this.deleteField(t.app_id,t.field_id);this.pipeService.emit("gh_model_delete",t,r)}))}}class Re{constructor(e,t,r,n){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=n}async uploadFileApi(e,t,r){try{const n={"file-0":e,app_id:t,item_id:r};return await this.req.post({url:"/file/formupload",form:n})}catch(e){return console.log(e),null}}async uploadFileFromStringApi(e){try{return await this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}})}catch(e){return console.log(e),null}}async updateFileFromStringApi(e,t,r,n,i){try{const a={file_name:r,extension:n,file_id:t,format:i,source:e};return await this.req.post({url:"/file/update",form:{file:JSON.stringify(a)}})}catch(e){return console.log(e),null}}async duplicateFileApi(e){return this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}})}async downloadFileFromString(e,t){if(await this.isFileExists(e,t)){let r=await this.getFile(e,t);return{file:r,data:await this.req.get({url:r.url+"?timestamp="+r.last_update,externalResource:!0}),type:"file"}}return!1}async duplicateFile(e){let t=await this.duplicateFileApi(e);return t.forEach((e=>{this.addFileToStorage(e.app_id,e)})),t}async deleteFileApi(e){try{return await this.req.get({url:`/file/delete?file_id=${e}`})}catch(e){return console.log(e),null}}addFileToStorage(e,t){const r=this.storage.getApp(e);r&&(r.file_list.push(t),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:e,item_id:t.item_id,file_id:t.file_id},t))}addFilesToStorage(e,t){const r=this.storage.getApp(e);r&&(r.file_list.push(...t),this.storage.updateApp(r),t.forEach((t=>{this.pipeService.emit("gh_file_upload",{app_id:e,item_id:t.item_id,file_id:t.file_id},t)})))}deleteFileFromStorage(e,t){const r=this.storage.getApp(t);if(r){let t;r.file_list=r.file_list.filter((r=>r.file_id!=e||(t=r,!1))),this.storage.updateApp(r),this.pipeService.emit("gh_file_delete",{file_id:e},t)}}updateFileInStorage(e,t,r){const n=this.storage.getApp(t);n&&(n.file_list=n.file_list.map((t=>t.file_id==e?r:t)),this.storage.updateApp(n),this.pipeService.emit("gh_file_update",{file_id:e}))}async getFile(e,t){const r=await this.appProcessor.getApp(e);return new Promise(((e,n)=>{e(r.file_list.find((e=>e.file_id==t))||"")}))}async getFiles(e,t=[]){const r=await this.appProcessor.getApp(e);return new Promise(((e,n)=>{e(r.file_list.filter((e=>t.some((t=>t==e.file_id))))||"")}))}async uploadFile(e,t,r){const n=await this.uploadFileApi(e,t,r);return this.addFileToStorage(t,n),n}async uploadFileFromString(e){const t=await this.uploadFileFromStringApi(e);return this.addFileToStorage(t.app_id,t),t}async updateFileFromString(e,t,r,n,i){const a=await this.updateFileFromStringApi(e,t,r,n,i);return this.updateFileInStorage(t,a.app_id,a),a}async deleteFile(e,t){return await this.deleteFileApi(e),this.deleteFileFromStorage(e,t),!0}async isFileExists(e,t){let r=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;if(Boolean(t)){let n=await this.getFile(e,t);return!!Boolean(n)&&r.test(n.url)}return!1}}class De{constructor(e){this.req=e}async getChunk(e,t){return this.req.get({url:`${this.req.root}/api/get-items-chunk/${e}/${t}`,method:"GET"})}async getLastChunk(e){return this.req.axiosRequest({url:`${this.req.root}/api/get-last-items-chunk/${e}`,method:"GET"})}}class qe{constructor(e,t,r,n,i){this.storage=e,this.pipeService=t,this.req=r,this.util=n,this.dataService=i,this.chunkApi=new De(r),this.itemListeners()}async getChunk(e,t){try{return this.dataService.getChunk(e,t)}catch(e){return console.log(e),null}}async getLastChunk(e){try{return this.chunkApi.getLastChunk(e)}catch(e){return console.log(e),null}}async getChunks(e,t){let r=[];return t&&(r=await Promise.all(t.map((t=>this.getChunk(e,t))))),r}itemListeners(){}async getApp(e){if(!e)return null;let t=this.getAppFromStorage(e);if(!t){if(this.getAppPromises[e])return this.getAppPromises[e];if(this.getAppPromises[e]=this.getAppApi(e),t=await this.getAppPromises[e],!t)return null;this.saveAppInStorage(t),this.ws.addSubscription(e)}return t}}class Ue{constructor(e,t){this.req=e,this.pipeService=t}createDocument(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)}})}emitDocumentInsert(e){const 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)}getDocument(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}getDocuments(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}deleteDocument(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}class Be{constructor(e){this.gudhub=e}async getInterpretationObj(e,t,r,n,i,a){var o=[],s=t.data_model.interpretation.find((function(e){return e.src==r}))||t.data_model.interpretation.find((function(e){return"table"==e.src}))||{id:"default"};if(e.data_model&&e.data_model.interpretation){for(var l=0;l<e.data_model.interpretation.length;l++)e.data_model.interpretation[l].src!=r&&e.data_model.interpretation[l].src!=n||o.push(e.data_model.interpretation[l]);for(l=0;l<o.length;l++)if(o[l].settings&&o[l].settings.condition_filter&&o[l].settings.filters_list.length>0){const e=await gudhub.getItem(a,i);if(e&&gudhub.filter([e],o[l].settings.filters_list).length>0){s=o[l];break}}else s=gudhub.mergeObjects(s,o[l])}return s}getInterpretation(e,t,r,n,i,a,o){const s=this;return new Promise((async(l,c)=>{var u=t&&t.data_type?t.data_type:r;u?gudhub.ghconstructor.getInstance(u).then((async function(r){if(r){var p=await s.getInterpretationObj(t,r.getTemplate().model,n,o,i,a);r.getInterpretation(e,p.id,u,t,i,a).then((function(e){l(gudhub.mergeObjects(e,p))}),(function(e){c()}))}}),(function(e){})):console.error("Get Interpretation: data_type is undefined",r,t)}))}async getInterpretationById(e,t,r,n,i=null,a=null){let o=null==i?await this.gudhub.getFieldValue(e,t,r):i,s=null==a?await this.gudhub.getField(e,r):a;if(null==s)return"";const l=await this.gudhub.ghconstructor.getInstance(s.data_type),c=await l.getInterpretation(o,n,s.data_type,s,t,e);return"<span>no interpretation</span>"==c.html?o:c.html}}function $e(e,t){switch(t.api){case"/items/update":console.log("/items/update - ",t),e.itemProcessor.updateItemsInStorage(t.app_id,t.response);break;case"/items/add":console.log("/items/add - ",t),e.itemProcessor.addItemsToStorage(t.app_id,t.response);break;case"/items/delete":console.log("/items/delete - ",t),e.itemProcessor.deleteItemsFromStorage(t.app_id,t.response);break;case"/app/update":console.log("/app/update - ",t),e.appProcessor.updateAppFieldsAndViews(t.response);break;case"/file/delete":console.log("file/delete - ",t),e.fileManager.deleteFileFromStorage(t.response.file_id,t.app_id);break;case"/file/upload":console.log("file/upload - ",t),e.fileManager.addFileToStorage(t.app_id,t.response);break;case"/file/formupload":console.log("file/formupload - ",t);break;case"/file/update":e.fileManager.updateFileInStorage(t.response.file_id,t.response.app_id,t.response),console.log("file/update - ",t);break;case"/new/file/duplicate":e.fileManager.addFilesToStorage(t.app_id,t.response),console.log("new/file/duplicate - ",t);break;case"/api/new/document/insert-one":e.documentManager.emitDocumentInsert(t.response),console.log("/api/new/document/insert-one - ",t);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",t);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",t);const r=JSON.parse(t.response);if(!r.data_type)return;e.ghconstructor.getInstance(r.data_type).then((e=>{e.onMessage(t.app_id,t.user_id,r)}));break;default:console.warn("WEBSOCKETS is not process this API:",t.api)}}class Ge{constructor(e,t){this.req=t,this.gudhub=e}async createGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_name:e};return await this.req.post({url:"/api/sharing-group/create-group",form:t})}catch(e){return console.log(e),null}}async updateGroupApi(e,t){try{const r={token:await this.gudhub.auth.getToken(),group_name:t,group_id:e};return await this.req.post({url:"/api/sharing-group/update-group",form:r})}catch(e){return console.log(e),null}}async deleteGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/delete-group",form:t})}catch(e){return console.log(e),null}}async addUserToGroupApi(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),group_id:e,user_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/add-user-to-group",form:n})}catch(e){return console.log(e),null}}async getUsersByGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-users-by-group",form:t})}catch(e){return console.log(e),null}}async updateUserInGroupApi(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/update-user-in-group",form:n})}catch(e){return console.log(e),null}}async deleteUserFromGroupApi(e,t){try{const r={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t};return await this.req.post({url:"/api/sharing-group/delete-user-from-group",form:r})}catch(e){return console.log(e),null}}async getGroupsByUserApi(e){try{const t={token:await this.gudhub.auth.getToken(),user_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-user",form:t})}catch(e){return console.log(e),null}}}class We{constructor(e,t){this.req=t,this.gudhub=e}async addAppToGroupApi(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),app_id:e,group_id:t,app_permission:r};return await this.req.post({url:"/api/sharing-group/add-app-to-group",form:n})}catch(e){return console.log(e),null}}async getAppsByGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-apps-by-group",form:t})}catch(e){return console.log(e),null}}async updateAppInGroupApi(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/update-app-in-group",form:n})}catch(e){return console.log(e),null}}async deleteAppFromGroupApi(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/delete-app-from-group",form:n})}catch(e){return console.log(e),null}}async getGroupsByAppApi(e){try{const t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-app",form:t})}catch(e){return console.log(e),null}}}class He{constructor(e,t,r){this.req=t,this.gudhub=e,this.pipeService=r,this.groupManager=new Ge(e,t),this.appGroupSharing=new We(e,t)}createGroup(e){return this.groupManager.createGroupApi(e)}updateGroup(e,t){return this.groupManager.updateGroupApi(e,t)}deleteGroup(e){return this.groupManager.deleteGroupApi(e)}async addUserToGroup(e,t,r){let n=await this.groupManager.addUserToGroupApi(e,t,r);return this.pipeService.emit("group_members_add",{app_id:"group_sharing"},n),n}getUsersByGroup(e){return this.groupManager.getUsersByGroupApi(e)}async updateUserInGroup(e,t,r){let n=await this.groupManager.updateUserInGroupApi(e,t,r);return this.pipeService.emit("group_members_update",{app_id:"group_sharing"},n),n}async deleteUserFromGroup(e,t){let r=await this.groupManager.deleteUserFromGroupApi(e,t);return this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},r),r}getGroupsByUser(e){return this.groupManager.getGroupsByUserApi(e)}addAppToGroup(e,t,r){return this.appGroupSharing.addAppToGroupApi(e,t,r)}getAppsByGroup(e){return this.appGroupSharing.getAppsByGroupApi(e)}updateAppInGroup(e,t,r){return this.appGroupSharing.updateAppInGroupApi(e,t,r)}deleteAppFromGroup(e,t,r){return this.appGroupSharing.deleteAppFromGroupApi(e,t,r)}getGroupsByApp(e){return this.appGroupSharing.getGroupsByAppApi(e)}}class Ve{constructor(e,t){this.req=t,this.gudhub=e}async add(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/add",form:n})}catch(e){return console.log(e),null}}async update(e,t,r){try{const n={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/update",form:n})}catch(e){return console.log(e),null}}async delete(e,t){try{const r={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t};return await this.req.post({url:"/sharing/delete",form:r})}catch(e){return console.log(e),null}}async getAppUsers(e){try{const t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/sharing/get-app-users",form:t})}catch(e){return console.log(e),null}}async addInvitation(e,t){try{const r={token:await this.gudhub.auth.getToken(),guests_emails:e,apps:t};return await this.req.post({url:"/api/invitation/add",form:r})}catch(e){return console.log(e),null}}}class ze{constructor(e){this.gudhub=e}async emitToUser(e,t){const r={user_id:e,data:"object"==typeof t?JSON.stringify(t):t};return await this.gudhub.req.post({url:"/ws/emit-to-user",form:r})}async broadcastToAppSubscribers(e,t,r){const n={app_id:e,data:JSON.stringify({data_type:t,data:r})};return await this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:n})}}class Je{}class Xe extends Je{}class Qe{constructor(e){this.req=e}async getApp(e){return this.req.get({url:"/api/app/get",params:{app_id:e}})}}let Ye=(e,...t)=>{for(let r of t)if(r)for(let t of Object.keys(r)){const n=Object.getOwnPropertyDescriptor(r,t);n.enumerable&&Object.defineProperty(e,t,n)}};class Ke{}class Ze extends Xe{constructor(e,t){super(),this.appApi=new Qe(e);let r=new Ke(t);Ye(this,r)}async getApp(e){return this.appApi.getApp(e)}async putApp(e,t){}static[Symbol.hasInstance](e){try{return e instanceof Ze||e instanceof Ke}catch(e){return!1}}}class et{constructor(e){this.store=e.store,this.dbName=e.dbName,this.dbVersion=e.dbVersion,this.requestCache=new Map}}class tt extends Xe{constructor(e,t){super(e,t),this.dataService=new Ze(e);let r=new et(t);Ye(this,r)}static[Symbol.hasInstance](e){try{return e instanceof tt||e instanceof et}catch(e){return!1}}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=this.dataService.getApp(e);t.then((t=>this.putApp(e,t)));try{let t=this,r=new Promise((async(r,n)=>{try{const i=(await t.openDatabase()).transaction(t.store,"readonly").objectStore(t.store).get(e);i.onsuccess=e=>{let t=e.target.result;t||n(),t&&r(t)},i.onerror=n}catch(e){n()}}));return t.requestCache.set(e,r),await r,r}catch(r){return this.requestCache.set(e,t),t}}async putApp(e,t){try{(await this.openDatabase()).transaction(this.store,"readwrite").objectStore(this.store).put(t,e)}catch(e){}}async openDatabase(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,this.dbVersion);r.onsuccess=t=>{e(t.target.result)},r.onerror=e=>{t(e.target.error)}}))}}class rt extends Je{}class nt extends rt{constructor(e,t){super(),this.chunkApi=new De(e);let r=new Ke(t);Ye(this,r)}async getChunk(e,t){return this.chunkApi.getChunk(e,t)}putChunk(){}static[Symbol.hasInstance](e){try{return e instanceof nt||e instanceof Ke}catch(e){return!1}}}class it extends rt{constructor(e,t){super(e,t),this.dataService=new nt(e);let r=new et(t);Ye(this,r)}static[Symbol.hasInstance](e){try{return e instanceof it||e instanceof et}catch(e){return!1}}async putChunk(e,t){try{(await this.openDatabase()).transaction(this.store,"readwrite").objectStore(this.store).put(t,e)}catch(e){}}async getChunk(e,t){if(this.requestCache.has(t))return this.requestCache.get(t);try{let e=this,r=new Promise((async(r,n)=>{try{const i=(await e.openDatabase()).transaction(e.store,"readonly").objectStore(e.store).get(t);i.onsuccess=e=>{let t=e.target.result;t||n(),t&&r(t)},i.onerror=n}catch(e){n()}}));return e.requestCache.set(t,r),await r,r}catch(r){let n=this.dataService.getChunk(e,t);this.requestCache.set(t,n);let i=await n;return this.putChunk(t,i),n}}async openDatabase(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,this.dbVersion);r.onsuccess=t=>{e(t.target.result)},r.onerror=e=>{t(e.target.error)}}))}}const at="gudhub",ot={dbName:at,dbVersion:7,store:"apps"},st={dbName:at,dbVersion:7,store:"chunks"};let lt,ct,ut,pt;Ce.P&&(indexedDB.open(at,7).onupgradeneeded=e=>{const t=e.target.result;for(let e of[ot.store,st.store])t.objectStoreNames.contains(e)||t.createObjectStore(e)}),Ce.P?(ct=it,pt=st):ct=nt,Ce.P?(lt=tt,ut=ot):lt=Ze;class dt{constructor(e,t={server_url:"https://gudhub.com/GudHub_Test",wss_url:"wss://gudhub.com/GudHub/ws/app/",node_server_url:"https://gudhub.com/api/services/prod",initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:"build/latest/async_modules_node/",file_server_url:"https://gudhub.com",automation_modules_path:"build/latest/automation_modules/",accesstoken:this.accesstoken,expirydate:this.expirydate}){if(this.config=t,this.ghconstructor=new Ne(this),this.interpritate=new Be(this),this.pipeService=new a,this.storage=new o(t.async_modules_path,t.file_server_url,t.automation_modules_path),this.util=new Oe(this),this.req=new n(t.server_url),this.auth=new Pe(this.req,this.storage),this.sharing=new Ve(this,this.req),this.groupSharing=new He(this,this.req,this.pipeService),e?this.storage.setUser({auth_key:e}):t.accesstoken&&t.expirydate&&this.storage.setUser({accesstoken:t.accesstoken,expirydate:t.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new l(t.wss_url,this.auth),this.chunksManager=new qe(this.storage,this.pipeService,this.req,this.util,new ct(this.req,pt)),this.appProcessor=new Le(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,t.activateSW,new lt(this.req,ut)),this.itemProcessor=new Me(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new Fe(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new Re(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new Ue(this.req,this.pipeService),this.websocketsemitter=new ze(this),t.initWebsocket){const e=this;this.ws.initWebSocket($e.bind(this,e),this.appProcessor.refreshApps.bind(this.appProcessor))}t.activateSW&&this.activateSW(t.swLink)}async activateSW(e){if(Ce.P&&"serviceWorker"in window.navigator)try{const t=await window.navigator.serviceWorker.register(e);t.update().then((()=>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((()=>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;",t)}catch(e){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)}else console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}on(e,t,r){return this.pipeService.on(e,t,r),this}emit(e,t,r,n){return this.pipeService.emit(e,t,r,n),this}destroy(e,t,r){return this.pipeService.destroy(e,t,r),this}prefilter(e,t){return this.util.prefilter(e,t)}debounce(e,t){return this.util.debounce(e,t)}emitToUser(e,t){return this.websocketsemitter.emitToUser(e,t)}broadcastToAppSubscribers(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}getInterpretation(e,t,r,n,i,a,o){return this.interpritate.getInterpretation(e,t,r,n,i,a,o)}getInterpretationById(e,t,r,n,i,a){return this.interpritate.getInterpretationById(e,t,r,n,i,a)}filter(e,t){return this.util.filter(e,t)}mergeFilters(e,t){return this.util.mergeFilters(e,t)}group(e,t){return this.util.group(e,t)}getFilteredItems(e,t,r={}){return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}sortItems(e,t){return this.util.sortItems(e,t)}jsonToItems(e,t){return this.util.jsonToItems(e,t)}getDate(e){return this.util.getDate(e)}populateWithDate(e,t){return this.util.populateWithDate(e,t)}checkRecurringDate(e,t){return this.util.checkRecurringDate(e,t)}populateItems(e,t,r){return this.util.populateItems(e,t,r)}populateWithItemRef(e,t,r,n,i,a){return this.util.populateWithItemRef(e,t,r,n,i,a)}compareItems(e,t,r){return this.util.compareItems(e,t,r)}mergeItems(e,t,r){return this.util.mergeItems(e,t,r)}mergeObjects(e,t){return this.util.mergeObjects(e,t)}makeNestedList(e,t,r,n,i){return this.util.makeNestedList(e,t,r,n,i)}jsonConstructor(e,t,r,n){return this.util.jsonConstructor(e,t,r,n)}getAppsList(){return this.appProcessor.getAppsList()}getAppInfo(e){return this.appProcessor.getAppInfo(e)}deleteApp(e){return this.appProcessor.deleteApp(e)}getApp(e){return this.appProcessor.getApp(e)}updateApp(e){return this.appProcessor.updateApp(e)}updateAppInfo(e){return this.appProcessor.updateAppInfo(e)}createNewApp(e){return this.appProcessor.createNewApp(e)}getItems(e){return this.itemProcessor.getItems(e)}async getItem(e,t){const r=await this.getItems(e);if(r)return r.find((e=>e.item_id==t))}addNewItems(e,t){return this.itemProcessor.addNewItems(e,t)}updateItems(e,t){return this.itemProcessor.updateItems(e,t)}deleteItems(e,t){return this.itemProcessor.deleteItems(e,t)}getField(e,t){return this.fieldProcessor.getField(e,t)}getFieldIdByNameSpace(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}getFieldModels(e){return this.fieldProcessor.getFieldModels(e)}updateField(e,t){return this.fieldProcessor.updateField(e,t)}deleteField(e,t){return this.fieldProcessor.deleteField(e,t)}getFieldValue(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}setFieldValue(e,t,r,n){return this.fieldProcessor.setFieldValue(e,t,r,n)}getFile(e,t){return this.fileManager.getFile(e,t)}getFiles(e,t){return this.fileManager.getFiles(e,t)}uploadFile(e,t,r){return this.fileManager.uploadFile(e,t,r)}uploadFileFromString(e,t,r,n,i,a,o){return this.fileManager.uploadFileFromString(e,t,r,n,i,a,o)}updateFileFromString(e,t,r,n,i){return this.fileManager.updateFileFromString(e,t,r,n,i)}deleteFile(e,t){return this.fileManager.deleteFile(e,t)}duplicateFile(e){return this.fileManager.duplicateFile(e)}downloadFileFromString(e,t){return this.fileManager.downloadFileFromString(e,t)}createDocument(e){return this.documentManager.createDocument(e)}getDocument(e){return this.documentManager.getDocument(e)}getDocuments(e){return this.documentManager.getDocuments(e)}deleteDocument(e){return this.documentManager.deleteDocument(e)}login(e){return this.auth.login(e)}loginWithToken(e){return this.auth.loginWithToken(e)}logout(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}signup(e){return this.auth.signup(e)}getUsersList(e){return this.auth.getUsersList(e)}updateToken(e){return this.auth.updateToken(e)}avatarUploadApi(e){return this.auth.avatarUploadApi(e)}getVersion(){return this.auth.getVersion()}getUserById(e){return this.auth.getUserById(e)}getToken(){return this.auth.getToken()}updateUser(e){return this.auth.updateUser(e)}updateAvatar(e){return this.auth.updateAvatar(e)}}const ht=dt})(),__webpack_exports__})()));
|