-
Notifications
You must be signed in to change notification settings - Fork 2
/
linq-fns-localStorage.min.js
23 lines (21 loc) · 47.4 KB
/
linq-fns-localStorage.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=77)}([function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",function(){return o}),r.d(e,"__assign",function(){return i}),r.d(e,"__rest",function(){return u}),r.d(e,"__decorate",function(){return a}),r.d(e,"__param",function(){return s}),r.d(e,"__metadata",function(){return c}),r.d(e,"__awaiter",function(){return f}),r.d(e,"__generator",function(){return l}),r.d(e,"__exportStar",function(){return p}),r.d(e,"__values",function(){return h}),r.d(e,"__read",function(){return d}),r.d(e,"__spread",function(){return _}),r.d(e,"__await",function(){return y}),r.d(e,"__asyncGenerator",function(){return v}),r.d(e,"__asyncDelegator",function(){return m}),r.d(e,"__asyncValues",function(){return x}),r.d(e,"__makeTemplateObject",function(){return b}),r.d(e,"__importStar",function(){return w}),r.d(e,"__importDefault",function(){return g});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http:https://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};function o(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t};function u(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&(r[n[o]]=t[n[o]])}return r}function a(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u}function s(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function f(t,e,r,n){return new(r||(r=Promise))(function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(u,a)}s((n=n.apply(t,e||[])).next())})}function l(t,e){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function p(t,e){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}function h(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function d(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function y(t){return this instanceof y?(this.v=t,this):new y(t)}function v(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(t,e||[]),i=[];return n={},u("next"),u("throw"),u("return"),n[Symbol.asyncIterator]=function(){return this},n;function u(t){o[t]&&(n[t]=function(e){return new Promise(function(r,n){i.push([t,e,r,n])>1||a(t,e)})})}function a(t,e){try{(r=o[t](e)).value instanceof y?Promise.resolve(r.value.v).then(s,c):f(i[0][2],r)}catch(t){f(i[0][3],t)}var r}function s(t){a("next",t)}function c(t){a("throw",t)}function f(t,e){t(e),i.shift(),i.length&&a(i[0][0],i[0][1])}}function m(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,o){t[n]&&(e[n]=function(e){return(r=!r)?{value:y(t[n](e)),done:"return"===n}:o?o(e):e})}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):h(t)}function b(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function g(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.replaceBySyncSource=function(t){this.nextSource=t},t.prototype.hasSource=function(){return null!==this.nextSource&&void 0!==this.nextSource},t.prototype.execute=function(t){throw new Error("Method not implemented.")},t}();e.BaseIterator=n},function(t,e,r){"use strict";var n=r(12),o=r(41),i=Object.prototype.toString;function u(t){return"[object Array]"===i.call(t)}function a(t){return null!==t&&"object"==typeof t}function s(t){return"[object Function]"===i.call(t)}function c(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),u(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:u,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:s,isStream:function(t){return a(t)&&s(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return e},extend:function(t,e,r){return c(e,function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(1),e),n.__exportStar(r(22),e),n.__exportStar(r(48),e),n.__exportStar(r(47),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),r(0).__exportStar(r(74),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return t?t.map(function(t){return e._iterator(t)}):t},e}(r(1).BaseIterator);e.SelectClause=o},function(t,e,r){"use strict";(function(e){var n=r(2),o=r(39),i={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,s={adapter:("undefined"!=typeof XMLHttpRequest?a=r(11):void 0!==e&&(a=r(11)),a),transformRequest:[function(t,e){return o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(u(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(t){s.headers[t]={}}),n.forEach(["post","put","patch"],function(t){s.headers[t]=n.merge(i)}),t.exports=s}).call(this,r(13))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(73),e),n.__exportStar(r(72),e),n.__exportStar(r(71),e),n.__exportStar(r(70),e),n.__exportStar(r(69),e),n.__exportStar(r(21),e),n.__exportStar(r(68),e),n.__exportStar(r(20),e),n.__exportStar(r(67),e),n.__exportStar(r(66),e),n.__exportStar(r(65),e),n.__exportStar(r(64),e),n.__exportStar(r(19),e),n.__exportStar(r(63),e),n.__exportStar(r(5),e),n.__exportStar(r(62),e),n.__exportStar(r(61),e),n.__exportStar(r(17),e),n.__exportStar(r(60),e),n.__exportStar(r(59),e),n.__exportStar(r(16),e),n.__exportStar(r(58),e),n.__exportStar(r(18),e),n.__exportStar(r(57),e),n.__exportStar(r(56),e),n.__exportStar(r(55),e),n.__exportStar(r(54),e),n.__exportStar(r(53),e),n.__exportStar(r(52),e),n.__exportStar(r(51),e),n.__exportStar(r(50),e),n.__exportStar(r(49),e)},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,r){"use strict";var n=r(37);t.exports=function(t,e,r,o,i){var u=new Error(t);return n(u,e,r,o,i)}},function(t,e,r){"use strict";var n=r(2),o=r(38),i=r(36),u=r(35),a=r(34),s=r(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(33);t.exports=function(t){return new Promise(function(e,f){var l=t.data,p=t.headers;n.isFormData(l)&&delete p["Content-Type"];var h=new XMLHttpRequest,d="onreadystatechange",_=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||a(t.url)||(h=new window.XDomainRequest,d="onload",_=!0,h.onprogress=function(){},h.ontimeout=function(){}),t.auth){var y=t.auth.username||"",v=t.auth.password||"";p.Authorization="Basic "+c(y+":"+v)}if(h.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h[d]=function(){if(h&&(4===h.readyState||_)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:r,config:t,request:h};o(e,f,n),h=null}},h.onerror=function(){f(s("Network Error",t,null,h)),h=null},h.ontimeout=function(){f(s("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var m=r(32),x=(t.withCredentials||a(t.url))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;x&&(p[t.xsrfHeaderName]=x)}if("setRequestHeader"in h&&n.forEach(p,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),f(t),h=null)}),void 0===l&&(l=null),h.send(l)})}},function(t,e,r){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=u}}();var s,c=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!f){var t=a(p);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function _(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=_,o.addListener=_,o.once=_,o.off=_,o.removeListener=_,o.removeAllListeners=_,o.emit=_,o.prependListener=_,o.prependOnceListener=_,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(15),i=r(3),u=r(4),a=r(45),s=function(t){function e(e,r){var n=t.call(this)||this;return n._repoName="",n._keyProp="__id",setTimeout(function(){u.Utils.isPromise(n.readData())?n.readData().then(function(t){return n.globalData=t}):n.globalData=n.readData()},0),n._repoName=e,n._key=r,n}return n.__extends(e,t),e.prototype.readData=function(){throw new Error("Method not implemented.")},e.prototype.writeData=function(t){throw new Error("Method not implemented.")},e.prototype.getQuery=function(){return i.Queryable.from(this.tableData())},e.prototype._add=function(t){this.tableData().push(this.prepareData(t))},e.prototype._remove=function(t){var e=this,r=this._key?this.tableData().find(function(r){return r[e._key]===t[e._key]}):this.tableData().find(function(e){return e.__id===t.__id}),n=this.tableData().indexOf(r);n>-1&&this.tableData().splice(n,1)},e.prototype._update=function(t){var e=this,r=this._key?this.tableData().find(function(r){return r[e._key]===t[e._key]}):this.tableData().find(function(e){return e.__id===t.__id}),n=this.tableData().indexOf(r);n>-1&&(this.tableData()[n]=t)},e.prototype.tableData=function(){return this.globalData[this._repoName]||(this.globalData[this._repoName]=[]),this.globalData[this._repoName]},e.prototype.prepareData=function(t){return this._key||(t[this._keyProp]=a()),t},e.prototype.finalCallback=function(){this.writeData(this.globalData)},e}(o.BaseRepository);e.JsonQueryable=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this._methods=[]}return t.prototype.getQuery=function(t,e){throw new Error("Method not implemented.")},t.prototype.add=function(t,e){void 0===e&&(e=!1),e?this._add(t):this._methods.push({name:"ADD",item:t})},t.prototype.remove=function(t,e){void 0===e&&(e=!1),e?this._remove(t):this._methods.push({name:"DEL",item:t})},t.prototype.update=function(t,e){void 0===e&&(e=!1),e?this._update(t):this._methods.push({name:"UPD",item:t})},t.prototype.commitChanges=function(){for(var t=0,e=this._methods.length;t<e;t++){var r=this._methods[t];switch(r.name){case"ADD":this._add(r.item);break;case"UPD":this._update(r.item);break;case"DEL":this._remove(r.item);break;default:throw new Error("Method just only add, update, delete")}}this.finalCallback(),this._methods=[]},t.prototype._add=function(t){throw new Error("Method not implemented.")},t.prototype._remove=function(t){throw new Error("Method not implemented.")},t.prototype._update=function(t){throw new Error("Method not implemented.")},t.prototype.finalCallback=function(){},t}();e.BaseRepository=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){return t?t.slice(0,this._iterator):t},e}(r(1).BaseIterator);e.TakeClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){return t?t.slice(this._iterator):t},e}(r(1).BaseIterator);e.SkipClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return t?t.filter(function(t){return e._iterator(t)}):t},e}(r(1).BaseIterator);e.WhereClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;if(!t)return null;var r={};t.forEach(function(t,e){r[e]=t});var n=t.map(function(t,r){return{value:e._iterator(t),index:r}});return n?(n.sort(function(t,e){return t.value<e.value?-1:t.value>e.value?1:0}),n.map(function(t){return r[t.index]})):null},e}(r(1).BaseIterator);e.OrderByClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e,r){var n=t.call(this)||this;return n._iterator=r,n.nextSource=e,n}return n.__extends(e,t),e.prototype.execute=function(t){if(t){for(var e=[],r=0,n=t.length;r<n;r++)for(var o=0,i=this.nextSource.length;o<i;o++){var u=t[r],a=this.nextSource[o];this._iterator(u,a)&&e.push({x:u,y:a})}return e}return t},e}(r(1).BaseIterator);e.JoinClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=r(1),u=r(4),a=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;if(!t)return null;var r={},n=[],i={},a=u.Utils.distinct(new o.SelectClause(this._iterator).execute(t));return t.forEach(function(t,e){r[e]=t}),n=t.map(function(t,r){return{value:e._iterator(t),index:r}}).filter(function(t){return void 0!=t.value}),a.forEach(function(t){i[t]=[]}),i?(n.forEach(function(t){i[t.value].push(r[t.index])}),Object.keys(i).map(function(t){return{key:t,items:i[t]}})):null},e}(i.BaseIterator);e.GroupByClause=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),o=r(7),i=function(){function t(t,e){this._iteratorCollection=[],this._iteratorCollection=t,this._source=e}return t.prototype.clone=function(){return new t(Object.assign([],this._iteratorCollection),this._source)},t.prototype.where=function(t){return this._iteratorCollection.push(new o.WhereClause(t)),this},t.prototype.select=function(t){return this._iteratorCollection.push(new o.SelectClause(t)),this},t.prototype.selectMany=function(t){return this._iteratorCollection.push(new o.SelectManyClause(t)),this},t.prototype.join=function(t,e){return this._iteratorCollection.push(new o.JoinClause(t,e)),this},t.prototype.leftJoin=function(t,e){return this._iteratorCollection.push(new o.LeftJoinClause(t,e)),this},t.prototype.orderBy=function(t){return this._iteratorCollection.push(new o.OrderByClause(t)),this},t.prototype.orderByDescending=function(t){return this._iteratorCollection.push(new o.OrderByDescendingClause(t)),this},t.prototype.groupBy=function(t){return this._iteratorCollection.push(new o.GroupByClause(t)),this},t.prototype.groupJoin=function(t,e,r){return this._iteratorCollection.push(new o.GroupJoinClause(t,e,r)),this},t.prototype.distinct=function(t){return this._iteratorCollection.push(new o.DistinctClause(t)),this},t.prototype.concat=function(t){return this._iteratorCollection.push(new o.ConcatClause(t)),this},t.prototype.union=function(t){return this._iteratorCollection.push(new o.UnionClause(t)),this},t.prototype.zip=function(t,e){return this._iteratorCollection.push(new o.ZipClause(t,e)),this},t.prototype.except=function(t){return this._iteratorCollection.push(new o.ExceptClause(t)),this},t.prototype.intersect=function(t){return this._iteratorCollection.push(new o.IntersectClasue(t)),this},t.prototype.toList=function(){return this.runIterators()},t.prototype.first=function(t){return this.filterReturn(this.toList(),function(e){return new o.FirstClause(t).execute(e)})},t.prototype.firstOrDefault=function(t){return this.filterReturn(this.toList(),function(e){return new o.FirstClause(t).execute(e)||null})},t.prototype.last=function(t){return this.filterReturn(this.toList(),function(e){return new o.LastClause(t).execute(e)})},t.prototype.lastOrDefault=function(t){return this.filterReturn(this.toList(),function(e){return new o.LastClause(t).execute(e)||null})},t.prototype.count=function(t){return this.filterReturn(this.toList(),function(e){return new o.CountClause(t).execute(e)||null})},t.prototype.sum=function(t){return this.filterReturn(this.toList(),function(e){return new o.SumClause(t).execute(e)||null})},t.prototype.avarage=function(t){return this.filterReturn(this.toList(),function(e){return new o.AvarageClause(t).execute(e)||0})},t.prototype.min=function(t){return this.filterReturn(this.toList(),function(e){return new o.MinClause(t).execute(e)||null})},t.prototype.max=function(t){return this.filterReturn(this.toList(),function(e){return new o.MaxClause(t).execute(e)||null})},t.prototype.single=function(t){return this.filterReturn(this.toList(),function(e){if(!e)throw new Error("Single require source is not null");return new o.SingleClause(t).execute(e)})},t.prototype.singleOrDefault=function(t){return this.filterReturn(this.toList(),function(e){return new o.SingleClause(t).execute(e)||null})},t.prototype.take=function(t){return this._iteratorCollection.push(new o.TakeClause(t)),this},t.prototype.skip=function(t){return this._iteratorCollection.push(new o.SkipClause(t)),this},t.prototype.skipWhile=function(t){return this._iteratorCollection.push(new o.SkipWhileClause(t)),this},t.prototype.takeWhile=function(t){return this._iteratorCollection.push(new o.TakeWhileClause(t)),this},t.prototype.any=function(t){return this.filterReturn(this.toList(),function(e){return new o.AnyClause(t).execute(e)})},t.prototype.all=function(t){return this.filterReturn(this.toList(),function(e){return new o.AllClause(t).execute(e)})},t.prototype.contains=function(t){return this.filterReturn(this.toList(),function(e){return new o.ContainsClause(t).execute(e)})},t.prototype.sequencyEqual=function(t){return this.filterReturn(this.toList(),function(e){return n.Utils.isPromise(t)?t.then(function(t){return new o.SequenceEqualClause(t).execute(e)}):new o.SequenceEqualClause(t).execute(e)})},t.prototype.aggregate=function(t){return this.filterReturn(this.toList(),function(e){return new o.AggregateClause(t).execute(e)})},t.prototype.filterReturn=function(t,e){return n.Utils.isPromise(t)?t.then(function(t){return e(t)}):e(t)},t.prototype.runIterators=function(){for(var t=this,e=[],r=[],o=0,i=this._iteratorCollection.length;o<i;o++){var u=this._iteratorCollection[o];u.hasSource()&&(n.Utils.isPromise(u.nextSource)?r.push(u.nextSource):r.push(Promise.resolve(u.nextSource)))}return n.Utils.isPromise(this._source)?r.unshift(this._source):r.unshift(Promise.resolve(this._source)),Promise.all(r).then(function(r){var n=0;e=r[0];for(var o=0,i=t._iteratorCollection.length;o<i;o++){var u=t._iteratorCollection[o];u.hasSource()&&(u.replaceBySyncSource(r[n+1]),n+=1)}return t._iteratorCollection.forEach(function(t){e=t.execute(e)}),e})},t}();e.IteratorMethods=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(76),e),n.__exportStar(r(46),e),n.__exportStar(r(24),e)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n._dbName="__lqfnsDb",n}return n.__extends(e,t),e.prototype.readData=function(){var t=localStorage.getItem(this._dbName||"__lqfnsDb");return t?JSON.parse(t):{}},e.prototype.writeData=function(t){var e=JSON.stringify(t);return localStorage.setItem(this._dbName,e),!0},e}(r(14).JsonQueryable);e.LocalStorageQueryable=o},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";var n=r(8);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var r=this;t(function(t){r.reason||(r.reason=new n(t),e(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e,r){return n.forEach(r,function(r){t=r(t,e)}),t}},function(t,e,r){"use strict";var n=r(2),o=r(29),i=r(9),u=r(6),a=r(28),s=r(27);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!a(t.url)&&(t.url=s(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||u.adapter)(t).then(function(e){return c(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,r){"use strict";var n=r(2);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},function(t,e,r){"use strict";var n=r(2);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,u){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===u&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,r,i=String(t),u="",a=0,s=n;i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&e>>8-a%1*8)){if((r=i.charCodeAt(a+=.75))>255)throw new o;e=e<<8|r}return u}},function(t,e,r){"use strict";var n=r(2);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(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 t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(2),o=["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"];t.exports=function(t){var e,r,i,u={};return t?(n.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(u[e]&&o.indexOf(e)>=0)return;u[e]="set-cookie"===e?(u[e]?u[e]:[]).concat([r]):u[e]?u[e]+", "+r:r}}),u):u}},function(t,e,r){"use strict";var n=r(2);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(n.isURLSearchParams(e))i=e.toString();else{var u=[];n.forEach(e,function(t,e){null!==t&&void 0!==t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),u.push(o(e)+"="+o(t))}))}),i=u.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,o){return t.config=e,r&&(t.code=r),t.request=n,t.response=o,t}},function(t,e,r){"use strict";var n=r(10);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e){n.forEach(t,function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])})}},function(t,e,r){"use strict";var n=r(6),o=r(2),i=r(31),u=r(30);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),(t=o.merge(n,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[u,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)r=r.then(e.shift(),e.shift());return r},o.forEach(["delete","get","head","options"],function(t){a.prototype[t]=function(e,r){return this.request(o.merge(r||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,r,n){return this.request(o.merge(n||{},{method:t,url:e,data:r}))}}),t.exports=a},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,r){"use strict";var n=r(2),o=r(12),i=r(40),u=r(6);function a(t){var e=new i(t),r=o(i.prototype.request,e);return n.extend(r,i.prototype,e),n.extend(r,e),r}var s=a(u);s.Axios=i,s.create=function(t){return a(n.merge(u,t))},s.Cancel=r(8),s.CancelToken=r(26),s.isCancel=r(9),s.all=function(t){return Promise.all(t)},s.spread=r(25),t.exports=s,t.exports.default=s},function(t,e,r){t.exports=r(42)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){(function(t,e){var r=t&&t.pid?t.pid.toString(36):"",n=null,o=n?parseInt(n.replace(/\:|\D+/gi,"")).toString(36):"";function i(){var t=Date.now(),e=i.last||t;return i.last=t>e?t:e+1}e.exports=function(t){return(t||"")+o+r+i().toString(36)},e.exports.process=function(t){return(t||"")+r+i().toString(36)},e.exports.time=function(t){return(t||"")+i().toString(36)}}).call(this,r(13),r(44)(t))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(14),i=r(43),u=function(t){function e(e,r,n,o){var i=t.call(this,n,o)||this;return i._dbName="_lqfnsDb",i._gistApiUrl="https://api.github.com/gists",i.jsonFormat={description:"",public:!0,files:{}},i._gistFileId=e,i._token=r,i}return n.__extends(e,t),e.prototype.readData=function(){var t=this;return i.default.get(this._gistApiUrl+"/"+this._gistFileId).then(function(e){t._fileName=Object.keys(e.data.files)[0],t.updateJsonFormat(e.data);var r=e.data.files[t._fileName].content;return r?"string"==typeof JSON.parse(r)?JSON.parse(JSON.parse(r)):JSON.parse(r):{}})},e.prototype.writeData=function(t){return this.jsonFormat.files[this._fileName].content=JSON.stringify(t),i.default.patch(this._gistApiUrl+"/"+this._gistFileId+"?access_token="+this._token,this.jsonFormat).then(function(t){return!0})},e.prototype.updateJsonFormat=function(t){this.jsonFormat.description=t.description,this.jsonFormat.files[this._fileName]={},this.jsonFormat.files[this._fileName].content=t.files[this._fileName].content},e}(o.JsonQueryable);e.GistQueryable=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),o=function(){function t(){}return t.from=function(t){return new n.IteratorMethods([],t)},t.fromSync=function(t){return new n.SyncIteratorMethods([],t)},t}();e.Queryable=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.runIterators=function(){var t=Object.assign([],this._source);return this._iteratorCollection.forEach(function(e){t=e.execute(t)}),t},e}(r(22).IteratorMethods);e.SyncIteratorMethods=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return t.reduce(function(t,r,n){return e._iterator(t,r,n)})},e}(r(3).BaseIterator);e.AggregateClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e,r){var n=t.call(this)||this;return n.nextSource=e,n._iterator=r,n}return n.__extends(e,t),e.prototype.execute=function(t){var e=this,r=t.length,n=this.nextSource.length,o=r>n?n:r;return t.map(function(t,r){if(!(r>o-1))return e._iterator?e._iterator(t,e.nextSource[r]):[t,e.nextSource[r]]}).filter(function(t){return void 0!==t})},e}(r(3).BaseIterator);e.ZipClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),u=function(t){function e(e){var r=t.call(this)||this;return r.nextSource=e,r}return n.__extends(e,t),e.prototype.execute=function(t){for(var e=[],r=0,n=t.length;r<n;r++){for(var o=!1,u=0,a=this.nextSource.length;u<a;u++)if(i.Utils.compare(t[r],this.nextSource[u])){o=!0;break}o||e.push(t[r])}return e||null},e}(o.BaseIterator);e.ExceptClause=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),u=function(t){function e(e){var r=t.call(this)||this;return r.nextSource=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(t.length!==this.nextSource.length)return!1;for(var e=0,r=t.length;e<r;e++)if(!i.Utils.compare(t[e],this.nextSource[e]))return!1;return!0},e}(o.BaseIterator);e.SequenceEqualClause=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),u=r(7),a=function(t){function e(e){var r=t.call(this)||this;return r.nextSource=e,r}return n.__extends(e,t),e.prototype.execute=function(t){for(var e=[],r=0,n=t.length;r<n;r++)for(var o=0,a=this.nextSource.length;o<a;o++)i.Utils.compare(t[r],this.nextSource[o])&&e.push(t[r]);return e?(new u.DistinctClause).execute(e):null},e}(o.BaseIterator);e.IntersectClasue=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(7),u=function(t){function e(e){var r=t.call(this)||this;return r.nextSource=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=t.concat(this.nextSource);return(new i.DistinctClause).execute(e)},e}(o.BaseIterator);e.UnionClause=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(4),u=function(t){function e(e){var r=t.call(this)||this;return r._comparer=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!this._comparer)return i.Utils.distinct(t)},e}(o.BaseIterator);e.DistinctClause=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r.nextSource=e,r}return n.__extends(e,t),e.prototype.execute=function(t){return t.concat(this.nextSource)},e}(r(3).BaseIterator);e.ConcatClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return!!t&&t.every(function(t){return e._iterator(t)})},e}(r(1).BaseIterator);e.AllClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(16),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(t){for(var e=0,r=0;r<t.length;r++){var n=t[r];if(this._iterator(n))break;e+=1}return new o.TakeClause(e).execute(t)}return null},e}(r(1).BaseIterator);e.TakeWhileClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return 0;var e;if(this._iterator&&(e=new o.SelectClause(this._iterator).execute(t)),!e)return 0;if(Number.isNaN(e[0]))throw new Error("Sum operator need type of number");return e.reduce(function(t,e){return t+e},0)},e}(r(1).BaseIterator);e.SumClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(17),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(t){for(var e=0,r=0;r<t.length;r++){var n=t[r];if(this._iterator(n))break;e+=1}return new o.SkipClause(e).execute(t)}return null},e}(r(1).BaseIterator);e.SkipWhileClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(18),i=r(1),u=r(4),a=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=t;return this._iterator&&(e=new o.WhereClause(this._iterator).execute(e)),u.Utils.getSingle(e)},e}(i.BaseIterator);e.SingleClause=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return null;var e=new o.SelectClause(this._iterator).execute(t);if(!e)return null;for(var r=[],n=0,i=e.length;n<i;n++)Array.isArray(e[n])?r=r.concat(e[n]):r.push(e[n]);return r},e}(r(1).BaseIterator);e.SelectManyClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(19),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){return t?new o.OrderByClause(this._iterator).execute(t).reverse():null},e}(r(1).BaseIterator);e.OrderByDescendingClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return 0;var e;if(this._iterator&&(e=new o.SelectClause(this._iterator).execute(t)),!e)return 0;if(!Number.isNaN(e[0]))throw new Error("Min operator require type of number");return Math.min.apply(Math,e)},e}(r(1).BaseIterator);e.MinClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return 0;var e;if(this._iterator&&(e=new o.SelectClause(this._iterator).execute(t)),!e)return 0;if(!Number.isNaN(e[0]))throw new Error("Max operator require type of number");return Math.max.apply(Math,e)},e}(r(1).BaseIterator);e.MaxClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e,r){var n=t.call(this)||this;return n._iterator=r,n.nextSource=e,n}return n.__extends(e,t),e.prototype.execute=function(t){if(t){for(var e=[],r=0,n=t.length;r<n;r++){for(var o=!1,i=0,u=this.nextSource.length;i<u;i++)if(this._iterator(t[r],this.nextSource[i])){e.push(Object.assign({},t[r],this.nextSource[i])),o=!0;break}o||e.push(Object.assign({},t[r],null))}return e}return t},e}(r(1).BaseIterator);e.LeftJoinClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return t?this._iterator?t.filter(function(t){return e._iterator(t)})[t.length-1]:t[t.length-1]:null},e}(r(1).BaseIterator);e.LastClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(20),i=r(21),u=function(t){function e(e,r,n){var o=t.call(this)||this;return o._joinIterator=r,o._groupIterator=n,o.nextSource=e,o}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return null;var e=new o.JoinClause(this.nextSource,this._joinIterator).execute(t);return e=new i.GroupByClause(this._groupIterator).execute(e)},e}(r(1).BaseIterator);e.GroupJoinClause=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return this._iterator?t.filter(function(t){return e._iterator(t)})[0]:t[0]},e}(r(1).BaseIterator);e.FirstClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return t?this._iterator?t.filter(function(t){return e._iterator(t)}).length||0:t.length:0},e}(r(1).BaseIterator);e.CountClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(1),i=r(4),u=function(t){function e(e){var r=t.call(this)||this;return r._entity=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return!1;for(var e=!1,r=0,n=t.length;r<n;r++)if(i.Utils.compare(t[r],this._entity)){e=!0;break}return e},e}(o.BaseIterator);e.ContainsClause=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){if(!t)return 0;var e=this._iterator?new o.SelectClause(this._iterator).execute(t):t;if(!e)return 0;if(Number.isNaN(e[0]))throw new Error("Avarage operator need type of number");return e.reduce(function(t,e){return t+e},0)/e.length},e}(r(1).BaseIterator);e.AvarageClause=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=function(t){function e(e){var r=t.call(this)||this;return r._iterator=e,r}return n.__extends(e,t),e.prototype.execute=function(t){var e=this;return!!t&&t.some(function(t){return e._iterator(t)})},e}(r(1).BaseIterator);e.AnyClause=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.isPromise=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then},t.distinct=function(t){return t.filter(function(t,e,r){return r.indexOf(t)===e}).filter(function(t){return void 0!=t})},t.getSingle=function(t){if(t.length>1)throw new Error("The collection does not contain exactly one element");if(1===t.length)return t[0]},t.compare=function(t,e){if(t===e)return!0;var r=Array.isArray(t),n=Array.isArray(e);if(r&&n){if(t.length!==e.length)return!1;for(var o=0,i=t.length;o<i;o++){if(!this.compare(t[o],e[o]))return!1}return!0}if("object"==typeof t&&"object"==typeof e){var u=Object.keys(t);for(o=0,i=u.length;o<i;o++){if(!this.compare(t[u[o]],e[u[o]]))return!1}return!0}return!1},t}();e.Utils=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3);e.Queryable=n.Queryable;var o=r(23);e.FireBaseQueryale=o.FireBaseQueryale,e.GistQueryable=o.GistQueryable,e.LocalStorageQueryable=o.LocalStorageQueryable},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(75),i=function(t){function e(e,r){var n=t.call(this)||this;return n._repoName="",n._db=e,n._repoName=r,n._ref=n.getRefObject(n._repoName),n}return n.__extends(e,t),e.prototype.getQuery=function(t,e){var r=this;return void 0===e&&(e="value"),o.Queryable.from(new Promise(function(n,o){t?t(r._ref).on(e,function(t){n(r.convert(t.val()))}):r._ref.on(e,function(t){n(r.convert(t.val()))})}))},e.prototype._add=function(t,e){this._ref.push(t,function(t){e&&e(t)})},e.prototype._update=function(t,e){var r=t.__id,n={};delete t.__id,n[r]=t,this._ref.update(n,function(t){e&&e(t)})},e.prototype._remove=function(t,e){this._ref.child(t.__id).remove(function(t){e&&e(t)})},e.prototype.convert=function(t){return t?Object.keys(t).map(function(e){return t[e].__id=e,t[e]}):[]},e.prototype.getRefObject=function(t){if(!t)throw new Error("name cannot empty");var e=t.split("."),r=[];try{for(var n=0,o=e.length;n<o;n++)0===n?r.push(this._db.ref(e[n])):r.push(r[n-1].child(e[n]));return r[r.length-1]}catch(t){throw new Error(t)}},e}(r(15).BaseRepository);e.FireBaseQueryale=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(23);window.LocalStorageQueryable=n.LocalStorageQueryable}]);