silverstripe-tagfield/client/dist/js/bundle.js

1 line
21 KiB
JavaScript

!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(t,e,n){"use strict";var o=n("./client/src/boot/registerComponents.js"),r=function(t){return t&&t.__esModule?t:{default:t}}(o);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)()})},"./client/src/boot/registerComponents.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),s=o(r),i=n("./client/src/components/TagField.js"),a=o(i);e.default=function(){s.default.component.registerMany({TagField:a.default})}},"./client/src/bundles/bundle.js":function(t,e,n){"use strict";n("./client/src/legacy/entwine/TagField.js"),n("./client/src/boot/index.js")},"./client/src/components/TagField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(1),f=o(c),p=n(4),d=o(p),m=n(2),v=o(m),b=n("./node_modules/url/url.js"),y=o(b),j=n("./node_modules/lodash/debounce.js"),g=o(j),O=function(t){function e(t){i(this,e);var n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:t.value},n.onChange=n.onChange.bind(n),n.getOptions=n.getOptions.bind(n),n.fetchOptions=(0,g.default)(n.fetchOptions,500),n}return u(e,t),h(e,[{key:"onChange",value:function(t){this.setState({value:t}),"function"==typeof this.props.onChange&&this.props.onChange(t)}},{key:"getOptions",value:function(t){var e=this.props,n=e.lazyLoad,o=e.options;return n?t?this.fetchOptions(t):Promise.resolve({options:[]}):Promise.resolve({options:o})}},{key:"fetchOptions",value:function(t){var e=this.props,n=e.optionUrl,o=e.labelKey,r=e.valueKey,i=y.default.parse(n,!0);return i.query.term=t,(0,v.default)(y.default.format(i),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){return{options:t.items.map(function(t){var e;return e={},s(e,o,t.id),s(e,r,t.text),e})}})}},{key:"render",value:function(){var t=this.props,e=t.lazyLoad,n=t.options,o=t.creatable,s=r(t,["lazyLoad","options","creatable"]),i=e?{loadOptions:this.getOptions}:{options:n},a=d.default;return e&&o?a=d.default.AsyncCreatable:e?a=d.default.Async:o&&(a=d.default.Creatable),s.value=this.state.value,f.default.createElement(a,l({},s,{onChange:this.onChange,inputProps:{className:"no-change-track"}},i))}}]),e}(c.Component);O.propTypes={name:c.PropTypes.string.isRequired,labelKey:c.PropTypes.string.isRequired,valueKey:c.PropTypes.string.isRequired,lazyLoad:c.PropTypes.bool.isRequired,creatable:c.PropTypes.bool.isRequired,multi:c.PropTypes.bool.isRequired,disabled:c.PropTypes.bool,options:c.PropTypes.arrayOf(c.PropTypes.object),optionUrl:c.PropTypes.string,value:c.PropTypes.any,onChange:c.PropTypes.func,onBlur:c.PropTypes.func},O.defaultProps={labelKey:"Title",valueKey:"Value",disabled:!1},e.default=O},"./client/src/legacy/entwine/TagField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},s=n(1),i=o(s),a=n(3),u=o(a),l=n(0);window.jQuery.entwine("ss",function(t){t(".js-injector-boot .ss-tag-field").entwine({onmatch:function(){var t=this,e=this.closest(".cms-content").attr("id"),n=e?{context:e}:{},o=(0,l.loadComponent)("TagField",n),s=r({},this.data("schema"),{onBlur:function(){t.parents(".cms-edit-form:first").trigger("change")}});u.default.render(i.default.createElement(o,s),this[0])},onunmatch:function(){u.default.unmountComponentAtNode(this[0])}})})},"./node_modules/lodash/_Symbol.js":function(t,e,n){var o=n("./node_modules/lodash/_root.js"),r=o.Symbol;t.exports=r},"./node_modules/lodash/_baseGetTag.js":function(t,e,n){function o(t){return null==t?void 0===t?u:a:l&&l in Object(t)?s(t):i(t)}var r=n("./node_modules/lodash/_Symbol.js"),s=n("./node_modules/lodash/_getRawTag.js"),i=n("./node_modules/lodash/_objectToString.js"),a="[object Null]",u="[object Undefined]",l=r?r.toStringTag:void 0;t.exports=o},"./node_modules/lodash/_freeGlobal.js":function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/lodash/_getRawTag.js":function(t,e,n){function o(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var o=!0}catch(t){}var r=a.call(t);return o&&(e?t[u]=n:delete t[u]),r}var r=n("./node_modules/lodash/_Symbol.js"),s=Object.prototype,i=s.hasOwnProperty,a=s.toString,u=r?r.toStringTag:void 0;t.exports=o},"./node_modules/lodash/_objectToString.js":function(t,e){function n(t){return r.call(t)}var o=Object.prototype,r=o.toString;t.exports=n},"./node_modules/lodash/_root.js":function(t,e,n){var o=n("./node_modules/lodash/_freeGlobal.js"),r="object"==typeof self&&self&&self.Object===Object&&self,s=o||r||Function("return this")();t.exports=s},"./node_modules/lodash/debounce.js":function(t,e,n){function o(t,e,n){function o(e){var n=y,o=j;return y=j=void 0,w=e,O=t.apply(o,n)}function h(t){return w=t,_=setTimeout(p,e),C?o(t):O}function c(t){var n=t-x,o=t-w,r=e-n;return T?l(r,g-o):r}function f(t){var n=t-x,o=t-w;return void 0===x||n>=e||n<0||T&&o>=g}function p(){var t=s();if(f(t))return d(t);_=setTimeout(p,c(t))}function d(t){return _=void 0,P&&y?o(t):(y=j=void 0,O)}function m(){void 0!==_&&clearTimeout(_),w=0,y=x=j=_=void 0}function v(){return void 0===_?O:d(s())}function b(){var t=s(),n=f(t);if(y=arguments,j=this,x=t,n){if(void 0===_)return h(x);if(T)return _=setTimeout(p,e),o(x)}return void 0===_&&(_=setTimeout(p,e)),O}var y,j,g,O,_,x,w=0,C=!1,T=!1,P=!0;if("function"!=typeof t)throw new TypeError(a);return e=i(e)||0,r(n)&&(C=!!n.leading,T="maxWait"in n,g=T?u(i(n.maxWait)||0,e):g,P="trailing"in n?!!n.trailing:P),b.cancel=m,b.flush=v,b}var r=n("./node_modules/lodash/isObject.js"),s=n("./node_modules/lodash/now.js"),i=n("./node_modules/lodash/toNumber.js"),a="Expected a function",u=Math.max,l=Math.min;t.exports=o},"./node_modules/lodash/isObject.js":function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},"./node_modules/lodash/isObjectLike.js":function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},"./node_modules/lodash/isSymbol.js":function(t,e,n){function o(t){return"symbol"==typeof t||s(t)&&r(t)==i}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObjectLike.js"),i="[object Symbol]";t.exports=o},"./node_modules/lodash/now.js":function(t,e,n){var o=n("./node_modules/lodash/_root.js"),r=function(){return o.Date.now()};t.exports=r},"./node_modules/lodash/toNumber.js":function(t,e,n){function o(t){if("number"==typeof t)return t;if(s(t))return i;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=l.test(t);return n||h.test(t)?c(t.slice(2),n?2:8):u.test(t)?i:+t}var r=n("./node_modules/lodash/isObject.js"),s=n("./node_modules/lodash/isSymbol.js"),i=NaN,a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,h=/^0o[0-7]+$/i,c=parseInt;t.exports=o},"./node_modules/punycode/punycode.js":function(t,e,n){(function(t,o){var r;!function(o){function s(t){throw new RangeError(S[t])}function i(t,e){for(var n=t.length,o=[];n--;)o[n]=e(t[n]);return o}function a(t,e){var n=t.split("@"),o="";return n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(A,"."),o+i(t.split("."),e).join(".")}function u(t){for(var e,n,o=[],r=0,s=t.length;r<s;)e=t.charCodeAt(r++),e>=55296&&e<=56319&&r<s?(n=t.charCodeAt(r++),56320==(64512&n)?o.push(((1023&e)<<10)+(1023&n)+65536):(o.push(e),r--)):o.push(e);return o}function l(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=k(t>>>10&1023|55296),t=56320|1023&t),e+=k(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:j}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,n){var o=0;for(t=n?I(t/x):t>>1,t+=I(t/e);t>R*O>>1;o+=j)t=I(t/R);return I(o+(R+1)*t/(t+_))}function p(t){var e,n,o,r,i,a,u,c,p,d,m=[],v=t.length,b=0,_=C,x=w;for(n=t.lastIndexOf(T),n<0&&(n=0),o=0;o<n;++o)t.charCodeAt(o)>=128&&s("not-basic"),m.push(t.charCodeAt(o));for(r=n>0?n+1:0;r<v;){for(i=b,a=1,u=j;r>=v&&s("invalid-input"),c=h(t.charCodeAt(r++)),(c>=j||c>I((y-b)/a))&&s("overflow"),b+=c*a,p=u<=x?g:u>=x+O?O:u-x,!(c<p);u+=j)d=j-p,a>I(y/d)&&s("overflow"),a*=d;e=m.length+1,x=f(b-i,e,0==i),I(b/e)>y-_&&s("overflow"),_+=I(b/e),b%=e,m.splice(b++,0,_)}return l(m)}function d(t){var e,n,o,r,i,a,l,h,p,d,m,v,b,_,x,P=[];for(t=u(t),v=t.length,e=C,n=0,i=w,a=0;a<v;++a)(m=t[a])<128&&P.push(k(m));for(o=r=P.length,r&&P.push(T);o<v;){for(l=y,a=0;a<v;++a)(m=t[a])>=e&&m<l&&(l=m);for(b=o+1,l-e>I((y-n)/b)&&s("overflow"),n+=(l-e)*b,e=l,a=0;a<v;++a)if(m=t[a],m<e&&++n>y&&s("overflow"),m==e){for(h=n,p=j;d=p<=i?g:p>=i+O?O:p-i,!(h<d);p+=j)x=h-d,_=j-d,P.push(k(c(d+x%_,0))),h=I(x/_);P.push(k(c(h,0))),i=f(n,b,o==r),n=0,++o}++n,++e}return P.join("")}function m(t){return a(t,function(t){return P.test(t)?p(t.slice(4).toLowerCase()):t})}function v(t){return a(t,function(t){return q.test(t)?"xn--"+d(t):t})}var b,y=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,2147483647),j=36,g=1,O=26,_=38,x=700,w=72,C=128,T="-",P=/^xn--/,q=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=j-g,I=Math.floor,k=String.fromCharCode;b={version:"1.4.1",ucs2:{decode:u,encode:l},decode:p,encode:d,toASCII:v,toUnicode:m},void 0!==(r=function(){return b}.call(e,n,e,t))&&(t.exports=r)}()}).call(e,n("./node_modules/webpack/buildin/module.js")(t),n("./node_modules/webpack/buildin/global.js"))},"./node_modules/querystring-es3/decode.js":function(t,e,n){"use strict";function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,s){e=e||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var a=/\+/g;t=t.split(e);var u=1e3;s&&"number"==typeof s.maxKeys&&(u=s.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var h=0;h<l;++h){var c,f,p,d,m=t[h].replace(a,"%20"),v=m.indexOf(n);v>=0?(c=m.substr(0,v),f=m.substr(v+1)):(c=m,f=""),p=decodeURIComponent(c),d=decodeURIComponent(f),o(i,p)?r(i[p])?i[p].push(d):i[p]=[i[p],d]:i[p]=d}return i};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},"./node_modules/querystring-es3/encode.js":function(t,e,n){"use strict";function o(t,e){if(t.map)return t.map(e);for(var n=[],o=0;o<t.length;o++)n.push(e(t[o],o));return n}var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(i(t),function(i){var a=encodeURIComponent(r(i))+n;return s(t[i])?o(t[i],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[i]))}).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},"./node_modules/querystring-es3/index.js":function(t,e,n){"use strict";e.decode=e.parse=n("./node_modules/querystring-es3/decode.js"),e.encode=e.stringify=n("./node_modules/querystring-es3/encode.js")},"./node_modules/url/url.js":function(t,e,n){"use strict";function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(t,e,n){if(t&&l.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}function s(t){return l.isString(t)&&(t=r(t)),t instanceof o?t.format():o.prototype.format.call(t)}function i(t,e){return r(t,!1,!0).resolve(e)}function a(t,e){return t?r(t,!1,!0).resolveObject(e):e}var u=n("./node_modules/punycode/punycode.js"),l=n("./node_modules/url/util.js");e.parse=r,e.resolve=i,e.resolveObject=a,e.format=s,e.Url=o;var h=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(d),v=["%","/","?",";","#"].concat(m),b=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,j=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=n("./node_modules/querystring-es3/index.js");o.prototype.parse=function(t,e,n){if(!l.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),r=-1!==o&&o<t.indexOf("#")?"?":"#",s=t.split(r),i=/\\/g;s[0]=s[0].replace(i,"/"),t=s.join(r);var a=t;if(a=a.trim(),!n&&1===t.split("#").length){var c=f.exec(a);if(c)return this.path=a,this.href=a,this.pathname=c[1],c[2]?(this.search=c[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=h.exec(a);if(p){p=p[0];var d=p.toLowerCase();this.protocol=d,a=a.substr(p.length)}if(n||p||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===a.substr(0,2);!w||p&&O[p]||(a=a.substr(2),this.slashes=!0)}if(!O[p]&&(w||p&&!_[p])){for(var C=-1,T=0;T<b.length;T++){var P=a.indexOf(b[T]);-1!==P&&(-1===C||P<C)&&(C=P)}var q,A;A=-1===C?a.lastIndexOf("@"):a.lastIndexOf("@",C),-1!==A&&(q=a.slice(0,A),a=a.slice(A+1),this.auth=decodeURIComponent(q)),C=-1;for(var T=0;T<v.length;T++){var P=a.indexOf(v[T]);-1!==P&&(-1===C||P<C)&&(C=P)}-1===C&&(C=a.length),this.host=a.slice(0,C),a=a.slice(C),this.parseHost(),this.hostname=this.hostname||"";var S="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!S)for(var R=this.hostname.split(/\./),T=0,I=R.length;T<I;T++){var k=R[T];if(k&&!k.match(y)){for(var U="",F=0,N=k.length;F<N;F++)k.charCodeAt(F)>127?U+="x":U+=k[F];if(!U.match(y)){var E=R.slice(0,T),M=R.slice(T+1),L=k.match(j);L&&(E.push(L[1]),M.unshift(L[2])),M.length&&(a="/"+M.join(".")+a),this.hostname=E.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=u.toASCII(this.hostname));var K=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+K,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!g[d])for(var T=0,I=m.length;T<I;T++){var z=m[T];if(-1!==a.indexOf(z)){var G=encodeURIComponent(z);G===z&&(G=escape(z)),a=a.split(z).join(G)}}var D=a.indexOf("#");-1!==D&&(this.hash=a.substr(D),a=a.slice(0,D));var B=a.indexOf("?");if(-1!==B?(this.search=a.substr(B),this.query=a.substr(B+1),e&&(this.query=x.parse(this.query)),a=a.slice(0,B)):e&&(this.search="",this.query={}),a&&(this.pathname=a),_[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var K=this.pathname||"",H=this.search||"";this.path=K+H}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",o=this.hash||"",r=!1,s="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&l.isObject(this.query)&&Object.keys(this.query).length&&(s=x.stringify(this.query));var i=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||_[e])&&!1!==r?(r="//"+(r||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):r||(r=""),o&&"#"!==o.charAt(0)&&(o="#"+o),i&&"?"!==i.charAt(0)&&(i="?"+i),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),i=i.replace("#","%23"),e+r+n+i+o},o.prototype.resolve=function(t){return this.resolveObject(r(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(l.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var i=r[s];n[i]=this[i]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var h=a[u];"protocol"!==h&&(n[h]=t[h])}return _[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!_[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var p=c[f];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||O[t.protocol])n.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),j=y||b||n.host&&t.pathname,g=j,x=n.pathname&&n.pathname.split("/")||[],d=t.pathname&&t.pathname.split("/")||[],w=n.protocol&&!_[n.protocol];if(w&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),j=j&&(""===d[0]||""===x[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=d;else if(d.length)x||(x=[]),x.pop(),x=x.concat(d),n.search=t.search,n.query=t.query;else if(!l.isNullOrUndefined(t.search)){if(w){n.hostname=n.host=x.shift();var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return n.search=t.search,n.query=t.query,l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=x.slice(-1)[0],P=(n.host||t.host||x.length>1)&&("."===T||".."===T)||""===T,q=0,A=x.length;A>=0;A--)T=x[A],"."===T?x.splice(A,1):".."===T?(x.splice(A,1),q++):q&&(x.splice(A,1),q--);if(!j&&!g)for(;q--;q)x.unshift("..");!j||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),P&&"/"!==x.join("/").substr(-1)&&x.push("");var S=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(w){n.hostname=n.host=S?"":x.length?x.shift():"";var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return j=j||n.host&&x.length,j&&!S&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),l.isNull(n.pathname)&&l.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},"./node_modules/url/util.js":function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},"./node_modules/webpack/buildin/global.js":function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},0:function(t,e){t.exports=Injector},1:function(t,e){t.exports=React},2:function(t,e){t.exports=IsomorphicFetch},3:function(t,e){t.exports=ReactDom},4:function(t,e){t.exports=ReactSelect}});