sails-datastore
Version:
Datastore to user with sails
16 lines (14 loc) • 162 kB
JavaScript
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="http://localhost:8000/static",e(0)}([function(t,e,n){t.exports=n(149)},function(t,e,n){var r=n(2),o=n(37);t.exports=function(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return o(n)?e:r(function(e){return t(n,e)});default:return o(n)&&o(i)?e:o(n)?r(function(e){return t(e,i)}):o(i)?r(function(e){return t(n,e)}):t(n,i)}}}},function(t,e,n){var r=n(37);t.exports=function(t){return function e(n){return 0===arguments.length||r(n)?e:t.apply(this,arguments)}}},function(t,e,n){var r=n(2),o=n(1),i=n(37);t.exports=function(t){return function e(n,u,a){switch(arguments.length){case 0:return e;case 1:return i(n)?e:o(function(e,r){return t(n,e,r)});case 2:return i(n)&&i(u)?e:i(n)?o(function(e,n){return t(e,u,n)}):i(u)?o(function(e,r){return t(n,e,r)}):r(function(e){return t(n,u,e)});default:return i(n)&&i(u)&&i(a)?e:i(n)&&i(u)?o(function(e,n){return t(e,n,a)}):i(n)&&i(a)?o(function(e,n){return t(e,u,n)}):i(u)&&i(a)?o(function(e,r){return t(n,e,r)}):i(n)?r(function(e){return t(e,u,a)}):i(u)?r(function(e){return t(n,e,a)}):i(a)?r(function(e){return t(n,u,e)}):t(n,u,a)}}}},function(t,e,n){var r=n(16),o=n(58);t.exports=function(t,e,n){return function(){if(0===arguments.length)return n();var i=Array.prototype.slice.call(arguments,0),u=i.pop();if(!r(u)){for(var a=0;a<t.length;){if("function"==typeof u[t[a]])return u[t[a]].apply(u,i);a+=1}if(o(u)){var s=e.apply(null,i);return s(u)}}return n.apply(this,arguments)}}},function(t,e){t.exports={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}}},function(t,e,n){var r=n(13),o=n(2),i=n(1),u=n(34);t.exports=i(function(t,e){return 1===t?o(e):r(t,u(t,[],e))})},function(t,e){t.exports=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)}},function(t,e,n){var r=n(1),o=n(4),i=n(38),u=n(11),a=n(248),s=n(6),c=n(14);t.exports=r(o(["fantasy-land/map","map"],a,function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return s(e.length,function(){return t.call(this,e.apply(this,arguments))});case"[object Object]":return u(function(n,r){return n[r]=t(e[r]),n},{},c(e));default:return i(t,e)}}))},function(t,e,n){"use strict";function r(t){return"[object Array]"===S.call(t)}function o(t){return"[object ArrayBuffer]"===S.call(t)}function i(t){return"undefined"!=typeof FormData&&t instanceof FormData}function u(t){var e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function a(t){return"string"==typeof t}function s(t){return"number"==typeof t}function c(t){return"undefined"==typeof t}function f(t){return null!==t&&"object"==typeof t}function p(t){return"[object Date]"===S.call(t)}function l(t){return"[object File]"===S.call(t)}function h(t){return"[object Blob]"===S.call(t)}function d(t){return"[object Function]"===S.call(t)}function v(t){return f(t)&&d(t.pipe)}function y(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function m(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function b(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function g(t,e){if(null!==t&&"undefined"!=typeof t)if("object"==typeof t||r(t)||(t=[t]),r(t))for(var n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function x(){function t(t,n){"object"==typeof e[n]&&"object"==typeof t?e[n]=x(e[n],t):e[n]=t}for(var e={},n=0,r=arguments.length;n<r;n++)g(arguments[n],t);return e}function w(t,e,n){return g(e,function(e,r){n&&"function"==typeof e?t[r]=O(e,n):t[r]=e}),t}var O=n(72),_=n(155),S=Object.prototype.toString;t.exports={isArray:r,isArrayBuffer:o,isBuffer:_,isFormData:i,isArrayBufferView:u,isString:a,isNumber:s,isObject:f,isUndefined:c,isDate:p,isFile:l,isBlob:h,isFunction:d,isStream:v,isURLSearchParams:y,isStandardBrowserEnv:b,forEach:g,merge:x,extend:w,trim:m}},function(t,e,n){var r=n(1),o=n(223);t.exports=r(function(t,e){return o(t,e,[],[])})},function(t,e,n){var r=n(35),o=n(102),i=n(80);t.exports=function(){function t(t,e,n){for(var r=0,o=n.length;r<o;){if(e=t["@@transducer/step"](e,n[r]),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}function e(t,e,n){for(var r=n.next();!r.done;){if(e=t["@@transducer/step"](e,r.value),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function n(t,e,n,r){return t["@@transducer/result"](n[r](i(t["@@transducer/step"],t),e))}var u="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(i,a,s){if("function"==typeof i&&(i=o(i)),r(s))return t(i,a,s);if("function"==typeof s["fantasy-land/reduce"])return n(i,a,s,"fantasy-land/reduce");if(null!=s[u])return e(i,a,s[u]());if("function"==typeof s.next)return e(i,a,s);if("function"==typeof s.reduce)return n(i,a,s,"reduce");throw new TypeError("reduce: list must be array or iterable")}}()},function(t,e){t.exports=function(t,e){t=t||[],e=e||[];var n,r=t.length,o=e.length,i=[];for(n=0;n<r;)i[i.length]=t[n],n+=1;for(n=0;n<o;)i[i.length]=e[n],n+=1;return i}},function(t,e){t.exports=function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,s){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,s,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,s,c,f){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},function(t,e,n){var r=n(2),o=n(7),i=n(97);t.exports=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),e=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],n=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),u=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};return r("function"!=typeof Object.keys||n?function(r){if(Object(r)!==r)return[];var a,s,c=[],f=n&&i(r);for(a in r)!o(a,r)||f&&"length"===a||(c[c.length]=a);if(t)for(s=e.length-1;s>=0;)a=e[s],o(a,r)&&!u(c,a)&&(c[c.length]=a),s-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}()},function(t,e,n){var r=n(3),o=n(11);t.exports=r(o)},function(t,e){t.exports=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)}},function(t,e){t.exports=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}},function(t,e,n){var r=n(96);t.exports=function(t,e){return r(e,t,0)>=0}},function(t,e,n){var r=n(22),o=n(3);t.exports=o(r("slice",function(t,e,n){return Array.prototype.slice.call(n,t,e)}))},function(t,e,n){var r=n(2);t.exports=r(function(t){return function(){return t}})},function(t,e,n){var r=n(1);t.exports=r(function(t,e){return e>t?e:t})},function(t,e,n){var r=n(16);t.exports=function(t,e){return function(){var n=arguments.length;if(0===n)return e();var o=arguments[n-1];return r(o)||"function"!=typeof o[t]?e.apply(this,arguments):o[t].apply(o,Array.prototype.slice.call(arguments,0,n-1))}}},function(t,e){t.exports=function(t){return"[object String]"===Object.prototype.toString.call(t)}},function(t,e,n){var r=n(1),o=n(36),i=n(6),u=n(28);t.exports=r(function(t,e){return i(t+1,function(){var n=arguments[t];if(null!=n&&o(n[e]))return n[e].apply(n,Array.prototype.slice.call(arguments,0,t));throw new TypeError(u(n)+' does not have a method named "'+e+'"')})})},function(t,e,n){var r=n(1),o=n(23);t.exports=r(function(t,e){var n=t<0?e.length+t:t;return o(e)?e.charAt(n):e[n]})},function(t,e,n){var r=n(1);t.exports=r(function(t,e){for(var n=e,r=0;r<t.length;){if(null==n)return;n=n[t[r]],r+=1}return n})},function(t,e,n){var r=n(1),o=n(8),i=n(60);t.exports=r(function(t,e){return o(i(t),e)})},function(t,e,n){var r=n(2),o=n(235);t.exports=r(function(t){return o(t,[])})},function(t,e,n){var r=n(1);t.exports=r(function(t,e){return Number(t)+Number(e)})},function(t,e,n){var r=n(3);t.exports=r(function(t,e,n){var r={};for(var o in n)r[o]=n[o];return r[t]=e,r})},function(t,e,n){var r=n(2),o=n(6);t.exports=r(function(t){return o(t.length,t)})},function(t,e,n){var r=n(2),o=n(31);t.exports=r(function(t){return o(function(e,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=e,t.apply(this,r)})})},function(t,e){t.exports=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1}},function(t,e,n){var r=n(13),o=n(37);t.exports=function t(e,n,i){return function(){for(var u=[],a=0,s=e,c=0;c<n.length||a<arguments.length;){var f;c<n.length&&(!o(n[c])||a>=arguments.length)?f=n[c]:(f=arguments[a],a+=1),u[c]=f,o(f)||(s-=1),c+=1}return s<=0?i.apply(this,u):r(s,t(e,u,i))}}},function(t,e,n){var r=n(2),o=n(16),i=n(23);t.exports=r(function(t){return!!o(t)||!!t&&("object"==typeof t&&(!i(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))})},function(t,e){t.exports=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0}},function(t,e){t.exports=function(t,e){for(var n=0,r=e.length,o=Array(r);n<r;)o[n]=t(e[n]),n+=1;return o}},function(t,e,n){var r=n(1),o=n(8);t.exports=r(function(t,e){return function(n){return function(r){return o(function(t){return e(t,r)},n(t(r)))}}})},function(t,e,n){var r=n(2),o=n(108);t.exports=r(function(t){return o(t.length,t)})},function(t,e,n){var r=n(3),o=n(57),i=n(59);t.exports=r(function t(e,n,r){return i(function(n,r,i){return o(r)&&o(i)?t(e,r,i):e(n,r,i)},n,r)})},function(t,e,n){var r=n(1);t.exports=r(function(t,e){switch(t){case 0:return function(){return e.call(this)};case 1:return function(t){return e.call(this,t)};case 2:return function(t,n){return e.call(this,t,n)};case 3:return function(t,n,r){return e.call(this,t,n,r)};case 4:return function(t,n,r,o){return e.call(this,t,n,r,o)};case 5:return function(t,n,r,o,i){return e.call(this,t,n,r,o,i)};case 6:return function(t,n,r,o,i,u){return e.call(this,t,n,r,o,i,u)};case 7:return function(t,n,r,o,i,u,a){return e.call(this,t,n,r,o,i,u,a)};case 8:return function(t,n,r,o,i,u,a,s){return e.call(this,t,n,r,o,i,u,a,s)};case 9:return function(t,n,r,o,i,u,a,s,c){return e.call(this,t,n,r,o,i,u,a,s,c)};case 10:return function(t,n,r,o,i,u,a,s,c,f){return e.call(this,t,n,r,o,i,u,a,s,c,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}})},function(t,e,n){var r=n(34),o=n(4),i=n(7),u=n(11),a=n(249);t.exports=r(4,[],o([],a,function(t,e,n,r){return u(function(r,o){var u=n(o);return r[u]=t(i(u,r)?r[u]:e,o),r},{},r)}))},function(t,e,n){var r=n(94),o=n(1),i=n(51);t.exports=o(function(t,e){return i(r(t),e)})},function(t,e,n){var r=n(2),o=n(23);t.exports=r(function(t){return o(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()})},function(t,e,n){(function(e){"use strict";function r(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function o(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(68):"undefined"!=typeof e&&(t=n(68)),t}var i=n(9),u=n(145),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:o(),transformRequest:[function(t,e){return u(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(r(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, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s}).call(e,n(157))},function(t,e,n){var r=n(12),o=n(1),i=n(11),u=n(8);t.exports=o(function(t,e){return"function"==typeof e["fantasy-land/ap"]?e["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(e):"function"==typeof t?function(n){return t(n)(e(n))}:i(function(t,n){return r(t,u(n,e))},[],t)})},function(t,e,n){var r=n(1),o=n(4),i=n(99),u=n(238),a=n(8);t.exports=r(o(["fantasy-land/chain","chain"],u,function(t,e){return"function"==typeof e?function(n){return t(e(n))(n)}:i(!1)(a(t,e))}))},function(t,e,n){var r=n(117),o=n(45);t.exports=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return r.apply(this,o(arguments))}},function(t,e,n){var r=n(1),o=n(16),i=n(36),u=n(23),a=n(28);t.exports=r(function(t,e){if(o(t)){if(o(e))return t.concat(e);throw new TypeError(a(e)+" is not an array")}if(u(t)){if(u(e))return t+e;throw new TypeError(a(e)+" is not a string")}if(null!=t&&i(t["fantasy-land/concat"]))return t["fantasy-land/concat"](e);if(null!=t&&i(t.concat))return t.concat(e);throw new TypeError(a(t)+' does not have a method named "concat" or "fantasy-land/concat"')})},function(t,e,n){var r=n(1),o=n(4),i=n(54),u=n(57),a=n(11),s=n(243),c=n(14);t.exports=r(o(["filter"],s,function(t,e){return u(e)?a(function(n,r){return t(e[r])&&(n[r]=e[r]),n},{},c(e)):i(t,e)}))},function(t,e,n){var r=n(2),o=n(55);t.exports=r(o)},function(t,e,n){var r=n(228);t.exports="function"==typeof Object.assign?Object.assign:r},function(t,e){t.exports=function(t,e){for(var n=0,r=e.length,o=[];n<r;)t(e[n])&&(o[o.length]=e[n]),n+=1;return o}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=Number.isInteger||function(t){return t<<0===t}},function(t,e){t.exports=function(t){return"[object Object]"===Object.prototype.toString.call(t)}},function(t,e){t.exports=function(t){return"function"==typeof t["@@transducer/step"]}},function(t,e,n){var r=n(3),o=n(7);t.exports=r(function(t,e,n){var r,i={};for(r in e)o(r,e)&&(i[r]=o(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)o(r,n)&&!o(r,i)&&(i[r]=n[r]);return i})},function(t,e,n){var r=n(1);t.exports=r(function(t,e){return e[t]})},function(t,e,n){var r=n(22),o=n(2),i=n(19);t.exports=o(r("tail",i(1,1/0)))},function(t,e,n){var r=n(1),o=n(4),i=n(250),u=n(19);t.exports=r(o(["take"],i,function(t,e){return u(0,t<0?1/0:t,e)}))},function(t,e,n){var r=n(2);t.exports=r(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)})},function(t,e,n){var r=n(52),o=n(126);t.exports=o(r)},function(t,e,n){var r=n(33),o=n(1);t.exports=o(function(t,e){for(var n,o=0,i=e.length,u=[];o<i;)n=e[o],r(t,n,u)||(u[u.length]=n),o+=1;return u})},function(t,e,n){var r=n(3),o=n(75),i=n(20);t.exports=r(function(t,e,n){return o(i(e),t,n)})},function(t,e,n){t.exports=n(131)},function(t,e,n){"use strict";var r=n(9),o=n(137),i=n(140),u=n(146),a=n(144),s=n(71),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(139);t.exports=function(t){return new Promise(function(e,f){var p=t.data,l=t.headers;r.isFormData(p)&&delete l["Content-Type"];var h=new XMLHttpRequest,d="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||a(t.url)||(h=new window.XDomainRequest,d="onload",v=!0,h.onprogress=function(){},h.ontimeout=function(){}),t.auth){var y=t.auth.username||"",m=t.auth.password||"";l.Authorization="Basic "+c(y+":"+m)}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||v)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?h.response:h.responseText,i={data:r,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:t,request:h};o(e,f,i),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},r.isStandardBrowserEnv()){var b=n(142),g=(t.withCredentials||a(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;g&&(l[t.xsrfHeaderName]=g)}if("setRequestHeader"in h&&r.forEach(l,function(t,e){"undefined"==typeof p&&"content-type"===e.toLowerCase()?delete l[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===p&&(p=null),h.send(p)})}},function(t,e){"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){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(136);t.exports=function(t,e,n,o,i){var u=new Error(t);return r(u,e,n,o,i)}},function(t,e){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,n,r,o){var i={};return Object.keys(r).forEach(function(t){i[t]=r[t]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(t,e,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s,c,f,p,l,h,d,v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=n(74),m=(n(130),n(158)),b=r(m),g=n(67),x=r(g),w=(s=y.observable.shallow,c=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(u(this,t),this.endpoint=null,i(this,"primaryKey",f,this),i(this,"isDeleted",p,this),i(this,"originalValues",l,this),i(this,"fields",h,this),i(this,"isLoading",d,this),this.eventListeners=[],!e)throw"Kamu harus menentukan endpoint dari object ini";this.endpoint=e,n&&((0,y.extendObservable)(this,n),this.originalValues=Object.assign({},n),this.fields=Object.keys(n)),r&&r.primaryKey&&(this.primaryKey=r.primaryKey,this.endpoint=r.host+"/"+e)}return v(t,[{key:"save",value:function(){if(this.isDeleted)throw"The model sudah dihapus oleh eksternal faktor";console.log(this.primaryKeyValue,"pm value"),this.primaryKeyValue?this._update():this._create()}},{key:"delete",value:function(){console.log("REMOVEING OBJECT WITH ID",this.primaryKeyValue),this.isDeleted=!0,this._delete()}},{key:"setValue",value:function(t,e){this[t]?this[t]=e:((0,y.extendObservable)(this,o({},t,e)),this.fields.push(t))}},{key:"reset",value:function(){(0,y.extendObservable)(this,(0,y.toJS)(this.originalValues))}},{key:"_update",value:function(){var t=this;return this.isLoading=!0,x.default.put(this.endpoint+"/"+this.primaryKeyValue,this.currentValues).then(function(e){var n=e.data;t._populateFromServer(n),t.isLoading=!1,t.trigger("update")})}},{key:"_create",value:function(){var t=this;return this.isLoading=!0,x.default.post(this.endpoint,this.currentValues).then(function(e){var n=e.data;t._populateFromServer(n),t.isLoading=!1,t.trigger("create")})}},{key:"_populateFromServer",value:function(t){for(var e in t)this[e]=t[e];this.originalValues=t}},{key:"_delete",value:function(){var t=this;return this.isNew?void this.trigger("delete"):(this.isLoading=!0,x.default.delete(this.endpoint+"/"+this.primaryKeyValue).then(function(e){e.data;t.isLoading=!1,t.isDeleted=!0,t.trigger("delete")}))}},{key:"listen",value:function(t,e){this.eventListeners.push({event:t,callback:e})}},{key:"trigger",value:function(t){this.eventListeners.filter(function(e){return e.event==t}).forEach(function(t){return t.callback()})}},{key:"primaryKeyValue",get:function(){return this[this.primaryKey]}},{key:"isNew",get:function(){return!this.primaryKeyValue}},{key:"isModified",get:function(){return!b.default.equals((0,y.toJS)(this.originalValues),(0,y.toJS)(this.currentValues))}},{key:"currentValues",get:function(){var t=this,e={};return this.fields.forEach(function(n){return e[n]=t[n]}),e}}]),t}(),f=a(c.prototype,"primaryKey",[y.observable],{enumerable:!0,initializer:function(){return"id"}}),a(c.prototype,"primaryKeyValue",[y.computed],Object.getOwnPropertyDescriptor(c.prototype,"primaryKeyValue"),c.prototype),a(c.prototype,"isNew",[y.computed],Object.getOwnPropertyDescriptor(c.prototype,"isNew"),c.prototype),a(c.prototype,"isModified",[y.computed],Object.getOwnPropertyDescriptor(c.prototype,"isModified"),c.prototype),p=a(c.prototype,"isDeleted",[y.observable],{enumerable:!0,initializer:function(){return!1}}),l=a(c.prototype,"originalValues",[s],{enumerable:!0,initializer:function(){return null}}),h=a(c.prototype,"fields",[y.observable],{enumerable:!0,initializer:function(){return[]}}),a(c.prototype,"currentValues",[y.computed],Object.getOwnPropertyDescriptor(c.prototype,"currentValues"),c.prototype),d=a(c.prototype,"isLoading",[y.observable],{enumerable:!0,initializer:function(){return!1}}),c);e.default=w;var O=new w("pengajuan",{pemohon:"199107312013101001"},{host:"http://localhost:1337",primaryKey:"id"});O.setValue("keperluan","Keperluan saya adalah testing"),setInterval(function(){},3e3);(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(w,"DataModel","/Users/azamuddin/Development/prototype/data-manager/src/data-manager/DataModel.js"),__REACT_HOT_LOADER__.register(O,"model","/Users/azamuddin/Development/prototype/data-manager/src/data-manager/DataModel.js"))})()},function(t,e){(function(t){"use strict";function n(t,e){function n(){this.constructor=t}He(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function r(t){return t.interceptors&&t.interceptors.length>0}function o(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),St(function(){var t=n.indexOf(e);t!==-1&&n.splice(t,1)})}function i(t,e){var n=he();try{var r=t.interceptors;if(r)for(var o=0,i=r.length;o<i&&(e=r[o](e),Ot(!e||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{de(n)}}function u(t){return t.changeListeners&&t.changeListeners.length>0}function a(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),St(function(){var t=n.indexOf(e);t!==-1&&n.splice(t,1)})}function s(t,e){var n=he(),r=t.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)r[o](e);de(n)}}function c(){return!!Mn.spyListeners.length}function f(t){if(Mn.spyListeners.length)for(var e=Mn.spyListeners,n=0,r=e.length;n<r;n++)e[n](t)}function p(t){var e=Tt({},t,{spyReportStart:!0});f(e)}function l(t){f(t?Tt({},t,Ye):Ye)}function h(t){return Mn.spyListeners.push(t),St(function(){var e=Mn.spyListeners.indexOf(t);e!==-1&&Mn.spyListeners.splice(e,1)})}function d(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function v(t){Ot(t[Qe]!==!0,"Illegal state: cannot recycle array as iterator"),It(t,Qe,!0);var e=-1;return It(t,"next",function(){return e++,{done:e>=this.length,value:e<this.length?this[e]:void 0}}),t}function y(t,e){It(t,d(),e)}function m(t,e){"undefined"!=typeof Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):"undefined"!=typeof t.prototype.__proto__?t.prototype.__proto__=e:t.prototype=e}function b(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function g(t){Object.defineProperty(on.prototype,""+t,b(t))}function x(t){for(var e=en;e<t;e++)g(e);en=t}function w(t){return Et(t)&&an(t.$mobx)}function O(t){return pn[t]}function _(t,e){Ot("function"==typeof e,O("m026")),Ot("string"==typeof t&&t.length>0,"actions should have valid names, got: '"+t+"'");var n=function(){return S(t,e,this,arguments)};return n.originalFn=e,n.isMobxAction=!0,n}function S(t,e,n,r){var o=j(t,e,n,r);try{return e.apply(n,r)}finally{A(o)}}function j(t,e,n,r){var o=c()&&!!t,i=0;if(o){i=Date.now();var u=r&&r.length||0,a=new Array(u);if(u>0)for(var s=0;s<u;s++)a[s]=r[s];p({type:"action",name:t,fn:e,object:n,arguments:a})}var f=he();Zt();var l=P(!0);return{prevDerivation:f,prevAllowStateChanges:l,notifySpy:o,startTime:i}}function A(t){D(t.prevAllowStateChanges),te(),de(t.prevDerivation),t.notifySpy&&l({time:Date.now()-t.startTime})}function E(t){Ot(null===Mn.trackingDerivation,O("m028")),Mn.strictMode=t,Mn.allowStateChanges=!t}function k(){return Mn.strictMode}function T(t,e){var n,r=P(t);try{n=e()}finally{D(r)}return n}function P(t){var e=Mn.allowStateChanges;return Mn.allowStateChanges=t,e}function D(t){Mn.allowStateChanges=t}function C(t,e,n,r,o){function i(i,u,a,s,c){if(void 0===c&&(c=0),Ot(o||V(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),a){Pt(i,"__mobxLazyInitializers")||Ct(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var f=a.value,p=a.initializer;return i.__mobxLazyInitializers.push(function(e){t(e,u,p?p.call(e):f,s,a)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&R(this),e.call(this,u)},set:function(t){this.__mobxDidRunLazyInitializers!==!0&&R(this),n.call(this,u,t)}}}var l={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[u]===!0||I(this,u,void 0,t,s,a),e.call(this,u)},set:function(e){this.__mobxInitializedProps&&this.__mobxInitializedProps[u]===!0?n.call(this,u,e):I(this,u,e,t,s,a)}};return(arguments.length<3||5===arguments.length&&c<3)&&Object.defineProperty(i,u,l),l}return o?function(){if(V(arguments))return i.apply(null,arguments);var t=arguments,e=arguments.length;return function(n,r,o){return i(n,r,o,t,e)}}:i}function I(t,e,n,r,o,i){Pt(t,"__mobxInitializedProps")||Ct(t,"__mobxInitializedProps",{}),t.__mobxInitializedProps[e]=!0,r(t,e,n,o,i)}function R(t){t.__mobxDidRunLazyInitializers!==!0&&t.__mobxLazyInitializers&&(Ct(t,"__mobxDidRunLazyInitializers",!0),t.__mobxDidRunLazyInitializers&&t.__mobxLazyInitializers.forEach(function(e){return e(t)}))}function V(t){return(2===t.length||3===t.length)&&"string"==typeof t[1]}function L(t){return function(e,n,r){if(r&&"function"==typeof r.value)return r.value=_(t,r.value),r.enumerable=!1,r.configurable=!0,r;if(void 0!==r&&void 0!==r.get)throw new Error("[mobx] action is not expected to be used with getters");return ln(t).apply(this,arguments)}}function N(t,e,n){var r="string"==typeof t?t:t.name||"<unnamed action>",o="function"==typeof t?t:e,i="function"==typeof t?e:n;return Ot("function"==typeof o,O("m002")),Ot(0===o.length,O("m003")),Ot("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),S(r,o,i,void 0)}function M(t){return"function"==typeof t&&t.isMobxAction===!0}function B(t,e,n){var r=function(){return S(e,n,t,arguments)};r.isMobxAction=!0,Ct(t,e,r)}function U(t,e){return t===e}function z(t,e){return!("number"!=typeof t||"number"!=typeof e||!isNaN(t)||!isNaN(e))||Nt(t,e)}function q(t,e){return!("number"!=typeof t||"number"!=typeof e||!isNaN(t)||!isNaN(e))||U(t,e)}function $(t,e,n){function r(){i(a)}var o,i,u;"string"==typeof t?(o=t,i=e,u=n):(o=t.name||"Autorun@"+xt(),i=t,u=e),Ot("function"==typeof i,O("m004")),Ot(M(i)===!1,O("m005")),u&&(i=i.bind(u));var a=new Wn(o,function(){this.track(r)});return a.schedule(),a.getDisposer()}function W(t,e,n,r){var o,i,u,a;"string"==typeof t?(o=t,i=e,u=n,a=r):(o="When@"+xt(),i=t,u=e,a=n);var s=$(o,function(t){if(i.call(a)){t.dispose();var e=he();u.call(a),de(e)}});return s}function F(t,e,n,r){function o(){u(f)}var i,u,a,s;"string"==typeof t?(i=t,u=e,a=n,s=r):(i=t.name||"AutorunAsync@"+xt(),u=t,a=e,s=n),Ot(M(u)===!1,O("m006")),void 0===a&&(a=1),s&&(u=u.bind(s));var c=!1,f=new Wn(i,function(){c||(c=!0,setTimeout(function(){c=!1,f.isDisposed||f.track(o)},a))});return f.schedule(),f.getDisposer()}function K(t,e,n){function r(){if(!c.isDisposed){var n=!1;c.track(function(){var e=t(c);n=u||!s(i,e),i=e}),u&&o.fireImmediately&&e(i,c),u||n!==!0||e(i,c),u&&(u=!1)}}arguments.length>3&&wt(O("m007")),ft(t)&&wt(O("m008"));var o;o="object"==typeof n?n:{},o.name=o.name||t.name||e.name||"Reaction@"+xt(),o.fireImmediately=n===!0||o.fireImmediately===!0,o.delay=o.delay||0,o.compareStructural=o.compareStructural||o.struct||!1,e=dn(o.name,o.context?e.bind(o.context):e),o.context&&(t=t.bind(o.context));var i,u=!0,a=!1,s=o.equals?o.equals:o.compareStructural||o.struct?vn.structural:vn.default,c=new Wn(o.name,function(){u||o.delay<1?r():a||(a=!0,setTimeout(function(){a=!1,r()},o.delay))});return c.schedule(),c.getDisposer()}function H(t,e){if(nt(t)&&t.hasOwnProperty("$mobx"))return t.$mobx;Ot(Object.isExtensible(t),O("m035")),kt(t)||(e=(t.constructor.name||"ObservableObject")+"@"+xt()),e||(e="ObservableObject@"+xt());var n=new bn(t,e);return It(t,"$mobx",n),n}function G(t,e,n,r){if(t.values[e]&&!mn(t.values[e]))return Ot("value"in n,"The property "+e+" in "+t.name+" is already observable, cannot redefine it as computed property"),void(t.target[e]=n.value);if("value"in n)if(ft(n.value)){var o=n.value;J(t,e,o.initialValue,o.enhancer)}else M(n.value)&&n.value.autoBind===!0?B(t.target,e,n.value.originalFn):mn(n.value)?Y(t,e,n.value):J(t,e,n.value,r);else X(t,e,n.get,n.set,vn.default,!0)}function J(t,e,n,o){if(Vt(t.target,e),r(t)){var u=i(t,{object:t.target,name:e,type:"add",newValue:n});if(!u)return;n=u.newValue}var a=t.values[e]=new cn(n,o,t.name+"."+e,!1);n=a.value,Object.defineProperty(t.target,e,Q(e)),et(t,t.target,e,n)}function X(t,e,n,r,o,i){i&&Vt(t.target,e),t.values[e]=new yn(n,t.target,o,t.name+"."+e,r),i&&Object.defineProperty(t.target,e,Z(e))}function Y(t,e,n){var r=t.name+"."+e;n.name=r,n.scope||(n.scope=t.target),t.values[e]=n,Object.defineProperty(t.target,e,Z(e))}function Q(t){return gn[t]||(gn[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[t].get()},set:function(e){tt(this,t,e)}})}function Z(t){return xn[t]||(xn[t]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[t].get()},set:function(e){return this.$mobx.values[t].set(e)}})}function tt(t,e,n){var o=t.$mobx,a=o.values[e];if(r(o)){var f=i(o,{type:"update",object:t,name:e,newValue:n});if(!f)return;n=f.newValue;
}if(n=a.prepareNewValue(n),n!==sn){var h=u(o),d=c(),f=h||d?{type:"update",object:t,oldValue:a.value,name:e,newValue:n}:null;d&&p(f),a.setNewValue(n),h&&s(o,f),d&&l()}}function et(t,e,n,r){var o=u(t),i=c(),a=o||i?{type:"add",object:e,name:n,newValue:r}:null;i&&p(a),o&&s(t,a),i&&l()}function nt(t){return!!Et(t)&&(R(t),wn(t.$mobx))}function rt(t,e){if(null===t||void 0===t)return!1;if(void 0!==e){if(w(t)||Dn(t))throw new Error(O("m019"));if(nt(t)){var n=t.$mobx;return n.values&&!!n.values[e]}return!1}return nt(t)||!!t.$mobx||Xe(t)||Hn(t)||mn(t)}function ot(t){return Ot(!!t,":("),C(function(e,n,r,o,i){Vt(e,n),Ot(!i||!i.get,O("m022"));var u=H(e,void 0);J(u,n,r,t)},function(t){var e=this.$mobx.values[t];if(void 0!==e)return e.get()},function(t,e){tt(this,t,e)},!0,!1)}function it(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return at(t,lt,e)}function ut(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return at(t,dt,e)}function at(t,e,n){Ot(arguments.length>=2,O("m014")),Ot("object"==typeof t,O("m015")),Ot(!Dn(t),O("m016")),n.forEach(function(t){Ot("object"==typeof t,O("m017")),Ot(!rt(t),O("m018"))});for(var r=H(t),o={},i=n.length-1;i>=0;i--){var u=n[i];for(var a in u)if(o[a]!==!0&&Pt(u,a)){if(o[a]=!0,t===u&&!Rt(t,a))continue;var s=Object.getOwnPropertyDescriptor(u,a);G(r,a,s,e)}}return t}function st(t){if(void 0===t&&(t=void 0),"string"==typeof arguments[1])return On.apply(null,arguments);if(Ot(arguments.length<=1,O("m021")),Ot(!ft(t),O("m020")),rt(t))return t;var e=lt(t,void 0,void 0);return e!==t?e:kn.box(t)}function ct(t){wt("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}function ft(t){return"object"==typeof t&&null!==t&&t.isMobxModifierDescriptor===!0}function pt(t,e){return Ot(!ft(e),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:e,enhancer:t}}function lt(t,e,n){return ft(t)&&wt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),rt(t)?t:Array.isArray(t)?kn.array(t,n):kt(t)?kn.object(t,n):zt(t)?kn.map(t,n):t}function ht(t,e,n){return ft(t)&&wt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),void 0===t||null===t?t:nt(t)||w(t)||Dn(t)?t:Array.isArray(t)?kn.shallowArray(t,n):kt(t)?kn.shallowObject(t,n):zt(t)?kn.shallowMap(t,n):wt("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function dt(t){return t}function vt(t,e,n){if(Nt(t,e))return e;if(rt(t))return t;if(Array.isArray(t))return new on(t,vt,n);if(zt(t))return new Pn(t,vt,n);if(kt(t)){var r={};return H(r,n),at(r,vt,[t]),r}return t}function yt(t,e,n){return Nt(t,e)?e:t}function mt(t,e){void 0===e&&(e=void 0),Zt();try{return t.apply(e)}finally{te()}}function bt(t){return _t("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),kn.map(t)}function gt(){return"undefined"!=typeof window?window:t}function xt(){return++Mn.mobxGuid}function wt(t,e){throw Ot(!1,t,e),"X"}function Ot(t,e,n){if(!t)throw new Error("[mobx] Invariant failed: "+e+(n?" in '"+n+"'":""))}function _t(t){return In.indexOf(t)===-1&&(In.push(t),console.error("[mobx] Deprecated: "+t),!0)}function St(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}function jt(t){var e=[];return t.forEach(function(t){e.indexOf(t)===-1&&e.push(t)}),e}function At(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function Et(t){return null!==t&&"object"==typeof t}function kt(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function Tt(){for(var t=arguments[0],e=1,n=arguments.length;e<n;e++){var r=arguments[e];for(var o in r)Pt(r,o)&&(t[o]=r[o])}return t}function Pt(t,e){return Vn.call(t,e)}function Dt(t,e){for(var n=0;n<e.length;n++)Ct(t,e[n],t[e[n]])}function Ct(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function It(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Rt(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!n||n.configurable!==!1&&n.writable!==!1}function Vt(t,e){Ot(Rt(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Lt(t){var e=[];for(var n in t)e.push(n);return e}function Nt(t,e){if(null===t&&null===e)return!0;if(void 0===t&&void 0===e)return!0;if("object"!=typeof t)return t===e;var n=Bt(t),r=Ut(t);if(n!==Bt(e))return!1;if(r!==Ut(e))return!1;if(n){if(t.length!==e.length)return!1;for(var o=t.length-1;o>=0;o--)if(!Nt(t[o],e[o]))return!1;return!0}if(r){if(t.size!==e.size)return!1;var i=!0;return t.forEach(function(t,n){i=i&&Nt(e.get(n),t)}),i}if("object"==typeof t&&"object"==typeof e){if(null===t||null===e)return!1;if(Ut(t)&&Ut(e))return t.size===e.size&&Nt(kn.shallowMap(t).entries(),kn.shallowMap(e).entries());if(Lt(t).length!==Lt(e).length)return!1;for(var u in t){if(!(u in e))return!1;if(!Nt(t[u],e[u]))return!1}return!0}return!1}function Mt(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return Et(t)&&t[n]===!0}}function Bt(t){return Array.isArray(t)||w(t)}function Ut(t){return zt(t)||Dn(t)}function zt(t){return void 0!==gt().Map&&t instanceof gt().Map}function qt(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function $t(t){return null===t?null:"object"==typeof t?""+t:t}function Wt(){Un=!0,gt().__mobxInstanceCount--}function Ft(){_t("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),Bn=!0;var t=gt(),e=Mn;if(t.__mobservableTrackingStack||t.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(t.__mobxGlobal&&t.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");t.__mobxGlobal?Mn=t.__mobxGlobal:t.__mobxGlobal=e}function Kt(){return Mn}function Ht(){Mn.resetId++;var t=new Nn;for(var e in t)Ln.indexOf(e)===-1&&(Mn[e]=t[e]);Mn.allowStateChanges=!Mn.strictMode}function Gt(t){return t.observers&&t.observers.length>0}function Jt(t){return t.observers}function Xt(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Yt(t,e){if(1===t.observers.length)t.observers.length=0,Qt(t);else{var n=t.observers,r=t.observersIndexes,o=n.pop();if(o!==e){var i=r[e.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[e.__mapid]}}function Qt(t){t.isPendingUnobservation||(t.isPendingUnobservation=!0,Mn.pendingUnobservations.push(t))}function Zt(){Mn.inBatch++}function te(){if(0===--Mn.inBatch){be();for(var t=Mn.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}Mn.pendingUnobservations=[]}}function ee(t){var e=Mn.trackingDerivation;null!==e?e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t):0===t.observers.length&&Qt(t)}function ne(t){if(t.lowestObserverState!==e.IDerivationState.STALE){t.lowestObserverState=e.IDerivationState.STALE;for(var n=t.observers,r=n.length;r--;){var o=n[r];o.dependenciesState===e.IDerivationState.UP_TO_DATE&&o.onBecomeStale(),o.dependenciesState=e.IDerivationState.STALE}}}function re(t){if(t.lowestObserverState!==e.IDerivationState.STALE){t.lowestObserverState=e.IDerivationState.STALE;for(var n=t.observers,r=n.length;r--;){var o=n[r];o.dependenciesState===e.IDerivationState.POSSIBLY_STALE?o.dependenciesState=e.IDerivationState.STALE:o.dependenciesState===e.IDerivationState.UP_TO_DATE&&(t.lowestObserverState=e.IDerivationState.UP_TO_DATE)}}}function oe(t){if(t.lowestObserverState===e.IDerivationState.UP_TO_DATE){t.lowestObserverState=e.IDerivationState.POSSIBLY_STALE;for(var n=t.observers,r=n.length;r--;){var o=n[r];o.dependenciesState===e.IDerivationState.UP_TO_DATE&&(o.dependenciesState=e.IDerivationState.POSSIBLY_STALE,o.onBecomeStale())}}}function ie(t){return t instanceof $n}function ue(t){switch(t.dependenciesState){case e.IDerivationState.UP_TO_DATE:return!1;case e.IDerivationState.NOT_TRACKING:case e.IDerivationState.STALE:return!0;case e.IDerivationState.POSSIBLY_STALE:for(var n=he(),r=t.observing,o=r.length,i=0;i<o;i++){var u=r[i];if(mn(u)){try{u.get()}catch(t){return de(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return de(n),!0}}return ve(t),de(n),!1}}function ae(){return null!==Mn.trackingDerivation}function se(t){var e=t.observers.length>0;Mn.computationDepth>0&&e&&wt(O("m031")+t.name),!Mn.allowStateChanges&&e&&wt(O(Mn.strictMode?"m030a":"m030b")+t.name)}function ce(t,e,n){ve(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Mn.runId;var r=Mn.trackingDerivation;Mn.trackingDerivation=t;var o;try{o=e.call(n)}catch(t){o=new $n(t)}return Mn.trackingDerivation=r,fe(t),o}function fe(t){for(var n=t.observing,r=t.observing=t.newObserving,o=e.IDerivationState.UP_TO_DATE,i=0,u=t.unboundDepsCount,a=0;a<u;a++){var s=r[a];0===s.diffValue&&(s.diffValue=1,i!==a&&(r[i]=s),i++),s.dependenciesState>o&&(o=s.dependenciesState)}for(r.length=i,t.newObserving=null,u=n.length;u--;){var s=n[u];0===s.diffValue&&Yt(s,t),s.diffValue=0}for(;i--;){var s=r[i];1===s.diffValue&&(s.diffValue=0,Xt(s,t))}o!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=o,t.onBecomeStale())}function pe(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)Yt(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function le(t){var e=he(),n=t();return de(e),n}function he(){var t=Mn.trackingDerivation;return Mn.trackingDerivation=null,t}function de(t){Mn.trackingDerivation=t}function ve(t){if(t.dependenciesState!==e.IDerivationState.UP_TO_DATE){t.dependenciesState=e.IDerivationState.UP_TO_DATE;for(var n=t.observing,r=n.length;r--;)n[r].lowestObserverState=e.IDerivationState.UP_TO_DATE}}function ye(t){Ot(this&&this.$mobx&&Hn(this.$mobx),"Invalid `this`"),Ot(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=t}function me(t){return Mn.globalReactionErrorHandlers.push(t),function(){var e=Mn.globalReactionErrorHandlers.indexOf(t);e>=0&&Mn.globalReactionErrorHandlers.splice(e,1)}}function be(){Mn.inBatch>0||Mn.isRunningReactions||Kn(ge)}function ge(){Mn.isRunningReactions=!0;for(var t=Mn.pendingReactions,e=0;t.length>0;){++e===Fn&&(console.error("Reaction doesn't converge to a stable state after "+Fn+" iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}Mn.isRunningReactions=!1}function xe(t){var e=Kn;Kn=function(n){return t(function(){return e(n)})}}function we(t){return _t("asReference is deprecated, use observable.ref instead"),kn.ref(t)}function Oe(t){return _t("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),kn.struct(t)}function _e(t){return _t("asFlat is deprecated, use observable.shallow instead"),kn.shallow(t)}function Se(t){return _t("asMap is deprecated, use observable.map or observable.shallowMap instead"),kn.map(t||{})}function je(t){return C(function(e,n,r,o,i){Ot("undefined"!=typeof i,O("m009")),Ot("function"==typeof i.get,O("m010"));var u=H(e,"");X(u,n,i.get,i.set,t,!1)},function(t){var e=this.$mobx.values[t];if(void 0!==e)return e.get()},function(t,e){this.$mobx.values[t].set(e)},!1,!1)}function Ae(t,e){if("object"==typeof t&&null!==t){if(w(t))return Ot(void 0===e,O("m036")),t.$mobx.atom;if(Dn(t)){var n=t;if(void 0===e)return Ae(n._keys);var r=n._data[e]||n._hasMap[e];return Ot(!!r,"the entry '"+e+"' does not exist in the observable map '"+ke(t)+"'"),r}if(R(t),e&&!t.$mobx&&t[e],nt(t)){if(!e)return wt("please specify a property");var r=t.$mobx.values[e];return Ot(!!r,"no observable property '"+e+"' found on the observable object '"+ke(t)+"'"),r}if(Xe(t)||mn(t)||Hn(t))return t}else if("function"==typeof t&&Hn(t.$mobx))return t.$mobx;return wt("Cannot obtain atom from "+t)}function Ee(t,e){return Ot(t,"Expecting some object"),void 0!==e?Ee(Ae(t,e)):Xe(t)||mn(t)||Hn(t)?t:Dn(t)?t:(R(t),t.$mobx?t.$mobx:void Ot(!1,"Cannot obtain administration from "+t))}function ke(t,e){var n;return n=void 0!==e?Ae(t,e):nt(t)||Dn(t)?Ee(t):Ae(t),n.name}function Te(t,e){if(null===t||void 0===t)return!1;if(void 0!==e){if(nt(t)===!1)return!1;if(!t.$mobx.values[e])return!1;var n=Ae(t,e);return mn(n)}return mn(t)}function Pe(t,e,n,r){return"function"==typeof n?Ce(t,e,n,r):De(t,e,n)}function De(t,e,n){return Ee(t).observe(e,n)}function Ce(t,e,n,r){return Ee(t,e).observe(n,r)}function Ie(t,e,n){return"function"==typeof n?Ve(t,e,n):Re(t,e)}function Re(t,e){return Ee(t).intercept(e)}function Ve(t,e,n){return Ee(t,e).intercept(n)}function Le(t,e){return ae()||console.warn(O("m013")),Xn(t,{context:e}).get()}function Ne(t,e,n){function r(r){return e&&n.push([t,r]),r}if(void 0===e&&(e=!0),void 0===n&&(n=[]),rt(t)){if(e&&null===n&&(n=[]),e&&null!==t&&"object"==typeof t)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===t)return n[o][1];if(w(t)){var u=r([]),a=t.map(function(t){return Ne(t,e,n)});u.length=a.length;for(var o=0,i=a.length;o<i;o++)u[o]=a[o];return u}if(nt(t)){var u=r({});for(var s in t)u[s]=Ne(t[s],e,n);return u}if(Dn(t)){var c=r({});return t.forEach(function(t,r){return c[r]=Ne(t,e,n)}),c}if(fn(t))return Ne(t.get(),e,n)}return t}function Me(t,e){Ot("function"==typeof t&&t.length<2,"createTransformer expects a function that accepts one argument");var r={},o=Mn.resetId,i=function(o){function i(e,n){var r=o.call(this,function(){return t(n)},void 0,vn.default,"Transformer-"+t.name+"-"+e,void 0)||this;return r.sourceIdentifier=e,r.sourceObject=n,r}return n(i,o),i.prototype.onBecomeUnobserved=function(){var t=this.value;o.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],e&&e(t,this.sourceObject)},i}(yn);return function(t){o!==Mn.resetId&&(r={},o=Mn.resetId);var e=Be(t),n=r[e];return n?n.get():(n=r[e]=new i(e,t),n.get())}}function Be(t){if("string"==typeof t||"number"==typeof t)return t;if(null===t||"object"!=typeof t)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+t);var e=t.$transformId;return void 0===e&&(e=xt(),Ct(t,"$transformId",e)),e}function Ue(t){return console.log(t),t}function ze(t,e){switch(arguments.length){case 0:if(t=Mn.trackingDerivation,!t)return Ue(O("m024"));break;case 2:t=Ae(t,e)}return t=Ae(t),mn(t)?Ue(t.whyRun()):Hn(t)?Ue(t.whyRun()):wt(O("m025"))}function qe(t,e){return $e(Ae(t,e))}function $e(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=jt(t.observing).map($e)),e}function We(t,e){return Fe(Ae(t,e))}function Fe(t){var e={name:t.name};return Gt(t)&&(e.observers=Jt(t).map(Fe)),e}function Ke(t,e,n){var r;if(Dn(t)||w(t)||fn(t))r=Ee(t);else{if(!nt(t))return wt("Expected observable map, object or array as first array");if("string"!=typeof e)return wt("InterceptReads can only be used with a specific property, not with an object in general");r=Ee(t,e)}return void 0!==r.dehancer?wt("An intercept reader was already established"):(r.dehancer="function"==typeof e?e:n,function(){r.dehancer=void 0})}Object.defineProperty(e,"__esModule",{value:!0});/*! *****************************************************************************
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://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 He=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},Ge=function(){function t(t){void 0===t&&(t="Atom@"+xt()),this.name=t,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.reportObserved=function(){ee(this)},t.prototype.reportChanged=function(){Zt(),ne(this),te()},t.prototype.toString=function(){return this.name},t}(),Je=function(t){function e(e,n,r){void 0===e&&(e="Atom@"+xt()),void 0===n&&(n=Rn),void 0===r&&(r=Rn);var o=t.call(this,e)||this;return o.name=e,o.onBecomeObservedHandler=n,o.onBecomeUnobservedHandler=r,o.isPendingUnobservation=!1,o.isBeingTracked=!1,o}return n(e,t),e.prototype.reportObserved=function(){return Zt(),t.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),te(),!!Mn.trackingDerivation},e.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},e}(Ge),Xe=Mt("Atom",Ge),Ye={spyReportEnd:!0},Qe="__$$iterating",Ze=1e4,tn=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),en=0,nn=function(){function t(){}return t}();m(nn,Array.prototype),Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(t){Object.defineProperty(nn.prototype,t,{configurable:!0