payload 0.14.28-beta.0 → 0.14.29-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/components/index.js +3 -3
  3. package/components/styles.css +1 -1
  4. package/dist/admin/components/elements/Popup/index.js +27 -27
  5. package/dist/admin/components/elements/Popup/index.scss +0 -28
  6. package/dist/admin/components/elements/Popup/types.d.ts +2 -0
  7. package/dist/admin/components/forms/field-types/RichText/RichText.js +47 -45
  8. package/dist/admin/components/forms/field-types/RichText/elements/index.d.ts +2 -1
  9. package/dist/admin/components/forms/field-types/RichText/elements/injectVoid.d.ts +2 -0
  10. package/dist/admin/components/forms/field-types/RichText/elements/injectVoid.js +24 -0
  11. package/dist/admin/components/forms/field-types/RichText/elements/isLastSelectedElementEmpty.d.ts +2 -0
  12. package/dist/admin/components/forms/field-types/RichText/elements/isLastSelectedElementEmpty.js +12 -0
  13. package/dist/admin/components/forms/field-types/RichText/elements/isListActive.js +9 -11
  14. package/dist/admin/components/forms/field-types/RichText/elements/link/index.d.ts +2 -1
  15. package/dist/admin/components/forms/field-types/RichText/elements/link/index.js +19 -17
  16. package/dist/admin/components/forms/field-types/RichText/elements/link/utilities.d.ts +1 -2
  17. package/dist/admin/components/forms/field-types/RichText/elements/link/utilities.js +19 -20
  18. package/dist/admin/components/forms/field-types/RichText/elements/relationship/Button/index.js +2 -2
  19. package/dist/admin/components/forms/field-types/RichText/elements/upload/Button/index.js +2 -2
  20. package/dist/admin/components/forms/field-types/RichText/plugins/withEnterBreakOut.js +1 -1
  21. package/dist/fields/richText/defaultValue.d.ts +0 -1
  22. package/dist/fields/richText/defaultValue.js +1 -2
  23. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## [0.14.28-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.28-beta.0) (2022-03-02)
1
+ ## [0.14.29-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.29-beta.0) (2022-03-07)
2
2
 
3
3
 
4
4
  ### Bug Fixes
@@ -36,6 +36,7 @@
36
36
  * new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9))
