From 0250c1e019483efc28dfca2b2a596e37fb929583 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Sat, 27 Jan 2024 14:52:42 -0500 Subject: [PATCH] Added datetime formatting to Events List block. --- build/blocks/events-list/block.json | 4 ++++ build/blocks/events-list/events-list.asset.php | 2 +- build/blocks/events-list/events-list.js | 2 +- build/blocks/events-list/index.asset.php | 2 +- build/blocks/events-list/index.js | 4 ++-- includes/core/classes/class-rest-api.php | 8 ++++++-- src/blocks/events-list/block.json | 4 ++++ src/blocks/events-list/edit.js | 15 +++++++++++++++ src/blocks/events-list/events-list.js | 1 + src/components/EventsList.js | 15 +++++++++++---- 10 files changed, 46 insertions(+), 11 deletions(-) diff --git a/build/blocks/events-list/block.json b/build/blocks/events-list/block.json index 1c60a7048..b5e0b8b95 100644 --- a/build/blocks/events-list/block.json +++ b/build/blocks/events-list/block.json @@ -21,6 +21,10 @@ "showVenue": true } }, + "datetimeFormat": { + "type": "string", + "default": "D, M j, Y, g:i a T" + }, "maxNumberOfEvents": { "type": "integer", "default": 5 diff --git a/build/blocks/events-list/events-list.asset.php b/build/blocks/events-list/events-list.asset.php index 3e280360c..5850f0dce 100644 --- a/build/blocks/events-list/events-list.asset.php +++ b/build/blocks/events-list/events-list.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '3604abe8943f95554574'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '102d9ce24cd27f5a1b3d'); diff --git a/build/blocks/events-list/events-list.js b/build/blocks/events-list/events-list.js index d4fad4c73..7256d2c5f 100644 --- a/build/blocks/events-list/events-list.js +++ b/build/blocks/events-list/events-list.js @@ -1,2 +1,2 @@ (()=>{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),l=n(7790);r(n(7790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},7790: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 __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,l.isTag)(e)}function y(e){return e.type===l.ElementType.CDATA}function g(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function _(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var l=new f(o);o.forEach((function(e){return e.parent=l})),n=l}else if(_(e)){o=t?x(e.children):[];var a=new m(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return l.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=s(e).querySelectorAll(p);return a.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=s(e,r).querySelector(r)).childNodes;var v}}},4152: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(8276)),i=n(1507),l=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=s(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=s("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670: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(9196),i=o(n(484)),l=n(4606),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||l.returnFirstArg,u=(null==n?void 0:n.library)||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,w),v,h))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,l.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&_)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426: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.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var l=o(n(3670));t.domToReact=l.default;var a=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]}},4606: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.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)};var a={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=s.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2703:(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,l){if(l!==o){var a=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 a.name="Invariant Violation",a}}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}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476: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(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},5174: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(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{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.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})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element,i=window.wp.components,l=window.wp.i18n;var a=n(3426);const s=a.default||a;var c=n(3253),u=n.n(c);const d=Math.min,p=Math.max,f=Math.round,m=Math.floor,h=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function _(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function x(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function O(e){return E(S(e))}function C(e){return e.replace(/start|end/g,(e=>y[e]))}function T(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function N(e,t,n){let{reference:o,floating:r}=e;const i=S(t),l=O(t),a=x(l),s=w(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(s){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(_(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),m=k(f),h=a[p?"floating"===d?"reference":"floating":d],v=A(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===d?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:s}):y);return{top:(v.top-_.top+m.top)/w.y,bottom:(_.bottom-v.bottom+m.bottom)/w.y,left:(v.left-_.left+m.left)/w.x,right:(_.right-v.right+m.right)/w.x}}const P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(r),g=w(a)===a,E=await(null==s.isRTL?void 0:s.isRTL(c.floating)),S=p||(g||!h?[T(a)]:function(e){const t=T(e);return[C(e),t,C(t)]}(a));p||"none"===m||S.push(...function(e,t,n,o){const r=_(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(w(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(C)))),i}(a,h,m,E));const k=[a,...S],A=await R(t,v),N=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&N.push(A[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=_(e),r=O(e),i=x(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),[l,T(l)]}(r,l,E);N.push(A[e[0]],A[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var M,L;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(L=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var D;const e=null==(D=P.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},M=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=w(n),a=_(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),s?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},L=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=b(e,t),c={x:n,y:o},u=await R(t,s),d=S(w(r)),p=E(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";m=g(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function D(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function I(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return e instanceof Node||e instanceof j(e).Node}function H(e){return e instanceof Element||e instanceof j(e).Element}function B(e){return e instanceof HTMLElement||e instanceof j(e).HTMLElement}function U(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}function W(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function z(e){return["table","td","th"].includes(D(e))}function V(e){const t=q(),n=G(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(e){return["html","body","#document"].includes(D(e))}function G(e){return j(e).getComputedStyle(e)}function X(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){if("html"===D(e))return e;const t=e.assignedSlot||e.parentNode||U(e)&&e.host||I(e);return U(t)?t.host:t}function K(e){const t=Y(e);return $(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&W(t)?t:K(t)}function Z(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=K(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=j(r);return i?t.concat(l,l.visualViewport||[],W(r)?r:[],l.frameElement&&n?Z(l.frameElement):[]):t.concat(r,Z(r,[],n))}function J(e){const t=G(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=B(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=f(n)!==i||f(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Q(e){return H(e)?e:e.contextElement}function ee(e){const t=Q(e);if(!B(t))return h(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=J(t);let l=(i?f(n.width):n.width)/o,a=(i?f(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const te=h(0);function ne(e){const t=j(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function oe(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Q(e);let l=h(1);t&&(o?H(o)&&(l=ee(o)):l=ee(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==j(e))&&t}(i,n,o)?ne(i):h(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=j(i),t=o&&H(o)?j(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ee(n),t=n.getBoundingClientRect(),o=G(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=j(n).frameElement}}return A({width:u,height:d,x:s,y:c})}function re(e){return oe(I(e)).left+X(e).scrollLeft}function ie(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=j(e),o=I(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=q();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=I(e),n=X(e),o=e.ownerDocument.body,r=p(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=p(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+re(e);const a=-n.scrollTop;return"rtl"===G(o).direction&&(l+=p(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(I(e));else if(H(t))o=function(e,t){const n=oe(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=B(e)?ee(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ne(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return A(o)}function le(e,t){const n=Y(e);return!(n===t||!H(n)||$(n))&&("fixed"===G(n).position||le(n,t))}function ae(e,t,n){const o=B(t),r=I(t),i="fixed"===n,l=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=h(0);if(o||!o&&!i)if(("body"!==D(t)||W(r))&&(a=X(t)),o){const e=oe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=re(r));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function se(e,t){return B(e)&&"fixed"!==G(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=j(e);if(!B(e))return n;let o=se(e,t);for(;o&&z(o)&&"static"===G(o).position;)o=se(o,t);return o&&("html"===D(o)||"body"===D(o)&&"static"===G(o).position&&!V(o))?n:o||function(e){let t=Y(e);for(;B(t)&&!$(t);){if(V(t))return t;t=Y(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=B(n),i=I(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=h(1);const s=h(0);if((r||!r&&"fixed"!==o)&&(("body"!==D(n)||W(i))&&(l=X(n)),B(n))){const e=oe(n);a=ee(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},getDocumentElement:I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Z(e,[],!1).filter((e=>H(e)&&"body"!==D(e))),r=null;const i="fixed"===G(e).position;let l=i?Y(e):e;for(;H(l)&&!$(l);){const t=G(l),n=V(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||W(l)&&!n&&le(e,l))?o=o.filter((e=>e!==l)):r=t,l=Y(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=ie(t,n,r);return e.top=p(o.top,e.top),e.right=d(o.right,e.right),e.bottom=d(o.bottom,e.bottom),e.left=p(o.left,e.left),e}),ie(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ce,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ce,i=this.getDimensions;return{reference:ae(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return J(e)},getScale:ee,isElement:H,isRTL:function(e){return"rtl"===G(e).direction}};const de=(e,t,n)=>{const o=new Map,r={platform:ue,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=N(c,o,s),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},ve={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ye=(0,e.createContext)({getTooltipData:()=>ve});function ge(t="DEFAULT_TOOLTIP_ID"){return(0,e.useContext)(ye).getTooltipData(t)}const be="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},_e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ee=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[M(Number(r)),P({fallbackAxisSideDirection:"start"}),L({padding:5})],border:a})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=b(c,e)||{};if(null==s)return{};const p=k(u),f={x:t,y:n},m=O(o),h=x(m),v=await i.getDimensions(s),y="y"===m,w=y?"top":"left",E=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=r.reference[h]+r.reference[m]-f[m]-r.floating[h],T=f[m]-r.reference[m],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=A?A[S]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=l.floating[S]||r.floating[h]);const R=C/2-T/2,P=N/2-v[h]/2-1,M=d(p[w],P),L=d(p[E],P),D=M,j=N-v[h]-L,I=N/2-v[h]/2+R,F=g(D,I,j),H=!a.arrow&&null!=_(o)&&I!=F&&r.reference[h]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):de(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var xe={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Se={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Oe=({forwardRef:t,id:n,className:o,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:u=["hover"],openOnClick:f=!1,positionStrategy:h="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,afterShow:M,afterHide:L,content:D,contentWrapperRef:j,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:z,arrowColor:V,role:q="tooltip"})=>{var $;const G=(0,e.useRef)(null),X=(0,e.useRef)(null),Y=(0,e.useRef)(null),K=(0,e.useRef)(null),J=(0,e.useRef)(null),[ee,te]=(0,e.useState)(s),[ne,re]=(0,e.useState)({}),[ie,le]=(0,e.useState)({}),[ae,se]=(0,e.useState)(!1),[ce,ue]=(0,e.useState)(!1),[de,fe]=(0,e.useState)(null),me=(0,e.useRef)(!1),ve=(0,e.useRef)(null),{anchorRefs:ye,setActiveAnchor:we}=ge(n),Oe=(0,e.useRef)(!1),[Ce,Te]=(0,e.useState)([]),ke=(0,e.useRef)(!1),Ae=f||u.includes("click"),Ne=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Re=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Re,{mouseenter:!1,focus:!1,click:!0});const Pe=k?{...k}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ne||!1};N&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),be((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&ue(!0),setTimeout((()=>{ke.current&&(null==H||H(e),void 0===F&&se(e))}),10))};(0,e.useEffect)((()=>{if(void 0===F)return()=>null;F&&ue(!0);const e=setTimeout((()=>{se(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,e.useEffect)((()=>{if(ae!==me.current)if(J.current&&clearTimeout(J.current),me.current=ae,ae)null==M||M();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{ue(!1),fe(null),null==L||L()}),e+25)}}),[ae]);const De=(e=g)=>{Y.current&&clearTimeout(Y.current),Y.current=setTimeout((()=>{Le(!0)}),e)},je=(e=b)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Oe.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void we({current:null});g?De():Le(!0),U(n),we({current:n}),K.current&&clearTimeout(K.current)},Fe=()=>{x?je(b||100):b?je():Le(!1),Y.current&&clearTimeout(Y.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Ee({place:null!==(n=null==de?void 0:de.place)&&void 0!==n?n:s,offset:c,elementReference:o,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:v,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),ve.current=n},Ue=e=>{var t;if(!ae)return;const n=e.target;(null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...Ce].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),Y.current&&clearTimeout(Y.current))},We=he(Ie,50,!0),ze=he(Fe,50,!0),Ve=(0,e.useCallback)((()=>{var e,t;const n=null!==(e=null==de?void 0:de.position)&&void 0!==e?e:P;n?He(n):w?ve.current&&He(ve.current):(null==B?void 0:B.isConnected)&&Ee({place:null!==(t=null==de?void 0:de.place)&&void 0!==t?t:s,offset:c,elementReference:B,tooltipReference:G.current,tooltipArrowReference:X.current,strategy:h,middlewares:v,border:W}).then((e=>{ke.current&&(Object.keys(e.tooltipStyles).length&&re(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&le(e.tooltipArrowStyles),te(e.place))}))}),[ae,B,D,R,s,null==de?void 0:de.place,c,h,P,null==de?void 0:de.position,w]);(0,e.useEffect)((()=>{var e,t;const n=new Set(ye);Ce.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=_e(B),a=_e(G.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let s=null;Me.resize?window.addEventListener("resize",r):B&&G.current&&(s=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=Q(e),u=r||i?[...c?Z(c):[],...Z(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=I(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const v={rootMargin:-m(u)+"px "+-m(r.clientWidth-(c+f))+"px "+-m(r.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,d(1,s))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!y)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}y=!1}try{o=new IntersectionObserver(g,{...v,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,v)}o.observe(e)}(!0),i}(c,n):null;let h,v=-1,y=null;l&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{y&&y.observe(t)}))),n()})),c&&!s&&y.observe(c),y.observe(t));let g=s?oe(e):null;return s&&function t(){const o=oe(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),y&&y.disconnect(),y=null,s&&cancelAnimationFrame(h)}}(B,G.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],f=e=>{ae&&(null==e?void 0:e.target)===B||Ie(e)},h=e=>{ae&&(null==e?void 0:e.target)===B&&Fe()},v=["mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:We}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:ze}):y.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"mousemove",listener:Be});const g=()=>{Oe.current=!0},b=()=>{Oe.current=!1,Fe()};return x&&!Ne&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==s||s(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),x&&!Ne&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,Ve,ce,ye,Ce,T,k,A,Ae]),(0,e.useEffect)((()=>{var e,t;let o=null!==(t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a)&&void 0!==t?t:"";!o&&n&&(o=`[data-tooltip-id='${n}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===n&&t.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(ue(!1),Le(!1),U(null),Y.current&&clearTimeout(Y.current),K.current&&clearTimeout(K.current),!0)}))}if(o)try{const n=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...n.filter((e=>e.matches(o)))),t.push(...n.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[n,a,null==de?void 0:de.anchorSelect,B]),(0,e.useEffect)((()=>{Ve()}),[Ve]),(0,e.useEffect)((()=>{if(!(null==j?void 0:j.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()))}));return e.observe(j.current),()=>{e.disconnect()}}),[D,null==j?void 0:j.current]),(0,e.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Ce,t];B&&n.includes(B)||U(null!==(e=Ce[0])&&void 0!==e?e:t)}),[l,Ce,B]),(0,e.useEffect)((()=>()=>{Y.current&&clearTimeout(Y.current),K.current&&clearTimeout(K.current)}),[]),(0,e.useEffect)((()=>{var e;let t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:a;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e)}catch(e){Te([])}}),[n,a,null==de?void 0:de.anchorSelect]);const qe=null!==($=null==de?void 0:de.content)&&void 0!==$?$:D,$e=ae&&Object.keys(ne).length>0;return(0,e.useImperativeHandle)(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:ee,isOpen:Boolean(ce&&!_&&qe&&$e)}))),ce&&!_&&qe?e.createElement(y,{id:n,role:q,className:pe("react-tooltip",xe.tooltip,Se.tooltip,Se[i],o,`react-tooltip__place-${ee}`,xe[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&xe.fixed,x&&xe.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),ae||"opacity"!==e.propertyName||(ue(!1),fe(null),null==L||L())},style:{...R,...ne,opacity:void 0!==z&&$e?z:void 0},ref:G},qe,e.createElement(y,{className:pe("react-tooltip-arrow",xe.arrow,Se.arrow,r,E&&xe.noArrow),style:{...ie,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:X})):null},Ce=({content:t})=>e.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Te=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=e.forwardRef((({id:t,anchorId:n,anchorSelect:o,content:r,html:i,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:m=["hover"],openOnClick:h=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:P,isOpen:M,disableStyleInjection:L=!1,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,role:U="tooltip"},W)=>{const[z,V]=(0,e.useState)(r),[q,$]=(0,e.useState)(i),[G,X]=(0,e.useState)(u),[Y,K]=(0,e.useState)(c),[Z,J]=(0,e.useState)(d),[Q,ee]=(0,e.useState)(g),[te,ne]=(0,e.useState)(b),[oe,re]=(0,e.useState)(w),[ie,le]=(0,e.useState)(_),[ae,se]=(0,e.useState)(p),[ce,ue]=(0,e.useState)(m),[de,fe]=(0,e.useState)(v),[me,he]=(0,e.useState)(null),[ve,ye]=(0,e.useState)(null),be=(0,e.useRef)(L),{anchorRefs:we,activeAnchor:_e}=ge(t),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),xe=e=>{const t={place:e=>{var t;X(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:r)},html:e=>{$(null!=e?e:i)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{J(null===e?d:Number(e))},wrapper:e=>{var t;se(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");ue(null!=t?t:m)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ee(null===e?g:Number(e))},"delay-hide":e=>{ne(null===e?b:Number(e))},float:e=>{re(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,e.useEffect)((()=>{V(r)}),[r]),(0,e.useEffect)((()=>{$(i)}),[i]),(0,e.useEffect)((()=>{X(u)}),[u]),(0,e.useEffect)((()=>{K(c)}),[c]),(0,e.useEffect)((()=>{J(d)}),[d]),(0,e.useEffect)((()=>{ee(g)}),[g]),(0,e.useEffect)((()=>{ne(b)}),[b]),(0,e.useEffect)((()=>{re(w)}),[w]),(0,e.useEffect)((()=>{le(_)}),[_]),(0,e.useEffect)((()=>{fe(v)}),[v]),(0,e.useEffect)((()=>{be.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,e.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,e.useEffect)((()=>{var e;const r=new Set(we);let i=o;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(e=null!=ve?ve:l)&&void 0!==e?e:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);xe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);xe(e),s.observe(a,c)}return()=>{s.disconnect()}}),[we,_e,ve,n,o]),(0,e.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Te("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),j&&!Te("opacity",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`)}),[]);let Se=f;const ke=(0,e.useRef)(null);if(l){const t=l({content:null!=z?z:null,activeAnchor:ve});Se=t?e.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},t):null}else z&&(Se=z);q&&(Se=e.createElement(Ce,{content:q}));const Ae={forwardRef:W,id:t,anchorId:n,anchorSelect:o,className:pe(a,me),classNameArrow:s,content:Se,contentWrapperRef:ke,place:G,variant:Y,offset:Z,wrapper:ae,events:ce,openOnClick:h,positionStrategy:de,middlewares:y,delayShow:Q,delayHide:te,float:oe,hidden:ie,noArrow:E,clickable:x,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:P,isOpen:M,border:D,opacity:j,arrowColor:I,setIsOpen:F,afterShow:H,afterHide:B,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:U};return e.createElement(Oe,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||me({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ae=window.wp.apiFetch;var Ne=n.n(Ae);const Re=({type:t="upcoming",status:n="attend"})=>{const o={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,l.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function Pe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Me=({eventId:t,currentUser:n="",type:o,enableAnonymousRsvp:a})=>{const[c,d]=(0,r.useState)(n.status),[p,f]=(0,r.useState)(Number(n.anonymous)),[m,h]=(0,r.useState)(n.guests),[v,y]=(0,r.useState)("hidden"),[g,b]=(0,r.useState)("false"),[w,_]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&u().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),_(!1)},x=async(e,n,o,r=0,i=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),Ne()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:Pe("nonce")}}).then((t=>{if(t.success){d(t.status),h(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),i&&E(e)}}))},S=e=>{switch(e){case"attending":return(0,l.__)("You're attending","gatherpress");case"waiting_list":return(0,l.__)("You're wait listed","gatherpress");case"not_attending":return(0,l.__)("You're not attending","gatherpress")}return(0,l.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(y("hidden"===v?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),_(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,l.__)("Edit RSVP","gatherpress")}return(0,l.__)("RSVP","gatherpress")})(c))),(0,e.createElement)(u(),{isOpen:w,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,l.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,l.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,l.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:Pe("login_url")},(0,l.__)("Login","gatherpress")),(0,l.__)(" to RSVP to events.","gatherpress")),""!==Pe("registration_url")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:Pe("registration_url")},(0,l.__)("Register","gatherpress")),(0,l.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"attend"===t?(n="attending",o=(0,l.__)("Attend","gatherpress")):(n="not_attending",o=(0,l.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},S(c)?S(c):(0,e.createElement)(i.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},s((0,l.sprintf)(/* translators: %s: button label. */ -(0,l.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),a?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);f(t),x(e,c,t,m,!1)},checked:p}),(0,e.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,l.__)("Only admins will see your identity.","gatherpress")},(0,l.__)("List me as anonymous.","gatherpress")),(0,e.createElement)(ke,{id:"gp-anonymous-tooltip"})):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>x(e,n,p),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))}),{status:c}))),"attend"!==c&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(Re,{type:o,status:c}),0{const[l,a]=(0,r.useState)(i);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:a},t);let s="";return"object"==typeof l&&void 0!==l[n]&&(i=[...l[n].responses],o&&(i=i.splice(0,o)),s=i.map(((t,n)=>{const{name:o,photo:r}=t;return(0,e.createElement)("figure",{key:n,className:"gp-rsvp-response__member-avatar"},(0,e.createElement)("img",{alt:o,title:o,src:r}))}))),(0,e.createElement)(e.Fragment,null,s)},De=t=>{const{type:n,event:o,eventOptions:r}=t,i="default"===r.imageSize?"featured_image":"featured_image_"+r.imageSize,l=s(o[i]),a="gp-events-list";let c="location";const u=o.venue?.is_online_event;return u&&(c="video-alt2"),(0,e.createElement)("div",{className:`${a}`},(0,e.createElement)("div",{className:`${a}__header`},(0,e.createElement)("div",{className:`${a}__info`},r.showFeaturedImage&&(0,e.createElement)("figure",{className:`${a}__image`},(0,e.createElement)("a",{href:o.permalink},l)),(0,e.createElement)("div",{className:`${a}__datetime`},(0,e.createElement)("strong",null,o.datetime_start)),(0,e.createElement)("div",{className:`${a}__title`},(0,e.createElement)("a",{href:o.permalink},s(o.title))),o.venue&&r.showVenue&&(0,e.createElement)("div",{className:`${a}__venue`},(0,e.createElement)("span",{className:`dashicons dashicons-${c}`}),!u&&(0,e.createElement)("a",{href:o.venue.permalink},s(o.venue.name)),u&&(0,e.createElement)("span",null,s(o.venue.name))),r.showDescription&&(0,e.createElement)("div",{className:`${a}__content`},(0,e.createElement)("div",{className:`${a}__excerpt`},s(o.excerpt.split(" ").splice(0,parseInt(r.descriptionLimit)).join(" ")+"[…]"))))),(0,e.createElement)("div",{className:`${a}__footer`},r.showRsvpResponse&&(0,e.createElement)("div",{className:"gp-rsvp-response__items"},(0,e.createElement)(Le,{eventId:o.ID,value:"attending",responses:o.responses,limit:"3"})),"upcoming"===n&&r.showRsvp&&(0,e.createElement)(Me,{eventId:o.ID,currentUser:o.current_user,type:n,enableAnonymousRsvp:o.enable_anonymous_rsvp}),"past"===n&&r.showRsvp&&""!==o.current_user&&(0,e.createElement)(Re,{type:n,status:o.current_user?.status})))},je=t=>{const{eventOptions:n,maxNumberOfEvents:o,type:a,topics:s,venues:c}=t,[u,d]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1),m=u.map((t=>(0,e.createElement)(De,{key:t.ID,eventOptions:n,type:a,event:t})));return(0,r.useEffect)((()=>{let e="",t="";if("object"==typeof s&&(e=s.map((e=>e.slug))?.join(",")),"object"==typeof c&&(t=c.map((e=>e.slug))?.join(",")),Pe("is_user_logged_in"))Ne()({path:`/gatherpress/v1/event/events-list?event_list_type=${a}&max_number=${o}&topics=${e}&venues=${t}`}).then((e=>{f(!0),d(e)}));else{const n=Pe("event_rest_api")+`/events-list?event_list_type=${a}&max_number=${o}&topics=${e}&venues=${t}`;fetch(n).then((e=>e.json())).then((e=>{f(!0),d(e)}))}}),[d,o,a,s,c]),(0,e.createElement)("div",{className:`gp-${a}-events-list`},!p&&(0,e.createElement)(i.Spinner,null),p&&0===u.length&&(()=>{const t="upcoming"===a?(0,l.__)("There are no upcoming events.","gatherpress"):(0,l.__)("There are no past events.","gatherpress");return(0,e.createElement)("div",{className:`gp-${a}-events__no_events_message`},t)})(),p&&m)};o()((()=>{const t=document.querySelectorAll('[data-gp_block_name="events-list"]');for(let a=0;a"+o+""))),a?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);f(t),x(e,c,t,m,!1)},checked:p}),(0,e.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,l.__)("Only admins will see your identity.","gatherpress")},(0,l.__)("List me as anonymous.","gatherpress")),(0,e.createElement)(ke,{id:"gp-anonymous-tooltip"})):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(i.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>x(e,n,p),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))}),{status:c}))),"attend"!==c&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(Re,{type:o,status:c}),0{const[l,a]=(0,r.useState)(i);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:a},t);let s="";return"object"==typeof l&&void 0!==l[n]&&(i=[...l[n].responses],o&&(i=i.splice(0,o)),s=i.map(((t,n)=>{const{name:o,photo:r}=t;return(0,e.createElement)("figure",{key:n,className:"gp-rsvp-response__member-avatar"},(0,e.createElement)("img",{alt:o,title:o,src:r}))}))),(0,e.createElement)(e.Fragment,null,s)},De=t=>{const{type:n,event:o,eventOptions:r}=t,i="default"===r.imageSize?"featured_image":"featured_image_"+r.imageSize,l=s(o[i]),a="gp-events-list";let c="location";const u=o.venue?.is_online_event;return u&&(c="video-alt2"),(0,e.createElement)("div",{className:`${a}`},(0,e.createElement)("div",{className:`${a}__header`},(0,e.createElement)("div",{className:`${a}__info`},r.showFeaturedImage&&(0,e.createElement)("figure",{className:`${a}__image`},(0,e.createElement)("a",{href:o.permalink},l)),(0,e.createElement)("div",{className:`${a}__datetime`},(0,e.createElement)("strong",null,o.datetime_start)),(0,e.createElement)("div",{className:`${a}__title`},(0,e.createElement)("a",{href:o.permalink},s(o.title))),o.venue&&r.showVenue&&(0,e.createElement)("div",{className:`${a}__venue`},(0,e.createElement)("span",{className:`dashicons dashicons-${c}`}),!u&&(0,e.createElement)("a",{href:o.venue.permalink},s(o.venue.name)),u&&(0,e.createElement)("span",null,s(o.venue.name))),r.showDescription&&(0,e.createElement)("div",{className:`${a}__content`},(0,e.createElement)("div",{className:`${a}__excerpt`},s(o.excerpt.split(" ").splice(0,parseInt(r.descriptionLimit)).join(" ")+"[…]"))))),(0,e.createElement)("div",{className:`${a}__footer`},r.showRsvpResponse&&(0,e.createElement)("div",{className:"gp-rsvp-response__items"},(0,e.createElement)(Le,{eventId:o.ID,value:"attending",responses:o.responses,limit:"3"})),"upcoming"===n&&r.showRsvp&&(0,e.createElement)(Me,{eventId:o.ID,currentUser:o.current_user,type:n,enableAnonymousRsvp:o.enable_anonymous_rsvp}),"past"===n&&r.showRsvp&&""!==o.current_user&&(0,e.createElement)(Re,{type:n,status:o.current_user?.status})))},je=t=>{const{eventOptions:n,maxNumberOfEvents:o,datetimeFormat:a,type:s,topics:c,venues:u}=t,[d,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1),h=d.map((t=>(0,e.createElement)(De,{key:t.ID,eventOptions:n,type:s,event:t})));return(0,r.useEffect)((()=>{let e="",t="";if("object"==typeof c&&(e=c.map((e=>e.slug))?.join(",")),"object"==typeof u&&(t=u.map((e=>e.slug))?.join(",")),Pe("is_user_logged_in"))Ne()({path:`/gatherpress/v1/event/events-list?event_list_type=${s}&max_number=${o}&datetime_format=${a}&topics=${e}&venues=${t}`}).then((e=>{m(!0),p(e)}));else{const n=Pe("event_rest_api")+`/events-list?event_list_type=${s}&max_number=${o}&datetime_format=${a}&topics=${e}&venues=${t}`;fetch(n).then((e=>e.json())).then((e=>{m(!0),p(e)}))}}),[p,o,a,s,c,u]),(0,e.createElement)("div",{className:`gp-${s}-events-list`},!f&&(0,e.createElement)(i.Spinner,null),f&&0===d.length&&(()=>{const t="upcoming"===s?(0,l.__)("There are no upcoming events.","gatherpress"):(0,l.__)("There are no past events.","gatherpress");return(0,e.createElement)("div",{className:`gp-${s}-events__no_events_message`},t)})(),f&&h)};o()((()=>{const t=document.querySelectorAll('[data-gp_block_name="events-list"]');for(let s=0;s array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4fec9a94e4a16f2a0a93'); + array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '7d75b0853ccb1fee0c70'); diff --git a/build/blocks/events-list/index.js b/build/blocks/events-list/index.js index ca5a33458..fbe72a8f6 100644 --- a/build/blocks/events-list/index.js +++ b/build/blocks/events-list/index.js @@ -1,2 +1,2 @@ -(()=>{var e,t={8207:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const i=window.lodash;var s=n(3967),l=n.n(s);const a=window.wp.i18n,c=window.wp.blockEditor,u=window.wp.components,d=window.wp.coreData,p=window.wp.data,f=window.wp.element;var m=n(3426);const h=m.default||m;var v=n(3253),y=n.n(v);const g=Math.min,b=Math.max,_=Math.round,w=Math.floor,E=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},S={start:"end",end:"start"};function O(e,t,n){return b(e,g(t,n))}function C(e,t){return"function"==typeof e?e(t):e}function k(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function R(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(k(e))?"y":"x"}function P(e){return A(N(e))}function M(e){return e.replace(/start|end/g,(e=>S[e]))}function L(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function D(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function I(e,t,n){let{reference:o,floating:r}=e;const i=N(t),s=P(t),l=R(s),a=k(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let f;switch(a){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(T(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function F(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=C(t,e),m=D(f),h=l[p?"floating"===d?"reference":"floating":d],v=j(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),y="floating"===d?{...s.floating,x:o,y:r}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=j(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:a}):y);return{top:(v.top-_.top+m.top)/b.y,bottom:(_.bottom-v.bottom+m.bottom)/b.y,left:(v.left-_.left+m.left)/b.x,right:(_.right-v.right+m.right)/b.x}}const H=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=C(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=k(r),g=k(l)===l,b=await(null==a.isRTL?void 0:a.isRTL(c.floating)),_=p||(g||!h?[L(l)]:function(e){const t=L(e);return[M(e),t,M(t)]}(l));p||"none"===m||_.push(...function(e,t,n,o){const r=T(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(k(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(M)))),i}(l,h,m,b));const w=[l,..._],E=await F(t,v),x=[];let S=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&x.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=T(e),r=P(e),i=R(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,b);x.push(E[e[0]],E[e[1]])}if(S=[...S,{placement:r,overflows:x}],!x.every((e=>e<=0))){var O,A;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(A=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},B=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=k(n),l=T(n),a="y"===N(n),c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=C(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof m&&(f="end"===l?-1*m:m),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},U=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=C(e,t),c={x:n,y:o},u=await F(t,a),d=N(k(r)),p=A(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=O(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";m=O(m+u["y"===d?"top":"left"],m,m-u[e])}const h=l.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function W(e){return q(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function q(e){return e instanceof Node||e instanceof V(e).Node}function $(e){return e instanceof Element||e instanceof V(e).Element}function G(e){return e instanceof HTMLElement||e instanceof V(e).HTMLElement}function X(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof V(e).ShadowRoot)}function Y(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function K(e){return["table","td","th"].includes(W(e))}function Z(e){const t=J(),n=ee(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function J(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Q(e){return["html","body","#document"].includes(W(e))}function ee(e){return V(e).getComputedStyle(e)}function te(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(e){if("html"===W(e))return e;const t=e.assignedSlot||e.parentNode||X(e)&&e.host||z(e);return X(t)?t.host:t}function oe(e){const t=ne(e);return Q(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&Y(t)?t:oe(t)}function re(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=oe(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=V(r);return i?t.concat(s,s.visualViewport||[],Y(r)?r:[],s.frameElement&&n?re(s.frameElement):[]):t.concat(r,re(r,[],n))}function ie(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=G(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,l=_(n)!==i||_(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function se(e){return $(e)?e:e.contextElement}function le(e){const t=se(e);if(!G(t))return E(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=ie(t);let s=(i?_(n.width):n.width)/o,l=(i?_(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ae=E(0);function ce(e){const t=V(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ae}function ue(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=se(e);let s=E(1);t&&(o?$(o)&&(s=le(o)):s=le(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==V(e))&&t}(i,n,o)?ce(i):E(0);let a=(r.left+l.x)/s.x,c=(r.top+l.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=V(i),t=o&&$(o)?V(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=le(n),t=n.getBoundingClientRect(),o=ee(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=r,c+=i,n=V(n).frameElement}}return j({width:u,height:d,x:a,y:c})}function de(e){return ue(z(e)).left+te(e).scrollLeft}function pe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=V(e),o=z(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;const e=J();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t)o=function(e){const t=z(e),n=te(e),o=e.ownerDocument.body,r=b(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=b(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+de(e);const l=-n.scrollTop;return"rtl"===ee(o).direction&&(s+=b(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:l}}(z(e));else if($(t))o=function(e,t){const n=ue(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=G(e)?le(e):E(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ce(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return j(o)}function fe(e,t){const n=ne(e);return!(n===t||!$(n)||Q(n))&&("fixed"===ee(n).position||fe(n,t))}function me(e,t,n){const o=G(t),r=z(t),i="fixed"===n,s=ue(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=E(0);if(o||!o&&!i)if(("body"!==W(t)||Y(r))&&(l=te(t)),o){const e=ue(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=de(r));return{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function he(e,t){return G(e)&&"fixed"!==ee(e).position?t?t(e):e.offsetParent:null}function ve(e,t){const n=V(e);if(!G(e))return n;let o=he(e,t);for(;o&&K(o)&&"static"===ee(o).position;)o=he(o,t);return o&&("html"===W(o)||"body"===W(o)&&"static"===ee(o).position&&!Z(o))?n:o||function(e){let t=ne(e);for(;G(t)&&!Q(t);){if(Z(t))return t;t=ne(t)}return null}(e)||n}const ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=G(n),i=z(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},l=E(1);const a=E(0);if((r||!r&&"fixed"!==o)&&(("body"!==W(n)||Y(i))&&(s=te(n)),G(n))){const e=ue(n);l=le(n),a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-s.scrollLeft*l.x+a.x,y:t.y*l.y-s.scrollTop*l.y+a.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=re(e,[],!1).filter((e=>$(e)&&"body"!==W(e))),r=null;const i="fixed"===ee(e).position;let s=i?ne(e):e;for(;$(s)&&!Q(s);){const t=ee(s),n=Z(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Y(s)&&!n&&fe(e,s))?o=o.filter((e=>e!==s)):r=t,s=ne(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],l=i.reduce(((e,n)=>{const o=pe(t,n,r);return e.top=b(o.top,e.top),e.right=g(o.right,e.right),e.bottom=g(o.bottom,e.bottom),e.left=b(o.left,e.left),e}),pe(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ve,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ve,i=this.getDimensions;return{reference:me(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return ie(e)},getScale:le,isElement:$,isRTL:function(e){return"rtl"===ee(e).direction}};const ge=(e,t,n)=>{const o=new Map,r={platform:ye,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=I(c,o,a),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},Ee={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},xe=(0,r.createContext)({getTooltipData:()=>Ee});function Se(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(xe).getTooltipData(e)}const Oe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,Ce=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ke=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ce(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:s=[B(Number(r)),H({fallbackAxisSideDirection:"start"}),U({padding:5})],border:l})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:l}=e,{element:a,padding:u=0}=C(c,e)||{};if(null==a)return{};const d=D(u),p={x:t,y:n},f=P(o),m=R(f),h=await i.getDimensions(a),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",_=v?"clientHeight":"clientWidth",w=r.reference[m]+r.reference[f]-p[f]-r.floating[m],E=p[f]-r.reference[f],x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let S=x?x[_]:0;S&&await(null==i.isElement?void 0:i.isElement(x))||(S=s.floating[_]||r.floating[m]);const k=w/2-E/2,A=S/2-h[m]/2-1,N=g(d[y],A),M=g(d[b],A),L=N,j=S-h[m]-M,I=S/2-h[m]/2+k,F=O(L,I,j),H=!l.arrow&&null!=T(o)&&I!=F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:l},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=l&&{borderBottom:l,borderRight:l};let p=0;if(l){const e=`${l}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ge(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ne=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:l,anchorSelect:a,place:c="top",offset:u=10,events:d=["hover"],openOnClick:p=!1,positionStrategy:f="absolute",middlewares:m,wrapper:h,delayShow:v=0,delayHide:y=0,float:_=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,afterShow:L,afterHide:D,content:j,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:V,arrowColor:q,role:$="tooltip"})=>{var G;const X=(0,r.useRef)(null),Y=(0,r.useRef)(null),K=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=(0,r.useRef)(null),[Q,ee]=(0,r.useState)(c),[te,ne]=(0,r.useState)({}),[oe,ie]=(0,r.useState)({}),[le,ae]=(0,r.useState)(!1),[ce,de]=(0,r.useState)(!1),[pe,fe]=(0,r.useState)(null),me=(0,r.useRef)(!1),he=(0,r.useRef)(null),{anchorRefs:ve,setActiveAnchor:ye}=Se(t),ge=(0,r.useRef)(!1),[be,_e]=(0,r.useState)([]),Ee=(0,r.useRef)(!1),xe=p||d.includes("click"),Ce=xe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&xe&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Pe=A?{...A}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!A&&xe&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=R?{...R}:{escape:O||!1,scroll:C||!1,resize:k||!1,clickOutsideAnchor:Ce||!1};N&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Oe((()=>(Ee.current=!0,()=>{Ee.current=!1})),[]);const Le=e=>{Ee.current&&(e&&de(!0),setTimeout((()=>{Ee.current&&(null==H||H(e),void 0===F&&ae(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&de(!0);const e=setTimeout((()=>{ae(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(le!==me.current)if(J.current&&clearTimeout(J.current),me.current=le,le)null==L||L();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{de(!1),fe(null),null==D||D()}),e+25)}}),[le]);const De=(e=v)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Le(!0)}),e)},je=(e=y)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{ge.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void ye({current:null});v?De():Le(!0),U(n),ye({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{S?je(y||100):y?je():Le(!1),K.current&&clearTimeout(K.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Te({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:c,offset:u,elementReference:o,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),he.current=n},Ue=e=>{var t;if(!le)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...be].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),K.current&&clearTimeout(K.current))},We=we(Ie,50,!0),Ve=we(Fe,50,!0),ze=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:M;n?He(n):_?he.current&&He(he.current):(null==B?void 0:B.isConnected)&&Te({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:c,offset:u,elementReference:B,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Ee.current&&(Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place))}))}),[le,B,j,P,c,null==pe?void 0:pe.place,u,f,M,null==pe?void 0:pe.position,_]);(0,r.useEffect)((()=>{var e,t;const n=new Set(ve);be.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=ke(B),s=ke(X.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let a=null;Me.resize?window.addEventListener("resize",r):B&&X.current&&(a=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,c=se(e),u=r||i?[...c?re(c):[],...re(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,o=null;const r=z(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const f={rootMargin:-w(u)+"px "+-w(r.clientWidth-(c+d))+"px "+-w(r.clientHeight-(u+p))+"px "+-w(c)+"px",threshold:b(0,g(1,a))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==a){if(!m)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}m=!1}try{o=new IntersectionObserver(h,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(h,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,m=null;s&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{m&&m.observe(t)}))),n()})),c&&!a&&m.observe(c),m.observe(t));let h=a?ue(e):null;return a&&function t(){const o=ue(e);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n(),h=o,p=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),m&&m.disconnect(),m=null,a&&cancelAnimationFrame(p)}}(B,X.current,ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],d=e=>{le&&(null==e?void 0:e.target)===B||Ie(e)},p=e=>{le&&(null==e?void 0:e.target)===B&&Fe()},f=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:We}):m.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ve}):m.includes(e)&&u.push({event:e,listener:p}))})),_&&u.push({event:"mousemove",listener:Be});const h=()=>{ge.current=!0},v=()=>{ge.current=!1,Fe()};return S&&!Ce&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==a||a(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),S&&!Ce&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,ze,ce,ve,be,T,A,R,xe]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(de(!1),Le(!1),U(null),K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&_e((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,a,null==pe?void 0:pe.anchorSelect,B]),(0,r.useEffect)((()=>{ze()}),[ze]),(0,r.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(I.current),()=>{e.disconnect()}}),[j,null==I?void 0:I.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...be,t];B&&n.includes(B)||U(null!==(e=be[0])&&void 0!==e?e:t)}),[l,be,B]),(0,r.useEffect)((()=>()=>{K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));_e(e)}catch(e){_e([])}}),[t,a,null==pe?void 0:pe.anchorSelect]);const qe=null!==(G=null==pe?void 0:pe.content)&&void 0!==G?G:j,$e=le&&Object.keys(te).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:Q,isOpen:Boolean(ce&&!E&&qe&&$e)}))),ce&&!E&&qe?r.createElement(h,{id:t,role:$,className:s("react-tooltip",Ae.tooltip,Re.tooltip,Re[i],n,`react-tooltip__place-${Q}`,Ae[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===f&&Ae.fixed,S&&Ae.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),le||"opacity"!==e.propertyName||(de(!1),fe(null),null==D||D())},style:{...P,...te,opacity:void 0!==V&&$e?V:void 0},ref:X},qe,r.createElement(h,{className:s("react-tooltip-arrow",Ae.arrow,Re.arrow,o,x&&Ae.noArrow),style:{...oe,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},Pe=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Me=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Le=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:i,render:l,className:a,classNameArrow:c,variant:u="dark",place:d="top",offset:p=10,wrapper:f="div",children:m=null,events:h=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:g,delayShow:b=0,delayHide:_=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N=!1,style:P,position:M,isOpen:L,disableStyleInjection:D=!1,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,role:W="tooltip"},V)=>{const[z,q]=(0,r.useState)(o),[$,G]=(0,r.useState)(i),[X,Y]=(0,r.useState)(d),[K,Z]=(0,r.useState)(u),[J,Q]=(0,r.useState)(p),[ee,te]=(0,r.useState)(b),[ne,oe]=(0,r.useState)(_),[re,ie]=(0,r.useState)(w),[se,le]=(0,r.useState)(E),[ae,ce]=(0,r.useState)(f),[ue,de]=(0,r.useState)(h),[pe,fe]=(0,r.useState)(y),[me,he]=(0,r.useState)(null),[ve,ye]=(0,r.useState)(null),ge=(0,r.useRef)(D),{anchorRefs:be,activeAnchor:_e}=Se(e),we=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ee=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:d)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:i)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:u)},offset:e=>{Q(null===e?p:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?b:Number(e))},"delay-hide":e=>{oe(null===e?_:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{le(null===e?E:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{q(o)}),[o]),(0,r.useEffect)((()=>{G(i)}),[i]),(0,r.useEffect)((()=>{Y(d)}),[d]),(0,r.useEffect)((()=>{Z(u)}),[u]),(0,r.useEffect)((()=>{Q(p)}),[p]),(0,r.useEffect)((()=>{te(b)}),[b]),(0,r.useEffect)((()=>{oe(_)}),[_]),(0,r.useEffect)((()=>{ie(w)}),[w]),(0,r.useEffect)((()=>{le(E)}),[E]),(0,r.useEffect)((()=>{fe(y)}),[y]),(0,r.useEffect)((()=>{ge.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(be);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const l=null!==(o=null!=ve?ve:s)&&void 0!==o?o:_e.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=we(l);Ee(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(l){const e=we(l);Ee(e),a.observe(l,c)}return()=>{a.disconnect()}}),[be,_e,ve,t,n]),(0,r.useEffect)((()=>{(null==P?void 0:P.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),j&&!Me("border",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`border\`.`),(null==P?void 0:P.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!Me("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let xe=m;const Oe=(0,r.useRef)(null);if(l){const e=l({content:null!=z?z:null,activeAnchor:ve});xe=e?r.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else z&&(xe=z);$&&(xe=r.createElement(Pe,{content:$}));const Ce={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:s(a,me),classNameArrow:c,content:xe,contentWrapperRef:Oe,place:X,variant:K,offset:J,wrapper:ae,events:ue,openOnClick:v,positionStrategy:pe,middlewares:g,delayShow:ee,delayHide:ne,float:re,hidden:se,noArrow:x,clickable:S,closeOnEsc:O,closeOnScroll:C,closeOnResize:k,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,isOpen:L,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return r.createElement(Ne,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||_e({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||_e({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const De=window.wp.apiFetch;var je=n.n(De);const Ie=({type:e="upcoming",status:t="attend"})=>{const n={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,a.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,a.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,a.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,a.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,a.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,a.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,a.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function Fe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const He=({eventId:e,currentUser:t="",type:n,enableAnonymousRsvp:o})=>{const[i,s]=(0,f.useState)(t.status),[l,c]=(0,f.useState)(Number(t.anonymous)),[d,p]=(0,f.useState)(t.guests),[m,v]=(0,f.useState)("hidden"),[g,b]=(0,f.useState)("false"),[_,w]=(0,f.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&y().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),w(!1)},x=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),je()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Fe("nonce")}}).then((e=>{if(e.success){s(e.status),p(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&E(t)}}))},S=e=>{switch(e){case"attending":return(0,a.__)("You're attending","gatherpress");case"waiting_list":return(0,a.__)("You're wait listed","gatherpress");case"not_attending":return(0,a.__)("You're not attending","gatherpress")}return(0,a.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(v("hidden"===m?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),w(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,a.__)("Edit RSVP","gatherpress")}return(0,a.__)("RSVP","gatherpress")})(i))),(0,r.createElement)(y(),{isOpen:_,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,a.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,a.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,a.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:Fe("login_url")},(0,a.__)("Login","gatherpress")),(0,a.__)(" to RSVP to events.","gatherpress")),""!==Fe("registration_url")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:Fe("registration_url")},(0,a.__)("Register","gatherpress")),(0,a.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,a.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"attend"===e?(t="attending",n=(0,a.__)("Attend","gatherpress")):(t="not_attending",n=(0,a.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},S(i)?S(i):(0,r.createElement)(u.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},h((0,a.sprintf)(/* translators: %s: button label. */ -(0,a.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),o?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);c(t),x(e,i,t,d,!1)},checked:l}),(0,r.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,a.__)("Only admins will see your identity.","gatherpress")},(0,a.__)("List me as anonymous.","gatherpress")),(0,r.createElement)(Le,{id:"gp-anonymous-tooltip"})):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>x(e,t,l),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,a.__)("Close","gatherpress")))))}),{status:i}))),"attend"!==i&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(Ie,{type:n,status:i}),0{const[i,s]=(0,f.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},e);let l="";return"object"==typeof i&&void 0!==i[t]&&(o=[...i[t].responses],n&&(o=o.splice(0,n)),l=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,r.createElement)("figure",{key:t,className:"gp-rsvp-response__member-avatar"},(0,r.createElement)("img",{alt:n,title:n,src:o}))}))),(0,r.createElement)(r.Fragment,null,l)},Ue=e=>{const{type:t,event:n,eventOptions:o}=e,i="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,s=h(n[i]),l="gp-events-list";let a="location";const c=n.venue?.is_online_event;return c&&(a="video-alt2"),(0,r.createElement)("div",{className:`${l}`},(0,r.createElement)("div",{className:`${l}__header`},(0,r.createElement)("div",{className:`${l}__info`},o.showFeaturedImage&&(0,r.createElement)("figure",{className:`${l}__image`},(0,r.createElement)("a",{href:n.permalink},s)),(0,r.createElement)("div",{className:`${l}__datetime`},(0,r.createElement)("strong",null,n.datetime_start)),(0,r.createElement)("div",{className:`${l}__title`},(0,r.createElement)("a",{href:n.permalink},h(n.title))),n.venue&&o.showVenue&&(0,r.createElement)("div",{className:`${l}__venue`},(0,r.createElement)("span",{className:`dashicons dashicons-${a}`}),!c&&(0,r.createElement)("a",{href:n.venue.permalink},h(n.venue.name)),c&&(0,r.createElement)("span",null,h(n.venue.name))),o.showDescription&&(0,r.createElement)("div",{className:`${l}__content`},(0,r.createElement)("div",{className:`${l}__excerpt`},h(n.excerpt.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))))),(0,r.createElement)("div",{className:`${l}__footer`},o.showRsvpResponse&&(0,r.createElement)("div",{className:"gp-rsvp-response__items"},(0,r.createElement)(Be,{eventId:n.ID,value:"attending",responses:n.responses,limit:"3"})),"upcoming"===t&&o.showRsvp&&(0,r.createElement)(He,{eventId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.enable_anonymous_rsvp}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,r.createElement)(Ie,{type:t,status:n.current_user?.status})))},We=e=>{const{eventOptions:t,maxNumberOfEvents:n,type:o,topics:i,venues:s}=e,[l,c]=(0,f.useState)([]),[d,p]=(0,f.useState)(!1),m=l.map((e=>(0,r.createElement)(Ue,{key:e.ID,eventOptions:t,type:o,event:e})));return(0,f.useEffect)((()=>{let e="",t="";if("object"==typeof i&&(e=i.map((e=>e.slug))?.join(",")),"object"==typeof s&&(t=s.map((e=>e.slug))?.join(",")),Fe("is_user_logged_in"))je()({path:`/gatherpress/v1/event/events-list?event_list_type=${o}&max_number=${n}&topics=${e}&venues=${t}`}).then((e=>{p(!0),c(e)}));else{const r=Fe("event_rest_api")+`/events-list?event_list_type=${o}&max_number=${n}&topics=${e}&venues=${t}`;fetch(r).then((e=>e.json())).then((e=>{p(!0),c(e)}))}}),[c,n,o,i,s]),(0,r.createElement)("div",{className:`gp-${o}-events-list`},!d&&(0,r.createElement)(u.Spinner,null),d&&0===l.length&&(()=>{const e="upcoming"===o?(0,a.__)("There are no upcoming events.","gatherpress"):(0,a.__)("There are no past events.","gatherpress");return(0,r.createElement)("div",{className:`gp-${o}-events__no_events_message`},e)})(),d&&m)},Ve=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},ze=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.0","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(ze,{edit:e=>{var t,n,o;const{attributes:s,setAttributes:f}=e,m=(0,c.useBlockProps)(),{topics:h,venues:v}=s,{topicsList:y}=(0,p.useSelect)((e=>{const{getEntityRecords:t}=e(d.store);return{topicsList:t("taxonomy","gp_topic",{per_page:-1,context:"view"})}}),[]),{venueList:g}=(0,p.useSelect)((e=>{const{getEntityRecords:t}=e(d.store);return{venueList:t("taxonomy","_gp_venue",{per_page:-1,context:"view"})}}),[]),b=null!==(t=y?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},_=null!==(n=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.InspectorControls,null,(0,r.createElement)(u.PanelBody,null,(0,r.createElement)("p",null,(0,a.__)("Event List type","gatherpress")),(0,r.createElement)(u.ButtonGroup,{className:"block-editor-block-styles__variants"},(0,r.createElement)(u.Button,{className:l()("block-editor-block-styles__item",{"is-active":"upcoming"===s.type}),variant:"secondary",label:(0,a.__)("Upcoming","gatherpress"),onClick:()=>{f({type:"upcoming"})}},(0,r.createElement)(u.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,a.__)("Upcoming","gatherpress"))),(0,r.createElement)(u.Button,{className:l()("block-editor-block-styles__item",{"is-active":"past"===s.type}),variant:"secondary",label:(0,a.__)("Past","gatherpress"),onClick:()=>{f({type:"past"})}},(0,r.createElement)(u.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,a.__)("Past","gatherpress"))))),(0,r.createElement)(u.PanelBody,null,(0,r.createElement)(u.RangeControl,{label:(0,a.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(s.maxNumberOfEvents,10),onChange:e=>f({maxNumberOfEvents:e})}),(0,r.createElement)(u.FormTokenField,{key:"query-controls-topics-select",label:(0,a.__)("Topics","gatherpress"),value:h&&h.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(b),onChange:e=>{if(e.some((e=>"string"==typeof e&&!b[e])))return;const t=e.map((e=>"string"==typeof e?b[e]:e));if((0,i.includes)(t,null))return!1;f({topics:t})},maxSuggestions:20}),(0,r.createElement)(u.FormTokenField,{key:"query-controls-venues-select",label:(0,a.__)("Venues","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(_),onChange:e=>{if(e.some((e=>"string"==typeof e&&!_[e])))return;const t=e.map((e=>"string"==typeof e?_[e]:e));if((0,i.includes)(t,null))return!1;f({venues:t})},maxSuggestions:20})),(0,r.createElement)(u.PanelBody,null,(0,r.createElement)(u.ToggleControl,{label:(0,a.__)("Show/Hide All RSVP Responses","gatherpress"),help:s.eventOptions.showRsvpResponse?(0,a.__)("Show All RSVP Responses","gatherpress"):(0,a.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=s.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{f({eventOptions:{...s.eventOptions,showRsvpResponse:e}})}}),(0,r.createElement)(u.ToggleControl,{label:(0,a.__)("Show/Hide My RSVP Response"),help:s.eventOptions.showRsvp?(0,a.__)("Show My RSVP Response"):(0,a.__)("Hide My RSVP Response"),checked:s.eventOptions.showRsvp,onChange:e=>{f({eventOptions:{...s.eventOptions,showRsvp:e}})}}),(0,r.createElement)(u.SelectControl,{label:(0,a.__)("Image Size Options","gatherpress"),value:s.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>f({eventOptions:{...s.eventOptions,imageSize:e}})}),(0,r.createElement)(u.ToggleControl,{label:(0,a.__)("Show/Hide Featured Image","gatherpress"),help:s.eventOptions.showFeaturedImage?(0,a.__)("Show Featured Image","gatherpress"):(0,a.__)("Hide Featured Image","gatherpress"),checked:s.eventOptions.showFeaturedImage,onChange:e=>{f({eventOptions:{...s.eventOptions,showFeaturedImage:e}})}}),(0,r.createElement)(u.ToggleControl,{label:(0,a.__)("Show/Hide Description","gatherpress"),help:s.eventOptions.showDescription?(0,a.__)("Show Description","gatherpress"):(0,a.__)("Hide Description","gatherpress"),checked:s.eventOptions.showDescription,onChange:e=>{f({eventOptions:{...s.eventOptions,showDescription:e}})}}),(0,r.createElement)(u.TextControl,{label:(0,a.__)("Description Limit"),help:(0,a.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(s.eventOptions.descriptionLimit),onChange:e=>f({eventOptions:{...s.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,r.createElement)(u.ToggleControl,{label:(0,a.__)("Show/Event Venue"),help:s.eventOptions.showVenue?(0,a.__)("Show Event Venue"):(0,a.__)("Hide Event Venue"),checked:s.eventOptions.showVenue,onChange:e=>{f({eventOptions:{...s.eventOptions,showVenue:e}})}}))),(0,r.createElement)("div",{...m},(0,r.createElement)(Ve,null,(0,r.createElement)(We,{eventOptions:s.eventOptions,maxNumberOfEvents:s.maxNumberOfEvents,type:s.type,topics:s.topics,venues:s.venues}))))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),s=n(7790);r(n(7790),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},7790: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 __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function _(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){o=t?x(e.children):[];var l=new m(o);o.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,l=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return s.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),l.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=a(e).querySelectorAll(p);return l.test(e)&&s.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=a(e,r).querySelector(r)).childNodes;var v}}},4152: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(8276)),i=n(1507),s=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],s=["input","select","textarea"],l={reset:!0,submit:!0};function a(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670: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(9196),i=o(n(484)),s=n(4606),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||s.returnFirstArg,u=(null==n?void 0:n.library)||l,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};a(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,_),v,h))}else{var w=!v.data.trim().length;if(w&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&w)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426: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.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var s=o(n(3670));t.domToReact=s.default;var l=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var a={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]}},4606: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.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)};var l={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=a.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(w(),!g(i))return y("property missing ':'");var o=g(s),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(l),a}}return b(),function(){var e,t=[];for(_(t);e=E();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(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,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}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}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==l){var a=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+a+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(a.returnFocus(n.props.preventScroll),a.teardownScopedFocus()):a.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(a.setupScopedFocus(n.node),a.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,l=n?{}:i.content,a=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(p.SafeHTMLCollection),l.default.instanceOf(p.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=a,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function a(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=a,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",a,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",a),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",a),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",a),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],s=null,l=!1;function a(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,l=n[0],a=n[n.length-1],c=i();if(e===c){if(!s)return;o=a}if(a!==c||s||(o=l),l===c&&s&&(o=a),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?a:l).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:l,SAME:a,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476: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(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,a):e.replace(i,a)).replace(o,l))}},5174: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(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[a])))?n.splice(a--,1):(l=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={672:0,783:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,l,a]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(a)var u=a(o)}for(t&&t(n);co(8207)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={8207:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const i=window.lodash;var a=n(3967),s=n.n(a),l=n(3426);const c=l.default||l,u=window.wp.i18n,d=window.wp.blockEditor,p=window.wp.components,f=window.wp.coreData,m=window.wp.data,h=window.wp.element;var v=n(3253),y=n.n(v);const g=Math.min,b=Math.max,_=Math.round,w=Math.floor,E=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},S={start:"end",end:"start"};function O(e,t,n){return b(e,g(t,n))}function C(e,t){return"function"==typeof e?e(t):e}function k(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function R(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(k(e))?"y":"x"}function P(e){return A(N(e))}function M(e){return e.replace(/start|end/g,(e=>S[e]))}function L(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function D(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function I(e,t,n){let{reference:o,floating:r}=e;const i=N(t),a=P(t),s=R(a),l=k(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(T(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1)}return f}async function F(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=C(t,e),m=D(f),h=s[p?"floating"===d?"reference":"floating":d],v=j(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{...a.floating,x:o,y:r}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=j(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-_.top+m.top)/b.y,bottom:(_.bottom-v.bottom+m.bottom)/b.y,left:(v.left-_.left+m.left)/b.x,right:(_.right-v.right+m.right)/b.x}}const H=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=C(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=k(r),g=k(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(g||!h?[L(s)]:function(e){const t=L(e);return[M(e),t,M(t)]}(s));p||"none"===m||_.push(...function(e,t,n,o){const r=T(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}(k(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(M)))),i}(s,h,m,b));const w=[s,..._],E=await F(t,v),x=[];let S=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&x.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=T(e),r=P(e),i=R(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=L(a)),[a,L(a)]}(r,a,b);x.push(E[e[0]],E[e[1]])}if(S=[...S,{placement:r,overflows:x}],!x.every((e=>e<=0))){var O,A;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(A=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},B=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=k(n),s=T(n),l="y"===N(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=C(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(f="end"===s?-1*m:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},U=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),c={x:n,y:o},u=await F(t,l),d=N(k(r)),p=A(d);let f=c[p],m=c[d];if(i){const e="y"===p?"bottom":"right";f=O(f+u["y"===p?"top":"left"],f,f-u[e])}if(a){const e="y"===d?"bottom":"right";m=O(m+u["y"===d?"top":"left"],m,m-u[e])}const h=s.fn({...t,[p]:f,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}};function W(e){return q(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function q(e){return e instanceof Node||e instanceof V(e).Node}function $(e){return e instanceof Element||e instanceof V(e).Element}function G(e){return e instanceof HTMLElement||e instanceof V(e).HTMLElement}function X(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof V(e).ShadowRoot)}function Y(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function K(e){return["table","td","th"].includes(W(e))}function Z(e){const t=J(),n=ee(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function J(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Q(e){return["html","body","#document"].includes(W(e))}function ee(e){return V(e).getComputedStyle(e)}function te(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(e){if("html"===W(e))return e;const t=e.assignedSlot||e.parentNode||X(e)&&e.host||z(e);return X(t)?t.host:t}function oe(e){const t=ne(e);return Q(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&Y(t)?t:oe(t)}function re(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=oe(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),a=V(r);return i?t.concat(a,a.visualViewport||[],Y(r)?r:[],a.frameElement&&n?re(a.frameElement):[]):t.concat(r,re(r,[],n))}function ie(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=G(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=_(n)!==i||_(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function ae(e){return $(e)?e:e.contextElement}function se(e){const t=ae(e);if(!G(t))return E(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=ie(t);let a=(i?_(n.width):n.width)/o,s=(i?_(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const le=E(0);function ce(e){const t=V(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ue(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=ae(e);let a=E(1);t&&(o?$(o)&&(a=se(o)):a=se(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==V(e))&&t}(i,n,o)?ce(i):E(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,d=r.height/a.y;if(i){const e=V(i),t=o&&$(o)?V(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=se(n),t=n.getBoundingClientRect(),o=ee(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=r,c+=i,n=V(n).frameElement}}return j({width:u,height:d,x:l,y:c})}function de(e){return ue(z(e)).left+te(e).scrollLeft}function pe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=V(e),o=z(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const e=J();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)o=function(e){const t=z(e),n=te(e),o=e.ownerDocument.body,r=b(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=b(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+de(e);const s=-n.scrollTop;return"rtl"===ee(o).direction&&(a+=b(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(z(e));else if($(t))o=function(e,t){const n=ue(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=G(e)?se(e):E(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ce(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return j(o)}function fe(e,t){const n=ne(e);return!(n===t||!$(n)||Q(n))&&("fixed"===ee(n).position||fe(n,t))}function me(e,t,n){const o=G(t),r=z(t),i="fixed"===n,a=ue(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=E(0);if(o||!o&&!i)if(("body"!==W(t)||Y(r))&&(s=te(t)),o){const e=ue(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=de(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function he(e,t){return G(e)&&"fixed"!==ee(e).position?t?t(e):e.offsetParent:null}function ve(e,t){const n=V(e);if(!G(e))return n;let o=he(e,t);for(;o&&K(o)&&"static"===ee(o).position;)o=he(o,t);return o&&("html"===W(o)||"body"===W(o)&&"static"===ee(o).position&&!Z(o))?n:o||function(e){let t=ne(e);for(;G(t)&&!Q(t);){if(Z(t))return t;t=ne(t)}return null}(e)||n}const ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=G(n),i=z(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=E(1);const l=E(0);if((r||!r&&"fixed"!==o)&&(("body"!==W(n)||Y(i))&&(a=te(n)),G(n))){const e=ue(n);s=se(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=re(e,[],!1).filter((e=>$(e)&&"body"!==W(e))),r=null;const i="fixed"===ee(e).position;let a=i?ne(e):e;for(;$(a)&&!Q(a);){const t=ee(a),n=Z(a);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Y(a)&&!n&&fe(e,a))?o=o.filter((e=>e!==a)):r=t,a=ne(a)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=i[0],s=i.reduce(((e,n)=>{const o=pe(t,n,r);return e.top=b(o.top,e.top),e.right=g(o.right,e.right),e.bottom=g(o.bottom,e.bottom),e.left=b(o.left,e.left),e}),pe(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ve,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||ve,i=this.getDimensions;return{reference:me(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return ie(e)},getScale:se,isElement:$,isRTL:function(e){return"rtl"===ee(e).direction}};const ge=(e,t,n)=>{const o=new Map,r={platform:ye,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=I(c,o,l),p=o,f={},m=0;for(let n=0;n{let o=null;return function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))}},Ee={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},xe=(0,r.createContext)({getTooltipData:()=>Ee});function Se(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(xe).getTooltipData(e)}const Oe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,Ce=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ke=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ce(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:a=[B(Number(r)),H({fallbackAxisSideDirection:"start"}),U({padding:5})],border:s})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=a;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:a,middlewareData:s}=e,{element:l,padding:u=0}=C(c,e)||{};if(null==l)return{};const d=D(u),p={x:t,y:n},f=P(o),m=R(f),h=await i.getDimensions(l),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",_=v?"clientHeight":"clientWidth",w=r.reference[m]+r.reference[f]-p[f]-r.floating[m],E=p[f]-r.reference[f],x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let S=x?x[_]:0;S&&await(null==i.isElement?void 0:i.isElement(x))||(S=a.floating[_]||r.floating[m]);const k=w/2-E/2,A=S/2-h[m]/2-1,N=g(d[y],A),M=g(d[b],A),L=N,j=S-h[m]-M,I=S/2-h[m]/2+k,F=O(L,I,j),H=!s.arrow&&null!=T(o)&&I!=F&&r.reference[m]/2-(I{var r,i;const a={left:`${e}px`,top:`${t}px`,border:s},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let p=0;if(s){const e=`${s}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:a,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ge(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ne=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:s,anchorSelect:l,place:c="top",offset:u=10,events:d=["hover"],openOnClick:p=!1,positionStrategy:f="absolute",middlewares:m,wrapper:h,delayShow:v=0,delayHide:y=0,float:_=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,afterShow:L,afterHide:D,content:j,contentWrapperRef:I,isOpen:F,setIsOpen:H,activeAnchor:B,setActiveAnchor:U,border:W,opacity:V,arrowColor:q,role:$="tooltip"})=>{var G;const X=(0,r.useRef)(null),Y=(0,r.useRef)(null),K=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=(0,r.useRef)(null),[Q,ee]=(0,r.useState)(c),[te,ne]=(0,r.useState)({}),[oe,ie]=(0,r.useState)({}),[se,le]=(0,r.useState)(!1),[ce,de]=(0,r.useState)(!1),[pe,fe]=(0,r.useState)(null),me=(0,r.useRef)(!1),he=(0,r.useRef)(null),{anchorRefs:ve,setActiveAnchor:ye}=Se(t),ge=(0,r.useRef)(!1),[be,_e]=(0,r.useState)([]),Ee=(0,r.useRef)(!1),xe=p||d.includes("click"),Ce=xe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&xe&&Object.assign(Ne,{mouseenter:!1,focus:!1,click:!0});const Pe=A?{...A}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!A&&xe&&Object.assign(Pe,{mouseleave:!1,blur:!1});const Me=R?{...R}:{escape:O||!1,scroll:C||!1,resize:k||!1,clickOutsideAnchor:Ce||!1};N&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Oe((()=>(Ee.current=!0,()=>{Ee.current=!1})),[]);const Le=e=>{Ee.current&&(e&&de(!0),setTimeout((()=>{Ee.current&&(null==H||H(e),void 0===F&&le(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&de(!0);const e=setTimeout((()=>{le(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(se!==me.current)if(J.current&&clearTimeout(J.current),me.current=se,se)null==L||L();else{const e=(e=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,n,o]=t;return"s"!==o&&"ms"!==o?0:Number(n)*("ms"===o?1:1e3)})();J.current=setTimeout((()=>{de(!1),fe(null),null==D||D()}),e+25)}}),[se]);const De=(e=v)=>{K.current&&clearTimeout(K.current),K.current=setTimeout((()=>{Le(!0)}),e)},je=(e=y)=>{Z.current&&clearTimeout(Z.current),Z.current=setTimeout((()=>{ge.current||Le(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return U(null),void ye({current:null});v?De():Le(!0),U(n),ye({current:n}),Z.current&&clearTimeout(Z.current)},Fe=()=>{S?je(y||100):y?je():Le(!1),K.current&&clearTimeout(K.current)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Te({place:null!==(n=null==pe?void 0:pe.place)&&void 0!==n?n:c,offset:u,elementReference:o,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),he.current=n},Ue=e=>{var t;if(!se)return;const n=e.target;(null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...be].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),K.current&&clearTimeout(K.current))},We=we(Ie,50,!0),Ve=we(Fe,50,!0),ze=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==pe?void 0:pe.position)&&void 0!==e?e:M;n?He(n):_?he.current&&He(he.current):(null==B?void 0:B.isConnected)&&Te({place:null!==(t=null==pe?void 0:pe.place)&&void 0!==t?t:c,offset:u,elementReference:B,tooltipReference:X.current,tooltipArrowReference:Y.current,strategy:f,middlewares:m,border:W}).then((e=>{Ee.current&&(Object.keys(e.tooltipStyles).length&&ne(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),ee(e.place))}))}),[se,B,j,P,c,null==pe?void 0:pe.place,u,f,M,null==pe?void 0:pe.position,_]);(0,r.useEffect)((()=>{var e,t;const n=new Set(ve);be.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${s}']`);o&&n.add({current:o});const r=()=>{Le(!1)},i=ke(B),a=ke(X.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let l=null;Me.resize?window.addEventListener("resize",r):B&&X.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=ae(e),u=r||i?[...c?re(c):[],...re(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,o=null;const r=z(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-w(u)+"px "+-w(r.clientWidth-(c+d))+"px "+-w(r.clientHeight-(u+p))+"px "+-w(c)+"px",threshold:b(0,g(1,l))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}m=!1}try{o=new IntersectionObserver(h,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(h,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,m=null;a&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{m&&m.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let h=l?ue(e):null;return l&&function t(){const o=ue(e);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n(),h=o,p=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(p)}}(B,X.current,ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",c),Me.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],d=e=>{se&&(null==e?void 0:e.target)===B||Ie(e)},p=e=>{se&&(null==e?void 0:e.target)===B&&Fe()},f=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:We}):m.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ve}):m.includes(e)&&u.push({event:e,listener:p}))})),_&&u.push({event:"mousemove",listener:Be});const h=()=>{ge.current=!0},v=()=>{ge.current=!1,Fe()};return S&&!Ce&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==l||l(),Me.clickOutsideAnchor&&window.removeEventListener("click",Ue),Me.escape&&window.removeEventListener("keydown",c),S&&!Ce&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",h),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[B,ze,ce,ve,be,T,A,R,xe]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&e.target.getAttribute("data-tooltip-id")===t&&n.push(e.target),"childList"===e.type){if(B){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,B))&&(de(!1),Le(!1),U(null),K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&_e((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[t,l,null==pe?void 0:pe.anchorSelect,B]),(0,r.useEffect)((()=>{ze()}),[ze]),(0,r.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(I.current),()=>{e.disconnect()}}),[j,null==I?void 0:I.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...be,t];B&&n.includes(B)||U(null!==(e=be[0])&&void 0!==e?e:t)}),[s,be,B]),(0,r.useEffect)((()=>()=>{K.current&&clearTimeout(K.current),Z.current&&clearTimeout(Z.current)}),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==pe?void 0:pe.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{const e=Array.from(document.querySelectorAll(n));_e(e)}catch(e){_e([])}}),[t,l,null==pe?void 0:pe.anchorSelect]);const qe=null!==(G=null==pe?void 0:pe.content)&&void 0!==G?G:j,$e=se&&Object.keys(te).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}fe(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?je(e.delay):Le(!1)},activeAnchor:B,place:Q,isOpen:Boolean(ce&&!E&&qe&&$e)}))),ce&&!E&&qe?r.createElement(h,{id:t,role:$,className:a("react-tooltip",Ae.tooltip,Re.tooltip,Re[i],n,`react-tooltip__place-${Q}`,Ae[$e?"show":"closing"],$e?"react-tooltip__show":"react-tooltip__closing","fixed"===f&&Ae.fixed,S&&Ae.clickable),onTransitionEnd:e=>{J.current&&clearTimeout(J.current),se||"opacity"!==e.propertyName||(de(!1),fe(null),null==D||D())},style:{...P,...te,opacity:void 0!==V&&$e?V:void 0},ref:X},qe,r.createElement(h,{className:a("react-tooltip-arrow",Ae.arrow,Re.arrow,o,x&&Ae.noArrow),style:{...oe,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Y})):null},Pe=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Me=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Le=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:i,render:s,className:l,classNameArrow:c,variant:u="dark",place:d="top",offset:p=10,wrapper:f="div",children:m=null,events:h=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:g,delayShow:b=0,delayHide:_=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N=!1,style:P,position:M,isOpen:L,disableStyleInjection:D=!1,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,role:W="tooltip"},V)=>{const[z,q]=(0,r.useState)(o),[$,G]=(0,r.useState)(i),[X,Y]=(0,r.useState)(d),[K,Z]=(0,r.useState)(u),[J,Q]=(0,r.useState)(p),[ee,te]=(0,r.useState)(b),[ne,oe]=(0,r.useState)(_),[re,ie]=(0,r.useState)(w),[ae,se]=(0,r.useState)(E),[le,ce]=(0,r.useState)(f),[ue,de]=(0,r.useState)(h),[pe,fe]=(0,r.useState)(y),[me,he]=(0,r.useState)(null),[ve,ye]=(0,r.useState)(null),ge=(0,r.useRef)(D),{anchorRefs:be,activeAnchor:_e}=Se(e),we=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ee=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:d)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:i)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:u)},offset:e=>{Q(null===e?p:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?b:Number(e))},"delay-hide":e=>{oe(null===e?_:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{se(null===e?E:"true"===e)},"class-name":e=>{he(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{q(o)}),[o]),(0,r.useEffect)((()=>{G(i)}),[i]),(0,r.useEffect)((()=>{Y(d)}),[d]),(0,r.useEffect)((()=>{Z(u)}),[u]),(0,r.useEffect)((()=>{Q(p)}),[p]),(0,r.useEffect)((()=>{te(b)}),[b]),(0,r.useEffect)((()=>{oe(_)}),[_]),(0,r.useEffect)((()=>{ie(w)}),[w]),(0,r.useEffect)((()=>{se(E)}),[E]),(0,r.useEffect)((()=>{fe(y)}),[y]),(0,r.useEffect)((()=>{ge.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(be);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const a=document.querySelector(`[id='${t}']`);if(a&&r.add({current:a}),!r.size)return()=>null;const s=null!==(o=null!=ve?ve:a)&&void 0!==o?o:_e.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=we(s);Ee(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(s){const e=we(s);Ee(e),l.observe(s,c)}return()=>{l.disconnect()}}),[be,_e,ve,t,n]),(0,r.useEffect)((()=>{(null==P?void 0:P.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),j&&!Me("border",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`border\`.`),(null==P?void 0:P.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!Me("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let xe=m;const Oe=(0,r.useRef)(null);if(s){const e=s({content:null!=z?z:null,activeAnchor:ve});xe=e?r.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else z&&(xe=z);$&&(xe=r.createElement(Pe,{content:$}));const Ce={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:a(l,me),classNameArrow:c,content:xe,contentWrapperRef:Oe,place:X,variant:K,offset:J,wrapper:le,events:ue,openOnClick:v,positionStrategy:pe,middlewares:g,delayShow:ee,delayHide:ne,float:re,hidden:ae,noArrow:x,clickable:S,closeOnEsc:O,closeOnScroll:C,closeOnResize:k,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:P,position:M,isOpen:L,border:j,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return r.createElement(Ne,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||_e({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||_e({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const De=window.wp.apiFetch;var je=n.n(De);const Ie=({type:e="upcoming",status:t="attend"})=>{const n={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,u.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,u.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,u.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,u.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function Fe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const He=({eventId:e,currentUser:t="",type:n,enableAnonymousRsvp:o})=>{const[i,a]=(0,h.useState)(t.status),[s,l]=(0,h.useState)(Number(t.anonymous)),[d,f]=(0,h.useState)(t.guests),[m,v]=(0,h.useState)("hidden"),[g,b]=(0,h.useState)("false"),[_,w]=(0,h.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&y().setAppElement(".gp-enabled");const E=e=>{e.preventDefault(),w(!1)},x=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),je()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Fe("nonce")}}).then((e=>{if(e.success){a(e.status),f(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&E(t)}}))},S=e=>{switch(e){case"attending":return(0,u.__)("You're attending","gatherpress");case"waiting_list":return(0,u.__)("You're wait listed","gatherpress");case"not_attending":return(0,u.__)("You're not attending","gatherpress")}return(0,u.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":g,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(v("hidden"===m?"show":"hidden"),b("false"===g?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),w(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,u.__)("Edit RSVP","gatherpress")}return(0,u.__)("RSVP","gatherpress")})(i))),(0,r.createElement)(y(),{isOpen:_,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,u.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,u.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,u.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:Fe("login_url")},(0,u.__)("Login","gatherpress")),(0,u.__)(" to RSVP to events.","gatherpress")),""!==Fe("registration_url")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:Fe("registration_url")},(0,u.__)("Register","gatherpress")),(0,u.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,u.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"attend"===e?(t="attending",n=(0,u.__)("Attend","gatherpress")):(t="not_attending",n=(0,u.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},S(i)?S(i):(0,r.createElement)(p.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},c((0,u.sprintf)(/* translators: %s: button label. */ +(0,u.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),o?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);l(t),x(e,i,t,d,!1)},checked:s}),(0,r.createElement)("label",{htmlFor:"gp-anonymous",tabIndex:"0",className:"gp-tooltip","data-tooltip-id":"gp-anonymous-tooltip","data-tooltip-content":(0,u.__)("Only admins will see your identity.","gatherpress")},(0,u.__)("List me as anonymous.","gatherpress")),(0,r.createElement)(Le,{id:"gp-anonymous-tooltip"})):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>x(e,t,s),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:E,className:"gp-buttons__button wp-block-button__link"},(0,u.__)("Close","gatherpress")))))}),{status:i}))),"attend"!==i&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(Ie,{type:n,status:i}),0{const[i,a]=(0,h.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:a},e);let s="";return"object"==typeof i&&void 0!==i[t]&&(o=[...i[t].responses],n&&(o=o.splice(0,n)),s=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,r.createElement)("figure",{key:t,className:"gp-rsvp-response__member-avatar"},(0,r.createElement)("img",{alt:n,title:n,src:o}))}))),(0,r.createElement)(r.Fragment,null,s)},Ue=e=>{const{type:t,event:n,eventOptions:o}=e,i="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,a=c(n[i]),s="gp-events-list";let l="location";const u=n.venue?.is_online_event;return u&&(l="video-alt2"),(0,r.createElement)("div",{className:`${s}`},(0,r.createElement)("div",{className:`${s}__header`},(0,r.createElement)("div",{className:`${s}__info`},o.showFeaturedImage&&(0,r.createElement)("figure",{className:`${s}__image`},(0,r.createElement)("a",{href:n.permalink},a)),(0,r.createElement)("div",{className:`${s}__datetime`},(0,r.createElement)("strong",null,n.datetime_start)),(0,r.createElement)("div",{className:`${s}__title`},(0,r.createElement)("a",{href:n.permalink},c(n.title))),n.venue&&o.showVenue&&(0,r.createElement)("div",{className:`${s}__venue`},(0,r.createElement)("span",{className:`dashicons dashicons-${l}`}),!u&&(0,r.createElement)("a",{href:n.venue.permalink},c(n.venue.name)),u&&(0,r.createElement)("span",null,c(n.venue.name))),o.showDescription&&(0,r.createElement)("div",{className:`${s}__content`},(0,r.createElement)("div",{className:`${s}__excerpt`},c(n.excerpt.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))))),(0,r.createElement)("div",{className:`${s}__footer`},o.showRsvpResponse&&(0,r.createElement)("div",{className:"gp-rsvp-response__items"},(0,r.createElement)(Be,{eventId:n.ID,value:"attending",responses:n.responses,limit:"3"})),"upcoming"===t&&o.showRsvp&&(0,r.createElement)(He,{eventId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.enable_anonymous_rsvp}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,r.createElement)(Ie,{type:t,status:n.current_user?.status})))},We=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:o,type:i,topics:a,venues:s}=e,[l,c]=(0,h.useState)([]),[d,f]=(0,h.useState)(!1),m=l.map((e=>(0,r.createElement)(Ue,{key:e.ID,eventOptions:t,type:i,event:e})));return(0,h.useEffect)((()=>{let e="",t="";if("object"==typeof a&&(e=a.map((e=>e.slug))?.join(",")),"object"==typeof s&&(t=s.map((e=>e.slug))?.join(",")),Fe("is_user_logged_in"))je()({path:`/gatherpress/v1/event/events-list?event_list_type=${i}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`}).then((e=>{f(!0),c(e)}));else{const r=Fe("event_rest_api")+`/events-list?event_list_type=${i}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`;fetch(r).then((e=>e.json())).then((e=>{f(!0),c(e)}))}}),[c,n,o,i,a,s]),(0,r.createElement)("div",{className:`gp-${i}-events-list`},!d&&(0,r.createElement)(p.Spinner,null),d&&0===l.length&&(()=>{const e="upcoming"===i?(0,u.__)("There are no upcoming events.","gatherpress"):(0,u.__)("There are no past events.","gatherpress");return(0,r.createElement)("div",{className:`gp-${i}-events__no_events_message`},e)})(),d&&m)},Ve=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},ze=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.0","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"datetimeFormat":{"type":"string","default":"D, M j, Y, g:i a T"},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(ze,{edit:e=>{var t,n,o;const{attributes:a,setAttributes:l}=e,h=(0,d.useBlockProps)(),{topics:v,venues:y}=a,{topicsList:g}=(0,m.useSelect)((e=>{const{getEntityRecords:t}=e(f.store);return{topicsList:t("taxonomy","gp_topic",{per_page:-1,context:"view"})}}),[]),{venueList:b}=(0,m.useSelect)((e=>{const{getEntityRecords:t}=e(f.store);return{venueList:t("taxonomy","_gp_venue",{per_page:-1,context:"view"})}}),[]),_=null!==(t=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},w=null!==(n=b?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.InspectorControls,null,(0,r.createElement)(p.PanelBody,null,(0,r.createElement)("p",null,(0,u.__)("Event List type","gatherpress")),(0,r.createElement)(p.ButtonGroup,{className:"block-editor-block-styles__variants"},(0,r.createElement)(p.Button,{className:s()("block-editor-block-styles__item",{"is-active":"upcoming"===a.type}),variant:"secondary",label:(0,u.__)("Upcoming","gatherpress"),onClick:()=>{l({type:"upcoming"})}},(0,r.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,u.__)("Upcoming","gatherpress"))),(0,r.createElement)(p.Button,{className:s()("block-editor-block-styles__item",{"is-active":"past"===a.type}),variant:"secondary",label:(0,u.__)("Past","gatherpress"),onClick:()=>{l({type:"past"})}},(0,r.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,u.__)("Past","gatherpress"))))),(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.TextControl,{label:(0,u.__)("Date & time format","gatherpress"),value:a.datetimeFormat,help:c((0,u.__)('For more information read the Documentation on date and time formatting.',"gatherpress")),onChange:e=>l({datetimeFormat:e})}),(0,r.createElement)(p.RangeControl,{label:(0,u.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(a.maxNumberOfEvents,10),onChange:e=>l({maxNumberOfEvents:e})}),(0,r.createElement)(p.FormTokenField,{key:"query-controls-topics-select",label:(0,u.__)("Topics","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(_),onChange:e=>{if(e.some((e=>"string"==typeof e&&!_[e])))return;const t=e.map((e=>"string"==typeof e?_[e]:e));if((0,i.includes)(t,null))return!1;l({topics:t})},maxSuggestions:20}),(0,r.createElement)(p.FormTokenField,{key:"query-controls-venues-select",label:(0,u.__)("Venues","gatherpress"),value:y&&y.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(w),onChange:e=>{if(e.some((e=>"string"==typeof e&&!w[e])))return;const t=e.map((e=>"string"==typeof e?w[e]:e));if((0,i.includes)(t,null))return!1;l({venues:t})},maxSuggestions:20})),(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide All RSVP Responses","gatherpress"),help:a.eventOptions.showRsvpResponse?(0,u.__)("Show All RSVP Responses","gatherpress"):(0,u.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=a.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{l({eventOptions:{...a.eventOptions,showRsvpResponse:e}})}}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide My RSVP Response"),help:a.eventOptions.showRsvp?(0,u.__)("Show My RSVP Response"):(0,u.__)("Hide My RSVP Response"),checked:a.eventOptions.showRsvp,onChange:e=>{l({eventOptions:{...a.eventOptions,showRsvp:e}})}}),(0,r.createElement)(p.SelectControl,{label:(0,u.__)("Image Size Options","gatherpress"),value:a.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>l({eventOptions:{...a.eventOptions,imageSize:e}})}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide Featured Image","gatherpress"),help:a.eventOptions.showFeaturedImage?(0,u.__)("Show Featured Image","gatherpress"):(0,u.__)("Hide Featured Image","gatherpress"),checked:a.eventOptions.showFeaturedImage,onChange:e=>{l({eventOptions:{...a.eventOptions,showFeaturedImage:e}})}}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Hide Description","gatherpress"),help:a.eventOptions.showDescription?(0,u.__)("Show Description","gatherpress"):(0,u.__)("Hide Description","gatherpress"),checked:a.eventOptions.showDescription,onChange:e=>{l({eventOptions:{...a.eventOptions,showDescription:e}})}}),(0,r.createElement)(p.TextControl,{label:(0,u.__)("Description Limit"),help:(0,u.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(a.eventOptions.descriptionLimit),onChange:e=>l({eventOptions:{...a.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,r.createElement)(p.ToggleControl,{label:(0,u.__)("Show/Event Venue"),help:a.eventOptions.showVenue?(0,u.__)("Show Event Venue"):(0,u.__)("Hide Event Venue"),checked:a.eventOptions.showVenue,onChange:e=>{l({eventOptions:{...a.eventOptions,showVenue:e}})}}))),(0,r.createElement)("div",{...h},(0,r.createElement)(Ve,null,(0,r.createElement)(We,{eventOptions:a.eventOptions,maxNumberOfEvents:a.maxNumberOfEvents,datetimeFormat:a.datetimeFormat,type:a.type,topics:a.topics,venues:a.venues}))))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(9960),a=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new a.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790: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 __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=m;var h=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,a.isTag)(e)}function y(e){return e.type===a.ElementType.CDATA}function g(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function _(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?x(e.children):[],r=new h(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?x(e.children):[];var a=new f(o);o.forEach((function(e){return e.parent=a})),n=a}else if(w(e)){o=t?x(e.children):[];var s=new m(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,a=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,m="object"==typeof document&&document.createElement("template");m&&m.content&&(f=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var m=c(e);return a.test(e)||null===(t=null==(v=m.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),s.test(e)||null===(u=null==(v=m.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),m.querySelectorAll(n);case o:case r:var h=l(e).querySelectorAll(p);return s.test(e)&&a.test(e)?h[0].parentNode.childNodes:h;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}}},4152: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(8276)),i=n(1507),a=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function i(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),i=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var m=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&a.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,m&&m.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670: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(9196),i=o(n(484)),a=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||a.returnFirstArg,u=(null==n?void 0:n.library)||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,m=t.length,h=0;h1&&(y=d(y,{key:y.key||h})),o.push(c(y,v,h));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,a.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}m>1&&(b.key=h),o.push(c(p(v.name,b,_),v,h))}else{var w=!v.data.trim().length;if(w&&v.parent&&!(0,a.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&w)continue;o.push(c(v.data,v,h))}}return 1===o.length?o[0]:o}},3426: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.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var i=o(n(484));t.attributesToProps=i.default;var a=o(n(3670));t.domToReact=a.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,a.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606: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.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),i=o(n(1476)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function m(){var e={line:d,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:d,column:p},this.source=l.source}h.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function E(){var e=m(),n=g(r);if(n){if(w(),!g(i))return y("property missing ':'");var o=g(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(s),l}}return b(),function(){var e,t=[];for(_(t);e=E();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(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 s=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 s.name="Invariant Violation",s}}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}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>a}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),m.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,a=i&&i().ownerDocument||document;r&&d.add(a.body,r),o&&d.add(a.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,a=e.children,s=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,a);return this.props.overlayElement(c,d)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(p.SafeHTMLCollection),s.default.instanceOf(p.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(a).forEach((function(e){return e.removeAttribute("aria-hidden")}))),a=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return a=t||a},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){a=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},i=n(1112),a=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,a],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(i.parentElement&&i.parentElement.removeChild(i),a.parentElement&&a.parentElement.removeChild(a))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var a in o)r(i,o[a]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},i=[],a=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!a)return;setTimeout((function(){a.contains(document.activeElement)||((0,r.default)(a)[0]||a).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,a=t.shiftKey,s=n[0],l=n[n.length-1],c=i();if(e===c){if(!a)return;o=l}if(l!==c||a||(o=s),s===c&&a&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=a?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=a?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(a)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,a);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,a);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,a);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476: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(5174)),i=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,i.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(o,s))}},5174: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(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var a=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={672:0,783:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);co(8207)));r=o.O(r)})(); \ No newline at end of file diff --git a/includes/core/classes/class-rest-api.php b/includes/core/classes/class-rest-api.php index 2164cdda7..9a49a3f2e 100644 --- a/includes/core/classes/class-rest-api.php +++ b/includes/core/classes/class-rest-api.php @@ -232,6 +232,9 @@ protected function events_list_route(): array { 'required' => true, 'validate_callback' => array( $this, 'validate_number' ), ), + 'datetime_format' => array( + 'required' => false, + ), 'topics' => array( 'required' => false, ), @@ -520,6 +523,7 @@ public function events_list( WP_REST_Request $request ): WP_REST_Response { $params = $request->get_params(); $event_list_type = $params['event_list_type']; $max_number = $this->max_number( (int) $params['max_number'], 5 ); + $datetime_format = $params['datetime_format'] ?: 'D, M j, Y, g:i a T'; $posts = array(); $topics = array(); $venues = array(); @@ -550,8 +554,8 @@ static function( $slug ): string { $venue_information = $event->get_venue_information(); $posts[] = array( 'ID' => $post_id, - 'datetime_start' => $event->get_datetime_start(), - 'datetime_end' => $event->get_datetime_end(), + 'datetime_start' => $event->get_datetime_start( $datetime_format ), + 'datetime_end' => $event->get_datetime_end( $datetime_format ), 'permalink' => get_the_permalink( $post_id ), 'title' => get_the_title( $post_id ), 'excerpt' => get_the_excerpt( $post_id ), diff --git a/src/blocks/events-list/block.json b/src/blocks/events-list/block.json index d4f63595c..f09e5579c 100644 --- a/src/blocks/events-list/block.json +++ b/src/blocks/events-list/block.json @@ -21,6 +21,10 @@ "showVenue": true } }, + "datetimeFormat": { + "type": "string", + "default": "D, M j, Y, g:i a T" + }, "maxNumberOfEvents": { "type": "integer", "default": 5 diff --git a/src/blocks/events-list/edit.js b/src/blocks/events-list/edit.js index 5efb356fe..a3684cfbd 100644 --- a/src/blocks/events-list/edit.js +++ b/src/blocks/events-list/edit.js @@ -3,6 +3,7 @@ */ import { includes } from 'lodash'; import classnames from 'classnames'; +import HtmlReactParser from 'html-react-parser'; /** * WordPress dependencies. @@ -188,6 +189,19 @@ const Edit = (props) => { + Documentation on date and time formatting.', + 'gatherpress' + ) + )} + onChange={(newVal) => + setAttributes({ datetimeFormat: newVal }) + } + /> { { } type={attrs.type ?? 'upcoming'} maxNumberOfEvents={attrs.maxNumberOfEvents ?? 5} + datetimeFormat={attrs.datetimeFormat ?? 'D, M j, Y, g:i a T'} topics={attrs.topics ?? []} /> ); diff --git a/src/components/EventsList.js b/src/components/EventsList.js index 3ed823fcd..05885629a 100644 --- a/src/components/EventsList.js +++ b/src/components/EventsList.js @@ -31,7 +31,14 @@ import apiFetch from '@wordpress/api-fetch'; * @return {JSX.Element} The rendered React component. */ const EventsList = (props) => { - const { eventOptions, maxNumberOfEvents, type, topics, venues } = props; + const { + eventOptions, + maxNumberOfEvents, + datetimeFormat, + type, + topics, + venues, + } = props; const [events, setEvents] = useState([]); const [loaded, setLoaded] = useState(false); const renderEvents = events.map((event) => { @@ -84,7 +91,7 @@ const EventsList = (props) => { */ if (getFromGlobal('is_user_logged_in')) { apiFetch({ - path: `/gatherpress/v1/event/events-list?event_list_type=${type}&max_number=${maxNumberOfEvents}&topics=${topicsString}&venues=${venuesString}`, + path: `/gatherpress/v1/event/events-list?event_list_type=${type}&max_number=${maxNumberOfEvents}&datetime_format=${datetimeFormat}&topics=${topicsString}&venues=${venuesString}`, }).then((data) => { setLoaded(true); setEvents(data); @@ -92,7 +99,7 @@ const EventsList = (props) => { } else { const endpoint = getFromGlobal('event_rest_api') + - `/events-list?event_list_type=${type}&max_number=${maxNumberOfEvents}&topics=${topicsString}&venues=${venuesString}`; + `/events-list?event_list_type=${type}&max_number=${maxNumberOfEvents}&datetime_format=${datetimeFormat}&topics=${topicsString}&venues=${venuesString}`; /** * Not using apiFetch helper here as it will use X-Wp-Nonce and cache it when page caching is on causing a 403. @@ -108,7 +115,7 @@ const EventsList = (props) => { setEvents(data); }); } - }, [setEvents, maxNumberOfEvents, type, topics, venues]); + }, [setEvents, maxNumberOfEvents, datetimeFormat, type, topics, venues]); return (