vendor: 16,113 bytes, lines 1-2
1/*! For license information please see app.js.LICENSE.txt */ 2!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}([function(e,t){e.exports=React},function(e,t,n){var i;window,i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/public/assets/scripts/",n(n.s=4)}([function(e,t,n){"use strict";var i=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function s(e,t,n){return e.concat(t).map((function(e){return o(e,n)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function c(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach((function(t){i[t]=o(e[t],n)})),a(t).forEach((function(r){(function(e,t){try{return t in e&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}catch(e){return!1}})(e,r)||(n.isMergeableObject(t[r])&&e[r]?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))})),i}function l(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||i,n.cloneUnlessOtherwiseSpecified=o;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):c(e,t,n):o(t,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var u=l;e.exports=u},function(e,t,n){"use strict";(function(e,i){var r,o=n(3);r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:i;var s=Object(o.a)(r);t.a=s}).call(this,n(5),n(6)(e))},function(e,t,n){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){function i(e){return(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})(e)}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=n(2),s=n(8),a=n(0),c=function(){function e(t,n){var i=n.location,r=void 0===i?0:i,o=n.distance,a=void 0===o?100:o,c=n.threshold,l=void 0===c?.6:c,u=n.maxPatternLength,h=void 0===u?32:u,d=n.caseSensitive,p=void 0!==d&&d,f=n.tokenSeparator,m=void 0===f?/ +/g:f,v=n.findAllMatches,g=void 0!==v&&v,_=n.minMatchCharLength,b=void 0===_?1:_,y=n.id,E=void 0===y?null:y,w=n.keys,I=void 0===w?[]:w,S=n.shouldSort,x=void 0===S||S,O=n.getFn,C=void 0===O?s:O,A=n.sortFn,T=void 0===A?function(e,t){return e.score-t.score}:A,L=n.tokenize,k=void 0!==L&&L,j=n.matchAllTokens,M=void 0!==j&&j,N=n.includeMatches,P=void 0!==N&&N,D=n.includeScore,F=void 0!==D&&D,R=n.verbose,B=void 0!==R&&R;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:r,distance:a,threshold:l,maxPatternLength:h,isCaseSensitive:p,tokenSeparator:m,findAllMatches:g,minMatchCharLength:b,id:E,keys:I,includeMatches:P,includeScore:F,shouldSort:x,getFn:C,sortFn:T,verbose:B,tokenize:k,matchAllTokens:M},this.setCollection(t)}var t,n;return t=e,(n=[{key:"setCollection",value:function(e){return this.list=e,e}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\nSearch pattern: "'.concat(e,'"'));var n=this._prepareSearchers(e),i=n.tokenSearchers,r=n.fullSearcher,o=this._search(i,r),s=o.weights,a=o.results;return this._computeScore(s,a),this.options.shouldSort&&this._sort(a),t.limit&&"number"==typeof t.limit&&(a=a.slice(0,t.limit)),this._format(a)}},{key:"_prepareSearchers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),i=0,r=n.length;i<r;i+=1)t.push(new o(n[i],this.options));return{tokenSearchers:t,fullSearcher:new o(e,this.options)}}},{key:"_search",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,i={},r=[];if("string"==typeof n[0]){for(var o=0,s=n.length;o<s;o+=1)this._analyze({key:"",value:n[o],record:o,index:o},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t});return{weights:null,results:r}}for(var a={},c=0,l=n.length;c<l;c+=1)for(var u=n[c],h=0,d=this.options.keys.length;h<d;h+=1){var p=this.options.keys[h];if("string"!=typeof p){if(a[p.name]={weight:1-p.weight||1},p.weight<=0||p.weight>1)throw new Error("Key weight has to be > 0 and <= 1");p=p.name}else a[p]={weight:1};this._analyze({key:p,value:this.options.getFn(u,p),record:u,index:c},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var n=e.key,i=e.arrayIndex,r=void 0===i?-1:i,o=e.value,s=e.record,c=e.index,l=t.tokenSearchers,u=void 0===l?[]:l,h=t.fullSearcher,d=void 0===h?[]:h,p=t.resultMap,f=void 0===p?{}:p,m=t.results,v=void 0===m?[]:m;if(null!=o){var g=!1,_=-1,b=0;if("string"==typeof o){this._log("\nKey: ".concat(""===n?"-":n));var y=d.search(o);if(this._log('Full text: "'.concat(o,'", score: ').concat(y.score)),this.options.tokenize){for(var E=o.split(this.options.tokenSeparator),w=[],I=0;I<u.length;I+=1){var S=u[I];this._log('\nPattern: "'.concat(S.pattern,'"'));for(var x=!1,O=0;O<E.length;O+=1){var C=E[O],A=S.search(C),T={};A.isMatch?(T[C]=A.score,g=!0,x=!0,w.push(A.score)):(T[C]=1,this.options.matchAllTokens||w.push(1)),this._log('Token: "'.concat(C,'", score: ').concat(T[C]))}x&&(b+=1)}_=w[0];for(var L=w.length,k=1;k<L;k+=1)_+=w[k];_/=L,this._log("Token score average:",_)}var j=y.score;_>-1&&(j=(j+_)/2),this._log("Score average:",j);var M=!this.options.tokenize||!this.options.matchAllTokens||b>=u.length;if(this._log("\nCheck Matches: ".concat(M)),(g||y.isMatch)&&M){var N=f[c];N?N.output.push({key:n,arrayIndex:r,value:o,score:j,matchedIndices:y.matchedIndices}):(f[c]={item:s,output:[{key:n,arrayIndex:r,value:o,score:j,matchedIndices:y.matchedIndices}]},v.push(f[c]))}}else if(a(o))for(var P=0,D=o.length;P<D;P+=1)this._analyze({key:n,arrayIndex:P,value:o[P],record:s,index:c},{resultMap:f,results:v,tokenSearchers:u,fullSearcher:d})}}},{key:"_computeScore",value:function(e,t){this._log("\n\nComputing score:\n");for(var n=0,i=t.length;n<i;n+=1){for(var r=t[n].output,o=r.length,s=1,a=1,c=0;c<o;c+=1){var l=e?e[r[c].key].weight:1,u=(1===l?r[c].score:r[c].score||.001)*l;1!==l?a=Math.min(a,u):(r[c].nScore=u,s*=u)}t[n].score=1===a?s:a,this._log(t[n])}}},{key:"_sort",value:function(e){this._log("\n\nSorting...."),e.sort(this.options.sortFn)}},{key:"_format",value:function(e){var t=[];if(this.options.verbose){var n=[];this._log("\n\nOutput:\n\n",JSON.stringify(e,(function(e,t){if("object"===i(t)&&null!==t){if(-1!==n.indexOf(t))return;n.push(t)}return t}))),n=null}var r=[];this.options.includeMatches&&r.push((function(e,t){var n=e.output;t.matches=[];for(var i=0,r=n.length;i<r;i+=1){var o=n[i];if(0!==o.matchedIndices.length){var s={indices:o.matchedIndices,value:o.value};o.key&&(s.key=o.key),o.hasOwnProperty("arrayIndex")&&o.arrayIndex>-1&&(s.arrayIndex=o.arrayIndex),t.matches.push(s)}}})),this.options.includeScore&&r.push((function(e,t){t.score=e.score}));for(var o=0,s=e.length;o<s;o+=1){var a=e[o];if(this.options.id&&(a.item=this.options.getFn(a.item,this.options.id)[0]),r.length){for(var c={item:a.item},l=0,u=r.length;l<u;l+=1)r[l](a,c);t.push(c)}else t.push(a.item)}return t}},{key:"_log",value:function(){var e;this.options.verbose&&(e=console).log.apply(e,arguments)}}])&&r(t.prototype,n),e}();e.exports=c},function(e,t,n){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var r=n(3),o=n(4),s=n(7),a=function(){function e(t,n){var i=n.location,r=void 0===i?0:i,o=n.distance,a=void 0===o?100:o,c=n.threshold,l=void 0===c?.6:c,u=n.maxPatternLength,h=void 0===u?32:u,d=n.isCaseSensitive,p=void 0!==d&&d,f=n.tokenSeparator,m=void 0===f?/ +/g:f,v=n.findAllMatches,g=void 0!==v&&v,_=n.minMatchCharLength,b=void 0===_?1:_;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:r,distance:a,threshold:l,maxPatternLength:h,isCaseSensitive:p,tokenSeparator:m,findAllMatches:g,minMatchCharLength:b},this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.pattern.length<=h&&(this.patternAlphabet=s(this.pattern))}var t,n;return t=e,(n=[{key:"search",value:function(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};var t=this.options,n=t.maxPatternLength,i=t.tokenSeparator;if(this.pattern.length>n)return r(e,this.pattern,i);var s=this.options,a=s.location,c=s.distance,l=s.threshold,u=s.findAllMatches,h=s.minMatchCharLength;return o(e,this.pattern,this.patternAlphabet,{location:a,distance:c,threshold:l,findAllMatches:u,minMatchCharLength:h})}}])&&i(t.prototype,n),e}();e.exports=a},function(e,t){var n=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,r=new RegExp(t.replace(n,"\\$&").replace(i,"|")),o=e.match(r),s=!!o,a=[];if(s)for(var c=0,l=o.length;c<l;c+=1){var u=o[c];a.push([e.indexOf(u),u.length-1])}return{score:s?.5:1,isMatch:s,matchedIndices:a}}},function(e,t,n){var i=n(5),r=n(6);e.exports=function(e,t,n,o){for(var s=o.location,a=void 0===s?0:s,c=o.distance,l=void 0===c?100:c,u=o.threshold,h=void 0===u?.6:u,d=o.findAllMatches,p=void 0!==d&&d,f=o.minMatchCharLength,m=void 0===f?1:f,v=a,g=e.length,_=h,b=e.indexOf(t,v),y=t.length,E=[],w=0;w<g;w+=1)E[w]=0;if(-1!==b){var I=i(t,{errors:0,currentLocation:b,expectedLocation:v,distance:l});if(_=Math.min(I,_),-1!==(b=e.lastIndexOf(t,v+y))){var S=i(t,{errors:0,currentLocation:b,expectedLocation:v,distance:l});_=Math.min(S,_)}}b=-1;for(var x=[],O=1,C=y+g,A=1<<y-1,T=0;T<y;T+=1){for(var L=0,k=C;L<k;)i(t,{errors:T,currentLocation:v+k,expectedLocation:v,distance:l})<=_?L=k:C=k,k=Math.floor((C-L)/2+L);C=k;var j=Math.max(1,v-k+1),M=p?g:Math.min(v+k,g)+y,N=Array(M+2);N[M+1]=(1<<T)-1;for(var P=M;P>=j;P-=1){var D=P-1,F=n[e.charAt(D)];if(F&&(E[D]=1),N[P]=(N[P+1]<<1|1)&F,0!==T&&(N[P]|=(x[P+1]|x[P])<<1|1|x[P+1]),N[P]&A&&(O=i(t,{errors:T,currentLocation:D,expectedLocation:v,distance:l}))<=_){if(_=O,(b=D)<=v)break;j=Math.max(1,2*v-b)}}if(i(t,{errors:T+1,currentLocation:v,expectedLocation:v,distance:l})>_)break;x=N}return{isMatch:b>=0,score:0===O?.001:O,matchedIndices:r(E,m)}}},function(e,t){e.exports=function(e,t){var n=t.errors,i=void 0===n?0:n,r=t.currentLocation,o=void 0===r?0:r,s=t.expectedLocation,a=void 0===s?0:s,c=t.distance,l=void 0===c?100:c,u=i/e.length,h=Math.abs(a-o);return l?u+h/l:h?1:u}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],i=-1,r=-1,o=0,s=e.length;o<s;o+=1){var a=e[o];a&&-1===i?i=o:a||-1===i||((r=o-1)-i+1>=t&&n.push([i,r]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,i=0;i<n;i+=1)t[e.charAt(i)]=0;for(var r=0;r<n;r+=1)t[e.charAt(r)]|=1<<n-r-1;return t}},function(e,t,n){var i=n(0);e.exports=function(e,t){return function e(t,n,r){if(n){var o=n.indexOf("."),s=n,a=null;-1!==o&&(s=n.slice(0,o),a=n.slice(o+1));var c=t[s];if(null!=c)if(a||"string"!=typeof c&&"number"!=typeof c)if(i(c))for(var l=0,u=c.length;l<u;l+=1)e(c[l],a,r);else a&&e(c,a,r);else r.push(c.toString())}else r.push(t);return r}(e,t,[])}}])},function(e,t,n){"use strict";function i(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return i}))},function(e,t,n){e.exports=n(7)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);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}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.r(t);var i=n(2),r=n.n(i),o=n(0),s=n.n(o),a=n(1),c=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function h(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(
2). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(h)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var r=e,o=t,s=[],c=s,d=!1;function p(){c===s&&(c=s.slice())}function f(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return p(),c.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,p();var n=c.indexOf(e);c.splice(n,1)}}}function v(e){if(!u(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,o=r(o,e)}finally{d=!1}for(var t=s=c,n=0;n<t.length;n++)(0,t[n])();return e}function g(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");r=e,v({type:l.REPLACE})}function _(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[a.a]=function(){return this},e}return v({type:l.INIT}),(i={dispatch:v,subscribe:m,getState:f,replaceReducer:g})[a.a]=_,i}function d(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}var p,f=[],m=[],v=[],g={loading:!1},_=function(e,t){switch(void 0===e&&(e=g),t.type){case"SET_IS_LOADING":return{loading:t.isLoading};default:return e}},b=function(e){for(var t,n,i="",r=0;r<e;r++)i+=(t=0,n=36,Math.floor(Math.random()*(n-t)+t)).toString(36);return i},y=function(e){return Object.prototype.toString.call(e).slice(8,-1)},E=function(e,t){return null!=t&&y(t)===e},w=function(e,t){return e.closest("["+t+"]")},I=function(e){return"string"!=typeof e?e:e.replace(/&/g,"&").replace(/>/g,"&rt;").replace(/</g,"<").replace(/"/g,""")},S=(p=document.createElement("div"),function(e){var t=e.trim();p.innerHTML=t;for(var n=p.children[0];p.firstChild;)p.removeChild(p.firstChild);return n}),x=function(e,t){return e.score-t.score},O=function(e){return JSON.parse(JSON.stringify(e))},C=function(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var o,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:l.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+l.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var i=!1,r={},a=0;a<s.length;a++){var c=s[a],l=n[c],u=e[c],h=l(u,t);if(void 0===h){var p=d(c,t);throw new Error(p)}r[c]=h,i=i||h!==u}return i?r:e}}({items:function(e,t){switch(void 0===e&&(e=f),t.type){case"ADD_ITEM":return[].concat(e,[{id:t.id,choiceId:t.choiceId,groupId:t.groupId,value:t.value,label:t.label,active:!0,highlighted:!1,customProperties:t.customProperties,placeholder:t.placeholder||!1,keyCode:null}]).map((function(e){var t=e;return t.highlighted=!1,t}));case"REMOVE_ITEM":return e.map((function(e){var n=e;return n.id===t.id&&(n.active=!1),n}));case"HIGHLIGHT_ITEM":return e.map((function(e){var n=e;return n.id===t.id&&(n.highlighted=t.highlighted),n}));default:return e}},groups:function(e,t){switch(void 0===e&&(e=m),t.type){case"ADD_GROUP":return[].concat(e,[{id:t.id,value:t.value,active:t.active,disabled:t.disabled}]);case"CLEAR_CHOICES":return[];default:return e}},choices:function(e,t){switch(void 0===e&&(e=v),t.type){case"ADD_CHOICE":return[].concat(e,[{id:t.id,elementId:t.elementId,groupId:t.groupId,value:t.value,label:t.label||t.value,disabled:t.disabled||!1,selected:!1,active:!0,score:9999,customProperties:t.customProperties,placeholder:t.placeholder||!1,keyCode:null}]);case"ADD_ITEM":return t.activateOptions?e.map((function(e){var n=e;return n.active=t.active,n}
2)):t.choiceId>-1?e.map((function(e){var n=e;return n.id===parseInt(t.choiceId,10)&&(n.selected=!0),n})):e;case"REMOVE_ITEM":return t.choiceId>-1?e.map((function(e){var n=e;return n.id===parseInt(t.choiceId,10)&&(n.selected=!1),n})):e;case"FILTER_CHOICES":return e.map((function(e){var n=e;return n.active=t.results.some((function(e){var t=e.item,i=e.score;return t.id===n.id&&(n.score=i,!0)})),n}));case"ACTIVATE_CHOICES":return e.map((function(e){var n=e;return n.active=t.active,n}));case"CLEAR_CHOICES":return v;default:return e}},general:_}),A=function(e,t){var n=e;if("CLEAR_ALL"===t.type)n=void 0;else if("RESET_TO"===t.type)return O(t.state);return C(n,t)};function T(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var L=function(){function e(){this._store=h(A,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}var t,n,i,r=e.prototype;return r.subscribe=function(e){this._store.subscribe(e)},r.dispatch=function(e){this._store.dispatch(e)},r.isLoading=function(){return this.state.general.loading},r.getChoiceById=function(e){if(e){var t=parseInt(e,10);return this.activeChoices.find((function(e){return e.id===t}))}return!1},r.getGroupById=function(e){return this.groups.find((function(t){return t.id===parseInt(e,10)}))},t=e,(n=[{key:"state",get:function(){return this._store.getState()}},{key:"items",get:function(){return this.state.items}},{key:"activeItems",get:function(){return this.items.filter((function(e){return!0===e.active}))}},{key:"highlightedActiveItems",get:function(){return this.items.filter((function(e){return e.active&&e.highlighted}))}},{key:"choices",get:function(){return this.state.choices}},{key:"activeChoices",get:function(){return this.choices.filter((function(e){return!0===e.active}))}},{key:"selectableChoices",get:function(){return this.choices.filter((function(e){return!0!==e.disabled}))}},{key:"searchableChoices",get:function(){return this.selectableChoices.filter((function(e){return!0!==e.placeholder}))}},{key:"placeholderChoice",get:function(){return[].concat(this.choices).reverse().find((function(e){return!0===e.placeholder}))}},{key:"groups",get:function(){return this.state.groups}},{key:"activeGroups",get:function(){var e=this.groups,t=this.choices;return e.filter((function(e){var n=!0===e.active&&!1===e.disabled,i=t.some((function(e){return!0===e.active&&!1===e.disabled}));return n&&i}),[])}}])&&T(t.prototype,n),i&&T(t,i),e}(),k=function(){function e(e){var t=e.element,n=e.type,i=e.classNames;Object.assign(this,{element:t,type:n,classNames:i}),this.isActive=!1}var t=e.prototype;return t.distanceFromTopWindow=function(){return this.dimensions=this.element.getBoundingClientRect(),this.position=Math.ceil(this.dimensions.top+window.pageYOffset+this.element.offsetHeight),this.position},t.getChild=function(e){return this.element.querySelector(e)},t.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},t.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},e}(),j=function(){function e(e){var t=e.element,n=e.type,i=e.classNames,r=e.position;Object.assign(this,{element:t,classNames:i,type:n,position:r}),this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var t=e.prototype;return t.addEventListeners=function(){this.element.addEventListener("focus",this._onFocus),this.element.addEventListener("blur",this._onBlur)},t.removeEventListeners=function(){this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},t.shouldFlip=function(e,t){var n,i;if(void 0===t&&(n=document.body,i=document.documentElement,t=Math.max(n.scrollHeight,n.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)),void 0===e)return!1;var r=!1;return"auto"===this.position?r=e>=t:"top"===this.position&&(r=!0),r},t.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},t.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},t.open=function(e){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},t.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","fal
2se"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},t.focus=function(){this.isFocussed||this.element.focus()},t.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},t.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},t.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),"select-one"===this.type&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},t.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),"select-one"===this.type&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},t.wrap=function(e){!function(e,t){void 0===t&&(t=document.createElement("div")),e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t.appendChild(e)}(e,this.element)},t.unwrap=function(e){this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element)},t.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},t.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},t._onFocus=function(){this.isFocussed=!0},t._onBlur=function(){this.isFocussed=!1},e}();function M(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var N=function(){function e(e){var t=e.element,n=e.type,i=e.classNames,r=e.preventPaste;this.element=t,this.type=n,this.classNames=i,this.preventPaste=r,this.isFocussed=this.element===document.activeElement,this.isDisabled=t.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var t,n,i,r=e.prototype;return r.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},r.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput,{passive:!0}),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus,{passive:!0}),this.element.removeEventListener("blur",this._onBlur,{passive:!0})},r.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},r.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},r.focus=function(){this.isFocussed||this.element.focus()},r.blur=function(){this.isFocussed&&this.element.blur()},r.clear=function(e){return void 0===e&&(e=!0),this.element.value&&(this.element.value=""),e&&this.setWidth(),this},r.setWidth=function(){var e=this.element,t=e.style,n=e.value,i=e.placeholder;t.minWidth=i.length+1+"ch",t.width=n.length+1+"ch"},r.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},r.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},r._onInput=function(){"select-one"!==this.type&&this.setWidth()},r._onPaste=function(e){this.preventPaste&&e.preventDefault()},r._onFocus=function(){this.isFocussed=!0},r._onBlur=function(){this.isFocussed=!1},t=e,(n=[{key:"placeholder",set:function(e){this.element.placeholder=e}},{key:"value",get:function(){return I(this.element.value)},set:function(e){this.element.value=e}}])&&M(t.prototype,n),i&&M(t,i),e}(),P={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sortFn:function(e,t){var n=e.value,i=e.label,r=void 0===i?n:i,o=t.value,s=t.label,a=void 0===s?o:s;return r.localeCompare(a,[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prepe
vendor: 9,009 bytes, line 2
2ndValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(e){return'Press Enter to add <b>"'+I(e)+'"</b>'},maxItemText:function(e){return"Only "+e+" values can be added"},itemComparer:function(e,t){return e===t},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:{containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"}},D="showDropdown",F="hideDropdown",R="change",B="choice",H="search",q="addItem",U="removeItem",K="highlightItem",G="highlightChoice",V="ADD_CHOICE",z="FILTER_CHOICES",Q="ACTIVATE_CHOICES",W="CLEAR_CHOICES",Z="ADD_GROUP",J="ADD_ITEM",X="REMOVE_ITEM",Y="HIGHLIGHT_ITEM",$=46,ee=8,te=13,ne=65,ie=27,re=38,oe=40,se=33,ae=34,ce=function(){function e(e){var t=e.element;Object.assign(this,{element:t}),this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}var t=e.prototype;return t.clear=function(){this.element.innerHTML=""},t.append=function(e){this.element.appendChild(e)},t.getChild=function(e){return this.element.querySelector(e)},t.hasChildren=function(){return this.element.hasChildNodes()},t.scrollToTop=function(){this.element.scrollTop=0},t.scrollToChoice=function(e,t){var n=this;if(e){var i=this.element.offsetHeight,r=e.offsetHeight,o=e.offsetTop+r,s=this.element.scrollTop+i,a=t>0?this.element.scrollTop+o-s:e.offsetTop;requestAnimationFrame((function(e){n._animateScroll(e,a,t)}))}},t._scrollDown=function(e,t,n){var i=(n-e)/t,r=i>1?i:1;this.element.scrollTop=e+r},t._scrollUp=function(e,t,n){var i=(e-n)/t,r=i>1?i:1;this.element.scrollTop=e-r},t._animateScroll=function(e,t,n){var i=this,r=this.element.scrollTop,o=!1;n>0?(this._scrollDown(r,4,t),r<t&&(o=!0)):(this._scrollUp(r,4,t),r>t&&(o=!0)),o&&requestAnimationFrame((function(){i._animateScroll(e,t,n)}))},e}();function le(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ue=function(){function e(e){var t=e.element,n=e.classNames;if(Object.assign(this,{element:t,classNames:n}),!(t instanceof Element))throw new TypeError("Invalid element passed");this.isDisabled=!1}var t,n,i,r=e.prototype;return r.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex="-1";var e=this.element.getAttribute("style");e&&this.element.setAttribute("data-choice-orig-style",e),this.element.setAttribute("data-choice","active")},r.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var e=this.element.getAttribute("data-choice-orig-style");e?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",e)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},r.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},r.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},r.triggerEvent=function(e,t){!function(e,t,n){void 0===n&&(n=null);var i=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});e.dispatchEvent(i)}(this.element,e,t)},t=e,(n=[{key:"value",get:function(){return this.element.value},set:function(e){this.element.value=e}}])&&le(t.prototype,n),i&&le(t,i),e}();function he(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var de=function(e){var t,n,i,r,o;function s(t){var n,i=t.element,r=t.classNames,o=t.delimiter;return(n=e.call(this,{element:i,classNames:r})||this).delimiter=o,n}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i=s,(r=[{key:"value",get:function(){return this.element.value},set:function(e){var t=e.map((function(e){return e.value})).join(this.delimiter);this.element.setAttribute("value",t),this.element.value=t}}])&&he(i.prototype,r),o&&he(i,o),s}(ue);function pe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var fe=function(e){var t,n,i,r,o;function s(t){var n,i=t.element,r=t.classNames,o=t.template;return(n=e.call(this,{element:i,classNames:r})||this).template=o,n}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,s.prototype.appendDocFragment=function(e){this.element.innerHTML="",this.element.appendChild(e)},i=s,(r=[{key:"placeholderOption",get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")}},{key:"optionGroups",get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))}},{key:"options",get:function(){return Array.from(this.element.options)},set:function(e){var t=this,n=document.createDocumentFragment();e.forEach((function(e){return i=e,r=t.template(i),void n.appendChild(r);var i,r})),this.appendDocFragment(n)}}])&&pe(i.prototype,r),o&&pe(i,o),s}(ue),me={containerOuter:function(e,t,n,i,r,o){var s=e.containerOuter,a=Object.assign(document.createElement("div"),{className:s});return a.dataset.type=o,t&&(a.dir=t),i&&(a.tabIndex=0),n&&(a.setAttribute("role",r?"combobox":"listbox"),r&&a.setAttribute("aria-autocomplete","list")),a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"),a},containerInner:function(e){var t=e.containerInner;return Object.assign(document.createElement("div"),{className:t})},itemList:function(e,t){var n=e.list,i=e.listSingle,r=e.listItems;return Object.assign(document.createElement("div"),{className:n+" "+(t?i:r)})},placeholder:function(e,t){var n=e.placeholder;return Object.assign(document.createElement("div"),{className:n,innerHTML:t})},item:function(e,t,n){var i=e.item,r=e.button,o=e.highlightedState,s=e.itemSelectable,a=e.placeholder,c=t.id,l=t.value,u=t.label,h=t.customProperties,d=t.active,p=t.disabled,f=t.highlighted,m=t.placeholder,v=Object.assign(document.createElement("div"),{className:i,innerHTML:u});if(Object.assign(v.dataset,{item:"",id:c,value:l,customProperties:h}),d&&v.setAttribute("aria-selected","true"),p&&v.setAttribute("aria-disabled","true"),m&&v.classList.add(a),v.classList.add(f?o:s),n){p&&v.classList.remove(s),v.dataset.deletable="";var g=Object.assign(document.createElement("button"),{type:"button",className:r,innerHTML:"Remove item"});g.setAttribute("aria-label","Remove item: '"+l+"'"),g.dataset.button="",v.appendChild(g)}return v},choiceList:function(e,t){var n=e.list,i=Object.assign(document.createElement("div"),{className:n});return t||i.setAttribute("aria-multiselectable","true"),i.setAttribute("role","listbox"),i},choiceGroup:function(e,t){var n=e.group,i=e.groupHeading,r=e.itemDisabled,o=t.id,s=t.value,a=t.disabled,c=Object.assign(document.createElement("div"),{className:n+" "+(a?r:"")});return c.setAttribute("role","group"),Object.assign(c.dataset,{group:"",id:o,value:s}),a&&c.setAttribute("aria-disabled","true"),c.appendChild(Object.assign(document.createElement("div"),{className:i,innerHTML:s})),c},choice:function(e,t,n){var i=e.item,r=e.itemChoice,o=e.itemSelectable,s=e.itemDisabled,a=e.placeholder,c=t.id,l=t.value,u=t.label,h=t.groupId,d=t.elementId,p=t.disabled,f=t.placeholder,m=Object.assign(document.createElement("div"),{id:d,innerHTML:u,className:i+" "+r+" "+(p?s:o)+" "+(f?a:"")});return m.setAttribute("role",h>0?"treeitem":"option"),Object.assign(m.dataset,{choice:"",id:c,value:l,selectText:n}),p?(m.dataset.choiceDisabled="",m.setAttribute("aria-disabled","true")):m.dataset.choiceSelectable="",m},input:function(e,t){var n=e.input,i=e.inputCloned,r=Object.assign(document.createElement("input"),{type:"text",className:n+" "+i,autocomplete:"off",autocapitalize:"off",spellcheck:!1});return r.setAttribute("role","textbox"),r.setAttribute("aria-autocomplete","list"),r.setAttribute("aria-label",t),r},dropdown:function(e){var t=e.list,n=e.listDropdown,i=document.createElement("div");
2return i.classList.add(t,n),i.setAttribute("aria-expanded","false"),i},notice:function(e,t,n){var i=e.item,r=e.itemChoice,o=e.noResults,s=e.noChoices;void 0===n&&(n="");var a=[i,r];return"no-choices"===n?a.push(s):"no-results"===n&&a.push(o),Object.assign(document.createElement("div"),{innerHTML:t,className:a.join(" ")})},option:function(e){var t=e.label,n=e.value,i=e.customProperties,r=e.active,o=e.disabled,s=new Option(t,n,!1,r);return i&&(s.dataset.customProperties=i),s.disabled=o,s}},ve=function(e){return void 0===e&&(e=!0),{type:Q,active:e}},ge=function(e,t){return{type:Y,id:e,highlighted:t}},_e=function(e,t,n,i){return{type:Z,value:e,id:t,active:n,disabled:i}};function be(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ye={},Ee=function(){var e,t,n;function i(e,t){var n=this;if(void 0===e&&(e="[data-choice]"),void 0===t&&(t={}),this.config=s.a.all([P,i.defaults.options,t],{arrayMerge:function(e,t){return[].concat(t)}}),t.addItemFilter&&"function"!=typeof t.addItemFilter){var r=t.addItemFilter instanceof RegExp?t.addItemFilter:new RegExp(t.addItemFilter);this.config.addItemFilter=r.test.bind(r)}var o,a,c,l,u=(o=this.config,a=P,c=Object.keys(o).sort(),l=Object.keys(a).sort(),c.filter((function(e){return l.indexOf(e)<0})));u.length&&console.warn("Unknown config option(s) passed",u.join(", ")),["auto","always"].includes(this.config.renderSelectedChoices)||(this.config.renderSelectedChoices="auto");var h="string"==typeof e?document.querySelector(e):e;if(!(h instanceof HTMLInputElement||h instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement="text"===h.type,this._isSelectOneElement="select-one"===h.type,this._isSelectMultipleElement="select-multiple"===h.type,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this._isTextElement?this.passedElement=new de({element:h,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new fe({element:h,classNames:this.config.classNames,template:function(e){return n._templates.option(e)}}),this.initialised=!1,this._store=new L,this._initialState={},this._currentState={},this._prevState={},this._currentValue="",this._canSearch=this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=function(e,t){var n=e.id||e.name&&e.name+"-"+b(2)||b(4);return n=t+"-"+(n=n.replace(/(:|\.|\[|\]|,)/g,""))}(this.passedElement.element,"choices-"),this._direction=this.passedElement.element.dir,!this._direction){var d=window.getComputedStyle(this.passedElement.element).direction;d!==window.getComputedStyle(document.documentElement).direction&&(this._direction=d)}if(this._idNames={itemChoice:"item-choice"},this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&(this._presetItems=this._presetItems.concat(this.passedElement.value.split(this.config.delimiter))),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onAKey=this._onAKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),!0===this.config.shouldSortItems&&this._isSelectOneElement&&(this.config.silent||console.warn("shouldSortElements: Type of passed element is 'select-one', falling back to fal
2se.")),"active"===this.passedElement.element.getAttribute("data-choice"))return this.config.silent||console.warn("Trying to initialise Choices on element already initialised"),void(this.initialised=!0);this.init()}e=i,n=[{key:"defaults",get:function(){return Object.preventExtensions({get options(){return ye},get templates(){return me}})}}],(t=null)&&be(e.prototype,t),n&&be(e,n);var o=i.prototype;return o.init=function(){if(!this.initialised){this._createTemplates(),this._createElements(),this._createStructure(),this._initialState=O(this._store.state),this._store.subscribe(this._render),this._render(),this._addEventListeners(),(!this.config.addItems||this.passedElement.element.hasAttribute("disabled"))&&this.disable(),this.initialised=!0;var e=this.config.callbackOnInit;e&&"function"==typeof e&&e.call(this)}},o.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this._isSelectElement&&(this.passedElement.options=this._presetChoices),this.clearStore(),this._templates=null,this.initialised=!1)},o.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},o.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},o.highlightItem=function(e,t){if(void 0===t&&(t=!0),!e)return this;var n=e.id,i=e.groupId,r=void 0===i?-1:i,o=e.value,s=void 0===o?"":o,a=e.label,c=void 0===a?"":a,l=r>=0?this._store.getGroupById(r):null;return this._store.dispatch(ge(n,!0)),t&&this.passedElement.triggerEvent(K,{id:n,value:s,label:c,groupValue:l&&l.value?l.value:null}),this},o.unhighlightItem=function(e){if(!e)return this;var t=e.id,n=e.groupId,i=void 0===n?-1:n,r=e.value,o=void 0===r?"":r,s=e.label,a=void 0===s?"":s,c=i>=0?this._store.getGroupById(i):null;return this._store.dispatch(ge(t,!1)),this.passedElement.triggerEvent(K,{id:t,value:o,label:a,groupValue:c&&c.value?c.value:null}),this},o.highlightAll=function(){var e=this;return this._store.items.forEach((function(t){return e.highlightItem(t)})),this},o.unhighlightAll=function(){var e=this;return this._store.items.forEach((function(t){return e.unhighlightItem(t)})),this},o.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter((function(t){return t.value===e})).forEach((function(e){return t._removeItem(e)})),this},o.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter((function(t){return t.id!==e})).forEach((function(e){return t._removeItem(e)})),this},o.removeHighlightedItems=function(e){var t=this;return void 0===e&&(e=!1),this._store.highlightedActiveItems.forEach((function(n){t._removeItem(n),e&&t._triggerChange(n.value)})),this},o.showDropdown=function(e){var t=this;return this.dropdown.isActive?this:(requestAnimationFrame((function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow()),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(D,{})})),this)},o.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame((function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(F,{})})),this):this},o.getValue=function(e){void 0===e&&(e=!1);var t=this._store.activeItems.reduce((function(t,n){var i=e?n.value:n;return t.push(i),t}),[]);return this._isSelectOneElement?t[0]:t},o.setValue=function(e){var t=this;return this.initialised?(e.forEach((function(e){return t._setChoiceOrItem(e)})),this):this},o.setChoiceByValue=function(e){var t=this;return!this.initialised||this._isTextElement?this:((Array.isArray(e)?e:[e]).forEach((function(e){return t._findAndSelectChoiceByValue(e)})),this)},o.setChoices=function(e,t,n,i){var r=this;if(void 0===e&&(e=[]),void 0===t&&(t="value"),void 0===n&&(n="label"),void 0===i&&(i=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if("string"!=typeof t||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(i&&this.clearChoices(),!Array.isArray(e)){if("function"!=typeof e)throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");requestAnimationFrame((function(){return r._handleLoadingState(!0)}));var o=e(this);if("object"==typeof o&&"function"==typeof o.then)return o.then((function(e){return r.setChoices(e,t,n,i)})).catch((function(e){r.config.silent||console.error(e)})).then((function(){return r._handleLoadingState(!1)})).then((function(){return r}));if(!Array.isArray(o))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: "+typeof o);return this.setChoices(o,t,n,!1)}
vendor: 12,523 bytes, line 2
2return this.containerOuter.removeLoadingState(),this._setLoading(!0),e.forEach((function(e){e.choices?r._addGroup({group:e,id:e.id||null,valueKey:t,labelKey:n}):r._addChoice({value:e[t],label:e[n],isSelected:e.selected,isDisabled:e.disabled,customProperties:e.customProperties,placeholder:e.placeholder})})),this._setLoading(!1),this},o.clearChoices=function(){return this._store.dispatch({type:W}),this},o.clearStore=function(){return this._store.dispatch({type:"CLEAR_ALL"}),this},o.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(ve(!0))),this},o._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,n=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),n&&this._renderItems(),this._prevState=this._currentState)}},o._renderChoices=function(){var e=this,t=this._store,n=t.activeGroups,i=t.activeChoices,r=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame((function(){return e.choiceList.scrollToTop()})),n.length>=1&&!this._isSearching){var o=i.filter((function(e){return!0===e.placeholder&&-1===e.groupId}));o.length>=1&&(r=this._createChoicesFragment(o,r)),r=this._createGroupsFragment(n,i,r)}else i.length>=1&&(r=this._createChoicesFragment(i,r));if(r.childNodes&&r.childNodes.length>0){var s=this._store.activeItems,a=this._canAddItem(s,this.input.value);a.response?(this.choiceList.append(r),this._highlightChoice()):this.choiceList.append(this._getTemplate("notice",a.notice))}else{var c,l;this._isSearching?(l="function"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,c=this._getTemplate("notice",l,"no-results")):(l="function"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,c=this._getTemplate("notice",l,"no-choices")),this.choiceList.append(c)}},o._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},o._createGroupsFragment=function(e,t,n){var i=this;return void 0===n&&(n=document.createDocumentFragment()),this.config.shouldSort&&e.sort(this.config.sortFn),e.forEach((function(e){var r=function(e){return t.filter((function(t){return i._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&("always"===i.config.renderSelectedChoices||!t.selected)}))}(e);if(r.length>=1){var o=i._getTemplate("choiceGroup",e);n.appendChild(o),i._createChoicesFragment(r,n,!0)}})),n},o._createChoicesFragment=function(e,t,n){var i=this;void 0===t&&(t=document.createDocumentFragment()),void 0===n&&(n=!1);var r=this.config,o=r.renderSelectedChoices,s=r.searchResultLimit,a=r.renderChoiceLimit,c=this._isSearching?x:this.config.sortFn,l=function(e){if("auto"!==o||i._isSelectOneElement||!e.selected){var n=i._getTemplate("choice",e,i.config.itemSelectText);t.appendChild(n)}},u=e;"auto"!==o||this._isSelectOneElement||(u=e.filter((function(e){return!e.selected})));var h=u.reduce((function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e}),{placeholderChoices:[],normalChoices:[]}),d=h.placeholderChoices,p=h.normalChoices;(this.config.shouldSort||this._isSearching)&&p.sort(c);var f=u.length,m=[].concat(d,p);this._isSearching?f=s:a>0&&!n&&(f=a);for(var v=0;v<f;v+=1)m[v]&&l(m[v]);return t},o._createItemsFragment=function(e,t){var n=this;void 0===t&&(t=document.createDocumentFragment());var i=this.config,r=i.shouldSortItems,o=i.sortFn,s=i.removeItemButton;return r&&!this._isSelectOneElement&&e.sort(o),this._isTextElement?this.passedElement.value=e:this.passedElement.options=e,e.forEach((function(e){return function(e){var i=n._getTemplate("item",e,s);t.appendChild(i)}(e)})),t},o._triggerChange=function(e){null!=e&&this.passedElement.triggerEvent(R,{value:e})},o._selectPlaceholderChoice=function(){var e=this._store.placeholderChoice;e&&(this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value))},o._handleButtonAction=function(e,t){if(e&&t&&this.config.removeItems&&this.config.removeItemButton){var n=t.parentNode.getAttribute("data-id"),i=e.find((function(e){return e.id===parseInt(n,10)}));this._removeItem(i),this._triggerChange(i.value),this._isSelectOneElement&&this._selectPlaceholderChoice()}},o._handleItemAction=function(e,t,n){var i=this;if(void 0===n&&(n=!1),e&&t&&this.config.removeItems&&!this._isSelectOneElement){var r=t.getAttribute("data-id");e.forEach((function(e){e.id!==parseInt(r,10)||e.highlighted?!n&&e.highlighted&&i.unhighlightItem(e):i.highlightItem(e)})),this.input.focus()}},o._handleChoiceAction=function(e,t){if(e&&t){var n=t.dataset.id,i=this._store.getChoiceById(n);if(i){var r=e[0]&&e[0].keyCode?e[0].keyCode:null,o=this.dropdown.isActive;i.keyCode=r,this.passedElement.triggerEvent(B,{choice:i}),i.selected||i.disabled||this._canAddItem(e,i.value).response&&(this._addItem({value:i.value,label:i.label,choiceId:i.id,groupId:i.groupId,customProperties:i.customProperties,placeholder:i.placeholder,keyCode:i.keyCode}),this._triggerChange(i.value)),this.clearInput(),o&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},o._handleBackspace=function(e){if(this.config.removeItems&&e){var t=e[e.length-1],n=e.some((function(e){return e.highlighted}));this.config.editItems&&!n&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(n||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},o._setLoading=function(e){this._store.dispatch(function(e){return{type:"SET_IS_LOADING",isLoading:e}}(e))},o._handleLoadingState=function(e){void 0===e&&(e=!0);var t=this.itemList.getChild("."+this.config.classNames.placeholder);e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),this.itemList.append(t)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t.innerHTML=this._placeholderValue||"":this.input.placeholder=this._placeholderValue||"")},o._handleSearch=function(e){if(e&&this.input.isFocussed){var t=this._store.choices,n=this.config,i=n.searchFloor,r=n.searchChoices,o=t.some((function(e){return!e.active}));if(e&&e.length>=i){var s=r?this._searchChoices(e):0;this.passedElement.triggerEvent(H,{value:e,resultCount:s})}else o&&(this._isSearching=!1,this._store.dispatch(ve(!0)))}},o._canAddItem=function(e,t){var n=!0,i="function"==typeof this.config.addItemText?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var r=function(e,t,n){return void 0===n&&(n="value"),e.some((function(e){return"string"==typeof t?e[n]===t.trim():e[n]===t}))}(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(n=!1,i="function"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&r&&n&&(n=!1,i="function"==typeof this.config.uniqueItemText?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&n&&"function"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(n=!1,i="function"==typeof this.config.customAddItemText?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:n,notice:i}},o._searchChoices=function(e){var t="string"==typeof e?e.trim():e,n="string"==typeof this._currentValue?this._currentValue.trim():this._currentValue;if(t.length<1&&t===n+" ")return 0;var i=this._store.searchableChoices,o=t,s=[].concat(this.config.searchFields),a=Object.assign(this.config.fuseOptions,{keys:s}),c=new r.a(i,a).search(o);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(function(e){return{type:z,results:e}}(c)),c.length},o._addEventListeners=function(){var e=document.documentElement;e.addEventListener("keydown",this._onKeyDown,!0),e.addEventListener("touchend",this._onTouchEnd,!0),e.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),e.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},o._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener("keydown",this._onKeyDown,!0),e.removeEventListener("touchend",this._onTouchEnd,!0),e.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keyup",this._onKeyUp,{passive:!0}),e.removeEventListener("click",this._onClick,{passive:!0}),e.removeEventListener("touchmove",this._onTouchMove,{passive:!0}),e.removeEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.removeEventListener("blur",this._onBlur,{passive:!0})),this.input.element.removeEventListener("focus",this._onFocus,{passive:!0}),this.input.element.removeEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset,{passive:!0}),this.input.removeEventListeners()},o._onKeyDown=function(e){var t,n=e.target,i=e.keyCode,r=e.ctrlKey,o=e.metaKey;if(n===this.input.element||this.containerOuter.element.contains(n)){var s=this._store.activeItems,a=this.input.isFocussed,c=this.dropdown.isActive,l=this.itemList.hasChildren(),u=String.fromCharCode(i),h=$,d=ee,p=te,f=ne,m=ie,v=re,g=oe,_=se,b=ae,y=r||o;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(u)&&this.showDropdown();var E=((t={})[f]=this._onAKey,t[p]=this._onEnterKey,t[m]=this._onEscapeKey,t[v]=this._onDirectionKey,t[_]=this._onDirectionKey,t[g]=this._onDirectionKey,t[b]=this._onDirectionKey,t[d]=this._onDeleteKey,t[h]=this._onDeleteKey,t);E[i]&&E[i]({event:e,target:n,keyCode:i,metaKey:o,activeItems:s,hasFocusedInput:a,hasActiveDropdown:c,hasItems:l,hasCtrlDownKeyPressed:y})}},o._onKeyUp=function(e){var t=e.target,n=e.keyCode,i=this.input.value,r=this._store.activeItems,o=this._canAddItem(r,i),s=$,a=ee;if(this._isTextElement)if(o.notice&&i){var c=this._getTemplate("notice",o.notice);this.dropdown.element.innerHTML=c.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var l=(n===s||n===a)&&!t.value,u=!this._isTextElement&&this._isSearching,h=this._canSearch&&o.response;l&&u?(this._isSearching=!1,this._store.dispatch(ve(!0))):h&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},o._onAKey=function(e){var t=e.hasItems;e.hasCtrlDownKeyPressed&&t&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},o._onEnterKey=function(e){var t=e.event,n=e.target,i=e.activeItems,r=e.hasActiveDropdown,o=te,s=n.hasAttribute("data-button");if(this._isTextElement&&n.value){var a=this.input.value;this._canAddItem(i,a).response&&(this.hideDropdown(!0),this._addItem({value:a}),this._triggerChange(a),this.clearInput())}if(s&&(this._handleButtonAction(i,n),t.preventDefault()),r){var c=this.dropdown.getChild("."+this.config.classNames.highlightedState);c&&(i[0]&&(i[0].keyCode=o),this._handleChoiceAction(i,c)),t.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),t.preventDefault())},o._onEscapeKey=function(e){e.hasActiveDropdown&&(this.hideDropdown(!0),this.containerOuter.focus())},o._onDirectionKey=function(e){var t=e.event,n=e.hasActiveDropdown,i=e.keyCode,r=e.metaKey,o=oe,s=se,a=ae;if(n||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var c,l=i===o||i===a?1:-1;
2if(r||i===a||i===s)c=l>0?Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]")).pop():this.dropdown.element.querySelector("[data-choice-selectable]");else{var u=this.dropdown.element.querySelector("."+this.config.classNames.highlightedState);c=u?function(e,t,n){if(void 0===n&&(n=1),e&&t){var i=e.parentNode.parentNode,r=Array.from(i.querySelectorAll(t)),o=r.indexOf(e);return r[o+(n>0?1:-1)]}}(u,"[data-choice-selectable]",l):this.dropdown.element.querySelector("[data-choice-selectable]")}c&&(function(e,t,n){if(void 0===n&&(n=1),e)return n>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop}(c,this.choiceList.element,l)||this.choiceList.scrollToChoice(c,l),this._highlightChoice(c)),t.preventDefault()}},o._onDeleteKey=function(e){var t=e.event,n=e.target,i=e.hasFocusedInput,r=e.activeItems;!i||n.value||this._isSelectOneElement||(this._handleBackspace(r),t.preventDefault())},o._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},o._onTouchEnd=function(e){var t=(e||e.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(t)&&((t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()),this._wasTap=!0},o._onMouseDown=function(e){var t,n=e.target,i=e.shiftKey;if(this.choiceList.element.contains(n)&&(t=navigator.userAgent).match(/Trident/)&&t.match(/rv[ :]11/)&&(this._isScrollingOnIe=!0),this.containerOuter.element.contains(n)&&n!==this.input.element){var r=this._store.activeItems,o=i,s=w(n,"data-button"),a=w(n,"data-item"),c=w(n,"data-choice");s?this._handleButtonAction(r,s):a?this._handleItemAction(r,a,o):c&&this._handleChoiceAction(r,c),e.preventDefault()}},o._onMouseOver=function(e){var t=e.target;(t===this.dropdown||this.dropdown.element.contains(t))&&t.hasAttribute("data-choice")&&this._highlightChoice(t)},o._onClick=function(e){var t=e.target;this.containerOuter.element.contains(t)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&t!==this.input.element&&!this.dropdown.element.contains(t)&&this.hideDropdown():this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),this.containerOuter.focus()):(this._store.highlightedActiveItems.length>0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},o._onFocus=function(e){var t=this,n=e.target;this.containerOuter.element.contains(n)&&{text:function(){n===t.input.element&&t.containerOuter.addFocusState()},"select-one":function(){t.containerOuter.addFocusState(),n===t.input.element&&t.showDropdown(!0)},"select-multiple":function(){n===t.input.element&&(t.showDropdown(!0),t.containerOuter.addFocusState())}}[this.passedElement.element.type]()},o._onBlur=function(e){var t=this,n=e.target;if(this.containerOuter.element.contains(n)&&!this._isScrollingOnIe){var i=this._store.activeItems.some((function(e){return e.highlighted}));({text:function(){n===t.input.element&&(t.containerOuter.removeFocusState(),i&&t.unhighlightAll(),t.hideDropdown(!0))},"select-one":function(){t.containerOuter.removeFocusState(),(n===t.input.element||n===t.containerOuter.element&&!t._canSearch)&&t.hideDropdown(!0)},"select-multiple":function(){n===t.input.element&&(t.containerOuter.removeFocusState(),t.hideDropdown(!0),i&&t.unhighlightAll())}})[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},o._onFormReset=function(){this._store.dispatch({type:"RESET_TO",state:this._initialState})},o._highlightChoice=function(e){var t=this;void 0===e&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var i=e;Array.from(this.dropdown.element.querySelectorAll("."+this.config.classNames.highlightedState)).forEach((function(e){e.classList.remove(t.config.classNames.highlightedState),e.setAttribute("aria-selected","false")})),i?this._highlightPosition=n.indexOf(i):(i=n.length>this._highlightPosition?n[this._highlightPosition]:n[n.length-1])||(i=n[0]),i.classList.add(this.config.classNames.highlightedState),i.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(G,{el:i}),this.dropdown.isActive&&(this.input.setActiveDescendant(i.id),this.containerOuter.setActiveDescendant(i.id))}},o._addItem=function(e){var t=e.value,n=e.label,i=void 0===n?null:n,r=e.choiceId,o=void 0===r?-1:r,s=e.groupId,a=void 0===s?-1:s,c=e.customProperties,l=void 0===c?null:c,u=e.placeholder,h=void 0!==u&&u,d=e.ke
vendor: 5,034 bytes, line 2
2yCode,p=void 0===d?null:d,f="string"==typeof t?t.trim():t,m=p,v=l,g=this._store.items,_=i||f,b=parseInt(o,10)||-1,y=a>=0?this._store.getGroupById(a):null,E=g?g.length+1:1;return this.config.prependValue&&(f=this.config.prependValue+f.toString()),this.config.appendValue&&(f+=this.config.appendValue.toString()),this._store.dispatch(function(e){var t=e.value,n=e.label,i=e.id,r=e.choiceId,o=e.groupId,s=e.customProperties,a=e.placeholder,c=e.keyCode;return{type:J,value:t,label:n,id:i,choiceId:r,groupId:o,customProperties:s,placeholder:a,keyCode:c}}({value:f,label:_,id:E,choiceId:b,groupId:a,customProperties:l,placeholder:h,keyCode:m})),this._isSelectOneElement&&this.removeActiveItems(E),this.passedElement.triggerEvent(q,{id:E,value:f,label:_,customProperties:v,groupValue:y&&y.value?y.value:void 0,keyCode:m}),this},o._removeItem=function(e){if(!e||!E("Object",e))return this;var t=e.id,n=e.value,i=e.label,r=e.choiceId,o=e.groupId,s=o>=0?this._store.getGroupById(o):null;return this._store.dispatch(function(e,t){return{type:X,id:e,choiceId:t}}(t,r)),s&&s.value?this.passedElement.triggerEvent(U,{id:t,value:n,label:i,groupValue:s.value}):this.passedElement.triggerEvent(U,{id:t,value:n,label:i}),this},o._addChoice=function(e){var t=e.value,n=e.label,i=void 0===n?null:n,r=e.isSelected,o=void 0!==r&&r,s=e.isDisabled,a=void 0!==s&&s,c=e.groupId,l=void 0===c?-1:c,u=e.customProperties,h=void 0===u?null:u,d=e.placeholder,p=void 0!==d&&d,f=e.keyCode,m=void 0===f?null:f;if(null!=t){var v=this._store.choices,g=i||t,_=v?v.length+1:1,b=this._baseId+"-"+this._idNames.itemChoice+"-"+_;this._store.dispatch(function(e){var t=e.value,n=e.label,i=e.id,r=e.groupId,o=e.disabled,s=e.elementId,a=e.customProperties,c=e.placeholder,l=e.keyCode;return{type:V,value:t,label:n,id:i,groupId:r,disabled:o,elementId:s,customProperties:a,placeholder:c,keyCode:l}}({value:t,label:g,id:_,groupId:l,disabled:a,elementId:b,customProperties:h,placeholder:p,keyCode:m})),o&&this._addItem({value:t,label:g,choiceId:_,customProperties:h,placeholder:p,keyCode:m})}},o._addGroup=function(e){var t=this,n=e.group,i=e.id,r=e.valueKey,o=void 0===r?"value":r,s=e.labelKey,a=void 0===s?"label":s,c=E("Object",n)?n.choices:Array.from(n.getElementsByTagName("OPTION")),l=i||Math.floor((new Date).valueOf()*Math.random()),u=!!n.disabled&&n.disabled;c?(this._store.dispatch(_e(n.label,l,!0,u)),c.forEach((function(e){var n=e.disabled||e.parentNode&&e.parentNode.disabled;t._addChoice({value:e[o],label:E("Object",e)?e[a]:e.innerHTML,isSelected:e.selected,isDisabled:n,groupId:l,customProperties:e.customProperties,placeholder:e.placeholder})}))):this._store.dispatch(_e(n.label,n.id,!1,n.disabled))},o._getTemplate=function(e){var t;if(!e)return null;for(var n=this.config.classNames,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return(t=this._templates[e]).call.apply(t,[this,n].concat(r))},o._createTemplates=function(){var e=this.config.callbackOnCreateTemplates,t={};e&&"function"==typeof e&&(t=e.call(this,S)),this._templates=s()(me,t)},o._createElements=function(){this.containerOuter=new j({element:this._getTemplate("containerOuter",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new j({element:this._getTemplate("containerInner"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new N({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new ce({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new ce({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new k({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},o._createStructure=function(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth(!0)),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement?this._addPredefinedChoices():this._isTextElement&&this._addPredefinedItems()},o._addPredefinedChoices=function(){var e=this,t=this.passedElement.optionGroups;
2if(this._highlightPosition=0,this._isSearching=!1,this._setLoading(!0),t&&t.length){var n=this.passedElement.placeholderOption;n&&"SELECT"===n.parentNode.tagName&&this._addChoice({value:n.value,label:n.innerHTML,isSelected:n.selected,isDisabled:n.disabled,placeholder:!0}),t.forEach((function(t){return e._addGroup({group:t,id:t.id||null})}))}else{var i=this.passedElement.options,r=this.config.sortFn,o=this._presetChoices;i.forEach((function(e){o.push({value:e.value,label:e.innerHTML,selected:e.selected,disabled:e.disabled||e.parentNode.disabled,placeholder:e.hasAttribute("placeholder"),customProperties:e.getAttribute("data-custom-properties")})})),this.config.shouldSort&&o.sort(r);var s=o.some((function(e){return e.selected}));o.forEach((function(t,n){return function(t,n){var i=t.value,r=t.label,o=t.customProperties,a=t.placeholder;if(e._isSelectElement)if(t.choices)e._addGroup({group:t,id:t.id||null});else{var c=e._isSelectOneElement&&!s&&0===n,l=!!c||t.selected,u=!c&&t.disabled;e._addChoice({value:i,label:r,isSelected:l,isDisabled:u,customProperties:o,placeholder:a})}else e._addChoice({value:i,label:r,isSelected:t.selected,isDisabled:t.disabled,customProperties:o,placeholder:a})}(t,n)}))}this._setLoading(!1)},o._addPredefinedItems=function(){var e=this;this._presetItems.forEach((function(t){return function(t){var n=y(t);"Object"===n&&t.value?e._addItem({value:t.value,label:t.label,choiceId:t.id,customProperties:t.customProperties,placeholder:t.placeholder}):"String"===n&&e._addItem({value:t})}(t)}))},o._setChoiceOrItem=function(e){var t=this;({object:function(){e.value&&(t._isTextElement?t._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}):t._addChoice({value:e.value,label:e.label,isSelected:!0,isDisabled:!1,customProperties:e.customProperties,placeholder:e.placeholder}))},string:function(){t._isTextElement?t._addItem({value:e}):t._addChoice({value:e,label:e,isSelected:!0,isDisabled:!1})}})[y(e).toLowerCase()]()},o._findAndSelectChoiceByValue=function(e){var t=this,n=this._store.choices.find((function(n){return t.config.itemComparer(n.value,e)}));n&&!n.selected&&this._addItem({value:n.value,label:n.label,choiceId:n.id,groupId:n.groupId,customProperties:n.customProperties,placeholder:n.placeholder,keyCode:n.keyCode})},o._generatePlaceholderValue=function(){return!this._isSelectOneElement&&!!this.config.placeholder&&(this.config.placeholderValue||this.passedElement.element.getAttribute("placeholder"))},i}();t.default=Ee}]).default},e.exports=i()},function(e,t,n){n(8),e.exports=n(9)},function(e,t,n){var i=n(4);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(6)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(5)(!1)).push([e.i,"/*===============================\n= Choices =\n===============================*/\n.choices {\n position: relative;\n margin-bottom: 24px;\n font-size: 16px;\n}\n\n.choices:focus {\n outline: none;\n}\n\n.choices:last-child {\n margin-bottom: 0;\n}\n\n.choices.is-disabled .choices__inner,\n.choices.is-disabled .choices__input {\n background-color: #eaeaea;\n cursor: not-allowed;\n -webkit-user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.choices.is-disabled .choices__item {\n cursor: not-allowed;\n}\n\n.choices [hidden] {\n display: none !important;\n}\n\n.choices[data-type*='select-one'] {\n cursor: pointer;\n}\n\n.choices[data-type*='select-one'] .choices__inner {\n padding-bottom: 7.5px;\n}\n\n.choices[data-type*='select-one'] .choices__input {\n display: block;\n width: 100%;\n padding: 10px;\n border-bottom: 1px solid #dddddd;\n background-color: #ffffff;\n margin: 0;\n}\n\n.choices[data-type*='select-one'] .choices__button {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCA
2yLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);\n padding: 0;\n background-size: 8px;\n position: absolute;\n top: 50%;\n right: 0;\n margin-top: -10px;\n margin-right: 25px;\n height: 20px;\n width: 20px;\n border-radius: 10em;\n opacity: 0.5;\n}\n\n.choices[data-type*='select-one'] .choices__button:hover, .choices[data-type*='select-one'] .choices__button:focus {\n opacity: 1;\n}\n\n.choices[data-type*='select-one'] .choices__button:focus {\n box-shadow: 0px 0px 0px 2px #00bcd4;\n}\n\n.choices[data-type*='select-one']:after {\n content: '';\n height: 0;\n width: 0;\n border-style: solid;\n border-color: #333333 transparent transparent transparent;\n border-width: 5px;\n position: absolute;\n right: 11.5px;\n top: 50%;\n margin-top: -2.5px;\n pointer-events: none;\n}\n\n.choices[data-type*='select-one'].is-open:after {\n border-color: transparent transparent #333333 transparent;\n margin-top: -7.5px;\n}\n\n.choices[data-type*='select-one'][dir='rtl']:after {\n left: 11.5px;\n right: auto;\n}\n\n.choices[data-type*='select-one'][dir='rtl'] .choices__button {\n right: auto;\n left: 0;\n margin-left: 25px;\n margin-right: 0;\n}\n\n.choices[data-type*='select-multiple'] .choices__inner,\n.choices[data-type*='text'] .choices__inner {\n cursor: text;\n}\n\n.choices[data-type*='select-multiple'] .choices__button,\n.choices[data-type*='text'] .choices__button {\n position: relative;\n display: inline-block;\n margin-top: 0;\n margin-right: -4px;\n margin-bottom: 0;\n margin-left: 8px;\n padding-left: 16px;\n border-left: 1px solid #008fa1;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);\n background-size: 8px;\n width: 8px;\n line-height: 1;\n opacity: 0.75;\n border-radius: 0;\n}\n\n.choices[data-type*='select-multiple'] .choices__button:hover, .choices[data-type*='select-multiple'] .choices__button:focus,\n.choices[data-type*='text'] .choices__button:hover,\n.choices[data-type*='text'] .choices__button:focus {\n opacity: 1;\n}\n\n.choices__inner {\n display: inline-block;\n vertical-align: top;\n width: 100%;\n background-color: #f9f9f9;\n padding: 7.5px 7.5px 3.75px;\n border: 1px solid #dddddd;\n border-radius: 2.5px;\n font-size: 14px;\n min-height: 44px;\n overflow: hidden;\n}\n\n.is-focused .choices__inner,\n.is-open .choices__inner {\n border-color: #b7b7b7;\n}\n\n.is-open .choices__inner {\n border-radius: 2.5px 2.5px 0 0;\n}\n\n.is-flipped.is-open .choices__inner {\n border-radius: 0 0 2.5px 2.5px;\n}\n\n.choices__list {\n margin: 0;\n padding-left: 0;\n list-style: none;\n}\n\n.choices__list--single {\n display: inline-block;\n padding: 4px 16px 4px 4px;\n width: 100%;\n}\n\n[dir='rtl'] .choices__list--single {\n padding-right: 4px;\n padding-left: 16px;\n}\n\n.choices__list--single .choices__item {\n width: 100%;\n}\n\n.choices__list--multiple {\n display: inline;\n}\n\n.choices__list--multiple .choices__item {\n display: inline-block;\n vertical-align: middle;\n border-radius: 20px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 500;\n margin-right: 3.75px;\n margin-bottom: 3.75px;\n background-color: #00bcd4;\n border: 1px solid #00a5bb;\n color: #ffffff;\n word-break: break-all;\n}\n\n.choices__list--multiple .choices__item[data-deletable] {\n padding-right: 5px;\n}\n\n[dir='rtl'] .choices__list--multiple .choices__item {\n margin-right: 0;\n margin-left: 3.75px;\n}\n\n.choices__list--multiple .choices__item.is-highlighted {\n background-color: #00a5bb;\n border: 1px solid #008fa1;\n}\n\n.is-disabled .choices__list--multiple .choices__item {\n background-color: #aaaaaa;\n border: 1px solid #919191;\n}\n\n.choices__list--dropdown {\n display: none;\n z-index: 1;\n position: absolute;\n width: 100%;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n top: 100%;
2\n margin-top: -1px;\n border-bottom-left-radius: 2.5px;\n border-bottom-right-radius: 2.5px;\n overflow: hidden;\n word-break: break-all;\n}\n\n.choices__list--dropdown.is-active {\n display: block;\n}\n\n.is-open .choices__list--dropdown {\n border-color: #b7b7b7;\n}\n\n.is-flipped .choices__list--dropdown {\n top: auto;\n bottom: 100%;\n margin-top: 0;\n margin-bottom: -1px;\n border-radius: 0.25rem 0.25rem 0 0;\n}\n\n.choices__list--dropdown .choices__list {\n position: relative;\n max-height: 300px;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n will-change: scroll-position;\n}\n\n.choices__list--dropdown .choices__item {\n position: relative;\n padding: 10px;\n font-size: 14px;\n}\n\n[dir='rtl'] .choices__list--dropdown .choices__item {\n text-align: right;\n}\n\n@media (min-width: 640px) {\n .choices__list--dropdown .choices__item--selectable {\n padding-right: 100px;\n }\n .choices__list--dropdown .choices__item--selectable:after {\n content: attr(data-select-text);\n font-size: 12px;\n opacity: 0;\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n }\n [dir='rtl'] .choices__list--dropdown .choices__item--selectable {\n text-align: right;\n padding-left: 100px;\n padding-right: 10px;\n }\n [dir='rtl'] .choices__list--dropdown .choices__item--selectable:after {\n right: auto;\n left: 10px;\n }\n}\n\n.choices__list--dropdown .choices__item--selectable.is-highlighted {\n background-color: #f2f2f2;\n}\n\n.choices__list--dropdown .choices__item--selectable.is-highlighted:after {\n opacity: 0.5;\n}\n\n.choices__item {\n cursor: default;\n}\n\n.choices__item--selectable {\n cursor: pointer;\n}\n\n.choices__item--disabled {\n cursor: not-allowed;\n -webkit-user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n user-select: none;\n opacity: 0.5;\n}\n\n.choices__heading {\n font-weight: 600;\n font-size: 12px;\n padding: 10px;\n border-bottom: 1px solid #f7f7f7;\n color: gray;\n}\n\n.choices__button {\n text-indent: -9999px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: 0;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n cursor: pointer;\n}\n\n.choices__button:focus {\n outline: none;\n}\n\n.choices__input {\n display: inline-block;\n vertical-align: baseline;\n background-color: #f9f9f9;\n font-size: 14px;\n margin-bottom: 5px;\n border: 0;\n border-radius: 0;\n max-width: 100%;\n padding: 4px 0 4px 2px;\n}\n\n.choices__input:focus {\n outline: 0;\n}\n\n[dir='rtl'] .choices__input {\n padding-right: 2px;\n padding-left: 0;\n}\n\n.choices__placeholder {\n opacity: 0.5;\n}\n\n/*===== End of Choices ======*/\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=(s=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),o=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(o).concat([r]).join("\n")}var s;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<e.length;r++){var s=e[r];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){var i,r,o={},s=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=i.apply(this,arguments)),r}),a=function(e,t){return t?t.querySelector(e):document.querySelector(e)},c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var i=a.call(this,e,n);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}}(),l=null,u=0,h=[],d=n(7);function p(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=o[i.id];if(r){r.refs++;for(var s=0;s<r.parts.length;s++)r.parts[s](i.parts[s]);for(;s<i.parts.length;s++)r.parts.push(b(i.parts[s],t))}else{var a=[];for(s=0;s<i.parts.length;s++)a.push(b(i.parts[s],t));o[i.id]={id:i.id,refs:1,parts:a}}}}function f(e,t){for(var n=[],i={},r=0;r<e.length;
vendor: 4,924 bytes, line 2
2r++){var o=e[r],s=t.base?o[0]+t.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};i[s]?i[s].parts.push(a):n.push(i[s]={id:s,parts:[a]})}return n}function m(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=h[h.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),h.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,n);n.insertBefore(t,r)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=h.indexOf(e);t>=0&&h.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var i=function(){0;return n.nc}();i&&(e.attrs.nonce=i)}return _(t,e.attrs),m(e,t),t}function _(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,i,r,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var s=u++;n=l||(l=g(t)),i=w.bind(null,n,s,!1),r=w.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",_(t,e.attrs),m(e,t),t}(t),i=S.bind(null,n,t),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),i=I.bind(null,n),r=function(){v(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return p(n,t),function(e){for(var i=[],r=0;r<n.length;r++){var s=n[r];(a=o[s.id]).refs--,i.push(a)}e&&p(f(e,t),t);for(r=0;r<i.length;r++){var a;if(0===(a=i[r]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete o[a.id]}}}};var y,E=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function w(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=E(t,r);else{var o=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function I(e,t){var n=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function S(e,t,n){var i=n.css,r=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||o)&&(i=d(i)),r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([i],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(r=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n.n(i),o=function(e){var t=e.term,n=e.termChange,i=e.activeTerm;return r.a.createElement("div",{className:"qala-filters__tax-list__terms__term"},r.a.createElement("input",{checked:i,id:"term-".concat(t.term_id),type:"checkbox",onChange:function(e){var i=e.target;return n(t,i.checked)}}),r.a.createElement("label",{htmlFor:"term-".concat(t.term_id),className:i?"active":""},t.name))};function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}
2(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=wp.element.useState,c=function(e){var t=e.activeTerms,n=e.updateActiveTerms,i=e.terms,c=e.tax,l=e.shouldShowTaxHeader,u=void 0===l||l,h=s(a(!1),2),d=h[0],p=h[1];function f(e){return t.some((function(t){var n=t.term_id;return parseInt(n)===parseInt(e.term_id)}))}return r.a.createElement("div",{className:"qala-filters__tax-list qala-filters__tax-list-".concat(c.name)},u&&r.a.createElement("h3",{className:d?"qala-filters__tax-list__header open":"qala-filters__tax-list__header",onClick:function(){return p(!d)}},c.label),r.a.createElement("div",{className:d?"qala-filters__tax-list__terms open":"qala-filters__tax-list__terms"},i.map((function(e){return r.a.createElement(o,{key:e.term_id,term:e,activeTerm:f(e),termChange:n})}))))},l=function(e){var t=e.removeActiveTerm,n=e.term;return r.a.createElement("button",{role:"button",className:"qala-filters__tax-list__active-terms__term",onClick:function(){return t(n)}},n.name)},u=function(e){var t=e.removeActiveTerm,n=e.terms;return r.a.createElement("div",{className:"qala-filters__tax-list__active-terms"},n.map((function(e){return r.a.createElement(l,{key:e.term_id,term:e,removeActiveTerm:t})})))},h=function(e){return e.isLoading?r.a.createElement("div",{className:"qala-filters__tax-list__loading-container"},r.a.createElement("svg",{className:"loader",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("circle",{className:"internal-circle",cx:"60",cy:"60",r:"30"}),r.a.createElement("circle",{className:"external-circle",cx:"60",cy:"60",r:"50"}))):null},d=function(e){var t=e.resetFilters,n=e.terms,i=e.t10ns;return n.length?r.a.createElement("div",{className:"qala-filters__reset-filter-container"},r.a.createElement("button",{role:"button",className:"reset-filter-button",onClick:function(){return t()}},i.reset_filters)):null},p=function(e){var t=e.toggle,n=e.hasActiveTerms,i=e.isOpen,o=e.t10ns;return r.a.createElement("div",{className:"qala-filters__tax-list__show-hide"},r.a.createElement("button",{role:"button",onClick:function(){return t()}},n?i?o.hide_filters:o.update_filters:i?o.hide_filters:o.filter))},f=function(e){var t=e.termCount,n=e.t10ns;return r.a.createElement("span",{className:"qala-filters__mobile-header"},0<t?"".concat(n.filter," (").concat(t,")"):"".concat(n.filter))},m=function(e){var t=e.toggle;return r.a.createElement("div",{className:"qala-filters__close-area",onClick:function(){return t()}})},v=function(e){var t=e.t10ns,n=e.toggle;return r.a.createElement("div",{className:"qala-filters__apply-filter-container"},r.a.createElement("button",{role:"button",className:"btn",onClick:function(){return n()}},t.apply_filters))},g=n(1),_=n.n(g),b=wp.element,y=b.useEffect,E=b.createRef,w=function(e){var t=e.orderByChange,n=e.orderby,i=E();return y((function(){new _.a(i.current,{choices:Object.keys(n.options).map((function(e){return{value:e,label:n.options[e],selected:e===n.default}})),searchEnabled:!1,itemSelectText:""}),i.current.addEventListener("choice",(function(e){var n=e.detail;t(n.choice.value)}))}),[]),r.a.createElement("div",{className:"qala-filters__tax-list__orderby-container"},r.a.createElement("select",{ref:i}))};function I(e){return(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})(e)}function S(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function x(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var L=wp.element,k=L.Component,j=L.Fragment,M=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?C(e):t}(this,O(t).call(this,e)),T(C(n),"state",{activeTerms:[],isLoading:!1,isOpen:!1,orderby:"",shouldShowTaxHeader:!0}),T(C(n),"toggle",(function(){n.setState({isOpen:!n.state.isOpen})})),T(C(n),"orderByChange",(function(e){n.setState({orderby:e},(function(){n.getContent()}))})),T(C(n),"updateActiveTerm",(function(e,t){var i=S(n.state.activeTerms),r=i.findIndex((function(t){return t.term_id===e.term_id}));t&&-1===r&&i.push(e),!t&&-1<r&&i.splice(r,1),n.setState({activeTerms:i},(function(){n.getContent(),n.replaceHistory()}))})),T(C(n),"removeActiveTerm",(function(e){n.updateActiveTerm(e,!1)})),T(C(n),"resetActiveTerms",(function(){n.setState({activeTerms:[]},(function(){n.getContent(),n.replaceHistory()}))})),n.init(),n}var n,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(t,e),n=t,(i=[{key:"componentDidMount",value:function(){var e=this,t=jQuery("body");this.orderby&&this.setState({orderby:this.orderby.default}),t.on("qala-filters-load-more",(function(){e.getContent(!0)})),this.setFilterFromHistory(),t.addClass("qala-filters-active")}},{key:"init",value:function(){var e,t=document.getElementById("qala-filters__tax-list");this.taxonomies=t?JSON.parse(t.dataset.taxonomies):[],this.posttype=t?t.dataset.posttype:"",this.orderby=t&&t.dataset.orderby?JSON.parse(t.dataset.orderby):null,this.resultContainer=t?t.dataset.ajax_container_selector:"",this.singleResultSelector=t?t.dataset.single_result_selector:"",this.shouldShowTaxHeader=!!(null==t?void 0:null===(e=t.dataset)||void 0===e?void 0:e.should_show_tax_header),this.t10ns=QalaFilters.t10ns}},{key:"getSortedTaxTerms",value:function(){var e=this.state.activeTerms;if(!e.length)return[];var t={},n=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);
2n=!0){var a=o.value;t.hasOwnProperty(a.taxonomy)||(t[a.taxonomy]=[]),t[a.taxonomy].push(a.term_id)}}catch(e){i=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw r}}return t}},{key:"replaceHistory",value:function(){var e=jQuery(this.resultContainer);history.replaceState({activeTerms:this.state.activeTerms,loadedItems:jQuery(this.singleResultSelector,e).length},null,null)}},{key:"setFilterFromHistory",value:function(){var e=this,t=992<window.innerWidth;if(history.state){var n=history.state,i=n.activeTerms,r=n.loadedItems;(r||i&&0!==i.length)&&(i&&0!==i.length||(t=!1),this.setState({activeTerms:i,isOpen:t},(function(){e.getContent(!1,r)})))}}},{key:"showLoader",value:function(){jQuery("body").addClass("qala-filters-loading"),this.setState({isLoading:!0})}},{key:"hideLoader",value:function(){jQuery("body").removeClass("qala-filters-loading"),this.setState({isLoading:!1})}},{key:"getContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.showLoader();var i=jQuery(this.resultContainer),r={action:"qala_filters",terms:this.getSortedTaxTerms(),post_type:this.posttype,orderby:this.state.orderby};n&&(r.loadedItems=n),t&&(r.offset=jQuery(this.singleResultSelector,i).length),jQuery.post(QalaFilters.apiBaseUrl,r).then((function(n){e.hideLoader(),t?i.append(n.html):i.html(n.html);var r=!0;0===n.query.found_posts&&(r=!1),parseInt(n.query.found_posts)===jQuery(e.singleResultSelector,i).length&&(r=!1),e.replaceHistory(),jQuery("body").trigger("qala-filters-finished-loading",r)}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.activeTerms,i=t.isLoading,o=t.isOpen;return r.a.createElement(j,null,r.a.createElement(p,{hasActiveTerms:n.length,isOpen:o,t10ns:this.t10ns,toggle:this.toggle}),this.orderby&&r.a.createElement(w,{t10ns:this.t10ns,orderby:this.orderby,orderByChange:this.orderByChange}),r.a.createElement("div",{className:o?"qala-filters__container open":"qala-filters__container"},r.a.createElement("div",{className:"qala-filters__wrapper"},r.a.createElement("div",{className:"qala-filters__inner-wrapper"},r.a.createElement("div",{className:"qala-filters__mobile-buttons"},r.a.createElement(f,{termCount:n.length,t10ns:this.t10ns}),r.a.createElement(d,{t10ns:this.t10ns,terms:n,resetFilters:this.resetActiveTerms})),r.a.createElement("div",{className:"qala-filters__tax-list__terms-container"},this.taxonomies.map((function(t,i){var o=t.tax,s=t.terms;return r.a.createElement(c,{key:i,tax:o,terms:s,activeTerms:n,updateActiveTerms:e.updateActiveTerm,shouldShowTaxHeader:e.shouldShowTaxHeader})}))),r.a.createElement("div",{className:"qala-filters__tax-list__active-terms-container"},r.a.createElement(u,{terms:n,removeActiveTerm:this.removeActiveTerm}),r.a.createElement(d,{t10ns:this.t10ns,terms:n,resetFilters:this.resetActiveTerms}))),r.a.createElement(h,{isLoading:i}),r.a.createElement(v,{t10ns:this.t10ns,toggle:this.toggle})),r.a.createElement(m,{toggle:this.toggle})),r.a.createElement("div",{className:"qala-filters__overlay"}))}}])&&x(n.prototype,i),o&&x(n,o),t}(k),N=(n(3),wp.element.render);jQuery((function(e){var t=document.getElementById("qala-filters__tax-list__app");if(t){N(React.createElement(M,null),t);var n=e("#ajax-load-more"),i=e("body");n&&n.length&&n.on("click",(function(e){e.preventDefault(),n.addClass("loading"),n.prop("disabled",!0),i.trigger("qala-filters-load-more")})),i.on("qala-filters-finished-loading",(function(e,t){n.removeClass("loading").removeClass("disabled"),n.prop("disabled",!1),t||(n.addClass("disabled"),n.prop("disabled",!0))}))}}))},function(e,t){}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.