37
37
  * optimizes relationship input search querying ([7e69fcb](https://github.com/payloadcms/payload/commit/7e69fcbc7d89012a7caff6e0e9013a9ad8a62a14))
38
38
  * prevents None from appearing in hasMany relationship select options ([cbf43fa](https://github.com/payloadcms/payload/commit/cbf43fa0d8ba50b7a9ef952f1693de6923068ffd))
39
+ * rare crash with link rte element ([f5535f6](https://github.com/payloadcms/payload/commit/f5535f613ac4d876d040be74b45e105e0f4775a8))
39
40
  * removes required from versions status field ([03c8445](https://github.com/payloadcms/payload/commit/03c8445a6d8d6ded719de44227dbbe928200427f))
40
41
  * rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517))
41
42
  * type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97))
@@ -87,7 +88,9 @@
87
88
  * implements versions in global ui ([eb4f957](https://github.com/payloadcms/payload/commit/eb4f9572b834ecce245633fe6a8cd07e39c8f1d4))
88
89
  * implements versions in globals, adds tests ([a59b14b](https://github.com/payloadcms/payload/commit/a59b14bd8c3114fe5dcd7917f7020e87d3155959))
89
90
  * improve code coverage for graphql versions ([26b13a8](https://github.com/payloadcms/payload/commit/26b13a81c35be473367b01a317e10b0c84e0b5ee))
91
+ * improves adding rich text voids to RTE ([966c3c6](https://github.com/payloadcms/payload/commit/966c3c647198569ba06013481a3b6fa9042b058d))
90
92
  * improves relationship field performance ([13318ff](https://github.com/payloadcms/payload/commit/13318ff3608a6be3dc7b86cc4e97155b26ef9df6))
93
+ * improves rich text link ([2e9a4c7](https://github.com/payloadcms/payload/commit/2e9a4c7d717e3a08b2982b8c49eb358baf23da17))
91
94
  * improves versions UI count and list view ([e81ba84](https://github.com/payloadcms/payload/commit/e81ba84ca7d9202a439b402df0060a4c33fdefb9))
92
95
  * indexes filenames ([07c8ac0](https://github.com/payloadcms/payload/commit/07c8ac08e21689cc6a3a2a546e58cf544fb61dec))
93
96
  * merges back in logic for non draft versions and draft versions ([ed8abd9](https://github.com/payloadcms/payload/commit/ed8abd94e6ebe429190e193aafec0da08c645752))
@@ -119,7 +122,7 @@
119
122
  * working autosave ([c62707c](https://github.com/payloadcms/payload/commit/c62707cd515c0a21da1dc2cd5a9c69f396d4baa0))
120
123
  * working drafts ([b00517e](https://github.com/payloadcms/payload/commit/b00517ec20851c7ce09cc73002f61cd808350d6c))
121
124
 
122
- ## [0.14.27-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.27-beta.0) (2022-03-01)
125
+ ## [0.14.28-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.28-beta.0) (2022-03-02)
123
126
 
124
127
  ### Bug Fixes
125
128
 
@@ -139,6 +142,7 @@
139
142
  * new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9))
140
143
  * rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517))
141
144
  * type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97))
145
+ * [#464](https://github.com/payloadcms/payload/issues/464), graphql upload access control ([fd0629e](https://github.com/payloadcms/payload/commit/fd0629e93202dfaa399c753c59481b1cbd139bf6))
142
146
 
143
147
  ### Features
144
148
 
@@ -1,4 +1,4 @@
1
- (()=>{var e={720:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(206));t.default=function(e){var t=e.children,n=o.default();return t?"function"==typeof t?t(n):t:null}},761:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(497).createContext({});t.default=r},788:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return c(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(497)),f=l(n(761)),p=function(e){function t(t){var n=e.call(this,t)||this;return n.requestAnimation=function(e){n.state.animationScheduled||n.setState({animationScheduled:!0},(function(){return requestAnimationFrame((function(t){return n.updateScrollInfo(e,t)}))}))},n.updateScrollInfo=function(e,t){var r=n.state,o=r.x,i=r.y,a=r.xDirection,c=r.yDirection,s=r.eventsFired,l=r.hasScrolled||Boolean(t),u=l?window.pageXOffset:0,f=l?window.pageYOffset:0,p=l?s+1:s,d=u-o,h=f-i,m=u/(document.body.scrollWidth-window.innerWidth)*100,v=f/(document.body.scrollHeight-window.innerHeight)*100,y=(m+v)/2,g=d>0?"right":d<0?"left":a,w=h>0?"down":h<0?"up":c;n.setState({x:u,y:f,xDifference:d,yDifference:h,xDirection:g,yDirection:w,xPercentage:m,yPercentage:v,totalPercentage:y,eventsFired:p,hasScrolled:l,animationScheduled:!1})},n.state={x:0,y:0,xDifference:0,yDifference:0,xDirection:void 0,yDirection:void 0,xPercentage:0,yPercentage:0,totalPercentage:0,eventsFired:0,hasScrolled:!1,animationScheduled:!1},n}return o(t,e),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.requestAnimation),this.updateScrollInfo()},t.prototype.componentWillUnmount=function(){window.removeEventListener("scroll",this.requestAnimation)},t.prototype.render=function(){var e=this.props.children,t=i({},this.state);return delete t.hasScrolled,delete t.animationScheduled,u.default.createElement(f.default.Provider,{value:i({},t)},e&&e)},t}(u.Component);t.default=p},719:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.withScrollInfo=t.useScrollInfo=t.ScrollInfoProvider=t.ScrollInfoContext=t.ScrollInfo=void 0;var o=n(720);Object.defineProperty(t,"ScrollInfo",{enumerable:!0,get:function(){return r(o).default}});var i=n(761);Object.defineProperty(t,"ScrollInfoContext",{enumerable:!0,get:function(){return r(i).default}});var a=n(788);Object.defineProperty(t,"ScrollInfoProvider",{enumerable:!0,get:function(){return r(a).default}});var c=n(206);Object.defineProperty(t,"useScrollInfo",{enumerable:!0,get:function(){return r(c).default}});var s=n(576);Object.defineProperty(t,"withScrollInfo",{enumerable:!0,get:function(){return r(s).default}})},206:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(497),i=r(n(761));t.default=function(){return o.useContext(i.default)}},576:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(497)),a=n(719);t.default=function(e){return function(t){var n=a.useScrollInfo();return i.default.createElement(e,r({},r(r({},t),{scrollInfo:n})))}}},698:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(796));t.default=function(e){var t=e.children,n=o.default();return t?"function"==typeof t?t(n):t:null}},181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(497).createContext({});t.default=r},71:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return c(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(497)),f=l(n(181)),p=function(e){function t(t){var n=e.call(this,t)||this;return n.updateWindowInfoWithTimeout=function(){setTimeout((function(){n.requestAnimation()}),500)},n.requestAnimation=function(){n.state.animationScheduled||n.setState({animationScheduled:!0},(function(){return requestAnimationFrame(n.updateWindowInfo)}))},n.updateWindowInfo=function(){var e=n.props.breakpoints,t=void 0===e?{}:e,r=t.xs,o=t.s,i=t.m,a=t.l,c=t.xl,s=n.state.eventsFired,l=document.documentElement,u=l.style,f=l.clientWidth,p=l.clientHeight,d=window.innerWidth,h=window.innerHeight,m=f/100+"px",v=p/100+"px";n.setState({width:d,height:h,"--vw":m,"--vh":v,breakpoints:{xs:window.matchMedia("(max-width: "+r+"px)").matches,s:window.matchMedia("(max-width: "+o+"px)").matches,m:window.matchMedia("(max-width: "+i+"px)").matches,l:window.matchMedia("(max-width: "+a+"px)").matches,xl:window.matchMedia("(max-width: "+c+"px)").matches},eventsFired:s+1,animationScheduled:!1}),u.setProperty("--vw",m),u.setProperty("--vh",v)},n.state={width:0,height:0,"--vw":"0px","--vh":"0px",breakpoints:{xs:!1,s:!1,m:!1,l:!1,xl:!1},eventsFired:0,animationScheduled:!1},n}return o(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.requestAnimation),window.addEventListener("orientationchange",this.updateWindowInfoWithTimeout),this.updateWindowInfo()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.requestAnimation),window.removeEventListener("orientationchange",this.updateWindowInfoWithTimeout)},t.prototype.render=function(){var e=this.props.children,t=i({},this.state);return delete t.animationScheduled,u.default.createElement(f.default.Provider,{value:i({},t)},e&&e)},t}(u.Component);t.default=p},727:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.withWindowInfo=t.WindowInfoProvider=t.WindowInfoContext=t.WindowInfo=t.useWindowInfo=void 0;var o=n(796);Object.defineProperty(t,"useWindowInfo",{enumerable:!0,get:function(){return r(o).default}});var i=n(698);Object.defineProperty(t,"WindowInfo",{enumerable:!0,get:function(){return r(i).default}});var a=n(181);Object.defineProperty(t,"WindowInfoContext",{enumerable:!0,get:function(){return r(a).default}});var c=n(71);Object.defineProperty(t,"WindowInfoProvider",{enumerable:!0,get:function(){return r(c).default}});var s=n(917);Object.defineProperty(t,"withWindowInfo",{enumerable:!0,get:function(){return r(s).default}})},796:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(497),i=r(n(181));t.default=function(){return o.useContext(i.default)}},917:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(497)),a=o(n(796));t.default=function(e){return function(t){var n=a.default();return i.default.createElement(e,r({},r(r({},t),{windowInfo:n})))}}},679:(e,t,n)=>{"use strict";var r=n(296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function s(e){return r.isMemo(e)?a:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&e(t,o,r)}var a=u(n);f&&(a=a.concat(f(n)));for(var c=s(t),m=s(n),v=0;v<a.length;++v){var y=a[v];if(!(i[y]||r&&r[y]||m&&m[y]||c&&c[y])){var g=p(n,y);try{l(t,y,g)}catch(e){}}}}return t}},103:(e,t)=>{"use strict";
1
+ (()=>{var e={720:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(206));t.default=function(e){var t=e.children,n=r.default();return t?"function"==typeof t?t(n):t:null}},761:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(497).createContext({});t.default=o},788:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return c(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(497)),f=l(n(761)),p=function(e){function t(t){var n=e.call(this,t)||this;return n.requestAnimation=function(e){n.state.animationScheduled||n.setState({animationScheduled:!0},(function(){return requestAnimationFrame((function(t){return n.updateScrollInfo(e,t)}))}))},n.updateScrollInfo=function(e,t){var o=n.state,r=o.x,i=o.y,a=o.xDirection,c=o.yDirection,s=o.eventsFired,l=o.hasScrolled||Boolean(t),u=l?window.pageXOffset:0,f=l?window.pageYOffset:0,p=l?s+1:s,d=u-r,h=f-i,m=u/(document.body.scrollWidth-window.innerWidth)*100,v=f/(document.body.scrollHeight-window.innerHeight)*100,y=(m+v)/2,g=d>0?"right":d<0?"left":a,w=h>0?"down":h<0?"up":c;n.setState({x:u,y:f,xDifference:d,yDifference:h,xDirection:g,yDirection:w,xPercentage:m,yPercentage:v,totalPercentage:y,eventsFired:p,hasScrolled:l,animationScheduled:!1})},n.state={x:0,y:0,xDifference:0,yDifference:0,xDirection:void 0,yDirection:void 0,xPercentage:0,yPercentage:0,totalPercentage:0,eventsFired:0,hasScrolled:!1,animationScheduled:!1},n}return r(t,e),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.requestAnimation),this.updateScrollInfo()},t.prototype.componentWillUnmount=function(){window.removeEventListener("scroll",this.requestAnimation)},t.prototype.render=function(){var e=this.props.children,t=i({},this.state);return delete t.hasScrolled,delete t.animationScheduled,u.default.createElement(f.default.Provider,{value:i({},t)},e&&e)},t}(u.Component);t.default=p},719:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.withScrollInfo=t.useScrollInfo=t.ScrollInfoProvider=t.ScrollInfoContext=t.ScrollInfo=void 0;var r=n(720);Object.defineProperty(t,"ScrollInfo",{enumerable:!0,get:function(){return o(r).default}});var i=n(761);Object.defineProperty(t,"ScrollInfoContext",{enumerable:!0,get:function(){return o(i).default}});var a=n(788);Object.defineProperty(t,"ScrollInfoProvider",{enumerable:!0,get:function(){return o(a).default}});var c=n(206);Object.defineProperty(t,"useScrollInfo",{enumerable:!0,get:function(){return o(c).default}});var s=n(576);Object.defineProperty(t,"withScrollInfo",{enumerable:!0,get:function(){return o(s).default}})},206:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(497),i=o(n(761));t.default=function(){return r.useContext(i.default)}},576:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(497)),a=n(719);t.default=function(e){return function(t){var n=a.useScrollInfo();return i.default.createElement(e,o({},o(o({},t),{scrollInfo:n})))}}},698:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(796));t.default=function(e){var t=e.children,n=r.default();return t?"function"==typeof t?t(n):t:null}},181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(497).createContext({});t.default=o},71:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},a=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return c(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(497)),f=l(n(181)),p=function(e){function t(t){var n=e.call(this,t)||this;return n.updateWindowInfoWithTimeout=function(){setTimeout((function(){n.requestAnimation()}),500)},n.requestAnimation=function(){n.state.animationScheduled||n.setState({animationScheduled:!0},(function(){return requestAnimationFrame(n.updateWindowInfo)}))},n.updateWindowInfo=function(){var e=n.props.breakpoints,t=void 0===e?{}:e,o=t.xs,r=t.s,i=t.m,a=t.l,c=t.xl,s=n.state.eventsFired,l=document.documentElement,u=l.style,f=l.clientWidth,p=l.clientHeight,d=window.innerWidth,h=window.innerHeight,m=f/100+"px",v=p/100+"px";n.setState({width:d,height:h,"--vw":m,"--vh":v,breakpoints:{xs:window.matchMedia("(max-width: "+o+"px)").matches,s:window.matchMedia("(max-width: "+r+"px)").matches,m:window.matchMedia("(max-width: "+i+"px)").matches,l:window.matchMedia("(max-width: "+a+"px)").matches,xl:window.matchMedia("(max-width: "+c+"px)").matches},eventsFired:s+1,animationScheduled:!1}),u.setProperty("--vw",m),u.setProperty("--vh",v)},n.state={width:0,height:0,"--vw":"0px","--vh":"0px",breakpoints:{xs:!1,s:!1,m:!1,l:!1,xl:!1},eventsFired:0,animationScheduled:!1},n}return r(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.requestAnimation),window.addEventListener("orientationchange",this.updateWindowInfoWithTimeout),this.updateWindowInfo()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.requestAnimation),window.removeEventListener("orientationchange",this.updateWindowInfoWithTimeout)},t.prototype.render=function(){var e=this.props.children,t=i({},this.state);return delete t.animationScheduled,u.default.createElement(f.default.Provider,{value:i({},t)},e&&e)},t}(u.Component);t.default=p},727:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.withWindowInfo=t.WindowInfoProvider=t.WindowInfoContext=t.WindowInfo=t.useWindowInfo=void 0;var r=n(796);Object.defineProperty(t,"useWindowInfo",{enumerable:!0,get:function(){return o(r).default}});var i=n(698);Object.defineProperty(t,"WindowInfo",{enumerable:!0,get:function(){return o(i).default}});var a=n(181);Object.defineProperty(t,"WindowInfoContext",{enumerable:!0,get:function(){return o(a).default}});var c=n(71);Object.defineProperty(t,"WindowInfoProvider",{enumerable:!0,get:function(){return o(c).default}});var s=n(917);Object.defineProperty(t,"withWindowInfo",{enumerable:!0,get:function(){return o(s).default}})},796:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(497),i=o(n(181));t.default=function(){return r.useContext(i.default)}},917:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(497)),a=r(n(796));t.default=function(e){return function(t){var n=a.default();return i.default.createElement(e,o({},o(o({},t),{windowInfo:n})))}}},679:(e,t,n)=>{"use strict";var o=n(296),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function s(e){return o.isMemo(e)?a:c[e.$$typeof]||r}c[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[o.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var r=d(n);r&&r!==h&&e(t,r,o)}var a=u(n);f&&(a=a.concat(f(n)));for(var c=s(t),m=s(n),v=0;v<a.length;++v){var y=a[v];if(!(i[y]||o&&o[y]||m&&m[y]||c&&c[y])){var g=p(n,y);try{l(t,y,g)}catch(e){}}}}return t}},103:(e,t)=>{"use strict";
2
2
  /** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case m:case s:return e;default:return t}}case o:return t}}}function _(e){return x(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=c,t.StrictMode=a,t.Suspense=d,t.isAsyncMode=function(e){return _(e)||x(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===v},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===a||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===b||e.$$typeof===y)},t.typeOf=x},296:(e,t,n)=>{"use strict";e.exports=n(103)},826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},658:(e,t,n)=>{var r=n(826);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,c="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],p=n[1],d=n.index;if(c+=e.slice(a,d),a=d+f.length,p)c+=p[1];else{var h=e[a],m=n[2],v=n[3],y=n[4],g=n[5],w=n[6],b=n[7];c&&(r.push(c),c="");var x=null!=m&&null!=h&&h!==m,_="+"===w||"*"===w,E="?"===w||"*"===w,O=n[2]||u,P=y||g;r.push({name:v||i++,prefix:m||"",delimiter:O,optional:E,repeat:_,partial:x,asterisk:!!b,pattern:P?l(P):b?".*":"[^"+s(O)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&r.push(c),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",c=t||{},s=(o||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var f,p=c[u.name];if(null==p){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=s(p[d]),!n[l].test(f))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?u.prefix:u.delimiter)+f}}else{if(f=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[l].test(f))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+f+'"');i+=u.prefix+f}}else i+=u}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=s(l);else{var p=s(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+p+d+")*"),a+=d=l.optional?l.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var h=s(n.delimiter||"/"),m=a.slice(-h.length)===h;return o||(a=(m?a.slice(0,-h.length):a)+"(?:"+h+"(?=$))?"),a+=i?"$":o&&m?"":"(?="+h+"|$)",u(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(d(e[o],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},86:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;
9
+ */var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case m:case s:return e;default:return t}}case r:return t}}}function _(e){return x(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=r,t.Profiler=c,t.StrictMode=a,t.Suspense=d,t.isAsyncMode=function(e){return _(e)||x(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===v},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===r},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===a||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===b||e.$$typeof===y)},t.typeOf=x},296:(e,t,n)=>{"use strict";e.exports=n(103)},826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},658:(e,t,n)=>{var o=n(826);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=p;var r=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,o=[],i=0,a=0,c="",u=t&&t.delimiter||"/";null!=(n=r.exec(e));){var f=n[0],p=n[1],d=n.index;if(c+=e.slice(a,d),a=d+f.length,p)c+=p[1];else{var h=e[a],m=n[2],v=n[3],y=n[4],g=n[5],w=n[6],b=n[7];c&&(o.push(c),c="");var x=null!=m&&null!=h&&h!==m,_="+"===w||"*"===w,E="?"===w||"*"===w,O=n[2]||u,P=y||g;o.push({name:v||i++,prefix:m||"",delimiter:O,optional:E,repeat:_,partial:x,asterisk:!!b,pattern:P?l(P):b?".*":"[^"+s(O)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&o.push(c),o}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"object"==typeof e[r]&&(n[r]=new RegExp("^(?:"+e[r].pattern+")$",f(t)));return function(t,r){for(var i="",c=t||{},s=(r||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var f,p=c[u.name];if(null==p){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(o(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=s(p[d]),!n[l].test(f))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?u.prefix:u.delimiter)+f}}else{if(f=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[l].test(f))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+f+'"');i+=u.prefix+f}}else i+=u}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){o(t)||(n=t||n,t=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=s(l);else{var p=s(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+p+d+")*"),a+=d=l.optional?l.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var h=s(n.delimiter||"/"),m=a.slice(-h.length)===h;return r||(a=(m?a.slice(0,-h.length):a)+"(?:"+h+"(?=$))?"),a+=i?"$":r&&m?"":"(?="+h+"|$)",u(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return o(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var o=0;o<n.length;o++)t.push({name:o,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):o(e)?function(e,t,n){for(var o=[],r=0;r<e.length;r++)o.push(d(e[r],t,n).source);return u(new RegExp("(?:"+o.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},86:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;
10
10
  /** @license React v16.13.1
11
11
  * react-is.production.min.js
12
12
  *
@@ -14,4 +14,4 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case m:case s:return e;default:return t}}case o:return t}}}function _(e){return x(e)===f}},663:(e,t,n)=>{"use strict";n(86)},497:e=>{"use strict";e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Banner:()=>Oe,Button:()=>me,Check:()=>je,Chevron:()=>ue,Menu:()=>Ce,MinimalTemplate:()=>Se,Pill:()=>Me,Popup:()=>_e,Search:()=>ke,X:()=>le});var e=n(497),t=n.n(e);function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function a(){return a=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},a.apply(this,arguments)}function c(e){return"/"===e.charAt(0)}function s(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}const l=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],i=e&&c(e),a=t&&c(t),l=i||a;if(e&&c(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var f=0,p=o.length;p>=0;p--){var d=o[p];"."===d?s(o,p):".."===d?(s(o,p),f++):f&&(s(o,p),f--)}if(!l)for(;f--;f)o.unshift("..");!l||""===o[0]||o[0]&&c(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var u="Invariant failed";function f(e,t){if(!e)throw new Error(u)}function p(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function v(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function y(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=a({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=l(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function g(){var e=null;var t=[];return{setPrompt:function(t){return t,function(){e===t&&null}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){!1,t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var w=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var x="popstate",_="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function O(e){void 0===e&&{},w||f(!1);var t,n=window.history,r=(-1===window.navigator.userAgent.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,s=void 0!==c&&c,l=i.getUserConfirmation,u=void 0===l?b:l,d=i.keyLength,O=void 0===d?6:d,P=e.basename?m(p(e.basename)):"";function S(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return P&&h(i,P),y(i,r,n)}function j(){return Math.random().toString(36).substr(2,O)}var k=g();function C(e){a(F,e),F.length=n.length,k.notifyListeners(F.location,F.action)}function T(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||A(S(e.state))}function M(){A(S(E()))}var N=!1;function A(e){if(N)!1,C();else{k.confirmTransitionTo(e,"POP",u,(function(t){t?C({action:"POP",location:e}):function(e){var t=F.location,n=L.indexOf(t.key);-1===n&&0;var r=L.indexOf(e.key);-1===r&&0;var o=n-r;o&&(!0,$(o))}(e)}))}}var I=S(E()),L=[I.key];function R(e){return P+v(e)}function $(e){n.go(e)}var D=0;function W(e){1===(D+=e)&&1===e?(window.addEventListener(x,T),o&&window.addEventListener(_,M)):0===D&&(window.removeEventListener(x,T),o&&window.removeEventListener(_,M))}var B=!1;var F={length:n.length,action:"POP",location:I,createHref:R,push:function(e,t){var o="PUSH",i=y(e,t,j(),F.location);k.confirmTransitionTo(i,o,u,(function(e){if(e){var t=R(i),a=i.key,c=i.state;if(r)if(n.pushState({key:a,state:c},null,t),s)window.location.href=t;else{var l=L.indexOf(F.location.key),u=L.slice(0,l+1);u.push(i.key),u,C({action:o,location:i})}else window.location.href=t}}))},replace:function(e,t){var o="REPLACE",i=y(e,t,j(),F.location);k.confirmTransitionTo(i,o,u,(function(e){if(e){var t=R(i),a=i.key,c=i.state;if(r)if(n.replaceState({key:a,state:c},null,t),s)window.location.replace(t);else{var l=L.indexOf(F.location.key);-1!==l&&(L[l]=i.key),C({action:o,location:i})}else window.location.replace(t)}}))},go:$,goBack:function(){$(-1)},goForward:function(){$(1)},block:function(e){void 0===e&&!1;var t=k.setPrompt(e);return B||(W(1),!0),function(){return B&&(!1,W(-1)),t()}},listen:function(e){var t=k.appendListener(e);return W(1),function(){W(-1),t()}}};return F}var P="hashchange",S={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:p},slash:{encodePath:p,decodePath:p}};function j(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function k(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(j(window.location.href)+"#"+e)}function T(e){void 0===e&&{},w||f(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,o=void 0===r?b:r,i=n.hashType,c=void 0===i?"slash":i,s=e.basename?m(p(e.basename)):"",l=S[c],u=l.encodePath,d=l.decodePath;function x(){var e=d(k());return s&&h(e,s),y(e)}var _=g();function E(e){a(B,e),B.length=t.length,_.notifyListeners(B.location,B.action)}var O=!1,T=null;function M(){var e,t,n=k(),r=u(n);if(n!==r)C(r);else{var i=x(),a=B.location;if(!O&&(i,a.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(T===v(i))return;null,function(e){if(O)!1,E();else{var t="POP";_.confirmTransitionTo(e,t,o,(function(n){n?E({action:t,location:e}):function(e){var t=B.location,n=L.lastIndexOf(v(t));-1===n&&0;var r=L.lastIndexOf(v(e));-1===r&&0;var o=n-r;o&&(!0,R(o))}(e)}))}}(i)}}var N=k(),A=u(N);N!==A&&C(A);var I=x(),L=[v(I)];function R(e){t.go(e)}var $=0;function D(e){1===($+=e)&&1===e?window.addEventListener(P,M):0===$&&window.removeEventListener(P,M)}var W=!1;var B={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&j(window.location.href),n+"#"+u(s+v(e))},push:function(e,t){var n="PUSH",r=y(e,void 0,void 0,B.location);_.confirmTransitionTo(r,n,o,(function(e){if(e){var t=v(r),o=u(s+t);if(k()!==o){t,function(e){window.location.hash=e}(o);var i=L.lastIndexOf(v(B.location)),a=L.slice(0,i+1);a.push(t),a,E({action:n,location:r})}else E()}}))},replace:function(e,t){var n="REPLACE",r=y(e,void 0,void 0,B.location);_.confirmTransitionTo(r,n,o,(function(e){if(e){var t=v(r),o=u(s+t);k()!==o&&(t,C(o));var i=L.indexOf(v(B.location));-1!==i&&(L[i]=t),E({action:n,location:r})}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(e){void 0===e&&!1;var t=_.setPrompt(e);return W||(D(1),!0),function(){return W&&(!1,D(-1)),t()}},listen:function(e){var t=_.appendListener(e);return D(1),function(){D(-1),t()}}};return B}function M(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){void 0===e&&{};var t=e,n=t.getUserConfirmation,r=t.initialEntries,o=void 0===r?["/"]:r,i=t.initialIndex,c=void 0===i?0:i,s=t.keyLength,l=void 0===s?6:s,u=g();function f(e){a(b,e),b.length=b.entries.length,u.notifyListeners(b.location,b.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=M(c,0,o.length-1),h=o.map((function(e){return y(e,void 0,"string"==typeof e?p():e.key||p())})),m=v;function w(e){var t=M(b.index+e,0,b.entries.length-1),r=b.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var b={length:h.length,action:"POP",location:h[d],index:d,entries:h,createHref:m,push:function(e,t){var r="PUSH",o=y(e,t,p(),b.location);u.confirmTransitionTo(o,r,n,(function(e){if(e){var t=b.index+1,n=b.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),f({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=y(e,t,p(),b.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(b.entries[b.index]=o,f({action:r,location:o}))}))},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},canGo:function(e){var t=b.index+e;return t>=0&&t<b.entries.length},block:function(e){return void 0===e&&!1,u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return b}var A=n(697),I=n.n(A),L=1073741823,R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function $(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var D=t().createContext||function(t,n){var r,o,a="__create-react-context-"+function(){var e="__global_unique_id__";return R[e]=(R[e]||0)+1}()+"__",c=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).emitter=$(t.props.value),t}i(t,e);var r=t.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var t,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?t=0:(t="function"==typeof n?n(r,o):L,0!==(t|=0)&&this.emitter.set(e.value,t))}var i,a},r.render=function(){return this.props.children},t}(e.Component);c.childContextTypes=((r={})[a]=I().object.isRequired,r);var s=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}i(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?L:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?L:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():t},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(e.Component);return s.contextTypes=((o={})[a]=I().object,o),{Provider:c,Consumer:s}};const W=D;var B=n(658),F=n.n(B);n(663);function U(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n(679);var q=function(e){var t=W();return t.displayName=e,t},H=q("Router-History"),z=q("Router"),V=function(e){function n(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}i(n,e),n.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var r=n.prototype;return r.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return t().createElement(z.Provider,{value:{history:this.props.history,location:this.state.location,match:n.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},t().createElement(H.Provider,{children:this.props.children||null,value:this.props.history}))},n}(t().Component);t().Component;t().Component;var K={},J=0;function X(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=K[n]||(K[n]={});if(r[e])return r[e];var o=[],i={regexp:F()(e,o,t),keys:o};return J<1e4&&(r[e]=i,J++),i}(n,{end:i,strict:c,sensitive:l}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var u=s[0],f=s.slice(1),p=e===u;return i&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}t().Component;function Y(e){return"/"===e.charAt(0)?e:"/"+e}function G(e,t){if(!e)return t;var n=Y(e);return 0!==t.pathname.indexOf(n)?t:a({},t,{pathname:t.pathname.substr(n.length)})}function Q(e){return"string"==typeof e?e:v(e)}function Z(e){return function(){f(!1)}}function ee(){}t().Component;t().Component;t().useContext;t().Component;t().Component;var te=function(e,t){return"function"==typeof e?e(t):e},ne=function(e,t){return"string"==typeof e?y(e,null,null,t):e},re=function(e){return e},oe=t().forwardRef;void 0===oe&&(oe=re);var ie=oe((function(e,n){var r=e.innerRef,o=e.navigate,i=e.onClick,c=U(e,["innerRef","navigate","onClick"]),s=c.target,l=a({},c,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),o())}});return l.ref=re!==oe&&n||r,t().createElement("a",l)}));var ae=oe((function(e,n){var r=e.component,o=void 0===r?ie:r,i=e.replace,c=e.to,s=e.innerRef,l=U(e,["component","replace","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||f(!1);var r=e.history,u=ne(te(c,e.location),e.location),p=u?r.createHref(u):"",d=a({},l,{href:p,navigate:function(){var t=te(c,e.location),n=v(e.location)===v(ne(t));(i||n?r.replace:r.push)(t)}});return re!==oe?d.ref=n||s:d.innerRef=s,t().createElement(o,d)}))})),ce=function(e){return e},se=t().forwardRef;void 0===se&&(se=ce);se((function(e,n){var r=e["aria-current"],o=void 0===r?"page":r,i=e.activeClassName,c=void 0===i?"active":i,s=e.activeStyle,l=e.className,u=e.exact,p=e.isActive,d=e.location,h=e.sensitive,m=e.strict,v=e.style,y=e.to,g=e.innerRef,w=U(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||f(!1);var r=d||e.location,i=ne(te(y,r),r),b=i.pathname,x=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=x?X(r.pathname,{path:x,exact:u,sensitive:h,strict:m}):null,E=!!(p?p(_,r):_),O="function"==typeof l?l(E):l,P="function"==typeof v?v(E):v;E&&(O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(O,c),P=a({},P,s));var S=a({"aria-current":E&&o||null,className:O,style:P,to:i},w);return ce!==se?S.ref=n||g:S.innerRef=g,t().createElement(ae,S)}))}));const le=()=>t().createElement("svg",{width:"25",height:"25",className:"icon icon--x",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{className:"stroke",x1:"8.74612",y1:"16.347",x2:"16.3973",y2:"8.69584"}),t().createElement("line",{className:"stroke",x1:"8.6027",y1:"8.69585",x2:"16.2539",y2:"16.3471"})),ue=e=>{let{className:n}=e;return t().createElement("svg",{className:["icon icon--chevron",n].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{className:"stroke",d:"M9 10.5L12.5 14.5L16 10.5"}))},fe=e=>{const{className:n,children:r}=e,o=["tooltip",n].filter(Boolean).join(" ");return t().createElement("aside",{className:o},r,t().createElement("span",null))},pe={plus:()=>t().createElement("svg",{className:"icon icon--plus",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{x1:"12.4589",y1:"16.9175",x2:"12.4589",y2:"8.50115",className:"stroke"}),t().createElement("line",{x1:"8.05164",y1:"12.594",x2:"16.468",y2:"12.594",className:"stroke"})),x:le,chevron:ue,edit:()=>t().createElement("svg",{className:"icon icon--edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("polygon",{className:"fill",points:"16.92 16.86 8.25 16.86 8.25 8.21 12.54 8.21 12.54 6.63 6.68 6.63 6.68 18.43 18.5 18.43 18.5 12.53 16.92 12.53 16.92 16.86"}),t().createElement("polygon",{className:"fill",points:"16.31 7.33 17.42 8.44 12.66 13.2 11.51 13.24 11.55 12.09 16.31 7.33"}),t().createElement("rect",{className:"fill",x:"16.94",y:"6.44",width:"1.58",height:"1.15",transform:"translate(10.16 -10.48) rotate(45)"})),swap:()=>t().createElement("svg",{className:"icon icon--swap",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M9.84631 4.78679L6.00004 8.63306L9.84631 12.4793",className:"stroke"}),t().createElement("path",{d:"M15.1537 20.1059L19 16.2596L15.1537 12.4133",className:"stroke"}),t().createElement("line",{x1:"7",y1:"8.7013",x2:"15",y2:"8.7013",stroke:"#333333",className:"stroke"}),t().createElement("line",{x1:"18",y1:"16.1195",x2:"10",y2:"16.1195",className:"stroke"}))},de="btn",he=n=>{let{children:r,icon:o,tooltip:i}=n;const a=pe[o];return t().createElement("span",{className:"".concat(de,"__content")},i&&t().createElement(fe,{className:"".concat(de,"__tooltip")},i),r&&t().createElement("span",{className:"".concat(de,"__label")},r),o&&t().createElement("span",{className:"".concat(de,"__icon")},(0,e.isValidElement)(o)&&o,a&&t().createElement(a,null)))},me=e=>{const{className:n,type:r="button",el:o,to:i,url:a,children:c,onClick:s,disabled:l,icon:u,iconStyle:f="without-border",buttonStyle:p="primary",round:d,size:h="medium",iconPosition:m="right",newTab:v,tooltip:y}=e,g=[de,n&&n,p&&"".concat(de,"--style-").concat(p),u&&"".concat(de,"--icon"),f&&"".concat(de,"--icon-style-").concat(f),u&&!c&&"".concat(de,"--icon-only"),l&&"".concat(de,"--disabled"),d&&"".concat(de,"--round"),h&&"".concat(de,"--size-").concat(h),m&&"".concat(de,"--icon-position-").concat(m),y&&"".concat(de,"--has-tooltip")].filter(Boolean).join(" ");const w={type:r,className:g,disabled:l,onClick:l?void 0:function(e){"submit"!==r&&s&&e.preventDefault(),s&&s(e)},rel:v?"noopener noreferrer":void 0,target:v?"_blank":void 0};switch(o){case"link":return t().createElement(ae,{...w,to:i||a},t().createElement(he,{icon:u,tooltip:y},c));case"anchor":return t().createElement("a",{...w,href:a},t().createElement(he,{icon:u,tooltip:y},c));default:return t().createElement("button",{type:"submit",...w},t().createElement(he,{icon:u,tooltip:y},c))}};var ve=n(727),ye=n(719);const ge=function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const o=(0,e.useRef)(Date.now());(0,e.useEffect)((()=>{const e=setTimeout((()=>{Date.now()-o.current>=n&&(t(),o.current=Date.now())}),n-(Date.now()-o.current));return()=>{clearTimeout(e)}}),[n,...r])},we="popup-button",be=e=>{const{buttonType:n,button:r,setActive:o,active:i}=e,a=[we,"".concat(we,"--").concat(n)].filter(Boolean).join(" "),c=()=>{o(!i)};return"none"===n?null:"custom"===n?t().createElement("div",{role:"button",tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&c()},onClick:c,className:a},r):t().createElement("button",{type:"button",onClick:()=>o(!i),className:a},r)},xe="popup",_e=n=>{const{className:r,render:o,size:i="small",color:a="light",button:c,buttonType:s="default",children:l,showOnHover:u=!1,horizontalAlign:f="left",initActive:p=!1,onToggleOpen:d,padding:h,forceOpen:m}=n,v=(0,e.useRef)(null),y=(0,e.useRef)(null),[g,w]=(0,e.useState)(p),[b,x]=(0,e.useState)("top"),[_,E]=(0,e.useState)(null),{y:O}=(0,ye.useScrollInfo)(),{height:P}=(0,ve.useWindowInfo)(),S=e=>{y.current.contains(e.target)||w(!1)};ge((()=>{if(y.current&&v.current){const{height:e,width:t,right:n}=y.current.getBoundingClientRect(),{y:r}=v.current.getBoundingClientRect(),o=window.innerWidth-n,i=n-t;E("left"===f&&o<=0?"right":"right"===f&&i<=0?"left":"center"===f&&(i<=t/2||o<=t/2)?o>i?"left":"right":null),x(r>e?"top":"bottom")}}),500,[x,y,O,P]),(0,e.useEffect)((()=>("function"==typeof d&&d(g),g?document.addEventListener("mousedown",S):document.removeEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)})),[g,d]),(0,e.useEffect)((()=>{w(m)}),[m]);const j=[xe,r,"".concat(xe,"--size-").concat(i),"".concat(xe,"--color-").concat(a),"".concat(xe,"--v-align-").concat(b),"".concat(xe,"--h-align-").concat(f),_&&"".concat(xe,"--force-h-align-").concat(_),g&&"".concat(xe,"--active")].filter(Boolean).join(" ");return t().createElement("div",{className:j},t().createElement("div",{ref:v,className:"".concat(xe,"__wrapper")},u?t().createElement("div",{className:"".concat(xe,"__on-hover-watch"),onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1)},t().createElement(be,{buttonType:s,button:c,setActive:w,active:g})):t().createElement(be,{buttonType:s,button:c,setActive:w,active:g})),t().createElement("div",{className:"".concat(xe,"__content"),ref:y},t().createElement("div",{className:"".concat(xe,"__wrap")},t().createElement("div",{className:"".concat(xe,"__scroll"),style:{padding:h}},o&&o({close:()=>w(!1)}),l&&l))))},Ee="banner",Oe=e=>{let{children:n,className:r,to:o,icon:i,alignIcon:a="right",onClick:c,type:s="default"}=e;const l=[Ee,"".concat(Ee,"--type-").concat(s),r&&r,o&&"".concat(Ee,"--has-link"),(o||c)&&"".concat(Ee,"--has-action"),i&&"".concat(Ee,"--has-icon"),i&&"".concat(Ee,"--align-icon-").concat(a)].filter(Boolean).join(" ");let u="div";return c&&!o&&(u="button"),o&&(u=ae),t().createElement(u,{className:l,onClick:c,to:o||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),t().createElement("span",{className:"".concat(Ee,"__content")},n),i&&"right"===a&&t().createElement(t().Fragment,null,i))},Pe="template-minimal",Se=e=>{const{className:n,style:r={},children:o,width:i="normal"}=e,a=[n,Pe,"".concat(Pe,"--width-").concat(i)].filter(Boolean).join(" ");return t().createElement("section",{className:a,style:r},t().createElement("div",{className:"".concat(Pe,"__wrap")},o))},je=()=>t().createElement("svg",{className:"icon icon--check",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M10.6092 16.0192L17.6477 8.98076",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"}),t().createElement("path",{d:"M7.35229 12.7623L10.6092 16.0192",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"})),ke=()=>t().createElement("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"icon icon--search"},t().createElement("circle",{cx:"11.2069",cy:"10.7069",r:"5",stroke:"#333333",strokeWidth:"2"}),t().createElement("line",{x1:"14.914",y1:"13.9998",x2:"20.5002",y2:"19.586",stroke:"#333333",strokeWidth:"2"})),Ce=()=>t().createElement("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("rect",{x:"3.5",y:"4.5",width:"18",height:"2",fill:"#333333"}),t().createElement("rect",{x:"3.5",y:"11.5",width:"18",height:"2",fill:"#333333"}),t().createElement("rect",{x:"3.5",y:"18.5",width:"18",height:"2",fill:"#333333"})),Te="pill",Me=e=>{let{children:n,className:r,to:o,icon:i,alignIcon:a="right",onClick:c,pillStyle:s="light"}=e;const l=[Te,"".concat(Te,"--style-").concat(s),r&&r,o&&"".concat(Te,"--has-link"),(o||c)&&"".concat(Te,"--has-action"),i&&"".concat(Te,"--has-icon"),i&&"".concat(Te,"--align-icon-").concat(a)].filter(Boolean).join(" ");let u="div";return c&&!o&&(u="button"),o&&(u=ae),t().createElement(u,{className:l,onClick:c,type:"button"===u?"button":void 0,to:o||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),n,i&&"right"===a&&t().createElement(t().Fragment,null,i))}})(),module.exports=r})();
17
+ */function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case m:case s:return e;default:return t}}case r:return t}}}function _(e){return x(e)===f}},663:(e,t,n)=>{"use strict";n(86)},497:e=>{"use strict";e.exports=require("react")}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Banner:()=>Oe,Button:()=>me,Check:()=>je,Chevron:()=>ue,Menu:()=>Ce,MinimalTemplate:()=>Se,Pill:()=>Me,Popup:()=>_e,Search:()=>ke,X:()=>le});var e=n(497),t=n.n(e);function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a.apply(this,arguments)}function c(e){return"/"===e.charAt(0)}function s(e,t){for(var n=t,o=n+1,r=e.length;o<r;n+=1,o+=1)e[n]=e[o];e.pop()}const l=function(e,t){void 0===t&&(t="");var n,o=e&&e.split("/")||[],r=t&&t.split("/")||[],i=e&&c(e),a=t&&c(t),l=i||a;if(e&&c(e)?r=o:o.length&&(r.pop(),r=r.concat(o)),!r.length)return"/";if(r.length){var u=r[r.length-1];n="."===u||".."===u||""===u}else n=!1;for(var f=0,p=r.length;p>=0;p--){var d=r[p];"."===d?s(r,p):".."===d?(s(r,p),f++):f&&(s(r,p),f--)}if(!l)for(;f--;f)r.unshift("..");!l||""===r[0]||r[0]&&c(r[0])||r.unshift("");var h=r.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var u="Invariant failed";function f(e,t){if(!e)throw new Error(u)}function p(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function v(e){var t=e.pathname,n=e.search,o=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function y(e,t,n,o){var r;"string"==typeof e?(r=function(e){var t=e||"/",n="",o="",r=t.indexOf("#");-1!==r&&(o=t.substr(r),t=t.substr(0,r));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===o?"":o}}(e),r.state=t):(void 0===(r=a({},e)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==t&&void 0===r.state&&(r.state=t));try{r.pathname=decodeURI(r.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=l(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function g(){var e=null;var t=[];return{setPrompt:function(t){return t,function(){e===t&&null}},confirmTransitionTo:function(t,n,o,r){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(!1!==i)}else r(!0)},appendListener:function(e){var n=!0;function o(){n&&e.apply(void 0,arguments)}return t.push(o),function(){!1,t.filter((function(e){return e!==o}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.forEach((function(e){return e.apply(void 0,n)}))}}}var w=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var x="popstate",_="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function O(e){void 0===e&&{},w||f(!1);var t,n=window.history,o=(-1===window.navigator.userAgent.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,r=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,c=i.forceRefresh,s=void 0!==c&&c,l=i.getUserConfirmation,u=void 0===l?b:l,d=i.keyLength,O=void 0===d?6:d,P=e.basename?m(p(e.basename)):"";function S(e){var t=e||{},n=t.key,o=t.state,r=window.location,i=r.pathname+r.search+r.hash;return P&&h(i,P),y(i,o,n)}function j(){return Math.random().toString(36).substr(2,O)}var k=g();function C(e){a(F,e),F.length=n.length,k.notifyListeners(F.location,F.action)}function T(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||A(S(e.state))}function M(){A(S(E()))}var N=!1;function A(e){if(N)!1,C();else{k.confirmTransitionTo(e,"POP",u,(function(t){t?C({action:"POP",location:e}):function(e){var t=F.location,n=L.indexOf(t.key);-1===n&&0;var o=L.indexOf(e.key);-1===o&&0;var r=n-o;r&&(!0,$(r))}(e)}))}}var I=S(E()),L=[I.key];function R(e){return P+v(e)}function $(e){n.go(e)}var D=0;function W(e){1===(D+=e)&&1===e?(window.addEventListener(x,T),r&&window.addEventListener(_,M)):0===D&&(window.removeEventListener(x,T),r&&window.removeEventListener(_,M))}var B=!1;var F={length:n.length,action:"POP",location:I,createHref:R,push:function(e,t){var r="PUSH",i=y(e,t,j(),F.location);k.confirmTransitionTo(i,r,u,(function(e){if(e){var t=R(i),a=i.key,c=i.state;if(o)if(n.pushState({key:a,state:c},null,t),s)window.location.href=t;else{var l=L.indexOf(F.location.key),u=L.slice(0,l+1);u.push(i.key),u,C({action:r,location:i})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",i=y(e,t,j(),F.location);k.confirmTransitionTo(i,r,u,(function(e){if(e){var t=R(i),a=i.key,c=i.state;if(o)if(n.replaceState({key:a,state:c},null,t),s)window.location.replace(t);else{var l=L.indexOf(F.location.key);-1!==l&&(L[l]=i.key),C({action:r,location:i})}else window.location.replace(t)}}))},go:$,goBack:function(){$(-1)},goForward:function(){$(1)},block:function(e){void 0===e&&!1;var t=k.setPrompt(e);return B||(W(1),!0),function(){return B&&(!1,W(-1)),t()}},listen:function(e){var t=k.appendListener(e);return W(1),function(){W(-1),t()}}};return F}var P="hashchange",S={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:p},slash:{encodePath:p,decodePath:p}};function j(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function k(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(j(window.location.href)+"#"+e)}function T(e){void 0===e&&{},w||f(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,r=void 0===o?b:o,i=n.hashType,c=void 0===i?"slash":i,s=e.basename?m(p(e.basename)):"",l=S[c],u=l.encodePath,d=l.decodePath;function x(){var e=d(k());return s&&h(e,s),y(e)}var _=g();function E(e){a(B,e),B.length=t.length,_.notifyListeners(B.location,B.action)}var O=!1,T=null;function M(){var e,t,n=k(),o=u(n);if(n!==o)C(o);else{var i=x(),a=B.location;if(!O&&(i,a.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(T===v(i))return;null,function(e){if(O)!1,E();else{var t="POP";_.confirmTransitionTo(e,t,r,(function(n){n?E({action:t,location:e}):function(e){var t=B.location,n=L.lastIndexOf(v(t));-1===n&&0;var o=L.lastIndexOf(v(e));-1===o&&0;var r=n-o;r&&(!0,R(r))}(e)}))}}(i)}}var N=k(),A=u(N);N!==A&&C(A);var I=x(),L=[v(I)];function R(e){t.go(e)}var $=0;function D(e){1===($+=e)&&1===e?window.addEventListener(P,M):0===$&&window.removeEventListener(P,M)}var W=!1;var B={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&j(window.location.href),n+"#"+u(s+v(e))},push:function(e,t){var n="PUSH",o=y(e,void 0,void 0,B.location);_.confirmTransitionTo(o,n,r,(function(e){if(e){var t=v(o),r=u(s+t);if(k()!==r){t,function(e){window.location.hash=e}(r);var i=L.lastIndexOf(v(B.location)),a=L.slice(0,i+1);a.push(t),a,E({action:n,location:o})}else E()}}))},replace:function(e,t){var n="REPLACE",o=y(e,void 0,void 0,B.location);_.confirmTransitionTo(o,n,r,(function(e){if(e){var t=v(o),r=u(s+t);k()!==r&&(t,C(r));var i=L.indexOf(v(B.location));-1!==i&&(L[i]=t),E({action:n,location:o})}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(e){void 0===e&&!1;var t=_.setPrompt(e);return W||(D(1),!0),function(){return W&&(!1,D(-1)),t()}},listen:function(e){var t=_.appendListener(e);return D(1),function(){D(-1),t()}}};return B}function M(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){void 0===e&&{};var t=e,n=t.getUserConfirmation,o=t.initialEntries,r=void 0===o?["/"]:o,i=t.initialIndex,c=void 0===i?0:i,s=t.keyLength,l=void 0===s?6:s,u=g();function f(e){a(b,e),b.length=b.entries.length,u.notifyListeners(b.location,b.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=M(c,0,r.length-1),h=r.map((function(e){return y(e,void 0,"string"==typeof e?p():e.key||p())})),m=v;function w(e){var t=M(b.index+e,0,b.entries.length-1),o=b.entries[t];u.confirmTransitionTo(o,"POP",n,(function(e){e?f({action:"POP",location:o,index:t}):f()}))}var b={length:h.length,action:"POP",location:h[d],index:d,entries:h,createHref:m,push:function(e,t){var o="PUSH",r=y(e,t,p(),b.location);u.confirmTransitionTo(r,o,n,(function(e){if(e){var t=b.index+1,n=b.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),f({action:o,location:r,index:t,entries:n})}}))},replace:function(e,t){var o="REPLACE",r=y(e,t,p(),b.location);u.confirmTransitionTo(r,o,n,(function(e){e&&(b.entries[b.index]=r,f({action:o,location:r}))}))},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},canGo:function(e){var t=b.index+e;return t>=0&&t<b.entries.length},block:function(e){return void 0===e&&!1,u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return b}var A=n(697),I=n.n(A),L=1073741823,R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function $(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,o){e=n,t.forEach((function(t){return t(e,o)}))}}}var D=t().createContext||function(t,n){var o,r,a="__create-react-context-"+function(){var e="__global_unique_id__";return R[e]=(R[e]||0)+1}()+"__",c=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).emitter=$(t.props.value),t}i(t,e);var o=t.prototype;return o.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},o.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var t,o=this.props.value,r=e.value;((i=o)===(a=r)?0!==i||1/i==1/a:i!=i&&a!=a)?t=0:(t="function"==typeof n?n(o,r):L,0!==(t|=0)&&this.emitter.set(e.value,t))}var i,a},o.render=function(){return this.props.children},t}(e.Component);c.childContextTypes=((o={})[a]=I().object.isRequired,o);var s=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}i(n,e);var o=n.prototype;return o.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?L:t},o.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?L:e},o.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},o.getValue=function(){return this.context[a]?this.context[a].get():t},o.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(e.Component);return s.contextTypes=((r={})[a]=I().object,r),{Provider:c,Consumer:s}};const W=D;var B=n(658),F=n.n(B);n(663);function U(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}n(679);var q=function(e){var t=W();return t.displayName=e,t},H=q("Router-History"),z=q("Router"),V=function(e){function n(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}i(n,e),n.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var o=n.prototype;return o.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},o.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},o.render=function(){return t().createElement(z.Provider,{value:{history:this.props.history,location:this.state.location,match:n.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},t().createElement(H.Provider,{children:this.props.children||null,value:this.props.history}))},n}(t().Component);t().Component;t().Component;var K={},J=0;function X(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,o=n.path,r=n.exact,i=void 0!==r&&r,a=n.strict,c=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(o).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var o=function(e,t){var n=""+t.end+t.strict+t.sensitive,o=K[n]||(K[n]={});if(o[e])return o[e];var r=[],i={regexp:F()(e,r,t),keys:r};return J<1e4&&(o[e]=i,J++),i}(n,{end:i,strict:c,sensitive:l}),r=o.regexp,a=o.keys,s=r.exec(e);if(!s)return null;var u=s[0],f=s.slice(1),p=e===u;return i&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}t().Component;function Y(e){return"/"===e.charAt(0)?e:"/"+e}function G(e,t){if(!e)return t;var n=Y(e);return 0!==t.pathname.indexOf(n)?t:a({},t,{pathname:t.pathname.substr(n.length)})}function Q(e){return"string"==typeof e?e:v(e)}function Z(e){return function(){f(!1)}}function ee(){}t().Component;t().Component;t().useContext;t().Component;t().Component;var te=function(e,t){return"function"==typeof e?e(t):e},ne=function(e,t){return"string"==typeof e?y(e,null,null,t):e},oe=function(e){return e},re=t().forwardRef;void 0===re&&(re=oe);var ie=re((function(e,n){var o=e.innerRef,r=e.navigate,i=e.onClick,c=U(e,["innerRef","navigate","onClick"]),s=c.target,l=a({},c,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return l.ref=oe!==re&&n||o,t().createElement("a",l)}));var ae=re((function(e,n){var o=e.component,r=void 0===o?ie:o,i=e.replace,c=e.to,s=e.innerRef,l=U(e,["component","replace","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||f(!1);var o=e.history,u=ne(te(c,e.location),e.location),p=u?o.createHref(u):"",d=a({},l,{href:p,navigate:function(){var t=te(c,e.location),n=v(e.location)===v(ne(t));(i||n?o.replace:o.push)(t)}});return oe!==re?d.ref=n||s:d.innerRef=s,t().createElement(r,d)}))})),ce=function(e){return e},se=t().forwardRef;void 0===se&&(se=ce);se((function(e,n){var o=e["aria-current"],r=void 0===o?"page":o,i=e.activeClassName,c=void 0===i?"active":i,s=e.activeStyle,l=e.className,u=e.exact,p=e.isActive,d=e.location,h=e.sensitive,m=e.strict,v=e.style,y=e.to,g=e.innerRef,w=U(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return t().createElement(z.Consumer,null,(function(e){e||f(!1);var o=d||e.location,i=ne(te(y,o),o),b=i.pathname,x=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=x?X(o.pathname,{path:x,exact:u,sensitive:h,strict:m}):null,E=!!(p?p(_,o):_),O="function"==typeof l?l(E):l,P="function"==typeof v?v(E):v;E&&(O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(O,c),P=a({},P,s));var S=a({"aria-current":E&&r||null,className:O,style:P,to:i},w);return ce!==se?S.ref=n||g:S.innerRef=g,t().createElement(ae,S)}))}));const le=()=>t().createElement("svg",{width:"25",height:"25",className:"icon icon--x",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{className:"stroke",x1:"8.74612",y1:"16.347",x2:"16.3973",y2:"8.69584"}),t().createElement("line",{className:"stroke",x1:"8.6027",y1:"8.69585",x2:"16.2539",y2:"16.3471"})),ue=e=>{let{className:n}=e;return t().createElement("svg",{className:["icon icon--chevron",n].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{className:"stroke",d:"M9 10.5L12.5 14.5L16 10.5"}))},fe=e=>{const{className:n,children:o}=e,r=["tooltip",n].filter(Boolean).join(" ");return t().createElement("aside",{className:r},o,t().createElement("span",null))},pe={plus:()=>t().createElement("svg",{className:"icon icon--plus",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("line",{x1:"12.4589",y1:"16.9175",x2:"12.4589",y2:"8.50115",className:"stroke"}),t().createElement("line",{x1:"8.05164",y1:"12.594",x2:"16.468",y2:"12.594",className:"stroke"})),x:le,chevron:ue,edit:()=>t().createElement("svg",{className:"icon icon--edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("polygon",{className:"fill",points:"16.92 16.86 8.25 16.86 8.25 8.21 12.54 8.21 12.54 6.63 6.68 6.63 6.68 18.43 18.5 18.43 18.5 12.53 16.92 12.53 16.92 16.86"}),t().createElement("polygon",{className:"fill",points:"16.31 7.33 17.42 8.44 12.66 13.2 11.51 13.24 11.55 12.09 16.31 7.33"}),t().createElement("rect",{className:"fill",x:"16.94",y:"6.44",width:"1.58",height:"1.15",transform:"translate(10.16 -10.48) rotate(45)"})),swap:()=>t().createElement("svg",{className:"icon icon--swap",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M9.84631 4.78679L6.00004 8.63306L9.84631 12.4793",className:"stroke"}),t().createElement("path",{d:"M15.1537 20.1059L19 16.2596L15.1537 12.4133",className:"stroke"}),t().createElement("line",{x1:"7",y1:"8.7013",x2:"15",y2:"8.7013",stroke:"#333333",className:"stroke"}),t().createElement("line",{x1:"18",y1:"16.1195",x2:"10",y2:"16.1195",className:"stroke"}))},de="btn",he=n=>{let{children:o,icon:r,tooltip:i}=n;const a=pe[r];return t().createElement("span",{className:"".concat(de,"__content")},i&&t().createElement(fe,{className:"".concat(de,"__tooltip")},i),o&&t().createElement("span",{className:"".concat(de,"__label")},o),r&&t().createElement("span",{className:"".concat(de,"__icon")},(0,e.isValidElement)(r)&&r,a&&t().createElement(a,null)))},me=e=>{const{className:n,type:o="button",el:r,to:i,url:a,children:c,onClick:s,disabled:l,icon:u,iconStyle:f="without-border",buttonStyle:p="primary",round:d,size:h="medium",iconPosition:m="right",newTab:v,tooltip:y}=e,g=[de,n&&n,p&&"".concat(de,"--style-").concat(p),u&&"".concat(de,"--icon"),f&&"".concat(de,"--icon-style-").concat(f),u&&!c&&"".concat(de,"--icon-only"),l&&"".concat(de,"--disabled"),d&&"".concat(de,"--round"),h&&"".concat(de,"--size-").concat(h),m&&"".concat(de,"--icon-position-").concat(m),y&&"".concat(de,"--has-tooltip")].filter(Boolean).join(" ");const w={type:o,className:g,disabled:l,onClick:l?void 0:function(e){"submit"!==o&&s&&e.preventDefault(),s&&s(e)},rel:v?"noopener noreferrer":void 0,target:v?"_blank":void 0};switch(r){case"link":return t().createElement(ae,{...w,to:i||a},t().createElement(he,{icon:u,tooltip:y},c));case"anchor":return t().createElement("a",{...w,href:a},t().createElement(he,{icon:u,tooltip:y},c));default:return t().createElement("button",{type:"submit",...w},t().createElement(he,{icon:u,tooltip:y},c))}};var ve=n(727),ye=n(719);const ge=function(t,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=(0,e.useRef)(Date.now());(0,e.useEffect)((()=>{const e=setTimeout((()=>{Date.now()-r.current>=n&&(t(),r.current=Date.now())}),n-(Date.now()-r.current));return()=>{clearTimeout(e)}}),[n,...o])},we="popup-button",be=e=>{const{buttonType:n,button:o,setActive:r,active:i}=e,a=[we,"".concat(we,"--").concat(n)].filter(Boolean).join(" "),c=()=>{r(!i)};return"none"===n?null:"custom"===n?t().createElement("div",{role:"button",tabIndex:0,onKeyDown:e=>{"Enter"===e.key&&c()},onClick:c,className:a},o):t().createElement("button",{type:"button",onClick:()=>r(!i),className:a},o)},xe="popup",_e=n=>{const{className:o,render:r,size:i="small",color:a="light",button:c,buttonType:s="default",children:l,showOnHover:u=!1,horizontalAlign:f="left",verticalAlign:p="top",initActive:d=!1,onToggleOpen:h,padding:m,forceOpen:v,boundingRef:y}=n,g=(0,e.useRef)(null),w=(0,e.useRef)(null),[b,x]=(0,e.useState)(!1),[_,E]=(0,e.useState)(d),[O,P]=(0,e.useState)(p),[S,j]=(0,e.useState)(f),{y:k}=(0,ye.useScrollInfo)(),{height:C,width:T}=(0,ve.useWindowInfo)(),M=e=>{w.current.contains(e.target)||E(!1)};ge((()=>{if(w.current&&g.current){const{left:e,right:t,top:n,bottom:o}=w.current.getBoundingClientRect();let r=0,i=T,a=C,c=0;(null==y?void 0:y.current)&&({top:r,right:i,bottom:a,left:c}=y.current.getBoundingClientRect()),t>i&&e>c?j("right"):e<c&&t<i&&j("left"),n<r&&o<a?P("bottom"):o>a&&n<r&&P("top"),x(!0)}}),500,[k,C,T]),(0,e.useEffect)((()=>("function"==typeof h&&h(_),_?document.addEventListener("mousedown",M):document.removeEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)})),[_,h]),(0,e.useEffect)((()=>{E(v)}),[v]);const N=[xe,o,"".concat(xe,"--size-").concat(i),"".concat(xe,"--color-").concat(a),"".concat(xe,"--v-align-").concat(O),"".concat(xe,"--h-align-").concat(S),_&&b&&"".concat(xe,"--active")].filter(Boolean).join(" ");return t().createElement("div",{className:N},t().createElement("div",{ref:g,className:"".concat(xe,"__wrapper")},u?t().createElement("div",{className:"".concat(xe,"__on-hover-watch"),onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1)},t().createElement(be,{buttonType:s,button:c,setActive:E,active:_})):t().createElement(be,{buttonType:s,button:c,setActive:E,active:_})),t().createElement("div",{className:"".concat(xe,"__content"),ref:w},t().createElement("div",{className:"".concat(xe,"__wrap")},t().createElement("div",{className:"".concat(xe,"__scroll"),style:{padding:m}},r&&r({close:()=>E(!1)}),l&&l))))},Ee="banner",Oe=e=>{let{children:n,className:o,to:r,icon:i,alignIcon:a="right",onClick:c,type:s="default"}=e;const l=[Ee,"".concat(Ee,"--type-").concat(s),o&&o,r&&"".concat(Ee,"--has-link"),(r||c)&&"".concat(Ee,"--has-action"),i&&"".concat(Ee,"--has-icon"),i&&"".concat(Ee,"--align-icon-").concat(a)].filter(Boolean).join(" ");let u="div";return c&&!r&&(u="button"),r&&(u=ae),t().createElement(u,{className:l,onClick:c,to:r||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),t().createElement("span",{className:"".concat(Ee,"__content")},n),i&&"right"===a&&t().createElement(t().Fragment,null,i))},Pe="template-minimal",Se=e=>{const{className:n,style:o={},children:r,width:i="normal"}=e,a=[n,Pe,"".concat(Pe,"--width-").concat(i)].filter(Boolean).join(" ");return t().createElement("section",{className:a,style:o},t().createElement("div",{className:"".concat(Pe,"__wrap")},r))},je=()=>t().createElement("svg",{className:"icon icon--check",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},t().createElement("path",{d:"M10.6092 16.0192L17.6477 8.98076",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"}),t().createElement("path",{d:"M7.35229 12.7623L10.6092 16.0192",className:"stroke",strokeLinecap:"square",strokeLinejoin:"bevel"})),ke=()=>t().createElement("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"icon icon--search"},t().createElement("circle",{cx:"11.2069",cy:"10.7069",r:"5",stroke:"#333333",strokeWidth:"2"}),t().createElement("line",{x1:"14.914",y1:"13.9998",x2:"20.5002",y2:"19.586",stroke:"#333333",strokeWidth:"2"})),Ce=()=>t().createElement("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("rect",{x:"3.5",y:"4.5",width:"18",height:"2",fill:"#333333"}),t().createElement("rect",{x:"3.5",y:"11.5",width:"18",height:"2",fill:"#333333"}),t().createElement("rect",{x:"3.5",y:"18.5",width:"18",height:"2",fill:"#333333"})),Te="pill",Me=e=>{let{children:n,className:o,to:r,icon:i,alignIcon:a="right",onClick:c,pillStyle:s="light"}=e;const l=[Te,"".concat(Te,"--style-").concat(s),o&&o,r&&"".concat(Te,"--has-link"),(r||c)&&"".concat(Te,"--has-action"),i&&"".concat(Te,"--has-icon"),i&&"".concat(Te,"--align-icon-").concat(a)].filter(Boolean).join(" ");let u="div";return c&&!r&&(u="button"),r&&(u=ae),t().createElement(u,{className:l,onClick:c,type:"button"===u?"button":void 0,to:r||void 0},i&&"left"===a&&t().createElement(t().Fragment,null,i),n,i&&"right"===a&&t().createElement(t().Fragment,null,i))}})(),module.exports=o})();
@@ -1 +1 @@
1
- .btn{background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;font-size:1rem;font-weight:400;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;margin-top:1.9230769231rem;text-align:center;text-decoration:none}.btn .btn__icon{border:1px solid;border-radius:100%}.btn .btn__icon .stroke{stroke:currentColor;fill:none}.btn .btn__icon .fill{fill:currentColor}.btn--has-tooltip{position:relative}.btn .btn__tooltip{opacity:0;transform:translate(-50%,-10px);visibility:hidden}.btn .btn__content:hover .btn__tooltip{opacity:1;visibility:visible}.btn--icon-style-none .btn__icon,.btn--icon-style-without-border .btn__icon{border:none}.btn span{line-height:1.9230769231rem}.btn span,.btn svg{vertical-align:top}.btn--size-medium{padding:.9615384615rem 1.9230769231rem}.btn--size-small{padding:.4807692308rem .9615384615rem}.btn--style-primary{background-color:#333;color:#fff}.btn--style-primary.btn--disabled{background-color:rgba(51,51,51,.6)}.btn--style-primary:not(.btn--disabled):hover{background:#404040}.btn--style-primary:not(.btn--disabled):active{background:#4d4d4d}.btn--style-primary:focus{box-shadow:0 0 0 2px #b2ffd6;outline:none}.btn--style-secondary{background:none;box-shadow:inset 0 0 0 1px #333;color:#333}.btn--style-secondary:hover{background:rgba(51,51,51,.02);box-shadow:inset 0 0 0 1px #404040}.btn--style-secondary:active{background:#ececec}.btn--style-secondary.btn--disabled{background:none;box-shadow:inset 0 0 0 1px rgba(51,51,51,.4);color:rgba(51,51,51,.6)}.btn--style-secondary:focus{box-shadow:inset 0 0 0 1px #404040,0 0 0 2px #b2ffd6;outline:none}.btn--style-none{border-radius:0;margin:0;padding:0}.btn--style-none:focus{opacity:.8}.btn--style-none:active{opacity:.7}.btn--round{border-radius:100%}.btn--icon span{display:flex;justify-content:space-between}.btn--icon.btn--style-primary .icon .stroke{stroke:#fff;fill:none}.btn--icon.btn--style-primary .icon .fill{fill:#fff}.btn--style-icon-label{font-weight:600;padding:0}.btn--style-light-gray{box-shadow:inset 0 0 0 1px #333}.btn--icon-position-left .btn__content{flex-direction:row-reverse}.btn--icon-position-left .btn__icon{margin-right:.9615384615rem}.btn--icon-position-right .btn__icon{margin-left:.9615384615rem}.btn--icon-only .btn__icon{margin:0;padding:0}.btn--disabled{cursor:default}.btn:hover .btn__icon{background:#333}.btn:hover .btn__icon .stroke{stroke:#fff;fill:none}.btn:hover .btn__icon .fill{fill:#fff}.btn:focus{outline:none}.btn:focus .btn__icon{background:#dadada}.btn:focus .btn__icon .stroke{stroke:#333;fill:none}.btn:focus .btn__icon .fill{fill:#333}.btn:active .btn__icon{background:#4d4d4d}.btn:active .btn__icon .stroke{stroke:#fff;fill:none}.btn:active .btn__icon .fill{fill:#fff}.icon--plus{height:1.9230769231rem;width:1.9230769231rem}.icon--plus .stroke,.icon--x line{stroke:#333;stroke-width:1px}.icon--chevron{height:1.9230769231rem;width:1.9230769231rem}.icon--chevron .stroke{fill:none;stroke:#333;stroke-width:2px}.icon--edit{shape-rendering:auto;height:1.9230769231rem;width:1.9230769231rem}.icon--edit .fill{fill:#333;stroke:none}.icon--swap{height:1.9230769231rem;width:1.9230769231rem}.icon--swap .stroke{fill:none;stroke:#333;stroke-width:2px}.tooltip{background-color:#333;border-radius:2px;bottom:100%;color:#fff;font-weight:400;line-height:1.4423076923rem;padding:.3846153846rem .7692307692rem;transform:translate3d(-50%,-20%,0);white-space:nowrap;z-index:2}.tooltip,.tooltip span{left:50%;position:absolute}.tooltip span{border:10px solid transparent;border-top-color:#333;height:0;top:calc(100% - .12019rem);transform:translateX(-50%);width:0}.popup{position:relative}.popup__content{background:#fff;max-width:calc(100vw - 1.92308rem);opacity:0;position:absolute;visibility:hidden;z-index:50}.popup__content:after{border:12px solid transparent;border-top-color:#fff;content:" ";position:absolute;top:calc(100% - 1px)}.popup__wrap{overflow:hidden}.popup__scroll{overflow-y:auto;padding:1.9230769231rem;padding-right:calc(var(--scrollbar-width) + 1.92308rem);white-space:nowrap;width:calc(100% + var(--scrollbar-width))}.popup:active,.popup:focus{outline:none}.popup--size-small .popup__content{box-shadow:0 2px 3px 0 rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-small.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--size-small.popup--h-align-left .popup__content:after{left:.8173076923rem}.popup--size-large .popup__content{box-shadow:0 2px 20px 7px rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-large .popup__scroll{padding:2.8846153846rem calc(var(--scrollbar-width) + 2.88462rem) 1.9230769231rem 2.8846153846rem}.popup--size-wide .popup__content{box-shadow:0 2px 3px 0 rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-wide .popup__content:after{border:12px solid transparent;border-top-color:#fff}.popup--size-wide .popup__scroll{padding:.4807692308rem .9615384615rem}.popup--size-wide.popup--align-left .popup__content{left:-.9615384615rem}.popup--size-wide.popup--align-left .popup__content:after{left:.8173076923rem}.popup--h-align-left .popup__content{left:-3.3653846154rem}.popup--h-align-left .popup__content:after{left:3.3653846154rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(-50%)}.popup--h-align-right .popup__content{right:-3.3653846154rem}.popup--h-align-right .popup__content:after{right:3.3653846154rem}.popup--force-h-align-left .popup__content{left:-3.3653846154rem;right:unset;transform:unset}.popup--force-h-align-left .popup__content:after{left:3.3653846154rem;right:unset;transform:unset}.popup--force-h-align-right .popup__content{left:unset;right:-3.3653846154rem;transform:unset}.popup--force-h-align-right .popup__content:after{left:unset;right:3.3653846154rem;transform:unset}.popup--v-align-top .popup__content{bottom:calc(100% + 1.92308rem)}.popup--v-align-bottom .popup__content{box-shadow:0 -2px 20px 7px rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02);top:calc(100% + .96154rem)}.popup--v-align-bottom .popup__content:after{border-bottom-color:#fff;border-top-color:transparent!important;bottom:calc(100% - 1px);top:unset}.popup--v-align-bottom.popup--color-dark .popup__content:after{border-bottom-color:#333}.popup--color-dark .popup__content{background:#333;color:#fff}.popup--color-dark .popup__content:after{border-top-color:#333}.popup--active .popup__content{opacity:1;visibility:visible}@media(max-width:1024px){.popup--size-large .popup__scroll,.popup__scroll{padding:1.4423076923rem;padding-right:calc(var(--scrollbar-width) + 1.44231rem)}.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--h-align-left .popup__content:after{left:.9615384615rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(-50%)}.popup--h-align-right .popup__content{right:-.9615384615rem}.popup--h-align-right .popup__content:after{right:.9615384615rem}.popup--force-h-align-left .popup__content{left:-.9615384615rem;right:unset;transform:unset}.popup--force-h-align-left .popup__content:after{left:.9615384615rem;right:unset;transform:unset}.popup--force-h-align-right .popup__content{left:unset;right:-.9615384615rem;transform:unset}.popup--force-h-align-right .popup__content:after{left:unset;right:.9615384615rem;transform:unset}}.popup-button{display:inline-flex}.banner{background:rgba(51,51,51,.1);border:0;border-radius:3px;color:#333;font-size:1rem;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;padding:.9615384615rem;vertical-align:middle}.banner--has-action{cursor:pointer;text-decoration:none}.banner--has-icon{display:flex}.banner--has-icon svg{display:block}.banner--type-default.button--has-action:hover{background:#333}.banner--type-default.button--has-action:active{background:#323232}.banner--type-error{background:rgba(255,111,118,.1);color:#ff6f76}.banner--type-error svg .stroke{stroke:#ff6f76;fill:none}.banner--type-error svg .fill{fill:#ff6f76}.banner--type-error.button--has-action:hover{background:rgba(255,111,118,.15)}.banner--type-error.button--has-action:active{background:rgba(255,111,118,.2)}.banner--type-success{background:#b2ffd6}.banner--type-success.button--has-action:hover{background:rgba(178,255,214,.15)}.banner--type-success.button--has-action:active{background:rgba(178,255,214,.2)}.template-minimal{align-items:center;display:flex;justify-content:center;margin-left:auto;margin-right:auto;min-height:100%;padding:5.7692307692rem 1.9230769231rem;width:100%}.template-minimal--width-normal .template-minimal__wrap{max-width:500px;width:100%}.template-minimal--width-wide .template-minimal__wrap{max-width:1024px;width:100%}.icon--check{height:1.9230769231rem;width:1.9230769231rem}.icon--check .stroke{fill:none;stroke:#333;stroke-width:2px}.pill{background:#dadada;border:0;border-radius:3px;color:#333;cursor:default;display:inline-flex;font-size:1rem;line-height:1.9230769231rem;padding:0 .4807692308rem 0 .6490384615rem;vertical-align:middle}.pill:active,.pill:focus{outline:none}.pill--has-action{cursor:pointer;text-decoration:none}.pill--has-icon svg{display:block}.pill--align-icon-left{padding-left:.2403846154rem}.pill--align-icon-right{padding-right:.2403846154rem}.pill--style-white{background:#fff}.pill--style-white.pill--has-action:hover{background:#e2e2e2}.pill--style-white.pill--has-action:active{background:#e7e7e7}.pill--style-light.pill--has-action:hover{background:#e2e2e2}.pill--style-light.pill--has-action:active{background:#e7e7e7}.pill--style-light-gray{background:#f3f3f3;color:#333}.pill--style-warning{background:#fdffa4}.pill--style-success{background:#b2ffd6}.pill--style-dark{background:#333;color:#fff}.pill--style-dark svg .stroke{stroke:#fff;fill:none}.pill--style-dark svg .fill{fill:#fff}.pill--style-dark.pill--has-action:hover{background:#3b3b3b}.pill--style-dark.pill--has-action:active{background:#404040}
1
+ .btn{background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;font-size:1rem;font-weight:400;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;margin-top:1.9230769231rem;text-align:center;text-decoration:none}.btn .btn__icon{border:1px solid;border-radius:100%}.btn .btn__icon .stroke{stroke:currentColor;fill:none}.btn .btn__icon .fill{fill:currentColor}.btn--has-tooltip{position:relative}.btn .btn__tooltip{opacity:0;transform:translate(-50%,-10px);visibility:hidden}.btn .btn__content:hover .btn__tooltip{opacity:1;visibility:visible}.btn--icon-style-none .btn__icon,.btn--icon-style-without-border .btn__icon{border:none}.btn span{line-height:1.9230769231rem}.btn span,.btn svg{vertical-align:top}.btn--size-medium{padding:.9615384615rem 1.9230769231rem}.btn--size-small{padding:.4807692308rem .9615384615rem}.btn--style-primary{background-color:#333;color:#fff}.btn--style-primary.btn--disabled{background-color:rgba(51,51,51,.6)}.btn--style-primary:not(.btn--disabled):hover{background:#404040}.btn--style-primary:not(.btn--disabled):active{background:#4d4d4d}.btn--style-primary:focus{box-shadow:0 0 0 2px #b2ffd6;outline:none}.btn--style-secondary{background:none;box-shadow:inset 0 0 0 1px #333;color:#333}.btn--style-secondary:hover{background:rgba(51,51,51,.02);box-shadow:inset 0 0 0 1px #404040}.btn--style-secondary:active{background:#ececec}.btn--style-secondary.btn--disabled{background:none;box-shadow:inset 0 0 0 1px rgba(51,51,51,.4);color:rgba(51,51,51,.6)}.btn--style-secondary:focus{box-shadow:inset 0 0 0 1px #404040,0 0 0 2px #b2ffd6;outline:none}.btn--style-none{border-radius:0;margin:0;padding:0}.btn--style-none:focus{opacity:.8}.btn--style-none:active{opacity:.7}.btn--round{border-radius:100%}.btn--icon span{display:flex;justify-content:space-between}.btn--icon.btn--style-primary .icon .stroke{stroke:#fff;fill:none}.btn--icon.btn--style-primary .icon .fill{fill:#fff}.btn--style-icon-label{font-weight:600;padding:0}.btn--style-light-gray{box-shadow:inset 0 0 0 1px #333}.btn--icon-position-left .btn__content{flex-direction:row-reverse}.btn--icon-position-left .btn__icon{margin-right:.9615384615rem}.btn--icon-position-right .btn__icon{margin-left:.9615384615rem}.btn--icon-only .btn__icon{margin:0;padding:0}.btn--disabled{cursor:default}.btn:hover .btn__icon{background:#333}.btn:hover .btn__icon .stroke{stroke:#fff;fill:none}.btn:hover .btn__icon .fill{fill:#fff}.btn:focus{outline:none}.btn:focus .btn__icon{background:#dadada}.btn:focus .btn__icon .stroke{stroke:#333;fill:none}.btn:focus .btn__icon .fill{fill:#333}.btn:active .btn__icon{background:#4d4d4d}.btn:active .btn__icon .stroke{stroke:#fff;fill:none}.btn:active .btn__icon .fill{fill:#fff}.icon--plus{height:1.9230769231rem;width:1.9230769231rem}.icon--plus .stroke,.icon--x line{stroke:#333;stroke-width:1px}.icon--chevron{height:1.9230769231rem;width:1.9230769231rem}.icon--chevron .stroke{fill:none;stroke:#333;stroke-width:2px}.icon--edit{shape-rendering:auto;height:1.9230769231rem;width:1.9230769231rem}.icon--edit .fill{fill:#333;stroke:none}.icon--swap{height:1.9230769231rem;width:1.9230769231rem}.icon--swap .stroke{fill:none;stroke:#333;stroke-width:2px}.tooltip{background-color:#333;border-radius:2px;bottom:100%;color:#fff;font-weight:400;line-height:1.4423076923rem;padding:.3846153846rem .7692307692rem;transform:translate3d(-50%,-20%,0);white-space:nowrap;z-index:2}.tooltip,.tooltip span{left:50%;position:absolute}.tooltip span{border:10px solid transparent;border-top-color:#333;height:0;top:calc(100% - .12019rem);transform:translateX(-50%);width:0}.popup{position:relative}.popup__content{background:#fff;max-width:calc(100vw - 1.92308rem);opacity:0;position:absolute;visibility:hidden;z-index:50}.popup__content:after{border:12px solid transparent;border-top-color:#fff;content:" ";position:absolute;top:calc(100% - 1px)}.popup__wrap{overflow:hidden}.popup__scroll{overflow-y:auto;padding:1.9230769231rem;padding-right:calc(var(--scrollbar-width) + 1.92308rem);white-space:nowrap;width:calc(100% + var(--scrollbar-width))}.popup:active,.popup:focus{outline:none}.popup--size-small .popup__content{box-shadow:0 2px 3px 0 rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-small.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--size-small.popup--h-align-left .popup__content:after{left:.8173076923rem}.popup--size-large .popup__content{box-shadow:0 2px 20px 7px rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-large .popup__scroll{padding:2.8846153846rem calc(var(--scrollbar-width) + 2.88462rem) 1.9230769231rem 2.8846153846rem}.popup--size-wide .popup__content{box-shadow:0 2px 3px 0 rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-wide .popup__content:after{border:12px solid transparent;border-top-color:#fff}.popup--size-wide .popup__scroll{padding:.4807692308rem .9615384615rem}.popup--size-wide.popup--align-left .popup__content{left:-.9615384615rem}.popup--size-wide.popup--align-left .popup__content:after{left:.8173076923rem}.popup--h-align-left .popup__content{left:-3.3653846154rem}.popup--h-align-left .popup__content:after{left:3.3653846154rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(-50%)}.popup--h-align-right .popup__content{right:-3.3653846154rem}.popup--h-align-right .popup__content:after{right:3.3653846154rem}.popup--v-align-top .popup__content{bottom:calc(100% + 1.92308rem)}.popup--v-align-bottom .popup__content{box-shadow:0 -2px 20px 7px rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02);top:calc(100% + .96154rem)}.popup--v-align-bottom .popup__content:after{border-bottom-color:#fff;border-top-color:transparent!important;bottom:calc(100% - 1px);top:unset}.popup--v-align-bottom.popup--color-dark .popup__content:after{border-bottom-color:#333}.popup--color-dark .popup__content{background:#333;color:#fff}.popup--color-dark .popup__content:after{border-top-color:#333}.popup--active .popup__content{opacity:1;visibility:visible}@media(max-width:1024px){.popup--size-large .popup__scroll,.popup__scroll{padding:1.4423076923rem;padding-right:calc(var(--scrollbar-width) + 1.44231rem)}.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--h-align-left .popup__content:after{left:.9615384615rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(-50%)}.popup--h-align-right .popup__content{right:-.9615384615rem}.popup--h-align-right .popup__content:after{right:.9615384615rem}.popup--force-h-align-left .popup__content{left:-.9615384615rem;right:unset;transform:unset}.popup--force-h-align-left .popup__content:after{left:.9615384615rem;right:unset;transform:unset}.popup--force-h-align-right .popup__content{left:unset;right:-.9615384615rem;transform:unset}.popup--force-h-align-right .popup__content:after{left:unset;right:.9615384615rem;transform:unset}}.popup-button{display:inline-flex}.banner{background:rgba(51,51,51,.1);border:0;border-radius:3px;color:#333;font-size:1rem;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;padding:.9615384615rem;vertical-align:middle}.banner--has-action{cursor:pointer;text-decoration:none}.banner--has-icon{display:flex}.banner--has-icon svg{display:block}.banner--type-default.button--has-action:hover{background:#333}.banner--type-default.button--has-action:active{background:#323232}.banner--type-error{background:rgba(255,111,118,.1);color:#ff6f76}.banner--type-error svg .stroke{stroke:#ff6f76;fill:none}.banner--type-error svg .fill{fill:#ff6f76}.banner--type-error.button--has-action:hover{background:rgba(255,111,118,.15)}.banner--type-error.button--has-action:active{background:rgba(255,111,118,.2)}.banner--type-success{background:#b2ffd6}.banner--type-success.button--has-action:hover{background:rgba(178,255,214,.15)}.banner--type-success.button--has-action:active{background:rgba(178,255,214,.2)}.template-minimal{align-items:center;display:flex;justify-content:center;margin-left:auto;margin-right:auto;min-height:100%;padding:5.7692307692rem 1.9230769231rem;width:100%}.template-minimal--width-normal .template-minimal__wrap{max-width:500px;width:100%}.template-minimal--width-wide .template-minimal__wrap{max-width:1024px;width:100%}.icon--check{height:1.9230769231rem;width:1.9230769231rem}.icon--check .stroke{fill:none;stroke:#333;stroke-width:2px}.pill{background:#dadada;border:0;border-radius:3px;color:#333;cursor:default;display:inline-flex;font-size:1rem;line-height:1.9230769231rem;padding:0 .4807692308rem 0 .6490384615rem;vertical-align:middle}.pill:active,.pill:focus{outline:none}.pill--has-action{cursor:pointer;text-decoration:none}.pill--has-icon svg{display:block}.pill--align-icon-left{padding-left:.2403846154rem}.pill--align-icon-right{padding-right:.2403846154rem}.pill--style-white{background:#fff}.pill--style-white.pill--has-action:hover{background:#e2e2e2}.pill--style-white.pill--has-action:active{background:#e7e7e7}.pill--style-light.pill--has-action:hover{background:#e2e2e2}.pill--style-light.pill--has-action:active{background:#e7e7e7}.pill--style-light-gray{background:#f3f3f3;color:#333}.pill--style-warning{background:#fdffa4}.pill--style-success{background:#b2ffd6}.pill--style-dark{background:#333;color:#fff}.pill--style-dark svg .stroke{stroke:#fff;fill:none}.pill--style-dark svg .fill{fill:#fff}.pill--style-dark.pill--has-action:hover{background:#3b3b3b}.pill--style-dark.pill--has-action:active{background:#404040}
@@ -6,14 +6,15 @@ import PopupButton from './PopupButton';
6
6
  import './index.scss';
7
7
  const baseClass = 'popup';
8
8
  const Popup = (props) => {
9
- const { className, render, size = 'small', color = 'light', button, buttonType = 'default', children, showOnHover = false, horizontalAlign = 'left', initActive = false, onToggleOpen, padding, forceOpen, } = props;
9
+ const { className, render, size = 'small', color = 'light', button, buttonType = 'default', children, showOnHover = false, horizontalAlign: horizontalAlignFromProps = 'left', verticalAlign: verticalAlignFromProps = 'top', initActive = false, onToggleOpen, padding, forceOpen, boundingRef, } = props;
10
10
  const buttonRef = useRef(null);
11
11
  const contentRef = useRef(null);
12
+ const [mounted, setMounted] = useState(false);
12
13
  const [active, setActive] = useState(initActive);
13
- const [verticalAlign, setVerticalAlign] = useState('top');
14
- const [forceHorizontalAlign, setForceHorizontalAlign] = useState(null);
14
+ const [verticalAlign, setVerticalAlign] = useState(verticalAlignFromProps);
15
+ const [horizontalAlign, setHorizontalAlign] = useState(horizontalAlignFromProps);
15
16
  const { y: scrollY } = useScrollInfo();
16
- const { height: windowHeight } = useWindowInfo();
17
+ const { height: windowHeight, width: windowWidth } = useWindowInfo();
17
18
  const handleClickOutside = (e) => {
18
19
  if (contentRef.current.contains(e.target)) {
19
20
  return;
@@ -22,34 +23,34 @@ const Popup = (props) => {
22
23
  };
23
24
  useThrottledEffect(() => {
24
25
  if (contentRef.current && buttonRef.current) {
25
- const { height: contentHeight, width: contentWidth, right: contentRightEdge, } = contentRef.current.getBoundingClientRect();
26
- const { y: buttonYCoord } = buttonRef.current.getBoundingClientRect();
27
- const windowWidth = window.innerWidth;
28
- const distanceToRightEdge = windowWidth - contentRightEdge;
29
- const distanceToLeftEdge = contentRightEdge - contentWidth;
30
- if (horizontalAlign === 'left' && distanceToRightEdge <= 0) {
31
- setForceHorizontalAlign('right');
26
+ const { left: contentLeftPos, right: contentRightPos, top: contentTopPos, bottom: contentBottomPos, } = contentRef.current.getBoundingClientRect();
27
+ let boundingTopPos = 0;
28
+ let boundingRightPos = windowWidth;
29
+ let boundingBottomPos = windowHeight;
30
+ let boundingLeftPos = 0;
31
+ if (boundingRef === null || boundingRef === void 0 ? void 0 : boundingRef.current) {
32
+ ({
33
+ top: boundingTopPos,
34
+ right: boundingRightPos,
35
+ bottom: boundingBottomPos,
36
+ left: boundingLeftPos,
37
+ } = boundingRef.current.getBoundingClientRect());
32
38
  }
33
- else if (horizontalAlign === 'right' && distanceToLeftEdge <= 0) {
34
- setForceHorizontalAlign('left');
39
+ if (contentRightPos > boundingRightPos && contentLeftPos > boundingLeftPos) {
40
+ setHorizontalAlign('right');
35
41
  }
36
- else if (horizontalAlign === 'center' && (distanceToLeftEdge <= contentWidth / 2 || distanceToRightEdge <= contentWidth / 2)) {
37
- if (distanceToRightEdge > distanceToLeftEdge)
38
- setForceHorizontalAlign('left');
39
- else
40
- setForceHorizontalAlign('right');
42
+ else if (contentLeftPos < boundingLeftPos && contentRightPos < boundingRightPos) {
43
+ setHorizontalAlign('left');
41
44
  }
42
- else {
43
- setForceHorizontalAlign(null);
45
+ if (contentTopPos < boundingTopPos && contentBottomPos < boundingBottomPos) {
46
+ setVerticalAlign('bottom');
44
47
  }
45
- if (buttonYCoord > contentHeight) {
48
+ else if (contentBottomPos > boundingBottomPos && contentTopPos < boundingTopPos) {
46
49
  setVerticalAlign('top');
47
50
  }
48
- else {
49
- setVerticalAlign('bottom');
50
- }
51
+ setMounted(true);
51
52
  }
52
- }, 500, [setVerticalAlign, contentRef, scrollY, windowHeight]);
53
+ }, 500, [scrollY, windowHeight, windowWidth]);
53
54
  useEffect(() => {
54
55
  if (typeof onToggleOpen === 'function')
55
56
  onToggleOpen(active);
@@ -73,8 +74,7 @@ const Popup = (props) => {
73
74
  `${baseClass}--color-${color}`,
74
75
  `${baseClass}--v-align-${verticalAlign}`,
75
76
  `${baseClass}--h-align-${horizontalAlign}`,
76
- forceHorizontalAlign && `${baseClass}--force-h-align-${forceHorizontalAlign}`,
77
- active && `${baseClass}--active`,
77
+ (active && mounted) && `${baseClass}--active`,
78
78
  ].filter(Boolean).join(' ');
79
79
  return (React.createElement("div", { className: classes },
80
80
  React.createElement("div", { ref: buttonRef, className: `${baseClass}__wrapper` }, showOnHover
@@ -128,34 +128,6 @@
128
128
  }
129
129
  }
130
130
 
131
- &--force-h-align-left {
132
- .popup__content {
133
- left: - base(1.75);
134
- right: unset;
135
- transform: unset;
136
-
137
- &:after {
138
- left: base(1.75);
139
- right: unset;
140
- transform: unset;
141
- }
142
- }
143
- }
144
-
145
- &--force-h-align-right {
146
- .popup__content {
147
- right: - base(1.75);
148
- left: unset;
149
- transform: unset;
150
-
151
- &:after {
152
- right: base(1.75);
153
- left: unset;
154
- transform: unset;
155
- }
156
- }
157
- }
158
-
159
131
  ////////////////////////////////
160
132
  // VERTICAL ALIGNMENT
161
133
  ////////////////////////////////
@@ -3,6 +3,7 @@ export declare type Props = {
3
3
  className?: string;
4
4
  render?: (any: any) => void;
5
5
  children?: React.ReactNode;
6
+ verticalAlign?: 'top' | 'bottom';
6
7
  horizontalAlign?: 'left' | 'center' | 'right';
7
8
  size?: 'small' | 'large' | 'wide';
8
9
  color?: 'light' | 'dark';
@@ -14,4 +15,5 @@ export declare type Props = {
14
15
  onToggleOpen?: (active: boolean) => void;
15
16
  backgroundColor?: CSSProperties['backgroundColor'];
16
17
  padding?: CSSProperties['padding'];
18
+ boundingRef?: React.MutableRefObject<HTMLElement>;
17
19
  };
@@ -1,4 +1,4 @@
1
- import React, { useState, useCallback, useMemo, useEffect } from 'react';
1
+ import React, { useState, useCallback, useMemo, useEffect, useRef } from 'react';
2
2
  import isHotkey from 'is-hotkey';
3
3
  import { createEditor, Transforms, Node, Element as SlateElement, Text } from 'slate';
4
4
  import { Editable, withReact, Slate } from 'slate-react';
@@ -33,11 +33,12 @@ const RichText = (props) => {
33
33
  const [enabledElements, setEnabledElements] = useState({});
34
34
  const [enabledLeaves, setEnabledLeaves] = useState({});
35
35
  const [initialValueKey, setInitialValueKey] = useState('');
36
+ const editorRef = useRef(null);
36
37
  const renderElement = useCallback(({ attributes, children, element }) => {
37
38
  const matchedElement = enabledElements[element === null || element === void 0 ? void 0 : element.type];
38
39
  const Element = matchedElement === null || matchedElement === void 0 ? void 0 : matchedElement.Element;
39
40
  if (Element) {
40
- return (React.createElement(Element, { attributes: attributes, element: element, path: path, fieldProps: props }, children));
41
+ return (React.createElement(Element, { attributes: attributes, element: element, path: path, fieldProps: props, editorRef: editorRef }, children));
41
42
  }
42
43
  return React.createElement("div", { ...attributes }, children);
43
44
  }, [enabledElements, path, props]);
@@ -46,7 +47,7 @@ const RichText = (props) => {
46
47
  const matchedLeafName = Object.keys(enabledLeaves).find((leafName) => leaf[leafName]);
47
48
  if ((_a = enabledLeaves[matchedLeafName]) === null || _a === void 0 ? void 0 : _a.Leaf) {
48
49
  const { Leaf } = enabledLeaves[matchedLeafName];
49
- return (React.createElement(Leaf, { attributes: attributes, leaf: leaf, path: path, fieldProps: props }, children));
50
+ return (React.createElement(Leaf, { attributes: attributes, leaf: leaf, path: path, fieldProps: props, editorRef: editorRef }, children));
50
51
  }
51
52
  return (React.createElement("span", { ...attributes }, children));
52
53
  }, [enabledLeaves, path, props]);
@@ -145,54 +146,55 @@ const RichText = (props) => {
145
146
  }
146
147
  return null;
147
148
  })),
148
- React.createElement(Editable, { className: `${baseClass}__editor`, renderElement: renderElement, renderLeaf: renderLeaf, placeholder: placeholder, spellCheck: true, readOnly: readOnly, onBlur: onBlur, onKeyDown: (event) => {
149
- if (event.key === 'Enter') {
150
- if (event.shiftKey) {
151
- event.preventDefault();
152
- editor.insertText('\n');
153
- }
154
- else {
155
- const selectedElement = Node.descendant(editor, editor.selection.anchor.path.slice(0, -1));
156
- if (SlateElement.isElement(selectedElement)) {
157
- // Allow hard enter to "break out" of certain elements
158
- if (editor.shouldBreakOutOnEnter(selectedElement)) {
159
- event.preventDefault();
160
- const selectedLeaf = Node.descendant(editor, editor.selection.anchor.path);
161
- if (Text.isText(selectedLeaf) && String(selectedLeaf.text).length === editor.selection.anchor.offset) {
162
- Transforms.insertNodes(editor, { children: [{ text: '' }] });
163
- }
164
- else {
165
- Transforms.splitNodes(editor);
166
- Transforms.setNodes(editor, {});
149
+ React.createElement("div", { className: `${baseClass}__editor`, ref: editorRef },
150
+ React.createElement(Editable, { renderElement: renderElement, renderLeaf: renderLeaf, placeholder: placeholder, spellCheck: true, readOnly: readOnly, onBlur: onBlur, onKeyDown: (event) => {
151
+ if (event.key === 'Enter') {
152
+ if (event.shiftKey) {
153
+ event.preventDefault();
154
+ editor.insertText('\n');
155
+ }
156
+ else {
157
+ const selectedElement = Node.descendant(editor, editor.selection.anchor.path.slice(0, -1));
158
+ if (SlateElement.isElement(selectedElement)) {
159
+ // Allow hard enter to "break out" of certain elements
160
+ if (editor.shouldBreakOutOnEnter(selectedElement)) {
161
+ event.preventDefault();
162
+ const selectedLeaf = Node.descendant(editor, editor.selection.anchor.path);
163
+ if (Text.isText(selectedLeaf) && String(selectedLeaf.text).length === editor.selection.anchor.offset) {
164
+ Transforms.insertNodes(editor, { children: [{ text: '' }] });
165
+ }
166
+ else {
167
+ Transforms.splitNodes(editor);
168
+ Transforms.setNodes(editor, {});
169
+ }
167
170
  }
168
171
  }
169
172
  }
170
173
  }
171
- }
172
- if (event.key === 'Backspace') {
173
- const selectedElement = Node.descendant(editor, editor.selection.anchor.path.slice(0, -1));
174
- if (SlateElement.isElement(selectedElement) && selectedElement.type === 'li') {
175
- const selectedLeaf = Node.descendant(editor, editor.selection.anchor.path);
176
- if (Text.isText(selectedLeaf) && String(selectedLeaf.text).length === 1) {
177
- Transforms.unwrapNodes(editor, {
178
- match: (n) => SlateElement.isElement(n) && listTypes.includes(n.type),
179
- split: true,
180
- });
181
- Transforms.setNodes(editor, {});
174
+ if (event.key === 'Backspace') {
175
+ const selectedElement = Node.descendant(editor, editor.selection.anchor.path.slice(0, -1));
176
+ if (SlateElement.isElement(selectedElement) && selectedElement.type === 'li') {
177
+ const selectedLeaf = Node.descendant(editor, editor.selection.anchor.path);
178
+ if (Text.isText(selectedLeaf) && String(selectedLeaf.text).length === 1) {
179
+ Transforms.unwrapNodes(editor, {
180
+ match: (n) => SlateElement.isElement(n) && listTypes.includes(n.type),
181
+ split: true,
182
+ });
183
+ Transforms.setNodes(editor, {});
184
+ }
185
+ }
186
+ else if (editor.isVoid(selectedElement)) {
187
+ Transforms.removeNodes(editor);
182
188
  }
183
189
  }
184
- else if (editor.isVoid(selectedElement)) {
185
- Transforms.removeNodes(editor);
186
- }
187
- }
188
- Object.keys(hotkeys).forEach((hotkey) => {
189
- if (isHotkey(hotkey, event)) {
190
- event.preventDefault();
191
- const mark = hotkeys[hotkey];
192
- toggleLeaf(editor, mark);
193
- }
194
- });
195
- } }))),
190
+ Object.keys(hotkeys).forEach((hotkey) => {
191
+ if (isHotkey(hotkey, event)) {
192
+ event.preventDefault();
193
+ const mark = hotkeys[hotkey];
194
+ toggleLeaf(editor, mark);
195
+ }
196
+ });
197
+ } })))),
196
198
  React.createElement(FieldDescription, { value: value, description: description }))));
197
199
  };
198
200
  export default withCondition(RichText);
@@ -44,10 +44,11 @@ declare const elements: {
44
44
  };
45
45
  link: {
46
46
  Button: () => JSX.Element;
47
- Element: ({ attributes, children, element }: {
47
+ Element: ({ attributes, children, element, editorRef }: {
48
48
  attributes: any;
49
49
  children: any;
50
50
  element: any;
51
+ editorRef: any;
51
52
  }) => JSX.Element;
52
53
  plugins: ((incomingEditor: import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor & import("../types").BlurSelectionEditor) => import("slate").BaseEditor & import("slate-react").ReactEditor & import("slate-history").HistoryEditor & import("../types").BlurSelectionEditor)[];
53
54
  };
@@ -0,0 +1,2 @@
1
+ import { Editor, Element } from 'slate';
2
+ export declare const injectVoidElement: (editor: Editor, element: Element) => void;
@@ -0,0 +1,24 @@
1
+ import { Editor, Transforms } from 'slate';
2
+ import { isLastSelectedElementEmpty } from './isLastSelectedElementEmpty';
3
+ export const injectVoidElement = (editor, element) => {
4
+ const lastSelectedElementIsEmpty = isLastSelectedElementEmpty(editor);
5
+ const previous = Editor.previous(editor);
6
+ if (lastSelectedElementIsEmpty) {
7
+ // If previous node is void
8
+ if (Editor.isVoid(editor, previous === null || previous === void 0 ? void 0 : previous[0])) {
9
+ // Insert a blank element between void nodes
10
+ // so user can place cursor between void nodes
11
+ Transforms.insertNodes(editor, { children: [{ text: '' }] });
12
+ Transforms.setNodes(editor, element);
13
+ // Otherwise just set the empty node equal to new void
14
+ }
15
+ else {
16
+ Transforms.setNodes(editor, element);
17
+ }
18
+ }
19
+ else {
20
+ Transforms.insertNodes(editor, element);
21
+ }
22
+ // Add an empty node after the new void
23
+ Transforms.insertNodes(editor, { children: [{ text: '' }] });
24
+ };
@@ -0,0 +1,2 @@
1
+ import { Editor } from 'slate';
2
+ export declare const isLastSelectedElementEmpty: (editor: Editor) => boolean;
@@ -0,0 +1,12 @@
1
+ import { Editor, Element } from 'slate';
2
+ export const isLastSelectedElementEmpty = (editor) => {
3
+ var _a;
4
+ const currentlySelectedNodes = Array.from(Editor.nodes(editor, {
5
+ at: Editor.unhangRange(editor, editor.selection),
6
+ match: (n) => !Editor.isEditor(n) && Element.isElement(n) && (!n.type || n.type === 'p'),
7
+ }));
8
+ const lastSelectedNode = currentlySelectedNodes === null || currentlySelectedNodes === void 0 ? void 0 : currentlySelectedNodes[(currentlySelectedNodes === null || currentlySelectedNodes === void 0 ? void 0 : currentlySelectedNodes.length) - 1];
9
+ return lastSelectedNode && Element.isElement(lastSelectedNode[0])
10
+ && (!lastSelectedNode[0].type || lastSelectedNode[0].type === 'p')
11
+ && ((_a = lastSelectedNode[0].children) === null || _a === void 0 ? void 0 : _a[0].text) === '';
12
+ };
@@ -1,16 +1,14 @@
1
1
  import { Editor, Element } from 'slate';
2
2
  const isListActive = (editor, format) => {
3
- if (!editor.selection
4
- // If focus or anchor is at root of editor,
5
- // Return false - as Editor.parent will fail
6
- || editor.selection.focus.path[1] === 0
7
- // || editor.selection.focus.path.length === 0
8
- || editor.selection.anchor.path[1] === 0
9
- // || editor.selection.anchor.path.length === 0
10
- )
11
- return false;
12
- const parentLI = Editor.parent(editor, editor.selection);
13
- if (parentLI[1].length > 0) {
3
+ var _a;
4
+ let parentLI;
5
+ try {
6
+ parentLI = Editor.parent(editor, editor.selection);
7
+ }
8
+ catch (e) {
9
+ // swallow error, Slate
10
+ }
11
+ if (((_a = parentLI === null || parentLI === void 0 ? void 0 : parentLI[1]) === null || _a === void 0 ? void 0 : _a.length) > 0) {
14
12
  const ancestor = Editor.above(editor, {
15
13
  at: parentLI[1],
16
14
  });
@@ -3,10 +3,11 @@ import { ReactEditor } from 'slate-react';
3
3
  import './index.scss';
4
4
  declare const link: {
5
5
  Button: () => JSX.Element;
6
- Element: ({ attributes, children, element }: {
6
+ Element: ({ attributes, children, element, editorRef }: {
7
7
  attributes: any;
8
8
  children: any;
9
9
  element: any;
10
+ editorRef: any;
10
11
  }) => JSX.Element;
11
12
  plugins: ((incomingEditor: import("slate").BaseEditor & ReactEditor & import("slate-history").HistoryEditor & import("../../types").BlurSelectionEditor) => import("slate").BaseEditor & ReactEditor & import("slate-history").HistoryEditor & import("../../types").BlurSelectionEditor)[];
12
13
  };
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useCallback, useEffect, useState } from 'react';
1
+ import React, { Fragment, useCallback, useState } from 'react';
2
2
  import { ReactEditor, useSlate } from 'slate-react';
3
3
  import { Transforms } from 'slate';
4
4
  import ElementButton from '../Button';
@@ -10,29 +10,28 @@ import Check from '../../../../../icons/Check';
10
10
  import Error from '../../../../Error';
11
11
  import './index.scss';
12
12
  const baseClass = 'rich-text-link';
13
- const Link = ({ attributes, children, element }) => {
13
+ const Link = ({ attributes, children, element, editorRef }) => {
14
14
  const editor = useSlate();
15
15
  const [error, setError] = useState(false);
16
- const [open, setOpen] = useState(!element.url);
17
- const [url, setURL] = useState(element.url);
18
- const [newTab, setNewTab] = useState(Boolean(element.newTab));
19
- useEffect(() => {
20
- const path = ReactEditor.findPath(editor, element);
21
- Transforms.setNodes(editor, { url, newTab }, { at: path });
22
- }, [url, newTab, editor, element]);
23
- const handleToggleOpen = useCallback((toggleResult) => {
24
- setOpen(toggleResult);
25
- }, []);
16
+ const [open, setOpen] = useState(element.url === undefined);
17
+ const handleToggleOpen = useCallback((newOpen) => {
18
+ setOpen(newOpen);
19
+ if (element.url === undefined && !newOpen) {
20
+ const path = ReactEditor.findPath(editor, element);
21
+ Transforms.setNodes(editor, { url: '' }, { at: path });
22
+ }
23
+ }, [editor, element]);
26
24
  return (React.createElement("span", { className: baseClass, ...attributes },
27
25
  React.createElement("span", { style: { userSelect: 'none' }, contentEditable: false },
28
- React.createElement(Popup, { initActive: url === undefined, buttonType: "none", size: "small", color: "dark", horizontalAlign: "center", forceOpen: open, onToggleOpen: handleToggleOpen, render: ({ close }) => (React.createElement(Fragment, null,
26
+ React.createElement(Popup, { initActive: element.url === undefined, buttonType: "none", size: "small", color: "dark", horizontalAlign: "center", forceOpen: open, onToggleOpen: handleToggleOpen, boundingRef: editorRef, render: ({ close }) => (React.createElement(Fragment, null,
29
27
  React.createElement("div", { className: `${baseClass}__url-wrap` },
30
- React.createElement("input", { value: url || '', className: `${baseClass}__url`, placeholder: "Enter a URL", onChange: (e) => {
28
+ React.createElement("input", { value: element.url || '', className: `${baseClass}__url`, placeholder: "Enter a URL", onChange: (e) => {
31
29
  const { value } = e.target;
32
30
  if (value && error) {
33
31
  setError(false);
34
32
  }
35
- setURL(value);
33
+ const path = ReactEditor.findPath(editor, element);
34
+ Transforms.setNodes(editor, { url: value }, { at: path });
36
35
  }, onKeyDown: (e) => {
37
36
  if (e.key === 'Enter') {
38
37
  e.preventDefault();
@@ -41,7 +40,7 @@ const Link = ({ attributes, children, element }) => {
41
40
  } }),
42
41
  React.createElement(Button, { className: `${baseClass}__confirm`, buttonStyle: "none", icon: "chevron", onClick: (e) => {
43
42
  e.preventDefault();
44
- if (url) {
43
+ if (element.url) {
45
44
  close();
46
45
  }
47
46
  else {
@@ -49,7 +48,10 @@ const Link = ({ attributes, children, element }) => {
49
48
  }
50
49
  } }),
51
50
  error && (React.createElement(Error, { showError: error, message: "Please enter a valid URL." }))),
52
- React.createElement(Button, { className: [`${baseClass}__new-tab`, newTab && `${baseClass}__new-tab--checked`].filter(Boolean).join(' '), buttonStyle: "none", onClick: () => setNewTab(!newTab) },
51
+ React.createElement(Button, { className: [`${baseClass}__new-tab`, element.newTab && `${baseClass}__new-tab--checked`].filter(Boolean).join(' '), buttonStyle: "none", onClick: () => {
52
+ const path = ReactEditor.findPath(editor, element);
53
+ Transforms.setNodes(editor, { newTab: !element.newTab }, { at: path });
54
+ } },
53
55
  React.createElement(Check, null),
54
56
  "Open link in new tab"))) })),
55
57
  React.createElement("button", { className: [
@@ -1,5 +1,4 @@
1
1
  import { Editor } from 'slate';
2
- export declare const isLinkActive: (editor: Editor) => boolean;
3
2
  export declare const unwrapLink: (editor: Editor) => void;
4
- export declare const wrapLink: (editor: any, url?: string, newTab?: boolean) => void;
3
+ export declare const wrapLink: (editor: Editor, url?: string, newTab?: boolean) => void;
5
4
  export declare const withLinks: (incomingEditor: Editor) => Editor;
@@ -1,33 +1,32 @@
1
- import { Editor, Transforms, Range, Element } from 'slate';
2
- export const isLinkActive = (editor) => {
3
- const [link] = Editor.nodes(editor, { match: (n) => Element.isElement(n) && n.type === 'link' });
4
- return !!link;
5
- };
1
+ import { Transforms, Range, Element } from 'slate';
2
+ import isElementActive from '../isActive';
6
3
  export const unwrapLink = (editor) => {
7
4
  Transforms.unwrapNodes(editor, { match: (n) => Element.isElement(n) && n.type === 'link' });
8
5
  };
9
6
  export const wrapLink = (editor, url, newTab) => {
10
- if (isLinkActive(editor)) {
11
- unwrapLink(editor);
12
- }
13
7
  const { selection, blurSelection } = editor;
14
8
  if (blurSelection) {
15
9
  Transforms.select(editor, blurSelection);
16
10
  }
17
- const selectionToUse = selection || blurSelection;
18
- const isCollapsed = selectionToUse && Range.isCollapsed(selectionToUse);
19
- const link = {
20
- type: 'link',
21
- url,
22
- newTab,
23
- children: isCollapsed ? [{ text: url }] : [],
24
- };
25
- if (isCollapsed) {
26
- Transforms.insertNodes(editor, link);
11
+ if (isElementActive(editor, 'link')) {
12
+ unwrapLink(editor);
27
13
  }
28
14
  else {
29
- Transforms.wrapNodes(editor, link, { split: true });
30
- Transforms.collapse(editor, { edge: 'end' });
15
+ const selectionToUse = selection || blurSelection;
16
+ const isCollapsed = selectionToUse && Range.isCollapsed(selectionToUse);
17
+ const link = {
18
+ type: 'link',
19
+ url,
20
+ newTab,
21
+ children: isCollapsed ? [{ text: url }] : [],
22
+ };
23
+ if (isCollapsed) {
24
+ Transforms.insertNodes(editor, link);
25
+ }
26
+ else {
27
+ Transforms.wrapNodes(editor, link, { split: true });
28
+ Transforms.collapse(editor, { edge: 'end' });
29
+ }
31
30
  }
32
31
  };
33
32
  export const withLinks = (incomingEditor) => {
@@ -12,6 +12,7 @@ import Submit from '../../../../../Submit';
12
12
  import X from '../../../../../../icons/X';
13
13
  import Fields from './Fields';
14
14
  import { requests } from '../../../../../../../api';
15
+ import { injectVoidElement } from '../../injectVoid';
15
16
  import './index.scss';
16
17
  const initialFormData = {};
17
18
  const baseClass = 'relationship-rich-text-button';
@@ -25,11 +26,10 @@ const insertRelationship = (editor, { value, relationTo }) => {
25
26
  text,
26
27
  ],
27
28
  };
28
- const nodes = [relationship, { type: 'p', children: [{ text: '' }] }];
29
29
  if (editor.blurSelection) {
30
30
  Transforms.select(editor, editor.blurSelection);
31
31
  }
32
- Transforms.insertNodes(editor, nodes);
32
+ injectVoidElement(editor, relationship);
33
33
  ReactEditor.focus(editor);
34
34
  };
35
35
  const RelationshipButton = ({ path }) => {
@@ -15,6 +15,7 @@ import Label from '../../../../../Label';
15
15
  import MinimalTemplate from '../../../../../../templates/Minimal';
16
16
  import Button from '../../../../../../elements/Button';
17
17
  import PerPage from '../../../../../../elements/PerPage';
18
+ import { injectVoidElement } from '../../injectVoid';
18
19
  import './index.scss';
19
20
  import '../addSwapModals.scss';
20
21
  const baseClass = 'upload-rich-text-button';
@@ -29,11 +30,10 @@ const insertUpload = (editor, { value, relationTo }) => {
29
30
  text,
30
31
  ],
31
32
  };
32
- const nodes = [upload, { type: 'p', children: [{ text: '' }] }];
33
33
  if (editor.blurSelection) {
34
34
  Transforms.select(editor, editor.blurSelection);
35
35
  }
36
- Transforms.insertNodes(editor, nodes);
36
+ injectVoidElement(editor, upload);
37
37
  ReactEditor.focus(editor);
38
38
  };
39
39
  const UploadButton = ({ path }) => {
@@ -1,4 +1,4 @@
1
- const enterBreakOutTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
1
+ const enterBreakOutTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'link'];
2
2
  const withEnterBreakOut = (editor) => {
3
3
  const newEditor = editor;
4
4
  newEditor.shouldBreakOutOnEnter = (element) => enterBreakOutTypes.includes(String(element.type));
@@ -1,5 +1,4 @@
1
1
  declare const _default: {
2
- type: string;
3
2
  children: {
4
3
  text: string;
5
4
  }[];
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = [{
4
- type: 'p',
5
4
  children: [{ text: '' }],
6
5
  }];
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFZhbHVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ZpZWxkcy9yaWNoVGV4dC9kZWZhdWx0VmFsdWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxrQkFBZSxDQUFDO1FBQ2QsSUFBSSxFQUFFLEdBQUc7UUFDVCxRQUFRLEVBQUUsQ0FBQyxFQUFFLElBQUksRUFBRSxFQUFFLEVBQUUsQ0FBQztLQUN6QixDQUFDLENBQUMifQ==
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdFZhbHVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ZpZWxkcy9yaWNoVGV4dC9kZWZhdWx0VmFsdWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxrQkFBZSxDQUFDO1FBQ2QsUUFBUSxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFLENBQUM7S0FDekIsQ0FBQyxDQUFDIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload",
3
- "version": "0.14.28-beta.0",
3
+ "version": "0.14.29-beta.0",
4
4
  "description": "Node, React and MongoDB Headless CMS and Application Framework",
5
5
  "license": "SEE LICENSE IN license.md",
6
6
  "author": {