forked from json-schema-form/angular-schema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular-schema-form.min.js
31 lines (31 loc) · 91.9 KB
/
angular-schema-form.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
24
25
26
27
28
29
30
31
/*!
* angular-schema-form
* @version 1.0.0-alpha.5
* @date Mon, 17 Jul 2017 14:13:21 GMT
* @link https://github.com/json-schema-form/angular-schema-form
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
*/
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=21)}([function(e,t){e.exports=angular},function(e,t,r){(function(t,r){/*!
* json-schema-form-core
* @version 1.0.0-alpha.5
* @date Sat, 24 Jun 2017 14:16:26 GMT
* @link https://github.com/json-schema-form/json-schema-form-core
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
*/
e.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t,r){"use strict";function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e){var o=e.slice(),i=t||"-";return n&&(o=o.filter(function(e){return"number"!=typeof e})),(0!==r.length?r+i:"")+o.join(i)}return""}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2);r.n(o);r.o(o,"parse")&&r.d(t,"parse",function(){return o.parse}),r.o(o,"stringify")&&r.d(t,"stringify",function(){return o.stringify}),r.o(o,"normalize")&&r.d(t,"normalize",function(){return o.normalize}),t.name=n},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=function(e,t){if(!Array.isArray(e)){var r=function(){var r=[];return t?t.forEach(function(t){r.push({name:e[t],value:t})}):Object.keys(e).forEach(function(t){r.push({name:e[t],value:t})}),{v:r}}();if("object"===("undefined"==typeof r?"undefined":n(r)))return r.v}return e}},function(e,t,r){e.exports=r(11).ObjectPath},function(e,t,r){"use strict";function n(e,t,r,o){var i=e[g(r.type)];if(i)for(var a=void 0,s=function(t,r,o){return n(e,t,r,o)},u=0;u<i.length;u++)if(a=i[u](t,r,o,s))return a.schema["x-schema-form"]&&Object.assign(a,a.schema["x-schema-form"]),a}function o(e,t,n){n=n||{};var o=n.global&&n.global.formDefaults?Object.assign({},n.global.formDefaults):{};return n.global&&n.global.supressPropertyTitles===!0?o.title=t.title:o.title=t.title||e,t.description&&(o.description=t.description),n.required!==!0&&t.required!==!0||(o.required=!0),t.maxLength&&(o.maxlength=t.maxLength),t.minLength&&(o.minlength=t.minLength),(t.readOnly||t.readonly)&&(o.readonly=!0),t.minimum&&(o.minimum=t.minimum+(t.exclusiveMinimum?1:0)),t.maximum&&(o.maximum=t.maximum-(t.exclusiveMaximum?1:0)),t.validationMessage&&(o.validationMessage=t.validationMessage),t.enumNames&&(o.titleMap=r.i(y.a)(t.enumNames,t.enum)),o.schema=t,o.ngModelOptions=o.ngModelOptions||{},o}function i(e,t,n){if("string"===g(t.type)&&!t.enum){var i=o(e,t,n);return i.key=n.path,i.type="text",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function a(e,t,n){if("number"===g(t.type)){var i=o(e,t,n);return i.key=n.path,i.type="number",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function s(e,t,n){if("integer"===g(t.type)){var i=o(e,t,n);return i.key=n.path,i.type="number",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function u(e,t,n){if("boolean"===g(t.type)){var i=o(e,t,n);return i.key=n.path,i.type="checkbox",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function c(e,t,n){if("string"===g(t.type)&&t.enum){var i=o(e,t,n);return i.key=n.path,i.type="select",i.titleMap||(i.titleMap=b(t.enum)),n.lookup[r.i(m.stringify)(n.path)]=i,i}}function f(e,t,n){if("array"===g(t.type)&&t.items&&t.items.enum){var i=o(e,t,n);return i.key=n.path,i.type="checkboxes",i.titleMap||(i.titleMap=b(t.items.enum)),n.lookup[r.i(m.stringify)(n.path)]=i,i}}function l(e,t,n,i){if("object"===g(t.type)){var a=function(){var a=o(e,t,n);return a.type="fieldset",a.key=n.path,a.items=[],n.lookup[r.i(m.stringify)(n.path)]=a,t.properties&&Object.keys(t.properties).forEach(function(e){var o=t.properties[e],s=n.path.slice();if(s.push(e),n.ignore[r.i(m.stringify)(s)]!==!0){var u=t.required&&t.required.indexOf(e)!==-1,c=i(e,o,{path:s,required:u||!1,lookup:n.lookup,ignore:n.ignore,global:n.global});c&&a.items.push(c)}}),{v:a}}();if("object"===("undefined"==typeof a?"undefined":v(a)))return a.v}}function p(e,t,n,i){if("array"===g(t.type)){var a=o(e,t,n);a.type="array",a.key=n.path,n.lookup[r.i(m.stringify)(n.path)]=a;var s=t.required&&t.required.indexOf(n.path[n.path.length-1])!==-1,u=n.path.slice();return u.push(""),a.items=[i(e,t.items,{path:u,required:s||!1,lookup:n.lookup,ignore:n.ignore,global:n.global})],a}}function d(){return{string:[c,i],object:[l],number:[a],integer:[s],boolean:[u],array:[f,p]}}function h(e,t,r,o){var i=[],a={};if(r=r||{},o=o||{},t=t||d(),!e.properties)throw new Error('Not implemented. Only type "object" allowed at root level of schema.');return Object.keys(e.properties).forEach(function(s){if(r[s]!==!0){var u=e.required&&e.required.indexOf(s)!==-1,c=n(t,s,e.properties[s],{path:[s],lookup:a,ignore:r,required:u,global:o});c&&i.push(c)}}),{form:i,lookup:a}}Object.defineProperty(t,"__esModule",{value:!0});var m=r(0),y=r(1);t.defaultFormDefinition=n,t.stdFormObj=o,t.text=i,t.number=a,t.integer=s,t.checkbox=u,t.select=c,t.checkboxes=f,t.fieldset=l,t.array=p,t.createDefaults=d,t.defaultForm=h;var v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g=function(e){if(Array.isArray(e)&&2===e.length){if("null"===e[0])return e[1];if("null"===e[1])return e[0]}return e},b=function(e){var t=[];return e.forEach(function(e){t.push({name:e,value:e})}),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(0),i=r(1),a=r(6);r.d(t,"merge",function(){return a.a});var s=r(8);r.d(t,"select",function(){return s.a});var u=r(7);r.d(t,"jsonref",function(){return u.a});var c=r(9);r.d(t,"traverseSchema",function(){return c.a}),r.d(t,"traverseForm",function(){return c.b});var f=r(10);r.d(t,"validate",function(){return f.a}),r.d(t,"sfPath",function(){return l}),r.d(t,"schemaDefaults",function(){return p}),r.d(t,"canonicalTitleMap",function(){return d});var l=o,p=n,d=i.a},function(e,n,o){var i,a,s,u,u,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(t){if("object"===c(n)&&"undefined"!=typeof e)e.exports=t();else{a=[],i=t,s="function"==typeof i?i.apply(n,a):i,!(void 0!==s&&(e.exports=s))}}(function(){var e;return function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof u&&u;if(!s&&c)return u(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof u&&u,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){"use strict";function n(e){var t;return h(e,"Array")?(t=[],e.forEach(function(e,r){t[r]=n(e)})):h(e,"Object")?(t={},Object.keys(e).forEach(function(r){t[r]=n(e[r])})):t=e,t}function o(e,t){function r(e){Object.keys(e).forEach(function(t){n[t]=e[t]})}var n={};return r(F.parse(e||"")),r(F.parse(t||"")),0===Object.keys(n).length?void 0:F.stringify(n)}function i(e,t){h(e,"String")&&(e=I(e)),h(t,"String")&&(t=I(t));var r,n,i=v(h(t,"Undefined")?"":t);return V.indexOf(i.reference)>-1?n=i:(r=h(e,"Undefined")?void 0:v(e),h(r,"Undefined")?n=i:(n=r,n.path=I(D.join(r.path,i.path)),n.query=o(r.query,i.query))),n.fragment=void 0,(V.indexOf(n.reference)===-1&&0===n.path.indexOf("../")?"../":"")+R.serialize(n)}function a(e,t){var r,n=[];return t.length>0&&(r=e,t.slice(0,t.length-1).forEach(function(e){e in r&&(r=r[e],n.push(r))})),n}function s(e,t,r,o,i,a,s,f,l){var p,d;if(r.length>0)try{p=c(t,r)}catch(t){"remote"===e&&(o.error=t.message,o.missing=!0)}else p=t;if(h(p,"Undefined")||(o.value=p),h(p,"Array")||h(p,"Object"))return d=n(i),"local"===e?(delete d.subDocPath,t=p):(d.relativeBase=D.dirname(a[a.length-1]),0===r.length?delete d.subDocPath:d.subDocPath=r),u(t,d,a,s,f,l)}function u(e,t,r,n,o,a){var u=Promise.resolve(),c=n.length?k(n[n.length-1]):[],f=$(e,t),l=t.subDocPath||[],d=T(l),m=["#"];return r.forEach(function(e,t){"#"!==e.charAt(0)&&m.push(n[t])}),m.reverse(),"#"!==(r[r.length-1]||"").charAt(0)&&(o.documents[T(c)]=e),Object.keys(f).forEach(function(y){var v,g,b,x,w=f[y];b=0===r.length?c.concat(k(y)):c.concat(k(y).slice(0===r.length?0:l.length)),x=T(b),h(o[x],"Undefined")&&(o.refs[x]=f[y],h(w.error,"Undefined")&&"invalid"!==w.type&&(N.indexOf(w.type)>-1?(v=i(t.relativeBase,w.uri),g=r.indexOf(v)):(v=w.uri,g=n.indexOf(v)),w.ancestorPtrs=m,w.indirect=a,g===-1?N.indexOf(w.type)>-1?u=u.then(function(){return p(v,t).then(function(e){return s("remote",e,h(w.uriDetails.fragment,"Undefined")?[]:k(decodeURI(w.uriDetails.fragment)),w,t,r.concat(v),n.concat(x),o,a)}).catch(function(e){w.error=e.message,w.missing=!0})}):0!==x.indexOf(v+"/")&&x!==v&&0!==d.indexOf(v+"/")&&d!==v?0!==v.indexOf(d+"/")&&(u=u.then(function(){return s("local",e,k(v),w,t,r.concat(v),n.concat(x),o,a||v.indexOf(d+"/")===-1&&v!==d)})):w.circular=!0:(n.slice(g).forEach(function(e){o.refs[e].circular=!0}),w.circular=!0)))}),u=u.then(function(){function e(i,a,s,u){Object.keys(o.refs).forEach(function(c){var f=o.refs[c];n.indexOf(u)===-1&&r.indexOf(s)===-1&&t.indexOf(u)===-1&&c!==s&&0===c.indexOf(u+"/")&&(a.indexOf(u)>-1?a.forEach(function(e){t.indexOf(u)===-1&&t.push(e)}):e(i.concat(s),a.concat(u),c,f.uri),r.push(s),n.push(u))})}var t=[],r=[],n=[];Object.keys(o.refs).forEach(function(r){var n=o.refs[r];"local"!==n.type||n.circular||t.indexOf(n.uri)!==-1||e([],[],r,n.uri)}),Object.keys(o.refs).forEach(function(e){var r=o.refs[e];t.indexOf(r.uri)>-1&&(r.circular=!0)})}).then(function(){return o})}function c(e,t){var r=e;return t.forEach(function(e){if(e=decodeURI(e),!(e in r))throw Error("JSON Pointer points to missing location: "+T(t));r=r[e]}),r}function f(e){return Object.keys(e).filter(function(e){return"$ref"!==e})}function l(e){var t;switch(e.uriDetails.reference){case"absolute":case"uri":t="remote";break;case"same-document":t="local";break;default:t=e.uriDetails.reference}return t}function p(e,t){var r=q[e],o=Promise.resolve(),i=n(t.loaderOptions||{});return h(r,"Undefined")?(h(i.processContent,"Undefined")&&(i.processContent=function(e,t){t(void 0,JSON.parse(e.text))}),o=_.load(decodeURI(e),i),o=o.then(function(t){return q[e]={value:t},t}).catch(function(t){throw q[e]={error:t},t})):o=o.then(function(){return r.value}),o=o.then(function(e){return n(e)})}function d(e,t){var r=!0;try{if(!h(e,"Object"))throw new Error("obj is not an Object");if(!h(e.$ref,"String"))throw new Error("obj.$ref is not a String")}catch(e){if(t)throw e;r=!1}return r}function h(e,t){return"Undefined"===t?"undefined"==typeof e:Object.prototype.toString.call(e)==="[object "+t+"]"}function m(e){var t,r;return h(e.filter,"Array")||h(e.filter,"String")?(r=h(e.filter,"String")?[e.filter]:e.filter,t=function(e){return r.indexOf(e.type)>-1||r.indexOf(l(e))>-1}):h(e.filter,"Function")?t=e.filter:h(e.filter,"Undefined")&&(t=function(){return!0}),function(r,n){return("invalid"!==r.type||e.includeInvalid===!0)&&t(r,n)}}function y(e){var t;return h(e.subDocPath,"Array")?t=e.subDocPath:h(e.subDocPath,"String")?t=k(e.subDocPath):h(e.subDocPath,"Undefined")&&(t=[]),t}function v(e){return R.parse(encodeURI(decodeURI(e)))}function g(e,t,r){c(e,t.slice(0,t.length-1))[decodeURI(t[t.length-1])]=r}function b(e,t,r,n){function o(t,o){r.push(o),b(e,t,r,n),r.pop()}var i=!0;h(n,"Function")&&(i=n(e,t,r)),e.indexOf(t)===-1&&(e.push(t),i!==!1&&(h(t,"Array")?t.forEach(function(e,t){o(e,t.toString())}):h(t,"Object")&&Object.keys(t).forEach(function(e){o(t[e],e)}))),e.pop()}function x(e,t){if(e=h(e,"Undefined")?{}:n(e),!h(e,"Object"))throw new TypeError("options must be an Object");if(!(h(e.filter,"Undefined")||h(e.filter,"Array")||h(e.filter,"Function")||h(e.filter,"String")))throw new TypeError("options.filter must be an Array, a Function of a String");if(!h(e.includeInvalid,"Undefined")&&!h(e.includeInvalid,"Boolean"))throw new TypeError("options.includeInvalid must be a Boolean");if(!h(e.refPreProcessor,"Undefined")&&!h(e.refPreProcessor,"Function"))throw new TypeError("options.refPreProcessor must be a Function");if(!h(e.refPostProcessor,"Undefined")&&!h(e.refPostProcessor,"Function"))throw new TypeError("options.refPostProcessor must be a Function");if(!h(e.subDocPath,"Undefined")&&!h(e.subDocPath,"Array")&&!A(e.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(e.filter=m(e),e.subDocPath=y(e),!h(t,"Undefined"))try{c(t,e.subDocPath)}catch(e){throw e.message=e.message.replace("JSON Pointer","options.subDocPath"),e}return e}function w(){q={}}function E(e){if(!h(e,"Array"))throw new TypeError("path must be an array");return e.map(function(e){return h(e,"String")||(e=JSON.stringify(e)),decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))})}function O(e){if(!h(e,"Array"))throw new TypeError("path must be an array");return e.map(function(e){return h(e,"String")||(e=JSON.stringify(e)),e.replace(/~/g,"~0").replace(/\//g,"~1")})}function $(e,t){var r={};if(!h(e,"Array")&&!h(e,"Object"))throw new TypeError("obj must be an Array or an Object");return t=x(t,e),b(a(e,t.subDocPath),c(e,t.subDocPath),n(t.subDocPath),function(e,o,i){var a,s=!0;return d(o)&&(h(t.refPreProcessor,"Undefined")||(o=t.refPreProcessor(n(o),i)),a=P(o),h(t.refPostProcessor,"Undefined")||(a=t.refPostProcessor(a,i)),t.filter(a,i)&&(r[T(i)]=a),f(o).length>0&&(s=!1)),s}),r}function C(e,t){var r=Promise.resolve();return r=r.then(function(){if(!h(e,"String"))throw new TypeError("location must be a string");return t=x(t),e=i(t.relativeBase,e),p(e,t)}).then(function(r){var o=n(q[e]),i=n(t),a=v(e);return h(o.refs,"Undefined")&&(delete i.filter,delete i.subDocPath,i.includeInvalid=!0,q[e].refs=$(r,i)),h(t.filter,"Undefined")||(i.filter=t.filter),h(a.fragment,"Undefined")?h(a.subDocPath,"Undefined")||(i.subDocPath=t.subDocPath):i.subDocPath=k(decodeURI(a.fragment)),{refs:$(r,i),value:r}})}function P(e){var t,r,n,o={def:e};try{d(e,!0)?(t=e.$ref,n=L[t],h(n,"Undefined")&&(n=L[t]=v(t)),o.uri=t,o.uriDetails=n,h(n.error,"Undefined")?o.type=l(o):(o.error=o.uriDetails.error,o.type="invalid"),r=f(e),r.length>0&&(o.warning="Extra JSON Reference properties will be ignored: "+r.join(", "))):o.type="invalid"}catch(e){o.error=e.message,o.type="invalid"}return o}function A(e,t){var r,n=!0;try{if(!h(e,"String"))throw new Error("ptr is not a String");if(""!==e){if(r=e.charAt(0),["#","/"].indexOf(r)===-1)throw new Error("ptr must start with a / or #/");if("#"===r&&"#"!==e&&"/"!==e.charAt(1))throw new Error("ptr must start with a / or #/");if(e.match(U))throw new Error("ptr has invalid token(s)")}}catch(e){if(t===!0)throw e;n=!1}return n}function S(e,t){return d(e,t)&&"invalid"!==P(e,t).type}function k(e){if(!A(e))throw new Error("ptr must be a JSON Pointer");var t=e.split("/");return t.shift(),E(t)}function T(e,t){if(!h(e,"Array"))throw new Error("path must be an Array");return(t!==!1?"#":"")+(e.length>0?"/":"")+O(e).join("/")}function M(e,t){var r=Promise.resolve();return r=r.then(function(){if(!h(e,"Array")&&!h(e,"Object"))throw new TypeError("obj must be an Array or an Object");t=x(t,e),e=n(e)}).then(function(){return u(e,t,[],[],{documents:{},refs:{}})}).then(function(t){function r(e,t){return k(e).length-k(t).length}var n={},o={};return Object.keys(t.refs).sort(r).forEach(function(r){var i=t.refs[r];i.indirect||(o[r]=i),delete i.indirect,h(i.error,"Undefined")&&"invalid"!==i.type?(h(i.value,"Undefined")&&i.circular&&(i.value=i.def),h(i.value,"Undefined")?n[r]=i:("#"===r?e=i.value:g(e,k(r),i.value),delete i.ancestorPtrs)):delete i.ancestorPtrs}),Object.keys(n).forEach(function(r){var o=n[r];o.ancestorPtrs.forEach(function(n,i){if(h(o.value,"Undefined"))try{o.value=c(t.documents[n],k(o.uri)),delete o.ancestorPtrs,g(e,k(r),o.value)}catch(e){i===o.ancestorPtrs.length-1&&(o.error=e.message,o.missing=!0,delete o.ancestorPtrs)}})}),{refs:o,resolved:e}})}function j(e,t){var r=Promise.resolve();return r=r.then(function(){if(!h(e,"String"))throw new TypeError("location must be a string");return t=x(t),e=i(t.relativeBase,e),p(e,t)}).then(function(r){var o=n(t),i=v(e);return h(i.fragment,"Undefined")||(o.subDocPath=k(decodeURI(i.fragment))),o.relativeBase=D.dirname(e),M(r,o).then(function(e){return{refs:e.refs,resolved:e.resolved,value:r}})})}var D=e("path"),_=e("path-loader"),F=e("querystring"),I=e("slash"),R=e("uri-js"),U=/~(?:[^01]|$)/g,q={},N=["relative","remote"],V=["absolute","uri"],L={};"undefined"==typeof Promise&&e("native-promise-only"),t.exports.clearCache=w,t.exports.decodePath=E,t.exports.encodePath=O,t.exports.findRefs=$,t.exports.findRefsAt=C,t.exports.getRefDetails=P,t.exports.isPtr=A,t.exports.isRef=S,t.exports.pathFromPtr=k,t.exports.pathToPtr=T,t.exports.resolveRefs=M,t.exports.resolveRefsAt=j},{"native-promise-only":3,path:4,"path-loader":5,querystring:11,slash:13,"uri-js":23}],2:[function(e,t,r){function n(e){if(e)return o(e)}function o(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],3:[function(n,o,i){(function(t){/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/
!function(t,r,n){r[t]=r[t]||n(),"undefined"!=typeof o&&o.exports?o.exports=r[t]:"function"==typeof e&&e.amd&&e(function(){return r[t]})}("Promise","undefined"!=typeof t?t:this,function(){"use strict";function e(e,t){h.add(e,t),d||(d=y(h.drain))}function t(e){var t,r="undefined"==typeof e?"undefined":c(e);return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function n(){for(var e=0;e<this.chain.length;e++)o(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function o(e,r,n){var o,i;try{r===!1?n.reject(e.msg):(o=r===!0?e.msg:r.call(void 0,e.msg),o===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=t(o))?i.call(o,n.resolve,n.reject):n.resolve(o))}catch(e){n.reject(e)}}function i(r){var o,s=this;if(!s.triggered){s.triggered=!0,s.def&&(s=s.def);try{(o=t(r))?e(function(){var e=new u(s);try{o.call(r,function(){i.apply(e,arguments)},function(){a.apply(e,arguments)})}catch(t){a.call(e,t)}}):(s.msg=r,s.state=1,s.chain.length>0&&e(n,s))}catch(e){a.call(new u(s),e)}}}function a(t){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=t,r.state=2,r.chain.length>0&&e(n,r))}function s(e,t,r,n){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then(function(e){r(o,e)},n)}(o)}function u(e){this.def=e,this.triggered=!1}function f(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function l(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new f(this);this.then=function(t,o){var i={success:"function"!=typeof t||t,failure:"function"==typeof o&&o};return i.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");i.resolve=e,i.reject=t}),r.chain.push(i),0!==r.state&&e(n,r),i.promise},this.catch=function(e){return this.then(void 0,e)};try{t.call(void 0,function(e){i.call(r,e)},function(e){a.call(r,e)})}catch(e){a.call(r,e)}}var p,d,h,m=Object.prototype.toString,y="undefined"!=typeof r?function(e){return r(e)}:setTimeout;try{Object.defineProperty({},"x",{}),p=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:n!==!1})}}catch(e){p=function(e,t,r){return e[t]=r,e}}h=function(){function e(e,t){this.fn=e,this.self=t,this.next=void 0}var t,r,n;return{add:function(o,i){n=new e(o,i),r?r.next=n:t=n,r=n,n=void 0},drain:function(){var e=t;for(t=r=d=void 0;e;)e.fn.call(e.self),e=e.next}}}();var v=p({},"constructor",l,!1);return l.prototype=v,p(v,"__NPO__",0,!1),p(l,"resolve",function(e){var t=this;return e&&"object"==("undefined"==typeof e?"undefined":c(e))&&1===e.__NPO__?e:new t(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");t(e)})}),p(l,"reject",function(e){return new this(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");r(e)})}),p(l,"all",function(e){var t=this;return"[object Array]"!=m.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;s(t,e,function(e,t){i[e]=t,++a===o&&r(i)},n)})}),p(l,"race",function(e){var t=this;return"[object Array]"!=m.call(e)?t.reject(TypeError("Not an array")):new t(function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");s(t,e,function(e,t){r(t)},n)})}),l})}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};r.resolve=function(){for(var r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,o="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+r||"."},r.normalize=function(e){var o=r.isAbsolute(e),i="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var o=n(e.split("/")),i=n(t.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}for(var c=[],u=s;u<o.length;u++)c.push("..");return c=c.concat(i.slice(s)),c.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=i(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=i(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return i(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:8}],5:[function(e,t,r){"use strict";function n(e){return"undefined"!=typeof e&&(e=e.indexOf("://")===-1?"":e.split("://")[0]),e}function o(e){var t=n(e),r=i[t];if("undefined"==typeof r){if(""!==t)throw new Error("Unsupported scheme: "+t);r=a}return r}var i={file:e("./lib/loaders/file"),http:e("./lib/loaders/http"),https:e("./lib/loaders/http")},a="object"===("undefined"==typeof window?"undefined":c(window))||"function"==typeof importScripts?i.http:i.file;"undefined"==typeof Promise&&e("native-promise-only"),t.exports.load=function(e,t){var r=Promise.resolve();return"undefined"==typeof t&&(t={}),r=r.then(function(){if("undefined"==typeof e)throw new TypeError("location is required");if("string"!=typeof e)throw new TypeError("location must be a string");if("undefined"!=typeof t){if("object"!==("undefined"==typeof t?"undefined":c(t)))throw new TypeError("options must be an object");if("undefined"!=typeof t.processContent&&"function"!=typeof t.processContent)throw new TypeError("options.processContent must be a function")}}),r=r.then(function(){return new Promise(function(r,n){var i=o(e);i.load(e,t||{},function(e,t){e?n(e):r(t)})})}).then(function(e){return t.processContent?new Promise(function(r,n){t.processContent("object"===("undefined"==typeof e?"undefined":c(e))?e:{text:e},function(e,t){e?n(e):r(t)})}):"object"===("undefined"==typeof e?"undefined":c(e))?e.text:e})}},{"./lib/loaders/file":6,"./lib/loaders/http":7,"native-promise-only":3}],6:[function(e,t,r){"use strict";var n=new TypeError("The 'file' scheme is not supported in the browser");t.exports.getBase=function(){throw n},t.exports.load=function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw n;e(n)}},{}],7:[function(e,t,r){"use strict";var n=e("superagent"),o=["delete","get","head","patch","post","put"];t.exports.load=function(e,t,r){function i(e,t){e?r(e):("function"==typeof t.buffer&&t.buffer(!0),t.end(function(e,t){e?r(e):r(void 0,t)}))}var a,s,u=t.method?t.method.toLowerCase():"get";if("undefined"!=typeof t.method?"string"!=typeof t.method?a=new TypeError("options.method must be a string"):o.indexOf(t.method)===-1&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):"undefined"!=typeof t.prepareRequest&&"function"!=typeof t.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)r(a);else if(s=n["delete"===u?"del":u](e),t.prepareRequest)try{t.prepareRequest(s,i)}catch(e){r(e)}else i(void 0,s)}},{superagent:14}],8:[function(e,t,r){function n(){f=!1,s.length?c=s.concat(c):l=-1,c.length&&o()}function o(){if(!f){var e=setTimeout(n);f=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,f=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,u=t.exports={},c=[],f=!1,l=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new i(e,t)),1!==c.length||f||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],9:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var l,p,d,h,m=e[f].replace(s,"%20"),y=m.indexOf(r);y>=0?(l=m.substr(0,y),p=m.substr(y+1)):(l=m,p=""),d=decodeURIComponent(l),h=decodeURIComponent(p),n(a,d)?o(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],10:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=function(e){switch("undefined"==typeof e?"undefined":c(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===("undefined"==typeof e?"undefined":c(e))?n(a(e),function(a){var s=encodeURIComponent(o(a))+r;return i(e[a])?n(e[a],function(e){return s+encodeURIComponent(o(e))}).join(t):s+encodeURIComponent(o(e[a]))}).join(t):s?encodeURIComponent(o(s))+r+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],11:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":9,"./encode":10}],12:[function(e,t,r){t.exports=function(e,t,r){for(var n=0,o=e.length,i=3==arguments.length?r:e[n++];n<o;)i=t.call(null,i,e[n],++n,e);return i}},{}],13:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],14:[function(e,t,r){function n(){}function o(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function i(e){if(!b(e))return e;var t=[];for(var r in e)null!=e[r]&&a(t,r,e[r]);return t.join("&")}function a(e,t,r){return Array.isArray(r)?r.forEach(function(r){a(e,t,r)}):void e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}function s(e){for(var t,r,n={},o=e.split("&"),i=0,a=o.length;i<a;++i)r=o[i],t=r.split("="),n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return n}function u(e){var t,r,n,o,i=e.split(/\r?\n/),a={};i.pop();for(var s=0,u=i.length;s<u;++s)r=i[s],t=r.indexOf(":"),n=r.slice(0,t).toLowerCase(),o=w(r.slice(t+1)),a[n]=o;return a}function c(e){return/[\/+]json\b/.test(e)}function f(e){return e.split(/ *; */).shift()}function l(e){return v(e.split(/ *; */),function(e,t){var r=t.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(e[n]=o),e},{})}function p(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=u(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function d(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new p(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,e.rawResponse=r.xhr&&r.xhr.responseText?r.xhr.responseText:null,e.statusCode=r.xhr&&r.xhr.status?r.xhr.status:null,r.callback(e)}if(r.emit("response",t),e)return r.callback(e,t);if(t.status>=200&&t.status<300)return r.callback(e,t);var n=new Error(t.statusText||"Unsuccessful HTTP response");n.original=e,n.response=t,n.status=t.status,r.callback(n,t)})}function h(e,t){var r=x("DELETE",e);return t&&r.end(t),r}var m,y=e("emitter"),v=e("reduce"),g=e("./request-base"),b=e("./is-object");m="undefined"!=typeof window?window:"undefined"!=typeof self?self:this;var x=t.exports=e("./request").bind(null,d);x.getXHR=function(){if(!(!m.XMLHttpRequest||m.location&&"file:"==m.location.protocol&&m.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var w="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};x.serializeObject=i,x.parseString=s,x.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},x.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},x.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},p.prototype.get=function(e){return this.header[e.toLowerCase()]},p.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=f(t);var r=l(t);for(var n in r)this[n]=r[n]},p.prototype.parseBody=function(e){var t=x.parse[this.type];return!t&&c(this.type)&&(t=x.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},p.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},p.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",o=new Error(n);return o.status=this.status,o.method=t,o.url=r,o},x.Response=p,y(d.prototype);for(var E in g)d.prototype[E]=g[E];d.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this},d.prototype.type=function(e){return this.set("Content-Type",x.types[e]||e),this},d.prototype.responseType=function(e){return this._responseType=e,this},d.prototype.accept=function(e){return this.set("Accept",x.types[e]||e),this},d.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var n=btoa(e+":"+t);this.set("Authorization","Basic "+n);break;case"auto":this.username=e,this.password=t}return this},d.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},d.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},d.prototype._getFormData=function(){return this._formData||(this._formData=new m.FormData),this._formData},d.prototype.send=function(e){var t=b(e),r=this._header["content-type"];if(t&&b(this._data))for(var n in e)this._data[n]=e[n];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],"application/x-www-form-urlencoded"==r?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||o(e)?this:(r||this.type("json"),this)},p.prototype.parse=function(e){return m.console&&console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0"),this.serialize(e),this},p.prototype.serialize=function(e){return this._parser=e,this},d.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},d.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},d.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},d.prototype.withCredentials=function(){return this._withCredentials=!0,this},d.prototype.end=function(e){var t=this,r=this.xhr=x.getXHR(),i=this._query.join("&"),a=this._timeout,s=this._formData||this._data;this._callback=e||n,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var u=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(r.onprogress=u);try{r.upload&&this.hasListeners("progress")&&(r.upload.onprogress=u)}catch(e){}if(a&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},a)),i&&(i=x.serializeObject(i),this.url+=~this.url.indexOf("?")?"&"+i:"?"+i),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!o(s)){var f=this._header["content-type"],l=this._parser||x.serialize[f?f.split(";")[0]:""];!l&&c(f)&&(l=x.serialize["application/json"]),l&&(s=l(s))}for(var p in this.header)null!=this.header[p]&&r.setRequestHeader(p,this.header[p]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send("undefined"!=typeof s?s:null),this},x.Request=d,x.get=function(e,t,r){var n=x("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},x.head=function(e,t,r){var n=x("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},x.del=h,x.delete=h,x.patch=function(e,t,r){var n=x("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},x.post=function(e,t,r){var n=x("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},x.put=function(e,t,r){var n=x("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},{"./is-object":15,"./request":17,"./request-base":16,emitter:2,reduce:12}],15:[function(e,t,r){function n(e){return null!=e&&"object"==("undefined"==typeof e?"undefined":c(e))}t.exports=n},{}],16:[function(e,t,r){var n=e("./is-object");r.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},r.parse=function(e){return this._parser=e,this},r.timeout=function(e){return this._timeout=e,this},r.then=function(e,t){return this.end(function(r,n){r?t(r):e(n)})},r.use=function(e){return e(this),this},r.get=function(e){return this._header[e.toLowerCase()]},r.getHeader=r.get,r.set=function(e,t){if(n(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.field=function(e,t){return this._getFormData().append(e,t),this}},{"./is-object":15}],17:[function(e,t,r){function n(e,t,r){return"function"==typeof r?new e("GET",t).end(r):2==arguments.length?new e("GET",t):new e(t,r)}t.exports=n},{}],18:[function(e,t,r){/*! https://mths.be/punycode v1.3.2 by @mathias, modified for URI.js */var n=function(){function e(e){throw new RangeError(C[e])}function t(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function r(e,r){var n=e.split("@"),o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace($,".");var i=e.split("."),a=t(i,r).join(".");return o+a}function n(e){for(var t,r,n=[],o=0,i=e.length;o<i;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<i?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function o(e){return t(e,function(e){var t="";return e>65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|1023&e),t+=S(e)}).join("")}function i(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h}function a(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function s(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>P*y>>1;n+=h)e=A(e/P);return A(n+(P+1)*e/(e+v))}function u(t){var r,n,a,u,c,f,l,p,v,g,E=[],O=t.length,$=0,C=x,P=b;for(n=t.lastIndexOf(w),n<0&&(n=0),a=0;a<n;++a)t.charCodeAt(a)>=128&&e("not-basic"),E.push(t.charCodeAt(a));for(u=n>0?n+1:0;u<O;){for(c=$,f=1,l=h;u>=O&&e("invalid-input"),p=i(t.charCodeAt(u++)),(p>=h||p>A((d-$)/f))&&e("overflow"),$+=p*f,v=l<=P?m:l>=P+y?y:l-P,!(p<v);l+=h)g=h-v,f>A(d/g)&&e("overflow"),f*=g;r=E.length+1,P=s($-c,r,0==c),A($/r)>d-C&&e("overflow"),C+=A($/r),$%=r,E.splice($++,0,C)}return o(E)}function c(t){var r,o,i,u,c,f,l,p,v,g,E,O,$,C,P,k=[];for(t=n(t),O=t.length,r=x,o=0,c=b,f=0;f<O;++f)E=t[f],E<128&&k.push(S(E));for(i=u=k.length,u&&k.push(w);i<O;){for(l=d,f=0;f<O;++f)E=t[f],E>=r&&E<l&&(l=E);for($=i+1,l-r>A((d-o)/$)&&e("overflow"),o+=(l-r)*$,r=l,f=0;f<O;++f)if(E=t[f],E<r&&++o>d&&e("overflow"),E==r){for(p=o,v=h;g=v<=c?m:v>=c+y?y:v-c,!(p<g);v+=h)P=p-g,C=h-g,k.push(S(a(g+P%C,0))),p=A(P/C);k.push(S(a(p,0))),c=s(o,$,i==u),o=0,++i}++o,++r}return k.join("")}function f(e){return r(e,function(e){return E.test(e)?u(e.slice(4).toLowerCase()):e})}function l(e){return r(e,function(e){return O.test(e)?"xn--"+c(e):e})}var p,d=2147483647,h=36,m=1,y=26,v=38,g=700,b=72,x=128,w="-",E=/^xn--/,O=/[^\x20-\x7E]/,$=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=h-m,A=Math.floor,S=String.fromCharCode;return p={version:"1.3.2",ucs2:{decode:n,encode:o},decode:u,encode:c,toASCII:l,toUnicode:f}}();"undefined"==typeof COMPILED&&"undefined"!=typeof t&&(t.exports=n)},{}],19:[function(e,t,r){e("./schemes/http"),e("./schemes/urn"),e("./schemes/mailto")},{"./schemes/http":20,"./schemes/mailto":21,"./schemes/urn":22}],20:[function(e,t,r){if("undefined"==typeof COMPILED&&"undefined"==typeof n&&"function"==typeof e)var n=e("../uri");n.SCHEMES.http=n.SCHEMES.https={domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}}},{"../uri":23}],21:[function(e,t,r){if("undefined"==typeof COMPILED&&"undefined"==typeof n&&"function"==typeof e)var n=e("../uri"),o=e("../punycode");!function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(e.length>1){e[0]=e[0].slice(0,-1);for(var r=e.length-1,n=1;n<r;++n)e[n]=e[n].slice(1,-1);return e[r]=e[r].slice(1),e.join("")}return e[0]}function t(e){return"(?:"+e+")"}function r(e){return e.toUpperCase()}function i(e){var t=n.pctDecChars(e);return t.match(M)?t:e}function a(e){return void 0!==e&&null!==e?e instanceof Array&&!e.callee?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}var s={},u=n.IRI_SUPPORT,c="[A-Za-z0-9\\-\\.\\_\\~"+(u?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",f="[0-9A-Fa-f]",l=t(t("%[EFef]"+f+"%"+f+f+"%"+f+f)+"|"+t("%[89A-Fa-f]"+f+"%"+f+f)+"|"+t("%"+f+f)),p="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",d="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",h=e(d,'[\\"\\\\]'),m=t(p+"+"+t("\\."+p+"+")+"*"),y=t("\\\\"+h),v=t(d+"|"+y),g=t('\\"'+v+'*\\"'),b="[\\x21-\\x5A\\x5E-\\x7E]",x="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",w=t(c+"|"+l+"|"+x),E=t(m+"|\\["+b+"*\\]"),O=t(m+"|"+g),$=t(O+"\\@"+E),C=t($+t("\\,"+$)+"*"),P=t(w+"*"),A=P,S=t(P+"\\="+A),k=t(S+t("\\&"+S)+"*"),T=t("\\?"+k),M=(n.VALIDATE_SUPPORT&&new RegExp("^mailto\\:"+C+"?"+T+"?$"),new RegExp(c,"g")),j=new RegExp(l,"g"),D=new RegExp(e("[^]",p,"[\\.]",'[\\"]',h),"g"),_=new RegExp(e("[^]",p,"[\\.]","[\\[]",b,"[\\]]"),"g"),F=new RegExp(e("[^]",c,x),"g"),I=F,R=n.VALIDATE_SUPPORT&&new RegExp("^"+C+"$"),U=n.VALIDATE_SUPPORT&&new RegExp("^"+k+"$");n.SCHEMES.mailto={parse:function(e,t){n.VALIDATE_SUPPORT&&!e.error&&(e.path&&!R.test(e.path)?e.error="Email address is not valid":e.query&&!U.test(e.query)&&(e.error="Header fields are invalid"));var r=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var i=!1,a={},s=e.query.split("&"),u=0,c=s.length;u<c;++u){var f=s[u].split("=");switch(f[0]){case"to":for(var l=f[1].split(","),p=0,d=l.length;p<d;++p)r.push(l[p]);break;case"subject":e.subject=n.unescapeComponent(f[1],t);break;case"body":e.body=n.unescapeComponent(f[1],t);break;default:i=!0,a[n.unescapeComponent(f[0],t)]=n.unescapeComponent(f[1],t)}}i&&(e.headers=a)}e.query=void 0;for(var u=0,c=r.length;u<c;++u){var h=r[u].split("@");if(h[0]=n.unescapeComponent(h[0]),"undefined"==typeof o||t.unicodeSupport)h[1]=n.unescapeComponent(h[1],t).toLowerCase();else try{h[1]=o.toASCII(n.unescapeComponent(h[1],t).toLowerCase())}catch(t){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}r[u]=h.join("@")}return e},serialize:function(e,t){var u=a(e.to);if(u){for(var c=0,f=u.length;c<f;++c){var l=String(u[c]),p=l.lastIndexOf("@"),d=l.slice(0,p),h=l.slice(p+1);if(d=d.replace(j,i).replace(j,r).replace(D,n.pctEncChar),"undefined"!=typeof o)try{h=t.iri?o.toUnicode(h):o.toASCII(n.unescapeComponent(h,t).toLowerCase())}catch(r){e.error=e.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}else h=h.replace(j,i).toLowerCase().replace(j,r).replace(_,n.pctEncChar);u[c]=d+"@"+h}e.path=u.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var y=[];for(var v in m)m[v]!==s[v]&&y.push(v.replace(j,i).replace(j,r).replace(F,n.pctEncChar)+"="+m[v].replace(j,i).replace(j,r).replace(I,n.pctEncChar));return y.length&&(e.query=y.join("&")),e}}}()},{"../punycode":18,"../uri":23}],22:[function(e,t,r){if("undefined"==typeof COMPILED&&"undefined"==typeof n&&"function"==typeof e)var n=e("../uri");!function(){var e=n.pctEncChar,t="(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})",r="(?:\\%[0-9A-Fa-f]{2})",o="[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]",i="(?:(?:"+r+"|"+o+")+)",a=new RegExp("^urn\\:("+t+")$"),s=new RegExp("^("+t+")\\:("+i+")$"),u=/^([^\:]+)\:(.*)/,c=/[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g,f=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;n.SCHEMES.urn={parse:function(e,t){var r,o,i=e.path.match(s);return i||(t.tolerant||(e.error=e.error||"URN is not strictly valid."),i=e.path.match(u)),i?(r="urn:"+i[1].toLowerCase(),o=n.SCHEMES[r],o||(o=n.SCHEMES[r]={parse:function(e,t){return e},serialize:n.SCHEMES.urn.serialize}),e.scheme=r,e.path=i[2],e=o.parse(e,t)):e.error=e.error||"URN can not be parsed.",e},serialize:function(t,r){var n,o=t.scheme||r.scheme;if(o&&"urn"!==o){var n=o.match(a);n||(n=["urn:"+o,o]),t.scheme="urn",t.path=n[1]+":"+(t.path?t.path.replace(c,e):"")}return t}},n.SCHEMES["urn:uuid"]={parse:function(e,t){return t.tolerant||e.path&&e.path.match(f)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,t){return t.tolerant||e.path&&e.path.match(f)?e.path=(e.path||"").toLowerCase():e.scheme=void 0,n.SCHEMES.urn.serialize(e,t)}}}()},{"../uri":23}],23:[function(e,t,r){/**
* URI.js
*
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
* @author <a href="mailto:[email protected]">Gary Court</a>
* @version 2.0.0
* @see http://github.com/garycourt/uri-js
* @license URI.js v2.0.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js
*/
var n=!1,o=!0,i=!0,a=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(e.length>1){e[0]=e[0].slice(0,-1);for(var r=e.length-1,n=1;n<r;++n)e[n]=e[n].slice(1,-1);return e[r]=e[r].slice(1),e.join("")}return e[0]}function t(e){return"(?:"+e+")"}function r(r){var n="[A-Za-z]",o="[0-9]",a=e(o,"[A-Fa-f]"),s=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),u="[\\:\\/\\?\\#\\[\\]\\@]",c="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",f=e(u,c),l=r?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",p=r?"[\\uE000-\\uF8FF]":"[]",d=e(n,o,"[\\-\\.\\_\\~]",l),h=t(n+e(n,o,"[\\+\\-\\.]")+"*"),m=t(t(s+"|"+e(d,c,"[\\:]"))+"*"),y=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("[1-9]"+o)+"|"+o),v=t(y+"\\."+y+"\\."+y+"\\."+y),g=t(a+"{1,4}"),b=(t(t(g+"\\:"+g)+"|"+v),t(e(d,c,"[\\:]")+"+")),x=t("v"+a+"+\\."+e(d,c,"[\\:]")+"+"),w=t("\\["+t(b+"|"+x)+"\\]"),E=t(t(s+"|"+e(d,c))+"*"),O=t(w+"|"+v+"(?!"+E+")|"+E),$=t(o+"*"),C=t(t(m+"@")+"?"+O+t("\\:"+$)+"?"),P=t(s+"|"+e(d,c,"[\\:\\@]")),A=t(P+"*"),S=t(P+"+"),k=t(t(s+"|"+e(d,c,"[\\@]"))+"+"),T=t(t("\\/"+A)+"*"),M=t("\\/"+t(S+T)+"?"),j=t(k+T),D=t(S+T),_="(?!"+P+")",F=(t(T+"|"+M+"|"+j+"|"+D+"|"+_),t(t(P+"|"+e("[\\/\\?]",p))+"*")),I=t(t(P+"|[\\/\\?]")+"*"),R=t(t("\\/\\/"+C+T)+"|"+M+"|"+D+"|"+_),U=t(h+"\\:"+R+t("\\?"+F)+"?"+t("\\#"+I)+"?"),q=t(t("\\/\\/"+C+T)+"|"+M+"|"+j+"|"+_),N=t(q+t("\\?"+F)+"?"+t("\\#"+I)+"?"),V=(t(U+"|"+N),t(h+"\\:"+R+t("\\?"+F)+"?"),"^("+h+")\\:"+t(t("\\/\\/("+t("("+m+")@")+"?("+O+")"+t("\\:("+$+")")+"?)")+"?("+T+"|"+M+"|"+D+"|"+_+")")+t("\\?("+F+")")+"?"+t("\\#("+I+")")+"?$"),L="^(){0}"+t(t("\\/\\/("+t("("+m+")@")+"?("+O+")"+t("\\:("+$+")")+"?)")+"?("+T+"|"+M+"|"+j+"|"+_+")")+t("\\?("+F+")")+"?"+t("\\#("+I+")")+"?$";"^("+h+")\\:"+t(t("\\/\\/("+t("("+m+")@")+"?("+O+")"+t("\\:("+$+")")+"?)")+"?("+T+"|"+M+"|"+D+"|"+_+")")+t("\\?("+F+")")+"?$","^"+t("\\#("+I+")")+"?$","^"+t("("+m+")@")+"?("+O+")"+t("\\:("+$+")")+"?$";return{URI_REF:i&&new RegExp("("+V+")|("+L+")"),NOT_SCHEME:new RegExp(e("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",d,c),"g"),NOT_HOST:new RegExp(e("[^\\%]",d,c),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",d,c),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",d,c),"g"),NOT_QUERY:new RegExp(e("[^\\%]",d,c,"[\\:\\@\\/\\?]",p),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",d,c,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",d,c),"g"),UNRESERVED:new RegExp(d,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",d,f),"g"),PCT_ENCODED:new RegExp(s,"g")}}function n(e){var t,r=e.charCodeAt(0);return t=r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function a(e){for(var t,r,n,o="",i=0,a=e.length;i<a;)t=parseInt(e.substr(i+1,2),16),t<128?(o+=String.fromCharCode(t),i+=3):t>=194&&t<224?(a-i>=6?(r=parseInt(e.substr(i+4,2),16),o+=String.fromCharCode((31&t)<<6|63&r)):o+=e.substr(i,6),i+=6):t>=224?(a-i>=9?(r=parseInt(e.substr(i+4,2),16),n=parseInt(e.substr(i+7,2),16),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n)):o+=e.substr(i,9),i+=9):(o+=e.substr(i,3),i+=3);return o}function u(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function c(e){return e.toUpperCase()}function f(e,t){function r(e){var r=a(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,n).replace(t.PCT_ENCODED,c)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,n).replace(t.PCT_ENCODED,c)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,n).replace(t.PCT_ENCODED,c)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,n).replace(t.PCT_ENCODED,c)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,n).replace(t.PCT_ENCODED,c)),e}function l(e,t){void 0===t&&(t={});var r,n,u=o&&t.iri!==!1?E:w,c=!1,l={};if("suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e),i?(r=e.match(u.URI_REF),r&&(r=r[1]?r.slice(1,10):r.slice(10,19)),r||(c=!0,t.tolerant||(l.error=l.error||"URI is not strictly valid."),r=e.match(O))):r=e.match(O),r){if(S?(l.scheme=r[1],l.userinfo=r[3],l.host=r[4],l.port=parseInt(r[5],10),l.path=r[6]||"",l.query=r[7],l.fragment=r[8],isNaN(l.port)&&(l.port=r[5])):(l.scheme=r[1]||void 0,l.userinfo=e.indexOf("@")!==-1?r[3]:void 0,l.host=e.indexOf("//")!==-1?r[4]:void 0,l.port=parseInt(r[5],10),l.path=r[6]||"",l.query=e.indexOf("?")!==-1?r[7]:void 0,l.fragment=e.indexOf("#")!==-1?r[8]:void 0,isNaN(l.port)&&(l.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),void 0!==l.scheme||void 0!==l.userinfo||void 0!==l.host||void 0!==l.port||l.path||void 0!==l.query?void 0===l.scheme?l.reference="relative":void 0===l.fragment?l.reference="absolute":l.reference="uri":l.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==l.reference&&(l.error=l.error||"URI is not a "+t.reference+" reference."),n=k[(t.scheme||l.scheme||"").toLowerCase()],!o||"undefined"==typeof s||t.unicodeSupport||n&&n.unicodeSupport)f(l,u);else{if(l.host&&(t.domainHost||n&&n.domainHost))try{l.host=s.toASCII(l.host.replace(u.PCT_ENCODED,a).toLowerCase())}catch(e){l.error=l.error||"Host's domain name can not be converted to ASCII via punycode: "+e}f(l,w)}n&&n.parse&&n.parse(l,t)}else c=!0,l.error=l.error||"URI can not be parsed.";return l}function p(e,t){var r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(e.host),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}function d(e){for(var t,r=[];e.length;)e.match($)?e=e.replace($,""):e.match(C)?e=e.replace(C,"/"):e.match(P)?(e=e.replace(P,"/"),r.pop()):"."===e||".."===e?e="":(t=e.match(A)[0],e=e.slice(t.length),r.push(t));return r.join("")}function h(e,t){void 0===t&&(t={});var r,n,i,u=o&&t.iri?E:w,c=[];if(r=k[(t.scheme||e.scheme||"").toLowerCase()],r&&r.serialize&&r.serialize(e,t),o&&"undefined"!=typeof s&&e.host&&(t.domainHost||r&&r.domainHost))try{e.host=t.iri?s.toUnicode(e.host):s.toASCII(e.host.replace(u.PCT_ENCODED,a).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}return f(e,u),"suffix"!==t.reference&&e.scheme&&(c.push(e.scheme),c.push(":")),n=p(e,t),void 0!==n&&("suffix"!==t.reference&&c.push("//"),c.push(n),e.path&&"/"!==e.path.charAt(0)&&c.push("/")),void 0!==e.path&&(i=e.path,t.absolutePath||r&&r.absolutePath||(i=d(i)),void 0===n&&(i=i.replace(/^\/\//,"/%2F")),c.push(i)),void 0!==e.query&&(c.push("?"),c.push(e.query)),void 0!==e.fragment&&(c.push("#"),c.push(e.fragment)),c.join("")}function m(e,t,r,n){void 0===r&&(r={});var o={};return n||(e=l(h(e,r),r),t=l(h(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=d(t.path),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=d(t.path),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=d(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=d(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function y(e,t,r){return h(m(l(e,r),l(t,r),r,!0),r)}function v(e,t){return"string"==typeof e?e=h(l(e,t),t):"object"===u(e)&&(e=l(h(e,t),t)),e}function g(e,t,r){return"string"==typeof e?e=h(l(e,r),r):"object"===u(e)&&(e=h(e,r)),"string"==typeof t?t=h(l(t,r),r):"object"===u(t)&&(t=h(t,r)),e===t}function b(e,t){return e&&e.toString().replace(o&&t&&t.iri?E.ESCAPE:w.ESCAPE,n)}function x(e,t){return e&&e.toString().replace(o&&t&&t.iri?E.PCT_ENCODED:w.PCT_ENCODED,a)}var w=r(!1),E=o?r(!0):void 0,O=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i,$=/^\.\.?\//,C=/^\/\.(\/|$)/,P=/^\/\.\.(\/|$)/,A=/^\/?(?:.|\n)*?(?=\/|$)/,S=void 0==="".match(/(){0}/)[1],k={};return{IRI_SUPPORT:o,VALIDATE_SUPPORT:i,pctEncChar:n,pctDecChars:a,SCHEMES:k,parse:l,_recomposeAuthority:p,removeDotSegments:d,serialize:h,resolveComponents:m,resolve:y,normalize:v,equal:g,escapeComponent:b,unescapeComponent:x}}();if(!n&&"undefined"!=typeof t&&"function"==typeof e){var s=e("./punycode");t.exports=a,e("./schemes")}},{"./punycode":18,"./schemes":19}]},{},[1])(1)})},function(e,t,r){"use strict";function n(e,t){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.i(i.createDefaults)(),c=arguments[3],f=arguments[4],l=arguments[5],p=arguments[6],d=[],h=[];t=t||[];var m=t.indexOf("*");f=f||{};var y={},v=t.indexOf("...");if("object"===("undefined"==typeof e?"undefined":s(e))&&e.hasOwnProperty("properties")){l=l||e.readonly||e.readOnly,y=r.i(i.defaultForm)(e,u,c,f);var g=y.lookup;e=g||e,d=d.concat(y.form)}return m!==-1&&(t=t.slice(0,m).concat(d).concat(t.slice(m+1))),y.form&&v!==-1&&!function(){var e=t.map(function(e){return"string"==typeof e?e:e.key?e.key:void 0}).filter(function(e){return void 0!==e});h=h.concat(y.form.map(function(t){var r=e.indexOf(t.key[0])!==-1;if(!r)return t}).filter(function(e){return void 0!==e}))}(),v!==-1&&(t=t.slice(0,v).concat(h).concat(t.slice(v+1))),t.map(function(t){if("string"==typeof t&&(t={key:t}),t.key&&"string"==typeof t.key&&(t.key=r.i(o.parse)(t.key)),t.titleMap&&(t.titleMap=r.i(a.a)(t.titleMap)),t.key){var i=r.i(o.stringify)(t.key);e[i]&&!function(){var r=e[i];r&&Object.keys(r).forEach(function(e){void 0===t[e]&&(t[e]=r[e])})}()}return l===!0&&(t.readonly=!0),t.items&&(t.items=n(e,t.items,u,c,f,t.readonly,p)),t.tabs&&t.tabs.forEach(function(r){r.items&&(r.items=n(e,r.items,u,c,f,t.readonly,p))}),"checkbox"===t.type&&(void 0===t.schema?t.schema={default:!1}:void 0===t.schema.default&&(t.schema.default=!1)),p&&"template"===t.type&&!t.template&&t.templateUrl&&p.push(t),t})}var o=r(0),i=r(3),a=r(1);t.a=n;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}},function(e,t,r){"use strict";function n(e,t){var r=new Promise(function(t,r){o.resolveRefs(e,{filter:["relative","local","remote"]}).then(function(e){t(e.resolved)}).catch(function(e){r(new Error(e))})});return"function"!=typeof t?r:void r.then(function(e){t(null,e)}).catch(function(e){t(e)})}var o=r(5);r.n(o);t.a=n},function(e,t,r){"use strict";function n(e,t,r){t||(t=this);var n="string"==typeof e?o.parse(e):e;if("undefined"!=typeof r&&1===n.length)return t[n[0]]=r,t;"undefined"!=typeof r&&"undefined"==typeof t[n[0]]&&(t[n[0]]=n.length>2&&i.test(n[1])?[]:{});for(var a=t[n[0]],s=1;s<n.length;s++){if(""===n[s])return;if("undefined"!=typeof r){if(s===n.length-1)return a[n[s]]=r,r;var u=a[n[s]];"undefined"!=typeof u&&null!==u||(u=i.test(n[s+1])?[]:{},a[n[s]]=u),a=u}else a&&(a=a[n[s]])}return a}var o=r(0);t.a=n;var i=/^\d+$/},function(e,t,r){"use strict";function n(e,t,r,n){n=void 0===n||n,r=r||[];var o=function e(t,r,o){if(r(t,o),t.properties&&Object.keys(t.properties).forEach(function(n){var i=o.slice();i.push(n),e(t.properties[n],r,i)}),!n&&t.items){var i=o.slice();i.push(""),e(t.items,r,i)}};o(e,t,r||[])}function o(e,t){t(e),e.items&&e.items.forEach(function(e){o(e,t)}),e.tabs&&e.tabs.forEach(function(e){e.items&&e.items.forEach(function(e){o(e,t)})})}t.a=n,t.b=o},function(e,t,r){"use strict";function n(e,t){if(!e)return{valid:!0};var r=e.schema;if(!r)return{valid:!0};""===t&&(t=void 0),"number"===e.type&&null===t&&(t=void 0);var n={type:"object",properties:{},required:void 0},o=e.key[e.key.length-1];n.properties[o]=r,e.required&&(n.required=[o]);var a={};return"undefined"!=typeof t&&(a[o]=t),i.a.validateResult(a,n)}var o=r(12),i=r.n(o);t.a=n},function(e,t,r){"use strict";var n;!function(o){var i={parse:function(e){if("string"!=typeof e)throw new TypeError("ObjectPath.parse must be passed a string");for(var t,r,n,o,i=0,a=[];i<e.length;)if(t=e.indexOf(".",i),r=e.indexOf("[",i),t===-1&&r===-1)a.push(e.slice(i,e.length)),i=e.length;else if(r===-1||t!==-1&&t<r)a.push(e.slice(i,t)),i=t+1;else if(r>i&&(a.push(e.slice(i,r)),i=r),n=e.slice(r+1,r+2),'"'!==n&&"'"!==n)o=e.indexOf("]",r),o===-1&&(o=e.length),a.push(e.slice(i+1,o)),i="."===e.slice(o+1,o+2)?o+2:o+1;else{for(o=e.indexOf(n+"]",r),o===-1&&(o=e.length);"\\"===e.slice(o-1,o)&&r<e.length;)r++,o=e.indexOf(n+"]",r);a.push(e.slice(i+2,o).replace(new RegExp("\\"+n,"g"),n)),i="."===e.slice(o+2,o+3)?o+3:o+2}return a},stringify:function(e,t){return Array.isArray(e)||(e=[e.toString()]),t='"'===t?'"':"'",e.map(function(e){return"["+t+e.toString().replace(new RegExp(t,"g"),"\\"+t)+t+"]"}).join("")},normalize:function(e,t){return i.stringify(Array.isArray(e)?e:i.parse(e),t)},registerModule:function(e){e.module("ObjectPath",[]).provider("ObjectPath",function(){this.parse=i.parse,this.stringify=i.stringify,this.normalize=i.normalize,this.$get=function(){return i}})}};n=function(){return{ObjectPath:i}}.call(t,r,t,e),!(n!==o&&(e.exports=n))}()},function(e,t){e.exports=tv4},function(e,t,r){e.exports=r(4)}])}).call(t,r(2),r(19).setImmediate)},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=(r.n(n),r(0)),i=r.n(o),a=r(14),s=r(12),u=r(13),c=r(15),f=r(16),l=r(7),p=r(8),d=r(10),h=r(6),m=r(9),y=r(11),v=r(5),g=[];try{i.a.module("ngSanitize"),g.push("ngSanitize")}catch(e){}try{i.a.module("ui.sortable"),g.push("ui.sortable")}catch(e){}try{i.a.module("angularSpectrumColorpicker"),g.push("angularSpectrumColorpicker")}catch(e){}i.a.module("schemaForm",g).provider("sfPath",f.a).provider("sfBuilder",["sfPathProvider",a.a]).provider("schemaFormDecorators",["$compileProvider","sfPathProvider",s.a]).provider("sfErrorMessage",c.a).provider("schemaForm",["sfPathProvider",u.a]).factory("sfSelect",function(){return n.select}).factory("sfValidator",function(){return n.validate}).directive("sfChanged",l.a).directive("sfField",["$parse","$compile","$interpolate","sfErrorMessage","sfPath","sfSelect",p.a]).directive("sfMessage",["$injector","sfErrorMessage",d.a]).directive("sfNewArray",["sfSelect","sfPath","schemaForm",h.a]).directive("sfSchema",["$compile","$http","$templateCache","$q","schemaForm","schemaFormDecorators","sfSelect","sfBuilder",y.a]).directive("schemaValidate",["sfValidator","$parse","sfSelect","$interpolate",v.a]).directive("sfKeyController",["sfPath",m.a])},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t,r,n){return{restrict:"A",scope:!1,priority:500,require:"ngModel",link:function(t,i,a,s){t.$emit("schemaFormPropagateNgModelController",s);var u=null,c=t.$eval(a.schemaValidate),f="string"==typeof c.copyValueTo?[c.copyValueTo]:c.copyValueTo;f&&f.length&&s.$viewChangeListeners.push(function(){var e={model:t.model,form:c,arrayIndex:t.$index,arrayIndices:t.arrayIndices,path:t.path,$i:t.$i,$index:t.$index};o.a.forEach(f,function(o){var i=o.replace(/\[/g,"[{{ ").replace(/\]/g," }}]").replace(/^model\./,"");i=n(i)(e),r(i,t.model,s.$modelValue)})});var l=function(r,n){if(!c)return r;if(t.options&&t.options.tv4Validation===!1)return r;var o=e(c,r);Object.keys(s.$error).filter(function(e){return 0===e.indexOf("tv4-")}).forEach(function(e){s.$setValidity(e,!0)});{if(o.valid||s.$pristine&&!n&&t.options.validateOnRender!==!0)return r;if(s.$setValidity("tv4-"+o.error.code,!1),u=o.error,s.$validators)return r}};"function"==typeof c.ngModel&&c.ngModel(s),["$parsers","$viewChangeListeners","$formatters"].forEach(function(e){c[e]&&s[e]&&c[e].forEach(function(t){s[e].push(t)})}),["$validators","$asyncValidators"].forEach(function(e){c[e]&&s[e]&&o.a.forEach(c[e],function(r,n){s[e][n]=function(e,n){return r(e,n,t.model,c)}})}),s.$parsers.push(l),s.$validators&&(s.$validators.schemaForm=function(){return!Object.keys(s.$error).some(function(e){return"schemaForm"!==e})});var p=c.schema;t.validateField=function(e,t){var r=void 0===e;(r||s.$$parentForm.$name===e)&&((r||p&&p.type.indexOf("array")!==-1)&&l(s.$modelValue,t),s.$setDirty?(s.$setDirty(),s.$setViewValue(s.$viewValue),s.$commitViewValue(),"checkbox"===c.type?c.required&&void 0===s.$modelValue&&s.$setValidity("tv4-302",!1):c.required&&s.$isEmpty(s.$modelValue)&&s.$setValidity("tv4-302",!1)):s.$setViewValue(s.$viewValue))};var d=!0;s.$formatters.push(function(e){return!s.$pristine||!d||t.options&&t.options.validateOnRender===!0?(l(s.$modelValue),e):(d=!1,e)}),t.$on("schemaFormValidate",function(e,r){t.validateField(r,!0)}),t.schemaError=function(){return u}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=function(e,t,r){return{scope:!0,controller:["$scope",function(e){this.key=e.form&&e.form.key?e.form.key.splice(0,-2):[]}],link:function(n,a,s){n.min=0,n.trackBy=function(e,t){return e&&"object"===("undefined"==typeof e?"undefined":i(e))?e:t},n.modelArray=n.$eval(s.sfNewArray);var u=function(){n.modelArray=n.$eval(s.sfNewArray),n.ngModel&&n.ngModel.$pristine&&n.firstDigest&&(!n.options||n.options.validateOnRender!==!0)||n.validateField&&n.validateField()},c=function(){n.form&&n.form.onChange&&(o.a.isFunction(n.form.onChange)?n.form.onChange(n.modelArray,n.form):n.evalExpr(n.form.onChange,{modelValue:n.modelArray,form:n.form}))},f=function(){var r=n.modelArray;if(!r){var o=t.parse(s.sfNewArray);r=[],e(o,n,r),n.modelArray=r}return r},l=n.$watch("form",function(e){if(e){if(e.titleMap||e.startEmpty===!0||n.modelArray&&0!==n.modelArray.length||n.appendToArray(),n.$watch(function(e){return JSON.stringify(e.modelArray)},function(){u(),c()}),e.titleMap&&e.titleMap.length>0){n.titleMapValues=[];var t=function(t){n.titleMapValues=[],t=t||[],e.titleMap.forEach(function(e){n.titleMapValues.push(t.indexOf(e.value)!==-1)})};t(n.modelArray),n.$watchCollection("modelArray",t),n.$watchCollection("titleMapValues",function(t,r){t&&t!==r&&!function(){var r=f();e.titleMap.forEach(function(e,n){var o=r.indexOf(e.value);o===-1&&t[n]&&r.push(e.value),o===-1||t[n]||r.splice(o,1)}),n.validateField&&n.validateField()}()})}l()}});n.appendToArray=function(){var t=void 0,i=f();if(n.form&&n.form.schema&&n.form.schema.items){var a=n.form.schema.items;a.type&&a.type.indexOf("object")!==-1?(t={},n.options&&n.options.setSchemaDefaults===!1||(t=o.a.isDefined(a.default)?a.default:t,t&&r.traverseSchema(a,function(r,n){o.a.isDefined(r.default)&&e(n,t,r.default)}))):(a.type&&(a.type.indexOf("array")!==-1?t=[]:a.type.indexOf("string")===-1&&a.type.indexOf("number")===-1||(t="")),n.options&&n.options.setSchemaDefaults===!1||(t=a.default||t))}return i.push(t),i},n.deleteFromArray=function(e){var t=n.modelArray.indexOf(e),r=n.modelArray;return r&&r.splice(t,1),r};var p=function(e){return function(t){t.key&&(t.key[t.key.indexOf("")]=e)}},d={};n.copyWithIndex=function(e){var t=n.form;if(!d[e]){var i=t.items[0];if(t.items.length>1&&(i={type:"section",items:t.items.map(function(e){return e.ngModelOptions=t.ngModelOptions,o.a.isUndefined(e.readonly)&&(e.readonly=t.readonly),e})}),i){var a=o.a.copy(i);a.arrayIndex=e,r.traverseForm(a,p(e)),d[e]=a}}return d[e]}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(){return{require:"ngModel",restrict:"AC",scope:!1,link:function(e,t,r,n){var i=e.$eval(r.sfChanged);i&&i.onChange&&n.$viewChangeListeners.push(function(){o.a.isFunction(i.onChange)?i.onChange(n.$modelValue,i):e.evalExpr(i.onChange,{modelValue:n.$modelValue,form:i,arrayIndex:e.$index,arrayIndices:e.arrayIndices,path:e.path,$i:e.$i,$index:e.$index})})}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=function(e,t,r,n,a,s){var u={COMPLETE:"*",PATH:"string",INDICES:"number"};return{restrict:"AE",replace:!1,transclude:!1,scope:!0,require:["^sfSchema","?^form","?^^sfKeyController"],link:{pre:function(e,t,r,n){var o=n[0];e.$on("schemaFormPropagateNgModelController",function(t,r){t.stopPropagation(),t.preventDefault(),e.ngModel=r}),e.initialForm=Object.assign({},o.lookup["f"+r.sfField]),e.form=o.lookup["f"+r.sfField]},post:function(e,t,c,f){var l=f[0],p=f[1];e.getKey=function(t){var r=t||u.COMPLETE,n=e.parentKey?e.parentKey.slice(0,e.parentKey.length-1):[];if(e.completeKey!==e.form.key&&("number"==typeof e.$index&&(n=n.concat(e.$index)),e.form.key&&e.form.key.length))if("number"==typeof n[n.length-1]&&e.form.key.length>=1){var o=e.form.key.length-n.length;e.completeKey=o>0?n.concat(e.form.key.slice(-o)):n}else e.completeKey=e.form.key.slice();if(Array.isArray(e.completeKey))return r===u.COMPLETE?e.completeKey:e.completeKey.reduce(function(e,t,n){return-1!==[r].indexOf("undefined"==typeof t?"undefined":i(t))?e.concat(t):e},[])},e.form.key&&(e.form.key=e.completeKey=e.getKey()),e.showTitle=function(){return e.form&&e.form.notitle!==!0&&e.form.title},e.fieldId=function(t,r){var n=r||!1,o=t&&p&&p.$name?p.$name:void 0,i=e.completeKey;return Array.isArray(i)?a.name(i,"-",o,n):""},e.listToCheckboxValues=function(e){var t={};return o.a.forEach(e,function(e){t[e]=!0}),t},e.checkboxValuesToList=function(e){var t=[];return o.a.forEach(e,function(e,r){e&&t.push(r)}),t},e.buttonClick=function(t,r){o.a.isFunction(r.onClick)?r.onClick(t,r):o.a.isString(r.onClick)&&(l?l.evalInParentScope(r.onClick,{$event:t,form:r}):e.$eval(r.onClick,{$event:t,form:r}))},e.evalExpr=function(t,r){return l?l.evalInParentScope(t,r):e.$eval(t,r)},e.evalInScope=function(t,r){if(t)return e.$eval(t,r)},e.interp=function(e,t){return e&&r(e)(t)},e.hasSuccess=function(){return!!e.ngModel&&(e.options&&e.options.pristine&&e.options.pristine.success===!1?e.ngModel.$valid&&!e.ngModel.$pristine&&!e.ngModel.$isEmpty(e.ngModel.$modelValue):e.ngModel.$valid&&(!e.ngModel.$pristine||!e.ngModel.$isEmpty(e.ngModel.$modelValue)))},e.hasError=function(){return!!e.ngModel&&(e.options&&e.options.pristine&&e.options.pristine.errors===!1?e.ngModel.$invalid&&!e.ngModel.$pristine:e.ngModel.$invalid)},e.errorMessage=function(t){return n.interpolate(t&&t.code+""||"default",e.ngModel&&e.ngModel.$modelValue||"",e.ngModel&&e.ngModel.$viewValue||"",e.form,e.options&&e.options.validationMessage)},e.form.htmlClass=e.form.htmlClass||"",e.idClass=e.fieldId(!1)+" "+e.fieldId(!1,!0);var d=e.form;d.key&&(e.$on("schemaForm.error."+d.key.join("."),function(t,r,n,o,i){i=o,n!==!0&&n!==!1||(o=n,n=void 0),void 0!=i&&e.ngModel.$$parentForm.$name!==i||e.ngModel&&r&&(e.ngModel.$setDirty?e.ngModel.$setDirty():(e.ngModel.$dirty=!0,e.ngModel.$pristine=!1),n&&(d.validationMessage||(d.validationMessage={}),d.validationMessage[r]=n),e.ngModel.$setValidity(r,o===!0),o===!0&&(e.ngModel.$validate(),e.$broadcast("schemaFormValidate")))}),e.$on("$destroy",function(){var t=e.getKey();if(!e.externalDestructionInProgress){var r=d.destroyStrategy||e.options&&e.options.destroyStrategy||"remove";if(t&&"retain"!==r){var n=d.schema&&d.schema.type||"",i=void 0;if("empty"===r?i=n.indexOf("string")!==-1?"":n.indexOf("object")!==-1?{}:n.indexOf("array")!==-1?[]:void 0:"null"===r&&(i=null),void 0!==i)s(t,e.model,i);else{var a=e.model;if(t.length>1&&(a=s(t.slice(0,t.length-1),a)),void 0===a)return;if(o.a.isArray(a))return void(e.externalDestructionInProgress=!0);delete a[t[t.length-1]]}}}}))}}}}},function(e,t,r){"use strict";t.a=function(e){return{scope:!0,require:["?^^sfNewArray"],link:{pre:function(t,r,n,o){t.parentKey=t.parentKey||[];var i=e.parse(n.sfParentKey),a=i.length-t.parentKey.length;i.length>1&&(i=i.splice(-a)),t.parentKey=t.parentKey.concat(i,Number(n.sfIndex)),t.arrayIndex=Number(n.sfIndex),t.arrayIndices=t.arrayIndices||[],t.arrayIndices=t.arrayIndices.concat(t.arrayIndex),t.$i=t.arrayIndices,t.path=function(e){var r=-1;return e=e.replace(/\[\]/gi,function(e){return r++,"["+t.$i[r]+"]"}),t.evalExpr(e,t)}}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t){var r=e.has("$sanitize")?e.get("$sanitize"):function(e){return e};return{scope:!1,restrict:"EA",link:function(e,n,i){var a="";i.sfMessage&&e.$watch(i.sfMessage,function(t){t&&(a=r(t),c(!!e.ngModel))});var s=void 0,u=function(e){e!==s&&(n.html(e),s=e)},c=function(r){r&&e.hasError()?!function(){var r=[];o.a.forEach(e.ngModel&&e.ngModel.$error,function(e,t){e&&r.push(t)}),r=r.filter(function(e){return"schemaForm"!==e});var n=r[0];u(n?t.interpolate(n,e.ngModel.$modelValue,e.ngModel.$viewValue,e.form,e.options&&e.options.validationMessage):a)}():u(a)};c();var f=e.$watch("ngModel",function(e){e&&(e.$parsers.push(function(e){return c(!0),e}),e.$formatters.push(function(e){return c(!0),e}),f())});e.$watchCollection("ngModel.$error",function(){c(!!e.ngModel)})}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t,r,n,i,a,s,u){return{scope:{schema:"=sfSchema",initialForm:"=sfForm",model:"=sfModel",options:"=sfOptions"},controller:["$scope",function(e){this.$onInit=function(){this.evalInParentScope=function(t,r){return e.$parent.$eval(t,r)};var t=this;e.lookup=function(e){return e&&(t.lookup=e),t.lookup}},1===o.a.version.major&&o.a.version.minor<5&&this.$onInit()}],replace:!1,restrict:"A",transclude:!0,require:"?form",link:function(c,f,l,p,d){c.formCtrl=p;var h={};d(c,function(e){if(e.addClass("schema-form-ignore"),f.prepend(e),f[0].querySelectorAll){var t=f[0].querySelectorAll("[ng-model]");if(t)for(var r=0;r<t.length;r++){var n=t[r].getAttribute("ng-model");h[n.substring(n.indexOf(".")+1)]=!0}}});var m={},y=void 0;c.resolveReferences=function(e,t){i.jsonref(e).then(function(e){c.render(e,t)}).catch(function(e){new Error(e)})},c.render=function(e,o){var a=[],s=i.merge(e,o,void 0,h,c.options,void 0,a);a.length>0?n.all(a.map(function(e){return t.get(e.templateUrl,{cache:r}).then(function(t){e.template=t.data})})).then(function(){c.internalRender(e,o,s)}):c.internalRender(e,o,s)},c.internalRender=function(t,r,n){y&&(c.externalDestructionInProgress=!0,y.$destroy(),c.externalDestructionInProgress=!1),y=c.$new(),y.schemaForm={form:n,schema:t},Array.prototype.forEach.call(f.children(),function(e){var t=o.a.element(e);!1===t.hasClass("schema-form-ignore")&&t.remove()});for(var p={},d=f[0].querySelectorAll("*[sf-insert-field]"),h=0;h<d.length;h++)p[d[h].getAttribute("sf-insert-field")]=d[h];var m=a.decorator(l.sfUseDecorator),v=Object.create(null);c.lookup(v),f[0].appendChild(u.build(n,m,p,v)),y.firstDigest=!0,setTimeout(function(){y.firstDigest=!1,c.$apply()},0),e(f.children())(y),c.options&&c.options.setSchemaDefaults===!1||i.traverseSchema(t,function(e,t){if(o.a.isDefined(e.default)){var r=s(t,c.model);if(o.a.isUndefined(r)){var n=e.default;o.a.isObject(n)&&(n=o.a.copy(n)),s(t,c.model,n)}}}),c.$emit("sf-render-finished",f)};var v=["*"];c.$watch(function(){var e=c.schema,t=c.initialForm||v;t&&e&&e.type&&(m.form!==t||m.schema!==e)&&((!e.properties||0===Object.keys(e.properties).length)&&(t.indexOf("*")||t.indexOf("...")),m.schema=e,m.form=t,c.resolveReferences(e,t))}),c.$on("schemaFormRedraw",function(){var e=c.schema,t=c.initialForm?o.a.copy(c.initialForm):["*"];e&&c.resolveReferences(e,t)}),c.$on("$destroy",function(){c.externalDestructionInProgress=!0}),c.evalExpr=function(e,t){return c.$parent.$eval(e,t)}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t){var r="",n={},i=function(e,t){"sfDecorator"===e&&(e=r);var o=n[e];return o[t.type]?o[t.type].template:o.default.template},a=function(r){e.directive(r,["$parse","$compile","$http","$templateCache","$interpolate","$q","sfErrorMessage","sfPath","sfSelect",function(e,n,a,s,u,c,f,l,p){return{restrict:"AE",replace:!1,transclude:!1,scope:!0,require:["?^sfSchema","?^form"],link:function(e,d,h,m){var y=m[0],v=m[1];e.$on("schemaFormPropagateNgModelController",function(t,r){t.stopPropagation(),t.preventDefault(),e.ngModel=r}),e.showTitle=function(){return e.form&&e.form.notitle!==!0&&e.form.title},e.fieldId=function(t,r){var n=e.parentKey||[];if(e.form.key){if("number"==typeof n[n.length-1]){var o=n.concat(e.form.key.slice(-1)),i=t&&v&&v.$name?v.$name:void 0;return l.name(o,"-",i,r)}var a=t&&v&&v.$name?v.$name:void 0;return l.name(e.form.key,"-",a,r)}return""},e.listToCheckboxValues=function(e){var t={};return o.a.forEach(e,function(e){t[e]=!0}),t},e.checkboxValuesToList=function(e){var t=[];return o.a.forEach(e,function(e,r){e&&t.push(r)}),t},e.buttonClick=function(t,r){o.a.isFunction(r.onClick)?r.onClick(t,r):o.a.isString(r.onClick)&&(y?y.evalInParentScope(r.onClick,{$event:t,form:r}):e.$eval(r.onClick,{$event:t,form:r}))},e.evalExpr=function(t,r){return y?y.evalInParentScope(t,r):e.$eval(t,r)},e.evalInScope=function(t,r){if(t)return e.$eval(t,r)},e.interp=function(e,t){return e&&u(e)(t)},e.hasSuccess=function(){return!!e.ngModel&&(e.options&&e.options.pristine&&e.options.pristine.success===!1?e.ngModel.$valid&&!e.ngModel.$pristine&&!e.ngModel.$isEmpty(e.ngModel.$modelValue):e.ngModel.$valid&&(!e.ngModel.$pristine||!e.ngModel.$isEmpty(e.ngModel.$modelValue)))},e.hasError=function(){return!!e.ngModel&&(e.ngModel.$invalid&&!e.ngModel.$pristine)},e.errorMessage=function(t){return f.interpolate(t&&t.code+""||"default",e.ngModel&&e.ngModel.$modelValue||"",e.ngModel&&e.ngModel.$viewValue||"",e.form,e.options&&e.options.validationMessage)};var g=e.$watch(h.form,function(u){if(u){u.ngModelOptions=u.ngModelOptions||{},e.form=u;var f=void 0;if("template"===u.type&&u.template)f=c.when(u.template);else{var h="template"===u.type?u.templateUrl:i(r,u);f=a.get(h,{cache:s}).then(function(e){return e.data})}f.then(function(r){if(u.key){var i=u.key?t.stringify(u.key).replace(/"/g,"""):"";r=r.replace(/\$\$value\$\$/g,"model"+("["!==i[0]?".":"")+i)}d.html(r),u.condition&&!function(){var e='evalExpr(form.condition,{ model: model, "arrayIndex": arrayIndex})';u.key&&(e='evalExpr(form.condition, {model: model, "arrayIndex": arrayIndex, "modelValue": model'+l.stringify(u.key)+"})"),o.a.forEach(d.children(),function(t){var r=t.getAttribute("ng-if");t.setAttribute("ng-if",r?"("+r+") || ("+e+")":e)})}(),n(d.contents())(e)}),u.key&&(e.$on("schemaForm.error."+u.key.join("."),function(t,r,n,o,i){i=o,n!==!0&&n!==!1||(o=n,n=void 0),void 0!=i&&e.ngModel.$$parentForm.$name!==i||void 0!=i&&e.ngModel.$$parentForm.$name!==i||e.ngModel&&r&&(e.ngModel.$setDirty?e.ngModel.$setDirty():(e.ngModel.$dirty=!0,e.ngModel.$pristine=!1),n&&(u.validationMessage||(u.validationMessage={}),u.validationMessage[r]=n),e.ngModel.$setValidity(r,o===!0),o===!0&&(e.ngModel.$validate(),e.$broadcast("schemaFormValidate")))}),e.$on("$destroy",function(){if(!e.externalDestructionInProgress){var t=u.destroyStrategy||e.options&&e.options.destroyStrategy||"remove";if(u.key&&"retain"!==t){var r=e.model;if(u.key.length>1&&(r=p(u.key.slice(0,u.key.length-1),r)),void 0===r)return;var n=u.schema&&u.schema.type||"";"empty"===t&&n.indexOf("string")!==-1?r[u.key.slice(-1)]="":"empty"===t&&n.indexOf("object")!==-1?r[u.key.slice(-1)]={}:"empty"===t&&n.indexOf("array")!==-1?r[u.key.slice(-1)]=[]:"null"===t?r[u.key.slice(-1)]=null:delete r[u.key.slice(-1)]}}})),g()}})}}}])},s=function(t,r,n){n=!!o.a.isDefined(n)&&n,e.directive("sf"+o.a.uppercase(t[0])+t.substr(1),function(){
return{restrict:"EAC",scope:!0,replace:!0,transclude:n,template:'<sf-decorator form="form"></sf-decorator>',link:function(e,r,n){var i={items:"c",titleMap:"c",schema:"c"},a={type:t},s=!0;o.a.forEach(n,function(t,r){if("$"!==r[0]&&0!==r.indexOf("ng")&&"sfField"!==r){var u=function(t){o.a.isDefined(t)&&t!==a[r]&&(a[r]=t,s&&a.type&&(a.key||o.a.isUndefined(n.key))&&(e.form=a,s=!1))};"model"===r?e.$watch(t,function(t){t&&e.model!==t&&(e.model=t)}):"c"===i[r]?e.$watchCollection(t,u):n.$observe(r,u)}})}}})};this.createDecorator=function(e,t){n[e]={__name:e},o.a.forEach(t,function(t,r){n[e][r]={template:t,replace:!1,builder:[]}}),n[r]||(r=e),a(e)},this.defineDecorator=function(e,t){n[e]={__name:e},o.a.forEach(t,function(t,r){t.builder=t.builder||[],t.replace=!o.a.isDefined(t.replace)||t.replace,n[e][r]=t}),n[r]||(r=e),a(e)},this.createDirective=s,this.createDirectives=function(e){o.a.forEach(e,function(e,t){s(t,e)})},this.decorator=function(e){return e=e||r,n[e]},this.addMapping=function(e,t,r,o,i){n[e]&&(n[e][t]={template:r,builder:o,replace:!!i})},this.defineAddOn=function(e,t,r,o){n[e]&&(n[e][t]={template:r,builder:o,replace:!0})},this.$get=function(){return{decorator:function(e){return n[e]||n[r]},defaultDecorator:r}},a("sfDecorator")}},function(e,t,r){"use strict";var n=r(1);r.n(n);t.a=function(){var e=function(e){return e},t=n.schemaDefaults.createDefaults();this.defaults=t,this.stdFormObj=n.schemaDefaults.stdFormObj,this.defaultFormDefinition=n.schemaDefaults.defaultFormDefinition,this.postProcess=function(t){e=t},this.appendRule=function(e,t){this.defaults[e]||(this.defaults[e]=[]),this.defaults[e].push(t)},this.prependRule=function(e,t){this.defaults[e]||(this.defaults[e]=[]),this.defaults[e].unshift(t)},this.createStandardForm=n.schemaDefaults.stdFormObj,this.$get=function(){var t={},o=this.defaults;return t.jsonref=n.jsonref,t.defaults=function(e,t,r,i){var a=t||o;return n.schemaDefaults.defaultForm(e,a,r,i)},t.merge=function(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["*"],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.typeDefault,s=arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],f=arguments[6],l=r.i(n.merge)(o,i,a,s,u,c,f);return e(l)},t.typeDefault=o,t.traverseSchema=n.traverseSchema,t.traverseForm=n.traverseForm,t}}},function(e,t,r){"use strict";t.a=function(e){var t=/[A-Z]/g,r=function(e,r){return r=r||"_",e.replace(t,function(e,t){return(t?r:"")+e.toLowerCase()})},n=0;"firstElementChild"in document.createDocumentFragment()||Object.defineProperty(DocumentFragment.prototype,"firstElementChild",{get:function(){for(var e,t=this.childNodes,r=0,n=t.length;r<n;++r)if(e=t[r],1===e.nodeType)return e;return null}});var o={sfField:function(e){e.fieldFrag.firstElementChild.setAttribute("sf-field",n),e.lookup["f"+n]=e.form,n++},ngModel:function(t){if(t.form.key){var r=t.form.key;t.state.keyRedaction&&(r=r.slice(t.state.keyRedaction));var n=void 0;if(t.state.modelValue)n=t.state.modelValue;else{var o=e.stringify(r).replace(/"/g,""");n=t.state.modelName||"model",o&&(n+=("["!==o[0]?".":"")+o)}for(var i=t.fieldFrag.querySelectorAll("[sf-field-model]"),a=0;a<i.length;a++){var s=i[a],u=s.getAttribute("sf-field-model");if(u&&""!==u)if("replaceAll"===u)for(var c=s.attributes,f=0;f<c.length;f++)c[f].value&&c[f].value.indexOf("$$value")!==-1&&(c[f].value=c[f].value.replace(/\$\$value\$\$/g,n));else{var l=s.getAttribute(u);l&&l.indexOf("$$value$$")?s.setAttribute(u,l.replace(/\$\$value\$\$/g,n)):s.setAttribute(u,n)}else s.setAttribute("ng-model",n)}}},simpleTransclusion:function(e){var t=e.build(e.form.items,e.path+".items",e.state);e.fieldFrag.firstChild.appendChild(t)},ngModelOptions:function(e){e.form.ngModelOptions&&Object.keys(e.form.ngModelOptions).length>0&&e.fieldFrag.firstChild.setAttribute("ng-model-options",JSON.stringify(e.form.ngModelOptions))},transclusion:function(e){var t=e.fieldFrag.querySelectorAll("[sf-field-transclude]");if(t.length)for(var r=0;r<t.length;r++){var n=t[r],o=n.getAttribute("sf-field-transclude")||"items",i=e.form[o];if(i){var a=e.build(i,e.path+"."+o,e.state);n.appendChild(a)}}},condition:function(t){var r="",n="undefined",o="";if(t.form.condition){t.form.key&&(r=e.stringify(t.form.key),n="model"+("["===r[0]?"":".")+r);for(var i="evalExpr("+t.path+'.condition, { model: model, "arrayIndex": $index, "arrayIndices": arrayIndices, "path": path, "$i": $i, "$index": $index, "modelValue": '+n+"})",a=t.fieldFrag.children||t.fieldFrag.childNodes,s=0;s<a.length;s++){var u=a[s];u.hasAttribute&&u.hasAttribute("ng-if")&&(o=u.getAttribute("ng-if")),u.setAttribute&&u.setAttribute("ng-if",o?"("+o+") || ("+i+")":i)}}},array:function(e){var t=e.fieldFrag.querySelector("[schema-form-array-items]");if(t){var r=angular.copy(e.state);r.keyRedaction=0,r.keyRedaction+=e.form.key.length+1,e.form.schema&&e.form.schema.items&&e.form.schema.items.type&&e.form.schema.items.type.indexOf("object")===-1&&e.form.schema.items.type.indexOf("array")===-1?r.modelValue="modelArray[$index]":r.modelName="item",r.arrayCompatFlag=!0;var n=e.build(e.form.items,e.path+".items",r);t.appendChild(n)}},numeric:function(e){var t=e.fieldFrag.querySelector("input"),r=e.form.maximum||!1,n=e.form.exclusiveMaximum||!1,o=e.form.minimum||!1,i=e.form.exclusiveMinimum||!1,a=e.form.multipleOf||!1;t&&(a!==!1&&t.setAttribute("step",a),r!==!1&&(n!==!1&&a!==!1&&(r-=a),t.setAttribute("max",r)),o!==!1&&(i!==!1&&a!==!1&&(o+=a),t.setAttribute("min",o)))}};this.builders=o;var i=[o.sfField,o.ngModel,o.ngModelOptions,o.condition];this.stdBuilders=i,this.$get=["$templateCache","schemaFormDecorators","sfPath",function(e,t,n){var a=function(e,t){if(e.key){var r=t[n.stringify(e.key)];if(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}}},s=function e(t,n,o,i,s,u,c){u=u||{},u=u||{},c=c||Object.create(null),s=s||"schemaForm.form";var f=document.createDocumentFragment();return t.reduce(function(t,f,l){if(!f.type)return t;var p=n[f.type]||n.default;if(p.replace)!function(){var r=void 0;u.arrayCompatFlag=!1;var d=document.createElement("div"),h=o(f,p)||o(f,n.default);for(d.innerHTML=h,r=document.createDocumentFragment();d.childNodes.length>0;)r.appendChild(d.childNodes[0]);var m={fieldFrag:r,form:f,lookup:c,state:u,path:s+"["+l+"]",build:function(t,r,a){return e(t,n,o,i,r,a,c)}},y=f.builder||p.builder;"function"==typeof y?y(m):y.forEach(function(e){e(m)}),(a(f,i)||t).appendChild(r)}();else{var d=document.createElement(r(n.__name,"-"));u.arrayCompatFlag?d.setAttribute("form","copyWithIndex($index)"):d.setAttribute("form",s+"["+l+"]"),(a(f,i)||t).appendChild(d)}return t},f),f};return{build:function(t,r,n,o){return s(t,r,function(t,r){return"template"===t.type?t.template:e.get(r.template)},n,void 0,void 0,o)},builder:o,stdBuilders:i,internalBuild:s}}]}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(){var e=this,t={default:"Field does not validate",0:"Invalid type, expected {{schema.type}}",1:"No enum match for: {{viewValue}}",10:'Data does not match any schemas from "anyOf"',11:'Data does not match any schemas from "oneOf"',12:'Data is valid against more than one schema from "oneOf"',13:'Data matches schema from "not"',100:"Value is not a multiple of {{schema.multipleOf}}",101:"{{viewValue}} is less than the allowed minimum of {{schema.minimum}}",102:"{{viewValue}} is equal to the exclusive minimum {{schema.minimum}}",103:"{{viewValue}} is greater than the allowed maximum of {{schema.maximum}}",104:"{{viewValue}} is equal to the exclusive maximum {{schema.maximum}}",105:"Value is not a valid number",200:"String is too short ({{viewValue.length}} chars), minimum {{schema.minLength}}",201:"String is too long ({{viewValue.length}} chars), maximum {{schema.maxLength}}",202:"String does not match pattern: {{schema.pattern}}",300:"Too few properties defined, minimum {{schema.minProperties}}",301:"Too many properties defined, maximum {{schema.maxProperties}}",302:"Required",303:"Additional properties not allowed",304:"Dependency failed - key must exist",400:"Array is too short ({{value.length}}), minimum {{schema.minItems}}",401:"Array is too long ({{value.length}}), maximum {{schema.maxItems}}",402:"Array items are not unique",403:"Additional items not allowed",500:"Format validation failed",501:'Keyword failed: "{{title}}"',600:"Circular $refs",1e3:"Unknown property (not in schema)"};t.number=t[105],t.required=t[302],t.min=t[101],t.max=t[103],t.maxlength=t[201],t.minlength=t[200],t.pattern=t[202],e.setDefaultMessages=function(e){t=e},e.getDefaultMessages=function(){return t},e.setDefaultMessage=function(e,r){t[e]=r},e.$get=["$interpolate",function(e){var r={};return r.defaultMessages=t,r.interpolate=function(r,n,i,a,s){s=s||{};var u=a.validationMessage||{};0===r.indexOf("tv4-")&&(r=r.substring(4));var c=u.default||s.default||"";[u,s,t].some(function(e){return o.a.isString(e)||o.a.isFunction(e)?(c=e,!0):e&&e[r]?(c=e[r],!0):void 0});var f={error:r,value:n,viewValue:i,form:a,schema:a.schema,title:a.title||a.schema&&a.schema.title};return o.a.isFunction(c)?c(f):e(c)(f)},r}]}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=r(1),i=(r.n(o),function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()),a=function(){function e(){n(this,e),this.name=o.sfPath.name,this.parse=o.sfPath.parse,this.stringify=o.sfPath.stringify,this.normalize=o.sfPath.normalize}return i(e,[{key:"$get",value:function(){return o.sfPath}}]),e}();t.a=a},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++y<t;)d&&d[y].run();y=-1,t=h.length}d=null,m=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(e){l=n}}();var d,h=[],m=!1,y=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new u(e,t)),1!==h.length||m||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,r){(function(e,t){!function(e,r){"use strict";function n(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return m[h]=n,d(h),h++}function o(e){delete m[e]}function i(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(r,n)}}function a(e){if(y)setTimeout(a,0,e);else{var t=m[e];if(t){y=!0;try{i(t)}finally{o(e),y=!1}}}}function s(){d=function(e){t.nextTick(function(){a(e)})}}function u(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}function c(){var t="setImmediate$"+Math.random()+"$",r=function(r){r.source===e&&"string"==typeof r.data&&0===r.data.indexOf(t)&&a(+r.data.slice(t.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),d=function(r){e.postMessage(t+r,"*")}}function f(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;a(t)},d=function(t){e.port2.postMessage(t)}}function l(){var e=v.documentElement;d=function(t){var r=v.createElement("script");r.onreadystatechange=function(){a(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r)}}function p(){d=function(e){setTimeout(a,0,e)}}if(!e.setImmediate){var d,h=1,m={},y=!1,v=e.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(e);g=g&&g.setTimeout?g:e,"[object process]"==={}.toString.call(e.process)?s():u()?c():e.MessageChannel?f():v&&"onreadystatechange"in v.createElement("script")?l():p(),g.setImmediate=n,g.clearImmediate=o}}("undefined"==typeof self?"undefined"==typeof e?this:e:self)}).call(t,r(2),r(17))},function(e,t,r){function n(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new n(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new n(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(18),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},,function(e,t,r){r(1),e.exports=r(4)}]);