accessible-autocomplete
Advanced tools
Comparing version 2.0.4 to 3.0.0
@@ -5,2 +5,54 @@ # CHANGELOG | ||
## 3.0.0 - 2024-04-19 | ||
### Breaking changes | ||
#### Verify your code does not rely on removed polyfills | ||
Following on from [our previous announcement](https://github.com/alphagov/design-system-team-internal/issues/561), the accessible autocomplete code is no longer transpiled and polyfilled to support IE8-10. | ||
However, because the polyfills create or extend global objects, you might have other code in your service unintentionally relying on the inclusion of these polyfills. You might need to introduce your own polyfills or rewrite your JavaScript to avoid using the polyfilled features. | ||
This change was introduced in [pull request #612: Update packages, configs + Node.js 20](https://github.com/alphagov/accessible-autocomplete/pull/612). | ||
#### Check for minor visual changes in the rendering of the component | ||
We've made some style adjustments to the stylesheet shipped with the component to make its colours, height, line-height and padding match those of the latest version of GOV.UK Frontend's `<input>`. | ||
If you're using this stylesheet: | ||
- check if our style update affects the rendering of the component in your service, and adjust if necessary | ||
- if you were adding to the default style's to match GOV.UK Frontend's input, | ||
look for CSS declarations you may now be able to remove | ||
This change was introduced in [pull request #644: Align CSS styles with GOV.UK Frontend](https://github.com/alphagov/accessible-autocomplete/pull/644). | ||
### New features | ||
#### Options to add classes to parts of the component | ||
Use these new options to add your own classes to parts of the component: | ||
- `inputClasses` for the `input` element | ||
- `hintClasses` for the suggestion hint (`input` element appearing when the text typed by the user matches the start of an option) | ||
- `menuClasses` for the `ul` element listing the options | ||
You can also add custom classes to the `ul` listing the options through the new `menuAttributes` option, providing a `className` or `class` property. | ||
This change was introduced in: | ||
- [pull request #602: Add `inputClasses` option](https://github.com/alphagov/accessible-autocomplete/pull/602). Thanks to @andreyyudin for contributing this change. | ||
- [pull request #649: Update options for styling component inputs](https://github.com/alphagov/accessible-autocomplete/pull/649) | ||
- [pull request #650: Update ways of configuring menu attributes](https://github.com/alphagov/accessible-autocomplete/pull/650) | ||
#### New class on the component's status | ||
Use the new `autocomplete__status` class in your CSS (or `<CSS_NAMESPACE>__status` if you set [the `cssNamespace` option](https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#cssnamespace-default-autocomplete)) to customise the styles of the component's status element (hidden element that makes announcements to assistive technologies). | ||
This change was introduced in [pull request #620: Add className attribute to status component](https://github.com/alphagov/accessible-autocomplete/pull/620). Thanks to @lennym for contributing this change. | ||
### Fixes | ||
- [Pull request #621: Handle query change when the text length does not change](https://github.com/alphagov/accessible-autocomplete/pull/621). Thanks to @archferns for contributing this change. | ||
- [Pull request #591: Add `menuAttributes` to fix Axe's 'aria-input-field-name' error](https://github.com/alphagov/accessible-autocomplete/pull/591). Thanks to @mchughbri for contributing this change. | ||
- [Pull request #600: Fix null aria attributes](https://github.com/alphagov/accessible-autocomplete/pull/600). Thanks to @mark-roberts-ho for contributing this change. | ||
- [Pull request #606: Correct description of tStatusSelectedOption i18n option in README and tweak some wording for consistency with other parts of the README](https://github.com/alphagov/accessible-autocomplete/pull/606). Thanks to @ellamdav for contributing this change. | ||
## 2.0.4 - 2022-02-07 | ||
@@ -7,0 +59,0 @@ |
@@ -9,27 +9,19 @@ # Contributing | ||
You will need a recent version of Node and npm installed: | ||
You will need a recent version of Node and npm installed. Check the `.nvmrc` for a recommended version: | ||
```bash | ||
$ node -v | ||
v7.10.0 | ||
v14.21.3 | ||
$ npm -v | ||
v5.0.0 | ||
v6.14.18 | ||
``` | ||
If you want to run the selenium tests, you will also need a local copy of the Java Development Kit: | ||
To install Node (with npm) locally on macOS, we recommend [brew](https://brew.sh) with | ||
[nvm](https://github.com/nvm-sh/nvm): | ||
```bash | ||
$ java -version | ||
java version "1.8.0_131" | ||
Java(TM) SE Runtime Environment (build 1.8.0_131-b11) | ||
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) | ||
brew install nvm | ||
nvm install | ||
``` | ||
To install Node (with npm) and Java locally on macOS, you can use [brew](https://brew.sh/): | ||
```bash | ||
brew install node | ||
brew cask install java | ||
``` | ||
## Project structure | ||
@@ -106,3 +98,3 @@ | ||
When you push to a branch, git will run a `npm run prepush` [script](scripts/check-staged.js) that will compile the build on your behalf to the `dist/` folder. If it then finds unstaged files in `dist/`, it will fail your push. | ||
When you push to a branch, git will run a `npm run prepush` [script](scripts/check-staged.mjs) that will compile the build on your behalf to the `dist/` folder. If it then finds unstaged files in `dist/`, it will fail your push. | ||
@@ -149,23 +141,24 @@ The solution is to commit the files, preferably as part of a separate commit: | ||
Create a pull request for the release. | ||
Create a pull request for the release and merge once it has been approved, then run: | ||
To actually publish, you will need access to an `npm` account that owns `accessible-autocomplete`. Merge the version PR and then run: | ||
```bash | ||
git checkout main | ||
git pull --rebase | ||
npm publish | ||
``` | ||
[Create a new release](https://github.com/alphagov/accessible-autocomplete/releases/new) on GitHub. | ||
1. Select the latest tag version. | ||
2. Set "v[VERSION-NUMBER]" as the title. | ||
3. Add the release notes from the changelog. | ||
4. Add a summary of highlights. | ||
5. Publish the release. | ||
### Publish the release | ||
You don't need to manually attach source code files to the release on GitHub. | ||
1. Sign in to npm (`npm login`) as `govuk-patterns-and-tools` using the credentials from BitWarden. | ||
2. Run `npm publish` to publish to npm. | ||
3. Open the ['create a new release' dialog](https://github.com/alphagov/accessible-autocomplete/releases/new) on GitHub. | ||
4. Select the latest tag version. | ||
5. Set 'v[VERSION-NUMBER]' as the title. | ||
6. Add the release notes from the changelog. | ||
7. Add a summary of highlights. | ||
8. Select **Publish release**. | ||
You do not need to manually attach source code files to the release on GitHub. | ||
Post a short summary of the release in the cross-government and GDS #govuk-design-system Slack channels. For example: | ||
🚀 We’ve just released Accessible Autocomplete v2.0.1. You can now use the acccessible autocomplete multiple times on one page. Thanks to @<SLACK-NAME> and @<SLACK-NAME> for helping with this release. [https://github.com/alphagov/accessible-autocomplete/releases/tag/v2.0.1](https://github.com/alphagov/accessible-autocomplete/releases/tag/v2.0.1) |
@@ -1,2 +0,2 @@ | ||
(function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["accessibleAutocomplete"]=t():e["accessibleAutocomplete"]=t()})(window,function(){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/",o(o.s=37)}([function(e,t,n){var m=n(1),v=n(6),y=n(7),g=n(16),_=n(18),b="prototype",w=function(e,t,n){var r,o,i,u,a=e&w.F,s=e&w.G,l=e&w.S,c=e&w.P,p=e&w.B,f=s?m:l?m[t]||(m[t]={}):(m[t]||{})[b],d=s?v:v[t]||(v[t]={}),h=d[b]||(d[b]={});for(r in s&&(n=t),n)i=((o=!a&&f&&f[r]!==undefined)?f:n)[r],u=p&&o?_(i,m):c&&"function"==typeof i?_(Function.call,i):i,f&&g(f,r,i,e&w.U),d[r]!=i&&y(d,r,u),c&&h[r]!=i&&(h[r]=i)};m.core=v,w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,e.exports=w},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"h",function(){return r}),n.d(t,"createElement",function(){return r}),n.d(t,"cloneElement",function(){return i}),n.d(t,"Component",function(){return g}),n.d(t,"render",function(){return _}),n.d(t,"rerender",function(){return f}),n.d(t,"options",function(){return E});var s=function s(){},E={},l=[],c=[];function r(e,t){var n,r,o,i,u=c;for(i=arguments.length;2<i--;)l.push(arguments[i]);for(t&&null!=t.children&&(l.length||l.push(t.children),delete t.children);l.length;)if((r=l.pop())&&r.pop!==undefined)for(i=r.length;i--;)l.push(r[i]);else"boolean"==typeof r&&(r=null),(o="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(o=!1)),o&&n?u[u.length-1]+=r:u===c?u=[r]:u.push(r),n=o;var a=new s;return a.nodeName=e,a.children=u,a.attributes=null==t?undefined:t,a.key=null==t?undefined:t.key,E.vnode!==undefined&&E.vnode(a),a}function M(e,t){for(var n in t)e[n]=t[n];return e}var o="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function i(e,t){return r(e.nodeName,M(M({},e.attributes),t),2<arguments.length?[].slice.call(arguments,2):e.children)}var p=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,u=[];function a(e){!e._dirty&&(e._dirty=!0)&&1==u.push(e)&&(E.debounceRendering||o)(f)}function f(){var e,t=u;for(u=[];e=t.pop();)e._dirty&&V(e)}function N(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function I(e){var t=M({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(n!==undefined)for(var r in n)t[r]===undefined&&(t[r]=n[r]);return t}function k(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===p.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var u=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,d,u):e.removeEventListener(t,d,u),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(s){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var a=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function d(e){return this._listeners[e.type](E.event&&E.event(e)||e)}var A=[],P=0,j=!1,L=!1;function T(){for(var e;e=A.pop();)E.afterMount&&E.afterMount(e),e.componentDidMount&&e.componentDidMount()}function B(e,t,n,r,o,i){P++||(j=null!=o&&o.ownerSVGElement!==undefined,L=null!=e&&!("__preactattr_"in e));var u=D(e,t,n,r,i);return o&&u.parentNode!==o&&o.appendChild(u),--P||(L=!1,i||T()),u}function D(e,t,n,r,o){var i=e,u=j;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&e.splitText!==undefined&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),F(e,!0))),i["__preactattr_"]=!0,i;var a=t.nodeName;if("function"==typeof a)return function d(e,t,n,r){var o=e&&e._component,i=o,u=e,a=o&&e._componentConstructor===t.nodeName,s=a,l=I(t);for(;o&&!s&&(o=o._parentComponent);)s=o.constructor===t.nodeName;o&&s&&(!r||o._component)?(U(o,l,3,n,r),e=o.base):(i&&!a&&(q(i),e=u=null),o=R(t.nodeName,l,n),e&&!o.nextBase&&(o.nextBase=e,u=null),U(o,l,1,n,r),e=o.base,u&&e!==u&&(u._component=null,F(u,!1)));return e}(e,t,n,r);if(j="svg"===a||"foreignObject"!==a&&j,a=String(a),(!e||!N(e,a))&&(i=function h(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}(a,j),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),F(e,!0)}var s=i.firstChild,l=i["__preactattr_"],c=t.children;if(null==l){l=i["__preactattr_"]={};for(var p=i.attributes,f=p.length;f--;)l[p[f].name]=p[f].value}return!L&&c&&1===c.length&&"string"==typeof c[0]&&null!=s&&s.splitText!==undefined&&null==s.nextSibling?s.nodeValue!=c[0]&&(s.nodeValue=c[0]):(c&&c.length||null!=s)&&function S(e,t,n,r,o){var i,u,a,s,l,c=e.childNodes,p=[],f={},d=0,h=0,m=c.length,v=0,y=t?t.length:0;if(0!==m)for(var g=0;g<m;g++){var _=c[g],b=_["__preactattr_"],w=y&&b?_._component?_._component.__key:b.key:null;null!=w?(d++,f[w]=_):(b||(_.splitText!==undefined?!o||_.nodeValue.trim():o))&&(p[v++]=_)}if(0!==y)for(var g=0;g<y;g++){s=t[g],l=null;var w=s.key;if(null!=w)d&&f[w]!==undefined&&(l=f[w],f[w]=undefined,d--);else if(h<v)for(i=h;i<v;i++)if(p[i]!==undefined&&(x=u=p[i],C=o,"string"==typeof(O=s)||"number"==typeof O?x.splitText!==undefined:"string"==typeof O.nodeName?!x._componentConstructor&&N(x,O.nodeName):C||x._componentConstructor===O.nodeName)){l=u,p[i]=undefined,i===v-1&&v--,i===h&&h++;break}l=D(l,s,n,r),a=c[g],l&&l!==e&&l!==a&&(null==a?e.appendChild(l):l===a.nextSibling?k(a):e.insertBefore(l,a))}var x,O,C;if(d)for(var g in f)f[g]!==undefined&&F(f[g],!1);for(;h<=v;)(l=p[v--])!==undefined&&F(l,!1)}(i,c,n,r,L||null!=l.dangerouslySetInnerHTML),function m(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||v(e,r,n[r],n[r]=undefined,j);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||v(e,r,n[r],n[r]=t[r],j)}(i,t.attributes,l),j=u,i}function F(e,t){var n=e._component;n?q(n):(null!=e["__preactattr_"]&&e["__preactattr_"].ref&&e["__preactattr_"].ref(null),!1!==t&&null!=e["__preactattr_"]||k(e),h(e))}function h(e){for(e=e.lastChild;e;){var t=e.previousSibling;F(e,!0),e=t}}var m=[];function R(e,t,n){var r,o=m.length;for(e.prototype&&e.prototype.render?(r=new e(t,n),g.call(r,t,n)):((r=new g(t,n)).constructor=e,r.render=y);o--;)if(m[o].constructor===e)return r.nextBase=m[o].nextBase,m.splice(o,1),r;return r}function y(e,t,n){return this.constructor(e,n)}function U(e,t,n,r,o){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,"undefined"==typeof e.constructor.getDerivedStateFromProps&&(!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r)),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===E.syncComponentUpdates&&e.base?a(e):V(e,1,o)),e.__ref&&e.__ref(e))}function V(e,t,n,r){if(!e._disable){var o,i,u,a=e.props,s=e.state,l=e.context,c=e.prevProps||a,p=e.prevState||s,f=e.prevContext||l,d=e.base,h=e.nextBase,m=d||h,v=e._component,y=!1,g=f;if(e.constructor.getDerivedStateFromProps&&(s=M(M({},s),e.constructor.getDerivedStateFromProps(a,s)),e.state=s),d&&(e.props=c,e.state=p,e.context=f,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(a,s,l)?y=!0:e.componentWillUpdate&&e.componentWillUpdate(a,s,l),e.props=a,e.state=s,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!y){o=e.render(a,s,l),e.getChildContext&&(l=M(M({},l),e.getChildContext())),d&&e.getSnapshotBeforeUpdate&&(g=e.getSnapshotBeforeUpdate(c,p));var _,b,w=o&&o.nodeName;if("function"==typeof w){var x=I(o);(i=v)&&i.constructor===w&&x.key==i.__key?U(i,x,1,l,!1):(_=i,e._component=i=R(w,x,l),i.nextBase=i.nextBase||h,i._parentComponent=e,U(i,x,0,l,!1),V(i,1,n,!0)),b=i.base}else u=m,(_=v)&&(u=e._component=null),(m||1===t)&&(u&&(u._component=null),b=function B(t,n,r,o,i,u){P++||(j=null!=i&&i.ownerSVGElement!==undefined,L=null!=t&&!("__preactattr_"in t));var a=D(t,n,r,o,u);return i&&a.parentNode!==i&&i.appendChild(a),--P||(L=!1,u||T()),a}(u,o,l,n||!d,m&&m.parentNode,!0));if(m&&b!==m&&i!==v){var O=m.parentNode;O&&b!==O&&(O.replaceChild(b,m),_||(m._component=null,F(m,!1)))}if(_&&q(_),(e.base=b)&&!r){for(var C=e,S=e;S=S._parentComponent;)(C=S).base=b;b._component=C,b._componentConstructor=C.constructor}}for(!d||n?A.unshift(e):y||(e.componentDidUpdate&&e.componentDidUpdate(c,p,g),E.afterUpdate&&E.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);P||r||T()}}function q(e){E.beforeUnmount&&E.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?q(n):t&&(t["__preactattr_"]&&t["__preactattr_"].ref&&t["__preactattr_"].ref(null),k(e.nextBase=t),m.push(e),h(t)),e.__ref&&e.__ref(null)}function g(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function _(e,t,n){return B(n,e,{},!1,t,!1)}M(g.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=M(M({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),a(this)},forceUpdate:function(e){e&&this._renderCallbacks.push(e),V(this,2)},render:function _(){}});var b={h:r,createElement:r,cloneElement:i,Component:g,render:_,rerender:f,options:E};t["default"]=b},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(8),o=n(40);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(9),i=n(38),u=n(39),a=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(o(e),t=u(t,!0),o(n),i)try{return a(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(e===undefined?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(41)})},function(e,t,n){var r=n(2),o=n(1).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var i=n(1),u=n(7),a=n(17),s=n(10)("src"),r="toString",o=Function[r],l=(""+o).split(r);n(6).inspectSource=function(e){return o.call(e)},(e.exports=function(e,t,n,r){var o="function"==typeof n;o&&(a(n,"name")||u(n,"name",t)),e[t]!==n&&(o&&(a(n,s)||u(n,s,e[t]?""+e[t]:l.join(String(t)))),e===i?e[t]=n:r?e[t]?e[t]=n:u(e,t,n):(delete e[t],u(e,t,n)))})(Function.prototype,r,function(){return"function"==typeof this&&this[s]||o.call(this)})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(19);e.exports=function(r,o,e){if(i(r),o===undefined)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(42),o=n(28);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(11),o=n(12);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var s=n(21),l=n(24),c=n(43);e.exports=function(a){return function(e,t,n){var r,o=s(e),i=l(o.length),u=c(n,i);if(a&&t!=t){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((a||u in o)&&o[u]===t)return a||u||0;return!a&&-1}}},function(e,t,n){var r=n(25),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t,n){var r=n(27)("keys"),o=n(10);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(6),o=n(1),i="__core-js_shared__",u=o[i]||(o[i]={});(e.exports=function(e,t){return u[e]||(u[e]=t!==undefined?t:{})})("versions",[]).push({version:r.version,mode:n(44)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(12);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(8).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(3)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(0),o=n(32)(1);r(r.P+r.F*!n(13)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var _=n(18),b=n(11),w=n(29),x=n(24),r=n(47);e.exports=function(p,e){var f=1==p,d=2==p,h=3==p,m=4==p,v=6==p,y=5==p||v,g=e||r;return function(e,t,n){for(var r,o,i=w(e),u=b(i),a=_(t,n,3),s=x(u.length),l=0,c=f?g(e,s):d?g(e,0):undefined;l<s;l++)if((y||l in u)&&(o=a(r=u[l],l,i),p))if(f)c[l]=o;else if(o)switch(p){case 3:return!0;case 5:return r;case 6:return l;case 2:c.push(r)}else if(m)return!1;return v?-1:h||m?m:c}}},function(e,t,n){var r=n(22);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(27)("wks"),o=n(10),i=n(1).Symbol,u="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=u&&i[e]||(u?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";var r=n(0),o=n(23)(!1),i=[].indexOf,u=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!n(13)(i)),"Array",{indexOf:function(e){return u?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(0);r(r.S,"Object",{create:n(52)})},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(14),n(30),n(31),n(35),n(49),n(50);var r=n(5),o=function s(e){return e&&e.__esModule?e:{"default":e}}(n(51));function i(e){if(!e.element)throw new Error("element is not defined");if(!e.id)throw new Error("id is not defined");if(!e.source)throw new Error("source is not defined");Array.isArray(e.source)&&(e.source=u(e.source)),(0,r.render)((0,r.createElement)(o["default"],e),e.element)}var u=function u(n){return function(t,e){e(n.filter(function(e){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}))}};i.enhanceSelectElement=function(n){if(!n.selectElement)throw new Error("selectElement is not defined");if(!n.source){var e=[].filter.call(n.selectElement.options,function(e){return e.value||n.preserveNullOptions});n.source=e.map(function(e){return e.textContent||e.innerText})}if(n.onConfirm=n.onConfirm||function(t){var e=[].filter.call(n.selectElement.options,function(e){return(e.textContent||e.innerText)===t})[0];e&&(e.selected=!0)},n.selectElement.value||n.defaultValue===undefined){var t=n.selectElement.options[n.selectElement.options.selectedIndex];n.defaultValue=t.textContent||t.innerText}n.name===undefined&&(n.name=""),n.id===undefined&&(n.selectElement.id===undefined?n.id="":n.id=n.selectElement.id),n.autoselect===undefined&&(n.autoselect=!0);var r=document.createElement("div");n.selectElement.parentNode.insertBefore(r,n.selectElement),i(Object.assign({},n,{element:r})),n.selectElement.style.display="none",n.selectElement.id=n.selectElement.id+"-select"};var a=i;t["default"]=a},function(e,t,n){e.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(2);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var f=n(20),d=n(45),h=n(46),m=n(29),v=n(11),o=Object.assign;e.exports=!o||n(4)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||Object.keys(o({},t)).join("")!=r})?function(e,t){for(var n=m(e),r=arguments.length,o=1,i=d.f,u=h.f;o<r;)for(var a,s=v(arguments[o++]),l=i?f(s).concat(i(s)):f(s),c=l.length,p=0;p<c;)u.call(s,a=l[p++])&&(n[a]=s[a]);return n}:o},function(e,t,n){var u=n(17),a=n(21),s=n(23)(!1),l=n(26)("IE_PROTO");e.exports=function(e,t){var n,r=a(e),o=0,i=[];for(n in r)n!=l&&u(r,n)&&i.push(n);for(;t.length>o;)u(r,n=t[o++])&&(~s(i,n)||i.push(n));return i}},function(e,t,n){var r=n(25),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(48);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(2),o=n(33),i=n(34)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=undefined),r(t)&&null===(t=t[i])&&(t=undefined)),t===undefined?Array:t}},function(e,t,n){"use strict";var r=n(0),o=n(32)(2);r(r.P+r.F*!n(13)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(0);r(r.S,"Array",{isArray:n(33)})},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(14),n(36),n(30),n(31),n(35),n(55),n(58);var $=n(5),J=o(n(60)),r=o(n(61));function o(e){return e&&e.__esModule?e:{"default":e}}function X(){return(X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function Y(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var a=function(n){function e(e){var t;return(t=n.call(this,e)||this).elementReferences={},t.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},t.handleComponentBlur=t.handleComponentBlur.bind(i(i(t))),t.handleKeyDown=t.handleKeyDown.bind(i(i(t))),t.handleUpArrow=t.handleUpArrow.bind(i(i(t))),t.handleDownArrow=t.handleDownArrow.bind(i(i(t))),t.handleEnter=t.handleEnter.bind(i(i(t))),t.handlePrintableKey=t.handlePrintableKey.bind(i(i(t))),t.handleListMouseLeave=t.handleListMouseLeave.bind(i(i(t))),t.handleOptionBlur=t.handleOptionBlur.bind(i(i(t))),t.handleOptionClick=t.handleOptionClick.bind(i(i(t))),t.handleOptionFocus=t.handleOptionFocus.bind(i(i(t))),t.handleOptionMouseDown=t.handleOptionMouseDown.bind(i(i(t))),t.handleOptionMouseEnter=t.handleOptionMouseEnter.bind(i(i(t))),t.handleInputBlur=t.handleInputBlur.bind(i(i(t))),t.handleInputChange=t.handleInputChange.bind(i(i(t))),t.handleInputFocus=t.handleInputFocus.bind(i(i(t))),t.pollInputElement=t.pollInputElement.bind(i(i(t))),t.getDirectInputChanges=t.getDirectInputChanges.bind(i(i(t))),t}(function r(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t})(e,n);var t=e.prototype;return t.isQueryAnOption=function(e,t){var n=this;return-1!==t.map(function(e){return n.templateInputValue(e).toLowerCase()}).indexOf(e.toLowerCase())},t.componentDidMount=function(){this.pollInputElement()},t.componentWillUnmount=function(){clearTimeout(this.$pollInput)},t.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){e.pollInputElement()},100)},t.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},t.componentDidUpdate=function(e,t){var n=this.state.focused,r=null===n,o=t.focused!==n;o&&!r&&this.elementReferences[n].focus();var i=-1===n,u=o&&null===t.focused;if(i&&u){var a=this.elementReferences[n];a.setSelectionRange(0,a.value.length)}},t.hasAutoselect=function(){return!Y()&&this.props.autoselect},t.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},t.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},t.handleComponentBlur=function(e){var t,n=this.state,r=n.options,o=n.query,i=n.selected;this.props.confirmOnBlur?(t=e.query||o,this.props.onConfirm(r[i])):t=o,this.setState({focused:null,menuOpen:e.menuOpen||!1,query:t,selected:null,validChoiceMade:this.isQueryAnOption(t,r)})},t.handleListMouseLeave=function(e){this.setState({hovered:null})},t.handleOptionBlur=function(e,t){var n=this.state,r=n.focused,o=n.menuOpen,i=n.options,u=n.selected,a=null===e.relatedTarget,s=e.relatedTarget===this.elementReferences[-1],l=r!==t&&-1!==r;if(!l&&a||!(l||s)){var c=o&&Y();this.handleComponentBlur({menuOpen:c,query:this.templateInputValue(i[u])})}},t.handleInputBlur=function(e){var t=this.state,n=t.focused,r=t.menuOpen,o=t.options,i=t.query,u=t.selected;if(!(-1!==n)){var a=r&&Y(),s=Y()?i:this.templateInputValue(o[u]);this.handleComponentBlur({menuOpen:a,query:s})}},t.handleInputChange=function(e){var n=this,t=this.props,r=t.minLength,o=t.source,i=t.showAllValues,u=this.hasAutoselect(),a=e.target.value,s=0===a.length,l=this.state.query.length!==a.length,c=a.length>=r;this.setState({query:a,ariaHint:s}),i||!s&&l&&c?o(a,function(e){var t=0<e.length;n.setState({menuOpen:t,options:e,selected:u&&t?0:-1,validChoiceMade:!1})}):!s&&c||this.setState({menuOpen:!1,options:[]})},t.handleInputClick=function(e){this.handleInputChange(e)},t.handleInputFocus=function(e){var t=this.state,n=t.query,r=t.validChoiceMade,o=t.options,i=this.props.minLength,u=!r&&n.length>=i&&0<o.length;u?this.setState(function(e){var t=e.menuOpen;return{focused:-1,menuOpen:u||t,selected:-1}}):this.setState({focused:-1})},t.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},t.handleOptionMouseEnter=function(e,t){Y()||this.setState({hovered:t})},t.handleOptionClick=function(e,t){var n=this.state.options[t],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},t.handleOptionMouseDown=function(e){e.preventDefault()},t.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,r=t.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},t.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})});else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,i=n.selected;i!==o.length-1&&r&&this.handleOptionFocus(i+1)}},t.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e})})),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},t.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),0<=this.state.selected&&this.handleOptionClick(e,this.state.selected))},t.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},t.handleKeyDown=function(e){switch(u[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function t(e){return 47<e&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223})(e.keyCode)&&this.handlePrintableKey(e)}},t.render=function(){var e,i=this,t=this.props,n=t.cssNamespace,r=t.displayMenu,u=t.id,o=t.minLength,a=t.name,s=t.placeholder,l=t.required,c=t.showAllValues,p=t.tNoResults,f=t.tStatusQueryTooShort,d=t.tStatusNoResults,h=t.tStatusSelectedOption,m=t.tStatusResults,v=t.tAssistiveHint,y=t.dropdownArrow,g=this.state,_=g.focused,b=g.hovered,w=g.menuOpen,x=g.options,O=g.query,C=g.selected,S=g.ariaHint,E=g.validChoiceMade,M=this.hasAutoselect(),N=-1===_,I=0===x.length,k=0!==O.length,A=O.length>=o,P=this.props.showNoOptionsFound&&N&&I&&k&&A,j=n+"__wrapper",L=n+"__input",T=null!==_?" "+L+"--focused":"",B=this.props.showAllValues?" "+L+"--show-all-values":" "+L+"--default",D=n+"__dropdown-arrow-down",F=-1!==_&&null!==_,R=n+"__menu",U=R+"--"+r,V=R+"--"+(w||P?"visible":"hidden"),q=n+"__option",W=n+"__hint",H=this.templateInputValue(x[C]),K=H&&0===H.toLowerCase().indexOf(O.toLowerCase())&&M?O+H.substr(O.length):"",Q=u+"__assistiveHint",z=S?{"aria-describedby":Q}:null;return c&&"string"==typeof(e=y({className:D}))&&(e=(0,$.createElement)("div",{className:n+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,$.createElement)("div",{className:j,onKeyDown:this.handleKeyDown},(0,$.createElement)(J["default"],{id:u,length:x.length,queryLength:O.length,minQueryLength:o,selectedOption:this.templateInputValue(x[C]),selectedOptionIndex:C,validChoiceMade:E,isInFocus:null!==this.state.focused,tQueryTooShort:f,tNoResults:d,tSelectedOption:h,tResults:m}),K&&(0,$.createElement)("span",null,(0,$.createElement)("input",{className:W,readonly:!0,tabIndex:"-1",value:K})),(0,$.createElement)("input",X({"aria-expanded":w?"true":"false","aria-activedescendant":!!F&&u+"__option--"+_,"aria-owns":u+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},z,{autoComplete:"off",className:""+L+T+B,id:u,onClick:function(e){return i.handleInputClick(e)},onBlur:this.handleInputBlur},function G(e){return{onInput:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:a,placeholder:s,ref:function(e){i.elementReferences[-1]=e},type:"text",role:"combobox",required:l,value:O})),e,(0,$.createElement)("ul",{className:R+" "+U+" "+V,onMouseLeave:function(e){return i.handleListMouseLeave(e)},id:u+"__listbox",role:"listbox"},x.map(function(e,t){var n=(-1===_?C===t:_===t)&&null===b?" "+q+"--focused":"",r=t%2?" "+q+"--odd":"",o=Y()?"<span id="+u+"__option-suffix--"+t+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(t+1)+" of "+x.length+"</span>":"";return(0,$.createElement)("li",{"aria-selected":_===t?"true":"false",className:""+q+n+r,dangerouslySetInnerHTML:{__html:i.templateSuggestion(e)+o},id:u+"__option--"+t,key:t,onBlur:function(e){return i.handleOptionBlur(e,t)},onClick:function(e){return i.handleOptionClick(e,t)},onMouseDown:i.handleOptionMouseDown,onMouseEnter:function(e){return i.handleOptionMouseEnter(e,t)},ref:function(e){i.elementReferences[t]=e},role:"option",tabIndex:"-1","aria-posinset":t+1,"aria-setsize":x.length})}),P&&(0,$.createElement)("li",{className:q+" "+q+"--no-results"},p())),(0,$.createElement)("span",{id:Q,style:{display:"none"}},v()))},e}($.Component);(t["default"]=a).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:r["default"]}},function(e,t,r){var o=r(9),i=r(53),u=r(28),a=r(26)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=r(15)("iframe"),n=u.length;for(t.style.display="none",r(54).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[l][u[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=o(e),n=new s,s[l]=null,n[a]=e):n=c(),t===undefined?n:i(n,t)}},function(e,t,n){var u=n(8),a=n(9),s=n(20);e.exports=n(3)?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=r.length,i=0;i<o;)u.f(e,n=r[i++],t[n]);return e}},function(e,t,n){var r=n(1).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(0);r(r.P,"Function",{bind:n(56)})},function(e,t,n){"use strict";var i=n(19),u=n(2),a=n(57),s=[].slice,l={};e.exports=Function.bind||function(t){var n=i(this),r=s.call(arguments,1),o=function(){var e=r.concat(s.call(arguments));return this instanceof o?function(e,t,n){if(!(t in l)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";l[t]=Function("F,a","return new F("+r.join(",")+")")}return l[t](e,n)}(n,e.length,e):a(n,e,t)};return u(n.prototype)&&(o.prototype=n.prototype),o}},function(e,t){e.exports=function(e,t,n){var r=n===undefined;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){n(59)("match",1,function(r,o,e){return[function(e){"use strict";var t=r(this),n=e==undefined?undefined:e[o];return n!==undefined?n.call(e,t):new RegExp(e)[o](String(t))},e]})},function(e,t,n){"use strict";var a=n(7),s=n(16),l=n(4),c=n(12),p=n(34);e.exports=function(t,e,n){var r=p(t),o=n(c,r,""[t]),i=o[0],u=o[1];l(function(){var e={};return e[r]=function(){return 7},7!=""[t](e)})&&(s(String.prototype,t,i),a(RegExp.prototype,r,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(36);var _=n(5);var r=function r(o,i,u){var a;return function(){var e=this,t=arguments,n=function n(){a=null,u||o.apply(e,t)},r=u&&!a;clearTimeout(a),a=setTimeout(n,i),r&&o.apply(e,t)}},o=function(o){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))||this).state={bump:!1,debounced:!1},e}(function n(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t})(e,o);var t=e.prototype;return t.componentWillMount=function(){var e=this;this.debounceStatusUpdate=r(function(){if(!e.state.debounced){var t=!e.props.isInFocus||e.props.validChoiceMade;e.setState(function(e){return{bump:!e.bump,debounced:!0,silenced:t}})}},1400)},t.componentWillReceiveProps=function(e){e.queryLength;this.setState({debounced:!1})},t.render=function(){var e=this.props,t=e.id,n=e.length,r=e.queryLength,o=e.minQueryLength,i=e.selectedOption,u=e.selectedOptionIndex,a=e.tQueryTooShort,s=e.tNoResults,l=e.tSelectedOption,c=e.tResults,p=this.state,f=p.bump,d=p.debounced,h=p.silenced,m=r<o,v=0===n,y=i?l(i,n,u):"",g=null;return g=m?a(o):v?s():c(n,y),this.debounceStatusUpdate(),(0,_.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,_.createElement)("div",{id:t+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!h&&d&&f?g:""),(0,_.createElement)("div",{id:t+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},h||!d||f?"":g))},e}(_.Component);(t["default"]=o).defaultProps={tQueryTooShort:function(e){return"Type in "+e+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(e,t,n){return e+" "+(n+1)+" of "+t+" is highlighted"},tResults:function(e,t){return e+" "+(1===e?"result":"results")+" "+(1===e?"is":"are")+" available. "+t}}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r=n(5),o=function i(e){var t=e.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};t["default"]=o}])["default"]}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.accessibleAutocomplete=e():t.accessibleAutocomplete=e()}(self,(function(){return function(){"use strict";var t={8952:function(t,e,n){var r=n(4328),o=n(36),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},2096:function(t,e,n){var r=n(2424),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},4764:function(t,e,n){var r=n(9764).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},6100:function(t,e,n){var r=n(7e3),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new o("Incorrect invocation")}},3951:function(t,e,n){var r=n(1632),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},2504:function(t,e,n){var r=n(4096),o=n(2495),i=n(3556),u=function(t){return function(e,n,u){var a=r(e),c=i(a);if(0===c)return!t&&-1;var s,l=o(u,c);if(t&&n!=n){for(;c>l;)if((s=a[l++])!=s)return!0}else for(;c>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},3364:function(t,e,n){var r=n(8992),o=n(1664),i=n(5712),u=n(4356),a=n(3556),c=n(2568),s=o([].push),l=function(t){var e=1===t,n=2===t,o=3===t,l=4===t,f=6===t,p=7===t,d=5===t||f;return function(h,v,m,y){for(var g,b,x=u(h),w=i(x),O=a(w),_=r(v,m),S=0,C=y||c,E=e?C(h,O):n||p?C(h,0):void 0;O>S;S++)if((d||S in w)&&(b=_(g=w[S],S,x),t))if(e)E[S]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:s(E,g)}else switch(t){case 4:return!1;case 7:s(E,g)}return f?-1:o||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},953:function(t,e,n){var r=n(9957),o=n(9972),i=n(8504),u=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},1496:function(t,e,n){var r=n(9957);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},6728:function(t,e,n){var r=n(3476),o=n(1432),i=TypeError,u=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!u(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},6736:function(t,e,n){var r=n(1432),o=n(6072),i=n(1632),u=n(9972)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===a||r(e.prototype))||i(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?a:e}},2568:function(t,e,n){var r=n(6736);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},8696:function(t,e,n){var r=n(3951),o=n(3112);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(u){o(t,"throw",u)}}},1888:function(t,e,n){var r=n(1664),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},4427:function(t,e,n){var r=n(16),o=n(4328),i=n(1888),u=n(9972)("toStringTag"),a=Object,c="Arguments"===i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=a(t),u))?n:c?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},9968:function(t,e,n){var r=n(5152),o=n(9252),i=n(9444),u=n(8352);t.exports=function(t,e,n){for(var a=o(e),c=u.f,s=i.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,s(e,f))}}},2272:function(t,e,n){var r=n(9957);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3336:function(t){t.exports=function(t,e){return{value:t,done:e}}},3440:function(t,e,n){var r=n(3476),o=n(8352),i=n(9728);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9728:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},92:function(t,e,n){var r=n(3476),o=n(8352),i=n(9728);t.exports=function(t,e,n){r?o.f(t,e,i(0,n)):t[e]=n}},2544:function(t,e,n){var r=n(5312),o=n(8352);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},6076:function(t,e,n){var r=n(4328),o=n(8352),i=n(5312),u=n(4636);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,s=void 0!==a.name?a.name:e;if(r(n)&&i(n,s,a),a.global)c?t[e]=n:u(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},4036:function(t,e,n){var r=n(6076);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},4636:function(t,e,n){var r=n(6420),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},3476:function(t,e,n){var r=n(9957);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8168:function(t,e,n){var r=n(6420),o=n(1632),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},4316:function(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6064:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},8504:function(t,e,n){var r,o,i=n(6420),u=n(6064),a=i.process,c=i.Deno,s=a&&a.versions||c&&c.version,l=s&&s.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},8256:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(t,e,n){var r=n(1664),o=Error,i=r("".replace),u=String(new o("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(u);t.exports=function(t,e){if(c&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,a,"");return t}},3696:function(t,e,n){var r=n(3440),o=n(6520),i=n(9184),u=Error.captureStackTrace;t.exports=function(t,e,n,a){i&&(u?u(t,e):r(t,"stack",o(n,a)))}},9184:function(t,e,n){var r=n(9957),o=n(9728);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},9160:function(t,e,n){var r=n(6420),o=n(9444).f,i=n(3440),u=n(6076),a=n(4636),c=n(9968),s=n(6704);t.exports=function(t,e){var n,l,f,p,d,h=t.target,v=t.global,m=t.stat;if(n=v?r:m?r[h]||a(h,{}):r[h]&&r[h].prototype)for(l in e){if(p=e[l],f=t.dontCallGetSet?(d=o(n,l))&&d.value:n[l],!s(v?l:h+(m?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),u(n,l,p,t)}}},9957:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},7176:function(t,e,n){n(880);var r=n(8448),o=n(6076),i=n(7680),u=n(9957),a=n(9972),c=n(3440),s=a("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var p=a(t),d=!u((function(){var e={};return e[p]=function(){return 7},7!==""[t](e)})),h=d&&!u((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!d||!h||n){var v=/./[p],m=e(p,""[t],(function(t,e,n,o,u){var a=e.exec;return a===i||a===l.exec?d&&!u?{done:!0,value:r(v,e,n,o)}:{done:!0,value:r(t,n,e,o)}:{done:!1}}));o(String.prototype,t,m[0]),o(l,p,m[1])}f&&c(l[p],"sham",!0)}},908:function(t,e,n){var r=n(7332),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?u.bind(i):function(){return u.apply(i,arguments)})},8992:function(t,e,n){var r=n(3180),o=n(8952),i=n(7332),u=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?u(t,e):function(){return t.apply(e,arguments)}}},7332:function(t,e,n){var r=n(9957);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8448:function(t,e,n){var r=n(7332),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6208:function(t,e,n){var r=n(3476),o=n(5152),i=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,s=a&&(!r||r&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:s}},5288:function(t,e,n){var r=n(1664),o=n(8952);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(i){}}},3180:function(t,e,n){var r=n(1888),o=n(1664);t.exports=function(t){if("Function"===r(t))return o(t)}},1664:function(t,e,n){var r=n(7332),o=Function.prototype,i=o.call,u=r&&o.bind.bind(i,i);t.exports=r?u:function(t){return function(){return i.apply(t,arguments)}}},5232:function(t,e,n){var r=n(6420),o=n(4328);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},6752:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},4504:function(t,e,n){var r=n(8952),o=n(9760);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},6420:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5152:function(t,e,n){var r=n(1664),o=n(4356),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},2560:function(t){t.exports={}},4168:function(t,e,n){var r=n(5232);t.exports=r("document","documentElement")},9888:function(t,e,n){var r=n(3476),o=n(9957),i=n(8168);t.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},5712:function(t,e,n){var r=n(1664),o=n(9957),i=n(1888),u=Object,a=r("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?a(t,""):u(t)}:u},7512:function(t,e,n){var r=n(4328),o=n(1632),i=n(4024);t.exports=function(t,e,n){var u,a;return i&&r(u=e.constructor)&&u!==n&&o(a=u.prototype)&&a!==n.prototype&&i(t,a),t}},9112:function(t,e,n){var r=n(1664),o=n(4328),i=n(3976),u=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},3480:function(t,e,n){var r=n(1632),o=n(3440);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},9104:function(t,e,n){var r,o,i,u=n(4288),a=n(6420),c=n(1632),s=n(3440),l=n(5152),f=n(3976),p=n(6504),d=n(2560),h="Object already initialized",v=a.TypeError,m=a.WeakMap;if(u||f.state){var y=f.state||(f.state=new m);y.get=y.get,y.has=y.has,y.set=y.set,r=function(t,e){if(y.has(t))throw new v(h);return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var g=p("state");d[g]=!0,r=function(t,e){if(l(t,g))throw new v(h);return e.facade=t,s(t,g,e),e},o=function(t){return l(t,g)?t[g]:{}},i=function(t){return l(t,g)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},1432:function(t,e,n){var r=n(1888);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4328:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},6072:function(t,e,n){var r=n(1664),o=n(9957),i=n(4328),u=n(4427),a=n(5232),c=n(9112),s=function(){},l=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,p=r(f.exec),d=!f.test(s),h=function(t){if(!i(t))return!1;try{return l(s,[],t),!0}catch(e){return!1}},v=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(f,c(t))}catch(e){return!0}};v.sham=!0,t.exports=!l||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?v:h},6704:function(t,e,n){var r=n(9957),o=n(4328),i=/#|\.prototype\./,u=function(t,e){var n=c[a(t)];return n===l||n!==s&&(o(e)?r(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},s=u.NATIVE="N",l=u.POLYFILL="P";t.exports=u},9760:function(t){t.exports=function(t){return null==t}},1632:function(t,e,n){var r=n(4328);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},2424:function(t,e,n){var r=n(1632);t.exports=function(t){return r(t)||null===t}},7048:function(t){t.exports=!1},7728:function(t,e,n){var r=n(5232),o=n(4328),i=n(7e3),u=n(6536),a=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},3112:function(t,e,n){var r=n(8448),o=n(3951),i=n(4504);t.exports=function(t,e,n){var u,a;o(t);try{if(!(u=i(t,"return"))){if("throw"===e)throw n;return n}u=r(u,t)}catch(c){a=!0,u=c}if("throw"===e)throw n;if(a)throw u;return o(u),n}},9724:function(t,e,n){var r=n(8448),o=n(9368),i=n(3440),u=n(4036),a=n(9972),c=n(9104),s=n(4504),l=n(336).IteratorPrototype,f=n(3336),p=n(3112),d=a("toStringTag"),h="IteratorHelper",v="WrapForValidIterator",m=c.set,y=function(t){var e=c.getterFor(t?v:h);return u(o(l),{next:function(){var n=e(this);if(t)return n.nextHandler();try{var r=n.done?void 0:n.nextHandler();return f(r,n.done)}catch(o){throw n.done=!0,o}},return:function(){var n=e(this),o=n.iterator;if(n.done=!0,t){var i=s(o,"return");return i?r(i,o):f(void 0,!0)}if(n.inner)try{p(n.inner.iterator,"normal")}catch(u){return p(o,"throw",u)}return p(o,"normal"),f(void 0,!0)}})},g=y(!0),b=y(!1);i(b,d,"Iterator Helper"),t.exports=function(t,e){var n=function(n,r){r?(r.iterator=n.iterator,r.next=n.next):r=n,r.type=e?v:h,r.nextHandler=t,r.counter=0,r.done=!1,m(this,r)};return n.prototype=e?g:b,n}},5792:function(t,e,n){var r=n(8448),o=n(8952),i=n(3951),u=n(6752),a=n(9724),c=n(8696),s=a((function(){var t=this.iterator,e=i(r(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return i(this),o(t),new s(u(this),{mapper:t})}},336:function(t,e,n){var r,o,i,u=n(9957),a=n(4328),c=n(1632),s=n(9368),l=n(7796),f=n(6076),p=n(9972),d=n(7048),h=p("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):v=!0),!c(r)||u((function(){var t={};return r[h].call(t)!==t}))?r={}:d&&(r=s(r)),a(r[h])||f(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},3556:function(t,e,n){var r=n(7584);t.exports=function(t){return r(t.length)}},5312:function(t,e,n){var r=n(1664),o=n(9957),i=n(4328),u=n(5152),a=n(3476),c=n(6208).CONFIGURABLE,s=n(9112),l=n(9104),f=l.enforce,p=l.get,d=String,h=Object.defineProperty,v=r("".slice),m=r("".replace),y=r([].join),g=a&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===v(d(e),0,7)&&(e="["+m(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!u(t,"name")||c&&t.name!==e)&&(a?h(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&u(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&u(n,"constructor")&&n.constructor?a&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=f(t);return u(r,"source")||(r.source=y(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return i(this)&&p(this).source||s(this)}),"toString")},1748:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},8948:function(t,e,n){var r=n(5016);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},9292:function(t,e,n){var r=n(3476),o=n(1664),i=n(8448),u=n(9957),a=n(1531),c=n(9392),s=n(8912),l=n(4356),f=n(5712),p=Object.assign,d=Object.defineProperty,h=o([].concat);t.exports=!p||u((function(){if(r&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!==p({},t)[n]||a(p({},e)).join("")!==o}))?function(t,e){for(var n=l(t),o=arguments.length,u=1,p=c.f,d=s.f;o>u;)for(var v,m=f(arguments[u++]),y=p?h(a(m),p(m)):a(m),g=y.length,b=0;g>b;)v=y[b++],r&&!i(d,m,v)||(n[v]=m[v]);return n}:p},9368:function(t,e,n){var r,o=n(3951),i=n(2056),u=n(8256),a=n(2560),c=n(4168),s=n(8168),l=n(6504),f="prototype",p="script",d=l("IE_PROTO"),h=function(){},v=function(t){return"<"+p+">"+t+"</"+p+">"},m=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{r=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;y="undefined"!=typeof document?document.domain&&r?m(r):(e=s("iframe"),n="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):m(r);for(var o=u.length;o--;)delete y[f][u[o]];return y()};a[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h[f]=o(t),n=new h,h[f]=null,n[d]=t):n=y(),void 0===e?n:i.f(n,e)}},2056:function(t,e,n){var r=n(3476),o=n(1576),i=n(8352),u=n(3951),a=n(4096),c=n(1531);e.f=r&&!o?Object.defineProperties:function(t,e){u(t);for(var n,r=a(e),o=c(e),s=o.length,l=0;s>l;)i.f(t,n=o[l++],r[n]);return t}},8352:function(t,e,n){var r=n(3476),o=n(9888),i=n(1576),u=n(3951),a=n(88),c=TypeError,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",d="writable";e.f=r?i?function(t,e,n){if(u(t),e=a(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=l(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:f in n?n[f]:r[f],writable:!1})}return s(t,e,n)}:s:function(t,e,n){if(u(t),e=a(e),u(n),o)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9444:function(t,e,n){var r=n(3476),o=n(8448),i=n(8912),u=n(9728),a=n(4096),c=n(88),s=n(5152),l=n(9888),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(n){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},5048:function(t,e,n){var r=n(9008),o=n(8256).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},9392:function(t,e){e.f=Object.getOwnPropertySymbols},7796:function(t,e,n){var r=n(5152),o=n(4328),i=n(4356),u=n(6504),a=n(2272),c=u("IE_PROTO"),s=Object,l=s.prototype;t.exports=a?s.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof s?l:null}},7e3:function(t,e,n){var r=n(1664);t.exports=r({}.isPrototypeOf)},9008:function(t,e,n){var r=n(1664),o=n(5152),i=n(4096),u=n(2504).indexOf,a=n(2560),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~u(l,n)||c(l,n));return l}},1531:function(t,e,n){var r=n(9008),o=n(8256);t.exports=Object.keys||function(t){return r(t,o)}},8912:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},4024:function(t,e,n){var r=n(5288),o=n(3951),i=n(2096);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(u){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},7032:function(t,e,n){var r=n(16),o=n(4427);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2104:function(t,e,n){var r=n(8448),o=n(4328),i=n(1632),u=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw new u("Can't convert object to primitive value")}},9252:function(t,e,n){var r=n(5232),o=n(1664),i=n(5048),u=n(9392),a=n(3951),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=u.f;return n?c(e,n(t)):e}},584:function(t,e,n){var r=n(8352).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},9092:function(t,e,n){var r=n(8448),o=n(3951),i=n(4328),u=n(1888),a=n(7680),c=TypeError;t.exports=function(t,e){var n=t.exec;if(i(n)){var s=r(n,t,e);return null!==s&&o(s),s}if("RegExp"===u(t))return r(a,t,e);throw new c("RegExp#exec called on incompatible receiver")}},7680:function(t,e,n){var r,o,i=n(8448),u=n(1664),a=n(5016),c=n(8872),s=n(3548),l=n(4696),f=n(9368),p=n(9104).get,d=n(8e3),h=n(9124),v=l("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,y=m,g=u("".charAt),b=u("".indexOf),x=u("".replace),w=u("".slice),O=(o=/b*/g,i(m,r=/a/,"a"),i(m,o,"a"),0!==r.lastIndex||0!==o.lastIndex),_=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(O||S||_||d||h)&&(y=function(t){var e,n,r,o,u,s,l,d=this,h=p(d),C=a(t),E=h.raw;if(E)return E.lastIndex=d.lastIndex,e=i(y,E,C),d.lastIndex=E.lastIndex,e;var I=h.groups,j=_&&d.sticky,A=i(c,d),P=d.source,N=0,k=C;if(j&&(A=x(A,"y",""),-1===b(A,"g")&&(A+="g"),k=w(C,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==g(C,d.lastIndex-1))&&(P="(?: "+P+")",k=" "+k,N++),n=new RegExp("^(?:"+P+")",A)),S&&(n=new RegExp("^"+P+"$(?!\\s)",A)),O&&(r=d.lastIndex),o=i(m,j?n:d,k),j?o?(o.input=w(o.input,N),o[0]=w(o[0],N),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:O&&o&&(d.lastIndex=d.global?o.index+o[0].length:r),S&&o&&o.length>1&&i(v,o[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&I)for(o.groups=s=f(null),u=0;u<I.length;u++)s[(l=I[u])[0]]=o[l[1]];return o}),t.exports=y},8872:function(t,e,n){var r=n(3951);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},3548:function(t,e,n){var r=n(9957),o=n(6420).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),u=i||r((function(){return!o("a","y").sticky})),a=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:u,UNSUPPORTED_Y:i}},8e3:function(t,e,n){var r=n(9957),o=n(6420).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},9124:function(t,e,n){var r=n(9957),o=n(6420).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},5436:function(t,e,n){var r=n(9760),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},6504:function(t,e,n){var r=n(4696),o=n(7776),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},3976:function(t,e,n){var r=n(7048),o=n(6420),i=n(4636),u="__core-js_shared__",a=t.exports=o[u]||i(u,{});(a.versions||(a.versions=[])).push({version:"3.36.0",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(t,e,n){var r=n(3976);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},9764:function(t,e,n){var r=n(1664),o=n(6180),i=n(5016),u=n(5436),a=r("".charAt),c=r("".charCodeAt),s=r("".slice),l=function(t){return function(e,n){var r,l,f=i(u(e)),p=o(n),d=f.length;return p<0||p>=d?t?"":void 0:(r=c(f,p))<55296||r>56319||p+1===d||(l=c(f,p+1))<56320||l>57343?t?a(f,p):r:t?s(f,p,p+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},772:function(t,e,n){var r=n(8504),o=n(9957),i=n(6420).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},2495:function(t,e,n){var r=n(6180),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4096:function(t,e,n){var r=n(5712),o=n(5436);t.exports=function(t){return r(o(t))}},6180:function(t,e,n){var r=n(1748);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7584:function(t,e,n){var r=n(6180),o=Math.min;t.exports=function(t){var e=r(t);return e>0?o(e,9007199254740991):0}},4356:function(t,e,n){var r=n(5436),o=Object;t.exports=function(t){return o(r(t))}},7024:function(t,e,n){var r=n(8448),o=n(1632),i=n(7728),u=n(4504),a=n(2104),c=n(9972),s=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=u(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new s("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},88:function(t,e,n){var r=n(7024),o=n(7728);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},16:function(t,e,n){var r={};r[n(9972)("toStringTag")]="z",t.exports="[object z]"===String(r)},5016:function(t,e,n){var r=n(4427),o=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},36:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},7776:function(t,e,n){var r=n(1664),o=0,i=Math.random(),u=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},6536:function(t,e,n){var r=n(772);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1576:function(t,e,n){var r=n(3476),o=n(9957);t.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4288:function(t,e,n){var r=n(6420),o=n(4328),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},9972:function(t,e,n){var r=n(6420),o=n(4696),i=n(5152),u=n(7776),a=n(772),c=n(6536),s=r.Symbol,l=o("wks"),f=c?s.for||s:s&&s.withoutSetter||u;t.exports=function(t){return i(l,t)||(l[t]=a&&i(s,t)?s[t]:f("Symbol."+t)),l[t]}},6488:function(t,e,n){var r=n(5232),o=n(5152),i=n(3440),u=n(7e3),a=n(4024),c=n(9968),s=n(584),l=n(7512),f=n(8948),p=n(3480),d=n(3696),h=n(3476),v=n(7048);t.exports=function(t,e,n,m){var y="stackTraceLimit",g=m?2:1,b=t.split("."),x=b[b.length-1],w=r.apply(null,b);if(w){var O=w.prototype;if(!v&&o(O,"cause")&&delete O.cause,!n)return w;var _=r("Error"),S=e((function(t,e){var n=f(m?e:t,void 0),r=m?new w(t):new w;return void 0!==n&&i(r,"message",n),d(r,S,r.stack,2),this&&u(O,this)&&l(r,this,S),arguments.length>g&&p(r,arguments[g]),r}));if(S.prototype=O,"Error"!==x?a?a(S,_):c(S,_,{name:!0}):h&&y in w&&(s(S,w,y),s(S,w,"prepareStackTrace")),c(S,w),!v)try{O.name!==x&&i(O,"name",x),O.constructor=S}catch(C){}return S}}},7476:function(t,e,n){var r=n(9160),o=n(9957),i=n(1432),u=n(1632),a=n(4356),c=n(3556),s=n(4316),l=n(92),f=n(2568),p=n(953),d=n(9972),h=n(8504),v=d("isConcatSpreadable"),m=h>=51||!o((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),y=function(t){if(!u(t))return!1;var e=t[v];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,arity:1,forced:!m||!p("concat")},{concat:function(t){var e,n,r,o,i,u=a(this),p=f(u,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(y(i=-1===e?u:arguments[e]))for(o=c(i),s(d+o),n=0;n<o;n++,d++)n in i&&l(p,d,i[n]);else s(d+1),l(p,d++,i);return p.length=d,p}})},6932:function(t,e,n){var r=n(9160),o=n(3364).filter;r({target:"Array",proto:!0,forced:!n(953)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},700:function(t,e,n){var r=n(9160),o=n(1664),i=n(5712),u=n(4096),a=n(1496),c=o([].join);r({target:"Array",proto:!0,forced:i!==Object||!a("join",",")},{join:function(t){return c(u(this),void 0===t?",":t)}})},4456:function(t,e,n){var r=n(9160),o=n(3364).map;r({target:"Array",proto:!0,forced:!n(953)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4728:function(t,e,n){var r=n(9160),o=n(4356),i=n(3556),u=n(6728),a=n(4316);r({target:"Array",proto:!0,arity:1,forced:n(9957)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=i(e),r=arguments.length;a(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return u(e,n),n}})},8752:function(t,e,n){var r=n(9160),o=n(6420),i=n(908),u=n(6488),a="WebAssembly",c=o[a],s=7!==new Error("e",{cause:7}).cause,l=function(t,e){var n={};n[t]=u(t,e,s),r({global:!0,constructor:!0,arity:1,forced:s},n)},f=function(t,e){if(c&&c[t]){var n={};n[t]=u(a+"."+t,e,s),r({target:a,stat:!0,constructor:!0,arity:1,forced:s},n)}};l("Error",(function(t){return function(e){return i(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),l("URIError",(function(t){return function(e){return i(t,this,arguments)}})),f("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),f("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),f("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},508:function(t,e,n){var r=n(3476),o=n(6208).EXISTS,i=n(1664),u=n(2544),a=Function.prototype,c=i(a.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&u(a,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},232:function(t,e,n){var r=n(9160),o=n(9292);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},5443:function(t,e,n){var r=n(16),o=n(6076),i=n(7032);r||o(Object.prototype,"toString",i,{unsafe:!0})},880:function(t,e,n){var r=n(9160),o=n(7680);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9836:function(t,e,n){var r=n(8448),o=n(7176),i=n(3951),u=n(9760),a=n(7584),c=n(5016),s=n(5436),l=n(4504),f=n(4764),p=n(9092);o("match",(function(t,e,n){return[function(e){var n=s(this),o=u(e)?void 0:l(e,t);return o?r(o,e,n):new RegExp(e)[t](c(n))},function(t){var r=i(this),o=c(t),u=n(e,r,o);if(u.done)return u.value;if(!r.global)return p(r,o);var s=r.unicode;r.lastIndex=0;for(var l,d=[],h=0;null!==(l=p(r,o));){var v=c(l[0]);d[h]=v,""===v&&(r.lastIndex=f(o,a(r.lastIndex),s)),h++}return 0===h?null:d}]}))},3536:function(t,e,n){var r=n(9160),o=n(6420),i=n(6100),u=n(3951),a=n(4328),c=n(7796),s=n(2544),l=n(92),f=n(9957),p=n(5152),d=n(9972),h=n(336).IteratorPrototype,v=n(3476),m=n(7048),y="constructor",g="Iterator",b=d("toStringTag"),x=TypeError,w=o[g],O=m||!a(w)||w.prototype!==h||!f((function(){w({})})),_=function(){if(i(this,h),c(this)===h)throw new x("Abstract class Iterator not directly constructable")},S=function(t,e){v?s(h,t,{configurable:!0,get:function(){return e},set:function(e){if(u(this),this===h)throw new x("You can't redefine this property");p(this,t)?this[t]=e:l(this,t,e)}}):h[t]=e};p(h,b)||S(b,g),!O&&p(h,y)&&h[y]!==Object||S(y,_),_.prototype=h,r({global:!0,constructor:!0,forced:O},{Iterator:_})},2144:function(t,e,n){var r=n(9160),o=n(8448),i=n(8952),u=n(3951),a=n(6752),c=n(9724),s=n(8696),l=n(7048),f=c((function(){for(var t,e,n=this.iterator,r=this.predicate,i=this.next;;){if(t=u(o(i,n)),this.done=!!t.done)return;if(e=t.value,s(n,r,[e,this.counter++],!0))return e}}));r({target:"Iterator",proto:!0,real:!0,forced:l},{filter:function(t){return u(this),i(t),new f(a(this),{predicate:t})}})},9080:function(t,e,n){var r=n(9160),o=n(5792);r({target:"Iterator",proto:!0,real:!0,forced:n(7048)},{map:o})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){n.d(r,{default:function(){return Q}});n(8752),n(6932),n(4456),n(508),n(232),n(5443),n(3536),n(2144),n(9080);var t=function(){},e={},o=[],i=[];function u(n,r){var u,a,c,s,l=i;for(s=arguments.length;s-- >2;)o.push(arguments[s]);for(r&&null!=r.children&&(o.length||o.push(r.children),delete r.children);o.length;)if((a=o.pop())&&void 0!==a.pop)for(s=a.length;s--;)o.push(a[s]);else"boolean"==typeof a&&(a=null),(c="function"!=typeof n)&&(null==a?a="":"number"==typeof a?a=String(a):"string"!=typeof a&&(c=!1)),c&&u?l[l.length-1]+=a:l===i?l=[a]:l.push(a),u=c;var f=new t;return f.nodeName=n,f.children=l,f.attributes=null==r?void 0:r,f.key=null==r?void 0:r.key,void 0!==e.vnode&&e.vnode(f),f}function a(t,e){for(var n in e)t[n]=e[n];return t}function c(t,e){t&&("function"==typeof t?t(e):t.current=e)}var s="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var l=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,f=[];function p(t){!t._dirty&&(t._dirty=!0)&&1==f.push(t)&&(e.debounceRendering||s)(d)}function d(){for(var t;t=f.pop();)t._dirty&&T(t)}function h(t,e,n){return"string"==typeof e||"number"==typeof e?void 0!==t.splitText:"string"==typeof e.nodeName?!t._componentConstructor&&v(t,e.nodeName):n||t._componentConstructor===e.nodeName}function v(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function m(t){var e=a({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===e[r]&&(e[r]=n[r]);return e}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,n,r,o){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)c(n,null),c(r,t);else if("class"!==e||o)if("style"===e){if(r&&"string"!=typeof r&&"string"!=typeof n||(t.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(t.style[i]="");for(var i in r)t.style[i]="number"==typeof r[i]&&!1===l.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===e)r&&(t.innerHTML=r.__html||"");else if("o"==e[0]&&"n"==e[1]){var u=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),r?n||t.addEventListener(e,b,u):t.removeEventListener(e,b,u),(t._listeners||(t._listeners={}))[e]=r}else if("list"!==e&&"type"!==e&&!o&&e in t){try{t[e]=null==r?"":r}catch(s){}null!=r&&!1!==r||"spellcheck"==e||t.removeAttribute(e)}else{var a=o&&e!==(e=e.replace(/^xlink:?/,""));null==r||!1===r?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof r&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):t.setAttribute(e,r))}else t.className=r||""}function b(t){return this._listeners[t.type](e.event&&e.event(t)||t)}var x=[],w=0,O=!1,_=!1;function S(){for(var t;t=x.shift();)e.afterMount&&e.afterMount(t),t.componentDidMount&&t.componentDidMount()}function C(t,e,n,r,o,i){w++||(O=null!=o&&void 0!==o.ownerSVGElement,_=null!=t&&!("__preactattr_"in t));var u=E(t,e,n,r,i);return o&&u.parentNode!==o&&o.appendChild(u),--w||(_=!1,i||S()),u}function E(t,e,n,r,o){var i=t,u=O;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||o)?t.nodeValue!=e&&(t.nodeValue=e):(i=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(i,t),I(t,!0))),i.__preactattr_=!0,i;var a,c,s=e.nodeName;if("function"==typeof s)return function(t,e,n,r){var o=t&&t._component,i=o,u=t,a=o&&t._componentConstructor===e.nodeName,c=a,s=m(e);for(;o&&!c&&(o=o._parentComponent);)c=o.constructor===e.nodeName;o&&c&&(!r||o._component)?(k(o,s,3,n,r),t=o.base):(i&&!a&&(R(i),t=u=null),o=P(e.nodeName,s,n),t&&!o.nextBase&&(o.nextBase=t,u=null),k(o,s,1,n,r),t=o.base,u&&t!==u&&(u._component=null,I(u,!1)));return t}(t,e,n,r);if(O="svg"===s||"foreignObject"!==s&&O,s=String(s),(!t||!v(t,s))&&(a=s,(c=O?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,i=c,t)){for(;t.firstChild;)i.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(i,t),I(t,!0)}var l=i.firstChild,f=i.__preactattr_,p=e.children;if(null==f){f=i.__preactattr_={};for(var d=i.attributes,b=d.length;b--;)f[d[b].name]=d[b].value}return!_&&p&&1===p.length&&"string"==typeof p[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=p[0]&&(l.nodeValue=p[0]):(p&&p.length||null!=l)&&function(t,e,n,r,o){var i,u,a,c,s,l=t.childNodes,f=[],p={},d=0,v=0,m=l.length,g=0,b=e?e.length:0;if(0!==m)for(var x=0;x<m;x++){var w=l[x],O=w.__preactattr_;null!=(_=b&&O?w._component?w._component.__key:O.key:null)?(d++,p[_]=w):(O||(void 0!==w.splitText?!o||w.nodeValue.trim():o))&&(f[g++]=w)}if(0!==b)for(x=0;x<b;x++){var _;if(s=null,null!=(_=(c=e[x]).key))d&&void 0!==p[_]&&(s=p[_],p[_]=void 0,d--);else if(v<g)for(i=v;i<g;i++)if(void 0!==f[i]&&h(u=f[i],c,o)){s=u,f[i]=void 0,i===g-1&&g--,i===v&&v++;break}s=E(s,c,n,r),a=l[x],s&&s!==t&&s!==a&&(null==a?t.appendChild(s):s===a.nextSibling?y(a):t.insertBefore(s,a))}if(d)for(var x in p)void 0!==p[x]&&I(p[x],!1);for(;v<=g;)void 0!==(s=f[g--])&&I(s,!1)}(i,p,n,r,_||null!=f.dangerouslySetInnerHTML),function(t,e,n){var r;for(r in n)e&&null!=e[r]||null==n[r]||g(t,r,n[r],n[r]=void 0,O);for(r in e)"children"===r||"innerHTML"===r||r in n&&e[r]===("value"===r||"checked"===r?t[r]:n[r])||g(t,r,n[r],n[r]=e[r],O)}(i,e.attributes,f),O=u,i}function I(t,e){var n=t._component;n?R(n):(null!=t.__preactattr_&&c(t.__preactattr_.ref,null),!1!==e&&null!=t.__preactattr_||y(t),j(t))}function j(t){for(t=t.lastChild;t;){var e=t.previousSibling;I(t,!0),t=e}}var A=[];function P(t,e,n){var r,o=A.length;for(t.prototype&&t.prototype.render?(r=new t(e,n),M.call(r,e,n)):((r=new M(e,n)).constructor=t,r.render=N);o--;)if(A[o].constructor===t)return r.nextBase=A[o].nextBase,A.splice(o,1),r;return r}function N(t,e,n){return this.constructor(t,n)}function k(t,n,r,o,i){t._disable||(t._disable=!0,t.__ref=n.ref,t.__key=n.key,delete n.ref,delete n.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||i?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(n,o)),o&&o!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=o),t.prevProps||(t.prevProps=t.props),t.props=n,t._disable=!1,0!==r&&(1!==r&&!1===e.syncComponentUpdates&&t.base?p(t):T(t,1,i)),c(t.__ref,t))}function T(t,n,r,o){if(!t._disable){var i,u,c,s=t.props,l=t.state,f=t.context,p=t.prevProps||s,d=t.prevState||l,h=t.prevContext||f,v=t.base,y=t.nextBase,g=v||y,b=t._component,O=!1,_=h;if(t.constructor.getDerivedStateFromProps&&(l=a(a({},l),t.constructor.getDerivedStateFromProps(s,l)),t.state=l),v&&(t.props=p,t.state=d,t.context=h,2!==n&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(s,l,f)?O=!0:t.componentWillUpdate&&t.componentWillUpdate(s,l,f),t.props=s,t.state=l,t.context=f),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!O){i=t.render(s,l,f),t.getChildContext&&(f=a(a({},f),t.getChildContext())),v&&t.getSnapshotBeforeUpdate&&(_=t.getSnapshotBeforeUpdate(p,d));var E,j,A=i&&i.nodeName;if("function"==typeof A){var N=m(i);(u=b)&&u.constructor===A&&N.key==u.__key?k(u,N,1,f,!1):(E=u,t._component=u=P(A,N,f),u.nextBase=u.nextBase||y,u._parentComponent=t,k(u,N,0,f,!1),T(u,1,r,!0)),j=u.base}else c=g,(E=b)&&(c=t._component=null),(g||1===n)&&(c&&(c._component=null),j=C(c,i,f,r||!v,g&&g.parentNode,!0));if(g&&j!==g&&u!==b){var M=g.parentNode;M&&j!==M&&(M.replaceChild(j,g),E||(g._component=null,I(g,!1)))}if(E&&R(E),t.base=j,j&&!o){for(var L=t,D=t;D=D._parentComponent;)(L=D).base=j;j._component=L,j._componentConstructor=L.constructor}}for(!v||r?x.push(t):O||(t.componentDidUpdate&&t.componentDidUpdate(p,d,_),e.afterUpdate&&e.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);w||o||S()}}function R(t){e.beforeUnmount&&e.beforeUnmount(t);var n=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var r=t._component;r?R(r):n&&(null!=n.__preactattr_&&c(n.__preactattr_.ref,null),t.nextBase=n,y(n),A.push(t),j(n)),c(t.__ref,null)}function M(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}function L(t,e,n){return C(n,t,{},!1,e,!1)}a(M.prototype,{setState:function(t,e){this.prevState||(this.prevState=this.state),this.state=a(a({},this.state),"function"==typeof t?t(this.state,this.props):t),e&&this._renderCallbacks.push(e),p(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),T(this,2)},render:function(){}});n(700),n(4728),n(880),n(9836),n(7476);function D(t,e){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},D(t,e)}var B=function(t){var e,n;function r(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={bump:!1,debounced:!1},e}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,D(e,n);var o=r.prototype;return o.componentWillMount=function(){var t,e,n,r,o=this;this.debounceStatusUpdate=(t=function(){if(!o.state.debounced){var t=!o.props.isInFocus||o.props.validChoiceMade;o.setState((function(e){return{bump:!e.bump,debounced:!0,silenced:t}}))}},e=1400,function(){var o=this,i=arguments,u=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(o,i)}),e),u&&t.apply(o,i)})},o.componentWillReceiveProps=function(t){t.queryLength;this.setState({debounced:!1})},o.render=function(){var t=this.props,e=t.id,n=t.length,r=t.queryLength,o=t.minQueryLength,i=t.selectedOption,a=t.selectedOptionIndex,c=t.tQueryTooShort,s=t.tNoResults,l=t.tSelectedOption,f=t.tResults,p=t.className,d=this.state,h=d.bump,v=d.debounced,m=d.silenced,y=r<o,g=0===n,b=i?l(i,n,a):"",x=null;return x=y?c(o):g?s():f(n,b),this.debounceStatusUpdate(),u("div",{className:p,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},u("div",{id:e+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!m&&v&&h?x:""),u("div",{id:e+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},m||!v||h?"":x))},r}(M);B.defaultProps={tQueryTooShort:function(t){return"Type in "+t+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(t,e,n){return t+" "+(n+1)+" of "+e+" is highlighted"},tResults:function(t,e){return t+" "+(1===t?"result":"results")+" "+(1===t?"is":"are")+" available. "+e}};var F=function(t){return u("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t.className,focusable:"false"},u("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},u("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},U.apply(this,arguments)}function V(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q(t,e){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},q(t,e)}var W={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function H(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var K=function(t){var e,n;function r(e){var n;return(n=t.call(this,e)||this).elementReferences={},n.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},n.handleComponentBlur=n.handleComponentBlur.bind(V(n)),n.handleKeyDown=n.handleKeyDown.bind(V(n)),n.handleUpArrow=n.handleUpArrow.bind(V(n)),n.handleDownArrow=n.handleDownArrow.bind(V(n)),n.handleEnter=n.handleEnter.bind(V(n)),n.handlePrintableKey=n.handlePrintableKey.bind(V(n)),n.handleListMouseLeave=n.handleListMouseLeave.bind(V(n)),n.handleOptionBlur=n.handleOptionBlur.bind(V(n)),n.handleOptionClick=n.handleOptionClick.bind(V(n)),n.handleOptionFocus=n.handleOptionFocus.bind(V(n)),n.handleOptionMouseDown=n.handleOptionMouseDown.bind(V(n)),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(V(n)),n.handleInputBlur=n.handleInputBlur.bind(V(n)),n.handleInputChange=n.handleInputChange.bind(V(n)),n.handleInputClick=n.handleInputClick.bind(V(n)),n.handleInputFocus=n.handleInputFocus.bind(V(n)),n.pollInputElement=n.pollInputElement.bind(V(n)),n.getDirectInputChanges=n.getDirectInputChanges.bind(V(n)),n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,q(e,n);var o=r.prototype;return o.isQueryAnOption=function(t,e){var n=this;return-1!==e.map((function(t){return n.templateInputValue(t).toLowerCase()})).indexOf(t.toLowerCase())},o.componentDidMount=function(){this.pollInputElement()},o.componentWillUnmount=function(){clearTimeout(this.$pollInput)},o.pollInputElement=function(){var t=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){t.pollInputElement()}),100)},o.getDirectInputChanges=function(){var t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})},o.componentDidUpdate=function(t,e){var n=this.state.focused,r=null===n,o=e.focused!==n;o&&!r&&this.elementReferences[n].focus();var i=-1===n,u=o&&null===e.focused;if(i&&u){var a=this.elementReferences[n];a.setSelectionRange(0,a.value.length)}},o.hasAutoselect=function(){return!H()&&this.props.autoselect},o.templateInputValue=function(t){var e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t},o.templateSuggestion=function(t){var e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t},o.handleComponentBlur=function(t){var e,n=this.state,r=n.options,o=n.query,i=n.selected;this.props.confirmOnBlur?(e=t.query||o,this.props.onConfirm(r[i])):e=o,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:e,selected:null,validChoiceMade:this.isQueryAnOption(e,r)})},o.handleListMouseLeave=function(t){this.setState({hovered:null})},o.handleOptionBlur=function(t,e){var n=this.state,r=n.focused,o=n.menuOpen,i=n.options,u=n.selected,a=null===t.relatedTarget,c=t.relatedTarget===this.elementReferences[-1],s=r!==e&&-1!==r;if(!s&&a||!(s||c)){var l=o&&H();this.handleComponentBlur({menuOpen:l,query:this.templateInputValue(i[u])})}},o.handleInputBlur=function(t){var e=this.state,n=e.focused,r=e.menuOpen,o=e.options,i=e.query,u=e.selected;if(!(-1!==n)){var a=r&&H(),c=H()?i:this.templateInputValue(o[u]);this.handleComponentBlur({menuOpen:a,query:c})}},o.handleInputChange=function(t){var e=this,n=this.props,r=n.minLength,o=n.source,i=n.showAllValues,u=this.hasAutoselect(),a=t.target.value,c=0===a.length,s=this.state.query!==a,l=a.length>=r;this.setState({query:a,ariaHint:c}),i||!c&&s&&l?o(a,(function(t){var n=t.length>0;e.setState({menuOpen:n,options:t,selected:u&&n?0:-1,validChoiceMade:!1})})):!c&&l||this.setState({menuOpen:!1,options:[]})},o.handleInputClick=function(t){this.handleInputChange(t)},o.handleInputFocus=function(t){var e=this.state,n=e.query,r=e.validChoiceMade,o=e.options,i=this.props.minLength,u=!r&&n.length>=i&&o.length>0;u?this.setState((function(t){var e=t.menuOpen;return{focused:-1,menuOpen:u||e,selected:-1}})):this.setState({focused:-1})},o.handleOptionFocus=function(t){this.setState({focused:t,hovered:null,selected:t})},o.handleOptionMouseEnter=function(t,e){H()||this.setState({hovered:e})},o.handleOptionClick=function(t,e){var n=this.state.options[e],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},o.handleOptionMouseDown=function(t){t.preventDefault()},o.handleUpArrow=function(t){t.preventDefault();var e=this.state,n=e.menuOpen,r=e.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},o.handleDownArrow=function(t){var e=this;if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,i=n.selected;i!==o.length-1&&r&&this.handleOptionFocus(i+1)}},o.handleSpace=function(t){var e=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))},o.handleEnter=function(t){this.state.menuOpen&&(t.preventDefault(),this.state.selected>=0&&this.handleOptionClick(t,this.state.selected))},o.handlePrintableKey=function(t){var e=this.elementReferences[-1];t.target===e||e.focus()},o.handleKeyDown=function(t){switch(W[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((e=t.keyCode)>47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223)&&this.handlePrintableKey(t)}var e},o.render=function(){var t,e=this,n=this.props,r=n.cssNamespace,o=n.displayMenu,i=n.id,a=n.minLength,c=n.name,s=n.placeholder,l=n.required,f=n.showAllValues,p=n.tNoResults,d=n.tStatusQueryTooShort,h=n.tStatusNoResults,v=n.tStatusSelectedOption,m=n.tStatusResults,y=n.tAssistiveHint,g=n.dropdownArrow,b=n.menuAttributes,x=n.inputClasses,w=n.hintClasses,O=n.menuClasses,_=this.state,S=_.focused,C=_.hovered,E=_.menuOpen,I=_.options,j=_.query,A=_.selected,P=_.ariaHint,N=_.validChoiceMade,k=this.hasAutoselect(),T=-1===S,R=0===I.length,M=0!==j.length,L=j.length>=a,D=this.props.showNoOptionsFound&&T&&R&&M&&L,F=r+"__wrapper",V=r+"__status",q=r+"__dropdown-arrow-down",W=-1!==S&&null!==S,K=r+"__option",z=r+"__hint",G=this.templateInputValue(I[A]),Q=G&&0===G.toLowerCase().indexOf(j.toLowerCase())&&k?j+G.substr(j.length):"",$=i+"__assistiveHint",Y={"aria-describedby":P?$:null,"aria-expanded":E?"true":"false","aria-activedescendant":W?i+"__option--"+S:null,"aria-owns":i+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};f&&"string"==typeof(t=g({className:q}))&&(t=u("div",{className:r+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:t}}));var X=r+"__input",J=[X,this.props.showAllValues?X+"--show-all-values":X+"--default"];null!==S&&J.push(X+"--focused"),x&&J.push(x);var Z=r+"__menu",tt=[Z,Z+"--"+o,Z+"--"+(E||D?"visible":"hidden")];O&&tt.push(O),(null!=b&&b.class||null!=b&&b.className)&&tt.push((null==b?void 0:b.class)||(null==b?void 0:b.className));var et=Object.assign({},b,{id:i+"__listbox",role:"listbox",className:tt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete et.class,u("div",{className:F,onKeyDown:this.handleKeyDown},u(B,{id:i,length:I.length,queryLength:j.length,minQueryLength:a,selectedOption:this.templateInputValue(I[A]),selectedOptionIndex:A,validChoiceMade:N,isInFocus:null!==this.state.focused,tQueryTooShort:d,tNoResults:h,tSelectedOption:v,tResults:m,className:V}),Q&&u("span",null,u("input",{className:[z,null===w?x:w].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:Q})),u("input",U({},Y,{autoComplete:"off",className:J.join(" "),id:i,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onInput:this.handleInputChange},{onFocus:this.handleInputFocus,name:c,placeholder:s,ref:function(t){e.elementReferences[-1]=t},type:"text",role:"combobox",required:l,value:j})),t,u("ul",et,I.map((function(t,n){var r=(-1===S?A===n:S===n)&&null===C?" "+K+"--focused":"",o=n%2?" "+K+"--odd":"",a=H()?"<span id="+i+"__option-suffix--"+n+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(n+1)+" of "+I.length+"</span>":"";return u("li",{"aria-selected":S===n?"true":"false",className:""+K+r+o,dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)+a},id:i+"__option--"+n,key:n,onBlur:function(t){return e.handleOptionBlur(t,n)},onClick:function(t){return e.handleOptionClick(t,n)},onMouseDown:e.handleOptionMouseDown,onMouseEnter:function(t){return e.handleOptionMouseEnter(t,n)},ref:function(t){e.elementReferences[n]=t},role:"option",tabIndex:"-1","aria-posinset":n+1,"aria-setsize":I.length})})),D&&u("li",{className:K+" "+K+"--no-results"},p())),u("span",{id:$,style:{display:"none"}},y()))},r}(M);function z(t){if(!t.element)throw new Error("element is not defined");if(!t.id)throw new Error("id is not defined");if(!t.source)throw new Error("source is not defined");Array.isArray(t.source)&&(t.source=G(t.source)),L(u(K,t),t.element)}K.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:F,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null};var G=function(t){return function(e,n){n(t.filter((function(t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())})))}};z.enhanceSelectElement=function(t){if(!t.selectElement)throw new Error("selectElement is not defined");if(!t.source){var e=[].filter.call(t.selectElement.options,(function(e){return e.value||t.preserveNullOptions}));t.source=e.map((function(t){return t.textContent||t.innerText}))}if(t.onConfirm=t.onConfirm||function(e){var n=[].filter.call(t.selectElement.options,(function(t){return(t.textContent||t.innerText)===e}))[0];n&&(n.selected=!0)},t.selectElement.value||void 0===t.defaultValue){var n=t.selectElement.options[t.selectElement.options.selectedIndex];t.defaultValue=n.textContent||n.innerText}void 0===t.name&&(t.name=""),void 0===t.id&&(void 0===t.selectElement.id?t.id="":t.id=t.selectElement.id),void 0===t.autoselect&&(t.autoselect=!0);var r=document.createElement("div");t.selectElement.parentNode.insertBefore(r,t.selectElement),z(Object.assign({},t,{element:r})),t.selectElement.style.display="none",t.selectElement.id=t.selectElement.id+"-select"};var Q=z}(),r=r.default}()})); | ||
//# sourceMappingURL=accessible-autocomplete.min.js.map |
@@ -1,2 +0,2 @@ | ||
(function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("preact")):"function"==typeof define&&define.amd?define(["preact"],t):"object"==typeof exports?exports["Autocomplete"]=t(require("preact")):e["Autocomplete"]=t(e["preact"])})(window,function(n){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/",o(o.s=31)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var v=n(0),m=n(5),y=n(6),g=n(14),b=n(16),O="prototype",w=function(e,t,n){var r,o,i,u,a=e&w.F,s=e&w.G,l=e&w.S,c=e&w.P,p=e&w.B,f=s?v:l?v[t]||(v[t]={}):(v[t]||{})[O],d=s?m:m[t]||(m[t]={}),h=d[O]||(d[O]={});for(r in s&&(n=t),n)i=((o=!a&&f&&f[r]!==undefined)?f:n)[r],u=p&&o?b(i,v):c&&"function"==typeof i?b(Function.call,i):i,f&&g(f,r,i,e&w.U),d[r]!=i&&y(d,r,u),c&&h[r]!=i&&(h[r]=i)};v.core=m,w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,e.exports=w},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(7),o=n(35);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(8),i=n(33),u=n(34),a=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(o(e),t=u(t,!0),o(n),i)try{return a(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(e===undefined?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(20);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports=n},function(e,t,n){var r=n(2),o=n(0).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var i=n(0),u=n(6),a=n(15),s=n(9)("src"),r="toString",o=Function[r],l=(""+o).split(r);n(5).inspectSource=function(e){return o.call(e)},(e.exports=function(e,t,n,r){var o="function"==typeof n;o&&(a(n,"name")||u(n,"name",t)),e[t]!==n&&(o&&(a(n,s)||u(n,s,e[t]?""+e[t]:l.join(String(t)))),e===i?e[t]=n:r?e[t]?e[t]=n:u(e,t,n):(delete e[t],u(e,t,n)))})(Function.prototype,r,function(){return"function"==typeof this&&this[s]||o.call(this)})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(17);e.exports=function(r,o,e){if(i(r),o===undefined)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(37),o=n(26);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(10),o=n(11);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var s=n(19),l=n(22),c=n(38);e.exports=function(a){return function(e,t,n){var r,o=s(e),i=l(o.length),u=c(n,i);if(a&&t!=t){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((a||u in o)&&o[u]===t)return a||u||0;return!a&&-1}}},function(e,t,n){var r=n(23),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t,n){var r=n(25)("keys"),o=n(9);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(5),o=n(0),i="__core-js_shared__",u=o[i]||(o[i]={});(e.exports=function(e,t){return u[e]||(u[e]=t!==undefined?t:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(11);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(42)})},function(e,t,n){var r=n(25)("wks"),o=n(9),i=n(0).Symbol,u="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=u&&i[e]||(u?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(32),n(28),n(45),n(46),n(51),n(52),n(55);var $=n(12),J=o(n(57)),r=o(n(58));function o(e){return e&&e.__esModule?e:{"default":e}}function X(){return(X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function Y(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var a=function(n){function e(e){var t;return(t=n.call(this,e)||this).elementReferences={},t.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},t.handleComponentBlur=t.handleComponentBlur.bind(i(i(t))),t.handleKeyDown=t.handleKeyDown.bind(i(i(t))),t.handleUpArrow=t.handleUpArrow.bind(i(i(t))),t.handleDownArrow=t.handleDownArrow.bind(i(i(t))),t.handleEnter=t.handleEnter.bind(i(i(t))),t.handlePrintableKey=t.handlePrintableKey.bind(i(i(t))),t.handleListMouseLeave=t.handleListMouseLeave.bind(i(i(t))),t.handleOptionBlur=t.handleOptionBlur.bind(i(i(t))),t.handleOptionClick=t.handleOptionClick.bind(i(i(t))),t.handleOptionFocus=t.handleOptionFocus.bind(i(i(t))),t.handleOptionMouseDown=t.handleOptionMouseDown.bind(i(i(t))),t.handleOptionMouseEnter=t.handleOptionMouseEnter.bind(i(i(t))),t.handleInputBlur=t.handleInputBlur.bind(i(i(t))),t.handleInputChange=t.handleInputChange.bind(i(i(t))),t.handleInputFocus=t.handleInputFocus.bind(i(i(t))),t.pollInputElement=t.pollInputElement.bind(i(i(t))),t.getDirectInputChanges=t.getDirectInputChanges.bind(i(i(t))),t}(function r(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t})(e,n);var t=e.prototype;return t.isQueryAnOption=function(e,t){var n=this;return-1!==t.map(function(e){return n.templateInputValue(e).toLowerCase()}).indexOf(e.toLowerCase())},t.componentDidMount=function(){this.pollInputElement()},t.componentWillUnmount=function(){clearTimeout(this.$pollInput)},t.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){e.pollInputElement()},100)},t.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},t.componentDidUpdate=function(e,t){var n=this.state.focused,r=null===n,o=t.focused!==n;o&&!r&&this.elementReferences[n].focus();var i=-1===n,u=o&&null===t.focused;if(i&&u){var a=this.elementReferences[n];a.setSelectionRange(0,a.value.length)}},t.hasAutoselect=function(){return!Y()&&this.props.autoselect},t.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},t.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},t.handleComponentBlur=function(e){var t,n=this.state,r=n.options,o=n.query,i=n.selected;this.props.confirmOnBlur?(t=e.query||o,this.props.onConfirm(r[i])):t=o,this.setState({focused:null,menuOpen:e.menuOpen||!1,query:t,selected:null,validChoiceMade:this.isQueryAnOption(t,r)})},t.handleListMouseLeave=function(e){this.setState({hovered:null})},t.handleOptionBlur=function(e,t){var n=this.state,r=n.focused,o=n.menuOpen,i=n.options,u=n.selected,a=null===e.relatedTarget,s=e.relatedTarget===this.elementReferences[-1],l=r!==t&&-1!==r;if(!l&&a||!(l||s)){var c=o&&Y();this.handleComponentBlur({menuOpen:c,query:this.templateInputValue(i[u])})}},t.handleInputBlur=function(e){var t=this.state,n=t.focused,r=t.menuOpen,o=t.options,i=t.query,u=t.selected;if(!(-1!==n)){var a=r&&Y(),s=Y()?i:this.templateInputValue(o[u]);this.handleComponentBlur({menuOpen:a,query:s})}},t.handleInputChange=function(e){var n=this,t=this.props,r=t.minLength,o=t.source,i=t.showAllValues,u=this.hasAutoselect(),a=e.target.value,s=0===a.length,l=this.state.query.length!==a.length,c=a.length>=r;this.setState({query:a,ariaHint:s}),i||!s&&l&&c?o(a,function(e){var t=0<e.length;n.setState({menuOpen:t,options:e,selected:u&&t?0:-1,validChoiceMade:!1})}):!s&&c||this.setState({menuOpen:!1,options:[]})},t.handleInputClick=function(e){this.handleInputChange(e)},t.handleInputFocus=function(e){var t=this.state,n=t.query,r=t.validChoiceMade,o=t.options,i=this.props.minLength,u=!r&&n.length>=i&&0<o.length;u?this.setState(function(e){var t=e.menuOpen;return{focused:-1,menuOpen:u||t,selected:-1}}):this.setState({focused:-1})},t.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},t.handleOptionMouseEnter=function(e,t){Y()||this.setState({hovered:t})},t.handleOptionClick=function(e,t){var n=this.state.options[t],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},t.handleOptionMouseDown=function(e){e.preventDefault()},t.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,r=t.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},t.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})});else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,i=n.selected;i!==o.length-1&&r&&this.handleOptionFocus(i+1)}},t.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e})})),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},t.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),0<=this.state.selected&&this.handleOptionClick(e,this.state.selected))},t.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},t.handleKeyDown=function(e){switch(u[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function t(e){return 47<e&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223})(e.keyCode)&&this.handlePrintableKey(e)}},t.render=function(){var e,i=this,t=this.props,n=t.cssNamespace,r=t.displayMenu,u=t.id,o=t.minLength,a=t.name,s=t.placeholder,l=t.required,c=t.showAllValues,p=t.tNoResults,f=t.tStatusQueryTooShort,d=t.tStatusNoResults,h=t.tStatusSelectedOption,v=t.tStatusResults,m=t.tAssistiveHint,y=t.dropdownArrow,g=this.state,b=g.focused,O=g.hovered,w=g.menuOpen,x=g.options,_=g.query,S=g.selected,C=g.ariaHint,I=g.validChoiceMade,M=this.hasAutoselect(),E=-1===b,j=0===x.length,A=0!==_.length,P=_.length>=o,F=this.props.showNoOptionsFound&&E&&j&&A&&P,D=n+"__wrapper",R=n+"__input",k=null!==b?" "+R+"--focused":"",q=this.props.showAllValues?" "+R+"--show-all-values":" "+R+"--default",L=n+"__dropdown-arrow-down",N=-1!==b&&null!==b,B=n+"__menu",T=B+"--"+r,V=B+"--"+(w||F?"visible":"hidden"),U=n+"__option",K=n+"__hint",H=this.templateInputValue(x[S]),Q=H&&0===H.toLowerCase().indexOf(_.toLowerCase())&&M?_+H.substr(_.length):"",W=u+"__assistiveHint",z=C?{"aria-describedby":W}:null;return c&&"string"==typeof(e=y({className:L}))&&(e=(0,$.createElement)("div",{className:n+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,$.createElement)("div",{className:D,onKeyDown:this.handleKeyDown},(0,$.createElement)(J["default"],{id:u,length:x.length,queryLength:_.length,minQueryLength:o,selectedOption:this.templateInputValue(x[S]),selectedOptionIndex:S,validChoiceMade:I,isInFocus:null!==this.state.focused,tQueryTooShort:f,tNoResults:d,tSelectedOption:h,tResults:v}),Q&&(0,$.createElement)("span",null,(0,$.createElement)("input",{className:K,readonly:!0,tabIndex:"-1",value:Q})),(0,$.createElement)("input",X({"aria-expanded":w?"true":"false","aria-activedescendant":!!N&&u+"__option--"+b,"aria-owns":u+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},z,{autoComplete:"off",className:""+R+k+q,id:u,onClick:function(e){return i.handleInputClick(e)},onBlur:this.handleInputBlur},function G(e){return{onInput:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:a,placeholder:s,ref:function(e){i.elementReferences[-1]=e},type:"text",role:"combobox",required:l,value:_})),e,(0,$.createElement)("ul",{className:B+" "+T+" "+V,onMouseLeave:function(e){return i.handleListMouseLeave(e)},id:u+"__listbox",role:"listbox"},x.map(function(e,t){var n=(-1===b?S===t:b===t)&&null===O?" "+U+"--focused":"",r=t%2?" "+U+"--odd":"",o=Y()?"<span id="+u+"__option-suffix--"+t+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(t+1)+" of "+x.length+"</span>":"";return(0,$.createElement)("li",{"aria-selected":b===t?"true":"false",className:""+U+n+r,dangerouslySetInnerHTML:{__html:i.templateSuggestion(e)+o},id:u+"__option--"+t,key:t,onBlur:function(e){return i.handleOptionBlur(e,t)},onClick:function(e){return i.handleOptionClick(e,t)},onMouseDown:i.handleOptionMouseDown,onMouseEnter:function(e){return i.handleOptionMouseEnter(e,t)},ref:function(e){i.elementReferences[t]=e},role:"option",tabIndex:"-1","aria-posinset":t+1,"aria-setsize":x.length})}),F&&(0,$.createElement)("li",{className:U+" "+U+"--no-results"},p())),(0,$.createElement)("span",{id:W,style:{display:"none"}},m()))},e}($.Component);(t["default"]=a).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:r["default"]}},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(36)})},function(e,t,n){e.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(2);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var f=n(18),d=n(40),h=n(41),v=n(27),m=n(10),o=Object.assign;e.exports=!o||n(4)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||Object.keys(o({},t)).join("")!=r})?function(e,t){for(var n=v(e),r=arguments.length,o=1,i=d.f,u=h.f;o<r;)for(var a,s=m(arguments[o++]),l=i?f(s).concat(i(s)):f(s),c=l.length,p=0;p<c;)u.call(s,a=l[p++])&&(n[a]=s[a]);return n}:o},function(e,t,n){var u=n(15),a=n(19),s=n(21)(!1),l=n(24)("IE_PROTO");e.exports=function(e,t){var n,r=a(e),o=0,i=[];for(n in r)n!=l&&u(r,n)&&i.push(n);for(;t.length>o;)u(r,n=t[o++])&&(~s(i,n)||i.push(n));return i}},function(e,t,n){var r=n(23),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var o=r(8),i=r(43),u=r(26),a=r(24)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=r(13)("iframe"),n=u.length;for(t.style.display="none",r(44).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[l][u[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=o(e),n=new s,s[l]=null,n[a]=e):n=c(),t===undefined?n:i(n,t)}},function(e,t,n){var u=n(7),a=n(8),s=n(18);e.exports=n(3)?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=r.length,i=0;i<o;)u.f(e,n=r[i++],t[n]);return e}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(7).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(3)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(1),o=n(47)(1);r(r.P+r.F*!n(30)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var b=n(16),O=n(10),w=n(27),x=n(22),r=n(48);e.exports=function(p,e){var f=1==p,d=2==p,h=3==p,v=4==p,m=6==p,y=5==p||m,g=e||r;return function(e,t,n){for(var r,o,i=w(e),u=O(i),a=b(t,n,3),s=x(u.length),l=0,c=f?g(e,s):d?g(e,0):undefined;l<s;l++)if((y||l in u)&&(o=a(r=u[l],l,i),p))if(f)c[l]=o;else if(o)switch(p){case 3:return!0;case 5:return r;case 6:return l;case 2:c.push(r)}else if(v)return!1;return m?-1:h||v?v:c}}},function(e,t,n){var r=n(49);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(2),o=n(50),i=n(29)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=undefined),r(t)&&null===(t=t[i])&&(t=undefined)),t===undefined?Array:t}},function(e,t,n){var r=n(20);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(1),o=n(21)(!1),i=[].indexOf,u=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!n(30)(i)),"Array",{indexOf:function(e){return u?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(53)})},function(e,t,n){"use strict";var i=n(17),u=n(2),a=n(54),s=[].slice,l={};e.exports=Function.bind||function(t){var n=i(this),r=s.call(arguments,1),o=function(){var e=r.concat(s.call(arguments));return this instanceof o?function(e,t,n){if(!(t in l)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";l[t]=Function("F,a","return new F("+r.join(",")+")")}return l[t](e,n)}(n,e.length,e):a(n,e,t)};return u(n.prototype)&&(o.prototype=n.prototype),o}},function(e,t){e.exports=function(e,t,n){var r=n===undefined;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){n(56)("match",1,function(r,o,e){return[function(e){"use strict";var t=r(this),n=e==undefined?undefined:e[o];return n!==undefined?n.call(e,t):new RegExp(e)[o](String(t))},e]})},function(e,t,n){"use strict";var a=n(6),s=n(14),l=n(4),c=n(11),p=n(29);e.exports=function(t,e,n){var r=p(t),o=n(c,r,""[t]),i=o[0],u=o[1];l(function(){var e={};return e[r]=function(){return 7},7!=""[t](e)})&&(s(String.prototype,t,i),a(RegExp.prototype,r,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(28);var b=n(12);var r=function r(o,i,u){var a;return function(){var e=this,t=arguments,n=function n(){a=null,u||o.apply(e,t)},r=u&&!a;clearTimeout(a),a=setTimeout(n,i),r&&o.apply(e,t)}},o=function(o){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))||this).state={bump:!1,debounced:!1},e}(function n(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t})(e,o);var t=e.prototype;return t.componentWillMount=function(){var e=this;this.debounceStatusUpdate=r(function(){if(!e.state.debounced){var t=!e.props.isInFocus||e.props.validChoiceMade;e.setState(function(e){return{bump:!e.bump,debounced:!0,silenced:t}})}},1400)},t.componentWillReceiveProps=function(e){e.queryLength;this.setState({debounced:!1})},t.render=function(){var e=this.props,t=e.id,n=e.length,r=e.queryLength,o=e.minQueryLength,i=e.selectedOption,u=e.selectedOptionIndex,a=e.tQueryTooShort,s=e.tNoResults,l=e.tSelectedOption,c=e.tResults,p=this.state,f=p.bump,d=p.debounced,h=p.silenced,v=r<o,m=0===n,y=i?l(i,n,u):"",g=null;return g=v?a(o):m?s():c(n,y),this.debounceStatusUpdate(),(0,b.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,b.createElement)("div",{id:t+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!h&&d&&f?g:""),(0,b.createElement)("div",{id:t+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},h||!d||f?"":g))},e}(b.Component);(t["default"]=o).defaultProps={tQueryTooShort:function(e){return"Type in "+e+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(e,t,n){return e+" "+(n+1)+" of "+t+" is highlighted"},tResults:function(e,t){return e+" "+(1===e?"result":"results")+" "+(1===e?"is":"are")+" available. "+t}}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r=n(12),o=function i(e){var t=e.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};t["default"]=o}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("preact")):"function"==typeof define&&define.amd?define("Autocomplete",["preact"],e):"object"==typeof exports?exports.Autocomplete=e(require("preact")):t.Autocomplete=e(t.preact)}(this,(function(t){return function(){"use strict";var e={1560:function(e){e.exports=t},8952:function(t,e,n){var r=n(4328),o=n(36),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},2096:function(t,e,n){var r=n(2424),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},4764:function(t,e,n){var r=n(9764).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},6100:function(t,e,n){var r=n(7e3),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new o("Incorrect invocation")}},3951:function(t,e,n){var r=n(1632),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},2504:function(t,e,n){var r=n(4096),o=n(2495),i=n(3556),u=function(t){return function(e,n,u){var a=r(e),c=i(a);if(0===c)return!t&&-1;var s,l=o(u,c);if(t&&n!=n){for(;c>l;)if((s=a[l++])!=s)return!0}else for(;c>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},3364:function(t,e,n){var r=n(8992),o=n(1664),i=n(5712),u=n(4356),a=n(3556),c=n(2568),s=o([].push),l=function(t){var e=1===t,n=2===t,o=3===t,l=4===t,f=6===t,p=7===t,h=5===t||f;return function(d,v,y,g){for(var m,b,x=u(d),w=i(x),O=a(w),S=r(v,y),E=0,I=g||c,j=e?I(d,O):n||p?I(d,0):void 0;O>E;E++)if((h||E in w)&&(b=S(m=w[E],E,x),t))if(e)j[E]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:s(j,m)}else switch(t){case 4:return!1;case 7:s(j,m)}return f?-1:o||l?l:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},953:function(t,e,n){var r=n(9957),o=n(9972),i=n(8504),u=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},1496:function(t,e,n){var r=n(9957);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},6728:function(t,e,n){var r=n(3476),o=n(1432),i=TypeError,u=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!u(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},6736:function(t,e,n){var r=n(1432),o=n(6072),i=n(1632),u=n(9972)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===a||r(e.prototype))||i(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?a:e}},2568:function(t,e,n){var r=n(6736);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},8696:function(t,e,n){var r=n(3951),o=n(3112);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(u){o(t,"throw",u)}}},1888:function(t,e,n){var r=n(1664),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},4427:function(t,e,n){var r=n(16),o=n(4328),i=n(1888),u=n(9972)("toStringTag"),a=Object,c="Arguments"===i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=a(t),u))?n:c?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},9968:function(t,e,n){var r=n(5152),o=n(9252),i=n(9444),u=n(8352);t.exports=function(t,e,n){for(var a=o(e),c=u.f,s=i.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,s(e,f))}}},2272:function(t,e,n){var r=n(9957);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3336:function(t){t.exports=function(t,e){return{value:t,done:e}}},3440:function(t,e,n){var r=n(3476),o=n(8352),i=n(9728);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9728:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},92:function(t,e,n){var r=n(3476),o=n(8352),i=n(9728);t.exports=function(t,e,n){r?o.f(t,e,i(0,n)):t[e]=n}},2544:function(t,e,n){var r=n(5312),o=n(8352);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},6076:function(t,e,n){var r=n(4328),o=n(8352),i=n(5312),u=n(4636);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,s=void 0!==a.name?a.name:e;if(r(n)&&i(n,s,a),a.global)c?t[e]=n:u(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},4036:function(t,e,n){var r=n(6076);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},4636:function(t,e,n){var r=n(6420),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},3476:function(t,e,n){var r=n(9957);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8168:function(t,e,n){var r=n(6420),o=n(1632),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},4316:function(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6064:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},8504:function(t,e,n){var r,o,i=n(6420),u=n(6064),a=i.process,c=i.Deno,s=a&&a.versions||c&&c.version,l=s&&s.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},8256:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(t,e,n){var r=n(1664),o=Error,i=r("".replace),u=String(new o("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(u);t.exports=function(t,e){if(c&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,a,"");return t}},3696:function(t,e,n){var r=n(3440),o=n(6520),i=n(9184),u=Error.captureStackTrace;t.exports=function(t,e,n,a){i&&(u?u(t,e):r(t,"stack",o(n,a)))}},9184:function(t,e,n){var r=n(9957),o=n(9728);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},9160:function(t,e,n){var r=n(6420),o=n(9444).f,i=n(3440),u=n(6076),a=n(4636),c=n(9968),s=n(6704);t.exports=function(t,e){var n,l,f,p,h,d=t.target,v=t.global,y=t.stat;if(n=v?r:y?r[d]||a(d,{}):r[d]&&r[d].prototype)for(l in e){if(p=e[l],f=t.dontCallGetSet?(h=o(n,l))&&h.value:n[l],!s(v?l:d+(y?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),u(n,l,p,t)}}},9957:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},7176:function(t,e,n){n(880);var r=n(8448),o=n(6076),i=n(7680),u=n(9957),a=n(9972),c=n(3440),s=a("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var p=a(t),h=!u((function(){var e={};return e[p]=function(){return 7},7!==""[t](e)})),d=h&&!u((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!h||!d||n){var v=/./[p],y=e(p,""[t],(function(t,e,n,o,u){var a=e.exec;return a===i||a===l.exec?h&&!u?{done:!0,value:r(v,e,n,o)}:{done:!0,value:r(t,n,e,o)}:{done:!1}}));o(String.prototype,t,y[0]),o(l,p,y[1])}f&&c(l[p],"sham",!0)}},908:function(t,e,n){var r=n(7332),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?u.bind(i):function(){return u.apply(i,arguments)})},8992:function(t,e,n){var r=n(3180),o=n(8952),i=n(7332),u=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?u(t,e):function(){return t.apply(e,arguments)}}},7332:function(t,e,n){var r=n(9957);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8448:function(t,e,n){var r=n(7332),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6208:function(t,e,n){var r=n(3476),o=n(5152),i=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,s=a&&(!r||r&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:s}},5288:function(t,e,n){var r=n(1664),o=n(8952);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(i){}}},3180:function(t,e,n){var r=n(1888),o=n(1664);t.exports=function(t){if("Function"===r(t))return o(t)}},1664:function(t,e,n){var r=n(7332),o=Function.prototype,i=o.call,u=r&&o.bind.bind(i,i);t.exports=r?u:function(t){return function(){return i.apply(t,arguments)}}},5232:function(t,e,n){var r=n(6420),o=n(4328);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},6752:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},4504:function(t,e,n){var r=n(8952),o=n(9760);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},6420:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5152:function(t,e,n){var r=n(1664),o=n(4356),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},2560:function(t){t.exports={}},4168:function(t,e,n){var r=n(5232);t.exports=r("document","documentElement")},9888:function(t,e,n){var r=n(3476),o=n(9957),i=n(8168);t.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},5712:function(t,e,n){var r=n(1664),o=n(9957),i=n(1888),u=Object,a=r("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?a(t,""):u(t)}:u},7512:function(t,e,n){var r=n(4328),o=n(1632),i=n(4024);t.exports=function(t,e,n){var u,a;return i&&r(u=e.constructor)&&u!==n&&o(a=u.prototype)&&a!==n.prototype&&i(t,a),t}},9112:function(t,e,n){var r=n(1664),o=n(4328),i=n(3976),u=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},3480:function(t,e,n){var r=n(1632),o=n(3440);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},9104:function(t,e,n){var r,o,i,u=n(4288),a=n(6420),c=n(1632),s=n(3440),l=n(5152),f=n(3976),p=n(6504),h=n(2560),d="Object already initialized",v=a.TypeError,y=a.WeakMap;if(u||f.state){var g=f.state||(f.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(t,e){if(g.has(t))throw new v(d);return e.facade=t,g.set(t,e),e},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var m=p("state");h[m]=!0,r=function(t,e){if(l(t,m))throw new v(d);return e.facade=t,s(t,m,e),e},o=function(t){return l(t,m)?t[m]:{}},i=function(t){return l(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},1432:function(t,e,n){var r=n(1888);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4328:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},6072:function(t,e,n){var r=n(1664),o=n(9957),i=n(4328),u=n(4427),a=n(5232),c=n(9112),s=function(){},l=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,p=r(f.exec),h=!f.test(s),d=function(t){if(!i(t))return!1;try{return l(s,[],t),!0}catch(e){return!1}},v=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(f,c(t))}catch(e){return!0}};v.sham=!0,t.exports=!l||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?v:d},6704:function(t,e,n){var r=n(9957),o=n(4328),i=/#|\.prototype\./,u=function(t,e){var n=c[a(t)];return n===l||n!==s&&(o(e)?r(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},s=u.NATIVE="N",l=u.POLYFILL="P";t.exports=u},9760:function(t){t.exports=function(t){return null==t}},1632:function(t,e,n){var r=n(4328);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},2424:function(t,e,n){var r=n(1632);t.exports=function(t){return r(t)||null===t}},7048:function(t){t.exports=!1},7728:function(t,e,n){var r=n(5232),o=n(4328),i=n(7e3),u=n(6536),a=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},3112:function(t,e,n){var r=n(8448),o=n(3951),i=n(4504);t.exports=function(t,e,n){var u,a;o(t);try{if(!(u=i(t,"return"))){if("throw"===e)throw n;return n}u=r(u,t)}catch(c){a=!0,u=c}if("throw"===e)throw n;if(a)throw u;return o(u),n}},9724:function(t,e,n){var r=n(8448),o=n(9368),i=n(3440),u=n(4036),a=n(9972),c=n(9104),s=n(4504),l=n(336).IteratorPrototype,f=n(3336),p=n(3112),h=a("toStringTag"),d="IteratorHelper",v="WrapForValidIterator",y=c.set,g=function(t){var e=c.getterFor(t?v:d);return u(o(l),{next:function(){var n=e(this);if(t)return n.nextHandler();try{var r=n.done?void 0:n.nextHandler();return f(r,n.done)}catch(o){throw n.done=!0,o}},return:function(){var n=e(this),o=n.iterator;if(n.done=!0,t){var i=s(o,"return");return i?r(i,o):f(void 0,!0)}if(n.inner)try{p(n.inner.iterator,"normal")}catch(u){return p(o,"throw",u)}return p(o,"normal"),f(void 0,!0)}})},m=g(!0),b=g(!1);i(b,h,"Iterator Helper"),t.exports=function(t,e){var n=function(n,r){r?(r.iterator=n.iterator,r.next=n.next):r=n,r.type=e?v:d,r.nextHandler=t,r.counter=0,r.done=!1,y(this,r)};return n.prototype=e?m:b,n}},5792:function(t,e,n){var r=n(8448),o=n(8952),i=n(3951),u=n(6752),a=n(9724),c=n(8696),s=a((function(){var t=this.iterator,e=i(r(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return i(this),o(t),new s(u(this),{mapper:t})}},336:function(t,e,n){var r,o,i,u=n(9957),a=n(4328),c=n(1632),s=n(9368),l=n(7796),f=n(6076),p=n(9972),h=n(7048),d=p("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):v=!0),!c(r)||u((function(){var t={};return r[d].call(t)!==t}))?r={}:h&&(r=s(r)),a(r[d])||f(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},3556:function(t,e,n){var r=n(7584);t.exports=function(t){return r(t.length)}},5312:function(t,e,n){var r=n(1664),o=n(9957),i=n(4328),u=n(5152),a=n(3476),c=n(6208).CONFIGURABLE,s=n(9112),l=n(9104),f=l.enforce,p=l.get,h=String,d=Object.defineProperty,v=r("".slice),y=r("".replace),g=r([].join),m=a&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===v(h(e),0,7)&&(e="["+y(h(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!u(t,"name")||c&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&u(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&u(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=f(t);return u(r,"source")||(r.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return i(this)&&p(this).source||s(this)}),"toString")},1748:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},8948:function(t,e,n){var r=n(5016);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},9292:function(t,e,n){var r=n(3476),o=n(1664),i=n(8448),u=n(9957),a=n(1531),c=n(9392),s=n(8912),l=n(4356),f=n(5712),p=Object.assign,h=Object.defineProperty,d=o([].concat);t.exports=!p||u((function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!==p({},t)[n]||a(p({},e)).join("")!==o}))?function(t,e){for(var n=l(t),o=arguments.length,u=1,p=c.f,h=s.f;o>u;)for(var v,y=f(arguments[u++]),g=p?d(a(y),p(y)):a(y),m=g.length,b=0;m>b;)v=g[b++],r&&!i(h,y,v)||(n[v]=y[v]);return n}:p},9368:function(t,e,n){var r,o=n(3951),i=n(2056),u=n(8256),a=n(2560),c=n(4168),s=n(8168),l=n(6504),f="prototype",p="script",h=l("IE_PROTO"),d=function(){},v=function(t){return"<"+p+">"+t+"</"+p+">"},y=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;g="undefined"!=typeof document?document.domain&&r?y(r):(e=s("iframe"),n="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):y(r);for(var o=u.length;o--;)delete g[f][u[o]];return g()};a[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[f]=o(t),n=new d,d[f]=null,n[h]=t):n=g(),void 0===e?n:i.f(n,e)}},2056:function(t,e,n){var r=n(3476),o=n(1576),i=n(8352),u=n(3951),a=n(4096),c=n(1531);e.f=r&&!o?Object.defineProperties:function(t,e){u(t);for(var n,r=a(e),o=c(e),s=o.length,l=0;s>l;)i.f(t,n=o[l++],r[n]);return t}},8352:function(t,e,n){var r=n(3476),o=n(9888),i=n(1576),u=n(3951),a=n(88),c=TypeError,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",h="writable";e.f=r?i?function(t,e,n){if(u(t),e=a(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var r=l(t,e);r&&r[h]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:f in n?n[f]:r[f],writable:!1})}return s(t,e,n)}:s:function(t,e,n){if(u(t),e=a(e),u(n),o)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9444:function(t,e,n){var r=n(3476),o=n(8448),i=n(8912),u=n(9728),a=n(4096),c=n(88),s=n(5152),l=n(9888),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(n){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},5048:function(t,e,n){var r=n(9008),o=n(8256).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},9392:function(t,e){e.f=Object.getOwnPropertySymbols},7796:function(t,e,n){var r=n(5152),o=n(4328),i=n(4356),u=n(6504),a=n(2272),c=u("IE_PROTO"),s=Object,l=s.prototype;t.exports=a?s.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof s?l:null}},7e3:function(t,e,n){var r=n(1664);t.exports=r({}.isPrototypeOf)},9008:function(t,e,n){var r=n(1664),o=n(5152),i=n(4096),u=n(2504).indexOf,a=n(2560),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~u(l,n)||c(l,n));return l}},1531:function(t,e,n){var r=n(9008),o=n(8256);t.exports=Object.keys||function(t){return r(t,o)}},8912:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},4024:function(t,e,n){var r=n(5288),o=n(3951),i=n(2096);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(u){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},7032:function(t,e,n){var r=n(16),o=n(4427);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2104:function(t,e,n){var r=n(8448),o=n(4328),i=n(1632),u=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw new u("Can't convert object to primitive value")}},9252:function(t,e,n){var r=n(5232),o=n(1664),i=n(5048),u=n(9392),a=n(3951),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=u.f;return n?c(e,n(t)):e}},584:function(t,e,n){var r=n(8352).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},9092:function(t,e,n){var r=n(8448),o=n(3951),i=n(4328),u=n(1888),a=n(7680),c=TypeError;t.exports=function(t,e){var n=t.exec;if(i(n)){var s=r(n,t,e);return null!==s&&o(s),s}if("RegExp"===u(t))return r(a,t,e);throw new c("RegExp#exec called on incompatible receiver")}},7680:function(t,e,n){var r,o,i=n(8448),u=n(1664),a=n(5016),c=n(8872),s=n(3548),l=n(4696),f=n(9368),p=n(9104).get,h=n(8e3),d=n(9124),v=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,m=u("".charAt),b=u("".indexOf),x=u("".replace),w=u("".slice),O=(o=/b*/g,i(y,r=/a/,"a"),i(y,o,"a"),0!==r.lastIndex||0!==o.lastIndex),S=s.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(O||E||S||h||d)&&(g=function(t){var e,n,r,o,u,s,l,h=this,d=p(h),I=a(t),j=d.raw;if(j)return j.lastIndex=h.lastIndex,e=i(g,j,I),h.lastIndex=j.lastIndex,e;var C=d.groups,_=S&&h.sticky,A=i(c,h),P=h.source,R=0,T=I;if(_&&(A=x(A,"y",""),-1===b(A,"g")&&(A+="g"),T=w(I,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==m(I,h.lastIndex-1))&&(P="(?: "+P+")",T=" "+T,R++),n=new RegExp("^(?:"+P+")",A)),E&&(n=new RegExp("^"+P+"$(?!\\s)",A)),O&&(r=h.lastIndex),o=i(y,_?n:h,T),_?o?(o.input=w(o.input,R),o[0]=w(o[0],R),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:O&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),E&&o&&o.length>1&&i(v,o[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&C)for(o.groups=s=f(null),u=0;u<C.length;u++)s[(l=C[u])[0]]=o[l[1]];return o}),t.exports=g},8872:function(t,e,n){var r=n(3951);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},3548:function(t,e,n){var r=n(9957),o=n(6420).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),u=i||r((function(){return!o("a","y").sticky})),a=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:u,UNSUPPORTED_Y:i}},8e3:function(t,e,n){var r=n(9957),o=n(6420).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},9124:function(t,e,n){var r=n(9957),o=n(6420).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},5436:function(t,e,n){var r=n(9760),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},6504:function(t,e,n){var r=n(4696),o=n(7776),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},3976:function(t,e,n){var r=n(7048),o=n(6420),i=n(4636),u="__core-js_shared__",a=t.exports=o[u]||i(u,{});(a.versions||(a.versions=[])).push({version:"3.36.0",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(t,e,n){var r=n(3976);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},9764:function(t,e,n){var r=n(1664),o=n(6180),i=n(5016),u=n(5436),a=r("".charAt),c=r("".charCodeAt),s=r("".slice),l=function(t){return function(e,n){var r,l,f=i(u(e)),p=o(n),h=f.length;return p<0||p>=h?t?"":void 0:(r=c(f,p))<55296||r>56319||p+1===h||(l=c(f,p+1))<56320||l>57343?t?a(f,p):r:t?s(f,p,p+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},772:function(t,e,n){var r=n(8504),o=n(9957),i=n(6420).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},2495:function(t,e,n){var r=n(6180),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4096:function(t,e,n){var r=n(5712),o=n(5436);t.exports=function(t){return r(o(t))}},6180:function(t,e,n){var r=n(1748);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7584:function(t,e,n){var r=n(6180),o=Math.min;t.exports=function(t){var e=r(t);return e>0?o(e,9007199254740991):0}},4356:function(t,e,n){var r=n(5436),o=Object;t.exports=function(t){return o(r(t))}},7024:function(t,e,n){var r=n(8448),o=n(1632),i=n(7728),u=n(4504),a=n(2104),c=n(9972),s=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=u(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new s("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},88:function(t,e,n){var r=n(7024),o=n(7728);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},16:function(t,e,n){var r={};r[n(9972)("toStringTag")]="z",t.exports="[object z]"===String(r)},5016:function(t,e,n){var r=n(4427),o=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},36:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},7776:function(t,e,n){var r=n(1664),o=0,i=Math.random(),u=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},6536:function(t,e,n){var r=n(772);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1576:function(t,e,n){var r=n(3476),o=n(9957);t.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4288:function(t,e,n){var r=n(6420),o=n(4328),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},9972:function(t,e,n){var r=n(6420),o=n(4696),i=n(5152),u=n(7776),a=n(772),c=n(6536),s=r.Symbol,l=o("wks"),f=c?s.for||s:s&&s.withoutSetter||u;t.exports=function(t){return i(l,t)||(l[t]=a&&i(s,t)?s[t]:f("Symbol."+t)),l[t]}},6488:function(t,e,n){var r=n(5232),o=n(5152),i=n(3440),u=n(7e3),a=n(4024),c=n(9968),s=n(584),l=n(7512),f=n(8948),p=n(3480),h=n(3696),d=n(3476),v=n(7048);t.exports=function(t,e,n,y){var g="stackTraceLimit",m=y?2:1,b=t.split("."),x=b[b.length-1],w=r.apply(null,b);if(w){var O=w.prototype;if(!v&&o(O,"cause")&&delete O.cause,!n)return w;var S=r("Error"),E=e((function(t,e){var n=f(y?e:t,void 0),r=y?new w(t):new w;return void 0!==n&&i(r,"message",n),h(r,E,r.stack,2),this&&u(O,this)&&l(r,this,E),arguments.length>m&&p(r,arguments[m]),r}));if(E.prototype=O,"Error"!==x?a?a(E,S):c(E,S,{name:!0}):d&&g in w&&(s(E,w,g),s(E,w,"prepareStackTrace")),c(E,w),!v)try{O.name!==x&&i(O,"name",x),O.constructor=E}catch(I){}return E}}},7476:function(t,e,n){var r=n(9160),o=n(9957),i=n(1432),u=n(1632),a=n(4356),c=n(3556),s=n(4316),l=n(92),f=n(2568),p=n(953),h=n(9972),d=n(8504),v=h("isConcatSpreadable"),y=d>=51||!o((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),g=function(t){if(!u(t))return!1;var e=t[v];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,arity:1,forced:!y||!p("concat")},{concat:function(t){var e,n,r,o,i,u=a(this),p=f(u,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(g(i=-1===e?u:arguments[e]))for(o=c(i),s(h+o),n=0;n<o;n++,h++)n in i&&l(p,h,i[n]);else s(h+1),l(p,h++,i);return p.length=h,p}})},6932:function(t,e,n){var r=n(9160),o=n(3364).filter;r({target:"Array",proto:!0,forced:!n(953)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},700:function(t,e,n){var r=n(9160),o=n(1664),i=n(5712),u=n(4096),a=n(1496),c=o([].join);r({target:"Array",proto:!0,forced:i!==Object||!a("join",",")},{join:function(t){return c(u(this),void 0===t?",":t)}})},4456:function(t,e,n){var r=n(9160),o=n(3364).map;r({target:"Array",proto:!0,forced:!n(953)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4728:function(t,e,n){var r=n(9160),o=n(4356),i=n(3556),u=n(6728),a=n(4316);r({target:"Array",proto:!0,arity:1,forced:n(9957)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=i(e),r=arguments.length;a(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return u(e,n),n}})},8752:function(t,e,n){var r=n(9160),o=n(6420),i=n(908),u=n(6488),a="WebAssembly",c=o[a],s=7!==new Error("e",{cause:7}).cause,l=function(t,e){var n={};n[t]=u(t,e,s),r({global:!0,constructor:!0,arity:1,forced:s},n)},f=function(t,e){if(c&&c[t]){var n={};n[t]=u(a+"."+t,e,s),r({target:a,stat:!0,constructor:!0,arity:1,forced:s},n)}};l("Error",(function(t){return function(e){return i(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),l("URIError",(function(t){return function(e){return i(t,this,arguments)}})),f("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),f("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),f("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},508:function(t,e,n){var r=n(3476),o=n(6208).EXISTS,i=n(1664),u=n(2544),a=Function.prototype,c=i(a.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&u(a,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},232:function(t,e,n){var r=n(9160),o=n(9292);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},5443:function(t,e,n){var r=n(16),o=n(6076),i=n(7032);r||o(Object.prototype,"toString",i,{unsafe:!0})},880:function(t,e,n){var r=n(9160),o=n(7680);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9836:function(t,e,n){var r=n(8448),o=n(7176),i=n(3951),u=n(9760),a=n(7584),c=n(5016),s=n(5436),l=n(4504),f=n(4764),p=n(9092);o("match",(function(t,e,n){return[function(e){var n=s(this),o=u(e)?void 0:l(e,t);return o?r(o,e,n):new RegExp(e)[t](c(n))},function(t){var r=i(this),o=c(t),u=n(e,r,o);if(u.done)return u.value;if(!r.global)return p(r,o);var s=r.unicode;r.lastIndex=0;for(var l,h=[],d=0;null!==(l=p(r,o));){var v=c(l[0]);h[d]=v,""===v&&(r.lastIndex=f(o,a(r.lastIndex),s)),d++}return 0===d?null:h}]}))},3536:function(t,e,n){var r=n(9160),o=n(6420),i=n(6100),u=n(3951),a=n(4328),c=n(7796),s=n(2544),l=n(92),f=n(9957),p=n(5152),h=n(9972),d=n(336).IteratorPrototype,v=n(3476),y=n(7048),g="constructor",m="Iterator",b=h("toStringTag"),x=TypeError,w=o[m],O=y||!a(w)||w.prototype!==d||!f((function(){w({})})),S=function(){if(i(this,d),c(this)===d)throw new x("Abstract class Iterator not directly constructable")},E=function(t,e){v?s(d,t,{configurable:!0,get:function(){return e},set:function(e){if(u(this),this===d)throw new x("You can't redefine this property");p(this,t)?this[t]=e:l(this,t,e)}}):d[t]=e};p(d,b)||E(b,m),!O&&p(d,g)&&d[g]!==Object||E(g,S),S.prototype=d,r({global:!0,constructor:!0,forced:O},{Iterator:S})},2144:function(t,e,n){var r=n(9160),o=n(8448),i=n(8952),u=n(3951),a=n(6752),c=n(9724),s=n(8696),l=n(7048),f=c((function(){for(var t,e,n=this.iterator,r=this.predicate,i=this.next;;){if(t=u(o(i,n)),this.done=!!t.done)return;if(e=t.value,s(n,r,[e,this.counter++],!0))return e}}));r({target:"Iterator",proto:!0,real:!0,forced:l},{filter:function(t){return u(this),i(t),new f(a(this),{predicate:t})}})},9080:function(t,e,n){var r=n(9160),o=n(5792);r({target:"Iterator",proto:!0,real:!0,forced:n(7048)},{map:o})}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,r),i.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){r.r(o),r.d(o,{default:function(){return f}});r(8752),r(6932),r(700),r(4456),r(4728),r(508),r(232),r(5443),r(880),r(9836),r(3536),r(2144),r(9080);var t=r(1560);r(7476);function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}var n=function(n){var r,o;function i(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=n.call.apply(n,[this].concat(r))||this).state={bump:!1,debounced:!1},t}o=n,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,e(r,o);var u=i.prototype;return u.componentWillMount=function(){var t,e,n,r,o=this;this.debounceStatusUpdate=(t=function(){if(!o.state.debounced){var t=!o.props.isInFocus||o.props.validChoiceMade;o.setState((function(e){return{bump:!e.bump,debounced:!0,silenced:t}}))}},e=1400,function(){var o=this,i=arguments,u=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(o,i)}),e),u&&t.apply(o,i)})},u.componentWillReceiveProps=function(t){t.queryLength;this.setState({debounced:!1})},u.render=function(){var e=this.props,n=e.id,r=e.length,o=e.queryLength,i=e.minQueryLength,u=e.selectedOption,a=e.selectedOptionIndex,c=e.tQueryTooShort,s=e.tNoResults,l=e.tSelectedOption,f=e.tResults,p=e.className,h=this.state,d=h.bump,v=h.debounced,y=h.silenced,g=o<i,m=0===r,b=u?l(u,r,a):"",x=null;return x=g?c(i):m?s():f(r,b),this.debounceStatusUpdate(),(0,t.createElement)("div",{className:p,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,t.createElement)("div",{id:n+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!y&&v&&d?x:""),(0,t.createElement)("div",{id:n+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},y||!v||d?"":x))},i}(t.Component);n.defaultProps={tQueryTooShort:function(t){return"Type in "+t+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(t,e,n){return t+" "+(n+1)+" of "+e+" is highlighted"},tResults:function(t,e){return t+" "+(1===t?"result":"results")+" "+(1===t?"is":"are")+" available. "+e}};var i=function(e){var n=e.className;return(0,t.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:n,focusable:"false"},(0,t.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,t.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}var s={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function l(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(e){var r,o;function i(t){var n;return(n=e.call(this,t)||this).elementReferences={},n.state={focused:null,hovered:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},n.handleComponentBlur=n.handleComponentBlur.bind(a(n)),n.handleKeyDown=n.handleKeyDown.bind(a(n)),n.handleUpArrow=n.handleUpArrow.bind(a(n)),n.handleDownArrow=n.handleDownArrow.bind(a(n)),n.handleEnter=n.handleEnter.bind(a(n)),n.handlePrintableKey=n.handlePrintableKey.bind(a(n)),n.handleListMouseLeave=n.handleListMouseLeave.bind(a(n)),n.handleOptionBlur=n.handleOptionBlur.bind(a(n)),n.handleOptionClick=n.handleOptionClick.bind(a(n)),n.handleOptionFocus=n.handleOptionFocus.bind(a(n)),n.handleOptionMouseDown=n.handleOptionMouseDown.bind(a(n)),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(a(n)),n.handleInputBlur=n.handleInputBlur.bind(a(n)),n.handleInputChange=n.handleInputChange.bind(a(n)),n.handleInputClick=n.handleInputClick.bind(a(n)),n.handleInputFocus=n.handleInputFocus.bind(a(n)),n.pollInputElement=n.pollInputElement.bind(a(n)),n.getDirectInputChanges=n.getDirectInputChanges.bind(a(n)),n}o=e,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,c(r,o);var f=i.prototype;return f.isQueryAnOption=function(t,e){var n=this;return-1!==e.map((function(t){return n.templateInputValue(t).toLowerCase()})).indexOf(t.toLowerCase())},f.componentDidMount=function(){this.pollInputElement()},f.componentWillUnmount=function(){clearTimeout(this.$pollInput)},f.pollInputElement=function(){var t=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){t.pollInputElement()}),100)},f.getDirectInputChanges=function(){var t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})},f.componentDidUpdate=function(t,e){var n=this.state.focused,r=null===n,o=e.focused!==n;o&&!r&&this.elementReferences[n].focus();var i=-1===n,u=o&&null===e.focused;if(i&&u){var a=this.elementReferences[n];a.setSelectionRange(0,a.value.length)}},f.hasAutoselect=function(){return!l()&&this.props.autoselect},f.templateInputValue=function(t){var e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t},f.templateSuggestion=function(t){var e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t},f.handleComponentBlur=function(t){var e,n=this.state,r=n.options,o=n.query,i=n.selected;this.props.confirmOnBlur?(e=t.query||o,this.props.onConfirm(r[i])):e=o,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:e,selected:null,validChoiceMade:this.isQueryAnOption(e,r)})},f.handleListMouseLeave=function(t){this.setState({hovered:null})},f.handleOptionBlur=function(t,e){var n=this.state,r=n.focused,o=n.menuOpen,i=n.options,u=n.selected,a=null===t.relatedTarget,c=t.relatedTarget===this.elementReferences[-1],s=r!==e&&-1!==r;if(!s&&a||!(s||c)){var f=o&&l();this.handleComponentBlur({menuOpen:f,query:this.templateInputValue(i[u])})}},f.handleInputBlur=function(t){var e=this.state,n=e.focused,r=e.menuOpen,o=e.options,i=e.query,u=e.selected;if(!(-1!==n)){var a=r&&l(),c=l()?i:this.templateInputValue(o[u]);this.handleComponentBlur({menuOpen:a,query:c})}},f.handleInputChange=function(t){var e=this,n=this.props,r=n.minLength,o=n.source,i=n.showAllValues,u=this.hasAutoselect(),a=t.target.value,c=0===a.length,s=this.state.query!==a,l=a.length>=r;this.setState({query:a,ariaHint:c}),i||!c&&s&&l?o(a,(function(t){var n=t.length>0;e.setState({menuOpen:n,options:t,selected:u&&n?0:-1,validChoiceMade:!1})})):!c&&l||this.setState({menuOpen:!1,options:[]})},f.handleInputClick=function(t){this.handleInputChange(t)},f.handleInputFocus=function(t){var e=this.state,n=e.query,r=e.validChoiceMade,o=e.options,i=this.props.minLength,u=!r&&n.length>=i&&o.length>0;u?this.setState((function(t){var e=t.menuOpen;return{focused:-1,menuOpen:u||e,selected:-1}})):this.setState({focused:-1})},f.handleOptionFocus=function(t){this.setState({focused:t,hovered:null,selected:t})},f.handleOptionMouseEnter=function(t,e){l()||this.setState({hovered:e})},f.handleOptionClick=function(t,e){var n=this.state.options[e],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},f.handleOptionMouseDown=function(t){t.preventDefault()},f.handleUpArrow=function(t){t.preventDefault();var e=this.state,n=e.menuOpen,r=e.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},f.handleDownArrow=function(t){var e=this;if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,i=n.selected;i!==o.length-1&&r&&this.handleOptionFocus(i+1)}},f.handleSpace=function(t){var e=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))},f.handleEnter=function(t){this.state.menuOpen&&(t.preventDefault(),this.state.selected>=0&&this.handleOptionClick(t,this.state.selected))},f.handlePrintableKey=function(t){var e=this.elementReferences[-1];t.target===e||e.focus()},f.handleKeyDown=function(t){switch(s[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((e=t.keyCode)>47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223)&&this.handlePrintableKey(t)}var e},f.render=function(){var e,r=this,o=this.props,i=o.cssNamespace,a=o.displayMenu,c=o.id,s=o.minLength,f=o.name,p=o.placeholder,h=o.required,d=o.showAllValues,v=o.tNoResults,y=o.tStatusQueryTooShort,g=o.tStatusNoResults,m=o.tStatusSelectedOption,b=o.tStatusResults,x=o.tAssistiveHint,w=o.dropdownArrow,O=o.menuAttributes,S=o.inputClasses,E=o.hintClasses,I=o.menuClasses,j=this.state,C=j.focused,_=j.hovered,A=j.menuOpen,P=j.options,R=j.query,T=j.selected,k=j.ariaHint,M=j.validChoiceMade,D=this.hasAutoselect(),N=-1===C,F=0===P.length,L=0!==R.length,B=R.length>=s,q=this.props.showNoOptionsFound&&N&&F&&L&&B,V=i+"__wrapper",U=i+"__status",K=i+"__dropdown-arrow-down",H=-1!==C&&null!==C,W=i+"__option",z=i+"__hint",Q=this.templateInputValue(P[T]),G=Q&&0===Q.toLowerCase().indexOf(R.toLowerCase())&&D?R+Q.substr(R.length):"",$=c+"__assistiveHint",Y={"aria-describedby":k?$:null,"aria-expanded":A?"true":"false","aria-activedescendant":H?c+"__option--"+C:null,"aria-owns":c+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};d&&"string"==typeof(e=w({className:K}))&&(e=(0,t.createElement)("div",{className:i+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}}));var X=i+"__input",J=[X,this.props.showAllValues?X+"--show-all-values":X+"--default"];null!==C&&J.push(X+"--focused"),S&&J.push(S);var Z=i+"__menu",tt=[Z,Z+"--"+a,Z+"--"+(A||q?"visible":"hidden")];I&&tt.push(I),(null!=O&&O.class||null!=O&&O.className)&&tt.push((null==O?void 0:O.class)||(null==O?void 0:O.className));var et=Object.assign({},O,{id:c+"__listbox",role:"listbox",className:tt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete et.class,(0,t.createElement)("div",{className:V,onKeyDown:this.handleKeyDown},(0,t.createElement)(n,{id:c,length:P.length,queryLength:R.length,minQueryLength:s,selectedOption:this.templateInputValue(P[T]),selectedOptionIndex:T,validChoiceMade:M,isInFocus:null!==this.state.focused,tQueryTooShort:y,tNoResults:g,tSelectedOption:m,tResults:b,className:U}),G&&(0,t.createElement)("span",null,(0,t.createElement)("input",{className:[z,null===E?S:E].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:G})),(0,t.createElement)("input",u({},Y,{autoComplete:"off",className:J.join(" "),id:c,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onInput:this.handleInputChange},{onFocus:this.handleInputFocus,name:f,placeholder:p,ref:function(t){r.elementReferences[-1]=t},type:"text",role:"combobox",required:h,value:R})),e,(0,t.createElement)("ul",et,P.map((function(e,n){var o=(-1===C?T===n:C===n)&&null===_?" "+W+"--focused":"",i=n%2?" "+W+"--odd":"",u=l()?"<span id="+c+"__option-suffix--"+n+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(n+1)+" of "+P.length+"</span>":"";return(0,t.createElement)("li",{"aria-selected":C===n?"true":"false",className:""+W+o+i,dangerouslySetInnerHTML:{__html:r.templateSuggestion(e)+u},id:c+"__option--"+n,key:n,onBlur:function(t){return r.handleOptionBlur(t,n)},onClick:function(t){return r.handleOptionClick(t,n)},onMouseDown:r.handleOptionMouseDown,onMouseEnter:function(t){return r.handleOptionMouseEnter(t,n)},ref:function(t){r.elementReferences[n]=t},role:"option",tabIndex:"-1","aria-posinset":n+1,"aria-setsize":P.length})})),q&&(0,t.createElement)("li",{className:W+" "+W+"--no-results"},v())),(0,t.createElement)("span",{id:$,style:{display:"none"}},x()))},i}(t.Component);f.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:i,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}}(),o}()})); | ||
//# sourceMappingURL=accessible-autocomplete.preact.min.js.map |
@@ -1,2 +0,2 @@ | ||
(function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports["Autocomplete"]=t(require("react")):e["Autocomplete"]=t(e["React"])})(this,function(n){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/",o(o.s=31)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var v=n(0),m=n(5),y=n(6),g=n(14),b=n(16),O="prototype",w=function(e,t,n){var r,o,i,u,a=e&w.F,s=e&w.G,l=e&w.S,c=e&w.P,p=e&w.B,f=s?v:l?v[t]||(v[t]={}):(v[t]||{})[O],d=s?m:m[t]||(m[t]={}),h=d[O]||(d[O]={});for(r in s&&(n=t),n)i=((o=!a&&f&&f[r]!==undefined)?f:n)[r],u=p&&o?b(i,v):c&&"function"==typeof i?b(Function.call,i):i,f&&g(f,r,i,e&w.U),d[r]!=i&&y(d,r,u),c&&h[r]!=i&&(h[r]=i)};v.core=m,w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,e.exports=w},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(7),o=n(35);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(8),i=n(33),u=n(34),a=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(o(e),t=u(t,!0),o(n),i)try{return a(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(e===undefined?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(20);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports=n},function(e,t,n){var r=n(2),o=n(0).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var i=n(0),u=n(6),a=n(15),s=n(9)("src"),r="toString",o=Function[r],l=(""+o).split(r);n(5).inspectSource=function(e){return o.call(e)},(e.exports=function(e,t,n,r){var o="function"==typeof n;o&&(a(n,"name")||u(n,"name",t)),e[t]!==n&&(o&&(a(n,s)||u(n,s,e[t]?""+e[t]:l.join(String(t)))),e===i?e[t]=n:r?e[t]?e[t]=n:u(e,t,n):(delete e[t],u(e,t,n)))})(Function.prototype,r,function(){return"function"==typeof this&&this[s]||o.call(this)})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(17);e.exports=function(r,o,e){if(i(r),o===undefined)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(37),o=n(26);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(10),o=n(11);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var s=n(19),l=n(22),c=n(38);e.exports=function(a){return function(e,t,n){var r,o=s(e),i=l(o.length),u=c(n,i);if(a&&t!=t){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((a||u in o)&&o[u]===t)return a||u||0;return!a&&-1}}},function(e,t,n){var r=n(23),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t,n){var r=n(25)("keys"),o=n(9);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(5),o=n(0),i="__core-js_shared__",u=o[i]||(o[i]={});(e.exports=function(e,t){return u[e]||(u[e]=t!==undefined?t:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(11);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(42)})},function(e,t,n){var r=n(25)("wks"),o=n(9),i=n(0).Symbol,u="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=u&&i[e]||(u?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(32),n(28),n(45),n(46),n(51),n(52),n(55);var $=n(12),J=o(n(57)),r=o(n(58));function o(e){return e&&e.__esModule?e:{"default":e}}function X(){return(X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function Y(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var a=function(n){function e(e){var t;return(t=n.call(this,e)||this).elementReferences={},t.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},t.handleComponentBlur=t.handleComponentBlur.bind(i(i(t))),t.handleKeyDown=t.handleKeyDown.bind(i(i(t))),t.handleUpArrow=t.handleUpArrow.bind(i(i(t))),t.handleDownArrow=t.handleDownArrow.bind(i(i(t))),t.handleEnter=t.handleEnter.bind(i(i(t))),t.handlePrintableKey=t.handlePrintableKey.bind(i(i(t))),t.handleListMouseLeave=t.handleListMouseLeave.bind(i(i(t))),t.handleOptionBlur=t.handleOptionBlur.bind(i(i(t))),t.handleOptionClick=t.handleOptionClick.bind(i(i(t))),t.handleOptionFocus=t.handleOptionFocus.bind(i(i(t))),t.handleOptionMouseDown=t.handleOptionMouseDown.bind(i(i(t))),t.handleOptionMouseEnter=t.handleOptionMouseEnter.bind(i(i(t))),t.handleInputBlur=t.handleInputBlur.bind(i(i(t))),t.handleInputChange=t.handleInputChange.bind(i(i(t))),t.handleInputFocus=t.handleInputFocus.bind(i(i(t))),t.pollInputElement=t.pollInputElement.bind(i(i(t))),t.getDirectInputChanges=t.getDirectInputChanges.bind(i(i(t))),t}(function r(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t})(e,n);var t=e.prototype;return t.isQueryAnOption=function(e,t){var n=this;return-1!==t.map(function(e){return n.templateInputValue(e).toLowerCase()}).indexOf(e.toLowerCase())},t.componentDidMount=function(){this.pollInputElement()},t.componentWillUnmount=function(){clearTimeout(this.$pollInput)},t.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){e.pollInputElement()},100)},t.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},t.componentDidUpdate=function(e,t){var n=this.state.focused,r=null===n,o=t.focused!==n;o&&!r&&this.elementReferences[n].focus();var i=-1===n,u=o&&null===t.focused;if(i&&u){var a=this.elementReferences[n];a.setSelectionRange(0,a.value.length)}},t.hasAutoselect=function(){return!Y()&&this.props.autoselect},t.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},t.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},t.handleComponentBlur=function(e){var t,n=this.state,r=n.options,o=n.query,i=n.selected;this.props.confirmOnBlur?(t=e.query||o,this.props.onConfirm(r[i])):t=o,this.setState({focused:null,menuOpen:e.menuOpen||!1,query:t,selected:null,validChoiceMade:this.isQueryAnOption(t,r)})},t.handleListMouseLeave=function(e){this.setState({hovered:null})},t.handleOptionBlur=function(e,t){var n=this.state,r=n.focused,o=n.menuOpen,i=n.options,u=n.selected,a=null===e.relatedTarget,s=e.relatedTarget===this.elementReferences[-1],l=r!==t&&-1!==r;if(!l&&a||!(l||s)){var c=o&&Y();this.handleComponentBlur({menuOpen:c,query:this.templateInputValue(i[u])})}},t.handleInputBlur=function(e){var t=this.state,n=t.focused,r=t.menuOpen,o=t.options,i=t.query,u=t.selected;if(!(-1!==n)){var a=r&&Y(),s=Y()?i:this.templateInputValue(o[u]);this.handleComponentBlur({menuOpen:a,query:s})}},t.handleInputChange=function(e){var n=this,t=this.props,r=t.minLength,o=t.source,i=t.showAllValues,u=this.hasAutoselect(),a=e.target.value,s=0===a.length,l=this.state.query.length!==a.length,c=a.length>=r;this.setState({query:a,ariaHint:s}),i||!s&&l&&c?o(a,function(e){var t=0<e.length;n.setState({menuOpen:t,options:e,selected:u&&t?0:-1,validChoiceMade:!1})}):!s&&c||this.setState({menuOpen:!1,options:[]})},t.handleInputClick=function(e){this.handleInputChange(e)},t.handleInputFocus=function(e){var t=this.state,n=t.query,r=t.validChoiceMade,o=t.options,i=this.props.minLength,u=!r&&n.length>=i&&0<o.length;u?this.setState(function(e){var t=e.menuOpen;return{focused:-1,menuOpen:u||t,selected:-1}}):this.setState({focused:-1})},t.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},t.handleOptionMouseEnter=function(e,t){Y()||this.setState({hovered:t})},t.handleOptionClick=function(e,t){var n=this.state.options[t],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},t.handleOptionMouseDown=function(e){e.preventDefault()},t.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,r=t.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},t.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})});else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,i=n.selected;i!==o.length-1&&r&&this.handleOptionFocus(i+1)}},t.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e})})),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},t.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),0<=this.state.selected&&this.handleOptionClick(e,this.state.selected))},t.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},t.handleKeyDown=function(e){switch(u[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function t(e){return 47<e&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223})(e.keyCode)&&this.handlePrintableKey(e)}},t.render=function(){var e,i=this,t=this.props,n=t.cssNamespace,r=t.displayMenu,u=t.id,o=t.minLength,a=t.name,s=t.placeholder,l=t.required,c=t.showAllValues,p=t.tNoResults,f=t.tStatusQueryTooShort,d=t.tStatusNoResults,h=t.tStatusSelectedOption,v=t.tStatusResults,m=t.tAssistiveHint,y=t.dropdownArrow,g=this.state,b=g.focused,O=g.hovered,w=g.menuOpen,x=g.options,_=g.query,S=g.selected,C=g.ariaHint,M=g.validChoiceMade,E=this.hasAutoselect(),I=-1===b,j=0===x.length,A=0!==_.length,P=_.length>=o,F=this.props.showNoOptionsFound&&I&&j&&A&&P,D=n+"__wrapper",R=n+"__input",k=null!==b?" "+R+"--focused":"",q=this.props.showAllValues?" "+R+"--show-all-values":" "+R+"--default",L=n+"__dropdown-arrow-down",N=-1!==b&&null!==b,B=n+"__menu",T=B+"--"+r,V=B+"--"+(w||F?"visible":"hidden"),U=n+"__option",K=n+"__hint",H=this.templateInputValue(x[S]),Q=H&&0===H.toLowerCase().indexOf(_.toLowerCase())&&E?_+H.substr(_.length):"",W=u+"__assistiveHint",z=C?{"aria-describedby":W}:null;return c&&"string"==typeof(e=y({className:L}))&&(e=(0,$.createElement)("div",{className:n+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,$.createElement)("div",{className:D,onKeyDown:this.handleKeyDown},(0,$.createElement)(J["default"],{id:u,length:x.length,queryLength:_.length,minQueryLength:o,selectedOption:this.templateInputValue(x[S]),selectedOptionIndex:S,validChoiceMade:M,isInFocus:null!==this.state.focused,tQueryTooShort:f,tNoResults:d,tSelectedOption:h,tResults:v}),Q&&(0,$.createElement)("span",null,(0,$.createElement)("input",{className:K,readonly:!0,tabIndex:"-1",value:Q})),(0,$.createElement)("input",X({"aria-expanded":w?"true":"false","aria-activedescendant":!!N&&u+"__option--"+b,"aria-owns":u+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},z,{autoComplete:"off",className:""+R+k+q,id:u,onClick:function(e){return i.handleInputClick(e)},onBlur:this.handleInputBlur},function G(e){return{onChange:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:a,placeholder:s,ref:function(e){i.elementReferences[-1]=e},type:"text",role:"combobox",required:l,value:_})),e,(0,$.createElement)("ul",{className:B+" "+T+" "+V,onMouseLeave:function(e){return i.handleListMouseLeave(e)},id:u+"__listbox",role:"listbox"},x.map(function(e,t){var n=(-1===b?S===t:b===t)&&null===O?" "+U+"--focused":"",r=t%2?" "+U+"--odd":"",o=Y()?"<span id="+u+"__option-suffix--"+t+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(t+1)+" of "+x.length+"</span>":"";return(0,$.createElement)("li",{"aria-selected":b===t?"true":"false",className:""+U+n+r,dangerouslySetInnerHTML:{__html:i.templateSuggestion(e)+o},id:u+"__option--"+t,key:t,onBlur:function(e){return i.handleOptionBlur(e,t)},onClick:function(e){return i.handleOptionClick(e,t)},onMouseDown:i.handleOptionMouseDown,onMouseEnter:function(e){return i.handleOptionMouseEnter(e,t)},ref:function(e){i.elementReferences[t]=e},role:"option",tabIndex:"-1","aria-posinset":t+1,"aria-setsize":x.length})}),F&&(0,$.createElement)("li",{className:U+" "+U+"--no-results"},p())),(0,$.createElement)("span",{id:W,style:{display:"none"}},m()))},e}($.Component);(t["default"]=a).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:r["default"]}},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(36)})},function(e,t,n){e.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(2);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var f=n(18),d=n(40),h=n(41),v=n(27),m=n(10),o=Object.assign;e.exports=!o||n(4)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||Object.keys(o({},t)).join("")!=r})?function(e,t){for(var n=v(e),r=arguments.length,o=1,i=d.f,u=h.f;o<r;)for(var a,s=m(arguments[o++]),l=i?f(s).concat(i(s)):f(s),c=l.length,p=0;p<c;)u.call(s,a=l[p++])&&(n[a]=s[a]);return n}:o},function(e,t,n){var u=n(15),a=n(19),s=n(21)(!1),l=n(24)("IE_PROTO");e.exports=function(e,t){var n,r=a(e),o=0,i=[];for(n in r)n!=l&&u(r,n)&&i.push(n);for(;t.length>o;)u(r,n=t[o++])&&(~s(i,n)||i.push(n));return i}},function(e,t,n){var r=n(23),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var o=r(8),i=r(43),u=r(26),a=r(24)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=r(13)("iframe"),n=u.length;for(t.style.display="none",r(44).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[l][u[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=o(e),n=new s,s[l]=null,n[a]=e):n=c(),t===undefined?n:i(n,t)}},function(e,t,n){var u=n(7),a=n(8),s=n(18);e.exports=n(3)?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=r.length,i=0;i<o;)u.f(e,n=r[i++],t[n]);return e}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(7).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(3)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(1),o=n(47)(1);r(r.P+r.F*!n(30)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var b=n(16),O=n(10),w=n(27),x=n(22),r=n(48);e.exports=function(p,e){var f=1==p,d=2==p,h=3==p,v=4==p,m=6==p,y=5==p||m,g=e||r;return function(e,t,n){for(var r,o,i=w(e),u=O(i),a=b(t,n,3),s=x(u.length),l=0,c=f?g(e,s):d?g(e,0):undefined;l<s;l++)if((y||l in u)&&(o=a(r=u[l],l,i),p))if(f)c[l]=o;else if(o)switch(p){case 3:return!0;case 5:return r;case 6:return l;case 2:c.push(r)}else if(v)return!1;return m?-1:h||v?v:c}}},function(e,t,n){var r=n(49);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(2),o=n(50),i=n(29)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=undefined),r(t)&&null===(t=t[i])&&(t=undefined)),t===undefined?Array:t}},function(e,t,n){var r=n(20);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(1),o=n(21)(!1),i=[].indexOf,u=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!n(30)(i)),"Array",{indexOf:function(e){return u?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(53)})},function(e,t,n){"use strict";var i=n(17),u=n(2),a=n(54),s=[].slice,l={};e.exports=Function.bind||function(t){var n=i(this),r=s.call(arguments,1),o=function(){var e=r.concat(s.call(arguments));return this instanceof o?function(e,t,n){if(!(t in l)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";l[t]=Function("F,a","return new F("+r.join(",")+")")}return l[t](e,n)}(n,e.length,e):a(n,e,t)};return u(n.prototype)&&(o.prototype=n.prototype),o}},function(e,t){e.exports=function(e,t,n){var r=n===undefined;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){n(56)("match",1,function(r,o,e){return[function(e){"use strict";var t=r(this),n=e==undefined?undefined:e[o];return n!==undefined?n.call(e,t):new RegExp(e)[o](String(t))},e]})},function(e,t,n){"use strict";var a=n(6),s=n(14),l=n(4),c=n(11),p=n(29);e.exports=function(t,e,n){var r=p(t),o=n(c,r,""[t]),i=o[0],u=o[1];l(function(){var e={};return e[r]=function(){return 7},7!=""[t](e)})&&(s(String.prototype,t,i),a(RegExp.prototype,r,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0,n(28);var b=n(12);var r=function r(o,i,u){var a;return function(){var e=this,t=arguments,n=function n(){a=null,u||o.apply(e,t)},r=u&&!a;clearTimeout(a),a=setTimeout(n,i),r&&o.apply(e,t)}},o=function(o){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))||this).state={bump:!1,debounced:!1},e}(function n(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t})(e,o);var t=e.prototype;return t.componentWillMount=function(){var e=this;this.debounceStatusUpdate=r(function(){if(!e.state.debounced){var t=!e.props.isInFocus||e.props.validChoiceMade;e.setState(function(e){return{bump:!e.bump,debounced:!0,silenced:t}})}},1400)},t.componentWillReceiveProps=function(e){e.queryLength;this.setState({debounced:!1})},t.render=function(){var e=this.props,t=e.id,n=e.length,r=e.queryLength,o=e.minQueryLength,i=e.selectedOption,u=e.selectedOptionIndex,a=e.tQueryTooShort,s=e.tNoResults,l=e.tSelectedOption,c=e.tResults,p=this.state,f=p.bump,d=p.debounced,h=p.silenced,v=r<o,m=0===n,y=i?l(i,n,u):"",g=null;return g=v?a(o):m?s():c(n,y),this.debounceStatusUpdate(),(0,b.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,b.createElement)("div",{id:t+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!h&&d&&f?g:""),(0,b.createElement)("div",{id:t+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},h||!d||f?"":g))},e}(b.Component);(t["default"]=o).defaultProps={tQueryTooShort:function(e){return"Type in "+e+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(e,t,n){return e+" "+(n+1)+" of "+t+" is highlighted"},tResults:function(e,t){return e+" "+(1===e?"result":"results")+" "+(1===e?"is":"are")+" available. "+t}}},function(e,t,n){"use strict";t.__esModule=!0,t["default"]=void 0;var r=n(12),o=function i(e){var t=e.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};t["default"]=o}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define("Autocomplete",["react"],e):"object"==typeof exports?exports.Autocomplete=e(require("react")):t.Autocomplete=e(t.React)}(this,(function(t){return function(){"use strict";var e={680:function(e){e.exports=t},8952:function(t,e,n){var r=n(4328),o=n(36),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},2096:function(t,e,n){var r=n(2424),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},4764:function(t,e,n){var r=n(9764).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},6100:function(t,e,n){var r=n(7e3),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new o("Incorrect invocation")}},3951:function(t,e,n){var r=n(1632),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},2504:function(t,e,n){var r=n(4096),o=n(2495),i=n(3556),u=function(t){return function(e,n,u){var a=r(e),c=i(a);if(0===c)return!t&&-1;var s,l=o(u,c);if(t&&n!=n){for(;c>l;)if((s=a[l++])!=s)return!0}else for(;c>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},3364:function(t,e,n){var r=n(8992),o=n(1664),i=n(5712),u=n(4356),a=n(3556),c=n(2568),s=o([].push),l=function(t){var e=1===t,n=2===t,o=3===t,l=4===t,f=6===t,p=7===t,h=5===t||f;return function(d,v,y,g){for(var m,b,x=u(d),w=i(x),O=a(w),S=r(v,y),E=0,I=g||c,j=e?I(d,O):n||p?I(d,0):void 0;O>E;E++)if((h||E in w)&&(b=S(m=w[E],E,x),t))if(e)j[E]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:s(j,m)}else switch(t){case 4:return!1;case 7:s(j,m)}return f?-1:o||l?l:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},953:function(t,e,n){var r=n(9957),o=n(9972),i=n(8504),u=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},1496:function(t,e,n){var r=n(9957);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},6728:function(t,e,n){var r=n(3476),o=n(1432),i=TypeError,u=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!u(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},6736:function(t,e,n){var r=n(1432),o=n(6072),i=n(1632),u=n(9972)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===a||r(e.prototype))||i(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?a:e}},2568:function(t,e,n){var r=n(6736);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},8696:function(t,e,n){var r=n(3951),o=n(3112);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(u){o(t,"throw",u)}}},1888:function(t,e,n){var r=n(1664),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},4427:function(t,e,n){var r=n(16),o=n(4328),i=n(1888),u=n(9972)("toStringTag"),a=Object,c="Arguments"===i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=a(t),u))?n:c?i(e):"Object"===(r=i(e))&&o(e.callee)?"Arguments":r}},9968:function(t,e,n){var r=n(5152),o=n(9252),i=n(9444),u=n(8352);t.exports=function(t,e,n){for(var a=o(e),c=u.f,s=i.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,s(e,f))}}},2272:function(t,e,n){var r=n(9957);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3336:function(t){t.exports=function(t,e){return{value:t,done:e}}},3440:function(t,e,n){var r=n(3476),o=n(8352),i=n(9728);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9728:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},92:function(t,e,n){var r=n(3476),o=n(8352),i=n(9728);t.exports=function(t,e,n){r?o.f(t,e,i(0,n)):t[e]=n}},2544:function(t,e,n){var r=n(5312),o=n(8352);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},6076:function(t,e,n){var r=n(4328),o=n(8352),i=n(5312),u=n(4636);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,s=void 0!==a.name?a.name:e;if(r(n)&&i(n,s,a),a.global)c?t[e]=n:u(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},4036:function(t,e,n){var r=n(6076);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},4636:function(t,e,n){var r=n(6420),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},3476:function(t,e,n){var r=n(9957);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8168:function(t,e,n){var r=n(6420),o=n(1632),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},4316:function(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6064:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},8504:function(t,e,n){var r,o,i=n(6420),u=n(6064),a=i.process,c=i.Deno,s=a&&a.versions||c&&c.version,l=s&&s.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},8256:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(t,e,n){var r=n(1664),o=Error,i=r("".replace),u=String(new o("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(u);t.exports=function(t,e){if(c&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,a,"");return t}},3696:function(t,e,n){var r=n(3440),o=n(6520),i=n(9184),u=Error.captureStackTrace;t.exports=function(t,e,n,a){i&&(u?u(t,e):r(t,"stack",o(n,a)))}},9184:function(t,e,n){var r=n(9957),o=n(9728);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},9160:function(t,e,n){var r=n(6420),o=n(9444).f,i=n(3440),u=n(6076),a=n(4636),c=n(9968),s=n(6704);t.exports=function(t,e){var n,l,f,p,h,d=t.target,v=t.global,y=t.stat;if(n=v?r:y?r[d]||a(d,{}):r[d]&&r[d].prototype)for(l in e){if(p=e[l],f=t.dontCallGetSet?(h=o(n,l))&&h.value:n[l],!s(v?l:d+(y?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),u(n,l,p,t)}}},9957:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},7176:function(t,e,n){n(880);var r=n(8448),o=n(6076),i=n(7680),u=n(9957),a=n(9972),c=n(3440),s=a("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var p=a(t),h=!u((function(){var e={};return e[p]=function(){return 7},7!==""[t](e)})),d=h&&!u((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!h||!d||n){var v=/./[p],y=e(p,""[t],(function(t,e,n,o,u){var a=e.exec;return a===i||a===l.exec?h&&!u?{done:!0,value:r(v,e,n,o)}:{done:!0,value:r(t,n,e,o)}:{done:!1}}));o(String.prototype,t,y[0]),o(l,p,y[1])}f&&c(l[p],"sham",!0)}},908:function(t,e,n){var r=n(7332),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?u.bind(i):function(){return u.apply(i,arguments)})},8992:function(t,e,n){var r=n(3180),o=n(8952),i=n(7332),u=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?u(t,e):function(){return t.apply(e,arguments)}}},7332:function(t,e,n){var r=n(9957);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8448:function(t,e,n){var r=n(7332),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6208:function(t,e,n){var r=n(3476),o=n(5152),i=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,s=a&&(!r||r&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:s}},5288:function(t,e,n){var r=n(1664),o=n(8952);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(i){}}},3180:function(t,e,n){var r=n(1888),o=n(1664);t.exports=function(t){if("Function"===r(t))return o(t)}},1664:function(t,e,n){var r=n(7332),o=Function.prototype,i=o.call,u=r&&o.bind.bind(i,i);t.exports=r?u:function(t){return function(){return i.apply(t,arguments)}}},5232:function(t,e,n){var r=n(6420),o=n(4328);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},6752:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},4504:function(t,e,n){var r=n(8952),o=n(9760);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},6420:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5152:function(t,e,n){var r=n(1664),o=n(4356),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},2560:function(t){t.exports={}},4168:function(t,e,n){var r=n(5232);t.exports=r("document","documentElement")},9888:function(t,e,n){var r=n(3476),o=n(9957),i=n(8168);t.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},5712:function(t,e,n){var r=n(1664),o=n(9957),i=n(1888),u=Object,a=r("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?a(t,""):u(t)}:u},7512:function(t,e,n){var r=n(4328),o=n(1632),i=n(4024);t.exports=function(t,e,n){var u,a;return i&&r(u=e.constructor)&&u!==n&&o(a=u.prototype)&&a!==n.prototype&&i(t,a),t}},9112:function(t,e,n){var r=n(1664),o=n(4328),i=n(3976),u=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},3480:function(t,e,n){var r=n(1632),o=n(3440);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},9104:function(t,e,n){var r,o,i,u=n(4288),a=n(6420),c=n(1632),s=n(3440),l=n(5152),f=n(3976),p=n(6504),h=n(2560),d="Object already initialized",v=a.TypeError,y=a.WeakMap;if(u||f.state){var g=f.state||(f.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(t,e){if(g.has(t))throw new v(d);return e.facade=t,g.set(t,e),e},o=function(t){return g.get(t)||{}},i=function(t){return g.has(t)}}else{var m=p("state");h[m]=!0,r=function(t,e){if(l(t,m))throw new v(d);return e.facade=t,s(t,m,e),e},o=function(t){return l(t,m)?t[m]:{}},i=function(t){return l(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},1432:function(t,e,n){var r=n(1888);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4328:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},6072:function(t,e,n){var r=n(1664),o=n(9957),i=n(4328),u=n(4427),a=n(5232),c=n(9112),s=function(){},l=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,p=r(f.exec),h=!f.test(s),d=function(t){if(!i(t))return!1;try{return l(s,[],t),!0}catch(e){return!1}},v=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(f,c(t))}catch(e){return!0}};v.sham=!0,t.exports=!l||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?v:d},6704:function(t,e,n){var r=n(9957),o=n(4328),i=/#|\.prototype\./,u=function(t,e){var n=c[a(t)];return n===l||n!==s&&(o(e)?r(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},s=u.NATIVE="N",l=u.POLYFILL="P";t.exports=u},9760:function(t){t.exports=function(t){return null==t}},1632:function(t,e,n){var r=n(4328);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},2424:function(t,e,n){var r=n(1632);t.exports=function(t){return r(t)||null===t}},7048:function(t){t.exports=!1},7728:function(t,e,n){var r=n(5232),o=n(4328),i=n(7e3),u=n(6536),a=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},3112:function(t,e,n){var r=n(8448),o=n(3951),i=n(4504);t.exports=function(t,e,n){var u,a;o(t);try{if(!(u=i(t,"return"))){if("throw"===e)throw n;return n}u=r(u,t)}catch(c){a=!0,u=c}if("throw"===e)throw n;if(a)throw u;return o(u),n}},9724:function(t,e,n){var r=n(8448),o=n(9368),i=n(3440),u=n(4036),a=n(9972),c=n(9104),s=n(4504),l=n(336).IteratorPrototype,f=n(3336),p=n(3112),h=a("toStringTag"),d="IteratorHelper",v="WrapForValidIterator",y=c.set,g=function(t){var e=c.getterFor(t?v:d);return u(o(l),{next:function(){var n=e(this);if(t)return n.nextHandler();try{var r=n.done?void 0:n.nextHandler();return f(r,n.done)}catch(o){throw n.done=!0,o}},return:function(){var n=e(this),o=n.iterator;if(n.done=!0,t){var i=s(o,"return");return i?r(i,o):f(void 0,!0)}if(n.inner)try{p(n.inner.iterator,"normal")}catch(u){return p(o,"throw",u)}return p(o,"normal"),f(void 0,!0)}})},m=g(!0),b=g(!1);i(b,h,"Iterator Helper"),t.exports=function(t,e){var n=function(n,r){r?(r.iterator=n.iterator,r.next=n.next):r=n,r.type=e?v:d,r.nextHandler=t,r.counter=0,r.done=!1,y(this,r)};return n.prototype=e?m:b,n}},5792:function(t,e,n){var r=n(8448),o=n(8952),i=n(3951),u=n(6752),a=n(9724),c=n(8696),s=a((function(){var t=this.iterator,e=i(r(this.next,t));if(!(this.done=!!e.done))return c(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return i(this),o(t),new s(u(this),{mapper:t})}},336:function(t,e,n){var r,o,i,u=n(9957),a=n(4328),c=n(1632),s=n(9368),l=n(7796),f=n(6076),p=n(9972),h=n(7048),d=p("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):v=!0),!c(r)||u((function(){var t={};return r[d].call(t)!==t}))?r={}:h&&(r=s(r)),a(r[d])||f(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},3556:function(t,e,n){var r=n(7584);t.exports=function(t){return r(t.length)}},5312:function(t,e,n){var r=n(1664),o=n(9957),i=n(4328),u=n(5152),a=n(3476),c=n(6208).CONFIGURABLE,s=n(9112),l=n(9104),f=l.enforce,p=l.get,h=String,d=Object.defineProperty,v=r("".slice),y=r("".replace),g=r([].join),m=a&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===v(h(e),0,7)&&(e="["+y(h(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!u(t,"name")||c&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&u(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&u(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=f(t);return u(r,"source")||(r.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return i(this)&&p(this).source||s(this)}),"toString")},1748:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},8948:function(t,e,n){var r=n(5016);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},9292:function(t,e,n){var r=n(3476),o=n(1664),i=n(8448),u=n(9957),a=n(1531),c=n(9392),s=n(8912),l=n(4356),f=n(5712),p=Object.assign,h=Object.defineProperty,d=o([].concat);t.exports=!p||u((function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!==p({},t)[n]||a(p({},e)).join("")!==o}))?function(t,e){for(var n=l(t),o=arguments.length,u=1,p=c.f,h=s.f;o>u;)for(var v,y=f(arguments[u++]),g=p?d(a(y),p(y)):a(y),m=g.length,b=0;m>b;)v=g[b++],r&&!i(h,y,v)||(n[v]=y[v]);return n}:p},9368:function(t,e,n){var r,o=n(3951),i=n(2056),u=n(8256),a=n(2560),c=n(4168),s=n(8168),l=n(6504),f="prototype",p="script",h=l("IE_PROTO"),d=function(){},v=function(t){return"<"+p+">"+t+"</"+p+">"},y=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;g="undefined"!=typeof document?document.domain&&r?y(r):(e=s("iframe"),n="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):y(r);for(var o=u.length;o--;)delete g[f][u[o]];return g()};a[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[f]=o(t),n=new d,d[f]=null,n[h]=t):n=g(),void 0===e?n:i.f(n,e)}},2056:function(t,e,n){var r=n(3476),o=n(1576),i=n(8352),u=n(3951),a=n(4096),c=n(1531);e.f=r&&!o?Object.defineProperties:function(t,e){u(t);for(var n,r=a(e),o=c(e),s=o.length,l=0;s>l;)i.f(t,n=o[l++],r[n]);return t}},8352:function(t,e,n){var r=n(3476),o=n(9888),i=n(1576),u=n(3951),a=n(88),c=TypeError,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",h="writable";e.f=r?i?function(t,e,n){if(u(t),e=a(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var r=l(t,e);r&&r[h]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:f in n?n[f]:r[f],writable:!1})}return s(t,e,n)}:s:function(t,e,n){if(u(t),e=a(e),u(n),o)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9444:function(t,e,n){var r=n(3476),o=n(8448),i=n(8912),u=n(9728),a=n(4096),c=n(88),s=n(5152),l=n(9888),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(n){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},5048:function(t,e,n){var r=n(9008),o=n(8256).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},9392:function(t,e){e.f=Object.getOwnPropertySymbols},7796:function(t,e,n){var r=n(5152),o=n(4328),i=n(4356),u=n(6504),a=n(2272),c=u("IE_PROTO"),s=Object,l=s.prototype;t.exports=a?s.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof s?l:null}},7e3:function(t,e,n){var r=n(1664);t.exports=r({}.isPrototypeOf)},9008:function(t,e,n){var r=n(1664),o=n(5152),i=n(4096),u=n(2504).indexOf,a=n(2560),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~u(l,n)||c(l,n));return l}},1531:function(t,e,n){var r=n(9008),o=n(8256);t.exports=Object.keys||function(t){return r(t,o)}},8912:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},4024:function(t,e,n){var r=n(5288),o=n(3951),i=n(2096);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(u){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},7032:function(t,e,n){var r=n(16),o=n(4427);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2104:function(t,e,n){var r=n(8448),o=n(4328),i=n(1632),u=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw new u("Can't convert object to primitive value")}},9252:function(t,e,n){var r=n(5232),o=n(1664),i=n(5048),u=n(9392),a=n(3951),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=u.f;return n?c(e,n(t)):e}},584:function(t,e,n){var r=n(8352).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},9092:function(t,e,n){var r=n(8448),o=n(3951),i=n(4328),u=n(1888),a=n(7680),c=TypeError;t.exports=function(t,e){var n=t.exec;if(i(n)){var s=r(n,t,e);return null!==s&&o(s),s}if("RegExp"===u(t))return r(a,t,e);throw new c("RegExp#exec called on incompatible receiver")}},7680:function(t,e,n){var r,o,i=n(8448),u=n(1664),a=n(5016),c=n(8872),s=n(3548),l=n(4696),f=n(9368),p=n(9104).get,h=n(8e3),d=n(9124),v=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,m=u("".charAt),b=u("".indexOf),x=u("".replace),w=u("".slice),O=(o=/b*/g,i(y,r=/a/,"a"),i(y,o,"a"),0!==r.lastIndex||0!==o.lastIndex),S=s.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(O||E||S||h||d)&&(g=function(t){var e,n,r,o,u,s,l,h=this,d=p(h),I=a(t),j=d.raw;if(j)return j.lastIndex=h.lastIndex,e=i(g,j,I),h.lastIndex=j.lastIndex,e;var C=d.groups,_=S&&h.sticky,A=i(c,h),P=h.source,R=0,T=I;if(_&&(A=x(A,"y",""),-1===b(A,"g")&&(A+="g"),T=w(I,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==m(I,h.lastIndex-1))&&(P="(?: "+P+")",T=" "+T,R++),n=new RegExp("^(?:"+P+")",A)),E&&(n=new RegExp("^"+P+"$(?!\\s)",A)),O&&(r=h.lastIndex),o=i(y,_?n:h,T),_?o?(o.input=w(o.input,R),o[0]=w(o[0],R),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:O&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),E&&o&&o.length>1&&i(v,o[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&C)for(o.groups=s=f(null),u=0;u<C.length;u++)s[(l=C[u])[0]]=o[l[1]];return o}),t.exports=g},8872:function(t,e,n){var r=n(3951);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},3548:function(t,e,n){var r=n(9957),o=n(6420).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),u=i||r((function(){return!o("a","y").sticky})),a=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:u,UNSUPPORTED_Y:i}},8e3:function(t,e,n){var r=n(9957),o=n(6420).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},9124:function(t,e,n){var r=n(9957),o=n(6420).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},5436:function(t,e,n){var r=n(9760),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},6504:function(t,e,n){var r=n(4696),o=n(7776),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},3976:function(t,e,n){var r=n(7048),o=n(6420),i=n(4636),u="__core-js_shared__",a=t.exports=o[u]||i(u,{});(a.versions||(a.versions=[])).push({version:"3.36.0",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(t,e,n){var r=n(3976);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},9764:function(t,e,n){var r=n(1664),o=n(6180),i=n(5016),u=n(5436),a=r("".charAt),c=r("".charCodeAt),s=r("".slice),l=function(t){return function(e,n){var r,l,f=i(u(e)),p=o(n),h=f.length;return p<0||p>=h?t?"":void 0:(r=c(f,p))<55296||r>56319||p+1===h||(l=c(f,p+1))<56320||l>57343?t?a(f,p):r:t?s(f,p,p+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},772:function(t,e,n){var r=n(8504),o=n(9957),i=n(6420).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},2495:function(t,e,n){var r=n(6180),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4096:function(t,e,n){var r=n(5712),o=n(5436);t.exports=function(t){return r(o(t))}},6180:function(t,e,n){var r=n(1748);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7584:function(t,e,n){var r=n(6180),o=Math.min;t.exports=function(t){var e=r(t);return e>0?o(e,9007199254740991):0}},4356:function(t,e,n){var r=n(5436),o=Object;t.exports=function(t){return o(r(t))}},7024:function(t,e,n){var r=n(8448),o=n(1632),i=n(7728),u=n(4504),a=n(2104),c=n(9972),s=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=u(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new s("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},88:function(t,e,n){var r=n(7024),o=n(7728);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},16:function(t,e,n){var r={};r[n(9972)("toStringTag")]="z",t.exports="[object z]"===String(r)},5016:function(t,e,n){var r=n(4427),o=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},36:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},7776:function(t,e,n){var r=n(1664),o=0,i=Math.random(),u=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},6536:function(t,e,n){var r=n(772);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1576:function(t,e,n){var r=n(3476),o=n(9957);t.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4288:function(t,e,n){var r=n(6420),o=n(4328),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},9972:function(t,e,n){var r=n(6420),o=n(4696),i=n(5152),u=n(7776),a=n(772),c=n(6536),s=r.Symbol,l=o("wks"),f=c?s.for||s:s&&s.withoutSetter||u;t.exports=function(t){return i(l,t)||(l[t]=a&&i(s,t)?s[t]:f("Symbol."+t)),l[t]}},6488:function(t,e,n){var r=n(5232),o=n(5152),i=n(3440),u=n(7e3),a=n(4024),c=n(9968),s=n(584),l=n(7512),f=n(8948),p=n(3480),h=n(3696),d=n(3476),v=n(7048);t.exports=function(t,e,n,y){var g="stackTraceLimit",m=y?2:1,b=t.split("."),x=b[b.length-1],w=r.apply(null,b);if(w){var O=w.prototype;if(!v&&o(O,"cause")&&delete O.cause,!n)return w;var S=r("Error"),E=e((function(t,e){var n=f(y?e:t,void 0),r=y?new w(t):new w;return void 0!==n&&i(r,"message",n),h(r,E,r.stack,2),this&&u(O,this)&&l(r,this,E),arguments.length>m&&p(r,arguments[m]),r}));if(E.prototype=O,"Error"!==x?a?a(E,S):c(E,S,{name:!0}):d&&g in w&&(s(E,w,g),s(E,w,"prepareStackTrace")),c(E,w),!v)try{O.name!==x&&i(O,"name",x),O.constructor=E}catch(I){}return E}}},7476:function(t,e,n){var r=n(9160),o=n(9957),i=n(1432),u=n(1632),a=n(4356),c=n(3556),s=n(4316),l=n(92),f=n(2568),p=n(953),h=n(9972),d=n(8504),v=h("isConcatSpreadable"),y=d>=51||!o((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),g=function(t){if(!u(t))return!1;var e=t[v];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,arity:1,forced:!y||!p("concat")},{concat:function(t){var e,n,r,o,i,u=a(this),p=f(u,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(g(i=-1===e?u:arguments[e]))for(o=c(i),s(h+o),n=0;n<o;n++,h++)n in i&&l(p,h,i[n]);else s(h+1),l(p,h++,i);return p.length=h,p}})},6932:function(t,e,n){var r=n(9160),o=n(3364).filter;r({target:"Array",proto:!0,forced:!n(953)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},700:function(t,e,n){var r=n(9160),o=n(1664),i=n(5712),u=n(4096),a=n(1496),c=o([].join);r({target:"Array",proto:!0,forced:i!==Object||!a("join",",")},{join:function(t){return c(u(this),void 0===t?",":t)}})},4456:function(t,e,n){var r=n(9160),o=n(3364).map;r({target:"Array",proto:!0,forced:!n(953)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4728:function(t,e,n){var r=n(9160),o=n(4356),i=n(3556),u=n(6728),a=n(4316);r({target:"Array",proto:!0,arity:1,forced:n(9957)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=o(this),n=i(e),r=arguments.length;a(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return u(e,n),n}})},8752:function(t,e,n){var r=n(9160),o=n(6420),i=n(908),u=n(6488),a="WebAssembly",c=o[a],s=7!==new Error("e",{cause:7}).cause,l=function(t,e){var n={};n[t]=u(t,e,s),r({global:!0,constructor:!0,arity:1,forced:s},n)},f=function(t,e){if(c&&c[t]){var n={};n[t]=u(a+"."+t,e,s),r({target:a,stat:!0,constructor:!0,arity:1,forced:s},n)}};l("Error",(function(t){return function(e){return i(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),l("URIError",(function(t){return function(e){return i(t,this,arguments)}})),f("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),f("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),f("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},508:function(t,e,n){var r=n(3476),o=n(6208).EXISTS,i=n(1664),u=n(2544),a=Function.prototype,c=i(a.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&u(a,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},232:function(t,e,n){var r=n(9160),o=n(9292);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},5443:function(t,e,n){var r=n(16),o=n(6076),i=n(7032);r||o(Object.prototype,"toString",i,{unsafe:!0})},880:function(t,e,n){var r=n(9160),o=n(7680);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},9836:function(t,e,n){var r=n(8448),o=n(7176),i=n(3951),u=n(9760),a=n(7584),c=n(5016),s=n(5436),l=n(4504),f=n(4764),p=n(9092);o("match",(function(t,e,n){return[function(e){var n=s(this),o=u(e)?void 0:l(e,t);return o?r(o,e,n):new RegExp(e)[t](c(n))},function(t){var r=i(this),o=c(t),u=n(e,r,o);if(u.done)return u.value;if(!r.global)return p(r,o);var s=r.unicode;r.lastIndex=0;for(var l,h=[],d=0;null!==(l=p(r,o));){var v=c(l[0]);h[d]=v,""===v&&(r.lastIndex=f(o,a(r.lastIndex),s)),d++}return 0===d?null:h}]}))},3536:function(t,e,n){var r=n(9160),o=n(6420),i=n(6100),u=n(3951),a=n(4328),c=n(7796),s=n(2544),l=n(92),f=n(9957),p=n(5152),h=n(9972),d=n(336).IteratorPrototype,v=n(3476),y=n(7048),g="constructor",m="Iterator",b=h("toStringTag"),x=TypeError,w=o[m],O=y||!a(w)||w.prototype!==d||!f((function(){w({})})),S=function(){if(i(this,d),c(this)===d)throw new x("Abstract class Iterator not directly constructable")},E=function(t,e){v?s(d,t,{configurable:!0,get:function(){return e},set:function(e){if(u(this),this===d)throw new x("You can't redefine this property");p(this,t)?this[t]=e:l(this,t,e)}}):d[t]=e};p(d,b)||E(b,m),!O&&p(d,g)&&d[g]!==Object||E(g,S),S.prototype=d,r({global:!0,constructor:!0,forced:O},{Iterator:S})},2144:function(t,e,n){var r=n(9160),o=n(8448),i=n(8952),u=n(3951),a=n(6752),c=n(9724),s=n(8696),l=n(7048),f=c((function(){for(var t,e,n=this.iterator,r=this.predicate,i=this.next;;){if(t=u(o(i,n)),this.done=!!t.done)return;if(e=t.value,s(n,r,[e,this.counter++],!0))return e}}));r({target:"Iterator",proto:!0,real:!0,forced:l},{filter:function(t){return u(this),i(t),new f(a(this),{predicate:t})}})},9080:function(t,e,n){var r=n(9160),o=n(5792);r({target:"Iterator",proto:!0,real:!0,forced:n(7048)},{map:o})}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,r),i.exports}r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){r.r(o),r.d(o,{default:function(){return f}});r(8752),r(6932),r(700),r(4456),r(4728),r(508),r(232),r(5443),r(880),r(9836),r(3536),r(2144),r(9080);var t=r(680);r(7476);function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}var n=function(n){var r,o;function i(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=n.call.apply(n,[this].concat(r))||this).state={bump:!1,debounced:!1},t}o=n,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,e(r,o);var u=i.prototype;return u.componentWillMount=function(){var t,e,n,r,o=this;this.debounceStatusUpdate=(t=function(){if(!o.state.debounced){var t=!o.props.isInFocus||o.props.validChoiceMade;o.setState((function(e){return{bump:!e.bump,debounced:!0,silenced:t}}))}},e=1400,function(){var o=this,i=arguments,u=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(o,i)}),e),u&&t.apply(o,i)})},u.componentWillReceiveProps=function(t){t.queryLength;this.setState({debounced:!1})},u.render=function(){var e=this.props,n=e.id,r=e.length,o=e.queryLength,i=e.minQueryLength,u=e.selectedOption,a=e.selectedOptionIndex,c=e.tQueryTooShort,s=e.tNoResults,l=e.tSelectedOption,f=e.tResults,p=e.className,h=this.state,d=h.bump,v=h.debounced,y=h.silenced,g=o<i,m=0===r,b=u?l(u,r,a):"",x=null;return x=g?c(i):m?s():f(r,b),this.debounceStatusUpdate(),(0,t.createElement)("div",{className:p,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,t.createElement)("div",{id:n+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!y&&v&&d?x:""),(0,t.createElement)("div",{id:n+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},y||!v||d?"":x))},i}(t.Component);n.defaultProps={tQueryTooShort:function(t){return"Type in "+t+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(t,e,n){return t+" "+(n+1)+" of "+e+" is highlighted"},tResults:function(t,e){return t+" "+(1===t?"result":"results")+" "+(1===t?"is":"are")+" available. "+e}};var i=function(e){var n=e.className;return(0,t.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:n,focusable:"false"},(0,t.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,t.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u.apply(this,arguments)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}var s={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function l(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(e){var r,o;function i(t){var n;return(n=e.call(this,t)||this).elementReferences={},n.state={focused:null,hovered:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},n.handleComponentBlur=n.handleComponentBlur.bind(a(n)),n.handleKeyDown=n.handleKeyDown.bind(a(n)),n.handleUpArrow=n.handleUpArrow.bind(a(n)),n.handleDownArrow=n.handleDownArrow.bind(a(n)),n.handleEnter=n.handleEnter.bind(a(n)),n.handlePrintableKey=n.handlePrintableKey.bind(a(n)),n.handleListMouseLeave=n.handleListMouseLeave.bind(a(n)),n.handleOptionBlur=n.handleOptionBlur.bind(a(n)),n.handleOptionClick=n.handleOptionClick.bind(a(n)),n.handleOptionFocus=n.handleOptionFocus.bind(a(n)),n.handleOptionMouseDown=n.handleOptionMouseDown.bind(a(n)),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(a(n)),n.handleInputBlur=n.handleInputBlur.bind(a(n)),n.handleInputChange=n.handleInputChange.bind(a(n)),n.handleInputClick=n.handleInputClick.bind(a(n)),n.handleInputFocus=n.handleInputFocus.bind(a(n)),n.pollInputElement=n.pollInputElement.bind(a(n)),n.getDirectInputChanges=n.getDirectInputChanges.bind(a(n)),n}o=e,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,c(r,o);var f=i.prototype;return f.isQueryAnOption=function(t,e){var n=this;return-1!==e.map((function(t){return n.templateInputValue(t).toLowerCase()})).indexOf(t.toLowerCase())},f.componentDidMount=function(){this.pollInputElement()},f.componentWillUnmount=function(){clearTimeout(this.$pollInput)},f.pollInputElement=function(){var t=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){t.pollInputElement()}),100)},f.getDirectInputChanges=function(){var t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})},f.componentDidUpdate=function(t,e){var n=this.state.focused,r=null===n,o=e.focused!==n;o&&!r&&this.elementReferences[n].focus();var i=-1===n,u=o&&null===e.focused;if(i&&u){var a=this.elementReferences[n];a.setSelectionRange(0,a.value.length)}},f.hasAutoselect=function(){return!l()&&this.props.autoselect},f.templateInputValue=function(t){var e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t},f.templateSuggestion=function(t){var e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t},f.handleComponentBlur=function(t){var e,n=this.state,r=n.options,o=n.query,i=n.selected;this.props.confirmOnBlur?(e=t.query||o,this.props.onConfirm(r[i])):e=o,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:e,selected:null,validChoiceMade:this.isQueryAnOption(e,r)})},f.handleListMouseLeave=function(t){this.setState({hovered:null})},f.handleOptionBlur=function(t,e){var n=this.state,r=n.focused,o=n.menuOpen,i=n.options,u=n.selected,a=null===t.relatedTarget,c=t.relatedTarget===this.elementReferences[-1],s=r!==e&&-1!==r;if(!s&&a||!(s||c)){var f=o&&l();this.handleComponentBlur({menuOpen:f,query:this.templateInputValue(i[u])})}},f.handleInputBlur=function(t){var e=this.state,n=e.focused,r=e.menuOpen,o=e.options,i=e.query,u=e.selected;if(!(-1!==n)){var a=r&&l(),c=l()?i:this.templateInputValue(o[u]);this.handleComponentBlur({menuOpen:a,query:c})}},f.handleInputChange=function(t){var e=this,n=this.props,r=n.minLength,o=n.source,i=n.showAllValues,u=this.hasAutoselect(),a=t.target.value,c=0===a.length,s=this.state.query!==a,l=a.length>=r;this.setState({query:a,ariaHint:c}),i||!c&&s&&l?o(a,(function(t){var n=t.length>0;e.setState({menuOpen:n,options:t,selected:u&&n?0:-1,validChoiceMade:!1})})):!c&&l||this.setState({menuOpen:!1,options:[]})},f.handleInputClick=function(t){this.handleInputChange(t)},f.handleInputFocus=function(t){var e=this.state,n=e.query,r=e.validChoiceMade,o=e.options,i=this.props.minLength,u=!r&&n.length>=i&&o.length>0;u?this.setState((function(t){var e=t.menuOpen;return{focused:-1,menuOpen:u||e,selected:-1}})):this.setState({focused:-1})},f.handleOptionFocus=function(t){this.setState({focused:t,hovered:null,selected:t})},f.handleOptionMouseEnter=function(t,e){l()||this.setState({hovered:e})},f.handleOptionClick=function(t,e){var n=this.state.options[e],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},f.handleOptionMouseDown=function(t){t.preventDefault()},f.handleUpArrow=function(t){t.preventDefault();var e=this.state,n=e.menuOpen,r=e.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},f.handleDownArrow=function(t){var e=this;if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,i=n.selected;i!==o.length-1&&r&&this.handleOptionFocus(i+1)}},f.handleSpace=function(t){var e=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))},f.handleEnter=function(t){this.state.menuOpen&&(t.preventDefault(),this.state.selected>=0&&this.handleOptionClick(t,this.state.selected))},f.handlePrintableKey=function(t){var e=this.elementReferences[-1];t.target===e||e.focus()},f.handleKeyDown=function(t){switch(s[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((e=t.keyCode)>47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223)&&this.handlePrintableKey(t)}var e},f.render=function(){var e,r=this,o=this.props,i=o.cssNamespace,a=o.displayMenu,c=o.id,s=o.minLength,f=o.name,p=o.placeholder,h=o.required,d=o.showAllValues,v=o.tNoResults,y=o.tStatusQueryTooShort,g=o.tStatusNoResults,m=o.tStatusSelectedOption,b=o.tStatusResults,x=o.tAssistiveHint,w=o.dropdownArrow,O=o.menuAttributes,S=o.inputClasses,E=o.hintClasses,I=o.menuClasses,j=this.state,C=j.focused,_=j.hovered,A=j.menuOpen,P=j.options,R=j.query,T=j.selected,k=j.ariaHint,M=j.validChoiceMade,D=this.hasAutoselect(),N=-1===C,F=0===P.length,L=0!==R.length,B=R.length>=s,q=this.props.showNoOptionsFound&&N&&F&&L&&B,V=i+"__wrapper",U=i+"__status",K=i+"__dropdown-arrow-down",H=-1!==C&&null!==C,W=i+"__option",z=i+"__hint",Q=this.templateInputValue(P[T]),G=Q&&0===Q.toLowerCase().indexOf(R.toLowerCase())&&D?R+Q.substr(R.length):"",$=c+"__assistiveHint",Y={"aria-describedby":k?$:null,"aria-expanded":A?"true":"false","aria-activedescendant":H?c+"__option--"+C:null,"aria-owns":c+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};d&&"string"==typeof(e=w({className:K}))&&(e=(0,t.createElement)("div",{className:i+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}}));var X=i+"__input",J=[X,this.props.showAllValues?X+"--show-all-values":X+"--default"];null!==C&&J.push(X+"--focused"),S&&J.push(S);var Z=i+"__menu",tt=[Z,Z+"--"+a,Z+"--"+(A||q?"visible":"hidden")];I&&tt.push(I),(null!=O&&O.class||null!=O&&O.className)&&tt.push((null==O?void 0:O.class)||(null==O?void 0:O.className));var et=Object.assign({},O,{id:c+"__listbox",role:"listbox",className:tt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete et.class,(0,t.createElement)("div",{className:V,onKeyDown:this.handleKeyDown},(0,t.createElement)(n,{id:c,length:P.length,queryLength:R.length,minQueryLength:s,selectedOption:this.templateInputValue(P[T]),selectedOptionIndex:T,validChoiceMade:M,isInFocus:null!==this.state.focused,tQueryTooShort:y,tNoResults:g,tSelectedOption:m,tResults:b,className:U}),G&&(0,t.createElement)("span",null,(0,t.createElement)("input",{className:[z,null===E?S:E].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:G})),(0,t.createElement)("input",u({},Y,{autoComplete:"off",className:J.join(" "),id:c,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:f,placeholder:p,ref:function(t){r.elementReferences[-1]=t},type:"text",role:"combobox",required:h,value:R})),e,(0,t.createElement)("ul",et,P.map((function(e,n){var o=(-1===C?T===n:C===n)&&null===_?" "+W+"--focused":"",i=n%2?" "+W+"--odd":"",u=l()?"<span id="+c+"__option-suffix--"+n+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(n+1)+" of "+P.length+"</span>":"";return(0,t.createElement)("li",{"aria-selected":C===n?"true":"false",className:""+W+o+i,dangerouslySetInnerHTML:{__html:r.templateSuggestion(e)+u},id:c+"__option--"+n,key:n,onBlur:function(t){return r.handleOptionBlur(t,n)},onClick:function(t){return r.handleOptionClick(t,n)},onMouseDown:r.handleOptionMouseDown,onMouseEnter:function(t){return r.handleOptionMouseEnter(t,n)},ref:function(t){r.elementReferences[n]=t},role:"option",tabIndex:"-1","aria-posinset":n+1,"aria-setsize":P.length})})),q&&(0,t.createElement)("li",{className:W+" "+W+"--no-results"},v())),(0,t.createElement)("span",{id:$,style:{display:"none"}},x()))},i}(t.Component);f.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:i,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}}(),o}()})); | ||
//# sourceMappingURL=accessible-autocomplete.react.min.js.map |
135
package.json
{ | ||
"name": "accessible-autocomplete", | ||
"version": "2.0.4", | ||
"version": "3.0.0", | ||
"main": "dist/accessible-autocomplete.min.js", | ||
@@ -20,86 +20,75 @@ "style": "dist/accessible-autocomplete.min.css", | ||
"scripts": { | ||
"build:css": "csso src/autocomplete.css -o dist/accessible-autocomplete.min.css", | ||
"build:js": "cross-env NODE_ENV=production webpack --progress --display-modules", | ||
"build": "run-s 'build:js' 'build:css'", | ||
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress", | ||
"build": "cross-env NODE_ENV=production webpack --progress", | ||
"dev": "cross-env NODE_ENV=development webpack serve", | ||
"karma:dev": "cross-env NODE_ENV=test karma start test/karma.config.js", | ||
"karma": "npm run karma:dev -- --single-run", | ||
"prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module", | ||
"preversion": "npm test", | ||
"standard": "standard", | ||
"pretest": "npm run build", | ||
"test": "run-p standard karma wdio", | ||
"version": "npm run build && git add -A dist", | ||
"wdio:test": "cross-env NODE_ENV=test wdio test/wdio.config.js", | ||
"wdio": "npm run build wdio:test && git checkout dist/" | ||
"version": "git add -A dist", | ||
"wdio": "cross-env NODE_ENV=test wdio test/wdio.config.js" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "npm run build && node scripts/check-staged.js" | ||
} | ||
}, | ||
"dependencies": { | ||
"preact": "^8.3.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.1.5", | ||
"@babel/plugin-proposal-class-properties": "^7.1.0", | ||
"@babel/plugin-proposal-decorators": "^7.1.2", | ||
"@babel/plugin-transform-member-expression-literals": "^7.0.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.1.0", | ||
"@babel/plugin-transform-property-literals": "^7.0.0", | ||
"@babel/plugin-transform-react-jsx": "^7.0.0", | ||
"@babel/preset-env": "^7.1.5", | ||
"@babel/register": "^7.0.0", | ||
"@wdio/cli": "^7.16.13", | ||
"@wdio/local-runner": "^7.16.13", | ||
"@wdio/mocha-framework": "^7.16.13", | ||
"@wdio/sauce-service": "^7.16.13", | ||
"@wdio/selenium-standalone-service": "^7.16.13", | ||
"@wdio/spec-reporter": "^7.16.13", | ||
"@wdio/static-server-service": "^7.16.13", | ||
"@wdio/sync": "^7.16.13", | ||
"babel-eslint": "^10.0.1", | ||
"babel-loader": "^8.2.3", | ||
"babel-plugin-istanbul": "^5.1.0", | ||
"chai": "^4.2.0", | ||
"chalk": "^2.4.1", | ||
"copy-webpack-plugin": "^6.4.1", | ||
"cross-env": "^5.2.0", | ||
"csso-cli": "^3.0.0", | ||
"dotenv": "^6.1.0", | ||
"husky": "^1.1.3", | ||
"karma": "^6.3.9", | ||
"karma-chai": "^0.1.0", | ||
"karma-chai-sinon": "^0.1.5", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-mocha": "^1.0.1", | ||
"@babel/core": "^7.23.9", | ||
"@babel/eslint-parser": "^7.23.10", | ||
"@babel/plugin-transform-react-jsx": "^7.23.4", | ||
"@babel/preset-env": "^7.23.9", | ||
"@babel/register": "^7.23.7", | ||
"@wdio/cli": "^8.32.3", | ||
"@wdio/globals": "^8.32.3", | ||
"@wdio/local-runner": "^8.32.3", | ||
"@wdio/mocha-framework": "^8.32.3", | ||
"@wdio/sauce-service": "^8.32.3", | ||
"@wdio/spec-reporter": "^8.32.2", | ||
"@wdio/static-server-service": "^8.32.2", | ||
"autoprefixer": "^10.4.17", | ||
"babel-loader": "^9.1.3", | ||
"babel-plugin-istanbul": "^6.1.1", | ||
"chai": "^5.1.0", | ||
"chalk": "^5.3.0", | ||
"core-js": "^3.36.0", | ||
"cross-env": "^7.0.3", | ||
"css-loader": "^6.10.0", | ||
"cssnano": "^6.0.3", | ||
"cssnano-preset-default": "^6.0.3", | ||
"devtools": "^8.32.3", | ||
"dotenv": "^16.4.4", | ||
"husky": "^9.0.11", | ||
"karma": "^6.4.2", | ||
"karma-chrome-launcher": "^3.2.0", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^4.0.2", | ||
"mocha": "^5.2.0", | ||
"karma-sourcemap-loader": "^0.4.0", | ||
"karma-webpack": "^5.0.1", | ||
"mini-css-extract-plugin": "^2.8.0", | ||
"mocha": "^10.3.0", | ||
"npm-run-all": "^4.1.5", | ||
"puppeteer": "^13.0.1", | ||
"replace-bundle-webpack-plugin": "^1.0.0", | ||
"sinon": "^6.3.5", | ||
"sinon-chai": "^3.2.0", | ||
"source-map-loader": "^1.1.3", | ||
"standard": "^12.0.1", | ||
"uglifyjs-webpack-plugin": "^2.0.1", | ||
"webdriverio": "^7.16.13", | ||
"webpack": "^4.46.0", | ||
"webpack-cli": "^3.3.12", | ||
"webpack-dev-server": "^3.11.3" | ||
"postcss": "^8.4.35", | ||
"postcss-loader": "^8.1.0", | ||
"preact": "^8.5.3", | ||
"puppeteer": "^22.2.0", | ||
"source-map-loader": "^5.0.0", | ||
"standard": "^17.1.0", | ||
"terser-webpack-plugin": "^5.3.9", | ||
"webdriverio": "^8.28.6", | ||
"webpack": "^5.90.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^5.0.1" | ||
}, | ||
"browserslist": [ | ||
">0.1%", | ||
"last 2 Chrome versions", | ||
"last 2 Firefox versions", | ||
"last 2 Edge versions", | ||
"last 2 Samsung versions", | ||
"Safari >= 9", | ||
"ie 8-11", | ||
"iOS >= 9" | ||
], | ||
"peerDependencies": { | ||
"preact": "^8.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"preact": { | ||
"optional": true | ||
} | ||
}, | ||
"standard": { | ||
"parser": "babel-eslint" | ||
"ignore": [ | ||
"dist" | ||
], | ||
"parser": "@babel/eslint-parser" | ||
} | ||
} |
@@ -94,2 +94,6 @@ # Accessible autocomplete | ||
> [!NOTE] | ||
> | ||
> When styling the `.autocomplete__input` element, be aware that the `autoselect` option will render a second `.autocomplete__hint` input element for suggestion text. Both elements should be styled to ensure suggestions exactly align with the typed input text. | ||
### Using with Preact | ||
@@ -111,2 +115,10 @@ | ||
#### Preact versions | ||
Preact v8.5.3 has been tested to work with the Accessible Autocomplete - although make sure to check out [documented issues](https://github.com/alphagov/accessible-autocomplete/issues). | ||
Preact 10.19.6 has been incompletely tested with the Accessible Autocomplete. No issues were found in Chrome and Firefox, but our automated tests for picking an option using the keyboard failed in Internet Explorer 11 (an issue we could not replicate when testing manually, though). | ||
We recommend you carry out thorough testing if you wish to use this or later versions of Preact. | ||
### Using with React | ||
@@ -134,4 +146,6 @@ | ||
React v15.6.2 and 16.0 have been incompletely tested with the Accessible Autocomplete: while no undocumented issues were found, we recommend you carry out thorough testing if you wish to use these or later versions of React. | ||
React v15.6.2, v16.14.0, v17.0.2, and v18.2.0 have been incompletely tested with the Accessible Autocomplete. No undocumented issues were found (though be aware that [React 18 dropped support for Internet Explorer](https://react.dev/blog/2022/03/08/react-18-upgrade-guide#dropping-support-for-internet-explorer)) | ||
We recommend you carry out thorough testing if you wish to use this or later versions of React. | ||
## API documentation | ||
@@ -189,2 +203,35 @@ | ||
#### `inputClasses` (default: `null`) | ||
Type: `string | null` | ||
Adds custom html classes to the generated `input` element. | ||
If [`autoselect`](#autoselect) is set to `true`, the option [`hintClasses`](#hintClasses) can be configured separately or it will default to the `inputClasses` value. | ||
#### `hintClasses` (default: `null`) | ||
Type: `string | null` | ||
Adds custom html classes to the additional `input` element that appears when what the user typed matches the start of a suggestion. | ||
If [`autoselect`](#autoselect) is set to `true`, the option [`inputClasses`](#inputClasses) will be used as the default value unless `hintClasses` is set to an empty string `''`. | ||
#### `menuAttributes` (default: `{}`) | ||
Type: `Object` | ||
Sets html attributes and their values on the generated `ul` menu element. Useful for adding `aria-labelledby` and setting to the value of the `id` attribute on your existing label, to provide context to an assistive technology user. | ||
> [!NOTE] | ||
> | ||
> To maintain assistive technology support, menu attributes `id`, `role` and `onMouseLeave` cannot be overridden using `menuAttributes`. Setting `className` will append to the component default and [`menuClasses`](#menuClasses) values. | ||
#### `menuClasses` (default: `null`) | ||
Type: `string | null` | ||
Adds custom html classes to the generated `ul` menu element. | ||
#### `autoselect` (default: `false`) | ||
@@ -301,3 +348,3 @@ | ||
A function that receives no arguments and should return the text used in the dropdown to indicate that there are no results. | ||
A function that receives no arguments and returns the text used in the dropdown to indicate that there are no results. | ||
@@ -308,3 +355,3 @@ #### `tStatusQueryTooShort` (default: `` (minQueryLength) => `Type in ${minQueryLength} or more characters for results` ``) | ||
A function that receives one argument that indicates the minimal amount of characters needed for the dropdown to trigger and should return the text used in the accessibility hint to indicate that the query is too short. | ||
A function that receives one argument that indicates the minimal amount of characters needed for the dropdown to trigger and returns the text used in the accessibility hint to indicate that the query is too short. | ||
@@ -315,3 +362,3 @@ #### `tStatusNoResults` (default: `() => 'No search results'`) | ||
A function that receives no arguments and should return the text that is used in the accessibility hint to indicate that there are no results. | ||
A function that receives no arguments and returns the text that is used in the accessibility hint to indicate that there are no results. | ||
@@ -322,3 +369,5 @@ #### `tStatusSelectedOption` (default: `` (selectedOption, length, index) => `${selectedOption} ${index + 1} of ${length} is highlighted` ``) | ||
A function that receives two arguments, the selectedOption and the amount of available options, and it should return the text used in the accessibility hint to indicate which option is selected. | ||
A function that receives three arguments - | ||
the selectedOption, the count of available options, and the (zero-based) index of the selected option - | ||
and returns the text used in the accessibility hint to indicate which option is selected. | ||
@@ -342,3 +391,3 @@ #### `tStatusResults` | ||
A function that receives two arguments, the count of available options and the return value of `tStatusSelectedOption`, and should return the text used in the accessibility hint to indicate which options are available and which is selected. | ||
A function that receives two arguments - the count of available options and the return value of `tStatusSelectedOption` - and returns the text used in the accessibility hint to indicate which options are available and which is selected. | ||
@@ -349,3 +398,3 @@ #### `tAssistiveHint` (default: `() => 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.'`) | ||
A function that receives no arguments and should return the text to be assigned as the aria description of the html `input` element, via the `aria-describedby` attribute. | ||
A function that receives no arguments and returns the text to be assigned as the aria description of the html `input` element, via the `aria-describedby` attribute. | ||
This text is intended as an initial instruction to the assistive tech user. The `aria-describedby` attribute is automatically removed once user input is detected, in order to reduce screen reader verbosity. | ||
@@ -352,0 +401,0 @@ |
@@ -53,3 +53,7 @@ import { createElement, Component } from 'preact' /** @jsx createElement */ | ||
tAssistiveHint: () => 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.', | ||
dropdownArrow: DropdownArrowDown | ||
dropdownArrow: DropdownArrowDown, | ||
menuAttributes: {}, | ||
inputClasses: null, | ||
hintClasses: null, | ||
menuClasses: null | ||
} | ||
@@ -90,2 +94,3 @@ | ||
this.handleInputChange = this.handleInputChange.bind(this) | ||
this.handleInputClick = this.handleInputClick.bind(this) | ||
this.handleInputFocus = this.handleInputFocus.bind(this) | ||
@@ -219,3 +224,3 @@ | ||
const queryEmpty = query.length === 0 | ||
const queryChanged = this.state.query.length !== query.length | ||
const queryChanged = this.state.query !== query | ||
const queryLongEnough = query.length >= minLength | ||
@@ -422,3 +427,7 @@ | ||
tAssistiveHint, | ||
dropdownArrow: dropdownArrowFactory | ||
dropdownArrow: dropdownArrowFactory, | ||
menuAttributes, | ||
inputClasses, | ||
hintClasses, | ||
menuClasses | ||
} = this.props | ||
@@ -436,15 +445,6 @@ const { focused, hovered, menuOpen, options, query, selected, ariaHint, validChoiceMade } = this.state | ||
const wrapperClassName = `${cssNamespace}__wrapper` | ||
const inputClassName = `${cssNamespace}__input` | ||
const componentIsFocused = focused !== null | ||
const inputModifierFocused = componentIsFocused ? ` ${inputClassName}--focused` : '' | ||
const inputModifierType = this.props.showAllValues ? ` ${inputClassName}--show-all-values` : ` ${inputClassName}--default` | ||
const statusClassName = `${cssNamespace}__status` | ||
const dropdownArrowClassName = `${cssNamespace}__dropdown-arrow-down` | ||
const optionFocused = focused !== -1 && focused !== null | ||
const menuClassName = `${cssNamespace}__menu` | ||
const menuModifierDisplayMenu = `${menuClassName}--${displayMenu}` | ||
const menuIsVisible = menuOpen || showNoOptionsFound | ||
const menuModifierVisibility = `${menuClassName}--${(menuIsVisible) ? 'visible' : 'hidden'}` | ||
const optionClassName = `${cssNamespace}__option` | ||
@@ -461,5 +461,9 @@ | ||
const assistiveHintID = id + '__assistiveHint' | ||
const ariaDescribedProp = (ariaHint) ? { | ||
'aria-describedby': assistiveHintID | ||
} : null | ||
const ariaProps = { | ||
'aria-describedby': ariaHint ? assistiveHintID : null, | ||
'aria-expanded': menuOpen ? 'true' : 'false', | ||
'aria-activedescendant': optionFocused ? `${id}__option--${focused}` : null, | ||
'aria-owns': `${id}__listbox`, | ||
'aria-autocomplete': (this.hasAutoselect()) ? 'both' : 'list' | ||
} | ||
@@ -478,2 +482,51 @@ let dropdownArrow | ||
const inputClassName = `${cssNamespace}__input` | ||
const inputClassList = [ | ||
inputClassName, | ||
this.props.showAllValues ? `${inputClassName}--show-all-values` : `${inputClassName}--default` | ||
] | ||
const componentIsFocused = focused !== null | ||
if (componentIsFocused) { | ||
inputClassList.push(`${inputClassName}--focused`) | ||
} | ||
if (inputClasses) { | ||
inputClassList.push(inputClasses) | ||
} | ||
const menuClassName = `${cssNamespace}__menu` | ||
const menuModifierDisplayMenu = `${menuClassName}--${displayMenu}` | ||
const menuIsVisible = menuOpen || showNoOptionsFound | ||
const menuModifierVisibility = `${menuClassName}--${(menuIsVisible) ? 'visible' : 'hidden'}` | ||
const menuClassList = [ | ||
menuClassName, | ||
menuModifierDisplayMenu, | ||
menuModifierVisibility | ||
] | ||
if (menuClasses) { | ||
menuClassList.push(menuClasses) | ||
} | ||
if (menuAttributes?.class || menuAttributes?.className) { | ||
menuClassList.push(menuAttributes?.class || menuAttributes?.className) | ||
} | ||
const computedMenuAttributes = { | ||
// Copy the attributes passed as props | ||
...menuAttributes, | ||
// And add the values computed for the autocomplete | ||
id: `${id}__listbox`, | ||
role: 'listbox', | ||
className: menuClassList.join(' '), | ||
onMouseLeave: this.handleListMouseLeave | ||
} | ||
// Preact would override our computed `className` | ||
// with the `class` from the `menuAttributes` so | ||
// we need to clean it up from the computed attributes | ||
delete computedMenuAttributes.class | ||
return ( | ||
@@ -494,18 +547,15 @@ <div className={wrapperClassName} onKeyDown={this.handleKeyDown}> | ||
tResults={tStatusResults} | ||
className={statusClassName} | ||
/> | ||
{hintValue && ( | ||
<span><input className={hintClassName} readonly tabIndex='-1' value={hintValue} /></span> | ||
<span><input className={[hintClassName, hintClasses === null ? inputClasses : hintClasses].filter(Boolean).join(' ')} readonly tabIndex='-1' value={hintValue} /></span> | ||
)} | ||
<input | ||
aria-expanded={menuOpen ? 'true' : 'false'} | ||
aria-activedescendant={optionFocused ? `${id}__option--${focused}` : false} | ||
aria-owns={`${id}__listbox`} | ||
aria-autocomplete={(this.hasAutoselect()) ? 'both' : 'list'} | ||
{...ariaDescribedProp} | ||
{...ariaProps} | ||
autoComplete='off' | ||
className={`${inputClassName}${inputModifierFocused}${inputModifierType}`} | ||
className={inputClassList.join(' ')} | ||
id={id} | ||
onClick={(event) => this.handleInputClick(event)} | ||
onClick={this.handleInputClick} | ||
onBlur={this.handleInputBlur} | ||
@@ -525,8 +575,3 @@ {...onChangeCrossLibrary(this.handleInputChange)} | ||
<ul | ||
className={`${menuClassName} ${menuModifierDisplayMenu} ${menuModifierVisibility}`} | ||
onMouseLeave={(event) => this.handleListMouseLeave(event)} | ||
id={`${id}__listbox`} | ||
role='listbox' | ||
> | ||
<ul {...computedMenuAttributes}> | ||
{options.map((option, index) => { | ||
@@ -533,0 +578,0 @@ const showFocused = focused === -1 ? selected === index : focused === index |
import { createElement, Component } from 'preact' /** @jsx createElement */ | ||
const debounce = function (func, wait, immediate) { | ||
var timeout | ||
let timeout | ||
return function () { | ||
var context = this | ||
var args = arguments | ||
var later = function () { | ||
const context = this | ||
const args = arguments | ||
const later = function () { | ||
timeout = null | ||
if (!immediate) func.apply(context, args) | ||
} | ||
var callNow = immediate && !timeout | ||
const callNow = immediate && !timeout | ||
clearTimeout(timeout) | ||
@@ -33,3 +33,3 @@ timeout = setTimeout(later, wait) | ||
} | ||
}; | ||
} | ||
@@ -41,2 +41,3 @@ state = { | ||
/* eslint-disable react/no-deprecated -- https://github.com/alphagov/accessible-autocomplete/issues/418 */ | ||
componentWillMount () { | ||
@@ -52,2 +53,3 @@ const that = this | ||
/* eslint-disable react/no-deprecated -- https://github.com/alphagov/accessible-autocomplete/issues/418 */ | ||
componentWillReceiveProps ({ queryLength }) { | ||
@@ -68,3 +70,4 @@ this.setState({ debounced: false }) | ||
tSelectedOption, | ||
tResults | ||
tResults, | ||
className | ||
} = this.props | ||
@@ -93,2 +96,3 @@ const { bump, debounced, silenced } = this.state | ||
<div | ||
className={className} | ||
style={{ | ||
@@ -105,3 +109,4 @@ border: '0', | ||
width: '1px' | ||
}}> | ||
}} | ||
> | ||
<div | ||
@@ -111,3 +116,4 @@ id={id + '__status--A'} | ||
aria-atomic='true' | ||
aria-live='polite'> | ||
aria-live='polite' | ||
> | ||
{(!silenced && debounced && bump) ? content : ''} | ||
@@ -119,3 +125,4 @@ </div> | ||
aria-atomic='true' | ||
aria-live='polite'> | ||
aria-live='polite' | ||
> | ||
{(!silenced && debounced && !bump) ? content : ''} | ||
@@ -122,0 +129,0 @@ </div> |
@@ -15,3 +15,3 @@ import { createElement, render } from 'preact' /** @jsx createElement */ | ||
const createSimpleEngine = (values) => (query, syncResults) => { | ||
var matches = values.filter(r => r.toLowerCase().indexOf(query.toLowerCase()) !== -1) | ||
const matches = values.filter(r => r.toLowerCase().indexOf(query.toLowerCase()) !== -1) | ||
syncResults(matches) | ||
@@ -25,3 +25,3 @@ } | ||
if (!configurationOptions.source) { | ||
let availableOptions = [].filter.call(configurationOptions.selectElement.options, option => (option.value || configurationOptions.preserveNullOptions)) | ||
const availableOptions = [].filter.call(configurationOptions.selectElement.options, option => (option.value || configurationOptions.preserveNullOptions)) | ||
configurationOptions.source = availableOptions.map(option => option.textContent || option.innerText) | ||
@@ -55,3 +55,3 @@ } | ||
...configurationOptions, | ||
element: element | ||
element | ||
}) | ||
@@ -58,0 +58,0 @@ |
@@ -1,2 +0,4 @@ | ||
/* global before, beforeEach, after, describe, expect, it */ | ||
/* global before, beforeEach, after, describe, it */ | ||
import { expect } from 'chai' | ||
import { createElement, render } from 'preact' /** @jsx createElement */ | ||
@@ -3,0 +5,0 @@ import DropdownArrowDown from '../../src/dropdown-arrow-down' |
@@ -1,2 +0,4 @@ | ||
/* global after, describe, before, beforeEach, expect, it */ | ||
/* global after, describe, before, beforeEach, it */ | ||
import { expect } from 'chai' | ||
import { createElement, render } from 'preact' /** @jsx createElement */ | ||
@@ -7,3 +9,3 @@ import Autocomplete from '../../src/autocomplete' | ||
function suggest (query, syncResults) { | ||
var results = [ | ||
const results = [ | ||
'France', | ||
@@ -77,4 +79,4 @@ 'Germany', | ||
let wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
let inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
const wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
const inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
@@ -87,4 +89,4 @@ expect(inputElement.getAttribute('aria-expanded')).to.equal('false') | ||
let wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
let inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
const wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
const inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
@@ -98,4 +100,4 @@ expect(inputElement.getAttribute('aria-describedby')).to.equal('autocomplete-default__assistiveHint') | ||
let wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
let inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
const wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
const inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
@@ -108,4 +110,4 @@ expect(inputElement.getAttribute('aria-autocomplete')).to.equal('list') | ||
let wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
let inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
const wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
const inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
@@ -116,8 +118,90 @@ expect(inputElement.getAttribute('aria-autocomplete')).to.equal('both') | ||
describe('menuAttributes', () => { | ||
it('renders with the extra attribute on the menu', () => { | ||
render(<Autocomplete menuAttributes={{ 'aria-labelledby': 'autocomplete-default' }} id='autocomplete-default' />, scratch) | ||
const wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
const dropdownElement = wrapperElement.getElementsByTagName('ul')[0] | ||
const inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
expect(dropdownElement.getAttribute('aria-labelledby')).to.equal('autocomplete-default') | ||
expect(inputElement.getAttribute('id')).to.equal('autocomplete-default') | ||
}) | ||
describe('attributes computed by the component', () => { | ||
it('does not override attributes computed by the component', () => { | ||
const menuAttributes = { | ||
id: 'custom-id', | ||
role: 'custom-role' | ||
} | ||
render(<Autocomplete menuAttributes={menuAttributes} id='autocomplete-default' />, scratch) | ||
// Check that the computed values are the ones expected in the HTML | ||
const menuElement = scratch.getElementsByClassName('autocomplete__menu')[0] | ||
expect(menuElement.id).to.equal('autocomplete-default__listbox', 'HTML id') | ||
expect(menuElement.role).to.equal('listbox', 'HTML role') | ||
// Check that in protecting the menu, we don't affect the object passed as option | ||
expect(menuAttributes.id).to.equal('custom-id', 'options id') | ||
expect(menuAttributes.role).to.equal('custom-role', 'options role') | ||
}) | ||
}) | ||
it('adds `className` to the computed value of the `class` attribute', () => { | ||
const menuAttributes = { | ||
className: 'custom-className' | ||
} | ||
render(<Autocomplete menuAttributes={menuAttributes} id='autocomplete-default' />, scratch) | ||
// Check that the computed values are the ones expected in the HTML | ||
const menuElement = scratch.getElementsByClassName('autocomplete__menu')[0] | ||
expect(menuElement.getAttribute('class')).to.equal('autocomplete__menu autocomplete__menu--inline autocomplete__menu--hidden custom-className') | ||
// Check that in protecting the menu, we don't affect the object passed as option | ||
expect(menuAttributes.className).to.equal('custom-className') | ||
}) | ||
// Align with Preact's behaviour where `class` takes precedence | ||
it('adds `class` to the computed value of the `class` attribute, ignoring `className` if present', () => { | ||
const menuAttributes = { | ||
className: 'custom-className', | ||
class: 'custom-class' | ||
} | ||
render(<Autocomplete menuAttributes={menuAttributes} id='autocomplete-default' />, scratch) | ||
// Check that the computed values are the ones expected in the HTML | ||
const menuElement = scratch.getElementsByClassName('autocomplete__menu')[0] | ||
expect(menuElement.getAttribute('class')).to.equal('autocomplete__menu autocomplete__menu--inline autocomplete__menu--hidden custom-class') | ||
// Check that in protecting the menu, we don't affect the object passed as option | ||
expect(menuAttributes.className).to.equal('custom-className') | ||
expect(menuAttributes.class).to.equal('custom-class') | ||
}) | ||
}) | ||
it('renders with extra class on the input', () => { | ||
render(<Autocomplete inputClasses='custom-class' id='autocomplete-default' />, scratch) | ||
const inputElement = scratch.getElementsByClassName('autocomplete__input')[0] | ||
expect(inputElement.getAttribute('class')).to.contain(' custom-class') | ||
}) | ||
it('renders with extra class on the menu', () => { | ||
render(<Autocomplete menuClasses='custom-class' id='autocomplete-default' />, scratch) | ||
const menuElement = scratch.getElementsByClassName('autocomplete__menu')[0] | ||
expect(menuElement.getAttribute('class')).to.contain('custom-class') | ||
}) | ||
it('renders with the correct roles', () => { | ||
render(<Autocomplete required />, scratch) | ||
let wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
let inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
let dropdownElement = wrapperElement.getElementsByTagName('ul')[0] | ||
const wrapperElement = scratch.getElementsByClassName('autocomplete__wrapper')[0] | ||
const inputElement = wrapperElement.getElementsByTagName('input')[0] | ||
const dropdownElement = wrapperElement.getElementsByTagName('ul')[0] | ||
@@ -192,2 +276,8 @@ expect(inputElement.getAttribute('role')).to.equal('combobox', 'input should have combobox role') | ||
it('searches with the new term when query length changes', () => { | ||
autocomplete.setState({ query: 'fr', options: ['France'] }) | ||
autocomplete.handleInputChange({ target: { value: 'fb' } }) | ||
expect(autocomplete.state.options.length).to.equal(0) | ||
}) | ||
it('removes the aria-describedby attribute when query is non empty', () => { | ||
@@ -648,5 +738,5 @@ expect(autocomplete.state.ariaHint).to.equal(true) | ||
let wrapperElement = scratch.getElementsByTagName('div')[0] | ||
let ariaLiveA = wrapperElement.getElementsByTagName('div')[0] | ||
let ariaLiveB = wrapperElement.getElementsByTagName('div')[1] | ||
const wrapperElement = scratch.getElementsByTagName('div')[0] | ||
const ariaLiveA = wrapperElement.getElementsByTagName('div')[0] | ||
const ariaLiveB = wrapperElement.getElementsByTagName('div')[1] | ||
@@ -664,3 +754,3 @@ expect(ariaLiveA.getAttribute('role')).to.equal('status', 'first aria live region should be marked as role=status') | ||
it('when a valid choice has been made and the input has focus', (done) => { | ||
let status = new Status({ | ||
const status = new Status({ | ||
...Status.defaultProps, | ||
@@ -680,3 +770,3 @@ validChoiceMade: true, | ||
it('when the input no longer has focus', (done) => { | ||
let status = new Status({ | ||
const status = new Status({ | ||
...Status.defaultProps, | ||
@@ -697,3 +787,3 @@ validChoiceMade: false, | ||
it('when a valid choice has not been made and the input has focus', (done) => { | ||
let status = new Status({ | ||
const status = new Status({ | ||
...Status.defaultProps, | ||
@@ -700,0 +790,0 @@ validChoiceMade: false, |
@@ -1,2 +0,4 @@ | ||
/* global before, beforeEach, after, describe, expect, it */ | ||
/* global before, beforeEach, after, describe, it */ | ||
import { expect } from 'chai' | ||
import accessibleAutocomplete from '../../src/wrapper' | ||
@@ -16,3 +18,3 @@ | ||
settings.name = settings.name !== undefined ? settings.name : 'location-picker-name' | ||
var $select = document.createElement('select') | ||
const $select = document.createElement('select') | ||
if (settings.id) { | ||
@@ -19,0 +21,0 @@ $select.id = settings.id |
@@ -1,10 +0,13 @@ | ||
/* global $, afterEach, beforeEach, browser, describe, it */ | ||
const expect = require('chai').expect | ||
/* global afterEach, beforeEach, describe, it */ | ||
const { mkdir } = require('fs/promises') | ||
const { dirname, join } = require('path') | ||
const { cwd } = require('process') | ||
const { $, browser, expect } = require('@wdio/globals') | ||
const { Key } = require('webdriverio') | ||
const { browserName, browserVersion } = browser.capabilities | ||
const isChrome = browserName === 'chrome' | ||
const isFireFox = browserName === 'firefox' | ||
// const isFireFox = browserName === 'firefox' | ||
const isIE = browserName === 'internet explorer' | ||
// const isIE9 = isIE && browserVersion === '9' | ||
// const isIE10 = isIE && browserVersion === '10' | ||
// const isIE11 = isIE && browserVersion === '11.103' | ||
const liveRegionWaitTimeMillis = 10000 | ||
@@ -15,70 +18,80 @@ | ||
const input = 'input#autocomplete-default' | ||
const menu = `${input} + ul` | ||
const firstOption = `${menu} > li:first-child` | ||
const secondOption = `${menu} > li:nth-child(2)` | ||
it('should show the input', () => { | ||
$(input).waitForExist() | ||
expect($(input).isDisplayed()).to.equal(true) | ||
let $input | ||
let $menu | ||
beforeEach(async () => { | ||
$input = await $(input) | ||
$menu = await $(`${input} + ul`) | ||
}) | ||
it('should allow focusing the input', () => { | ||
$(input).click() | ||
expect($(input).isFocused()).to.equal(true) | ||
it('should show the input', async () => { | ||
await $input.waitForExist() | ||
expect(await $input.isDisplayed()).toEqual(true) | ||
}) | ||
it('should display suggestions', () => { | ||
$(input).click() | ||
$(input).setValue('ita') | ||
$(menu).waitForDisplayed() | ||
expect($(menu).isDisplayed()).to.equal(true) | ||
it('should allow focusing the input', async () => { | ||
await $input.click() | ||
expect(await $input.isFocused()).toEqual(true) | ||
}) | ||
it('should display suggestions', async () => { | ||
await $input.click() | ||
await $input.setValue('ita') | ||
await $menu.waitForDisplayed() | ||
expect(await $menu.isDisplayed()).toEqual(true) | ||
}) | ||
// These tests are flakey when run through Saucelabs so we only run them | ||
// in Chrome | ||
if (isChrome) { | ||
it('should announce status changes using two alternately updated aria live regions', () => { | ||
const regionA = $('#autocomplete-default__status--A') | ||
const regionB = $('#autocomplete-default__status--B') | ||
it('should announce status changes using two alternately updated aria live regions', async () => { | ||
const $regionA = await $('#autocomplete-default__status--A') | ||
const $regionB = await $('#autocomplete-default__status--B') | ||
expect(regionA.getText()).to.equal('') | ||
expect(regionB.getText()).to.equal('') | ||
expect(await $regionA.getText()).toEqual('') | ||
expect(await $regionB.getText()).toEqual('') | ||
$(input).click() | ||
$(input).setValue('a') | ||
await $input.click() | ||
await $input.setValue('a') | ||
// We can't tell which region will be used first, so we have to allow for | ||
// either region changing | ||
browser.waitUntil(() => { return regionA.getText() !== '' || regionB.getText() !== '' }, | ||
// We can't tell which region will be used first, so we have to | ||
// await all region status text for at least one non-empty value | ||
const waitForText = ($elements) => async () => | ||
Promise.all($elements.map(($element) => $element.getText())) | ||
.then((values) => values.some(Boolean)) | ||
await browser.waitUntil( | ||
waitForText([$regionA, $regionB]), | ||
liveRegionWaitTimeMillis, | ||
'expected the first aria live region to be populated within ' + liveRegionWaitTimeMillis + ' milliseconds' | ||
`expected the first aria live region to be populated within ${liveRegionWaitTimeMillis} milliseconds` | ||
) | ||
if (regionA.getText()) { | ||
$(input).addValue('s') | ||
browser.waitUntil(() => { return (regionA.getText() === '' && regionB.getText() !== '') }, | ||
if (await $regionA.getText()) { | ||
await $input.addValue('s') | ||
await browser.waitUntil( | ||
waitForText([$regionA, $regionB]), | ||
liveRegionWaitTimeMillis, | ||
'expected the first aria live region to be cleared, and the second to be populated within ' + | ||
liveRegionWaitTimeMillis + ' milliseconds' | ||
`expected the first aria live region to be cleared, and the second to be populated within ${liveRegionWaitTimeMillis} milliseconds` | ||
) | ||
$(input).addValue('h') | ||
browser.waitUntil(() => { return (regionA.getText() !== '' && regionB.getText() === '') }, | ||
await $input.addValue('h') | ||
await browser.waitUntil( | ||
waitForText([$regionA, $regionB]), | ||
liveRegionWaitTimeMillis, | ||
'expected the first aria live region to be populated, and the second to be cleared within ' + | ||
liveRegionWaitTimeMillis + ' milliseconds' | ||
`expected the first aria live region to be populated, and the second to be cleared within ${liveRegionWaitTimeMillis} milliseconds` | ||
) | ||
} else { | ||
$(input).addValue('s') | ||
browser.waitUntil(() => { return (regionA.getText() !== '' && regionB.getText() === '') }, | ||
await $input.addValue('s') | ||
await browser.waitUntil( | ||
waitForText([$regionA, $regionB]), | ||
liveRegionWaitTimeMillis, | ||
'expected the first aria live region to be populated, and the second to be cleared within ' + | ||
liveRegionWaitTimeMillis + ' milliseconds' | ||
`expected the first aria live region to be populated, and the second to be cleared within ${liveRegionWaitTimeMillis} milliseconds` | ||
) | ||
$(input).addValue('h') | ||
browser.waitUntil(() => { return (regionA.getText() === '' && regionB.getText() !== '') }, | ||
await $input.addValue('h') | ||
await browser.waitUntil( | ||
waitForText([$regionA, $regionB]), | ||
liveRegionWaitTimeMillis, | ||
'expected the first aria live region to be cleared, and the second to be populated within ' + | ||
liveRegionWaitTimeMillis + ' milliseconds' | ||
`expected the first aria live region to be cleared, and the second to be populated within ${liveRegionWaitTimeMillis} milliseconds` | ||
) | ||
@@ -89,54 +102,65 @@ } | ||
it('should set aria-selected to true on selected option and false on other options', () => { | ||
$(input).click() | ||
$(input).setValue('ita') | ||
browser.keys(['ArrowDown']) | ||
expect($(firstOption).getAttribute('aria-selected')).to.equal('true') | ||
expect($(secondOption).getAttribute('aria-selected')).to.equal('false') | ||
browser.keys(['ArrowDown']) | ||
expect($(firstOption).getAttribute('aria-selected')).to.equal('false') | ||
expect($(secondOption).getAttribute('aria-selected')).to.equal('true') | ||
it('should set aria-selected to true on selected option and false on other options', async () => { | ||
await $input.click() | ||
await $input.setValue('ita') | ||
const $option1 = await $(`${input} + ul li:nth-child(1)`) | ||
const $option2 = await $(`${input} + ul li:nth-child(2)`) | ||
await browser.keys([Key.ArrowDown]) | ||
expect(await $option1.getAttribute('aria-selected')).toEqual('true') | ||
expect(await $option2.getAttribute('aria-selected')).toEqual('false') | ||
await browser.keys([Key.ArrowDown]) | ||
expect(await $option1.getAttribute('aria-selected')).toEqual('false') | ||
expect(await $option2.getAttribute('aria-selected')).toEqual('true') | ||
}) | ||
describe('keyboard use', () => { | ||
it('should allow typing', () => { | ||
$(input).click() | ||
$(input).addValue('ita') | ||
expect($(input).getValue()).to.equal('ita') | ||
it('should allow typing', async () => { | ||
await $input.click() | ||
await $input.addValue('ita') | ||
expect(await $input.getValue()).toEqual('ita') | ||
}) | ||
it('should allow selecting an option', () => { | ||
$(input).click() | ||
$(input).setValue('ita') | ||
browser.keys(['ArrowDown']) | ||
expect($(input).isFocused()).to.equal(false) | ||
expect($(firstOption).isFocused()).to.equal(true) | ||
browser.keys(['ArrowDown']) | ||
expect($(menu).isDisplayed()).to.equal(true) | ||
expect($(input).getValue()).to.equal('ita') | ||
expect($(firstOption).isFocused()).to.equal(false) | ||
expect($(secondOption).isFocused()).to.equal(true) | ||
it('should allow selecting an option', async () => { | ||
await $input.click() | ||
await $input.setValue('ita') | ||
const $option1 = await $(`${input} + ul li:nth-child(1)`) | ||
const $option2 = await $(`${input} + ul li:nth-child(2)`) | ||
await browser.keys([Key.ArrowDown]) | ||
expect(await $input.isFocused()).toEqual(false) | ||
expect(await $option1.isFocused()).toEqual(true) | ||
await browser.keys([Key.ArrowDown]) | ||
expect(await $menu.isDisplayed()).toEqual(true) | ||
expect(await $input.getValue()).toEqual('ita') | ||
expect(await $option1.isFocused()).toEqual(false) | ||
expect(await $option2.isFocused()).toEqual(true) | ||
}) | ||
it('should allow confirming an option', () => { | ||
$(input).click() | ||
$(input).setValue('ita') | ||
browser.keys(['ArrowDown', 'Enter']) | ||
browser.waitUntil(() => $(input).getValue() !== 'ita') | ||
expect($(input).isFocused()).to.equal(true) | ||
expect($(input).getValue()).to.equal('Italy') | ||
it('should allow confirming an option', async () => { | ||
await $input.click() | ||
await $input.setValue('ita') | ||
await browser.keys([Key.ArrowDown, Key.Enter]) | ||
await browser.waitUntil(async () => await $input.getValue() !== 'ita') | ||
expect(await $input.isFocused()).toEqual(true) | ||
expect(await $input.getValue()).toEqual('Italy') | ||
}) | ||
it('should redirect keypresses on an option to input', () => { | ||
it('should redirect keypresses on an option to input', async () => { | ||
if (!isIE) { | ||
$(input).click() | ||
$(input).setValue('ita') | ||
browser.keys(['ArrowDown']) | ||
expect($(input).isFocused()).to.equal(false) | ||
expect($(firstOption).isFocused()).to.equal(true) | ||
$(firstOption).addValue(['l']) | ||
expect($(input).isFocused()).to.equal(true) | ||
expect($(input).getValue()).to.equal('ital') | ||
await $input.click() | ||
await $input.setValue('ita') | ||
const $option1 = await $(`${input} + ul li:nth-child(1)`) | ||
await browser.keys([Key.ArrowDown]) | ||
expect(await $input.isFocused()).toEqual(false) | ||
expect(await $option1.isFocused()).toEqual(true) | ||
await $option1.addValue('l') | ||
expect(await $input.isFocused()).toEqual(true) | ||
expect(await $input.getValue()).toEqual('ital') | ||
} else { | ||
// FIXME: This feature does not work correctly on IE 9 to 11. | ||
// FIXME: This feature does not work correctly on IE 11 | ||
} | ||
@@ -147,8 +171,11 @@ }) | ||
describe('mouse use', () => { | ||
it('should allow confirming an option', () => { | ||
$(input).click() | ||
$(input).setValue('ita') | ||
$(firstOption).click() | ||
expect($(input).isFocused()).to.equal(true) | ||
expect($(input).getValue()).to.equal('Italy') | ||
it('should allow confirming an option', async () => { | ||
await $input.click() | ||
await $input.setValue('ita') | ||
const $option1 = await $(`${input} + ul li:nth-child(1)`) | ||
await $option1.click() | ||
expect(await $input.isFocused()).toEqual(true) | ||
expect(await $input.getValue()).toEqual('Italy') | ||
}) | ||
@@ -162,27 +189,36 @@ }) | ||
const input = 'input#autocomplete-customTemplates' | ||
const menu = `${input} + ul` | ||
const firstOption = `${menu} > li:first-child` | ||
const firstOptionInnerElement = `${firstOption} > strong` | ||
beforeEach(() => { | ||
$(input).setValue('') // Prevent autofilling, IE likes to do this. | ||
let $input | ||
beforeEach(async () => { | ||
$input = await $(input) | ||
await $input.setValue('') // Prevent autofilling, IE likes to do this. | ||
}) | ||
describe('mouse use', () => { | ||
it('should allow confirming an option by clicking on child elements', () => { | ||
$(input).setValue('uni') | ||
if (isChrome) { | ||
const errorRegex = /Other element would receive the click/ | ||
expect($(firstOptionInnerElement).click.bind($(firstOptionInnerElement))).to.throw(errorRegex) | ||
expect($(input).isFocused()).to.equal(true) | ||
expect($(input).getValue()).to.equal('uni') | ||
} | ||
if (isFireFox) { | ||
$(firstOptionInnerElement).click() | ||
expect($(input).isFocused()).to.equal(true) | ||
expect($(input).getValue()).to.equal('United Kingdom') | ||
} | ||
it('should allow confirming an option by clicking on child elements', async () => { | ||
await $input.setValue('uni') | ||
const $option1InnerElement = await $(`${input} + ul li:nth-child(1) strong`) | ||
if (isIE) { | ||
// FIXME: This feature works correctly on IE but testing it doesn't seem to work. | ||
return | ||
} | ||
try { | ||
await $option1InnerElement.click() | ||
} catch (error) { | ||
// In some cases (mainly ChromeDriver) the automation protocol won't | ||
// allow clicking span elements. In this case we just skip the test. | ||
if (error.toString().match(/Other element would receive the click/)) { | ||
return | ||
} else { | ||
throw error | ||
} | ||
} | ||
expect(await $input.isFocused()).toEqual(true) | ||
expect(await $input.getValue()).toEqual('United Kingdom') | ||
}) | ||
@@ -193,4 +229,31 @@ }) | ||
const classesPropsExamples = () => { | ||
describe('classes properties', () => { | ||
it('should set `inputClasses` on both hint and input', async () => { | ||
const $input = await $('input#autocomplete-inputClasses') | ||
await expect($input).toHaveElementClass('app-input') | ||
// Trigger the display of the hint | ||
await $input.setValue('fra') | ||
const $hint = $input.parentElement().$('.autocomplete__hint') | ||
await expect($hint).toBeDisplayed() | ||
await expect($hint).toHaveElementClass('app-input') | ||
}) | ||
it('should set `hintClasses` on the hint', async () => { | ||
const $input = await $('input#autocomplete-hintClasses') | ||
// Trigger the display of the hint | ||
await $input.setValue('fra') | ||
const $hint = $input.parentElement().$('.autocomplete__hint') | ||
await expect($hint).toBeDisplayed() | ||
await expect($hint).toHaveElementClass('app-hint') | ||
}) | ||
}) | ||
} | ||
const takeScreenshotsIfFail = () => { | ||
afterEach(function () { | ||
afterEach(async function () { | ||
const testFailed = this.currentTest.state === 'failed' | ||
@@ -201,4 +264,5 @@ if (testFailed) { | ||
const testTitle = this.currentTest.title.replace(/\W/g, '-') | ||
const filename = `./screenshots/${timestamp}-${browserVariant}-${testTitle}.png` | ||
browser.saveScreenshot(filename) | ||
const filename = join(cwd(), `screenshots/${timestamp}-${browserVariant}-${testTitle}.png`) | ||
await mkdir(dirname(filename), { recursive: true }) | ||
await browser.saveScreenshot(filename) | ||
console.log(`Test failed, created: ${filename}`) | ||
@@ -210,8 +274,8 @@ } | ||
describe('Accessible Autocomplete', () => { | ||
beforeEach(() => { | ||
browser.url('/') | ||
beforeEach(async () => { | ||
await browser.url('/') | ||
}) | ||
it('should have the right title', () => { | ||
expect(browser.getTitle()).to.equal('Accessible Autocomplete examples') | ||
it('should have the right title', async () => { | ||
expect(await browser.getTitle()).toEqual('Accessible Autocomplete examples') | ||
}) | ||
@@ -221,2 +285,3 @@ | ||
customTemplatesExample() | ||
classesPropsExamples() | ||
@@ -227,8 +292,8 @@ takeScreenshotsIfFail() | ||
describe('Accessible Autocomplete Preact', () => { | ||
beforeEach(() => { | ||
browser.url('/preact') | ||
beforeEach(async () => { | ||
await browser.url('/preact') | ||
}) | ||
it('should have the right title', () => { | ||
expect(browser.getTitle()).to.equal('Accessible Autocomplete Preact examples') | ||
it('should have the right title', async () => { | ||
expect(await browser.getTitle()).toEqual('Accessible Autocomplete Preact examples') | ||
}) | ||
@@ -242,8 +307,8 @@ | ||
describe('Accessible Autocomplete React', () => { | ||
beforeEach(() => { | ||
browser.url('/react') | ||
beforeEach(async () => { | ||
await browser.url('/react') | ||
}) | ||
it('should have the right title', () => { | ||
expect(browser.getTitle()).to.equal('Accessible Autocomplete React examples') | ||
it('should have the right title', async () => { | ||
expect(await browser.getTitle()).toEqual('Accessible Autocomplete React examples') | ||
}) | ||
@@ -250,0 +315,0 @@ |
require('@babel/register')({ | ||
cwd: require('path').resolve(__dirname, '../') | ||
rootMode: 'upward' | ||
}) | ||
var puppeteer = require('puppeteer') | ||
var webpack = require('../webpack.config.babel.js')[0] | ||
const puppeteer = require('puppeteer') | ||
const webpackConfig = require('../webpack.config.mjs') | ||
// Use Chrome headless | ||
@@ -13,3 +14,3 @@ process.env.CHROME_BIN = puppeteer.executablePath() | ||
basePath: '../', | ||
frameworks: ['mocha', 'chai-sinon'], | ||
frameworks: ['mocha', 'webpack'], | ||
reporters: ['mocha'], | ||
@@ -29,8 +30,19 @@ | ||
webpack: webpack, | ||
webpackMiddleware: { | ||
logLevel: 'error', | ||
stats: 'errors-only' | ||
webpack: { | ||
// Use standalone webpack config [0] rather | ||
// than Preact [1] or React [2] configs | ||
...webpackConfig.default[0], | ||
// Use Karma managed test entry points | ||
entry: undefined, | ||
// Use Karma default `os.tmpdir()` output | ||
output: undefined, | ||
// Suppress webpack performance warnings due to | ||
// Karma chunked output and inline source maps | ||
performance: { hints: false }, | ||
stats: { preset: 'errors-only' } | ||
} | ||
}) | ||
} |
require('dotenv').config() | ||
require('@babel/register')({ | ||
rootMode: 'upward' | ||
}) | ||
const { join } = require('path') | ||
const { cwd } = require('process') | ||
const puppeteer = require('puppeteer') | ||
const staticServerPort = process.env.PORT || 4567 | ||
const services = [ | ||
['static-server', { | ||
folders: [ | ||
{ mount: '/', path: './examples' }, | ||
{ mount: '/dist/', path: './dist' } | ||
], | ||
port: staticServerPort | ||
}] | ||
const { | ||
PORT = 4567, | ||
SAUCE_ACCESS_KEY, | ||
SAUCE_BUILD_NUMBER, | ||
SAUCE_ENABLED, | ||
SAUCE_USERNAME | ||
} = process.env | ||
/** | ||
* Browsers for local tests | ||
* | ||
* @type {RemoteCapabilities} | ||
*/ | ||
const capabilitiesLocal = [ | ||
{ | ||
browserName: 'chrome', | ||
'goog:chromeOptions': { | ||
args: ['--headless=new'], | ||
binary: puppeteer.executablePath() | ||
} | ||
} | ||
] | ||
const sauceEnabled = process.env.SAUCE_ENABLED === 'true' | ||
const sauceUser = process.env.SAUCE_USERNAME | ||
const sauceKey = process.env.SAUCE_ACCESS_KEY | ||
const buildNumber = process.env.SAUCE_BUILD_NUMBER | ||
const sauceConfig = sauceEnabled | ||
? { | ||
user: sauceUser, | ||
key: sauceKey, | ||
capabilities: [ | ||
{ | ||
browserName: 'chrome', | ||
platformName: 'Windows 10', | ||
'sauce:options': { | ||
build: buildNumber | ||
} | ||
}, | ||
{ | ||
browserName: 'firefox', | ||
browserVersion: '55', | ||
platformName: 'Windows 10', | ||
'sauce:options': { | ||
build: buildNumber | ||
} | ||
}, | ||
{ | ||
browserName: 'internet explorer', | ||
browserVersion: '11.285', | ||
platformName: 'Windows 10', | ||
'sauce:options': { | ||
build: buildNumber | ||
} | ||
}, | ||
{ | ||
browserName: 'internet explorer', | ||
browserVersion: '10', | ||
platformName: 'Windows 7', | ||
'sauce:options': { | ||
build: buildNumber | ||
} | ||
}, | ||
/* IE9 on Sauce Labs needs to use legacy JSON Wire Protocol */ | ||
{ | ||
browserName: 'internet explorer', | ||
version: '9', | ||
platform: 'Windows 7', | ||
build: buildNumber | ||
} | ||
], | ||
services: services.concat([['sauce', { sauceConnect: true }]]) | ||
/** | ||
* Browsers for Sauce Labs tests | ||
* | ||
* @type {RemoteCapabilities} | ||
*/ | ||
const capabilitiesSauce = [ | ||
{ | ||
browserName: 'chrome', | ||
browserVersion: 'latest', | ||
platformName: 'Windows 10', | ||
'sauce:options': { | ||
build: SAUCE_BUILD_NUMBER | ||
} | ||
}, | ||
{ | ||
browserName: 'firefox', | ||
browserVersion: '55', | ||
platformName: 'Windows 10', | ||
'sauce:options': { | ||
build: SAUCE_BUILD_NUMBER | ||
} | ||
}, | ||
{ | ||
browserName: 'internet explorer', | ||
browserVersion: 'latest', | ||
platformName: 'Windows 10', | ||
'sauce:options': { | ||
build: SAUCE_BUILD_NUMBER | ||
} | ||
} | ||
: {} | ||
] | ||
exports.config = Object.assign({ | ||
outputDir: './logs/', | ||
specs: ['./test/integration/**/*.js'], | ||
capabilities: [ | ||
// { browserName: 'firefox' }, | ||
{ | ||
browserName: 'chrome', | ||
'goog:chromeOptions': { | ||
args: ['--headless'], | ||
binary: puppeteer.executablePath() | ||
} | ||
} | ||
/** | ||
* WebdriverIO config | ||
* | ||
* @type {Testrunner} | ||
*/ | ||
exports.config = { | ||
user: SAUCE_USERNAME, | ||
key: SAUCE_ACCESS_KEY, | ||
// Use DevTools prototype for Puppeteer | ||
automationProtocol: SAUCE_ENABLED === 'true' | ||
? 'webdriver' | ||
: 'devtools', | ||
baseUrl: `http://localhost:${PORT}`, | ||
capabilities: SAUCE_ENABLED === 'true' | ||
? capabilitiesSauce | ||
: capabilitiesLocal, | ||
framework: 'mocha', | ||
outputDir: join(cwd(), 'logs'), | ||
reporters: ['spec'], | ||
services: [ | ||
/** | ||
* Web server options | ||
* | ||
* @type {[string, StaticServerOptions]} | ||
*/ | ||
['static-server', { | ||
folders: [ | ||
{ mount: '/', path: join(cwd(), 'examples') }, | ||
{ mount: '/dist/', path: join(cwd(), 'dist') } | ||
], | ||
port: PORT | ||
}], | ||
/** | ||
* Browser testing options | ||
* | ||
* @type {[string, SauceServiceConfig]} | ||
*/ | ||
['sauce', { | ||
// Optionally connect to Sauce Labs | ||
sauceConnect: SAUCE_ENABLED === 'true' | ||
}] | ||
], | ||
baseUrl: 'http://localhost:' + staticServerPort, | ||
screenshotPath: './screenshots/', | ||
services: services.concat(['selenium-standalone']), | ||
reporters: ['spec'], | ||
framework: 'mocha', | ||
mochaOpts: { timeout: 30 * 1000 } | ||
}, sauceConfig) | ||
specs: [join(cwd(), 'test/integration/**/*.js')], | ||
waitforTimeout: 30 * 10000 | ||
} | ||
/** | ||
* @typedef {import('@wdio/types').Options.Testrunner} Testrunner | ||
* @typedef {import('@wdio/types').Capabilities.RemoteCapabilities} RemoteCapabilities | ||
* @typedef {import('@wdio/static-server-service').StaticServerOptions} StaticServerOptions | ||
* @typedef {import('@wdio/sauce-service').SauceServiceConfig} SauceServiceConfig | ||
*/ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
1063882
45
46
3090
491
7
4
- Removedpreact@^8.3.1